@burdenoff/microfe-headshotmarketing 2026.1030.2 → 2026.1030.3

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 (29) hide show
  1. package/dist/generated/wspace-operations.d.ts +0 -2
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +0 -2
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.d.ts.map +1 -1
  6. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +386 -474
  7. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  8. package/dist/headshotmarketing/pages/ads/AudiencesPage.d.ts.map +1 -1
  9. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +339 -448
  10. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  11. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.d.ts +0 -7
  12. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.d.ts.map +1 -1
  13. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +446 -463
  14. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  15. package/dist/headshotmarketing/types/index.d.ts +1 -14
  16. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  17. package/dist/headshotmarketing/utils/adsMapper.d.ts +1 -6
  18. package/dist/headshotmarketing/utils/adsMapper.d.ts.map +1 -1
  19. package/dist/headshotmarketing/utils/adsMapper.js +11 -27
  20. package/dist/headshotmarketing/utils/adsMapper.js.map +1 -1
  21. package/package.json +1 -1
  22. package/dist/headshotmarketing/pages/ads/adCampaignStepper.d.ts +0 -53
  23. package/dist/headshotmarketing/pages/ads/adCampaignStepper.d.ts.map +0 -1
  24. package/dist/headshotmarketing/pages/ads/adCampaignStepper.js +0 -151
  25. package/dist/headshotmarketing/pages/ads/adCampaignStepper.js.map +0 -1
  26. package/dist/headshotmarketing/pages/ads/audienceDetails.d.ts +0 -31
  27. package/dist/headshotmarketing/pages/ads/audienceDetails.d.ts.map +0 -1
  28. package/dist/headshotmarketing/pages/ads/audienceDetails.js +0 -64
  29. package/dist/headshotmarketing/pages/ads/audienceDetails.js.map +0 -1
@@ -1,45 +1,38 @@
1
1
  import { useCreateHeadshotmarketingAudienceMutation as e, useDeleteHeadshotmarketingAudienceMutation as t, useHeadshotmarketingAudiencesListQuery as n, useUpdateHeadshotmarketingAudienceMutation as r } from "../../../generated/wspace-operations.js";
2
2
  import { useHeadshotMarketing as i } from "../../context/HeadshotMarketingContext.js";
3
- import { Tooltip as a } from "../../../node_modules/recharts/es6/component/Tooltip.js";
4
- import { ResponsiveContainer as o } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
5
- import { Cell as s } from "../../../node_modules/recharts/es6/component/Cell.js";
6
- import { Pie as c } from "../../../node_modules/recharts/es6/polar/Pie.js";
7
- import { PieChart as l } from "../../../node_modules/recharts/es6/chart/PieChart.js";
8
- import { cn as u, formatNumber as d, formatPercentage as f } from "../../utils/helpers.js";
9
- import { toAudienceModel as p } from "../../utils/adsMapper.js";
10
- import { PageLayout as m } from "../../components/PageLayout.js";
11
- import { EmptyState as h } from "../../components/EmptyState.js";
12
- import { Modal as g } from "../../components/Modal.js";
13
- import { QueryStateBoundary as ee } from "../../components/QueryStateBoundary.js";
14
- import { Pagination as te } from "../../components/Pagination.js";
3
+ import { cn as a, formatNumber as o, formatPercentage as s } from "../../utils/helpers.js";
4
+ import { toAudienceModel as c } from "../../utils/adsMapper.js";
5
+ import { PageLayout as l } from "../../components/PageLayout.js";
6
+ import { StatusBadge as u } from "../../components/StatusBadge.js";
7
+ import { EmptyState as ee } from "../../components/EmptyState.js";
8
+ import { Modal as d } from "../../components/Modal.js";
9
+ import { QueryStateBoundary as te } from "../../components/QueryStateBoundary.js";
10
+ import { Pagination as ne } from "../../components/Pagination.js";
15
11
  import "../../components/index.js";
16
- import { useHeadshotmarketingBootstrap as ne } from "../../hooks/useHeadshotmarketingBootstrap.js";
17
- import { usePagination as re } from "../../hooks/usePagination.js";
18
- import { audienceAgeBreakdown as _, audienceCriteriaChips as v, audienceUsageLabel as y } from "./audienceDetails.js";
19
- import { useEffect as b, useMemo as ie, useState as x } from "react";
20
- import { Megaphone as S, Pencil as C, Plus as w, Trash2 as T, X as E } from "lucide-react";
21
- import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
22
- import { PagePurpose as ae } from "@burdenoff/fe-libs/ui";
12
+ import { useHeadshotmarketingBootstrap as re } from "../../hooks/useHeadshotmarketingBootstrap.js";
13
+ import { usePagination as ie } from "../../hooks/usePagination.js";
14
+ import { useEffect as f, useMemo as p, useState as m } from "react";
15
+ import { Globe as h, Megaphone as g, MoreHorizontal as _, Pencil as v, Plus as y, Target as b, Trash2 as x, Users as S } from "lucide-react";
16
+ import { useExclusiveMenu as C } from "@burdenoff/fe-libs/shared/hooks";
17
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
18
+ import { EmphasisPanel as ae, PagePurpose as oe } from "@burdenoff/fe-libs/ui";
23
19
  //#region src/headshotmarketing/pages/ads/AudiencesPage.tsx
