@baasix/baasix 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +5 -2
  2. package/dist/README.md +5 -2
  3. package/dist/app/404/index.html +1 -1
  4. package/dist/app/404.html +1 -1
  5. package/dist/app/_next/static/chunks/{1303-35a96e9c9cdeab9d.js → 1303-6e8e0ab420489175.js} +1 -1
  6. package/dist/app/_next/static/chunks/{7636-66424f0b51d350e9.js → 6869-11b3cd61c78598a7.js} +1 -1
  7. package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/all-activity/{page-8917930b4d663405.js → page-9460888c7869175a.js} +1 -1
  8. package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/email-log/{page-b27a6ee32782d7df.js → page-b1ac4225c527560a.js} +1 -1
  9. package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/notifications/{page-b7eda523ede2702c.js → page-1ca36689996a70ca.js} +1 -1
  10. package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/sessions/{page-3e21e20db90aeff7.js → page-b56283efd807bb83.js} +1 -1
  11. package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/workflow-executions/{page-27bcc26b747fb29b.js → page-e51d3bd423e40698.js} +1 -1
  12. package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/workflow-logs/{page-9f9e9e952aef436e.js → page-0c66a19a631235f5.js} +1 -1
  13. package/dist/app/_next/static/chunks/app/(authenticated)/data-browser/{page-8cda2b57759dd670.js → page-9ec37be34fd8d678.js} +1 -1
  14. package/dist/app/_next/static/chunks/app/(authenticated)/file-manager/{page-8c6f1b1da66ad7e4.js → page-d60abff00fccbf29.js} +1 -1
  15. package/dist/app/_next/static/chunks/app/(authenticated)/settings/permissions/{page-828110cfcde429c6.js → page-d926a5b4872695a4.js} +1 -1
  16. package/dist/app/_next/static/chunks/app/(authenticated)/settings/project/{page-420e794bb76bd204.js → page-5c3040f58b8e23d7.js} +1 -1
  17. package/dist/app/_next/static/chunks/app/(authenticated)/settings/roles/{page-9001d02b28f70708.js → page-71d583c231374dbc.js} +1 -1
  18. package/dist/app/_next/static/chunks/app/(authenticated)/settings/tasks/{page-ad7ab3e27c83f44f.js → page-d71c68b8d6881949.js} +1 -1
  19. package/dist/app/_next/static/chunks/app/(authenticated)/settings/templates/{page-3181447f8772b1d3.js → page-3afd64a48008235e.js} +1 -1
  20. package/dist/app/_next/static/chunks/app/(authenticated)/settings/tenants/{page-ef9bfbacef5a1d73.js → page-6100b04cfb7b80f9.js} +1 -1
  21. package/dist/app/_next/static/chunks/app/(authenticated)/users/invites/{page-480306b7b2bbac7e.js → page-9f2fffd4d5275f73.js} +1 -1
  22. package/dist/app/_next/static/chunks/app/(authenticated)/users/list/{page-74da51254c2606b3.js → page-0ac7b5d5f917a65c.js} +1 -1
  23. package/dist/app/_next/static/chunks/app/(authenticated)/users/{page-e99c6f0b915001b2.js → page-097a7095790540d1.js} +1 -1
  24. package/dist/app/_next/static/chunks/app/(authenticated)/users/preferences/{page-1a935630ce8f2b12.js → page-c9c9945b9f7080a7.js} +1 -1
  25. package/dist/app/_next/static/chunks/app/(authenticated)/users/user-roles/{page-901dfb8ea1f39ca8.js → page-cb8ca6acf9c1ac9b.js} +1 -1
  26. package/dist/app/_next/static/chunks/app/(authenticated)/workflows/{page-88bc5b36ccb0a1f7.js → page-1a7a4305ef892fa8.js} +1 -1
  27. package/dist/app/_next/static/chunks/app/(public)/login/{page-c0a10b137f346096.js → page-b1777d764eb6defb.js} +1 -1
  28. package/dist/app/_next/static/chunks/app/{layout-591ca7a3e16528a1.js → layout-1af2638eaca64bf1.js} +1 -1
  29. package/dist/app/_next/static/chunks/{webpack-2c306566f7ee1b63.js → webpack-97b8127545c29856.js} +1 -1
  30. package/dist/app/activity-log/all-activity/index.html +1 -1
  31. package/dist/app/activity-log/all-activity/index.txt +3 -3
  32. package/dist/app/activity-log/email-log/index.html +1 -1
  33. package/dist/app/activity-log/email-log/index.txt +3 -3
  34. package/dist/app/activity-log/index.html +1 -1
  35. package/dist/app/activity-log/index.txt +2 -2
  36. package/dist/app/activity-log/notifications/index.html +1 -1
  37. package/dist/app/activity-log/notifications/index.txt +3 -3
  38. package/dist/app/activity-log/sessions/index.html +1 -1
  39. package/dist/app/activity-log/sessions/index.txt +3 -3
  40. package/dist/app/activity-log/workflow-executions/index.html +1 -1
  41. package/dist/app/activity-log/workflow-executions/index.txt +3 -3
  42. package/dist/app/activity-log/workflow-logs/index.html +1 -1
  43. package/dist/app/activity-log/workflow-logs/index.txt +3 -3
  44. package/dist/app/change-password/index.html +1 -1
  45. package/dist/app/change-password/index.txt +2 -2
  46. package/dist/app/dashboard/index.html +1 -1
  47. package/dist/app/dashboard/index.txt +2 -2
  48. package/dist/app/data-browser/index.html +1 -1
  49. package/dist/app/data-browser/index.txt +3 -3
  50. package/dist/app/file-manager/index.html +1 -1
  51. package/dist/app/file-manager/index.txt +3 -3
  52. package/dist/app/forgot-password/index.html +1 -1
  53. package/dist/app/forgot-password/index.txt +2 -2
  54. package/dist/app/index.html +1 -1
  55. package/dist/app/index.txt +2 -2
  56. package/dist/app/login/index.html +1 -1
  57. package/dist/app/login/index.txt +3 -3
  58. package/dist/app/register/index.html +1 -1
  59. package/dist/app/register/index.txt +2 -2
  60. package/dist/app/settings/migrations/index.html +1 -1
  61. package/dist/app/settings/migrations/index.txt +2 -2
  62. package/dist/app/settings/permissions/index.html +1 -1
  63. package/dist/app/settings/permissions/index.txt +3 -3
  64. package/dist/app/settings/project/index.html +1 -1
  65. package/dist/app/settings/project/index.txt +3 -3
  66. package/dist/app/settings/roles/index.html +1 -1
  67. package/dist/app/settings/roles/index.txt +3 -3
  68. package/dist/app/settings/schema/index.html +1 -1
  69. package/dist/app/settings/schema/index.txt +2 -2
  70. package/dist/app/settings/tasks/index.html +1 -1
  71. package/dist/app/settings/tasks/index.txt +3 -3
  72. package/dist/app/settings/templates/edit/index.html +1 -1
  73. package/dist/app/settings/templates/edit/index.txt +2 -2
  74. package/dist/app/settings/templates/index.html +1 -1
  75. package/dist/app/settings/templates/index.txt +3 -3
  76. package/dist/app/settings/tenants/index.html +1 -1
  77. package/dist/app/settings/tenants/index.txt +3 -3
  78. package/dist/app/users/index.html +1 -1
  79. package/dist/app/users/index.txt +3 -3
  80. package/dist/app/users/invites/index.html +1 -1
  81. package/dist/app/users/invites/index.txt +3 -3
  82. package/dist/app/users/list/index.html +1 -1
  83. package/dist/app/users/list/index.txt +3 -3
  84. package/dist/app/users/preferences/index.html +1 -1
  85. package/dist/app/users/preferences/index.txt +3 -3
  86. package/dist/app/users/user-roles/index.html +1 -1
  87. package/dist/app/users/user-roles/index.txt +3 -3
  88. package/dist/app/workflows/detail/index.html +1 -1
  89. package/dist/app/workflows/detail/index.txt +2 -2
  90. package/dist/app/workflows/edit/index.html +1 -1
  91. package/dist/app/workflows/edit/index.txt +2 -2
  92. package/dist/app/workflows/execution/index.html +1 -1
  93. package/dist/app/workflows/execution/index.txt +2 -2
  94. package/dist/app/workflows/index.html +1 -1
  95. package/dist/app/workflows/index.txt +3 -3
  96. package/dist/routes/file.route.d.ts.map +1 -1
  97. package/dist/routes/file.route.js +5 -2
  98. package/dist/routes/file.route.js.map +1 -1
  99. package/package.json +115 -115
  100. /package/dist/app/_next/static/{eCWhKA8XHqmB1zgFcEtN2 → IrfWLqQW-v_VRpZ550bv5}/_buildManifest.js +0 -0
  101. /package/dist/app/_next/static/{eCWhKA8XHqmB1zgFcEtN2 → IrfWLqQW-v_VRpZ550bv5}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  <p align="center">
10
10
  <a href="https://baasix.com">Website</a> •
11
11
  <a href="https://baasix.com/docs">Documentation</a> •
12
- <a href="https://github.com/baasix/baasix-sample">Sample Project</a> •
12
+ <a href="https://github.com/baasix/baasix/tree/main/samples/sample">Sample Project</a> •
13
13
  <a href="https://github.com/baasix/baasix">GitHub</a>
14
14
  </p>
15
15
 
@@ -326,6 +326,9 @@ SECRET_KEY=your-secret-key-min-32-chars
326
326
  # TASK_SERVICE_ENABLED=true
327
327
  # TASK_REDIS_ENABLED=true # For multi-instance
328
328
  # TASK_REDIS_URL=redis://localhost:6379
329
+
330
+ # File Upload (optional)
331
+ # MAX_UPLOAD_FILE_SIZE=50 # Default: 50MB, set to 100 for 100MB
329
332
  ```
330
333
 
331
334
  > **Multi-Instance Deployments:** When running multiple instances (PM2 cluster, Kubernetes, etc.), enable Redis for Socket.IO and Tasks to ensure proper coordination. See the [Deployment Guide](https://baasix.com/docs/deployment-guide#multi-instance-deployment-scaling) for details.
@@ -366,7 +369,7 @@ Full documentation is available at **[baasix.com/docs](https://baasix.com/docs)*
366
369
 
367
370
  Get started quickly with our complete sample project:
368
371
 
369
- 👉 **[github.com/baasix/baasix-sample](https://github.com/baasix/baasix-sample)**
372
+ 👉 **[github.com/baasix/baasix/samples/sample](https://github.com/baasix/baasix/tree/main/samples/sample)**
370
373
 
371
374
  Includes:
372
375
  - Ready-to-use server configuration
package/dist/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  <p align="center">
10
10
  <a href="https://baasix.com">Website</a> •
11
11
  <a href="https://baasix.com/docs">Documentation</a> •
12
- <a href="https://github.com/baasix/baasix-sample">Sample Project</a> •
12
+ <a href="https://github.com/baasix/baasix/tree/main/samples/sample">Sample Project</a> •
13
13
  <a href="https://github.com/baasix/baasix">GitHub</a>
14
14
  </p>
15
15
 
@@ -326,6 +326,9 @@ SECRET_KEY=your-secret-key-min-32-chars
326
326
  # TASK_SERVICE_ENABLED=true
327
327
  # TASK_REDIS_ENABLED=true # For multi-instance
328
328
  # TASK_REDIS_URL=redis://localhost:6379
329
+
330
+ # File Upload (optional)
331
+ # MAX_UPLOAD_FILE_SIZE=50 # Default: 50MB, set to 100 for 100MB
329
332
  ```
330
333
 
