@jmruthers/pace-core 0.5.136 → 0.5.139

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 (292) hide show
  1. package/dist/{DataTable-CYOHOX3O.js → DataTable-JXFCA2BJ.js} +10 -9
  2. package/dist/{EventLogo-801uofbR.d.ts → EventLogo-rFL_kRjk.d.ts} +73 -1
  3. package/dist/{UnifiedAuthProvider-5E5TUNMS.js → UnifiedAuthProvider-XIQQ7LVU.js} +4 -5
  4. package/dist/{chunk-YLKIDTUK.js → chunk-22WKWKRX.js} +4 -4
  5. package/dist/{chunk-TVYPTYOY.js → chunk-4C7EXCAR.js} +60 -24
  6. package/dist/chunk-4C7EXCAR.js.map +1 -0
  7. package/dist/{chunk-NOHEVYVX.js → chunk-5JMOHWDI.js} +417 -319
  8. package/dist/chunk-5JMOHWDI.js.map +1 -0
  9. package/dist/{chunk-FHWWBIHA.js → chunk-6DXZ6V5Q.js} +5 -5
  10. package/dist/{chunk-2TWNJ46Y.js → chunk-6LAAY47Q.js} +2 -2
  11. package/dist/{chunk-444EZN6N.js → chunk-7QCC6MCP.js} +88 -1
  12. package/dist/chunk-7QCC6MCP.js.map +1 -0
  13. package/dist/chunk-BJPBT3CU.js +21 -0
  14. package/dist/chunk-BJPBT3CU.js.map +1 -0
  15. package/dist/{chunk-L6PGMCMD.js → chunk-BOOI7GK2.js} +38 -12
  16. package/dist/chunk-BOOI7GK2.js.map +1 -0
  17. package/dist/{chunk-XARJS7CD.js → chunk-INQLMHPF.js} +2 -2
  18. package/dist/chunk-JISYG63F.js +70 -0
  19. package/dist/chunk-JISYG63F.js.map +1 -0
  20. package/dist/{chunk-SL2YQDR6.js → chunk-MA6EPSGZ.js} +2 -2
  21. package/dist/{chunk-5DPZ5EAT.js → chunk-OWAG3GSU.js} +1 -3
  22. package/dist/{chunk-LTV3XIJJ.js → chunk-T6JN6LH6.js} +4 -4
  23. package/dist/{chunk-HJGGOMQ6.js → chunk-TLT2ZR3L.js} +147 -103
  24. package/dist/chunk-TLT2ZR3L.js.map +1 -0
  25. package/dist/{chunk-4MT5BGGL.js → chunk-YCWDTTUK.js} +4 -6
  26. package/dist/{chunk-4MT5BGGL.js.map → chunk-YCWDTTUK.js.map} +1 -1
  27. package/dist/components.d.ts +1 -1
  28. package/dist/components.js +12 -11
  29. package/dist/components.js.map +1 -1
  30. package/dist/hooks.js +8 -9
  31. package/dist/hooks.js.map +1 -1
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +15 -14
  34. package/dist/index.js.map +1 -1
  35. package/dist/providers.js +3 -4
  36. package/dist/rbac/index.js +8 -9
  37. package/dist/schema-DTDZQe2u.d.ts +28 -0
  38. package/dist/types.d.ts +152 -3
  39. package/dist/types.js +51 -16
  40. package/dist/types.js.map +1 -1
  41. package/dist/utils.d.ts +89 -4
  42. package/dist/utils.js +214 -96
  43. package/dist/utils.js.map +1 -1
  44. package/dist/validation.d.ts +1 -343
  45. package/dist/validation.js +3 -100
  46. package/docs/api/classes/ColumnFactory.md +1 -1
  47. package/docs/api/classes/ErrorBoundary.md +1 -1
  48. package/docs/api/classes/InvalidScopeError.md +1 -1
  49. package/docs/api/classes/MissingUserContextError.md +1 -1
  50. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  51. package/docs/api/classes/PermissionDeniedError.md +1 -1
  52. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  53. package/docs/api/classes/RBACAuditManager.md +1 -1
  54. package/docs/api/classes/RBACCache.md +1 -1
  55. package/docs/api/classes/RBACEngine.md +1 -1
  56. package/docs/api/classes/RBACError.md +1 -1
  57. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  58. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  59. package/docs/api/classes/StorageUtils.md +1 -1
  60. package/docs/api/enums/FileCategory.md +1 -1
  61. package/docs/api/interfaces/AggregateConfig.md +1 -1
  62. package/docs/api/interfaces/BadgeProps.md +27 -0
  63. package/docs/api/interfaces/ButtonProps.md +1 -1
  64. package/docs/api/interfaces/CardProps.md +1 -1
  65. package/docs/api/interfaces/ColorPalette.md +1 -1
  66. package/docs/api/interfaces/ColorShade.md +1 -1
  67. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  68. package/docs/api/interfaces/DataRecord.md +1 -1
  69. package/docs/api/interfaces/DataTableAction.md +1 -1
  70. package/docs/api/interfaces/DataTableColumn.md +1 -1
  71. package/docs/api/interfaces/DataTableProps.md +1 -1
  72. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  73. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  74. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  75. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  76. package/docs/api/interfaces/EventLogoProps.md +1 -1
  77. package/docs/api/interfaces/ExportColumn.md +1 -1
  78. package/docs/api/interfaces/ExportOptions.md +1 -1
  79. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  80. package/docs/api/interfaces/FileMetadata.md +1 -1
  81. package/docs/api/interfaces/FileReference.md +1 -1
  82. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  83. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  84. package/docs/api/interfaces/FileUploadProps.md +1 -1
  85. package/docs/api/interfaces/FooterProps.md +1 -1
  86. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  87. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  88. package/docs/api/interfaces/InputProps.md +1 -1
  89. package/docs/api/interfaces/LabelProps.md +1 -1
  90. package/docs/api/interfaces/LoginFormProps.md +1 -1
  91. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  92. package/docs/api/interfaces/NavigationContextType.md +1 -1
  93. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  94. package/docs/api/interfaces/NavigationItem.md +1 -1
  95. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  96. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  97. package/docs/api/interfaces/Organisation.md +1 -1
  98. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  99. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  100. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  101. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  102. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  103. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  104. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  105. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  106. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  107. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  108. package/docs/api/interfaces/PaletteData.md +1 -1
  109. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  110. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  111. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  112. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  113. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  114. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  115. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  116. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  117. package/docs/api/interfaces/RBACConfig.md +1 -1
  118. package/docs/api/interfaces/RBACLogger.md +1 -1
  119. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  120. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  121. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  122. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  123. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  124. package/docs/api/interfaces/RouteConfig.md +1 -1
  125. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  126. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  127. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  128. package/docs/api/interfaces/StorageConfig.md +1 -1
  129. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  130. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  131. package/docs/api/interfaces/StorageListOptions.md +1 -1
  132. package/docs/api/interfaces/StorageListResult.md +1 -1
  133. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  134. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  135. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  136. package/docs/api/interfaces/StyleImport.md +1 -1
  137. package/docs/api/interfaces/SwitchProps.md +1 -1
  138. package/docs/api/interfaces/ToastActionElement.md +1 -1
  139. package/docs/api/interfaces/ToastProps.md +1 -1
  140. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  141. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  142. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  143. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  144. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  145. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  146. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  147. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  148. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  149. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  150. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  151. package/docs/api/interfaces/UserEventAccess.md +1 -1
  152. package/docs/api/interfaces/UserMenuProps.md +1 -1
  153. package/docs/api/interfaces/UserProfile.md +1 -1
  154. package/docs/api/modules.md +84 -15
  155. package/docs/architecture/README.md +0 -1
  156. package/docs/styles/README.md +0 -2
  157. package/examples/RBAC/CompleteRBACExample.tsx +324 -0
  158. package/examples/RBAC/EventBasedApp.tsx +239 -0
  159. package/examples/RBAC/PermissionExample.tsx +151 -0
  160. package/examples/RBAC/index.ts +13 -0
  161. package/examples/public-pages/CorrectPublicPageImplementation.tsx +301 -0
  162. package/examples/public-pages/PublicEventPage.tsx +274 -0
  163. package/examples/public-pages/PublicPageApp.tsx +308 -0
  164. package/examples/public-pages/PublicPageUsageExample.tsx +216 -0
  165. package/examples/public-pages/index.ts +14 -0
  166. package/package.json +1 -10
  167. package/src/__tests__/TEST_STANDARD.md +92 -0
  168. package/src/components/Badge/Badge.test.tsx +314 -0
  169. package/src/components/Badge/Badge.tsx +304 -0
  170. package/src/components/Badge/index.ts +3 -0
  171. package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +217 -0
  172. package/src/components/DataTable/__tests__/styles.test.ts +1 -1
  173. package/src/components/DataTable/components/ColumnFilter.tsx +8 -4
  174. package/src/components/DataTable/components/DataTableBody.tsx +461 -0
  175. package/src/components/DataTable/components/DraggableColumnHeader.tsx +144 -0
  176. package/src/components/DataTable/components/FilterRow.tsx +9 -3
  177. package/src/components/DataTable/components/PaginationControls.tsx +1 -0
  178. package/src/components/DataTable/components/VirtualizedDataTable.tsx +513 -0
  179. package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +14 -68
  180. package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +62 -0
  181. package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +43 -0
  182. package/src/components/DataTable/core/ActionManager.ts +235 -0
  183. package/src/components/DataTable/core/ColumnManager.ts +205 -0
  184. package/src/components/DataTable/core/DataManager.ts +188 -0
  185. package/src/components/DataTable/core/DataTableContext.tsx +181 -0
  186. package/src/components/DataTable/core/LocalDataAdapter.ts +273 -0
  187. package/src/components/DataTable/core/PluginRegistry.ts +229 -0
  188. package/src/components/DataTable/core/StateManager.ts +311 -0
  189. package/src/components/DataTable/core/interfaces.ts +338 -0
  190. package/src/components/DataTable/styles.ts +27 -6
  191. package/src/components/DataTable/utils/__tests__/columnUtils.test.ts +94 -0
  192. package/src/components/DataTable/utils/columnUtils.ts +40 -0
  193. package/src/components/DataTable/utils/debugTools.ts +609 -0
  194. package/src/components/DataTable/utils/index.ts +1 -0
  195. package/src/components/Dialog/README.md +804 -0
  196. package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +611 -0
  197. package/src/components/Dialog/utils/safeHtml.ts +185 -0
  198. package/src/components/Footer/Footer.test.tsx +1 -1
  199. package/src/components/Form/Form.test.tsx +1 -1
  200. package/src/components/Form/FormErrorSummary.tsx +113 -0
  201. package/src/components/Form/FormFieldset.tsx +127 -0
  202. package/src/components/Form/FormLiveRegion.tsx +198 -0
  203. package/src/components/LoginForm/LoginForm.test.tsx +1 -1
  204. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +76 -10
  205. package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -1
  206. package/src/components/PasswordReset/PasswordResetForm.test.tsx +597 -0
  207. package/src/components/PasswordReset/PasswordResetForm.tsx +201 -0
  208. package/src/components/PublicLayout/PublicPageDebugger.tsx +104 -0
  209. package/src/components/PublicLayout/PublicPageDiagnostic.tsx +162 -0
  210. package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +1 -1
  211. package/src/components/Select/Select.test.tsx +1 -1
  212. package/src/components/Select/Select.tsx +20 -8
  213. package/src/components/Table/__tests__/Table.test.tsx +1 -1
  214. package/src/components/index.ts +3 -0
  215. package/src/hooks/__tests__/useFileUrl.unit.test.ts +83 -85
  216. package/src/index.ts +4 -0
  217. package/src/rbac/hooks/useCan.test.ts +24 -0
  218. package/src/rbac/hooks/usePermissions.ts +49 -12
  219. package/src/styles/core.css +3 -0
  220. package/src/utils/appConfig.ts +47 -0
  221. package/src/utils/appIdResolver.test.ts +499 -0
  222. package/src/utils/appIdResolver.ts +130 -0
  223. package/src/utils/appNameResolver.simple.test.ts +212 -0
  224. package/src/utils/appNameResolver.test.ts +121 -0
  225. package/src/utils/appNameResolver.ts +191 -0
  226. package/src/utils/audit.ts +127 -0
  227. package/src/utils/auth-utils.ts +96 -0
  228. package/src/utils/bundleAnalysis.ts +129 -0
  229. package/src/utils/cn.ts +7 -0
  230. package/src/utils/debugLogger.ts +67 -0
  231. package/src/utils/deviceFingerprint.ts +215 -0
  232. package/src/utils/dynamicUtils.ts +105 -0
  233. package/src/utils/file-reference.test.ts +788 -0
  234. package/src/utils/file-reference.ts +519 -0
  235. package/src/utils/formatDate.test.ts +237 -0
  236. package/src/utils/formatting.ts +133 -0
  237. package/src/utils/index.ts +7 -0
  238. package/src/utils/lazyLoad.tsx +44 -0
  239. package/src/utils/logger.ts +179 -0
  240. package/src/utils/organisationContext.test.ts +322 -0
  241. package/src/utils/organisationContext.ts +153 -0
  242. package/src/utils/performanceBenchmark.ts +64 -0
  243. package/src/utils/performanceBudgets.ts +110 -0
  244. package/src/utils/permissionTypes.ts +37 -0
  245. package/src/utils/permissionUtils.test.ts +393 -0
  246. package/src/utils/permissionUtils.ts +34 -0
  247. package/src/utils/sanitization.ts +264 -0
  248. package/src/utils/schemaUtils.ts +37 -0
  249. package/src/utils/secureDataAccess.test.ts +711 -0
  250. package/src/utils/secureDataAccess.ts +377 -0
  251. package/src/utils/secureErrors.ts +79 -0
  252. package/src/utils/secureStorage.ts +244 -0
  253. package/src/utils/security.ts +156 -0
  254. package/src/utils/securityMonitor.ts +45 -0
  255. package/src/utils/sessionTracking.ts +126 -0
  256. package/src/utils/validation.ts +111 -0
  257. package/src/utils/validationUtils.ts +120 -0
  258. package/src/validation/index.ts +2 -2
  259. package/dist/chunk-444EZN6N.js.map +0 -1
  260. package/dist/chunk-APIBCTL2.js +0 -670
  261. package/dist/chunk-APIBCTL2.js.map +0 -1
  262. package/dist/chunk-HJGGOMQ6.js.map +0 -1
  263. package/dist/chunk-K2WWTH7O.js +0 -94
  264. package/dist/chunk-K2WWTH7O.js.map +0 -1
  265. package/dist/chunk-L6PGMCMD.js.map +0 -1
  266. package/dist/chunk-LMC26NLJ.js +0 -84
  267. package/dist/chunk-LMC26NLJ.js.map +0 -1
  268. package/dist/chunk-NOHEVYVX.js.map +0 -1
  269. package/dist/chunk-TVYPTYOY.js.map +0 -1
  270. package/dist/validation-8npbysjg.d.ts +0 -177
  271. /package/dist/{DataTable-CYOHOX3O.js.map → DataTable-JXFCA2BJ.js.map} +0 -0
  272. /package/dist/{UnifiedAuthProvider-5E5TUNMS.js.map → UnifiedAuthProvider-XIQQ7LVU.js.map} +0 -0
  273. /package/dist/{chunk-YLKIDTUK.js.map → chunk-22WKWKRX.js.map} +0 -0
  274. /package/dist/{chunk-FHWWBIHA.js.map → chunk-6DXZ6V5Q.js.map} +0 -0
  275. /package/dist/{chunk-2TWNJ46Y.js.map → chunk-6LAAY47Q.js.map} +0 -0
  276. /package/dist/{chunk-XARJS7CD.js.map → chunk-INQLMHPF.js.map} +0 -0
  277. /package/dist/{chunk-SL2YQDR6.js.map → chunk-MA6EPSGZ.js.map} +0 -0
  278. /package/dist/{chunk-5DPZ5EAT.js.map → chunk-OWAG3GSU.js.map} +0 -0
  279. /package/dist/{chunk-LTV3XIJJ.js.map → chunk-T6JN6LH6.js.map} +0 -0
  280. /package/examples/{components → components 2}/DataTable/HierarchicalActionsExample.tsx +0 -0
  281. /package/examples/{components → components 2}/DataTable/HierarchicalExample.tsx +0 -0
  282. /package/examples/{components → components 2}/DataTable/InitialPageSizeExample.tsx +0 -0
  283. /package/examples/{components → components 2}/DataTable/PerformanceExample.tsx +0 -0
  284. /package/examples/{components → components 2}/DataTable/index.ts +0 -0
  285. /package/examples/{components → components 2}/Dialog/BasicHtmlTest.tsx +0 -0
  286. /package/examples/{components → components 2}/Dialog/DebugHtmlExample.tsx +0 -0
  287. /package/examples/{components → components 2}/Dialog/HtmlDialogExample.tsx +0 -0
  288. /package/examples/{components → components 2}/Dialog/ScrollableDialogExample.tsx +0 -0
  289. /package/examples/{components → components 2}/Dialog/SimpleHtmlTest.tsx +0 -0
  290. /package/examples/{components → components 2}/Dialog/SmartDialogExample.tsx +0 -0
  291. /package/examples/{components → components 2}/Dialog/index.ts +0 -0
  292. /package/examples/{components → components 2}/index.ts +0 -0
