@cedros/login-react 0.0.45 → 0.0.47

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 (137) hide show
  1. package/README.md +32 -2
  2. package/dist/{AuthenticationSettings-bNQiNQ9g.cjs → AuthenticationSettings-BBOjHR6j.cjs} +1 -1
  3. package/dist/{AuthenticationSettings-bNQiNQ9g.cjs.map → AuthenticationSettings-BBOjHR6j.cjs.map} +1 -1
  4. package/dist/{AuthenticationSettings-BlYOmaEG.cjs → AuthenticationSettings-BXZRBZqc.cjs} +1 -1
  5. package/dist/{AuthenticationSettings-BlYOmaEG.cjs.map → AuthenticationSettings-BXZRBZqc.cjs.map} +1 -1
  6. package/dist/{AuthenticationSettings-BsuwWKbT.js → AuthenticationSettings-Bc_qT4nV.js} +1 -1
  7. package/dist/{AuthenticationSettings-BsuwWKbT.js.map → AuthenticationSettings-Bc_qT4nV.js.map} +1 -1
  8. package/dist/{AuthenticationSettings-DrHqtD7p.js → AuthenticationSettings-DXWCVZxS.js} +1 -1
  9. package/dist/{AuthenticationSettings-DrHqtD7p.js.map → AuthenticationSettings-DXWCVZxS.js.map} +1 -1
  10. package/dist/{AutosaveStatus-CZSwtgrL.cjs → AutosaveStatus-DfMPudTQ.cjs} +1 -1
  11. package/dist/AutosaveStatus-DfMPudTQ.cjs.map +1 -0
  12. package/dist/{AutosaveStatus-D-roPsRx.js → AutosaveStatus-DhGM3UUx.js} +103 -36
  13. package/dist/AutosaveStatus-DhGM3UUx.js.map +1 -0
  14. package/dist/{CreditSystemSettings-BTqZFn4K.js → CreditSystemSettings-B59-gOQT.js} +1 -1
  15. package/dist/{CreditSystemSettings-BTqZFn4K.js.map → CreditSystemSettings-B59-gOQT.js.map} +1 -1
  16. package/dist/{CreditSystemSettings-3R6crxvW.cjs → CreditSystemSettings-Badz4iAc.cjs} +1 -1
  17. package/dist/{CreditSystemSettings-3R6crxvW.cjs.map → CreditSystemSettings-Badz4iAc.cjs.map} +1 -1
  18. package/dist/{CreditSystemSettings-BskW_NKx.cjs → CreditSystemSettings-BxSoDwEi.cjs} +1 -1
  19. package/dist/{CreditSystemSettings-BskW_NKx.cjs.map → CreditSystemSettings-BxSoDwEi.cjs.map} +1 -1
  20. package/dist/{CreditSystemSettings-SL45GRH3.js → CreditSystemSettings-DxFpOeBW.js} +1 -1
  21. package/dist/{CreditSystemSettings-SL45GRH3.js.map → CreditSystemSettings-DxFpOeBW.js.map} +1 -1
  22. package/dist/EmailRegisterForm-ByYQ43yL.cjs +1 -0
  23. package/dist/EmailRegisterForm-ByYQ43yL.cjs.map +1 -0
  24. package/dist/EmailRegisterForm-DMUcNQT-.js +781 -0
  25. package/dist/EmailRegisterForm-DMUcNQT-.js.map +1 -0
  26. package/dist/{EmailSettings-XETM8FdS.js → EmailSettings-0y8D1QzF.js} +1 -1
  27. package/dist/{EmailSettings-XETM8FdS.js.map → EmailSettings-0y8D1QzF.js.map} +1 -1
  28. package/dist/{EmailSettings-BUAQji4I.js → EmailSettings-BA722mhf.js} +1 -1
  29. package/dist/{EmailSettings-BUAQji4I.js.map → EmailSettings-BA722mhf.js.map} +1 -1
  30. package/dist/{EmailSettings-CihElRkc.cjs → EmailSettings-BwZvdOYB.cjs} +1 -1
  31. package/dist/{EmailSettings-CihElRkc.cjs.map → EmailSettings-BwZvdOYB.cjs.map} +1 -1
  32. package/dist/{EmailSettings-CEC1rhrm.cjs → EmailSettings-DIjo3aJo.cjs} +1 -1
  33. package/dist/{EmailSettings-CEC1rhrm.cjs.map → EmailSettings-DIjo3aJo.cjs.map} +1 -1
  34. package/dist/{EmbeddedWalletSettings-CCT9DwmL.js → EmbeddedWalletSettings-BDbPpqWD.js} +1 -1
  35. package/dist/{EmbeddedWalletSettings-CCT9DwmL.js.map → EmbeddedWalletSettings-BDbPpqWD.js.map} +1 -1
  36. package/dist/{EmbeddedWalletSettings-MtwR81WH.cjs → EmbeddedWalletSettings-Db9a0D5l.cjs} +1 -1
  37. package/dist/{EmbeddedWalletSettings-MtwR81WH.cjs.map → EmbeddedWalletSettings-Db9a0D5l.cjs.map} +1 -1
  38. package/dist/{EmbeddedWalletSettings-B-083zu6.js → EmbeddedWalletSettings-MH4A6e6S.js} +1 -1
  39. package/dist/{EmbeddedWalletSettings-B-083zu6.js.map → EmbeddedWalletSettings-MH4A6e6S.js.map} +1 -1
  40. package/dist/{EmbeddedWalletSettings-DXIjansC.cjs → EmbeddedWalletSettings-T7LwbGok.cjs} +1 -1
  41. package/dist/{EmbeddedWalletSettings-DXIjansC.cjs.map → EmbeddedWalletSettings-T7LwbGok.cjs.map} +1 -1
  42. package/dist/GoogleLoginButton-DEwtBp56.cjs +1 -0
  43. package/dist/GoogleLoginButton-DEwtBp56.cjs.map +1 -0
  44. package/dist/{GoogleLoginButton-C1WNu7W3.js → GoogleLoginButton-DwyxvhnL.js} +82 -80
  45. package/dist/GoogleLoginButton-DwyxvhnL.js.map +1 -0
  46. package/dist/{PermissionsSection-mm9hfp-u.js → PermissionsSection-0oNHPZzL.js} +383 -415
  47. package/dist/PermissionsSection-0oNHPZzL.js.map +1 -0
  48. package/dist/PermissionsSection-CZsJuxo4.cjs +1 -0
  49. package/dist/PermissionsSection-CZsJuxo4.cjs.map +1 -0
  50. package/dist/{ServerSettings-DBpbRihl.js → ServerSettings-CwCkkU50.js} +1 -1
  51. package/dist/{ServerSettings-DBpbRihl.js.map → ServerSettings-CwCkkU50.js.map} +1 -1
  52. package/dist/{ServerSettings-24DA_BOI.js → ServerSettings-DKzWaqjC.js} +1 -1
  53. package/dist/{ServerSettings-24DA_BOI.js.map → ServerSettings-DKzWaqjC.js.map} +1 -1
  54. package/dist/{ServerSettings-BTEuzdrf.cjs → ServerSettings-DptlzQAu.cjs} +1 -1
  55. package/dist/{ServerSettings-BTEuzdrf.cjs.map → ServerSettings-DptlzQAu.cjs.map} +1 -1
  56. package/dist/{ServerSettings-BNc4LEs4.cjs → ServerSettings-j5Lu5D-R.cjs} +1 -1
  57. package/dist/{ServerSettings-BNc4LEs4.cjs.map → ServerSettings-j5Lu5D-R.cjs.map} +1 -1
  58. package/dist/SolanaLoginButton-2504p6cr.cjs +1 -0
  59. package/dist/SolanaLoginButton-2504p6cr.cjs.map +1 -0
  60. package/dist/SolanaLoginButton-C7Kc_m6n.js +234 -0
  61. package/dist/SolanaLoginButton-C7Kc_m6n.js.map +1 -0
  62. package/dist/{TeamSection-Km7EwLWD.cjs → TeamSection-DN8PEHH3.cjs} +1 -1
  63. package/dist/{TeamSection-Km7EwLWD.cjs.map → TeamSection-DN8PEHH3.cjs.map} +1 -1
  64. package/dist/{TeamSection-C_eODdLU.js → TeamSection-gUyP4YDM.js} +1 -1
  65. package/dist/{TeamSection-C_eODdLU.js.map → TeamSection-gUyP4YDM.js.map} +1 -1
  66. package/dist/{UsersSection-C1Tt0ePx.cjs → UsersSection-8wLuD0fr.cjs} +1 -1
  67. package/dist/{UsersSection-C1Tt0ePx.cjs.map → UsersSection-8wLuD0fr.cjs.map} +1 -1
  68. package/dist/{UsersSection-Ct_E-MBF.js → UsersSection-CnsFrG-6.js} +1 -1
  69. package/dist/{UsersSection-Ct_E-MBF.js.map → UsersSection-CnsFrG-6.js.map} +1 -1
  70. package/dist/{WebhookSettings-D9IsXZJN.js → WebhookSettings-2hlLLyGd.js} +1 -1
  71. package/dist/{WebhookSettings-D9IsXZJN.js.map → WebhookSettings-2hlLLyGd.js.map} +1 -1
  72. package/dist/{WebhookSettings-C6X_JJcD.cjs → WebhookSettings-CoEoVRRO.cjs} +1 -1
  73. package/dist/{WebhookSettings-C6X_JJcD.cjs.map → WebhookSettings-CoEoVRRO.cjs.map} +1 -1
  74. package/dist/{WebhookSettings-H1x6IKOj.cjs → WebhookSettings-DOaydSWQ.cjs} +1 -1
  75. package/dist/{WebhookSettings-H1x6IKOj.cjs.map → WebhookSettings-DOaydSWQ.cjs.map} +1 -1
  76. package/dist/{WebhookSettings-BhIwucKb.js → WebhookSettings-LS_wUimF.js} +1 -1
  77. package/dist/{WebhookSettings-BhIwucKb.js.map → WebhookSettings-LS_wUimF.js.map} +1 -1
  78. package/dist/admin-only.cjs +1 -1
  79. package/dist/admin-only.js +1 -1
  80. package/dist/email-only.cjs +1 -1
  81. package/dist/email-only.d.ts +10 -2
  82. package/dist/email-only.js +2 -2
  83. package/dist/google-only.cjs +1 -1
  84. package/dist/google-only.d.ts +7 -2
  85. package/dist/google-only.js +2 -2
  86. package/dist/index.cjs +12 -12
  87. package/dist/index.cjs.map +1 -1
  88. package/dist/index.d.ts +182 -11
  89. package/dist/index.js +5221 -4657
  90. package/dist/index.js.map +1 -1
  91. package/dist/login-react.css +1 -1
  92. package/dist/{plugin-BwwJh2cY.cjs → plugin-DNFjEfYp.cjs} +1 -1
  93. package/dist/{plugin-BwwJh2cY.cjs.map → plugin-DNFjEfYp.cjs.map} +1 -1
  94. package/dist/{plugin-CetHtdLq.js → plugin-WYMrRNbz.js} +1 -1
  95. package/dist/{plugin-CetHtdLq.js.map → plugin-WYMrRNbz.js.map} +1 -1
  96. package/dist/solana-only.cjs +1 -1
  97. package/dist/solana-only.d.ts +6 -1
  98. package/dist/solana-only.js +2 -2
  99. package/dist/useAuth-2vgrAH-M.cjs +1 -0
  100. package/dist/useAuth-2vgrAH-M.cjs.map +1 -0
  101. package/dist/{useAuth-l-itM5am.js → useAuth-CNflw856.js} +465 -469
  102. package/dist/useAuth-CNflw856.js.map +1 -0
  103. package/dist/useServerFeatures-9_aNPaa6.cjs +1 -0
  104. package/dist/useServerFeatures-9_aNPaa6.cjs.map +1 -0
  105. package/dist/useServerFeatures-DSkYdan-.js +82 -0
  106. package/dist/useServerFeatures-DSkYdan-.js.map +1 -0
  107. package/dist/{useUsersStatsSummary-BGeh3RnI.js → useUsersStatsSummary-B4_RBEYy.js} +504 -442
  108. package/dist/useUsersStatsSummary-B4_RBEYy.js.map +1 -0
  109. package/dist/useUsersStatsSummary-CHRMrlk4.cjs +1 -0
  110. package/dist/useUsersStatsSummary-CHRMrlk4.cjs.map +1 -0
  111. package/package.json +1 -1
  112. package/dist/AutosaveStatus-CZSwtgrL.cjs.map +0 -1
  113. package/dist/AutosaveStatus-D-roPsRx.js.map +0 -1
  114. package/dist/EmailRegisterForm-p2X5QP58.js +0 -750
  115. package/dist/EmailRegisterForm-p2X5QP58.js.map +0 -1
  116. package/dist/EmailRegisterForm-xFb6MaVA.cjs +0 -1
  117. package/dist/EmailRegisterForm-xFb6MaVA.cjs.map +0 -1
  118. package/dist/GoogleLoginButton-2zNTIKMm.cjs +0 -1
  119. package/dist/GoogleLoginButton-2zNTIKMm.cjs.map +0 -1
  120. package/dist/GoogleLoginButton-C1WNu7W3.js.map +0 -1
  121. package/dist/PermissionsSection-4zcE9Zs9.cjs +0 -1
  122. package/dist/PermissionsSection-4zcE9Zs9.cjs.map +0 -1
  123. package/dist/PermissionsSection-mm9hfp-u.js.map +0 -1
  124. package/dist/SolanaLoginButton-CqdzSSeJ.cjs +0 -1
  125. package/dist/SolanaLoginButton-CqdzSSeJ.cjs.map +0 -1
  126. package/dist/SolanaLoginButton-CyeX35eU.js +0 -232
  127. package/dist/SolanaLoginButton-CyeX35eU.js.map +0 -1
  128. package/dist/sanitization-Bo_tn-L2.cjs +0 -1
  129. package/dist/sanitization-Bo_tn-L2.cjs.map +0 -1
  130. package/dist/sanitization-CQ-H1MSg.js +0 -39
  131. package/dist/sanitization-CQ-H1MSg.js.map +0 -1
  132. package/dist/useAuth-B1yS_YiD.cjs +0 -1
  133. package/dist/useAuth-B1yS_YiD.cjs.map +0 -1
  134. package/dist/useAuth-l-itM5am.js.map +0 -1
  135. package/dist/useUsersStatsSummary-BGeh3RnI.js.map +0 -1
  136. package/dist/useUsersStatsSummary-DnsYtFGX.cjs +0 -1
  137. package/dist/useUsersStatsSummary-DnsYtFGX.cjs.map +0 -1