331
334
  > **Multi-Instance Deployments:** When running multiple instances (PM2 cluster, Kubernetes, etc.), enable Redis for Socket.IO and Tasks to ensure proper coordination. See the [Deployment Guide](https://baasix.com/docs/deployment-guide#multi-instance-deployment-scaling) for details.
@@ -366,7 +369,7 @@ Full documentation is available at **[baasix.com/docs](https://baasix.com/docs)*
366
369
 
367
370
  Get started quickly with our complete sample project:
368
371
 
369
- 👉 **[github.com/baasix/baasix-sample](https://github.com/baasix/baasix-sample)**
372
+ 👉 **[github.com/baasix/baasix/samples/sample](https://github.com/baasix/baasix/tree/main/samples/sample)**
370
373
 
371
374
  Includes:
372
375
  - Ready-to-use server configuration
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/6c4002bae4e236b2.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-2c306566f7ee1b63.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/7636-66424f0b51d350e9.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/1303-35a96e9c9cdeab9d.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-591ca7a3e16528a1.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-2c306566f7ee1b63.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"7636\",\"static/chunks/7636-66424f0b51d350e9.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"1303\",\"static/chunks/1303-35a96e9c9cdeab9d.js\",\"3185\",\"static/chunks/app/layout-591ca7a3e16528a1.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"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\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"eCWhKA8XHqmB1zgFcEtN2\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"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\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/6c4002bae4e236b2.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-97b8127545c29856.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/1303-6e8e0ab420489175.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-1af2638eaca64bf1.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-97b8127545c29856.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"1303\",\"static/chunks/1303-6e8e0ab420489175.js\",\"3185\",\"static/chunks/app/layout-1af2638eaca64bf1.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"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\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"IrfWLqQW-v_VRpZ550bv5\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"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\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
package/dist/app/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/6c4002bae4e236b2.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-2c306566f7ee1b63.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/7636-66424f0b51d350e9.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/1303-35a96e9c9cdeab9d.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-591ca7a3e16528a1.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-2c306566f7ee1b63.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"7636\",\"static/chunks/7636-66424f0b51d350e9.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"1303\",\"static/chunks/1303-35a96e9c9cdeab9d.js\",\"3185\",\"static/chunks/app/layout-591ca7a3e16528a1.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"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\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"eCWhKA8XHqmB1zgFcEtN2\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"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\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/admin/_next/static/css/6c4002bae4e236b2.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/admin/_next/static/chunks/webpack-97b8127545c29856.js"/><script src="/admin/_next/static/chunks/fd9d1056-54169f07cd680d6c.js" async=""></script><script src="/admin/_next/static/chunks/2117-29b5fa47421595ad.js" async=""></script><script src="/admin/_next/static/chunks/main-app-55bcae20c77aaf0e.js" async=""></script><script src="/admin/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js" async=""></script><script src="/admin/_next/static/chunks/5094-8d53e403235d4ca6.js" async=""></script><script src="/admin/_next/static/chunks/4438-c9a12ca15b6e9160.js" async=""></script><script src="/admin/_next/static/chunks/6530-a91e10cffa4200c4.js" async=""></script><script src="/admin/_next/static/chunks/6241-30d7169d1010e5a4.js" async=""></script><script src="/admin/_next/static/chunks/1668-e3eabd0f6753c780.js" async=""></script><script src="/admin/_next/static/chunks/6869-11b3cd61c78598a7.js" async=""></script><script src="/admin/_next/static/chunks/8473-6598318371eca31b.js" async=""></script><script src="/admin/_next/static/chunks/4883-8a924721bb21b3b0.js" async=""></script><script src="/admin/_next/static/chunks/1303-6e8e0ab420489175.js" async=""></script><script src="/admin/_next/static/chunks/app/layout-1af2638eaca64bf1.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-FBCW8DT7KT" as="script"/><meta name="robots" content="noindex"/><title>Baasix</title><script src="/admin/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased"><!--$--><div class="flex items-center justify-center min-h-screen bg-background"><div class="text-center"><div class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"></div><p class="mt-4 text-muted-foreground">Loading...</p></div></div><!--/$--><script src="/admin/_next/static/chunks/webpack-97b8127545c29856.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[84821,[\"7999\",\"static/chunks/6fcbdc68-90be1a5480b8d353.js\",\"5094\",\"static/chunks/5094-8d53e403235d4ca6.js\",\"4438\",\"static/chunks/4438-c9a12ca15b6e9160.js\",\"6530\",\"static/chunks/6530-a91e10cffa4200c4.js\",\"6241\",\"static/chunks/6241-30d7169d1010e5a4.js\",\"1668\",\"static/chunks/1668-e3eabd0f6753c780.js\",\"6869\",\"static/chunks/6869-11b3cd61c78598a7.js\",\"8473\",\"static/chunks/8473-6598318371eca31b.js\",\"4883\",\"static/chunks/4883-8a924721bb21b3b0.js\",\"1303\",\"static/chunks/1303-6e8e0ab420489175.js\",\"3185\",\"static/chunks/app/layout-1af2638eaca64bf1.js\"],\"default\",1]\nc:I[61060,[],\"\"]\n7:{\"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\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"IrfWLqQW-v_VRpZ550bv5\",\"assetPrefix\":\"/admin\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"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\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/admin/_next/static/css/6c4002bae4e236b2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1303],{83434:function(e,t,a){a.d(t,{G:function(){return r}});var s=a(89409);let i="token",n="baasix_access_token",r=(0,s.ql)({url:window.location.origin,authMode:"jwt",autoRefresh:!0,onAuthStateChange:(e,t)=>{console.log("[SDK] Auth state changed:",e,null==t?void 0:t.email)}});{let e=localStorage.getItem(i)||localStorage.getItem(n);e&&(r.setToken(e),localStorage.setItem(i,e),localStorage.setItem(n,e)),window.addEventListener("storage",e=>{(e.key===i||e.key===n)&&(e.newValue?(r.setToken(e.newValue),localStorage.setItem(i,e.newValue),localStorage.setItem(n,e.newValue)):r.setToken(""))})}},28757:function(e,t,a){a.d(t,{DG:function(){return u},LR:function(){return o},fO:function(){return f},gm:function(){return r}});let s=(e,t)=>"collections"===e||"baasix_SchemaDefinition"===e?{type:"schemas"}:"files"===e||"baasix_File"===e?{type:"files"}:"permissions"===e||"baasix_Permission"===e?{type:"permissions"}:"baasix_Settings"===e?{type:"items",collection:"baasix_Settings"}:"roles"===e?{type:"items",collection:"baasix_Role"}:"users"===e?{type:"items",collection:"baasix_User"}:"indexes"===e?{type:"indexes",collectionName:null==t?void 0:t.collectionName}:"relationships"===e?{type:"relationships",collectionName:null==t?void 0:t.collectionName}:{type:"items",collection:e},i={eq:"eq",ne:"ne",lt:"lt",gt:"gt",lte:"lte",gte:"gte",in:"in",nin:"notIn",contains:"like",containss:"iLike",ncontains:"notLike",ncontainss:"notILike",null:"isNull",nnull:"isNotNull",between:"between",nbetween:"notBetween",startswith:"startsWith",startswiths:"startsWiths",nstartswith:"nstartsWith",nstartswiths:"nstartsWiths",endswith:"endsWith",endswiths:"endsWiths",nendswith:"nendsWith",nendswiths:"nendsWiths",or:"OR",and:"AND",intersects:"intersects",nIntersects:"nIntersects",dwithin:"dwithin",containsGEO:"containsGEO",within:"within",true:"eq",false:"eq"},n={eq:"eq",ne:"ne",lt:"lt",gt:"gt",lte:"lte",gte:"gte",in:"in",notIn:"nin",like:"contains",iLike:"containss",notLike:"ncontains",notILike:"ncontainss",isNull:"null",isNotNull:"nnull",between:"between",notBetween:"nbetween",startsWith:"startswith",startsWiths:"startswiths",nstartsWith:"nstartswith",nstartsWiths:"nstartswiths",endsWith:"endswith",endsWiths:"endswiths",nendsWith:"nendswith",nendsWiths:"nendswiths",OR:"or",AND:"and",intersects:"intersects",nIntersects:"nIntersects",dwithin:"dwithin",containsGEO:"containsGEO",within:"within"},r=e=>{if(!e||0===e.length)return{};let t={AND:[]};return(e.forEach(e=>{if("field"in e){let a=i[e.operator]||e.operator;t.AND.push({[e.field]:{[a]:e.value}})}else if("operator"in e&&("and"===e.operator||"or"===e.operator)){let a=i[e.operator]||e.operator,s={[a]:[]};e.value.forEach(e=>{if("field"in e){let t=i[e.operator]||e.operator;s[a].push({[e.field]:{[t]:e.value}})}else if("operator"in e){let t=r([e]);t.AND&&t.AND.length>0?s[a].push(...t.AND):s[a].push(t)}}),t.AND.push(s)}}),1===t.AND.length)?t.AND[0]:t},o=e=>{if(!e||0===Object.keys(e).length)return[];let t=e=>{let a=[];return Object.entries(e).forEach(e=>{let[s,i]=e;if("AND"===s||"OR"===s){let e=n[s]||s.toLowerCase(),r=[];Array.isArray(i)&&i.forEach(e=>{let a=t(e);r.push(...a)}),r.length>0&&a.push({operator:e,value:r})}else"object"==typeof i&&null!==i&&Object.entries(i).forEach(e=>{let[t,i]=e,r=n[t]||t;a.push({field:s,operator:r,value:i})})}),a};return t(e)},l=e=>{if(void 0===e)return null;let{field:t,operator:a,value:s}=e;return{[t]:{[i[a]||a]:s}}},c=e=>{if(void 0===e)return null;let{operator:t,value:a}=e,s=i[t]||t,n={};return n[s]=[],a.forEach(e=>{if("field"in e){let t=l(e);t&&n[s].push(t)}else{let t=c(e);t&&n[s].push(t)}}),n},h=e=>{let t={},a="";return e&&(t.AND=[],e.forEach(e=>{if("or"!==e.operator&&"and"!==e.operator&&"field"in e){let{field:s,value:i}=e;if(i){if("search"===s)a=i;else{let a=l(e);a&&t.AND.push(a)}}}else{let a=c(e);a&&t.AND.push(a)}})),{search:a,filters:t}},d=e=>{if(!e||0===e.length)return;let t={};return e.forEach(e=>{t[e.field]=e.order}),t},u=e=>({getList:async t=>{let{resource:a,pagination:i,filters:n,sorters:r,meta:o}=t,l=s(a,o),c=h(n),u=10;("collections"===a||"baasix_SchemaDefinition"===a)&&(u=50);let f={page:(null==i?void 0:i.current)||1,limit:(null==i?void 0:i.pageSize)||u,filter:c.filters,sort:d(r),...o};c.search&&(f.search=c.search);try{let t;switch(l.type){case"schemas":t=await e.schemas.find(f);break;case"files":t=await e.files.find(f);break;case"permissions":t=await e.permissions.find(f);break;default:t=await e.items(l.collection).find(f)}return{data:t.data||[],total:t.totalCount||0}}catch(e){throw console.error("getList error for ".concat(a,":"),e),e}},getOne:async t=>{let{resource:a,id:i,meta:n}=t,r=s(a,n),o=(null==n?void 0:n.fields)&&Array.isArray(n.fields)?n.fields.filter(e=>"string"==typeof e):["*"];try{let t;switch(r.type){case"schemas":t=await e.schemas.findOne(i);break;case"files":t=await e.files.findOne(i);break;case"permissions":t=await e.permissions.findOne(i);break;default:t=await e.items(r.collection).findOne(i,{fields:o})}return{data:t}}catch(e){throw console.error("getOne error for ".concat(a,"/").concat(i,":"),e),e}},create:async t=>{let{resource:a,variables:i,meta:n}=t,r=s(a,n);try{let t;switch(r.type){case"schemas":t=await e.schemas.create(i);break;case"files":if(i instanceof FormData){let a=i.get("file");if(a)t=await e.files.upload(a);else throw Error("No file provided in FormData")}else t=await e.files.upload(i);break;case"permissions":t=await e.permissions.create(i);break;case"indexes":t=await e.schemas.createIndex(r.collectionName,i);break;case"relationships":t=await e.schemas.createRelationship(r.collectionName,i);break;default:t={id:await e.items(r.collection).create(i)}}return{data:t}}catch(e){throw console.error("create error for ".concat(a,":"),e),e}},update:async t=>{let{resource:a,id:i,variables:n,meta:r}=t,o=s(a,r);try{let t;switch(o.type){case"schemas":t=await e.schemas.update(i,n);break;case"files":t=await e.files.update(i,n);break;case"permissions":t=await e.permissions.update(i,n);break;case"relationships":t=await e.schemas.updateRelationship(o.collectionName,i,n);break;default:await e.items(o.collection).update(i,n),t={id:i}}return{data:t}}catch(e){throw console.error("update error for ".concat(a,"/").concat(i,":"),e),e}},deleteOne:async t=>{let{resource:a,id:i,meta:n}=t,r=s(a,n);try{switch(r.type){case"schemas":await e.schemas.delete(i);break;case"files":await e.files.delete(i);break;case"permissions":await e.permissions.delete(i);break;case"indexes":await e.schemas.deleteIndex(r.collectionName,i);break;case"relationships":await e.schemas.deleteRelationship(r.collectionName,i);break;default:await e.items(r.collection).delete(i)}return{data:{id:i}}}catch(e){throw console.error("deleteOne error for ".concat(a,"/").concat(i,":"),e),e}},getMany:async t=>{let{resource:a,ids:i,meta:n}=t,r=s(a,n),o={id:{in:i}};try{let t;switch(r.type){case"schemas":t=await e.schemas.find({filter:o});break;case"files":t=await e.files.find({filter:o});break;case"permissions":t=await e.permissions.find({filter:o});break;default:t=await e.items(r.collection).find({filter:o})}return{data:t.data||[]}}catch(e){throw console.error("getMany error for ".concat(a,":"),e),e}},createMany:async t=>{let{resource:a,variables:i,meta:n}=t,r=s(a,n);try{if("items"!==r.type)throw Error("createMany not supported for ".concat(r.type));return{data:(await e.items(r.collection).createMany(i)).map(e=>({id:e}))}}catch(e){throw console.error("createMany error for ".concat(a,":"),e),e}},updateMany:async t=>{let{resource:a,ids:i,variables:n,meta:r}=t,o=s(a,r);try{if("items"!==o.type)throw Error("updateMany not supported for ".concat(o.type));return await e.items(o.collection).updateMany(i,n),{data:i.map(e=>({id:e}))}}catch(e){throw console.error("updateMany error for ".concat(a,":"),e),e}},deleteMany:async t=>{let{resource:a,ids:i,meta:n}=t,r=s(a,n);try{if("items"!==r.type)throw Error("deleteMany not supported for ".concat(r.type));return await e.items(r.collection).deleteMany(i),{data:i.map(e=>({id:e}))}}catch(e){throw console.error("deleteMany error for ".concat(a,":"),e),e}},custom:async t=>{let{url:a,method:s,filters:i,sorters:n,payload:r,query:o,headers:l}=t,c=e.request,h={...o,filter:i,sort:n};try{let e;let t=r instanceof FormData;switch(s){case"get":e=await c.get(a,{params:h});break;case"post":e=t?await c.upload(a,r,{params:h}):await c.post(a,r,{params:h});break;case"put":e=await c.put(a,r,{params:h});break;case"patch":e=await c.patch(a,r,{params:h});break;case"delete":e=await c.delete(a,{params:h});break;default:throw Error("Unsupported method: ".concat(s))}return{data:e}}catch(e){throw console.error("custom request error:",e),e}},getApiUrl:()=>window.location.origin}),f=e=>async function(t,a,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"before";await e.items(t).sortItem(a,s,i)}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1303],{83434:function(e,t,a){a.d(t,{G:function(){return r}});var s=a(49112);let i="token",n="baasix_access_token",r=(0,s.ql)({url:window.location.origin,authMode:"jwt",autoRefresh:!0,onAuthStateChange:(e,t)=>{console.log("[SDK] Auth state changed:",e,null==t?void 0:t.email)}});{let e=localStorage.getItem(i)||localStorage.getItem(n);e&&(r.setToken(e),localStorage.setItem(i,e),localStorage.setItem(n,e)),window.addEventListener("storage",e=>{(e.key===i||e.key===n)&&(e.newValue?(r.setToken(e.newValue),localStorage.setItem(i,e.newValue),localStorage.setItem(n,e.newValue)):r.setToken(""))})}},28757:function(e,t,a){a.d(t,{DG:function(){return u},LR:function(){return o},fO:function(){return f},gm:function(){return r}});let s=(e,t)=>"collections"===e||"baasix_SchemaDefinition"===e?{type:"schemas"}:"files"===e||"baasix_File"===e?{type:"files"}:"permissions"===e||"baasix_Permission"===e?{type:"permissions"}:"baasix_Settings"===e?{type:"items",collection:"baasix_Settings"}:"roles"===e?{type:"items",collection:"baasix_Role"}:"users"===e?{type:"items",collection:"baasix_User"}:"indexes"===e?{type:"indexes",collectionName:null==t?void 0:t.collectionName}:"relationships"===e?{type:"relationships",collectionName:null==t?void 0:t.collectionName}:{type:"items",collection:e},i={eq:"eq",ne:"ne",lt:"lt",gt:"gt",lte:"lte",gte:"gte",in:"in",nin:"notIn",contains:"like",containss:"iLike",ncontains:"notLike",ncontainss:"notILike",null:"isNull",nnull:"isNotNull",between:"between",nbetween:"notBetween",startswith:"startsWith",startswiths:"startsWiths",nstartswith:"nstartsWith",nstartswiths:"nstartsWiths",endswith:"endsWith",endswiths:"endsWiths",nendswith:"nendsWith",nendswiths:"nendsWiths",or:"OR",and:"AND",intersects:"intersects",nIntersects:"nIntersects",dwithin:"dwithin",containsGEO:"containsGEO",within:"within",true:"eq",false:"eq"},n={eq:"eq",ne:"ne",lt:"lt",gt:"gt",lte:"lte",gte:"gte",in:"in",notIn:"nin",like:"contains",iLike:"containss",notLike:"ncontains",notILike:"ncontainss",isNull:"null",isNotNull:"nnull",between:"between",notBetween:"nbetween",startsWith:"startswith",startsWiths:"startswiths",nstartsWith:"nstartswith",nstartsWiths:"nstartswiths",endsWith:"endswith",endsWiths:"endswiths",nendsWith:"nendswith",nendsWiths:"nendswiths",OR:"or",AND:"and",intersects:"intersects",nIntersects:"nIntersects",dwithin:"dwithin",containsGEO:"containsGEO",within:"within"},r=e=>{if(!e||0===e.length)return{};let t={AND:[]};return(e.forEach(e=>{if("field"in e){let a=i[e.operator]||e.operator;t.AND.push({[e.field]:{[a]:e.value}})}else if("operator"in e&&("and"===e.operator||"or"===e.operator)){let a=i[e.operator]||e.operator,s={[a]:[]};e.value.forEach(e=>{if("field"in e){let t=i[e.operator]||e.operator;s[a].push({[e.field]:{[t]:e.value}})}else if("operator"in e){let t=r([e]);t.AND&&t.AND.length>0?s[a].push(...t.AND):s[a].push(t)}}),t.AND.push(s)}}),1===t.AND.length)?t.AND[0]:t},o=e=>{if(!e||0===Object.keys(e).length)return[];let t=e=>{let a=[];return Object.entries(e).forEach(e=>{let[s,i]=e;if("AND"===s||"OR"===s){let e=n[s]||s.toLowerCase(),r=[];Array.isArray(i)&&i.forEach(e=>{let a=t(e);r.push(...a)}),r.length>0&&a.push({operator:e,value:r})}else"object"==typeof i&&null!==i&&Object.entries(i).forEach(e=>{let[t,i]=e,r=n[t]||t;a.push({field:s,operator:r,value:i})})}),a};return t(e)},l=e=>{if(void 0===e)return null;let{field:t,operator:a,value:s}=e;return{[t]:{[i[a]||a]:s}}},c=e=>{if(void 0===e)return null;let{operator:t,value:a}=e,s=i[t]||t,n={};return n[s]=[],a.forEach(e=>{if("field"in e){let t=l(e);t&&n[s].push(t)}else{let t=c(e);t&&n[s].push(t)}}),n},h=e=>{let t={},a="";return e&&(t.AND=[],e.forEach(e=>{if("or"!==e.operator&&"and"!==e.operator&&"field"in e){let{field:s,value:i}=e;if(i){if("search"===s)a=i;else{let a=l(e);a&&t.AND.push(a)}}}else{let a=c(e);a&&t.AND.push(a)}})),{search:a,filters:t}},d=e=>{if(!e||0===e.length)return;let t={};return e.forEach(e=>{t[e.field]=e.order}),t},u=e=>({getList:async t=>{let{resource:a,pagination:i,filters:n,sorters:r,meta:o}=t,l=s(a,o),c=h(n),u=10;("collections"===a||"baasix_SchemaDefinition"===a)&&(u=50);let f={page:(null==i?void 0:i.current)||1,limit:(null==i?void 0:i.pageSize)||u,filter:c.filters,sort:d(r),...o};c.search&&(f.search=c.search);try{let t;switch(l.type){case"schemas":t=await e.schemas.find(f);break;case"files":t=await e.files.find(f);break;case"permissions":t=await e.permissions.find(f);break;default:t=await e.items(l.collection).find(f)}return{data:t.data||[],total:t.totalCount||0}}catch(e){throw console.error("getList error for ".concat(a,":"),e),e}},getOne:async t=>{let{resource:a,id:i,meta:n}=t,r=s(a,n),o=(null==n?void 0:n.fields)&&Array.isArray(n.fields)?n.fields.filter(e=>"string"==typeof e):["*"];try{let t;switch(r.type){case"schemas":t=await e.schemas.findOne(i);break;case"files":t=await e.files.findOne(i);break;case"permissions":t=await e.permissions.findOne(i);break;default:t=await e.items(r.collection).findOne(i,{fields:o})}return{data:t}}catch(e){throw console.error("getOne error for ".concat(a,"/").concat(i,":"),e),e}},create:async t=>{let{resource:a,variables:i,meta:n}=t,r=s(a,n);try{let t;switch(r.type){case"schemas":t=await e.schemas.create(i);break;case"files":if(i instanceof FormData){let a=i.get("file");if(a)t=await e.files.upload(a);else throw Error("No file provided in FormData")}else t=await e.files.upload(i);break;case"permissions":t=await e.permissions.create(i);break;case"indexes":t=await e.schemas.createIndex(r.collectionName,i);break;case"relationships":t=await e.schemas.createRelationship(r.collectionName,i);break;default:t={id:await e.items(r.collection).create(i)}}return{data:t}}catch(e){throw console.error("create error for ".concat(a,":"),e),e}},update:async t=>{let{resource:a,id:i,variables:n,meta:r}=t,o=s(a,r);try{let t;switch(o.type){case"schemas":t=await e.schemas.update(i,n);break;case"files":t=await e.files.update(i,n);break;case"permissions":t=await e.permissions.update(i,n);break;case"relationships":t=await e.schemas.updateRelationship(o.collectionName,i,n);break;default:await e.items(o.collection).update(i,n),t={id:i}}return{data:t}}catch(e){throw console.error("update error for ".concat(a,"/").concat(i,":"),e),e}},deleteOne:async t=>{let{resource:a,id:i,meta:n}=t,r=s(a,n);try{switch(r.type){case"schemas":await e.schemas.delete(i);break;case"files":await e.files.delete(i);break;case"permissions":await e.permissions.delete(i);break;case"indexes":await e.schemas.deleteIndex(r.collectionName,i);break;case"relationships":await e.schemas.deleteRelationship(r.collectionName,i);break;default:await e.items(r.collection).delete(i)}return{data:{id:i}}}catch(e){throw console.error("deleteOne error for ".concat(a,"/").concat(i,":"),e),e}},getMany:async t=>{let{resource:a,ids:i,meta:n}=t,r=s(a,n),o={id:{in:i}};try{let t;switch(r.type){case"schemas":t=await e.schemas.find({filter:o});break;case"files":t=await e.files.find({filter:o});break;case"permissions":t=await e.permissions.find({filter:o});break;default:t=await e.items(r.collection).find({filter:o})}return{data:t.data||[]}}catch(e){throw console.error("getMany error for ".concat(a,":"),e),e}},createMany:async t=>{let{resource:a,variables:i,meta:n}=t,r=s(a,n);try{if("items"!==r.type)throw Error("createMany not supported for ".concat(r.type));return{data:(await e.items(r.collection).createMany(i)).map(e=>({id:e}))}}catch(e){throw console.error("createMany error for ".concat(a,":"),e),e}},updateMany:async t=>{let{resource:a,ids:i,variables:n,meta:r}=t,o=s(a,r);try{if("items"!==o.type)throw Error("updateMany not supported for ".concat(o.type));return await e.items(o.collection).updateMany(i,n),{data:i.map(e=>({id:e}))}}catch(e){throw console.error("updateMany error for ".concat(a,":"),e),e}},deleteMany:async t=>{let{resource:a,ids:i,meta:n}=t,r=s(a,n);try{if("items"!==r.type)throw Error("deleteMany not supported for ".concat(r.type));return await e.items(r.collection).deleteMany(i),{data:i.map(e=>({id:e}))}}catch(e){throw console.error("deleteMany error for ".concat(a,":"),e),e}},custom:async t=>{let{url:a,method:s,filters:i,sorters:n,payload:r,query:o,headers:l}=t,c=e.request,h={...o,filter:i,sort:n};try{let e;let t=r instanceof FormData;switch(s){case"get":e=await c.get(a,{params:h});break;case"post":e=t?await c.upload(a,r,{params:h}):await c.post(a,r,{params:h});break;case"put":e=await c.put(a,r,{params:h});break;case"patch":e=await c.patch(a,r,{params:h});break;case"delete":e=await c.delete(a,{params:h});break;default:throw Error("Unsupported method: ".concat(s))}return{data:e}}catch(e){throw console.error("custom request error:",e),e}},getApiUrl:()=>window.location.origin}),f=e=>async function(t,a,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"before";await e.items(t).sortItem(a,s,i)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7636],{99376:function(t,e,s){var i=s(35475);s.o(i,"usePathname")&&s.d(e,{usePathname:function(){return i.usePathname}}),s.o(i,"useRouter")&&s.d(e,{useRouter:function(){return i.useRouter}}),s.o(i,"useSearchParams")&&s.d(e,{useSearchParams:function(){return i.useSearchParams}})},89409:function(t,e,s){s.d(e,{NQ:function(){return a},ql:function(){return P}});var i={ACCESS_TOKEN:"baasix_access_token",REFRESH_TOKEN:"baasix_refresh_token",TOKEN_EXPIRY:"baasix_token_expiry",USER:"baasix_user",TENANT:"baasix_tenant"},a=class t extends Error{status;code;details;isRetryable;constructor(e,s=500,i,a){super(e),this.name="BaasixError",this.status=s,this.code=i,this.details=a,this.isRetryable=s>=500||429===s,Error.captureStackTrace&&Error.captureStackTrace(this,t)}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,details:this.details}}},n=class{config;refreshPromise=null;constructor(t){this.config=t}updateConfig(t){this.config={...this.config,...t}}getBaseUrl(){return this.config.baseUrl}buildUrl(t,e){let s=new URL(t,this.config.baseUrl);return e&&Object.entries(e).forEach(([t,e])=>{null!=e&&("object"==typeof e?s.searchParams.set(t,JSON.stringify(e)):s.searchParams.set(t,String(e)))}),s.toString()}async getAccessToken(){return this.config.token?this.config.token:"cookie"===this.config.authMode?null:await this.config.storage.get(i.ACCESS_TOKEN)}async isTokenExpired(){let t=await this.config.storage.get(i.TOKEN_EXPIRY);if(!t)return!1;let e=parseInt(t,10);return Date.now()>=e-6e4}async refreshToken(){return this.refreshPromise||(this.refreshPromise=(async()=>{try{let t=await this.config.storage.get(i.REFRESH_TOKEN);if(!t&&"jwt"===this.config.authMode)throw new a("No refresh token available",401,"NO_REFRESH_TOKEN");let e=await fetch(this.buildUrl("/auth/refresh"),{method:"POST",headers:{"Content-Type":"application/json",...this.config.headers},body:"jwt"===this.config.authMode?JSON.stringify({refreshToken:t}):void 0,credentials:this.config.credentials});if(!e.ok)throw new a("Token refresh failed",e.status,"REFRESH_FAILED");let s=await e.json(),n={accessToken:s.token,refreshToken:s.refreshToken,expiresIn:s.expiresIn,expiresAt:s.expiresIn?Date.now()+1e3*s.expiresIn:void 0};return await this.config.storage.set(i.ACCESS_TOKEN,n.accessToken),n.refreshToken&&await this.config.storage.set(i.REFRESH_TOKEN,n.refreshToken),n.expiresAt&&await this.config.storage.set(i.TOKEN_EXPIRY,n.expiresAt.toString()),this.config.onTokenRefresh?.(n),n}finally{this.refreshPromise=null}})()),this.refreshPromise}async buildHeaders(t={}){let e={"Content-Type":"application/json",...this.config.headers};if(this.config.tenantId&&(e["X-Tenant-Id"]=this.config.tenantId),t.skipAuth)return e;if("jwt"===this.config.authMode){if(this.config.autoRefresh&&await this.isTokenExpired())try{await this.refreshToken()}catch{}let t=await this.getAccessToken();t&&(e.Authorization=`Bearer ${t}`)}return e}async parseError(t){let e={};try{e=await t.json()}catch{}let s=e.error?.message||e.message||t.statusText||"Request failed",i=e.error?.code,n=e.details;return new a(s,t.status,i,n)}async request(t,e,s={}){let{params:i,timeout:n,skipAuth:r,rawResponse:o,...c}=s,l=this.buildUrl(e,i),h=await this.buildHeaders({skipAuth:r}),u=n||this.config.timeout,d=new AbortController,m=setTimeout(()=>d.abort(),u);try{let e=await fetch(l,{method:t,headers:{...h,...c.headers},credentials:this.config.credentials,signal:d.signal,...c});if(401===e.status&&!r&&this.config.autoRefresh)try{await this.refreshToken();let e=await this.buildHeaders({skipAuth:!1}),s=await fetch(l,{method:t,headers:{...e,...c.headers},credentials:this.config.credentials,...c});if(!s.ok)throw await this.parseError(s);if(o)return s;if(204===s.status)return{};return await s.json()}catch(t){throw this.config.onAuthError?.(),t}if(!e.ok)throw await this.parseError(e);if(o)return e;if(204===e.status)return{};return await e.json()}catch(t){if(t instanceof a)throw t;if(t instanceof Error){if("AbortError"===t.name)throw new a("Request timeout",408,"TIMEOUT");throw new a(t.message,0,"NETWORK_ERROR")}throw new a("Unknown error occurred",500,"UNKNOWN")}finally{clearTimeout(m)}}get(t,e){return this.request("GET",t,e)}post(t,e,s){return this.request("POST",t,{...s,body:e?JSON.stringify(e):void 0})}patch(t,e,s){return this.request("PATCH",t,{...s,body:e?JSON.stringify(e):void 0})}put(t,e,s){return this.request("PUT",t,{...s,body:e?JSON.stringify(e):void 0})}delete(t,e){return this.request("DELETE",t,e)}async upload(t,e,s){let{params:i,timeout:n,skipAuth:r,onProgress:o}=s||{},c=this.buildUrl(t,i),l=await this.buildHeaders({skipAuth:r}),h=n||this.config.timeout;if(delete l["Content-Type"],o&&"undefined"!=typeof XMLHttpRequest)return new Promise((t,s)=>{let i=new XMLHttpRequest;i.open("POST",c),Object.entries(l).forEach(([t,e])=>{i.setRequestHeader(t,e)}),i.withCredentials="include"===this.config.credentials,i.upload.onprogress=t=>{t.lengthComputable&&o(Math.round(t.loaded/t.total*100))},i.onload=()=>{if(i.status>=200&&i.status<300)try{t(JSON.parse(i.responseText))}catch{t({})}else s(new a(i.statusText||"Upload failed",i.status,"UPLOAD_ERROR"))},i.onerror=()=>{s(new a("Network error during upload",0,"NETWORK_ERROR"))},i.ontimeout=()=>{s(new a("Upload timeout",408,"TIMEOUT"))},i.timeout=h,i.send(e)});let u=new AbortController,d=setTimeout(()=>u.abort(),h);try{let t=await fetch(c,{method:"POST",headers:l,body:e,credentials:this.config.credentials,signal:u.signal});if(!t.ok)throw await this.parseError(t);return await t.json()}finally{clearTimeout(d)}}},r=class{prefix;constructor(t="baasix_"){this.prefix=t}getKey(t){return t.startsWith(this.prefix)?t:`${this.prefix}${t}`}get(t){if("undefined"==typeof window||!window.localStorage)return null;try{return localStorage.getItem(this.getKey(t))}catch{return console.warn(`[Baasix SDK] Failed to get item from localStorage: ${t}`),null}}set(t,e){if("undefined"!=typeof window&&window.localStorage)try{localStorage.setItem(this.getKey(t),e)}catch{console.warn(`[Baasix SDK] Failed to set item in localStorage: ${t}`)}}remove(t){if("undefined"!=typeof window&&window.localStorage)try{localStorage.removeItem(this.getKey(t))}catch{console.warn(`[Baasix SDK] Failed to remove item from localStorage: ${t}`)}}clear(){if("undefined"!=typeof window&&window.localStorage)try{let t=[];for(let e=0;e<localStorage.length;e++){let s=localStorage.key(e);s?.startsWith(this.prefix)&&t.push(s)}t.forEach(t=>localStorage.removeItem(t))}catch{console.warn("[Baasix SDK] Failed to clear localStorage")}}},o=class{store;constructor(){this.store=new Map}get(t){return this.store.get(t)??null}set(t,e){this.store.set(t,e)}remove(t){this.store.delete(t)}clear(){this.store.clear()}keys(){return Array.from(this.store.keys())}size(){return this.store.size}},c=class{client;storage;authMode;onAuthStateChange;currentUser=null;constructor(t){this.client=t.client,this.storage=t.storage,this.authMode=t.authMode,this.onAuthStateChange=t.onAuthStateChange}emitAuthStateChange(t,e){this.currentUser=e,this.onAuthStateChange?.(t,e)}async storeTokens(t){if("jwt"===this.authMode&&(await this.storage.set(i.ACCESS_TOKEN,t.token),t.refreshToken&&await this.storage.set(i.REFRESH_TOKEN,t.refreshToken),t.expiresIn)){let e=Date.now()+1e3*t.expiresIn;await this.storage.set(i.TOKEN_EXPIRY,e.toString())}t.user&&await this.storage.set(i.USER,JSON.stringify(t.user))}async clearAuth(){await this.storage.remove(i.ACCESS_TOKEN),await this.storage.remove(i.REFRESH_TOKEN),await this.storage.remove(i.TOKEN_EXPIRY),await this.storage.remove(i.USER),await this.storage.remove(i.TENANT),this.currentUser=null}async register(t){let e=await this.client.post("/auth/register",t,{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async login(t){let e=await this.client.post("/auth/login",{email:t.email,password:t.password,tenant_Id:t.tenantId},{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async logout(){try{await this.client.get("/auth/logout")}catch{}await this.clearAuth(),this.emitAuthStateChange("SIGNED_OUT",null)}async getUser(){try{let t=await this.client.get("/auth/me");return this.currentUser=t.data,await this.storage.set(i.USER,JSON.stringify(t.data)),t.data}catch(t){if(t instanceof a&&401===t.status)return await this.clearAuth(),null;throw t}}async getCachedUser(){if(this.currentUser)return this.currentUser;let t=await this.storage.get(i.USER);if(t)try{return this.currentUser=JSON.parse(t),this.currentUser}catch{}return null}async isAuthenticated(){if("cookie"===this.authMode)return null!==await this.getCachedUser();if(!await this.storage.get(i.ACCESS_TOKEN))return!1;let t=await this.storage.get(i.TOKEN_EXPIRY);return!(t&&Date.now()>=parseInt(t,10))||!!await this.storage.get(i.REFRESH_TOKEN)}async getToken(){return"cookie"===this.authMode?null:await this.storage.get(i.ACCESS_TOKEN)}async setToken(t){await this.storage.set(i.ACCESS_TOKEN,t)}async refreshToken(){let t=await this.storage.get(i.REFRESH_TOKEN),e=await this.client.post("/auth/refresh","jwt"===this.authMode?{refreshToken:t}:void 0);await this.storeTokens(e);let s={accessToken:e.token,refreshToken:e.refreshToken,expiresIn:e.expiresIn,expiresAt:e.expiresIn?Date.now()+1e3*e.expiresIn:void 0};return this.emitAuthStateChange("TOKEN_REFRESHED",e.user),s}async sendMagicLink(t){await this.client.post("/auth/magiclink",{email:t.email,link:t.redirectUrl,mode:t.mode||"link"},{skipAuth:!0})}async verifyMagicLink(t){let e=await this.client.get(`/auth/magiclink/${encodeURIComponent(t)}`,{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async forgotPassword(t){await this.client.post("/auth/forgot-password",{email:t.email,link:t.redirectUrl},{skipAuth:!0})}async resetPassword(t,e){await this.client.post("/auth/reset-password",{token:t,password:e},{skipAuth:!0})}async changePassword(t,e){await this.client.post("/auth/change-password",{currentPassword:t,newPassword:e})}async updateProfile(t){let e=await this.client.patch("/auth/me",t);return await this.storage.set(i.USER,JSON.stringify(e.data)),this.emitAuthStateChange("USER_UPDATED",e.data),e.data}async getTenants(){return(await this.client.get("/auth/tenants")).data}async switchTenant(t){let e=await this.client.post("/auth/switch-tenant",{tenant_Id:t});return await this.storeTokens(e),await this.storage.set(i.TENANT,t),this.emitAuthStateChange("TENANT_SWITCHED",e.user),e}async getState(){let t=await this.isAuthenticated();return{user:await this.getCachedUser(),isAuthenticated:t,isLoading:!1,error:null}}async initialize(){let t=await this.getState();return t.isAuthenticated&&t.user&&this.emitAuthStateChange("SIGNED_IN",t.user),t}getOAuthUrl(t){let e=this.client.getBaseUrl(),s=new URLSearchParams({redirect_url:t.redirectUrl});return t.scopes?.length&&s.set("scopes",t.scopes.join(",")),t.state&&s.set("state",t.state),`${e}/auth/signin/${t.provider}?${s.toString()}`}async handleOAuthCallback(t){await this.storage.set(i.ACCESS_TOKEN,t);let e=await this.getUser();return this.emitAuthStateChange("SIGNED_IN",e),{token:t,user:e}}async requestEmailVerification(t){await this.client.post("/auth/request-verify-email",{link:t})}async verifyEmail(t){await this.client.get("/auth/verify-email",{params:{token:t},skipAuth:!0})}async checkSession(){try{return(await this.client.get("/auth/check")).data.valid}catch{return!1}}async sendInvite(t){await this.client.post("/auth/invite",{email:t.email,role_Id:t.roleId,tenant_Id:t.tenantId,link:t.redirectUrl})}async verifyInvite(t,e){return(await this.client.get("/auth/verify-invite",{params:{token:t,link:e},skipAuth:!0})).data}async acceptInvite(t){let e=await this.client.post("/auth/accept-invite",{token:t});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async registerWithInvite(t){let e=await this.client.post("/auth/register",{...t,inviteToken:t.inviteToken},{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}},l=class{collection;client;queryParams={};constructor(t,e){this.collection=t,this.client=e}select(...t){let e=1===t.length&&Array.isArray(t[0])?t[0]:t;return this.queryParams.fields=e,this}fields(...t){return this.select(...t)}filter(t){return this.queryParams.filter=t,this}where(t){return this.filter(t)}sort(t){return this.queryParams.sort=t,this}orderBy(t){return this.sort(t)}limit(t){return this.queryParams.limit=t,this}page(t){return this.queryParams.page=t,this}offset(t){return this.queryParams.offset=t,this}search(t,e){return this.queryParams.search=t,e&&(this.queryParams.searchFields=e),this}withDeleted(){return this.queryParams.paranoid=!1,this}relFilter(t){return this.queryParams.relConditions=t,this}getQuery(){return{...this.queryParams}}async get(){return this.client.get(`/items/${this.collection}`,{params:this.buildParams()})}async first(){return(await this.limit(1).get()).data[0]||null}async count(){return(await this.client.get(`/items/${this.collection}`,{params:{...this.buildParams(),limit:0}})).totalCount||0}buildParams(){let t={};return this.queryParams.fields&&(t.fields=this.queryParams.fields),this.queryParams.filter&&(t.filter=this.queryParams.filter),this.queryParams.sort&&(t.sort=this.queryParams.sort),void 0!==this.queryParams.limit&&(t.limit=this.queryParams.limit),void 0!==this.queryParams.page&&(t.page=this.queryParams.page),void 0!==this.queryParams.offset&&(t.offset=this.queryParams.offset),this.queryParams.search&&(t.search=this.queryParams.search),this.queryParams.searchFields&&(t.searchFields=this.queryParams.searchFields),void 0!==this.queryParams.paranoid&&(t.paranoid=this.queryParams.paranoid),this.queryParams.relConditions&&(t.relConditions=this.queryParams.relConditions),this.queryParams.aggregate&&(t.aggregate=this.queryParams.aggregate),this.queryParams.groupBy&&(t.groupBy=this.queryParams.groupBy),t}},h=class{collection;client;constructor(t,e){this.collection=t,this.client=e.client}query(){return new l(this.collection,this.client)}async find(t){return this.client.get(`/items/${this.collection}`,{params:t})}async findMany(t){return this.find(t)}async findOne(t,e){return(await this.client.get(`/items/${this.collection}/${t}`,{params:e})).data}async get(t,e){return this.findOne(t,e)}async create(t){return(await this.client.post(`/items/${this.collection}`,t)).data}async insert(t){return this.create(t)}async createMany(t){return(await this.client.post(`/items/${this.collection}/bulk`,t)).data}async insertMany(t){return this.createMany(t)}async update(t,e){return(await this.client.patch(`/items/${this.collection}/${t}`,e)).data}async updateMany(t,e){let s=t.map(t=>({id:t,data:e}));return(await this.client.patch(`/items/${this.collection}/bulk`,s)).data}async upsert(t,e){let s=await this.find({filter:t,limit:1});return s.data.length>0?this.update(s.data[0].id,e):this.create(e)}async delete(t){await this.client.delete(`/items/${this.collection}/${t}`)}async deleteMany(t){await this.client.delete(`/items/${this.collection}/bulk`,{body:JSON.stringify(t)})}async softDelete(t){await this.update(t,{deletedAt:new Date().toISOString()})}async restore(t){await this.update(t,{deletedAt:null})}async aggregate(t){return(await this.client.get(`/items/${this.collection}`,{params:t})).data}async importCSV(t){let e=new FormData;return File,e.append("csvFile",t),(await this.client.post(`/items/${this.collection}/import-csv`,e)).results}async importJSON(t){let e=new FormData;return File,e.append("jsonFile",t),(await this.client.post(`/items/${this.collection}/import-json`,e)).results}async importData(t){return await this.client.post(`/items/${this.collection}/bulk`,t)}async sortItem(t,e,s="before"){await this.client.post(`/utils/sort/${this.collection}`,{item:t,to:e,mode:s})}async reorder(t){for(let e=1;e<t.length;e++)await this.client.post(`/utils/sort/${this.collection}`,{item:t[e],to:t[e-1],mode:"after"})}},u=class{client;constructor(t){this.client=t.client}async upload(t,e){let s=new FormData;return t instanceof File||Blob,s.append("file",t),e?.title&&s.append("title",e.title),e?.description&&s.append("description",e.description),e?.folder&&s.append("folder",e.folder),e?.storage&&s.append("storage",e.storage),e?.isPublic!==void 0&&s.append("isPublic",String(e.isPublic)),e?.metadata&&s.append("metadata",JSON.stringify(e.metadata)),(await this.client.upload("/files",s,{onProgress:e?.onProgress,timeout:e?.timeout})).data}async uploadMany(t,e){let s=[];for(let i of t instanceof FileList?Array.from(t):t){let t=await this.upload(i,e);s.push(t)}return s}async find(t){return this.client.get("/files",{params:t})}async findOne(t){return(await this.client.get(`/files/${t}`)).data}async update(t,e){return(await this.client.patch(`/files/${t}`,e)).data}async delete(t){await this.client.delete(`/files/${t}`)}async deleteMany(t){await Promise.all(t.map(t=>this.delete(t)))}getAssetUrl(t,e){let s=new URL(`/assets/${t}`,this.client.getBaseUrl());return e&&(e.width&&s.searchParams.set("width",String(e.width)),e.height&&s.searchParams.set("height",String(e.height)),e.fit&&s.searchParams.set("fit",e.fit),e.quality&&s.searchParams.set("quality",String(e.quality)),e.format&&s.searchParams.set("format",e.format)),s.toString()}async download(t,e){let s=this.getAssetUrl(t,e),i=await fetch(s);if(!i.ok)throw Error(`Failed to download file: ${i.statusText}`);return i.blob()}async toBase64(t,e){let s=await this.download(t,e);return new Promise((t,e)=>{let i=new FileReader;i.onloadend=()=>{t(i.result.split(",")[1])},i.onerror=e,i.readAsDataURL(s)})}async importFromUrl(t,e){return(await this.client.post("/files/import",{url:t,...e})).data}},d=class{client;constructor(t){this.client=t.client}async find(t){let e=t?{...t,sort:function(t){if(t){if("string"==typeof t)return t;if(Array.isArray(t))return 0===t.length?void 0:"object"==typeof t[0]&&"column"in t[0]?t.map(t=>`${t.column}:${t.order.toLowerCase()}`).join(","):t.map(t=>t.startsWith("-")?`${t.substring(1)}:desc`:t.includes(":")?t:`${t}:asc`).join(",");if("object"==typeof t){let e=Object.entries(t);if(0===e.length)return;return e.map(([t,e])=>`${t}:${e.toLowerCase()}`).join(",")}}}(t.sort)}:void 0;return this.client.get("/schemas",{params:e})}async findOne(t){return(await this.client.get(`/schemas/${t}`)).data}async create(t){return(await this.client.post("/schemas",t)).data}async update(t,e){return(await this.client.patch(`/schemas/${t}`,e)).data}async delete(t){await this.client.delete(`/schemas/${t}`)}async createRelationship(t,e){await this.client.post(`/schemas/${t}/relationships`,e)}async deleteRelationship(t,e){await this.client.delete(`/schemas/${t}/relationships/${e}`)}async updateRelationship(t,e,s){await this.client.patch(`/schemas/${t}/relationships/${e}`,s)}async createIndex(t,e){await this.client.post(`/schemas/${t}/indexes`,e)}async deleteIndex(t,e){await this.client.delete(`/schemas/${t}/indexes/${e}`)}async addField(t,e,s){let i=await this.findOne(t),a={...i.schema.fields,[e]:s};return this.update(t,{schema:{...i.schema,fields:a}})}async removeField(t,e){let s=await this.findOne(t),{[e]:i,...a}=s.schema.fields;return this.update(t,{schema:{...s.schema,fields:a}})}async export(){return(await this.client.get("/schemas/export")).data}async import(t){await this.client.post("/schemas/import",{schemas:t})}},m=class{client;constructor(t){this.client=t.client}async find(t){return this.client.get("/notifications",{params:t})}async getUnreadCount(){return(await this.client.get("/notifications/unread/count")).count}async markAsSeen(t){return{count:(await this.client.post("/notifications/mark-seen",{notificationIds:t})).count}}async delete(t){return{count:(await this.client.delete("/notifications",{params:t?{notificationIds:t}:void 0})).count}}async send(t){return{notificationIds:(await this.client.post("/notifications/send",t)).notificationIds}}async cleanup(t=30){return{count:(await this.client.post("/notifications/cleanup",{days:t})).count}}},g=class{client;constructor(t){this.client=t.client}async find(t){return this.client.get("/permissions",{params:t})}async findOne(t){return(await this.client.get(`/permissions/${t}`)).data}async findByRole(t){return this.client.get("/permissions",{params:{filter:{role_Id:{eq:t}},limit:-1}})}async findByCollection(t){return this.client.get("/permissions",{params:{filter:{collection:{eq:t}},limit:-1}})}async create(t){return(await this.client.post("/permissions",t)).data}async update(t,e){return(await this.client.patch(`/permissions/${t}`,e)).data}async delete(t){await this.client.delete(`/permissions/${t}`)}async getRoles(){return this.client.get("/items/baasix_Role",{params:{limit:-1}})}async createCrudPermissions(t,e,s){let i=[];for(let a of["create","read","update","delete"]){let n=s[a];if(!1===n)continue;let r=await this.create({role_Id:t,collection:e,action:a,fields:n?.fields||["*"],conditions:n?.conditions});i.push(r)}return i}async reloadCache(){await this.client.post("/permissions/reload")}},w=class{client;constructor(t){this.client=t.client}async get(){return(await this.client.get("/settings")).data}async getKey(t){return(await this.get())[t]??null}async update(t){return(await this.client.patch("/settings",t)).data}async set(t,e){return this.update({[t]:e})}},f=class{client;constructor(t){this.client=t.client}async generate(t,e){return await this.client.post(`/reports/${t}`,e)}async query(t,e){return await this.client.get(`/reports/${t}`,{params:e})}async getStats(t){return await this.client.post("/reports/stats",{stats:t})}async aggregate(t,e){return(await this.client.get(`/items/${t}`,{params:{aggregate:e.aggregate,groupBy:e.groupBy,filter:e.filter,limit:-1}})).data}async count(t,e){return(await this.client.get(`/items/${t}`,{params:{filter:e,limit:0}})).totalCount||0}async distinct(t,e,s){return(await this.client.get(`/items/${t}`,{params:{filter:s,fields:[e],groupBy:[e],limit:-1}})).data.map(t=>t[e])}},p=class{client;constructor(t){this.client=t.client}async find(t){return this.client.get("/workflows",{params:t})}async findOne(t){return(await this.client.get(`/workflows/${t}`)).data}async create(t){return(await this.client.post("/workflows",t)).data}async update(t,e){return(await this.client.patch(`/workflows/${t}`,e)).data}async delete(t){await this.client.delete(`/workflows/${t}`)}async execute(t,e){return(await this.client.post(`/workflows/${t}/execute`,{triggerData:e})).data}async test(t,e){return(await this.client.post(`/workflows/${t}/test`,{triggerData:e})).data}async getExecutions(t,e){return this.client.get(`/workflows/${t}/executions`,{params:e})}async getExecution(t,e){return(await this.client.get(`/workflows/${t}/executions/${e}`)).data}async cancelExecution(t,e){await this.client.post(`/workflows/${t}/executions/${e}/cancel`)}async enable(t){return this.update(t,{isActive:!0})}async disable(t){return this.update(t,{isActive:!1})}async duplicate(t,e){let{id:s,createdAt:i,updatedAt:a,...n}=await this.findOne(t);return this.create({...n,name:`Copy of ${n.name}`,...e})}},y=class{client;storage;socket=null;socketClient=null;socketUrl;socketPath;subscriptions=new Map;workflowCallbacks=new Map;roomCallbacks=new Map;roomUserCallbacks=new Map;connectionCallbacks=new Set;reconnecting=!1;connectionPromise=null;constructor(t){this.client=t.client,this.storage=t.storage,this.socketUrl=t.socketUrl||"",this.socketPath=t.socketPath||"/realtime"}setSocketClient(t){this.socketClient=t}setSocketUrl(t){this.socketUrl=t}ensureSocketClient(){if(!this.socketClient)throw Error("Socket.io client not set. Please call baasix.realtime.setSocketClient(io) with socket.io-client.")}async getAuthToken(){return await this.storage.get(i.ACCESS_TOKEN)}async connect(){if(this.connectionPromise)return this.connectionPromise;if(this.socket?.connected)return Promise.resolve();this.ensureSocketClient(),this.connectionPromise=new Promise(async(t,e)=>{try{let s=await this.getAuthToken(),i=this.socketUrl||this.client.getBaseUrl();this.socket=this.socketClient(i,{auth:{token:s||void 0},path:this.socketPath,transports:["websocket","polling"],reconnection:!0,reconnectionAttempts:10,reconnectionDelay:1e3,timeout:2e4}),this.socket.on("connect",()=>{console.log("[Baasix Realtime] Connected"),this.reconnecting=!1,this.notifyConnectionChange(!0),t()}),this.socket.on("disconnect",t=>{console.log("[Baasix Realtime] Disconnected:",t),this.notifyConnectionChange(!1)}),this.socket.on("connect_error",t=>{console.error("[Baasix Realtime] Connection error:",t.message),this.reconnecting||e(t)}),this.socket.on("reconnect",()=>{console.log("[Baasix Realtime] Reconnected"),this.reconnecting=!1,this.resubscribeAll(),this.notifyConnectionChange(!0)}),this.socket.on("reconnect_attempt",()=>{this.reconnecting=!0}),this.socket.on("connected",t=>{console.log("[Baasix Realtime] Authenticated as user:",t.userId)}),this.socket.on("workflow:execution:update",t=>{this.handleWorkflowUpdate(t)}),this.socket.on("workflow:execution:complete",t=>{this.handleWorkflowUpdate({...t,status:"complete"})}),this.socket.on("room:user:joined",t=>{let e=this.roomUserCallbacks.get(t.room);e?.joined.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Realtime] Error in room user joined callback:",t)}})}),this.socket.on("room:user:left",t=>{let e=this.roomUserCallbacks.get(t.room);e?.left.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Realtime] Error in room user left callback:",t)}})}),this.socket.connect()}catch(t){this.connectionPromise=null,e(t)}});try{await this.connectionPromise}finally{this.connectionPromise=null}}disconnect(){this.socket&&(this.socket.disconnect(),this.socket=null),this.subscriptions.clear(),this.workflowCallbacks.clear(),this.roomCallbacks.clear(),this.roomUserCallbacks.clear()}get isConnected(){return this.socket?.connected??!1}onConnectionChange(t){return this.connectionCallbacks.add(t),()=>{this.connectionCallbacks.delete(t)}}notifyConnectionChange(t){this.connectionCallbacks.forEach(e=>e(t))}subscribe(t,e){this.socket?.connected||console.warn("[Baasix Realtime] Not connected. Call connect() first.");let s=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=this.subscriptions.get(t);return i||(i={collection:t,callbacks:new Map},this.subscriptions.set(t,i),this.subscribeOnServer(t),this.setupCollectionListeners(t)),i.callbacks.set(s,e),()=>{let e=this.subscriptions.get(t);e&&(e.callbacks.delete(s),0===e.callbacks.size&&(this.unsubscribeOnServer(t),this.removeCollectionListeners(t),this.subscriptions.delete(t)))}}on(t,e,s){return this.subscribe(t,t=>{t.action===e&&s(t.data)})}onAny(t){let e=[];return this.subscriptions.forEach((s,i)=>{let a=this.subscribe(i,e=>{t(i,e)});e.push(a)}),()=>{e.forEach(t=>t())}}subscribeOnServer(t){this.socket?.connected&&this.socket.emit("subscribe",{collection:t},e=>{"error"===e.status&&console.error(`[Baasix Realtime] Failed to subscribe to ${t}:`,e.message)})}unsubscribeOnServer(t){this.socket?.connected&&this.socket.emit("unsubscribe",{collection:t})}setupCollectionListeners(t){this.socket&&["create","update","delete"].forEach(e=>{let s=`${t}:${e}`;this.socket.on(s,e=>{this.handleCollectionEvent(t,e)})})}removeCollectionListeners(t){this.socket&&["create","update","delete"].forEach(e=>{let s=`${t}:${e}`;this.socket.off(s)})}handleCollectionEvent(t,e){let s=this.subscriptions.get(t);s&&s.callbacks.forEach(t=>{try{t(e)}catch(t){console.error("[Baasix Realtime] Error in subscription callback:",t)}})}resubscribeAll(){this.subscriptions.forEach((t,e)=>{this.subscribeOnServer(e),this.setupCollectionListeners(e)})}subscribeToExecution(t,e){let s=String(t);this.socket?.connected&&this.socket.emit("workflow:execution:join",{executionId:s});let i=this.workflowCallbacks.get(s);return i||(i=new Set,this.workflowCallbacks.set(s,i)),i.add(e),()=>{let t=this.workflowCallbacks.get(s);t&&(t.delete(e),0===t.size&&this.workflowCallbacks.delete(s))}}handleWorkflowUpdate(t){let e=String(t.executionId),s=this.workflowCallbacks.get(e);s&&s.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Realtime] Error in workflow callback:",t)}})}async joinRoom(t){if(!this.socket?.connected)throw Error("Not connected. Call connect() first.");return new Promise((e,s)=>{this.socket.emit("room:join",{room:t},i=>{"success"===i.status?(this.setupRoomListeners(t),e()):s(Error(i.message||"Failed to join room"))})})}async leaveRoom(t){if(this.socket?.connected)return new Promise((e,s)=>{this.socket.emit("room:leave",{room:t},i=>{"success"===i.status?(this.cleanupRoomListeners(t),e()):s(Error(i.message||"Failed to leave room"))})})}async sendToRoom(t,e,s){if(!this.socket?.connected)throw Error("Not connected. Call connect() first.");return new Promise((i,a)=>{this.socket.emit("room:message",{room:t,event:e,payload:s},t=>{"success"===t.status?i():a(Error(t.message||"Failed to send message"))})})}onRoomMessage(t,e,s){this.roomCallbacks.has(t)||this.roomCallbacks.set(t,new Map);let i=this.roomCallbacks.get(t);return i.has(e)||i.set(e,new Set),i.get(e).add(s),()=>{let i=this.roomCallbacks.get(t);if(i){let a=i.get(e);a&&(a.delete(s),0===a.size&&i.delete(e)),0===i.size&&this.roomCallbacks.delete(t)}}}onRoomUserJoined(t,e){return this.roomUserCallbacks.has(t)||this.roomUserCallbacks.set(t,{joined:new Set,left:new Set}),this.roomUserCallbacks.get(t).joined.add(e),()=>{let s=this.roomUserCallbacks.get(t);s&&(s.joined.delete(e),0===s.joined.size&&0===s.left.size&&this.roomUserCallbacks.delete(t))}}onRoomUserLeft(t,e){return this.roomUserCallbacks.has(t)||this.roomUserCallbacks.set(t,{joined:new Set,left:new Set}),this.roomUserCallbacks.get(t).left.add(e),()=>{let s=this.roomUserCallbacks.get(t);s&&(s.left.delete(e),0===s.joined.size&&0===s.left.size&&this.roomUserCallbacks.delete(t))}}async invoke(t,e){if(!this.socket?.connected)throw Error("Not connected. Call connect() first.");return new Promise((s,i)=>{this.socket.emit("custom",{event:t,payload:e},t=>{"success"===t.status?s(t):i(Error(t.message||"Custom event failed"))})})}setupRoomListeners(t){this.roomCallbacks.has(t)||this.roomCallbacks.set(t,new Map),this.roomUserCallbacks.has(t)||this.roomUserCallbacks.set(t,{joined:new Set,left:new Set})}cleanupRoomListeners(t){this.roomCallbacks.delete(t),this.roomUserCallbacks.delete(t)}channel(t){return new k(this,t)}},k=class{realtime;collection;handlers=new Map;unsubscribeFn=null;constructor(t,e){this.realtime=t,this.collection=e}on(t,e){let s=this.mapEvent(t);return"*"===s?["create","update","delete"].forEach(t=>{this.addHandler(t,e)}):this.addHandler(s,e),this}mapEvent(t){switch(t.toUpperCase()){case"INSERT":return"create";case"UPDATE":return"update";case"DELETE":return"delete";default:return"*"}}addHandler(t,e){this.handlers.has(t)||this.handlers.set(t,[]),this.handlers.get(t).push(e)}subscribe(){return this.unsubscribeFn=this.realtime.subscribe(this.collection,t=>{let e=this.handlers.get(t.action);e&&e.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Channel] Handler error:",t)}})}),this}unsubscribe(){this.unsubscribeFn&&(this.unsubscribeFn(),this.unsubscribeFn=null),this.handlers.clear()}},C=class{client;collection="baasix_Role";constructor(t){this.client=t.client}async find(){return this.client.get(`/items/${this.collection}`,{params:{limit:-1}})}async findOne(t){return(await this.client.get(`/items/${this.collection}/${t}`)).data}async findByName(t){return(await this.client.get(`/items/${this.collection}`,{params:{filter:JSON.stringify({name:{eq:t}}),limit:1}})).data[0]||null}async create(t){return(await this.client.post(`/items/${this.collection}`,t)).data.id}async update(t,e){await this.client.patch(`/items/${this.collection}/${t}`,e)}async delete(t){await this.client.delete(`/items/${this.collection}/${t}`)}},b=class{client;collection="baasix_User";constructor(t){this.client=t.client}async find(t={}){let e={};return t.filter&&(e.filter=JSON.stringify(t.filter)),t.sort&&(e.sort=t.sort),void 0!==t.limit&&(e.limit=t.limit),void 0!==t.page&&(e.page=t.page),t.fields?.length&&(e.fields=t.fields.join(",")),this.client.get(`/items/${this.collection}`,{params:e})}async findOne(t,e){let s={};return e?.length&&(s.fields=e.join(",")),(await this.client.get(`/items/${this.collection}/${t}`,{params:s})).data}async findByEmail(t){return(await this.client.get(`/items/${this.collection}`,{params:{filter:JSON.stringify({email:{eq:t}}),limit:1}})).data[0]||null}async create(t){return(await this.client.post(`/items/${this.collection}`,t)).data.id}async update(t,e){await this.client.patch(`/items/${this.collection}/${t}`,e)}async delete(t){await this.client.delete(`/items/${this.collection}/${t}`)}async changePassword(t,e){await this.client.post("/auth/admin/change-password",{userId:t,password:e})}async suspend(t){await this.client.patch(`/items/${this.collection}/${t}`,{status:"suspended"})}async activate(t){await this.client.patch(`/items/${this.collection}/${t}`,{status:"active"})}async createMany(t){return(await this.client.post(`/items/${this.collection}/bulk`,t)).data}async deleteMany(t){await this.client.delete(`/items/${this.collection}/bulk`,{body:JSON.stringify(t)})}},E=class{client;constructor(t){this.client=t.client}async status(){return(await this.client.get("/migrations/status")).data}async list(t){return(await this.client.get("/migrations",{params:t})).data}async pending(){return(await this.client.get("/migrations/pending")).data}async check(){return(await this.client.get("/migrations/check")).data}async get(t){try{return(await this.client.get(`/migrations/${encodeURIComponent(t)}`)).data}catch{return null}}async run(t){return(await this.client.post("/migrations/run",t||{})).data}async rollback(t){return(await this.client.post(`/migrations/rollback/${encodeURIComponent(t)}`,{})).data}async rollbackBatch(){return(await this.client.post("/migrations/rollback-batch",{})).data}async create(t,e){return(await this.client.post("/migrations/create",{name:t,...e})).data}async markCompleted(t,e){return(await this.client.post(`/migrations/mark-completed/${encodeURIComponent(t)}`,{metadata:e})).data}async markAllCompleted(t){return(await this.client.post("/migrations/mark-all-completed",{toVersion:t})).data}},S=class{client;constructor(t){this.client=t.client}async info(){return this.client.get("/")}async health(){try{return await this.client.get("/health"),!0}catch{return!1}}},T=class{config;httpClient;storage;auth;files;schemas;notifications;permissions;settings;reports;workflows;realtime;roles;users;migrations;server;itemsModules=new Map;constructor(t){if(!t.url)throw Error("Baasix SDK: url is required");let e=t.url.replace(/\/$/,"");this.config={...t,url:e,authMode:t.authMode||"jwt",timeout:t.timeout||6e5,autoRefresh:!1!==t.autoRefresh},this.storage=t.storage||("undefined"!=typeof window&&void 0!==window.localStorage?new r:new o);let s=t.credentials||("cookie"===this.config.authMode?"include":"same-origin");this.httpClient=new n({baseUrl:e,authMode:this.config.authMode,storage:this.storage,timeout:this.config.timeout,autoRefresh:this.config.autoRefresh,credentials:s,headers:t.headers||{},token:t.token,tenantId:t.tenantId,onAuthError:()=>{this.config.onAuthStateChange?.("SIGNED_OUT",null)},onTokenRefresh:()=>{}}),this.auth=new c({client:this.httpClient,storage:this.storage,authMode:this.config.authMode,onAuthStateChange:t.onAuthStateChange}),this.files=new u({client:this.httpClient}),this.schemas=new d({client:this.httpClient}),this.notifications=new m({client:this.httpClient}),this.permissions=new g({client:this.httpClient}),this.settings=new w({client:this.httpClient}),this.reports=new f({client:this.httpClient}),this.workflows=new p({client:this.httpClient}),this.roles=new C({client:this.httpClient}),this.users=new b({client:this.httpClient}),this.migrations=new E({client:this.httpClient}),this.server=new S({client:this.httpClient}),this.realtime=new y({client:this.httpClient,storage:this.storage,socketUrl:t.socketUrl,socketPath:t.socketPath})}items(t){return this.itemsModules.has(t)||this.itemsModules.set(t,new h(t,{client:this.httpClient})),this.itemsModules.get(t)}collection(t){return this.items(t)}from(t){return this.items(t)}get request(){return this.httpClient}configure(t){t.headers&&this.httpClient.updateConfig({headers:t.headers}),void 0!==t.tenantId&&this.httpClient.updateConfig({tenantId:t.tenantId}),t.token&&this.httpClient.updateConfig({token:t.token}),t.timeout&&this.httpClient.updateConfig({timeout:t.timeout})}async setTenant(t){this.httpClient.updateConfig({tenantId:t}),await this.storage.set(i.TENANT,t)}async getTenant(){return await this.storage.get(i.TENANT)}async clearTenant(){this.httpClient.updateConfig({tenantId:void 0}),await this.storage.remove(i.TENANT)}async setToken(t){return this.auth.setToken(t)}async getToken(){return this.storage.get(i.ACCESS_TOKEN)}getUrl(){return this.config.url}getAuthMode(){return this.config.authMode}getStorage(){return this.storage}};function P(t){return new T(t)}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6869],{99376:function(t,e,s){var i=s(35475);s.o(i,"usePathname")&&s.d(e,{usePathname:function(){return i.usePathname}}),s.o(i,"useRouter")&&s.d(e,{useRouter:function(){return i.useRouter}}),s.o(i,"useSearchParams")&&s.d(e,{useSearchParams:function(){return i.useSearchParams}})},49112:function(t,e,s){s.d(e,{NQ:function(){return a},ql:function(){return P}});var i={ACCESS_TOKEN:"baasix_access_token",REFRESH_TOKEN:"baasix_refresh_token",TOKEN_EXPIRY:"baasix_token_expiry",USER:"baasix_user",TENANT:"baasix_tenant"},a=class t extends Error{status;code;details;isRetryable;constructor(e,s=500,i,a){super(e),this.name="BaasixError",this.status=s,this.code=i,this.details=a,this.isRetryable=s>=500||429===s,Error.captureStackTrace&&Error.captureStackTrace(this,t)}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,details:this.details}}},n=class{config;refreshPromise=null;constructor(t){this.config=t}updateConfig(t){this.config={...this.config,...t}}getBaseUrl(){return this.config.baseUrl}buildUrl(t,e){let s=new URL(t,this.config.baseUrl);return e&&Object.entries(e).forEach(([t,e])=>{null!=e&&("object"==typeof e?s.searchParams.set(t,JSON.stringify(e)):s.searchParams.set(t,String(e)))}),s.toString()}async getAccessToken(){return this.config.token?this.config.token:"cookie"===this.config.authMode?null:await this.config.storage.get(i.ACCESS_TOKEN)}async isTokenExpired(){let t=await this.config.storage.get(i.TOKEN_EXPIRY);if(!t)return!1;let e=parseInt(t,10);return Date.now()>=e-6e4}async refreshToken(){return this.refreshPromise||(this.refreshPromise=(async()=>{try{let t=await this.config.storage.get(i.REFRESH_TOKEN);if(!t&&"jwt"===this.config.authMode)throw new a("No refresh token available",401,"NO_REFRESH_TOKEN");let e=await fetch(this.buildUrl("/auth/refresh"),{method:"POST",headers:{"Content-Type":"application/json",...this.config.headers},body:"jwt"===this.config.authMode?JSON.stringify({refreshToken:t}):void 0,credentials:this.config.credentials});if(!e.ok)throw new a("Token refresh failed",e.status,"REFRESH_FAILED");let s=await e.json(),n={accessToken:s.token,refreshToken:s.refreshToken,expiresIn:s.expiresIn,expiresAt:s.expiresIn?Date.now()+1e3*s.expiresIn:void 0};return await this.config.storage.set(i.ACCESS_TOKEN,n.accessToken),n.refreshToken&&await this.config.storage.set(i.REFRESH_TOKEN,n.refreshToken),n.expiresAt&&await this.config.storage.set(i.TOKEN_EXPIRY,n.expiresAt.toString()),this.config.onTokenRefresh?.(n),n}finally{this.refreshPromise=null}})()),this.refreshPromise}async buildHeaders(t={}){let e={"Content-Type":"application/json",...this.config.headers};if(this.config.tenantId&&(e["X-Tenant-Id"]=this.config.tenantId),t.skipAuth)return e;if("jwt"===this.config.authMode){if(this.config.autoRefresh&&await this.isTokenExpired())try{await this.refreshToken()}catch{}let t=await this.getAccessToken();t&&(e.Authorization=`Bearer ${t}`)}return e}async parseError(t){let e={};try{e=await t.json()}catch{}let s=e.error?.message||e.message||t.statusText||"Request failed",i=e.error?.code,n=e.details;return new a(s,t.status,i,n)}async request(t,e,s={}){let{params:i,timeout:n,skipAuth:r,rawResponse:o,...c}=s,l=this.buildUrl(e,i),h=await this.buildHeaders({skipAuth:r}),u=n||this.config.timeout,d=new AbortController,m=setTimeout(()=>d.abort(),u);try{let e=await fetch(l,{method:t,headers:{...h,...c.headers},credentials:this.config.credentials,signal:d.signal,...c});if(401===e.status&&!r&&this.config.autoRefresh)try{await this.refreshToken();let e=await this.buildHeaders({skipAuth:!1}),s=await fetch(l,{method:t,headers:{...e,...c.headers},credentials:this.config.credentials,...c});if(!s.ok)throw await this.parseError(s);if(o)return s;if(204===s.status)return{};return await s.json()}catch(t){throw this.config.onAuthError?.(),t}if(!e.ok)throw await this.parseError(e);if(o)return e;if(204===e.status)return{};return await e.json()}catch(t){if(t instanceof a)throw t;if(t instanceof Error){if("AbortError"===t.name)throw new a("Request timeout",408,"TIMEOUT");throw new a(t.message,0,"NETWORK_ERROR")}throw new a("Unknown error occurred",500,"UNKNOWN")}finally{clearTimeout(m)}}get(t,e){return this.request("GET",t,e)}post(t,e,s){return this.request("POST",t,{...s,body:e?JSON.stringify(e):void 0})}patch(t,e,s){return this.request("PATCH",t,{...s,body:e?JSON.stringify(e):void 0})}put(t,e,s){return this.request("PUT",t,{...s,body:e?JSON.stringify(e):void 0})}delete(t,e){return this.request("DELETE",t,e)}async upload(t,e,s){let{params:i,timeout:n,skipAuth:r,onProgress:o}=s||{},c=this.buildUrl(t,i),l=await this.buildHeaders({skipAuth:r}),h=n||this.config.timeout;if(delete l["Content-Type"],o&&"undefined"!=typeof XMLHttpRequest)return new Promise((t,s)=>{let i=new XMLHttpRequest;i.open("POST",c),Object.entries(l).forEach(([t,e])=>{i.setRequestHeader(t,e)}),i.withCredentials="include"===this.config.credentials,i.upload.onprogress=t=>{t.lengthComputable&&o(Math.round(t.loaded/t.total*100))},i.onload=()=>{if(i.status>=200&&i.status<300)try{t(JSON.parse(i.responseText))}catch{t({})}else s(new a(i.statusText||"Upload failed",i.status,"UPLOAD_ERROR"))},i.onerror=()=>{s(new a("Network error during upload",0,"NETWORK_ERROR"))},i.ontimeout=()=>{s(new a("Upload timeout",408,"TIMEOUT"))},i.timeout=h,i.send(e)});let u=new AbortController,d=setTimeout(()=>u.abort(),h);try{let t=await fetch(c,{method:"POST",headers:l,body:e,credentials:this.config.credentials,signal:u.signal});if(!t.ok)throw await this.parseError(t);return await t.json()}finally{clearTimeout(d)}}},r=class{prefix;constructor(t="baasix_"){this.prefix=t}getKey(t){return t.startsWith(this.prefix)?t:`${this.prefix}${t}`}get(t){if("undefined"==typeof window||!window.localStorage)return null;try{return localStorage.getItem(this.getKey(t))}catch{return console.warn(`[Baasix SDK] Failed to get item from localStorage: ${t}`),null}}set(t,e){if("undefined"!=typeof window&&window.localStorage)try{localStorage.setItem(this.getKey(t),e)}catch{console.warn(`[Baasix SDK] Failed to set item in localStorage: ${t}`)}}remove(t){if("undefined"!=typeof window&&window.localStorage)try{localStorage.removeItem(this.getKey(t))}catch{console.warn(`[Baasix SDK] Failed to remove item from localStorage: ${t}`)}}clear(){if("undefined"!=typeof window&&window.localStorage)try{let t=[];for(let e=0;e<localStorage.length;e++){let s=localStorage.key(e);s?.startsWith(this.prefix)&&t.push(s)}t.forEach(t=>localStorage.removeItem(t))}catch{console.warn("[Baasix SDK] Failed to clear localStorage")}}},o=class{store;constructor(){this.store=new Map}get(t){return this.store.get(t)??null}set(t,e){this.store.set(t,e)}remove(t){this.store.delete(t)}clear(){this.store.clear()}keys(){return Array.from(this.store.keys())}size(){return this.store.size}},c=class{client;storage;authMode;onAuthStateChange;currentUser=null;constructor(t){this.client=t.client,this.storage=t.storage,this.authMode=t.authMode,this.onAuthStateChange=t.onAuthStateChange}emitAuthStateChange(t,e){this.currentUser=e,this.onAuthStateChange?.(t,e)}async storeTokens(t){if("jwt"===this.authMode&&(await this.storage.set(i.ACCESS_TOKEN,t.token),t.refreshToken&&await this.storage.set(i.REFRESH_TOKEN,t.refreshToken),t.expiresIn)){let e=Date.now()+1e3*t.expiresIn;await this.storage.set(i.TOKEN_EXPIRY,e.toString())}t.user&&await this.storage.set(i.USER,JSON.stringify(t.user))}async clearAuth(){await this.storage.remove(i.ACCESS_TOKEN),await this.storage.remove(i.REFRESH_TOKEN),await this.storage.remove(i.TOKEN_EXPIRY),await this.storage.remove(i.USER),await this.storage.remove(i.TENANT),this.currentUser=null}async register(t){let e=await this.client.post("/auth/register",t,{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async login(t){let e=await this.client.post("/auth/login",{email:t.email,password:t.password,tenant_Id:t.tenantId},{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async logout(){try{await this.client.get("/auth/logout")}catch{}await this.clearAuth(),this.emitAuthStateChange("SIGNED_OUT",null)}async getUser(){try{let t=await this.client.get("/auth/me");return this.currentUser=t.data,await this.storage.set(i.USER,JSON.stringify(t.data)),t.data}catch(t){if(t instanceof a&&401===t.status)return await this.clearAuth(),null;throw t}}async getCachedUser(){if(this.currentUser)return this.currentUser;let t=await this.storage.get(i.USER);if(t)try{return this.currentUser=JSON.parse(t),this.currentUser}catch{}return null}async isAuthenticated(){if("cookie"===this.authMode)return null!==await this.getCachedUser();if(!await this.storage.get(i.ACCESS_TOKEN))return!1;let t=await this.storage.get(i.TOKEN_EXPIRY);return!(t&&Date.now()>=parseInt(t,10))||!!await this.storage.get(i.REFRESH_TOKEN)}async getToken(){return"cookie"===this.authMode?null:await this.storage.get(i.ACCESS_TOKEN)}async setToken(t){await this.storage.set(i.ACCESS_TOKEN,t)}async refreshToken(){let t=await this.storage.get(i.REFRESH_TOKEN),e=await this.client.post("/auth/refresh","jwt"===this.authMode?{refreshToken:t}:void 0);await this.storeTokens(e);let s={accessToken:e.token,refreshToken:e.refreshToken,expiresIn:e.expiresIn,expiresAt:e.expiresIn?Date.now()+1e3*e.expiresIn:void 0};return this.emitAuthStateChange("TOKEN_REFRESHED",e.user),s}async sendMagicLink(t){await this.client.post("/auth/magiclink",{email:t.email,link:t.redirectUrl,mode:t.mode||"link"},{skipAuth:!0})}async verifyMagicLink(t){let e=await this.client.get(`/auth/magiclink/${encodeURIComponent(t)}`,{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async forgotPassword(t){await this.client.post("/auth/forgot-password",{email:t.email,link:t.redirectUrl},{skipAuth:!0})}async resetPassword(t,e){await this.client.post("/auth/reset-password",{token:t,password:e},{skipAuth:!0})}async changePassword(t,e){await this.client.post("/auth/change-password",{currentPassword:t,newPassword:e})}async updateProfile(t){let e=await this.client.patch("/auth/me",t);return await this.storage.set(i.USER,JSON.stringify(e.data)),this.emitAuthStateChange("USER_UPDATED",e.data),e.data}async getTenants(){return(await this.client.get("/auth/tenants")).data}async switchTenant(t){let e=await this.client.post("/auth/switch-tenant",{tenant_Id:t});return await this.storeTokens(e),await this.storage.set(i.TENANT,t),this.emitAuthStateChange("TENANT_SWITCHED",e.user),e}async getState(){let t=await this.isAuthenticated();return{user:await this.getCachedUser(),isAuthenticated:t,isLoading:!1,error:null}}async initialize(){let t=await this.getState();return t.isAuthenticated&&t.user&&this.emitAuthStateChange("SIGNED_IN",t.user),t}getOAuthUrl(t){let e=this.client.getBaseUrl(),s=new URLSearchParams({redirect_url:t.redirectUrl});return t.scopes?.length&&s.set("scopes",t.scopes.join(",")),t.state&&s.set("state",t.state),`${e}/auth/signin/${t.provider}?${s.toString()}`}async handleOAuthCallback(t){await this.storage.set(i.ACCESS_TOKEN,t);let e=await this.getUser();return this.emitAuthStateChange("SIGNED_IN",e),{token:t,user:e}}async requestEmailVerification(t){await this.client.post("/auth/request-verify-email",{link:t})}async verifyEmail(t){await this.client.get("/auth/verify-email",{params:{token:t},skipAuth:!0})}async checkSession(){try{return(await this.client.get("/auth/check")).data.valid}catch{return!1}}async sendInvite(t){await this.client.post("/auth/invite",{email:t.email,role_Id:t.roleId,tenant_Id:t.tenantId,link:t.redirectUrl})}async verifyInvite(t,e){return(await this.client.get("/auth/verify-invite",{params:{token:t,link:e},skipAuth:!0})).data}async acceptInvite(t){let e=await this.client.post("/auth/accept-invite",{token:t});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}async registerWithInvite(t){let e=await this.client.post("/auth/register",{...t,inviteToken:t.inviteToken},{skipAuth:!0});return await this.storeTokens(e),this.emitAuthStateChange("SIGNED_IN",e.user),e}},l=class{collection;client;queryParams={};constructor(t,e){this.collection=t,this.client=e}select(...t){let e=1===t.length&&Array.isArray(t[0])?t[0]:t;return this.queryParams.fields=e,this}fields(...t){return this.select(...t)}filter(t){return this.queryParams.filter=t,this}where(t){return this.filter(t)}sort(t){return this.queryParams.sort=t,this}orderBy(t){return this.sort(t)}limit(t){return this.queryParams.limit=t,this}page(t){return this.queryParams.page=t,this}offset(t){return this.queryParams.offset=t,this}search(t,e){return this.queryParams.search=t,e&&(this.queryParams.searchFields=e),this}withDeleted(){return this.queryParams.paranoid=!1,this}relFilter(t){return this.queryParams.relConditions=t,this}getQuery(){return{...this.queryParams}}async get(){return this.client.get(`/items/${this.collection}`,{params:this.buildParams()})}async first(){return(await this.limit(1).get()).data[0]||null}async count(){return(await this.client.get(`/items/${this.collection}`,{params:{...this.buildParams(),limit:0}})).totalCount||0}buildParams(){let t={};return this.queryParams.fields&&(t.fields=this.queryParams.fields),this.queryParams.filter&&(t.filter=this.queryParams.filter),this.queryParams.sort&&(t.sort=this.queryParams.sort),void 0!==this.queryParams.limit&&(t.limit=this.queryParams.limit),void 0!==this.queryParams.page&&(t.page=this.queryParams.page),void 0!==this.queryParams.offset&&(t.offset=this.queryParams.offset),this.queryParams.search&&(t.search=this.queryParams.search),this.queryParams.searchFields&&(t.searchFields=this.queryParams.searchFields),void 0!==this.queryParams.paranoid&&(t.paranoid=this.queryParams.paranoid),this.queryParams.relConditions&&(t.relConditions=this.queryParams.relConditions),this.queryParams.aggregate&&(t.aggregate=this.queryParams.aggregate),this.queryParams.groupBy&&(t.groupBy=this.queryParams.groupBy),t}},h=class{collection;client;constructor(t,e){this.collection=t,this.client=e.client}query(){return new l(this.collection,this.client)}async find(t){return this.client.get(`/items/${this.collection}`,{params:t})}async findMany(t){return this.find(t)}async findOne(t,e){return(await this.client.get(`/items/${this.collection}/${t}`,{params:e})).data}async get(t,e){return this.findOne(t,e)}async create(t){return(await this.client.post(`/items/${this.collection}`,t)).data}async insert(t){return this.create(t)}async createMany(t){return(await this.client.post(`/items/${this.collection}/bulk`,t)).data}async insertMany(t){return this.createMany(t)}async update(t,e){return(await this.client.patch(`/items/${this.collection}/${t}`,e)).data}async updateMany(t,e){let s=t.map(t=>({id:t,data:e}));return(await this.client.patch(`/items/${this.collection}/bulk`,s)).data}async upsert(t,e){let s=await this.find({filter:t,limit:1});return s.data.length>0?this.update(s.data[0].id,e):this.create(e)}async delete(t){await this.client.delete(`/items/${this.collection}/${t}`)}async deleteMany(t){await this.client.delete(`/items/${this.collection}/bulk`,{body:JSON.stringify(t)})}async softDelete(t){await this.update(t,{deletedAt:new Date().toISOString()})}async restore(t){await this.update(t,{deletedAt:null})}async aggregate(t){return(await this.client.get(`/items/${this.collection}`,{params:t})).data}async importCSV(t){let e=new FormData;return File,e.append("csvFile",t),(await this.client.post(`/items/${this.collection}/import-csv`,e)).results}async importJSON(t){let e=new FormData;return File,e.append("jsonFile",t),(await this.client.post(`/items/${this.collection}/import-json`,e)).results}async importData(t){return await this.client.post(`/items/${this.collection}/bulk`,t)}async sortItem(t,e,s="before"){await this.client.post(`/utils/sort/${this.collection}`,{item:t,to:e,mode:s})}async reorder(t){for(let e=1;e<t.length;e++)await this.client.post(`/utils/sort/${this.collection}`,{item:t[e],to:t[e-1],mode:"after"})}},u=class{client;constructor(t){this.client=t.client}async upload(t,e){let s=new FormData;return t instanceof File||Blob,s.append("file",t),e?.title&&s.append("title",e.title),e?.description&&s.append("description",e.description),e?.folder&&s.append("folder",e.folder),e?.storage&&s.append("storage",e.storage),e?.isPublic!==void 0&&s.append("isPublic",String(e.isPublic)),e?.metadata&&s.append("metadata",JSON.stringify(e.metadata)),(await this.client.upload("/files",s,{onProgress:e?.onProgress,timeout:e?.timeout})).data}async uploadMany(t,e){let s=[];for(let i of t instanceof FileList?Array.from(t):t){let t=await this.upload(i,e);s.push(t)}return s}async find(t){return this.client.get("/files",{params:t})}async findOne(t){return(await this.client.get(`/files/${t}`)).data}async update(t,e){return(await this.client.patch(`/files/${t}`,e)).data}async delete(t){await this.client.delete(`/files/${t}`)}async deleteMany(t){await Promise.all(t.map(t=>this.delete(t)))}getAssetUrl(t,e){let s=new URL(`/assets/${t}`,this.client.getBaseUrl());return e&&(e.width&&s.searchParams.set("width",String(e.width)),e.height&&s.searchParams.set("height",String(e.height)),e.fit&&s.searchParams.set("fit",e.fit),e.quality&&s.searchParams.set("quality",String(e.quality)),e.format&&s.searchParams.set("format",e.format)),s.toString()}async download(t,e){let s=this.getAssetUrl(t,e),i=await fetch(s);if(!i.ok)throw Error(`Failed to download file: ${i.statusText}`);return i.blob()}async toBase64(t,e){let s=await this.download(t,e);return new Promise((t,e)=>{let i=new FileReader;i.onloadend=()=>{t(i.result.split(",")[1])},i.onerror=e,i.readAsDataURL(s)})}async importFromUrl(t,e){return(await this.client.post("/files/import",{url:t,...e})).data}},d=class{client;constructor(t){this.client=t.client}async find(t){let e=t?{...t,sort:function(t){if(t){if("string"==typeof t)return t;if(Array.isArray(t))return 0===t.length?void 0:"object"==typeof t[0]&&"column"in t[0]?t.map(t=>`${t.column}:${t.order.toLowerCase()}`).join(","):t.map(t=>t.startsWith("-")?`${t.substring(1)}:desc`:t.includes(":")?t:`${t}:asc`).join(",");if("object"==typeof t){let e=Object.entries(t);if(0===e.length)return;return e.map(([t,e])=>`${t}:${e.toLowerCase()}`).join(",")}}}(t.sort)}:void 0;return this.client.get("/schemas",{params:e})}async findOne(t){return(await this.client.get(`/schemas/${t}`)).data}async create(t){return(await this.client.post("/schemas",t)).data}async update(t,e){return(await this.client.patch(`/schemas/${t}`,e)).data}async delete(t){await this.client.delete(`/schemas/${t}`)}async createRelationship(t,e){await this.client.post(`/schemas/${t}/relationships`,e)}async deleteRelationship(t,e){await this.client.delete(`/schemas/${t}/relationships/${e}`)}async updateRelationship(t,e,s){await this.client.patch(`/schemas/${t}/relationships/${e}`,s)}async createIndex(t,e){await this.client.post(`/schemas/${t}/indexes`,e)}async deleteIndex(t,e){await this.client.delete(`/schemas/${t}/indexes/${e}`)}async addField(t,e,s){let i=await this.findOne(t),a={...i.schema.fields,[e]:s};return this.update(t,{schema:{...i.schema,fields:a}})}async removeField(t,e){let s=await this.findOne(t),{[e]:i,...a}=s.schema.fields;return this.update(t,{schema:{...s.schema,fields:a}})}async export(){return(await this.client.get("/schemas/export")).data}async import(t){await this.client.post("/schemas/import",{schemas:t})}},m=class{client;constructor(t){this.client=t.client}async find(t){return this.client.get("/notifications",{params:t})}async getUnreadCount(){return(await this.client.get("/notifications/unread/count")).count}async markAsSeen(t){return{count:(await this.client.post("/notifications/mark-seen",{notificationIds:t})).count}}async delete(t){return{count:(await this.client.delete("/notifications",{params:t?{notificationIds:t}:void 0})).count}}async send(t){return{notificationIds:(await this.client.post("/notifications/send",t)).notificationIds}}async cleanup(t=30){return{count:(await this.client.post("/notifications/cleanup",{days:t})).count}}},g=class{client;constructor(t){this.client=t.client}async find(t){return this.client.get("/permissions",{params:t})}async findOne(t){return(await this.client.get(`/permissions/${t}`)).data}async findByRole(t){return this.client.get("/permissions",{params:{filter:{role_Id:{eq:t}},limit:-1}})}async findByCollection(t){return this.client.get("/permissions",{params:{filter:{collection:{eq:t}},limit:-1}})}async create(t){return(await this.client.post("/permissions",t)).data}async update(t,e){return(await this.client.patch(`/permissions/${t}`,e)).data}async delete(t){await this.client.delete(`/permissions/${t}`)}async getRoles(){return this.client.get("/items/baasix_Role",{params:{limit:-1}})}async createCrudPermissions(t,e,s){let i=[];for(let a of["create","read","update","delete"]){let n=s[a];if(!1===n)continue;let r=await this.create({role_Id:t,collection:e,action:a,fields:n?.fields||["*"],conditions:n?.conditions});i.push(r)}return i}async reloadCache(){await this.client.post("/permissions/reload")}},w=class{client;constructor(t){this.client=t.client}async get(){return(await this.client.get("/settings")).data}async getKey(t){return(await this.get())[t]??null}async update(t){return(await this.client.patch("/settings",t)).data}async set(t,e){return this.update({[t]:e})}},f=class{client;constructor(t){this.client=t.client}async generate(t,e){return await this.client.post(`/reports/${t}`,e)}async query(t,e){return await this.client.get(`/reports/${t}`,{params:e})}async getStats(t){return await this.client.post("/reports/stats",{stats:t})}async aggregate(t,e){return(await this.client.get(`/items/${t}`,{params:{aggregate:e.aggregate,groupBy:e.groupBy,filter:e.filter,limit:-1}})).data}async count(t,e){return(await this.client.get(`/items/${t}`,{params:{filter:e,limit:0}})).totalCount||0}async distinct(t,e,s){return(await this.client.get(`/items/${t}`,{params:{filter:s,fields:[e],groupBy:[e],limit:-1}})).data.map(t=>t[e])}},p=class{client;constructor(t){this.client=t.client}async find(t){return this.client.get("/workflows",{params:t})}async findOne(t){return(await this.client.get(`/workflows/${t}`)).data}async create(t){return(await this.client.post("/workflows",t)).data}async update(t,e){return(await this.client.patch(`/workflows/${t}`,e)).data}async delete(t){await this.client.delete(`/workflows/${t}`)}async execute(t,e){return(await this.client.post(`/workflows/${t}/execute`,{triggerData:e})).data}async test(t,e){return(await this.client.post(`/workflows/${t}/test`,{triggerData:e})).data}async getExecutions(t,e){return this.client.get(`/workflows/${t}/executions`,{params:e})}async getExecution(t,e){return(await this.client.get(`/workflows/${t}/executions/${e}`)).data}async cancelExecution(t,e){await this.client.post(`/workflows/${t}/executions/${e}/cancel`)}async enable(t){return this.update(t,{isActive:!0})}async disable(t){return this.update(t,{isActive:!1})}async duplicate(t,e){let{id:s,createdAt:i,updatedAt:a,...n}=await this.findOne(t);return this.create({...n,name:`Copy of ${n.name}`,...e})}},y=class{client;storage;socket=null;socketClient=null;socketUrl;socketPath;subscriptions=new Map;workflowCallbacks=new Map;roomCallbacks=new Map;roomUserCallbacks=new Map;connectionCallbacks=new Set;reconnecting=!1;connectionPromise=null;constructor(t){this.client=t.client,this.storage=t.storage,this.socketUrl=t.socketUrl||"",this.socketPath=t.socketPath||"/realtime"}setSocketClient(t){this.socketClient=t}setSocketUrl(t){this.socketUrl=t}ensureSocketClient(){if(!this.socketClient)throw Error("Socket.io client not set. Please call baasix.realtime.setSocketClient(io) with socket.io-client.")}async getAuthToken(){return await this.storage.get(i.ACCESS_TOKEN)}async connect(){if(this.connectionPromise)return this.connectionPromise;if(this.socket?.connected)return Promise.resolve();this.ensureSocketClient(),this.connectionPromise=new Promise(async(t,e)=>{try{let s=await this.getAuthToken(),i=this.socketUrl||this.client.getBaseUrl();this.socket=this.socketClient(i,{auth:{token:s||void 0},path:this.socketPath,transports:["websocket","polling"],reconnection:!0,reconnectionAttempts:10,reconnectionDelay:1e3,timeout:2e4}),this.socket.on("connect",()=>{console.log("[Baasix Realtime] Connected"),this.reconnecting=!1,this.notifyConnectionChange(!0),t()}),this.socket.on("disconnect",t=>{console.log("[Baasix Realtime] Disconnected:",t),this.notifyConnectionChange(!1)}),this.socket.on("connect_error",t=>{console.error("[Baasix Realtime] Connection error:",t.message),this.reconnecting||e(t)}),this.socket.on("reconnect",()=>{console.log("[Baasix Realtime] Reconnected"),this.reconnecting=!1,this.resubscribeAll(),this.notifyConnectionChange(!0)}),this.socket.on("reconnect_attempt",()=>{this.reconnecting=!0}),this.socket.on("connected",t=>{console.log("[Baasix Realtime] Authenticated as user:",t.userId)}),this.socket.on("workflow:execution:update",t=>{this.handleWorkflowUpdate(t)}),this.socket.on("workflow:execution:complete",t=>{this.handleWorkflowUpdate({...t,status:"complete"})}),this.socket.on("room:user:joined",t=>{let e=this.roomUserCallbacks.get(t.room);e?.joined.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Realtime] Error in room user joined callback:",t)}})}),this.socket.on("room:user:left",t=>{let e=this.roomUserCallbacks.get(t.room);e?.left.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Realtime] Error in room user left callback:",t)}})}),this.socket.connect()}catch(t){this.connectionPromise=null,e(t)}});try{await this.connectionPromise}finally{this.connectionPromise=null}}disconnect(){this.socket&&(this.socket.disconnect(),this.socket=null),this.subscriptions.clear(),this.workflowCallbacks.clear(),this.roomCallbacks.clear(),this.roomUserCallbacks.clear()}get isConnected(){return this.socket?.connected??!1}onConnectionChange(t){return this.connectionCallbacks.add(t),()=>{this.connectionCallbacks.delete(t)}}notifyConnectionChange(t){this.connectionCallbacks.forEach(e=>e(t))}subscribe(t,e){this.socket?.connected||console.warn("[Baasix Realtime] Not connected. Call connect() first.");let s=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=this.subscriptions.get(t);return i||(i={collection:t,callbacks:new Map},this.subscriptions.set(t,i),this.subscribeOnServer(t),this.setupCollectionListeners(t)),i.callbacks.set(s,e),()=>{let e=this.subscriptions.get(t);e&&(e.callbacks.delete(s),0===e.callbacks.size&&(this.unsubscribeOnServer(t),this.removeCollectionListeners(t),this.subscriptions.delete(t)))}}on(t,e,s){return this.subscribe(t,t=>{t.action===e&&s(t.data)})}onAny(t){let e=[];return this.subscriptions.forEach((s,i)=>{let a=this.subscribe(i,e=>{t(i,e)});e.push(a)}),()=>{e.forEach(t=>t())}}subscribeOnServer(t){this.socket?.connected&&this.socket.emit("subscribe",{collection:t},e=>{"error"===e.status&&console.error(`[Baasix Realtime] Failed to subscribe to ${t}:`,e.message)})}unsubscribeOnServer(t){this.socket?.connected&&this.socket.emit("unsubscribe",{collection:t})}setupCollectionListeners(t){this.socket&&["create","update","delete"].forEach(e=>{let s=`${t}:${e}`;this.socket.on(s,e=>{this.handleCollectionEvent(t,e)})})}removeCollectionListeners(t){this.socket&&["create","update","delete"].forEach(e=>{let s=`${t}:${e}`;this.socket.off(s)})}handleCollectionEvent(t,e){let s=this.subscriptions.get(t);s&&s.callbacks.forEach(t=>{try{t(e)}catch(t){console.error("[Baasix Realtime] Error in subscription callback:",t)}})}resubscribeAll(){this.subscriptions.forEach((t,e)=>{this.subscribeOnServer(e),this.setupCollectionListeners(e)})}subscribeToExecution(t,e){let s=String(t);this.socket?.connected&&this.socket.emit("workflow:execution:join",{executionId:s});let i=this.workflowCallbacks.get(s);return i||(i=new Set,this.workflowCallbacks.set(s,i)),i.add(e),()=>{let t=this.workflowCallbacks.get(s);t&&(t.delete(e),0===t.size&&this.workflowCallbacks.delete(s))}}handleWorkflowUpdate(t){let e=String(t.executionId),s=this.workflowCallbacks.get(e);s&&s.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Realtime] Error in workflow callback:",t)}})}async joinRoom(t){if(!this.socket?.connected)throw Error("Not connected. Call connect() first.");return new Promise((e,s)=>{this.socket.emit("room:join",{room:t},i=>{"success"===i.status?(this.setupRoomListeners(t),e()):s(Error(i.message||"Failed to join room"))})})}async leaveRoom(t){if(this.socket?.connected)return new Promise((e,s)=>{this.socket.emit("room:leave",{room:t},i=>{"success"===i.status?(this.cleanupRoomListeners(t),e()):s(Error(i.message||"Failed to leave room"))})})}async sendToRoom(t,e,s){if(!this.socket?.connected)throw Error("Not connected. Call connect() first.");return new Promise((i,a)=>{this.socket.emit("room:message",{room:t,event:e,payload:s},t=>{"success"===t.status?i():a(Error(t.message||"Failed to send message"))})})}onRoomMessage(t,e,s){this.roomCallbacks.has(t)||this.roomCallbacks.set(t,new Map);let i=this.roomCallbacks.get(t);return i.has(e)||i.set(e,new Set),i.get(e).add(s),()=>{let i=this.roomCallbacks.get(t);if(i){let a=i.get(e);a&&(a.delete(s),0===a.size&&i.delete(e)),0===i.size&&this.roomCallbacks.delete(t)}}}onRoomUserJoined(t,e){return this.roomUserCallbacks.has(t)||this.roomUserCallbacks.set(t,{joined:new Set,left:new Set}),this.roomUserCallbacks.get(t).joined.add(e),()=>{let s=this.roomUserCallbacks.get(t);s&&(s.joined.delete(e),0===s.joined.size&&0===s.left.size&&this.roomUserCallbacks.delete(t))}}onRoomUserLeft(t,e){return this.roomUserCallbacks.has(t)||this.roomUserCallbacks.set(t,{joined:new Set,left:new Set}),this.roomUserCallbacks.get(t).left.add(e),()=>{let s=this.roomUserCallbacks.get(t);s&&(s.left.delete(e),0===s.joined.size&&0===s.left.size&&this.roomUserCallbacks.delete(t))}}async invoke(t,e){if(!this.socket?.connected)throw Error("Not connected. Call connect() first.");return new Promise((s,i)=>{this.socket.emit("custom",{event:t,payload:e},t=>{"success"===t.status?s(t):i(Error(t.message||"Custom event failed"))})})}setupRoomListeners(t){this.roomCallbacks.has(t)||this.roomCallbacks.set(t,new Map),this.roomUserCallbacks.has(t)||this.roomUserCallbacks.set(t,{joined:new Set,left:new Set})}cleanupRoomListeners(t){this.roomCallbacks.delete(t),this.roomUserCallbacks.delete(t)}channel(t){return new k(this,t)}},k=class{realtime;collection;handlers=new Map;unsubscribeFn=null;constructor(t,e){this.realtime=t,this.collection=e}on(t,e){let s=this.mapEvent(t);return"*"===s?["create","update","delete"].forEach(t=>{this.addHandler(t,e)}):this.addHandler(s,e),this}mapEvent(t){switch(t.toUpperCase()){case"INSERT":return"create";case"UPDATE":return"update";case"DELETE":return"delete";default:return"*"}}addHandler(t,e){this.handlers.has(t)||this.handlers.set(t,[]),this.handlers.get(t).push(e)}subscribe(){return this.unsubscribeFn=this.realtime.subscribe(this.collection,t=>{let e=this.handlers.get(t.action);e&&e.forEach(e=>{try{e(t)}catch(t){console.error("[Baasix Channel] Handler error:",t)}})}),this}unsubscribe(){this.unsubscribeFn&&(this.unsubscribeFn(),this.unsubscribeFn=null),this.handlers.clear()}},C=class{client;collection="baasix_Role";constructor(t){this.client=t.client}async find(){return this.client.get(`/items/${this.collection}`,{params:{limit:-1}})}async findOne(t){return(await this.client.get(`/items/${this.collection}/${t}`)).data}async findByName(t){return(await this.client.get(`/items/${this.collection}`,{params:{filter:JSON.stringify({name:{eq:t}}),limit:1}})).data[0]||null}async create(t){return(await this.client.post(`/items/${this.collection}`,t)).data.id}async update(t,e){await this.client.patch(`/items/${this.collection}/${t}`,e)}async delete(t){await this.client.delete(`/items/${this.collection}/${t}`)}},b=class{client;collection="baasix_User";constructor(t){this.client=t.client}async find(t={}){let e={};return t.filter&&(e.filter=JSON.stringify(t.filter)),t.sort&&(e.sort=t.sort),void 0!==t.limit&&(e.limit=t.limit),void 0!==t.page&&(e.page=t.page),t.fields?.length&&(e.fields=t.fields.join(",")),this.client.get(`/items/${this.collection}`,{params:e})}async findOne(t,e){let s={};return e?.length&&(s.fields=e.join(",")),(await this.client.get(`/items/${this.collection}/${t}`,{params:s})).data}async findByEmail(t){return(await this.client.get(`/items/${this.collection}`,{params:{filter:JSON.stringify({email:{eq:t}}),limit:1}})).data[0]||null}async create(t){return(await this.client.post(`/items/${this.collection}`,t)).data.id}async update(t,e){await this.client.patch(`/items/${this.collection}/${t}`,e)}async delete(t){await this.client.delete(`/items/${this.collection}/${t}`)}async changePassword(t,e){await this.client.post("/auth/admin/change-password",{userId:t,password:e})}async suspend(t){await this.client.patch(`/items/${this.collection}/${t}`,{status:"suspended"})}async activate(t){await this.client.patch(`/items/${this.collection}/${t}`,{status:"active"})}async createMany(t){return(await this.client.post(`/items/${this.collection}/bulk`,t)).data}async deleteMany(t){await this.client.delete(`/items/${this.collection}/bulk`,{body:JSON.stringify(t)})}},E=class{client;constructor(t){this.client=t.client}async status(){return(await this.client.get("/migrations/status")).data}async list(t){return(await this.client.get("/migrations",{params:t})).data}async pending(){return(await this.client.get("/migrations/pending")).data}async check(){return(await this.client.get("/migrations/check")).data}async get(t){try{return(await this.client.get(`/migrations/${encodeURIComponent(t)}`)).data}catch{return null}}async run(t){return(await this.client.post("/migrations/run",t||{})).data}async rollback(t){return(await this.client.post(`/migrations/rollback/${encodeURIComponent(t)}`,{})).data}async rollbackBatch(){return(await this.client.post("/migrations/rollback-batch",{})).data}async create(t,e){return(await this.client.post("/migrations/create",{name:t,...e})).data}async markCompleted(t,e){return(await this.client.post(`/migrations/mark-completed/${encodeURIComponent(t)}`,{metadata:e})).data}async markAllCompleted(t){return(await this.client.post("/migrations/mark-all-completed",{toVersion:t})).data}},S=class{client;constructor(t){this.client=t.client}async info(){return this.client.get("/")}async health(){try{return await this.client.get("/health"),!0}catch{return!1}}},T=class{config;httpClient;storage;auth;files;schemas;notifications;permissions;settings;reports;workflows;realtime;roles;users;migrations;server;itemsModules=new Map;constructor(t){if(!t.url)throw Error("Baasix SDK: url is required");let e=t.url.replace(/\/$/,"");this.config={...t,url:e,authMode:t.authMode||"jwt",timeout:t.timeout||6e5,autoRefresh:!1!==t.autoRefresh},this.storage=t.storage||("undefined"!=typeof window&&void 0!==window.localStorage?new r:new o);let s=t.credentials||("cookie"===this.config.authMode?"include":"same-origin");this.httpClient=new n({baseUrl:e,authMode:this.config.authMode,storage:this.storage,timeout:this.config.timeout,autoRefresh:this.config.autoRefresh,credentials:s,headers:t.headers||{},token:t.token,tenantId:t.tenantId,onAuthError:()=>{this.config.onAuthStateChange?.("SIGNED_OUT",null)},onTokenRefresh:()=>{}}),this.auth=new c({client:this.httpClient,storage:this.storage,authMode:this.config.authMode,onAuthStateChange:t.onAuthStateChange}),this.files=new u({client:this.httpClient}),this.schemas=new d({client:this.httpClient}),this.notifications=new m({client:this.httpClient}),this.permissions=new g({client:this.httpClient}),this.settings=new w({client:this.httpClient}),this.reports=new f({client:this.httpClient}),this.workflows=new p({client:this.httpClient}),this.roles=new C({client:this.httpClient}),this.users=new b({client:this.httpClient}),this.migrations=new E({client:this.httpClient}),this.server=new S({client:this.httpClient}),this.realtime=new y({client:this.httpClient,storage:this.storage,socketUrl:t.socketUrl,socketPath:t.socketPath})}items(t){return this.itemsModules.has(t)||this.itemsModules.set(t,new h(t,{client:this.httpClient})),this.itemsModules.get(t)}collection(t){return this.items(t)}from(t){return this.items(t)}get request(){return this.httpClient}configure(t){t.headers&&this.httpClient.updateConfig({headers:t.headers}),void 0!==t.tenantId&&this.httpClient.updateConfig({tenantId:t.tenantId}),t.token&&this.httpClient.updateConfig({token:t.token}),t.timeout&&this.httpClient.updateConfig({timeout:t.timeout})}async setTenant(t){this.httpClient.updateConfig({tenantId:t}),await this.storage.set(i.TENANT,t)}async getTenant(){return await this.storage.get(i.TENANT)}async clearTenant(){this.httpClient.updateConfig({tenantId:void 0}),await this.storage.remove(i.TENANT)}async setToken(t){return this.auth.setToken(t)}async getToken(){return this.storage.get(i.ACCESS_TOKEN)}getUrl(){return this.config.url}getAuthMode(){return this.config.authMode}getStorage(){return this.storage}};function P(t){return new T(t)}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8037],{76227:function(e,t,r){Promise.resolve().then(r.bind(r,11314))},79205:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(2265);let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:u,className:o="",children:d,iconNode:c,...f}=e;return(0,n.createElement)("svg",{ref:t,...a,width:s,height:s,stroke:r,strokeWidth:u?24*Number(i)/Number(s):i,className:l("lucide",o),...f},[...c.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),u=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:u,...o}=r;return(0,n.createElement)(i,{ref:a,iconNode:t,className:l("lucide-".concat(s(e)),u),...o})});return r.displayName="".concat(e),r}},51817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},29090:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]])},47692:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},11314:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return C}});var n=r(57437);r(2265);var s=r(69174),l=r(96246),a=r(99397),i=r(45675),u=r(18930),o=r(42208),d=r(29090),c=r(47692),f=r(92735),m=r(17689),x=r(71096),p=r.n(x),h=r(45721),v=r.n(h),N=r(72337);p().extend(v());let w=e=>{let t=(null==e?void 0:e.toLowerCase())||"";return t.includes("create")||t.includes("insert")?(0,n.jsx)(a.Z,{className:"h-4 w-4 text-green-500"}):t.includes("update")||t.includes("edit")?(0,n.jsx)(i.Z,{className:"h-4 w-4 text-blue-500"}):t.includes("delete")||t.includes("remove")?(0,n.jsx)(u.Z,{className:"h-4 w-4 text-red-500"}):t.includes("read")||t.includes("view")||t.includes("get")?(0,n.jsx)(o.Z,{className:"h-4 w-4 text-gray-500"}):t.includes("login")||t.includes("signin")?(0,n.jsx)(d.Z,{className:"h-4 w-4 text-green-500"}):t.includes("logout")||t.includes("signout")?(0,n.jsx)(c.Z,{className:"h-4 w-4 text-orange-500"}):t.includes("export")?(0,n.jsx)(f.Z,{className:"h-4 w-4 text-purple-500"}):t.includes("import")?(0,n.jsx)(m.Z,{className:"h-4 w-4 text-purple-500"}):(0,n.jsx)(o.Z,{className:"h-4 w-4 text-gray-500"})},g=e=>{let t=(null==e?void 0:e.toLowerCase())||"";return t.includes("create")||t.includes("insert")?"default":t.includes("delete")||t.includes("remove")?"destructive":"secondary"},y=e=>{var t,r,n,s;return(null===(t=e.user)||void 0===t?void 0:t.fullName)?e.user.fullName:(null===(r=e.user)||void 0===r?void 0:r.firstName)&&(null===(n=e.user)||void 0===n?void 0:n.lastName)?"".concat(e.user.firstName," ").concat(e.user.lastName):(null===(s=e.user)||void 0===s?void 0:s.email)?e.user.email:e.userId||"System"},j=e=>{let t=y(e);if("System"===t)return"S";let r=t.split(" ");return r.length>=2?(r[0][0]+r[1][0]).toUpperCase():t.substring(0,2).toUpperCase()},b=()=>(0,n.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,n.jsx)(N.DataBrowserInner,{selectedCollection:"baasix_AuditLog",title:"Activity Log",enableSearch:!0,enableFilters:!0,enableCreate:!1,enableView:!0,enableEdit:!1,enableDelete:!1,enableExport:!0,enableImport:!1,enableBulkSelect:!1,enableColumnSettings:!0,defaultSorters:[{field:"createdAt",order:"desc"}],defaultVisibleColumns:["user","action","entity","entityId","createdAt","ipaddress"],defaultMeta:{fields:["*","user.*"]},customColumnRenderers:{user:(e,t)=>{var r;return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.qE,{className:"h-8 w-8",children:(0,n.jsx)(l.Q5,{className:"text-xs",children:j(t)})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-sm font-medium",children:y(t)}),(null===(r=t.user)||void 0===r?void 0:r.email)&&(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:t.user.email})]})]})},action:e=>(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[w(e),(0,n.jsx)(s.C,{variant:g(e),children:e})]}),entity:e=>(0,n.jsx)(s.C,{variant:"outline",children:e}),entityId:e=>e?(0,n.jsx)("span",{className:"font-mono text-xs truncate max-w-[100px] inline-block",children:e}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"-"}),createdAt:e=>(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-sm",children:p()(e).format("MMM D, YYYY")}),(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:[p()(e).format("h:mm A")," • ",p()(e).fromNow()]})]}),ipaddress:e=>(0,n.jsx)("span",{className:"text-muted-foreground font-mono text-xs",children:e||"-"})}})});function C(){return(0,n.jsx)(b,{})}},96246:function(e,t,r){"use strict";r.d(t,{F$:function(){return u},Q5:function(){return o},qE:function(){return i}});var n=r(57437),s=r(2265),l=r(27954),a=r(93448);let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(l.fC,{ref:t,className:(0,a.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r),...s})});i.displayName=l.fC.displayName;let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(l.Ee,{ref:t,className:(0,a.cn)("aspect-square h-full w-full",r),...s})});u.displayName=l.Ee.displayName;let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(l.NY,{ref:t,className:(0,a.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",r),...s})});o.displayName=l.NY.displayName},27954:function(e,t,r){"use strict";r.d(t,{NY:function(){return C},Ee:function(){return b},fC:function(){return j}});var n=r(2265),s=r(57437),l=r(26606),a=r(61188);r(54887);var i=r(37053),u=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,i.Z8)(`Primitive.${t}`),l=n.forwardRef((e,n)=>{let{asChild:l,...a}=e,i=l?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(i,{...a,ref:n})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{}),o=r(82558);function d(){return()=>{}}var c="Avatar",[f,m]=function(e,t=[]){let r=[],l=()=>{let t=r.map(e=>n.createContext(e));return function(r){let s=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:s}}),[r,s])}};return l.scopeName=e,[function(t,l){let a=n.createContext(l);a.displayName=t+"Context";let i=r.length;r=[...r,l];let u=t=>{let{scope:r,children:l,...u}=t,o=r?.[e]?.[i]||a,d=n.useMemo(()=>u,Object.values(u));return(0,s.jsx)(o.Provider,{value:d,children:l})};return u.displayName=t+"Provider",[u,function(r,s){let u=s?.[e]?.[i]||a,o=n.useContext(u);if(o)return o;if(void 0!==l)return l;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let s=r.reduce((t,{useScope:r,scopeName:n})=>{let s=r(e)[`__scope${n}`];return{...t,...s}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}(l,...t)]}(c),[x,p]=f(c),h=n.forwardRef((e,t)=>{let{__scopeAvatar:r,...l}=e,[a,i]=n.useState("idle");return(0,s.jsx)(x,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:(0,s.jsx)(u.span,{...l,ref:t})})});h.displayName=c;var v="AvatarImage",N=n.forwardRef((e,t)=>{let{__scopeAvatar:r,src:i,onLoadingStatusChange:c=()=>{},...f}=e,m=p(v,r),x=function(e,t){let{referrerPolicy:r,crossOrigin:s}=t,l=(0,o.useSyncExternalStore)(d,()=>!0,()=>!1),i=n.useRef(null),u=l?(i.current||(i.current=new window.Image),i.current):null,[c,f]=n.useState(()=>y(u,e));return(0,a.b)(()=>{f(y(u,e))},[u,e]),(0,a.b)(()=>{let e=e=>()=>{f(e)};if(!u)return;let t=e("loaded"),n=e("error");return u.addEventListener("load",t),u.addEventListener("error",n),r&&(u.referrerPolicy=r),"string"==typeof s&&(u.crossOrigin=s),()=>{u.removeEventListener("load",t),u.removeEventListener("error",n)}},[u,s,r]),c}(i,f),h=(0,l.W)(e=>{c(e),m.onImageLoadingStatusChange(e)});return(0,a.b)(()=>{"idle"!==x&&h(x)},[x,h]),"loaded"===x?(0,s.jsx)(u.img,{...f,ref:t,src:i}):null});N.displayName=v;var w="AvatarFallback",g=n.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:l,...a}=e,i=p(w,r),[o,d]=n.useState(void 0===l);return n.useEffect(()=>{if(void 0!==l){let e=window.setTimeout(()=>d(!0),l);return()=>window.clearTimeout(e)}},[l]),o&&"loaded"!==i.imageLoadingStatus?(0,s.jsx)(u.span,{...a,ref:t}):null});function y(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}g.displayName=w;var j=h,b=N,C=g}},function(e){e.O(0,[7999,3572,7902,5094,4438,6530,4475,6241,926,600,2676,1509,1668,9487,7636,1783,9881,7324,9124,6712,6547,489,1303,3817,2971,2117,1744],function(){return e(e.s=76227)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8037],{76227:function(e,t,r){Promise.resolve().then(r.bind(r,11314))},79205:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(2265);let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:u,className:o="",children:d,iconNode:c,...f}=e;return(0,n.createElement)("svg",{ref:t,...a,width:s,height:s,stroke:r,strokeWidth:u?24*Number(i)/Number(s):i,className:l("lucide",o),...f},[...c.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),u=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:u,...o}=r;return(0,n.createElement)(i,{ref:a,iconNode:t,className:l("lucide-".concat(s(e)),u),...o})});return r.displayName="".concat(e),r}},51817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},29090:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]])},47692:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},11314:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return C}});var n=r(57437);r(2265);var s=r(69174),l=r(96246),a=r(99397),i=r(45675),u=r(18930),o=r(42208),d=r(29090),c=r(47692),f=r(92735),m=r(17689),x=r(71096),p=r.n(x),h=r(45721),v=r.n(h),N=r(72337);p().extend(v());let w=e=>{let t=(null==e?void 0:e.toLowerCase())||"";return t.includes("create")||t.includes("insert")?(0,n.jsx)(a.Z,{className:"h-4 w-4 text-green-500"}):t.includes("update")||t.includes("edit")?(0,n.jsx)(i.Z,{className:"h-4 w-4 text-blue-500"}):t.includes("delete")||t.includes("remove")?(0,n.jsx)(u.Z,{className:"h-4 w-4 text-red-500"}):t.includes("read")||t.includes("view")||t.includes("get")?(0,n.jsx)(o.Z,{className:"h-4 w-4 text-gray-500"}):t.includes("login")||t.includes("signin")?(0,n.jsx)(d.Z,{className:"h-4 w-4 text-green-500"}):t.includes("logout")||t.includes("signout")?(0,n.jsx)(c.Z,{className:"h-4 w-4 text-orange-500"}):t.includes("export")?(0,n.jsx)(f.Z,{className:"h-4 w-4 text-purple-500"}):t.includes("import")?(0,n.jsx)(m.Z,{className:"h-4 w-4 text-purple-500"}):(0,n.jsx)(o.Z,{className:"h-4 w-4 text-gray-500"})},g=e=>{let t=(null==e?void 0:e.toLowerCase())||"";return t.includes("create")||t.includes("insert")?"default":t.includes("delete")||t.includes("remove")?"destructive":"secondary"},y=e=>{var t,r,n,s;return(null===(t=e.user)||void 0===t?void 0:t.fullName)?e.user.fullName:(null===(r=e.user)||void 0===r?void 0:r.firstName)&&(null===(n=e.user)||void 0===n?void 0:n.lastName)?"".concat(e.user.firstName," ").concat(e.user.lastName):(null===(s=e.user)||void 0===s?void 0:s.email)?e.user.email:e.userId||"System"},j=e=>{let t=y(e);if("System"===t)return"S";let r=t.split(" ");return r.length>=2?(r[0][0]+r[1][0]).toUpperCase():t.substring(0,2).toUpperCase()},b=()=>(0,n.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,n.jsx)(N.DataBrowserInner,{selectedCollection:"baasix_AuditLog",title:"Activity Log",enableSearch:!0,enableFilters:!0,enableCreate:!1,enableView:!0,enableEdit:!1,enableDelete:!1,enableExport:!0,enableImport:!1,enableBulkSelect:!1,enableColumnSettings:!0,defaultSorters:[{field:"createdAt",order:"desc"}],defaultVisibleColumns:["user","action","entity","entityId","createdAt","ipaddress"],defaultMeta:{fields:["*","user.*"]},customColumnRenderers:{user:(e,t)=>{var r;return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.qE,{className:"h-8 w-8",children:(0,n.jsx)(l.Q5,{className:"text-xs",children:j(t)})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-sm font-medium",children:y(t)}),(null===(r=t.user)||void 0===r?void 0:r.email)&&(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:t.user.email})]})]})},action:e=>(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[w(e),(0,n.jsx)(s.C,{variant:g(e),children:e})]}),entity:e=>(0,n.jsx)(s.C,{variant:"outline",children:e}),entityId:e=>e?(0,n.jsx)("span",{className:"font-mono text-xs truncate max-w-[100px] inline-block",children:e}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"-"}),createdAt:e=>(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-sm",children:p()(e).format("MMM D, YYYY")}),(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:[p()(e).format("h:mm A")," • ",p()(e).fromNow()]})]}),ipaddress:e=>(0,n.jsx)("span",{className:"text-muted-foreground font-mono text-xs",children:e||"-"})}})});function C(){return(0,n.jsx)(b,{})}},96246:function(e,t,r){"use strict";r.d(t,{F$:function(){return u},Q5:function(){return o},qE:function(){return i}});var n=r(57437),s=r(2265),l=r(27954),a=r(93448);let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(l.fC,{ref:t,className:(0,a.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r),...s})});i.displayName=l.fC.displayName;let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(l.Ee,{ref:t,className:(0,a.cn)("aspect-square h-full w-full",r),...s})});u.displayName=l.Ee.displayName;let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(l.NY,{ref:t,className:(0,a.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",r),...s})});o.displayName=l.NY.displayName},27954:function(e,t,r){"use strict";r.d(t,{NY:function(){return C},Ee:function(){return b},fC:function(){return j}});var n=r(2265),s=r(57437),l=r(26606),a=r(61188);r(54887);var i=r(37053),u=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,i.Z8)(`Primitive.${t}`),l=n.forwardRef((e,n)=>{let{asChild:l,...a}=e,i=l?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(i,{...a,ref:n})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{}),o=r(82558);function d(){return()=>{}}var c="Avatar",[f,m]=function(e,t=[]){let r=[],l=()=>{let t=r.map(e=>n.createContext(e));return function(r){let s=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:s}}),[r,s])}};return l.scopeName=e,[function(t,l){let a=n.createContext(l);a.displayName=t+"Context";let i=r.length;r=[...r,l];let u=t=>{let{scope:r,children:l,...u}=t,o=r?.[e]?.[i]||a,d=n.useMemo(()=>u,Object.values(u));return(0,s.jsx)(o.Provider,{value:d,children:l})};return u.displayName=t+"Provider",[u,function(r,s){let u=s?.[e]?.[i]||a,o=n.useContext(u);if(o)return o;if(void 0!==l)return l;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let s=r.reduce((t,{useScope:r,scopeName:n})=>{let s=r(e)[`__scope${n}`];return{...t,...s}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}(l,...t)]}(c),[x,p]=f(c),h=n.forwardRef((e,t)=>{let{__scopeAvatar:r,...l}=e,[a,i]=n.useState("idle");return(0,s.jsx)(x,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:(0,s.jsx)(u.span,{...l,ref:t})})});h.displayName=c;var v="AvatarImage",N=n.forwardRef((e,t)=>{let{__scopeAvatar:r,src:i,onLoadingStatusChange:c=()=>{},...f}=e,m=p(v,r),x=function(e,t){let{referrerPolicy:r,crossOrigin:s}=t,l=(0,o.useSyncExternalStore)(d,()=>!0,()=>!1),i=n.useRef(null),u=l?(i.current||(i.current=new window.Image),i.current):null,[c,f]=n.useState(()=>y(u,e));return(0,a.b)(()=>{f(y(u,e))},[u,e]),(0,a.b)(()=>{let e=e=>()=>{f(e)};if(!u)return;let t=e("loaded"),n=e("error");return u.addEventListener("load",t),u.addEventListener("error",n),r&&(u.referrerPolicy=r),"string"==typeof s&&(u.crossOrigin=s),()=>{u.removeEventListener("load",t),u.removeEventListener("error",n)}},[u,s,r]),c}(i,f),h=(0,l.W)(e=>{c(e),m.onImageLoadingStatusChange(e)});return(0,a.b)(()=>{"idle"!==x&&h(x)},[x,h]),"loaded"===x?(0,s.jsx)(u.img,{...f,ref:t,src:i}):null});N.displayName=v;var w="AvatarFallback",g=n.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:l,...a}=e,i=p(w,r),[o,d]=n.useState(void 0===l);return n.useEffect(()=>{if(void 0!==l){let e=window.setTimeout(()=>d(!0),l);return()=>window.clearTimeout(e)}},[l]),o&&"loaded"!==i.imageLoadingStatus?(0,s.jsx)(u.span,{...a,ref:t}):null});function y(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}g.displayName=w;var j=h,b=N,C=g}},function(e){e.O(0,[7999,3572,7902,5094,4438,6530,4475,6241,926,600,2676,1509,1668,9487,6869,1783,9881,7324,9124,6712,6547,489,1303,3817,2971,2117,1744],function(){return e(e.s=76227)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[253],{44885:function(e,t,r){Promise.resolve().then(r.bind(r,26681))},79205:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(2265);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:u,iconNode:d,...m}=e;return(0,n.createElement)("svg",{ref:t,...s,width:a,height:a,stroke:r,strokeWidth:o?24*Number(i)/Number(a):i,className:l("lucide",c),...m},[...d.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),o=(e,t)=>{let r=(0,n.forwardRef)((r,s)=>{let{className:o,...c}=r;return(0,n.createElement)(i,{ref:s,iconNode:t,className:l("lucide-".concat(a(e)),o),...c})});return r.displayName="".concat(e),r}},51817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},26681:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(57437);r(2265);var a=r(69174),l=r(89345),s=r(71096),i=r.n(s),o=r(72337);let c=()=>(0,n.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,n.jsx)(o.DataBrowserInner,{selectedCollection:"baasix_EmailLog",title:"Email Log",enableSearch:!0,enableFilters:!0,enableCreate:!1,enableView:!0,enableEdit:!1,enableDelete:!1,enableExport:!0,enableImport:!1,enableBulkSelect:!1,enableColumnSettings:!0,defaultSorters:[{field:"createdAt",order:"desc"}],defaultVisibleColumns:["id","email","subject","templateName","createdAt"],customColumnRenderers:{id:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e}),email:e=>(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,n.jsx)("span",{children:e})]}),subject:e=>(0,n.jsx)("span",{className:"truncate max-w-[300px] inline-block",children:e}),templateName:e=>e?(0,n.jsx)(a.C,{variant:"outline",children:e}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"-"}),createdAt:e=>(0,n.jsx)("span",{className:"text-muted-foreground",children:i()(e).format("MMM D, YYYY h:mm A")})}})});function u(){return(0,n.jsx)(c,{})}}},function(e){e.O(0,[7999,3572,7902,5094,4438,6530,4475,6241,926,600,2676,1509,1668,9487,7636,1783,9881,7324,9124,6712,6547,489,1303,3817,2971,2117,1744],function(){return e(e.s=44885)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[253],{44885:function(e,t,r){Promise.resolve().then(r.bind(r,26681))},79205:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(2265);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:u,iconNode:d,...m}=e;return(0,n.createElement)("svg",{ref:t,...s,width:a,height:a,stroke:r,strokeWidth:o?24*Number(i)/Number(a):i,className:l("lucide",c),...m},[...d.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),o=(e,t)=>{let r=(0,n.forwardRef)((r,s)=>{let{className:o,...c}=r;return(0,n.createElement)(i,{ref:s,iconNode:t,className:l("lucide-".concat(a(e)),o),...c})});return r.displayName="".concat(e),r}},51817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},26681:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(57437);r(2265);var a=r(69174),l=r(89345),s=r(71096),i=r.n(s),o=r(72337);let c=()=>(0,n.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,n.jsx)(o.DataBrowserInner,{selectedCollection:"baasix_EmailLog",title:"Email Log",enableSearch:!0,enableFilters:!0,enableCreate:!1,enableView:!0,enableEdit:!1,enableDelete:!1,enableExport:!0,enableImport:!1,enableBulkSelect:!1,enableColumnSettings:!0,defaultSorters:[{field:"createdAt",order:"desc"}],defaultVisibleColumns:["id","email","subject","templateName","createdAt"],customColumnRenderers:{id:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e}),email:e=>(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,n.jsx)("span",{children:e})]}),subject:e=>(0,n.jsx)("span",{className:"truncate max-w-[300px] inline-block",children:e}),templateName:e=>e?(0,n.jsx)(a.C,{variant:"outline",children:e}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"-"}),createdAt:e=>(0,n.jsx)("span",{className:"text-muted-foreground",children:i()(e).format("MMM D, YYYY h:mm A")})}})});function u(){return(0,n.jsx)(c,{})}}},function(e){e.O(0,[7999,3572,7902,5094,4438,6530,4475,6241,926,600,2676,1509,1668,9487,6869,1783,9881,7324,9124,6712,6547,489,1303,3817,2971,2117,1744],function(){return e(e.s=44885)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[619],{84898:function(e,t,n){Promise.resolve().then(n.bind(n,31295))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2265);let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:s="",children:d,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...o,width:l,height:l,stroke:n,strokeWidth:a?24*Number(i)/Number(l):i,className:u("lucide",s),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),a=(e,t)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:a,...s}=n;return(0,r.createElement)(i,{ref:o,iconNode:t,className:u("lucide-".concat(l(e)),a),...s})});return n.displayName="".concat(e),n}},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return l.a}});var r=n(55775),l=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let r=n(47043);n(57437),n(2265);let l=r._(n(15602));function u(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let u={...r,...t};return(0,l.default)({...u,modules:null==(n=u.loadableGenerated)?void 0:n.modules})}("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)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(18993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(57437),l=n(2265),u=n(81523),o=n(70049);function i(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},s=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(i)),s=t.loading;function d(e){let i=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,a=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(o.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(u.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(l.Suspense,{fallback:i,children:a})}return d.displayName="LoadableComponent",d}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return u}});let r=n(57437),l=n(20544);function u(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),u=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));u.push(...t)}}return 0===u.length?null:(0,r.jsx)(r.Fragment,{children:u.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},31295:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(57437);n(2265);var l=n(30166),u=n(51817);function o(){return(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(u.Z,{className:"h-8 w-8 animate-spin"})})}let i=(0,l.default)(()=>Promise.all([n.e(7999),n.e(3572),n.e(7902),n.e(5094),n.e(4438),n.e(6530),n.e(4475),n.e(6241),n.e(926),n.e(600),n.e(2676),n.e(1509),n.e(1668),n.e(9487),n.e(7636),n.e(1783),n.e(9881),n.e(7324),n.e(9124),n.e(6712),n.e(6547),n.e(489),n.e(1303),n.e(3817)]).then(n.bind(n,72337)).then(e=>e.DataBrowserInner),{loadableGenerated:{webpack:()=>[72337]},ssr:!1,loading:()=>(0,r.jsx)(o,{})});function a(){return(0,r.jsx)(i,{selectedCollection:"baasix_Notification",title:"Notifications",enableView:!0,defaultVisibleColumns:["type","title","message","user","seen","createdAt"]})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=84898)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[619],{84898:function(e,t,n){Promise.resolve().then(n.bind(n,31295))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2265);let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:s="",children:d,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...o,width:l,height:l,stroke:n,strokeWidth:a?24*Number(i)/Number(l):i,className:u("lucide",s),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),a=(e,t)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:a,...s}=n;return(0,r.createElement)(i,{ref:o,iconNode:t,className:u("lucide-".concat(l(e)),a),...s})});return n.displayName="".concat(e),n}},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return l.a}});var r=n(55775),l=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let r=n(47043);n(57437),n(2265);let l=r._(n(15602));function u(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let u={...r,...t};return(0,l.default)({...u,modules:null==(n=u.loadableGenerated)?void 0:n.modules})}("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)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(18993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(57437),l=n(2265),u=n(81523),o=n(70049);function i(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},s=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(i)),s=t.loading;function d(e){let i=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,a=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(o.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(u.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(l.Suspense,{fallback:i,children:a})}return d.displayName="LoadableComponent",d}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return u}});let r=n(57437),l=n(20544);function u(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),u=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));u.push(...t)}}return 0===u.length?null:(0,r.jsx)(r.Fragment,{children:u.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},31295:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(57437);n(2265);var l=n(30166),u=n(51817);function o(){return(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(u.Z,{className:"h-8 w-8 animate-spin"})})}let i=(0,l.default)(()=>Promise.all([n.e(7999),n.e(3572),n.e(7902),n.e(5094),n.e(4438),n.e(6530),n.e(4475),n.e(6241),n.e(926),n.e(600),n.e(2676),n.e(1509),n.e(1668),n.e(9487),n.e(6869),n.e(1783),n.e(9881),n.e(7324),n.e(9124),n.e(6712),n.e(6547),n.e(489),n.e(1303),n.e(3817)]).then(n.bind(n,72337)).then(e=>e.DataBrowserInner),{loadableGenerated:{webpack:()=>[72337]},ssr:!1,loading:()=>(0,r.jsx)(o,{})});function a(){return(0,r.jsx)(i,{selectedCollection:"baasix_Notification",title:"Notifications",enableView:!0,defaultVisibleColumns:["type","title","message","user","seen","createdAt"]})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=84898)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2170],{70375:function(e,t,n){Promise.resolve().then(n.bind(n,11520))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2265);let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:d,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...o,width:l,height:l,stroke:n,strokeWidth:s?24*Number(i)/Number(l):i,className:u("lucide",a),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),s=(e,t)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:s,...a}=n;return(0,r.createElement)(i,{ref:o,iconNode:t,className:u("lucide-".concat(l(e)),s),...a})});return n.displayName="".concat(e),n}},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return l.a}});var r=n(55775),l=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let r=n(47043);n(57437),n(2265);let l=r._(n(15602));function u(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let u={...r,...t};return(0,l.default)({...u,modules:null==(n=u.loadableGenerated)?void 0:n.modules})}("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)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(18993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(57437),l=n(2265),u=n(81523),o=n(70049);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},a=function(e){let t={...s,...e},n=(0,l.lazy)(()=>t.loader().then(i)),a=t.loading;function d(e){let i=a?(0,r.jsx)(a,{isLoading:!0,pastDelay:!0,error:null}):null,s=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(o.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(u.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(l.Suspense,{fallback:i,children:s})}return d.displayName="LoadableComponent",d}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return u}});let r=n(57437),l=n(20544);function u(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),u=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));u.push(...t)}}return 0===u.length?null:(0,r.jsx)(r.Fragment,{children:u.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},11520:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(57437);n(2265);var l=n(30166),u=n(51817);function o(){return(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(u.Z,{className:"h-8 w-8 animate-spin"})})}let i=(0,l.default)(()=>Promise.all([n.e(7999),n.e(3572),n.e(7902),n.e(5094),n.e(4438),n.e(6530),n.e(4475),n.e(6241),n.e(926),n.e(600),n.e(2676),n.e(1509),n.e(1668),n.e(9487),n.e(7636),n.e(1783),n.e(9881),n.e(7324),n.e(9124),n.e(6712),n.e(6547),n.e(489),n.e(1303),n.e(3817)]).then(n.bind(n,72337)).then(e=>e.DataBrowserInner),{loadableGenerated:{webpack:()=>[72337]},ssr:!1,loading:()=>(0,r.jsx)(o,{})});function s(){return(0,r.jsx)(i,{selectedCollection:"baasix_Sessions",title:"Sessions",enableView:!0,defaultVisibleColumns:["user","type","ipAddress","expiresAt","createdAt"]})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=70375)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2170],{70375:function(e,t,n){Promise.resolve().then(n.bind(n,11520))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2265);let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:d,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...o,width:l,height:l,stroke:n,strokeWidth:s?24*Number(i)/Number(l):i,className:u("lucide",a),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),s=(e,t)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:s,...a}=n;return(0,r.createElement)(i,{ref:o,iconNode:t,className:u("lucide-".concat(l(e)),s),...a})});return n.displayName="".concat(e),n}},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return l.a}});var r=n(55775),l=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let r=n(47043);n(57437),n(2265);let l=r._(n(15602));function u(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let u={...r,...t};return(0,l.default)({...u,modules:null==(n=u.loadableGenerated)?void 0:n.modules})}("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)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(18993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(57437),l=n(2265),u=n(81523),o=n(70049);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},a=function(e){let t={...s,...e},n=(0,l.lazy)(()=>t.loader().then(i)),a=t.loading;function d(e){let i=a?(0,r.jsx)(a,{isLoading:!0,pastDelay:!0,error:null}):null,s=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(o.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(u.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(l.Suspense,{fallback:i,children:s})}return d.displayName="LoadableComponent",d}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return u}});let r=n(57437),l=n(20544);function u(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),u=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));u.push(...t)}}return 0===u.length?null:(0,r.jsx)(r.Fragment,{children:u.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},11520:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r=n(57437);n(2265);var l=n(30166),u=n(51817);function o(){return(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(u.Z,{className:"h-8 w-8 animate-spin"})})}let i=(0,l.default)(()=>Promise.all([n.e(7999),n.e(3572),n.e(7902),n.e(5094),n.e(4438),n.e(6530),n.e(4475),n.e(6241),n.e(926),n.e(600),n.e(2676),n.e(1509),n.e(1668),n.e(9487),n.e(6869),n.e(1783),n.e(9881),n.e(7324),n.e(9124),n.e(6712),n.e(6547),n.e(489),n.e(1303),n.e(3817)]).then(n.bind(n,72337)).then(e=>e.DataBrowserInner),{loadableGenerated:{webpack:()=>[72337]},ssr:!1,loading:()=>(0,r.jsx)(o,{})});function s(){return(0,r.jsx)(i,{selectedCollection:"baasix_Sessions",title:"Sessions",enableView:!0,defaultVisibleColumns:["user","type","ipAddress","expiresAt","createdAt"]})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=70375)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6242],{15091:function(e,t,n){Promise.resolve().then(n.bind(n,18346))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2265);let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var u={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:s="",children:d,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...u,width:l,height:l,stroke:n,strokeWidth:a?24*Number(i)/Number(l):i,className:o("lucide",s),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),a=(e,t)=>{let n=(0,r.forwardRef)((n,u)=>{let{className:a,...s}=n;return(0,r.createElement)(i,{ref:u,iconNode:t,className:o("lucide-".concat(l(e)),a),...s})});return n.displayName="".concat(e),n}},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return l.a}});var r=n(55775),l=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(47043);n(57437),n(2265);let l=r._(n(15602));function o(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,l.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("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)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(18993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(57437),l=n(2265),o=n(81523),u=n(70049);function i(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},s=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(i)),s=t.loading;function d(e){let i=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,a=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(u.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(l.Suspense,{fallback:i,children:a})}return d.displayName="LoadableComponent",d}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let r=n(57437),l=n(20544);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,r.jsx)(r.Fragment,{children:o.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},18346:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(57437);n(2265);var l=n(30166),o=n(51817);function u(){return(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(o.Z,{className:"h-8 w-8 animate-spin"})})}let i=(0,l.default)(()=>Promise.all([n.e(7999),n.e(3572),n.e(7902),n.e(5094),n.e(4438),n.e(6530),n.e(4475),n.e(6241),n.e(926),n.e(600),n.e(2676),n.e(1509),n.e(1668),n.e(9487),n.e(7636),n.e(1783),n.e(9881),n.e(7324),n.e(9124),n.e(6712),n.e(6547),n.e(489),n.e(1303),n.e(3817)]).then(n.bind(n,72337)).then(e=>e.DataBrowserInner),{loadableGenerated:{webpack:()=>[72337]},ssr:!1,loading:()=>(0,r.jsx)(u,{})});function a(){return(0,r.jsx)(i,{selectedCollection:"baasix_WorkflowExecution",title:"Workflow Executions",enableView:!0,defaultVisibleColumns:["workflow","status","triggered_by","startedAt","completedAt","durationMs"]})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=15091)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6242],{15091:function(e,t,n){Promise.resolve().then(n.bind(n,18346))},79205:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2265);let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var u={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:s="",children:d,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...u,width:l,height:l,stroke:n,strokeWidth:a?24*Number(i)/Number(l):i,className:o("lucide",s),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),a=(e,t)=>{let n=(0,r.forwardRef)((n,u)=>{let{className:a,...s}=n;return(0,r.createElement)(i,{ref:u,iconNode:t,className:o("lucide-".concat(l(e)),a),...s})});return n.displayName="".concat(e),n}},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return l.a}});var r=n(55775),l=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(47043);n(57437),n(2265);let l=r._(n(15602));function o(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,l.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("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)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(18993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(57437),l=n(2265),o=n(81523),u=n(70049);function i(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},s=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(i)),s=t.loading;function d(e){let i=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,a=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(u.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(l.Suspense,{fallback:i,children:a})}return d.displayName="LoadableComponent",d}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let r=n(57437),l=n(20544);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,r.jsx)(r.Fragment,{children:o.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},18346:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(57437);n(2265);var l=n(30166),o=n(51817);function u(){return(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(o.Z,{className:"h-8 w-8 animate-spin"})})}let i=(0,l.default)(()=>Promise.all([n.e(7999),n.e(3572),n.e(7902),n.e(5094),n.e(4438),n.e(6530),n.e(4475),n.e(6241),n.e(926),n.e(600),n.e(2676),n.e(1509),n.e(1668),n.e(9487),n.e(6869),n.e(1783),n.e(9881),n.e(7324),n.e(9124),n.e(6712),n.e(6547),n.e(489),n.e(1303),n.e(3817)]).then(n.bind(n,72337)).then(e=>e.DataBrowserInner),{loadableGenerated:{webpack:()=>[72337]},ssr:!1,loading:()=>(0,r.jsx)(u,{})});function a(){return(0,r.jsx)(i,{selectedCollection:"baasix_WorkflowExecution",title:"Workflow Executions",enableView:!0,defaultVisibleColumns:["workflow","status","triggered_by","startedAt","completedAt","durationMs"]})}}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=15091)}),_N_E=e.O()}]);