@@ -25,13 +25,13 @@ import {
25
25
  SelectSeparator,
26
26
  SelectTrigger,
27
27
  SelectValue
28
- } from "./chunk-HJGGOMQ6.js";
28
+ } from "./chunk-TLT2ZR3L.js";
29
29
  import {
30
30
  useCan,
31
31
  usePermissions,
32
32
  useRBAC,
33
33
  useResolvedScope
34
- } from "./chunk-L6PGMCMD.js";
34
+ } from "./chunk-BOOI7GK2.js";
35
35
  import {
36
36
  isSuperAdmin
37
37
  } from "./chunk-BVYWGZVV.js";
@@ -50,7 +50,7 @@ import {
50
50
  useIsPublicPage,
51
51
  usePublicFileDisplay,
52
52
  usePublicPageContext
53
- } from "./chunk-TVYPTYOY.js";
53
+ } from "./chunk-4C7EXCAR.js";
54
54
  import {
55
55
  useToast
56
56
  } from "./chunk-BESYRHQM.js";
@@ -58,11 +58,11 @@ import {
58
58
  init_useOrganisations,
59
59
  useEvents,
60
60
  useOrganisations
61
- } from "./chunk-SL2YQDR6.js";
61
+ } from "./chunk-MA6EPSGZ.js";
62
62
  import {
63
63
  UnifiedAuthProvider_exports,
64
64
  init_UnifiedAuthProvider as init_UnifiedAuthProvider2
65
- } from "./chunk-2TWNJ46Y.js";
65
+ } from "./chunk-6LAAY47Q.js";
66
66
  import {
67
67
  EventServiceContext,
68
68
  EventServiceProvider,
@@ -72,7 +72,7 @@ import {
72
72
  useEventService,
73
73
  useSessionRestoration,
74
74
  useUnifiedAuth
75
- } from "./chunk-4MT5BGGL.js";
75
+ } from "./chunk-YCWDTTUK.js";
76
76
  import {
77
77
  LoadingSpinner,
78
78
  getAppId
@@ -217,11 +217,108 @@ var AvatarFallback = React2.forwardRef(({ className, ...props }, ref) => /* @__P
217
217
  ));
218
218
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
219
219
 
220
- // src/components/Switch/Switch.tsx
220
+ // src/components/Badge/Badge.tsx
221
221
  import * as React3 from "react";
222
- import * as SwitchPrimitive from "@radix-ui/react-switch";
223
222
  import { jsx as jsx3 } from "react/jsx-runtime";
224
- var Switch = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
223
+ var shadeConfig = {
224
+ muted: {
225
+ bg: 200,
226
+ text: 600,
227
+ border: 400,
228
+ outlineText: 600,
229
+ outlineBg: 100
230
+ },
231
+ normal: {
232
+ bg: 500,
233
+ text: 50,
234
+ border: 700,
235
+ outlineText: 700,
236
+ outlineBg: 200
237
+ },
238
+ strong: {
239
+ bg: 700,
240
+ text: 50,
241
+ border: 800,
242
+ outlineText: 900,
243
+ outlineBg: 400
244
+ }
245
+ };
246
+ var colors = ["main", "sec", "acc"];
247
+ var styles = ["solid", "outline", "soft"];
248
+ function buildVariantClasses(style, color, shade) {
249
+ const cfg = shadeConfig[shade];
250
+ const parts = [];
251
+ if (style === "solid") {
252
+ parts.push(`bg-${color}-${cfg.bg}`, `text-${color}-${cfg.text}`);
253
+ } else if (style === "outline") {
254
+ parts.push("outline outline-1 -outline-offset-1", `outline-${color}-${cfg.border}`, `bg-${color}-${cfg.outlineBg}`, `text-${color}-${cfg.outlineText}`);
255
+ } else if (style === "soft") {
256
+ parts.push(
257
+ `bg-${color}-${cfg.bg}`,
258
+ "shadow-badge-soft",
259
+ `shadow-${color}-${cfg.bg}`,
260
+ `text-${color}-${cfg.text}`,
261
+ "my-1",
262
+ "mx-1",
263
+ "py-0",
264
+ "px-2"
265
+ );
266
+ }
267
+ return parts.join(" ");
268
+ }
269
+ function generateVariantClasses() {
270
+ const variantClasses = {};
271
+ for (const style of styles) {
272
+ for (const color of colors) {
273
+ for (const shade of Object.keys(shadeConfig)) {
274
+ const variant = `${style}-${color}-${shade}`;
275
+ variantClasses[variant] = buildVariantClasses(style, color, shade);
276
+ }
277
+ }
278
+ }
279
+ return variantClasses;
280
+ }
281
+ var variantClassesMap = generateVariantClasses();
282
+ function getBadgeClasses(variant = "solid-main-normal") {
283
+ const baseClasses = "inline-flex text-balance items-center rounded-2xl px-3 py-1 text-xs font-medium transition-colors box-border";
284
+ return `${baseClasses} ${variantClassesMap[variant]}`;
285
+ }
286
+ var Badge = React3.forwardRef(
287
+ ({ className, variant = "solid-main-normal", ...props }, ref) => {
288
+ const isSoftVariant = variant.startsWith("soft-");
289
+ if (isSoftVariant) {
290
+ const variantClasses = getBadgeClasses(variant);
291
+ const shadowColorMatch = variantClasses.match(/\bshadow-(\w+)-(\d+)\b/);
292
+ const shadowColorClass = shadowColorMatch ? shadowColorMatch[0] : "";
293
+ const classesWithoutShadows = variantClasses.replace(/\bshadow-badge-soft\b/g, "").replace(/\bshadow-\w+-\d+\b/g, "").replace(/\s+/g, " ").trim();
294
+ const mergedClasses = cn(classesWithoutShadows, className);
295
+ const finalClasses = `${mergedClasses} shadow-badge-soft ${shadowColorClass}`.trim();
296
+ return /* @__PURE__ */ jsx3(
297
+ "span",
298
+ {
299
+ ref,
300
+ className: finalClasses,
301
+ ...props
302
+ }
303
+ );
304
+ }
305
+ return /* @__PURE__ */ jsx3(
306
+ "span",
307
+ {
308
+ ref,
309
+ className: cn(getBadgeClasses(variant), className),
310
+ ...props
311
+ }
312
+ );
313
+ }
314
+ );
315
+ Badge.displayName = "Badge";
316
+
317
+ // src/components/Switch/Switch.tsx
318
+ import * as React4 from "react";
319
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
320
+ import { jsx as jsx4 } from "react/jsx-runtime";
321
+ var Switch = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
225
322
  SwitchPrimitive.Root,