@@ -1,168 +1,167 @@
1
- import { jsxs as h, jsx as s, Fragment as j } from "react/jsx-runtime";
2
- import { useState as v, useMemo as M, useCallback as S, useRef as C, useEffect as I } from "react";
1
+ import { jsxs as m, jsx as s, Fragment as z } from "react/jsx-runtime";
2
+ import { useState as b, useMemo as _, useCallback as S, useRef as T, useEffect as L } from "react";
3
3
  import { L as O } from "./LoadingSpinner-6vml-zwr.js";
4
4
  import { E as P } from "./ErrorMessage-CcEK0pYO.js";
5
- import { a as B } from "./sanitization-CQ-H1MSg.js";
6
- import { b as W } from "./validation-B8kMV3BL.js";
7
- import { A as F, h as _, u as U } from "./useCedrosLogin-CFfID-0i.js";
5
+ import { a as B, u as W } from "./useServerFeatures-DSkYdan-.js";
6
+ import { b as G } from "./validation-B8kMV3BL.js";
7
+ import { A as U, h as R, u as F } from "./useCedrosLogin-CFfID-0i.js";
8
8
  import { u as H } from "./useOrgs-C90KT9KP.js";
9
- import { u as V } from "./useSystemSettings-rgskaDqP.js";
10
- const G = ["owner", "admin", "member"];
11
- function ye({
9
+ const K = ["owner", "admin", "member"];
10
+ function fe({
12
11
  members: e,
13
- currentUserId: r,
14
- isLoading: n = !1,
15
- error: a,
16
- canManage: t = !1,
12
+ currentUserId: t,
13
+ isLoading: r = !1,
14
+ error: i,
15
+ canManage: n = !1,
17
16
  canChangeRoles: c = !1,
18
17
  onUpdateRole: f,
19
- onRemove: u,
20
- className: m = ""
18
+ onRemove: g,
19
+ className: u = ""
21
20
  }) {
22
- const [o, E] = v("name"), [l, y] = v("asc"), p = (d) => {
23
- o === d ? y(l === "asc" ? "desc" : "asc") : (E(d), y("asc"));
24
- }, i = M(() => {
25
- const d = { owner: 0, admin: 1, member: 2 };
26
- return [...e].sort((g, w) => {
27
- let $, b;
21
+ const [o, E] = b("name"), [d, y] = b("asc"), h = (l) => {
22
+ o === l ? y(d === "asc" ? "desc" : "asc") : (E(l), y("asc"));
23
+ }, a = _(() => {
24
+ const l = { owner: 0, admin: 1, member: 2 };
25
+ return [...e].sort((p, w) => {
26
+ let C, v;
28
27
  switch (o) {
29
28
  case "name":
30
- $ = (g.user.name || g.user.email || "").toLowerCase(), b = (w.user.name || w.user.email || "").toLowerCase();
29
+ C = (p.user.name || p.user.email || "").toLowerCase(), v = (w.user.name || w.user.email || "").toLowerCase();
31
30
  break;
32
31
  case "role":
33
- $ = d[g.role] ?? 99, b = d[w.role] ?? 99;
32
+ C = l[p.role] ?? 99, v = l[w.role] ?? 99;
34
33
  break;
35
34
  case "joinedAt":
36
- $ = new Date(g.joinedAt).getTime(), b = new Date(w.joinedAt).getTime();
35
+ C = new Date(p.joinedAt).getTime(), v = new Date(w.joinedAt).getTime();
37
36
  break;
38
37
  default:
39
38
  return 0;
40
39
  }
41
- return $ < b ? l === "asc" ? -1 : 1 : $ > b ? l === "asc" ? 1 : -1 : 0;
40
+ return C < v ? d === "asc" ? -1 : 1 : C > v ? d === "asc" ? 1 : -1 : 0;
42
41
  });
43
- }, [e, o, l]);
44
- return n && e.length === 0 ? /* @__PURE__ */ h("div", { className: `cedros-member-list cedros-member-list-loading ${m}`, children: [
42
+ }, [e, o, d]);
43
+ return r && e.length === 0 ? /* @__PURE__ */ m("div", { className: `cedros-member-list cedros-member-list-loading ${u}`, children: [
45
44
  /* @__PURE__ */ s(O, {}),
46
45
  /* @__PURE__ */ s("span", { children: "Loading members..." })
47
- ] }) : a ? /* @__PURE__ */ s("div", { className: `cedros-member-list ${m}`, children: /* @__PURE__ */ s(P, { error: a }) }) : e.length === 0 ? /* @__PURE__ */ s("div", { className: `cedros-member-list cedros-member-list-empty ${m}`, children: /* @__PURE__ */ s("p", { children: "No members found." }) }) : /* @__PURE__ */ s("div", { className: `cedros-member-list ${m}`, children: /* @__PURE__ */ h("table", { className: "cedros-member-table", children: [
48
- /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ h("tr", { children: [
49
- /* @__PURE__ */ s("th", { children: /* @__PURE__ */ h(
46
+ ] }) : i ? /* @__PURE__ */ s("div", { className: `cedros-member-list ${u}`, children: /* @__PURE__ */ s(P, { error: i }) }) : e.length === 0 ? /* @__PURE__ */ s("div", { className: `cedros-member-list cedros-member-list-empty ${u}`, children: /* @__PURE__ */ s("p", { children: "No members found." }) }) : /* @__PURE__ */ s("div", { className: `cedros-member-list ${u}`, children: /* @__PURE__ */ m("table", { className: "cedros-member-table", children: [
47
+ /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ m("tr", { children: [
48
+ /* @__PURE__ */ s("th", { children: /* @__PURE__ */ m(
50
49
  "button",
51
50
  {
52
51
  type: "button",
53
52
  className: `cedros-admin-sort-button ${o === "name" ? "cedros-admin-sort-active" : ""}`,
54
- onClick: () => p("name"),
53
+ onClick: () => h("name"),
55
54
  children: [
56
55
  "Member",
57
56
  " ",
58
- /* @__PURE__ */ s("span", { className: "cedros-admin-sort-icon", children: o === "name" ? l === "asc" ? "↑" : "↓" : "↕" })
57
+ /* @__PURE__ */ s("span", { className: "cedros-admin-sort-icon", children: o === "name" ? d === "asc" ? "↑" : "↓" : "↕" })
59
58
  ]
60
59
  }
61
60
  ) }),
62
- /* @__PURE__ */ s("th", { children: /* @__PURE__ */ h(
61
+ /* @__PURE__ */ s("th", { children: /* @__PURE__ */ m(
63
62
  "button",
64
63
  {
65
64
  type: "button",
66
65
  className: `cedros-admin-sort-button ${o === "role" ? "cedros-admin-sort-active" : ""}`,
67
- onClick: () => p("role"),
66
+ onClick: () => h("role"),
68
67
  children: [
69
68
  "Role",
70
69
  " ",
71
- /* @__PURE__ */ s("span", { className: "cedros-admin-sort-icon", children: o === "role" ? l === "asc" ? "↑" : "↓" : "↕" })
70
+ /* @__PURE__ */ s("span", { className: "cedros-admin-sort-icon", children: o === "role" ? d === "asc" ? "↑" : "↓" : "↕" })
72
71
  ]
73
72
  }
74
73
  ) }),
75
- /* @__PURE__ */ s("th", { children: /* @__PURE__ */ h(
74
+ /* @__PURE__ */ s("th", { children: /* @__PURE__ */ m(
76
75
  "button",
77
76
  {
78
77
  type: "button",
79
78
  className: `cedros-admin-sort-button ${o === "joinedAt" ? "cedros-admin-sort-active" : ""}`,
80
- onClick: () => p("joinedAt"),
79
+ onClick: () => h("joinedAt"),
81
80
  children: [
82
81
  "Joined",
83
82
  " ",
84
- /* @__PURE__ */ s("span", { className: "cedros-admin-sort-icon", children: o === "joinedAt" ? l === "asc" ? "↑" : "↓" : "↕" })
83
+ /* @__PURE__ */ s("span", { className: "cedros-admin-sort-icon", children: o === "joinedAt" ? d === "asc" ? "↑" : "↓" : "↕" })
85
84
  ]
86
85
  }
87
86
  ) }),
88
- (t || c) && /* @__PURE__ */ s("th", { children: "Actions" })
87
+ (n || c) && /* @__PURE__ */ s("th", { children: "Actions" })
89
88
  ] }) }),
90
- /* @__PURE__ */ s("tbody", { children: i.map((d) => /* @__PURE__ */ s(
91
- K,
89
+ /* @__PURE__ */ s("tbody", { children: a.map((l) => /* @__PURE__ */ s(
90
+ V,
92
91
  {
93
- member: d,
94
- isCurrentUser: d.userId === r,
95
- canManage: t,
92
+ member: l,
93
+ isCurrentUser: l.userId === t,
94
+ canManage: n,
96
95
  canChangeRoles: c,
97
96
  onUpdateRole: f,
98
- onRemove: u
97
+ onRemove: g
99
98
  },
100
- d.id
99
+ l.id
101
100
  )) })
102
101
  ] }) });
103
102
  }
104
- function K({
103
+ function V({
105
104
  member: e,
106
- isCurrentUser: r,
107
- canManage: n,
108
- canChangeRoles: a,
109
- onUpdateRole: t,
105
+ isCurrentUser: t,
106
+ canManage: r,
107
+ canChangeRoles: i,
108
+ onUpdateRole: n,
110
109
  onRemove: c
111
110
  }) {
112
- const [f, u] = v(!1), [m, o] = v(e.role), E = S(
113
- async (i) => {
114
- if (!(!t || i === e.role)) {
115
- u(!0);
111
+ const [f, g] = b(!1), [u, o] = b(e.role), E = S(
112
+ async (a) => {
113
+ if (!(!n || a === e.role)) {
114
+ g(!0);
116
115
  try {
117
- await t(e.userId, i), o(i);
116
+ await n(e.userId, a), o(a);
118
117
  } catch {
119
118
  o(e.role);
120
119
  } finally {
121
- u(!1);
120
+ g(!1);
122
121
  }
123
122
  }
124
123
  },
125
- [e.userId, e.role, t]
126
- ), l = S(async () => {
124
+ [e.userId, e.role, n]
125
+ ), d = S(async () => {
127
126
  if (!(!c || !window.confirm(
128
127
  `Are you sure you want to remove ${e.user.name || e.user.email} from this organization?`
129
128
  ))) {
130
- u(!0);
129
+ g(!0);
131
130
  try {
132
131
  await c(e.userId);
133
132
  } finally {
134
- u(!1);
133
+ g(!1);
135
134
  }
136
135
  }
137
- }, [e.userId, e.user.name, e.user.email, c]), y = e.role === "owner", p = !r && !y;
138
- return /* @__PURE__ */ h("tr", { className: `cedros-member-row ${r ? "cedros-member-row-current" : ""}`, children: [
139
- /* @__PURE__ */ h("td", { className: "cedros-member-info", children: [
136
+ }, [e.userId, e.user.name, e.user.email, c]), y = e.role === "owner", h = !t && !y;
137
+ return /* @__PURE__ */ m("tr", { className: `cedros-member-row ${t ? "cedros-member-row-current" : ""}`, children: [
138
+ /* @__PURE__ */ m("td", { className: "cedros-member-info", children: [
140
139
  /* @__PURE__ */ s(J, { user: e.user }),
141
- /* @__PURE__ */ h("div", { className: "cedros-member-details", children: [
142
- /* @__PURE__ */ h("span", { className: "cedros-member-name", children: [
140
+ /* @__PURE__ */ m("div", { className: "cedros-member-details", children: [
141
+ /* @__PURE__ */ m("span", { className: "cedros-member-name", children: [
143
142
  e.user.name || "Unknown",
144
- r && /* @__PURE__ */ s("span", { className: "cedros-member-you", children: "(you)" })
143
+ t && /* @__PURE__ */ s("span", { className: "cedros-member-you", children: "(you)" })
145
144
  ] }),
146
145
  /* @__PURE__ */ s("span", { className: "cedros-member-email", children: e.user.email })
147
146
  ] })
148
147
  ] }),
149
- /* @__PURE__ */ s("td", { className: "cedros-member-role", children: a && p && t ? /* @__PURE__ */ s(
148
+ /* @__PURE__ */ s("td", { className: "cedros-member-role", children: i && h && n ? /* @__PURE__ */ s(
150
149
  "select",
151
150
  {
152
- value: m,
153
- onChange: (i) => E(i.target.value),
151
+ value: u,
152
+ onChange: (a) => E(a.target.value),
154
153
  disabled: f,
155
154
  className: "cedros-role-select",
156
- children: G.map((i) => /* @__PURE__ */ s("option", { value: i, children: i.charAt(0).toUpperCase() + i.slice(1) }, i))
155
+ children: K.map((a) => /* @__PURE__ */ s("option", { value: a, children: a.charAt(0).toUpperCase() + a.slice(1) }, a))
157
156
  }
158
157
  ) : /* @__PURE__ */ s("span", { className: `cedros-role-badge cedros-role-badge-${e.role}`, children: e.role.charAt(0).toUpperCase() + e.role.slice(1) }) }),
159
158
  /* @__PURE__ */ s("td", { className: "cedros-member-joined", children: Q(e.joinedAt) }),
160
- (n || a) && /* @__PURE__ */ s("td", { className: "cedros-member-actions", children: n && p && c && /* @__PURE__ */ s(
159
+ (r || i) && /* @__PURE__ */ s("td", { className: "cedros-member-actions", children: r && h && c && /* @__PURE__ */ s(
161
160
  "button",
162
161
  {
163
162
  type: "button",
164
163
  className: "cedros-button cedros-button-danger cedros-button-sm",
165
- onClick: l,
164
+ onClick: d,
166
165
  disabled: f,
167
166
  "aria-label": `Remove ${e.user.name || e.user.email}`,
168
167
  children: f ? /* @__PURE__ */ s(O, { size: "sm" }) : "Remove"
@@ -171,19 +170,19 @@ function K({
171
170
  ] });
172
171
  }
173
172
  function J({ user: e }) {
174
- const r = B(e.picture);
175
- if (r)
173
+ const t = B(e.picture);
174
+ if (t)
176
175
  return /* @__PURE__ */ s(
177
176
  "img",
178
177
  {
179
- src: r,
178
+ src: t,
180
179
  alt: e.name || e.email || "Member",
181
180
  className: "cedros-member-avatar",
182
181
  referrerPolicy: "no-referrer"
183
182
  }
184
183
  );
185
- const n = (e.name?.[0] || e.email?.[0] || "?").toUpperCase();
186
- return /* @__PURE__ */ s("div", { className: "cedros-member-avatar-placeholder", children: n });
184
+ const r = (e.name?.[0] || e.email?.[0] || "?").toUpperCase();
185
+ return /* @__PURE__ */ s("div", { className: "cedros-member-avatar-placeholder", children: r });
187
186
  }
188
187
  function Q(e) {
189
188
  return new Date(e).toLocaleDateString(void 0, {
@@ -193,47 +192,47 @@ function Q(e) {
193
192
  });
194
193
  }
195
194
  const Y = ["admin", "member"];
196
- function we({
195
+ function pe({
197
196
  onSubmit: e,
198
- isLoading: r = !1,
199
- error: n,
200
- availableRoles: a = Y,
201
- defaultRole: t = "member",
197
+ isLoading: t = !1,
198
+ error: r,
199
+ availableRoles: i = Y,
200
+ defaultRole: n = "member",
202
201
  className: c = ""
203
202
  }) {
204
- const [f, u] = v(""), [m, o] = v(t), [E, l] = v(null), [y, p] = v(!1), i = C(null), d = C(!0);
205
- I(() => (d.current = !0, () => {
206
- d.current = !1, i.current !== null && (window.clearTimeout(i.current), i.current = null);
203
+ const [f, g] = b(""), [u, o] = b(n), [E, d] = b(null), [y, h] = b(!1), a = T(null), l = T(!0);
204
+ L(() => (l.current = !0, () => {
205
+ l.current = !1, a.current !== null && (window.clearTimeout(a.current), a.current = null);
207
206
  }), []);
208
- const g = S(
207
+ const p = S(
209
208
  async (w) => {
210
- w.preventDefault(), l(null), p(!1);
211
- const $ = f.trim();
212
- if (!$) {
213
- l("Email is required");
209
+ w.preventDefault(), d(null), h(!1);
210
+ const C = f.trim();
211
+ if (!C) {
212
+ d("Email is required");
214
213
  return;
215
214
  }
216
- if (!W($)) {
217
- l("Please enter a valid email address");
215
+ if (!G(C)) {
216
+ d("Please enter a valid email address");
218
217
  return;
219
218
  }
220
219
  try {
221
- await e($, m), u(""), o(t), p(!0), i.current !== null && window.clearTimeout(i.current), i.current = window.setTimeout(() => {
222
- d.current && p(!1), i.current = null;
220
+ await e(C, u), g(""), o(n), h(!0), a.current !== null && window.clearTimeout(a.current), a.current = window.setTimeout(() => {
221
+ l.current && h(!1), a.current = null;
223
222
  }, 3e3);
224
223
  } catch {
225
224
  }
226
225
  },
227
- [f, m, t, e]
226
+ [f, u, n, e]
228
227
  );
229
- return /* @__PURE__ */ h("form", { className: `cedros-invite-form ${c}`, onSubmit: g, children: [
230
- (n || E) && /* @__PURE__ */ s(P, { error: E ?? n ?? null }),
231
- y && /* @__PURE__ */ h("div", { className: "cedros-invite-success", role: "status", children: [
228
+ return /* @__PURE__ */ m("form", { className: `cedros-invite-form ${c}`, onSubmit: p, children: [
229
+ (r || E) && /* @__PURE__ */ s(P, { error: E ?? r ?? null }),
230
+ y && /* @__PURE__ */ m("div", { className: "cedros-invite-success", role: "status", children: [
232
231
  /* @__PURE__ */ s(X, {}),
233
232
  /* @__PURE__ */ s("span", { children: "Invitation sent successfully!" })
234
233
  ] }),
235
- /* @__PURE__ */ h("div", { className: "cedros-invite-form-row", children: [
236
- /* @__PURE__ */ h("div", { className: "cedros-form-group cedros-invite-email-group", children: [
234
+ /* @__PURE__ */ m("div", { className: "cedros-invite-form-row", children: [
235
+ /* @__PURE__ */ m("div", { className: "cedros-form-group cedros-invite-email-group", children: [
237
236
  /* @__PURE__ */ s("label", { htmlFor: "invite-email", className: "cedros-form-label", children: "Email Address" }),
238
237
  /* @__PURE__ */ s(
239
238
  "input",
@@ -242,24 +241,24 @@ function we({
242
241
  type: "email",
243
242
  className: "cedros-form-input",
244
243
  value: f,
245
- onChange: (w) => u(w.target.value),
244
+ onChange: (w) => g(w.target.value),
246
245
  placeholder: "colleague@example.com",
247
- disabled: r,
246
+ disabled: t,
248
247
  autoComplete: "email"
249
248
  }
250
249
  )
251
250
  ] }),
252
- /* @__PURE__ */ h("div", { className: "cedros-form-group cedros-invite-role-group", children: [
251
+ /* @__PURE__ */ m("div", { className: "cedros-form-group cedros-invite-role-group", children: [
253
252
  /* @__PURE__ */ s("label", { htmlFor: "invite-role", className: "cedros-form-label", children: "Role" }),
254
253
  /* @__PURE__ */ s(
255
254
  "select",
256
255
  {
257
256
  id: "invite-role",
258
257
  className: "cedros-form-select",
259
- value: m,
258
+ value: u,
260
259
  onChange: (w) => o(w.target.value),
261
- disabled: r,
262
- children: a.map((w) => /* @__PURE__ */ s("option", { value: w, children: w.charAt(0).toUpperCase() + w.slice(1) }, w))
260
+ disabled: t,
261
+ children: i.map((w) => /* @__PURE__ */ s("option", { value: w, children: w.charAt(0).toUpperCase() + w.slice(1) }, w))
263
262
  }
264
263
  )
265
264
  ] }),
@@ -268,8 +267,8 @@ function we({
268
267
  {
269
268
  type: "submit",
270
269
  className: "cedros-button cedros-button-primary cedros-invite-submit",
271
- disabled: r || !f.trim(),
272
- children: r ? /* @__PURE__ */ s(O, { size: "sm" }) : "Send Invite"
270
+ disabled: t || !f.trim(),
271
+ children: t ? /* @__PURE__ */ s(O, { size: "sm" }) : "Send Invite"
273
272
  }
274
273
  )
275
274
  ] }),
@@ -299,93 +298,93 @@ function X() {
299
298
  }
300
299
  );
301
300
  }
302
- function ve({
301
+ function ge({
303
302
  invites: e,
304
- isLoading: r = !1,
305
- error: n,
306
- canManage: a = !1,
307
- onCancel: t,
303
+ isLoading: t = !1,
304
+ error: r,
305
+ canManage: i = !1,
306
+ onCancel: n,
308
307
  onResend: c,
309
308
  className: f = ""
310
309
  }) {
311
- return r && e.length === 0 ? /* @__PURE__ */ h("div", { className: `cedros-invite-list cedros-invite-list-loading ${f}`, children: [
310
+ return t && e.length === 0 ? /* @__PURE__ */ m("div", { className: `cedros-invite-list cedros-invite-list-loading ${f}`, children: [
312
311
  /* @__PURE__ */ s(O, {}),
313
312
  /* @__PURE__ */ s("span", { children: "Loading invites..." })
314
- ] }) : n ? /* @__PURE__ */ s("div", { className: `cedros-invite-list ${f}`, children: /* @__PURE__ */ s(P, { error: n }) }) : e.length === 0 ? /* @__PURE__ */ s("div", { className: `cedros-invite-list cedros-invite-list-empty ${f}`, children: /* @__PURE__ */ s("p", { children: "No pending invites." }) }) : /* @__PURE__ */ s("div", { className: `cedros-invite-list ${f}`, children: /* @__PURE__ */ s("ul", { className: "cedros-invite-items", children: e.map((u) => /* @__PURE__ */ s(
313
+ ] }) : r ? /* @__PURE__ */ s("div", { className: `cedros-invite-list ${f}`, children: /* @__PURE__ */ s(P, { error: r }) }) : e.length === 0 ? /* @__PURE__ */ s("div", { className: `cedros-invite-list cedros-invite-list-empty ${f}`, children: /* @__PURE__ */ s("p", { children: "No pending invites." }) }) : /* @__PURE__ */ s("div", { className: `cedros-invite-list ${f}`, children: /* @__PURE__ */ s("ul", { className: "cedros-invite-items", children: e.map((g) => /* @__PURE__ */ s(
315
314
  Z,
316
315
  {
317
- invite: u,
318
- canManage: a,
319
- onCancel: t,
316
+ invite: g,
317
+ canManage: i,
318
+ onCancel: n,
320
319
  onResend: c
321
320
  },
322
- u.id
321
+ g.id
323
322
  )) }) });
324
323
  }
325
- function Z({ invite: e, canManage: r, onCancel: n, onResend: a }) {
326
- const [t, c] = v(!1), [f, u] = v(!1), m = C(null), o = new Date(e.expiresAt) < /* @__PURE__ */ new Date(), E = S(async () => {
327
- if (!(!n || !window.confirm(
324
+ function Z({ invite: e, canManage: t, onCancel: r, onResend: i }) {
325
+ const [n, c] = b(!1), [f, g] = b(!1), u = T(null), o = new Date(e.expiresAt) < /* @__PURE__ */ new Date(), E = S(async () => {
326
+ if (!(!r || !window.confirm(
328
327
  `Are you sure you want to cancel the invite for ${e.email}?`
329
328
  ))) {
330
329
  c(!0);
331
330
  try {
332
- await n(e.id);
331
+ await r(e.id);
333
332
  } finally {
334
333
  c(!1);
335
334
  }
336
335
  }
337
- }, [e.id, e.email, n]), l = S(async () => {
338
- if (a) {
339
- c(!0), u(!1);
336
+ }, [e.id, e.email, r]), d = S(async () => {
337
+ if (i) {
338
+ c(!0), g(!1);
340
339
  try {
341
- await a(e.id), u(!0), m.current !== null && window.clearTimeout(m.current), m.current = window.setTimeout(() => {
342
- u(!1), m.current = null;
340
+ await i(e.id), g(!0), u.current !== null && window.clearTimeout(u.current), u.current = window.setTimeout(() => {
341
+ g(!1), u.current = null;
343
342
  }, 3e3);
344
343
  } finally {
345
344
  c(!1);
346
345
  }
347
346
  }
348
- }, [e.id, a]);
349
- return I(() => () => {
350
- m.current !== null && (window.clearTimeout(m.current), m.current = null);
351
- }, []), /* @__PURE__ */ h("li", { className: `cedros-invite-item ${o ? "cedros-invite-item-expired" : ""}`, children: [
352
- /* @__PURE__ */ h("div", { className: "cedros-invite-item-info", children: [
353
- /* @__PURE__ */ h("div", { className: "cedros-invite-item-main", children: [
347
+ }, [e.id, i]);
348
+ return L(() => () => {
349
+ u.current !== null && (window.clearTimeout(u.current), u.current = null);
350
+ }, []), /* @__PURE__ */ m("li", { className: `cedros-invite-item ${o ? "cedros-invite-item-expired" : ""}`, children: [
351
+ /* @__PURE__ */ m("div", { className: "cedros-invite-item-info", children: [
352
+ /* @__PURE__ */ m("div", { className: "cedros-invite-item-main", children: [
354
353
  /* @__PURE__ */ s("span", { className: "cedros-invite-item-email", children: e.email }),
355
354
  /* @__PURE__ */ s("span", { className: `cedros-role-badge cedros-role-badge-${e.role}`, children: e.role.charAt(0).toUpperCase() + e.role.slice(1) }),
356
355
  o && /* @__PURE__ */ s("span", { className: "cedros-invite-expired-badge", children: "Expired" })
357
356
  ] }),
358
- /* @__PURE__ */ h("div", { className: "cedros-invite-item-meta", children: [
359
- /* @__PURE__ */ h("span", { className: "cedros-invite-item-date", children: [
357
+ /* @__PURE__ */ m("div", { className: "cedros-invite-item-meta", children: [
358
+ /* @__PURE__ */ m("span", { className: "cedros-invite-item-date", children: [
360
359
  "Invited ",
361
360
  x(e.createdAt)
362
361
  ] }),
363
- !o && /* @__PURE__ */ h("span", { className: "cedros-invite-item-expires", children: [
362
+ !o && /* @__PURE__ */ m("span", { className: "cedros-invite-item-expires", children: [
364
363
  "Expires ",
365
364
  ee(e.expiresAt)
366
365
  ] })
367
366
  ] })
368
367
  ] }),
369
- r && /* @__PURE__ */ h("div", { className: "cedros-invite-item-actions", children: [
368
+ t && /* @__PURE__ */ m("div", { className: "cedros-invite-item-actions", children: [
370
369
  f && /* @__PURE__ */ s("span", { className: "cedros-invite-resend-success", children: "Sent!" }),
371
- a && !o && /* @__PURE__ */ s(
370
+ i && !o && /* @__PURE__ */ s(
372
371
  "button",
373
372
  {
374
373
  type: "button",
375
374
  className: "cedros-button cedros-button-outline cedros-button-sm",
376
- onClick: l,
377
- disabled: t,
375
+ onClick: d,
376
+ disabled: n,
378
377
  "aria-label": `Resend invite to ${e.email}`,
379
- children: t ? /* @__PURE__ */ s(O, { size: "sm" }) : "Resend"
378
+ children: n ? /* @__PURE__ */ s(O, { size: "sm" }) : "Resend"
380
379
  }
381
380
  ),
382
- n && /* @__PURE__ */ s(
381
+ r && /* @__PURE__ */ s(
383
382
  "button",
384
383
  {
385
384
  type: "button",
386
385
  className: "cedros-button cedros-button-danger cedros-button-sm",
387
386
  onClick: E,
388
- disabled: t,
387
+ disabled: n,
389
388
  "aria-label": `Cancel invite for ${e.email}`,
390
389
  children: "Cancel"
391
390
  }
@@ -401,27 +400,27 @@ function x(e) {
401
400
  });
402
401
  }
403
402
  function ee(e) {
404
- const r = new Date(e), n = /* @__PURE__ */ new Date(), a = r.getTime() - n.getTime(), t = Math.ceil(a / (1e3 * 60 * 60 * 24));
405
- return t < 0 ? "expired" : t === 0 ? "today" : t === 1 ? "tomorrow" : t < 7 ? `in ${t} days` : x(e);
403
+ const t = new Date(e), r = /* @__PURE__ */ new Date(), i = t.getTime() - r.getTime(), n = Math.ceil(i / (1e3 * 60 * 60 * 24));
404
+ return n < 0 ? "expired" : n === 0 ? "today" : n === 1 ? "tomorrow" : n < 7 ? `in ${n} days` : x(e);
406
405
  }
407
406
  class se {
408
407
  client;
409
- constructor(r, n, a, t) {
410
- this.client = new F({ baseUrl: r, timeoutMs: n, retryAttempts: a, getAccessToken: t });
408
+ constructor(t, r, i, n) {
409
+ this.client = new U({ baseUrl: t, timeoutMs: r, retryAttempts: i, getAccessToken: n });
411
410
  }
412
411
  /**
413
412
  * List all members of an organization
414
413
  */
415
- async listMembers(r, n = 50, a = 0) {
414
+ async listMembers(t, r = 50, i = 0) {
416
415
  try {
417
- const t = await this.client.get(
418
- `/orgs/${r}/members?limit=${n}&offset=${a}`
416
+ const n = await this.client.get(
417
+ `/orgs/${t}/members?limit=${r}&offset=${i}`
419
418
  );
420
419
  return {
421
- members: t.members.map((c) => ({
420
+ members: n.members.map((c) => ({
422
421
  id: c.id,
423
422
  userId: c.userId,
424
- orgId: r,
423
+ orgId: t,
425
424
  role: c.role,
426
425
  joinedAt: c.joinedAt,
427
426
  user: {
@@ -430,126 +429,126 @@ class se {
430
429
  name: c.name
431
430
  }
432
431
  })),
433
- total: t.total
432
+ total: n.total
434
433
  };
435
- } catch (t) {
436
- throw _(t, "Failed to list members");
434
+ } catch (n) {
435
+ throw R(n, "Failed to list members");
437
436
  }
438
437
  }
439
438
  /**
440
439
  * Update a member's role
441
440
  */
442
- async updateMemberRole(r, n, a) {
441
+ async updateMemberRole(t, r, i) {
443
442
  try {
444
- return await this.client.patch(`/orgs/${r}/members/${n}`, a);
445
- } catch (t) {
446
- throw _(t, "Failed to update member role");
443
+ return await this.client.patch(`/orgs/${t}/members/${r}`, i);
444
+ } catch (n) {
445
+ throw R(n, "Failed to update member role");
447
446
  }
448
447
  }
449
448
  /**
450
449
  * Remove a member from the organization
451
450
  */
452
- async removeMember(r, n) {
451
+ async removeMember(t, r) {
453
452
  try {
454
- await this.client.delete(`/orgs/${r}/members/${n}`);
455
- } catch (a) {
456
- throw _(a, "Failed to remove member");
453
+ await this.client.delete(`/orgs/${t}/members/${r}`);
454
+ } catch (i) {
455
+ throw R(i, "Failed to remove member");
457
456
  }
458
457
  }
459
458
  }
460
- function be(e) {
461
- const { config: r, authState: n, _internal: a } = U(), [t, c] = v([]), [f, u] = v(0), [m, o] = v(!1), [E, l] = v(null), y = C(void 0), p = C(0), i = M(
459
+ function ye(e) {
460
+ const { config: t, authState: r, _internal: i } = F(), [n, c] = b([]), [f, g] = b(0), [u, o] = b(!1), [E, d] = b(null), y = T(void 0), h = T(0), a = _(
462
461
  () => new se(
463
- r.serverUrl,
464
- r.requestTimeout,
465
- r.retryAttempts,
466
- a?.getAccessToken
462
+ t.serverUrl,
463
+ t.requestTimeout,
464
+ t.retryAttempts,
465
+ i?.getAccessToken
467
466
  ),
468
- [r.serverUrl, r.requestTimeout, r.retryAttempts, a]
469
- ), d = C(i);
470
- d.current = i;
471
- const g = S(
472
- async (b) => {
473
- if (!e || n !== "authenticated") {
474
- c([]), u(0);
467
+ [t.serverUrl, t.requestTimeout, t.retryAttempts, i]
468
+ ), l = T(a);
469
+ l.current = a;
470
+ const p = S(
471
+ async (v) => {
472
+ if (!e || r !== "authenticated") {
473
+ c([]), g(0);
475
474
  return;
476
475
  }
477
- o(!0), l(null);
478
- const N = ++p.current;
476
+ o(!0), d(null);
477
+ const N = ++h.current;
479
478
  try {
480
- const { limit: A = 50, offset: T = 0 } = b ?? {}, R = await d.current.listMembers(e, A, T);
481
- if (N !== p.current) return;
482
- c(R.members), u(R.total);
479
+ const { limit: A = 50, offset: $ = 0 } = v ?? {}, I = await l.current.listMembers(e, A, $);
480
+ if (N !== h.current) return;
481
+ c(I.members), g(I.total);
483
482
  } catch (A) {
484
- if (N !== p.current) return;
485
- l(A);
483
+ if (N !== h.current) return;
484
+ d(A);
486
485
  } finally {
487
- N === p.current && o(!1);
486
+ N === h.current && o(!1);
488
487
  }
489
488
  },
490
- [e, n]
489
+ [e, r]
491
490
  );
492
- I(() => {
493
- if (n !== "authenticated") {
491
+ L(() => {
492
+ if (r !== "authenticated") {
494
493
  y.current = void 0;
495
494
  return;
496
495
  }
497
- e !== y.current && (y.current = e, g());
498
- }, [e, n, g]);
496
+ e !== y.current && (y.current = e, p());
497
+ }, [e, r, p]);
499
498
  const w = S(
500
- async (b, N) => {
499
+ async (v, N) => {
501
500
  if (!e)
502
501
  throw new Error("No organization selected");
503
- o(!0), l(null);
502
+ o(!0), d(null);
504
503
  try {
505
- await d.current.updateMemberRole(e, b, { role: N }), await g();
504
+ await l.current.updateMemberRole(e, v, { role: N }), await p();
506
505
  } catch (A) {
507
- throw l(A), A;
506
+ throw d(A), A;
508
507
  } finally {
509
508
  o(!1);
510
509
  }
511
510
  },
512
- [e, g]
513
- ), $ = S(
514
- async (b) => {
511
+ [e, p]
512
+ ), C = S(
513
+ async (v) => {
515
514
  if (!e)
516
515
  throw new Error("No organization selected");
517
- o(!0), l(null);
516
+ o(!0), d(null);
518
517
  try {
519
- await d.current.removeMember(e, b), await g();
518
+ await l.current.removeMember(e, v), await p();
520
519
  } catch (N) {
521
- throw l(N), N;
520
+ throw d(N), N;
522
521
  } finally {
523
522
  o(!1);
524
523
  }
525
524
  },
526
- [e, g]
525
+ [e, p]
527
526
  );
528
527
  return {
529
- members: t,
528
+ members: n,
530
529
  total: f,
531
- isLoading: m,
530
+ isLoading: u,
532
531
  error: E,
533
- fetchMembers: g,
532
+ fetchMembers: p,
534
533
  updateMemberRole: w,
535
- removeMember: $
534
+ removeMember: C
536
535
  };
537
536
  }
538
- class re {
537
+ class te {
539
538
  client;
540
- constructor(r, n, a, t) {
541
- this.client = new F({ baseUrl: r, timeoutMs: n, retryAttempts: a, getAccessToken: t });
539
+ constructor(t, r, i, n) {
540
+ this.client = new U({ baseUrl: t, timeoutMs: r, retryAttempts: i, getAccessToken: n });
542
541
  }
543
542
  /**
544
543
  * List all pending invites for an organization
545
544
  */
546
- async listInvites(r, n = 50, a = 0) {
545
+ async listInvites(t, r = 50, i = 0) {
547
546
  try {
548
- const t = await this.client.get(
549
- `/orgs/${r}/invites?limit=${n}&offset=${a}`
547
+ const n = await this.client.get(
548
+ `/orgs/${t}/invites?limit=${r}&offset=${i}`
550
549
  );
551
550
  return {
552
- invites: t.invites.map((c) => ({
551
+ invites: n.invites.map((c) => ({
553
552
  id: c.id,
554
553
  orgId: c.orgId,
555
554
  email: c.email,
@@ -558,157 +557,157 @@ class re {
558
557
  createdAt: c.createdAt,
559
558
  expiresAt: c.expiresAt
560
559
  })),
561
- total: t.total
560
+ total: n.total
562
561
  };
563
- } catch (t) {
564
- throw _(t, "Failed to list invites");
562
+ } catch (n) {
563
+ throw R(n, "Failed to list invites");
565
564
  }
566
565
  }
567
566
  /**
568
567
  * Create a new invite
569
568
  */
570
- async createInvite(r, n) {
569
+ async createInvite(t, r) {
571
570
  try {
572
- return await this.client.post(`/orgs/${r}/invites`, n);
573
- } catch (a) {
574
- throw _(a, "Failed to create invite");
571
+ return await this.client.post(`/orgs/${t}/invites`, r);
572
+ } catch (i) {
573
+ throw R(i, "Failed to create invite");
575
574
  }
576
575
  }
577
576
  /**
578
577
  * Cancel a pending invite
579
578
  */
580
- async cancelInvite(r, n) {
579
+ async cancelInvite(t, r) {
581
580
  try {
582
- await this.client.delete(`/orgs/${r}/invites/${n}`);
583
- } catch (a) {
584
- throw _(a, "Failed to cancel invite");
581
+ await this.client.delete(`/orgs/${t}/invites/${r}`);
582
+ } catch (i) {
583
+ throw R(i, "Failed to cancel invite");
585
584
  }
586
585
  }
587
586
  /**
588
587
  * Resend an invite email
589
588
  */
590
- async resendInvite(r, n) {
589
+ async resendInvite(t, r) {
591
590
  try {
592
- await this.client.post(`/orgs/${r}/invites/${n}/resend`, {});
593
- } catch (a) {
594
- throw _(a, "Failed to resend invite");
591
+ await this.client.post(`/orgs/${t}/invites/${r}/resend`, {});
592
+ } catch (i) {
593
+ throw R(i, "Failed to resend invite");
595
594
  }
596
595
  }
597
596
  /**
598
597
  * Accept an invite (public endpoint)
599
598
  */
600
- async acceptInvite(r) {
599
+ async acceptInvite(t) {
601
600
  try {
602
- return await this.client.post("/invites/accept", r);
603
- } catch (n) {
604
- throw _(n, "Failed to accept invite");
601
+ return await this.client.post("/invites/accept", t);
602
+ } catch (r) {
603
+ throw R(r, "Failed to accept invite");
605
604
  }
606
605
  }
607
606
  }
608
- function Ne(e) {
609
- const { config: r, authState: n, _internal: a } = U(), [t, c] = v([]), [f, u] = v(0), [m, o] = v(!1), [E, l] = v(null), y = C(void 0), p = C(0), i = M(
610
- () => new re(
611
- r.serverUrl,
612
- r.requestTimeout,
613
- r.retryAttempts,
614
- a?.getAccessToken
607
+ function we(e) {
608
+ const { config: t, authState: r, _internal: i } = F(), [n, c] = b([]), [f, g] = b(0), [u, o] = b(!1), [E, d] = b(null), y = T(void 0), h = T(0), a = _(
609
+ () => new te(
610
+ t.serverUrl,
611
+ t.requestTimeout,
612
+ t.retryAttempts,
613
+ i?.getAccessToken
615
614
  ),
616
- [r.serverUrl, r.requestTimeout, r.retryAttempts, a]
617
- ), d = C(i);
618
- d.current = i;
619
- const g = S(
615
+ [t.serverUrl, t.requestTimeout, t.retryAttempts, i]
616
+ ), l = T(a);
617
+ l.current = a;
618
+ const p = S(
620
619
  async (A) => {
621
- if (!e || n !== "authenticated") {
622
- c([]), u(0);
620
+ if (!e || r !== "authenticated") {
621
+ c([]), g(0);
623
622
  return;
624
623
  }
625
- o(!0), l(null);
626
- const T = ++p.current;
624
+ o(!0), d(null);
625
+ const $ = ++h.current;
627
626
  try {
628
- const { limit: R = 50, offset: z = 0 } = A ?? {}, q = await d.current.listInvites(e, R, z);
629
- if (T !== p.current) return;
630
- c(q.invites), u(q.total);
631
- } catch (R) {
632
- if (T !== p.current) return;
633
- l(R);
627
+ const { limit: I = 50, offset: j = 0 } = A ?? {}, q = await l.current.listInvites(e, I, j);
628
+ if ($ !== h.current) return;
629
+ c(q.invites), g(q.total);
630
+ } catch (I) {
631
+ if ($ !== h.current) return;
632
+ d(I);
634
633
  } finally {
635
- T === p.current && o(!1);
634
+ $ === h.current && o(!1);
636
635
  }
637
636
  },
638
- [e, n]
637
+ [e, r]
639
638
  );
640
- I(() => {
641
- if (n !== "authenticated") {
639
+ L(() => {
640
+ if (r !== "authenticated") {
642
641
  y.current = void 0;
643
642
  return;
644
643
  }
645
- e !== y.current && (y.current = e, g());
646
- }, [e, n, g]);
644
+ e !== y.current && (y.current = e, p());
645
+ }, [e, r, p]);
647
646
  const w = S(
648
- async (A, T = "member") => {
647
+ async (A, $ = "member") => {
649
648
  if (!e)
650
649
  throw new Error("No organization selected");
651
- o(!0), l(null);
650
+ o(!0), d(null);
652
651
  try {
653
- await d.current.createInvite(e, { email: A, role: T }), await g();
654
- } catch (R) {
655
- throw l(R), R;
652
+ await l.current.createInvite(e, { email: A, role: $ }), await p();
653
+ } catch (I) {
654
+ throw d(I), I;
656
655
  } finally {
657
656
  o(!1);
658
657
  }
659
658
  },
660
- [e, g]
661
- ), $ = S(
659
+ [e, p]
660
+ ), C = S(
662
661
  async (A) => {
663
662
  if (!e)
664
663
  throw new Error("No organization selected");
665
- o(!0), l(null);
664
+ o(!0), d(null);
666
665
  try {
667
- await d.current.cancelInvite(e, A), await g();
668
- } catch (T) {
669
- throw l(T), T;
666
+ await l.current.cancelInvite(e, A), await p();
667
+ } catch ($) {
668
+ throw d($), $;
670
669
  } finally {
671
670
  o(!1);
672
671
  }
673
672
  },
674
- [e, g]
675
- ), b = S(
673
+ [e, p]
674
+ ), v = S(
676
675
  async (A) => {
677
676
  if (!e)
678
677
  throw new Error("No organization selected");
679
- o(!0), l(null);
678
+ o(!0), d(null);
680
679
  try {
681
- await d.current.resendInvite(e, A);
682
- } catch (T) {
683
- throw l(T), T;
680
+ await l.current.resendInvite(e, A);
681
+ } catch ($) {
682
+ throw d($), $;
684
683
  } finally {
685
684
  o(!1);
686
685
  }
687
686
  },
688
687
  [e]
689
688
  ), N = S(async (A) => {
690
- o(!0), l(null);
689
+ o(!0), d(null);
691
690
  try {
692
- return await d.current.acceptInvite({ token: A });
693
- } catch (T) {
694
- throw l(T), T;
691
+ return await l.current.acceptInvite({ token: A });
692
+ } catch ($) {
693
+ throw d($), $;
695
694
  } finally {
696
695
  o(!1);
697
696
  }
698
697
  }, []);
699
698
  return {
700
- invites: t,
699
+ invites: n,
701
700
  total: f,
702
- isLoading: m,
701
+ isLoading: u,
703
702
  error: E,
704
- fetchInvites: g,
703
+ fetchInvites: p,
705
704
  createInvite: w,
706
- cancelInvite: $,
707
- resendInvite: b,
705
+ cancelInvite: C,
706
+ resendInvite: v,
708
707
  acceptInvite: N
709
708
  };
710
709
  }
711
- const te = [
710
+ const re = [
712
711
  "users",
713
712
  "team",
714
713
  "referrals",
@@ -717,12 +716,14 @@ const te = [
717
716
  "compliance",
718
717
  "accreditation-queue",
719
718
  "sanctions",
719
+ "signup-gating",
720
720
  "settings-wallet",
721
721
  "settings-auth",
722
722
  "settings-messaging",
723
723
  "settings-credits",
724
724
  "settings-compliance",
725
725
  "settings-referrals",
726
+ "settings-signup",
726
727
  "settings-server",
727
728
  "settings-images"
728
729
  ], ne = [
@@ -736,7 +737,7 @@ const te = [
736
737
  "pay-payment",
737
738
  "pay-messaging",
738
739
  "pay-settings"
739
- ], L = {
740
+ ], M = {
740
741
  // Cedros Login
741
742
  users: "Users",
742
743
  team: "Team",
@@ -746,12 +747,14 @@ const te = [
746
747
  compliance: "Compliance",
747
748
  "accreditation-queue": "Accreditation Queue",
748
749
  sanctions: "Sanctions",
750
+ "signup-gating": "Signup Gating",
749
751
  "settings-wallet": "Wallet Settings",
750
752
  "settings-auth": "Auth Settings",
751
753
  "settings-messaging": "Messages Settings",
752
754
  "settings-credits": "Credits Settings",
753
755
  "settings-compliance": "Compliance & Gating",
754
756
  "settings-referrals": "Referrals & Rewards",
757
+ "settings-signup": "Signup Gating",
755
758
  "settings-server": "Server Settings",
756
759
  "settings-images": "Image Storage",
757
760
  // Cedros Pay
@@ -776,12 +779,14 @@ const te = [
776
779
  compliance: !0,
777
780
  "accreditation-queue": !0,
778
781
  sanctions: !0,
782
+ "signup-gating": !0,
779
783
  "settings-wallet": !0,
780
784
  "settings-auth": !0,
781
785
  "settings-messaging": !0,
782
786
  "settings-credits": !0,
783
787
  "settings-compliance": !0,
784
788
  "settings-referrals": !0,
789
+ "settings-signup": !0,
785
790
  "settings-server": !0,
786
791
  "settings-images": !0,
787
792
  // Cedros Pay
@@ -806,12 +811,14 @@ const te = [
806
811
  compliance: !1,
807
812
  "accreditation-queue": !1,
808
813
  sanctions: !1,
814
+ "signup-gating": !1,
809
815
  "settings-wallet": !1,
810
816
  "settings-auth": !1,
811
817
  "settings-messaging": !1,
812
818
  "settings-credits": !1,
813
819
  "settings-compliance": !1,
814
820
  "settings-referrals": !1,
821
+ "settings-signup": !1,
815
822
  "settings-server": !1,
816
823
  "settings-images": !1,
817
824
  // Cedros Pay
@@ -827,34 +834,34 @@ const te = [
827
834
  "pay-settings": !1
828
835
  }
829
836
  };
830
- function ae() {
831
- const { config: e, authState: r, _internal: n } = U(), { activeOrg: a, role: t } = H(), [c, f] = v(
837
+ function ie() {
838
+ const { config: e, authState: t, _internal: r } = F(), { activeOrg: i, role: n } = H(), [c, f] = b(
832
839
  k
833
- ), [u, m] = v(!1), [o, E] = v(!1), [l, y] = v(null), p = C(0), i = M(
834
- () => new F({
840
+ ), [g, u] = b(!1), [o, E] = b(!1), [d, y] = b(null), h = T(0), a = _(
841
+ () => new U({
835
842
  baseUrl: e.serverUrl,
836
843
  timeoutMs: e.requestTimeout,
837
844
  retryAttempts: e.retryAttempts,
838
- getAccessToken: n?.getAccessToken
845
+ getAccessToken: r?.getAccessToken
839
846
  }),
840
- [e.serverUrl, e.requestTimeout, e.retryAttempts, n]
841
- ), d = C(i);
842
- d.current = i;
843
- const g = S(async () => {
844
- if (r !== "authenticated" || !a) {
847
+ [e.serverUrl, e.requestTimeout, e.retryAttempts, r]
848
+ ), l = T(a);
849
+ l.current = a;
850
+ const p = S(async () => {
851
+ if (t !== "authenticated" || !i) {
845
852
  f(k);
846
853
  return;
847
854
  }
848
- m(!0), y(null);
849
- const b = ++p.current;
855
+ u(!0), y(null);
856
+ const v = ++h.current;
850
857
  try {
851
- const N = await d.current.get(
858
+ const N = await l.current.get(
852
859
  "/admin/dashboard-permissions"
853
860
  );
854
- if (b !== p.current) return;
861
+ if (v !== h.current) return;
855
862
  f(N.permissions);
856
863
  } catch (N) {
857
- if (b !== p.current) return;
864
+ if (v !== h.current) return;
858
865
  if (N instanceof Error && N.message.includes("404"))
859
866
  f(k);
860
867
  else {
@@ -862,21 +869,21 @@ function ae() {
862
869
  y({ code: "NETWORK_ERROR", message: A }), f(k);
863
870
  }
864
871
  } finally {
865
- b === p.current && m(!1);
872
+ v === h.current && u(!1);
866
873
  }
867
- }, [r, a]), w = S(
868
- async (b) => {
869
- if (r !== "authenticated" || !a)
874
+ }, [t, i]), w = S(
875
+ async (v) => {
876
+ if (t !== "authenticated" || !i)
870
877
  throw new Error("Not authenticated");
871
- if (t !== "owner")
878
+ if (n !== "owner")
872
879
  throw new Error("Only owners can modify dashboard permissions");
873
880
  E(!0), y(null);
874
881
  try {
875
- await d.current.request({
882
+ await l.current.request({
876
883
  method: "PUT",
877
884
  path: "/admin/dashboard-permissions",
878
- body: b
879
- }), f(b);
885
+ body: v
886
+ }), f(v);
880
887
  } catch (N) {
881
888
  const A = N instanceof Error ? N.message : "Failed to update permissions";
882
889
  throw y({ code: "NETWORK_ERROR", message: A }), new Error(A);
@@ -884,173 +891,134 @@ function ae() {
884
891
  E(!1);
885
892
  }
886
893
  },
887
- [r, a, t]
888
- ), $ = S(
889
- (b) => !a || !t || t === "owner" ? !0 : c[t]?.[b] ?? !1,
890
- [a, t, c]
894
+ [t, i, n]
895
+ ), C = S(
896
+ (v) => !i || !n || n === "owner" ? !0 : c[n]?.[v] ?? !1,
897
+ [i, n, c]
891
898
  );
892
- return I(() => {
893
- a?.id && g();
894
- }, [a?.id, g]), {
899
+ return L(() => {
900
+ i?.id && p();
901
+ }, [i?.id, p]), {
895
902
  permissions: c,
896
- canAccess: $,
903
+ canAccess: C,
897
904
  updatePermissions: w,
898
- isLoading: u,
905
+ isLoading: g,
899
906
  isUpdating: o,
900
- error: l,
901
- fetchPermissions: g
907
+ error: d,
908
+ fetchPermissions: p
902
909
  };
903
910
  }
904
- const ie = {
905
- organizations: !1,
906
- sso: !1,
907
- mfa: !1,
908
- mfaRequired: !1,
909
- walletSigning: !1,
910
- credits: !1,
911
- userWithdrawals: !1,
912
- cedrosPay: !1
913
- };
914
- function ce() {
915
- const { settings: e, isLoading: r, error: n, fetchSettings: a, getValue: t } = V(), [c, f] = v(!1);
916
- I(() => {
917
- c || (a(), f(!0));
918
- }, [a, c]);
919
- const u = S((l) => l === void 0 ? !1 : l === "true" || l === "1", []), m = M(() => Object.keys(e).length === 0 ? ie : {
920
- organizations: u(t("feature_organizations")),
921
- sso: u(t("feature_sso")),
922
- mfa: u(t("feature_mfa")),
923
- mfaRequired: u(t("security_require_mfa")),
924
- walletSigning: u(t("feature_wallet_signing")),
925
- credits: u(t("feature_credits")),
926
- userWithdrawals: u(t("feature_user_withdrawals")),
927
- cedrosPay: u(t("feature_cedros_pay"))
928
- }, [e, t, u]), o = S(async () => {
929
- await a();
930
- }, [a]), E = S(
931
- (l) => m[l],
932
- [m]
933
- );
934
- return {
935
- features: m,
936
- isLoading: r,
937
- error: n,
938
- refetch: o,
939
- isEnabled: E
940
- };
941
- }
942
- function D({ checked: e, onChange: r, disabled: n, label: a }) {
911
+ function D({ checked: e, onChange: t, disabled: r, label: i }) {
943
912
  return /* @__PURE__ */ s(
944
913
  "button",
945
914
  {
946
915
  type: "button",
947
916
  role: "switch",
948
917
  "aria-checked": e,
949
- "aria-label": a,
950
- disabled: n,
951
- className: `cedros-toggle cedros-toggle-sm ${e ? "cedros-toggle-on" : "cedros-toggle-off"} ${n ? "cedros-toggle-disabled" : ""}`,
952
- onClick: () => !n && r(!e),
918
+ "aria-label": i,
919
+ disabled: r,
920
+ className: `cedros-toggle cedros-toggle-sm ${e ? "cedros-toggle-on" : "cedros-toggle-off"} ${r ? "cedros-toggle-disabled" : ""}`,
921
+ onClick: () => !r && t(!e),
953
922
  children: /* @__PURE__ */ s("span", { className: "cedros-toggle-track", children: /* @__PURE__ */ s("span", { className: "cedros-toggle-thumb" }) })
954
923
  }
955
924
  );
956
925
  }
957
- function Ae({ userRole: e }) {
958
- const { permissions: r, updatePermissions: n, isLoading: a, isUpdating: t, error: c } = ae(), { features: f, isLoading: u } = ce(), m = C(null), o = C(null), E = e === "owner", l = f.cedrosPay, y = S(
959
- (i) => {
960
- o.current = i, m.current && clearTimeout(m.current), m.current = setTimeout(() => {
961
- o.current && (n(o.current).catch(() => {
926
+ function ve({ userRole: e }) {
927
+ const { permissions: t, updatePermissions: r, isLoading: i, isUpdating: n, error: c } = ie(), { features: f, isLoading: g } = W(), u = T(null), o = T(null), E = e === "owner", d = f.cedrosPay, y = S(
928
+ (a) => {
929
+ o.current = a, u.current && clearTimeout(u.current), u.current = setTimeout(() => {
930
+ o.current && (r(o.current).catch(() => {
962
931
  }), o.current = null);
963
932
  }, 500);
964
933
  },
965
- [n]
934
+ [r]
966
935
  );
967
- I(() => () => {
968
- m.current && clearTimeout(m.current);
936
+ L(() => () => {
937
+ u.current && clearTimeout(u.current);
969
938
  }, []);
970
- const p = S(
971
- (i, d, g) => {
939
+ const h = S(
940
+ (a, l, p) => {
972
941
  const w = {
973
- ...r,
974
- [i]: {
975
- ...r[i],
976
- [d]: g
942
+ ...t,
943
+ [a]: {
944
+ ...t[a],
945
+ [l]: p
977
946
  }
978
947
  };
979
948
  y(w);
980
949
  },
981
- [r, y]
950
+ [t, y]
982
951
  );
983
- return a || u ? /* @__PURE__ */ s("div", { className: "cedros-dashboard__section", children: /* @__PURE__ */ s("div", { className: "cedros-dashboard__loading", children: "Loading permissions..." }) }) : E ? /* @__PURE__ */ h("div", { className: "cedros-dashboard__section cedros-permissions-section", children: [
984
- /* @__PURE__ */ h("div", { className: "cedros-permissions-header", children: [
952
+ return i || g ? /* @__PURE__ */ s("div", { className: "cedros-dashboard__section", children: /* @__PURE__ */ s("div", { className: "cedros-dashboard__loading", children: "Loading permissions..." }) }) : E ? /* @__PURE__ */ m("div", { className: "cedros-dashboard__section cedros-permissions-section", children: [
953
+ /* @__PURE__ */ m("div", { className: "cedros-permissions-header", children: [
985
954
  /* @__PURE__ */ s("p", { className: "cedros-permissions-description", children: "Configure which dashboard sections each role can access. Owners always have full access." }),
986
955
  c && /* @__PURE__ */ s("div", { className: "cedros-permissions-error", children: c.message }),
987
- t && /* @__PURE__ */ s("span", { className: "cedros-permissions-saving", children: "Saving..." })
956
+ n && /* @__PURE__ */ s("span", { className: "cedros-permissions-saving", children: "Saving..." })
988
957
  ] }),
989
- /* @__PURE__ */ s("div", { className: "cedros-permissions-matrix", children: /* @__PURE__ */ s("table", { className: "cedros-permissions-table", children: /* @__PURE__ */ h("tbody", { children: [
990
- /* @__PURE__ */ h("tr", { className: "cedros-permissions-group-header", children: [
958
+ /* @__PURE__ */ s("div", { className: "cedros-permissions-matrix", children: /* @__PURE__ */ s("table", { className: "cedros-permissions-table", children: /* @__PURE__ */ m("tbody", { children: [
959
+ /* @__PURE__ */ m("tr", { className: "cedros-permissions-group-header", children: [
991
960
  /* @__PURE__ */ s("th", { className: "cedros-permissions-section-header", children: "Cedros Login" }),
992
961
  /* @__PURE__ */ s("th", { className: "cedros-permissions-role-header", children: "Admin" }),
993
962
  /* @__PURE__ */ s("th", { className: "cedros-permissions-role-header", children: "Member" })
994
963
  ] }),
995
- te.map((i) => /* @__PURE__ */ h("tr", { className: "cedros-permissions-row", children: [
996
- /* @__PURE__ */ s("td", { className: "cedros-permissions-section-label", children: L[i] }),
964
+ re.map((a) => /* @__PURE__ */ m("tr", { className: "cedros-permissions-row", children: [
965
+ /* @__PURE__ */ s("td", { className: "cedros-permissions-section-label", children: M[a] }),
997
966
  /* @__PURE__ */ s("td", { className: "cedros-permissions-toggle-cell", children: /* @__PURE__ */ s(
998
967
  D,
999
968
  {
1000
- checked: r.admin[i] ?? !1,
1001
- onChange: (d) => p("admin", i, d),
1002
- disabled: t,
1003
- label: `Admin access to ${L[i]}`
969
+ checked: t.admin[a] ?? !1,
970
+ onChange: (l) => h("admin", a, l),
971
+ disabled: n,
972
+ label: `Admin access to ${M[a]}`
1004
973
  }
1005
974
  ) }),
1006
975
  /* @__PURE__ */ s("td", { className: "cedros-permissions-toggle-cell", children: /* @__PURE__ */ s(
1007
976
  D,
1008
977
  {
1009
- checked: r.member[i] ?? !1,
1010
- onChange: (d) => p("member", i, d),
1011
- disabled: t,
1012
- label: `Member access to ${L[i]}`
978
+ checked: t.member[a] ?? !1,
979
+ onChange: (l) => h("member", a, l),
980
+ disabled: n,
981
+ label: `Member access to ${M[a]}`
1013
982
  }
1014
983
  ) })
1015
- ] }, i)),
1016
- l && /* @__PURE__ */ h(j, { children: [
1017
- /* @__PURE__ */ h("tr", { className: "cedros-permissions-group-header", children: [
984
+ ] }, a)),
985
+ d && /* @__PURE__ */ m(z, { children: [
986
+ /* @__PURE__ */ m("tr", { className: "cedros-permissions-group-header", children: [
1018
987
  /* @__PURE__ */ s("th", { className: "cedros-permissions-section-header", children: "Cedros Pay" }),
1019
988
  /* @__PURE__ */ s("th", { className: "cedros-permissions-role-header", children: "Admin" }),
1020
989
  /* @__PURE__ */ s("th", { className: "cedros-permissions-role-header", children: "Member" })
1021
990
  ] }),
1022
- ne.map((i) => /* @__PURE__ */ h("tr", { className: "cedros-permissions-row", children: [
1023
- /* @__PURE__ */ s("td", { className: "cedros-permissions-section-label", children: L[i] }),
991
+ ne.map((a) => /* @__PURE__ */ m("tr", { className: "cedros-permissions-row", children: [
992
+ /* @__PURE__ */ s("td", { className: "cedros-permissions-section-label", children: M[a] }),
1024
993
  /* @__PURE__ */ s("td", { className: "cedros-permissions-toggle-cell", children: /* @__PURE__ */ s(
1025
994
  D,
1026
995
  {
1027
- checked: r.admin[i] ?? !1,
1028
- onChange: (d) => p("admin", i, d),
1029
- disabled: t,
1030
- label: `Admin access to ${L[i]}`
996
+ checked: t.admin[a] ?? !1,
997
+ onChange: (l) => h("admin", a, l),
998
+ disabled: n,
999
+ label: `Admin access to ${M[a]}`
1031
1000
  }
1032
1001
  ) }),
1033
1002
  /* @__PURE__ */ s("td", { className: "cedros-permissions-toggle-cell", children: /* @__PURE__ */ s(
1034
1003
  D,
1035
1004
  {
1036
- checked: r.member[i] ?? !1,
1037
- onChange: (d) => p("member", i, d),
1038
- disabled: t,
1039
- label: `Member access to ${L[i]}`
1005
+ checked: t.member[a] ?? !1,
1006
+ onChange: (l) => h("member", a, l),
1007
+ disabled: n,
1008
+ label: `Member access to ${M[a]}`
1040
1009
  }
1041
1010
  ) })
1042
- ] }, i))
1011
+ ] }, a))
1043
1012
  ] })
1044
1013
  ] }) }) })
1045
1014
  ] }) : /* @__PURE__ */ s("div", { className: "cedros-dashboard__section", children: /* @__PURE__ */ s("div", { className: "cedros-dashboard__empty", children: "Only organization owners can configure dashboard permissions." }) });
1046
1015
  }
1047
1016
  export {
1048
- we as I,
1049
- ye as M,
1050
- Ae as P,
1051
- Ne as a,
1052
- ve as b,
1053
- ce as c,
1054
- ae as d,
1055
- be as u
1017
+ pe as I,
1018
+ fe as M,
1019
+ ve as P,
1020
+ we as a,
1021
+ ge as b,
1022
+ ie as c,
1023
+ ye as u
1056
1024
  };