@burdenoff/microfe-headshotmarketing 2026.704.4 → 2026.704.6
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.
- package/dist/generated/wspace-operations.js +215 -111
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js +27 -19
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/Toast.js +56 -2
- package/dist/headshotmarketing/components/Toast.js.map +1 -0
- package/dist/headshotmarketing/pages/HomeFunnel.js +54 -0
- package/dist/headshotmarketing/pages/HomeFunnel.js.map +1 -0
- package/dist/headshotmarketing/pages/HomePage.js +423 -259
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/HomeStatCard.js +79 -0
- package/dist/headshotmarketing/pages/HomeStatCard.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js +93 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +147 -0
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +461 -388
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +405 -115
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +565 -345
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js +107 -0
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +213 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +150 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +380 -371
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +92 -0
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js +346 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js +358 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js +274 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js.map +1 -0
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +123 -233
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/TemplateCard.js +81 -0
- package/dist/headshotmarketing/pages/campaigns/TemplateCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +479 -193
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +492 -197
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js +37 -0
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +672 -219
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +200 -0
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentPage.js +224 -204
- package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentSubNav.js +51 -0
- package/dist/headshotmarketing/pages/content/ContentSubNav.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +107 -0
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +232 -0
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +330 -177
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js +179 -0
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js.map +1 -0
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +631 -379
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventImageUpload.js +123 -0
- package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js +99 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventsPage.js +267 -228
- package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js +50 -0
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +147 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +562 -419
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +108 -0
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +100 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +315 -250
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js +60 -0
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js.map +1 -0
- package/dist/headshotmarketing/utils/adsMapper.js +2 -2
- package/dist/headshotmarketing/utils/adsMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/automationMapper.js +1 -1
- package/dist/headshotmarketing/utils/automationMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/campaignMapper.js +1 -22
- package/dist/headshotmarketing/utils/campaignMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +4 -24
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/crmMapper.js +2 -2
- package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/eventsMapper.js +9 -9
- package/dist/headshotmarketing/utils/eventsMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/helpers.js +7 -4
- package/dist/headshotmarketing/utils/helpers.js.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
- package/dist/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_assignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseClone.js +64 -0
- package/dist/node_modules/lodash/_baseClone.js.map +1 -0
- package/dist/node_modules/lodash/_baseCreate.js +21 -0
- package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
- package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnset.js +26 -0
- package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
- package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/lodash/_copyArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copyObject.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_flatRest.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
- package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/_parent.js.map +1 -0
- package/dist/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/lodash/flatten.js.map +1 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isMap.js.map +1 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/isSet.js.map +1 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/keysIn.js.map +1 -0
- package/dist/node_modules/lodash/omit.js +28 -0
- package/dist/node_modules/lodash/omit.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js +15 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js.map +1 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js +370 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js +81 -0
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { HeadshotmarketingBootstrapDataDocument as e, useCreateHeadshotmarketingAdCampaignMutation as t } from "../../../generated/wspace-operations.js";
|
|
2
|
-
import { useHeadshotMarketing as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { HeadshotmarketingAdCampaignStatus as
|
|
5
|
-
import { PageLayout as
|
|
1
|
+
import { HeadshotmarketingBootstrapDataDocument as e, useCreateHeadshotmarketingAdCampaignMutation as t, useHeadshotmarketingAudiencesListQuery as n } from "../../../generated/wspace-operations.js";
|
|
2
|
+
import { useHeadshotMarketing as r } from "../../context/HeadshotMarketingContext.js";
|
|
3
|
+
import { cn as i, formatCurrency as a, formatNumber as o } from "../../utils/helpers.js";
|
|
4
|
+
import { HeadshotmarketingAdCampaignStatus as s } from "../../../generated/wspace-types.js";
|
|
5
|
+
import { PageLayout as ee } from "../../components/PageLayout.js";
|
|
6
6
|
import "../../components/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { AdPlatformChips as te, mapPlatformValueToEnum as ne, platformLabel as c, renderPlatformIcon as re } from "./AdPlatformChips.js";
|
|
8
|
+
import { AdReachEstimatePanel as l } from "./AdReachEstimatePanel.js";
|
|
9
|
+
import { useState as u } from "react";
|
|
10
|
+
import { ArrowLeft as d, ArrowRight as ie, CalendarDays as ae, Check as oe, Rocket as se, Save as ce, Sparkles as le, Target as ue, Users as f, Wallet as de } from "lucide-react";
|
|
11
|
+
import { useSearchParams as fe } from "react-router-dom";
|
|
12
|
+
import { Fragment as pe, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
|
+
import { EmphasisPanel as h, GlassCard as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
|
|
12
14
|
//#region src/headshotmarketing/pages/ads/CreateAdCampaignPage.tsx
|
|
13
|
-
var
|
|
15
|
+
var g = [
|
|
14
16
|
{
|
|
15
17
|
key: "info",
|
|
16
18
|
label: "Campaign Info",
|
|
@@ -31,25 +33,25 @@ var h = [
|
|
|
31
33
|
label: "Review",
|
|
32
34
|
step: 4
|
|
33
35
|
}
|
|
34
|
-
],
|
|
36
|
+
], ge = [
|
|
35
37
|
"Brand Awareness",
|
|
36
38
|
"Traffic",
|
|
37
39
|
"Engagement",
|
|
38
40
|
"Lead Generation",
|
|
39
41
|
"Conversions",
|
|
40
42
|
"App Installs"
|
|
41
|
-
],
|
|
43
|
+
], _e = [
|
|
42
44
|
"18-24",
|
|
43
45
|
"25-34",
|
|
44
46
|
"35-44",
|
|
45
47
|
"45-54",
|
|
46
48
|
"55-64",
|
|
47
49
|
"65+"
|
|
48
|
-
],
|
|
50
|
+
], ve = [
|
|
49
51
|
"All",
|
|
50
52
|
"Male",
|
|
51
53
|
"Female"
|
|
52
|
-
],
|
|
54
|
+
], ye = [
|
|
53
55
|
"Photography",
|
|
54
56
|
"Business",
|
|
55
57
|
"Personal Branding",
|
|
@@ -58,443 +60,514 @@ var h = [
|
|
|
58
60
|
"Technology",
|
|
59
61
|
"Marketing",
|
|
60
62
|
"Entrepreneurship"
|
|
61
|
-
],
|
|
62
|
-
let { navigate:
|
|
63
|
-
|
|
63
|
+
], _ = () => {
|
|
64
|
+
let { navigate: _, basePath: b } = r(), [x] = fe(), be = x.get("audienceId"), S = x.get("audienceName"), [xe, { loading: C, error: Se }] = t(), [Ce, w] = u(null), [T, E] = u("info"), [D, O] = u(null), { data: we, loading: k } = n({
|
|
65
|
+
variables: {
|
|
66
|
+
limit: 200,
|
|
67
|
+
offset: 0,
|
|
68
|
+
search: null
|
|
69
|
+
},
|
|
70
|
+
errorPolicy: "all"
|
|
71
|
+
}), A = we?.headshotmarketingAudiences.items ?? [], [j, Te] = u(""), [M, Ee] = u("google_ads"), [N, De] = u(""), [P, F] = u(""), [I, Oe] = u(be ?? ""), [L, ke] = u(new Set(["25-34", "35-44"])), [R, Ae] = u("All"), [z, je] = u("United States"), [B, Me] = u(new Set(["Photography", "Business"])), [V, H] = u("total"), [U, Ne] = u("5000"), [W, Pe] = u(""), [G, Fe] = u(""), [K, Ie] = u("Maximize Conversions"), q = A.find((e) => e.id === I) ?? (I && S ? {
|
|
72
|
+
id: I,
|
|
73
|
+
name: S,
|
|
74
|
+
estimatedSize: null
|
|
75
|
+
} : null), Le = (e) => {
|
|
76
|
+
ke((t) => {
|
|
64
77
|
let n = new Set(t);
|
|
65
78
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
66
79
|
});
|
|
67
|
-
},
|
|
68
|
-
|
|
80
|
+
}, Re = (e) => {
|
|
81
|
+
Me((t) => {
|
|
69
82
|
let n = new Set(t);
|
|
70
83
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
71
84
|
});
|
|
72
|
-
},
|
|
73
|
-
let e =
|
|
74
|
-
e <
|
|
75
|
-
},
|
|
76
|
-
let e =
|
|
77
|
-
e >= 0 &&
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
case "instagram": return a.InstagramAds;
|
|
82
|
-
case "linkedin": return a.LinkedinAds;
|
|
83
|
-
case "twitter": return a.TwitterAds;
|
|
84
|
-
default: return a.GoogleAds;
|
|
85
|
-
}
|
|
86
|
-
}, fe = async () => {
|
|
87
|
-
if (!A.trim()) {
|
|
88
|
-
D("Campaign name is required.");
|
|
85
|
+
}, J = g.findIndex((e) => e.key === T), ze = () => {
|
|
86
|
+
let e = J + 1;
|
|
87
|
+
e < g.length && E(g[e].key);
|
|
88
|
+
}, Be = () => {
|
|
89
|
+
let e = J - 1;
|
|
90
|
+
e >= 0 && E(g[e].key);
|
|
91
|
+
}, Y = Number(U), X = W && G ? Math.max(1, Math.round((new Date(G).getTime() - new Date(W).getTime()) / 864e5) + 1) : null, Z = V === "daily" ? Y : Y / (X ?? 30), Q = async (t) => {
|
|
92
|
+
if (!j.trim()) {
|
|
93
|
+
w("Campaign name is required.");
|
|
89
94
|
return;
|
|
90
95
|
}
|
|
91
|
-
let
|
|
92
|
-
if (!Number.isFinite(
|
|
93
|
-
|
|
96
|
+
let n = Number(U);
|
|
97
|
+
if (!Number.isFinite(n) || n <= 0) {
|
|
98
|
+
w("Budget must be a valid number greater than zero.");
|
|
94
99
|
return;
|
|
95
100
|
}
|
|
96
|
-
if (!
|
|
97
|
-
|
|
101
|
+
if (!W || !G) {
|
|
102
|
+
w("Start and end dates are required.");
|
|
98
103
|
return;
|
|
99
104
|
}
|
|
100
|
-
let
|
|
101
|
-
if (Number.isFinite(
|
|
102
|
-
|
|
105
|
+
let r = new Date(W).getTime(), i = new Date(G).getTime();
|
|
106
|
+
if (Number.isFinite(r) && Number.isFinite(i) && i < r) {
|
|
107
|
+
w("End date must be after start date.");
|
|
103
108
|
return;
|
|
104
109
|
}
|
|
105
|
-
|
|
106
|
-
let a = {
|
|
107
|
-
name:
|
|
108
|
-
description:
|
|
109
|
-
platform:
|
|
110
|
-
status:
|
|
111
|
-
audienceId:
|
|
112
|
-
bidStrategy:
|
|
113
|
-
startDate: new Date(
|
|
114
|
-
endDate: new Date(
|
|
115
|
-
dailyBudget:
|
|
116
|
-
totalBudget:
|
|
110
|
+
w(null), O(t);
|
|
111
|
+
let a = t === "launch" ? s.PendingReview : s.Draft, o = {
|
|
112
|
+
name: j,
|
|
113
|
+
description: P || null,
|
|
114
|
+
platform: ne(M),
|
|
115
|
+
status: a,
|
|
116
|
+
audienceId: I || null,
|
|
117
|
+
bidStrategy: K,
|
|
118
|
+
startDate: new Date(W).toISOString(),
|
|
119
|
+
endDate: new Date(G).toISOString(),
|
|
120
|
+
dailyBudget: V === "daily" ? n : null,
|
|
121
|
+
totalBudget: V === "total" ? n : null,
|
|
117
122
|
metadata: {
|
|
118
123
|
objective: N,
|
|
119
124
|
targeting: {
|
|
120
125
|
ages: Array.from(L),
|
|
121
|
-
gender:
|
|
122
|
-
locations:
|
|
123
|
-
interests: Array.from(
|
|
126
|
+
gender: R,
|
|
127
|
+
locations: z.split(",").map((e) => e.trim()).filter(Boolean),
|
|
128
|
+
interests: Array.from(B)
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
131
|
};
|
|
127
132
|
try {
|
|
128
|
-
await
|
|
129
|
-
variables: { input:
|
|
133
|
+
await xe({
|
|
134
|
+
variables: { input: o },
|
|
130
135
|
refetchQueries: [{
|
|
131
136
|
query: e,
|
|
132
137
|
variables: { limit: 200 }
|
|
133
138
|
}],
|
|
134
139
|
awaitRefetchQueries: !0
|
|
135
|
-
}), b
|
|
140
|
+
}), _(b + "/ads/campaigns");
|
|
136
141
|
} catch (e) {
|
|
137
|
-
|
|
142
|
+
w(e instanceof Error ? e.message : "Failed to create ad campaign.");
|
|
143
|
+
} finally {
|
|
144
|
+
O(null);
|
|
138
145
|
}
|
|
139
|
-
}, $ =
|
|
140
|
-
return /* @__PURE__ */
|
|
146
|
+
}, $ = Ce ?? Se?.message ?? null;
|
|
147
|
+
return /* @__PURE__ */ m(ee, {
|
|
141
148
|
title: "Create Ad Campaign",
|
|
142
149
|
description: "Set up a new advertising campaign",
|
|
143
|
-
actions: /* @__PURE__ */
|
|
144
|
-
onClick: () => b
|
|
145
|
-
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
150
|
+
actions: /* @__PURE__ */ m("button", {
|
|
151
|
+
onClick: () => _(b + "/ads/campaigns"),
|
|
152
|
+
className: "inline-flex min-h-11 items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
153
|
+
children: [/* @__PURE__ */ p(d, { className: "h-4 w-4" }), "Back"]
|
|
147
154
|
}),
|
|
148
155
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
156
|
+
/* @__PURE__ */ p(he, { children: "Launch a paid campaign in four guided steps — name it and pick a platform and objective, choose who to target, set your budget and schedule, then review everything before it goes live." }),
|
|
157
|
+
q && /* @__PURE__ */ m("div", {
|
|
151
158
|
className: "flex items-center gap-2 rounded-lg border border-status-info-border/30 bg-status-info-bg/20 px-4 py-3 text-sm text-status-info-text",
|
|
152
|
-
children: [/* @__PURE__ */ f
|
|
159
|
+
children: [/* @__PURE__ */ p(f, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ m("span", { children: [
|
|
153
160
|
"This campaign will target the",
|
|
154
161
|
" ",
|
|
155
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ p("span", {
|
|
156
163
|
className: "font-semibold",
|
|
157
|
-
children:
|
|
164
|
+
children: q.name
|
|
158
165
|
}),
|
|
159
166
|
" ",
|
|
160
167
|
"audience."
|
|
161
168
|
] })]
|
|
162
169
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
className: "flex items-center gap-
|
|
165
|
-
children:
|
|
166
|
-
className: "flex items-center",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
168
|
-
onClick: () =>
|
|
169
|
-
className:
|
|
170
|
-
children: [t <
|
|
170
|
+
/* @__PURE__ */ p("div", {
|
|
171
|
+
className: "flex items-center gap-1 overflow-x-auto pb-1",
|
|
172
|
+
children: g.map((e, t) => /* @__PURE__ */ m("div", {
|
|
173
|
+
className: "flex shrink-0 items-center",
|
|
174
|
+
children: [/* @__PURE__ */ m("button", {
|
|
175
|
+
onClick: () => E(e.key),
|
|
176
|
+
className: i("flex min-h-9 items-center gap-2 rounded-full px-4 py-2 text-sm font-medium transition-colors", T === e.key ? "bg-foreground text-background" : t < J ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-surface"),
|
|
177
|
+
children: [t < J ? /* @__PURE__ */ p(oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ p("span", {
|
|
178
|
+
className: i("flex h-5 w-5 items-center justify-center rounded-full text-xs", T === e.key ? "bg-background/20" : "bg-bg-surface"),
|
|
179
|
+
children: e.step
|
|
180
|
+
}), /* @__PURE__ */ p("span", {
|
|
171
181
|
className: "hidden sm:inline",
|
|
172
182
|
children: e.label
|
|
173
183
|
})]
|
|
174
|
-
}), t <
|
|
184
|
+
}), t < g.length - 1 && /* @__PURE__ */ p("div", { className: i("mx-1.5 h-0.5 w-6 rounded-full sm:w-10", t < J ? "bg-action-primary-bg" : "bg-border") })]
|
|
175
185
|
}, e.key))
|
|
176
186
|
}),
|
|
177
|
-
|
|
178
|
-
className: "
|
|
179
|
-
children: [
|
|
180
|
-
|
|
181
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
182
|
-
children: "Campaign Name"
|
|
183
|
-
}), /* @__PURE__ */ f("input", {
|
|
184
|
-
type: "text",
|
|
185
|
-
value: A,
|
|
186
|
-
onChange: (e) => re(e.target.value),
|
|
187
|
-
placeholder: "e.g., Spring Headshot Promo",
|
|
188
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
189
|
-
})] }),
|
|
190
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
191
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
192
|
-
children: "Platform"
|
|
193
|
-
}), /* @__PURE__ */ p("select", {
|
|
194
|
-
value: j,
|
|
195
|
-
onChange: (e) => M(e.target.value),
|
|
196
|
-
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)]",
|
|
197
|
-
children: [
|
|
198
|
-
/* @__PURE__ */ f("option", {
|
|
199
|
-
value: "google_ads",
|
|
200
|
-
children: "Google Ads"
|
|
201
|
-
}),
|
|
202
|
-
/* @__PURE__ */ f("option", {
|
|
203
|
-
value: "facebook",
|
|
204
|
-
children: "Facebook"
|
|
205
|
-
}),
|
|
206
|
-
/* @__PURE__ */ f("option", {
|
|
207
|
-
value: "instagram",
|
|
208
|
-
children: "Instagram"
|
|
209
|
-
}),
|
|
210
|
-
/* @__PURE__ */ f("option", {
|
|
211
|
-
value: "linkedin",
|
|
212
|
-
children: "LinkedIn"
|
|
213
|
-
}),
|
|
214
|
-
/* @__PURE__ */ f("option", {
|
|
215
|
-
value: "twitter",
|
|
216
|
-
children: "Twitter"
|
|
217
|
-
})
|
|
218
|
-
]
|
|
219
|
-
})] }),
|
|
220
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
221
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
222
|
-
children: "Objective"
|
|
223
|
-
}), /* @__PURE__ */ f("div", {
|
|
224
|
-
className: "grid grid-cols-2 gap-2 sm:grid-cols-3",
|
|
225
|
-
children: g.map((e) => /* @__PURE__ */ f("button", {
|
|
226
|
-
onClick: () => P(e),
|
|
227
|
-
className: r("rounded-md border px-3 py-2 text-sm transition-colors", N === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
228
|
-
children: e
|
|
229
|
-
}, e))
|
|
230
|
-
})] }),
|
|
231
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
232
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
233
|
-
children: "Description"
|
|
234
|
-
}), /* @__PURE__ */ f("textarea", {
|
|
235
|
-
value: F,
|
|
236
|
-
onChange: (e) => I(e.target.value),
|
|
237
|
-
rows: 3,
|
|
238
|
-
placeholder: "Describe your campaign goals...",
|
|
239
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
|
|
240
|
-
})] })
|
|
241
|
-
]
|
|
242
|
-
}),
|
|
243
|
-
O === "targeting" && /* @__PURE__ */ p(m, {
|
|
244
|
-
className: "p-6 space-y-5 max-w-2xl",
|
|
245
|
-
children: [
|
|
246
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
247
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
248
|
-
children: "Age Range"
|
|
249
|
-
}), /* @__PURE__ */ f("div", {
|
|
250
|
-
className: "flex flex-wrap gap-2",
|
|
251
|
-
children: _.map((e) => /* @__PURE__ */ f("button", {
|
|
252
|
-
onClick: () => se(e),
|
|
253
|
-
className: r("rounded-full border px-3 py-1.5 text-sm transition-colors", L.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
254
|
-
children: e
|
|
255
|
-
}, e))
|
|
256
|
-
})] }),
|
|
257
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
258
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
259
|
-
children: "Gender"
|
|
260
|
-
}), /* @__PURE__ */ f("div", {
|
|
261
|
-
className: "flex gap-2",
|
|
262
|
-
children: v.map((e) => /* @__PURE__ */ f("button", {
|
|
263
|
-
onClick: () => B(e),
|
|
264
|
-
className: r("rounded-full border px-4 py-1.5 text-sm transition-colors", z === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
265
|
-
children: e
|
|
266
|
-
}, e))
|
|
267
|
-
})] }),
|
|
268
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
269
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
270
|
-
children: "Locations"
|
|
271
|
-
}), /* @__PURE__ */ f("input", {
|
|
272
|
-
type: "text",
|
|
273
|
-
value: V,
|
|
274
|
-
onChange: (e) => H(e.target.value),
|
|
275
|
-
placeholder: "Enter locations (comma-separated)",
|
|
276
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
277
|
-
})] }),
|
|
278
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
279
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
280
|
-
children: "Interests"
|
|
281
|
-
}), /* @__PURE__ */ f("div", {
|
|
282
|
-
className: "flex flex-wrap gap-2",
|
|
283
|
-
children: y.map((e) => /* @__PURE__ */ f("button", {
|
|
284
|
-
onClick: () => ce(e),
|
|
285
|
-
className: r("rounded-full border px-3 py-1.5 text-sm transition-colors", U.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
286
|
-
children: e
|
|
287
|
-
}, e))
|
|
288
|
-
})] })
|
|
289
|
-
]
|
|
290
|
-
}),
|
|
291
|
-
O === "budget" && /* @__PURE__ */ p(m, {
|
|
292
|
-
className: "p-6 space-y-5 max-w-2xl",
|
|
293
|
-
children: [
|
|
294
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
295
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
296
|
-
children: "Budget Type"
|
|
297
|
-
}), /* @__PURE__ */ p("div", {
|
|
298
|
-
className: "flex gap-2",
|
|
299
|
-
children: [/* @__PURE__ */ f("button", {
|
|
300
|
-
onClick: () => K("daily"),
|
|
301
|
-
className: r("rounded-md border px-4 py-2 text-sm", G === "daily" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
302
|
-
children: "Daily Budget"
|
|
303
|
-
}), /* @__PURE__ */ f("button", {
|
|
304
|
-
onClick: () => K("total"),
|
|
305
|
-
className: r("rounded-md border px-4 py-2 text-sm", G === "total" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
306
|
-
children: "Total Budget"
|
|
307
|
-
})]
|
|
308
|
-
})] }),
|
|
309
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
310
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
311
|
-
children: [G === "daily" ? "Daily" : "Total", " Budget (USD)"]
|
|
312
|
-
}), /* @__PURE__ */ f("input", {
|
|
313
|
-
type: "number",
|
|
314
|
-
value: q,
|
|
315
|
-
onChange: (e) => J(e.target.value),
|
|
316
|
-
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)]"
|
|
317
|
-
})] }),
|
|
318
|
-
/* @__PURE__ */ p("div", {
|
|
319
|
-
className: "grid grid-cols-2 gap-4",
|
|
320
|
-
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
321
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
322
|
-
children: "Start Date"
|
|
323
|
-
}), /* @__PURE__ */ f("input", {
|
|
324
|
-
type: "date",
|
|
325
|
-
value: Y,
|
|
326
|
-
onChange: (e) => ie(e.target.value),
|
|
327
|
-
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)]"
|
|
328
|
-
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
329
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
330
|
-
children: "End Date"
|
|
331
|
-
}), /* @__PURE__ */ f("input", {
|
|
332
|
-
type: "date",
|
|
333
|
-
value: X,
|
|
334
|
-
onChange: (e) => ae(e.target.value),
|
|
335
|
-
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)]"
|
|
336
|
-
})] })]
|
|
337
|
-
}),
|
|
338
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
339
|
-
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
340
|
-
children: "Bid Strategy"
|
|
341
|
-
}), /* @__PURE__ */ p("select", {
|
|
342
|
-
value: Z,
|
|
343
|
-
onChange: (e) => oe(e.target.value),
|
|
344
|
-
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
|
-
children: [
|
|
346
|
-
/* @__PURE__ */ f("option", { children: "Maximize Conversions" }),
|
|
347
|
-
/* @__PURE__ */ f("option", { children: "Target CPA" }),
|
|
348
|
-
/* @__PURE__ */ f("option", { children: "Target ROAS" }),
|
|
349
|
-
/* @__PURE__ */ f("option", { children: "Lowest Cost" }),
|
|
350
|
-
/* @__PURE__ */ f("option", { children: "Manual CPC" })
|
|
351
|
-
]
|
|
352
|
-
})] })
|
|
353
|
-
]
|
|
354
|
-
}),
|
|
355
|
-
O === "review" && /* @__PURE__ */ p(m, {
|
|
356
|
-
className: "p-6 space-y-5 max-w-2xl",
|
|
357
|
-
children: [/* @__PURE__ */ f("h3", {
|
|
358
|
-
className: "text-sm font-semibold text-text-primary",
|
|
359
|
-
children: "Campaign Summary"
|
|
360
|
-
}), /* @__PURE__ */ p("div", {
|
|
361
|
-
className: "space-y-3",
|
|
187
|
+
/* @__PURE__ */ m("div", {
|
|
188
|
+
className: "grid gap-6 lg:grid-cols-[minmax(0,1fr)_320px]",
|
|
189
|
+
children: [/* @__PURE__ */ m("div", {
|
|
190
|
+
className: "min-w-0 space-y-6",
|
|
362
191
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
className: "
|
|
365
|
-
children: [
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
192
|
+
T === "info" && /* @__PURE__ */ m(h, {
|
|
193
|
+
className: "space-y-5 p-6",
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
196
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
197
|
+
children: "Campaign Name"
|
|
198
|
+
}), /* @__PURE__ */ p("input", {
|
|
199
|
+
type: "text",
|
|
200
|
+
value: j,
|
|
201
|
+
onChange: (e) => Te(e.target.value),
|
|
202
|
+
placeholder: "e.g., Spring Headshot Promo",
|
|
203
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
204
|
+
})] }),
|
|
205
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
206
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
207
|
+
children: "Platform"
|
|
208
|
+
}), /* @__PURE__ */ p(te, {
|
|
209
|
+
value: M,
|
|
210
|
+
onChange: Ee
|
|
211
|
+
})] }),
|
|
212
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
213
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
214
|
+
children: "Objective"
|
|
215
|
+
}), /* @__PURE__ */ p("div", {
|
|
216
|
+
className: "grid grid-cols-2 gap-2 sm:grid-cols-3",
|
|
217
|
+
children: ge.map((e) => /* @__PURE__ */ p("button", {
|
|
218
|
+
onClick: () => De(e),
|
|
219
|
+
className: i("min-h-11 rounded-md border px-3 py-2 text-sm transition-colors", N === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
220
|
+
children: e
|
|
221
|
+
}, e))
|
|
222
|
+
})] }),
|
|
223
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
224
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
225
|
+
children: "Description"
|
|
226
|
+
}), /* @__PURE__ */ p("textarea", {
|
|
227
|
+
value: P,
|
|
228
|
+
onChange: (e) => F(e.target.value),
|
|
229
|
+
rows: 3,
|
|
230
|
+
placeholder: "Describe your campaign goals...",
|
|
231
|
+
className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
232
|
+
})] })
|
|
233
|
+
]
|
|
372
234
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
className: "
|
|
375
|
-
children: [
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
235
|
+
T === "targeting" && /* @__PURE__ */ m(h, {
|
|
236
|
+
className: "space-y-5 p-6",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ m("div", { children: [
|
|
239
|
+
/* @__PURE__ */ m("label", {
|
|
240
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
241
|
+
children: [
|
|
242
|
+
"Saved audience",
|
|
243
|
+
" ",
|
|
244
|
+
/* @__PURE__ */ p("span", {
|
|
245
|
+
className: "font-normal text-text-secondary",
|
|
246
|
+
children: "(optional)"
|
|
247
|
+
})
|
|
248
|
+
]
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ m("select", {
|
|
251
|
+
value: I,
|
|
252
|
+
onChange: (e) => Oe(e.target.value),
|
|
253
|
+
disabled: k,
|
|
254
|
+
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)] disabled:opacity-60",
|
|
255
|
+
children: [/* @__PURE__ */ p("option", {
|
|
256
|
+
value: "",
|
|
257
|
+
children: k ? "Loading audiences…" : "No saved audience — target manually below"
|
|
258
|
+
}), A.map((e) => /* @__PURE__ */ m("option", {
|
|
259
|
+
value: e.id,
|
|
260
|
+
children: [e.name, e.estimatedSize == null ? "" : ` — ${o(e.estimatedSize)} people`]
|
|
261
|
+
}, e.id))]
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ p("p", {
|
|
264
|
+
className: "mt-1.5 text-xs text-text-secondary",
|
|
265
|
+
children: "Attach an audience you saved earlier, or set demographics manually below."
|
|
266
|
+
})
|
|
267
|
+
] }),
|
|
268
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
269
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
270
|
+
children: "Age Range"
|
|
271
|
+
}), /* @__PURE__ */ p("div", {
|
|
272
|
+
className: "flex flex-wrap gap-2",
|
|
273
|
+
children: _e.map((e) => /* @__PURE__ */ p("button", {
|
|
274
|
+
onClick: () => Le(e),
|
|
275
|
+
className: i("min-h-9 rounded-full border px-3 py-1.5 text-sm transition-colors", L.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
276
|
+
children: e
|
|
277
|
+
}, e))
|
|
278
|
+
})] }),
|
|
279
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
280
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
281
|
+
children: "Gender"
|
|
282
|
+
}), /* @__PURE__ */ p("div", {
|
|
283
|
+
className: "flex gap-2",
|
|
284
|
+
children: ve.map((e) => /* @__PURE__ */ p("button", {
|
|
285
|
+
onClick: () => Ae(e),
|
|
286
|
+
className: i("min-h-9 rounded-full border px-4 py-1.5 text-sm transition-colors", R === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
287
|
+
children: e
|
|
288
|
+
}, e))
|
|
289
|
+
})] }),
|
|
290
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
291
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
292
|
+
children: "Locations"
|
|
293
|
+
}), /* @__PURE__ */ p("input", {
|
|
294
|
+
type: "text",
|
|
295
|
+
value: z,
|
|
296
|
+
onChange: (e) => je(e.target.value),
|
|
297
|
+
placeholder: "Enter locations (comma-separated)",
|
|
298
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
299
|
+
})] }),
|
|
300
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
301
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
302
|
+
children: "Interests"
|
|
303
|
+
}), /* @__PURE__ */ p("div", {
|
|
304
|
+
className: "flex flex-wrap gap-2",
|
|
305
|
+
children: ye.map((e) => /* @__PURE__ */ p("button", {
|
|
306
|
+
onClick: () => Re(e),
|
|
307
|
+
className: i("min-h-9 rounded-full border px-3 py-1.5 text-sm transition-colors", B.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
308
|
+
children: e
|
|
309
|
+
}, e))
|
|
310
|
+
})] })
|
|
311
|
+
]
|
|
382
312
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
className: "
|
|
385
|
-
children: [
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
313
|
+
T === "budget" && /* @__PURE__ */ m(h, {
|
|
314
|
+
className: "space-y-5 p-6",
|
|
315
|
+
children: [
|
|
316
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
317
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
318
|
+
children: "Budget Type"
|
|
319
|
+
}), /* @__PURE__ */ m("div", {
|
|
320
|
+
className: "flex gap-2",
|
|
321
|
+
children: [/* @__PURE__ */ p("button", {
|
|
322
|
+
onClick: () => H("daily"),
|
|
323
|
+
className: i("min-h-11 rounded-md border px-4 py-2 text-sm", V === "daily" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
324
|
+
children: "Daily Budget"
|
|
325
|
+
}), /* @__PURE__ */ p("button", {
|
|
326
|
+
onClick: () => H("total"),
|
|
327
|
+
className: i("min-h-11 rounded-md border px-4 py-2 text-sm", V === "total" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
328
|
+
children: "Total Budget"
|
|
329
|
+
})]
|
|
330
|
+
})] }),
|
|
331
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
332
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
333
|
+
children: [V === "daily" ? "Daily" : "Total", " Budget (USD)"]
|
|
334
|
+
}), /* @__PURE__ */ p("input", {
|
|
335
|
+
type: "number",
|
|
336
|
+
value: U,
|
|
337
|
+
onChange: (e) => Ne(e.target.value),
|
|
338
|
+
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)]"
|
|
339
|
+
})] }),
|
|
340
|
+
/* @__PURE__ */ m("div", {
|
|
341
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
342
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
343
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
344
|
+
children: "Start Date"
|
|
345
|
+
}), /* @__PURE__ */ p("input", {
|
|
346
|
+
type: "date",
|
|
347
|
+
value: W,
|
|
348
|
+
onChange: (e) => Pe(e.target.value),
|
|
349
|
+
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)]"
|
|
350
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
351
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
352
|
+
children: "End Date"
|
|
353
|
+
}), /* @__PURE__ */ p("input", {
|
|
354
|
+
type: "date",
|
|
355
|
+
value: G,
|
|
356
|
+
onChange: (e) => Fe(e.target.value),
|
|
357
|
+
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)]"
|
|
358
|
+
})] })]
|
|
359
|
+
}),
|
|
360
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
361
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
362
|
+
children: "Bid Strategy"
|
|
363
|
+
}), /* @__PURE__ */ m("select", {
|
|
364
|
+
value: K,
|
|
365
|
+
onChange: (e) => Ie(e.target.value),
|
|
366
|
+
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)]",
|
|
367
|
+
children: [
|
|
368
|
+
/* @__PURE__ */ p("option", { children: "Maximize Conversions" }),
|
|
369
|
+
/* @__PURE__ */ p("option", { children: "Target CPA" }),
|
|
370
|
+
/* @__PURE__ */ p("option", { children: "Target ROAS" }),
|
|
371
|
+
/* @__PURE__ */ p("option", { children: "Lowest Cost" }),
|
|
372
|
+
/* @__PURE__ */ p("option", { children: "Manual CPC" })
|
|
373
|
+
]
|
|
374
|
+
})] })
|
|
375
|
+
]
|
|
392
376
|
}),
|
|
393
|
-
/* @__PURE__ */ p(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
children: "Target Ages"
|
|
398
|
-
}), /* @__PURE__ */ f("span", {
|
|
399
|
-
className: "text-sm font-medium text-text-primary",
|
|
400
|
-
children: Array.from(L).join(", ") || "(Not set)"
|
|
401
|
-
})]
|
|
377
|
+
T === "budget" && /* @__PURE__ */ p(l, {
|
|
378
|
+
audienceId: I || null,
|
|
379
|
+
dailyBudget: Z,
|
|
380
|
+
platform: M
|
|
402
381
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
className: "
|
|
405
|
-
children: [/* @__PURE__ */
|
|
406
|
-
className: "text-sm text-text-
|
|
407
|
-
children: "
|
|
408
|
-
}), /* @__PURE__ */
|
|
409
|
-
className: "
|
|
410
|
-
children: z
|
|
411
|
-
})]
|
|
412
|
-
}),
|
|
413
|
-
/* @__PURE__ */ p("div", {
|
|
414
|
-
className: "flex justify-between border-b border-border-subtle pb-2",
|
|
415
|
-
children: [/* @__PURE__ */ f("span", {
|
|
416
|
-
className: "text-sm text-text-secondary",
|
|
417
|
-
children: "Locations"
|
|
418
|
-
}), /* @__PURE__ */ f("span", {
|
|
419
|
-
className: "text-sm font-medium text-text-primary",
|
|
420
|
-
children: V || "(Not set)"
|
|
421
|
-
})]
|
|
422
|
-
}),
|
|
423
|
-
/* @__PURE__ */ p("div", {
|
|
424
|
-
className: "flex justify-between border-b border-border-subtle pb-2",
|
|
425
|
-
children: [/* @__PURE__ */ f("span", {
|
|
426
|
-
className: "text-sm text-text-secondary",
|
|
427
|
-
children: "Interests"
|
|
428
|
-
}), /* @__PURE__ */ f("span", {
|
|
429
|
-
className: "text-sm font-medium text-text-primary",
|
|
430
|
-
children: Array.from(U).join(", ") || "(Not set)"
|
|
431
|
-
})]
|
|
432
|
-
}),
|
|
433
|
-
/* @__PURE__ */ p("div", {
|
|
434
|
-
className: "flex justify-between border-b border-border-subtle pb-2",
|
|
435
|
-
children: [/* @__PURE__ */ f("span", {
|
|
436
|
-
className: "text-sm text-text-secondary",
|
|
437
|
-
children: "Budget"
|
|
438
|
-
}), /* @__PURE__ */ p("span", {
|
|
439
|
-
className: "text-sm font-medium text-text-primary",
|
|
382
|
+
T === "review" && /* @__PURE__ */ m(h, {
|
|
383
|
+
className: "space-y-5 p-6",
|
|
384
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
385
|
+
className: "text-sm font-semibold text-text-primary",
|
|
386
|
+
children: "Campaign Summary"
|
|
387
|
+
}), /* @__PURE__ */ m("div", {
|
|
388
|
+
className: "space-y-3",
|
|
440
389
|
children: [
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
390
|
+
/* @__PURE__ */ p(v, {
|
|
391
|
+
label: "Name",
|
|
392
|
+
value: j || "(Not set)"
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ p(v, {
|
|
395
|
+
label: "Platform",
|
|
396
|
+
value: c(M)
|
|
397
|
+
}),
|
|
398
|
+
/* @__PURE__ */ p(v, {
|
|
399
|
+
label: "Objective",
|
|
400
|
+
value: N || "(Not set)"
|
|
401
|
+
}),
|
|
402
|
+
/* @__PURE__ */ p(v, {
|
|
403
|
+
label: "Audience",
|
|
404
|
+
value: q?.name ?? "Manual targeting"
|
|
405
|
+
}),
|
|
406
|
+
/* @__PURE__ */ p(v, {
|
|
407
|
+
label: "Target Ages",
|
|
408
|
+
value: Array.from(L).join(", ") || "(Not set)"
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ p(v, {
|
|
411
|
+
label: "Gender",
|
|
412
|
+
value: R
|
|
413
|
+
}),
|
|
414
|
+
/* @__PURE__ */ p(v, {
|
|
415
|
+
label: "Locations",
|
|
416
|
+
value: z || "(Not set)"
|
|
417
|
+
}),
|
|
418
|
+
/* @__PURE__ */ p(v, {
|
|
419
|
+
label: "Interests",
|
|
420
|
+
value: Array.from(B).join(", ") || "(Not set)"
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ p(v, {
|
|
423
|
+
label: "Budget",
|
|
424
|
+
value: `$${U} (${V})`
|
|
425
|
+
}),
|
|
426
|
+
/* @__PURE__ */ p(v, {
|
|
427
|
+
label: "Schedule",
|
|
428
|
+
value: W && G ? `${W} to ${G}` : "(Not set)"
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ p(v, {
|
|
431
|
+
label: "Bid Strategy",
|
|
432
|
+
value: K,
|
|
433
|
+
last: !0
|
|
434
|
+
})
|
|
446
435
|
]
|
|
447
436
|
})]
|
|
448
437
|
}),
|
|
449
|
-
/* @__PURE__ */ p(
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
})]
|
|
438
|
+
T === "review" && /* @__PURE__ */ p(l, {
|
|
439
|
+
audienceId: I || null,
|
|
440
|
+
dailyBudget: Z,
|
|
441
|
+
platform: M
|
|
442
|
+
}),
|
|
443
|
+
$ && /* @__PURE__ */ p("div", {
|
|
444
|
+
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
445
|
+
children: $
|
|
458
446
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
className: "flex justify-between",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
className: "
|
|
466
|
-
|
|
447
|
+
/* @__PURE__ */ m("div", {
|
|
448
|
+
className: "flex items-center justify-between gap-3",
|
|
449
|
+
children: [/* @__PURE__ */ m("button", {
|
|
450
|
+
onClick: Be,
|
|
451
|
+
disabled: J === 0,
|
|
452
|
+
className: i("inline-flex min-h-11 items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium", J === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
|
|
453
|
+
children: [/* @__PURE__ */ p(d, { className: "h-4 w-4" }), "Previous"]
|
|
454
|
+
}), J < g.length - 1 ? /* @__PURE__ */ m("button", {
|
|
455
|
+
onClick: ze,
|
|
456
|
+
className: "inline-flex min-h-11 items-center gap-2 rounded-md bg-foreground px-5 py-2 text-sm font-medium text-background hover:bg-foreground/90",
|
|
457
|
+
children: ["Next", /* @__PURE__ */ p(ie, { className: "h-4 w-4" })]
|
|
458
|
+
}) : /* @__PURE__ */ m("div", {
|
|
459
|
+
className: "flex items-center gap-2",
|
|
460
|
+
children: [/* @__PURE__ */ m("button", {
|
|
461
|
+
onClick: () => Q("draft"),
|
|
462
|
+
disabled: C,
|
|
463
|
+
className: "inline-flex min-h-11 items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
|
|
464
|
+
children: [/* @__PURE__ */ p(ce, { className: "h-4 w-4" }), D === "draft" ? "Saving…" : "Save Draft"]
|
|
465
|
+
}), /* @__PURE__ */ m("button", {
|
|
466
|
+
onClick: () => Q("launch"),
|
|
467
|
+
disabled: C,
|
|
468
|
+
className: "inline-flex min-h-11 items-center gap-2 rounded-md bg-action-primary-bg px-5 py-2 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-60",
|
|
469
|
+
children: [/* @__PURE__ */ p(se, { className: "h-4 w-4" }), D === "launch" ? "Launching…" : "Launch Campaign"]
|
|
470
|
+
})]
|
|
467
471
|
})]
|
|
468
472
|
})
|
|
469
473
|
]
|
|
470
|
-
})
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
474
|
+
}), /* @__PURE__ */ p("aside", {
|
|
475
|
+
className: "h-fit lg:sticky lg:top-6",
|
|
476
|
+
children: /* @__PURE__ */ m(me, {
|
|
477
|
+
treatment: "insight",
|
|
478
|
+
className: "space-y-4 p-5",
|
|
479
|
+
children: [
|
|
480
|
+
/* @__PURE__ */ m("div", {
|
|
481
|
+
className: "flex items-center gap-2",
|
|
482
|
+
children: [/* @__PURE__ */ p(le, { className: "h-4 w-4 text-action-primary-bg" }), /* @__PURE__ */ p("h3", {
|
|
483
|
+
className: "text-sm font-semibold text-text-primary",
|
|
484
|
+
children: "Campaign summary"
|
|
485
|
+
})]
|
|
486
|
+
}),
|
|
487
|
+
/* @__PURE__ */ m("div", {
|
|
488
|
+
className: "rounded-lg border border-border-seam bg-accent-wash p-4",
|
|
489
|
+
children: [/* @__PURE__ */ p("p", {
|
|
490
|
+
className: "text-xs text-text-secondary",
|
|
491
|
+
children: "Estimated audience size"
|
|
492
|
+
}), q && q.estimatedSize != null ? /* @__PURE__ */ m(pe, { children: [/* @__PURE__ */ m("div", {
|
|
493
|
+
className: "mt-1 flex items-baseline gap-2",
|
|
494
|
+
children: [
|
|
495
|
+
/* @__PURE__ */ p(f, { className: "h-5 w-5 shrink-0 text-action-primary-bg" }),
|
|
496
|
+
/* @__PURE__ */ p("span", {
|
|
497
|
+
className: "text-2xl font-bold text-text-primary",
|
|
498
|
+
children: o(q.estimatedSize)
|
|
499
|
+
}),
|
|
500
|
+
/* @__PURE__ */ p("span", {
|
|
501
|
+
className: "text-xs text-text-secondary",
|
|
502
|
+
children: "people"
|
|
503
|
+
})
|
|
504
|
+
]
|
|
505
|
+
}), /* @__PURE__ */ m("p", {
|
|
506
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
507
|
+
children: [
|
|
508
|
+
"from “",
|
|
509
|
+
q.name,
|
|
510
|
+
"”"
|
|
511
|
+
]
|
|
512
|
+
})] }) : /* @__PURE__ */ p("p", {
|
|
513
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
514
|
+
children: "Attach a saved audience in the Targeting step to see its estimated size."
|
|
515
|
+
})]
|
|
516
|
+
}),
|
|
517
|
+
/* @__PURE__ */ m("dl", {
|
|
518
|
+
className: "space-y-3 text-sm",
|
|
519
|
+
children: [
|
|
520
|
+
/* @__PURE__ */ p(y, {
|
|
521
|
+
icon: re(M, "h-4 w-4 shrink-0"),
|
|
522
|
+
label: "Platform",
|
|
523
|
+
value: c(M)
|
|
524
|
+
}),
|
|
525
|
+
/* @__PURE__ */ p(y, {
|
|
526
|
+
icon: /* @__PURE__ */ p(ue, { className: "h-4 w-4 shrink-0" }),
|
|
527
|
+
label: "Objective",
|
|
528
|
+
value: N || "Not set",
|
|
529
|
+
muted: !N
|
|
530
|
+
}),
|
|
531
|
+
/* @__PURE__ */ p(y, {
|
|
532
|
+
icon: /* @__PURE__ */ p(de, { className: "h-4 w-4 shrink-0" }),
|
|
533
|
+
label: "Budget",
|
|
534
|
+
value: Number.isFinite(Y) && Y > 0 ? `${a(Y)} ${V === "daily" ? "/ day" : "total"}` : "Not set",
|
|
535
|
+
muted: !(Number.isFinite(Y) && Y > 0)
|
|
536
|
+
}),
|
|
537
|
+
/* @__PURE__ */ p(y, {
|
|
538
|
+
icon: /* @__PURE__ */ p(ae, { className: "h-4 w-4 shrink-0" }),
|
|
539
|
+
label: "Schedule",
|
|
540
|
+
value: X ? `${X} day${X === 1 ? "" : "s"}` : "Not set",
|
|
541
|
+
muted: !X
|
|
542
|
+
})
|
|
543
|
+
]
|
|
544
|
+
})
|
|
545
|
+
]
|
|
546
|
+
})
|
|
492
547
|
})]
|
|
493
548
|
})
|
|
494
549
|
]
|
|
495
550
|
});
|
|
496
|
-
}
|
|
551
|
+
}, v = ({ label: e, value: t, last: n }) => /* @__PURE__ */ m("div", {
|
|
552
|
+
className: i("flex justify-between gap-4", !n && "border-b border-border-subtle pb-2"),
|
|
553
|
+
children: [/* @__PURE__ */ p("span", {
|
|
554
|
+
className: "text-sm text-text-secondary",
|
|
555
|
+
children: e
|
|
556
|
+
}), /* @__PURE__ */ p("span", {
|
|
557
|
+
className: "text-right text-sm font-medium text-text-primary",
|
|
558
|
+
children: t
|
|
559
|
+
})]
|
|
560
|
+
}), y = ({ icon: e, label: t, value: n, muted: r }) => /* @__PURE__ */ m("div", {
|
|
561
|
+
className: "flex items-center justify-between gap-3",
|
|
562
|
+
children: [/* @__PURE__ */ m("dt", {
|
|
563
|
+
className: "flex items-center gap-2 text-text-secondary",
|
|
564
|
+
children: [e, /* @__PURE__ */ p("span", { children: t })]
|
|
565
|
+
}), /* @__PURE__ */ p("dd", {
|
|
566
|
+
className: i("truncate text-right font-medium", r ? "text-text-secondary" : "text-text-primary"),
|
|
567
|
+
children: n
|
|
568
|
+
})]
|
|
569
|
+
});
|
|
497
570
|
//#endregion
|
|
498
|
-
export {
|
|
571
|
+
export { _ as CreateAdCampaignPage };
|
|
499
572
|
|
|
500
573
|
//# sourceMappingURL=CreateAdCampaignPage.js.map
|