226
323
  {
227
324
  className: cn(
@@ -243,7 +340,7 @@ var Switch = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
243
340
  ),
244
341
  ...props,
245
342
  ref,
246
- children: /* @__PURE__ */ jsx3(
343
+ children: /* @__PURE__ */ jsx4(
247
344
  SwitchPrimitive.Thumb,
248
345
  {
249
346
  className: cn(
@@ -264,12 +361,12 @@ var Switch = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
264
361
  Switch.displayName = SwitchPrimitive.Root.displayName;
265
362
 
266
363
  // src/components/Toast/Toast.tsx
267
- import * as React4 from "react";
364
+ import * as React5 from "react";
268
365
  import * as ToastPrimitives from "@radix-ui/react-toast";
269
366
  import { X } from "lucide-react";
270
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
367
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
271
368
  var ToastProvider = ToastPrimitives.Provider;
272
- var ToastViewport = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
369
+ var ToastViewport = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
273
370
  ToastPrimitives.Viewport,
274
371
  {
275
372
  ref,
@@ -282,8 +379,8 @@ var ToastViewport = React4.forwardRef(({ className, ...props }, ref) => /* @__PU
282
379
  }
283
380
  ));
284
381
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
285
- var Toast = React4.forwardRef(({ className, ...props }, ref) => {
286
- return /* @__PURE__ */ jsx4(
382
+ var Toast = React5.forwardRef(({ className, ...props }, ref) => {
383
+ return /* @__PURE__ */ jsx5(
287
384
  ToastPrimitives.Root,
288
385
  {
289
386
  ref,
@@ -297,7 +394,7 @@ var Toast = React4.forwardRef(({ className, ...props }, ref) => {
297
394
  );
298
395
  });
299
396
  Toast.displayName = ToastPrimitives.Root.displayName;
300
- var ToastAction = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
397
+ var ToastAction = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
301
398
  ToastPrimitives.Action,
302
399
  {
303
400
  ref,
@@ -310,7 +407,7 @@ var ToastAction = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
310
407
  }
311
408
  ));
312
409
  ToastAction.displayName = ToastPrimitives.Action.displayName;
313
- var ToastClose = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
410
+ var ToastClose = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
314
411
  ToastPrimitives.Close,
315
412
  {
316
413
  ref,
@@ -321,11 +418,11 @@ var ToastClose = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE_
321
418
  ),
322
419
  "toast-close": "",
323
420
  ...props,
324
- children: /* @__PURE__ */ jsx4(X, { className: "h-4 w-4" })
421
+ children: /* @__PURE__ */ jsx5(X, { className: "h-4 w-4" })
325
422
  }
326
423
  ));
327
424
  ToastClose.displayName = ToastPrimitives.Close.displayName;
328
- var ToastTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
425
+ var ToastTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
329
426
  ToastPrimitives.Title,
330
427
  {
331
428
  ref,
@@ -335,7 +432,7 @@ var ToastTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE_
335
432
  }
336
433
  ));
337
434
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
338
- var ToastDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
435
+ var ToastDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
339
436
  ToastPrimitives.Description,
340
437
  {
341
438
  ref,
@@ -348,14 +445,14 @@ ToastDescription.displayName = ToastPrimitives.Description.displayName;
348
445
  function Toaster() {
349
446
  const { toasts } = useToast();
350
447
  return /* @__PURE__ */ jsxs2(ToastProvider, { "data-testid": "toast-provider", children: [
351
- /* @__PURE__ */ jsx4(ToastViewport, {}),
448
+ /* @__PURE__ */ jsx5(ToastViewport, {}),
352
449
  toasts.map((toast) => {
353
450
  const { id, title, description, action, dismiss, duration, ...toastProps } = toast;
354
451
  return /* @__PURE__ */ jsxs2(Toast, { ...toastProps, duration, children: [
355
- title && /* @__PURE__ */ jsx4(ToastTitle, { children: title }),
356
- description && /* @__PURE__ */ jsx4(ToastDescription, { children: description }),
452
+ title && /* @__PURE__ */ jsx5(ToastTitle, { children: title }),
453
+ description && /* @__PURE__ */ jsx5(ToastDescription, { children: description }),
357
454
  action && action,
358
- /* @__PURE__ */ jsx4(ToastClose, { onClick: dismiss })
455
+ /* @__PURE__ */ jsx5(ToastClose, { onClick: dismiss })
359
456
  ] }, id);
360
457
  })
361
458
  ] });
@@ -364,7 +461,7 @@ function Toaster() {
364
461
  // src/components/Form/Form.tsx
365
462
  import { useForm, FormProvider } from "react-hook-form";
366
463
  import { zodResolver } from "@hookform/resolvers/zod";
367
- import { jsx as jsx5 } from "react/jsx-runtime";
464
+ import { jsx as jsx6 } from "react/jsx-runtime";
368
465
  function Form({
369
466
  schema,
370
467
  defaultValues,
@@ -380,13 +477,13 @@ function Form({
380
477
  mode
381
478
  });
382
479
  const handleSubmit = methods.handleSubmit(onSubmit, onError);
383
- return /* @__PURE__ */ jsx5(FormProvider, { ...methods, children: /* @__PURE__ */ jsx5("form", { onSubmit: handleSubmit, className: cn("space-y-4", className), children: typeof children === "function" ? children(methods) : children }) });
480
+ return /* @__PURE__ */ jsx6(FormProvider, { ...methods, children: /* @__PURE__ */ jsx6("form", { onSubmit: handleSubmit, className: cn("space-y-4", className), children: typeof children === "function" ? children(methods) : children }) });
384
481
  }
385
482
 
386
483
  // src/components/LoginForm/LoginForm.tsx
387
- import React5, { useState, useCallback, useMemo } from "react";
388
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
389
- var LoginForm = React5.memo(({
484
+ import React6, { useState, useCallback, useMemo } from "react";
485
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
486
+ var LoginForm = React6.memo(({
390
487
  onSignIn,
391
488
  onSuccess,
392
489
  onError,
@@ -427,15 +524,15 @@ var LoginForm = React5.memo(({
427
524
  }, [onSignUp]);
428
525
  const displayTitle = useMemo(() => title || (appName ? `Sign in to ${appName}` : "Sign In"), [title, appName]);
429
526
  const displaySubtitle = useMemo(() => subtitle || "Enter your credentials to continue.", [subtitle]);
430
- return /* @__PURE__ */ jsx6(Card, { className: cn("w-full max-w-md mx-auto", className), children: /* @__PURE__ */ jsxs3("form", { onSubmit: handleSubmit, "data-testid": "login-form", children: [
527
+ return /* @__PURE__ */ jsx7(Card, { className: cn("w-full max-w-md mx-auto", className), children: /* @__PURE__ */ jsxs3("form", { onSubmit: handleSubmit, "data-testid": "login-form", children: [
431
528
  /* @__PURE__ */ jsxs3(CardHeader, { className: "space-y-1", children: [
432
- /* @__PURE__ */ jsx6(CardTitle, { className: "text-2xl text-center", children: displayTitle }),
433
- /* @__PURE__ */ jsx6(CardDescription, { className: "text-center", children: displaySubtitle })
529
+ /* @__PURE__ */ jsx7(CardTitle, { className: "text-2xl text-center", children: displayTitle }),
530
+ /* @__PURE__ */ jsx7(CardDescription, { className: "text-center", children: displaySubtitle })
434
531
  ] }),
435
532
  /* @__PURE__ */ jsxs3(CardContent, { className: "space-y-4", children: [
436
- error && /* @__PURE__ */ jsx6(Alert, { variant: "destructive", children: /* @__PURE__ */ jsx6(AlertDescription, { children: error }) }),
437
- /* @__PURE__ */ jsx6(Label, { htmlFor: "email", children: "Email" }),
438
- /* @__PURE__ */ jsx6(
533
+ error && /* @__PURE__ */ jsx7(Alert, { variant: "destructive", children: /* @__PURE__ */ jsx7(AlertDescription, { children: error }) }),
534
+ /* @__PURE__ */ jsx7(Label, { htmlFor: "email", children: "Email" }),
535
+ /* @__PURE__ */ jsx7(
439
536
  Input,
440
537
  {
441
538
  id: "email",
@@ -447,8 +544,8 @@ var LoginForm = React5.memo(({
447
544
  disabled: isLoading
448
545
  }
449
546
  ),
450
- /* @__PURE__ */ jsx6(Label, { htmlFor: "password", children: "Password" }),
451
- /* @__PURE__ */ jsx6(
547
+ /* @__PURE__ */ jsx7(Label, { htmlFor: "password", children: "Password" }),
548
+ /* @__PURE__ */ jsx7(
452
549
  Input,
453
550
  {
454
551
  id: "password",
@@ -462,7 +559,7 @@ var LoginForm = React5.memo(({
462
559
  )
463
560
  ] }),
464
561
  /* @__PURE__ */ jsxs3(CardFooter, { className: "flex flex-col space-y-4", children: [
465
- /* @__PURE__ */ jsx6(
562
+ /* @__PURE__ */ jsx7(
466
563
  Button,
467
564
  {
468
565
  type: "submit",
@@ -471,7 +568,7 @@ var LoginForm = React5.memo(({
471
568
  children: isLoading ? "Signing in..." : "Sign In"
472
569
  }
473
570
  ),
474
- showSignUp && (onSignUp ? /* @__PURE__ */ jsx6("div", { className: "text-sm text-center text-muted-foreground", children: /* @__PURE__ */ jsx6(
571
+ showSignUp && (onSignUp ? /* @__PURE__ */ jsx7("div", { className: "text-sm text-center text-muted-foreground", children: /* @__PURE__ */ jsx7(
475
572
  "button",
476
573
  {
477
574
  type: "button",
@@ -482,7 +579,7 @@ var LoginForm = React5.memo(({
482
579
  ) }) : /* @__PURE__ */ jsxs3("p", { className: "text-center text-muted-foreground", children: [
483
580
  "Don't have an account?",
484
581
  " ",
485
- /* @__PURE__ */ jsx6("a", { href: "/signup", className: "text-primary hover:underline", children: "Sign up" })
582
+ /* @__PURE__ */ jsx7("a", { href: "/signup", className: "text-primary hover:underline", children: "Sign up" })
486
583
  ] }))
487
584
  ] })
488
585
  ] }) });
@@ -492,7 +589,7 @@ var LoginForm = React5.memo(({
492
589
  import { RefreshCw, AlertCircle, Lock, Calendar, Star } from "lucide-react";
493
590
  init_logger();
494
591
  import { useEffect, useMemo as useMemo2 } from "react";
495
- import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
592
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
496
593
  function EventSelector({
497
594
  placeholder = "Select an event",
498
595
  className,
@@ -588,15 +685,15 @@ function EventSelector({
588
685
  }, [events, selectedEvent, setSelectedEvent, onEventChange, isLoading]);
589
686
  if (isLoading) {
590
687
  return /* @__PURE__ */ jsxs4("div", { className: `flex items-center gap-2 ${className}`, children: [
591
- /* @__PURE__ */ jsx7(LoadingSpinner, { size: "sm" }),
592
- /* @__PURE__ */ jsx7("span", { className: "text-sm text-muted-foreground", children: "Loading events..." })
688
+ /* @__PURE__ */ jsx8(LoadingSpinner, { size: "sm" }),
689
+ /* @__PURE__ */ jsx8("span", { className: "text-sm text-muted-foreground", children: "Loading events..." })
593
690
  ] });
594
691
  }
595
692
  if (error) {
596
- return /* @__PURE__ */ jsx7("div", { className, children: /* @__PURE__ */ jsxs4(Alert, { variant: "destructive", children: [
597
- /* @__PURE__ */ jsx7(Lock, { className: "h-4 w-4" }),
693
+ return /* @__PURE__ */ jsx8("div", { className, children: /* @__PURE__ */ jsxs4(Alert, { variant: "destructive", children: [
694
+ /* @__PURE__ */ jsx8(Lock, { className: "h-4 w-4" }),
598
695
  /* @__PURE__ */ jsxs4(AlertDescription, { className: "flex items-center justify-between", children: [
599
- /* @__PURE__ */ jsx7("span", { children: error.message }),
696
+ /* @__PURE__ */ jsx8("span", { children: error.message }),
600
697
  showRetryButton && /* @__PURE__ */ jsxs4(
601
698
  Button,
602
699
  {
@@ -605,7 +702,7 @@ function EventSelector({
605
702
  onClick: handleRetry,
606
703
  className: "ml-2",
607
704
  children: [
608
- /* @__PURE__ */ jsx7(RefreshCw, { className: "h-3 w-3 mr-1" }),
705
+ /* @__PURE__ */ jsx8(RefreshCw, { className: "h-3 w-3 mr-1" }),
609
706
  "Retry"
610
707
  ]
611
708
  }
@@ -615,10 +712,10 @@ function EventSelector({
615
712
  }
616
713
  if (events.length === 0) {
617
714
  if (showNoEventsMessage) {
618
- return /* @__PURE__ */ jsx7("div", { className, children: /* @__PURE__ */ jsxs4(Alert, { variant: "inline", children: [
619
- /* @__PURE__ */ jsx7(AlertCircle, { className: "h-4 w-4 text-acc-700" }),
715
+ return /* @__PURE__ */ jsx8("div", { className, children: /* @__PURE__ */ jsxs4(Alert, { variant: "inline", children: [
716
+ /* @__PURE__ */ jsx8(AlertCircle, { className: "h-4 w-4 text-acc-700" }),
620
717
  /* @__PURE__ */ jsxs4(AlertDescription, { className: "flex items-center justify-between", children: [
621
- /* @__PURE__ */ jsx7("span", { children: "No events available." }),
718
+ /* @__PURE__ */ jsx8("span", { children: "No events available." }),
622
719
  showRetryButton && /* @__PURE__ */ jsxs4(
623
720
  Button,
624
721
  {
@@ -627,7 +724,7 @@ function EventSelector({
627
724
  onClick: handleRetry,
628
725
  className: "ml-2",
629
726
  children: [
630
- /* @__PURE__ */ jsx7(RefreshCw, { className: "h-3 w-3 mr-1" }),
727
+ /* @__PURE__ */ jsx8(RefreshCw, { className: "h-3 w-3 mr-1" }),
631
728
  "Refresh"
632
729
  ]
633
730
  }
@@ -644,34 +741,34 @@ function EventSelector({
644
741
  onValueChange: handleValueChange,
645
742
  className,
646
743
  children: [
647
- /* @__PURE__ */ jsx7(SelectTrigger, { className: "text-left", variant: "outline", children: /* @__PURE__ */ jsx7(SelectValue, { placeholder, children: selectedEvent && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
648
- /* @__PURE__ */ jsx7(Calendar, { className: "h-4 w-4 flex-shrink-0" }),
649
- /* @__PURE__ */ jsx7("span", { className: "truncate", children: selectedEvent.event_name || selectedEvent.name }),
744
+ /* @__PURE__ */ jsx8(SelectTrigger, { className: "text-left", variant: "outline", children: /* @__PURE__ */ jsx8(SelectValue, { placeholder, children: selectedEvent && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
745
+ /* @__PURE__ */ jsx8(Calendar, { className: "h-4 w-4 flex-shrink-0" }),
746
+ /* @__PURE__ */ jsx8("span", { className: "truncate", children: selectedEvent.event_name || selectedEvent.name }),
650
747
  selectedEvent.event_date && /* @__PURE__ */ jsxs4("span", { className: "text-xs text-muted-foreground flex-shrink-0", children: [
651
748
  "(",
652
749
  formatEventDate(selectedEvent.event_date),
653
750
  ")"
654
751
  ] })
655
752
  ] }) }) }),
656
- /* @__PURE__ */ jsx7(SelectContent, { children: sortedEvents.map((event) => {
753
+ /* @__PURE__ */ jsx8(SelectContent, { children: sortedEvents.map((event) => {
657
754
  const isNext = isNextEvent(event);
658
755
  const isSelected = selectedEvent && (selectedEvent.event_id === event.event_id || selectedEvent.id === event.id);
659
- return /* @__PURE__ */ jsx7(
756
+ return /* @__PURE__ */ jsx8(
660
757
  SelectItem,
661
758
  {
662
759
  value: event.event_id || event.id,
663
760
  className: "flex items-center justify-between",
664
761
  children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 w-full", children: [
665
- showNextEventIndicator && isNext && /* @__PURE__ */ jsx7(Star, { className: "h-3 w-3 text-acc-500" }),
762
+ showNextEventIndicator && isNext && /* @__PURE__ */ jsx8(Star, { className: "h-3 w-3 text-acc-500" }),
666
763
  /* @__PURE__ */ jsxs4("div", { className: "flex-1", children: [
667
764
  /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
668
- /* @__PURE__ */ jsx7("span", { className: isSelected ? "font-semibold" : "", children: event.event_name || event.name }),
669
- isSelected && /* @__PURE__ */ jsx7("span", { className: "text-xs bg-primary text-primary-foreground px-1 rounded", children: "Current" })
765
+ /* @__PURE__ */ jsx8("span", { className: isSelected ? "font-semibold" : "", children: event.event_name || event.name }),
766
+ isSelected && /* @__PURE__ */ jsx8("span", { className: "text-xs bg-primary text-primary-foreground px-1 rounded", children: "Current" })
670
767
  ] }),
671
768
  showEventDetails && event.event_date && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
672
- /* @__PURE__ */ jsx7(Calendar, { className: "h-3 w-3" }),
673
- /* @__PURE__ */ jsx7("span", { children: formatEventDate(event.event_date) }),
674
- showNextEventIndicator && isNext && /* @__PURE__ */ jsx7("span", { className: "text-acc-600 font-medium", children: "(Next)" })
769
+ /* @__PURE__ */ jsx8(Calendar, { className: "h-3 w-3" }),
770
+ /* @__PURE__ */ jsx8("span", { children: formatEventDate(event.event_date) }),
771
+ showNextEventIndicator && isNext && /* @__PURE__ */ jsx8("span", { className: "text-acc-600 font-medium", children: "(Next)" })
675
772
  ] }),
676
773
  showEventDetails && event.event_venue && /* @__PURE__ */ jsxs4("div", { className: "text-xs text-muted-foreground", children: [
677
774
  "\u{1F4CD} ",
@@ -690,7 +787,7 @@ function EventSelector({
690
787
 
691
788
  // src/components/PasswordReset/PasswordChangeForm.tsx
692
789
  import { useState as useState2 } from "react";
693
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
790
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
694
791
  function PasswordChangeForm({ onSubmit, className }) {
695
792
  const [newPassword, setNewPassword] = useState2("");
696
793
  const [confirmPassword, setConfirmPassword] = useState2("");
@@ -720,10 +817,10 @@ function PasswordChangeForm({ onSubmit, className }) {
720
817
  }
721
818
  };
722
819
  return /* @__PURE__ */ jsxs5("form", { onSubmit: handleSubmit, className: cn("space-y-4", className), children: [
723
- error && /* @__PURE__ */ jsx8("div", { role: "alert", children: error }),
820
+ error && /* @__PURE__ */ jsx9("div", { role: "alert", children: error }),
724
821
  /* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
725
- /* @__PURE__ */ jsx8(Label, { htmlFor: "new-password", children: "New Password" }),
726
- /* @__PURE__ */ jsx8(
822
+ /* @__PURE__ */ jsx9(Label, { htmlFor: "new-password", children: "New Password" }),
823
+ /* @__PURE__ */ jsx9(
727
824
  Input,
728
825
  {
729
826
  id: "new-password",
@@ -736,8 +833,8 @@ function PasswordChangeForm({ onSubmit, className }) {
736
833
  )
737
834
  ] }),
738
835
  /* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
739
- /* @__PURE__ */ jsx8(Label, { htmlFor: "confirm-password", children: "Confirm Password" }),
740
- /* @__PURE__ */ jsx8(
836
+ /* @__PURE__ */ jsx9(Label, { htmlFor: "confirm-password", children: "Confirm Password" }),
837
+ /* @__PURE__ */ jsx9(
741
838
  Input,
742
839
  {
743
840
  id: "confirm-password",
@@ -749,7 +846,7 @@ function PasswordChangeForm({ onSubmit, className }) {
749
846
  }
750
847
  )
751
848
  ] }),
752
- /* @__PURE__ */ jsx8(
849
+ /* @__PURE__ */ jsx9(
753
850
  Button,
754
851
  {
755
852
  type: "submit",
@@ -762,10 +859,10 @@ function PasswordChangeForm({ onSubmit, className }) {
762
859
  }
763
860
 
764
861
  // src/components/UserMenu/UserMenu.tsx
765
- import React7, { useCallback as useCallback2, useMemo as useMemo3, useState as useState3 } from "react";
862
+ import React8, { useCallback as useCallback2, useMemo as useMemo3, useState as useState3 } from "react";
766
863
  import { ChevronDown, LogOut, KeyRound } from "lucide-react";
767
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
768
- var UserMenu = React7.memo(function UserMenu2({
864
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
865
+ var UserMenu = React8.memo(function UserMenu2({
769
866
  user,
770
867
  onSignOut,
771
868
  onChangePassword,
@@ -790,34 +887,34 @@ var UserMenu = React7.memo(function UserMenu2({
790
887
  }
791
888
  return /* @__PURE__ */ jsxs6(Dialog, { open: isPasswordDialogOpen, onOpenChange: setPasswordDialogOpen, children: [
792
889
  /* @__PURE__ */ jsxs6(Select, { className, children: [
793
- /* @__PURE__ */ jsx9(SelectTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(Button, { variant: "outline", className: "flex items-center gap-2", "aria-label": userInfo.displayName, children: [
890
+ /* @__PURE__ */ jsx10(SelectTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(Button, { variant: "outline", className: "flex items-center gap-2", "aria-label": userInfo.displayName, children: [
794
891
  showAvatar && /* @__PURE__ */ jsxs6(Avatar, { className: "size-7", children: [
795
- /* @__PURE__ */ jsx9(AvatarImage, { src: userInfo.avatarUrl, alt: userInfo.displayName }),
796
- /* @__PURE__ */ jsx9(AvatarFallback, { children: userInfo.initial })
892
+ /* @__PURE__ */ jsx10(AvatarImage, { src: userInfo.avatarUrl, alt: userInfo.displayName }),
893
+ /* @__PURE__ */ jsx10(AvatarFallback, { children: userInfo.initial })
797
894
  ] }),
798
- /* @__PURE__ */ jsx9("span", { children: userInfo.displayName }),
799
- /* @__PURE__ */ jsx9(ChevronDown, { className: "h-4 w-4" })
895
+ /* @__PURE__ */ jsx10("span", { children: userInfo.displayName }),
896
+ /* @__PURE__ */ jsx10(ChevronDown, { className: "h-4 w-4" })
800
897
  ] }) }),
801
898
  /* @__PURE__ */ jsxs6(SelectContent, { children: [
802
- /* @__PURE__ */ jsx9(SelectLabel, { className: "font-normal", children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col space-y-1", children: [
803
- /* @__PURE__ */ jsx9("p", { className: "font-medium", children: userInfo.displayName }),
804
- /* @__PURE__ */ jsx9("p", { className: "text-muted-foreground", children: userInfo.email })
899
+ /* @__PURE__ */ jsx10(SelectLabel, { className: "font-normal", children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col space-y-1", children: [
900
+ /* @__PURE__ */ jsx10("p", { className: "font-medium", children: userInfo.displayName }),
901
+ /* @__PURE__ */ jsx10("p", { className: "text-muted-foreground", children: userInfo.email })
805
902
  ] }) }),
806
- /* @__PURE__ */ jsx9(SelectSeparator, {}),
807
- /* @__PURE__ */ jsx9(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(SelectItem, { value: "change-password", children: [
808
- /* @__PURE__ */ jsx9(KeyRound, { className: "mr-2 h-4 w-4" }),
809
- /* @__PURE__ */ jsx9("span", { children: "Change Password" })
903
+ /* @__PURE__ */ jsx10(SelectSeparator, {}),
904
+ /* @__PURE__ */ jsx10(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(SelectItem, { value: "change-password", children: [
905
+ /* @__PURE__ */ jsx10(KeyRound, { className: "mr-2 h-4 w-4" }),
906
+ /* @__PURE__ */ jsx10("span", { children: "Change Password" })
810
907
  ] }) }),
811
908
  /* @__PURE__ */ jsxs6(SelectItem, { value: "sign-out", onClick: handleSignOut, children: [
812
- /* @__PURE__ */ jsx9(LogOut, { className: "mr-2 h-4 w-4" }),
813
- /* @__PURE__ */ jsx9("span", { children: "Sign out" })
909
+ /* @__PURE__ */ jsx10(LogOut, { className: "mr-2 h-4 w-4" }),
910
+ /* @__PURE__ */ jsx10("span", { children: "Sign out" })
814
911
  ] })
815
912
  ] })
816
913
  ] }),
817
- /* @__PURE__ */ jsx9(DialogOverlay, {}),
914
+ /* @__PURE__ */ jsx10(DialogOverlay, {}),
818
915
  /* @__PURE__ */ jsxs6(DialogContent, { className, children: [
819
- /* @__PURE__ */ jsx9(DialogHeader, { children: /* @__PURE__ */ jsx9(DialogTitle, { children: "Change Password" }) }),
820
- /* @__PURE__ */ jsx9(
916
+ /* @__PURE__ */ jsx10(DialogHeader, { children: /* @__PURE__ */ jsx10(DialogTitle, { children: "Change Password" }) }),
917
+ /* @__PURE__ */ jsx10(
821
918
  PasswordChangeForm,
822
919
  {
823
920
  onSubmit: async ({ newPassword, confirmPassword }) => {
@@ -835,7 +932,7 @@ var UserMenu = React7.memo(function UserMenu2({
835
932
  ] })
836
933
  ] });
837
934
  });
838
- var UserMenuLoading = React7.memo(function UserMenuLoading2() {
935
+ var UserMenuLoading = React8.memo(function UserMenuLoading2() {
839
936
  return /* @__PURE__ */ jsxs6("div", { className: "relative inline-block text-left", children: [
840
937
  /* @__PURE__ */ jsxs6(
841
938
  "button",
@@ -844,24 +941,24 @@ var UserMenuLoading = React7.memo(function UserMenuLoading2() {
844
941
  disabled: true,
845
942
  className: "flex items-center space-x-2 px-3 py-2 text-sm font-medium text-muted-foreground bg-muted border border-input rounded-md",
846
943
  children: [
847
- /* @__PURE__ */ jsx9("div", { className: "w-6 h-6 rounded-full bg-muted animate-pulse" }),
848
- /* @__PURE__ */ jsx9("span", { className: "truncate max-w-[150px]", children: "Loading..." }),
849
- /* @__PURE__ */ jsx9(ChevronDown, { className: "w-4 h-4 text-muted-foreground" })
944
+ /* @__PURE__ */ jsx10("div", { className: "w-6 h-6 rounded-full bg-muted animate-pulse" }),
945
+ /* @__PURE__ */ jsx10("span", { className: "truncate max-w-[150px]", children: "Loading..." }),
946
+ /* @__PURE__ */ jsx10(ChevronDown, { className: "w-4 h-4 text-muted-foreground" })
850
947
  ]
851
948
  }
852
949
  ),
853
- /* @__PURE__ */ jsx9("div", { role: "status", "aria-label": "Loading user menu", "aria-live": "polite", className: "w-6 h-6 rounded-full bg-muted animate-pulse" })
950
+ /* @__PURE__ */ jsx10("div", { role: "status", "aria-label": "Loading user menu", "aria-live": "polite", className: "w-6 h-6 rounded-full bg-muted animate-pulse" })
854
951
  ] });
855
952
  });
856
953
  UserMenu.Loading = UserMenuLoading;
857
954
 
858
955
  // src/components/NavigationMenu/NavigationMenu.tsx
859
- import * as React8 from "react";
956
+ import * as React9 from "react";
860
957
  import { ChevronDown as ChevronDown2 } from "lucide-react";
861
958
  init_UnifiedAuthProvider2();
862
959
  init_logger();
863
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
864
- var NavigationMenu = React8.forwardRef(({
960
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
961
+ var NavigationMenu = React9.forwardRef(({
865
962
  items,
866
963
  mode = "dropdown",
867
964
  currentPath,
@@ -879,8 +976,8 @@ var NavigationMenu = React8.forwardRef(({
879
976
  filterByPermissions = true,
880
977
  ...props
881
978
  }, ref) => {
882
- const [expandedItems, setExpandedItems] = React8.useState(/* @__PURE__ */ new Set());
883
- const buttonRef = React8.useRef(null);
979
+ const [expandedItems, setExpandedItems] = React9.useState(/* @__PURE__ */ new Set());
980
+ const buttonRef = React9.useRef(null);
884
981
  let authContext = null;
885
982
  try {
886
983
  authContext = useUnifiedAuth();
@@ -901,7 +998,7 @@ var NavigationMenu = React8.forwardRef(({
901
998
  selectedOrganisationId: selectedOrganisation?.id || null,
902
999
  selectedEventId: selectedEvent?.event_id || null
903
1000
  });
904
- const stableScopeRef = React8.useRef({
1001
+ const stableScopeRef = React9.useRef({
905
1002
  organisationId: "",
906
1003
  eventId: void 0,
907
1004
  appId: void 0
@@ -932,8 +1029,8 @@ var NavigationMenu = React8.forwardRef(({
932
1029
  userId,
933
1030
  stableScope
934
1031
  );
935
- const previousFilteredItemsRef = React8.useRef([]);
936
- const filteredItems = React8.useMemo(() => {
1032
+ const previousFilteredItemsRef = React9.useRef([]);
1033
+ const filteredItems = React9.useMemo(() => {
937
1034
  if (filterByPermissions) {
938
1035
  if (!authContext || !rbacContext || scopeLoading || !resolvedScope?.organisationId) {
939
1036
  return [];
@@ -1072,7 +1169,7 @@ var NavigationMenu = React8.forwardRef(({
1072
1169
  resolvedScope,
1073
1170
  auditLog
1074
1171
  ]);
1075
- React8.useEffect(() => {
1172
+ React9.useEffect(() => {
1076
1173
  if (auditLog && authContext) {
1077
1174
  logger.debug("NavigationMenu", "Navigation access attempt:", {
1078
1175
  itemId: "navigation-menu",
@@ -1206,7 +1303,7 @@ var NavigationMenu = React8.forwardRef(({
1206
1303
  const hasChildren = item.children && item.children.length > 0;
1207
1304
  const isExpanded = expandedItems.has(item.id);
1208
1305
  const itemIsActive = isActiveItem(item);
1209
- return /* @__PURE__ */ jsx10("li", { role: "none", children: hasChildren ? /* @__PURE__ */ jsxs7("div", { children: [
1306
+ return /* @__PURE__ */ jsx11("li", { role: "none", children: hasChildren ? /* @__PURE__ */ jsxs7("div", { children: [
1210
1307
  /* @__PURE__ */ jsxs7(
1211
1308
  "button",
1212
1309
  {
@@ -1216,21 +1313,21 @@ var NavigationMenu = React8.forwardRef(({
1216
1313
  "aria-controls": `submenu-${item.id}`,
1217
1314
  "aria-current": itemIsActive ? "page" : void 0,
1218
1315
  children: [
1219
- /* @__PURE__ */ jsx10("span", { children: item.label }),
1220
- /* @__PURE__ */ jsx10(ChevronDown2, { "aria-hidden": "true" })
1316
+ /* @__PURE__ */ jsx11("span", { children: item.label }),
1317
+ /* @__PURE__ */ jsx11(ChevronDown2, { "aria-hidden": "true" })
1221
1318
  ]
1222
1319
  }
1223
1320
  ),
1224
- isExpanded && item.children && /* @__PURE__ */ jsx10(
1321
+ isExpanded && item.children && /* @__PURE__ */ jsx11(
1225
1322
  "ul",
1226
1323
  {
1227
1324
  id: `submenu-${item.id}`,
1228
1325
  role: "menu",
1229
1326
  "aria-label": `${item.label} submenu`,
1230
- children: item.children.map((child) => /* @__PURE__ */ jsx10(React8.Fragment, { children: renderHierarchicalItem(child, level + 1) }, child.id))
1327
+ children: item.children.map((child) => /* @__PURE__ */ jsx11(React9.Fragment, { children: renderHierarchicalItem(child, level + 1) }, child.id))
1231
1328
  }
1232
1329
  )
1233
- ] }) : /* @__PURE__ */ jsx10(
1330
+ ] }) : /* @__PURE__ */ jsx11(
1234
1331
  "a",
1235
1332
  {
1236
1333
  href: item.href || "#",
@@ -1255,19 +1352,19 @@ var NavigationMenu = React8.forwardRef(({
1255
1352
  className,
1256
1353
  "data-testid": "navigation-menu-root",
1257
1354
  children: [
1258
- /* @__PURE__ */ jsx10(
1355
+ /* @__PURE__ */ jsx11(
1259
1356
  SelectTrigger,
1260
1357
  {
1261
1358
  ref: buttonRef,
1262
1359
  disabled,
1263
1360
  "aria-label": buttonText,
1264
1361
  "data-testid": "navigation-menu-trigger",
1265
- children: /* @__PURE__ */ jsx10(SelectValue, { placeholder: buttonText })
1362
+ children: /* @__PURE__ */ jsx11(SelectValue, { placeholder: buttonText })
1266
1363
  }
1267
1364
  ),
1268
- /* @__PURE__ */ jsx10(SelectContent, { children: filteredItems.map((item) => {
1365
+ /* @__PURE__ */ jsx11(SelectContent, { children: filteredItems.map((item) => {
1269
1366
  const isActive = isActiveItem(item);
1270
- return /* @__PURE__ */ jsx10(
1367
+ return /* @__PURE__ */ jsx11(
1271
1368
  SelectItem,
1272
1369
  {
1273
1370
  value: item.id,
@@ -1282,14 +1379,14 @@ var NavigationMenu = React8.forwardRef(({
1282
1379
  }
1283
1380
  );
1284
1381
  }
1285
- return /* @__PURE__ */ jsx10(
1382
+ return /* @__PURE__ */ jsx11(
1286
1383
  "nav",
1287
1384
  {
1288
1385
  ref,
1289
1386
  className,
1290
1387
  "aria-label": navigationLabel,
1291
1388
  ...props,
1292
- children: /* @__PURE__ */ jsx10("ul", { role: "menubar", children: filteredItems.map((item) => /* @__PURE__ */ jsx10(React8.Fragment, { children: renderHierarchicalItem(item, 0) }, item.id)) })
1389
+ children: /* @__PURE__ */ jsx11("ul", { role: "menubar", children: filteredItems.map((item) => /* @__PURE__ */ jsx11(React9.Fragment, { children: renderHierarchicalItem(item, 0) }, item.id)) })
1293
1390
  }
1294
1391
  );
1295
1392
  });
@@ -1297,7 +1394,7 @@ NavigationMenu.displayName = "NavigationMenu";
1297
1394
 
1298
1395
  // src/components/Header/Header.tsx
1299
1396
  import { Link } from "react-router-dom";
1300
- import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
1397
+ import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
1301
1398
  function Header({
1302
1399
  logoUrl,
1303
1400
  logoAlt = "Logo",
@@ -1315,32 +1412,32 @@ function Header({
1315
1412
  onNavigate,
1316
1413
  logoHref
1317
1414
  }) {
1318
- return /* @__PURE__ */ jsx11("header", { className: cn(
1415
+ return /* @__PURE__ */ jsx12("header", { className: cn(
1319
1416
  "w-full border-b border-main-200 h-16 shadow-sm bg-main-100 ",
1320
1417
  className
1321
1418
  ), role: "banner", children: /* @__PURE__ */ jsxs8("nav", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto grid grid-cols-[auto_auto_1fr_auto] gap-4 h-full items-center", children: [
1322
- logo ? logoHref ? /* @__PURE__ */ jsx11(Link, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: logo }) : logo : logoUrl ? logoHref ? /* @__PURE__ */ jsx11(Link, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx11(
1419
+ logo ? logoHref ? /* @__PURE__ */ jsx12(Link, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: logo }) : logo : logoUrl ? logoHref ? /* @__PURE__ */ jsx12(Link, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx12(
1323
1420
  "img",
1324
1421
  {
1325
1422
  src: logoUrl,
1326
1423
  alt: logoAlt || "Logo",
1327
1424
  className: "h-[2.15rem] w-auto max-w-[200px] object-contain rounded-md shadow-md bg-transparent"
1328
1425
  }
1329
- ) }) : /* @__PURE__ */ jsx11(
1426
+ ) }) : /* @__PURE__ */ jsx12(
1330
1427
  "img",
1331
1428
  {
1332
1429
  src: logoUrl,
1333
1430
  alt: logoAlt || "Logo",
1334
1431
  className: "h-[2.15rem] w-auto max-w-[200px] object-contain rounded-md shadow-md bg-transparent"
1335
1432
  }
1336
- ) : logoHref ? /* @__PURE__ */ jsx11(Link, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx11(
1433
+ ) : logoHref ? /* @__PURE__ */ jsx12(Link, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx12(
1337
1434
  "img",
1338
1435
  {
1339
1436
  src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23000'/%3E%3Ctext x='16' y='20' text-anchor='middle' fill='white' font-family='Arial' font-size='14' font-weight='bold'%3EL%3C/text%3E%3C/svg%3E",
1340
1437
  alt: logoAlt || "Logo",
1341
1438
  className: "h-8 w-8 shadow-md"
1342
1439
  }
1343
- ) }) : /* @__PURE__ */ jsx11(
1440
+ ) }) : /* @__PURE__ */ jsx12(
1344
1441
  "img",
1345
1442
  {
1346
1443
  src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23000'/%3E%3Ctext x='16' y='20' text-anchor='middle' fill='white' font-family='Arial' font-size='14' font-weight='bold'%3EL%3C/text%3E%3C/svg%3E",
@@ -1348,7 +1445,7 @@ function Header({
1348
1445
  className: "h-8 w-8 shadow-md"
1349
1446
  }
1350
1447
  ),
1351
- navItems && navItems.length > 0 && /* @__PURE__ */ jsx11(
1448
+ navItems && navItems.length > 0 && /* @__PURE__ */ jsx12(
1352
1449
  NavigationMenu,
1353
1450
  {
1354
1451
  items: navItems,
@@ -1358,16 +1455,16 @@ function Header({
1358
1455
  className: "w-48"
1359
1456
  }
1360
1457
  ),
1361
- showEventSelector ? /* @__PURE__ */ jsx11(
1458
+ showEventSelector ? /* @__PURE__ */ jsx12(
1362
1459
  EventSelector,
1363
1460
  {
1364
1461
  placeholder: "Select event",
1365
1462
  className: "justify-self-end w-96",
1366
1463
  "data-testid": "event-selector"
1367
1464
  }
1368
- ) : /* @__PURE__ */ jsx11("del", { className: "justify-self-end invisible", children: "Event Selector N/A" }),
1465
+ ) : /* @__PURE__ */ jsx12("del", { className: "justify-self-end invisible", children: "Event Selector N/A" }),
1369
1466
  actions,
1370
- showUserMenu && (userMenu ? userMenu : /* @__PURE__ */ jsx11(
1467
+ showUserMenu && (userMenu ? userMenu : /* @__PURE__ */ jsx12(
1371
1468
  UserMenu,
1372
1469
  {
1373
1470
  user: user || null,
@@ -1380,8 +1477,8 @@ function Header({
1380
1477
  }
1381
1478
 
1382
1479
  // src/components/Footer/Footer.tsx
1383
- import React9 from "react";
1384
- import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
1480
+ import React10 from "react";
1481
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
1385
1482
  var FooterComponent = ({
1386
1483
  companyName = "Solvera Solutions Pty Ltd",
1387
1484
  year = (/* @__PURE__ */ new Date()).getFullYear(),
@@ -1392,15 +1489,15 @@ var FooterComponent = ({
1392
1489
  children
1393
1490
  }) => {
1394
1491
  const copyrightText = copyright || `\xA9 Copyright 2022\u2013${year} all rights reserved, ${companyName}.`;
1395
- return /* @__PURE__ */ jsx12("footer", { className: cn("mt-8 py-6 flex justify-center border-t border-border bg-main-100", className), children: /* @__PURE__ */ jsxs9("section", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto text-center", children: [
1396
- logo && /* @__PURE__ */ jsx12("img", { src: logo, alt: "Logo", className: "h-8 w-auto" }),
1397
- children && /* @__PURE__ */ jsx12(Fragment3, { children }),
1398
- /* @__PURE__ */ jsx12("span", { className: "text-muted-foreground", children: copyrightText }),
1399
- links && links.length > 0 && /* @__PURE__ */ jsx12("ul", { className: "flex gap-4 mt-2 md:mt-0", children: links.map((link, index) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsx12("a", { href: link.href, className: "text-muted-foreground hover:text-foreground", children: link.label }) }, index)) })
1492
+ return /* @__PURE__ */ jsx13("footer", { className: cn("mt-8 py-6 flex justify-center border-t border-border bg-main-100", className), children: /* @__PURE__ */ jsxs9("section", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto text-center", children: [
1493
+ logo && /* @__PURE__ */ jsx13("img", { src: logo, alt: "Logo", className: "h-8 w-auto" }),
1494
+ children && /* @__PURE__ */ jsx13(Fragment3, { children }),
1495
+ /* @__PURE__ */ jsx13("span", { className: "text-muted-foreground", children: copyrightText }),
1496
+ links && links.length > 0 && /* @__PURE__ */ jsx13("ul", { className: "flex gap-4 mt-2 md:mt-0", children: links.map((link, index) => /* @__PURE__ */ jsx13("li", { children: /* @__PURE__ */ jsx13("a", { href: link.href, className: "text-muted-foreground hover:text-foreground", children: link.label }) }, index)) })
1400
1497
  ] }) });
1401
1498
  };
1402
1499
  FooterComponent.displayName = "Footer";
1403
- var Footer = React9.memo(FooterComponent);
1500
+ var Footer = React10.memo(FooterComponent);
1404
1501
  Footer.displayName = "Footer";
1405
1502
 
1406
1503
  // src/components/PaceAppLayout/PaceAppLayout.tsx
@@ -1409,7 +1506,7 @@ init_useOrganisations();
1409
1506
  import { useState as useState5, useEffect as useEffect3, useMemo as useMemo5 } from "react";
1410
1507
  import { Outlet, useNavigate, useLocation } from "react-router-dom";
1411
1508
  init_logger();
1412
- import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
1509
+ import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
1413
1510
  var EMPTY_PAGE_ID_MAPPING = {};
1414
1511
  var EMPTY_ROUTE_PERMISSIONS = {};
1415
1512
  function PaceAppLayout({
@@ -1657,7 +1754,7 @@ function PaceAppLayout({
1657
1754
  }
1658
1755
  }
1659
1756
  if (hasAccess && currentRoute.roles && currentRoute.roles.length > 0 && user?.id) {
1660
- const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-5E5TUNMS.js");
1757
+ const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-XIQQ7LVU.js");
1661
1758
  hasAccess = true;
1662
1759
  }
1663
1760
  if (!isMounted) return;
@@ -1698,31 +1795,31 @@ function PaceAppLayout({
1698
1795
  return result || { error: null };
1699
1796
  };
1700
1797
  if (enforcePermissions && (isCheckingSuperAdmin || isCheckingPermission)) {
1701
- return /* @__PURE__ */ jsx13("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
1702
- /* @__PURE__ */ jsx13("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-sec-900 mx-auto mb-4" }),
1703
- /* @__PURE__ */ jsx13("p", { className: "text-sec-600", children: "Checking permissions..." })
1798
+ return /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
1799
+ /* @__PURE__ */ jsx14("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-sec-900 mx-auto mb-4" }),
1800
+ /* @__PURE__ */ jsx14("p", { className: "text-sec-600", children: "Checking permissions..." })
1704
1801
  ] }) });
1705
1802
  }
1706
1803
  if (enforcePermissions && permissionError && !isSuperAdminUser) {
1707
- return /* @__PURE__ */ jsx13("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
1708
- /* @__PURE__ */ jsx13("h2", { className: "text-xl font-semibold text-acc-600 mb-2", children: "Permission Error" }),
1709
- /* @__PURE__ */ jsx13("p", { className: "text-sec-600 mb-4", children: permissionError.message }),
1710
- /* @__PURE__ */ jsx13(Button, { onClick: () => navigate("/"), children: "Go Home" })
1804
+ return /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
1805
+ /* @__PURE__ */ jsx14("h2", { className: "text-xl font-semibold text-acc-600 mb-2", children: "Permission Error" }),
1806
+ /* @__PURE__ */ jsx14("p", { className: "text-sec-600 mb-4", children: permissionError.message }),
1807
+ /* @__PURE__ */ jsx14(Button, { onClick: () => navigate("/"), children: "Go Home" })
1711
1808
  ] }) });
1712
1809
  }
1713
1810
  if (enforcePermissions && hasPermission === false && !isCheckingSuperAdmin && !isSuperAdminUser) {
1714
1811
  if (enforcePagePermissions && pagePermissionFallback) {
1715
- return /* @__PURE__ */ jsx13(Fragment4, { children: pagePermissionFallback });
1812
+ return /* @__PURE__ */ jsx14(Fragment4, { children: pagePermissionFallback });
1716
1813
  }
1717
1814
  if (permissionFallback) {
1718
- return /* @__PURE__ */ jsx13(Fragment4, { children: permissionFallback });
1815
+ return /* @__PURE__ */ jsx14(Fragment4, { children: permissionFallback });
1719
1816
  }
1720
- return /* @__PURE__ */ jsx13("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
1721
- /* @__PURE__ */ jsx13("h2", { className: "text-xl font-semibold text-acc-600 mb-2", children: "Access Denied" }),
1722
- /* @__PURE__ */ jsx13("p", { className: "text-sec-600 mb-4", children: "You don't have permission to access this page." }),
1817
+ return /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
1818
+ /* @__PURE__ */ jsx14("h2", { className: "text-xl font-semibold text-acc-600 mb-2", children: "Access Denied" }),
1819
+ /* @__PURE__ */ jsx14("p", { className: "text-sec-600 mb-4", children: "You don't have permission to access this page." }),
1723
1820
  /* @__PURE__ */ jsxs10("div", { className: "flex gap-2 justify-center", children: [
1724
- /* @__PURE__ */ jsx13(Button, { onClick: () => navigate("/"), children: "Go Home" }),
1725
- /* @__PURE__ */ jsx13(
1821
+ /* @__PURE__ */ jsx14(Button, { onClick: () => navigate("/"), children: "Go Home" }),
1822
+ /* @__PURE__ */ jsx14(
1726
1823
  Button,
1727
1824
  {
1728
1825
  variant: "outline",
@@ -1737,7 +1834,7 @@ function PaceAppLayout({
1737
1834
  ] }) });
1738
1835
  }
1739
1836
  return /* @__PURE__ */ jsxs10(Fragment4, { children: [
1740
- /* @__PURE__ */ jsx13(
1837
+ /* @__PURE__ */ jsx14(
1741
1838
  Header,
1742
1839
  {
1743
1840
  logo: customLogo || void 0,
@@ -1761,8 +1858,8 @@ function PaceAppLayout({
1761
1858
  className: headerClassName || "sticky top-0 z-[40] w-full"
1762
1859
  }
1763
1860
  ),
1764
- /* @__PURE__ */ jsx13("main", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: /* @__PURE__ */ jsx13(Outlet, {}) }),
1765
- /* @__PURE__ */ jsx13(Footer, {})
1861
+ /* @__PURE__ */ jsx14("main", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: /* @__PURE__ */ jsx14(Outlet, {}) }),
1862
+ /* @__PURE__ */ jsx14(Footer, {})
1766
1863
  ] });
1767
1864
  }
1768
1865
 
@@ -1771,10 +1868,10 @@ import { useEffect as useEffect4, useState as useState6, useContext } from "reac
1771
1868
  import { useNavigate as useNavigate2, useLocation as useLocation2 } from "react-router-dom";
1772
1869
  init_EventServiceProvider();
1773
1870
  init_logger();
1774
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1871
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
1775
1872
  var PaceLoginPage = ({
1776
1873
  appName = "Pace",
1777
- onSuccessRedirectPath = "/",
1874
+ onSuccessRedirectPath = "/user-dashboard",
1778
1875
  requireAppAccess = false
1779
1876
  }) => {
1780
1877
  const { signIn, isAuthenticated, isLoading, authError, user, supabase } = useUnifiedAuth();
@@ -1903,7 +2000,7 @@ var PaceLoginPage = ({
1903
2000
  }
1904
2001
  };
1905
2002
  return /* @__PURE__ */ jsxs11("main", { className: "min-h-screen grid mx-auto w-fit content-center justify-items-center gap-y-8", "aria-label": `${appName} Login Page`, children: [
1906
- /* @__PURE__ */ jsx14(
2003
+ /* @__PURE__ */ jsx15(
1907
2004
  "img",
1908
2005
  {
1909
2006
  src: `/${appName.toLowerCase()}_logo_square.svg`,
@@ -1911,7 +2008,7 @@ var PaceLoginPage = ({
1911
2008
  className: "h-48"
1912
2009
  }
1913
2010
  ),
1914
- /* @__PURE__ */ jsx14(
2011
+ /* @__PURE__ */ jsx15(
1915
2012
  LoginForm,
1916
2013
  {
1917
2014
  className: "w-md",
@@ -1925,15 +2022,15 @@ var PaceLoginPage = ({
1925
2022
  ),
1926
2023
  (() => {
1927
2024
  const benign = !!(authError && (authError.name === "AuthSessionMissingError" || /Auth session missing/i.test(authError.message)));
1928
- return authError && !benign ? /* @__PURE__ */ jsx14("em", { className: "mt-4 text-destructive text-center", children: authError.message }) : null;
2025
+ return authError && !benign ? /* @__PURE__ */ jsx15("em", { className: "mt-4 text-destructive text-center", children: authError.message }) : null;
1929
2026
  })(),
1930
- accessError && /* @__PURE__ */ jsx14("em", { className: "mt-4 text-destructive text-center", children: accessError }),
1931
- isCheckingAccess && /* @__PURE__ */ jsx14("em", { className: "mt-4 text-muted-foreground text-center", children: "Checking permissions..." })
2027
+ accessError && /* @__PURE__ */ jsx15("em", { className: "mt-4 text-destructive text-center", children: accessError }),
2028
+ isCheckingAccess && /* @__PURE__ */ jsx15("em", { className: "mt-4 text-muted-foreground text-center", children: "Checking permissions..." })
1932
2029
  ] });
1933
2030
  };
1934
2031
 
1935
2032
  // src/components/SessionRestorationLoader/SessionRestorationLoader.tsx
1936
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
2033
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
1937
2034
  var SessionRestorationLoader = ({
1938
2035
  message = "Restoring session..."
1939
2036
  }) => {
@@ -1953,8 +2050,8 @@ var SessionRestorationLoader = ({
1953
2050
  background: "var(--background, transparent)"
1954
2051
  },
1955
2052
  children: [
1956
- /* @__PURE__ */ jsx15(LoadingSpinner, { size: "lg" }),
1957
- /* @__PURE__ */ jsx15(
2053
+ /* @__PURE__ */ jsx16(LoadingSpinner, { size: "lg" }),
2054
+ /* @__PURE__ */ jsx16(
1958
2055
  "div",
1959
2056
  {
1960
2057
  style: {
@@ -1975,7 +2072,7 @@ init_useSessionRestoration();
1975
2072
  import { useMemo as useMemo6 } from "react";
1976
2073
  import { Navigate, Outlet as Outlet2 } from "react-router-dom";
1977
2074
  init_logger();
1978
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
2075
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1979
2076
  function ProtectedRoute({
1980
2077
  requireEvent = true,
1981
2078
  allowSuperAdminBypass = false,
@@ -1995,13 +2092,13 @@ function ProtectedRoute({
1995
2092
  sessionRestoration.hasTimedOut
1996
2093
  ]);
1997
2094
  if (isRestoringSession) {
1998
- return /* @__PURE__ */ jsx16(SessionRestorationLoader, {});
2095
+ return /* @__PURE__ */ jsx17(SessionRestorationLoader, {});
1999
2096
  }
2000
2097
  if (requireEvent && eventLoading) {
2001
- return /* @__PURE__ */ jsx16(Outlet2, {});
2098
+ return /* @__PURE__ */ jsx17(Outlet2, {});
2002
2099
  }
2003
2100
  if (authLoading && !sessionRestoration.hasTimedOut) {
2004
- return loadingFallback || /* @__PURE__ */ jsx16("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100vh" }, children: /* @__PURE__ */ jsx16(LoadingSpinner, {}) });
2101
+ return loadingFallback || /* @__PURE__ */ jsx17("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100vh" }, children: /* @__PURE__ */ jsx17(LoadingSpinner, {}) });
2005
2102
  }
2006
2103
  if (!isAuthenticated) {
2007
2104
  if (sessionRestoration.hasTimedOut || sessionRestoration.restorationError) {
@@ -2010,28 +2107,28 @@ function ProtectedRoute({
2010
2107
  error: sessionRestoration.restorationError?.message
2011
2108
  });
2012
2109
  }
2013
- return /* @__PURE__ */ jsx16(Navigate, { to: loginPath, replace: true });
2110
+ return /* @__PURE__ */ jsx17(Navigate, { to: loginPath, replace: true });
2014
2111
  }
2015
2112
  if (!requireEvent) {
2016
- return /* @__PURE__ */ jsx16(Outlet2, {});
2113
+ return /* @__PURE__ */ jsx17(Outlet2, {});
2017
2114
  }
2018
2115
  if (!events || events.length === 0) {
2019
- return noEventsFallback || /* @__PURE__ */ jsx16("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "100vh", padding: "2rem" }, children: /* @__PURE__ */ jsxs13(Alert, { variant: "destructive", className: "max-w-md", children: [
2020
- /* @__PURE__ */ jsx16(AlertTitle, { children: "No Events Available" }),
2021
- /* @__PURE__ */ jsx16(AlertDescription, { children: "You don't have access to any events. Please contact your administrator if you believe this is an error." })
2116
+ return noEventsFallback || /* @__PURE__ */ jsx17("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "100vh", padding: "2rem" }, children: /* @__PURE__ */ jsxs13(Alert, { variant: "destructive", className: "max-w-md", children: [
2117
+ /* @__PURE__ */ jsx17(AlertTitle, { children: "No Events Available" }),
2118
+ /* @__PURE__ */ jsx17(AlertDescription, { children: "You don't have access to any events. Please contact your administrator if you believe this is an error." })
2022
2119
  ] }) });
2023
2120
  }
2024
2121
  if (!selectedEvent) {
2025
2122
  logger.debug("ProtectedRoute", "Events available but none selected - allowing render so selector is visible");
2026
- return /* @__PURE__ */ jsx16(Outlet2, {});
2123
+ return /* @__PURE__ */ jsx17(Outlet2, {});
2027
2124
  }
2028
- return /* @__PURE__ */ jsx16(Outlet2, {});
2125
+ return /* @__PURE__ */ jsx17(Outlet2, {});
2029
2126
  }
2030
2127
 
2031
2128
  // src/components/ErrorBoundary/ErrorBoundary.tsx
2032
2129
  import { Component } from "react";
2033
2130
  init_logger();
2034
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
2131
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
2035
2132
  var ErrorBoundary = class extends Component {
2036
2133
  constructor(props) {
2037
2134
  super(props);
@@ -2104,20 +2201,20 @@ var ErrorBoundary = class extends Component {
2104
2201
  if (fallback) {
2105
2202
  return fallback;
2106
2203
  }
2107
- return /* @__PURE__ */ jsx17(
2204
+ return /* @__PURE__ */ jsx18(
2108
2205
  "div",
2109
2206
  {
2110
2207
  role: "alert",
2111
2208
  className: "p-6 bg-destructive/10 border border-destructive/20 rounded-lg",
2112
2209
  "data-error-boundary": errorId,
2113
2210
  children: /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-3", children: [
2114
- /* @__PURE__ */ jsx17("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx17("svg", { className: "w-5 h-5 text-destructive", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx17("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }) }),
2211
+ /* @__PURE__ */ jsx18("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx18("svg", { className: "w-5 h-5 text-destructive", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx18("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }) }),
2115
2212
  /* @__PURE__ */ jsxs14("div", { className: "flex-1 min-w-0", children: [
2116
2213
  /* @__PURE__ */ jsxs14("h3", { className: "text-destructive", children: [
2117
2214
  "Error in ",
2118
2215
  componentName
2119
2216
  ] }),
2120
- /* @__PURE__ */ jsx17("p", { className: "text-destructive/80", children: this.state.error?.message || "An unexpected error occurred." }),
2217
+ /* @__PURE__ */ jsx18("p", { className: "text-destructive/80", children: this.state.error?.message || "An unexpected error occurred." }),
2121
2218
  enableRetry && retryCount < maxRetries && /* @__PURE__ */ jsxs14("div", { className: "flex gap-3 mb-4", children: [
2122
2219
  /* @__PURE__ */ jsxs14(
2123
2220
  "button",
@@ -2133,7 +2230,7 @@ var ErrorBoundary = class extends Component {
2133
2230
  ]
2134
2231
  }
2135
2232
  ),
2136
- /* @__PURE__ */ jsx17(
2233
+ /* @__PURE__ */ jsx18(
2137
2234
  "button",
2138
2235
  {
2139
2236
  onClick: () => window.location.reload(),
@@ -2143,8 +2240,8 @@ var ErrorBoundary = class extends Component {
2143
2240
  )
2144
2241
  ] }),
2145
2242
  retryCount >= maxRetries && /* @__PURE__ */ jsxs14("div", { className: "mb-4 p-3 bg-acc-50 border border-acc-200 rounded-md", children: [
2146
- /* @__PURE__ */ jsx17("p", { className: "text-acc-800", children: "Maximum retry attempts reached. Please reload the page or contact support." }),
2147
- /* @__PURE__ */ jsx17(
2243
+ /* @__PURE__ */ jsx18("p", { className: "text-acc-800", children: "Maximum retry attempts reached. Please reload the page or contact support." }),
2244
+ /* @__PURE__ */ jsx18(
2148
2245
  "button",
2149
2246
  {
2150
2247
  onClick: () => window.location.reload(),
@@ -2154,7 +2251,7 @@ var ErrorBoundary = class extends Component {
2154
2251
  )
2155
2252
  ] }),
2156
2253
  import.meta.env.MODE === "development" && this.state.error && /* @__PURE__ */ jsxs14("details", { className: "text-sm text-destructive/70", children: [
2157
- /* @__PURE__ */ jsx17("summary", { className: "cursor-pointer font-medium mb-2", children: "Error Details (Development)" }),
2254
+ /* @__PURE__ */ jsx18("summary", { className: "cursor-pointer font-medium mb-2", children: "Error Details (Development)" }),
2158
2255
  /* @__PURE__ */ jsxs14("div", { className: "bg-destructive/5 p-3 rounded border", children: [
2159
2256
  /* @__PURE__ */ jsxs14("p", { className: "font-mono", children: [
2160
2257
  "Error ID: ",
@@ -2180,7 +2277,7 @@ import { useState as useState7, useCallback as useCallback4 } from "react";
2180
2277
  init_OrganisationProvider();
2181
2278
  init_logger();
2182
2279
  import { RefreshCw as RefreshCw2, AlertCircle as AlertCircle2, Building2, Shield } from "lucide-react";
2183
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
2280
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
2184
2281
  function OrganisationSelector({
2185
2282
  placeholder = "Select organisation",
2186
2283
  className,
@@ -2245,14 +2342,14 @@ function OrganisationSelector({
2245
2342
  }, [refreshOrganisations]);
2246
2343
  if (orgLoading) {
2247
2344
  return /* @__PURE__ */ jsxs15("div", { className: `flex items-center gap-2 ${className}`, children: [
2248
- /* @__PURE__ */ jsx18(LoadingSpinner, { size: "sm" }),
2249
- /* @__PURE__ */ jsx18("span", { className: "text-sm text-muted-foreground", children: compact ? "Loading..." : "Loading organisations..." })
2345
+ /* @__PURE__ */ jsx19(LoadingSpinner, { size: "sm" }),
2346
+ /* @__PURE__ */ jsx19("span", { className: "text-sm text-muted-foreground", children: compact ? "Loading..." : "Loading organisations..." })
2250
2347
  ] });
2251
2348
  }
2252
2349
  if (orgError) {
2253
2350
  return /* @__PURE__ */ jsxs15("div", { className: `space-y-2 ${className}`, children: [
2254
2351
  /* @__PURE__ */ jsxs15(Alert, { variant: "destructive", children: [
2255
- /* @__PURE__ */ jsx18(AlertCircle2, { className: "h-4 w-4" }),
2352
+ /* @__PURE__ */ jsx19(AlertCircle2, { className: "h-4 w-4" }),
2256
2353
  /* @__PURE__ */ jsxs15(AlertDescription, { children: [
2257
2354
  "Failed to load organisations: ",
2258
2355
  orgError.message
@@ -2267,7 +2364,7 @@ function OrganisationSelector({
2267
2364
  disabled: isLoading,
2268
2365
  className: "w-full",
2269
2366
  children: [
2270
- /* @__PURE__ */ jsx18(RefreshCw2, { className: `h-4 w-4 mr-2 ${isLoading ? "animate-spin" : ""}` }),
2367
+ /* @__PURE__ */ jsx19(RefreshCw2, { className: `h-4 w-4 mr-2 ${isLoading ? "animate-spin" : ""}` }),
2271
2368
  "Retry"
2272
2369
  ]
2273
2370
  }
@@ -2278,8 +2375,8 @@ function OrganisationSelector({
2278
2375
  if (showNoOrganisationsMessage) {
2279
2376
  return /* @__PURE__ */ jsxs15("div", { className: `space-y-2 ${className}`, children: [
2280
2377
  /* @__PURE__ */ jsxs15(Alert, { children: [
2281
- /* @__PURE__ */ jsx18(Building2, { className: "h-4 w-4" }),
2282
- /* @__PURE__ */ jsx18(AlertDescription, { children: "No organisations available. Please contact your administrator to be added to an organisation." })
2378
+ /* @__PURE__ */ jsx19(Building2, { className: "h-4 w-4" }),
2379
+ /* @__PURE__ */ jsx19(AlertDescription, { children: "No organisations available. Please contact your administrator to be added to an organisation." })
2283
2380
  ] }),
2284
2381
  showRetryButton && /* @__PURE__ */ jsxs15(
2285
2382
  Button,
@@ -2290,7 +2387,7 @@ function OrganisationSelector({
2290
2387
  disabled: isLoading,
2291
2388
  className: "w-full",
2292
2389
  children: [
2293
- /* @__PURE__ */ jsx18(RefreshCw2, { className: `h-4 w-4 mr-2 ${isLoading ? "animate-spin" : ""}` }),
2390
+ /* @__PURE__ */ jsx19(RefreshCw2, { className: `h-4 w-4 mr-2 ${isLoading ? "animate-spin" : ""}` }),
2294
2391
  "Check Again"
2295
2392
  ]
2296
2393
  }
@@ -2300,8 +2397,8 @@ function OrganisationSelector({
2300
2397
  return null;
2301
2398
  }
2302
2399
  const switchErrorDisplay = switchError && /* @__PURE__ */ jsxs15(Alert, { variant: "destructive", className: "mt-2", children: [
2303
- /* @__PURE__ */ jsx18(AlertCircle2, { className: "h-4 w-4" }),
2304
- /* @__PURE__ */ jsx18(AlertDescription, { children: switchError })
2400
+ /* @__PURE__ */ jsx19(AlertCircle2, { className: "h-4 w-4" }),
2401
+ /* @__PURE__ */ jsx19(AlertDescription, { children: switchError })
2305
2402
  ] });
2306
2403
  return /* @__PURE__ */ jsxs15("div", { className: `space-y-2 ${className}`, children: [
2307
2404
  /* @__PURE__ */ jsxs15(
@@ -2311,14 +2408,14 @@ function OrganisationSelector({
2311
2408
  onValueChange: handleOrganisationChange,
2312
2409
  disabled: disabled || isLoading || !selectedOrganisation,
2313
2410
  children: [
2314
- /* @__PURE__ */ jsx18(SelectTrigger, { className: `${isLoading ? "opacity-50" : ""}`, children: /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
2315
- isLoading ? /* @__PURE__ */ jsx18(LoadingSpinner, { size: "sm" }) : /* @__PURE__ */ jsx18(Building2, { className: "h-4 w-4 text-muted-foreground" }),
2316
- /* @__PURE__ */ jsx18(SelectValue, { placeholder })
2411
+ /* @__PURE__ */ jsx19(SelectTrigger, { className: `${isLoading ? "opacity-50" : ""}`, children: /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
2412
+ isLoading ? /* @__PURE__ */ jsx19(LoadingSpinner, { size: "sm" }) : /* @__PURE__ */ jsx19(Building2, { className: "h-4 w-4 text-muted-foreground" }),
2413
+ /* @__PURE__ */ jsx19(SelectValue, { placeholder })
2317
2414
  ] }) }),
2318
- /* @__PURE__ */ jsx18(SelectContent, { children: organisations.map((org) => {
2415
+ /* @__PURE__ */ jsx19(SelectContent, { children: organisations.map((org) => {
2319
2416
  const userRole = getUserRole(org.id);
2320
2417
  const hasAccess = validateOrganisationAccess(org.id);
2321
- return /* @__PURE__ */ jsx18(
2418
+ return /* @__PURE__ */ jsx19(
2322
2419
  SelectItem,
2323
2420
  {
2324
2421
  value: org.id,
@@ -2326,15 +2423,15 @@ function OrganisationSelector({
2326
2423
  className: !hasAccess ? "opacity-50" : "",
2327
2424
  children: /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between w-full", children: [
2328
2425
  /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
2329
- /* @__PURE__ */ jsx18(Building2, { className: "h-4 w-4" }),
2426
+ /* @__PURE__ */ jsx19(Building2, { className: "h-4 w-4" }),
2330
2427
  /* @__PURE__ */ jsxs15("div", { className: "flex flex-col", children: [
2331
- /* @__PURE__ */ jsx18("span", { className: "font-medium", children: org.display_name }),
2332
- !compact && org.description && /* @__PURE__ */ jsx18("span", { className: "text-xs text-muted-foreground truncate max-w-40", children: org.description })
2428
+ /* @__PURE__ */ jsx19("span", { className: "font-medium", children: org.display_name }),
2429
+ !compact && org.description && /* @__PURE__ */ jsx19("span", { className: "text-xs text-muted-foreground truncate max-w-40", children: org.description })
2333
2430
  ] })
2334
2431
  ] }),
2335
2432
  showRole && /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1 ml-4", children: [
2336
- /* @__PURE__ */ jsx18(Shield, { className: "h-3 w-3 text-muted-foreground" }),
2337
- /* @__PURE__ */ jsx18("span", { className: "text-xs text-muted-foreground capitalize", children: userRole?.replace("_", " ") || "No Role" })
2433
+ /* @__PURE__ */ jsx19(Shield, { className: "h-3 w-3 text-muted-foreground" }),
2434
+ /* @__PURE__ */ jsx19("span", { className: "text-xs text-muted-foreground capitalize", children: userRole?.replace("_", " ") || "No Role" })
2338
2435
  ] })
2339
2436
  ] })
2340
2437
  },
@@ -2689,7 +2786,7 @@ function useFilesByCategory(supabase, table_name, record_id, category, organisat
2689
2786
 
2690
2787
  // src/components/FileUpload/FileUpload.tsx
2691
2788
  import { useState as useState9, useCallback as useCallback6, useRef as useRef3, useEffect as useEffect6, useMemo as useMemo8 } from "react";
2692
- import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
2789
+ import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
2693
2790
  function FileUpload({
2694
2791
  supabase,
2695
2792
  table_name,
@@ -3022,7 +3119,7 @@ function FileUpload({
3022
3119
  onClick: !isDisabled ? handleClick : void 0,
3023
3120
  children: [
3024
3121
  children || /* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
3025
- /* @__PURE__ */ jsx19(
3122
+ /* @__PURE__ */ jsx20(
3026
3123
  "input",
3027
3124
  {
3028
3125
  ref: fileInputRef,
@@ -3035,8 +3132,8 @@ function FileUpload({
3035
3132
  "data-testid": "file-input"
3036
3133
  }
3037
3134
  ),
3038
- /* @__PURE__ */ jsx19("div", { className: "text-sec-600", children: isResolvingAppId ? "Resolving app configuration..." : isDragging ? "Drop files here..." : /* @__PURE__ */ jsxs16(Fragment5, { children: [
3039
- /* @__PURE__ */ jsx19("span", { className: "font-medium", children: "Click to upload" }),
3135
+ /* @__PURE__ */ jsx20("div", { className: "text-sec-600", children: isResolvingAppId ? "Resolving app configuration..." : isDragging ? "Drop files here..." : /* @__PURE__ */ jsxs16(Fragment5, { children: [
3136
+ /* @__PURE__ */ jsx20("span", { className: "font-medium", children: "Click to upload" }),
3040
3137
  " ",
3041
3138
  "or drag and drop"
3042
3139
  ] }) }),
@@ -3046,11 +3143,11 @@ function FileUpload({
3046
3143
  !isResolvingAppId && multiple && " \u2022 Multiple files allowed"
3047
3144
  ] })
3048
3145
  ] }),
3049
- isUploading && !showProgress && /* @__PURE__ */ jsx19("div", { className: "absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center", children: /* @__PURE__ */ jsx19("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main-500" }) })
3146
+ isUploading && !showProgress && /* @__PURE__ */ jsx20("div", { className: "absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center", children: /* @__PURE__ */ jsx20("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main-500" }) })
3050
3147
  ]
3051
3148
  }
3052
3149
  ),
3053
- showProgress && uploadStates.size > 0 && /* @__PURE__ */ jsx19("div", { className: "space-y-2", children: Array.from(uploadStates.entries()).map(([fileId, uploadState]) => {
3150
+ showProgress && uploadStates.size > 0 && /* @__PURE__ */ jsx20("div", { className: "space-y-2", children: Array.from(uploadStates.entries()).map(([fileId, uploadState]) => {
3054
3151
  const { file, progress, preview, result } = uploadState;
3055
3152
  const isError = progress.status === "error";
3056
3153
  const isCompleted = progress.status === "completed";
@@ -3060,23 +3157,23 @@ function FileUpload({
3060
3157
  {
3061
3158
  className: `flex items-center space-x-3 p-3 rounded-lg border ${isError ? "bg-acc-50 border-acc-200" : isCompleted ? "bg-success-50 border-success-200" : "bg-sec-50 border-sec-200"}`,
3062
3159
  children: [
3063
- /* @__PURE__ */ jsx19("div", { className: "flex-shrink-0", children: preview ? /* @__PURE__ */ jsx19(
3160
+ /* @__PURE__ */ jsx20("div", { className: "flex-shrink-0", children: preview ? /* @__PURE__ */ jsx20(
3064
3161
  "img",
3065
3162
  {
3066
3163
  src: preview,
3067
3164
  alt: file.name,
3068
3165
  className: "w-12 h-12 object-cover rounded"
3069
3166
  }
3070
- ) : /* @__PURE__ */ jsx19("div", { className: "w-12 h-12 flex items-center justify-center bg-sec-200 rounded", children: /* @__PURE__ */ jsx19("span", { className: "text-2xl", children: "\u{1F4C4}" }) }) }),
3167
+ ) : /* @__PURE__ */ jsx20("div", { className: "w-12 h-12 flex items-center justify-center bg-sec-200 rounded", children: /* @__PURE__ */ jsx20("span", { className: "text-2xl", children: "\u{1F4C4}" }) }) }),
3071
3168
  /* @__PURE__ */ jsxs16("div", { className: "flex-1 min-w-0", children: [
3072
- /* @__PURE__ */ jsx19("div", { className: "font-medium text-sec-900 truncate", children: file.name }),
3169
+ /* @__PURE__ */ jsx20("div", { className: "font-medium text-sec-900 truncate", children: file.name }),
3073
3170
  /* @__PURE__ */ jsxs16("div", { className: "text-sm text-sec-500", children: [
3074
3171
  formatFileSize(file.size),
3075
3172
  isCompleted && result && " \u2022 Uploaded",
3076
3173
  isError && progress.error && ` \u2022 ${progress.error}`
3077
3174
  ] }),
3078
3175
  showProgress && (isUploading2 || isError) && /* @__PURE__ */ jsxs16("div", { className: "mt-2", children: [
3079
- /* @__PURE__ */ jsx19("div", { className: "w-full bg-sec-200 rounded-full h-2", children: /* @__PURE__ */ jsx19(
3176
+ /* @__PURE__ */ jsx20("div", { className: "w-full bg-sec-200 rounded-full h-2", children: /* @__PURE__ */ jsx20(
3080
3177
  "div",
3081
3178
  {
3082
3179
  className: `h-2 rounded-full transition-all duration-300 ${isError ? "bg-acc-500" : "bg-main-500"}`,
@@ -3093,17 +3190,17 @@ function FileUpload({
3093
3190
  ] })
3094
3191
  ] }),
3095
3192
  /* @__PURE__ */ jsxs16("div", { className: "flex-shrink-0", children: [
3096
- isCompleted && /* @__PURE__ */ jsx19("span", { className: "text-success-500 text-xl", children: "\u2713" }),
3097
- isError && /* @__PURE__ */ jsx19("span", { className: "text-acc-500 text-xl", children: "\u2715" }),
3098
- isUploading2 && /* @__PURE__ */ jsx19("div", { className: "animate-spin rounded-full h-5 w-5 border-b-2 border-main-500" })
3193
+ isCompleted && /* @__PURE__ */ jsx20("span", { className: "text-success-500 text-xl", children: "\u2713" }),
3194
+ isError && /* @__PURE__ */ jsx20("span", { className: "text-acc-500 text-xl", children: "\u2715" }),
3195
+ isUploading2 && /* @__PURE__ */ jsx20("div", { className: "animate-spin rounded-full h-5 w-5 border-b-2 border-main-500" })
3099
3196
  ] })
3100
3197
  ]
3101
3198
  },
3102
3199
  fileId
3103
3200
  );
3104
3201
  }) }),
3105
- appIdError && /* @__PURE__ */ jsx19("div", { className: "p-3 bg-acc-50 border border-acc-200 rounded-lg text-sm text-acc-600", children: appIdError }),
3106
- error && /* @__PURE__ */ jsx19("div", { className: "p-3 bg-acc-50 border border-acc-200 rounded-lg text-sm text-acc-600", children: error })
3202
+ appIdError && /* @__PURE__ */ jsx20("div", { className: "p-3 bg-acc-50 border border-acc-200 rounded-lg text-sm text-acc-600", children: appIdError }),
3203
+ error && /* @__PURE__ */ jsx20("div", { className: "p-3 bg-acc-50 border border-acc-200 rounded-lg text-sm text-acc-600", children: error })
3107
3204
  ] });
3108
3205
  }
3109
3206
 
@@ -3185,7 +3282,7 @@ function useFileUrl(fileReference, options) {
3185
3282
  // src/components/FileDisplay/FileDisplay.tsx
3186
3283
  init_UnifiedAuthProvider();
3187
3284
  init_logger();
3188
- import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
3285
+ import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
3189
3286
  var fallbackSizeClasses = {
3190
3287
  xs: "h-4 w-4 text-xs",
3191
3288
  sm: "h-6 w-6 text-sm",
@@ -3292,17 +3389,17 @@ function FileDisplayContent({
3292
3389
  };
3293
3390
  if (error) {
3294
3391
  if (ErrorComponent) {
3295
- return /* @__PURE__ */ jsx20(ErrorComponent, { error, retry: clearError });
3392
+ return /* @__PURE__ */ jsx21(ErrorComponent, { error, retry: clearError });
3296
3393
  }
3297
3394
  if (showFallback) {
3298
- return /* @__PURE__ */ jsx20("div", { className: fallbackClasses, title: "File unavailable", children: computedFallbackText });
3395
+ return /* @__PURE__ */ jsx21("div", { className: fallbackClasses, title: "File unavailable", children: computedFallbackText });
3299
3396
  }
3300
3397
  return /* @__PURE__ */ jsxs17("div", { className: `p-4 bg-acc-50 border border-acc-200 rounded-lg ${className}`, children: [
3301
3398
  /* @__PURE__ */ jsxs17("div", { className: "text-acc-600", children: [
3302
3399
  "Error loading file: ",
3303
3400
  error instanceof Error ? error.message : String(error)
3304
3401
  ] }),
3305
- clearError && /* @__PURE__ */ jsx20(
3402
+ clearError && /* @__PURE__ */ jsx21(
3306
3403
  "button",
3307
3404
  {
3308
3405
  onClick: clearError,
@@ -3332,20 +3429,20 @@ function FileDisplayContent({
3332
3429
  }
3333
3430
  if (isLoading) {
3334
3431
  if (LoadingComponent) {
3335
- return /* @__PURE__ */ jsx20(LoadingComponent, {});
3432
+ return /* @__PURE__ */ jsx21(LoadingComponent, {});
3336
3433
  }
3337
- return /* @__PURE__ */ jsx20("div", { className: `flex items-center justify-center p-4 ${className}`, children: /* @__PURE__ */ jsx20("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main-500" }) });
3434
+ return /* @__PURE__ */ jsx21("div", { className: `flex items-center justify-center p-4 ${className}`, children: /* @__PURE__ */ jsx21("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main-500" }) });
3338
3435
  }
3339
3436
  if ((category || displayOnly) && fileReference) {
3340
3437
  const isImage = fileReference.file_metadata.fileType?.startsWith("image/");
3341
3438
  if (displayOnly && isImage && !showDelete) {
3342
3439
  if (imageError && showFallback) {
3343
- return /* @__PURE__ */ jsx20("div", { className: fallbackClasses, title: fileReference.file_metadata.fileName || "File", children: computedFallbackText });
3440
+ return /* @__PURE__ */ jsx21("div", { className: fallbackClasses, title: fileReference.file_metadata.fileName || "File", children: computedFallbackText });
3344
3441
  }
3345
3442
  if (!fileUrl) {
3346
- return /* @__PURE__ */ jsx20("div", { className: `bg-sec-100 rounded animate-pulse ${className || "max-w-full h-48"}`, children: /* @__PURE__ */ jsx20("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx20("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main-500" }) }) });
3443
+ return /* @__PURE__ */ jsx21("div", { className: `bg-sec-100 rounded animate-pulse ${className || "max-w-full h-48"}`, children: /* @__PURE__ */ jsx21("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx21("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main-500" }) }) });
3347
3444
  }
3348
- return /* @__PURE__ */ jsx20(
3445
+ return /* @__PURE__ */ jsx21(
3349
3446
  "img",
3350
3447
  {
3351
3448
  src: fileUrl,
@@ -3356,11 +3453,11 @@ function FileDisplayContent({
3356
3453
  );
3357
3454
  }
3358
3455
  if (displayOnly && showFallback && (!fileUrl || imageError || !isImage)) {
3359
- return /* @__PURE__ */ jsx20("div", { className: fallbackClasses, title: fileReference.file_metadata.fileName || "File", children: computedFallbackText });
3456
+ return /* @__PURE__ */ jsx21("div", { className: fallbackClasses, title: fileReference.file_metadata.fileName || "File", children: computedFallbackText });
3360
3457
  }
3361
3458
  return /* @__PURE__ */ jsxs17("div", { className: `space-y-2 ${className}`, children: [
3362
3459
  isImage && fileUrl && !imageError ? /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
3363
- /* @__PURE__ */ jsx20(
3460
+ /* @__PURE__ */ jsx21(
3364
3461
  "img",
3365
3462
  {
3366
3463
  src: fileUrl,
@@ -3370,7 +3467,7 @@ function FileDisplayContent({
3370
3467
  }
3371
3468
  ),
3372
3469
  showDelete && /* @__PURE__ */ jsxs17(Fragment6, { children: [
3373
- /* @__PURE__ */ jsx20(
3470
+ /* @__PURE__ */ jsx21(
3374
3471
  "button",
3375
3472
  {
3376
3473
  onClick: handleDeleteClick,
@@ -3380,29 +3477,29 @@ function FileDisplayContent({
3380
3477
  children: "\xD7"
3381
3478
  }
3382
3479
  ),
3383
- /* @__PURE__ */ jsx20(Dialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: /* @__PURE__ */ jsxs17(DialogContent, { size: "sm", children: [
3384
- /* @__PURE__ */ jsx20(DialogHeader, { children: /* @__PURE__ */ jsx20(DialogTitle, { children: "Confirm Delete" }) }),
3385
- /* @__PURE__ */ jsx20(DialogBody, { children: /* @__PURE__ */ jsx20("p", { children: "Are you sure you want to delete this file? This action cannot be undone." }) }),
3480
+ /* @__PURE__ */ jsx21(Dialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: /* @__PURE__ */ jsxs17(DialogContent, { size: "sm", children: [
3481
+ /* @__PURE__ */ jsx21(DialogHeader, { children: /* @__PURE__ */ jsx21(DialogTitle, { children: "Confirm Delete" }) }),
3482
+ /* @__PURE__ */ jsx21(DialogBody, { children: /* @__PURE__ */ jsx21("p", { children: "Are you sure you want to delete this file? This action cannot be undone." }) }),
3386
3483
  /* @__PURE__ */ jsxs17(DialogFooter, { children: [
3387
- /* @__PURE__ */ jsx20(Button, { variant: "outline", onClick: () => setDeleteDialogOpen(false), children: "Cancel" }),
3388
- /* @__PURE__ */ jsx20(Button, { variant: "destructive", onClick: handleDeleteConfirm, children: "Delete" })
3484
+ /* @__PURE__ */ jsx21(Button, { variant: "outline", onClick: () => setDeleteDialogOpen(false), children: "Cancel" }),
3485
+ /* @__PURE__ */ jsx21(Button, { variant: "destructive", onClick: handleDeleteConfirm, children: "Delete" })
3389
3486
  ] })
3390
3487
  ] }) })
3391
3488
  ] })
3392
3489
  ] }) : isImage && imageError && showFallback ? (
3393
3490
  // Show fallback when image fails to load and fallback is enabled
3394
- /* @__PURE__ */ jsx20("div", { className: fallbackClasses, title: fileReference.file_metadata.fileName || "File", children: computedFallbackText })
3491
+ /* @__PURE__ */ jsx21("div", { className: fallbackClasses, title: fileReference.file_metadata.fileName || "File", children: computedFallbackText })
3395
3492
  ) : /* @__PURE__ */ jsxs17("div", { className: "flex items-center space-x-3 p-3 bg-sec-50 rounded-lg border border-sec-200", children: [
3396
- /* @__PURE__ */ jsx20("span", { className: "text-2xl", children: getFileIcon(fileReference.file_metadata.fileType || "") }),
3493
+ /* @__PURE__ */ jsx21("span", { className: "text-2xl", children: getFileIcon(fileReference.file_metadata.fileType || "") }),
3397
3494
  /* @__PURE__ */ jsxs17("div", { className: "flex-1 min-w-0", children: [
3398
- /* @__PURE__ */ jsx20("div", { className: "font-medium text-sec-900 truncate", children: fileReference.file_metadata.fileName || "Unknown file" }),
3495
+ /* @__PURE__ */ jsx21("div", { className: "font-medium text-sec-900 truncate", children: fileReference.file_metadata.fileName || "Unknown file" }),
3399
3496
  /* @__PURE__ */ jsxs17("div", { className: "text-sm text-sec-500", children: [
3400
3497
  fileReference.file_metadata.fileSize && formatFileSize(fileReference.file_metadata.fileSize),
3401
3498
  fileReference.file_metadata.fileType && ` \u2022 ${fileReference.file_metadata.fileType}`
3402
3499
  ] })
3403
3500
  ] }),
3404
3501
  showDelete && /* @__PURE__ */ jsxs17(Fragment6, { children: [
3405
- /* @__PURE__ */ jsx20(
3502
+ /* @__PURE__ */ jsx21(
3406
3503
  "button",
3407
3504
  {
3408
3505
  onClick: handleDeleteClick,
@@ -3412,12 +3509,12 @@ function FileDisplayContent({
3412
3509
  children: "\xD7"
3413
3510
  }
3414
3511
  ),
3415
- /* @__PURE__ */ jsx20(Dialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: /* @__PURE__ */ jsxs17(DialogContent, { size: "sm", children: [
3416
- /* @__PURE__ */ jsx20(DialogHeader, { children: /* @__PURE__ */ jsx20(DialogTitle, { children: "Confirm Delete" }) }),
3417
- /* @__PURE__ */ jsx20(DialogBody, { children: /* @__PURE__ */ jsx20("p", { children: "Are you sure you want to delete this file? This action cannot be undone." }) }),
3512
+ /* @__PURE__ */ jsx21(Dialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: /* @__PURE__ */ jsxs17(DialogContent, { size: "sm", children: [
3513
+ /* @__PURE__ */ jsx21(DialogHeader, { children: /* @__PURE__ */ jsx21(DialogTitle, { children: "Confirm Delete" }) }),
3514
+ /* @__PURE__ */ jsx21(DialogBody, { children: /* @__PURE__ */ jsx21("p", { children: "Are you sure you want to delete this file? This action cannot be undone." }) }),
3418
3515
  /* @__PURE__ */ jsxs17(DialogFooter, { children: [
3419
- /* @__PURE__ */ jsx20(Button, { variant: "outline", onClick: () => setDeleteDialogOpen(false), children: "Cancel" }),
3420
- /* @__PURE__ */ jsx20(Button, { variant: "destructive", onClick: handleDeleteConfirm, children: "Delete" })
3516
+ /* @__PURE__ */ jsx21(Button, { variant: "outline", onClick: () => setDeleteDialogOpen(false), children: "Cancel" }),
3517
+ /* @__PURE__ */ jsx21(Button, { variant: "destructive", onClick: handleDeleteConfirm, children: "Delete" })
3421
3518
  ] })
3422
3519
  ] }) })
3423
3520
  ] })
@@ -3431,7 +3528,7 @@ function FileDisplayContent({
3431
3528
  const fileUrl2 = internalFileUrls.get(fileRef.id) || null;
3432
3529
  const canDownload = !isImage && fileUrl2;
3433
3530
  return /* @__PURE__ */ jsxs17("div", { className: "flex items-center space-x-3 p-3 bg-sec-50 rounded-lg border border-sec-200", children: [
3434
- isImage && fileUrl2 ? /* @__PURE__ */ jsx20(
3531
+ isImage && fileUrl2 ? /* @__PURE__ */ jsx21(
3435
3532
  "img",
3436
3533
  {
3437
3534
  src: fileUrl2,
@@ -3439,9 +3536,9 @@ function FileDisplayContent({
3439
3536
  className: "w-12 h-12 object-cover rounded",
3440
3537
  onError: handleImageError
3441
3538
  }
3442
- ) : /* @__PURE__ */ jsx20("span", { className: "text-2xl", children: getFileIcon(fileRef.file_metadata.fileType || "") }),
3539
+ ) : /* @__PURE__ */ jsx21("span", { className: "text-2xl", children: getFileIcon(fileRef.file_metadata.fileType || "") }),
3443
3540
  /* @__PURE__ */ jsxs17("div", { className: "flex-1 min-w-0", children: [
3444
- /* @__PURE__ */ jsx20("div", { className: "font-medium text-sec-900 truncate", children: fileRef.file_metadata.fileName || "Unknown file" }),
3541
+ /* @__PURE__ */ jsx21("div", { className: "font-medium text-sec-900 truncate", children: fileRef.file_metadata.fileName || "Unknown file" }),
3445
3542
  /* @__PURE__ */ jsxs17("div", { className: "text-sm text-sec-500", children: [
3446
3543
  fileRef.file_metadata.fileSize && formatFileSize(fileRef.file_metadata.fileSize),
3447
3544
  fileRef.file_metadata.fileType && ` \u2022 ${fileRef.file_metadata.fileType}`,
@@ -3449,7 +3546,7 @@ function FileDisplayContent({
3449
3546
  ] })
3450
3547
  ] }),
3451
3548
  /* @__PURE__ */ jsxs17("div", { className: "flex items-center space-x-2", children: [
3452
- canDownload && /* @__PURE__ */ jsx20(
3549
+ canDownload && /* @__PURE__ */ jsx21(
3453
3550
  "a",
3454
3551
  {
3455
3552
  href: fileRef.file_path,
@@ -3459,7 +3556,7 @@ function FileDisplayContent({
3459
3556
  children: "\u2193"
3460
3557
  }
3461
3558
  ),
3462
- showDelete && onDelete && /* @__PURE__ */ jsx20(
3559
+ showDelete && onDelete && /* @__PURE__ */ jsx21(
3463
3560
  "button",
3464
3561
  {
3465
3562
  onClick: handleDeleteClick,
@@ -3495,7 +3592,7 @@ function FileDisplayPublic({
3495
3592
  const supabase = publicPageContext?.supabase ?? null;
3496
3593
  if (!supabase) {
3497
3594
  if (showFallback) {
3498
- return /* @__PURE__ */ jsx20(
3595
+ return /* @__PURE__ */ jsx21(
3499
3596
  FileDisplayContent,
3500
3597
  {
3501
3598
  isLoading: false,
@@ -3521,7 +3618,7 @@ function FileDisplayPublic({
3521
3618
  }
3522
3619
  );
3523
3620
  }
3524
- return /* @__PURE__ */ jsx20("div", { className: `text-sec-500 text-center p-4 ${className}`, children: "Supabase client not available in public context" });
3621
+ return /* @__PURE__ */ jsx21("div", { className: `text-sec-500 text-center p-4 ${className}`, children: "Supabase client not available in public context" });
3525
3622
  }
3526
3623
  const {
3527
3624
  fileUrl,
@@ -3565,7 +3662,7 @@ function FileDisplayPublic({
3565
3662
  finalFileCount = 1;
3566
3663
  finalFileUrl = fileUrls.get(targetFile.id) || null;
3567
3664
  }
3568
- return /* @__PURE__ */ jsx20(
3665
+ return /* @__PURE__ */ jsx21(
3569
3666
  FileDisplayContent,
3570
3667
  {
3571
3668
  isLoading,
@@ -3609,7 +3706,7 @@ function FileDisplayAuthenticated({
3609
3706
  }) {
3610
3707
  const { supabase } = useUnifiedAuth();
3611
3708
  if (!supabase) {
3612
- return /* @__PURE__ */ jsx20("div", { className: `text-sec-500 text-center p-4 ${className}`, children: "Supabase client not available in authenticated context" });
3709
+ return /* @__PURE__ */ jsx21("div", { className: `text-sec-500 text-center p-4 ${className}`, children: "Supabase client not available in authenticated context" });
3613
3710
  }
3614
3711
  const {
3615
3712
  fileUrl,
@@ -3667,7 +3764,7 @@ function FileDisplayAuthenticated({
3667
3764
  finalError = error || displayOnlyFileUrlHook.error;
3668
3765
  }
3669
3766
  }
3670
- return /* @__PURE__ */ jsx20(
3767
+ return /* @__PURE__ */ jsx21(
3671
3768
  FileDisplayContent,
3672
3769
  {
3673
3770
  isLoading: finalIsLoading,
@@ -3712,7 +3809,7 @@ function FileDisplay({
3712
3809
  }) {
3713
3810
  const isPublicPage = useIsPublicPage();
3714
3811
  if (isPublicPage) {
3715
- return /* @__PURE__ */ jsx20(
3812
+ return /* @__PURE__ */ jsx21(
3716
3813
  FileDisplayPublic,
3717
3814
  {
3718
3815
  table_name,
@@ -3732,7 +3829,7 @@ function FileDisplay({
3732
3829
  }
3733
3830
  );
3734
3831
  }
3735
- return /* @__PURE__ */ jsx20(
3832
+ return /* @__PURE__ */ jsx21(
3736
3833
  FileDisplayAuthenticated,
3737
3834
  {
3738
3835
  table_name,
@@ -3754,9 +3851,9 @@ function FileDisplay({
3754
3851
  }
3755
3852
 
3756
3853
  // src/components/Table/Table.tsx
3757
- import * as React17 from "react";
3758
- import { jsx as jsx21 } from "react/jsx-runtime";
3759
- var Table = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3854
+ import * as React18 from "react";
3855
+ import { jsx as jsx22 } from "react/jsx-runtime";
3856
+ var Table = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
3760
3857
  "table",
3761
3858
  {
3762
3859
  ref,
@@ -3765,9 +3862,9 @@ var Table = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
3765
3862
  }
3766
3863
  ));
3767
3864
  Table.displayName = "Table";
3768
- var TableHeader = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
3865
+ var TableHeader = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
3769
3866
  TableHeader.displayName = "TableHeader";
3770
- var TableBody = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3867
+ var TableBody = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
3771
3868
  "tbody",
3772
3869
  {
3773
3870
  ref,
@@ -3776,7 +3873,7 @@ var TableBody = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3776
3873
  }
3777
3874
  ));
3778
3875
  TableBody.displayName = "TableBody";
3779
- var TableFooter = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3876
+ var TableFooter = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
3780
3877
  "tfoot",
3781
3878
  {
3782
3879
  ref,
@@ -3788,7 +3885,7 @@ var TableFooter = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
3788
3885
  }
3789
3886
  ));
3790
3887
  TableFooter.displayName = "TableFooter";
3791
- var TableRow = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3888
+ var TableRow = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
3792
3889
  "tr",
3793
3890
  {
3794
3891
  ref,
@@ -3800,7 +3897,7 @@ var TableRow = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__
3800
3897
  }
3801
3898
  ));
3802
3899
  TableRow.displayName = "TableRow";
3803
- var TableHead = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3900
+ var TableHead = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
3804
3901
  "th",
3805
3902
  {
3806
3903
  ref,
@@ -3812,7 +3909,7 @@ var TableHead = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3812
3909
  }
3813
3910
  ));
3814
3911
  TableHead.displayName = "TableHead";
3815
- var TableCell = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3912
+ var TableCell = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
3816
3913
  "td",
3817
3914
  {
3818
3915
  ref,
@@ -3821,7 +3918,7 @@ var TableCell = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3821
3918
  }
3822
3919
  ));
3823
3920
  TableCell.displayName = "TableCell";
3824
- var TableCaption = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
3921
+ var TableCaption = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
3825
3922
  "caption",
3826
3923
  {
3827
3924
  ref,
@@ -3832,7 +3929,7 @@ var TableCaption = React17.forwardRef(({ className, ...props }, ref) => /* @__PU
3832
3929
  TableCaption.displayName = "TableCaption";
3833
3930
 
3834
3931
  // src/components/PublicLayout/PublicPageHeader.tsx
3835
- import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
3932
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
3836
3933
  function PublicPageHeader({
3837
3934
  event,
3838
3935
  eventCode,
@@ -3849,7 +3946,7 @@ function PublicPageHeader({
3849
3946
  "w-full px-[max(0rem,calc((100vw-var(--app-width))/2-0.5rem))] grid grid-cols-[auto_1fr_auto] place-items-center gap-2",
3850
3947
  className
3851
3948
  ), children: [
3852
- showAppLogo && appName && /* @__PURE__ */ jsx22(
3949
+ showAppLogo && appName && /* @__PURE__ */ jsx23(
3853
3950
  "img",
3854
3951
  {
3855
3952
  className: "ml-4 max-w-36 object-contain row-span-2",
@@ -3858,8 +3955,8 @@ function PublicPageHeader({
3858
3955
  }
3859
3956
  ),
3860
3957
  event && /* @__PURE__ */ jsxs18(Fragment7, { children: [
3861
- /* @__PURE__ */ jsx22("h1", { children: event.event_name }),
3862
- showEventLogo && event && /* @__PURE__ */ jsx22(Fragment7, { children: customEventLogo || /* @__PURE__ */ jsx22(Fragment7, { children: /* @__PURE__ */ jsx22(
3958
+ /* @__PURE__ */ jsx23("h1", { children: event.event_name }),
3959
+ showEventLogo && event && /* @__PURE__ */ jsx23(Fragment7, { children: customEventLogo || /* @__PURE__ */ jsx23(Fragment7, { children: /* @__PURE__ */ jsx23(
3863
3960
  FileDisplay,
3864
3961
  {
3865
3962
  table_name: "event",
@@ -3876,18 +3973,18 @@ function PublicPageHeader({
3876
3973
  }
3877
3974
  }
3878
3975
  ) }) }),
3879
- event.event_venue && /* @__PURE__ */ jsx22("h4", { children: event.event_venue })
3976
+ event.event_venue && /* @__PURE__ */ jsx23("h4", { children: event.event_venue })
3880
3977
  ] }),
3881
3978
  title && /* @__PURE__ */ jsxs18(Fragment7, { children: [
3882
- /* @__PURE__ */ jsx22("h1", { children: title }),
3883
- description && /* @__PURE__ */ jsx22("p", { className: "text-lg text-sec-600 max-w-3xl mx-auto", children: description })
3979
+ /* @__PURE__ */ jsx23("h1", { children: title }),
3980
+ description && /* @__PURE__ */ jsx23("p", { className: "text-lg text-sec-600 max-w-3xl mx-auto", children: description })
3884
3981
  ] }),
3885
- children && /* @__PURE__ */ jsx22(Fragment7, { children })
3982
+ children && /* @__PURE__ */ jsx23(Fragment7, { children })
3886
3983
  ] });
3887
3984
  }
3888
3985
 
3889
3986
  // src/components/PublicLayout/PublicPageFooter.tsx
3890
- import { Fragment as Fragment8, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
3987
+ import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
3891
3988
  function PublicPageFooter({
3892
3989
  event,
3893
3990
  companyName = "Solvera Solutions Pty Ltd",
@@ -3899,16 +3996,16 @@ function PublicPageFooter({
3899
3996
  children
3900
3997
  }) {
3901
3998
  const copyrightText = copyright || `\xA9 Copyright 2022\u2013${year} all rights reserved, ${companyName}.`;
3902
- return /* @__PURE__ */ jsx23("footer", { className: cn("mt-8 py-6 flex justify-center", className), children: /* @__PURE__ */ jsxs19("section", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto text-center", children: [
3903
- logo && /* @__PURE__ */ jsx23("img", { src: logo, alt: "Logo", className: "h-8 w-auto" }),
3904
- children && /* @__PURE__ */ jsx23(Fragment8, { children }),
3905
- /* @__PURE__ */ jsx23("span", { className: "text-muted-foreground", children: copyrightText }),
3906
- links && links.length > 0 && /* @__PURE__ */ jsx23("ul", { className: "flex gap-4 mt-2 md:mt-0", children: links.map((link, index) => /* @__PURE__ */ jsx23("li", { children: /* @__PURE__ */ jsx23("a", { href: link.href, className: "text-muted-foreground hover:text-foreground", children: link.label }) }, index)) })
3999
+ return /* @__PURE__ */ jsx24("footer", { className: cn("mt-8 py-6 flex justify-center", className), children: /* @__PURE__ */ jsxs19("section", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto text-center", children: [
4000
+ logo && /* @__PURE__ */ jsx24("img", { src: logo, alt: "Logo", className: "h-8 w-auto" }),
4001
+ children && /* @__PURE__ */ jsx24(Fragment8, { children }),
4002
+ /* @__PURE__ */ jsx24("span", { className: "text-muted-foreground", children: copyrightText }),
4003
+ links && links.length > 0 && /* @__PURE__ */ jsx24("ul", { className: "flex gap-4 mt-2 md:mt-0", children: links.map((link, index) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsx24("a", { href: link.href, className: "text-muted-foreground hover:text-foreground", children: link.label }) }, index)) })
3907
4004
  ] }) });
3908
4005
  }
3909
4006
 
3910
4007
  // src/components/PublicLayout/PublicLoadingSpinner.tsx
3911
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
4008
+ import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
3912
4009
  var sizeClasses = {
3913
4010
  sm: "h-4 w-4",
3914
4011
  md: "h-8 w-8",
@@ -3926,7 +4023,7 @@ function PublicLoadingSpinner({
3926
4023
  const sizeClass = sizeClasses[size];
3927
4024
  const displayMessage = customMessage || message;
3928
4025
  const content = /* @__PURE__ */ jsxs20("div", { className: cn("flex flex-col items-center", className), children: [
3929
- showLogo && /* @__PURE__ */ jsx24("div", { className: "mb-4", children: /* @__PURE__ */ jsx24(
4026
+ showLogo && /* @__PURE__ */ jsx25("div", { className: "mb-4", children: /* @__PURE__ */ jsx25(
3930
4027
  "img",
3931
4028
  {
3932
4029
  className: "h-8 w-auto",
@@ -3935,7 +4032,7 @@ function PublicLoadingSpinner({
3935
4032
  }
3936
4033
  ) }),
3937
4034
  /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
3938
- /* @__PURE__ */ jsx24(
4035
+ /* @__PURE__ */ jsx25(
3939
4036
  "div",
3940
4037
  {
3941
4038
  className: cn(
@@ -3946,12 +4043,12 @@ function PublicLoadingSpinner({
3946
4043
  "aria-label": "Loading"
3947
4044
  }
3948
4045
  ),
3949
- /* @__PURE__ */ jsx24("span", { className: "sr-only", children: displayMessage })
4046
+ /* @__PURE__ */ jsx25("span", { className: "sr-only", children: displayMessage })
3950
4047
  ] }),
3951
- displayMessage && /* @__PURE__ */ jsx24("p", { className: "mt-4 text-sm text-sec-600 text-center", children: displayMessage })
4048
+ displayMessage && /* @__PURE__ */ jsx25("p", { className: "mt-4 text-sm text-sec-600 text-center", children: displayMessage })
3952
4049
  ] });
3953
4050
  if (centered) {
3954
- return /* @__PURE__ */ jsx24("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsx24("div", { className: "max-w-md mx-auto px-4", children: content }) });
4051
+ return /* @__PURE__ */ jsx25("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsx25("div", { className: "max-w-md mx-auto px-4", children: content }) });
3955
4052
  }
3956
4053
  return content;
3957
4054
  }
@@ -3960,11 +4057,11 @@ function PublicLoadingSpinnerFullPage({
3960
4057
  eventName,
3961
4058
  className = ""
3962
4059
  }) {
3963
- return /* @__PURE__ */ jsx24("div", { className: cn(
4060
+ return /* @__PURE__ */ jsx25("div", { className: cn(
3964
4061
  "min-h-screen bg-background flex items-center justify-center",
3965
4062
  className
3966
4063
  ), children: /* @__PURE__ */ jsxs20("div", { className: "max-w-md mx-auto text-center px-4", children: [
3967
- /* @__PURE__ */ jsx24("div", { className: "mb-8", children: /* @__PURE__ */ jsx24(
4064
+ /* @__PURE__ */ jsx25("div", { className: "mb-8", children: /* @__PURE__ */ jsx25(
3968
4065
  "img",
3969
4066
  {
3970
4067
  className: "h-12 w-auto mx-auto",
@@ -3972,8 +4069,8 @@ function PublicLoadingSpinnerFullPage({
3972
4069
  alt: "PACE Core"
3973
4070
  }
3974
4071
  ) }),
3975
- eventName && /* @__PURE__ */ jsx24("h1", { className: "text-2xl font-bold text-sec-900 mb-4", children: eventName }),
3976
- /* @__PURE__ */ jsx24("div", { className: "relative mb-6", children: /* @__PURE__ */ jsx24(
4072
+ eventName && /* @__PURE__ */ jsx25("h1", { className: "text-2xl font-bold text-sec-900 mb-4", children: eventName }),
4073
+ /* @__PURE__ */ jsx25("div", { className: "relative mb-6", children: /* @__PURE__ */ jsx25(
3977
4074
  "div",
3978
4075
  {
3979
4076
  className: "h-12 w-12 border-4 border-sec-200 border-t-main-600 rounded-full animate-spin mx-auto",
@@ -3981,11 +4078,11 @@ function PublicLoadingSpinnerFullPage({
3981
4078
  "aria-label": "Loading"
3982
4079
  }
3983
4080
  ) }),
3984
- /* @__PURE__ */ jsx24("p", { className: "text-lg text-sec-600", children: message }),
4081
+ /* @__PURE__ */ jsx25("p", { className: "text-lg text-sec-600", children: message }),
3985
4082
  /* @__PURE__ */ jsxs20("div", { className: "mt-4 flex justify-center space-x-1", children: [
3986
- /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "0ms" } }),
3987
- /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "150ms" } }),
3988
- /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "300ms" } })
4083
+ /* @__PURE__ */ jsx25("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "0ms" } }),
4084
+ /* @__PURE__ */ jsx25("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "150ms" } }),
4085
+ /* @__PURE__ */ jsx25("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "300ms" } })
3989
4086
  ] })
3990
4087
  ] }) });
3991
4088
  }
@@ -3993,7 +4090,7 @@ function PublicLoadingSkeleton({
3993
4090
  lines = 3,
3994
4091
  className = ""
3995
4092
  }) {
3996
- return /* @__PURE__ */ jsx24("div", { className: cn("animate-pulse", className), children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx24(
4093
+ return /* @__PURE__ */ jsx25("div", { className: cn("animate-pulse", className), children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx25(
3997
4094
  "div",
3998
4095
  {
3999
4096
  className: cn(
@@ -4006,7 +4103,7 @@ function PublicLoadingSkeleton({
4006
4103
  }
4007
4104
 
4008
4105
  // src/components/PublicLayout/PublicPageLayout.tsx
4009
- import { Fragment as Fragment9, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
4106
+ import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
4010
4107
  function PublicPageLayout({
4011
4108
  eventCode,
4012
4109
  children,
@@ -4028,7 +4125,7 @@ function PublicPageLayout({
4028
4125
  });
4029
4126
  if (isLoading) {
4030
4127
  if (LoadingFallback === PublicLoadingSpinner) {
4031
- return /* @__PURE__ */ jsx25(
4128
+ return /* @__PURE__ */ jsx26(
4032
4129
  PublicLoadingSpinner,
4033
4130
  {
4034
4131
  className: "items-center justify-center",
@@ -4036,39 +4133,39 @@ function PublicPageLayout({
4036
4133
  }
4037
4134
  );
4038
4135
  }
4039
- return /* @__PURE__ */ jsx25(LoadingFallback, {});
4136
+ return /* @__PURE__ */ jsx26(LoadingFallback, {});
4040
4137
  }
4041
4138
  if (error && showValidationErrors) {
4042
4139
  if (ErrorFallback) {
4043
- return /* @__PURE__ */ jsx25(ErrorFallback, { error, retry: handleRefetch });
4140
+ return /* @__PURE__ */ jsx26(ErrorFallback, { error, retry: handleRefetch });
4044
4141
  }
4045
4142
  return /* @__PURE__ */ jsxs21("main", { className: "flex flex-col items-center justify-center px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: [
4046
- /* @__PURE__ */ jsx25("h1", { children: "Event Not Found" }),
4143
+ /* @__PURE__ */ jsx26("h1", { children: "Event Not Found" }),
4047
4144
  /* @__PURE__ */ jsxs21("p", { children: [
4048
4145
  'The event code "',
4049
4146
  eventCode,
4050
4147
  '" is invalid or the event is not available for public viewing.'
4051
4148
  ] }),
4052
- /* @__PURE__ */ jsx25(Button, { onClick: handleRefetch, children: "Try Again" })
4149
+ /* @__PURE__ */ jsx26(Button, { onClick: handleRefetch, children: "Try Again" })
4053
4150
  ] });
4054
4151
  }
4055
4152
  if (!event && showValidationErrors) {
4056
4153
  return /* @__PURE__ */ jsxs21("main", { className: "flex flex-col items-center justify-center px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: [
4057
- /* @__PURE__ */ jsx25("h1", { children: "Event Not Available" }),
4058
- /* @__PURE__ */ jsx25("p", { children: "This event is not available for public viewing." }),
4059
- handleRefetch && /* @__PURE__ */ jsx25(Button, { onClick: handleRefetch, children: "Try Again" })
4154
+ /* @__PURE__ */ jsx26("h1", { children: "Event Not Available" }),
4155
+ /* @__PURE__ */ jsx26("p", { children: "This event is not available for public viewing." }),
4156
+ handleRefetch && /* @__PURE__ */ jsx26(Button, { onClick: handleRefetch, children: "Try Again" })
4060
4157
  ] });
4061
4158
  }
4062
- return /* @__PURE__ */ jsx25(PublicErrorBoundary, { children: /* @__PURE__ */ jsxs21(Fragment9, { children: [
4063
- customHeader || /* @__PURE__ */ jsx25(
4159
+ return /* @__PURE__ */ jsx26(PublicErrorBoundary, { children: /* @__PURE__ */ jsxs21(Fragment9, { children: [
4160
+ customHeader || /* @__PURE__ */ jsx26(
4064
4161
  PublicPageHeader,
4065
4162
  {
4066
4163
  event: event || void 0,
4067
4164
  eventCode
4068
4165
  }
4069
4166
  ),
4070
- /* @__PURE__ */ jsx25("main", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children }),
4071
- showFooter && event && (customFooter || /* @__PURE__ */ jsx25(PublicPageFooter, { event }))
4167
+ /* @__PURE__ */ jsx26("main", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children }),
4168
+ showFooter && event && (customFooter || /* @__PURE__ */ jsx26(PublicPageFooter, { event }))
4072
4169
  ] }) });
4073
4170
  }
4074
4171
  function usePublicPageContext2() {
@@ -4087,7 +4184,7 @@ function usePublicPageContext2() {
4087
4184
  // src/components/PublicLayout/PublicPageContextChecker.tsx
4088
4185
  import { useEffect as useEffect9 } from "react";
4089
4186
  init_logger();
4090
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
4187
+ import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
4091
4188
  function PublicPageContextChecker({ enabled = true, label = "PublicPage" }) {
4092
4189
  const isDebugEnabled = import.meta.env.MODE === "development" && import.meta.env.VITE_ENABLE_DEBUG_LOGS === "true" || import.meta.env.MODE === "test" || import.meta.env.VITEST === true || typeof process !== "undefined" && false;
4093
4190
  if (!isDebugEnabled || !enabled) {
@@ -4155,15 +4252,15 @@ function PublicPageContextChecker({ enabled = true, label = "PublicPage" }) {
4155
4252
  borderRadius: "0 0 8px 0",
4156
4253
  border: "2px solid #dc2626"
4157
4254
  }, children: [
4158
- /* @__PURE__ */ jsx26("div", { style: { fontWeight: "bold", marginBottom: "8px" }, children: "\u{1F6A8} PUBLIC PAGE CONTEXT CHECK" }),
4159
- /* @__PURE__ */ jsx26("div", { children: "Check console for authentication context analysis" }),
4160
- /* @__PURE__ */ jsx26("div", { style: { marginTop: "8px", fontSize: "10px", opacity: 0.9 }, children: "If you see \u274C errors in console, your public page is inside auth context!" })
4255
+ /* @__PURE__ */ jsx27("div", { style: { fontWeight: "bold", marginBottom: "8px" }, children: "\u{1F6A8} PUBLIC PAGE CONTEXT CHECK" }),
4256
+ /* @__PURE__ */ jsx27("div", { children: "Check console for authentication context analysis" }),
4257
+ /* @__PURE__ */ jsx27("div", { style: { marginTop: "8px", fontSize: "10px", opacity: 0.9 }, children: "If you see \u274C errors in console, your public page is inside auth context!" })
4161
4258
  ] });
4162
4259
  }
4163
4260
 
4164
4261
  // src/components/PublicLayout/EventLogo.tsx
4165
- import React19 from "react";
4166
- import { jsx as jsx27 } from "react/jsx-runtime";
4262
+ import React20 from "react";
4263
+ import { jsx as jsx28 } from "react/jsx-runtime";
4167
4264
  function defaultGenerateFallbackText2(eventName) {
4168
4265
  if (!eventName) return "EV";
4169
4266
  return eventName.split(" ").map((word) => word.charAt(0).toUpperCase()).join("").substring(0, 3);
@@ -4181,20 +4278,20 @@ function EventLogo({
4181
4278
  loadingComponent: LoadingComponent,
4182
4279
  errorComponent: ErrorComponent
4183
4280
  }) {
4184
- const adaptedGenerateFallbackText = React19.useCallback(
4281
+ const adaptedGenerateFallbackText = React20.useCallback(
4185
4282
  (fileName) => {
4186
4283
  return generateFallbackText(eventName || fileName || "");
4187
4284
  },
4188
4285
  [eventName, generateFallbackText]
4189
4286
  );
4190
- const adaptedErrorComponent = ErrorComponent ? React19.useCallback(
4287
+ const adaptedErrorComponent = ErrorComponent ? React20.useCallback(
4191
4288
  ({ error }) => {
4192
4289
  const errorObj = error instanceof Error ? error : new Error(String(error || "Unknown error"));
4193
- return /* @__PURE__ */ jsx27(ErrorComponent, { error: errorObj });
4290
+ return /* @__PURE__ */ jsx28(ErrorComponent, { error: errorObj });
4194
4291
  },
4195
4292
  [ErrorComponent]
4196
4293
  ) : void 0;
4197
- return /* @__PURE__ */ jsx27(
4294
+ return /* @__PURE__ */ jsx28(
4198
4295
  FileDisplay,
4199
4296
  {
4200
4297
  table_name: "event",
@@ -4212,7 +4309,7 @@ function EventLogo({
4212
4309
  );
4213
4310
  }
4214
4311
  function EventLogoCompact(props) {
4215
- return /* @__PURE__ */ jsx27(
4312
+ return /* @__PURE__ */ jsx28(
4216
4313
  EventLogo,
4217
4314
  {
4218
4315
  ...props,
@@ -4222,7 +4319,7 @@ function EventLogoCompact(props) {
4222
4319
  );
4223
4320
  }
4224
4321
  function EventLogoLarge(props) {
4225
- return /* @__PURE__ */ jsx27(
4322
+ return /* @__PURE__ */ jsx28(
4226
4323
  EventLogo,
4227
4324
  {
4228
4325
  ...props,
@@ -4238,6 +4335,7 @@ export {
4238
4335
  Avatar,
4239
4336
  AvatarImage,
4240
4337
  AvatarFallback,
4338
+ Badge,
4241
4339
  Switch,
4242
4340
  ToastProvider,
4243
4341
  ToastViewport,
@@ -4287,4 +4385,4 @@ export {
4287
4385
  EventLogoCompact,
4288
4386
  EventLogoLarge
4289
4387
  };
4290
- //# sourceMappingURL=chunk-NOHEVYVX.js.map
4388
+ //# sourceMappingURL=chunk-5JMOHWDI.js.map