@burdenoff/microfe-comradecircle 2026.720.3 → 2026.730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,94 +2,94 @@ import { useComradeCircle as e } from "../../context/ComradeCircleContext.js";
2
2
  import "../../context/index.js";
3
3
  import { cn as t } from "../../utils/cn.js";
4
4
  import { PageLayout as n } from "../../components/PageLayout.js";
5
- import { useComCircle as r, useComCreateChannel as i, useComCreatePoll as a, useComEvents as o, useComJoinCircle as s, useComLeaveCircle as c, useComPolls as l, useComPosts as u, useComSetMemberRole as d } from "../../hooks/useComradeCircleApi.js";
6
- import { useCursorPager as f } from "../../hooks/useCursorPager.js";
5
+ import { useComCircle as r, useComCreateChannel as i, useComCreatePoll as a, useComEvents as o, useComJoinCircle as s, useComLeaveCircle as c, useComPolls as l, useComPostAddedLive as u, useComPosts as d, useComSetMemberRole as f } from "../../hooks/useComradeCircleApi.js";
6
+ import { useCursorPager as p } from "../../hooks/useCursorPager.js";
7
7
  import "../../hooks/index.js";
8
- import { Avatar as p } from "../../components/Avatar.js";
9
- import { MemberIdentity as m } from "../../components/MemberIdentity.js";
10
- import { describeError as h, notify as g } from "../../lib/toast.js";
11
- import { formatDate as _, formatEnumLabel as v, formatNumber as y } from "../../utils/formatters.js";
12
- import { PostCard as b } from "../../components/PostCard.js";
13
- import { EmptyState as x } from "../../components/EmptyState.js";
14
- import { ErrorView as S, LoadingView as C } from "../../components/StateViews.js";
15
- import { Pagination as w } from "../../components/Pagination.js";
8
+ import { Avatar as m } from "../../components/Avatar.js";
9
+ import { MemberIdentity as h } from "../../components/MemberIdentity.js";
10
+ import { describeError as g, notify as _ } from "../../lib/toast.js";
11
+ import { formatDate as v, formatEnumLabel as y, formatNumber as b } from "../../utils/formatters.js";
12
+ import { PostCard as x } from "../../components/PostCard.js";
13
+ import { EmptyState as S } from "../../components/EmptyState.js";
14
+ import { ErrorView as C, LoadingView as w } from "../../components/StateViews.js";
15
+ import { Pagination as ee } from "../../components/Pagination.js";
16
16
  import { slugify as T } from "../../utils/slug.js";
17
17
  import { StatusBadge as E } from "../../components/StatusBadge.js";
18
- import { Tabs as ee } from "../../components/Tabs.js";
19
- import { PostComposer as D } from "../../components/PostComposer.js";
20
- import { EventCard as te } from "../../components/EventCard.js";
21
- import { PollCard as ne } from "../../components/PollCard.js";
22
- import { CreateEventDialog as re } from "../../components/CreateEventDialog.js";
23
- import { useMemo as O, useState as k } from "react";
24
- import { ArrowLeft as ie, BarChart3 as A, CalendarDays as j, Hash as M, Info as ae, Megaphone as N, MessageCircle as oe, MessagesSquare as se, Mic as P, Plus as F, Search as ce, Users as I } from "lucide-react";
25
- import { useParams as le } from "react-router-dom";
26
- import { Fragment as ue, jsx as L, jsxs as R } from "react/jsx-runtime";
27
- import { Button as z, GradientText as de, Input as B, Label as V, ResponsiveDialog as H, ResponsiveDialogContent as U, ResponsiveDialogDescription as W, ResponsiveDialogFooter as G, ResponsiveDialogHeader as K, ResponsiveDialogTitle as q, Select as J, SelectContent as Y, SelectItem as X, SelectTrigger as Z, SelectValue as Q, Switch as fe, Textarea as pe } from "@burdenoff/fe-libs/ui";
18
+ import { Tabs as te } from "../../components/Tabs.js";
19
+ import { PostComposer as ne } from "../../components/PostComposer.js";
20
+ import { EventCard as re } from "../../components/EventCard.js";
21
+ import { PollCard as ie } from "../../components/PollCard.js";
22
+ import { CreateEventDialog as ae } from "../../components/CreateEventDialog.js";
23
+ import { useMemo as D, useState as O } from "react";
24
+ import { ArrowLeft as oe, BarChart3 as se, CalendarDays as k, Hash as A, Info as ce, Megaphone as j, MessageCircle as le, MessagesSquare as ue, Mic as M, Plus as N, Search as de, Users as P } from "lucide-react";
25
+ import { useParams as fe } from "react-router-dom";
26
+ import { Fragment as pe, jsx as F, jsxs as I } from "react/jsx-runtime";
27
+ import { Button as L, GradientText as me, Input as R, Label as z, ResponsiveDialog as B, ResponsiveDialogContent as V, ResponsiveDialogDescription as H, ResponsiveDialogFooter as U, ResponsiveDialogHeader as W, ResponsiveDialogTitle as G, Select as K, SelectContent as q, SelectItem as J, SelectTrigger as Y, SelectValue as X, Switch as Z, Textarea as he } from "@burdenoff/fe-libs/ui";
28
28
  //#region src/comradecircle/pages/circles/CircleDetailPage.tsx
