@sonicjs-cms/core 3.0.0-beta.7 → 3.0.0-beta.8

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 (73) hide show
  1. package/dist/{filter-bar.template-DlVYMk-T.d.cts → admin-layout-catalyst.template-DrwDUfsE.d.cts} +25 -1
  2. package/dist/{filter-bar.template-DlVYMk-T.d.ts → admin-layout-catalyst.template-DrwDUfsE.d.ts} +25 -1
  3. package/dist/{chunk-LH7RKNUW.js → chunk-3AI73SGI.js} +10 -10
  4. package/dist/{chunk-LH7RKNUW.js.map → chunk-3AI73SGI.js.map} +1 -1
  5. package/dist/{chunk-BDDABDAB.cjs → chunk-4BTBSXMR.cjs} +2 -239
  6. package/dist/chunk-4BTBSXMR.cjs.map +1 -0
  7. package/dist/{chunk-POGSN5WI.js → chunk-4R2C35OT.js} +3 -3
  8. package/dist/{chunk-POGSN5WI.js.map → chunk-4R2C35OT.js.map} +1 -1
  9. package/dist/{chunk-WACUJVXY.cjs → chunk-7O443QPZ.cjs} +57 -11
  10. package/dist/chunk-7O443QPZ.cjs.map +1 -0
  11. package/dist/{chunk-XCPIXYOP.js → chunk-DF4YK3JX.js} +4 -4
  12. package/dist/{chunk-XCPIXYOP.js.map → chunk-DF4YK3JX.js.map} +1 -1
  13. package/dist/{chunk-WJTMTIYR.js → chunk-DNQYNBD5.js} +255 -3
  14. package/dist/chunk-DNQYNBD5.js.map +1 -0
  15. package/dist/{chunk-2RJDEVB3.cjs → chunk-GVGURCFM.cjs} +2 -2
  16. package/dist/{chunk-2RJDEVB3.cjs.map → chunk-GVGURCFM.cjs.map} +1 -1
  17. package/dist/{chunk-BYCBFBUG.js → chunk-HKF5IYA2.js} +2 -2
  18. package/dist/{chunk-BYCBFBUG.js.map → chunk-HKF5IYA2.js.map} +1 -1
  19. package/dist/{chunk-OECDF2RF.cjs → chunk-MJ63JSTU.cjs} +258 -2
  20. package/dist/chunk-MJ63JSTU.cjs.map +1 -0
  21. package/dist/{chunk-ISIRU7AK.cjs → chunk-OWNSD75H.cjs} +4 -4
  22. package/dist/{chunk-ISIRU7AK.cjs.map → chunk-OWNSD75H.cjs.map} +1 -1
  23. package/dist/{chunk-ZEZ245PW.js → chunk-RQ6N3FTV.js} +3 -236
  24. package/dist/chunk-RQ6N3FTV.js.map +1 -0
  25. package/dist/{chunk-GO2NICMM.cjs → chunk-TKIBLXSL.cjs} +237 -237
  26. package/dist/{chunk-GO2NICMM.cjs.map → chunk-TKIBLXSL.cjs.map} +1 -1
  27. package/dist/{chunk-GVHST4D7.js → chunk-VQJVZANG.js} +50 -4
  28. package/dist/chunk-VQJVZANG.js.map +1 -0
  29. package/dist/{chunk-2JOMHEKO.js → chunk-WNAFRK7Q.js} +3 -3
  30. package/dist/{chunk-2JOMHEKO.js.map → chunk-WNAFRK7Q.js.map} +1 -1
  31. package/dist/{chunk-5QVYEAVV.cjs → chunk-XXNQTYXA.cjs} +10 -10
  32. package/dist/{chunk-5QVYEAVV.cjs.map → chunk-XXNQTYXA.cjs.map} +1 -1
  33. package/dist/{chunk-7RY3YKI7.cjs → chunk-YAKNRVAB.cjs} +3 -3
  34. package/dist/{chunk-7RY3YKI7.cjs.map → chunk-YAKNRVAB.cjs.map} +1 -1
  35. package/dist/index.cjs +264 -260
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +2 -1
  38. package/dist/index.d.ts +2 -1
  39. package/dist/index.js +17 -16
  40. package/dist/index.js.map +1 -1
  41. package/dist/middleware.cjs +33 -32
  42. package/dist/middleware.js +4 -3
  43. package/dist/migrations-6DQKC3RK.cjs +13 -0
  44. package/dist/{migrations-TBEFSZIV.cjs.map → migrations-6DQKC3RK.cjs.map} +1 -1
  45. package/dist/migrations-CCMGRLSD.js +4 -0
  46. package/dist/{migrations-IEWABLIP.js.map → migrations-CCMGRLSD.js.map} +1 -1
  47. package/dist/plugins.cjs +40 -40
  48. package/dist/plugins.js +3 -3
  49. package/dist/routes.cjs +28 -28
  50. package/dist/routes.js +8 -8
  51. package/dist/services.cjs +42 -42
  52. package/dist/services.d.cts +14 -1
  53. package/dist/services.d.ts +14 -1
  54. package/dist/services.js +3 -3
  55. package/dist/{telemetry-B9vIV4wh.d.cts → telemetry-Cku1ax74.d.cts} +1 -1
  56. package/dist/{telemetry-B9vIV4wh.d.ts → telemetry-Cku1ax74.d.ts} +1 -1
  57. package/dist/templates.d.cts +2 -24
  58. package/dist/templates.d.ts +2 -24
  59. package/dist/types.d.cts +1 -1
  60. package/dist/types.d.ts +1 -1
  61. package/dist/utils.cjs +8 -8
  62. package/dist/utils.d.cts +1 -1
  63. package/dist/utils.d.ts +1 -1
  64. package/dist/utils.js +2 -2
  65. package/package.json +1 -1
  66. package/dist/chunk-BDDABDAB.cjs.map +0 -1
  67. package/dist/chunk-GVHST4D7.js.map +0 -1
  68. package/dist/chunk-OECDF2RF.cjs.map +0 -1
  69. package/dist/chunk-WACUJVXY.cjs.map +0 -1
  70. package/dist/chunk-WJTMTIYR.js.map +0 -1
  71. package/dist/chunk-ZEZ245PW.js.map +0 -1
  72. package/dist/migrations-IEWABLIP.js +0 -4
  73. package/dist/migrations-TBEFSZIV.cjs +0 -13
package/dist/index.cjs CHANGED
@@ -1,27 +1,27 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkNUKJ54GA_cjs = require('./chunk-NUKJ54GA.cjs');
4
- var chunkGO2NICMM_cjs = require('./chunk-GO2NICMM.cjs');
4
+ var chunkTKIBLXSL_cjs = require('./chunk-TKIBLXSL.cjs');
5
5
  require('./chunk-HIKBY7MS.cjs');
6
6
  require('./chunk-DNQCEKUK.cjs');
7
- var chunkBDDABDAB_cjs = require('./chunk-BDDABDAB.cjs');
7
+ var chunk4BTBSXMR_cjs = require('./chunk-4BTBSXMR.cjs');
8
8
  var chunkYA3TJ65D_cjs = require('./chunk-YA3TJ65D.cjs');
9
9
  var chunkYP7GW2G5_cjs = require('./chunk-YP7GW2G5.cjs');
10
- var chunkWACUJVXY_cjs = require('./chunk-WACUJVXY.cjs');
10
+ var chunk7O443QPZ_cjs = require('./chunk-7O443QPZ.cjs');
11
11
  var chunk2CB4KY7I_cjs = require('./chunk-2CB4KY7I.cjs');
12
12
  var chunkJEQ7FLOD_cjs = require('./chunk-JEQ7FLOD.cjs');
13
- var chunkOECDF2RF_cjs = require('./chunk-OECDF2RF.cjs');
14
- var chunk2RJDEVB3_cjs = require('./chunk-2RJDEVB3.cjs');
13
+ var chunkMJ63JSTU_cjs = require('./chunk-MJ63JSTU.cjs');
14
+ var chunkGVGURCFM_cjs = require('./chunk-GVGURCFM.cjs');
15
15
  var chunkWULONYGB_cjs = require('./chunk-WULONYGB.cjs');
16
16
  var chunkMVIZJOO5_cjs = require('./chunk-MVIZJOO5.cjs');
17
17
  var chunkNAVPFIG5_cjs = require('./chunk-NAVPFIG5.cjs');
18
- var chunk5QVYEAVV_cjs = require('./chunk-5QVYEAVV.cjs');
19
- var chunkISIRU7AK_cjs = require('./chunk-ISIRU7AK.cjs');
18
+ var chunkXXNQTYXA_cjs = require('./chunk-XXNQTYXA.cjs');
19
+ var chunkOWNSD75H_cjs = require('./chunk-OWNSD75H.cjs');
20
20
  var chunkJ6JTWD2A_cjs = require('./chunk-J6JTWD2A.cjs');
21
21
  var chunkIXUHXTHW_cjs = require('./chunk-IXUHXTHW.cjs');
22
- require('./chunk-P3XDZL6Q.cjs');
23
22
  var chunkRCQ2HIQD_cjs = require('./chunk-RCQ2HIQD.cjs');
24
- var chunk7RY3YKI7_cjs = require('./chunk-7RY3YKI7.cjs');
23
+ require('./chunk-P3XDZL6Q.cjs');
24
+ var chunkYAKNRVAB_cjs = require('./chunk-YAKNRVAB.cjs');
25
25
  var chunkMNWKYY5E_cjs = require('./chunk-MNWKYY5E.cjs');
26
26
  var chunkQTFKZBLC_cjs = require('./chunk-QTFKZBLC.cjs');
27
27
  require('./chunk-IGJUBJBW.cjs');