24
- var A = {
20
+ var D = {
21
+ custom: "bg-status-info-bg text-status-info-text",
22
+ lookalike: "bg-[var(--color-accent-soft)] text-action-primary-bg",
23
+ saved: "bg-status-success-bg text-status-success-text",
24
+ retargeting: "bg-status-warning-bg text-status-warning-text"
25
+ }, O = {
25
26
  google_ads: "Google Ads",
26
27
  facebook: "Facebook",
27
28
  instagram: "Instagram",
28
29
  linkedin: "LinkedIn",
29
- twitter: "Twitter",
30
- tiktok: "TikTok"
31
- }, j = [
32
- "var(--color-chart-1)",
33
- "var(--color-chart-2)",
34
- "var(--color-chart-3)",
35
- "var(--color-chart-4)",
36
- "var(--color-chart-5)",
37
- "var(--color-chart-6)"
38
- ], M = [
30
+ twitter: "Twitter"
31
+ }, k = [
39
32
  "all",
40
33
  "male",
41
34
  "female"
42
- ], N = {
35
+ ], A = {
43
36
  name: "",
44
37
  description: "",
45
38
  estimatedSize: "",
@@ -51,7 +44,7 @@ var A = {
51
44
  interests: "",
52
45
  platform: "google_ads"
53
46
  };
54
- function P(e) {
47
+ function j(e) {
55
48
  let t = (e) => e.split(",").map((e) => e.trim()).filter(Boolean);
56
49
  return {
57
50
  ageMin: Number(e.ageMin) || 18,
@@ -62,59 +55,55 @@ function P(e) {
62
55
  platform: e.platform
63
56
  };
64
57
  }
65
- var F = () => {
66
- let { navigate: a, basePath: o } = i(), { refetch: s } = ne(), [c, l] = x(""), [u, d] = x(""), [f, _] = x(null), [v, y] = x(null), [S, C] = x(!1), [T, E] = x(N), [A, j] = x(null), [M, F] = x(null), [L, R] = x(null), z = re({ initialPageSize: 9 }), { limit: ce, offset: le, setPage: B, setTotal: V } = z;
67
- b(() => {
68
- let e = setTimeout(() => d(c), 300);
58
+ var M = () => {
59
+ let { navigate: a, basePath: u } = i(), { data: h, refetch: g } = re(), [_, v] = m(""), [b, x] = m(""), [S, C] = m(null), [D, O] = m(!1), [k, M] = m(A), [P, F] = m(null), [I, L] = m(null), [R, z] = m(null), B = ie({ initialPageSize: 9 }), { limit: ce, offset: le, setPage: V, setTotal: H } = B;
60
+ f(() => {
61
+ let e = setTimeout(() => x(_), 300);
69
62
  return () => clearTimeout(e);
70
- }, [c]), b(() => {
71
- B(1);
72
- }, [u, B]);
73
- let { data: H, loading: U, error: ue, refetch: W } = n({
63
+ }, [_]), f(() => {
64
+ V(1);
65
+ }, [b, V]);
66
+ let { data: U, loading: W, error: ue, refetch: G } = n({
74
67
  variables: {
75
68
  limit: ce,
76
69
  offset: le,
77
- search: u || null
70
+ search: b || null
78
71
  },
79
72
  errorPolicy: "all",
80
73
  notifyOnNetworkStatusChange: !0
81
- }), G = H?.headshotmarketingAudiences.total ?? 0;
82
- b(() => {
83
- V(G);
84
- }, [G, V]);
85
- let K = ie(() => (H?.headshotmarketingAudiences.items ?? []).map((e) => p(e)), [H?.headshotmarketingAudiences.items]), q = K.find((e) => e.id === f) ?? null, [de, { loading: J }] = e(), [Y, { loading: X }] = r(), [fe, { loading: Z }] = t(), Q = async () => {
86
- await Promise.all([W(), s()]);
74
+ }), K = U?.headshotmarketingAudiences.total ?? 0;
75
+ f(() => {
76
+ H(K);
77
+ }, [K, H]);
78
+ let q = p(() => (U?.headshotmarketingAudiences.items ?? []).map((e) => c(e)), [U?.headshotmarketingAudiences.items]), J = p(() => {
79
+ let e = (h?.headshotmarketingAudiences.items ?? []).map((e) => c(e)), t = e.filter((e) => e.status === "active").length, n = e.reduce((e, t) => e + t.size, 0), r = e.filter((e) => e.matchRate > 0), i = r.length > 0 ? r.reduce((e, t) => e + t.matchRate, 0) / r.length : 0;
80
+ return {
81
+ total: e.length,
82
+ active: t,
83
+ totalReach: n,
84
+ avgMatch: i
85
+ };
86
+ }, [h?.headshotmarketingAudiences.items]), [de, { loading: Y }] = e(), [X, { loading: Z }] = r(), [fe, { loading: Q }] = t(), $ = async () => {
87
+ await Promise.all([G(), g()]);
87
88
  }, pe = async () => {
88
- if (!T.name.trim()) {
89
- R("Audience name is required.");
89
+ if (!k.name.trim()) {
90
+ z("Audience name is required.");
90
91
  return;
91
92
  }
92
- R(null);
93
+ z(null);
93
94
  try {
94
95
  await de({ variables: { input: {
95
- name: T.name.trim(),
96
- description: T.description || null,
97
- estimatedSize: T.estimatedSize ? Number(T.estimatedSize) : null,
98
- isActive: T.isActive,
99
- targetingCriteria: P(T)
100
- } } }), C(!1), E(N), await Q();
101
- } catch (e) {
102
- R(e instanceof Error ? e.message : "Failed to create audience.");
103
- }
104
- }, $ = async (e) => {
105
- R(null), y(e.id);
106
- try {
107
- await Y({ variables: {
108
- id: e.id,
109
- input: { isActive: e.status !== "active" }
110
- } }), await Q();
96
+ name: k.name.trim(),
97
+ description: k.description || null,
98
+ estimatedSize: k.estimatedSize ? Number(k.estimatedSize) : null,
99
+ isActive: k.isActive,
100
+ targetingCriteria: j(k)
101
+ } } }), O(!1), M(A), await $();
111
102
  } catch (e) {
112
- R(e instanceof Error ? e.message : "Failed to update audience.");
113
- } finally {
114
- y(null);
103
+ z(e instanceof Error ? e.message : "Failed to create audience.");
115
104
  }
116
105
  }, me = (e) => {
117
- R(null), j({
106
+ C(null), z(null), F({
118
107
  id: e.id,
119
108
  form: {
120
109
  name: e.name,
@@ -130,188 +119,216 @@ var F = () => {
130
119
  }
131
120
  });
132
121
  }, he = async () => {
133
- if (A) {
134
- if (!A.form.name.trim()) {
135
- R("Audience name is required.");
122
+ if (P) {
123
+ if (!P.form.name.trim()) {
124
+ z("Audience name is required.");
136
125
  return;
137
126
  }
138
- R(null);
127
+ z(null);
139
128
  try {
140
- await Y({ variables: {
141
- id: A.id,
129
+ await X({ variables: {
130
+ id: P.id,
142
131
  input: {
143
- name: A.form.name.trim(),
144
- description: A.form.description || null,
145
- estimatedSize: A.form.estimatedSize ? Number(A.form.estimatedSize) : null,
146
- isActive: A.form.isActive,
147
- targetingCriteria: P(A.form)
132
+ name: P.form.name.trim(),
133
+ description: P.form.description || null,
134
+ estimatedSize: P.form.estimatedSize ? Number(P.form.estimatedSize) : null,
135
+ isActive: P.form.isActive,
136
+ targetingCriteria: j(P.form)
148
137
  }
149
- } }), j(null), await Q();
138
+ } }), F(null), await $();
150
139
  } catch (e) {
151
- R(e instanceof Error ? e.message : "Failed to save audience.");
140
+ z(e instanceof Error ? e.message : "Failed to save audience.");
152
141
  }
153
142
  }
154
143
  }, ge = async () => {
155
- if (M) {
156
- R(null);
144
+ if (I) {
145
+ z(null);
157
146
  try {
158
- await fe({ variables: { id: M.id } }), f === M.id && _(null), F(null), await Q();
147
+ await fe({ variables: { id: I.id } }), L(null), await $();
159
148
  } catch (e) {
160
- R(e instanceof Error ? e.message : "Failed to delete audience.");
149
+ z(e instanceof Error ? e.message : "Failed to delete audience.");
161
150
  }
162
151
  }
163
152
  }, _e = (e) => {
164
- a(`${o}/ads/campaigns/new?${new URLSearchParams({
153
+ C(null), a(`${u}/ads/campaigns/new?${new URLSearchParams({
165
154
  audienceId: e.id,
166
155
  audienceName: e.name
167
156
  }).toString()}`);
168
157
  };
169
- return /* @__PURE__ */ k(m, {
158
+ return /* @__PURE__ */ E(l, {
170
159
  title: "Audiences",
171
160
  description: "Create and manage your target audiences",
172
- actions: /* @__PURE__ */ k("button", {
161
+ actions: /* @__PURE__ */ E("button", {
173
162
  onClick: () => {
174
- R(null), E(N), C(!0);
163
+ z(null), M(A), O(!0);
175
164
  },
176
165
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
177
- children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "New Audience"]
166
+ children: [/* @__PURE__ */ T(y, { className: "h-4 w-4" }), "Create Audience"]
178
167
  }),
179
168
  children: [
180
- /* @__PURE__ */ O(ae, { children: "Define and reuse the groups of people your ads should reach — custom lists, lookalikes and retargeting audiences. Save an audience once, then target it across any campaign and track how well it matches." }),
181
- /* @__PURE__ */ O("div", {
169
+ /* @__PURE__ */ T(oe, { children: "Define and reuse the groups of people your ads should reach — custom lists, lookalikes and retargeting audiences. Save an audience once, then target it across any campaign and track how well it matches." }),
170
+ /* @__PURE__ */ T(ae, { children: /* @__PURE__ */ E("div", {
171
+ className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
172
+ children: [
173
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
174
+ className: "text-xs text-text-secondary",
175
+ children: "Audiences"
176
+ }), /* @__PURE__ */ T("p", {
177
+ className: "text-2xl font-semibold text-text-primary",
178
+ children: o(J.total)
179
+ })] }),
180
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
181
+ className: "text-xs text-text-secondary",
182
+ children: "Active"
183
+ }), /* @__PURE__ */ T("p", {
184
+ className: "text-2xl font-semibold text-text-primary",
185
+ children: o(J.active)
186
+ })] }),
187
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
188
+ className: "text-xs text-text-secondary",
189
+ children: "Total Reach"
190
+ }), /* @__PURE__ */ T("p", {
191
+ className: "text-2xl font-semibold text-text-primary",
192
+ children: o(J.totalReach)
193
+ })] }),
194
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
195
+ className: "text-xs text-text-secondary",
196
+ children: "Avg Match Rate"
197
+ }), /* @__PURE__ */ T("p", {
198
+ className: "text-2xl font-semibold text-text-primary",
199
+ children: s(J.avgMatch, 0)
200
+ })] })
201
+ ]
202
+ }) }),
203
+ /* @__PURE__ */ T("div", {
182
204
  className: "relative max-w-md",
183
- children: /* @__PURE__ */ O("input", {
205
+ children: /* @__PURE__ */ T("input", {
184
206
  type: "text",
185
- value: c,
186
- onChange: (e) => l(e.target.value),
207
+ value: _,
208
+ onChange: (e) => v(e.target.value),
187
209
  placeholder: "Search audiences...",
188
210
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
189
211
  })
190
212
  }),
191
- L && !S && !A && /* @__PURE__ */ O("div", {
213
+ R && !D && !P && /* @__PURE__ */ T("div", {
192
214
  role: "alert",
193
215
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
194
- children: L
216
+ children: R
195
217
  }),
196
- /* @__PURE__ */ O(ee, {
197
- loading: U,
218
+ /* @__PURE__ */ T(te, {
219
+ loading: W,
198
220
  error: ue,
199
- onRetry: W,
200
- hasData: !!H,
201
- children: K.length === 0 ? /* @__PURE__ */ O(h, {
202
- illustration: G === 0 ? "empty-people" : "empty-search",
203
- title: G === 0 ? "No audiences yet" : "No audiences match your search",
204
- description: G === 0 ? "Create your first audience to target the right people in your campaigns." : "Try a different search term.",
205
- action: G === 0 ? /* @__PURE__ */ k("button", {
221
+ onRetry: G,
222
+ hasData: !!U,
223
+ children: q.length === 0 ? /* @__PURE__ */ T(ee, {
224
+ illustration: K === 0 ? "empty-people" : "empty-search",
225
+ title: K === 0 ? "No audiences yet" : "No audiences match your search",
226
+ description: K === 0 ? "Create your first audience to target the right people in your campaigns." : "Try a different search term.",
227
+ action: K === 0 ? /* @__PURE__ */ E("button", {
206
228
  onClick: () => {
207
- R(null), E(N), C(!0);
229
+ z(null), M(A), O(!0);
208
230
  },
209
231
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
210
- children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "Create Audience"]
232
+ children: [/* @__PURE__ */ T(y, { className: "h-4 w-4" }), "Create Audience"]
211
233
  }) : void 0
212
- }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
234
+ }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
213
235
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
214
- children: K.map((e) => /* @__PURE__ */ O(oe, {
236
+ children: q.map((e) => /* @__PURE__ */ T(se, {
215
237
  audience: e,
216
- selected: f === e.id,
217
- toggling: v === e.id,
218
- onOpen: () => _(e.id),
219
- onToggleActive: () => $(e)
238
+ menuOpen: S === e.id,
239
+ onToggleMenu: () => C(S === e.id ? null : e.id),
240
+ onCloseMenu: () => C(null),
241
+ onEdit: () => me(e),
242
+ onDelete: () => {
243
+ C(null), L(e);
244
+ },
245
+ onUseInCampaign: () => _e(e)
220
246
  }, e.id))
221
- }), /* @__PURE__ */ O(te, {
222
- page: z.page,
223
- pageSize: z.pageSize,
224
- total: z.total,
225
- onPageChange: z.setPage,
226
- onPageSizeChange: z.setPageSize,
247
+ }), /* @__PURE__ */ T(ne, {
248
+ page: B.page,
249
+ pageSize: B.pageSize,
250
+ total: B.total,
251
+ onPageChange: B.setPage,
252
+ onPageSizeChange: B.setPageSize,
227
253
  pageSizeOptions: [
228
254
  9,
229
255
  18,
230
256
  36
231
257
  ],
232
- disabled: U,
258
+ disabled: W,
233
259
  hideWhenSinglePage: !0
234
260
  })] })
235
261
  }),
236
- q && /* @__PURE__ */ O(se, {
237
- audience: q,
238
- toggling: v === q.id,
239
- onClose: () => _(null),
240
- onToggleActive: () => $(q),
241
- onEdit: () => me(q),
242
- onUseInCampaign: () => _e(q),
243
- onDelete: () => F(q)
244
- }),
245
- /* @__PURE__ */ O(g, {
246
- open: S,
247
- onClose: () => C(!1),
262
+ /* @__PURE__ */ T(d, {
263
+ open: D,
264
+ onClose: () => O(!1),
248
265
  title: "Create Audience",
249
266
  description: "Define who your ads should reach",
250
267
  size: "lg",
251
- footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
252
- onClick: () => C(!1),
268
+ footer: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
269
+ onClick: () => O(!1),
253
270
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
254
271
  children: "Cancel"
255
- }), /* @__PURE__ */ O("button", {
272
+ }), /* @__PURE__ */ T("button", {
256
273
  onClick: pe,
257
- disabled: J,
274
+ disabled: Y,
258
275
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
259
- children: J ? "Creating..." : "Create Audience"
276
+ children: Y ? "Creating..." : "Create Audience"
260
277
  })] }),
261
- children: /* @__PURE__ */ O(I, {
262
- form: T,
263
- onChange: E,
264
- error: L
278
+ children: /* @__PURE__ */ T(N, {
279
+ form: k,
280
+ onChange: M,
281
+ error: R
265
282
  })
266
283
  }),
267
- /* @__PURE__ */ O(g, {
268
- open: A !== null,
269
- onClose: () => j(null),
284
+ /* @__PURE__ */ T(d, {
285
+ open: P !== null,
286
+ onClose: () => F(null),
270
287
  title: "Edit Audience",
271
288
  description: "Update audience targeting",
272
289
  size: "lg",
273
- footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
274
- onClick: () => j(null),
290
+ footer: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
291
+ onClick: () => F(null),
275
292
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
276
293
  children: "Cancel"
277
- }), /* @__PURE__ */ O("button", {
294
+ }), /* @__PURE__ */ T("button", {
278
295
  onClick: he,
279
- disabled: X,
296
+ disabled: Z,
280
297
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
281
- children: X ? "Saving..." : "Save Changes"
298
+ children: Z ? "Saving..." : "Save Changes"
282
299
  })] }),
283
- children: A && /* @__PURE__ */ O(I, {
284
- form: A.form,
285
- onChange: (e) => j({
286
- ...A,
300
+ children: P && /* @__PURE__ */ T(N, {
301
+ form: P.form,
302
+ onChange: (e) => F({
303
+ ...P,
287
304
  form: e
288
305
  }),
289
- error: L
306
+ error: R
290
307
  })
291
308
  }),
292
- /* @__PURE__ */ O(g, {
293
- open: M !== null,
294
- onClose: () => F(null),
309
+ /* @__PURE__ */ T(d, {
310
+ open: I !== null,
311
+ onClose: () => L(null),
295
312
  title: "Delete Audience",
296
313
  size: "sm",
297
- footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
298
- onClick: () => F(null),
314
+ footer: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
315
+ onClick: () => L(null),
299
316
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
300
317
  children: "Cancel"
301
- }), /* @__PURE__ */ O("button", {
318
+ }), /* @__PURE__ */ T("button", {
302
319
  onClick: ge,
303
- disabled: Z,
320
+ disabled: Q,
304
321
  className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
305
- children: Z ? "Deleting..." : "Delete"
322
+ children: Q ? "Deleting..." : "Delete"
306
323
  })] }),
307
- children: /* @__PURE__ */ k("p", {
324
+ children: /* @__PURE__ */ E("p", {
308
325
  className: "text-sm text-text-secondary",
309
326
  children: [
310
327
  "Are you sure you want to delete",
311
328
  " ",
312
- /* @__PURE__ */ O("span", {
329
+ /* @__PURE__ */ T("span", {
313
330
  className: "font-semibold text-text-primary",
314
- children: M?.name
331
+ children: I?.name
315
332
  }),
316
333
  "? This action cannot be undone."
317
334
  ]
@@ -319,7 +336,7 @@ var F = () => {
319
336
  })
320
337
  ]
321
338
  });
322
- }, I = ({ form: e, onChange: t, error: n }) => {
339
+ }, N = ({ form: e, onChange: t, error: n }) => {
323
340
  let r = (n) => {
324
341
  let r = e.genders.includes(n) ? e.genders.filter((e) => e !== n) : [...e.genders, n];
325
342
  t({
@@ -327,13 +344,13 @@ var F = () => {
327
344
  genders: r
328
345
  });
329
346
  };
330
- return /* @__PURE__ */ k("div", {
347
+ return /* @__PURE__ */ E("div", {
331
348
  className: "space-y-4",
332
349
  children: [
333
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
350
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
334
351
  className: "mb-1.5 block text-sm font-medium text-text-primary",
335
352
  children: "Name"
336
- }), /* @__PURE__ */ O("input", {
353
+ }), /* @__PURE__ */ T("input", {
337
354
  type: "text",
338
355
  value: e.name,
339
356
  onChange: (n) => t({
@@ -343,10 +360,10 @@ var F = () => {
343
360
  placeholder: "e.g., Returning Visitors — US",
344
361
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
345
362
  })] }),
346
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
363
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
347
364
  className: "mb-1.5 block text-sm font-medium text-text-primary",
348
365
  children: "Description"
349
- }), /* @__PURE__ */ O("textarea", {
366
+ }), /* @__PURE__ */ T("textarea", {
350
367
  value: e.description,
351
368
  onChange: (n) => t({
352
369
  ...e,
@@ -355,13 +372,13 @@ var F = () => {
355
372
  rows: 2,
356
373
  className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
357
374
  })] }),
358
- /* @__PURE__ */ k("div", {
375
+ /* @__PURE__ */ E("div", {
359
376
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
360
377
  children: [
361
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
378
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
362
379
  className: "mb-1.5 block text-sm font-medium text-text-primary",
363
380
  children: "Estimated Size"
364
- }), /* @__PURE__ */ O("input", {
381
+ }), /* @__PURE__ */ T("input", {
365
382
  type: "number",
366
383
  value: e.estimatedSize,
367
384
  onChange: (n) => t({
@@ -370,10 +387,10 @@ var F = () => {
370
387
  }),
371
388
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
372
389
  })] }),
373
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
390
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
374
391
  className: "mb-1.5 block text-sm font-medium text-text-primary",
375
392
  children: "Age Min"
376
- }), /* @__PURE__ */ O("input", {
393
+ }), /* @__PURE__ */ T("input", {
377
394
  type: "number",
378
395
  value: e.ageMin,
379
396
  onChange: (n) => t({
@@ -382,10 +399,10 @@ var F = () => {
382
399
  }),
383
400
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
384
401
  })] }),
385
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
402
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
386
403
  className: "mb-1.5 block text-sm font-medium text-text-primary",
387
404
  children: "Age Max"
388
- }), /* @__PURE__ */ O("input", {
405
+ }), /* @__PURE__ */ T("input", {
389
406
  type: "number",
390
407
  value: e.ageMax,
391
408
  onChange: (n) => t({
@@ -396,24 +413,24 @@ var F = () => {
396
413
  })] })
397
414
  ]
398
415
  }),
399
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
416
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
400
417
  className: "mb-1.5 block text-sm font-medium text-text-primary",
401
418
  children: "Gender"
402
- }), /* @__PURE__ */ O("div", {
419
+ }), /* @__PURE__ */ T("div", {
403
420
  className: "flex flex-wrap gap-2",
404
- children: M.map((t) => /* @__PURE__ */ O("button", {
421
+ children: k.map((t) => /* @__PURE__ */ T("button", {
405
422
  type: "button",
406
423
  onClick: () => r(t),
407
- className: u("rounded-full border px-4 py-1.5 text-sm capitalize transition-colors", e.genders.includes(t) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
424
+ className: a("rounded-full border px-4 py-1.5 text-sm capitalize transition-colors", e.genders.includes(t) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
408
425
  children: t
409
426
  }, t))
410
427
  })] }),
411
- /* @__PURE__ */ k("div", {
428
+ /* @__PURE__ */ E("div", {
412
429
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
413
- children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
430
+ children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
414
431
  className: "mb-1.5 block text-sm font-medium text-text-primary",
415
432
  children: "Locations"
416
- }), /* @__PURE__ */ O("input", {
433
+ }), /* @__PURE__ */ T("input", {
417
434
  type: "text",
418
435
  value: e.locations,
419
436
  onChange: (n) => t({
@@ -422,10 +439,10 @@ var F = () => {
422
439
  }),
423
440
  placeholder: "Comma-separated",
424
441
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
425
- })] }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
442
+ })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
426
443
  className: "mb-1.5 block text-sm font-medium text-text-primary",
427
444
  children: "Platform"
428
- }), /* @__PURE__ */ k("select", {
445
+ }), /* @__PURE__ */ E("select", {
429
446
  value: e.platform,
430
447
  onChange: (n) => t({
431
448
  ...e,
@@ -433,33 +450,33 @@ var F = () => {
433
450
  }),
434
451
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
435
452
  children: [
436
- /* @__PURE__ */ O("option", {
453
+ /* @__PURE__ */ T("option", {
437
454
  value: "google_ads",
438
455
  children: "Google Ads"
439
456
  }),
440
- /* @__PURE__ */ O("option", {
457
+ /* @__PURE__ */ T("option", {
441
458
  value: "facebook",
442
459
  children: "Facebook"
443
460
  }),
444
- /* @__PURE__ */ O("option", {
461
+ /* @__PURE__ */ T("option", {
445
462
  value: "instagram",
446
463
  children: "Instagram"
447
464
  }),
448
- /* @__PURE__ */ O("option", {
465
+ /* @__PURE__ */ T("option", {
449
466
  value: "linkedin",
450
467
  children: "LinkedIn"
451
468
  }),
452
- /* @__PURE__ */ O("option", {
469
+ /* @__PURE__ */ T("option", {
453
470
  value: "twitter",
454
471
  children: "Twitter"
455
472
  })
456
473
  ]
457
474
  })] })]
458
475
  }),
459
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
476
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
460
477
  className: "mb-1.5 block text-sm font-medium text-text-primary",
461
478
  children: "Interests"
462
- }), /* @__PURE__ */ O("input", {
479
+ }), /* @__PURE__ */ T("input", {
463
480
  type: "text",
464
481
  value: e.interests,
465
482
  onChange: (n) => t({
@@ -469,9 +486,9 @@ var F = () => {
469
486
  placeholder: "Comma-separated interests",
470
487
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
471
488
  })] }),
472
- /* @__PURE__ */ k("label", {
489
+ /* @__PURE__ */ E("label", {
473
490
  className: "flex items-center gap-2 text-sm text-text-primary",
474
- children: [/* @__PURE__ */ O("input", {
491
+ children: [/* @__PURE__ */ T("input", {
475
492
  type: "checkbox",
476
493
  checked: e.isActive,
477
494
  onChange: (n) => t({
@@ -481,271 +498,145 @@ var F = () => {
481
498
  className: "h-4 w-4 rounded border-border-subtle"
482
499
  }), "Active"]
483
500
  }),
484
- n && /* @__PURE__ */ O("p", {
501
+ n && /* @__PURE__ */ T("p", {
485
502
  className: "text-sm text-status-error-text",
486
503
  children: n
487
504
  })
488
505
  ]
489
506
  });
490
- }, L = ({ audience: e, disabled: t, onToggle: n }) => {
491
- let r = e.status === "active";
492
- return /* @__PURE__ */ O("button", {
493
- type: "button",
494
- role: "switch",
495
- "aria-checked": r,
496
- "aria-label": `${e.name} active`,
497
- disabled: t,
498
- onClick: (e) => {
499
- e.stopPropagation(), n();
500
- },
501
- className: u("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60", r ? "border-action-primary-bg bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
502
- children: /* @__PURE__ */ O("span", {
503
- "aria-hidden": "true",
504
- className: u("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", r ? "translate-x-6" : "translate-x-1")
505
- })
506
- });
507
- }, oe = ({ audience: e, selected: t, toggling: n, onOpen: r, onToggleActive: i }) => {
508
- let a = v(e), o = y(e.usedInCampaignCount);
509
- return /* @__PURE__ */ k("div", {
510
- role: "button",
511
- tabIndex: 0,
512
- "aria-label": `Open ${e.name} details`,
513
- onClick: r,
514
- onKeyDown: (e) => {
515
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
516
- },
517
- className: u("cursor-pointer space-y-3 rounded-lg border bg-gloss-card p-5 shadow-pop transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", t ? "border-action-primary-bg" : "border-border-seam hover:border-foreground/30"),
518
- children: [
519
- /* @__PURE__ */ k("div", {
520
- className: "flex items-start justify-between gap-3",
521
- children: [/* @__PURE__ */ k("div", {
522
- className: "min-w-0",
523
- children: [/* @__PURE__ */ O("h3", {
524
- className: "truncate text-sm font-semibold text-text-primary",
525
- children: e.name
526
- }), /* @__PURE__ */ O("p", {
527
- className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
528
- children: d(e.size)
529
- })]
530
- }), /* @__PURE__ */ k("div", {
531
- className: "flex flex-col items-end gap-1",
532
- children: [/* @__PURE__ */ O(L, {
533
- audience: e,
534
- disabled: n,
535
- onToggle: i
536
- }), /* @__PURE__ */ O("span", {
537
- className: "text-xs text-text-secondary",
538
- children: e.status === "active" ? "Active" : "Inactive"
539
- })]
507
+ }, se = ({ audience: e, menuOpen: t, onToggleMenu: n, onCloseMenu: r, onEdit: i, onDelete: c, onUseInCampaign: l }) => (C(`audience-${e.id}`, t, r), /* @__PURE__ */ E("div", {
508
+ className: "space-y-4 rounded-lg border border-border-seam bg-gloss-card shadow-pop p-5 transition-colors hover:border-foreground/30",
509
+ children: [
510
+ /* @__PURE__ */ E("div", {
511
+ className: "flex items-start justify-between gap-2",
512
+ children: [/* @__PURE__ */ E("div", {
513
+ className: "min-w-0",
514
+ children: [/* @__PURE__ */ T("h3", {
515
+ className: "text-sm font-semibold text-text-primary",
516
+ children: e.name
517
+ }), /* @__PURE__ */ T("p", {
518
+ className: "mt-0.5 text-xs text-text-secondary",
519
+ children: e.description
540
520
  })]
541
- }),
542
- /* @__PURE__ */ k("div", {
543
- className: "flex flex-wrap gap-1.5 border-t border-border-subtle pt-3",
544
- children: [a.slice(0, 4).map((e) => /* @__PURE__ */ O("span", {
545
- className: "rounded-full border border-border-subtle px-2 py-0.5 text-xs text-text-secondary",
546
- children: e
547
- }, e)), a.length > 4 && /* @__PURE__ */ k("span", {
548
- className: "px-1 py-0.5 text-xs text-text-secondary",
521
+ }), /* @__PURE__ */ E("div", {
522
+ className: "relative shrink-0",
523
+ children: [/* @__PURE__ */ T("button", {
524
+ onClick: n,
525
+ "aria-haspopup": "menu",
526
+ "aria-expanded": t,
527
+ "aria-label": "Audience actions",
528
+ className: "text-text-secondary hover:text-text-primary",
529
+ children: /* @__PURE__ */ T(_, { className: "h-4 w-4" })
530
+ }), t && /* @__PURE__ */ E("div", {
531
+ role: "menu",
532
+ className: "absolute right-0 top-6 z-20 w-44 rounded-md border border-border-seam bg-gloss-card py-1 shadow-lg",
549
533
  children: [
550
- "+",
551
- a.length - 4,
552
- " more"
534
+ /* @__PURE__ */ E("button", {
535
+ role: "menuitem",
536
+ onClick: i,
537
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
538
+ children: [/* @__PURE__ */ T(v, { className: "h-3.5 w-3.5" }), "Edit"]
539
+ }),
540
+ /* @__PURE__ */ E("button", {
541
+ role: "menuitem",
542
+ onClick: l,
543
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
544
+ children: [/* @__PURE__ */ T(g, { className: "h-3.5 w-3.5" }), "Use in Campaign"]
545
+ }),
546
+ /* @__PURE__ */ E("button", {
547
+ role: "menuitem",
548
+ onClick: c,
549
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-status-error-text hover:bg-bg-sunken",
550
+ children: [/* @__PURE__ */ T(x, { className: "h-3.5 w-3.5" }), "Delete"]
551
+ })
553
552
  ]
554
553
  })]
555
- }),
556
- o !== null && /* @__PURE__ */ O("p", {
557
- className: "border-t border-border-subtle pt-3 text-xs text-text-secondary",
558
- children: o
559
- })
560
- ]
561
- });
562
- }, se = ({ audience: e, toggling: t, onClose: n, onToggleActive: r, onEdit: i, onUseInCampaign: u, onDelete: p }) => {
563
- let m = _(e), h = v(e), g = y(e.usedInCampaignCount);
564
- return b(() => {
565
- let e = (e) => {
566
- e.key === "Escape" && n();
567
- };
568
- return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
569
- }, [n]), /* @__PURE__ */ k("aside", {
570
- role: "dialog",
571
- "aria-modal": "false",
572
- "aria-labelledby": "audience-drawer-title",
573
- className: "fixed inset-y-0 right-0 z-40 flex w-full flex-col overflow-y-auto border-l border-border-seam bg-bg-surface shadow-2xl sm:w-[380px]",
574
- children: [/* @__PURE__ */ k("div", {
575
- className: "flex items-start justify-between gap-3 border-b border-border-seam p-5",
576
- children: [/* @__PURE__ */ k("div", {
577
- className: "min-w-0",
578
- children: [
579
- /* @__PURE__ */ O("p", {
580
- className: "text-xs uppercase tracking-wide text-text-secondary",
581
- children: "Audience"
582
- }),
583
- /* @__PURE__ */ O("h2", {
584
- id: "audience-drawer-title",
585
- className: "truncate text-lg font-semibold text-text-primary",
586
- children: e.name
587
- }),
588
- e.description && /* @__PURE__ */ O("p", {
589
- className: "mt-1 text-sm text-text-secondary",
590
- children: e.description
591
- })
592
- ]
593
- }), /* @__PURE__ */ O("button", {
594
- type: "button",
595
- onClick: n,
596
- "aria-label": "Close audience details",
597
- className: "rounded-md p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
598
- children: /* @__PURE__ */ O(E, { className: "h-5 w-5" })
599
554
  })]
600
- }), /* @__PURE__ */ k("div", {
601
- className: "space-y-6 p-5",
555
+ }),
556
+ /* @__PURE__ */ E("div", {
557
+ className: "flex flex-wrap items-center gap-2",
602
558
  children: [
603
- /* @__PURE__ */ k("dl", {
604
- className: "grid grid-cols-2 gap-3 text-sm",
605
- children: [
606
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
607
- className: "text-xs text-text-secondary",
608
- children: "Estimated size"
609
- }), /* @__PURE__ */ O("dd", {
610
- className: "font-semibold text-text-primary",
611
- children: d(e.size)
612
- })] }),
613
- g !== null && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
614
- className: "text-xs text-text-secondary",
615
- children: "Usage"
616
- }), /* @__PURE__ */ O("dd", {
617
- className: "font-semibold text-text-primary",
618
- children: g
619
- })] }),
620
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
621
- className: "text-xs text-text-secondary",
622
- children: "Platform"
623
- }), /* @__PURE__ */ O("dd", {
624
- className: "text-text-primary",
625
- children: A[e.platform] ?? e.platform
626
- })] }),
627
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
628
- className: "text-xs text-text-secondary",
629
- children: "Match rate"
630
- }), /* @__PURE__ */ O("dd", {
631
- className: "text-text-primary",
632
- children: e.matchRate > 0 ? f(e.matchRate, 0) : "—"
633
- })] }),
634
- /* @__PURE__ */ k("div", {
635
- className: "col-span-2 flex items-center gap-3",
636
- children: [/* @__PURE__ */ O(L, {
637
- audience: e,
638
- disabled: t,
639
- onToggle: r
640
- }), /* @__PURE__ */ O("span", {
641
- className: "text-sm text-text-primary",
642
- children: e.status === "active" ? "Active" : "Inactive"
643
- })]
644
- })
645
- ]
559
+ /* @__PURE__ */ T("span", {
560
+ className: a("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", D[e.type]),
561
+ children: e.type
646
562
  }),
647
- /* @__PURE__ */ k("section", {
648
- "aria-labelledby": "audience-demographics-title",
649
- children: [
650
- /* @__PURE__ */ O("h3", {
651
- id: "audience-demographics-title",
652
- className: "text-sm font-semibold text-text-primary",
653
- children: "Demographics"
654
- }),
655
- /* @__PURE__ */ O("p", {
656
- className: "mt-0.5 text-xs text-text-secondary",
657
- children: "Targeted age span by bracket"
658
- }),
659
- m.length > 0 ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
660
- className: "h-48",
661
- children: /* @__PURE__ */ O(o, {
662
- width: "100%",
663
- height: "100%",
664
- children: /* @__PURE__ */ k(l, { children: [/* @__PURE__ */ O(c, {
665
- data: m,
666
- dataKey: "percent",
667
- nameKey: "label",
668
- innerRadius: "58%",
669
- outerRadius: "90%",
670
- paddingAngle: 2,
671
- stroke: "var(--color-card)",
672
- children: m.map((e, t) => /* @__PURE__ */ O(s, { fill: j[t % j.length] }, e.label))
673
- }), /* @__PURE__ */ O(a, {
674
- formatter: (e) => `${e.toFixed(0)}%`,
675
- contentStyle: {
676
- backgroundColor: "var(--color-card)",
677
- border: "1px solid var(--color-border)"
678
- }
679
- })] })
680
- })
681
- }), /* @__PURE__ */ O("ul", {
682
- className: "grid grid-cols-2 gap-1.5 text-xs",
683
- children: m.map((e, t) => /* @__PURE__ */ k("li", {
684
- className: "flex items-center gap-2",
685
- children: [
686
- /* @__PURE__ */ O("span", {
687
- "aria-hidden": "true",
688
- className: "h-2.5 w-2.5 rounded-full",
689
- style: { backgroundColor: j[t % j.length] }
690
- }),
691
- /* @__PURE__ */ O("span", {
692
- className: "text-text-secondary",
693
- children: e.label
694
- }),
695
- /* @__PURE__ */ k("span", {
696
- className: "ml-auto tabular-nums text-text-primary",
697
- children: [e.percent.toFixed(0), "%"]
698
- })
699
- ]
700
- }, e.label))
701
- })] }) : /* @__PURE__ */ O("p", {
702
- className: "mt-2 text-sm text-text-secondary",
703
- children: "No age targeting set."
704
- })
705
- ]
563
+ /* @__PURE__ */ T(u, { status: e.status }),
564
+ /* @__PURE__ */ T("span", {
565
+ className: "text-xs text-text-secondary",
566
+ children: O[e.platform]
567
+ })
568
+ ]
569
+ }),
570
+ /* @__PURE__ */ E("div", {
571
+ className: "flex items-center gap-2",
572
+ children: [
573
+ /* @__PURE__ */ T(S, { className: "h-4 w-4 text-text-secondary" }),
574
+ /* @__PURE__ */ T("span", {
575
+ className: "text-sm font-medium text-text-primary",
576
+ children: o(e.size)
706
577
  }),
707
- /* @__PURE__ */ k("section", {
708
- "aria-labelledby": "audience-criteria-title",
709
- children: [/* @__PURE__ */ O("h3", {
710
- id: "audience-criteria-title",
711
- className: "border-b border-border-subtle pb-2 text-sm font-semibold text-text-primary",
712
- children: "Criteria"
713
- }), /* @__PURE__ */ O("ul", {
714
- className: "mt-3 flex flex-wrap gap-2",
715
- children: h.map((e) => /* @__PURE__ */ O("li", {
716
- className: "rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs text-text-primary",
717
- children: e
718
- }, e))
719
- })]
578
+ /* @__PURE__ */ T("span", {
579
+ className: "text-xs text-text-secondary",
580
+ children: "people"
720
581
  }),
721
- /* @__PURE__ */ k("div", {
722
- className: "flex flex-wrap gap-2 border-t border-border-subtle pt-4",
723
- children: [
724
- /* @__PURE__ */ k("button", {
725
- type: "button",
726
- onClick: i,
727
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
728
- children: [/* @__PURE__ */ O(C, { className: "h-3.5 w-3.5" }), "Edit"]
729
- }),
730
- /* @__PURE__ */ k("button", {
731
- type: "button",
732
- onClick: u,
733
- className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
734
- children: [/* @__PURE__ */ O(S, { className: "h-3.5 w-3.5" }), "Use in Campaign"]
735
- }),
736
- /* @__PURE__ */ k("button", {
737
- type: "button",
738
- onClick: p,
739
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-status-error-text hover:bg-bg-sunken",
740
- children: [/* @__PURE__ */ O(T, { className: "h-3.5 w-3.5" }), "Delete"]
741
- })
742
- ]
582
+ e.matchRate > 0 && /* @__PURE__ */ E("span", {
583
+ className: "ml-auto text-xs text-text-secondary",
584
+ children: ["Match: ", s(e.matchRate, 0)]
743
585
  })
744
586
  ]
745
- })]
746
- });
747
- };
587
+ }),
588
+ /* @__PURE__ */ E("div", {
589
+ className: "space-y-2",
590
+ children: [/* @__PURE__ */ E("div", {
591
+ className: "flex items-center gap-2 text-xs text-text-secondary",
592
+ children: [
593
+ /* @__PURE__ */ T(b, { className: "h-3.5 w-3.5" }),
594
+ /* @__PURE__ */ E("span", { children: [
595
+ "Ages ",
596
+ e.demographics.ageRange.min,
597
+ "-",
598
+ e.demographics.ageRange.max
599
+ ] }),
600
+ /* @__PURE__ */ T("span", { children: "·" }),
601
+ /* @__PURE__ */ T("span", {
602
+ className: "capitalize",
603
+ children: e.demographics.genders.join(", ")
604
+ })
605
+ ]
606
+ }), /* @__PURE__ */ E("div", {
607
+ className: "flex items-center gap-2 text-xs text-text-secondary",
608
+ children: [/* @__PURE__ */ T(h, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ T("span", { children: e.demographics.locations.join(", ") })]
609
+ })]
610
+ }),
611
+ /* @__PURE__ */ E("div", {
612
+ className: "flex flex-wrap gap-1",
613
+ children: [e.interests.slice(0, 4).map((e) => /* @__PURE__ */ T("span", {
614
+ className: "rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-secondary",
615
+ children: e
616
+ }, e)), e.interests.length > 4 && /* @__PURE__ */ E("span", {
617
+ className: "text-[10px] text-text-secondary",
618
+ children: [
619
+ "+",
620
+ e.interests.length - 4,
621
+ " more"
622
+ ]
623
+ })]
624
+ }),
625
+ /* @__PURE__ */ E("div", {
626
+ className: "flex flex-wrap items-center gap-2 border-t border-border-subtle pt-2",
627
+ children: [/* @__PURE__ */ T("button", {
628
+ onClick: i,
629
+ className: "flex-1 rounded-md border border-border-subtle py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
630
+ children: "Edit"
631
+ }), /* @__PURE__ */ T("button", {
632
+ onClick: l,
633
+ className: "flex-1 rounded-md border border-border-subtle py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
634
+ children: "Use in Campaign"
635
+ })]
636
+ })
637
+ ]
638
+ }));
748
639
  //#endregion
749
- export { F as AudiencesPage };
640
+ export { M as AudiencesPage };
750
641
 
751
642
  //# sourceMappingURL=AudiencesPage.js.map