29
- var me = {
30
- TEXT: M,
31
- FORUM: se,
32
- ANNOUNCEMENT: N,
33
- VOICE: P
34
- }, he = ["OWNER", "ADMIN"], $ = [
29
+ var ge = {
30
+ TEXT: A,
31
+ FORUM: ue,
32
+ ANNOUNCEMENT: j,
33
+ VOICE: M
34
+ }, _e = ["OWNER", "ADMIN"], Q = [
35
35
  "OWNER",
36
36
  "ADMIN",
37
37
  "MODERATOR",
38
38
  "MEMBER"
39
- ], ge = 15;
40
- function _e() {
41
- let { id: t } = le(), { currentUser: i, navigateTo: a } = e(), { data: o, isLoading: l, isError: u, refetch: d } = r(t), f = s(), m = c(), [_, v] = k("channels"), b = O(() => o?.memberships?.find((e) => e.memberId === i?.id && e.status === "ACTIVE"), [o, i]), x = !!b, w = b ? he.includes(b.role) : !1;
42
- if (l) return /* @__PURE__ */ L(n, {
39
+ ], ve = 15;
40
+ function ye() {
41
+ let { id: t } = fe(), { currentUser: i, navigateTo: a } = e(), { data: o, isLoading: l, isError: u, refetch: d } = r(t), f = s(), p = c(), [h, v] = O("channels"), y = D(() => o?.memberships?.find((e) => e.memberId === i?.id && e.status === "ACTIVE"), [o, i]), x = !!y, S = y ? _e.includes(y.role) : !1;
42
+ if (l) return /* @__PURE__ */ F(n, {
43
43
  title: "Circle",
44
- children: /* @__PURE__ */ L(C, { label: "Loading circle…" })
44
+ children: /* @__PURE__ */ F(w, { label: "Loading circle…" })
45
45
  });
46
- if (u || !o) return /* @__PURE__ */ L(n, {
46
+ if (u || !o) return /* @__PURE__ */ F(n, {
47
47
  title: "Circle",
48
- children: /* @__PURE__ */ L(S, {
48
+ children: /* @__PURE__ */ F(C, {
49
49
  title: "Circle not found",
50
50
  message: "This circle may have been archived or you may not have access.",
51
51
  onRetry: () => d()
52
52
  })
53
53
  });
54
- let T = o.memberships?.filter((e) => e.status === "ACTIVE") ?? [], D = [
54
+ let ee = o.memberships?.filter((e) => e.status === "ACTIVE") ?? [], T = [
55
55
  {
56
56
  value: "channels",
57
57
  label: "Channels",
58
- icon: /* @__PURE__ */ L(M, { className: "h-4 w-4" }),
58
+ icon: /* @__PURE__ */ F(A, { className: "h-4 w-4" }),
59
59
  count: o.channels?.length ?? 0
60
60
  },
61
61
  {
62
62
  value: "members",
63
63
  label: "Members",
64
- icon: /* @__PURE__ */ L(I, { className: "h-4 w-4" }),
65
- count: T.length
64
+ icon: /* @__PURE__ */ F(P, { className: "h-4 w-4" }),
65
+ count: ee.length
66
66
  },
67
67
  {
68
68
  value: "events",
69
69
  label: "Events",
70
- icon: /* @__PURE__ */ L(j, { className: "h-4 w-4" })
70
+ icon: /* @__PURE__ */ F(k, { className: "h-4 w-4" })
71
71
  },
72
72
  {
73
73
  value: "polls",
74
74
  label: "Polls",
75
- icon: /* @__PURE__ */ L(A, { className: "h-4 w-4" })
75
+ icon: /* @__PURE__ */ F(se, { className: "h-4 w-4" })
76
76
  },
77
77
  {
78
78
  value: "about",
79
79
  label: "About",
80
- icon: /* @__PURE__ */ L(ae, { className: "h-4 w-4" })
80
+ icon: /* @__PURE__ */ F(ce, { className: "h-4 w-4" })
81
81
  }
82
82
  ];
83
- return /* @__PURE__ */ R(n, {
84
- title: /* @__PURE__ */ R("span", {
83
+ return /* @__PURE__ */ I(n, {
84
+ title: /* @__PURE__ */ I("span", {
85
85
  className: "flex items-center gap-3",
86
- children: [/* @__PURE__ */ L(p, {
86
+ children: [/* @__PURE__ */ F(m, {
87
87
  name: o.name,
88
88
  size: "lg",
89
89
  fileId: o.avatar?.id,
90
90
  seed: o.id,
91
91
  ring: !0
92
- }), /* @__PURE__ */ L(de, {
92
+ }), /* @__PURE__ */ F(me, {
93
93
  as: "span",
94
94
  className: "text-2xl font-semibold tracking-tight",
95
95
  children: o.name
@@ -97,112 +97,112 @@ function _e() {
97
97
  }),
98
98
  description: o.topic ?? void 0,
99
99
  aurora: !0,
100
- actions: /* @__PURE__ */ R("div", {
100
+ actions: /* @__PURE__ */ I("div", {
101
101
  className: "flex items-center gap-2",
102
- children: [/* @__PURE__ */ R(z, {
102
+ children: [/* @__PURE__ */ I(L, {
103
103
  variant: "ghost",
104
104
  size: "sm",
105
105
  onClick: () => a("circles"),
106
- children: [/* @__PURE__ */ L(ie, { className: "mr-1.5 h-4 w-4" }), " Back"]
107
- }), x ? /* @__PURE__ */ L(z, {
106
+ children: [/* @__PURE__ */ F(oe, { className: "mr-1.5 h-4 w-4" }), " Back"]
107
+ }), x ? /* @__PURE__ */ F(L, {
108
108
  variant: "outline",
109
- onClick: () => m.mutateAsync(o.id).then(() => g.success("Left circle")).catch((e) => g.error("Could not leave", h(e))),
110
- disabled: m.isPending,
109
+ onClick: () => p.mutateAsync(o.id).then(() => _.success("Left circle")).catch((e) => _.error("Could not leave", g(e))),
110
+ disabled: p.isPending,
111
111
  children: "Leave"
112
- }) : o.status === "ACTIVE" ? /* @__PURE__ */ L(z, {
113
- onClick: () => f.mutateAsync(o.id).then(() => g.success("Joined circle")).catch((e) => g.error("Could not join", h(e))),
112
+ }) : o.status === "ACTIVE" ? /* @__PURE__ */ F(L, {
113
+ onClick: () => f.mutateAsync(o.id).then(() => _.success("Joined circle")).catch((e) => _.error("Could not join", g(e))),
114
114
  disabled: f.isPending,
115
115
  children: "Join circle"
116
116
  }) : null]
117
117
  }),
118
118
  children: [
119
- /* @__PURE__ */ R("div", {
119
+ /* @__PURE__ */ I("div", {
120
120
  className: "mb-4 flex flex-wrap items-center gap-2",
121
121
  children: [
122
- /* @__PURE__ */ L(E, { status: o.visibility }),
123
- o.status !== "ACTIVE" && /* @__PURE__ */ L(E, { status: o.status }),
124
- b && /* @__PURE__ */ L(E, { status: b.role }),
125
- /* @__PURE__ */ R("span", {
122
+ /* @__PURE__ */ F(E, { status: o.visibility }),
123
+ o.status !== "ACTIVE" && /* @__PURE__ */ F(E, { status: o.status }),
124
+ y && /* @__PURE__ */ F(E, { status: y.role }),
125
+ /* @__PURE__ */ I("span", {
126
126
  className: "inline-flex items-center gap-1 text-sm text-text-tertiary",
127
127
  children: [
128
- /* @__PURE__ */ L(I, { className: "h-4 w-4" }),
128
+ /* @__PURE__ */ F(P, { className: "h-4 w-4" }),
129
129
  " ",
130
- y(o.memberCount),
130
+ b(o.memberCount),
131
131
  " members"
132
132
  ]
133
133
  })
134
134
  ]
135
135
  }),
136
- /* @__PURE__ */ L(ee, {
137
- items: D,
138
- value: _,
136
+ /* @__PURE__ */ F(te, {
137
+ items: T,
138
+ value: h,
139
139
  onChange: v,
140
140
  className: "mb-5"
141
141
  }),
142
- _ === "channels" && /* @__PURE__ */ L(ve, {
142
+ h === "channels" && /* @__PURE__ */ F(be, {
143
143
  circle: o,
144
144
  isMember: x,
145
- canManage: w
145
+ canManage: S
146
146
  }),
147
- _ === "members" && /* @__PURE__ */ L(be, {
147
+ h === "members" && /* @__PURE__ */ F(Se, {
148
148
  circle: o,
149
- canManage: w
149
+ canManage: S
150
150
  }),
151
- _ === "events" && /* @__PURE__ */ L(xe, {
151
+ h === "events" && /* @__PURE__ */ F(Ce, {
152
152
  circle: o,
153
153
  isMember: x
154
154
  }),
155
- _ === "polls" && /* @__PURE__ */ L(Se, {
155
+ h === "polls" && /* @__PURE__ */ F(we, {
156
156
  circle: o,
157
157
  isMember: x,
158
- canManage: w
158
+ canManage: S
159
159
  }),
160
- _ === "about" && /* @__PURE__ */ L(Ce, { circle: o })
160
+ h === "about" && /* @__PURE__ */ F(Te, { circle: o })
161
161
  ]
162
162
  });
163
163
  }
164
- function ve({ circle: e, isMember: n, canManage: r }) {
165
- let i = O(() => [...e.channels ?? []].sort((e, t) => e.position - t.position), [e.channels]), [a, o] = k(i[0]?.id), [s, c] = k(!1), l = i.find((e) => e.id === a) ?? i[0];
166
- return i.length === 0 ? /* @__PURE__ */ R(ue, { children: [/* @__PURE__ */ L(x, {
167
- icon: /* @__PURE__ */ L(M, { className: "h-10 w-10" }),
164
+ function be({ circle: e, isMember: n, canManage: r }) {
165
+ let i = D(() => [...e.channels ?? []].sort((e, t) => e.position - t.position), [e.channels]), [a, o] = O(i[0]?.id), [s, c] = O(!1), l = i.find((e) => e.id === a) ?? i[0];
166
+ return i.length === 0 ? /* @__PURE__ */ I(pe, { children: [/* @__PURE__ */ F(S, {
167
+ icon: /* @__PURE__ */ F(A, { className: "h-10 w-10" }),
168
168
  title: "No channels yet",
169
169
  description: r ? "Create the first channel to start conversations in this circle." : "This circle has no channels yet. Check back soon.",
170
- action: r ? /* @__PURE__ */ R(z, {
170
+ action: r ? /* @__PURE__ */ I(L, {
171
171
  onClick: () => c(!0),
172
- children: [/* @__PURE__ */ L(F, { className: "mr-1.5 h-4 w-4" }), " New channel"]
172
+ children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New channel"]
173
173
  }) : void 0
174
- }), /* @__PURE__ */ L(Te, {
174
+ }), /* @__PURE__ */ F($, {
175
175
  circleId: e.id,
176
176
  open: s,
177
177
  onOpenChange: c,
178
178
  onCreated: (e) => o(e.id)
179
- })] }) : /* @__PURE__ */ R("div", {
179
+ })] }) : /* @__PURE__ */ I("div", {
180
180
  className: "grid gap-5 lg:grid-cols-[220px_1fr]",
181
181
  children: [
182
- /* @__PURE__ */ R("aside", {
182
+ /* @__PURE__ */ I("aside", {
183
183
  className: "hidden lg:block",
184
- children: [/* @__PURE__ */ R("div", {
184
+ children: [/* @__PURE__ */ I("div", {
185
185
  className: "mb-2 flex items-center justify-between",
186
- children: [/* @__PURE__ */ L("h3", {
186
+ children: [/* @__PURE__ */ F("h3", {
187
187
  className: "text-xs font-semibold uppercase tracking-wide text-text-tertiary",
188
188
  children: "Channels"
189
- }), r && /* @__PURE__ */ L("button", {
189
+ }), r && /* @__PURE__ */ F("button", {
190
190
  type: "button",
191
191
  onClick: () => c(!0),
192
192
  "aria-label": "New channel",
193
193
  className: "rounded-md p-1 text-text-tertiary hover:bg-bg-sunken hover:text-text-primary",
194
- children: /* @__PURE__ */ L(F, { className: "h-4 w-4" })
194
+ children: /* @__PURE__ */ F(N, { className: "h-4 w-4" })
195
195
  })]
196
- }), /* @__PURE__ */ L("nav", {
196
+ }), /* @__PURE__ */ F("nav", {
197
197
  className: "flex flex-col gap-0.5",
198
198
  children: i.map((e) => {
199
- let n = me[e.type], r = e.id === l?.id, i = e.type === "ANNOUNCEMENT";
200
- return /* @__PURE__ */ R("button", {
199
+ let n = ge[e.type], r = e.id === l?.id, i = e.type === "ANNOUNCEMENT";
200
+ return /* @__PURE__ */ I("button", {
201
201
  type: "button",
202
202
  onClick: () => o(e.id),
203
203
  "aria-current": r ? "true" : void 0,
204
204
  className: t("flex items-center gap-2 rounded-lg border-l-2 px-2.5 py-1.5 text-left text-sm transition-all", r ? "border-[color:var(--color-accent)] bg-[var(--color-accent-soft)] font-medium text-text-primary shadow-sm" : i ? "border-transparent font-medium text-accent hover:bg-bg-sunken motion-safe:hover:translate-x-0.5" : "border-transparent text-text-secondary hover:bg-bg-sunken hover:text-text-primary motion-safe:hover:translate-x-0.5"),
205
- children: [/* @__PURE__ */ L(n, { className: t("h-4 w-4 shrink-0", r || i ? "text-accent" : "text-text-tertiary") }), /* @__PURE__ */ L("span", {
205
+ children: [/* @__PURE__ */ F(n, { className: t("h-4 w-4 shrink-0", r || i ? "text-accent" : "text-text-tertiary") }), /* @__PURE__ */ F("span", {
206
206
  className: "truncate",
207
207
  children: e.name
208
208
  })]
@@ -210,35 +210,35 @@ function ve({ circle: e, isMember: n, canManage: r }) {
210
210
  })
211
211
  })]
212
212
  }),
213
- /* @__PURE__ */ L("div", {
213
+ /* @__PURE__ */ F("div", {
214
214
  className: "lg:hidden",
215
- children: /* @__PURE__ */ R("div", {
215
+ children: /* @__PURE__ */ I("div", {
216
216
  className: "flex items-center gap-2",
217
- children: [/* @__PURE__ */ R(J, {
217
+ children: [/* @__PURE__ */ I(K, {
218
218
  value: l?.id,
219
219
  onValueChange: o,
220
- children: [/* @__PURE__ */ L(Z, { children: /* @__PURE__ */ L(Q, { placeholder: "Select a channel" }) }), /* @__PURE__ */ L(Y, { children: i.map((e) => /* @__PURE__ */ R(X, {
220
+ children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ F(X, { placeholder: "Select a channel" }) }), /* @__PURE__ */ F(q, { children: i.map((e) => /* @__PURE__ */ I(J, {
221
221
  value: e.id,
222
222
  children: ["#", e.name]
223
223
  }, e.id)) })]
224
- }), r && /* @__PURE__ */ L(z, {
224
+ }), r && /* @__PURE__ */ F(L, {
225
225
  variant: "outline",
226
226
  size: "icon",
227
227
  onClick: () => c(!0),
228
228
  "aria-label": "New channel",
229
- children: /* @__PURE__ */ L(F, { className: "h-4 w-4" })
229
+ children: /* @__PURE__ */ F(N, { className: "h-4 w-4" })
230
230
  })]
231
231
  })
232
232
  }),
233
- /* @__PURE__ */ L("div", {
233
+ /* @__PURE__ */ F("div", {
234
234
  className: "min-w-0",
235
- children: l && /* @__PURE__ */ L(ye, {
235
+ children: l && /* @__PURE__ */ F(xe, {
236
236
  channel: l,
237
237
  canPost: n,
238
238
  canManage: r
239
239
  })
240
240
  }),
241
- /* @__PURE__ */ L(Te, {
241
+ /* @__PURE__ */ F($, {
242
242
  circleId: e.id,
243
243
  open: s,
244
244
  onOpenChange: c,
@@ -247,84 +247,86 @@ function ve({ circle: e, isMember: n, canManage: r }) {
247
247
  ]
248
248
  });
249
249
  }
250
- function ye({ channel: e, canPost: t, canManage: n }) {
251
- let r = f(), { data: i, isLoading: a, isError: o, refetch: s } = u({
250
+ function xe({ channel: e, canPost: t, canManage: n }) {
251
+ let r = p(), { data: i, isLoading: a, isError: o, refetch: s } = d({
252
252
  channelId: e.id,
253
253
  status: "PUBLISHED",
254
254
  pagination: {
255
- limit: ge,
255
+ limit: ve,
256
256
  cursor: r.cursor
257
257
  }
258
- }), c = i?.items ?? [], l = e.type === "ANNOUNCEMENT", d = e.type === "VOICE" ? !1 : l ? n : t, p = l && r.page === 0 && c.length > 0 ? c.find((e) => e.isPinned) ?? c[0] : void 0, m = p ? c.filter((e) => e.id !== p.id) : c;
259
- return /* @__PURE__ */ R("div", {
258
+ });
259
+ u(e.id);
260
+ let c = i?.items ?? [], l = e.type === "ANNOUNCEMENT", f = e.type === "VOICE" ? !1 : l ? n : t, m = l && r.page === 0 && c.length > 0 ? c.find((e) => e.isPinned) ?? c[0] : void 0, h = m ? c.filter((e) => e.id !== m.id) : c;
261
+ return /* @__PURE__ */ I("div", {
260
262
  className: "flex flex-col gap-4",
261
263
  children: [
262
- /* @__PURE__ */ R("div", {
264
+ /* @__PURE__ */ I("div", {
263
265
  className: "flex items-center gap-3",
264
266
  children: [(() => {
265
- let t = me[e.type];
266
- return /* @__PURE__ */ L("span", {
267
+ let t = ge[e.type];
268
+ return /* @__PURE__ */ F("span", {
267
269
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-accent",
268
- children: /* @__PURE__ */ L(t, { className: "h-5 w-5" })
270
+ children: /* @__PURE__ */ F(t, { className: "h-5 w-5" })
269
271
  });
270
- })(), /* @__PURE__ */ R("div", {
272
+ })(), /* @__PURE__ */ I("div", {
271
273
  className: "min-w-0",
272
- children: [/* @__PURE__ */ R("div", {
274
+ children: [/* @__PURE__ */ I("div", {
273
275
  className: "flex items-center gap-2",
274
- children: [/* @__PURE__ */ L("h2", {
276
+ children: [/* @__PURE__ */ F("h2", {
275
277
  className: "text-lg font-semibold text-text-primary",
276
278
  children: e.name
277
- }), l && /* @__PURE__ */ R("span", {
279
+ }), l && /* @__PURE__ */ I("span", {
278
280
  className: "inline-flex items-center gap-1 rounded-full bg-[var(--color-accent-soft)] px-2 py-0.5 text-xs font-medium text-accent",
279
- children: [/* @__PURE__ */ L(N, { className: "h-3 w-3" }), " Broadcast"]
281
+ children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), " Broadcast"]
280
282
  })]
281
- }), e.description && /* @__PURE__ */ L("p", {
283
+ }), e.description && /* @__PURE__ */ F("p", {
282
284
  className: "text-sm text-text-secondary",
283
285
  children: e.description
284
286
  })]
285
287
  })]
286
288
  }),
287
- d && /* @__PURE__ */ L(D, {
289
+ f && /* @__PURE__ */ F(ne, {
288
290
  channelId: e.id,
289
291
  channelName: e.name,
290
292
  onPosted: () => r.reset(),
291
293
  variant: l ? "announcement" : "default"
292
294
  }),
293
- l && !d && /* @__PURE__ */ R("div", {
295
+ l && !f && /* @__PURE__ */ I("div", {
294
296
  className: "rounded-xl border border-dashed border-border-seam p-6 text-center text-sm text-text-secondary",
295
- children: [/* @__PURE__ */ L(N, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Only circle managers can post in announcement channels."]
297
+ children: [/* @__PURE__ */ F(j, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Only circle managers can post in announcement channels."]
296
298
  }),
297
- e.type === "VOICE" && /* @__PURE__ */ R("div", {
299
+ e.type === "VOICE" && /* @__PURE__ */ I("div", {
298
300
  className: "rounded-xl border border-dashed border-border-seam p-6 text-center text-sm text-text-secondary",
299
- children: [/* @__PURE__ */ L(P, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Voice channels are for live audio. Text posting is disabled here."]
301
+ children: [/* @__PURE__ */ F(M, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Voice channels are for live audio. Text posting is disabled here."]
300
302
  }),
301
- a ? /* @__PURE__ */ L(C, { label: "Loading posts…" }) : o ? /* @__PURE__ */ L(S, {
303
+ a ? /* @__PURE__ */ F(w, { label: "Loading posts…" }) : o ? /* @__PURE__ */ F(C, {
302
304
  message: "We couldn't load posts.",
303
305
  onRetry: () => s()
304
- }) : c.length === 0 ? /* @__PURE__ */ L(x, {
305
- icon: /* @__PURE__ */ L(oe, { className: "h-9 w-9" }),
306
+ }) : c.length === 0 ? /* @__PURE__ */ F(S, {
307
+ icon: /* @__PURE__ */ F(le, { className: "h-9 w-9" }),
306
308
  title: "No posts yet",
307
- description: d ? "Be the first to post in this channel." : "Nothing has been posted here yet."
308
- }) : /* @__PURE__ */ R("div", {
309
+ description: f ? "Be the first to post in this channel." : "Nothing has been posted here yet."
310
+ }) : /* @__PURE__ */ I("div", {
309
311
  className: "flex flex-col gap-4",
310
312
  children: [
311
- p && /* @__PURE__ */ R("div", {
313
+ m && /* @__PURE__ */ I("div", {
312
314
  className: "rounded-2xl border-2 border-[color:var(--color-accent)] bg-[var(--color-accent-soft)] p-1",
313
- children: [/* @__PURE__ */ R("div", {
315
+ children: [/* @__PURE__ */ I("div", {
314
316
  className: "mb-1 flex items-center gap-1.5 px-3 pt-2 text-xs font-semibold uppercase tracking-wide text-accent",
315
- children: [/* @__PURE__ */ L(N, { className: "h-3.5 w-3.5" }), p.isPinned ? "Pinned announcement" : "Latest announcement"]
316
- }), /* @__PURE__ */ L(b, { post: p })]
317
+ children: [/* @__PURE__ */ F(j, { className: "h-3.5 w-3.5" }), m.isPinned ? "Pinned announcement" : "Latest announcement"]
318
+ }), /* @__PURE__ */ F(x, { post: m })]
317
319
  }),
318
- m.length > 0 && /* @__PURE__ */ R("div", {
320
+ h.length > 0 && /* @__PURE__ */ I("div", {
319
321
  className: "flex flex-col gap-4",
320
- children: [p && /* @__PURE__ */ L("p", {
322
+ children: [m && /* @__PURE__ */ F("p", {
321
323
  className: "text-xs font-semibold uppercase tracking-wide text-text-tertiary",
322
324
  children: "Earlier announcements"
323
- }), m.map((e) => /* @__PURE__ */ L(b, { post: e }, e.id))]
325
+ }), h.map((e) => /* @__PURE__ */ F(x, { post: e }, e.id))]
324
326
  }),
325
- /* @__PURE__ */ L(w, {
327
+ /* @__PURE__ */ F(ee, {
326
328
  page: r.page,
327
- pageSize: ge,
329
+ pageSize: ve,
328
330
  itemCount: c.length,
329
331
  hasMore: i?.pageInfo.hasMore ?? !1,
330
332
  onPageChange: (e) => r.onPageChange(e, i?.pageInfo.cursor)
@@ -334,13 +336,13 @@ function ye({ channel: e, canPost: t, canManage: n }) {
334
336
  ]
335
337
  });
336
338
  }
337
- function be({ circle: e, canManage: n }) {
338
- let r = d(), [i, a] = k(""), o = O(() => [...e.memberships ?? []].sort((e, t) => $.indexOf(e.role) - $.indexOf(t.role)), [e.memberships]), s = O(() => {
339
+ function Se({ circle: e, canManage: n }) {
340
+ let r = f(), [i, a] = O(""), o = D(() => [...e.memberships ?? []].sort((e, t) => Q.indexOf(e.role) - Q.indexOf(t.role)), [e.memberships]), s = D(() => {
339
341
  let e = i.trim().toLowerCase();
340
- return e ? o.filter((t) => v(t.role).toLowerCase().includes(e) || t.role.toLowerCase().includes(e) || v(t.status).toLowerCase().includes(e) || t.status.toLowerCase().includes(e)) : o;
342
+ return e ? o.filter((t) => y(t.role).toLowerCase().includes(e) || t.role.toLowerCase().includes(e) || y(t.status).toLowerCase().includes(e) || t.status.toLowerCase().includes(e)) : o;
341
343
  }, [o, i]);
342
- if (o.length === 0) return /* @__PURE__ */ L(x, {
343
- icon: /* @__PURE__ */ L(I, { className: "h-9 w-9" }),
344
+ if (o.length === 0) return /* @__PURE__ */ F(S, {
345
+ icon: /* @__PURE__ */ F(P, { className: "h-9 w-9" }),
344
346
  title: "No members yet"
345
347
  });
346
348
  let c = async (t, n) => {
@@ -349,66 +351,66 @@ function be({ circle: e, canManage: n }) {
349
351
  membershipId: t,
350
352
  role: n,
351
353
  circleId: e.id
352
- }), g.success("Role updated");
354
+ }), _.success("Role updated");
353
355
  } catch (e) {
354
- g.error("Could not update role", h(e));
356
+ _.error("Could not update role", g(e));
355
357
  }
356
358
  }, l = n ? "lg:grid-cols-[minmax(0,1fr)_120px_120px_190px]" : "lg:grid-cols-[minmax(0,1fr)_120px_120px]";
357
- return /* @__PURE__ */ R("div", {
359
+ return /* @__PURE__ */ I("div", {
358
360
  className: "flex flex-col gap-4",
359
- children: [/* @__PURE__ */ R("div", {
361
+ children: [/* @__PURE__ */ I("div", {
360
362
  className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
361
- children: [/* @__PURE__ */ R("div", {
363
+ children: [/* @__PURE__ */ I("div", {
362
364
  className: "relative w-full sm:max-w-xs",
363
- children: [/* @__PURE__ */ L(ce, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ L(B, {
365
+ children: [/* @__PURE__ */ F(de, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ F(R, {
364
366
  value: i,
365
367
  onChange: (e) => a(e.target.value),
366
368
  placeholder: "Filter by role or status…",
367
369
  className: "pl-9",
368
370
  "aria-label": "Filter members by role or status"
369
371
  })]
370
- }), /* @__PURE__ */ L("span", {
372
+ }), /* @__PURE__ */ F("span", {
371
373
  className: "text-sm text-text-tertiary",
372
- children: s.length === o.length ? `${y(o.length)} member${o.length === 1 ? "" : "s"}` : `${y(s.length)} of ${y(o.length)}`
374
+ children: s.length === o.length ? `${b(o.length)} member${o.length === 1 ? "" : "s"}` : `${b(s.length)} of ${b(o.length)}`
373
375
  })]
374
- }), /* @__PURE__ */ R("div", {
376
+ }), /* @__PURE__ */ I("div", {
375
377
  className: "overflow-hidden rounded-2xl border border-border-seam bg-bg-surface",
376
- children: [/* @__PURE__ */ R("div", {
378
+ children: [/* @__PURE__ */ I("div", {
377
379
  className: t("hidden border-b border-border-seam px-5 py-3 text-xs font-semibold uppercase tracking-wide text-text-tertiary lg:grid lg:items-center lg:gap-4", l),
378
380
  children: [
379
- /* @__PURE__ */ L("span", { children: "Member" }),
380
- /* @__PURE__ */ L("span", { children: "Status" }),
381
- /* @__PURE__ */ L("span", { children: "Role" }),
382
- n && /* @__PURE__ */ L("span", { children: "Manage role" })
381
+ /* @__PURE__ */ F("span", { children: "Member" }),
382
+ /* @__PURE__ */ F("span", { children: "Status" }),
383
+ /* @__PURE__ */ F("span", { children: "Role" }),
384
+ n && /* @__PURE__ */ F("span", { children: "Manage role" })
383
385
  ]
384
- }), s.length === 0 ? /* @__PURE__ */ R("div", {
386
+ }), s.length === 0 ? /* @__PURE__ */ I("div", {
385
387
  className: "px-5 py-10 text-center text-sm text-text-secondary",
386
388
  children: [
387
389
  "No members match “",
388
390
  i.trim(),
389
391
  "”."
390
392
  ]
391
- }) : s.map((e) => /* @__PURE__ */ R("div", {
393
+ }) : s.map((e) => /* @__PURE__ */ I("div", {
392
394
  className: t("flex flex-col gap-3 border-b border-border-seam px-5 py-4 last:border-b-0 motion-safe:transition-colors hover:bg-bg-sunken/60 lg:grid lg:items-center lg:gap-4", l),
393
- children: [/* @__PURE__ */ L(m, {
395
+ children: [/* @__PURE__ */ F(h, {
394
396
  memberId: e.memberId,
395
397
  variant: "row",
396
398
  size: "md",
397
399
  showPresence: !0
398
- }), /* @__PURE__ */ R("div", {
400
+ }), /* @__PURE__ */ I("div", {
399
401
  className: "flex flex-wrap items-center gap-2 lg:contents",
400
402
  children: [
401
- /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(E, { status: e.status }) }),
402
- /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(E, { status: e.role }) }),
403
- n && /* @__PURE__ */ R(J, {
403
+ /* @__PURE__ */ F("div", { children: /* @__PURE__ */ F(E, { status: e.status }) }),
404
+ /* @__PURE__ */ F("div", { children: /* @__PURE__ */ F(E, { status: e.role }) }),
405
+ n && /* @__PURE__ */ I(K, {
404
406
  value: e.role,
405
407
  onValueChange: (t) => c(e.id, t),
406
- children: [/* @__PURE__ */ L(Z, {
408
+ children: [/* @__PURE__ */ F(Y, {
407
409
  className: "h-9 w-40 lg:w-full",
408
- children: /* @__PURE__ */ L(Q, {})
409
- }), /* @__PURE__ */ L(Y, { children: $.map((e) => /* @__PURE__ */ L(X, {
410
+ children: /* @__PURE__ */ F(X, {})
411
+ }), /* @__PURE__ */ F(q, { children: Q.map((e) => /* @__PURE__ */ F(J, {
410
412
  value: e,
411
- children: v(e)
413
+ children: y(e)
412
414
  }, e)) })]
413
415
  })
414
416
  ]
@@ -417,121 +419,121 @@ function be({ circle: e, canManage: n }) {
417
419
  })]
418
420
  });
419
421
  }
420
- function xe({ circle: t, isMember: n }) {
421
- let { navigateTo: r } = e(), { data: i, isLoading: a, isError: s, refetch: c } = o({ circleId: t.id }), [l, u] = k(!1), d = i?.items ?? [];
422
- return /* @__PURE__ */ R("div", { children: [
423
- /* @__PURE__ */ L("div", {
422
+ function Ce({ circle: t, isMember: n }) {
423
+ let { navigateTo: r } = e(), { data: i, isLoading: a, isError: s, refetch: c } = o({ circleId: t.id }), [l, u] = O(!1), d = i?.items ?? [];
424
+ return /* @__PURE__ */ I("div", { children: [
425
+ /* @__PURE__ */ F("div", {
424
426
  className: "mb-4 flex items-center justify-end",
425
- children: n && /* @__PURE__ */ R(z, {
427
+ children: n && /* @__PURE__ */ I(L, {
426
428
  onClick: () => u(!0),
427
- children: [/* @__PURE__ */ L(F, { className: "mr-1.5 h-4 w-4" }), " New event"]
429
+ children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New event"]
428
430
  })
429
431
  }),
430
- a ? /* @__PURE__ */ L(C, { label: "Loading events…" }) : s ? /* @__PURE__ */ L(S, { onRetry: () => c() }) : d.length === 0 ? /* @__PURE__ */ L(x, {
431
- icon: /* @__PURE__ */ L(j, { className: "h-9 w-9" }),
432
+ a ? /* @__PURE__ */ F(w, { label: "Loading events…" }) : s ? /* @__PURE__ */ F(C, { onRetry: () => c() }) : d.length === 0 ? /* @__PURE__ */ F(S, {
433
+ icon: /* @__PURE__ */ F(k, { className: "h-9 w-9" }),
432
434
  title: "No events scheduled",
433
435
  description: n ? "Schedule the first event for this circle." : "No upcoming events.",
434
- action: n ? /* @__PURE__ */ R(z, {
436
+ action: n ? /* @__PURE__ */ I(L, {
435
437
  onClick: () => u(!0),
436
- children: [/* @__PURE__ */ L(F, { className: "mr-1.5 h-4 w-4" }), " New event"]
438
+ children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New event"]
437
439
  }) : void 0
438
- }) : /* @__PURE__ */ L("div", {
440
+ }) : /* @__PURE__ */ F("div", {
439
441
  className: "grid gap-4 md:grid-cols-2",
440
- children: d.map((e) => /* @__PURE__ */ L(te, {
442
+ children: d.map((e) => /* @__PURE__ */ F(re, {
441
443
  event: e,
442
444
  onOpen: () => r(`events/${e.id}`)
443
445
  }, e.id))
444
446
  }),
445
- /* @__PURE__ */ L(re, {
447
+ /* @__PURE__ */ F(ae, {
446
448
  circleId: t.id,
447
449
  open: l,
448
450
  onOpenChange: u
449
451
  })
450
452
  ] });
451
453
  }
452
- function Se({ circle: e, isMember: t, canManage: n }) {
453
- let { data: r, isLoading: i, isError: a, refetch: o } = l(e.id), [s, c] = k(!1);
454
- return /* @__PURE__ */ R("div", { children: [
455
- /* @__PURE__ */ L("div", {
454
+ function we({ circle: e, isMember: t, canManage: n }) {
455
+ let { data: r, isLoading: i, isError: a, refetch: o } = l(e.id), [s, c] = O(!1);
456
+ return /* @__PURE__ */ I("div", { children: [
457
+ /* @__PURE__ */ F("div", {
456
458
  className: "mb-4 flex items-center justify-end",
457
- children: t && /* @__PURE__ */ R(z, {
459
+ children: t && /* @__PURE__ */ I(L, {
458
460
  onClick: () => c(!0),
459
- children: [/* @__PURE__ */ L(F, { className: "mr-1.5 h-4 w-4" }), " New poll"]
461
+ children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New poll"]
460
462
  })
461
463
  }),
462
- i ? /* @__PURE__ */ L(C, { label: "Loading polls…" }) : a ? /* @__PURE__ */ L(S, { onRetry: () => o() }) : (r ?? []).length === 0 ? /* @__PURE__ */ L(x, {
463
- icon: /* @__PURE__ */ L(A, { className: "h-9 w-9" }),
464
+ i ? /* @__PURE__ */ F(w, { label: "Loading polls…" }) : a ? /* @__PURE__ */ F(C, { onRetry: () => o() }) : (r ?? []).length === 0 ? /* @__PURE__ */ F(S, {
465
+ icon: /* @__PURE__ */ F(se, { className: "h-9 w-9" }),
464
466
  title: "No polls yet",
465
467
  description: t ? "Ask the circle a question with a poll." : "No polls have been created.",
466
- action: t ? /* @__PURE__ */ R(z, {
468
+ action: t ? /* @__PURE__ */ I(L, {
467
469
  onClick: () => c(!0),
468
- children: [/* @__PURE__ */ L(F, { className: "mr-1.5 h-4 w-4" }), " New poll"]
470
+ children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New poll"]
469
471
  }) : void 0
470
- }) : /* @__PURE__ */ L("div", {
472
+ }) : /* @__PURE__ */ F("div", {
471
473
  className: "mx-auto flex max-w-2xl flex-col gap-4",
472
- children: (r ?? []).map((e) => /* @__PURE__ */ L(ne, {
474
+ children: (r ?? []).map((e) => /* @__PURE__ */ F(ie, {
473
475
  poll: e,
474
476
  canManage: n
475
477
  }, e.id))
476
478
  }),
477
- /* @__PURE__ */ L(Ee, {
479
+ /* @__PURE__ */ F(De, {
478
480
  circleId: e.id,
479
481
  open: s,
480
482
  onOpenChange: c
481
483
  })
482
484
  ] });
483
485
  }
484
- function Ce({ circle: e }) {
485
- return /* @__PURE__ */ L("div", {
486
+ function Te({ circle: e }) {
487
+ return /* @__PURE__ */ F("div", {
486
488
  className: "mx-auto max-w-2xl",
487
- children: /* @__PURE__ */ R("div", {
489
+ children: /* @__PURE__ */ I("div", {
488
490
  className: "rounded-2xl border border-border-seam bg-bg-surface p-6",
489
491
  children: [
490
- /* @__PURE__ */ L("h2", {
492
+ /* @__PURE__ */ F("h2", {
491
493
  className: "text-lg font-semibold text-text-primary",
492
494
  children: "About this circle"
493
495
  }),
494
- /* @__PURE__ */ L("p", {
496
+ /* @__PURE__ */ F("p", {
495
497
  className: "mt-2 whitespace-pre-wrap text-sm text-text-secondary",
496
498
  children: e.description || "No description provided."
497
499
  }),
498
- e.tags.length > 0 && /* @__PURE__ */ L("div", {
500
+ e.tags.length > 0 && /* @__PURE__ */ F("div", {
499
501
  className: "mt-4 flex flex-wrap gap-1.5",
500
- children: e.tags.map((e) => /* @__PURE__ */ R("span", {
502
+ children: e.tags.map((e) => /* @__PURE__ */ I("span", {
501
503
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
502
504
  children: ["#", e]
503
505
  }, e))
504
506
  }),
505
- /* @__PURE__ */ R("dl", {
507
+ /* @__PURE__ */ I("dl", {
506
508
  className: "mt-6 grid grid-cols-2 gap-4 text-sm",
507
509
  children: [
508
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
510
+ /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
509
511
  className: "text-text-tertiary",
510
512
  children: "Visibility"
511
- }), /* @__PURE__ */ L("dd", {
513
+ }), /* @__PURE__ */ F("dd", {
512
514
  className: "mt-1 text-text-primary",
513
- children: v(e.visibility)
515
+ children: y(e.visibility)
514
516
  })] }),
515
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
517
+ /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
516
518
  className: "text-text-tertiary",
517
519
  children: "Status"
518
- }), /* @__PURE__ */ L("dd", {
520
+ }), /* @__PURE__ */ F("dd", {
519
521
  className: "mt-1 text-text-primary",
520
- children: v(e.status)
522
+ children: y(e.status)
521
523
  })] }),
522
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
524
+ /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
523
525
  className: "text-text-tertiary",
524
526
  children: "Members"
525
- }), /* @__PURE__ */ L("dd", {
527
+ }), /* @__PURE__ */ F("dd", {
526
528
  className: "mt-1 text-text-primary",
527
- children: y(e.memberCount)
529
+ children: b(e.memberCount)
528
530
  })] }),
529
- /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
531
+ /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
530
532
  className: "text-text-tertiary",
531
533
  children: "Created"
532
- }), /* @__PURE__ */ L("dd", {
534
+ }), /* @__PURE__ */ F("dd", {
533
535
  className: "mt-1 text-text-primary",
534
- children: _(e.createdAt)
536
+ children: v(e.createdAt)
535
537
  })] })
536
538
  ]
537
539
  })
@@ -539,70 +541,70 @@ function Ce({ circle: e }) {
539
541
  })
540
542
  });
541
543
  }
542
- var we = [
544
+ var Ee = [
543
545
  "TEXT",
544
546
  "FORUM",
545
547
  "ANNOUNCEMENT",
546
548
  "VOICE"
547
549
  ];
548
- function Te({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
549
- let a = i(), [o, s] = k(""), [c, l] = k(""), [u, d] = k("TEXT"), [f, p] = k(null);
550
- return /* @__PURE__ */ L(H, {
550
+ function $({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
551
+ let a = i(), [o, s] = O(""), [c, l] = O(""), [u, d] = O("TEXT"), [f, p] = O(null);
552
+ return /* @__PURE__ */ F(B, {
551
553
  open: t,
552
554
  onOpenChange: n,
553
- children: /* @__PURE__ */ R(U, {
555
+ children: /* @__PURE__ */ I(V, {
554
556
  className: "sm:max-w-md",
555
557
  children: [
556
- /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(q, { children: "Create a channel" }), /* @__PURE__ */ L(W, { children: "Channels organise conversations by topic or format." })] }),
557
- /* @__PURE__ */ R("div", {
558
+ /* @__PURE__ */ I(W, { children: [/* @__PURE__ */ F(G, { children: "Create a channel" }), /* @__PURE__ */ F(H, { children: "Channels organise conversations by topic or format." })] }),
559
+ /* @__PURE__ */ I("div", {
558
560
  className: "flex flex-col gap-4 py-2",
559
561
  children: [
560
- /* @__PURE__ */ R("div", {
562
+ /* @__PURE__ */ I("div", {
561
563
  className: "grid gap-1.5",
562
- children: [/* @__PURE__ */ L(V, {
564
+ children: [/* @__PURE__ */ F(z, {
563
565
  htmlFor: "channel-name",
564
566
  children: "Name"
565
- }), /* @__PURE__ */ L(B, {
567
+ }), /* @__PURE__ */ F(R, {
566
568
  id: "channel-name",
567
569
  value: o,
568
570
  onChange: (e) => s(e.target.value),
569
571
  placeholder: "general"
570
572
  })]
571
573
  }),
572
- /* @__PURE__ */ R("div", {
574
+ /* @__PURE__ */ I("div", {
573
575
  className: "grid gap-1.5",
574
- children: [/* @__PURE__ */ L(V, { children: "Type" }), /* @__PURE__ */ R(J, {
576
+ children: [/* @__PURE__ */ F(z, { children: "Type" }), /* @__PURE__ */ I(K, {
575
577
  value: u,
576
578
  onValueChange: (e) => d(e),
577
- children: [/* @__PURE__ */ L(Z, { children: /* @__PURE__ */ L(Q, {}) }), /* @__PURE__ */ L(Y, { children: we.map((e) => /* @__PURE__ */ L(X, {
579
+ children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ F(X, {}) }), /* @__PURE__ */ F(q, { children: Ee.map((e) => /* @__PURE__ */ F(J, {
578
580
  value: e,
579
- children: v(e)
581
+ children: y(e)
580
582
  }, e)) })]
581
583
  })]
582
584
  }),
583
- /* @__PURE__ */ R("div", {
585
+ /* @__PURE__ */ I("div", {
584
586
  className: "grid gap-1.5",
585
- children: [/* @__PURE__ */ L(V, {
587
+ children: [/* @__PURE__ */ F(z, {
586
588
  htmlFor: "channel-desc",
587
589
  children: "Description"
588
- }), /* @__PURE__ */ L(pe, {
590
+ }), /* @__PURE__ */ F(he, {
589
591
  id: "channel-desc",
590
592
  value: c,
591
593
  onChange: (e) => l(e.target.value),
592
594
  rows: 2
593
595
  })]
594
596
  }),
595
- f && /* @__PURE__ */ L("p", {
597
+ f && /* @__PURE__ */ F("p", {
596
598
  className: "text-sm text-status-error-text",
597
599
  children: f
598
600
  })
599
601
  ]
600
602
  }),
601
- /* @__PURE__ */ R(G, { children: [/* @__PURE__ */ L(z, {
603
+ /* @__PURE__ */ I(U, { children: [/* @__PURE__ */ F(L, {
602
604
  variant: "outline",
603
605
  onClick: () => n(!1),
604
606
  children: "Cancel"
605
- }), /* @__PURE__ */ L(z, {
607
+ }), /* @__PURE__ */ F(L, {
606
608
  onClick: async () => {
607
609
  if (!o.trim()) {
608
610
  p("Channel name is required.");
@@ -616,9 +618,9 @@ function Te({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
616
618
  description: c.trim() || null,
617
619
  type: u
618
620
  });
619
- g.success("Channel created", `#${t.name}`), n(!1), s(""), l(""), d("TEXT"), p(null), r?.(t);
621
+ _.success("Channel created", `#${t.name}`), n(!1), s(""), l(""), d("TEXT"), p(null), r?.(t);
620
622
  } catch (e) {
621
- p(h(e));
623
+ p(g(e));
622
624
  }
623
625
  },
624
626
  disabled: a.isPending,
@@ -628,127 +630,127 @@ function Te({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
628
630
  })
629
631
  });
630
632
  }
631
- function Ee({ circleId: e, open: t, onOpenChange: n }) {
632
- let r = a(), [i, o] = k(""), [s, c] = k(["", ""]), [l, u] = k(!1), [d, f] = k(!1), [p, m] = k(""), [_, v] = k(null), y = O(() => {
633
+ function De({ circleId: e, open: t, onOpenChange: n }) {
634
+ let r = a(), [i, o] = O(""), [s, c] = O(["", ""]), [l, u] = O(!1), [d, f] = O(!1), [p, m] = O(""), [h, v] = O(null), y = D(() => {
633
635
  let e = /* @__PURE__ */ new Date();
634
636
  return e.setMinutes(e.getMinutes() - e.getTimezoneOffset()), e.toISOString().slice(0, 16);
635
637
  }, []), b = () => {
636
638
  o(""), c(["", ""]), u(!1), f(!1), m(""), v(null);
637
639
  };
638
- return /* @__PURE__ */ L(H, {
640
+ return /* @__PURE__ */ F(B, {
639
641
  open: t,
640
642
  onOpenChange: n,
641
- children: /* @__PURE__ */ R(U, {
643
+ children: /* @__PURE__ */ I(V, {
642
644
  className: "sm:max-w-md",
643
645
  children: [
644
- /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(q, { children: "Create a poll" }), /* @__PURE__ */ L(W, { children: "Gather the circle's opinion." })] }),
645
- /* @__PURE__ */ R("div", {
646
+ /* @__PURE__ */ I(W, { children: [/* @__PURE__ */ F(G, { children: "Create a poll" }), /* @__PURE__ */ F(H, { children: "Gather the circle's opinion." })] }),
647
+ /* @__PURE__ */ I("div", {
646
648
  className: "flex flex-col gap-4 py-2",
647
649
  children: [
648
- /* @__PURE__ */ R("div", {
650
+ /* @__PURE__ */ I("div", {
649
651
  className: "grid gap-1.5",
650
- children: [/* @__PURE__ */ L(V, {
652
+ children: [/* @__PURE__ */ F(z, {
651
653
  htmlFor: "poll-q",
652
654
  children: "Question"
653
- }), /* @__PURE__ */ L(B, {
655
+ }), /* @__PURE__ */ F(R, {
654
656
  id: "poll-q",
655
657
  value: i,
656
658
  onChange: (e) => o(e.target.value),
657
659
  placeholder: "What should we build next?"
658
660
  })]
659
661
  }),
660
- /* @__PURE__ */ R("div", {
662
+ /* @__PURE__ */ I("div", {
661
663
  className: "grid gap-1.5",
662
- children: [/* @__PURE__ */ L(V, { children: "Options" }), /* @__PURE__ */ R("div", {
664
+ children: [/* @__PURE__ */ F(z, { children: "Options" }), /* @__PURE__ */ I("div", {
663
665
  className: "flex flex-col gap-2",
664
- children: [s.map((e, t) => /* @__PURE__ */ R("div", {
666
+ children: [s.map((e, t) => /* @__PURE__ */ I("div", {
665
667
  className: "flex items-center gap-2",
666
- children: [/* @__PURE__ */ L(B, {
668
+ children: [/* @__PURE__ */ F(R, {
667
669
  value: e,
668
670
  onChange: (e) => c((n) => n.map((n, r) => r === t ? e.target.value : n)),
669
671
  placeholder: `Option ${t + 1}`
670
- }), s.length > 2 && /* @__PURE__ */ L(z, {
672
+ }), s.length > 2 && /* @__PURE__ */ F(L, {
671
673
  variant: "ghost",
672
674
  size: "icon",
673
675
  onClick: () => c((e) => e.filter((e, n) => n !== t)),
674
676
  "aria-label": `Remove option ${t + 1}`,
675
677
  children: "✕"
676
678
  })]
677
- }, t)), s.length < 8 && /* @__PURE__ */ R(z, {
679
+ }, t)), s.length < 8 && /* @__PURE__ */ I(L, {
678
680
  variant: "outline",
679
681
  size: "sm",
680
682
  onClick: () => c((e) => [...e, ""]),
681
- children: [/* @__PURE__ */ L(F, { className: "mr-1.5 h-4 w-4" }), " Add option"]
683
+ children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " Add option"]
682
684
  })]
683
685
  })]
684
686
  }),
685
- /* @__PURE__ */ R("div", {
687
+ /* @__PURE__ */ I("div", {
686
688
  className: "grid gap-1.5",
687
689
  children: [
688
- /* @__PURE__ */ L(V, {
690
+ /* @__PURE__ */ F(z, {
689
691
  htmlFor: "poll-closes",
690
692
  children: "Closes at"
691
693
  }),
692
- /* @__PURE__ */ L(B, {
694
+ /* @__PURE__ */ F(R, {
693
695
  id: "poll-closes",
694
696
  type: "datetime-local",
695
697
  min: y,
696
698
  value: p,
697
699
  onChange: (e) => m(e.target.value)
698
700
  }),
699
- /* @__PURE__ */ L("p", {
701
+ /* @__PURE__ */ F("p", {
700
702
  className: "text-xs text-text-tertiary",
701
703
  children: "Optional — leave empty to keep voting open indefinitely."
702
704
  })
703
705
  ]
704
706
  }),
705
- /* @__PURE__ */ R("div", {
707
+ /* @__PURE__ */ I("div", {
706
708
  className: "flex flex-col divide-y divide-border-seam rounded-xl border border-border-seam",
707
- children: [/* @__PURE__ */ R("div", {
709
+ children: [/* @__PURE__ */ I("div", {
708
710
  className: "flex items-center justify-between gap-4 px-3 py-3",
709
- children: [/* @__PURE__ */ R("div", {
711
+ children: [/* @__PURE__ */ I("div", {
710
712
  className: "min-w-0",
711
- children: [/* @__PURE__ */ L(V, {
713
+ children: [/* @__PURE__ */ F(z, {
712
714
  htmlFor: "poll-multi",
713
715
  children: "Allow multiple choices"
714
- }), /* @__PURE__ */ L("p", {
716
+ }), /* @__PURE__ */ F("p", {
715
717
  className: "text-xs text-text-tertiary",
716
718
  children: "Let voters pick more than one option."
717
719
  })]
718
- }), /* @__PURE__ */ L(fe, {
720
+ }), /* @__PURE__ */ F(Z, {
719
721
  id: "poll-multi",
720
722
  checked: l,
721
723
  onCheckedChange: u
722
724
  })]
723
- }), /* @__PURE__ */ R("div", {
725
+ }), /* @__PURE__ */ I("div", {
724
726
  className: "flex items-center justify-between gap-4 px-3 py-3",
725
- children: [/* @__PURE__ */ R("div", {
727
+ children: [/* @__PURE__ */ I("div", {
726
728
  className: "min-w-0",
727
- children: [/* @__PURE__ */ L(V, {
729
+ children: [/* @__PURE__ */ F(z, {
728
730
  htmlFor: "poll-anon",
729
731
  children: "Anonymous voting"
730
- }), /* @__PURE__ */ L("p", {
732
+ }), /* @__PURE__ */ F("p", {
731
733
  className: "text-xs text-text-tertiary",
732
734
  children: "Hide who voted for each option."
733
735
  })]
734
- }), /* @__PURE__ */ L(fe, {
736
+ }), /* @__PURE__ */ F(Z, {
735
737
  id: "poll-anon",
736
738
  checked: d,
737
739
  onCheckedChange: f
738
740
  })]
739
741
  })]
740
742
  }),
741
- _ && /* @__PURE__ */ L("p", {
743
+ h && /* @__PURE__ */ F("p", {
742
744
  className: "text-sm text-status-error-text",
743
- children: _
745
+ children: h
744
746
  })
745
747
  ]
746
748
  }),
747
- /* @__PURE__ */ R(G, { children: [/* @__PURE__ */ L(z, {
749
+ /* @__PURE__ */ I(U, { children: [/* @__PURE__ */ F(L, {
748
750
  variant: "outline",
749
751
  onClick: () => n(!1),
750
752
  children: "Cancel"
751
- }), /* @__PURE__ */ L(z, {
753
+ }), /* @__PURE__ */ F(L, {
752
754
  onClick: async () => {
753
755
  let t = s.map((e) => e.trim()).filter(Boolean);
754
756
  if (!i.trim()) {
@@ -767,9 +769,9 @@ function Ee({ circleId: e, open: t, onOpenChange: n }) {
767
769
  allowMultiple: l,
768
770
  isAnonymous: d,
769
771
  closesAt: p ? new Date(p).toISOString() : null
770
- }), g.success("Poll created"), n(!1), b();
772
+ }), _.success("Poll created"), n(!1), b();
771
773
  } catch (e) {
772
- v(h(e));
774
+ v(g(e));
773
775
  }
774
776
  },
775
777
  disabled: r.isPending,
@@ -780,6 +782,6 @@ function Ee({ circleId: e, open: t, onOpenChange: n }) {
780
782
  });
781
783
  }
782
784
  //#endregion
783
- export { _e as CircleDetailPage };
785
+ export { ye as CircleDetailPage };
784
786
 
785
787
  //# sourceMappingURL=CircleDetailPage.js.map