@@ -573,7 +573,7 @@ function formatCellValue(value) {
573
573
  // src/plugins/core-plugins/database-tools-plugin/admin-routes.ts
574
574
  function createDatabaseToolsAdminRoutes() {
575
575
  const router3 = new hono.Hono();
576
- router3.use("*", chunkWACUJVXY_cjs.requireAuth());
576
+ router3.use("*", chunk7O443QPZ_cjs.requireAuth());
577
577
  router3.get("/api/stats", async (c) => {
578
578
  try {
579
579
  const user = c.get("user");
@@ -926,7 +926,7 @@ var SiteConfigService = class {
926
926
  this.env = env;
927
927
  }
928
928
  async load() {
929
- const settings = new chunkBDDABDAB_cjs.SettingsService(this.db);
929
+ const settings = new chunk4BTBSXMR_cjs.SettingsService(this.db);
930
930
  const general = await settings.getGeneralSettings();
931
931
  const siteUrl = this.env.PUBLIC_URL || "http://localhost:8787";
932
932
  return {
@@ -976,7 +976,7 @@ var SiteConfigService = class {
976
976
 
977
977
  // src/plugins/core-plugins/email-plugin/routes/admin.ts
978
978
  var adminRoutes = new hono.Hono();
979
- adminRoutes.use("*", chunkWACUJVXY_cjs.requireAuth());
979
+ adminRoutes.use("*", chunk7O443QPZ_cjs.requireAuth());
980
980
  adminRoutes.post("/settings", async (c) => {
981
981
  if (c.get("user")?.role !== "admin") {
982
982
  return c.json({ error: "admin role required" }, 403);
@@ -1014,7 +1014,7 @@ adminRoutes.post("/test", async (c) => {
1014
1014
  const { subject, html: html4, text } = renderTestEmail({ siteName });
1015
1015
  try {
1016
1016
  const settingsLoaded = await settings.load();
1017
- const result = await chunkGO2NICMM_cjs.getEmailService().send({
1017
+ const result = await chunkTKIBLXSL_cjs.getEmailService().send({
1018
1018
  to,
1019
1019
  subject,
1020
1020
  html: html4,
@@ -1096,7 +1096,7 @@ function makeOnRegistrationCompleted(env) {
1096
1096
  siteName,
1097
1097
  loginUrl: siteConfig.buildLoginUrl(siteUrl)
1098
1098
  });
1099
- const result = await chunkGO2NICMM_cjs.getEmailService().send({
1099
+ const result = await chunkTKIBLXSL_cjs.getEmailService().send({
1100
1100
  to: user.email,
1101
1101
  subject,
1102
1102
  html: html4,
@@ -1170,7 +1170,7 @@ function makeOnPasswordResetRequested(env) {
1170
1170
  expiresAt: Date.now() + DEFAULT_EXPIRY_MS,
1171
1171
  siteName
1172
1172
  });
1173
- const result = await chunkGO2NICMM_cjs.getEmailService().send({
1173
+ const result = await chunkTKIBLXSL_cjs.getEmailService().send({
1174
1174
  to: user.email,
1175
1175
  subject,
1176
1176
  html: html4,
@@ -1238,7 +1238,7 @@ function makeOnPasswordResetCompleted(env) {
1238
1238
  supportEmail,
1239
1239
  when: Date.now()
1240
1240
  });
1241
- const result = await chunkGO2NICMM_cjs.getEmailService().send({
1241
+ const result = await chunkTKIBLXSL_cjs.getEmailService().send({
1242
1242
  to: user.email,
1243
1243
  subject,
1244
1244
  html: html4,
@@ -1970,7 +1970,7 @@ var CloudflareEmailProvider = class {
1970
1970
  }
1971
1971
  }
1972
1972
  };
1973
- var emailPluginV3 = chunkISIRU7AK_cjs.definePlugin({
1973
+ var emailPluginV3 = chunkOWNSD75H_cjs.definePlugin({
1974
1974
  id: "email",
1975
1975
  version: "1.0.0",
1976
1976
  name: "Email",
@@ -1984,7 +1984,7 @@ var emailPluginV3 = chunkISIRU7AK_cjs.definePlugin({
1984
1984
  const db = env.DB;
1985
1985
  if (db) {
1986
1986
  try {
1987
- const typeRegistry = new chunkWACUJVXY_cjs.DocumentTypeRegistry(db);
1987
+ const typeRegistry = new chunk7O443QPZ_cjs.DocumentTypeRegistry(db);
1988
1988
  await typeRegistry.register({
1989
1989
  id: "email_log",
1990
1990
  name: "email_log",
@@ -1999,7 +1999,7 @@ var emailPluginV3 = chunkISIRU7AK_cjs.definePlugin({
1999
1999
  } catch {
2000
2000
  }
2001
2001
  }
2002
- if (!chunkGO2NICMM_cjs.hasEmailService()) {
2002
+ if (!chunkTKIBLXSL_cjs.hasEmailService()) {
2003
2003
  const settings = db ? await new EmailSettingsService(db).load() : {};
2004
2004
  const envResendKey = typeof env.RESEND_API_KEY === "string" && env.RESEND_API_KEY ? env.RESEND_API_KEY : void 0;
2005
2005
  const cfEmailBinding = env.EMAIL;
@@ -2017,7 +2017,7 @@ var emailPluginV3 = chunkISIRU7AK_cjs.definePlugin({
2017
2017
  } else {
2018
2018
  provider = resolveEmailProvider({ env });
2019
2019
  }
2020
- chunkGO2NICMM_cjs.setEmailService(new EmailService({ ...serviceOpts, provider }));
2020
+ chunkTKIBLXSL_cjs.setEmailService(new EmailService({ ...serviceOpts, provider }));
2021
2021
  }
2022
2022
  ctx.hooks.on("auth:registration:completed", makeOnRegistrationCompleted(env));
2023
2023
  ctx.hooks.on("auth:password-reset:requested", makeOnPasswordResetRequested(env));
@@ -2028,7 +2028,7 @@ var emailPluginV3 = chunkISIRU7AK_cjs.definePlugin({
2028
2028
  var BATCH_SIZE = 100;
2029
2029
  ({
2030
2030
  schema: zod.z.record(zod.z.string(), zod.z.unknown())});
2031
- var emailReconciliationPlugin = chunkISIRU7AK_cjs.definePlugin({
2031
+ var emailReconciliationPlugin = chunkOWNSD75H_cjs.definePlugin({
2032
2032
  id: "email-reconciliation",
2033
2033
  version: "1.0.0",
2034
2034
  description: "Hourly cron that backfills email delivery state from provider status APIs. Only active for providers that implement EmailProvider.reconcile().",
@@ -2049,11 +2049,11 @@ var emailReconciliationPlugin = chunkISIRU7AK_cjs.definePlugin({
2049
2049
  console.warn("[email-reconciliation] No DB binding in cron env \u2014 skipping.");
2050
2050
  return;
2051
2051
  }
2052
- if (!chunkGO2NICMM_cjs.hasEmailService()) {
2052
+ if (!chunkTKIBLXSL_cjs.hasEmailService()) {
2053
2053
  console.warn("[email-reconciliation] EmailService not initialized \u2014 skipping.");
2054
2054
  return;
2055
2055
  }
2056
- const emailService = chunkGO2NICMM_cjs.getEmailService();
2056
+ const emailService = chunkTKIBLXSL_cjs.getEmailService();
2057
2057
  let rows = [];
2058
2058
  try {
2059
2059
  const result = await db.prepare(
@@ -2485,7 +2485,7 @@ function buildOtpApi() {
2485
2485
  console.warn("Failed to parse OTP plugin settings, using defaults");
2486
2486
  }
2487
2487
  }
2488
- const settingsService = new chunkBDDABDAB_cjs.SettingsService(db);
2488
+ const settingsService = new chunk4BTBSXMR_cjs.SettingsService(db);
2489
2489
  const generalSettings = await settingsService.getGeneralSettings();
2490
2490
  const siteName = generalSettings.siteName;
2491
2491
  const canRequest = await otpService.checkRateLimit(normalizedEmail, settings);
@@ -2539,8 +2539,8 @@ function buildOtpApi() {
2539
2539
  loginUrl: settings.loginUrl || "",
2540
2540
  loginButtonText: settings.loginButtonText || ""
2541
2541
  });
2542
- if (chunkGO2NICMM_cjs.hasEmailService()) {
2543
- const sent = await chunkGO2NICMM_cjs.getEmailService().send({
2542
+ if (chunkTKIBLXSL_cjs.hasEmailService()) {
2543
+ const sent = await chunkTKIBLXSL_cjs.getEmailService().send({
2544
2544
  to: normalizedEmail,
2545
2545
  subject: `Your login code for ${siteName}`,
2546
2546
  flow: "otp",
@@ -2642,21 +2642,21 @@ function buildOtpApi() {
2642
2642
  error: "Account is deactivated"
2643
2643
  }, 403);
2644
2644
  }
2645
- const tokenTtl = await chunkWACUJVXY_cjs.getJwtExpirySecondsFromDb(db, c.env);
2646
- const token = await chunkWACUJVXY_cjs.AuthManager.generateToken(user.id, user.email, user.role, c.env.JWT_SECRET, tokenTtl);
2645
+ const tokenTtl = await chunk7O443QPZ_cjs.getJwtExpirySecondsFromDb(db, c.env);
2646
+ const token = await chunk7O443QPZ_cjs.AuthManager.generateToken(user.id, user.email, user.role, c.env.JWT_SECRET, tokenTtl);
2647
2647
  cookie.setCookie(c, "auth_token", token, {
2648
2648
  httpOnly: true,
2649
2649
  secure: true,
2650
2650
  sameSite: "Strict",
2651
2651
  maxAge: tokenTtl
2652
2652
  });
2653
- chunkGO2NICMM_cjs.dispatchHookEvent(
2653
+ chunkTKIBLXSL_cjs.dispatchHookEvent(
2654
2654
  c,
2655
2655
  "auth:otp:verified",
2656
2656
  { user: { id: user.id, email: user.email, role: user.role } },
2657
2657
  "fire-and-forget"
2658
2658
  );
2659
- const customData = await chunkGO2NICMM_cjs.getCustomData(db, user.id);
2659
+ const customData = await chunkTKIBLXSL_cjs.getCustomData(db, user.id);
2660
2660
  const { is_active: _isActive, ...publicUser } = user;
2661
2661
  return c.json({
2662
2662
  success: true,
@@ -2701,7 +2701,7 @@ function buildOtpApi() {
2701
2701
  });
2702
2702
  return otpAPI;
2703
2703
  }
2704
- var otpLoginPlugin = chunkISIRU7AK_cjs.definePlugin({
2704
+ var otpLoginPlugin = chunkOWNSD75H_cjs.definePlugin({
2705
2705
  id: "otp-login",
2706
2706
  version: "1.0.0",
2707
2707
  name: "OTP Login",
@@ -3098,15 +3098,15 @@ function buildOauthApi() {
3098
3098
  if (!user || !user.is_active) {
3099
3099
  return c.redirect("/auth/login?error=Account is deactivated");
3100
3100
  }
3101
- const tokenTtl2 = await chunkWACUJVXY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3102
- const jwt2 = await chunkWACUJVXY_cjs.AuthManager.generateToken(
3101
+ const tokenTtl2 = await chunk7O443QPZ_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3102
+ const jwt2 = await chunk7O443QPZ_cjs.AuthManager.generateToken(
3103
3103
  user.id,
3104
3104
  user.email,
3105
3105
  user.role,
3106
3106
  c.env.JWT_SECRET,
3107
3107
  tokenTtl2
3108
3108
  );
3109
- chunkWACUJVXY_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3109
+ chunk7O443QPZ_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3110
3110
  return c.redirect("/admin");
3111
3111
  }
3112
3112
  const existingUser = await oauthService.findUserByEmail(profile.email);
@@ -3123,15 +3123,15 @@ function buildOauthApi() {
3123
3123
  tokenExpiresAt: tokenExpiresAt ?? void 0,
3124
3124
  profileData: JSON.stringify(profile)
3125
3125
  });
3126
- const tokenTtl2 = await chunkWACUJVXY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3127
- const jwt2 = await chunkWACUJVXY_cjs.AuthManager.generateToken(
3126
+ const tokenTtl2 = await chunk7O443QPZ_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3127
+ const jwt2 = await chunk7O443QPZ_cjs.AuthManager.generateToken(
3128
3128
  existingUser.id,
3129
3129
  existingUser.email,
3130
3130
  existingUser.role,
3131
3131
  c.env.JWT_SECRET,
3132
3132
  tokenTtl2
3133
3133
  );
3134
- chunkWACUJVXY_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3134
+ chunk7O443QPZ_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3135
3135
  return c.redirect("/admin");
3136
3136
  }
3137
3137
  const newUserId = await oauthService.createUserFromOAuth(profile);
@@ -3144,15 +3144,15 @@ function buildOauthApi() {
3144
3144
  tokenExpiresAt: tokenExpiresAt ?? void 0,
3145
3145
  profileData: JSON.stringify(profile)
3146
3146
  });
3147
- const tokenTtl = await chunkWACUJVXY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3148
- const jwt = await chunkWACUJVXY_cjs.AuthManager.generateToken(
3147
+ const tokenTtl = await chunk7O443QPZ_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3148
+ const jwt = await chunk7O443QPZ_cjs.AuthManager.generateToken(
3149
3149
  newUserId,
3150
3150
  profile.email.toLowerCase(),
3151
3151
  "viewer",
3152
3152
  c.env.JWT_SECRET,
3153
3153
  tokenTtl
3154
3154
  );
3155
- chunkWACUJVXY_cjs.AuthManager.setAuthCookie(c, jwt, { sameSite: "Lax", maxAge: tokenTtl });
3155
+ chunk7O443QPZ_cjs.AuthManager.setAuthCookie(c, jwt, { sameSite: "Lax", maxAge: tokenTtl });
3156
3156
  return c.redirect("/admin");
3157
3157
  } catch (error) {
3158
3158
  console.error("OAuth callback error:", error);
@@ -3247,7 +3247,7 @@ function buildOauthApi() {
3247
3247
  });
3248
3248
  return oauthAPI;
3249
3249
  }
3250
- var oauthProvidersPlugin = chunkISIRU7AK_cjs.definePlugin({
3250
+ var oauthProvidersPlugin = chunkOWNSD75H_cjs.definePlugin({
3251
3251
  id: "oauth-providers",
3252
3252
  version: "1.0.0",
3253
3253
  name: "OAuth Providers",
@@ -3824,7 +3824,7 @@ var AISearchService = class {
3824
3824
  */
3825
3825
  async detectNewCollections() {
3826
3826
  try {
3827
- const allCollections = chunkOECDF2RF_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => ({
3827
+ const allCollections = chunkMJ63JSTU_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => ({
3828
3828
  id: r.id,
3829
3829
  name: r.name,
3830
3830
  display_name: r.displayName,
@@ -3876,7 +3876,7 @@ var AISearchService = class {
3876
3876
  */
3877
3877
  async getAllCollections() {
3878
3878
  try {
3879
- const allCollections = chunkOECDF2RF_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).sort((a, b) => a.displayName.localeCompare(b.displayName)).map((r) => ({
3879
+ const allCollections = chunkMJ63JSTU_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).sort((a, b) => a.displayName.localeCompare(b.displayName)).map((r) => ({
3880
3880
  id: r.id,
3881
3881
  name: r.name,
3882
3882
  display_name: r.displayName,
@@ -4212,7 +4212,7 @@ var IndexManager = class {
4212
4212
  */
4213
4213
  async indexCollection(collectionId) {
4214
4214
  try {
4215
- const registry = chunkOECDF2RF_cjs.getCollectionRegistry();
4215
+ const registry = chunkMJ63JSTU_cjs.getCollectionRegistry();
4216
4216
  const record = registry.getById(collectionId) ?? registry.getByName(collectionId);
4217
4217
  if (!record) {
4218
4218
  throw new Error(`Collection ${collectionId} not found`);
@@ -4839,7 +4839,7 @@ function renderSettingsPage(data) {
4839
4839
 
4840
4840
  // src/plugins/core-plugins/ai-search-plugin/routes/admin.ts
4841
4841
  var adminRoutes2 = new hono.Hono();
4842
- adminRoutes2.use("*", chunkWACUJVXY_cjs.requireAuth());
4842
+ adminRoutes2.use("*", chunk7O443QPZ_cjs.requireAuth());
4843
4843
  adminRoutes2.get("/", async (c) => {
4844
4844
  try {
4845
4845
  const user = c.get("user");
@@ -5080,7 +5080,7 @@ var manifest_default = {
5080
5080
  author: "SonicJS"};
5081
5081
 
5082
5082
  // src/plugins/core-plugins/ai-search-plugin/index.ts
5083
- var aiSearchPlugin = chunkISIRU7AK_cjs.definePlugin({
5083
+ var aiSearchPlugin = chunkOWNSD75H_cjs.definePlugin({
5084
5084
  id: manifest_default.id,
5085
5085
  version: manifest_default.version,
5086
5086
  name: manifest_default.name,
@@ -5951,7 +5951,7 @@ function renderSecuritySettingsPage(data) {
5951
5951
 
5952
5952
  // src/plugins/core-plugins/security-audit-plugin/routes/admin.ts
5953
5953
  var adminRoutes3 = new hono.Hono();
5954
- adminRoutes3.use("*", chunkWACUJVXY_cjs.requireAuth());
5954
+ adminRoutes3.use("*", chunk7O443QPZ_cjs.requireAuth());
5955
5955
  adminRoutes3.use("*", async (c, next) => {
5956
5956
  const user = c.get("user");
5957
5957
  if (user?.role !== "admin") {
@@ -5961,7 +5961,7 @@ adminRoutes3.use("*", async (c, next) => {
5961
5961
  });
5962
5962
  async function getSettings(db) {
5963
5963
  try {
5964
- const pluginService = new chunkOECDF2RF_cjs.PluginService(db);
5964
+ const pluginService = new chunkMJ63JSTU_cjs.PluginService(db);
5965
5965
  const plugin2 = await pluginService.getPlugin("security-audit");
5966
5966
  if (plugin2?.settings) {
5967
5967
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -6066,7 +6066,7 @@ adminRoutes3.post("/settings", async (c) => {
6066
6066
  autoPurge: body["retention.autoPurge"] === "true"
6067
6067
  }
6068
6068
  };
6069
- const pluginService = new chunkOECDF2RF_cjs.PluginService(db);
6069
+ const pluginService = new chunkMJ63JSTU_cjs.PluginService(db);
6070
6070
  await pluginService.updatePluginSettings("security-audit", settings);
6071
6071
  if (c.req.header("HX-Request")) {
6072
6072
  return c.json({ success: true });
@@ -6227,7 +6227,7 @@ var BruteForceDetector = class {
6227
6227
 
6228
6228
  // src/plugins/core-plugins/security-audit-plugin/routes/api.ts
6229
6229
  var apiRoutes2 = new hono.Hono();
6230
- apiRoutes2.use("*", chunkWACUJVXY_cjs.requireAuth());
6230
+ apiRoutes2.use("*", chunk7O443QPZ_cjs.requireAuth());
6231
6231
  apiRoutes2.use("*", async (c, next) => {
6232
6232
  const user = c.get("user");
6233
6233
  if (user?.role !== "admin") {
@@ -6237,7 +6237,7 @@ apiRoutes2.use("*", async (c, next) => {
6237
6237
  });
6238
6238
  async function getSettings2(db) {
6239
6239
  try {
6240
- const pluginService = new chunkOECDF2RF_cjs.PluginService(db);
6240
+ const pluginService = new chunkMJ63JSTU_cjs.PluginService(db);
6241
6241
  const plugin2 = await pluginService.getPlugin("security-audit");
6242
6242
  if (plugin2?.settings) {
6243
6243
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -6385,7 +6385,7 @@ function generateFingerprint(ip, userAgent) {
6385
6385
  }
6386
6386
  async function getPluginSettings(db) {
6387
6387
  try {
6388
- const pluginService = new chunkOECDF2RF_cjs.PluginService(db);
6388
+ const pluginService = new chunkMJ63JSTU_cjs.PluginService(db);
6389
6389
  const plugin2 = await pluginService.getPlugin("security-audit");
6390
6390
  if (plugin2?.settings) {
6391
6391
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -6616,7 +6616,7 @@ async function logAuthEvent(c, db, settings, ip, userAgent, countryCode, fingerp
6616
6616
 
6617
6617
  // src/plugins/core-plugins/security-audit-plugin/index.ts
6618
6618
  var SECURITY_ICON = `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>`;
6619
- var securityAuditPlugin = chunkISIRU7AK_cjs.definePlugin({
6619
+ var securityAuditPlugin = chunkOWNSD75H_cjs.definePlugin({
6620
6620
  id: "security-audit",
6621
6621
  version: "1.0.0",
6622
6622
  name: "Security Audit",
@@ -7372,7 +7372,7 @@ var DEFAULT_SETTINGS3 = {
7372
7372
 
7373
7373
  // src/plugins/core-plugins/stripe-plugin/routes/admin.ts
7374
7374
  var adminRoutes4 = new hono.Hono();
7375
- adminRoutes4.use("*", chunkWACUJVXY_cjs.requireAuth());
7375
+ adminRoutes4.use("*", chunk7O443QPZ_cjs.requireAuth());
7376
7376
  adminRoutes4.use("*", async (c, next) => {
7377
7377
  const user = c.get("user");
7378
7378
  if (user?.role !== "admin") {
@@ -7382,7 +7382,7 @@ adminRoutes4.use("*", async (c, next) => {
7382
7382
  });
7383
7383
  async function getSettings3(db) {
7384
7384
  try {
7385
- const pluginService = new chunkOECDF2RF_cjs.PluginService(db);
7385
+ const pluginService = new chunkMJ63JSTU_cjs.PluginService(db);
7386
7386
  const plugin2 = await pluginService.getPlugin("stripe");
7387
7387
  if (plugin2?.settings) {
7388
7388
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -7704,7 +7704,7 @@ function timingSafeEqual(a, b) {
7704
7704
  var apiRoutes3 = new hono.Hono();
7705
7705
  async function getSettings4(db) {
7706
7706
  try {
7707
- const pluginService = new chunkOECDF2RF_cjs.PluginService(db);
7707
+ const pluginService = new chunkMJ63JSTU_cjs.PluginService(db);
7708
7708
  const plugin2 = await pluginService.getPlugin("stripe");
7709
7709
  if (plugin2?.settings) {
7710
7710
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -7855,7 +7855,7 @@ apiRoutes3.post("/webhook", async (c) => {
7855
7855
  }
7856
7856
  return c.json({ received: true });
7857
7857
  });
7858
- apiRoutes3.post("/create-checkout-session", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7858
+ apiRoutes3.post("/create-checkout-session", chunk7O443QPZ_cjs.requireAuth(), async (c) => {
7859
7859
  const db = c.env.DB;
7860
7860
  const user = c.get("user");
7861
7861
  if (!user) return c.json({ error: "Unauthorized" }, 401);
@@ -7895,7 +7895,7 @@ apiRoutes3.post("/create-checkout-session", chunkWACUJVXY_cjs.requireAuth(), asy
7895
7895
  });
7896
7896
  return c.json({ sessionId: session.id, url: session.url });
7897
7897
  });
7898
- apiRoutes3.get("/subscription", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7898
+ apiRoutes3.get("/subscription", chunk7O443QPZ_cjs.requireAuth(), async (c) => {
7899
7899
  const user = c.get("user");
7900
7900
  if (!user) return c.json({ error: "Unauthorized" }, 401);
7901
7901
  const db = c.env.DB;
@@ -7907,7 +7907,7 @@ apiRoutes3.get("/subscription", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7907
7907
  }
7908
7908
  return c.json({ subscription });
7909
7909
  });
7910
- apiRoutes3.get("/subscriptions", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7910
+ apiRoutes3.get("/subscriptions", chunk7O443QPZ_cjs.requireAuth(), async (c) => {
7911
7911
  const user = c.get("user");
7912
7912
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
7913
7913
  const db = c.env.DB;
@@ -7923,7 +7923,7 @@ apiRoutes3.get("/subscriptions", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7923
7923
  const result = await subscriptionService.list(filters);
7924
7924
  return c.json(result);
7925
7925
  });
7926
- apiRoutes3.get("/stats", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7926
+ apiRoutes3.get("/stats", chunk7O443QPZ_cjs.requireAuth(), async (c) => {
7927
7927
  const user = c.get("user");
7928
7928
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
7929
7929
  const db = c.env.DB;
@@ -7932,7 +7932,7 @@ apiRoutes3.get("/stats", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7932
7932
  const stats = await subscriptionService.getStats();
7933
7933
  return c.json(stats);
7934
7934
  });
7935
- apiRoutes3.post("/sync-subscriptions", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7935
+ apiRoutes3.post("/sync-subscriptions", chunk7O443QPZ_cjs.requireAuth(), async (c) => {
7936
7936
  const user = c.get("user");
7937
7937
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
7938
7938
  const db = c.env.DB;
@@ -7980,7 +7980,7 @@ apiRoutes3.post("/sync-subscriptions", chunkWACUJVXY_cjs.requireAuth(), async (c
7980
7980
  }, 500);
7981
7981
  }
7982
7982
  });
7983
- apiRoutes3.get("/events", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
7983
+ apiRoutes3.get("/events", chunk7O443QPZ_cjs.requireAuth(), async (c) => {
7984
7984
  const user = c.get("user");
7985
7985
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
7986
7986
  const db = c.env.DB;
@@ -8003,7 +8003,7 @@ apiRoutes3.get("/events", chunkWACUJVXY_cjs.requireAuth(), async (c) => {
8003
8003
 
8004
8004
  // src/plugins/core-plugins/stripe-plugin/index.ts
8005
8005
  var STRIPE_ICON = `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"/></svg>`;
8006
- var stripePlugin = chunkISIRU7AK_cjs.definePlugin({
8006
+ var stripePlugin = chunkOWNSD75H_cjs.definePlugin({
8007
8007
  id: "stripe",
8008
8008
  version: "1.0.0",
8009
8009
  name: "Stripe",
@@ -8276,7 +8276,7 @@ function renderFormsListPage(data) {
8276
8276
 
8277
8277
  <!-- Forms Table -->
8278
8278
  <div class="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-950/5 dark:border-white/10 overflow-hidden">
8279
- ${chunkGO2NICMM_cjs.renderTable(tableData)}
8279
+ ${chunkTKIBLXSL_cjs.renderTable(tableData)}
8280
8280
  </div>
8281
8281
  </div>
8282
8282
  `;
@@ -9705,7 +9705,7 @@ function renderFormCreatePage(data) {
9705
9705
 
9706
9706
  // src/routes/admin-forms.ts
9707
9707
  var adminFormsRoutes = new hono.Hono();
9708
- adminFormsRoutes.use("*", chunkWACUJVXY_cjs.requireAuth());
9708
+ adminFormsRoutes.use("*", chunk7O443QPZ_cjs.requireAuth());
9709
9709
  adminFormsRoutes.get("/", async (c) => {
9710
9710
  try {
9711
9711
  const user = c.get("user");
@@ -9869,7 +9869,7 @@ adminFormsRoutes.get("/:id/builder", async (c) => {
9869
9869
  if (!form) {
9870
9870
  return c.html("<p>Form not found</p>", 404);
9871
9871
  }
9872
- const turnstileService = new chunk5QVYEAVV_cjs.TurnstileService(db);
9872
+ const turnstileService = new chunkXXNQTYXA_cjs.TurnstileService(db);
9873
9873
  const turnstileSettings = await turnstileService.getSettings();
9874
9874
  const pageData = {
9875
9875
  id: form.id,
@@ -10033,7 +10033,7 @@ publicFormsRoutes.get("/:identifier/turnstile-config", async (c) => {
10033
10033
  if (!form) {
10034
10034
  return c.json({ error: "Form not found" }, 404);
10035
10035
  }
10036
- const turnstileService = new chunk5QVYEAVV_cjs.TurnstileService(db);
10036
+ const turnstileService = new chunkXXNQTYXA_cjs.TurnstileService(db);
10037
10037
  const globalSettings = await turnstileService.getSettings();
10038
10038
  const formSettings = form.turnstile_settings ? JSON.parse(form.turnstile_settings) : { inherit: true };
10039
10039
  const enabled = form.turnstile_enabled === 1 || formSettings.inherit && globalSettings?.enabled;
@@ -10460,7 +10460,7 @@ publicFormsRoutes.post("/:identifier/submit", async (c) => {
10460
10460
  const turnstileEnabled = form.turnstile_enabled === 1;
10461
10461
  const turnstileSettings = form.turnstile_settings ? JSON.parse(form.turnstile_settings) : { inherit: true };
10462
10462
  if (turnstileEnabled || turnstileSettings.inherit) {
10463
- const turnstileService = new chunk5QVYEAVV_cjs.TurnstileService(db);
10463
+ const turnstileService = new chunkXXNQTYXA_cjs.TurnstileService(db);
10464
10464
  const globalEnabled = await turnstileService.isEnabled();
10465
10465
  if (globalEnabled || turnstileEnabled) {
10466
10466
  const turnstileToken = body.data?.turnstile || body.turnstile;
@@ -10521,7 +10521,7 @@ publicFormsRoutes.post("/:identifier/submit", async (c) => {
10521
10521
  });
10522
10522
 
10523
10523
  // src/plugins/core-plugins/forms-plugin/index.ts
10524
- var formsPlugin = chunkISIRU7AK_cjs.definePlugin({
10524
+ var formsPlugin = chunkOWNSD75H_cjs.definePlugin({
10525
10525
  id: "forms",
10526
10526
  version: "1.0.0",
10527
10527
  name: "Forms",
@@ -10541,7 +10541,7 @@ var formsPlugin = chunkISIRU7AK_cjs.definePlugin({
10541
10541
  });
10542
10542
  chunkNAVPFIG5_cjs.init_admin_layout_catalyst_template();
10543
10543
  var adminRbacRoutes = new hono.Hono();
10544
- adminRbacRoutes.use("*", chunkWACUJVXY_cjs.requireRbac("rbac", "manage"));
10544
+ adminRbacRoutes.use("*", chunk7O443QPZ_cjs.requireRbac("rbac", "manage"));
10545
10545
  var esc = (s) => String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
10546
10546
  var TABS2 = `
10547
10547
  <div class="border-b border-zinc-950/10 dark:border-white/10 mb-6">
@@ -10849,7 +10849,7 @@ adminRbacRoutes.get("/", async (c) => {
10849
10849
  title: "Roles & Permissions",
10850
10850
  pageTitle: "Roles & Permissions",
10851
10851
  currentPath: "/admin/users",
10852
- version: chunk7RY3YKI7_cjs.getCoreVersion(),
10852
+ version: chunkYAKNRVAB_cjs.getCoreVersion(),
10853
10853
  user: u ? { name: u.email || "Admin", email: u.email || "", role: u.role || "admin" } : void 0,
10854
10854
  content: content2
10855
10855
  })
@@ -10986,7 +10986,7 @@ adminRbacRoutes.get("/check", async (c) => {
10986
10986
  });
10987
10987
 
10988
10988
  // src/middleware/plugin-menu.ts
10989
- var REGISTRY_MENU_PLUGINS = Object.values(chunkOECDF2RF_cjs.PLUGIN_REGISTRY).filter((p) => p.adminMenu !== null).map((p) => ({
10989
+ var REGISTRY_MENU_PLUGINS = Object.values(chunkMJ63JSTU_cjs.PLUGIN_REGISTRY).filter((p) => p.adminMenu !== null).map((p) => ({
10990
10990
  id: p.id,
10991
10991
  label: p.adminMenu.label,
10992
10992
  path: p.adminMenu.path,
@@ -11082,7 +11082,7 @@ function pluginMenuMiddleware() {
11082
11082
  }
11083
11083
  chunkNAVPFIG5_cjs.init_admin_layout_catalyst_template();
11084
11084
  var adminRoutes5 = new hono.Hono();
11085
- adminRoutes5.use("*", chunkWACUJVXY_cjs.requireAuth());
11085
+ adminRoutes5.use("*", chunk7O443QPZ_cjs.requireAuth());
11086
11086
  adminRoutes5.use("*", async (c, next) => {
11087
11087
  const user = c.get("user");
11088
11088
  if (user?.role !== "admin") {
@@ -11437,7 +11437,7 @@ apiRoutes4.get("/stats", async (c) => {
11437
11437
  });
11438
11438
 
11439
11439
  // src/plugins/core-plugins/analytics/index.ts
11440
- var analyticsPlugin = chunkISIRU7AK_cjs.definePlugin({
11440
+ var analyticsPlugin = chunkOWNSD75H_cjs.definePlugin({
11441
11441
  id: "core-analytics",
11442
11442
  version: "1.0.0",
11443
11443
  name: "Analytics",
@@ -11584,7 +11584,7 @@ function esc2(s) {
11584
11584
  return (s || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
11585
11585
  }
11586
11586
  async function getVariablesMap(db) {
11587
- let variables = chunkGO2NICMM_cjs.getVariablesCached();
11587
+ let variables = chunkTKIBLXSL_cjs.getVariablesCached();
11588
11588
  if (variables) return variables;
11589
11589
  try {
11590
11590
  const { results } = await db.prepare(
@@ -11594,7 +11594,7 @@ async function getVariablesMap(db) {
11594
11594
  for (const row of results || []) {
11595
11595
  variables.set(row.key, row.value);
11596
11596
  }
11597
- chunkGO2NICMM_cjs.setVariablesCache(variables);
11597
+ chunkTKIBLXSL_cjs.setVariablesCache(variables);
11598
11598
  return variables;
11599
11599
  } catch {
11600
11600
  return /* @__PURE__ */ new Map();
@@ -11663,7 +11663,7 @@ apiRoutes5.post("/", async (c) => {
11663
11663
  await db.prepare(
11664
11664
  "INSERT INTO global_variables (key, value, description, category, is_active) VALUES (?, ?, ?, ?, ?)"
11665
11665
  ).bind(key, value || "", description || "", category || "general", isActive !== false ? 1 : 0).run();
11666
- chunkGO2NICMM_cjs.invalidateVariablesCache();
11666
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
11667
11667
  const created = await db.prepare("SELECT * FROM global_variables WHERE key = ?").bind(key).first();
11668
11668
  return c.json({ success: true, data: formatVariable(created) }, 201);
11669
11669
  } catch {
@@ -11708,7 +11708,7 @@ apiRoutes5.put("/:id", async (c) => {
11708
11708
  updates.push("updated_at = strftime('%s', 'now')");
11709
11709
  params.push(id);
11710
11710
  await db.prepare(`UPDATE global_variables SET ${updates.join(", ")} WHERE id = ?`).bind(...params).run();
11711
- chunkGO2NICMM_cjs.invalidateVariablesCache();
11711
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
11712
11712
  const updated = await db.prepare("SELECT * FROM global_variables WHERE id = ?").bind(id).first();
11713
11713
  return c.json({ success: true, data: formatVariable(updated) });
11714
11714
  } catch {
@@ -11722,7 +11722,7 @@ apiRoutes5.delete("/:id", async (c) => {
11722
11722
  const existing = await db.prepare("SELECT id FROM global_variables WHERE id = ?").bind(id).first();
11723
11723
  if (!existing) return c.json({ error: "Variable not found" }, 404);
11724
11724
  await db.prepare("DELETE FROM global_variables WHERE id = ?").bind(id).run();
11725
- chunkGO2NICMM_cjs.invalidateVariablesCache();
11725
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
11726
11726
  return c.json({ success: true });
11727
11727
  } catch {
11728
11728
  return c.json({ success: false, error: "Failed to delete variable" }, 500);
@@ -11782,7 +11782,7 @@ adminRoutes6.put("/:id", async (c) => {
11782
11782
  const value = body.value;
11783
11783
  if (value !== void 0) {
11784
11784
  await db.prepare("UPDATE global_variables SET value = ?, updated_at = strftime('%s', 'now') WHERE id = ?").bind(value, id).run();
11785
- chunkGO2NICMM_cjs.invalidateVariablesCache();
11785
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
11786
11786
  }
11787
11787
  return c.html('<span class="text-green-400 text-xs">Saved</span>');
11788
11788
  });
@@ -11790,7 +11790,7 @@ adminRoutes6.post("/:id/toggle", async (c) => {
11790
11790
  const db = c.env.DB;
11791
11791
  const id = c.req.param("id");
11792
11792
  await db.prepare("UPDATE global_variables SET is_active = CASE WHEN is_active = 1 THEN 0 ELSE 1 END, updated_at = strftime('%s', 'now') WHERE id = ?").bind(id).run();
11793
- chunkGO2NICMM_cjs.invalidateVariablesCache();
11793
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
11794
11794
  c.header("HX-Redirect", "/admin/global-variables");
11795
11795
  return c.body(null, 204);
11796
11796
  });
@@ -11811,7 +11811,7 @@ adminRoutes6.post("/", async (c) => {
11811
11811
  await db.prepare(
11812
11812
  "INSERT INTO global_variables (key, value, description, category) VALUES (?, ?, ?, ?)"
11813
11813
  ).bind(key, value, description, category).run();
11814
- chunkGO2NICMM_cjs.invalidateVariablesCache();
11814
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
11815
11815
  c.header("HX-Redirect", "/admin/global-variables");
11816
11816
  return c.body(null, 204);
11817
11817
  });
@@ -11830,7 +11830,7 @@ adminRoutes6.post("/settings/editor-integration", async (c) => {
11830
11830
  adminRoutes6.delete("/:id", async (c) => {
11831
11831
  const db = c.env.DB;
11832
11832
  await db.prepare("DELETE FROM global_variables WHERE id = ?").bind(c.req.param("id")).run();
11833
- chunkGO2NICMM_cjs.invalidateVariablesCache();
11833
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
11834
11834
  return c.html("");
11835
11835
  });
11836
11836
  function renderAdminPage(variables, editorStatus = { editorActive: false, activeEditorName: "", enableEditorIntegration: true }) {
@@ -12148,7 +12148,7 @@ function renderAdminPage(variables, editorStatus = { editorActive: false, active
12148
12148
  </div>
12149
12149
  ` });
12150
12150
  }
12151
- var globalVariablesPlugin = chunkISIRU7AK_cjs.definePlugin({
12151
+ var globalVariablesPlugin = chunkOWNSD75H_cjs.definePlugin({
12152
12152
  id: "global-variables",
12153
12153
  version: "1.1.0",
12154
12154
  name: "Global Variables",
@@ -12171,7 +12171,7 @@ var globalVariablesPlugin = chunkISIRU7AK_cjs.definePlugin({
12171
12171
  if (!db || !data) return data;
12172
12172
  const variables = await getVariablesMap(db);
12173
12173
  if (variables.size === 0) return data;
12174
- return chunkGO2NICMM_cjs.resolveVariablesInObject(data, variables);
12174
+ return chunkTKIBLXSL_cjs.resolveVariablesInObject(data, variables);
12175
12175
  } catch {
12176
12176
  return data;
12177
12177
  }
@@ -12189,7 +12189,7 @@ var globalVariablesPlugin = chunkISIRU7AK_cjs.definePlugin({
12189
12189
  },
12190
12190
  activate: async () => console.info("[GlobalVariables] Plugin activated"),
12191
12191
  deactivate: async () => {
12192
- chunkGO2NICMM_cjs.invalidateVariablesCache();
12192
+ chunkTKIBLXSL_cjs.invalidateVariablesCache();
12193
12193
  console.info("[GlobalVariables] Plugin deactivated, cache cleared");
12194
12194
  },
12195
12195
  uninstall: async (ctx) => {
@@ -12755,7 +12755,7 @@ function renderAdminPage2(shortcodes, editorStatus = { editorActive: false, acti
12755
12755
  </div>
12756
12756
  ` });
12757
12757
  }
12758
- var shortcodesPlugin = chunkISIRU7AK_cjs.definePlugin({
12758
+ var shortcodesPlugin = chunkOWNSD75H_cjs.definePlugin({
12759
12759
  id: "shortcodes",
12760
12760
  version: "1.0.0",
12761
12761
  name: "Shortcodes",
@@ -12839,7 +12839,7 @@ helloWorldRoutes.get("/", async (c) => {
12839
12839
  </html>
12840
12840
  `);
12841
12841
  });
12842
- var helloWorldPlugin = chunkISIRU7AK_cjs.definePlugin({
12842
+ var helloWorldPlugin = chunkOWNSD75H_cjs.definePlugin({
12843
12843
  id: "hello-world",
12844
12844
  version: "1.0.0",
12845
12845
  name: "Hello World",
@@ -13067,7 +13067,7 @@ function renderTenantForm(data) {
13067
13067
  // src/plugins/core-plugins/multi-tenant-plugin/templates/tenant-members.template.ts
13068
13068
  chunkNAVPFIG5_cjs.init_admin_layout_catalyst_template();
13069
13069
  function roleOptions(selected) {
13070
- return chunkGO2NICMM_cjs.VALID_MEMBER_ROLES.map(
13070
+ return chunkTKIBLXSL_cjs.VALID_MEMBER_ROLES.map(
13071
13071
  (r) => `<option value="${r}" ${r === selected ? "selected" : ""}>${r}</option>`
13072
13072
  ).join("");
13073
13073
  }
@@ -13129,7 +13129,7 @@ function renderInvitations(slug, invitations) {
13129
13129
  <div>
13130
13130
  <label for="invite-role" class="mb-1 block text-xs font-medium text-zinc-500 dark:text-zinc-400">Role</label>
13131
13131
  <select id="invite-role" name="role" class="rounded-lg border border-zinc-950/10 bg-white px-2 py-2 text-sm text-zinc-950 dark:border-white/10 dark:bg-zinc-800 dark:text-white">
13132
- ${chunkGO2NICMM_cjs.VALID_MEMBER_ROLES.map((r) => `<option value="${r}" ${r === "viewer" ? "selected" : ""}>${r}</option>`).join("")}
13132
+ ${chunkTKIBLXSL_cjs.VALID_MEMBER_ROLES.map((r) => `<option value="${r}" ${r === "viewer" ? "selected" : ""}>${r}</option>`).join("")}
13133
13133
  </select>
13134
13134
  </div>
13135
13135
  <button type="submit" data-send-invite class="rounded-lg bg-zinc-950 px-3.5 py-2 text-sm font-semibold text-white hover:bg-zinc-800 dark:bg-white dark:text-zinc-950 dark:hover:bg-zinc-200">Invite</button>
@@ -13225,7 +13225,7 @@ function renderTenantMembers(data) {
13225
13225
  // src/plugins/core-plugins/multi-tenant-plugin/templates/user-memberships.template.ts
13226
13226
  chunkNAVPFIG5_cjs.init_admin_layout_catalyst_template();
13227
13227
  function roleOptions2(selected) {
13228
- return chunkGO2NICMM_cjs.VALID_MEMBER_ROLES.map(
13228
+ return chunkTKIBLXSL_cjs.VALID_MEMBER_ROLES.map(
13229
13229
  (r) => `<option value="${r}" ${r === selected ? "selected" : ""}>${r}</option>`
13230
13230
  ).join("");
13231
13231
  }
@@ -13387,7 +13387,7 @@ function zodToFieldErrors(error) {
13387
13387
  }
13388
13388
  async function isMultiTenantActive(db) {
13389
13389
  try {
13390
- const plugin2 = await new chunkOECDF2RF_cjs.PluginService(db).getPlugin(chunkOECDF2RF_cjs.MULTI_TENANT_PLUGIN_ID);
13390
+ const plugin2 = await new chunkMJ63JSTU_cjs.PluginService(db).getPlugin(chunkMJ63JSTU_cjs.MULTI_TENANT_PLUGIN_ID);
13391
13391
  return plugin2?.status === "active";
13392
13392
  } catch {
13393
13393
  return false;
@@ -13395,7 +13395,7 @@ async function isMultiTenantActive(db) {
13395
13395
  }
13396
13396
  function createTenantAdminRoutes() {
13397
13397
  const routes2 = new hono.Hono();
13398
- routes2.use("*", chunkWACUJVXY_cjs.requireAuth());
13398
+ routes2.use("*", chunk7O443QPZ_cjs.requireAuth());
13399
13399
  routes2.use("*", async (c, next) => {
13400
13400
  const user = c.get("user");
13401
13401
  if (user?.role !== "admin") {
@@ -13409,7 +13409,7 @@ function createTenantAdminRoutes() {
13409
13409
  const form = await c.req.formData();
13410
13410
  const slug = String(form.get("tenant") ?? "").trim().toLowerCase();
13411
13411
  const redirect = String(form.get("redirect") ?? "");
13412
- const svc = new chunkGO2NICMM_cjs.TenantService(db);
13412
+ const svc = new chunkTKIBLXSL_cjs.TenantService(db);
13413
13413
  const tenant = await svc.getTenantBySlug(slug);
13414
13414
  if (!tenant || tenant.status !== "active") {
13415
13415
  return c.json({ error: "Unknown or inactive tenant" }, 400);
@@ -13419,7 +13419,7 @@ function createTenantAdminRoutes() {
13419
13419
  if (!user.isSuperAdmin && !await svc.isMember(user.userId, slug)) {
13420
13420
  return c.json({ error: "You are not a member of this tenant" }, 403);
13421
13421
  }
13422
- cookie.setCookie(c, chunkOECDF2RF_cjs.TENANT_COOKIE, slug, {
13422
+ cookie.setCookie(c, chunkMJ63JSTU_cjs.TENANT_COOKIE, slug, {
13423
13423
  path: "/",
13424
13424
  httpOnly: true,
13425
13425
  sameSite: "Lax",
@@ -13436,7 +13436,7 @@ function createTenantAdminRoutes() {
13436
13436
  if (!user) return c.redirect("/auth/login");
13437
13437
  const token = c.req.query("token") ?? "";
13438
13438
  try {
13439
- const { slug } = await new chunkGO2NICMM_cjs.TenantService(db).acceptInvitation(token, user.userId, user.email);
13439
+ const { slug } = await new chunkTKIBLXSL_cjs.TenantService(db).acceptInvitation(token, user.userId, user.email);
13440
13440
  return c.redirect(`/admin/tenants/${slug}/members?message=Invitation accepted`);
13441
13441
  } catch (error) {
13442
13442
  const message = error instanceof Error ? error.message : "Failed to accept invitation";
@@ -13464,7 +13464,7 @@ function createTenantAdminRoutes() {
13464
13464
  const userId = c.req.param("userId");
13465
13465
  const target = await db.prepare("SELECT id, email FROM auth_user WHERE id = ?").bind(userId).first();
13466
13466
  if (!target?.id) return c.redirect("/admin/users?message=User not found&type=error");
13467
- const svc = new chunkGO2NICMM_cjs.TenantService(db);
13467
+ const svc = new chunkTKIBLXSL_cjs.TenantService(db);
13468
13468
  const [memberships, allTenants] = await Promise.all([svc.listUserMemberships(userId), svc.listTenants()]);
13469
13469
  const memberSlugs = new Set(memberships.map((m) => m.slug));
13470
13470
  const availableTenants = allTenants.filter((t) => t.status === "active" && !memberSlugs.has(t.slug)).map((t) => ({ slug: t.slug, name: t.name }));
@@ -13489,10 +13489,10 @@ function createTenantAdminRoutes() {
13489
13489
  const slug = String(form.get("slug") ?? "").trim().toLowerCase();
13490
13490
  const role = String(form.get("role") ?? "viewer");
13491
13491
  const redirectTo = String(form.get("_redirect") ?? "") || `/admin/tenants/users/${userId}`;
13492
- if (!chunkGO2NICMM_cjs.isValidMemberRole(role)) throw new Error(`Invalid role '${role}'`);
13492
+ if (!chunkTKIBLXSL_cjs.isValidMemberRole(role)) throw new Error(`Invalid role '${role}'`);
13493
13493
  const target = await db.prepare("SELECT email FROM auth_user WHERE id = ?").bind(userId).first();
13494
13494
  if (!target) throw new Error("User not found");
13495
- const svc = new chunkGO2NICMM_cjs.TenantService(db);
13495
+ const svc = new chunkTKIBLXSL_cjs.TenantService(db);
13496
13496
  if (!await svc.getTenantBySlug(slug)) throw new Error("Tenant not found");
13497
13497
  if (await svc.isMember(userId, slug)) throw new Error(`Already a member of '${slug}'`);
13498
13498
  await svc.addMember(slug, userId, role, target.email ?? null);
@@ -13511,7 +13511,7 @@ function createTenantAdminRoutes() {
13511
13511
  const form = await c.req.formData();
13512
13512
  const role = String(form.get("role") ?? "");
13513
13513
  const redirectTo = String(form.get("_redirect") ?? "") || `/admin/tenants/users/${userId}`;
13514
- await new chunkGO2NICMM_cjs.TenantService(db).setMemberRole(slug, userId, role);
13514
+ await new chunkTKIBLXSL_cjs.TenantService(db).setMemberRole(slug, userId, role);
13515
13515
  return c.redirect(`${redirectTo}?message=Role updated`);
13516
13516
  } catch (error) {
13517
13517
  const message = error instanceof Error ? error.message : "Failed to update role";
@@ -13526,7 +13526,7 @@ function createTenantAdminRoutes() {
13526
13526
  try {
13527
13527
  const form = await c.req.formData();
13528
13528
  const redirectTo = String(form.get("_redirect") ?? "") || `/admin/tenants/users/${userId}`;
13529
- await new chunkGO2NICMM_cjs.TenantService(db).removeMember(slug, userId);
13529
+ await new chunkTKIBLXSL_cjs.TenantService(db).removeMember(slug, userId);
13530
13530
  return c.redirect(`${redirectTo}?message=Removed from ${encodeURIComponent(slug)}`);
13531
13531
  } catch (error) {
13532
13532
  const message = error instanceof Error ? error.message : "Failed to remove membership";
@@ -13541,7 +13541,7 @@ function createTenantAdminRoutes() {
13541
13541
  return c.html(renderTenantsInactive({ user: userShape(cur), version }));
13542
13542
  }
13543
13543
  const roleName = c.req.param("roleName");
13544
- const assignments = await new chunkGO2NICMM_cjs.TenantService(db).listAssignmentsByRole(roleName);
13544
+ const assignments = await new chunkTKIBLXSL_cjs.TenantService(db).listAssignmentsByRole(roleName);
13545
13545
  return c.html(renderRoleUsage({ roleName, assignments, user: userShape(cur), version }));
13546
13546
  });
13547
13547
  routes2.get("/", async (c) => {
@@ -13551,7 +13551,7 @@ function createTenantAdminRoutes() {
13551
13551
  if (!await isMultiTenantActive(db)) {
13552
13552
  return c.html(renderTenantsInactive({ user: userShape(user), version }));
13553
13553
  }
13554
- const svc = new chunkGO2NICMM_cjs.TenantService(db);
13554
+ const svc = new chunkTKIBLXSL_cjs.TenantService(db);
13555
13555
  await svc.ensureDefaultTenant();
13556
13556
  const tenants = await svc.listTenants();
13557
13557
  const [docRes, memberRes] = await db.batch([
@@ -13590,7 +13590,7 @@ function createTenantAdminRoutes() {
13590
13590
  formEntries = Object.fromEntries(form.entries());
13591
13591
  const validated = tenantFormSchema.parse(formEntries);
13592
13592
  if (!validated.slug) throw new zod.z.ZodError([{ code: "custom", message: "Slug is required", path: ["slug"] }]);
13593
- const svc = new chunkGO2NICMM_cjs.TenantService(db);
13593
+ const svc = new chunkTKIBLXSL_cjs.TenantService(db);
13594
13594
  await svc.createTenant({
13595
13595
  name: validated.name,
13596
13596
  slug: validated.slug,
@@ -13615,7 +13615,7 @@ function createTenantAdminRoutes() {
13615
13615
  if (!await isMultiTenantActive(db)) {
13616
13616
  return c.html(renderTenantsInactive({ user: userShape(user), version }));
13617
13617
  }
13618
- const tenant = await new chunkGO2NICMM_cjs.TenantService(db).getTenantBySlug(c.req.param("slug"));
13618
+ const tenant = await new chunkTKIBLXSL_cjs.TenantService(db).getTenantBySlug(c.req.param("slug"));
13619
13619
  if (!tenant) return c.redirect("/admin/tenants?message=Tenant not found&type=error");
13620
13620
  return c.html(renderTenantForm({ tenant, isEdit: true, user: userShape(user), version }));
13621
13621
  });
@@ -13625,7 +13625,7 @@ function createTenantAdminRoutes() {
13625
13625
  const version = c.get("appVersion");
13626
13626
  const slug = c.req.param("slug");
13627
13627
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
13628
- const svc = new chunkGO2NICMM_cjs.TenantService(db);
13628
+ const svc = new chunkTKIBLXSL_cjs.TenantService(db);
13629
13629
  try {
13630
13630
  const form = await c.req.formData();
13631
13631
  const validated = tenantFormSchema.parse(Object.fromEntries(form.entries()));
@@ -13650,7 +13650,7 @@ function createTenantAdminRoutes() {
13650
13650
  const slug = c.req.param("slug");
13651
13651
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
13652
13652
  try {
13653
- await new chunkGO2NICMM_cjs.TenantService(db).deleteTenant(slug);
13653
+ await new chunkTKIBLXSL_cjs.TenantService(db).deleteTenant(slug);
13654
13654
  return c.redirect("/admin/tenants?message=Tenant deleted successfully");
13655
13655
  } catch (error) {
13656
13656
  const message = error instanceof Error ? error.message : "Failed to delete tenant";
@@ -13665,7 +13665,7 @@ function createTenantAdminRoutes() {
13665
13665
  return c.html(renderTenantsInactive({ user: userShape(user), version }));
13666
13666
  }
13667
13667
  const slug = c.req.param("slug");
13668
- const svc = new chunkGO2NICMM_cjs.TenantService(db);
13668
+ const svc = new chunkTKIBLXSL_cjs.TenantService(db);
13669
13669
  const tenant = await svc.getTenantBySlug(slug);
13670
13670
  if (!tenant) return c.redirect("/admin/tenants?message=Tenant not found&type=error");
13671
13671
  const [members, invitations] = await Promise.all([svc.listMembers(slug), svc.listInvitations(slug)]);
@@ -13691,7 +13691,7 @@ function createTenantAdminRoutes() {
13691
13691
  const form = await c.req.formData();
13692
13692
  const email = String(form.get("email") ?? "");
13693
13693
  const role = String(form.get("role") ?? "viewer");
13694
- await new chunkGO2NICMM_cjs.TenantService(db).addMemberByEmail(slug, email, role);
13694
+ await new chunkTKIBLXSL_cjs.TenantService(db).addMemberByEmail(slug, email, role);
13695
13695
  return c.redirect(`/admin/tenants/${slug}/members?message=Member added`);
13696
13696
  } catch (error) {
13697
13697
  const message = error instanceof Error ? error.message : "Failed to add member";
@@ -13706,7 +13706,7 @@ function createTenantAdminRoutes() {
13706
13706
  try {
13707
13707
  const form = await c.req.formData();
13708
13708
  const role = String(form.get("role") ?? "");
13709
- await new chunkGO2NICMM_cjs.TenantService(db).setMemberRole(slug, userId, role);
13709
+ await new chunkTKIBLXSL_cjs.TenantService(db).setMemberRole(slug, userId, role);
13710
13710
  return c.redirect(`/admin/tenants/${slug}/members?message=Role updated`);
13711
13711
  } catch (error) {
13712
13712
  const message = error instanceof Error ? error.message : "Failed to update role";
@@ -13719,7 +13719,7 @@ function createTenantAdminRoutes() {
13719
13719
  const userId = c.req.param("userId");
13720
13720
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
13721
13721
  try {
13722
- await new chunkGO2NICMM_cjs.TenantService(db).removeMember(slug, userId);
13722
+ await new chunkTKIBLXSL_cjs.TenantService(db).removeMember(slug, userId);
13723
13723
  return c.redirect(`/admin/tenants/${slug}/members?message=Member removed`);
13724
13724
  } catch (error) {
13725
13725
  const message = error instanceof Error ? error.message : "Failed to remove member";
@@ -13735,12 +13735,12 @@ function createTenantAdminRoutes() {
13735
13735
  const form = await c.req.formData();
13736
13736
  const email = String(form.get("email") ?? "");
13737
13737
  const role = String(form.get("role") ?? "viewer");
13738
- const token = await new chunkGO2NICMM_cjs.TenantService(db).createInvitation(slug, email, role, user?.userId ?? null);
13738
+ const token = await new chunkTKIBLXSL_cjs.TenantService(db).createInvitation(slug, email, role, user?.userId ?? null);
13739
13739
  const origin = c.req.header("origin") || new URL(c.req.url).origin;
13740
13740
  const acceptUrl = `${origin}/join/invite?token=${encodeURIComponent(token)}`;
13741
13741
  let note;
13742
13742
  let noteType = "";
13743
- const svc2 = chunkGO2NICMM_cjs.hasEmailService() ? chunkGO2NICMM_cjs.getEmailService() : null;
13743
+ const svc2 = chunkTKIBLXSL_cjs.hasEmailService() ? chunkTKIBLXSL_cjs.getEmailService() : null;
13744
13744
  const hasRealProvider = !!svc2 && svc2.getProviderName() !== "console";
13745
13745
  if (hasRealProvider) {
13746
13746
  const result = await svc2.send({
@@ -13781,7 +13781,7 @@ function createTenantAdminRoutes() {
13781
13781
  WHERE i.id = ? AND t.slug = ? AND i.status = 'pending'`
13782
13782
  ).bind(id, slug).first();
13783
13783
  if (!inv) throw new Error("Invitation not found or already used");
13784
- const svc2 = chunkGO2NICMM_cjs.hasEmailService() ? chunkGO2NICMM_cjs.getEmailService() : null;
13784
+ const svc2 = chunkTKIBLXSL_cjs.hasEmailService() ? chunkTKIBLXSL_cjs.getEmailService() : null;
13785
13785
  const hasRealProvider = !!svc2 && svc2.getProviderName() !== "console";
13786
13786
  if (!hasRealProvider) throw new Error("No email plugin active");
13787
13787
  const origin = c.req.header("origin") || new URL(c.req.url).origin;
@@ -13806,7 +13806,7 @@ function createTenantAdminRoutes() {
13806
13806
  const id = c.req.param("id");
13807
13807
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
13808
13808
  try {
13809
- await new chunkGO2NICMM_cjs.TenantService(db).revokeInvitation(slug, id);
13809
+ await new chunkTKIBLXSL_cjs.TenantService(db).revokeInvitation(slug, id);
13810
13810
  return c.redirect(`/admin/tenants/${slug}/members?message=Invitation revoked`);
13811
13811
  } catch (error) {
13812
13812
  const message = error instanceof Error ? error.message : "Failed to revoke invitation";
@@ -14036,7 +14036,7 @@ function createJoinRoutes() {
14036
14036
  if (existing) return rerender("An account with this email already exists. Please sign in instead.");
14037
14037
  try {
14038
14038
  const userId = crypto.randomUUID();
14039
- const passwordHash = await chunkWACUJVXY_cjs.AuthManager.hashPassword(password);
14039
+ const passwordHash = await chunk7O443QPZ_cjs.AuthManager.hashPassword(password);
14040
14040
  const now = Date.now();
14041
14041
  const nowSec = Math.floor(now / 1e3);
14042
14042
  await db.batch([
@@ -14049,7 +14049,7 @@ function createJoinRoutes() {
14049
14049
  VALUES (?, ?, ?, 'credential', ?, ?, ?)`
14050
14050
  ).bind(`cred-${userId}`, userId, userId, passwordHash, nowSec, nowSec)
14051
14051
  ]);
14052
- await new chunkGO2NICMM_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14052
+ await new chunkTKIBLXSL_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14053
14053
  const auth = chunkNUKJ54GA_cjs.createAuth(c.env);
14054
14054
  const origin = new URL(c.req.url).origin;
14055
14055
  const baReq = new Request(`${origin}/auth/sign-in/email`, {
@@ -14117,7 +14117,7 @@ function createJoinRoutes() {
14117
14117
  const baBody = await baRes.json();
14118
14118
  const userId = baBody?.user?.id;
14119
14119
  if (!userId) return rerender("Sign-in succeeded but could not read user ID.");
14120
- await new chunkGO2NICMM_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14120
+ await new chunkTKIBLXSL_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14121
14121
  const headers = new Headers({ Location: "/admin?message=Welcome! You have joined " + encodeURIComponent(inv.tenantName) });
14122
14122
  copyBaCookies(baRes, headers);
14123
14123
  return new Response(null, { status: 302, headers });
@@ -14131,7 +14131,7 @@ function createJoinRoutes() {
14131
14131
 
14132
14132
  // src/plugins/core-plugins/multi-tenant-plugin/index.ts
14133
14133
  var TENANT_ICON = `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21"/></svg>`;
14134
- var multiTenantPlugin = chunkISIRU7AK_cjs.definePlugin({
14134
+ var multiTenantPlugin = chunkOWNSD75H_cjs.definePlugin({
14135
14135
  id: manifest_default2.id,
14136
14136
  version: "1.0.0",
14137
14137
  name: manifest_default2.name,
@@ -14146,30 +14146,30 @@ var multiTenantPlugin = chunkISIRU7AK_cjs.definePlugin({
14146
14146
  { label: "Tenants", path: "/admin/tenants", icon: TENANT_ICON, order: 80 }
14147
14147
  ],
14148
14148
  activate: async () => {
14149
- chunkOECDF2RF_cjs.invalidateTenantCache();
14149
+ chunkMJ63JSTU_cjs.invalidateTenantCache();
14150
14150
  console.info("\u2705 Multi-Tenant plugin activated");
14151
14151
  },
14152
14152
  deactivate: async () => {
14153
- chunkOECDF2RF_cjs.invalidateTenantCache();
14153
+ chunkMJ63JSTU_cjs.invalidateTenantCache();
14154
14154
  console.info("\u274C Multi-Tenant plugin deactivated");
14155
14155
  }
14156
14156
  });
14157
14157
  var routes = new hono.Hono();
14158
- routes.use("*", chunkWACUJVXY_cjs.requireAuth());
14159
- routes.use("*", chunkWACUJVXY_cjs.requireRole(["admin", "editor"]));
14158
+ routes.use("*", chunk7O443QPZ_cjs.requireAuth());
14159
+ routes.use("*", chunk7O443QPZ_cjs.requireRole(["admin", "editor"]));
14160
14160
  routes.get("/:rootId", async (c) => {
14161
14161
  const { rootId } = c.req.param();
14162
14162
  const db = c.env.DB;
14163
- const scope = await chunkGO2NICMM_cjs.resolveDocScope(c, db, { rootId });
14163
+ const scope = await chunkTKIBLXSL_cjs.resolveDocScope(c, db, { rootId });
14164
14164
  if (!scope) {
14165
14165
  return c.html('<p class="text-zinc-500 dark:text-zinc-400 p-4">Document not found.</p>', 404);
14166
14166
  }
14167
14167
  if (!scope.docType?.settings?.versioning) {
14168
14168
  return c.html('<p class="text-zinc-500 dark:text-zinc-400 p-4">Versioning not enabled for this type.</p>', 404);
14169
14169
  }
14170
- const denied = await chunkGO2NICMM_cjs.denyIfNotAllowed(c, db, rootId, "read", scope.docType?.settings, scope.tenantId);
14170
+ const denied = await chunkTKIBLXSL_cjs.denyIfNotAllowed(c, db, rootId, "read", scope.docType?.settings, scope.tenantId);
14171
14171
  if (denied) return denied;
14172
- const repo = new chunkGO2NICMM_cjs.DocumentRepository(db, scope.tenantId);
14172
+ const repo = new chunkTKIBLXSL_cjs.DocumentRepository(db, scope.tenantId);
14173
14173
  const versions = await repo.getVersionHistory(rootId);
14174
14174
  const safeRootIdAttr = chunkMNWKYY5E_cjs.escapeHtml(rootId);
14175
14175
  const rows = versions.map((v) => {
@@ -14262,14 +14262,14 @@ routes.post("/:rootId/restore/:versionNumber", async (c) => {
14262
14262
  const { rootId, versionNumber } = c.req.param();
14263
14263
  const db = c.env.DB;
14264
14264
  const user = c.get("user");
14265
- const scope = await chunkGO2NICMM_cjs.resolveDocScope(c, db, { rootId });
14265
+ const scope = await chunkTKIBLXSL_cjs.resolveDocScope(c, db, { rootId });
14266
14266
  if (!scope) {
14267
14267
  return c.json({ error: "Document not found" }, 404);
14268
14268
  }
14269
14269
  if (!scope.docType?.settings?.versioning) {
14270
14270
  return c.json({ error: "Versioning not enabled for this type" }, 404);
14271
14271
  }
14272
- const denied = await chunkGO2NICMM_cjs.denyIfNotAllowed(c, db, rootId, "update", scope.docType?.settings, scope.tenantId);
14272
+ const denied = await chunkTKIBLXSL_cjs.denyIfNotAllowed(c, db, rootId, "update", scope.docType?.settings, scope.tenantId);
14273
14273
  if (denied) return denied;
14274
14274
  const row = await db.prepare("SELECT * FROM documents WHERE root_id = ? AND tenant_id = ? AND version_number = ? LIMIT 1").bind(rootId, scope.tenantId, Number(versionNumber)).first();
14275
14275
  if (!row) {
@@ -14292,7 +14292,7 @@ routes.post("/:rootId/restore/:versionNumber", async (c) => {
14292
14292
  var routes_default = routes;
14293
14293
 
14294
14294
  // src/plugins/core-plugins/versioning-plugin/index.ts
14295
- var versioningPlugin = chunkISIRU7AK_cjs.definePlugin({
14295
+ var versioningPlugin = chunkOWNSD75H_cjs.definePlugin({
14296
14296
  id: "versioning",
14297
14297
  version: "1.0.0",
14298
14298
  name: "Versioning",
@@ -14369,8 +14369,8 @@ function createMagicLinkAuthPlugin() {
14369
14369
  const baseUrl = new URL(c.req.url).origin;
14370
14370
  const magicLink = `${baseUrl}/auth/magic-link/verify?token=${token}`;
14371
14371
  try {
14372
- if (chunkGO2NICMM_cjs.hasEmailService()) {
14373
- await chunkGO2NICMM_cjs.getEmailService().send({
14372
+ if (chunkTKIBLXSL_cjs.hasEmailService()) {
14373
+ await chunkTKIBLXSL_cjs.getEmailService().send({
14374
14374
  to: normalizedEmail,
14375
14375
  subject: "Your Magic Link to Sign In",
14376
14376
  flow: "magic-link",
@@ -14447,19 +14447,19 @@ function createMagicLinkAuthPlugin() {
14447
14447
  SET used = 1, used_at = ?
14448
14448
  WHERE id = ?
14449
14449
  `).bind(Date.now(), magicLink.id).run();
14450
- const tokenTtl = await chunkWACUJVXY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
14451
- const jwtToken = await chunkWACUJVXY_cjs.AuthManager.generateToken(
14450
+ const tokenTtl = await chunk7O443QPZ_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
14451
+ const jwtToken = await chunk7O443QPZ_cjs.AuthManager.generateToken(
14452
14452
  user.id,
14453
14453
  user.email,
14454
14454
  user.role,
14455
14455
  c.env.JWT_SECRET,
14456
14456
  tokenTtl
14457
14457
  );
14458
- chunkWACUJVXY_cjs.AuthManager.setAuthCookie(c, jwtToken, { maxAge: tokenTtl });
14458
+ chunk7O443QPZ_cjs.AuthManager.setAuthCookie(c, jwtToken, { maxAge: tokenTtl });
14459
14459
  await db.prepare(`
14460
14460
  UPDATE auth_user SET last_login_at = ? WHERE id = ?
14461
14461
  `).bind(Date.now(), user.id).run();
14462
- chunkGO2NICMM_cjs.dispatchHookEvent(
14462
+ chunkTKIBLXSL_cjs.dispatchHookEvent(
14463
14463
  c,
14464
14464
  "auth:magic-link:consumed",
14465
14465
  { user: { id: user.id, email: user.email, role: user.role } },
@@ -14944,7 +14944,7 @@ async function warmCollections(db) {
14944
14944
  const collectionCache = chunkYA3TJ65D_cjs.getCacheService(config);
14945
14945
  let count = 0;
14946
14946
  try {
14947
- const results = chunkOECDF2RF_cjs.getCollectionRegistry().listActive().map(chunkOECDF2RF_cjs.collectionRecordToRow);
14947
+ const results = chunkMJ63JSTU_cjs.getCollectionRegistry().listActive().map(chunkMJ63JSTU_cjs.collectionRecordToRow);
14948
14948
  for (const collection of results) {
14949
14949
  const key = collectionCache.generateKey("item", collection.id);
14950
14950
  await collectionCache.set(key, collection);
@@ -15215,7 +15215,7 @@ function renderCacheDashboard(data) {
15215
15215
  </script>
15216
15216
 
15217
15217
  <!-- Confirmation Dialogs -->
15218
- ${chunkGO2NICMM_cjs.renderConfirmationDialog({
15218
+ ${chunkTKIBLXSL_cjs.renderConfirmationDialog({
15219
15219
  id: "clear-all-cache-confirm",
15220
15220
  title: "Clear All Cache",
15221
15221
  message: "Are you sure you want to clear all cache entries? This cannot be undone.",
@@ -15226,7 +15226,7 @@ function renderCacheDashboard(data) {
15226
15226
  onConfirm: "performClearAllCaches()"
15227
15227
  })}
15228
15228
 
15229
- ${chunkGO2NICMM_cjs.renderConfirmationDialog({
15229
+ ${chunkTKIBLXSL_cjs.renderConfirmationDialog({
15230
15230
  id: "clear-namespace-cache-confirm",
15231
15231
  title: "Clear Namespace Cache",
15232
15232
  message: "Clear cache for this namespace?",
@@ -15237,7 +15237,7 @@ function renderCacheDashboard(data) {
15237
15237
  onConfirm: "performClearNamespaceCache()"
15238
15238
  })}
15239
15239
 
15240
- ${chunkGO2NICMM_cjs.getConfirmationDialogScript()}
15240
+ ${chunkTKIBLXSL_cjs.getConfirmationDialogScript()}
15241
15241
  `;
15242
15242
  const layoutData = {
15243
15243
  title: "Cache System",
@@ -15503,7 +15503,7 @@ app.get("/", async (c) => {
15503
15503
  const totalRequests = totalHits + totalMisses;
15504
15504
  const overallHitRate = totalRequests > 0 ? totalHits / totalRequests * 100 : 0;
15505
15505
  const DEFAULT_TTL = chunkYA3TJ65D_cjs.CACHE_CONFIGS.api?.ttl ?? 300;
15506
- const collections = chunkOECDF2RF_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => {
15506
+ const collections = chunkMJ63JSTU_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => {
15507
15507
  const cacheOverride = r.cache;
15508
15508
  const cacheEnabled = cacheOverride?.enabled !== false;
15509
15509
  const hasCustomTtl = typeof cacheOverride?.ttl === "number";
@@ -16040,16 +16040,16 @@ var faviconSvg = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
16040
16040
  // src/app.ts
16041
16041
  function createSonicJSApp(config = {}) {
16042
16042
  const app2 = new hono.Hono();
16043
- const appVersion = config.version || chunk7RY3YKI7_cjs.getCoreVersion();
16043
+ const appVersion = config.version || chunkYAKNRVAB_cjs.getCoreVersion();
16044
16044
  const appName = config.name || "SonicJS AI";
16045
- const hookSystem = new chunk5QVYEAVV_cjs.HookSystemImpl();
16045
+ const hookSystem = new chunkXXNQTYXA_cjs.HookSystemImpl();
16046
16046
  chunkJ6JTWD2A_cjs.setHookSystem(hookSystem);
16047
16047
  const magicLinkPlugin = createMagicLinkAuthPlugin();
16048
16048
  const corePluginsBeforeCatchAll = [
16049
16049
  securityAuditPlugin,
16050
16050
  aiSearchPlugin,
16051
16051
  oauthProvidersPlugin,
16052
- chunkGO2NICMM_cjs.userProfilesPlugin,
16052
+ chunkTKIBLXSL_cjs.userProfilesPlugin,
16053
16053
  otpLoginPlugin,
16054
16054
  analyticsPlugin,
16055
16055
  stripePlugin,
@@ -16059,23 +16059,23 @@ function createSonicJSApp(config = {}) {
16059
16059
  shortcodesPlugin,
16060
16060
  helloWorldPlugin,
16061
16061
  multiTenantPlugin,
16062
- chunkGO2NICMM_cjs.lexicalEditorPlugin,
16062
+ chunkTKIBLXSL_cjs.lexicalEditorPlugin,
16063
16063
  versioningPlugin
16064
16064
  ];
16065
16065
  const corePluginsAfterCatchAll = [emailPluginV3, magicLinkPlugin, emailReconciliationPlugin];
16066
- const wirePlugins = chunk5QVYEAVV_cjs.createPluginWirer(
16066
+ const wirePlugins = chunkXXNQTYXA_cjs.createPluginWirer(
16067
16067
  () => [...corePluginsBeforeCatchAll, ...corePluginsAfterCatchAll, ...config.plugins?.register ?? []],
16068
16068
  // The capability-gated `ctx.cap.email` resolves to the app EmailService, which
16069
16069
  // is initialized (below) just before wiring on the first request.
16070
16070
  () => ({
16071
16071
  hooks: hookSystem,
16072
16072
  env: firstRequestEnv,
16073
- providers: { email: () => chunkGO2NICMM_cjs.getEmailService() }
16073
+ providers: { email: () => chunkTKIBLXSL_cjs.getEmailService() }
16074
16074
  })
16075
16075
  );
16076
16076
  let firstRequestEnv;
16077
16077
  const initEmailService = async (env = {}) => {
16078
- if (chunkGO2NICMM_cjs.hasEmailService()) return;
16078
+ if (chunkTKIBLXSL_cjs.hasEmailService()) return;
16079
16079
  let provider;
16080
16080
  let defaultFrom = config.email?.from;
16081
16081
  let defaultReplyTo;
@@ -16110,14 +16110,14 @@ function createSonicJSApp(config = {}) {
16110
16110
  }
16111
16111
  }
16112
16112
  defaultFrom = defaultFrom || env.DEFAULT_FROM_EMAIL || "noreply@sonicjs.local";
16113
- chunkGO2NICMM_cjs.setEmailService(new EmailService({ provider, defaultFrom, defaultReplyTo, db: env.DB }));
16113
+ chunkTKIBLXSL_cjs.setEmailService(new EmailService({ provider, defaultFrom, defaultReplyTo, db: env.DB }));
16114
16114
  };
16115
16115
  app2.use("*", async (c, next) => {
16116
16116
  c.set("appVersion", appVersion);
16117
16117
  await next();
16118
16118
  });
16119
- app2.use("*", chunkWACUJVXY_cjs.metricsMiddleware());
16120
- app2.use("*", chunkWACUJVXY_cjs.bootstrapMiddleware(config));
16119
+ app2.use("*", chunk7O443QPZ_cjs.metricsMiddleware());
16120
+ app2.use("*", chunk7O443QPZ_cjs.bootstrapMiddleware(config));
16121
16121
  const boot = async (env) => {
16122
16122
  if (config.plugins?.disableAll) return;
16123
16123
  firstRequestEnv = env;
@@ -16144,8 +16144,8 @@ function createSonicJSApp(config = {}) {
16144
16144
  app2.use("*", async (_c, next) => {
16145
16145
  await next();
16146
16146
  });
16147
- app2.use("*", chunkWACUJVXY_cjs.securityHeadersMiddleware());
16148
- app2.use("*", chunkWACUJVXY_cjs.csrfProtection());
16147
+ app2.use("*", chunk7O443QPZ_cjs.securityHeadersMiddleware());
16148
+ app2.use("*", chunk7O443QPZ_cjs.csrfProtection());
16149
16149
  app2.use("*", async (c, next) => {
16150
16150
  try {
16151
16151
  const reqUrl = new URL(c.req.url);
@@ -16182,9 +16182,9 @@ function createSonicJSApp(config = {}) {
16182
16182
  app2.use("*", middleware);
16183
16183
  }
16184
16184
  }
16185
- app2.use("*", chunkOECDF2RF_cjs.tenantMiddleware());
16186
- app2.use("/admin/*", chunkWACUJVXY_cjs.requireAuth());
16187
- app2.use("/admin/*", chunkWACUJVXY_cjs.requireRbac("portal", "access"));
16185
+ app2.use("*", chunkMJ63JSTU_cjs.tenantMiddleware());
16186
+ app2.use("/admin/*", chunk7O443QPZ_cjs.requireAuth());
16187
+ app2.use("/admin/*", chunk7O443QPZ_cjs.requireRbac("portal", "access"));
16188
16188
  app2.use("/admin/*", pluginMenuMiddleware());
16189
16189
  const NAV_LANDING = [
16190
16190
  { path: "/admin/content", perm: "content:read" },
@@ -16230,43 +16230,43 @@ function createSonicJSApp(config = {}) {
16230
16230
  });
16231
16231
  app2.route("/api/security-audit", apiRoutes2);
16232
16232
  app2.route("/admin/plugins/security-audit", adminRoutes3);
16233
- app2.route("/api/media", chunkGO2NICMM_cjs.api_media_default);
16234
- app2.route("/api/system", chunkGO2NICMM_cjs.api_system_default);
16235
- app2.route("/api/documents", chunkGO2NICMM_cjs.apiDocumentsRoutes);
16236
- app2.route("/api", chunkGO2NICMM_cjs.api_default);
16237
- app2.route("/admin/documents", chunkGO2NICMM_cjs.adminDocumentsRoutes);
16238
- chunk5QVYEAVV_cjs.registerPluginRoutes(app2, [formsPlugin], { source: "core" });
16239
- app2.route("/admin/api", chunkGO2NICMM_cjs.admin_api_default);
16240
- app2.route("/admin/collections", chunkGO2NICMM_cjs.adminCollectionsRoutes);
16241
- app2.route("/admin/settings", chunkGO2NICMM_cjs.adminSettingsRoutes);
16242
- app2.route("/admin/api-reference", chunkGO2NICMM_cjs.router2);
16233
+ app2.route("/api/media", chunkTKIBLXSL_cjs.api_media_default);
16234
+ app2.route("/api/system", chunkTKIBLXSL_cjs.api_system_default);
16235
+ app2.route("/api/documents", chunkTKIBLXSL_cjs.apiDocumentsRoutes);
16236
+ app2.route("/api", chunkTKIBLXSL_cjs.api_default);
16237
+ app2.route("/admin/documents", chunkTKIBLXSL_cjs.adminDocumentsRoutes);
16238
+ chunkXXNQTYXA_cjs.registerPluginRoutes(app2, [formsPlugin], { source: "core" });
16239
+ app2.route("/admin/api", chunkTKIBLXSL_cjs.admin_api_default);
16240
+ app2.route("/admin/collections", chunkTKIBLXSL_cjs.adminCollectionsRoutes);
16241
+ app2.route("/admin/settings", chunkTKIBLXSL_cjs.adminSettingsRoutes);
16242
+ app2.route("/admin/api-reference", chunkTKIBLXSL_cjs.router2);
16243
16243
  app2.route("/admin/database-tools", createDatabaseToolsAdminRoutes());
16244
- app2.route("/admin/content", chunkGO2NICMM_cjs.admin_content_default);
16245
- app2.route("/admin/media", chunkGO2NICMM_cjs.adminMediaRoutes);
16244
+ app2.route("/admin/content", chunkTKIBLXSL_cjs.admin_content_default);
16245
+ app2.route("/admin/media", chunkTKIBLXSL_cjs.adminMediaRoutes);
16246
16246
  app2.use("/auth/*", securityAuditMiddleware());
16247
16247
  if (!config.plugins?.disableAll) {
16248
- chunk5QVYEAVV_cjs.registerPluginRoutes(app2, corePluginsBeforeCatchAll, { source: "core" });
16248
+ chunkXXNQTYXA_cjs.registerPluginRoutes(app2, corePluginsBeforeCatchAll, { source: "core" });
16249
16249
  app2.route("/admin/cache", cache_default.getRoutes());
16250
16250
  if (config.plugins?.register && config.plugins.register.length > 0) {
16251
- chunk5QVYEAVV_cjs.registerPluginRoutes(app2, config.plugins.register, { source: "user" });
16251
+ chunkXXNQTYXA_cjs.registerPluginRoutes(app2, config.plugins.register, { source: "user" });
16252
16252
  }
16253
16253
  }
16254
16254
  app2.route("/api/events", apiRoutes4);
16255
- app2.route("/admin/dashboard", chunkGO2NICMM_cjs.router);
16256
- app2.route("/admin/plugins", chunkGO2NICMM_cjs.adminPluginRoutes);
16257
- app2.route("/admin/logs", chunkGO2NICMM_cjs.adminLogsRoutes);
16255
+ app2.route("/admin/dashboard", chunkTKIBLXSL_cjs.router);
16256
+ app2.route("/admin/plugins", chunkTKIBLXSL_cjs.adminPluginRoutes);
16257
+ app2.route("/admin/logs", chunkTKIBLXSL_cjs.adminLogsRoutes);
16258
16258
  app2.route("/admin/rbac", adminRbacRoutes);
16259
- app2.route("/admin", chunkGO2NICMM_cjs.userRoutes);
16260
- app2.route("/auth", chunkGO2NICMM_cjs.auth_default);
16259
+ app2.route("/admin", chunkTKIBLXSL_cjs.userRoutes);
16260
+ app2.route("/auth", chunkTKIBLXSL_cjs.auth_default);
16261
16261
  app2.on(["GET", "POST"], "/auth/*", (c) => {
16262
16262
  const reqUrl = new URL(c.req.url);
16263
16263
  const requestBaseURL = `${reqUrl.protocol}//${reqUrl.host}`;
16264
16264
  const auth = chunkNUKJ54GA_cjs.createAuth(c.env, config.auth?.extendBetterAuth, requestBaseURL);
16265
16265
  return auth.handler(c.req.raw);
16266
16266
  });
16267
- app2.route("/", chunkGO2NICMM_cjs.test_cleanup_default);
16267
+ app2.route("/", chunkTKIBLXSL_cjs.test_cleanup_default);
16268
16268
  if (!config.plugins?.disableAll) {
16269
- chunk5QVYEAVV_cjs.registerPluginRoutes(app2, corePluginsAfterCatchAll, { source: "core" });
16269
+ chunkXXNQTYXA_cjs.registerPluginRoutes(app2, corePluginsAfterCatchAll, { source: "core" });
16270
16270
  }
16271
16271
  if (!config.plugins?.disableAll) {
16272
16272
  const allMountedPlugins = [
@@ -16275,8 +16275,8 @@ function createSonicJSApp(config = {}) {
16275
16275
  ...corePluginsAfterCatchAll,
16276
16276
  ...config.plugins?.register ?? []
16277
16277
  ];
16278
- chunk5QVYEAVV_cjs.setPluginMenu(allMountedPlugins.flatMap((p) => p.menu ?? []));
16279
- chunkISIRU7AK_cjs.setPluginDefinitions(allMountedPlugins);
16278
+ chunkXXNQTYXA_cjs.setPluginMenu(allMountedPlugins.flatMap((p) => p.menu ?? []));
16279
+ chunkOWNSD75H_cjs.setPluginDefinitions(allMountedPlugins);
16280
16280
  }
16281
16281
  app2.get("/favicon.svg", (c) => {
16282
16282
  return new Response(faviconSvg, {
@@ -16329,7 +16329,7 @@ function createSonicJSApp(config = {}) {
16329
16329
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
16330
16330
  });
16331
16331
  });
16332
- chunkBDDABDAB_cjs.setAppInstance(app2);
16332
+ chunk4BTBSXMR_cjs.setAppInstance(app2);
16333
16333
  app2.notFound((c) => {
16334
16334
  return c.json({ error: "Not Found", status: 404 }, 404);
16335
16335
  });
@@ -19768,7 +19768,7 @@ function createRedirectApiRoutes() {
19768
19768
  });
19769
19769
  return api;
19770
19770
  }
19771
- var redirectPlugin = chunkISIRU7AK_cjs.definePlugin({
19771
+ var redirectPlugin = chunkOWNSD75H_cjs.definePlugin({
19772
19772
  id: manifest_default3.id,
19773
19773
  version: manifest_default3.version,
19774
19774
  name: manifest_default3.name,
@@ -19786,7 +19786,7 @@ var redirectPlugin = chunkISIRU7AK_cjs.definePlugin({
19786
19786
  async onBoot(ctx) {
19787
19787
  const db = ctx.env?.DB;
19788
19788
  if (!db) return;
19789
- const registry = new chunkWACUJVXY_cjs.DocumentTypeRegistry(db);
19789
+ const registry = new chunk7O443QPZ_cjs.DocumentTypeRegistry(db);
19790
19790
  await registry.register({
19791
19791
  id: "redirect",
19792
19792
  name: "redirect",
@@ -19902,99 +19902,99 @@ function createDb(d1$1) {
19902
19902
  }
19903
19903
 
19904
19904
  // src/index.ts
19905
- var VERSION = chunk7RY3YKI7_cjs.package_default.version;
19905
+ var VERSION = chunkYAKNRVAB_cjs.package_default.version;
19906
19906
 
19907
19907
  Object.defineProperty(exports, "ROUTES_INFO", {
19908
19908
  enumerable: true,
19909
- get: function () { return chunkGO2NICMM_cjs.ROUTES_INFO; }
19909
+ get: function () { return chunkTKIBLXSL_cjs.ROUTES_INFO; }
19910
19910
  });
19911
19911
  Object.defineProperty(exports, "adminApiRoutes", {
19912
19912
  enumerable: true,
19913
- get: function () { return chunkGO2NICMM_cjs.admin_api_default; }
19913
+ get: function () { return chunkTKIBLXSL_cjs.admin_api_default; }
19914
19914
  });
19915
19915
  Object.defineProperty(exports, "adminCheckboxRoutes", {
19916
19916
  enumerable: true,
19917
- get: function () { return chunkGO2NICMM_cjs.adminCheckboxRoutes; }
19917
+ get: function () { return chunkTKIBLXSL_cjs.adminCheckboxRoutes; }
19918
19918
  });
19919
19919
  Object.defineProperty(exports, "adminCollectionsRoutes", {
19920
19920
  enumerable: true,
19921
- get: function () { return chunkGO2NICMM_cjs.adminCollectionsRoutes; }
19921
+ get: function () { return chunkTKIBLXSL_cjs.adminCollectionsRoutes; }
19922
19922
  });
19923
19923
  Object.defineProperty(exports, "adminContentRoutes", {
19924
19924
  enumerable: true,
19925
- get: function () { return chunkGO2NICMM_cjs.admin_content_default; }
19925
+ get: function () { return chunkTKIBLXSL_cjs.admin_content_default; }
19926
19926
  });
19927
19927
  Object.defineProperty(exports, "adminDashboardRoutes", {
19928
19928
  enumerable: true,
19929
- get: function () { return chunkGO2NICMM_cjs.router; }
19929
+ get: function () { return chunkTKIBLXSL_cjs.router; }
19930
19930
  });
19931
19931
  Object.defineProperty(exports, "adminLogsRoutes", {
19932
19932
  enumerable: true,
19933
- get: function () { return chunkGO2NICMM_cjs.adminLogsRoutes; }
19933
+ get: function () { return chunkTKIBLXSL_cjs.adminLogsRoutes; }
19934
19934
  });
19935
19935
  Object.defineProperty(exports, "adminMediaRoutes", {
19936
19936
  enumerable: true,
19937
- get: function () { return chunkGO2NICMM_cjs.adminMediaRoutes; }
19937
+ get: function () { return chunkTKIBLXSL_cjs.adminMediaRoutes; }
19938
19938
  });
19939
19939
  Object.defineProperty(exports, "adminPluginRoutes", {
19940
19940
  enumerable: true,
19941
- get: function () { return chunkGO2NICMM_cjs.adminPluginRoutes; }
19941
+ get: function () { return chunkTKIBLXSL_cjs.adminPluginRoutes; }
19942
19942
  });
19943
19943
  Object.defineProperty(exports, "adminSettingsRoutes", {
19944
19944
  enumerable: true,
19945
- get: function () { return chunkGO2NICMM_cjs.adminSettingsRoutes; }
19945
+ get: function () { return chunkTKIBLXSL_cjs.adminSettingsRoutes; }
19946
19946
  });
19947
19947
  Object.defineProperty(exports, "adminUsersRoutes", {
19948
19948
  enumerable: true,
19949
- get: function () { return chunkGO2NICMM_cjs.userRoutes; }
19949
+ get: function () { return chunkTKIBLXSL_cjs.userRoutes; }
19950
19950
  });
19951
19951
  Object.defineProperty(exports, "apiContentCrudRoutes", {
19952
19952
  enumerable: true,
19953
- get: function () { return chunkGO2NICMM_cjs.api_content_crud_default; }
19953
+ get: function () { return chunkTKIBLXSL_cjs.api_content_crud_default; }
19954
19954
  });
19955
19955
  Object.defineProperty(exports, "apiMediaRoutes", {
19956
19956
  enumerable: true,
19957
- get: function () { return chunkGO2NICMM_cjs.api_media_default; }
19957
+ get: function () { return chunkTKIBLXSL_cjs.api_media_default; }
19958
19958
  });
19959
19959
  Object.defineProperty(exports, "apiRoutes", {
19960
19960
  enumerable: true,
19961
- get: function () { return chunkGO2NICMM_cjs.api_default; }
19961
+ get: function () { return chunkTKIBLXSL_cjs.api_default; }
19962
19962
  });
19963
19963
  Object.defineProperty(exports, "apiSystemRoutes", {
19964
19964
  enumerable: true,
19965
- get: function () { return chunkGO2NICMM_cjs.api_system_default; }
19965
+ get: function () { return chunkTKIBLXSL_cjs.api_system_default; }
19966
19966
  });
19967
19967
  Object.defineProperty(exports, "authRoutes", {
19968
19968
  enumerable: true,
19969
- get: function () { return chunkGO2NICMM_cjs.auth_default; }
19969
+ get: function () { return chunkTKIBLXSL_cjs.auth_default; }
19970
19970
  });
19971
19971
  Object.defineProperty(exports, "createUserProfilesPlugin", {
19972
19972
  enumerable: true,
19973
- get: function () { return chunkGO2NICMM_cjs.createUserProfilesPlugin; }
19973
+ get: function () { return chunkTKIBLXSL_cjs.createUserProfilesPlugin; }
19974
19974
  });
19975
19975
  Object.defineProperty(exports, "defineUserProfile", {
19976
19976
  enumerable: true,
19977
- get: function () { return chunkGO2NICMM_cjs.defineUserProfile; }
19977
+ get: function () { return chunkTKIBLXSL_cjs.defineUserProfile; }
19978
19978
  });
19979
19979
  Object.defineProperty(exports, "getUserProfileConfig", {
19980
19980
  enumerable: true,
19981
- get: function () { return chunkGO2NICMM_cjs.getUserProfileConfig; }
19981
+ get: function () { return chunkTKIBLXSL_cjs.getUserProfileConfig; }
19982
19982
  });
19983
19983
  Object.defineProperty(exports, "userProfilesPlugin", {
19984
19984
  enumerable: true,
19985
- get: function () { return chunkGO2NICMM_cjs.userProfilesPlugin; }
19985
+ get: function () { return chunkTKIBLXSL_cjs.userProfilesPlugin; }
19986
19986
  });
19987
19987
  Object.defineProperty(exports, "Logger", {
19988
19988
  enumerable: true,
19989
- get: function () { return chunkBDDABDAB_cjs.Logger; }
19989
+ get: function () { return chunk4BTBSXMR_cjs.Logger; }
19990
19990
  });
19991
19991
  Object.defineProperty(exports, "getLogger", {
19992
19992
  enumerable: true,
19993
- get: function () { return chunkBDDABDAB_cjs.getLogger; }
19993
+ get: function () { return chunk4BTBSXMR_cjs.getLogger; }
19994
19994
  });
19995
19995
  Object.defineProperty(exports, "initLogger", {
19996
19996
  enumerable: true,
19997
- get: function () { return chunkBDDABDAB_cjs.initLogger; }
19997
+ get: function () { return chunk4BTBSXMR_cjs.initLogger; }
19998
19998
  });
19999
19999
  Object.defineProperty(exports, "apiTokens", {
20000
20000
  enumerable: true,
@@ -20138,87 +20138,87 @@ Object.defineProperty(exports, "workflowHistory", {
20138
20138
  });
20139
20139
  Object.defineProperty(exports, "AuthManager", {
20140
20140
  enumerable: true,
20141
- get: function () { return chunkWACUJVXY_cjs.AuthManager; }
20141
+ get: function () { return chunk7O443QPZ_cjs.AuthManager; }
20142
20142
  });
20143
20143
  Object.defineProperty(exports, "PermissionManager", {
20144
20144
  enumerable: true,
20145
- get: function () { return chunkWACUJVXY_cjs.PermissionManager; }
20145
+ get: function () { return chunk7O443QPZ_cjs.PermissionManager; }
20146
20146
  });
20147
20147
  Object.defineProperty(exports, "bootstrapDocumentTypes", {
20148
20148
  enumerable: true,
20149
- get: function () { return chunkWACUJVXY_cjs.bootstrapDocumentTypes; }
20149
+ get: function () { return chunk7O443QPZ_cjs.bootstrapDocumentTypes; }
20150
20150
  });
20151
20151
  Object.defineProperty(exports, "bootstrapMiddleware", {
20152
20152
  enumerable: true,
20153
- get: function () { return chunkWACUJVXY_cjs.bootstrapMiddleware; }
20153
+ get: function () { return chunk7O443QPZ_cjs.bootstrapMiddleware; }
20154
20154
  });
20155
20155
  Object.defineProperty(exports, "cacheHeaders", {
20156
20156
  enumerable: true,
20157
- get: function () { return chunkWACUJVXY_cjs.cacheHeaders; }
20157
+ get: function () { return chunk7O443QPZ_cjs.cacheHeaders; }
20158
20158
  });
20159
20159
  Object.defineProperty(exports, "compressionMiddleware", {
20160
20160
  enumerable: true,
20161
- get: function () { return chunkWACUJVXY_cjs.compressionMiddleware; }
20161
+ get: function () { return chunk7O443QPZ_cjs.compressionMiddleware; }
20162
20162
  });
20163
20163
  Object.defineProperty(exports, "detailedLoggingMiddleware", {
20164
20164
  enumerable: true,
20165
- get: function () { return chunkWACUJVXY_cjs.detailedLoggingMiddleware; }
20165
+ get: function () { return chunk7O443QPZ_cjs.detailedLoggingMiddleware; }
20166
20166
  });
20167
20167
  Object.defineProperty(exports, "getActivePlugins", {
20168
20168
  enumerable: true,
20169
- get: function () { return chunkWACUJVXY_cjs.getActivePlugins; }
20169
+ get: function () { return chunk7O443QPZ_cjs.getActivePlugins; }
20170
20170
  });
20171
20171
  Object.defineProperty(exports, "isPluginActive", {
20172
20172
  enumerable: true,
20173
- get: function () { return chunkWACUJVXY_cjs.isPluginActive; }
20173
+ get: function () { return chunk7O443QPZ_cjs.isPluginActive; }
20174
20174
  });
20175
20175
  Object.defineProperty(exports, "logActivity", {
20176
20176
  enumerable: true,
20177
- get: function () { return chunkWACUJVXY_cjs.logActivity; }
20177
+ get: function () { return chunk7O443QPZ_cjs.logActivity; }
20178
20178
  });
20179
20179
  Object.defineProperty(exports, "loggingMiddleware", {
20180
20180
  enumerable: true,
20181
- get: function () { return chunkWACUJVXY_cjs.loggingMiddleware; }
20181
+ get: function () { return chunk7O443QPZ_cjs.loggingMiddleware; }
20182
20182
  });
20183
20183
  Object.defineProperty(exports, "optionalAuth", {
20184
20184
  enumerable: true,
20185
- get: function () { return chunkWACUJVXY_cjs.optionalAuth; }
20185
+ get: function () { return chunk7O443QPZ_cjs.optionalAuth; }
20186
20186
  });
20187
20187
  Object.defineProperty(exports, "performanceLoggingMiddleware", {
20188
20188
  enumerable: true,
20189
- get: function () { return chunkWACUJVXY_cjs.performanceLoggingMiddleware; }
20189
+ get: function () { return chunk7O443QPZ_cjs.performanceLoggingMiddleware; }
20190
20190
  });
20191
20191
  Object.defineProperty(exports, "requireActivePlugin", {
20192
20192
  enumerable: true,
20193
- get: function () { return chunkWACUJVXY_cjs.requireActivePlugin; }
20193
+ get: function () { return chunk7O443QPZ_cjs.requireActivePlugin; }
20194
20194
  });
20195
20195
  Object.defineProperty(exports, "requireActivePlugins", {
20196
20196
  enumerable: true,
20197
- get: function () { return chunkWACUJVXY_cjs.requireActivePlugins; }
20197
+ get: function () { return chunk7O443QPZ_cjs.requireActivePlugins; }
20198
20198
  });
20199
20199
  Object.defineProperty(exports, "requireAnyPermission", {
20200
20200
  enumerable: true,
20201
- get: function () { return chunkWACUJVXY_cjs.requireAnyPermission; }
20201
+ get: function () { return chunk7O443QPZ_cjs.requireAnyPermission; }
20202
20202
  });
20203
20203
  Object.defineProperty(exports, "requireAuth", {
20204
20204
  enumerable: true,
20205
- get: function () { return chunkWACUJVXY_cjs.requireAuth; }
20205
+ get: function () { return chunk7O443QPZ_cjs.requireAuth; }
20206
20206
  });
20207
20207
  Object.defineProperty(exports, "requirePermission", {
20208
20208
  enumerable: true,
20209
- get: function () { return chunkWACUJVXY_cjs.requirePermission; }
20209
+ get: function () { return chunk7O443QPZ_cjs.requirePermission; }
20210
20210
  });
20211
20211
  Object.defineProperty(exports, "requireRole", {
20212
20212
  enumerable: true,
20213
- get: function () { return chunkWACUJVXY_cjs.requireRole; }
20213
+ get: function () { return chunk7O443QPZ_cjs.requireRole; }
20214
20214
  });
20215
20215
  Object.defineProperty(exports, "securityHeaders", {
20216
20216
  enumerable: true,
20217
- get: function () { return chunkWACUJVXY_cjs.securityHeadersMiddleware; }
20217
+ get: function () { return chunk7O443QPZ_cjs.securityHeadersMiddleware; }
20218
20218
  });
20219
20219
  Object.defineProperty(exports, "securityLoggingMiddleware", {
20220
20220
  enumerable: true,
20221
- get: function () { return chunkWACUJVXY_cjs.securityLoggingMiddleware; }
20221
+ get: function () { return chunk7O443QPZ_cjs.securityLoggingMiddleware; }
20222
20222
  });
20223
20223
  Object.defineProperty(exports, "RbacService", {
20224
20224
  enumerable: true,
@@ -20226,35 +20226,35 @@ Object.defineProperty(exports, "RbacService", {
20226
20226
  });
20227
20227
  Object.defineProperty(exports, "PluginBootstrapService", {
20228
20228
  enumerable: true,
20229
- get: function () { return chunkOECDF2RF_cjs.PluginBootstrapService; }
20229
+ get: function () { return chunkMJ63JSTU_cjs.PluginBootstrapService; }
20230
20230
  });
20231
20231
  Object.defineProperty(exports, "PluginServiceClass", {
20232
20232
  enumerable: true,
20233
- get: function () { return chunkOECDF2RF_cjs.PluginService; }
20233
+ get: function () { return chunkMJ63JSTU_cjs.PluginService; }
20234
20234
  });
20235
20235
  Object.defineProperty(exports, "getAvailableCollectionNames", {
20236
20236
  enumerable: true,
20237
- get: function () { return chunkOECDF2RF_cjs.getAvailableCollectionNames; }
20237
+ get: function () { return chunkMJ63JSTU_cjs.getAvailableCollectionNames; }
20238
20238
  });
20239
20239
  Object.defineProperty(exports, "loadCollectionConfig", {
20240
20240
  enumerable: true,
20241
- get: function () { return chunkOECDF2RF_cjs.loadCollectionConfig; }
20241
+ get: function () { return chunkMJ63JSTU_cjs.loadCollectionConfig; }
20242
20242
  });
20243
20243
  Object.defineProperty(exports, "loadCollectionConfigs", {
20244
20244
  enumerable: true,
20245
- get: function () { return chunkOECDF2RF_cjs.loadCollectionConfigs; }
20245
+ get: function () { return chunkMJ63JSTU_cjs.loadCollectionConfigs; }
20246
20246
  });
20247
20247
  Object.defineProperty(exports, "registerCollections", {
20248
20248
  enumerable: true,
20249
- get: function () { return chunkOECDF2RF_cjs.registerCollections; }
20249
+ get: function () { return chunkMJ63JSTU_cjs.registerCollections; }
20250
20250
  });
20251
20251
  Object.defineProperty(exports, "validateCollectionConfig", {
20252
20252
  enumerable: true,
20253
- get: function () { return chunkOECDF2RF_cjs.validateCollectionConfig; }
20253
+ get: function () { return chunkMJ63JSTU_cjs.validateCollectionConfig; }
20254
20254
  });
20255
20255
  Object.defineProperty(exports, "MigrationService", {
20256
20256
  enumerable: true,
20257
- get: function () { return chunk2RJDEVB3_cjs.MigrationService; }
20257
+ get: function () { return chunkGVGURCFM_cjs.MigrationService; }
20258
20258
  });
20259
20259
  Object.defineProperty(exports, "renderFilterBar", {
20260
20260
  enumerable: true,
@@ -20288,101 +20288,105 @@ Object.defineProperty(exports, "renderTable", {
20288
20288
  enumerable: true,
20289
20289
  get: function () { return chunkMVIZJOO5_cjs.renderTable; }
20290
20290
  });
20291
+ Object.defineProperty(exports, "renderAdminLayoutCatalyst", {
20292
+ enumerable: true,
20293
+ get: function () { return chunkNAVPFIG5_cjs.renderAdminLayoutCatalyst; }
20294
+ });
20291
20295
  Object.defineProperty(exports, "HookSystemImpl", {
20292
20296
  enumerable: true,
20293
- get: function () { return chunk5QVYEAVV_cjs.HookSystemImpl; }
20297
+ get: function () { return chunkXXNQTYXA_cjs.HookSystemImpl; }
20294
20298
  });
20295
20299
  Object.defineProperty(exports, "HookUtils", {
20296
20300
  enumerable: true,
20297
- get: function () { return chunk5QVYEAVV_cjs.HookUtils; }
20301
+ get: function () { return chunkXXNQTYXA_cjs.HookUtils; }
20298
20302
  });
20299
20303
  Object.defineProperty(exports, "PluginDependencyCycleError", {
20300
20304
  enumerable: true,
20301
- get: function () { return chunk5QVYEAVV_cjs.PluginDependencyCycleError; }
20305
+ get: function () { return chunkXXNQTYXA_cjs.PluginDependencyCycleError; }
20302
20306
  });
20303
20307
  Object.defineProperty(exports, "PluginManagerClass", {
20304
20308
  enumerable: true,
20305
- get: function () { return chunk5QVYEAVV_cjs.PluginManager; }
20309
+ get: function () { return chunkXXNQTYXA_cjs.PluginManager; }
20306
20310
  });
20307
20311
  Object.defineProperty(exports, "PluginRegistryImpl", {
20308
20312
  enumerable: true,
20309
- get: function () { return chunk5QVYEAVV_cjs.PluginRegistryImpl; }
20313
+ get: function () { return chunkXXNQTYXA_cjs.PluginRegistryImpl; }
20310
20314
  });
20311
20315
  Object.defineProperty(exports, "PluginValidatorClass", {
20312
20316
  enumerable: true,
20313
- get: function () { return chunk5QVYEAVV_cjs.PluginValidator; }
20317
+ get: function () { return chunkXXNQTYXA_cjs.PluginValidator; }
20314
20318
  });
20315
20319
  Object.defineProperty(exports, "RegisterPluginsError", {
20316
20320
  enumerable: true,
20317
- get: function () { return chunk5QVYEAVV_cjs.RegisterPluginsError; }
20321
+ get: function () { return chunkXXNQTYXA_cjs.RegisterPluginsError; }
20318
20322
  });
20319
20323
  Object.defineProperty(exports, "ScopedHookSystemClass", {
20320
20324
  enumerable: true,
20321
- get: function () { return chunk5QVYEAVV_cjs.ScopedHookSystem; }
20325
+ get: function () { return chunkXXNQTYXA_cjs.ScopedHookSystem; }
20322
20326
  });
20323
20327
  Object.defineProperty(exports, "collectCronSchedules", {
20324
20328
  enumerable: true,
20325
- get: function () { return chunk5QVYEAVV_cjs.collectCronSchedules; }
20329
+ get: function () { return chunkXXNQTYXA_cjs.collectCronSchedules; }
20326
20330
  });
20327
20331
  Object.defineProperty(exports, "collectCrons", {
20328
20332
  enumerable: true,
20329
- get: function () { return chunk5QVYEAVV_cjs.collectCrons; }
20333
+ get: function () { return chunkXXNQTYXA_cjs.collectCrons; }
20330
20334
  });
20331
20335
  Object.defineProperty(exports, "createScheduledHandler", {
20332
20336
  enumerable: true,
20333
- get: function () { return chunk5QVYEAVV_cjs.createScheduledHandler; }
20337
+ get: function () { return chunkXXNQTYXA_cjs.createScheduledHandler; }
20334
20338
  });
20335
20339
  Object.defineProperty(exports, "dispatchCronTick", {
20336
20340
  enumerable: true,
20337
- get: function () { return chunk5QVYEAVV_cjs.dispatchCronTick; }
20341
+ get: function () { return chunkXXNQTYXA_cjs.dispatchCronTick; }
20338
20342
  });
20339
20343
  Object.defineProperty(exports, "getPluginMenu", {
20340
20344
  enumerable: true,
20341
- get: function () { return chunk5QVYEAVV_cjs.getPluginMenu; }
20345
+ get: function () { return chunkXXNQTYXA_cjs.getPluginMenu; }
20342
20346
  });
20343
20347
  Object.defineProperty(exports, "registerPlugins", {
20344
20348
  enumerable: true,
20345
- get: function () { return chunk5QVYEAVV_cjs.registerPlugins; }
20349
+ get: function () { return chunkXXNQTYXA_cjs.registerPlugins; }
20346
20350
  });
20347
20351
  Object.defineProperty(exports, "resetPluginMenu", {
20348
20352
  enumerable: true,
20349
- get: function () { return chunk5QVYEAVV_cjs.resetPluginMenu; }
20353
+ get: function () { return chunkXXNQTYXA_cjs.resetPluginMenu; }
20350
20354
  });
20351
20355
  Object.defineProperty(exports, "resolvePluginMenuItems", {
20352
20356
  enumerable: true,
20353
- get: function () { return chunk5QVYEAVV_cjs.resolvePluginMenuItems; }
20357
+ get: function () { return chunkXXNQTYXA_cjs.resolvePluginMenuItems; }
20354
20358
  });
20355
20359
  Object.defineProperty(exports, "setPluginMenu", {
20356
20360
  enumerable: true,
20357
- get: function () { return chunk5QVYEAVV_cjs.setPluginMenu; }
20361
+ get: function () { return chunkXXNQTYXA_cjs.setPluginMenu; }
20358
20362
  });
20359
20363
  Object.defineProperty(exports, "topoSort", {
20360
20364
  enumerable: true,
20361
- get: function () { return chunk5QVYEAVV_cjs.topoSort; }
20365
+ get: function () { return chunkXXNQTYXA_cjs.topoSort; }
20362
20366
  });
20363
20367
  Object.defineProperty(exports, "applySchemaDefaults", {
20364
20368
  enumerable: true,
20365
- get: function () { return chunkISIRU7AK_cjs.applySchemaDefaults; }
20369
+ get: function () { return chunkOWNSD75H_cjs.applySchemaDefaults; }
20366
20370
  });
20367
20371
  Object.defineProperty(exports, "definePlugin", {
20368
20372
  enumerable: true,
20369
- get: function () { return chunkISIRU7AK_cjs.definePlugin; }
20373
+ get: function () { return chunkOWNSD75H_cjs.definePlugin; }
20370
20374
  });
20371
20375
  Object.defineProperty(exports, "isDefinedPlugin", {
20372
20376
  enumerable: true,
20373
- get: function () { return chunkISIRU7AK_cjs.isDefinedPlugin; }
20377
+ get: function () { return chunkOWNSD75H_cjs.isDefinedPlugin; }
20374
20378
  });
20375
20379
  Object.defineProperty(exports, "parseConfigSchema", {
20376
20380
  enumerable: true,
20377
- get: function () { return chunkISIRU7AK_cjs.parseConfigSchema; }
20381
+ get: function () { return chunkOWNSD75H_cjs.parseConfigSchema; }
20378
20382
  });
20379
20383
  Object.defineProperty(exports, "parseFormDataToSettings", {
20380
20384
  enumerable: true,
20381
- get: function () { return chunkISIRU7AK_cjs.parseFormDataToSettings; }
20385
+ get: function () { return chunkOWNSD75H_cjs.parseFormDataToSettings; }
20382
20386
  });
20383
20387
  Object.defineProperty(exports, "renderSchemaFields", {
20384
20388
  enumerable: true,
20385
- get: function () { return chunkISIRU7AK_cjs.renderSchemaFields; }
20389
+ get: function () { return chunkOWNSD75H_cjs.renderSchemaFields; }
20386
20390
  });
20387
20391
  Object.defineProperty(exports, "getHookSystem", {
20388
20392
  enumerable: true,
@@ -20430,11 +20434,11 @@ Object.defineProperty(exports, "metricsTracker", {
20430
20434
  });
20431
20435
  Object.defineProperty(exports, "SONICJS_VERSION", {
20432
20436
  enumerable: true,
20433
- get: function () { return chunk7RY3YKI7_cjs.SONICJS_VERSION; }
20437
+ get: function () { return chunkYAKNRVAB_cjs.SONICJS_VERSION; }
20434
20438
  });
20435
20439
  Object.defineProperty(exports, "getCoreVersion", {
20436
20440
  enumerable: true,
20437
- get: function () { return chunk7RY3YKI7_cjs.getCoreVersion; }
20441
+ get: function () { return chunkYAKNRVAB_cjs.getCoreVersion; }
20438
20442
  });
20439
20443
  Object.defineProperty(exports, "escapeHtml", {
20440
20444
  enumerable: true,