pxengine 0.1.85 → 0.1.87
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/index.cjs +1138 -881
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -1
- package/dist/index.d.ts +59 -1
- package/dist/index.mjs +1117 -861
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +93 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/render/PXEngineRenderer.tsx
|
|
8
|
-
import
|
|
8
|
+
import React117 from "react";
|
|
9
9
|
|
|
10
10
|
// src/atoms/index.ts
|
|
11
11
|
var atoms_exports = {};
|
|
@@ -33638,6 +33638,7 @@ __export(molecules_exports, {
|
|
|
33638
33638
|
TagCloud: () => TagCloud,
|
|
33639
33639
|
TimelineCard: () => TimelineCard,
|
|
33640
33640
|
TopPostsGrid: () => TopPostsGrid,
|
|
33641
|
+
WebSearchJobCard: () => WebSearchJobCard,
|
|
33641
33642
|
defaultFetchSelections: () => defaultFetchSelections,
|
|
33642
33643
|
defaultPersistSelection: () => defaultPersistSelection,
|
|
33643
33644
|
th: () => th,
|
|
@@ -39240,28 +39241,30 @@ var FullscreenPreviewModal = ({ url, title, onClose }) => {
|
|
|
39240
39241
|
) })
|
|
39241
39242
|
] });
|
|
39242
39243
|
};
|
|
39243
|
-
var ResearchReportJobCard = ({
|
|
39244
|
-
|
|
39245
|
-
|
|
39246
|
-
|
|
39247
|
-
|
|
39248
|
-
|
|
39249
|
-
|
|
39250
|
-
|
|
39251
|
-
|
|
39252
|
-
|
|
39253
|
-
|
|
39254
|
-
|
|
39255
|
-
|
|
39256
|
-
|
|
39257
|
-
|
|
39258
|
-
|
|
39259
|
-
|
|
39260
|
-
|
|
39261
|
-
|
|
39262
|
-
|
|
39263
|
-
|
|
39264
|
-
|
|
39244
|
+
var ResearchReportJobCard = (props) => {
|
|
39245
|
+
const {
|
|
39246
|
+
job_id: _job_id,
|
|
39247
|
+
title: initialTitle,
|
|
39248
|
+
status: initialStatus,
|
|
39249
|
+
topic: _initialTopic,
|
|
39250
|
+
depth: initialDepth,
|
|
39251
|
+
section_count: initialSectionCount,
|
|
39252
|
+
source_count: initialSourceCount,
|
|
39253
|
+
word_count: initialWordCount,
|
|
39254
|
+
executive_summary: initialSummary,
|
|
39255
|
+
key_findings: _initialFindings,
|
|
39256
|
+
html_url: initialHtmlUrl,
|
|
39257
|
+
theme: initialTheme,
|
|
39258
|
+
error: initialError,
|
|
39259
|
+
pollUrl,
|
|
39260
|
+
authToken,
|
|
39261
|
+
className,
|
|
39262
|
+
onComplete,
|
|
39263
|
+
onFailed,
|
|
39264
|
+
compact = false
|
|
39265
|
+
} = props;
|
|
39266
|
+
const inferredStatus = initialStatus ?? (initialHtmlUrl ? "complete" : void 0);
|
|
39267
|
+
const [status, setStatus] = useState11(inferredStatus);
|
|
39265
39268
|
const [title, setTitle] = useState11(initialTitle);
|
|
39266
39269
|
const [depth, setDepth] = useState11(initialDepth || "");
|
|
39267
39270
|
const [sectionCount, setSectionCount] = useState11(initialSectionCount ?? 0);
|
|
@@ -39281,8 +39284,9 @@ var ResearchReportJobCard = ({
|
|
|
39281
39284
|
onCompleteRef.current = onComplete;
|
|
39282
39285
|
onFailedRef.current = onFailed;
|
|
39283
39286
|
useEffect7(() => {
|
|
39284
|
-
|
|
39285
|
-
|
|
39287
|
+
const newStatus = initialStatus ?? (initialHtmlUrl ? "complete" : void 0);
|
|
39288
|
+
setStatus(newStatus);
|
|
39289
|
+
}, [initialStatus, initialHtmlUrl]);
|
|
39286
39290
|
useEffect7(() => {
|
|
39287
39291
|
if (initialTitle) setTitle(initialTitle);
|
|
39288
39292
|
}, [initialTitle]);
|
|
@@ -39383,16 +39387,23 @@ var ResearchReportJobCard = ({
|
|
|
39383
39387
|
return count.toString();
|
|
39384
39388
|
};
|
|
39385
39389
|
if (status === "pending" || status === "running") {
|
|
39386
|
-
return /* @__PURE__ */ jsx148("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs109("div", { className: "relative overflow-hidden rounded-
|
|
39387
|
-
/* @__PURE__ */
|
|
39388
|
-
|
|
39389
|
-
/* @__PURE__ */
|
|
39390
|
-
|
|
39391
|
-
/* @__PURE__ */
|
|
39392
|
-
|
|
39393
|
-
|
|
39394
|
-
|
|
39395
|
-
/* @__PURE__ */
|
|
39390
|
+
return /* @__PURE__ */ jsx148("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs109("div", { className: "relative overflow-hidden rounded-2xl border border-zinc-200/70 dark:border-zinc-800 bg-zinc-100 dark:bg-zinc-900", children: [
|
|
39391
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[3px] bg-gradient-to-r from-zinc-300 dark:from-zinc-700 via-zinc-200 dark:via-zinc-600 to-zinc-300 dark:to-zinc-700 animate-pulse" }),
|
|
39392
|
+
/* @__PURE__ */ jsxs109("div", { className: "p-5", children: [
|
|
39393
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex items-start gap-3", children: [
|
|
39394
|
+
/* @__PURE__ */ jsx148("div", { className: "w-10 h-10 rounded-xl bg-zinc-200 dark:bg-zinc-800 animate-pulse flex-shrink-0" }),
|
|
39395
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex-1 min-w-0", children: [
|
|
39396
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[14px] w-[65%] rounded bg-zinc-200 dark:bg-zinc-700 animate-pulse" }),
|
|
39397
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[10px] w-[45%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse mt-2", style: { animationDelay: "80ms" } })
|
|
39398
|
+
] }),
|
|
39399
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [
|
|
39400
|
+
/* @__PURE__ */ jsx148("div", { className: "w-[72px] h-7 rounded-lg bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "120ms" } }),
|
|
39401
|
+
/* @__PURE__ */ jsx148("div", { className: "w-[88px] h-7 rounded-lg bg-zinc-200 dark:bg-zinc-700 animate-pulse", style: { animationDelay: "160ms" } })
|
|
39402
|
+
] })
|
|
39403
|
+
] }),
|
|
39404
|
+
/* @__PURE__ */ jsxs109("div", { className: "mt-4 flex items-center gap-2", children: [
|
|
39405
|
+
/* @__PURE__ */ jsx148("div", { className: "w-2 h-2 rounded-full bg-amber-500/60 animate-pulse" }),
|
|
39406
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[10px] w-[120px] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "200ms" } })
|
|
39396
39407
|
] })
|
|
39397
39408
|
] }),
|
|
39398
39409
|
/* @__PURE__ */ jsx148("div", { className: "absolute inset-0 -translate-x-full animate-[shimmer_2s_ease-in-out_infinite] bg-gradient-to-r from-transparent via-white/10 to-transparent" })
|
|
@@ -39407,6 +39418,31 @@ var ResearchReportJobCard = ({
|
|
|
39407
39418
|
] })
|
|
39408
39419
|
] }) }) });
|
|
39409
39420
|
}
|
|
39421
|
+
if (status === "complete" && !hasHTML) {
|
|
39422
|
+
return /* @__PURE__ */ jsx148("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs109("div", { className: "bg-zinc-900 border border-zinc-800 rounded-2xl overflow-hidden", children: [
|
|
39423
|
+
/* @__PURE__ */ jsx148(
|
|
39424
|
+
"div",
|
|
39425
|
+
{
|
|
39426
|
+
className: "h-[3px]",
|
|
39427
|
+
style: { background: "linear-gradient(90deg, #f59e0b, #fbbf24, #fcd34d)" }
|
|
39428
|
+
}
|
|
39429
|
+
),
|
|
39430
|
+
/* @__PURE__ */ jsx148("div", { className: "p-5", children: /* @__PURE__ */ jsxs109("div", { className: "flex items-start gap-3", children: [
|
|
39431
|
+
/* @__PURE__ */ jsx148(
|
|
39432
|
+
"div",
|
|
39433
|
+
{
|
|
39434
|
+
className: "w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 bg-amber-500/10 border border-amber-500/20",
|
|
39435
|
+
children: /* @__PURE__ */ jsx148(DocumentIcon, {})
|
|
39436
|
+
}
|
|
39437
|
+
),
|
|
39438
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex-1 min-w-0", children: [
|
|
39439
|
+
/* @__PURE__ */ jsx148("h3", { className: "text-sm font-semibold text-zinc-100 truncate leading-tight", children: title }),
|
|
39440
|
+
/* @__PURE__ */ jsx148("p", { className: "text-xs text-amber-400/80 mt-1", children: "Report generated but file upload failed. The content was created successfully." }),
|
|
39441
|
+
summary && /* @__PURE__ */ jsx148("p", { className: "text-xs text-zinc-500 mt-2 line-clamp-2", children: summary })
|
|
39442
|
+
] })
|
|
39443
|
+
] }) })
|
|
39444
|
+
] }) });
|
|
39445
|
+
}
|
|
39410
39446
|
const handleDownload = async () => {
|
|
39411
39447
|
if (!htmlUrl) return;
|
|
39412
39448
|
const filename = `${title.replace(/[^a-z0-9]/gi, "-").toLowerCase()}.html`;
|
|
@@ -39541,11 +39577,205 @@ var ResearchReportJobCard = ({
|
|
|
39541
39577
|
] });
|
|
39542
39578
|
};
|
|
39543
39579
|
|
|
39580
|
+
// src/molecules/generic/WebSearchJobCard/WebSearchJobCard.tsx
|
|
39581
|
+
import { useEffect as useEffect8, useRef as useRef7, useState as useState12 } from "react";
|
|
39582
|
+
import { jsx as jsx149, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
39583
|
+
var SearchIcon = () => /* @__PURE__ */ jsxs110("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39584
|
+
/* @__PURE__ */ jsx149("circle", { cx: "11", cy: "11", r: "8" }),
|
|
39585
|
+
/* @__PURE__ */ jsx149("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
39586
|
+
] });
|
|
39587
|
+
var ExternalLinkIcon = () => /* @__PURE__ */ jsxs110("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39588
|
+
/* @__PURE__ */ jsx149("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
39589
|
+
/* @__PURE__ */ jsx149("polyline", { points: "15 3 21 3 21 9" }),
|
|
39590
|
+
/* @__PURE__ */ jsx149("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
39591
|
+
] });
|
|
39592
|
+
var WebSearchJobCard = ({
|
|
39593
|
+
job_id: _job_id,
|
|
39594
|
+
title: initialTitle,
|
|
39595
|
+
status: initialStatus,
|
|
39596
|
+
query: initialQuery,
|
|
39597
|
+
result_count: initialResultCount,
|
|
39598
|
+
search_count: initialSearchCount,
|
|
39599
|
+
summary: initialSummary,
|
|
39600
|
+
results: initialResults,
|
|
39601
|
+
error: initialError,
|
|
39602
|
+
pollUrl,
|
|
39603
|
+
authToken,
|
|
39604
|
+
className,
|
|
39605
|
+
onComplete,
|
|
39606
|
+
onFailed,
|
|
39607
|
+
compact = false
|
|
39608
|
+
}) => {
|
|
39609
|
+
const [status, setStatus] = useState12(initialStatus);
|
|
39610
|
+
const [query, setQuery] = useState12(initialQuery || initialTitle || "");
|
|
39611
|
+
const [resultCount, setResultCount] = useState12(initialResultCount ?? 0);
|
|
39612
|
+
const [searchCount, setSearchCount] = useState12(initialSearchCount ?? 0);
|
|
39613
|
+
const [summary, setSummary] = useState12(initialSummary || "");
|
|
39614
|
+
const [results, setResults] = useState12(initialResults || []);
|
|
39615
|
+
const [error, setError] = useState12(initialError);
|
|
39616
|
+
const intervalRef = useRef7(null);
|
|
39617
|
+
const onCompleteRef = useRef7(onComplete);
|
|
39618
|
+
const onFailedRef = useRef7(onFailed);
|
|
39619
|
+
const hasNotifiedRef = useRef7(false);
|
|
39620
|
+
onCompleteRef.current = onComplete;
|
|
39621
|
+
onFailedRef.current = onFailed;
|
|
39622
|
+
useEffect8(() => {
|
|
39623
|
+
setStatus(initialStatus);
|
|
39624
|
+
}, [initialStatus]);
|
|
39625
|
+
useEffect8(() => {
|
|
39626
|
+
if (initialQuery) setQuery(initialQuery);
|
|
39627
|
+
}, [initialQuery]);
|
|
39628
|
+
useEffect8(() => {
|
|
39629
|
+
if (initialTitle && !initialQuery) setQuery(initialTitle);
|
|
39630
|
+
}, [initialTitle, initialQuery]);
|
|
39631
|
+
useEffect8(() => {
|
|
39632
|
+
if (initialResultCount !== void 0) setResultCount(initialResultCount);
|
|
39633
|
+
}, [initialResultCount]);
|
|
39634
|
+
useEffect8(() => {
|
|
39635
|
+
if (initialSearchCount !== void 0) setSearchCount(initialSearchCount);
|
|
39636
|
+
}, [initialSearchCount]);
|
|
39637
|
+
useEffect8(() => {
|
|
39638
|
+
if (initialSummary) setSummary(initialSummary);
|
|
39639
|
+
}, [initialSummary]);
|
|
39640
|
+
useEffect8(() => {
|
|
39641
|
+
if (initialResults) setResults(initialResults);
|
|
39642
|
+
}, [initialResults]);
|
|
39643
|
+
useEffect8(() => {
|
|
39644
|
+
if (initialError) setError(initialError);
|
|
39645
|
+
}, [initialError]);
|
|
39646
|
+
const isTerminal = status === "complete" || status === "failed";
|
|
39647
|
+
useEffect8(() => {
|
|
39648
|
+
if (isTerminal || !pollUrl) return;
|
|
39649
|
+
const poll = async () => {
|
|
39650
|
+
try {
|
|
39651
|
+
const headers = {};
|
|
39652
|
+
if (authToken) headers["Authorization"] = `Bearer ${authToken}`;
|
|
39653
|
+
const res = await fetch(pollUrl, { headers });
|
|
39654
|
+
if (!res.ok) return;
|
|
39655
|
+
const data = await res.json();
|
|
39656
|
+
const newStatus = data.status;
|
|
39657
|
+
setStatus(newStatus);
|
|
39658
|
+
if (newStatus === "complete" && data.output) {
|
|
39659
|
+
const output = data.output;
|
|
39660
|
+
setQuery(output.query || "");
|
|
39661
|
+
setResultCount(output.result_count ?? 0);
|
|
39662
|
+
setSearchCount(output.search_count ?? 0);
|
|
39663
|
+
setSummary(output.summary || "");
|
|
39664
|
+
setResults(output.results || []);
|
|
39665
|
+
if (!hasNotifiedRef.current && onCompleteRef.current) {
|
|
39666
|
+
hasNotifiedRef.current = true;
|
|
39667
|
+
onCompleteRef.current(output);
|
|
39668
|
+
}
|
|
39669
|
+
}
|
|
39670
|
+
if (newStatus === "failed") {
|
|
39671
|
+
const errorMsg = data.error || "Job failed";
|
|
39672
|
+
setError(errorMsg);
|
|
39673
|
+
if (!hasNotifiedRef.current && onFailedRef.current) {
|
|
39674
|
+
hasNotifiedRef.current = true;
|
|
39675
|
+
onFailedRef.current(errorMsg);
|
|
39676
|
+
}
|
|
39677
|
+
}
|
|
39678
|
+
} catch {
|
|
39679
|
+
}
|
|
39680
|
+
};
|
|
39681
|
+
poll();
|
|
39682
|
+
intervalRef.current = setInterval(poll, 3e3);
|
|
39683
|
+
return () => {
|
|
39684
|
+
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
39685
|
+
};
|
|
39686
|
+
}, [isTerminal, pollUrl, authToken]);
|
|
39687
|
+
useEffect8(() => {
|
|
39688
|
+
if (isTerminal && intervalRef.current) {
|
|
39689
|
+
clearInterval(intervalRef.current);
|
|
39690
|
+
intervalRef.current = null;
|
|
39691
|
+
}
|
|
39692
|
+
}, [isTerminal]);
|
|
39693
|
+
if (status === "pending" || status === "running") {
|
|
39694
|
+
return /* @__PURE__ */ jsx149("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs110("div", { className: "relative overflow-hidden rounded-xl border border-zinc-200/70 dark:border-zinc-800/70 bg-zinc-100 dark:bg-zinc-900", children: [
|
|
39695
|
+
/* @__PURE__ */ jsxs110("div", { className: "p-5 space-y-3", children: [
|
|
39696
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-center gap-3", children: [
|
|
39697
|
+
/* @__PURE__ */ jsx149("div", { className: "w-10 h-10 rounded-xl bg-zinc-300 dark:bg-zinc-700 animate-pulse flex-shrink-0" }),
|
|
39698
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex-1 space-y-2", children: [
|
|
39699
|
+
/* @__PURE__ */ jsx149("div", { className: "h-[13px] w-[60%] rounded bg-zinc-300 dark:bg-zinc-700 animate-pulse" }),
|
|
39700
|
+
/* @__PURE__ */ jsx149("div", { className: "h-[10px] w-[25%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "80ms" } })
|
|
39701
|
+
] })
|
|
39702
|
+
] }),
|
|
39703
|
+
/* @__PURE__ */ jsx149("div", { className: "h-[9px] w-[85%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "120ms" } }),
|
|
39704
|
+
/* @__PURE__ */ jsx149("div", { className: "h-[9px] w-[70%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "160ms" } }),
|
|
39705
|
+
/* @__PURE__ */ jsx149("div", { className: "space-y-2 pt-1", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs110(
|
|
39706
|
+
"div",
|
|
39707
|
+
{
|
|
39708
|
+
className: "rounded-xl border border-zinc-200 dark:border-zinc-800 p-3 space-y-1.5",
|
|
39709
|
+
children: [
|
|
39710
|
+
/* @__PURE__ */ jsx149("div", { className: "h-[10px] w-[65%] rounded bg-zinc-300 dark:bg-zinc-700 animate-pulse", style: { animationDelay: `${200 + i * 80}ms` } }),
|
|
39711
|
+
/* @__PURE__ */ jsx149("div", { className: "h-[8px] w-[18%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: `${240 + i * 80}ms` } }),
|
|
39712
|
+
/* @__PURE__ */ jsx149("div", { className: "h-[8px] w-[90%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: `${280 + i * 80}ms` } })
|
|
39713
|
+
]
|
|
39714
|
+
},
|
|
39715
|
+
i
|
|
39716
|
+
)) })
|
|
39717
|
+
] }),
|
|
39718
|
+
/* @__PURE__ */ jsx149("div", { className: "absolute inset-0 -translate-x-full animate-[shimmer_2s_ease-in-out_infinite] bg-gradient-to-r from-transparent via-white/10 to-transparent" })
|
|
39719
|
+
] }) });
|
|
39720
|
+
}
|
|
39721
|
+
if (status === "failed") {
|
|
39722
|
+
return /* @__PURE__ */ jsx149("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx149("div", { className: "bg-red-950/20 border border-red-800/25 rounded-2xl p-5", children: /* @__PURE__ */ jsxs110("div", { className: "flex items-start gap-3", children: [
|
|
39723
|
+
/* @__PURE__ */ jsx149("span", { className: "text-red-400 text-base mt-0.5 flex-shrink-0", children: "\u26A0" }),
|
|
39724
|
+
/* @__PURE__ */ jsxs110("div", { children: [
|
|
39725
|
+
/* @__PURE__ */ jsx149("p", { className: "text-sm font-semibold text-red-300", children: "Web search failed" }),
|
|
39726
|
+
/* @__PURE__ */ jsx149("p", { className: "text-xs text-red-400/60 mt-1 leading-relaxed", children: error || "An unexpected error occurred. Please try again." })
|
|
39727
|
+
] })
|
|
39728
|
+
] }) }) });
|
|
39729
|
+
}
|
|
39730
|
+
const displayQuery = query || initialTitle || "Web Search";
|
|
39731
|
+
const statsText = [
|
|
39732
|
+
resultCount > 0 && `${resultCount} result${resultCount !== 1 ? "s" : ""}`,
|
|
39733
|
+
searchCount > 0 && `${searchCount} search${searchCount !== 1 ? "es" : ""}`
|
|
39734
|
+
].filter(Boolean).join(" \xB7 ");
|
|
39735
|
+
return /* @__PURE__ */ jsx149("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs110("div", { className: "bg-zinc-900 border border-zinc-800 rounded-2xl overflow-hidden", children: [
|
|
39736
|
+
/* @__PURE__ */ jsx149(
|
|
39737
|
+
"div",
|
|
39738
|
+
{
|
|
39739
|
+
className: "h-[3px]",
|
|
39740
|
+
style: { background: "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B)" }
|
|
39741
|
+
}
|
|
39742
|
+
),
|
|
39743
|
+
/* @__PURE__ */ jsxs110("div", { className: "p-5", children: [
|
|
39744
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-start gap-3", children: [
|
|
39745
|
+
/* @__PURE__ */ jsx149("div", { className: "w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 border border-amber-500/30 bg-amber-500/10 text-amber-400", children: /* @__PURE__ */ jsx149(SearchIcon, {}) }),
|
|
39746
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex-1 min-w-0", children: [
|
|
39747
|
+
/* @__PURE__ */ jsx149("h3", { className: "text-sm font-semibold text-zinc-100 leading-tight line-clamp-2", children: displayQuery }),
|
|
39748
|
+
statsText && /* @__PURE__ */ jsx149("p", { className: "text-xs text-zinc-500 mt-0.5", children: statsText })
|
|
39749
|
+
] })
|
|
39750
|
+
] }),
|
|
39751
|
+
summary && /* @__PURE__ */ jsx149("p", { className: "mt-3 text-xs text-zinc-400 leading-relaxed line-clamp-3", children: summary }),
|
|
39752
|
+
!compact && results.length > 0 && /* @__PURE__ */ jsx149("div", { className: "mt-4 space-y-2", children: results.map((result, i) => /* @__PURE__ */ jsxs110(
|
|
39753
|
+
"a",
|
|
39754
|
+
{
|
|
39755
|
+
href: result.url,
|
|
39756
|
+
target: "_blank",
|
|
39757
|
+
rel: "noopener noreferrer",
|
|
39758
|
+
className: "block rounded-xl border border-zinc-800 bg-zinc-800/40 hover:border-zinc-600 hover:bg-zinc-800/70 transition-colors p-3 group",
|
|
39759
|
+
children: [
|
|
39760
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-start justify-between gap-2", children: [
|
|
39761
|
+
/* @__PURE__ */ jsx149("span", { className: "text-xs font-medium text-zinc-200 group-hover:text-white leading-snug flex-1 line-clamp-2", children: result.title }),
|
|
39762
|
+
/* @__PURE__ */ jsx149("span", { className: "text-zinc-600 group-hover:text-zinc-400 flex-shrink-0 mt-0.5 transition-colors", children: /* @__PURE__ */ jsx149(ExternalLinkIcon, {}) })
|
|
39763
|
+
] }),
|
|
39764
|
+
result.source && /* @__PURE__ */ jsx149("span", { className: "inline-block mt-1 text-[10px] font-medium text-amber-500/70 bg-amber-500/10 border border-amber-500/20 rounded-md px-1.5 py-0.5", children: result.source }),
|
|
39765
|
+
result.snippet && /* @__PURE__ */ jsx149("p", { className: "mt-1.5 text-xs text-zinc-500 leading-relaxed line-clamp-2", children: result.snippet })
|
|
39766
|
+
]
|
|
39767
|
+
},
|
|
39768
|
+
i
|
|
39769
|
+
)) })
|
|
39770
|
+
] })
|
|
39771
|
+
] }) });
|
|
39772
|
+
};
|
|
39773
|
+
|
|
39544
39774
|
// src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
|
|
39545
|
-
import
|
|
39775
|
+
import React109, { useMemo as useMemo6 } from "react";
|
|
39546
39776
|
|
|
39547
39777
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
39548
|
-
import { useState as
|
|
39778
|
+
import { useState as useState13, useRef as useRef8, useEffect as useEffect9, useMemo as useMemo5 } from "react";
|
|
39549
39779
|
|
|
39550
39780
|
// src/lib/countries.ts
|
|
39551
39781
|
var countries = [
|
|
@@ -39752,15 +39982,15 @@ var countriesWithFlags = Object.fromEntries(
|
|
|
39752
39982
|
);
|
|
39753
39983
|
|
|
39754
39984
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
39755
|
-
import { jsx as
|
|
39985
|
+
import { jsx as jsx150, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
39756
39986
|
var CountrySelectEdit = ({
|
|
39757
39987
|
value,
|
|
39758
39988
|
onChange
|
|
39759
39989
|
}) => {
|
|
39760
|
-
const [isDropdownOpen, setIsDropdownOpen] =
|
|
39761
|
-
const [searchTerm, setSearchTerm] =
|
|
39762
|
-
const dropdownRef =
|
|
39763
|
-
|
|
39990
|
+
const [isDropdownOpen, setIsDropdownOpen] = useState13(false);
|
|
39991
|
+
const [searchTerm, setSearchTerm] = useState13("");
|
|
39992
|
+
const dropdownRef = useRef8(null);
|
|
39993
|
+
useEffect9(() => {
|
|
39764
39994
|
const handleClickOutside = (event) => {
|
|
39765
39995
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
39766
39996
|
setIsDropdownOpen(false);
|
|
@@ -39779,16 +40009,16 @@ var CountrySelectEdit = ({
|
|
|
39779
40009
|
}
|
|
39780
40010
|
return [];
|
|
39781
40011
|
}, [value]);
|
|
39782
|
-
return /* @__PURE__ */
|
|
39783
|
-
/* @__PURE__ */
|
|
39784
|
-
/* @__PURE__ */
|
|
40012
|
+
return /* @__PURE__ */ jsxs111("div", { className: "space-y-3", children: [
|
|
40013
|
+
/* @__PURE__ */ jsxs111("div", { className: "relative", ref: dropdownRef, children: [
|
|
40014
|
+
/* @__PURE__ */ jsxs111(
|
|
39785
40015
|
"div",
|
|
39786
40016
|
{
|
|
39787
40017
|
className: "flex-1 bg-background border border-border rounded-md px-3 py-2 text-sm cursor-pointer flex items-center justify-between font-medium hover:border-purple500 transition-colors",
|
|
39788
40018
|
onClick: () => setIsDropdownOpen(!isDropdownOpen),
|
|
39789
40019
|
children: [
|
|
39790
|
-
/* @__PURE__ */
|
|
39791
|
-
/* @__PURE__ */
|
|
40020
|
+
/* @__PURE__ */ jsx150("span", { className: "text-foreground", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
|
|
40021
|
+
/* @__PURE__ */ jsx150(
|
|
39792
40022
|
ChevronDown,
|
|
39793
40023
|
{
|
|
39794
40024
|
className: cn(
|
|
@@ -39800,8 +40030,8 @@ var CountrySelectEdit = ({
|
|
|
39800
40030
|
]
|
|
39801
40031
|
}
|
|
39802
40032
|
),
|
|
39803
|
-
isDropdownOpen && /* @__PURE__ */
|
|
39804
|
-
/* @__PURE__ */
|
|
40033
|
+
isDropdownOpen && /* @__PURE__ */ jsxs111("div", { className: "relative z-10 top-full left-0 right-0 mt-1 bg-background border border-border rounded-lg shadow-xl z-50 max-h-60 overflow-hidden animate-in fade-in slide-in-from-top-1", children: [
|
|
40034
|
+
/* @__PURE__ */ jsx150("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ jsx150(
|
|
39805
40035
|
"input",
|
|
39806
40036
|
{
|
|
39807
40037
|
type: "text",
|
|
@@ -39812,9 +40042,9 @@ var CountrySelectEdit = ({
|
|
|
39812
40042
|
onClick: (e) => e.stopPropagation()
|
|
39813
40043
|
}
|
|
39814
40044
|
) }),
|
|
39815
|
-
/* @__PURE__ */
|
|
40045
|
+
/* @__PURE__ */ jsx150("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
|
|
39816
40046
|
(country) => country.name.toLowerCase().includes(searchTerm.toLowerCase()) || country.code.toLowerCase().includes(searchTerm.toLowerCase())
|
|
39817
|
-
).map((country) => /* @__PURE__ */
|
|
40047
|
+
).map((country) => /* @__PURE__ */ jsxs111(
|
|
39818
40048
|
"div",
|
|
39819
40049
|
{
|
|
39820
40050
|
className: cn(
|
|
@@ -39835,30 +40065,30 @@ var CountrySelectEdit = ({
|
|
|
39835
40065
|
}
|
|
39836
40066
|
},
|
|
39837
40067
|
children: [
|
|
39838
|
-
/* @__PURE__ */
|
|
39839
|
-
/* @__PURE__ */
|
|
39840
|
-
/* @__PURE__ */
|
|
40068
|
+
/* @__PURE__ */ jsxs111("div", { className: "flex items-center gap-2", children: [
|
|
40069
|
+
/* @__PURE__ */ jsx150("span", { className: "text-sm text-foreground", children: country.name }),
|
|
40070
|
+
/* @__PURE__ */ jsx150("span", { className: "text-xs text-muted-foreground font-mono", children: country.code })
|
|
39841
40071
|
] }),
|
|
39842
|
-
inputValue.includes(country.code) && /* @__PURE__ */
|
|
40072
|
+
inputValue.includes(country.code) && /* @__PURE__ */ jsx150(Check, { className: "h-4 w-4 text-purple500" })
|
|
39843
40073
|
]
|
|
39844
40074
|
},
|
|
39845
40075
|
country.code
|
|
39846
40076
|
)) })
|
|
39847
40077
|
] })
|
|
39848
40078
|
] }),
|
|
39849
|
-
inputValue.length > 0 && /* @__PURE__ */
|
|
40079
|
+
inputValue.length > 0 && /* @__PURE__ */ jsx150("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ jsxs111(
|
|
39850
40080
|
Badge2,
|
|
39851
40081
|
{
|
|
39852
40082
|
className: "flex items-center gap-1 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
|
|
39853
40083
|
children: [
|
|
39854
40084
|
countryCode,
|
|
39855
|
-
/* @__PURE__ */
|
|
40085
|
+
/* @__PURE__ */ jsxs111(
|
|
39856
40086
|
"button",
|
|
39857
40087
|
{
|
|
39858
40088
|
onClick: () => onChange(inputValue.filter((c) => c !== countryCode)),
|
|
39859
40089
|
className: "hover:bg-purple200 rounded-full p-0.5 transition-colors",
|
|
39860
40090
|
children: [
|
|
39861
|
-
/* @__PURE__ */
|
|
40091
|
+
/* @__PURE__ */ jsx150(X, { className: "h-3 w-3" }),
|
|
39862
40092
|
" "
|
|
39863
40093
|
]
|
|
39864
40094
|
}
|
|
@@ -39876,13 +40106,13 @@ var CountrySelectDisplay = ({ value }) => {
|
|
|
39876
40106
|
return [];
|
|
39877
40107
|
}, [value]);
|
|
39878
40108
|
if (displayValues.length === 0) {
|
|
39879
|
-
return /* @__PURE__ */
|
|
40109
|
+
return /* @__PURE__ */ jsx150("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
39880
40110
|
}
|
|
39881
|
-
return /* @__PURE__ */
|
|
40111
|
+
return /* @__PURE__ */ jsx150("div", { className: "flex flex-wrap gap-2 pt-1", children: displayValues.map((item) => {
|
|
39882
40112
|
const country = countries.find(
|
|
39883
40113
|
(c) => c.code.toLowerCase() === item.toLowerCase() || c.name.toLowerCase() === item.toLowerCase()
|
|
39884
40114
|
);
|
|
39885
|
-
return /* @__PURE__ */
|
|
40115
|
+
return /* @__PURE__ */ jsx150(
|
|
39886
40116
|
"div",
|
|
39887
40117
|
{
|
|
39888
40118
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
@@ -39916,22 +40146,22 @@ var KeywordBundlesEdit = ({
|
|
|
39916
40146
|
});
|
|
39917
40147
|
});
|
|
39918
40148
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
39919
|
-
return /* @__PURE__ */
|
|
39920
|
-
/* @__PURE__ */
|
|
39921
|
-
/* @__PURE__ */
|
|
40149
|
+
return /* @__PURE__ */ jsx150("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ jsxs111("div", { className: "space-y-3", children: [
|
|
40150
|
+
/* @__PURE__ */ jsxs111("div", { className: "flex items-center gap-2", children: [
|
|
40151
|
+
/* @__PURE__ */ jsxs111("div", { className: "inline-block px-3 py-1 bg-purple200 hover:bg-purple200 text-purpleText text-sm font-medium rounded-md uppercase", children: [
|
|
39922
40152
|
"Priority ",
|
|
39923
40153
|
priority
|
|
39924
40154
|
] }),
|
|
39925
|
-
/* @__PURE__ */
|
|
40155
|
+
/* @__PURE__ */ jsx150("div", { className: "h-px flex-1 bg-white/10" })
|
|
39926
40156
|
] }),
|
|
39927
|
-
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */
|
|
40157
|
+
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ jsx150(
|
|
39928
40158
|
"div",
|
|
39929
40159
|
{
|
|
39930
40160
|
className: "bg-gray-50/50 border border-gray-100 rounded-xl p-4 transition-all hover:bg-gray-50 hover:border-gray-200 shadow-sm",
|
|
39931
|
-
children: /* @__PURE__ */
|
|
39932
|
-
/* @__PURE__ */
|
|
39933
|
-
/* @__PURE__ */
|
|
39934
|
-
/* @__PURE__ */
|
|
40161
|
+
children: /* @__PURE__ */ jsxs111("div", { className: "flex flex-col gap-3", children: [
|
|
40162
|
+
/* @__PURE__ */ jsx150("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
|
|
40163
|
+
/* @__PURE__ */ jsxs111("div", { className: "space-y-3", children: [
|
|
40164
|
+
/* @__PURE__ */ jsx150("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ jsxs111(
|
|
39935
40165
|
"div",
|
|
39936
40166
|
{
|
|
39937
40167
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium hover:bg-red-900/40 hover:border-red-500 transition-all cursor-pointer group",
|
|
@@ -39948,12 +40178,12 @@ var KeywordBundlesEdit = ({
|
|
|
39948
40178
|
},
|
|
39949
40179
|
children: [
|
|
39950
40180
|
keyword,
|
|
39951
|
-
/* @__PURE__ */
|
|
40181
|
+
/* @__PURE__ */ jsx150("span", { className: "ml-1 opacity-60 group-hover:opacity-100 transition-opacity", children: "\xD7" })
|
|
39952
40182
|
]
|
|
39953
40183
|
},
|
|
39954
40184
|
kIndex
|
|
39955
40185
|
)) }),
|
|
39956
|
-
/* @__PURE__ */
|
|
40186
|
+
/* @__PURE__ */ jsx150("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx150(
|
|
39957
40187
|
"input",
|
|
39958
40188
|
{
|
|
39959
40189
|
type: "text",
|
|
@@ -39977,9 +40207,9 @@ var KeywordBundlesEdit = ({
|
|
|
39977
40207
|
}
|
|
39978
40208
|
) })
|
|
39979
40209
|
] }),
|
|
39980
|
-
/* @__PURE__ */
|
|
39981
|
-
/* @__PURE__ */
|
|
39982
|
-
/* @__PURE__ */
|
|
40210
|
+
/* @__PURE__ */ jsxs111("div", { className: "flex flex-col gap-1.5 mt-1", children: [
|
|
40211
|
+
/* @__PURE__ */ jsx150("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
|
|
40212
|
+
/* @__PURE__ */ jsx150(
|
|
39983
40213
|
"input",
|
|
39984
40214
|
{
|
|
39985
40215
|
type: "number",
|
|
@@ -40007,7 +40237,7 @@ var KeywordBundlesEdit = ({
|
|
|
40007
40237
|
var KeywordBundlesDisplay = ({ value }) => {
|
|
40008
40238
|
const bundles = Array.isArray(value) ? value : [];
|
|
40009
40239
|
if (bundles.length === 0)
|
|
40010
|
-
return /* @__PURE__ */
|
|
40240
|
+
return /* @__PURE__ */ jsx150("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
|
|
40011
40241
|
const groups = {};
|
|
40012
40242
|
bundles.forEach((b, idx) => {
|
|
40013
40243
|
const p = Number(b?.priority) || idx + 1;
|
|
@@ -40020,17 +40250,17 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
40020
40250
|
groups[p].push(...keywords);
|
|
40021
40251
|
});
|
|
40022
40252
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
40023
|
-
return /* @__PURE__ */
|
|
40253
|
+
return /* @__PURE__ */ jsx150("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
|
|
40024
40254
|
const deduped = Array.from(new Set(groups[priority]));
|
|
40025
|
-
return /* @__PURE__ */
|
|
40026
|
-
/* @__PURE__ */
|
|
40027
|
-
/* @__PURE__ */
|
|
40255
|
+
return /* @__PURE__ */ jsxs111("div", { className: "space-y-3", children: [
|
|
40256
|
+
/* @__PURE__ */ jsxs111("div", { className: "flex items-center gap-2", children: [
|
|
40257
|
+
/* @__PURE__ */ jsxs111("div", { className: "inline-block px-3 py-1 bg-purple200 hover:bg-purple200 text-purpleText text-sm font-medium rounded-md uppercase", children: [
|
|
40028
40258
|
"Priority ",
|
|
40029
40259
|
priority
|
|
40030
40260
|
] }),
|
|
40031
|
-
/* @__PURE__ */
|
|
40261
|
+
/* @__PURE__ */ jsx150("div", { className: "h-px flex-1 bg-white/10" })
|
|
40032
40262
|
] }),
|
|
40033
|
-
/* @__PURE__ */
|
|
40263
|
+
/* @__PURE__ */ jsx150("div", { className: "flex flex-wrap gap-2 pt-1", children: deduped.map((keyword) => /* @__PURE__ */ jsx150(
|
|
40034
40264
|
"div",
|
|
40035
40265
|
{
|
|
40036
40266
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
|
|
@@ -40068,12 +40298,12 @@ var PlatformSelectEdit = ({
|
|
|
40068
40298
|
const options = useMemo5(() => {
|
|
40069
40299
|
return DEFAULT_PLATFORMS;
|
|
40070
40300
|
}, []);
|
|
40071
|
-
return /* @__PURE__ */
|
|
40301
|
+
return /* @__PURE__ */ jsx150("div", { className: "flex flex-wrap gap-4 py-2", children: options.map((platform) => /* @__PURE__ */ jsxs111(
|
|
40072
40302
|
"label",
|
|
40073
40303
|
{
|
|
40074
40304
|
className: "flex items-center gap-2 cursor-pointer group",
|
|
40075
40305
|
children: [
|
|
40076
|
-
/* @__PURE__ */
|
|
40306
|
+
/* @__PURE__ */ jsx150(
|
|
40077
40307
|
"div",
|
|
40078
40308
|
{
|
|
40079
40309
|
className: cn(
|
|
@@ -40081,10 +40311,10 @@ var PlatformSelectEdit = ({
|
|
|
40081
40311
|
isSelected(platform) ? "bg-purple-600 border-purple-600" : "border-gray-300 group-hover:border-purple-400"
|
|
40082
40312
|
),
|
|
40083
40313
|
onClick: () => togglePlatform(platform),
|
|
40084
|
-
children: isSelected(platform) && /* @__PURE__ */
|
|
40314
|
+
children: isSelected(platform) && /* @__PURE__ */ jsx150(Check, { className: "h-3.5 w-3.5 text-white stroke-[3]" })
|
|
40085
40315
|
}
|
|
40086
40316
|
),
|
|
40087
|
-
/* @__PURE__ */
|
|
40317
|
+
/* @__PURE__ */ jsx150("span", { className: "text-sm font-medium text-foreground select-none", children: platform })
|
|
40088
40318
|
]
|
|
40089
40319
|
},
|
|
40090
40320
|
platform
|
|
@@ -40099,9 +40329,9 @@ var PlatformSelectDisplay = ({ value }) => {
|
|
|
40099
40329
|
return [];
|
|
40100
40330
|
}, [value]);
|
|
40101
40331
|
if (displayValues.length === 0) {
|
|
40102
|
-
return /* @__PURE__ */
|
|
40332
|
+
return /* @__PURE__ */ jsx150("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
40103
40333
|
}
|
|
40104
|
-
return /* @__PURE__ */
|
|
40334
|
+
return /* @__PURE__ */ jsx150("div", { className: "flex flex-wrap gap-2 pt-1", children: displayValues.map((platform) => /* @__PURE__ */ jsx150(
|
|
40105
40335
|
"div",
|
|
40106
40336
|
{
|
|
40107
40337
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
@@ -40112,21 +40342,21 @@ var PlatformSelectDisplay = ({ value }) => {
|
|
|
40112
40342
|
};
|
|
40113
40343
|
|
|
40114
40344
|
// src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
|
|
40115
|
-
import { jsx as
|
|
40345
|
+
import { jsx as jsx151, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
40116
40346
|
var ObjectDisplay = ({ value }) => {
|
|
40117
40347
|
if (!value || typeof value !== "object") return null;
|
|
40118
|
-
return /* @__PURE__ */
|
|
40119
|
-
/* @__PURE__ */
|
|
40348
|
+
return /* @__PURE__ */ jsx151("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ jsxs112("div", { className: "flex gap-2 text-sm", children: [
|
|
40349
|
+
/* @__PURE__ */ jsxs112("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
|
|
40120
40350
|
k.replace(/_/g, " "),
|
|
40121
40351
|
":"
|
|
40122
40352
|
] }),
|
|
40123
|
-
/* @__PURE__ */
|
|
40353
|
+
/* @__PURE__ */ jsx151("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
|
|
40124
40354
|
] }, k)) });
|
|
40125
40355
|
};
|
|
40126
40356
|
var StringArrayDisplay = ({ value }) => {
|
|
40127
40357
|
if (!Array.isArray(value) || value.length === 0)
|
|
40128
|
-
return /* @__PURE__ */
|
|
40129
|
-
return /* @__PURE__ */
|
|
40358
|
+
return /* @__PURE__ */ jsx151("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
40359
|
+
return /* @__PURE__ */ jsx151("div", { className: "flex flex-wrap gap-2 pt-1", children: value.map((item) => /* @__PURE__ */ jsx151(
|
|
40130
40360
|
"div",
|
|
40131
40361
|
{
|
|
40132
40362
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
@@ -40144,8 +40374,8 @@ function buildCampaignSeedFields(data) {
|
|
|
40144
40374
|
key,
|
|
40145
40375
|
label: "Keyword Bundles",
|
|
40146
40376
|
type: "custom",
|
|
40147
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40148
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40377
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(KeywordBundlesDisplay, { value: v }),
|
|
40378
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(
|
|
40149
40379
|
Textarea,
|
|
40150
40380
|
{
|
|
40151
40381
|
value: Array.isArray(v) ? v.map((b) => `${(b.keywords || []).join(", ")} (Priority: ${b.priority || 1})`).join("\n") : String(v || ""),
|
|
@@ -40177,8 +40407,8 @@ function buildCampaignSeedFields(data) {
|
|
|
40177
40407
|
key,
|
|
40178
40408
|
label: "Geography",
|
|
40179
40409
|
type: "custom",
|
|
40180
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40181
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40410
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(CountrySelectDisplay, { value: v }),
|
|
40411
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(CountrySelectEdit, { value: v, onChange })
|
|
40182
40412
|
};
|
|
40183
40413
|
}
|
|
40184
40414
|
if (key === "platforms" || key === "target_platforms" || key === "targetPlatforms") {
|
|
@@ -40186,8 +40416,8 @@ function buildCampaignSeedFields(data) {
|
|
|
40186
40416
|
key,
|
|
40187
40417
|
label: "Platforms",
|
|
40188
40418
|
type: "custom",
|
|
40189
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40190
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40419
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(PlatformSelectDisplay, { value: v }),
|
|
40420
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(
|
|
40191
40421
|
PlatformSelectEdit,
|
|
40192
40422
|
{
|
|
40193
40423
|
value: v,
|
|
@@ -40202,7 +40432,7 @@ function buildCampaignSeedFields(data) {
|
|
|
40202
40432
|
key,
|
|
40203
40433
|
label,
|
|
40204
40434
|
type: "custom",
|
|
40205
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40435
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(StringArrayDisplay, { value: v })
|
|
40206
40436
|
};
|
|
40207
40437
|
}
|
|
40208
40438
|
if (typeof value === "object" && value !== null && !Array.isArray(value) && "min" in value && "max" in value) {
|
|
@@ -40213,9 +40443,9 @@ function buildCampaignSeedFields(data) {
|
|
|
40213
40443
|
type: "custom",
|
|
40214
40444
|
renderDisplay: (v) => {
|
|
40215
40445
|
if (typeof v === "object" && v !== null) {
|
|
40216
|
-
return /* @__PURE__ */
|
|
40446
|
+
return /* @__PURE__ */ jsx151("span", { className: "text-foreground font-medium", children: `${v.min?.toLocaleString()} - ${v.max?.toLocaleString()}` });
|
|
40217
40447
|
}
|
|
40218
|
-
return /* @__PURE__ */
|
|
40448
|
+
return /* @__PURE__ */ jsx151("span", { className: "text-foreground font-medium", children: v });
|
|
40219
40449
|
}
|
|
40220
40450
|
};
|
|
40221
40451
|
}
|
|
@@ -40225,8 +40455,8 @@ function buildCampaignSeedFields(data) {
|
|
|
40225
40455
|
key,
|
|
40226
40456
|
label,
|
|
40227
40457
|
type: "custom",
|
|
40228
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40229
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40458
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(ObjectDisplay, { value: v }),
|
|
40459
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(
|
|
40230
40460
|
Textarea,
|
|
40231
40461
|
{
|
|
40232
40462
|
value: Object.entries(v || {}).map(([k, val]) => `${k.replace(/_/g, " ")}: ${val}`).join("\n"),
|
|
@@ -40251,7 +40481,7 @@ function buildCampaignSeedFields(data) {
|
|
|
40251
40481
|
return generated;
|
|
40252
40482
|
});
|
|
40253
40483
|
}
|
|
40254
|
-
var CampaignSeedCard =
|
|
40484
|
+
var CampaignSeedCard = React109.memo(
|
|
40255
40485
|
({
|
|
40256
40486
|
selectionStatus,
|
|
40257
40487
|
isLatestMessage = true,
|
|
@@ -40274,7 +40504,7 @@ var CampaignSeedCard = React108.memo(
|
|
|
40274
40504
|
});
|
|
40275
40505
|
};
|
|
40276
40506
|
const effectiveIsLatest = isLatestMessage && !hasUserResponded;
|
|
40277
|
-
return /* @__PURE__ */
|
|
40507
|
+
return /* @__PURE__ */ jsx151("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx151(
|
|
40278
40508
|
FormCard,
|
|
40279
40509
|
{
|
|
40280
40510
|
...formCardProps,
|
|
@@ -40286,9 +40516,9 @@ var CampaignSeedCard = React108.memo(
|
|
|
40286
40516
|
showTimeline: true,
|
|
40287
40517
|
isLatestMessage: effectiveIsLatest,
|
|
40288
40518
|
className,
|
|
40289
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */
|
|
40290
|
-
/* @__PURE__ */
|
|
40291
|
-
/* @__PURE__ */
|
|
40519
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs112("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
|
|
40520
|
+
/* @__PURE__ */ jsx151(CircleCheck, { className: "h-3 w-3" }),
|
|
40521
|
+
/* @__PURE__ */ jsx151("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
|
|
40292
40522
|
] }) : formCardProps.footer
|
|
40293
40523
|
}
|
|
40294
40524
|
) });
|
|
@@ -40297,22 +40527,22 @@ var CampaignSeedCard = React108.memo(
|
|
|
40297
40527
|
CampaignSeedCard.displayName = "CampaignSeedCard";
|
|
40298
40528
|
|
|
40299
40529
|
// src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
|
|
40300
|
-
import
|
|
40301
|
-
import { jsx as
|
|
40530
|
+
import React110, { useMemo as useMemo7 } from "react";
|
|
40531
|
+
import { jsx as jsx152, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
40302
40532
|
var ObjectDisplay2 = ({ value }) => {
|
|
40303
40533
|
if (!value || typeof value !== "object") return null;
|
|
40304
|
-
return /* @__PURE__ */
|
|
40305
|
-
/* @__PURE__ */
|
|
40534
|
+
return /* @__PURE__ */ jsx152("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ jsxs113("div", { className: "flex gap-2 text-sm", children: [
|
|
40535
|
+
/* @__PURE__ */ jsxs113("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
|
|
40306
40536
|
k.replace(/_/g, " "),
|
|
40307
40537
|
":"
|
|
40308
40538
|
] }),
|
|
40309
|
-
/* @__PURE__ */
|
|
40539
|
+
/* @__PURE__ */ jsx152("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
|
|
40310
40540
|
] }, k)) });
|
|
40311
40541
|
};
|
|
40312
40542
|
var StringArrayDisplay2 = ({ value }) => {
|
|
40313
40543
|
if (!Array.isArray(value) || value.length === 0)
|
|
40314
|
-
return /* @__PURE__ */
|
|
40315
|
-
return /* @__PURE__ */
|
|
40544
|
+
return /* @__PURE__ */ jsx152("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
40545
|
+
return /* @__PURE__ */ jsx152("div", { className: "flex flex-wrap gap-2 pt-1", children: value.map((item) => /* @__PURE__ */ jsx152(
|
|
40316
40546
|
"div",
|
|
40317
40547
|
{
|
|
40318
40548
|
className: "flex items-center gap-2 px-3 py-1 bg-grayPill border border-foreground rounded-md text-foreground text-sm font-grotesk font-medium",
|
|
@@ -40330,8 +40560,8 @@ function buildSearchSpecFields(data) {
|
|
|
40330
40560
|
key,
|
|
40331
40561
|
label: "Keyword Bundles",
|
|
40332
40562
|
type: "custom",
|
|
40333
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40334
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40563
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx152(KeywordBundlesDisplay, { value: v }),
|
|
40564
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx152(KeywordBundlesEdit, { value: v, onChange })
|
|
40335
40565
|
};
|
|
40336
40566
|
}
|
|
40337
40567
|
if (key === "geography") {
|
|
@@ -40339,8 +40569,8 @@ function buildSearchSpecFields(data) {
|
|
|
40339
40569
|
key,
|
|
40340
40570
|
label: "Geography",
|
|
40341
40571
|
type: "custom",
|
|
40342
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40343
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40572
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx152(CountrySelectDisplay, { value: v }),
|
|
40573
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx152(CountrySelectEdit, { value: v, onChange })
|
|
40344
40574
|
};
|
|
40345
40575
|
}
|
|
40346
40576
|
if (key === "platforms" && Array.isArray(value)) {
|
|
@@ -40351,8 +40581,8 @@ function buildSearchSpecFields(data) {
|
|
|
40351
40581
|
config: {
|
|
40352
40582
|
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
40353
40583
|
},
|
|
40354
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40355
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40584
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx152(PlatformSelectDisplay, { value: v }),
|
|
40585
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx152(
|
|
40356
40586
|
PlatformSelectEdit,
|
|
40357
40587
|
{
|
|
40358
40588
|
value: v,
|
|
@@ -40366,8 +40596,8 @@ function buildSearchSpecFields(data) {
|
|
|
40366
40596
|
key,
|
|
40367
40597
|
label: "Exclude Keywords",
|
|
40368
40598
|
type: "custom",
|
|
40369
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40370
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40599
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx152(StringArrayDisplay2, { value: v }),
|
|
40600
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx152(
|
|
40371
40601
|
Textarea,
|
|
40372
40602
|
{
|
|
40373
40603
|
value: Array.isArray(v) ? v.join(", ") : String(v || ""),
|
|
@@ -40387,8 +40617,8 @@ function buildSearchSpecFields(data) {
|
|
|
40387
40617
|
key,
|
|
40388
40618
|
label,
|
|
40389
40619
|
type: "custom",
|
|
40390
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40391
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40620
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx152(ObjectDisplay2, { value: v }),
|
|
40621
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx152(
|
|
40392
40622
|
Textarea,
|
|
40393
40623
|
{
|
|
40394
40624
|
value: Object.entries(v || {}).map(([k, val]) => `${k.replace(/_/g, " ")}: ${val}`).join("\n"),
|
|
@@ -40413,7 +40643,7 @@ function buildSearchSpecFields(data) {
|
|
|
40413
40643
|
return generated;
|
|
40414
40644
|
});
|
|
40415
40645
|
}
|
|
40416
|
-
var SearchSpecCard =
|
|
40646
|
+
var SearchSpecCard = React110.memo(
|
|
40417
40647
|
({
|
|
40418
40648
|
selectionStatus,
|
|
40419
40649
|
isLatestMessage = true,
|
|
@@ -40441,7 +40671,7 @@ var SearchSpecCard = React109.memo(
|
|
|
40441
40671
|
});
|
|
40442
40672
|
};
|
|
40443
40673
|
const effectiveIsLatest = isLatestMessage && !hasUserResponded;
|
|
40444
|
-
return /* @__PURE__ */
|
|
40674
|
+
return /* @__PURE__ */ jsx152("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx152(
|
|
40445
40675
|
FormCard,
|
|
40446
40676
|
{
|
|
40447
40677
|
...formCardProps,
|
|
@@ -40452,9 +40682,9 @@ var SearchSpecCard = React109.memo(
|
|
|
40452
40682
|
onProceed: handleProceed,
|
|
40453
40683
|
isLatestMessage: effectiveIsLatest,
|
|
40454
40684
|
className,
|
|
40455
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */
|
|
40456
|
-
/* @__PURE__ */
|
|
40457
|
-
/* @__PURE__ */
|
|
40685
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs113("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-1", children: [
|
|
40686
|
+
/* @__PURE__ */ jsx152(CircleCheck, { className: "h-3 w-3" }),
|
|
40687
|
+
/* @__PURE__ */ jsx152("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
|
|
40458
40688
|
] }) : formCardProps.footer
|
|
40459
40689
|
}
|
|
40460
40690
|
) });
|
|
@@ -40463,7 +40693,7 @@ var SearchSpecCard = React109.memo(
|
|
|
40463
40693
|
SearchSpecCard.displayName = "SearchSpecCard";
|
|
40464
40694
|
|
|
40465
40695
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
40466
|
-
import
|
|
40696
|
+
import React111 from "react";
|
|
40467
40697
|
|
|
40468
40698
|
// src/molecules/creator-discovery/MCQCard/defaultFetchers.ts
|
|
40469
40699
|
function getBackendOrigin() {
|
|
@@ -40563,8 +40793,8 @@ async function defaultPersistSelection(sessionId, questionKey, value) {
|
|
|
40563
40793
|
}
|
|
40564
40794
|
|
|
40565
40795
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
40566
|
-
import { jsx as
|
|
40567
|
-
var MCQCard =
|
|
40796
|
+
import { jsx as jsx153, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
40797
|
+
var MCQCard = React111.memo(
|
|
40568
40798
|
({
|
|
40569
40799
|
question,
|
|
40570
40800
|
options,
|
|
@@ -40589,16 +40819,16 @@ var MCQCard = React110.memo(
|
|
|
40589
40819
|
const resolvedOptions = options || allProps.Options || allProps.opts || {};
|
|
40590
40820
|
const resolvedRecommended = recommended || allProps.Recommended || allProps.rec;
|
|
40591
40821
|
console.log("[MCQCard] FULL PROPS:", { allProps, resolvedQuestion, resolvedOptions: Object.keys(resolvedOptions || {}), resolvedRecommended });
|
|
40592
|
-
const [selectedOption, setSelectedOption] =
|
|
40593
|
-
const [isProceeded, setIsProceeded] =
|
|
40594
|
-
const fetchedSessionRef =
|
|
40595
|
-
|
|
40822
|
+
const [selectedOption, setSelectedOption] = React111.useState(propsSelectedOption);
|
|
40823
|
+
const [isProceeded, setIsProceeded] = React111.useState(false);
|
|
40824
|
+
const fetchedSessionRef = React111.useRef("");
|
|
40825
|
+
React111.useEffect(() => {
|
|
40596
40826
|
if (propsSelectedOption) {
|
|
40597
40827
|
setSelectedOption(propsSelectedOption);
|
|
40598
40828
|
setIsProceeded(true);
|
|
40599
40829
|
}
|
|
40600
40830
|
}, [propsSelectedOption]);
|
|
40601
|
-
const buildQuestionKey =
|
|
40831
|
+
const buildQuestionKey = React111.useCallback((sid, question2) => {
|
|
40602
40832
|
let hash = 2166136261;
|
|
40603
40833
|
for (let i = 0; i < question2.length; i++) {
|
|
40604
40834
|
hash ^= question2.charCodeAt(i);
|
|
@@ -40606,7 +40836,7 @@ var MCQCard = React110.memo(
|
|
|
40606
40836
|
}
|
|
40607
40837
|
return `mcq_${sid}_${hash.toString(36)}`;
|
|
40608
40838
|
}, []);
|
|
40609
|
-
|
|
40839
|
+
React111.useEffect(() => {
|
|
40610
40840
|
if (!sessionId || !resolvedQuestion) return;
|
|
40611
40841
|
const fetchKey = `${sessionId}::${resolvedQuestion}`;
|
|
40612
40842
|
if (fetchedSessionRef.current === fetchKey) return;
|
|
@@ -40669,7 +40899,7 @@ A: ${label}`);
|
|
|
40669
40899
|
key,
|
|
40670
40900
|
typeof val === "string" ? val : typeof val === "object" && val !== null ? val.label || val.description || val.id || JSON.stringify(val) : String(val ?? "")
|
|
40671
40901
|
]) : [];
|
|
40672
|
-
return /* @__PURE__ */
|
|
40902
|
+
return /* @__PURE__ */ jsxs114(
|
|
40673
40903
|
"div",
|
|
40674
40904
|
{
|
|
40675
40905
|
className: cn(
|
|
@@ -40677,11 +40907,11 @@ A: ${label}`);
|
|
|
40677
40907
|
className
|
|
40678
40908
|
),
|
|
40679
40909
|
children: [
|
|
40680
|
-
/* @__PURE__ */
|
|
40681
|
-
/* @__PURE__ */
|
|
40910
|
+
/* @__PURE__ */ jsx153("div", { className: "mb-4", children: /* @__PURE__ */ jsx153("p", { className: "text-sm text-cardText", children: resolvedQuestion || "Select an option:" }) }),
|
|
40911
|
+
/* @__PURE__ */ jsx153("div", { className: "space-y-2.5 mb-4", children: optionsEntries.map(([key, label]) => {
|
|
40682
40912
|
const isSelected = selectedOption === key;
|
|
40683
40913
|
const isRecommended = key === recommended;
|
|
40684
|
-
return /* @__PURE__ */
|
|
40914
|
+
return /* @__PURE__ */ jsx153(
|
|
40685
40915
|
"div",
|
|
40686
40916
|
{
|
|
40687
40917
|
onClick: (e) => handleOptionClick(key, e),
|
|
@@ -40692,8 +40922,8 @@ A: ${label}`);
|
|
|
40692
40922
|
!selectedOption && !isOptionsDisabled && "hover:border-gray500",
|
|
40693
40923
|
(isLoading || isOptionsDisabled) && "opacity-50 cursor-not-allowed"
|
|
40694
40924
|
),
|
|
40695
|
-
children: /* @__PURE__ */
|
|
40696
|
-
/* @__PURE__ */
|
|
40925
|
+
children: /* @__PURE__ */ jsxs114("div", { className: "flex items-start gap-3", children: [
|
|
40926
|
+
/* @__PURE__ */ jsx153("div", { className: "mt-0.5 flex-shrink-0", children: /* @__PURE__ */ jsx153(
|
|
40697
40927
|
"div",
|
|
40698
40928
|
{
|
|
40699
40929
|
className: cn(
|
|
@@ -40703,19 +40933,19 @@ A: ${label}`);
|
|
|
40703
40933
|
!selectedOption && !isOptionsDisabled && "hover:border-gold"
|
|
40704
40934
|
)
|
|
40705
40935
|
),
|
|
40706
|
-
children: isSelected && /* @__PURE__ */
|
|
40936
|
+
children: isSelected && /* @__PURE__ */ jsx153("div", { className: "w-2 h-2 rounded-full bg-gold" })
|
|
40707
40937
|
}
|
|
40708
40938
|
) }),
|
|
40709
|
-
/* @__PURE__ */
|
|
40710
|
-
isRecommended && /* @__PURE__ */
|
|
40711
|
-
/* @__PURE__ */
|
|
40939
|
+
/* @__PURE__ */ jsxs114("div", { className: "flex-1 min-w-0", children: [
|
|
40940
|
+
isRecommended && /* @__PURE__ */ jsx153("p", { className: "text-xs font-semibold text-gold mb-1", children: "Recommended" }),
|
|
40941
|
+
/* @__PURE__ */ jsx153("p", { className: "text-sm text-cardText", children: label })
|
|
40712
40942
|
] })
|
|
40713
40943
|
] })
|
|
40714
40944
|
},
|
|
40715
40945
|
key
|
|
40716
40946
|
);
|
|
40717
40947
|
}) }),
|
|
40718
|
-
/* @__PURE__ */
|
|
40948
|
+
/* @__PURE__ */ jsx153("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx153(
|
|
40719
40949
|
"button",
|
|
40720
40950
|
{
|
|
40721
40951
|
onClick: handleProceed,
|
|
@@ -40736,8 +40966,8 @@ A: ${label}`);
|
|
|
40736
40966
|
MCQCard.displayName = "MCQCard";
|
|
40737
40967
|
|
|
40738
40968
|
// src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx
|
|
40739
|
-
import { jsx as
|
|
40740
|
-
var TikTokIcon = ({ className }) => /* @__PURE__ */
|
|
40969
|
+
import { jsx as jsx154 } from "react/jsx-runtime";
|
|
40970
|
+
var TikTokIcon = ({ className }) => /* @__PURE__ */ jsx154(Video, { className });
|
|
40741
40971
|
var PlatformIconGroup = ({
|
|
40742
40972
|
platforms,
|
|
40743
40973
|
className
|
|
@@ -40770,10 +41000,10 @@ var PlatformIconGroup = ({
|
|
|
40770
41000
|
return "text-gray-500 bg-gray-50 border-gray-100";
|
|
40771
41001
|
}
|
|
40772
41002
|
};
|
|
40773
|
-
return /* @__PURE__ */
|
|
41003
|
+
return /* @__PURE__ */ jsx154("div", { className: cn("flex gap-2", className), children: platforms.map((p, i) => {
|
|
40774
41004
|
const Icon3 = getIcon(p.platform);
|
|
40775
41005
|
if (!Icon3) return null;
|
|
40776
|
-
return /* @__PURE__ */
|
|
41006
|
+
return /* @__PURE__ */ jsx154(
|
|
40777
41007
|
"a",
|
|
40778
41008
|
{
|
|
40779
41009
|
href: p.url || "#",
|
|
@@ -40784,7 +41014,7 @@ var PlatformIconGroup = ({
|
|
|
40784
41014
|
"p-1.5 rounded-lg border transition-colors flex items-center justify-center",
|
|
40785
41015
|
getColors(p.platform)
|
|
40786
41016
|
),
|
|
40787
|
-
children: /* @__PURE__ */
|
|
41017
|
+
children: /* @__PURE__ */ jsx154(Icon3, { className: "w-4 h-4" })
|
|
40788
41018
|
},
|
|
40789
41019
|
i
|
|
40790
41020
|
);
|
|
@@ -40792,7 +41022,7 @@ var PlatformIconGroup = ({
|
|
|
40792
41022
|
};
|
|
40793
41023
|
|
|
40794
41024
|
// src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx
|
|
40795
|
-
import { jsx as
|
|
41025
|
+
import { jsx as jsx155, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
40796
41026
|
var CreatorProfileSummary = ({
|
|
40797
41027
|
avatarSrc,
|
|
40798
41028
|
name,
|
|
@@ -40800,7 +41030,7 @@ var CreatorProfileSummary = ({
|
|
|
40800
41030
|
engagementRate,
|
|
40801
41031
|
className
|
|
40802
41032
|
}) => {
|
|
40803
|
-
return /* @__PURE__ */
|
|
41033
|
+
return /* @__PURE__ */ jsxs115(
|
|
40804
41034
|
"div",
|
|
40805
41035
|
{
|
|
40806
41036
|
className: cn(
|
|
@@ -40808,7 +41038,7 @@ var CreatorProfileSummary = ({
|
|
|
40808
41038
|
className
|
|
40809
41039
|
),
|
|
40810
41040
|
children: [
|
|
40811
|
-
/* @__PURE__ */
|
|
41041
|
+
/* @__PURE__ */ jsx155(
|
|
40812
41042
|
AvatarAtom,
|
|
40813
41043
|
{
|
|
40814
41044
|
id: `avatar-${name}`,
|
|
@@ -40818,8 +41048,8 @@ var CreatorProfileSummary = ({
|
|
|
40818
41048
|
className: "w-12 h-12 ring-2 ring-purple-100"
|
|
40819
41049
|
}
|
|
40820
41050
|
),
|
|
40821
|
-
/* @__PURE__ */
|
|
40822
|
-
/* @__PURE__ */
|
|
41051
|
+
/* @__PURE__ */ jsxs115("div", { className: "flex flex-col flex-1", children: [
|
|
41052
|
+
/* @__PURE__ */ jsx155(
|
|
40823
41053
|
TextAtom,
|
|
40824
41054
|
{
|
|
40825
41055
|
id: `name-${name}`,
|
|
@@ -40829,14 +41059,14 @@ var CreatorProfileSummary = ({
|
|
|
40829
41059
|
className: "text-gray-900 leading-tight"
|
|
40830
41060
|
}
|
|
40831
41061
|
),
|
|
40832
|
-
/* @__PURE__ */
|
|
40833
|
-
followerCount && /* @__PURE__ */
|
|
40834
|
-
/* @__PURE__ */
|
|
40835
|
-
/* @__PURE__ */
|
|
41062
|
+
/* @__PURE__ */ jsxs115("div", { className: "flex gap-3 mt-1", children: [
|
|
41063
|
+
followerCount && /* @__PURE__ */ jsxs115("div", { className: "flex flex-col", children: [
|
|
41064
|
+
/* @__PURE__ */ jsx155("span", { className: "text-[10px] uppercase tracking-wider text-muted-foreground font-bold", children: "Followers" }),
|
|
41065
|
+
/* @__PURE__ */ jsx155("span", { className: "text-xs font-semibold text-purple-700", children: followerCount })
|
|
40836
41066
|
] }),
|
|
40837
|
-
engagementRate && /* @__PURE__ */
|
|
40838
|
-
/* @__PURE__ */
|
|
40839
|
-
/* @__PURE__ */
|
|
41067
|
+
engagementRate && /* @__PURE__ */ jsxs115("div", { className: "flex flex-col border-l border-purple-100 pl-3", children: [
|
|
41068
|
+
/* @__PURE__ */ jsx155("span", { className: "text-[10px] uppercase tracking-wider text-muted-foreground font-bold", children: "Engagement" }),
|
|
41069
|
+
/* @__PURE__ */ jsx155("span", { className: "text-xs font-semibold text-indigo-600", children: engagementRate })
|
|
40840
41070
|
] })
|
|
40841
41071
|
] })
|
|
40842
41072
|
] })
|
|
@@ -40846,13 +41076,13 @@ var CreatorProfileSummary = ({
|
|
|
40846
41076
|
};
|
|
40847
41077
|
|
|
40848
41078
|
// src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx
|
|
40849
|
-
import { jsx as
|
|
41079
|
+
import { jsx as jsx156, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
40850
41080
|
var AudienceMetricCard = ({
|
|
40851
41081
|
title,
|
|
40852
41082
|
metrics,
|
|
40853
41083
|
className
|
|
40854
41084
|
}) => {
|
|
40855
|
-
return /* @__PURE__ */
|
|
41085
|
+
return /* @__PURE__ */ jsxs116(
|
|
40856
41086
|
Card,
|
|
40857
41087
|
{
|
|
40858
41088
|
className: cn(
|
|
@@ -40860,13 +41090,13 @@ var AudienceMetricCard = ({
|
|
|
40860
41090
|
className
|
|
40861
41091
|
),
|
|
40862
41092
|
children: [
|
|
40863
|
-
/* @__PURE__ */
|
|
40864
|
-
/* @__PURE__ */
|
|
40865
|
-
/* @__PURE__ */
|
|
40866
|
-
/* @__PURE__ */
|
|
40867
|
-
/* @__PURE__ */
|
|
41093
|
+
/* @__PURE__ */ jsx156(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx156(CardTitle, { className: "text-lg font-bold text-gray-900", children: title }) }),
|
|
41094
|
+
/* @__PURE__ */ jsx156(CardContent, { className: "space-y-4", children: metrics.map((metric, i) => /* @__PURE__ */ jsxs116("div", { className: "space-y-1.5", children: [
|
|
41095
|
+
/* @__PURE__ */ jsxs116("div", { className: "flex justify-between items-center text-sm", children: [
|
|
41096
|
+
/* @__PURE__ */ jsx156("span", { className: "font-medium text-gray-700", children: metric.label }),
|
|
41097
|
+
/* @__PURE__ */ jsx156("span", { className: "font-bold text-gray-900", children: metric.value })
|
|
40868
41098
|
] }),
|
|
40869
|
-
metric.percentage !== void 0 && /* @__PURE__ */
|
|
41099
|
+
metric.percentage !== void 0 && /* @__PURE__ */ jsx156(
|
|
40870
41100
|
ProgressAtom,
|
|
40871
41101
|
{
|
|
40872
41102
|
id: `progress-${i}`,
|
|
@@ -40883,8 +41113,8 @@ var AudienceMetricCard = ({
|
|
|
40883
41113
|
};
|
|
40884
41114
|
|
|
40885
41115
|
// src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx
|
|
40886
|
-
import { jsx as
|
|
40887
|
-
var TikTokIcon2 = ({ className }) => /* @__PURE__ */
|
|
41116
|
+
import { jsx as jsx157, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
41117
|
+
var TikTokIcon2 = ({ className }) => /* @__PURE__ */ jsx157(Video, { className });
|
|
40888
41118
|
var CreatorGridCard = ({
|
|
40889
41119
|
bannerSrc,
|
|
40890
41120
|
avatarSrc,
|
|
@@ -40912,7 +41142,7 @@ var CreatorGridCard = ({
|
|
|
40912
41142
|
const safePlatforms = Array.isArray(platforms) ? platforms : [];
|
|
40913
41143
|
const safeMetrics = Array.isArray(metrics) ? metrics : [];
|
|
40914
41144
|
const displayName = typeof name === "string" ? name : String(name || "");
|
|
40915
|
-
return /* @__PURE__ */
|
|
41145
|
+
return /* @__PURE__ */ jsxs117(
|
|
40916
41146
|
Card,
|
|
40917
41147
|
{
|
|
40918
41148
|
className: cn(
|
|
@@ -40920,43 +41150,43 @@ var CreatorGridCard = ({
|
|
|
40920
41150
|
className
|
|
40921
41151
|
),
|
|
40922
41152
|
children: [
|
|
40923
|
-
/* @__PURE__ */
|
|
40924
|
-
bannerSrc ? /* @__PURE__ */
|
|
41153
|
+
/* @__PURE__ */ jsxs117("div", { className: "relative h-32 w-full overflow-hidden", children: [
|
|
41154
|
+
bannerSrc ? /* @__PURE__ */ jsx157(
|
|
40925
41155
|
"img",
|
|
40926
41156
|
{
|
|
40927
41157
|
src: bannerSrc,
|
|
40928
41158
|
alt: displayName,
|
|
40929
41159
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
|
|
40930
41160
|
}
|
|
40931
|
-
) : /* @__PURE__ */
|
|
40932
|
-
/* @__PURE__ */
|
|
41161
|
+
) : /* @__PURE__ */ jsx157("div", { className: "h-full w-full bg-gradient-to-br from-purple-500 to-indigo-600" }),
|
|
41162
|
+
/* @__PURE__ */ jsx157("div", { className: "absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/20 to-transparent" })
|
|
40933
41163
|
] }),
|
|
40934
|
-
/* @__PURE__ */
|
|
40935
|
-
/* @__PURE__ */
|
|
40936
|
-
/* @__PURE__ */
|
|
40937
|
-
/* @__PURE__ */
|
|
41164
|
+
/* @__PURE__ */ jsxs117(CardContent, { className: "relative pt-0 px-5 pb-6", children: [
|
|
41165
|
+
/* @__PURE__ */ jsx157("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ jsxs117(Avatar, { className: "h-20 w-20 border-4 border-[var(--card-background)] shadow-lg ring-2 ring-purple-100/20", children: [
|
|
41166
|
+
/* @__PURE__ */ jsx157(AvatarImage, { src: avatarSrc, alt: displayName }),
|
|
41167
|
+
/* @__PURE__ */ jsx157(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: displayName.charAt(0) || "?" })
|
|
40938
41168
|
] }) }),
|
|
40939
|
-
/* @__PURE__ */
|
|
40940
|
-
/* @__PURE__ */
|
|
40941
|
-
/* @__PURE__ */
|
|
41169
|
+
/* @__PURE__ */ jsxs117("div", { className: "mt-12 flex flex-col gap-1", children: [
|
|
41170
|
+
/* @__PURE__ */ jsx157("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: displayName }),
|
|
41171
|
+
/* @__PURE__ */ jsxs117("p", { className: "text-sm text-[var(--foreground)]/60 font-medium", children: [
|
|
40942
41172
|
"@",
|
|
40943
41173
|
handle
|
|
40944
41174
|
] })
|
|
40945
41175
|
] }),
|
|
40946
|
-
/* @__PURE__ */
|
|
41176
|
+
/* @__PURE__ */ jsx157("div", { className: "mt-4 flex gap-2", children: safePlatforms.map((p, i) => {
|
|
40947
41177
|
const Icon3 = getIcon(p);
|
|
40948
|
-
return Icon3 ? /* @__PURE__ */
|
|
41178
|
+
return Icon3 ? /* @__PURE__ */ jsx157(
|
|
40949
41179
|
"div",
|
|
40950
41180
|
{
|
|
40951
41181
|
className: "p-1.5 rounded-lg bg-[var(--foreground)]/5 text-[var(--foreground)]/60 hover:text-purple-500 hover:bg-purple-500/10 transition-colors",
|
|
40952
|
-
children: /* @__PURE__ */
|
|
41182
|
+
children: /* @__PURE__ */ jsx157(Icon3, { className: "h-4 w-4" })
|
|
40953
41183
|
},
|
|
40954
41184
|
typeof p === "string" ? p : i
|
|
40955
41185
|
) : null;
|
|
40956
41186
|
}) }),
|
|
40957
|
-
/* @__PURE__ */
|
|
40958
|
-
/* @__PURE__ */
|
|
40959
|
-
/* @__PURE__ */
|
|
41187
|
+
/* @__PURE__ */ jsx157("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: safeMetrics.map((m, i) => /* @__PURE__ */ jsxs117("div", { className: "flex flex-col", children: [
|
|
41188
|
+
/* @__PURE__ */ jsx157("span", { className: "text-[10px] font-bold uppercase tracking-wider text-[var(--foreground)]/40", children: m.label }),
|
|
41189
|
+
/* @__PURE__ */ jsx157("span", { className: "text-sm font-bold text-[var(--primary-color)]", children: m.value })
|
|
40960
41190
|
] }, i)) })
|
|
40961
41191
|
] })
|
|
40962
41192
|
]
|
|
@@ -40965,15 +41195,15 @@ var CreatorGridCard = ({
|
|
|
40965
41195
|
};
|
|
40966
41196
|
|
|
40967
41197
|
// src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx
|
|
40968
|
-
import { jsx as
|
|
41198
|
+
import { jsx as jsx158, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
40969
41199
|
var BrandAffinityGroup = ({
|
|
40970
41200
|
brands,
|
|
40971
41201
|
className
|
|
40972
41202
|
}) => {
|
|
40973
|
-
return /* @__PURE__ */
|
|
40974
|
-
/* @__PURE__ */
|
|
40975
|
-
/* @__PURE__ */
|
|
40976
|
-
/* @__PURE__ */
|
|
41203
|
+
return /* @__PURE__ */ jsxs118("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
41204
|
+
/* @__PURE__ */ jsx158("h5", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: "Recent Collaborations" }),
|
|
41205
|
+
/* @__PURE__ */ jsx158("div", { className: "flex flex-wrap gap-4 items-center", children: brands.map((brand, i) => /* @__PURE__ */ jsxs118("div", { className: "group relative", children: [
|
|
41206
|
+
/* @__PURE__ */ jsx158("div", { className: "h-10 w-10 overflow-hidden rounded-xl bg-white border border-gray-100 p-1.5 flex items-center justify-center grayscale hover:grayscale-0 transition-all duration-300 hover:scale-110 shadow-sm hover:shadow-md", children: /* @__PURE__ */ jsx158(
|
|
40977
41207
|
"img",
|
|
40978
41208
|
{
|
|
40979
41209
|
src: brand.logoSrc,
|
|
@@ -40981,18 +41211,18 @@ var BrandAffinityGroup = ({
|
|
|
40981
41211
|
className: "max-h-full max-w-full object-contain"
|
|
40982
41212
|
}
|
|
40983
41213
|
) }),
|
|
40984
|
-
/* @__PURE__ */
|
|
41214
|
+
/* @__PURE__ */ jsx158("div", { className: "absolute -bottom-6 left-1/2 -translate-x-1/2 px-2 py-0.5 bg-gray-900 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-50 pointer-events-none", children: brand.name })
|
|
40985
41215
|
] }, i)) })
|
|
40986
41216
|
] });
|
|
40987
41217
|
};
|
|
40988
41218
|
|
|
40989
41219
|
// src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx
|
|
40990
|
-
import { jsx as
|
|
41220
|
+
import { jsx as jsx159, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
40991
41221
|
var ContentPreviewGallery = ({
|
|
40992
41222
|
items,
|
|
40993
41223
|
className
|
|
40994
41224
|
}) => {
|
|
40995
|
-
return /* @__PURE__ */
|
|
41225
|
+
return /* @__PURE__ */ jsx159("div", { className: cn("grid grid-cols-2 gap-2", className), children: items.map((item, i) => /* @__PURE__ */ jsxs119(
|
|
40996
41226
|
"a",
|
|
40997
41227
|
{
|
|
40998
41228
|
href: item.url || "#",
|
|
@@ -41000,7 +41230,7 @@ var ContentPreviewGallery = ({
|
|
|
41000
41230
|
rel: "noopener noreferrer",
|
|
41001
41231
|
className: "group relative aspect-square overflow-hidden rounded-2xl bg-gray-100",
|
|
41002
41232
|
children: [
|
|
41003
|
-
/* @__PURE__ */
|
|
41233
|
+
/* @__PURE__ */ jsx159(
|
|
41004
41234
|
"img",
|
|
41005
41235
|
{
|
|
41006
41236
|
src: item.thumbnail,
|
|
@@ -41008,8 +41238,8 @@ var ContentPreviewGallery = ({
|
|
|
41008
41238
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
|
|
41009
41239
|
}
|
|
41010
41240
|
),
|
|
41011
|
-
item.type === "video" && /* @__PURE__ */
|
|
41012
|
-
/* @__PURE__ */
|
|
41241
|
+
item.type === "video" && /* @__PURE__ */ jsx159("div", { className: "absolute inset-0 flex items-center justify-center bg-black/10 group-hover:bg-black/20 transition-colors", children: /* @__PURE__ */ jsx159("div", { className: "rounded-full bg-white/30 backdrop-blur-md p-3 text-white ring-1 ring-white/50", children: /* @__PURE__ */ jsx159(Play, { className: "h-6 w-6 fill-white" }) }) }),
|
|
41242
|
+
/* @__PURE__ */ jsx159("div", { className: "absolute inset-0 ring-1 ring-inset ring-black/10 rounded-2xl" })
|
|
41013
41243
|
]
|
|
41014
41244
|
},
|
|
41015
41245
|
i
|
|
@@ -41017,10 +41247,10 @@ var ContentPreviewGallery = ({
|
|
|
41017
41247
|
};
|
|
41018
41248
|
|
|
41019
41249
|
// src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx
|
|
41020
|
-
import { jsx as
|
|
41250
|
+
import { jsx as jsx160, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
41021
41251
|
var AudienceDemographicsCard = ({ title, data, config, demographicType, className }) => {
|
|
41022
41252
|
const chartType = demographicType === "location" ? "bar" : "pie";
|
|
41023
|
-
return /* @__PURE__ */
|
|
41253
|
+
return /* @__PURE__ */ jsxs120(
|
|
41024
41254
|
Card,
|
|
41025
41255
|
{
|
|
41026
41256
|
className: cn(
|
|
@@ -41028,8 +41258,8 @@ var AudienceDemographicsCard = ({ title, data, config, demographicType, classNam
|
|
|
41028
41258
|
className
|
|
41029
41259
|
),
|
|
41030
41260
|
children: [
|
|
41031
|
-
/* @__PURE__ */
|
|
41032
|
-
/* @__PURE__ */
|
|
41261
|
+
/* @__PURE__ */ jsx160(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx160(CardTitle, { className: "text-lg font-bold text-gray-900", children: title }) }),
|
|
41262
|
+
/* @__PURE__ */ jsx160(CardContent, { children: /* @__PURE__ */ jsx160("div", { className: "h-[250px] w-full", children: /* @__PURE__ */ jsx160(
|
|
41033
41263
|
ChartAtom,
|
|
41034
41264
|
{
|
|
41035
41265
|
type: "chart",
|
|
@@ -41048,7 +41278,7 @@ var AudienceDemographicsCard = ({ title, data, config, demographicType, classNam
|
|
|
41048
41278
|
};
|
|
41049
41279
|
|
|
41050
41280
|
// src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx
|
|
41051
|
-
import { jsx as
|
|
41281
|
+
import { jsx as jsx161, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
41052
41282
|
var GrowthChartCard = ({
|
|
41053
41283
|
title,
|
|
41054
41284
|
data,
|
|
@@ -41057,7 +41287,7 @@ var GrowthChartCard = ({
|
|
|
41057
41287
|
period,
|
|
41058
41288
|
className
|
|
41059
41289
|
}) => {
|
|
41060
|
-
return /* @__PURE__ */
|
|
41290
|
+
return /* @__PURE__ */ jsxs121(
|
|
41061
41291
|
Card,
|
|
41062
41292
|
{
|
|
41063
41293
|
className: cn(
|
|
@@ -41065,15 +41295,15 @@ var GrowthChartCard = ({
|
|
|
41065
41295
|
className
|
|
41066
41296
|
),
|
|
41067
41297
|
children: [
|
|
41068
|
-
/* @__PURE__ */
|
|
41069
|
-
/* @__PURE__ */
|
|
41070
|
-
/* @__PURE__ */
|
|
41071
|
-
/* @__PURE__ */
|
|
41298
|
+
/* @__PURE__ */ jsxs121(CardHeader, { className: "flex flex-row items-center justify-between pb-2 space-y-0", children: [
|
|
41299
|
+
/* @__PURE__ */ jsxs121("div", { children: [
|
|
41300
|
+
/* @__PURE__ */ jsx161(CardTitle, { className: "text-lg font-bold text-gray-900", children: title }),
|
|
41301
|
+
/* @__PURE__ */ jsx161("p", { className: "text-xs text-muted-foreground", children: period })
|
|
41072
41302
|
] }),
|
|
41073
|
-
/* @__PURE__ */
|
|
41303
|
+
/* @__PURE__ */ jsx161("div", { className: "bg-green-50 p-2 rounded-xl", children: /* @__PURE__ */ jsx161(TrendingUp, { className: "w-4 h-4 text-green-600" }) })
|
|
41074
41304
|
] }),
|
|
41075
|
-
/* @__PURE__ */
|
|
41076
|
-
/* @__PURE__ */
|
|
41305
|
+
/* @__PURE__ */ jsxs121(CardContent, { children: [
|
|
41306
|
+
/* @__PURE__ */ jsx161("div", { className: "h-[200px] w-full mt-4", children: /* @__PURE__ */ jsx161(
|
|
41077
41307
|
ChartAtom,
|
|
41078
41308
|
{
|
|
41079
41309
|
type: "chart",
|
|
@@ -41086,9 +41316,9 @@ var GrowthChartCard = ({
|
|
|
41086
41316
|
showLegend: false
|
|
41087
41317
|
}
|
|
41088
41318
|
) }),
|
|
41089
|
-
/* @__PURE__ */
|
|
41090
|
-
/* @__PURE__ */
|
|
41091
|
-
/* @__PURE__ */
|
|
41319
|
+
/* @__PURE__ */ jsxs121("div", { className: "mt-4 flex items-center justify-between", children: [
|
|
41320
|
+
/* @__PURE__ */ jsx161("span", { className: "text-sm font-medium text-gray-500", children: metric }),
|
|
41321
|
+
/* @__PURE__ */ jsx161("span", { className: "text-sm font-bold text-purple-600", children: "+12.5%" })
|
|
41092
41322
|
] })
|
|
41093
41323
|
] })
|
|
41094
41324
|
]
|
|
@@ -41097,24 +41327,24 @@ var GrowthChartCard = ({
|
|
|
41097
41327
|
};
|
|
41098
41328
|
|
|
41099
41329
|
// src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx
|
|
41100
|
-
import { jsx as
|
|
41330
|
+
import { jsx as jsx162, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
41101
41331
|
var TopPostsGrid = ({
|
|
41102
41332
|
posts,
|
|
41103
41333
|
className
|
|
41104
41334
|
}) => {
|
|
41105
|
-
return /* @__PURE__ */
|
|
41335
|
+
return /* @__PURE__ */ jsx162(
|
|
41106
41336
|
"div",
|
|
41107
41337
|
{
|
|
41108
41338
|
className: cn(
|
|
41109
41339
|
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
41110
41340
|
className
|
|
41111
41341
|
),
|
|
41112
|
-
children: posts.map((post, i) => /* @__PURE__ */
|
|
41342
|
+
children: posts.map((post, i) => /* @__PURE__ */ jsxs122(
|
|
41113
41343
|
"div",
|
|
41114
41344
|
{
|
|
41115
41345
|
className: "group relative aspect-square overflow-hidden rounded-2xl bg-gray-100 border border-purple-50",
|
|
41116
41346
|
children: [
|
|
41117
|
-
/* @__PURE__ */
|
|
41347
|
+
/* @__PURE__ */ jsx162(
|
|
41118
41348
|
"img",
|
|
41119
41349
|
{
|
|
41120
41350
|
src: post.thumbnail,
|
|
@@ -41122,25 +41352,25 @@ var TopPostsGrid = ({
|
|
|
41122
41352
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
|
|
41123
41353
|
}
|
|
41124
41354
|
),
|
|
41125
|
-
/* @__PURE__ */
|
|
41126
|
-
/* @__PURE__ */
|
|
41127
|
-
/* @__PURE__ */
|
|
41128
|
-
/* @__PURE__ */
|
|
41355
|
+
/* @__PURE__ */ jsxs122("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity p-4 flex flex-col justify-end", children: [
|
|
41356
|
+
/* @__PURE__ */ jsxs122("div", { className: "flex items-center gap-4 text-white text-xs font-bold", children: [
|
|
41357
|
+
/* @__PURE__ */ jsxs122("span", { className: "flex items-center gap-1", children: [
|
|
41358
|
+
/* @__PURE__ */ jsx162(Heart, { className: "w-3 h-3 fill-white" }),
|
|
41129
41359
|
" ",
|
|
41130
41360
|
post.likes
|
|
41131
41361
|
] }),
|
|
41132
|
-
/* @__PURE__ */
|
|
41133
|
-
/* @__PURE__ */
|
|
41362
|
+
/* @__PURE__ */ jsxs122("span", { className: "flex items-center gap-1", children: [
|
|
41363
|
+
/* @__PURE__ */ jsx162(MessageCircle, { className: "w-3 h-3 fill-white" }),
|
|
41134
41364
|
" ",
|
|
41135
41365
|
post.comments
|
|
41136
41366
|
] }),
|
|
41137
|
-
/* @__PURE__ */
|
|
41138
|
-
/* @__PURE__ */
|
|
41367
|
+
/* @__PURE__ */ jsxs122("span", { className: "flex items-center gap-1", children: [
|
|
41368
|
+
/* @__PURE__ */ jsx162(ChartColumn, { className: "w-3 h-3" }),
|
|
41139
41369
|
" ",
|
|
41140
41370
|
post.engagement
|
|
41141
41371
|
] })
|
|
41142
41372
|
] }),
|
|
41143
|
-
/* @__PURE__ */
|
|
41373
|
+
/* @__PURE__ */ jsx162("span", { className: "text-[10px] text-gray-300 mt-2", children: post.date })
|
|
41144
41374
|
] })
|
|
41145
41375
|
]
|
|
41146
41376
|
},
|
|
@@ -41151,7 +41381,7 @@ var TopPostsGrid = ({
|
|
|
41151
41381
|
};
|
|
41152
41382
|
|
|
41153
41383
|
// src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx
|
|
41154
|
-
import { jsx as
|
|
41384
|
+
import { jsx as jsx163, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
41155
41385
|
var CreatorActionHeader = ({
|
|
41156
41386
|
bannerSrc,
|
|
41157
41387
|
avatarSrc,
|
|
@@ -41160,7 +41390,7 @@ var CreatorActionHeader = ({
|
|
|
41160
41390
|
actions,
|
|
41161
41391
|
className
|
|
41162
41392
|
}) => {
|
|
41163
|
-
return /* @__PURE__ */
|
|
41393
|
+
return /* @__PURE__ */ jsxs123(
|
|
41164
41394
|
"div",
|
|
41165
41395
|
{
|
|
41166
41396
|
className: cn(
|
|
@@ -41168,8 +41398,8 @@ var CreatorActionHeader = ({
|
|
|
41168
41398
|
className
|
|
41169
41399
|
),
|
|
41170
41400
|
children: [
|
|
41171
|
-
/* @__PURE__ */
|
|
41172
|
-
bannerSrc && /* @__PURE__ */
|
|
41401
|
+
/* @__PURE__ */ jsxs123("div", { className: "h-48 w-full bg-gradient-to-r from-purple-100 to-indigo-100 relative", children: [
|
|
41402
|
+
bannerSrc && /* @__PURE__ */ jsx163(
|
|
41173
41403
|
"img",
|
|
41174
41404
|
{
|
|
41175
41405
|
src: bannerSrc,
|
|
@@ -41177,23 +41407,23 @@ var CreatorActionHeader = ({
|
|
|
41177
41407
|
alt: "Banner"
|
|
41178
41408
|
}
|
|
41179
41409
|
),
|
|
41180
|
-
/* @__PURE__ */
|
|
41410
|
+
/* @__PURE__ */ jsx163("div", { className: "absolute inset-0 bg-black/5" })
|
|
41181
41411
|
] }),
|
|
41182
|
-
/* @__PURE__ */
|
|
41183
|
-
/* @__PURE__ */
|
|
41184
|
-
/* @__PURE__ */
|
|
41185
|
-
/* @__PURE__ */
|
|
41186
|
-
/* @__PURE__ */
|
|
41412
|
+
/* @__PURE__ */ jsxs123("div", { className: "px-8 pb-8 flex flex-col md:flex-row md:items-end justify-between gap-6 -mt-12 relative z-10", children: [
|
|
41413
|
+
/* @__PURE__ */ jsxs123("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-6", children: [
|
|
41414
|
+
/* @__PURE__ */ jsx163("div", { className: "p-2 bg-white rounded-[32px] shadow-lg", children: /* @__PURE__ */ jsxs123(Avatar, { className: "h-32 w-32 rounded-[24px] border-4 border-white", children: [
|
|
41415
|
+
/* @__PURE__ */ jsx163(AvatarImage, { src: avatarSrc, className: "rounded-[24px]" }),
|
|
41416
|
+
/* @__PURE__ */ jsx163(AvatarFallback, { className: "rounded-[24px] bg-purple-50 text-purple-600 text-3xl font-bold", children: name.charAt(0) })
|
|
41187
41417
|
] }) }),
|
|
41188
|
-
/* @__PURE__ */
|
|
41189
|
-
/* @__PURE__ */
|
|
41190
|
-
/* @__PURE__ */
|
|
41418
|
+
/* @__PURE__ */ jsxs123("div", { className: "mb-2", children: [
|
|
41419
|
+
/* @__PURE__ */ jsx163("h1", { className: "text-3xl font-bold text-gray-900 tracking-tight", children: name }),
|
|
41420
|
+
/* @__PURE__ */ jsxs123("p", { className: "text-purple-600 font-medium tracking-wide", children: [
|
|
41191
41421
|
"@",
|
|
41192
41422
|
handle
|
|
41193
41423
|
] })
|
|
41194
41424
|
] })
|
|
41195
41425
|
] }),
|
|
41196
|
-
/* @__PURE__ */
|
|
41426
|
+
/* @__PURE__ */ jsx163("div", { className: "flex items-center gap-3 mb-2", children: actions.map((action, i) => /* @__PURE__ */ jsx163(
|
|
41197
41427
|
Button,
|
|
41198
41428
|
{
|
|
41199
41429
|
variant: action.variant || "default",
|
|
@@ -41212,9 +41442,9 @@ var CreatorActionHeader = ({
|
|
|
41212
41442
|
};
|
|
41213
41443
|
|
|
41214
41444
|
// src/molecules/creator-discovery/CreatorSearchBox/CreatorSearch.tsx
|
|
41215
|
-
import
|
|
41216
|
-
import { jsx as
|
|
41217
|
-
var CreatorSearch =
|
|
41445
|
+
import React112, { useMemo as useMemo8 } from "react";
|
|
41446
|
+
import { jsx as jsx164, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
41447
|
+
var CreatorSearch = React112.memo(
|
|
41218
41448
|
({
|
|
41219
41449
|
selectionStatus,
|
|
41220
41450
|
isLatestMessage = true,
|
|
@@ -41231,7 +41461,7 @@ var CreatorSearch = React111.memo(
|
|
|
41231
41461
|
...field,
|
|
41232
41462
|
renderDisplay: (val) => {
|
|
41233
41463
|
const platforms = Array.isArray(val) ? val : [val];
|
|
41234
|
-
return /* @__PURE__ */
|
|
41464
|
+
return /* @__PURE__ */ jsx164("div", { className: "flex flex-wrap gap-2", children: platforms.map((p) => /* @__PURE__ */ jsx164(
|
|
41235
41465
|
BadgeAtom,
|
|
41236
41466
|
{
|
|
41237
41467
|
id: `platform-${p}`,
|
|
@@ -41248,13 +41478,13 @@ var CreatorSearch = React111.memo(
|
|
|
41248
41478
|
if (field.key === "geography") {
|
|
41249
41479
|
return {
|
|
41250
41480
|
...field,
|
|
41251
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41481
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx164(CountrySelectDisplay, { value: val })
|
|
41252
41482
|
};
|
|
41253
41483
|
}
|
|
41254
41484
|
if (field.key === "keywordBundles") {
|
|
41255
41485
|
return {
|
|
41256
41486
|
...field,
|
|
41257
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41487
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx164(KeywordBundlesDisplay, { value: val })
|
|
41258
41488
|
};
|
|
41259
41489
|
}
|
|
41260
41490
|
if (field.key === "followerRange") {
|
|
@@ -41262,9 +41492,9 @@ var CreatorSearch = React111.memo(
|
|
|
41262
41492
|
...field,
|
|
41263
41493
|
renderDisplay: (val) => {
|
|
41264
41494
|
if (typeof val === "object" && val !== null) {
|
|
41265
|
-
return /* @__PURE__ */
|
|
41495
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-white font-medium", children: `${val.min?.toLocaleString()} - ${val.max?.toLocaleString()} followers` });
|
|
41266
41496
|
}
|
|
41267
|
-
return /* @__PURE__ */
|
|
41497
|
+
return /* @__PURE__ */ jsxs124("span", { className: "text-white font-medium", children: [
|
|
41268
41498
|
val,
|
|
41269
41499
|
" followers"
|
|
41270
41500
|
] });
|
|
@@ -41274,7 +41504,7 @@ var CreatorSearch = React111.memo(
|
|
|
41274
41504
|
if (field.key === "initialCreators") {
|
|
41275
41505
|
return {
|
|
41276
41506
|
...field,
|
|
41277
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41507
|
+
renderDisplay: (val) => /* @__PURE__ */ jsxs124("span", { className: "text-white font-medium", children: [
|
|
41278
41508
|
val,
|
|
41279
41509
|
" creators"
|
|
41280
41510
|
] })
|
|
@@ -41283,7 +41513,7 @@ var CreatorSearch = React111.memo(
|
|
|
41283
41513
|
return field;
|
|
41284
41514
|
});
|
|
41285
41515
|
}, [providedFields, data]);
|
|
41286
|
-
return /* @__PURE__ */
|
|
41516
|
+
return /* @__PURE__ */ jsx164("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx164(
|
|
41287
41517
|
FormCard,
|
|
41288
41518
|
{
|
|
41289
41519
|
...formCardProps,
|
|
@@ -41292,9 +41522,9 @@ var CreatorSearch = React111.memo(
|
|
|
41292
41522
|
fields,
|
|
41293
41523
|
showTimeline: true,
|
|
41294
41524
|
className: cn("font-noto", className),
|
|
41295
|
-
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */
|
|
41296
|
-
/* @__PURE__ */
|
|
41297
|
-
/* @__PURE__ */
|
|
41525
|
+
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs124("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
|
|
41526
|
+
/* @__PURE__ */ jsx164(CircleCheck, { className: "h-3.5 w-3.5" }),
|
|
41527
|
+
/* @__PURE__ */ jsx164("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
|
|
41298
41528
|
] }) : formCardProps.footer
|
|
41299
41529
|
}
|
|
41300
41530
|
) });
|
|
@@ -41303,10 +41533,10 @@ var CreatorSearch = React111.memo(
|
|
|
41303
41533
|
CreatorSearch.displayName = "CreatorSearch";
|
|
41304
41534
|
|
|
41305
41535
|
// src/molecules/creator-discovery/CampaignConceptCard/CampaignConceptCard.tsx
|
|
41306
|
-
import
|
|
41536
|
+
import React113, { useMemo as useMemo9, useState as useState14 } from "react";
|
|
41307
41537
|
import { motion, AnimatePresence } from "framer-motion";
|
|
41308
|
-
import { jsx as
|
|
41309
|
-
var CampaignConceptCard =
|
|
41538
|
+
import { jsx as jsx165, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
41539
|
+
var CampaignConceptCard = React113.memo(
|
|
41310
41540
|
({
|
|
41311
41541
|
index,
|
|
41312
41542
|
isRecommended,
|
|
@@ -41322,7 +41552,7 @@ var CampaignConceptCard = React112.memo(
|
|
|
41322
41552
|
onAction,
|
|
41323
41553
|
...formCardProps
|
|
41324
41554
|
}) => {
|
|
41325
|
-
const [internalIsOpen, setInternalIsOpen] =
|
|
41555
|
+
const [internalIsOpen, setInternalIsOpen] = useState14(false);
|
|
41326
41556
|
const isOpen = controlledIsOpen !== void 0 ? controlledIsOpen : internalIsOpen;
|
|
41327
41557
|
const handleToggle = () => {
|
|
41328
41558
|
if (onToggle) {
|
|
@@ -41378,39 +41608,39 @@ var CampaignConceptCard = React112.memo(
|
|
|
41378
41608
|
label: "Budget Allocation",
|
|
41379
41609
|
renderDisplay: (val) => {
|
|
41380
41610
|
if (!val)
|
|
41381
|
-
return /* @__PURE__ */
|
|
41611
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
41382
41612
|
if (Array.isArray(val)) {
|
|
41383
|
-
return /* @__PURE__ */
|
|
41613
|
+
return /* @__PURE__ */ jsx165("div", { className: "space-y-2", children: val.map((item, idx) => {
|
|
41384
41614
|
const label = item?.label ?? item?.key ?? `Item ${idx + 1}`;
|
|
41385
41615
|
const value = item?.value ?? item;
|
|
41386
|
-
return /* @__PURE__ */
|
|
41387
|
-
/* @__PURE__ */
|
|
41616
|
+
return /* @__PURE__ */ jsxs125("div", { className: "flex items-center gap-2", children: [
|
|
41617
|
+
/* @__PURE__ */ jsxs125("span", { className: "text-muted-foreground font-medium", children: [
|
|
41388
41618
|
idx + 1,
|
|
41389
41619
|
"."
|
|
41390
41620
|
] }),
|
|
41391
|
-
/* @__PURE__ */
|
|
41392
|
-
/* @__PURE__ */
|
|
41393
|
-
/* @__PURE__ */
|
|
41621
|
+
/* @__PURE__ */ jsx165("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: String(label) }),
|
|
41622
|
+
/* @__PURE__ */ jsx165("span", { className: "text-cardText", children: "=" }),
|
|
41623
|
+
/* @__PURE__ */ jsx165("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(value) })
|
|
41394
41624
|
] }, idx);
|
|
41395
41625
|
}) });
|
|
41396
41626
|
}
|
|
41397
41627
|
if (typeof val === "object") {
|
|
41398
41628
|
const entries = Object.entries(val);
|
|
41399
41629
|
if (entries.length === 0)
|
|
41400
|
-
return /* @__PURE__ */
|
|
41401
|
-
return /* @__PURE__ */
|
|
41402
|
-
/* @__PURE__ */
|
|
41630
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
41631
|
+
return /* @__PURE__ */ jsx165("div", { className: "space-y-2", children: entries.map(([k, v], idx) => /* @__PURE__ */ jsxs125("div", { className: "flex items-center gap-2", children: [
|
|
41632
|
+
/* @__PURE__ */ jsxs125("span", { className: "text-muted-foreground font-medium", children: [
|
|
41403
41633
|
idx + 1,
|
|
41404
41634
|
"."
|
|
41405
41635
|
] }),
|
|
41406
|
-
/* @__PURE__ */
|
|
41407
|
-
/* @__PURE__ */
|
|
41408
|
-
/* @__PURE__ */
|
|
41636
|
+
/* @__PURE__ */ jsx165("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: formatKey(k) }),
|
|
41637
|
+
/* @__PURE__ */ jsx165("span", { className: "text-cardText", children: "=" }),
|
|
41638
|
+
/* @__PURE__ */ jsx165("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(v) })
|
|
41409
41639
|
] }, k)) });
|
|
41410
41640
|
}
|
|
41411
|
-
return /* @__PURE__ */
|
|
41641
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-muted-foreground text-sm", children: String(val) });
|
|
41412
41642
|
},
|
|
41413
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41643
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx165(
|
|
41414
41644
|
Textarea,
|
|
41415
41645
|
{
|
|
41416
41646
|
value: typeof v === "object" ? Object.entries(v || {}).map(([k, val]) => `${k.replace(/_/g, " ")}: ${val}`).join("\n") : String(v || ""),
|
|
@@ -41435,8 +41665,8 @@ var CampaignConceptCard = React112.memo(
|
|
|
41435
41665
|
return {
|
|
41436
41666
|
...field,
|
|
41437
41667
|
label: "Geography",
|
|
41438
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
41439
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41668
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx165(CountrySelectDisplay, { value: v }),
|
|
41669
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx165(CountrySelectEdit, { value: v, onChange })
|
|
41440
41670
|
};
|
|
41441
41671
|
}
|
|
41442
41672
|
if (field.key === "estimatedCreators" || field.key === "estimated_creators") {
|
|
@@ -41445,11 +41675,11 @@ var CampaignConceptCard = React112.memo(
|
|
|
41445
41675
|
label: "Estimated Creators",
|
|
41446
41676
|
renderDisplay: (val) => {
|
|
41447
41677
|
if (!val)
|
|
41448
|
-
return /* @__PURE__ */
|
|
41678
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
41449
41679
|
const displayValue = typeof val === "object" && !Array.isArray(val) ? `${val.min ?? 0}-${val.max ?? 0}` : String(val);
|
|
41450
|
-
return /* @__PURE__ */
|
|
41680
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-cardText text-sm", children: displayValue });
|
|
41451
41681
|
},
|
|
41452
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41682
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx165(
|
|
41453
41683
|
Input,
|
|
41454
41684
|
{
|
|
41455
41685
|
value: typeof v === "object" ? `${v.min ?? 0}-${v.max ?? 0}` : String(v || ""),
|
|
@@ -41472,8 +41702,8 @@ var CampaignConceptCard = React112.memo(
|
|
|
41472
41702
|
return {
|
|
41473
41703
|
...field,
|
|
41474
41704
|
label: field.label || "Primary KPI",
|
|
41475
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41476
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41705
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx165("span", { className: "text-cardText text-sm", children: val ? String(val) : "-" }),
|
|
41706
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx165(
|
|
41477
41707
|
Input,
|
|
41478
41708
|
{
|
|
41479
41709
|
value: String(v || ""),
|
|
@@ -41490,9 +41720,9 @@ var CampaignConceptCard = React112.memo(
|
|
|
41490
41720
|
label: field.label || "Secondary KPIs",
|
|
41491
41721
|
renderDisplay: (val) => {
|
|
41492
41722
|
const display = Array.isArray(val) ? val.map(String).join(", ") : val ? String(val) : "-";
|
|
41493
|
-
return /* @__PURE__ */
|
|
41723
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-cardText text-sm", children: display });
|
|
41494
41724
|
},
|
|
41495
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41725
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx165(
|
|
41496
41726
|
Textarea,
|
|
41497
41727
|
{
|
|
41498
41728
|
value: Array.isArray(v) ? v.join(", ") : String(v || ""),
|
|
@@ -41509,15 +41739,15 @@ var CampaignConceptCard = React112.memo(
|
|
|
41509
41739
|
if (field.key === "platforms" || field.key === "target_platforms" || field.key === "targetPlatforms") {
|
|
41510
41740
|
return {
|
|
41511
41741
|
...field,
|
|
41512
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
41513
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41742
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx165(PlatformSelectDisplay, { value: v }),
|
|
41743
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx165(PlatformSelectEdit, { value: v, onChange })
|
|
41514
41744
|
};
|
|
41515
41745
|
}
|
|
41516
41746
|
if (field.key === "description" || field.key === "creator_strategy" || field.key === "creatorStrategy") {
|
|
41517
41747
|
return {
|
|
41518
41748
|
...field,
|
|
41519
41749
|
type: "textarea",
|
|
41520
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41750
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx165("span", { className: "text-cardText text-sm leading-relaxed", children: val ? String(val) : "-" })
|
|
41521
41751
|
};
|
|
41522
41752
|
}
|
|
41523
41753
|
return {
|
|
@@ -41525,10 +41755,10 @@ var CampaignConceptCard = React112.memo(
|
|
|
41525
41755
|
renderDisplay: (val) => {
|
|
41526
41756
|
if (Array.isArray(val)) {
|
|
41527
41757
|
if (val.length === 0)
|
|
41528
|
-
return /* @__PURE__ */
|
|
41529
|
-
return /* @__PURE__ */
|
|
41758
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
41759
|
+
return /* @__PURE__ */ jsx165("div", { className: "flex flex-wrap gap-2 pt-1", children: val.map((item, idx) => {
|
|
41530
41760
|
const label = typeof item === "object" && item !== null ? item.label || item.value || item.name || JSON.stringify(item) : String(item);
|
|
41531
|
-
return /* @__PURE__ */
|
|
41761
|
+
return /* @__PURE__ */ jsx165(
|
|
41532
41762
|
"span",
|
|
41533
41763
|
{
|
|
41534
41764
|
className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md",
|
|
@@ -41539,14 +41769,14 @@ var CampaignConceptCard = React112.memo(
|
|
|
41539
41769
|
}) });
|
|
41540
41770
|
}
|
|
41541
41771
|
if (typeof val === "object" && val !== null) {
|
|
41542
|
-
return /* @__PURE__ */
|
|
41772
|
+
return /* @__PURE__ */ jsx165("div", { className: "text-muted-foreground text-xs font-mono bg-paperBackground p-2 rounded mt-1 overflow-auto max-h-24", children: Object.entries(val).map(([k, v]) => `${k.replace(/_/g, " ")}: ${v}`).join("\n") });
|
|
41543
41773
|
}
|
|
41544
|
-
return /* @__PURE__ */
|
|
41774
|
+
return /* @__PURE__ */ jsx165("span", { className: "text-cardText text-sm", children: val !== void 0 && val !== null ? String(val) : "-" });
|
|
41545
41775
|
}
|
|
41546
41776
|
};
|
|
41547
41777
|
});
|
|
41548
41778
|
}, [providedFields, data]);
|
|
41549
|
-
return /* @__PURE__ */
|
|
41779
|
+
return /* @__PURE__ */ jsxs125(
|
|
41550
41780
|
"div",
|
|
41551
41781
|
{
|
|
41552
41782
|
className: cn(
|
|
@@ -41555,31 +41785,31 @@ var CampaignConceptCard = React112.memo(
|
|
|
41555
41785
|
className
|
|
41556
41786
|
),
|
|
41557
41787
|
children: [
|
|
41558
|
-
/* @__PURE__ */
|
|
41788
|
+
/* @__PURE__ */ jsxs125(
|
|
41559
41789
|
"div",
|
|
41560
41790
|
{
|
|
41561
41791
|
className: "px-4 py-2.5 relative flex items-center justify-between cursor-pointer select-none",
|
|
41562
41792
|
onClick: handleToggle,
|
|
41563
41793
|
children: [
|
|
41564
|
-
/* @__PURE__ */
|
|
41565
|
-
/* @__PURE__ */
|
|
41794
|
+
/* @__PURE__ */ jsxs125("div", { className: "flex-1", children: [
|
|
41795
|
+
/* @__PURE__ */ jsxs125("h3", { className: "text-cardText font-semibold text-sm", children: [
|
|
41566
41796
|
"Concept ",
|
|
41567
41797
|
index !== void 0 ? index : "",
|
|
41568
41798
|
" :",
|
|
41569
41799
|
" ",
|
|
41570
41800
|
typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle)
|
|
41571
41801
|
] }),
|
|
41572
|
-
/* @__PURE__ */
|
|
41573
|
-
isRecommended && /* @__PURE__ */
|
|
41574
|
-
!effectiveIsLatest && selectionStatus && /* @__PURE__ */
|
|
41802
|
+
/* @__PURE__ */ jsxs125("div", { className: "flex flex-wrap gap-2", children: [
|
|
41803
|
+
isRecommended && /* @__PURE__ */ jsx165("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: "Recommended" }),
|
|
41804
|
+
!effectiveIsLatest && selectionStatus && /* @__PURE__ */ jsx165("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
|
|
41575
41805
|
] })
|
|
41576
41806
|
] }),
|
|
41577
|
-
/* @__PURE__ */
|
|
41807
|
+
/* @__PURE__ */ jsx165(
|
|
41578
41808
|
"div",
|
|
41579
41809
|
{
|
|
41580
41810
|
className: "flex items-center gap-2 ml-3",
|
|
41581
41811
|
onClick: (e) => e.stopPropagation(),
|
|
41582
|
-
children: /* @__PURE__ */
|
|
41812
|
+
children: /* @__PURE__ */ jsx165(
|
|
41583
41813
|
"button",
|
|
41584
41814
|
{
|
|
41585
41815
|
onClick: (e) => {
|
|
@@ -41590,7 +41820,7 @@ var CampaignConceptCard = React112.memo(
|
|
|
41590
41820
|
className: "p-2 bg-cardSurface hover:bg-gray200 text-cardText rounded-lg",
|
|
41591
41821
|
"aria-label": isOpen ? "Collapse" : "Expand",
|
|
41592
41822
|
title: isOpen ? "Collapse" : "Expand",
|
|
41593
|
-
children: /* @__PURE__ */
|
|
41823
|
+
children: /* @__PURE__ */ jsx165(
|
|
41594
41824
|
ChevronDown,
|
|
41595
41825
|
{
|
|
41596
41826
|
className: `h-4 w-4 transition-transform ${isOpen ? "rotate-0" : "-rotate-90"}`
|
|
@@ -41603,7 +41833,7 @@ var CampaignConceptCard = React112.memo(
|
|
|
41603
41833
|
]
|
|
41604
41834
|
}
|
|
41605
41835
|
),
|
|
41606
|
-
/* @__PURE__ */
|
|
41836
|
+
/* @__PURE__ */ jsx165(AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ jsx165(
|
|
41607
41837
|
motion.div,
|
|
41608
41838
|
{
|
|
41609
41839
|
initial: { height: 0, opacity: 0 },
|
|
@@ -41611,8 +41841,8 @@ var CampaignConceptCard = React112.memo(
|
|
|
41611
41841
|
exit: { height: 0, opacity: 0 },
|
|
41612
41842
|
transition: { duration: 0.2, ease: "easeIn" },
|
|
41613
41843
|
className: "overflow-hidden",
|
|
41614
|
-
children: /* @__PURE__ */
|
|
41615
|
-
/* @__PURE__ */
|
|
41844
|
+
children: /* @__PURE__ */ jsxs125("div", { className: "px-3 py-2 w-full relative", children: [
|
|
41845
|
+
/* @__PURE__ */ jsx165(
|
|
41616
41846
|
"div",
|
|
41617
41847
|
{
|
|
41618
41848
|
className: "absolute left-[48px] top-[70px] bottom-[40px] w-[2px]",
|
|
@@ -41621,7 +41851,7 @@ var CampaignConceptCard = React112.memo(
|
|
|
41621
41851
|
}
|
|
41622
41852
|
}
|
|
41623
41853
|
),
|
|
41624
|
-
/* @__PURE__ */
|
|
41854
|
+
/* @__PURE__ */ jsx165(
|
|
41625
41855
|
FormCard,
|
|
41626
41856
|
{
|
|
41627
41857
|
...formCardProps,
|
|
@@ -41635,9 +41865,9 @@ var CampaignConceptCard = React112.memo(
|
|
|
41635
41865
|
hideTitle: true,
|
|
41636
41866
|
hideCopyButton: true,
|
|
41637
41867
|
className: "bg-transparent border-none shadow-none mb-0 p-0",
|
|
41638
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */
|
|
41639
|
-
/* @__PURE__ */
|
|
41640
|
-
/* @__PURE__ */
|
|
41868
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs125("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
|
|
41869
|
+
/* @__PURE__ */ jsx165(CircleCheck, { className: "h-3.5 w-3.5" }),
|
|
41870
|
+
/* @__PURE__ */ jsx165("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
|
|
41641
41871
|
] }) : formCardProps.footer
|
|
41642
41872
|
}
|
|
41643
41873
|
)
|
|
@@ -41653,14 +41883,14 @@ var CampaignConceptCard = React112.memo(
|
|
|
41653
41883
|
CampaignConceptCard.displayName = "CampaignConceptCard";
|
|
41654
41884
|
|
|
41655
41885
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
41656
|
-
import { useCallback as useCallback9, useState as
|
|
41886
|
+
import { useCallback as useCallback9, useState as useState22, memo } from "react";
|
|
41657
41887
|
|
|
41658
41888
|
// src/molecules/creator-discovery/CreatorWidget/CreatorImageList.tsx
|
|
41659
|
-
import { useEffect as
|
|
41660
|
-
import { Fragment as Fragment7, jsx as
|
|
41889
|
+
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
41890
|
+
import { Fragment as Fragment7, jsx as jsx166, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
41661
41891
|
function useMediaQuery(query) {
|
|
41662
|
-
const [matches, setMatches] =
|
|
41663
|
-
|
|
41892
|
+
const [matches, setMatches] = useState15(false);
|
|
41893
|
+
useEffect10(() => {
|
|
41664
41894
|
const media = window.matchMedia(query);
|
|
41665
41895
|
const listener = () => setMatches(media.matches);
|
|
41666
41896
|
listener();
|
|
@@ -41678,8 +41908,8 @@ function CreatorImage({
|
|
|
41678
41908
|
const processedCount = Math.floor(creatorsPercentage / 100 * totalCreators);
|
|
41679
41909
|
const isProcessed = idx < processedCount;
|
|
41680
41910
|
const isCurrentlyProcessing = idx === processedCount;
|
|
41681
|
-
return /* @__PURE__ */
|
|
41682
|
-
/* @__PURE__ */
|
|
41911
|
+
return /* @__PURE__ */ jsxs126("div", { className: "relative w-8 h-8", children: [
|
|
41912
|
+
/* @__PURE__ */ jsx166(
|
|
41683
41913
|
"img",
|
|
41684
41914
|
{
|
|
41685
41915
|
src: img,
|
|
@@ -41687,9 +41917,9 @@ function CreatorImage({
|
|
|
41687
41917
|
className: `w-8 h-8 rounded-full border-2 ${isProcessed ? "border-green-600" : "border-foreground"} object-cover transition-all duration-300`
|
|
41688
41918
|
}
|
|
41689
41919
|
),
|
|
41690
|
-
!isProcessed && /* @__PURE__ */
|
|
41691
|
-
isCurrentlyProcessing && /* @__PURE__ */
|
|
41692
|
-
/* @__PURE__ */
|
|
41920
|
+
!isProcessed && /* @__PURE__ */ jsx166("div", { className: "absolute inset-0 bg-black/50 rounded-full pointer-events-none" }),
|
|
41921
|
+
isCurrentlyProcessing && /* @__PURE__ */ jsxs126(Fragment7, { children: [
|
|
41922
|
+
/* @__PURE__ */ jsx166(
|
|
41693
41923
|
"div",
|
|
41694
41924
|
{
|
|
41695
41925
|
className: "absolute inset-0 bg-black/50 rounded-full pointer-events-none",
|
|
@@ -41705,7 +41935,7 @@ function CreatorImage({
|
|
|
41705
41935
|
}
|
|
41706
41936
|
}
|
|
41707
41937
|
),
|
|
41708
|
-
/* @__PURE__ */
|
|
41938
|
+
/* @__PURE__ */ jsx166("div", { className: "absolute inset-0 rounded-full border-2 border-[#9CA3AF]/30 pointer-events-none" })
|
|
41709
41939
|
] })
|
|
41710
41940
|
] });
|
|
41711
41941
|
}
|
|
@@ -41718,8 +41948,8 @@ function CreatorImageList({
|
|
|
41718
41948
|
const isMobile = useMediaQuery("(max-width: 640px)");
|
|
41719
41949
|
const isTablet = useMediaQuery("(min-width: 641px) and (max-width: 1024px)");
|
|
41720
41950
|
const visibleCount = isMobile ? 7 : isTablet ? 10 : isAgentOutput ? 6 : 15;
|
|
41721
|
-
return /* @__PURE__ */
|
|
41722
|
-
creatorImages.slice(0, visibleCount).map((img, idx) => /* @__PURE__ */
|
|
41951
|
+
return /* @__PURE__ */ jsxs126("div", { className: "flex flex-nowrap sm:flex-wrap -space-x-2 w-fit", children: [
|
|
41952
|
+
creatorImages.slice(0, visibleCount).map((img, idx) => /* @__PURE__ */ jsx166(
|
|
41723
41953
|
CreatorImage,
|
|
41724
41954
|
{
|
|
41725
41955
|
img,
|
|
@@ -41729,7 +41959,7 @@ function CreatorImageList({
|
|
|
41729
41959
|
},
|
|
41730
41960
|
idx
|
|
41731
41961
|
)),
|
|
41732
|
-
creatorLength > visibleCount && /* @__PURE__ */
|
|
41962
|
+
creatorLength > visibleCount && /* @__PURE__ */ jsxs126(
|
|
41733
41963
|
"div",
|
|
41734
41964
|
{
|
|
41735
41965
|
className: `relative w-8 h-8 rounded-full text-white flex items-center justify-center text-sm font-medium border-2 ${initialCreatorsPercentage === 100 ? "border-green-600 bg-sliderFill" : "border-foreground bg-black/50"}`,
|
|
@@ -41743,28 +41973,28 @@ function CreatorImageList({
|
|
|
41743
41973
|
}
|
|
41744
41974
|
|
|
41745
41975
|
// src/molecules/creator-discovery/CreatorWidget/CreatorProgressBar.tsx
|
|
41746
|
-
import { useEffect as
|
|
41976
|
+
import { useEffect as useEffect11, useState as useState16 } from "react";
|
|
41747
41977
|
import { motion as motion2, AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
41748
|
-
import { jsx as
|
|
41978
|
+
import { jsx as jsx167, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
41749
41979
|
function truncateName(name, maxLength) {
|
|
41750
41980
|
if (!name || name.length <= maxLength) return name || "";
|
|
41751
41981
|
return name.substring(0, maxLength) + "...";
|
|
41752
41982
|
}
|
|
41753
41983
|
function ProgressBar({ overallPercentage }) {
|
|
41754
|
-
const [showTooltip, setShowTooltip] =
|
|
41755
|
-
|
|
41984
|
+
const [showTooltip, setShowTooltip] = useState16(true);
|
|
41985
|
+
useEffect11(() => {
|
|
41756
41986
|
if (overallPercentage && overallPercentage >= 100) {
|
|
41757
41987
|
setShowTooltip(false);
|
|
41758
41988
|
}
|
|
41759
41989
|
}, [overallPercentage]);
|
|
41760
|
-
return /* @__PURE__ */
|
|
41990
|
+
return /* @__PURE__ */ jsx167("div", { className: "relative w-full", children: /* @__PURE__ */ jsx167("div", { className: "md:w-full dark:bg-purple500 bg-gray-200 rounded-full h-[6px]", children: /* @__PURE__ */ jsx167(
|
|
41761
41991
|
motion2.div,
|
|
41762
41992
|
{
|
|
41763
41993
|
className: "bg-purple100 h-[6px] rounded-full relative",
|
|
41764
41994
|
initial: { width: 0 },
|
|
41765
41995
|
animate: { width: `${overallPercentage}%` },
|
|
41766
41996
|
transition: { duration: 0.5, ease: "easeOut" },
|
|
41767
|
-
children: /* @__PURE__ */
|
|
41997
|
+
children: /* @__PURE__ */ jsx167(AnimatePresence2, { children: showTooltip && /* @__PURE__ */ jsxs127(
|
|
41768
41998
|
motion2.div,
|
|
41769
41999
|
{
|
|
41770
42000
|
initial: { opacity: 0, y: 5 },
|
|
@@ -41774,9 +42004,9 @@ function ProgressBar({ overallPercentage }) {
|
|
|
41774
42004
|
children: [
|
|
41775
42005
|
overallPercentage ? Math.round(overallPercentage) : 0,
|
|
41776
42006
|
"%",
|
|
41777
|
-
/* @__PURE__ */
|
|
41778
|
-
/* @__PURE__ */
|
|
41779
|
-
/* @__PURE__ */
|
|
42007
|
+
/* @__PURE__ */ jsxs127("div", { className: "absolute left-1/2 top-full -translate-x-1/2", children: [
|
|
42008
|
+
/* @__PURE__ */ jsx167("div", { className: "w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-transparent border-t-gray300" }),
|
|
42009
|
+
/* @__PURE__ */ jsx167("div", { className: "absolute left-1/2 top-[-1px] -translate-x-1/2 w-0 h-0 border-l-[5px] border-r-[5px] border-t-[5px] border-transparent border-t-gray50" })
|
|
41780
42010
|
] })
|
|
41781
42011
|
]
|
|
41782
42012
|
}
|
|
@@ -41788,38 +42018,38 @@ function CreatorProgressBar({
|
|
|
41788
42018
|
statusDetails,
|
|
41789
42019
|
timeRemaining: _timeRemaining
|
|
41790
42020
|
}) {
|
|
41791
|
-
return /* @__PURE__ */
|
|
41792
|
-
/* @__PURE__ */
|
|
41793
|
-
/* @__PURE__ */
|
|
42021
|
+
return /* @__PURE__ */ jsxs127("div", { children: [
|
|
42022
|
+
/* @__PURE__ */ jsx167(ProgressBar, { overallPercentage: statusDetails?.overall_percentage }),
|
|
42023
|
+
/* @__PURE__ */ jsx167("div", { className: "dark:text-gray400 text-gray-500 text-xs mt-2", children: (statusDetails?.overall_percentage ?? 0) < 100 && /* @__PURE__ */ jsx167("span", { children: statusDetails?.thinking_message ? truncateName(statusDetails.thinking_message, 200) : "Processing..." }) })
|
|
41794
42024
|
] });
|
|
41795
42025
|
}
|
|
41796
42026
|
|
|
41797
42027
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidgetSkeleton.tsx
|
|
41798
|
-
import { jsx as
|
|
42028
|
+
import { jsx as jsx168, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
41799
42029
|
function CreatorWidgetSkeleton() {
|
|
41800
|
-
return /* @__PURE__ */
|
|
41801
|
-
/* @__PURE__ */
|
|
41802
|
-
/* @__PURE__ */
|
|
41803
|
-
/* @__PURE__ */
|
|
42030
|
+
return /* @__PURE__ */ jsx168("div", { className: "bg-background dark:bg-gray50 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs128("div", { className: "p-4 md:p-6 space-y-4", children: [
|
|
42031
|
+
/* @__PURE__ */ jsx168("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: /* @__PURE__ */ jsxs128("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
42032
|
+
/* @__PURE__ */ jsx168("div", { className: "w-40 h-6 bg-purple200 rounded-md animate-pulse" }),
|
|
42033
|
+
/* @__PURE__ */ jsx168("div", { className: "w-64 h-7 bg-gray200 dark:bg-gray300 rounded animate-pulse" })
|
|
41804
42034
|
] }) }),
|
|
41805
|
-
/* @__PURE__ */
|
|
41806
|
-
/* @__PURE__ */
|
|
41807
|
-
/* @__PURE__ */
|
|
42035
|
+
/* @__PURE__ */ jsxs128("div", { className: "bg-paperBackground rounded-lg px-3 md:px-4 py-4 md:py-5 flex flex-col md:flex-row md:items-center md:justify-between gap-4 md:gap-0", children: [
|
|
42036
|
+
/* @__PURE__ */ jsxs128("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
42037
|
+
/* @__PURE__ */ jsx168("div", { className: "flex -space-x-2", children: Array.from({ length: 10 }).map((_, idx) => /* @__PURE__ */ jsx168(
|
|
41808
42038
|
"div",
|
|
41809
42039
|
{
|
|
41810
42040
|
className: "w-8 h-8 md:w-10 md:h-10 rounded-full border-2 border-gray300 bg-gray200 animate-pulse"
|
|
41811
42041
|
},
|
|
41812
42042
|
idx
|
|
41813
42043
|
)) }),
|
|
41814
|
-
/* @__PURE__ */
|
|
42044
|
+
/* @__PURE__ */ jsx168("div", { className: "space-y-2", children: /* @__PURE__ */ jsx168("div", { className: "w-full max-w-xs bg-gray200 rounded-full h-2 animate-pulse" }) })
|
|
41815
42045
|
] }),
|
|
41816
|
-
/* @__PURE__ */
|
|
42046
|
+
/* @__PURE__ */ jsx168("div", { className: "px-6 py-2 bg-gray200 rounded-[30px] animate-pulse h-10 w-48" })
|
|
41817
42047
|
] })
|
|
41818
42048
|
] }) });
|
|
41819
42049
|
}
|
|
41820
42050
|
|
|
41821
42051
|
// src/molecules/creator-discovery/CreatorWidget/CreatorCompactView.tsx
|
|
41822
|
-
import { Fragment as Fragment8, jsx as
|
|
42052
|
+
import { Fragment as Fragment8, jsx as jsx169, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
41823
42053
|
function CreatorCompactView({
|
|
41824
42054
|
versions,
|
|
41825
42055
|
selectedVersion,
|
|
@@ -41836,16 +42066,16 @@ function CreatorCompactView({
|
|
|
41836
42066
|
const isComplete = versionStatus === "completed" || versionStatus === "complete";
|
|
41837
42067
|
const statusTitle = isComplete ? "Creator Search Complete" : versionStatus === "failed" ? "Creator Search Failed" : "Creator Search Processing";
|
|
41838
42068
|
if (isLoading) {
|
|
41839
|
-
return /* @__PURE__ */
|
|
42069
|
+
return /* @__PURE__ */ jsx169(CreatorWidgetSkeleton, {});
|
|
41840
42070
|
}
|
|
41841
|
-
return /* @__PURE__ */
|
|
41842
|
-
/* @__PURE__ */
|
|
41843
|
-
/* @__PURE__ */
|
|
41844
|
-
/* @__PURE__ */
|
|
41845
|
-
/* @__PURE__ */
|
|
42071
|
+
return /* @__PURE__ */ jsx169("div", { className: "bg-background dark:bg-gray100 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs129("div", { className: "p-4 md:p-6 space-y-4", children: [
|
|
42072
|
+
/* @__PURE__ */ jsxs129("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: [
|
|
42073
|
+
/* @__PURE__ */ jsxs129("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
42074
|
+
/* @__PURE__ */ jsx169("h4", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] text-xs font-medium text-purpleText", children: "VERIFIED CREATORS LIST" }),
|
|
42075
|
+
/* @__PURE__ */ jsx169("h3", { className: "text-gray900 md:text-lg font-bold", children: statusTitle })
|
|
41846
42076
|
] }),
|
|
41847
|
-
versions.length > 1 && /* @__PURE__ */
|
|
41848
|
-
/* @__PURE__ */
|
|
42077
|
+
versions.length > 1 && /* @__PURE__ */ jsx169("div", { className: "relative md:self-start", children: /* @__PURE__ */ jsxs129(DropdownMenu, { children: [
|
|
42078
|
+
/* @__PURE__ */ jsxs129(
|
|
41849
42079
|
DropdownMenuTrigger,
|
|
41850
42080
|
{
|
|
41851
42081
|
disabled: !isComplete,
|
|
@@ -41853,11 +42083,11 @@ function CreatorCompactView({
|
|
|
41853
42083
|
children: [
|
|
41854
42084
|
"Version ",
|
|
41855
42085
|
selectedVersion ?? "-",
|
|
41856
|
-
/* @__PURE__ */
|
|
42086
|
+
/* @__PURE__ */ jsx169(ChevronDown, { className: "w-3 h-3 md:w-4 md:h-4 transition-transform" })
|
|
41857
42087
|
]
|
|
41858
42088
|
}
|
|
41859
42089
|
),
|
|
41860
|
-
/* @__PURE__ */
|
|
42090
|
+
/* @__PURE__ */ jsx169(DropdownMenuContent, { className: "bg-[var(--creator-dropdown-bg)] border-2 border-gray400 min-w-[120px] max-h-[150px] overflow-y-auto", children: versions.map((v) => /* @__PURE__ */ jsxs129(
|
|
41861
42091
|
DropdownMenuItem,
|
|
41862
42092
|
{
|
|
41863
42093
|
onClick: () => onVersionSelect(v),
|
|
@@ -41871,12 +42101,12 @@ function CreatorCompactView({
|
|
|
41871
42101
|
)) })
|
|
41872
42102
|
] }) })
|
|
41873
42103
|
] }),
|
|
41874
|
-
/* @__PURE__ */
|
|
41875
|
-
/* @__PURE__ */
|
|
41876
|
-
/* @__PURE__ */
|
|
41877
|
-
] }) : /* @__PURE__ */
|
|
41878
|
-
/* @__PURE__ */
|
|
41879
|
-
/* @__PURE__ */
|
|
42104
|
+
/* @__PURE__ */ jsx169("div", { className: "bg-paperBackground rounded-lg px-3 md:px-4 py-4 md:py-5 flex flex-col md:flex-row md:items-center md:justify-between gap-4 md:gap-0", children: versionStatus === "failed" ? /* @__PURE__ */ jsxs129("div", { className: "flex flex-col items-center justify-center w-full py-6 md:py-8 text-center text-red-500", children: [
|
|
42105
|
+
/* @__PURE__ */ jsx169("p", { className: "text-base md:text-lg font-semibold mb-2", children: "Creator Search Failed" }),
|
|
42106
|
+
/* @__PURE__ */ jsx169("p", { className: "text-xs md:text-sm text-gray600 px-2", children: "Something went wrong while fetching creators. Please try again later or regenerate a new version." })
|
|
42107
|
+
] }) : /* @__PURE__ */ jsxs129(Fragment8, { children: [
|
|
42108
|
+
/* @__PURE__ */ jsxs129("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
42109
|
+
/* @__PURE__ */ jsx169(
|
|
41880
42110
|
CreatorImageList,
|
|
41881
42111
|
{
|
|
41882
42112
|
creatorImages,
|
|
@@ -41885,7 +42115,7 @@ function CreatorCompactView({
|
|
|
41885
42115
|
initialCreatorsPercentage: statusDetails?.social_fetch_percentage
|
|
41886
42116
|
}
|
|
41887
42117
|
),
|
|
41888
|
-
/* @__PURE__ */
|
|
42118
|
+
/* @__PURE__ */ jsx169(
|
|
41889
42119
|
CreatorProgressBar,
|
|
41890
42120
|
{
|
|
41891
42121
|
statusDetails,
|
|
@@ -41893,7 +42123,7 @@ function CreatorCompactView({
|
|
|
41893
42123
|
}
|
|
41894
42124
|
)
|
|
41895
42125
|
] }),
|
|
41896
|
-
/* @__PURE__ */
|
|
42126
|
+
/* @__PURE__ */ jsxs129(
|
|
41897
42127
|
"button",
|
|
41898
42128
|
{
|
|
41899
42129
|
className: `px-4 py-2 text-xs md:text-sm rounded-[30px] shadow flex items-center justify-center gap-2 w-full md:w-auto md:flex-shrink-0 whitespace-nowrap ${!isComplete ? "bg-gray300 text-gray500 border-2 border-gray300 cursor-not-allowed" : "bg-purpleLight dark:bg-purple200 text-purpleText2 dark:text-purpleText border-2 border-purple100 cursor-pointer hover:bg-purpleText1 dark:hover:bg-purple100 dark:hover:text-background"}`,
|
|
@@ -41903,7 +42133,7 @@ function CreatorCompactView({
|
|
|
41903
42133
|
"View ",
|
|
41904
42134
|
creatorLength,
|
|
41905
42135
|
" Verified Creators",
|
|
41906
|
-
/* @__PURE__ */
|
|
42136
|
+
/* @__PURE__ */ jsx169(Triangle, { className: "w-3 h-3 md:w-4 md:h-4 rotate-90 font-bold" })
|
|
41907
42137
|
]
|
|
41908
42138
|
}
|
|
41909
42139
|
)
|
|
@@ -41912,7 +42142,7 @@ function CreatorCompactView({
|
|
|
41912
42142
|
}
|
|
41913
42143
|
|
|
41914
42144
|
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
41915
|
-
import { useState as
|
|
42145
|
+
import { useState as useState20, useEffect as useEffect13, useCallback as useCallback7 } from "react";
|
|
41916
42146
|
import ReactDOM2 from "react-dom";
|
|
41917
42147
|
import { AnimatePresence as AnimatePresence4, motion as motion5 } from "framer-motion";
|
|
41918
42148
|
|
|
@@ -42194,7 +42424,7 @@ var normalizeToIso2 = (input) => {
|
|
|
42194
42424
|
};
|
|
42195
42425
|
|
|
42196
42426
|
// src/molecules/creator-discovery/CreatorWidget/EngagedAudienceDemographics.tsx
|
|
42197
|
-
import { jsx as
|
|
42427
|
+
import { jsx as jsx170, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
42198
42428
|
function EngagedAudienceDemographics({
|
|
42199
42429
|
audienceDemographics
|
|
42200
42430
|
}) {
|
|
@@ -42212,31 +42442,31 @@ function EngagedAudienceDemographics({
|
|
|
42212
42442
|
if (hasAges) columns.push("1fr");
|
|
42213
42443
|
if (hasGenders) columns.push("0.4fr");
|
|
42214
42444
|
const gridTemplate = columns.join(" ");
|
|
42215
|
-
return /* @__PURE__ */
|
|
42216
|
-
/* @__PURE__ */
|
|
42217
|
-
/* @__PURE__ */
|
|
42445
|
+
return /* @__PURE__ */ jsxs130("div", { className: "flex flex-col gap-4", children: [
|
|
42446
|
+
/* @__PURE__ */ jsx170("div", { className: "text-purpleText text-xs", children: /* @__PURE__ */ jsx170("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "ENGAGED AUDIENCE" }) }),
|
|
42447
|
+
/* @__PURE__ */ jsxs130(
|
|
42218
42448
|
"div",
|
|
42219
42449
|
{
|
|
42220
42450
|
className: "flex flex-col sm:col-span-3 sm:grid gap-6",
|
|
42221
42451
|
style: { gridTemplateColumns: gridTemplate },
|
|
42222
42452
|
children: [
|
|
42223
|
-
hasCities && /* @__PURE__ */
|
|
42224
|
-
/* @__PURE__ */
|
|
42225
|
-
/* @__PURE__ */
|
|
42226
|
-
([code, value]) => /* @__PURE__ */
|
|
42453
|
+
hasCities && /* @__PURE__ */ jsxs130("div", { children: [
|
|
42454
|
+
/* @__PURE__ */ jsx170("h4", { className: "text-xs text-gray700 mb-3", children: "Cities" }),
|
|
42455
|
+
/* @__PURE__ */ jsx170("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.cities || {}).map(
|
|
42456
|
+
([code, value]) => /* @__PURE__ */ jsxs130(
|
|
42227
42457
|
"div",
|
|
42228
42458
|
{
|
|
42229
42459
|
className: "flex items-center gap-3 text-sm text-gray700",
|
|
42230
42460
|
children: [
|
|
42231
|
-
/* @__PURE__ */
|
|
42232
|
-
/* @__PURE__ */
|
|
42461
|
+
/* @__PURE__ */ jsx170("span", { className: "w-[90px]", children: /* @__PURE__ */ jsx170("div", { className: "flex gap-1 items-center", children: /* @__PURE__ */ jsx170("span", { children: code.split(",")[0] }) }) }),
|
|
42462
|
+
/* @__PURE__ */ jsx170("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx170(
|
|
42233
42463
|
"div",
|
|
42234
42464
|
{
|
|
42235
42465
|
className: "h-[6px] bg-purple100 rounded-full",
|
|
42236
42466
|
style: { width: `${value}%` }
|
|
42237
42467
|
}
|
|
42238
42468
|
) }),
|
|
42239
|
-
/* @__PURE__ */
|
|
42469
|
+
/* @__PURE__ */ jsxs130("span", { className: "w-10 text-right font-medium", children: [
|
|
42240
42470
|
value,
|
|
42241
42471
|
"%"
|
|
42242
42472
|
] })
|
|
@@ -42246,29 +42476,29 @@ function EngagedAudienceDemographics({
|
|
|
42246
42476
|
)
|
|
42247
42477
|
) })
|
|
42248
42478
|
] }),
|
|
42249
|
-
hasCountries && /* @__PURE__ */
|
|
42250
|
-
/* @__PURE__ */
|
|
42251
|
-
/* @__PURE__ */
|
|
42479
|
+
hasCountries && /* @__PURE__ */ jsxs130("div", { children: [
|
|
42480
|
+
/* @__PURE__ */ jsx170("h4", { className: "text-xs text-gray700 mb-3", children: "Countries" }),
|
|
42481
|
+
/* @__PURE__ */ jsx170("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.countries || {}).map(
|
|
42252
42482
|
([code, value]) => {
|
|
42253
42483
|
const iso2 = normalizeToIso2(code);
|
|
42254
42484
|
const meta = codeToMeta[iso2];
|
|
42255
|
-
return /* @__PURE__ */
|
|
42485
|
+
return /* @__PURE__ */ jsxs130(
|
|
42256
42486
|
"div",
|
|
42257
42487
|
{
|
|
42258
42488
|
className: "flex items-center gap-3 text-sm text-gray700",
|
|
42259
42489
|
children: [
|
|
42260
|
-
/* @__PURE__ */
|
|
42261
|
-
/* @__PURE__ */
|
|
42262
|
-
/* @__PURE__ */
|
|
42490
|
+
/* @__PURE__ */ jsx170("span", { className: "w-10", children: /* @__PURE__ */ jsxs130("div", { className: "flex gap-1 items-center", children: [
|
|
42491
|
+
/* @__PURE__ */ jsx170("span", { className: "text-base", children: meta?.flag }),
|
|
42492
|
+
/* @__PURE__ */ jsx170("span", { children: code })
|
|
42263
42493
|
] }) }),
|
|
42264
|
-
/* @__PURE__ */
|
|
42494
|
+
/* @__PURE__ */ jsx170("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx170(
|
|
42265
42495
|
"div",
|
|
42266
42496
|
{
|
|
42267
42497
|
className: "h-[6px] bg-purple100 rounded-full",
|
|
42268
42498
|
style: { width: `${value}%` }
|
|
42269
42499
|
}
|
|
42270
42500
|
) }),
|
|
42271
|
-
/* @__PURE__ */
|
|
42501
|
+
/* @__PURE__ */ jsxs130("span", { className: "w-10 text-right font-medium", children: [
|
|
42272
42502
|
value,
|
|
42273
42503
|
"%"
|
|
42274
42504
|
] })
|
|
@@ -42279,23 +42509,23 @@ function EngagedAudienceDemographics({
|
|
|
42279
42509
|
}
|
|
42280
42510
|
) })
|
|
42281
42511
|
] }),
|
|
42282
|
-
hasAges && /* @__PURE__ */
|
|
42283
|
-
/* @__PURE__ */
|
|
42284
|
-
/* @__PURE__ */
|
|
42285
|
-
([ageRange, value]) => /* @__PURE__ */
|
|
42512
|
+
hasAges && /* @__PURE__ */ jsxs130("div", { children: [
|
|
42513
|
+
/* @__PURE__ */ jsx170("h4", { className: "text-xs text-gray700 mb-3", children: "Ages" }),
|
|
42514
|
+
/* @__PURE__ */ jsx170("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.ages || {}).map(
|
|
42515
|
+
([ageRange, value]) => /* @__PURE__ */ jsxs130(
|
|
42286
42516
|
"div",
|
|
42287
42517
|
{
|
|
42288
42518
|
className: "flex items-center gap-3 text-sm text-gray700",
|
|
42289
42519
|
children: [
|
|
42290
|
-
/* @__PURE__ */
|
|
42291
|
-
/* @__PURE__ */
|
|
42520
|
+
/* @__PURE__ */ jsx170("span", { className: "w-12", children: ageRange }),
|
|
42521
|
+
/* @__PURE__ */ jsx170("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx170(
|
|
42292
42522
|
"div",
|
|
42293
42523
|
{
|
|
42294
42524
|
className: "h-[6px] bg-purple100 rounded-full",
|
|
42295
42525
|
style: { width: `${value}%` }
|
|
42296
42526
|
}
|
|
42297
42527
|
) }),
|
|
42298
|
-
/* @__PURE__ */
|
|
42528
|
+
/* @__PURE__ */ jsxs130("span", { className: "w-10 text-right font-medium", children: [
|
|
42299
42529
|
value,
|
|
42300
42530
|
"%"
|
|
42301
42531
|
] })
|
|
@@ -42305,20 +42535,20 @@ function EngagedAudienceDemographics({
|
|
|
42305
42535
|
)
|
|
42306
42536
|
) })
|
|
42307
42537
|
] }),
|
|
42308
|
-
hasGenders && /* @__PURE__ */
|
|
42309
|
-
([gender, value]) => /* @__PURE__ */
|
|
42538
|
+
hasGenders && /* @__PURE__ */ jsx170("div", { className: "flex flex-col justify-center", children: /* @__PURE__ */ jsx170("div", { className: "flex sm:flex-col gap-3", children: Object.entries(audienceDemographics?.genders || {}).map(
|
|
42539
|
+
([gender, value]) => /* @__PURE__ */ jsxs130(
|
|
42310
42540
|
"div",
|
|
42311
42541
|
{
|
|
42312
42542
|
className: "flex flex-col justify-center text-sm",
|
|
42313
42543
|
children: [
|
|
42314
|
-
/* @__PURE__ */
|
|
42315
|
-
gender === "female" ? /* @__PURE__ */
|
|
42316
|
-
/* @__PURE__ */
|
|
42544
|
+
/* @__PURE__ */ jsxs130("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
42545
|
+
gender === "female" ? /* @__PURE__ */ jsx170(Venus, { className: "text-red-500", strokeWidth: 3 }) : /* @__PURE__ */ jsx170(Mars, { className: "text-blue-500", strokeWidth: 3 }),
|
|
42546
|
+
/* @__PURE__ */ jsxs130("span", { className: "capitalize text-gray800 text-xl", children: [
|
|
42317
42547
|
value,
|
|
42318
42548
|
"%"
|
|
42319
42549
|
] })
|
|
42320
42550
|
] }),
|
|
42321
|
-
/* @__PURE__ */
|
|
42551
|
+
/* @__PURE__ */ jsx170("span", { className: "text-lg text-gray700", children: gender.charAt(0).toUpperCase() + gender.slice(1) })
|
|
42322
42552
|
]
|
|
42323
42553
|
},
|
|
42324
42554
|
gender
|
|
@@ -42331,40 +42561,40 @@ function EngagedAudienceDemographics({
|
|
|
42331
42561
|
}
|
|
42332
42562
|
|
|
42333
42563
|
// src/molecules/creator-discovery/CreatorWidget/PlatformIcons.tsx
|
|
42334
|
-
import { jsx as
|
|
42564
|
+
import { jsx as jsx171 } from "react/jsx-runtime";
|
|
42335
42565
|
function InstagramIcon({ className }) {
|
|
42336
|
-
return /* @__PURE__ */
|
|
42566
|
+
return /* @__PURE__ */ jsx171(
|
|
42337
42567
|
"svg",
|
|
42338
42568
|
{
|
|
42339
42569
|
className,
|
|
42340
42570
|
viewBox: "0 0 24 24",
|
|
42341
42571
|
fill: "currentColor",
|
|
42342
42572
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42343
|
-
children: /* @__PURE__ */
|
|
42573
|
+
children: /* @__PURE__ */ jsx171("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" })
|
|
42344
42574
|
}
|
|
42345
42575
|
);
|
|
42346
42576
|
}
|
|
42347
42577
|
function YouTubeIcon({ className }) {
|
|
42348
|
-
return /* @__PURE__ */
|
|
42578
|
+
return /* @__PURE__ */ jsx171(
|
|
42349
42579
|
"svg",
|
|
42350
42580
|
{
|
|
42351
42581
|
className,
|
|
42352
42582
|
viewBox: "0 0 24 24",
|
|
42353
42583
|
fill: "currentColor",
|
|
42354
42584
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42355
|
-
children: /* @__PURE__ */
|
|
42585
|
+
children: /* @__PURE__ */ jsx171("path", { d: "M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
|
|
42356
42586
|
}
|
|
42357
42587
|
);
|
|
42358
42588
|
}
|
|
42359
42589
|
function TikTokIcon3({ className }) {
|
|
42360
|
-
return /* @__PURE__ */
|
|
42590
|
+
return /* @__PURE__ */ jsx171(
|
|
42361
42591
|
"svg",
|
|
42362
42592
|
{
|
|
42363
42593
|
className,
|
|
42364
42594
|
viewBox: "0 0 24 24",
|
|
42365
42595
|
fill: "currentColor",
|
|
42366
42596
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42367
|
-
children: /* @__PURE__ */
|
|
42597
|
+
children: /* @__PURE__ */ jsx171("path", { d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" })
|
|
42368
42598
|
}
|
|
42369
42599
|
);
|
|
42370
42600
|
}
|
|
@@ -42398,8 +42628,8 @@ function getPlatformIconColor(platform) {
|
|
|
42398
42628
|
}
|
|
42399
42629
|
|
|
42400
42630
|
// src/molecules/creator-discovery/CreatorWidget/PostCard.tsx
|
|
42401
|
-
import { useState as
|
|
42402
|
-
import { Fragment as Fragment9, jsx as
|
|
42631
|
+
import { useState as useState17 } from "react";
|
|
42632
|
+
import { Fragment as Fragment9, jsx as jsx172, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
42403
42633
|
var formatFollowerCount = (count) => {
|
|
42404
42634
|
if (count >= 1e6) {
|
|
42405
42635
|
const millions = count / 1e6;
|
|
@@ -42412,15 +42642,15 @@ var formatFollowerCount = (count) => {
|
|
|
42412
42642
|
return Math.floor(count).toString();
|
|
42413
42643
|
};
|
|
42414
42644
|
function PostCard({ post, platformUsername }) {
|
|
42415
|
-
const [expanded, setExpanded] =
|
|
42416
|
-
const [errored, setErrored] =
|
|
42645
|
+
const [expanded, setExpanded] = useState17(false);
|
|
42646
|
+
const [errored, setErrored] = useState17(false);
|
|
42417
42647
|
const thumbnail = post.thumbnail_url || post.thumbnail || post.image || "";
|
|
42418
42648
|
const likes = post.engagement?.likes ?? post.likes ?? null;
|
|
42419
42649
|
const comments = post.engagement?.comments ?? post.comments ?? null;
|
|
42420
42650
|
const views = post.engagement?.views ?? post.engagement?.plays ?? post.views ?? post.plays ?? null;
|
|
42421
42651
|
const impressions = post.impressions ?? null;
|
|
42422
42652
|
const reach = post.reach ?? null;
|
|
42423
|
-
return /* @__PURE__ */
|
|
42653
|
+
return /* @__PURE__ */ jsxs131(
|
|
42424
42654
|
"div",
|
|
42425
42655
|
{
|
|
42426
42656
|
className: "rounded-xl overflow-hidden border border-gray500 bg-transparent shadow-sm cursor-pointer",
|
|
@@ -42429,7 +42659,7 @@ function PostCard({ post, platformUsername }) {
|
|
|
42429
42659
|
window.open(post.url, "_blank", "noopener,noreferrer");
|
|
42430
42660
|
},
|
|
42431
42661
|
children: [
|
|
42432
|
-
/* @__PURE__ */
|
|
42662
|
+
/* @__PURE__ */ jsx172("div", { className: "w-full aspect-square relative bg-gray25", children: thumbnail && !errored ? /* @__PURE__ */ jsx172(
|
|
42433
42663
|
"img",
|
|
42434
42664
|
{
|
|
42435
42665
|
src: thumbnail,
|
|
@@ -42437,55 +42667,55 @@ function PostCard({ post, platformUsername }) {
|
|
|
42437
42667
|
className: "w-full h-full object-cover",
|
|
42438
42668
|
onError: () => setErrored(true)
|
|
42439
42669
|
}
|
|
42440
|
-
) : /* @__PURE__ */
|
|
42441
|
-
/* @__PURE__ */
|
|
42442
|
-
/* @__PURE__ */
|
|
42443
|
-
likes !== null && /* @__PURE__ */
|
|
42444
|
-
/* @__PURE__ */
|
|
42670
|
+
) : /* @__PURE__ */ jsx172("div", { className: "w-full h-full flex items-center justify-center text-gray500 text-sm", children: "No preview" }) }),
|
|
42671
|
+
/* @__PURE__ */ jsxs131("div", { className: "p-3", children: [
|
|
42672
|
+
/* @__PURE__ */ jsxs131("div", { className: "flex items-center gap-4 text-sm text-gray600 mb-2", children: [
|
|
42673
|
+
likes !== null && /* @__PURE__ */ jsxs131("div", { className: "flex items-center gap-1", children: [
|
|
42674
|
+
/* @__PURE__ */ jsx172("span", { children: formatFollowerCount(likes) }),
|
|
42445
42675
|
" ",
|
|
42446
|
-
/* @__PURE__ */
|
|
42676
|
+
/* @__PURE__ */ jsx172(Heart, { size: 14 })
|
|
42447
42677
|
] }),
|
|
42448
|
-
comments !== null && /* @__PURE__ */
|
|
42449
|
-
/* @__PURE__ */
|
|
42678
|
+
comments !== null && /* @__PURE__ */ jsxs131("div", { className: "flex items-center gap-1", children: [
|
|
42679
|
+
/* @__PURE__ */ jsx172("span", { children: formatFollowerCount(comments) }),
|
|
42450
42680
|
" ",
|
|
42451
|
-
/* @__PURE__ */
|
|
42681
|
+
/* @__PURE__ */ jsx172(MessageCircle, { size: 14 })
|
|
42452
42682
|
] }),
|
|
42453
|
-
views !== null && /* @__PURE__ */
|
|
42454
|
-
/* @__PURE__ */
|
|
42683
|
+
views !== null && /* @__PURE__ */ jsxs131("div", { className: "flex items-center gap-1", children: [
|
|
42684
|
+
/* @__PURE__ */ jsx172("span", { children: formatFollowerCount(views) }),
|
|
42455
42685
|
" ",
|
|
42456
|
-
/* @__PURE__ */
|
|
42686
|
+
/* @__PURE__ */ jsx172(Eye, { size: 14 })
|
|
42457
42687
|
] })
|
|
42458
42688
|
] }),
|
|
42459
|
-
/* @__PURE__ */
|
|
42460
|
-
impressions !== null && /* @__PURE__ */
|
|
42461
|
-
/* @__PURE__ */
|
|
42689
|
+
/* @__PURE__ */ jsxs131("div", { className: "flex gap-4 text-sm text-gray800 mb-2", children: [
|
|
42690
|
+
impressions !== null && /* @__PURE__ */ jsxs131("div", { children: [
|
|
42691
|
+
/* @__PURE__ */ jsx172("span", { className: "text-gray500 font-bold", children: formatFollowerCount(impressions) }),
|
|
42462
42692
|
" ",
|
|
42463
42693
|
"est.Impressions"
|
|
42464
42694
|
] }),
|
|
42465
|
-
reach !== null && /* @__PURE__ */
|
|
42466
|
-
/* @__PURE__ */
|
|
42695
|
+
reach !== null && /* @__PURE__ */ jsxs131("div", { children: [
|
|
42696
|
+
/* @__PURE__ */ jsx172("span", { className: "text-gray500 font-bold", children: formatFollowerCount(reach) }),
|
|
42467
42697
|
" ",
|
|
42468
42698
|
"est.Reach"
|
|
42469
42699
|
] })
|
|
42470
42700
|
] }),
|
|
42471
|
-
/* @__PURE__ */
|
|
42472
|
-
platformUsername && /* @__PURE__ */
|
|
42701
|
+
/* @__PURE__ */ jsxs131("div", { className: "text-sm mb-1", children: [
|
|
42702
|
+
platformUsername && /* @__PURE__ */ jsxs131("div", { className: "text-md font-semibold text-gray500", children: [
|
|
42473
42703
|
"@",
|
|
42474
42704
|
platformUsername
|
|
42475
42705
|
] }),
|
|
42476
42706
|
["instagram", "tiktok"].includes(
|
|
42477
42707
|
post.platform?.toLowerCase() || ""
|
|
42478
|
-
) ? /* @__PURE__ */
|
|
42708
|
+
) ? /* @__PURE__ */ jsx172(Fragment9, { children: (() => {
|
|
42479
42709
|
const text = post.title || post.description || "";
|
|
42480
|
-
return /* @__PURE__ */
|
|
42481
|
-
/* @__PURE__ */
|
|
42710
|
+
return /* @__PURE__ */ jsxs131(Fragment9, { children: [
|
|
42711
|
+
/* @__PURE__ */ jsx172(
|
|
42482
42712
|
"div",
|
|
42483
42713
|
{
|
|
42484
42714
|
className: `text-gray900 font-light mt-2 text-sm ${!expanded ? "line-clamp-3" : ""}`,
|
|
42485
42715
|
children: text
|
|
42486
42716
|
}
|
|
42487
42717
|
),
|
|
42488
|
-
text.length > 100 && /* @__PURE__ */
|
|
42718
|
+
text.length > 100 && /* @__PURE__ */ jsx172(
|
|
42489
42719
|
"button",
|
|
42490
42720
|
{
|
|
42491
42721
|
onClick: (e) => {
|
|
@@ -42497,9 +42727,9 @@ function PostCard({ post, platformUsername }) {
|
|
|
42497
42727
|
}
|
|
42498
42728
|
)
|
|
42499
42729
|
] });
|
|
42500
|
-
})() }) : /* @__PURE__ */
|
|
42501
|
-
post.title && /* @__PURE__ */
|
|
42502
|
-
post.description && /* @__PURE__ */
|
|
42730
|
+
})() }) : /* @__PURE__ */ jsxs131(Fragment9, { children: [
|
|
42731
|
+
post.title && /* @__PURE__ */ jsx172("div", { className: "text-gray900 font-light", children: post.title }),
|
|
42732
|
+
post.description && /* @__PURE__ */ jsx172(
|
|
42503
42733
|
"div",
|
|
42504
42734
|
{
|
|
42505
42735
|
className: "mt-2 text-sm text-gray900 overflow-hidden font-light",
|
|
@@ -42507,7 +42737,7 @@ function PostCard({ post, platformUsername }) {
|
|
|
42507
42737
|
children: post.description
|
|
42508
42738
|
}
|
|
42509
42739
|
),
|
|
42510
|
-
post.description && post.description.length > 200 && /* @__PURE__ */
|
|
42740
|
+
post.description && post.description.length > 200 && /* @__PURE__ */ jsx172(
|
|
42511
42741
|
"button",
|
|
42512
42742
|
{
|
|
42513
42743
|
onClick: (e) => {
|
|
@@ -42527,7 +42757,7 @@ function PostCard({ post, platformUsername }) {
|
|
|
42527
42757
|
}
|
|
42528
42758
|
|
|
42529
42759
|
// src/molecules/creator-discovery/CreatorWidget/PlatformPostsSection.tsx
|
|
42530
|
-
import { jsx as
|
|
42760
|
+
import { jsx as jsx173, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
42531
42761
|
var formatFollowerCount2 = (count) => {
|
|
42532
42762
|
if (count >= 1e6) {
|
|
42533
42763
|
const millions = count / 1e6;
|
|
@@ -42551,21 +42781,21 @@ function PlatformMetricsBanner({
|
|
|
42551
42781
|
const platformName = getPlatformName(platform);
|
|
42552
42782
|
const bgColor = getPlatformBgColor(platform);
|
|
42553
42783
|
const IconComponent = getPlatformIcon(platform);
|
|
42554
|
-
return /* @__PURE__ */
|
|
42784
|
+
return /* @__PURE__ */ jsxs132(
|
|
42555
42785
|
"div",
|
|
42556
42786
|
{
|
|
42557
|
-
className: "\n
|
|
42787
|
+
className: "\r\n grid grid-cols-1 gap-3 rounded-xl py-4 px-4 shadow-sm\r\n md:flex md:overflow-x-auto md:gap-6 md:rounded-l-xl md:py-4 md:px-4 md:items-center md:gap-0 md:px-0 md:ml-8\r\n ",
|
|
42558
42788
|
style: { backgroundColor: bgColor },
|
|
42559
42789
|
children: [
|
|
42560
|
-
/* @__PURE__ */
|
|
42561
|
-
/* @__PURE__ */
|
|
42562
|
-
/* @__PURE__ */
|
|
42790
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-center md:min-w-0", children: [
|
|
42791
|
+
/* @__PURE__ */ jsx173(IconComponent, { className: "w-5 h-5 md:w-6 md:h-6 text-gray900" }),
|
|
42792
|
+
/* @__PURE__ */ jsx173("span", { className: "text-sm md:text-xl font-bold text-gray900", children: platform === "youtubeMetrics" ? formatFollowerCount2(metrics.subscribers || 0) : formatFollowerCount2(metrics.followers || 0) })
|
|
42563
42793
|
] }),
|
|
42564
|
-
/* @__PURE__ */
|
|
42565
|
-
/* @__PURE__ */
|
|
42794
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-start md:min-w-0", children: [
|
|
42795
|
+
/* @__PURE__ */ jsxs132(
|
|
42566
42796
|
"span",
|
|
42567
42797
|
{
|
|
42568
|
-
className: "text-
|
|
42798
|
+
className: "text-xs md:text-lg dark:text-white truncate cursor-default",
|
|
42569
42799
|
title: `@${platform === "youtubeMetrics" ? metrics.channelName : metrics.username}`,
|
|
42570
42800
|
children: [
|
|
42571
42801
|
"@",
|
|
@@ -42573,22 +42803,22 @@ function PlatformMetricsBanner({
|
|
|
42573
42803
|
]
|
|
42574
42804
|
}
|
|
42575
42805
|
),
|
|
42576
|
-
/* @__PURE__ */
|
|
42806
|
+
/* @__PURE__ */ jsx173("span", { className: "text-xs md:text-sm text-gray900 opacity-90", children: platformName })
|
|
42577
42807
|
] }),
|
|
42578
|
-
/* @__PURE__ */
|
|
42579
|
-
/* @__PURE__ */
|
|
42808
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-start md:min-w-0", children: [
|
|
42809
|
+
/* @__PURE__ */ jsxs132("span", { className: "text-xs md:text-md font-semibold text-gray900", children: [
|
|
42580
42810
|
(metrics.engagementRate * 100).toFixed(2),
|
|
42581
42811
|
"%"
|
|
42582
42812
|
] }),
|
|
42583
|
-
/* @__PURE__ */
|
|
42813
|
+
/* @__PURE__ */ jsx173("span", { className: "text-xs text-gray900 opacity-80", children: "Engagement Rate" })
|
|
42584
42814
|
] }),
|
|
42585
|
-
/* @__PURE__ */
|
|
42586
|
-
/* @__PURE__ */
|
|
42587
|
-
/* @__PURE__ */
|
|
42815
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-start md:min-w-0", children: [
|
|
42816
|
+
/* @__PURE__ */ jsx173("span", { className: "text-xs md:text-md font-semibold text-gray900", children: Math.round(metrics.avgLikes)?.toLocaleString() }),
|
|
42817
|
+
/* @__PURE__ */ jsx173("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Likes" })
|
|
42588
42818
|
] }),
|
|
42589
|
-
/* @__PURE__ */
|
|
42590
|
-
/* @__PURE__ */
|
|
42591
|
-
/* @__PURE__ */
|
|
42819
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-start md:min-w-0", children: [
|
|
42820
|
+
/* @__PURE__ */ jsx173("span", { className: "text-xs md:text-md font-semibold text-gray900", children: Math.round(metrics.avgComments)?.toLocaleString() }),
|
|
42821
|
+
/* @__PURE__ */ jsx173("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Comments" })
|
|
42592
42822
|
] })
|
|
42593
42823
|
]
|
|
42594
42824
|
}
|
|
@@ -42599,16 +42829,16 @@ function PlatformPostsSection({
|
|
|
42599
42829
|
posts = []
|
|
42600
42830
|
}) {
|
|
42601
42831
|
if (!platformMetrics) return null;
|
|
42602
|
-
return /* @__PURE__ */
|
|
42832
|
+
return /* @__PURE__ */ jsx173("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsx173("div", { className: "flex flex-col gap-8", children: Object.entries(platformMetrics || {}).map(
|
|
42603
42833
|
([platform, metrics]) => {
|
|
42604
42834
|
if (!metrics) return null;
|
|
42605
42835
|
if (metrics.followers === 0 && metrics.subscribers === 0)
|
|
42606
42836
|
return null;
|
|
42607
42837
|
const platformPosts = filterPostsByPlatform(posts, platform);
|
|
42608
42838
|
const platformUsername = metrics.username ?? metrics.channelName ?? "";
|
|
42609
|
-
return /* @__PURE__ */
|
|
42610
|
-
/* @__PURE__ */
|
|
42611
|
-
platformPosts.length > 0 && /* @__PURE__ */
|
|
42839
|
+
return /* @__PURE__ */ jsxs132("div", { className: "w-full flex flex-col gap-8", children: [
|
|
42840
|
+
/* @__PURE__ */ jsx173(PlatformMetricsBanner, { platform, metrics }),
|
|
42841
|
+
platformPosts.length > 0 && /* @__PURE__ */ jsx173("div", { className: " sm:ml-8 sm:pr-7", children: /* @__PURE__ */ jsx173("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: platformPosts.map((post, idx) => /* @__PURE__ */ jsx173(
|
|
42612
42842
|
PostCard,
|
|
42613
42843
|
{
|
|
42614
42844
|
post,
|
|
@@ -42622,10 +42852,10 @@ function PlatformPostsSection({
|
|
|
42622
42852
|
}
|
|
42623
42853
|
|
|
42624
42854
|
// src/molecules/creator-discovery/CreatorWidget/BrandCollaborationsList.tsx
|
|
42625
|
-
import { useState as
|
|
42855
|
+
import { useState as useState18 } from "react";
|
|
42626
42856
|
import ReactDOM from "react-dom";
|
|
42627
42857
|
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
|
|
42628
|
-
import { Fragment as Fragment10, jsx as
|
|
42858
|
+
import { Fragment as Fragment10, jsx as jsx174, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
42629
42859
|
var getSentimentRank = (score) => {
|
|
42630
42860
|
if (score >= 80) {
|
|
42631
42861
|
return {
|
|
@@ -42670,8 +42900,8 @@ function BrandMentionDetails({
|
|
|
42670
42900
|
) || [];
|
|
42671
42901
|
if (typeof window === "undefined") return null;
|
|
42672
42902
|
return ReactDOM.createPortal(
|
|
42673
|
-
/* @__PURE__ */
|
|
42674
|
-
/* @__PURE__ */
|
|
42903
|
+
/* @__PURE__ */ jsx174(AnimatePresence3, { mode: "sync", children: open && /* @__PURE__ */ jsxs133(Fragment10, { children: [
|
|
42904
|
+
/* @__PURE__ */ jsx174(
|
|
42675
42905
|
motion3.div,
|
|
42676
42906
|
{
|
|
42677
42907
|
initial: { opacity: 0 },
|
|
@@ -42686,7 +42916,7 @@ function BrandMentionDetails({
|
|
|
42686
42916
|
},
|
|
42687
42917
|
"brand-overlay"
|
|
42688
42918
|
),
|
|
42689
|
-
/* @__PURE__ */
|
|
42919
|
+
/* @__PURE__ */ jsxs133(
|
|
42690
42920
|
motion3.div,
|
|
42691
42921
|
{
|
|
42692
42922
|
initial: { opacity: 0, scale: 0.95 },
|
|
@@ -42696,42 +42926,42 @@ function BrandMentionDetails({
|
|
|
42696
42926
|
className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[90] w-full max-w-lg bg-background rounded-xl border border-gray300 shadow-2xl",
|
|
42697
42927
|
onClick: (e) => e.stopPropagation(),
|
|
42698
42928
|
children: [
|
|
42699
|
-
/* @__PURE__ */
|
|
42700
|
-
/* @__PURE__ */
|
|
42929
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex justify-between items-center p-4 border-b border-gray300", children: [
|
|
42930
|
+
/* @__PURE__ */ jsxs133("h3", { className: "text-lg font-bold text-gray900", children: [
|
|
42701
42931
|
"Brand Mention Details: ",
|
|
42702
42932
|
selectedBrand
|
|
42703
42933
|
] }),
|
|
42704
|
-
/* @__PURE__ */
|
|
42934
|
+
/* @__PURE__ */ jsx174(
|
|
42705
42935
|
"button",
|
|
42706
42936
|
{
|
|
42707
42937
|
onClick: onClose,
|
|
42708
42938
|
className: "p-1 rounded-full hover:bg-gray200 transition-colors",
|
|
42709
|
-
children: /* @__PURE__ */
|
|
42939
|
+
children: /* @__PURE__ */ jsx174(X, { className: "w-4 h-4" })
|
|
42710
42940
|
}
|
|
42711
42941
|
)
|
|
42712
42942
|
] }),
|
|
42713
|
-
/* @__PURE__ */
|
|
42714
|
-
brandStats && /* @__PURE__ */
|
|
42715
|
-
/* @__PURE__ */
|
|
42716
|
-
/* @__PURE__ */
|
|
42717
|
-
/* @__PURE__ */
|
|
42718
|
-
/* @__PURE__ */
|
|
42719
|
-
/* @__PURE__ */
|
|
42943
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex flex-col gap-6 max-h-[70vh] overflow-y-auto p-4", children: [
|
|
42944
|
+
brandStats && /* @__PURE__ */ jsxs133("div", { className: "bg-gray25 border-2 border-gray200 rounded-xl p-4", children: [
|
|
42945
|
+
/* @__PURE__ */ jsx174("h3", { className: "text-lg font-bold text-gray900 mb-4", children: "Overview" }),
|
|
42946
|
+
/* @__PURE__ */ jsxs133("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
42947
|
+
/* @__PURE__ */ jsxs133("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42948
|
+
/* @__PURE__ */ jsx174("div", { className: "text-xs text-gray600", children: "Total Mentions" }),
|
|
42949
|
+
/* @__PURE__ */ jsx174("div", { className: "text-2xl font-bold text-gray900", children: brandStats.mentions })
|
|
42720
42950
|
] }),
|
|
42721
|
-
/* @__PURE__ */
|
|
42722
|
-
/* @__PURE__ */
|
|
42723
|
-
/* @__PURE__ */
|
|
42951
|
+
/* @__PURE__ */ jsxs133("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42952
|
+
/* @__PURE__ */ jsx174("div", { className: "text-xs text-gray600", children: "Posts Count" }),
|
|
42953
|
+
/* @__PURE__ */ jsx174("div", { className: "text-2xl font-bold text-gray900", children: brandStats.postCount })
|
|
42724
42954
|
] }),
|
|
42725
|
-
/* @__PURE__ */
|
|
42726
|
-
/* @__PURE__ */
|
|
42727
|
-
/* @__PURE__ */
|
|
42955
|
+
/* @__PURE__ */ jsxs133("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42956
|
+
/* @__PURE__ */ jsx174("div", { className: "text-xs text-gray600", children: "Avg Engagement" }),
|
|
42957
|
+
/* @__PURE__ */ jsxs133("div", { className: "text-2xl font-bold text-gray900", children: [
|
|
42728
42958
|
brandStats.averageEngagementRate?.toFixed(2),
|
|
42729
42959
|
"%"
|
|
42730
42960
|
] })
|
|
42731
42961
|
] }),
|
|
42732
|
-
/* @__PURE__ */
|
|
42733
|
-
/* @__PURE__ */
|
|
42734
|
-
/* @__PURE__ */
|
|
42962
|
+
/* @__PURE__ */ jsxs133("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42963
|
+
/* @__PURE__ */ jsx174("div", { className: "text-xs text-gray600", children: "Effectiveness" }),
|
|
42964
|
+
/* @__PURE__ */ jsxs133(
|
|
42735
42965
|
"div",
|
|
42736
42966
|
{
|
|
42737
42967
|
className: `text-2xl font-bold ${getSentimentRank(brandStats.effectivenessPercent).scoreColor}`,
|
|
@@ -42743,8 +42973,8 @@ function BrandMentionDetails({
|
|
|
42743
42973
|
)
|
|
42744
42974
|
] })
|
|
42745
42975
|
] }),
|
|
42746
|
-
/* @__PURE__ */
|
|
42747
|
-
(type, idx) => /* @__PURE__ */
|
|
42976
|
+
/* @__PURE__ */ jsx174("div", { className: "mt-3 flex gap-2 flex-wrap", children: brandStats.collaborationTypes?.map(
|
|
42977
|
+
(type, idx) => /* @__PURE__ */ jsx174(
|
|
42748
42978
|
"span",
|
|
42749
42979
|
{
|
|
42750
42980
|
className: "px-3 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]",
|
|
@@ -42754,55 +42984,55 @@ function BrandMentionDetails({
|
|
|
42754
42984
|
)
|
|
42755
42985
|
) })
|
|
42756
42986
|
] }),
|
|
42757
|
-
/* @__PURE__ */
|
|
42758
|
-
/* @__PURE__ */
|
|
42987
|
+
/* @__PURE__ */ jsxs133("div", { children: [
|
|
42988
|
+
/* @__PURE__ */ jsxs133("h3", { className: "text-lg font-bold text-gray900 mb-3", children: [
|
|
42759
42989
|
"Individual Mentions (",
|
|
42760
42990
|
brandMentions.length,
|
|
42761
42991
|
")"
|
|
42762
42992
|
] }),
|
|
42763
|
-
/* @__PURE__ */
|
|
42993
|
+
/* @__PURE__ */ jsx174("div", { className: "flex flex-col gap-3", children: brandMentions.map((mention, index) => {
|
|
42764
42994
|
const IconComponent = getPlatformIcon(mention?.platform);
|
|
42765
|
-
return /* @__PURE__ */
|
|
42995
|
+
return /* @__PURE__ */ jsxs133(
|
|
42766
42996
|
"div",
|
|
42767
42997
|
{
|
|
42768
42998
|
className: "bg-gray50 border-2 border-gray200 rounded-xl p-4 hover:border-purple100 transition-colors",
|
|
42769
42999
|
children: [
|
|
42770
|
-
/* @__PURE__ */
|
|
42771
|
-
/* @__PURE__ */
|
|
42772
|
-
/* @__PURE__ */
|
|
42773
|
-
/* @__PURE__ */
|
|
43000
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex items-center justify-between mb-3", children: [
|
|
43001
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex items-center gap-2", children: [
|
|
43002
|
+
/* @__PURE__ */ jsx174(IconComponent, { className: "w-5 h-5 text-gray900" }),
|
|
43003
|
+
/* @__PURE__ */ jsx174("span", { className: "text-sm font-medium text-gray700 capitalize", children: mention.platform })
|
|
42774
43004
|
] }),
|
|
42775
|
-
/* @__PURE__ */
|
|
42776
|
-
/* @__PURE__ */
|
|
42777
|
-
/* @__PURE__ */
|
|
43005
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex items-center gap-2", children: [
|
|
43006
|
+
/* @__PURE__ */ jsx174("span", { className: "px-2 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]", children: mention.collaborationType }),
|
|
43007
|
+
/* @__PURE__ */ jsxs133("span", { className: "text-xs text-gray600", children: [
|
|
42778
43008
|
Math.round(mention.confidence * 100),
|
|
42779
43009
|
"% confidence"
|
|
42780
43010
|
] })
|
|
42781
43011
|
] })
|
|
42782
43012
|
] }),
|
|
42783
|
-
/* @__PURE__ */
|
|
42784
|
-
/* @__PURE__ */
|
|
43013
|
+
/* @__PURE__ */ jsxs133("div", { className: "mb-2", children: [
|
|
43014
|
+
/* @__PURE__ */ jsxs133("span", { className: "text-xs text-gray500", children: [
|
|
42785
43015
|
"Post ID:",
|
|
42786
43016
|
" "
|
|
42787
43017
|
] }),
|
|
42788
|
-
/* @__PURE__ */
|
|
43018
|
+
/* @__PURE__ */ jsx174("span", { className: "text-xs font-mono text-gray700", children: mention.post_id })
|
|
42789
43019
|
] }),
|
|
42790
|
-
/* @__PURE__ */
|
|
42791
|
-
/* @__PURE__ */
|
|
42792
|
-
/* @__PURE__ */
|
|
43020
|
+
/* @__PURE__ */ jsxs133("div", { className: "bg-background rounded-lg p-3 border border-gray300", children: [
|
|
43021
|
+
/* @__PURE__ */ jsx174("div", { className: "text-xs text-gray600 mb-1", children: "Evidence:" }),
|
|
43022
|
+
/* @__PURE__ */ jsxs133("p", { className: "text-sm text-gray800 italic", children: [
|
|
42793
43023
|
"\u201C",
|
|
42794
43024
|
mention.evidence,
|
|
42795
43025
|
"\u201D"
|
|
42796
43026
|
] })
|
|
42797
43027
|
] }),
|
|
42798
|
-
/* @__PURE__ */
|
|
43028
|
+
/* @__PURE__ */ jsxs133("div", { className: "mt-2 text-xs text-gray500", children: [
|
|
42799
43029
|
"Source:",
|
|
42800
43030
|
" ",
|
|
42801
|
-
/* @__PURE__ */
|
|
42802
|
-
mention.handle && /* @__PURE__ */
|
|
43031
|
+
/* @__PURE__ */ jsx174("span", { className: "font-medium", children: mention.source }),
|
|
43032
|
+
mention.handle && /* @__PURE__ */ jsxs133("span", { className: "ml-2", children: [
|
|
42803
43033
|
"Handle:",
|
|
42804
43034
|
" ",
|
|
42805
|
-
/* @__PURE__ */
|
|
43035
|
+
/* @__PURE__ */ jsx174("span", { className: "font-medium", children: mention.handle })
|
|
42806
43036
|
] })
|
|
42807
43037
|
] })
|
|
42808
43038
|
]
|
|
@@ -42811,7 +43041,7 @@ function BrandMentionDetails({
|
|
|
42811
43041
|
);
|
|
42812
43042
|
}) })
|
|
42813
43043
|
] }),
|
|
42814
|
-
brandMentions.length === 0 && /* @__PURE__ */
|
|
43044
|
+
brandMentions.length === 0 && /* @__PURE__ */ jsx174("div", { className: "text-center py-8 text-gray500", children: "No mentions found for this brand" })
|
|
42815
43045
|
] })
|
|
42816
43046
|
]
|
|
42817
43047
|
},
|
|
@@ -42824,16 +43054,16 @@ function BrandMentionDetails({
|
|
|
42824
43054
|
function BrandCollaborationsList({
|
|
42825
43055
|
brandBreakdown
|
|
42826
43056
|
}) {
|
|
42827
|
-
const [openDetails, setOpenDetails] =
|
|
42828
|
-
const [selectedBrand, setSelectedBrand] =
|
|
43057
|
+
const [openDetails, setOpenDetails] = useState18(false);
|
|
43058
|
+
const [selectedBrand, setSelectedBrand] = useState18("");
|
|
42829
43059
|
if (!brandBreakdown?.insights?.brandBreakdown || brandBreakdown.insights.brandBreakdown.length === 0) {
|
|
42830
43060
|
return null;
|
|
42831
43061
|
}
|
|
42832
|
-
return /* @__PURE__ */
|
|
42833
|
-
/* @__PURE__ */
|
|
42834
|
-
/* @__PURE__ */
|
|
42835
|
-
/* @__PURE__ */
|
|
42836
|
-
(item, index) => /* @__PURE__ */
|
|
43062
|
+
return /* @__PURE__ */ jsxs133(Fragment10, { children: [
|
|
43063
|
+
/* @__PURE__ */ jsxs133("div", { children: [
|
|
43064
|
+
/* @__PURE__ */ jsx174("div", { className: "text-purpleText text-xs mb-2", children: /* @__PURE__ */ jsx174("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTIONS" }) }),
|
|
43065
|
+
/* @__PURE__ */ jsx174("div", { className: "flex flex-col gap-2 max-h-[220px] overflow-y-auto", children: brandBreakdown.insights.brandBreakdown.map(
|
|
43066
|
+
(item, index) => /* @__PURE__ */ jsxs133(
|
|
42837
43067
|
"div",
|
|
42838
43068
|
{
|
|
42839
43069
|
className: "flex gap-4 bg-gray50 border-2 border-gray25 rounded-xl px-3 py-3 shadow-sm cursor-pointer hover:border-purple100 transition-colors",
|
|
@@ -42843,17 +43073,17 @@ function BrandCollaborationsList({
|
|
|
42843
43073
|
setOpenDetails(true);
|
|
42844
43074
|
},
|
|
42845
43075
|
children: [
|
|
42846
|
-
/* @__PURE__ */
|
|
42847
|
-
/* @__PURE__ */
|
|
42848
|
-
/* @__PURE__ */
|
|
42849
|
-
/* @__PURE__ */
|
|
42850
|
-
/* @__PURE__ */
|
|
42851
|
-
/* @__PURE__ */
|
|
43076
|
+
/* @__PURE__ */ jsx174("div", { className: "w-10 h-10 rounded-full bg-gray200 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx174("span", { className: "text-sm font-bold text-gray700", children: item.brand?.charAt(0)?.toUpperCase() || "?" }) }),
|
|
43077
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex flex-col gap-1", children: [
|
|
43078
|
+
/* @__PURE__ */ jsx174("div", { className: "text-gray900 text-sm", children: item.brand }),
|
|
43079
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex gap-2 text-xs text-gray600", children: [
|
|
43080
|
+
/* @__PURE__ */ jsxs133("div", { children: [
|
|
43081
|
+
/* @__PURE__ */ jsx174("span", { className: "text-gray900", children: item?.mentions }),
|
|
42852
43082
|
" ",
|
|
42853
43083
|
"Mention"
|
|
42854
43084
|
] }),
|
|
42855
|
-
/* @__PURE__ */
|
|
42856
|
-
/* @__PURE__ */
|
|
43085
|
+
/* @__PURE__ */ jsxs133("div", { children: [
|
|
43086
|
+
/* @__PURE__ */ jsx174(
|
|
42857
43087
|
"span",
|
|
42858
43088
|
{
|
|
42859
43089
|
className: `${getSentimentRank(item.effectivenessPercent).scoreColor} font-bold`,
|
|
@@ -42871,7 +43101,7 @@ function BrandCollaborationsList({
|
|
|
42871
43101
|
)
|
|
42872
43102
|
) })
|
|
42873
43103
|
] }),
|
|
42874
|
-
/* @__PURE__ */
|
|
43104
|
+
/* @__PURE__ */ jsx174(
|
|
42875
43105
|
BrandMentionDetails,
|
|
42876
43106
|
{
|
|
42877
43107
|
open: openDetails,
|
|
@@ -42884,9 +43114,9 @@ function BrandCollaborationsList({
|
|
|
42884
43114
|
}
|
|
42885
43115
|
|
|
42886
43116
|
// src/molecules/creator-discovery/CreatorWidget/CreatorGridView.tsx
|
|
42887
|
-
import { useState as
|
|
43117
|
+
import { useState as useState19, useMemo as useMemo10, useRef as useRef9, useCallback as useCallback6, useEffect as useEffect12 } from "react";
|
|
42888
43118
|
import { motion as motion4 } from "framer-motion";
|
|
42889
|
-
import { jsx as
|
|
43119
|
+
import { jsx as jsx175, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
42890
43120
|
var formatFollowerCount3 = (count) => {
|
|
42891
43121
|
if (count >= 1e6) {
|
|
42892
43122
|
const millions = count / 1e6;
|
|
@@ -42933,20 +43163,20 @@ var itemsExplanation = [
|
|
|
42933
43163
|
{ key: "brandSafety", label: "Brand Safety" }
|
|
42934
43164
|
];
|
|
42935
43165
|
function CreatorGridViewCard({ creator }) {
|
|
42936
|
-
const [isExpanded, setIsExpanded] =
|
|
42937
|
-
const [showFullDescription, setShowFullDescription] =
|
|
42938
|
-
const [isDescriptionOverflowing, setIsDescriptionOverflowing] =
|
|
42939
|
-
const descriptionRef =
|
|
42940
|
-
const cardRef =
|
|
43166
|
+
const [isExpanded, setIsExpanded] = useState19(false);
|
|
43167
|
+
const [showFullDescription, setShowFullDescription] = useState19(false);
|
|
43168
|
+
const [isDescriptionOverflowing, setIsDescriptionOverflowing] = useState19(false);
|
|
43169
|
+
const descriptionRef = useRef9(null);
|
|
43170
|
+
const cardRef = useRef9(null);
|
|
42941
43171
|
const checkDescriptionOverflow = useCallback6(() => {
|
|
42942
43172
|
const el = descriptionRef.current;
|
|
42943
43173
|
if (!el) return;
|
|
42944
43174
|
setIsDescriptionOverflowing(el.scrollHeight > el.clientHeight + 1);
|
|
42945
43175
|
}, []);
|
|
42946
|
-
|
|
43176
|
+
useEffect12(() => {
|
|
42947
43177
|
checkDescriptionOverflow();
|
|
42948
43178
|
}, [checkDescriptionOverflow, isExpanded, showFullDescription]);
|
|
42949
|
-
|
|
43179
|
+
useEffect12(() => {
|
|
42950
43180
|
const onResize = () => checkDescriptionOverflow();
|
|
42951
43181
|
window.addEventListener("resize", onResize);
|
|
42952
43182
|
return () => window.removeEventListener("resize", onResize);
|
|
@@ -42987,7 +43217,7 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42987
43217
|
};
|
|
42988
43218
|
const iso2 = normalizeToIso2(creator.country);
|
|
42989
43219
|
const meta = codeToMeta[iso2];
|
|
42990
|
-
return /* @__PURE__ */
|
|
43220
|
+
return /* @__PURE__ */ jsx175(
|
|
42991
43221
|
motion4.div,
|
|
42992
43222
|
{
|
|
42993
43223
|
ref: cardRef,
|
|
@@ -42998,10 +43228,10 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42998
43228
|
className: `bg-paperBackground dark:bg-gray50 rounded-[10px] border border-gray300 hover:border-purple100 shadow-sm cursor-pointer transition-all duration-300 ease-in-out ${isExpanded ? "col-span-full border-purple100" : ""}`,
|
|
42999
43229
|
style: isExpanded ? { gridColumn: "1 / -1" } : {},
|
|
43000
43230
|
onClick: toggleExpanded,
|
|
43001
|
-
children: /* @__PURE__ */
|
|
43002
|
-
/* @__PURE__ */
|
|
43003
|
-
/* @__PURE__ */
|
|
43004
|
-
creator.profile_pic ? /* @__PURE__ */
|
|
43231
|
+
children: /* @__PURE__ */ jsxs134("div", { className: "flex", children: [
|
|
43232
|
+
/* @__PURE__ */ jsxs134("div", { className: `${isExpanded ? "w-1/3" : "w-full"}`, children: [
|
|
43233
|
+
/* @__PURE__ */ jsxs134("div", { className: "relative w-full aspect-square mb-2", children: [
|
|
43234
|
+
creator.profile_pic ? /* @__PURE__ */ jsx175(
|
|
43005
43235
|
"img",
|
|
43006
43236
|
{
|
|
43007
43237
|
src: creator.profile_pic,
|
|
@@ -43009,15 +43239,15 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43009
43239
|
className: "w-full h-full object-cover bg-primary/10",
|
|
43010
43240
|
style: { borderRadius: "10px 10px 0 0" }
|
|
43011
43241
|
}
|
|
43012
|
-
) : /* @__PURE__ */
|
|
43242
|
+
) : /* @__PURE__ */ jsx175(
|
|
43013
43243
|
"div",
|
|
43014
43244
|
{
|
|
43015
43245
|
className: "w-full h-full bg-primary/10 flex items-center justify-center",
|
|
43016
43246
|
style: { borderRadius: "10px 10px 0 0" },
|
|
43017
|
-
children: /* @__PURE__ */
|
|
43247
|
+
children: /* @__PURE__ */ jsx175("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" })
|
|
43018
43248
|
}
|
|
43019
43249
|
),
|
|
43020
|
-
/* @__PURE__ */
|
|
43250
|
+
/* @__PURE__ */ jsx175(
|
|
43021
43251
|
"div",
|
|
43022
43252
|
{
|
|
43023
43253
|
className: `absolute bottom-2 right-2 ${getSentimentRank2(creator.sentiment?.matchScore || 0).bgColor} ${getSentimentRank2(creator.sentiment?.matchScore || 0).textColor} px-2 py-1 rounded-md text-md font-medium`,
|
|
@@ -43025,34 +43255,34 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43025
43255
|
}
|
|
43026
43256
|
)
|
|
43027
43257
|
] }),
|
|
43028
|
-
/* @__PURE__ */
|
|
43029
|
-
/* @__PURE__ */
|
|
43030
|
-
/* @__PURE__ */
|
|
43258
|
+
/* @__PURE__ */ jsxs134("div", { className: "px-3 pb-1", children: [
|
|
43259
|
+
/* @__PURE__ */ jsxs134("div", { children: [
|
|
43260
|
+
/* @__PURE__ */ jsx175(
|
|
43031
43261
|
"h3",
|
|
43032
43262
|
{
|
|
43033
43263
|
className: `${isExpanded ? "text-md" : "text-sm"} font-normal text-gray900 mb-1 line-clamp-2 text-start`,
|
|
43034
43264
|
children: creator.name || "Unnamed"
|
|
43035
43265
|
}
|
|
43036
43266
|
),
|
|
43037
|
-
/* @__PURE__ */
|
|
43267
|
+
/* @__PURE__ */ jsxs134(
|
|
43038
43268
|
"div",
|
|
43039
43269
|
{
|
|
43040
43270
|
className: `${isExpanded ? "text-sm" : "text-xs"} text-gray700 mb-1 text-start flex items-center gap-1`,
|
|
43041
43271
|
children: [
|
|
43042
|
-
/* @__PURE__ */
|
|
43043
|
-
/* @__PURE__ */
|
|
43272
|
+
/* @__PURE__ */ jsx175("span", { className: "text-base", children: meta?.flag }),
|
|
43273
|
+
/* @__PURE__ */ jsx175("span", { children: meta?.name || creator.country || "Unknown" })
|
|
43044
43274
|
]
|
|
43045
43275
|
}
|
|
43046
43276
|
),
|
|
43047
|
-
isExpanded && creator?.sentiment?.detailedScores && /* @__PURE__ */
|
|
43277
|
+
isExpanded && creator?.sentiment?.detailedScores && /* @__PURE__ */ jsx175("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx175("div", { className: "mt-2 w-[150px] flex gap-2", children: Object.entries(creator.sentiment.detailedScores).map(
|
|
43048
43278
|
([key, value]) => {
|
|
43049
43279
|
const itemRank = getSentimentRank2(value);
|
|
43050
|
-
return /* @__PURE__ */
|
|
43280
|
+
return /* @__PURE__ */ jsxs134(
|
|
43051
43281
|
"div",
|
|
43052
43282
|
{
|
|
43053
43283
|
className: "flex flex-col items-center w-[100px]",
|
|
43054
43284
|
children: [
|
|
43055
|
-
/* @__PURE__ */
|
|
43285
|
+
/* @__PURE__ */ jsxs134(
|
|
43056
43286
|
"span",
|
|
43057
43287
|
{
|
|
43058
43288
|
className: `text-[14px] font-bold ${itemRank.scoreColor}`,
|
|
@@ -43062,7 +43292,7 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43062
43292
|
]
|
|
43063
43293
|
}
|
|
43064
43294
|
),
|
|
43065
|
-
/* @__PURE__ */
|
|
43295
|
+
/* @__PURE__ */ jsx175("div", { className: "flex items-center justify-center gap-1 w-full", children: /* @__PURE__ */ jsx175("span", { className: "text-xs dark:text-gray500 text-center px-1", children: itemsExplanation.find(
|
|
43066
43296
|
(item) => item.key === key
|
|
43067
43297
|
)?.label }) })
|
|
43068
43298
|
]
|
|
@@ -43072,20 +43302,20 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43072
43302
|
}
|
|
43073
43303
|
) }) })
|
|
43074
43304
|
] }),
|
|
43075
|
-
!isExpanded && /* @__PURE__ */
|
|
43076
|
-
({ platform, icon: Icon3, followers }) => /* @__PURE__ */
|
|
43305
|
+
!isExpanded && /* @__PURE__ */ jsx175("div", { className: "flex gap-2 justify-between", children: platformStats.map(
|
|
43306
|
+
({ platform, icon: Icon3, followers }) => /* @__PURE__ */ jsxs134(
|
|
43077
43307
|
"div",
|
|
43078
43308
|
{
|
|
43079
43309
|
className: "flex flex-col items-center gap-1",
|
|
43080
43310
|
title: `${formatFollowerCount3(followers)} followers`,
|
|
43081
43311
|
children: [
|
|
43082
|
-
/* @__PURE__ */
|
|
43312
|
+
/* @__PURE__ */ jsx175(
|
|
43083
43313
|
Icon3,
|
|
43084
43314
|
{
|
|
43085
43315
|
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
43086
43316
|
}
|
|
43087
43317
|
),
|
|
43088
|
-
/* @__PURE__ */
|
|
43318
|
+
/* @__PURE__ */ jsx175("span", { className: "text-xs dark:text-gray500", children: followers > 0 && formatFollowerCount3(followers) })
|
|
43089
43319
|
]
|
|
43090
43320
|
},
|
|
43091
43321
|
platform
|
|
@@ -43093,20 +43323,20 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43093
43323
|
) })
|
|
43094
43324
|
] })
|
|
43095
43325
|
] }),
|
|
43096
|
-
isExpanded && /* @__PURE__ */
|
|
43097
|
-
/* @__PURE__ */
|
|
43098
|
-
/* @__PURE__ */
|
|
43326
|
+
isExpanded && /* @__PURE__ */ jsx175("div", { className: "flex-1 border-l border-gray300 p-6 overflow-hidden transition-all duration-300 ease-in-out", children: /* @__PURE__ */ jsxs134("div", { className: "space-y-4", children: [
|
|
43327
|
+
/* @__PURE__ */ jsxs134("div", { children: [
|
|
43328
|
+
/* @__PURE__ */ jsxs134(
|
|
43099
43329
|
"div",
|
|
43100
43330
|
{
|
|
43101
43331
|
ref: descriptionRef,
|
|
43102
43332
|
className: `${showFullDescription ? "" : "max-h-[80px] overflow-hidden"} relative`,
|
|
43103
43333
|
children: [
|
|
43104
|
-
/* @__PURE__ */
|
|
43105
|
-
!showFullDescription && isDescriptionOverflowing && /* @__PURE__ */
|
|
43334
|
+
/* @__PURE__ */ jsx175("p", { className: "text-sm text-gray700 leading-relaxed", children: creator.description || "No description provided." }),
|
|
43335
|
+
!showFullDescription && isDescriptionOverflowing && /* @__PURE__ */ jsx175("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 h-10 bg-gradient-to-t from-gray25 to-transparent" })
|
|
43106
43336
|
]
|
|
43107
43337
|
}
|
|
43108
43338
|
),
|
|
43109
|
-
(isDescriptionOverflowing || showFullDescription) && /* @__PURE__ */
|
|
43339
|
+
(isDescriptionOverflowing || showFullDescription) && /* @__PURE__ */ jsx175(
|
|
43110
43340
|
"button",
|
|
43111
43341
|
{
|
|
43112
43342
|
onClick: (e) => {
|
|
@@ -43118,38 +43348,38 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43118
43348
|
}
|
|
43119
43349
|
)
|
|
43120
43350
|
] }),
|
|
43121
|
-
/* @__PURE__ */
|
|
43122
|
-
({ platform, icon: Icon3, followers, engagement }) => /* @__PURE__ */
|
|
43123
|
-
/* @__PURE__ */
|
|
43351
|
+
/* @__PURE__ */ jsx175("div", { className: "flex gap-6 justify-start items-center", children: platformStats.map(
|
|
43352
|
+
({ platform, icon: Icon3, followers, engagement }) => /* @__PURE__ */ jsxs134("div", { className: "flex items-center gap-3", children: [
|
|
43353
|
+
/* @__PURE__ */ jsxs134(
|
|
43124
43354
|
"div",
|
|
43125
43355
|
{
|
|
43126
43356
|
className: "flex items-center gap-1",
|
|
43127
43357
|
title: `${formatFollowerCount3(followers)} followers`,
|
|
43128
43358
|
children: [
|
|
43129
|
-
/* @__PURE__ */
|
|
43359
|
+
/* @__PURE__ */ jsx175(
|
|
43130
43360
|
Icon3,
|
|
43131
43361
|
{
|
|
43132
43362
|
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
43133
43363
|
}
|
|
43134
43364
|
),
|
|
43135
|
-
/* @__PURE__ */
|
|
43365
|
+
/* @__PURE__ */ jsx175("span", { className: "text-xs dark:text-gray500", children: followers > 0 ? formatFollowerCount3(followers) : "0" })
|
|
43136
43366
|
]
|
|
43137
43367
|
}
|
|
43138
43368
|
),
|
|
43139
|
-
/* @__PURE__ */
|
|
43140
|
-
/* @__PURE__ */
|
|
43141
|
-
/* @__PURE__ */
|
|
43369
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex items-center gap-1", children: [
|
|
43370
|
+
/* @__PURE__ */ jsx175(ChartColumn, { className: "w-5 h-5 dark:text-gray500" }),
|
|
43371
|
+
/* @__PURE__ */ jsxs134("span", { className: "text-sm dark:text-gray500 w-[40px]", children: [
|
|
43142
43372
|
(engagement * 100).toFixed(1),
|
|
43143
43373
|
"%"
|
|
43144
43374
|
] })
|
|
43145
43375
|
] })
|
|
43146
43376
|
] }, platform)
|
|
43147
43377
|
) }),
|
|
43148
|
-
creator.posts?.length > 0 && /* @__PURE__ */
|
|
43149
|
-
/* @__PURE__ */
|
|
43150
|
-
/* @__PURE__ */
|
|
43378
|
+
creator.posts?.length > 0 && /* @__PURE__ */ jsxs134("div", { className: "w-full overflow-hidden", children: [
|
|
43379
|
+
/* @__PURE__ */ jsx175("h3", { className: "mb-2 text-sm font-medium text-gray900", children: "Recent Posts" }),
|
|
43380
|
+
/* @__PURE__ */ jsx175("div", { className: "flex gap-3 overflow-x-auto", children: creator.posts.filter(
|
|
43151
43381
|
(post) => post.thumbnail || post.thumbnail_url
|
|
43152
|
-
).slice(0, 8).map((post, idx) => /* @__PURE__ */
|
|
43382
|
+
).slice(0, 8).map((post, idx) => /* @__PURE__ */ jsx175(
|
|
43153
43383
|
"a",
|
|
43154
43384
|
{
|
|
43155
43385
|
href: post.url || "#",
|
|
@@ -43157,7 +43387,7 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43157
43387
|
rel: "noopener noreferrer",
|
|
43158
43388
|
className: "block flex-shrink-0",
|
|
43159
43389
|
onClick: (e) => e.stopPropagation(),
|
|
43160
|
-
children: /* @__PURE__ */
|
|
43390
|
+
children: /* @__PURE__ */ jsx175(
|
|
43161
43391
|
"img",
|
|
43162
43392
|
{
|
|
43163
43393
|
src: post.thumbnail_url || post.thumbnail,
|
|
@@ -43169,9 +43399,9 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43169
43399
|
idx
|
|
43170
43400
|
)) })
|
|
43171
43401
|
] }),
|
|
43172
|
-
creator?.sentiment?.aiReasoning && /* @__PURE__ */
|
|
43173
|
-
/* @__PURE__ */
|
|
43174
|
-
/* @__PURE__ */
|
|
43402
|
+
creator?.sentiment?.aiReasoning && /* @__PURE__ */ jsxs134("div", { className: "text-gray700 max-h-[200px] overflow-auto", children: [
|
|
43403
|
+
/* @__PURE__ */ jsx175("h4", { className: "font-semibold text-sm", children: "AI Analysis" }),
|
|
43404
|
+
/* @__PURE__ */ jsx175("p", { className: "text-sm", children: creator.sentiment.aiReasoning })
|
|
43175
43405
|
] })
|
|
43176
43406
|
] }) })
|
|
43177
43407
|
] })
|
|
@@ -43181,11 +43411,11 @@ function CreatorGridViewCard({ creator }) {
|
|
|
43181
43411
|
function CreatorGridView({
|
|
43182
43412
|
creatorData
|
|
43183
43413
|
}) {
|
|
43184
|
-
return /* @__PURE__ */
|
|
43414
|
+
return /* @__PURE__ */ jsx175("div", { className: "grid grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4 [&>*]:transition-all [&>*]:duration-300 auto-rows-min relative grid-flow-dense", children: creatorData.map((creator) => /* @__PURE__ */ jsx175(CreatorGridViewCard, { creator }, creator._id)) });
|
|
43185
43415
|
}
|
|
43186
43416
|
|
|
43187
43417
|
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
43188
|
-
import { Fragment as Fragment11, jsx as
|
|
43418
|
+
import { Fragment as Fragment11, jsx as jsx176, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
43189
43419
|
var formatFollowerCount4 = (count) => {
|
|
43190
43420
|
if (count >= 1e6) {
|
|
43191
43421
|
const millions = count / 1e6;
|
|
@@ -43279,12 +43509,12 @@ function SearchSpecDisplay({ spec }) {
|
|
|
43279
43509
|
{
|
|
43280
43510
|
key: "platforms",
|
|
43281
43511
|
title: "Platforms",
|
|
43282
|
-
content: /* @__PURE__ */
|
|
43512
|
+
content: /* @__PURE__ */ jsx176("div", { className: "flex flex-wrap gap-2", children: (spec.platforms || []).filter((p) => ["instagram", "youtube", "tiktok"].includes(p.toLowerCase())).map((p, idx) => /* @__PURE__ */ jsx176("span", { className: `${tagClass} flex items-center justify-center`, children: p.charAt(0).toUpperCase() + p.slice(1).toLowerCase() }, idx)) })
|
|
43283
43513
|
},
|
|
43284
43514
|
{
|
|
43285
43515
|
key: "follower_range",
|
|
43286
43516
|
title: "Follower Range",
|
|
43287
|
-
content: /* @__PURE__ */
|
|
43517
|
+
content: /* @__PURE__ */ jsxs135("div", { className: `inline-block ${tagClass} font-grotesk`, children: [
|
|
43288
43518
|
formatFollowerCount4(spec?.follower_range?.min ?? 0),
|
|
43289
43519
|
" -",
|
|
43290
43520
|
" ",
|
|
@@ -43294,7 +43524,7 @@ function SearchSpecDisplay({ spec }) {
|
|
|
43294
43524
|
{
|
|
43295
43525
|
key: "geography",
|
|
43296
43526
|
title: "Geography",
|
|
43297
|
-
content: /* @__PURE__ */
|
|
43527
|
+
content: /* @__PURE__ */ jsx176("div", { className: `inline-block ${tagClass} font-grotesk`, children: /* @__PURE__ */ jsx176(
|
|
43298
43528
|
"div",
|
|
43299
43529
|
{
|
|
43300
43530
|
className: "max-w-[200px] overflow-x-auto whitespace-nowrap",
|
|
@@ -43308,7 +43538,7 @@ function SearchSpecDisplay({ spec }) {
|
|
|
43308
43538
|
e.currentTarget.style.overflow = "hidden";
|
|
43309
43539
|
e.currentTarget.scrollLeft = 0;
|
|
43310
43540
|
},
|
|
43311
|
-
children: (spec.geography || []).map((g, idx) => /* @__PURE__ */
|
|
43541
|
+
children: (spec.geography || []).map((g, idx) => /* @__PURE__ */ jsxs135("span", { children: [
|
|
43312
43542
|
g,
|
|
43313
43543
|
idx < spec.geography.length - 1 ? ", " : ""
|
|
43314
43544
|
] }, idx))
|
|
@@ -43318,13 +43548,13 @@ function SearchSpecDisplay({ spec }) {
|
|
|
43318
43548
|
{
|
|
43319
43549
|
key: "keyword_bundles",
|
|
43320
43550
|
title: "Keyword",
|
|
43321
|
-
content: /* @__PURE__ */
|
|
43551
|
+
content: /* @__PURE__ */ jsx176("div", { className: "flex gap-2 font-grotesk font-medium max-w-[500px] overflow-x-auto whitespace-nowrap", style: { scrollbarWidth: "none" }, children: priorityOneBundles.length === 0 ? /* @__PURE__ */ jsx176("div", { className: `${textClass} text-white/70`, children: "No priority 1 keywords" }) : priorityOneBundles.map((kw, idx) => /* @__PURE__ */ jsx176("span", { className: tagClass, children: kw }, idx)) })
|
|
43322
43552
|
}
|
|
43323
43553
|
];
|
|
43324
43554
|
const itemsToShow = ["platforms", "follower_range", "geography", "keyword_bundles"];
|
|
43325
|
-
return /* @__PURE__ */
|
|
43326
|
-
/* @__PURE__ */
|
|
43327
|
-
/* @__PURE__ */
|
|
43555
|
+
return /* @__PURE__ */ jsx176("div", { className: "mt-3", children: /* @__PURE__ */ jsx176("div", { className: "flex gap-4 pr-[30px] overflow-x-auto", style: { scrollbarWidth: "none" }, children: items.filter(({ key }) => itemsToShow.includes(key) && spec?.[key] !== void 0 && spec?.[key] !== null).map(({ key, title, content }) => /* @__PURE__ */ jsxs135("div", { className: "flex-none p-5 bg-paperBackground rounded-lg", children: [
|
|
43556
|
+
/* @__PURE__ */ jsx176("div", { className: "text-purpleText text-sm mb-4", children: /* @__PURE__ */ jsx176("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title.toUpperCase() }) }),
|
|
43557
|
+
/* @__PURE__ */ jsx176("div", { className: `flex text-gray900 ${textClass}`, children: content })
|
|
43328
43558
|
] }, key)) }) });
|
|
43329
43559
|
}
|
|
43330
43560
|
function SentimentScoreRank({
|
|
@@ -43333,16 +43563,16 @@ function SentimentScoreRank({
|
|
|
43333
43563
|
showMinialView = false
|
|
43334
43564
|
}) {
|
|
43335
43565
|
const sentimentScoreRank = getSentimentRank3(score);
|
|
43336
|
-
return /* @__PURE__ */
|
|
43337
|
-
score !== void 0 && /* @__PURE__ */
|
|
43566
|
+
return /* @__PURE__ */ jsx176("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsxs135("div", { className: `flex flex-col justify-end ${showMinialView ? "w-[120px]" : "w-[150px]"} text-sm`, children: [
|
|
43567
|
+
score !== void 0 && /* @__PURE__ */ jsx176("div", { className: "flex justify-center items-center mb-2", children: /* @__PURE__ */ jsx176(
|
|
43338
43568
|
"span",
|
|
43339
43569
|
{
|
|
43340
43570
|
className: `${isValidationComplete ? sentimentScoreRank.bgColor : "bg-gray500"} ${isValidationComplete ? sentimentScoreRank.textColor : "text-gray200"} text-center rounded-md ${showMinialView ? "text-xs px-[6px] py-[2px]" : "text-sm px-2 py-[2px]"}`,
|
|
43341
43571
|
children: isValidationComplete ? sentimentScoreRank.rank : "Unranked"
|
|
43342
43572
|
}
|
|
43343
43573
|
) }),
|
|
43344
|
-
/* @__PURE__ */
|
|
43345
|
-
!showMinialView && /* @__PURE__ */
|
|
43574
|
+
/* @__PURE__ */ jsx176("div", { className: `flex justify-center ${showMinialView ? "text-[24px]" : "text-[28px]"} font-bold mb-3 ${sentimentScoreRank.scoreColor}`, children: isValidationComplete ? score >= 0 ? `${score}%` : "0%" : /* @__PURE__ */ jsx176("div", { className: "flex items-center justify-center py-2", children: /* @__PURE__ */ jsx176("div", { className: "w-6 h-6 border-2 border-purple100 border-t-transparent rounded-full animate-spin" }) }) }),
|
|
43575
|
+
!showMinialView && /* @__PURE__ */ jsx176("p", { className: "text-gray600 dark:text-gray500 text-center", children: "Match Score" })
|
|
43346
43576
|
] }) });
|
|
43347
43577
|
}
|
|
43348
43578
|
function BrandMentionPerformance({ creator }) {
|
|
@@ -43357,34 +43587,46 @@ function BrandMentionPerformance({ creator }) {
|
|
|
43357
43587
|
{ title: "Effectiveness", subtitle: "compared to all posts", value: `${insights?.effectivenessPercent || 0} %` },
|
|
43358
43588
|
{ title: "Saturation Rate", subtitle: "on brand mention", value: `${insights?.saturationRate || 0} %` }
|
|
43359
43589
|
];
|
|
43360
|
-
return /* @__PURE__ */
|
|
43361
|
-
/* @__PURE__ */
|
|
43362
|
-
/* @__PURE__ */
|
|
43363
|
-
/* @__PURE__ */
|
|
43364
|
-
/* @__PURE__ */
|
|
43365
|
-
/* @__PURE__ */
|
|
43590
|
+
return /* @__PURE__ */ jsxs135("div", { children: [
|
|
43591
|
+
/* @__PURE__ */ jsx176("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ jsx176("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTION PERFORMANCE" }) }),
|
|
43592
|
+
/* @__PURE__ */ jsx176("div", { className: "flex flex-col gap-3", children: metrics.map((item) => /* @__PURE__ */ jsxs135("div", { className: "flex justify-between items-center text-gray700 text-sm", children: [
|
|
43593
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col gap-1", children: [
|
|
43594
|
+
/* @__PURE__ */ jsx176("h5", { children: item.title }),
|
|
43595
|
+
/* @__PURE__ */ jsx176("p", { className: "text-xs", children: item.subtitle })
|
|
43366
43596
|
] }),
|
|
43367
|
-
/* @__PURE__ */
|
|
43597
|
+
/* @__PURE__ */ jsx176("p", { className: "text-purpleText text-lg", children: item.value })
|
|
43368
43598
|
] }, item.title)) })
|
|
43369
43599
|
] });
|
|
43370
43600
|
}
|
|
43371
43601
|
function CreatorFitSummary({ creator, showBrandPerformance }) {
|
|
43602
|
+
const [contentExpanded, setContentExpanded] = useState20(false);
|
|
43372
43603
|
const hasDeepAnalysis = creator?.sentiment?.deepAnalysis?.deepAnalysis;
|
|
43373
43604
|
const title = hasDeepAnalysis ? "CREATOR DEEP ANALYSIS" : "CREATOR FIT SUMMARY";
|
|
43374
43605
|
const content = hasDeepAnalysis ? creator.sentiment.deepAnalysis.deepAnalysis : creator?.sentiment?.aiReasoning || "No data available.";
|
|
43375
|
-
return /* @__PURE__ */
|
|
43376
|
-
/* @__PURE__ */
|
|
43377
|
-
/* @__PURE__ */
|
|
43606
|
+
return /* @__PURE__ */ jsxs135("div", { className: `${showBrandPerformance ? "md:col-span-1" : "md:col-span-2"} col-span-1`, children: [
|
|
43607
|
+
/* @__PURE__ */ jsx176("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ jsx176("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title }) }),
|
|
43608
|
+
/* @__PURE__ */ jsx176(
|
|
43609
|
+
"div",
|
|
43610
|
+
{
|
|
43611
|
+
onClick: (e) => {
|
|
43612
|
+
e.stopPropagation();
|
|
43613
|
+
setContentExpanded(!contentExpanded);
|
|
43614
|
+
},
|
|
43615
|
+
className: `cursor-pointer ${!contentExpanded ? "max-h-[140px] overflow-hidden md:overflow-y-auto md:max-h-none" : "overflow-y-auto"} slim-scrollbar`,
|
|
43616
|
+
children: /* @__PURE__ */ jsx176("p", { className: `text-gray700 text-sm ${!contentExpanded ? "line-clamp-3 md:line-clamp-none" : ""}`, children: content })
|
|
43617
|
+
}
|
|
43618
|
+
)
|
|
43378
43619
|
] });
|
|
43379
43620
|
}
|
|
43380
43621
|
function ProfileSection({ creator, isValidationComplete }) {
|
|
43622
|
+
const [descriptionExpanded, setDescriptionExpanded] = useState20(false);
|
|
43381
43623
|
const username = creator.platformMetrics?.instagramMetrics?.username ? `@${creator.platformMetrics.instagramMetrics.username}` : creator.platformMetrics?.youtubeMetrics?.channelName ? `@${creator.platformMetrics.youtubeMetrics.channelName}` : creator.platformMetrics?.tiktokMetrics?.username ? `@${creator.platformMetrics.tiktokMetrics.username}` : "";
|
|
43382
43624
|
const iso2 = normalizeToIso2(creator.country);
|
|
43383
43625
|
const meta = codeToMeta[iso2];
|
|
43384
|
-
return /* @__PURE__ */
|
|
43385
|
-
/* @__PURE__ */
|
|
43386
|
-
/* @__PURE__ */
|
|
43387
|
-
/* @__PURE__ */
|
|
43626
|
+
return /* @__PURE__ */ jsxs135("div", { className: "flex flex-col md:flex-row items-start gap-1 md:gap-6", children: [
|
|
43627
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col items-center gap-6", children: [
|
|
43628
|
+
/* @__PURE__ */ jsx176("div", { className: "w-[5rem] h-[5rem] rounded-[10px] bg-primary/10 flex items-center justify-center flex-shrink-0 relative overflow-hidden", children: creator.profile_pic ? /* @__PURE__ */ jsxs135(Fragment11, { children: [
|
|
43629
|
+
/* @__PURE__ */ jsx176(
|
|
43388
43630
|
"img",
|
|
43389
43631
|
{
|
|
43390
43632
|
src: creator.profile_pic,
|
|
@@ -43392,24 +43634,37 @@ function ProfileSection({ creator, isValidationComplete }) {
|
|
|
43392
43634
|
className: "object-cover w-[5rem] h-[5rem] rounded-[15px]"
|
|
43393
43635
|
}
|
|
43394
43636
|
),
|
|
43395
|
-
creator?.profile?.isVerified && /* @__PURE__ */
|
|
43637
|
+
creator?.profile?.isVerified && /* @__PURE__ */ jsx176(
|
|
43396
43638
|
BadgeCheck,
|
|
43397
43639
|
{
|
|
43398
43640
|
size: 35,
|
|
43399
43641
|
className: "absolute -top-2 -right-2 text-blue-500 drop-shadow-sm fill-blue-300"
|
|
43400
43642
|
}
|
|
43401
43643
|
)
|
|
43402
|
-
] }) : /* @__PURE__ */
|
|
43403
|
-
/* @__PURE__ */
|
|
43644
|
+
] }) : /* @__PURE__ */ jsx176("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" }) }),
|
|
43645
|
+
/* @__PURE__ */ jsx176("div", { className: "block sm:hidden", children: /* @__PURE__ */ jsx176(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete, showMinialView: true }) })
|
|
43404
43646
|
] }),
|
|
43405
|
-
/* @__PURE__ */
|
|
43406
|
-
/* @__PURE__ */
|
|
43407
|
-
username && /* @__PURE__ */
|
|
43408
|
-
/* @__PURE__ */
|
|
43409
|
-
/* @__PURE__ */
|
|
43410
|
-
/* @__PURE__ */
|
|
43647
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col gap-3 truncate min-w-0", children: [
|
|
43648
|
+
/* @__PURE__ */ jsx176("div", { className: "flex items-center gap-2 min-w-0", children: /* @__PURE__ */ jsx176("h4", { className: "text-lg text-gray900 max-w-[220px] sm:max-w-[150px] truncate", title: creator.name, children: truncateName2(creator.name, 100) }) }),
|
|
43649
|
+
username && /* @__PURE__ */ jsx176("div", { className: "text-xs text-gray700 truncate", children: username }),
|
|
43650
|
+
/* @__PURE__ */ jsxs135("div", { className: "text-sm text-gray700 flex items-center gap-2 min-w-0", children: [
|
|
43651
|
+
/* @__PURE__ */ jsx176("span", { className: "text-base flex-shrink-0", children: meta?.flag }),
|
|
43652
|
+
/* @__PURE__ */ jsx176("span", { className: "truncate", children: meta?.name || creator.country || "Unknown" })
|
|
43411
43653
|
] }),
|
|
43412
|
-
/* @__PURE__ */
|
|
43654
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
43655
|
+
/* @__PURE__ */ jsx176("div", { className: `text-xs text-gray700 ${!descriptionExpanded ? "line-clamp-2 whitespace-nowrap md:whitespace-normal md:line-clamp-none" : "whitespace-normal"}`, children: creator.description }),
|
|
43656
|
+
creator.description && /* @__PURE__ */ jsx176(
|
|
43657
|
+
"button",
|
|
43658
|
+
{
|
|
43659
|
+
onClick: (e) => {
|
|
43660
|
+
e.stopPropagation();
|
|
43661
|
+
setDescriptionExpanded(!descriptionExpanded);
|
|
43662
|
+
},
|
|
43663
|
+
className: "md:hidden text-xs text-purple600 font-medium hover:text-purple700 text-left w-fit",
|
|
43664
|
+
children: descriptionExpanded ? "Read Less" : "Read More"
|
|
43665
|
+
}
|
|
43666
|
+
)
|
|
43667
|
+
] })
|
|
43413
43668
|
] })
|
|
43414
43669
|
] });
|
|
43415
43670
|
}
|
|
@@ -43417,35 +43672,35 @@ function CreatorCardExpandedSection({
|
|
|
43417
43672
|
creator
|
|
43418
43673
|
}) {
|
|
43419
43674
|
const hasBrandBreakdown = creator?.brandCollaborations?.insights?.brandBreakdown && creator?.sentiment?.deepAnalysis;
|
|
43420
|
-
return /* @__PURE__ */
|
|
43675
|
+
return /* @__PURE__ */ jsxs135(
|
|
43421
43676
|
motion5.div,
|
|
43422
43677
|
{
|
|
43423
43678
|
initial: { y: 20, opacity: 0 },
|
|
43424
43679
|
animate: { y: 0, opacity: 1 },
|
|
43425
43680
|
transition: { duration: 0.3, delay: 0.1 },
|
|
43426
|
-
className: "md:mt-6 space-y-5",
|
|
43681
|
+
className: "md:mt-6 space-y-5 px-4 md:px-0",
|
|
43427
43682
|
children: [
|
|
43428
|
-
/* @__PURE__ */
|
|
43429
|
-
/* @__PURE__ */
|
|
43683
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col md:grid md:grid-cols-[1.3fr_1fr_2fr_120px] gap-4 md:gap-8 py-4 md:pr-7", children: [
|
|
43684
|
+
/* @__PURE__ */ jsx176("div", { className: "col-span-1 md:col-span-1", children: hasBrandBreakdown ? /* @__PURE__ */ jsx176(
|
|
43430
43685
|
BrandCollaborationsList,
|
|
43431
43686
|
{
|
|
43432
43687
|
brandBreakdown: creator?.brandCollaborations
|
|
43433
43688
|
}
|
|
43434
|
-
) : /* @__PURE__ */
|
|
43435
|
-
/* @__PURE__ */
|
|
43689
|
+
) : /* @__PURE__ */ jsx176("div", { className: "hidden md:block" }) }),
|
|
43690
|
+
/* @__PURE__ */ jsx176("div", { className: "col-span-1 md:col-span-3", children: creator?.audienceDemographics ? /* @__PURE__ */ jsx176(
|
|
43436
43691
|
EngagedAudienceDemographics,
|
|
43437
43692
|
{
|
|
43438
43693
|
audienceDemographics: creator.audienceDemographics
|
|
43439
43694
|
}
|
|
43440
43695
|
) : null })
|
|
43441
43696
|
] }),
|
|
43442
|
-
/* @__PURE__ */
|
|
43697
|
+
/* @__PURE__ */ jsx176("div", { className: "overflow-x-auto -mx-4 md:mx-0 px-4 md:px-0", children: /* @__PURE__ */ jsx176(
|
|
43443
43698
|
PlatformPostsSection,
|
|
43444
43699
|
{
|
|
43445
43700
|
platformMetrics: creator.platformMetrics,
|
|
43446
43701
|
posts: creator.posts ?? creator.post
|
|
43447
43702
|
}
|
|
43448
|
-
)
|
|
43703
|
+
) })
|
|
43449
43704
|
]
|
|
43450
43705
|
}
|
|
43451
43706
|
);
|
|
@@ -43454,14 +43709,14 @@ function CreatorCard({
|
|
|
43454
43709
|
creator,
|
|
43455
43710
|
isValidationComplete
|
|
43456
43711
|
}) {
|
|
43457
|
-
const [detailsExpanded, setDetailsExpanded] =
|
|
43712
|
+
const [detailsExpanded, setDetailsExpanded] = useState20(false);
|
|
43458
43713
|
const hasValidBrandMention = (() => {
|
|
43459
43714
|
const insights = creator?.brandCollaborations?.insights;
|
|
43460
43715
|
if (!insights) return false;
|
|
43461
43716
|
const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
|
|
43462
43717
|
return isValid2(insights.averageBrandEngagementRate) || isValid2(insights.effectivenessPercent) || isValid2(insights.saturationRate);
|
|
43463
43718
|
})();
|
|
43464
|
-
return /* @__PURE__ */
|
|
43719
|
+
return /* @__PURE__ */ jsxs135(
|
|
43465
43720
|
motion5.div,
|
|
43466
43721
|
{
|
|
43467
43722
|
layout: true,
|
|
@@ -43469,23 +43724,23 @@ function CreatorCard({
|
|
|
43469
43724
|
animate: { opacity: 1, y: 0 },
|
|
43470
43725
|
exit: { opacity: 0, y: -20 },
|
|
43471
43726
|
transition: { duration: 0.4, ease: [0.22, 1, 0.36, 1] },
|
|
43472
|
-
className: `flex flex-col bg-paperBackground rounded-[25px] py-5 pl-7 border-2 shadow-sm cursor-pointer transition-all ${detailsExpanded ? "border-purple100" : "border-gray300"}`,
|
|
43727
|
+
className: `flex flex-col bg-paperBackground rounded-[25px] py-5 px-4 md:pl-7 border-2 shadow-sm cursor-pointer transition-all ${detailsExpanded ? "border-purple100" : "border-gray300"}`,
|
|
43473
43728
|
onClick: () => setDetailsExpanded((prev) => !prev),
|
|
43474
43729
|
children: [
|
|
43475
|
-
/* @__PURE__ */
|
|
43476
|
-
/* @__PURE__ */
|
|
43477
|
-
hasValidBrandMention && /* @__PURE__ */
|
|
43478
|
-
/* @__PURE__ */
|
|
43479
|
-
/* @__PURE__ */
|
|
43730
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col gap-4 md:grid md:grid-cols-[1.3fr_1fr_2fr_120px] gap-4 md:gap-8 items-start w-full md:pr-7 overflow-hidden", children: [
|
|
43731
|
+
/* @__PURE__ */ jsx176(ProfileSection, { creator, isValidationComplete }),
|
|
43732
|
+
hasValidBrandMention && /* @__PURE__ */ jsx176(BrandMentionPerformance, { creator }),
|
|
43733
|
+
/* @__PURE__ */ jsx176(CreatorFitSummary, { creator, showBrandPerformance: hasValidBrandMention }),
|
|
43734
|
+
/* @__PURE__ */ jsx176("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx176(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete }) })
|
|
43480
43735
|
] }),
|
|
43481
|
-
/* @__PURE__ */
|
|
43736
|
+
/* @__PURE__ */ jsx176(AnimatePresence4, { children: detailsExpanded && /* @__PURE__ */ jsx176(
|
|
43482
43737
|
motion5.div,
|
|
43483
43738
|
{
|
|
43484
43739
|
initial: { height: 0, opacity: 0 },
|
|
43485
43740
|
animate: { height: "auto", opacity: 1, transition: { height: { duration: 0.4, ease: [0.04, 0.62, 0.23, 0.98] }, opacity: { duration: 0.3, delay: 0.1 } } },
|
|
43486
43741
|
exit: { height: 0, opacity: 0, transition: { height: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] }, opacity: { duration: 0.2 } } },
|
|
43487
43742
|
className: "overflow-hidden mt-4",
|
|
43488
|
-
children: /* @__PURE__ */
|
|
43743
|
+
children: /* @__PURE__ */ jsx176(CreatorCardExpandedSection, { creator })
|
|
43489
43744
|
}
|
|
43490
43745
|
) })
|
|
43491
43746
|
]
|
|
@@ -43496,19 +43751,19 @@ function CreatorDisplay({
|
|
|
43496
43751
|
creators,
|
|
43497
43752
|
isValidationComplete
|
|
43498
43753
|
}) {
|
|
43499
|
-
const [viewMode, setViewMode] =
|
|
43500
|
-
return /* @__PURE__ */
|
|
43501
|
-
/* @__PURE__ */
|
|
43502
|
-
/* @__PURE__ */
|
|
43754
|
+
const [viewMode, setViewMode] = useState20("list");
|
|
43755
|
+
return /* @__PURE__ */ jsxs135("div", { className: "px-4", children: [
|
|
43756
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex justify-end items-center my-3 gap-1", children: [
|
|
43757
|
+
/* @__PURE__ */ jsxs135("span", { className: "text-xs text-gray600 mr-2", children: [
|
|
43503
43758
|
creators.length,
|
|
43504
43759
|
" creators"
|
|
43505
43760
|
] }),
|
|
43506
|
-
/* @__PURE__ */
|
|
43761
|
+
/* @__PURE__ */ jsx176(
|
|
43507
43762
|
"button",
|
|
43508
43763
|
{
|
|
43509
|
-
className: `h-7 w-7
|
|
43764
|
+
className: `hidden md:flex h-7 w-7 items-center justify-center rounded ${viewMode === "list" ? "bg-gray200" : ""}`,
|
|
43510
43765
|
onClick: () => setViewMode("list"),
|
|
43511
|
-
children: /* @__PURE__ */
|
|
43766
|
+
children: /* @__PURE__ */ jsx176(
|
|
43512
43767
|
AlignJustify,
|
|
43513
43768
|
{
|
|
43514
43769
|
className: `h-5 w-5 ${viewMode === "list" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
@@ -43516,12 +43771,12 @@ function CreatorDisplay({
|
|
|
43516
43771
|
)
|
|
43517
43772
|
}
|
|
43518
43773
|
),
|
|
43519
|
-
/* @__PURE__ */
|
|
43774
|
+
/* @__PURE__ */ jsx176(
|
|
43520
43775
|
"button",
|
|
43521
43776
|
{
|
|
43522
|
-
className: `h-7 w-7
|
|
43777
|
+
className: `hidden md:flex h-7 w-7 items-center justify-center rounded ${viewMode === "grid" ? "bg-gray200" : ""}`,
|
|
43523
43778
|
onClick: () => setViewMode("grid"),
|
|
43524
|
-
children: /* @__PURE__ */
|
|
43779
|
+
children: /* @__PURE__ */ jsx176(
|
|
43525
43780
|
LayoutGrid,
|
|
43526
43781
|
{
|
|
43527
43782
|
className: `h-5 w-5 ${viewMode === "grid" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
@@ -43530,43 +43785,43 @@ function CreatorDisplay({
|
|
|
43530
43785
|
}
|
|
43531
43786
|
)
|
|
43532
43787
|
] }),
|
|
43533
|
-
creators.length > 0 ? viewMode === "list" ? /* @__PURE__ */
|
|
43534
|
-
/* @__PURE__ */
|
|
43535
|
-
/* @__PURE__ */
|
|
43536
|
-
/* @__PURE__ */
|
|
43788
|
+
creators.length > 0 ? viewMode === "list" ? /* @__PURE__ */ jsx176("div", { className: "space-y-4", children: creators.map((creator) => /* @__PURE__ */ jsx176(CreatorCard, { creator, isValidationComplete }, creator._id)) }) : /* @__PURE__ */ jsx176(CreatorGridView, { creatorData: creators }) : /* @__PURE__ */ jsxs135("div", { className: "text-center py-8 bg-gray100 rounded-lg border border-gray300", children: [
|
|
43789
|
+
/* @__PURE__ */ jsx176("div", { className: "w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-3", children: /* @__PURE__ */ jsx176(Users, { className: "w-6 h-6 text-primary" }) }),
|
|
43790
|
+
/* @__PURE__ */ jsx176("h3", { className: "text-base font-medium text-gray900", children: "No creators found" }),
|
|
43791
|
+
/* @__PURE__ */ jsx176("p", { className: "mt-1 text-sm text-gray600", children: "Try adjusting your search criteria" })
|
|
43537
43792
|
] })
|
|
43538
43793
|
] });
|
|
43539
43794
|
}
|
|
43540
43795
|
function CreatorCardSkeleton() {
|
|
43541
|
-
return /* @__PURE__ */
|
|
43542
|
-
/* @__PURE__ */
|
|
43543
|
-
/* @__PURE__ */
|
|
43544
|
-
/* @__PURE__ */
|
|
43545
|
-
/* @__PURE__ */
|
|
43546
|
-
/* @__PURE__ */
|
|
43547
|
-
/* @__PURE__ */
|
|
43548
|
-
/* @__PURE__ */
|
|
43796
|
+
return /* @__PURE__ */ jsx176("div", { className: "bg-paperBackground rounded-[25px] py-5 px-4 md:pl-7 md:pr-7 border-2 border-gray300 shadow-sm", children: /* @__PURE__ */ jsxs135("div", { className: "flex flex-col gap-4 md:grid md:grid-cols-[1.3fr_1fr_2fr_120px] gap-4 md:gap-8 items-start w-full", children: [
|
|
43797
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col md:grid md:grid-cols-[auto_1fr] items-start gap-1 md:gap-6", children: [
|
|
43798
|
+
/* @__PURE__ */ jsx176("div", { className: "w-[5rem] h-[5rem] rounded-[10px] bg-gray200 animate-pulse" }),
|
|
43799
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex flex-col gap-3", children: [
|
|
43800
|
+
/* @__PURE__ */ jsx176("div", { className: "h-5 w-36 rounded bg-gray200 animate-pulse" }),
|
|
43801
|
+
/* @__PURE__ */ jsx176("div", { className: "h-3 w-24 rounded bg-gray200 animate-pulse" }),
|
|
43802
|
+
/* @__PURE__ */ jsx176("div", { className: "h-3 w-32 rounded bg-gray200 animate-pulse" }),
|
|
43803
|
+
/* @__PURE__ */ jsx176("div", { className: "h-3 w-44 rounded bg-gray200 animate-pulse" })
|
|
43549
43804
|
] })
|
|
43550
43805
|
] }),
|
|
43551
|
-
/* @__PURE__ */
|
|
43552
|
-
/* @__PURE__ */
|
|
43553
|
-
/* @__PURE__ */
|
|
43554
|
-
/* @__PURE__ */
|
|
43806
|
+
/* @__PURE__ */ jsxs135("div", { className: "space-y-3 w-full", children: [
|
|
43807
|
+
/* @__PURE__ */ jsx176("div", { className: "h-4 w-32 rounded bg-gray200 animate-pulse" }),
|
|
43808
|
+
/* @__PURE__ */ jsx176("div", { className: "h-4 w-28 rounded bg-gray200 animate-pulse" }),
|
|
43809
|
+
/* @__PURE__ */ jsx176("div", { className: "h-4 w-24 rounded bg-gray200 animate-pulse" })
|
|
43555
43810
|
] }),
|
|
43556
|
-
/* @__PURE__ */
|
|
43557
|
-
/* @__PURE__ */
|
|
43558
|
-
/* @__PURE__ */
|
|
43559
|
-
/* @__PURE__ */
|
|
43560
|
-
/* @__PURE__ */
|
|
43811
|
+
/* @__PURE__ */ jsxs135("div", { className: "space-y-3 w-full", children: [
|
|
43812
|
+
/* @__PURE__ */ jsx176("div", { className: "h-4 w-40 rounded bg-gray200 animate-pulse" }),
|
|
43813
|
+
/* @__PURE__ */ jsx176("div", { className: "h-3 w-full rounded bg-gray200 animate-pulse" }),
|
|
43814
|
+
/* @__PURE__ */ jsx176("div", { className: "h-3 w-[90%] rounded bg-gray200 animate-pulse" }),
|
|
43815
|
+
/* @__PURE__ */ jsx176("div", { className: "h-3 w-[75%] rounded bg-gray200 animate-pulse" })
|
|
43561
43816
|
] }),
|
|
43562
|
-
/* @__PURE__ */
|
|
43563
|
-
/* @__PURE__ */
|
|
43564
|
-
/* @__PURE__ */
|
|
43817
|
+
/* @__PURE__ */ jsxs135("div", { className: "hidden md:flex flex-col items-center justify-center gap-3", children: [
|
|
43818
|
+
/* @__PURE__ */ jsx176("div", { className: "h-6 w-16 rounded bg-gray200 animate-pulse" }),
|
|
43819
|
+
/* @__PURE__ */ jsx176("div", { className: "h-4 w-20 rounded bg-gray200 animate-pulse" })
|
|
43565
43820
|
] })
|
|
43566
43821
|
] }) });
|
|
43567
43822
|
}
|
|
43568
43823
|
function CreatorDisplaySkeleton() {
|
|
43569
|
-
return /* @__PURE__ */
|
|
43824
|
+
return /* @__PURE__ */ jsx176("div", { className: "px-4 py-4 space-y-4", children: Array.from({ length: 3 }).map((_, idx) => /* @__PURE__ */ jsx176(CreatorCardSkeleton, {}, idx)) });
|
|
43570
43825
|
}
|
|
43571
43826
|
function CreatorExpandedPanel({
|
|
43572
43827
|
isOpen,
|
|
@@ -43577,8 +43832,8 @@ function CreatorExpandedPanel({
|
|
|
43577
43832
|
searchSpec,
|
|
43578
43833
|
fetchCreatorDetails
|
|
43579
43834
|
}) {
|
|
43580
|
-
const [creators, setCreators] =
|
|
43581
|
-
const [loading, setLoading] =
|
|
43835
|
+
const [creators, setCreators] = useState20([]);
|
|
43836
|
+
const [loading, setLoading] = useState20(false);
|
|
43582
43837
|
const fetcher = fetchCreatorDetails ?? defaultFetchCreatorDetails;
|
|
43583
43838
|
const loadCreators = useCallback7(async () => {
|
|
43584
43839
|
if (!creatorIds.length) return;
|
|
@@ -43592,15 +43847,15 @@ function CreatorExpandedPanel({
|
|
|
43592
43847
|
setLoading(false);
|
|
43593
43848
|
}
|
|
43594
43849
|
}, [creatorIds, sessionId, version, fetcher]);
|
|
43595
|
-
|
|
43850
|
+
useEffect13(() => {
|
|
43596
43851
|
if (isOpen && creatorIds.length > 0) {
|
|
43597
43852
|
loadCreators();
|
|
43598
43853
|
}
|
|
43599
43854
|
}, [isOpen, loadCreators]);
|
|
43600
43855
|
if (typeof window === "undefined") return null;
|
|
43601
43856
|
return ReactDOM2.createPortal(
|
|
43602
|
-
/* @__PURE__ */
|
|
43603
|
-
/* @__PURE__ */
|
|
43857
|
+
/* @__PURE__ */ jsx176(AnimatePresence4, { mode: "sync", children: isOpen && /* @__PURE__ */ jsxs135(Fragment11, { children: [
|
|
43858
|
+
/* @__PURE__ */ jsx176(
|
|
43604
43859
|
motion5.div,
|
|
43605
43860
|
{
|
|
43606
43861
|
initial: { opacity: 0 },
|
|
@@ -43615,7 +43870,7 @@ function CreatorExpandedPanel({
|
|
|
43615
43870
|
},
|
|
43616
43871
|
"overlay"
|
|
43617
43872
|
),
|
|
43618
|
-
/* @__PURE__ */
|
|
43873
|
+
/* @__PURE__ */ jsx176(
|
|
43619
43874
|
motion5.div,
|
|
43620
43875
|
{
|
|
43621
43876
|
initial: { x: "100%" },
|
|
@@ -43623,19 +43878,19 @@ function CreatorExpandedPanel({
|
|
|
43623
43878
|
exit: { x: "100%" },
|
|
43624
43879
|
transition: { type: "spring", damping: 30, stiffness: 400 },
|
|
43625
43880
|
className: "fixed top-0 right-0 h-full w-full max-w-7xl bg-background dark:bg-gray25 z-[70] shadow-2xl overflow-y-auto border border-gray300",
|
|
43626
|
-
children: /* @__PURE__ */
|
|
43627
|
-
/* @__PURE__ */
|
|
43628
|
-
/* @__PURE__ */
|
|
43629
|
-
/* @__PURE__ */
|
|
43630
|
-
/* @__PURE__ */
|
|
43631
|
-
/* @__PURE__ */
|
|
43632
|
-
/* @__PURE__ */
|
|
43881
|
+
children: /* @__PURE__ */ jsxs135("div", { className: "py-4 font-noto", children: [
|
|
43882
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex justify-between items-center w-full mb-4 px-2 md:pl-2", children: [
|
|
43883
|
+
/* @__PURE__ */ jsx176("button", { onClick: onClose, className: "p-2 rounded-full transition-colors flex-shrink-0", children: /* @__PURE__ */ jsx176(X, { className: "w-5 h-5" }) }),
|
|
43884
|
+
/* @__PURE__ */ jsxs135("div", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
43885
|
+
/* @__PURE__ */ jsx176("div", { className: "flex flex-col md:flex-row justify-between gap-2 md:gap-0 md:items-center md:pr-16", children: /* @__PURE__ */ jsxs135("div", { className: "flex flex-col", children: [
|
|
43886
|
+
/* @__PURE__ */ jsx176("div", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] mb-2", children: /* @__PURE__ */ jsx176("h4", { className: "text-xs font-medium text-purpleText", children: "VERIFIED SEARCH RESULTS" }) }),
|
|
43887
|
+
/* @__PURE__ */ jsx176("h2", { className: "text-xl font-bold mb-1", children: "Creators Search Results" })
|
|
43633
43888
|
] }) }),
|
|
43634
|
-
searchSpec && /* @__PURE__ */
|
|
43889
|
+
searchSpec && /* @__PURE__ */ jsx176(SearchSpecDisplay, { spec: searchSpec })
|
|
43635
43890
|
] })
|
|
43636
43891
|
] }),
|
|
43637
|
-
/* @__PURE__ */
|
|
43638
|
-
loading ? /* @__PURE__ */
|
|
43892
|
+
/* @__PURE__ */ jsx176("div", { className: "border-b border-gray300" }),
|
|
43893
|
+
loading ? /* @__PURE__ */ jsx176(CreatorDisplaySkeleton, {}) : /* @__PURE__ */ jsx176(CreatorDisplay, { creators, isValidationComplete: version !== void 0 })
|
|
43639
43894
|
] })
|
|
43640
43895
|
},
|
|
43641
43896
|
"creator-panel"
|
|
@@ -43646,7 +43901,7 @@ function CreatorExpandedPanel({
|
|
|
43646
43901
|
}
|
|
43647
43902
|
|
|
43648
43903
|
// src/molecules/creator-discovery/CreatorWidget/useCreatorWidgetPolling.ts
|
|
43649
|
-
import { useState as
|
|
43904
|
+
import { useState as useState21, useEffect as useEffect14, useCallback as useCallback8, useMemo as useMemo11, useRef as useRef10 } from "react";
|
|
43650
43905
|
var DEFAULT_POLLING_CONFIG = {
|
|
43651
43906
|
pollInterval: 5e3,
|
|
43652
43907
|
maxDuration: 15 * 60 * 1e3,
|
|
@@ -43667,16 +43922,16 @@ function useCreatorWidgetPolling({
|
|
|
43667
43922
|
() => ({ ...DEFAULT_POLLING_CONFIG, ...pollingConfig }),
|
|
43668
43923
|
[pollingConfig]
|
|
43669
43924
|
);
|
|
43670
|
-
const [versionData, setVersionData] =
|
|
43671
|
-
const [totalVersions, setTotalVersions] =
|
|
43672
|
-
const [selectedVersion, setSelectedVersion] =
|
|
43673
|
-
const [isLoadingVersion, setIsLoadingVersion] =
|
|
43674
|
-
const [isValidationComplete, setIsValidationComplete] =
|
|
43675
|
-
const [versionStatus, setVersionStatus] =
|
|
43676
|
-
const [statusDetails, setStatusDetails] =
|
|
43677
|
-
const [timeDisplay, setTimeDisplay] =
|
|
43678
|
-
const [loadingStatus, setLoadingStatus] =
|
|
43679
|
-
const remainingTimeRef =
|
|
43925
|
+
const [versionData, setVersionData] = useState21(null);
|
|
43926
|
+
const [totalVersions, setTotalVersions] = useState21(0);
|
|
43927
|
+
const [selectedVersion, setSelectedVersion] = useState21();
|
|
43928
|
+
const [isLoadingVersion, setIsLoadingVersion] = useState21(false);
|
|
43929
|
+
const [isValidationComplete, setIsValidationComplete] = useState21(false);
|
|
43930
|
+
const [versionStatus, setVersionStatus] = useState21("checking");
|
|
43931
|
+
const [statusDetails, setStatusDetails] = useState21();
|
|
43932
|
+
const [timeDisplay, setTimeDisplay] = useState21("");
|
|
43933
|
+
const [loadingStatus, setLoadingStatus] = useState21(true);
|
|
43934
|
+
const remainingTimeRef = useRef10(0);
|
|
43680
43935
|
const requestedVersion = selectedVersion ?? currentVersion ?? versionData?.currentVersion;
|
|
43681
43936
|
const fetchVersionData = useCallback8(async () => {
|
|
43682
43937
|
if (!sessionId) return;
|
|
@@ -43699,17 +43954,17 @@ function useCreatorWidgetPolling({
|
|
|
43699
43954
|
setIsLoadingVersion(false);
|
|
43700
43955
|
}
|
|
43701
43956
|
}, [sessionId, requestedVersion, isValidationComplete, fetchVersions, versionData]);
|
|
43702
|
-
|
|
43957
|
+
useEffect14(() => {
|
|
43703
43958
|
fetchVersionData();
|
|
43704
43959
|
}, [sessionId, requestedVersion, isValidationComplete]);
|
|
43705
|
-
|
|
43960
|
+
useEffect14(() => {
|
|
43706
43961
|
if (totalVersions > 0 || !sessionId) return;
|
|
43707
43962
|
const interval = setInterval(() => {
|
|
43708
43963
|
if (totalVersions === 0) fetchVersionData();
|
|
43709
43964
|
}, config.pollInterval);
|
|
43710
43965
|
return () => clearInterval(interval);
|
|
43711
43966
|
}, [totalVersions, sessionId, fetchVersionData, config.pollInterval]);
|
|
43712
|
-
|
|
43967
|
+
useEffect14(() => {
|
|
43713
43968
|
if (!selectedVersion && !requestedVersion) return;
|
|
43714
43969
|
const activeVersion = selectedVersion ?? requestedVersion;
|
|
43715
43970
|
let isMounted = true;
|
|
@@ -43819,7 +44074,7 @@ function useCreatorWidgetPolling({
|
|
|
43819
44074
|
}
|
|
43820
44075
|
|
|
43821
44076
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
43822
|
-
import { jsx as
|
|
44077
|
+
import { jsx as jsx177, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
43823
44078
|
function CreatorWidgetInner({
|
|
43824
44079
|
sessionId,
|
|
43825
44080
|
currentVersion,
|
|
@@ -43832,7 +44087,7 @@ function CreatorWidgetInner({
|
|
|
43832
44087
|
onAction,
|
|
43833
44088
|
className
|
|
43834
44089
|
}) {
|
|
43835
|
-
const [isExpanded, setIsExpanded] =
|
|
44090
|
+
const [isExpanded, setIsExpanded] = useState22(false);
|
|
43836
44091
|
const {
|
|
43837
44092
|
versionNumbers,
|
|
43838
44093
|
selectedVersion,
|
|
@@ -43867,8 +44122,8 @@ function CreatorWidgetInner({
|
|
|
43867
44122
|
searchSpec
|
|
43868
44123
|
});
|
|
43869
44124
|
}, [onAction, sessionId, creatorIds, selectedVersion, searchSpec]);
|
|
43870
|
-
return /* @__PURE__ */
|
|
43871
|
-
/* @__PURE__ */
|
|
44125
|
+
return /* @__PURE__ */ jsxs136("div", { className, children: [
|
|
44126
|
+
/* @__PURE__ */ jsx177(
|
|
43872
44127
|
CreatorCompactView,
|
|
43873
44128
|
{
|
|
43874
44129
|
versions: versionNumbers,
|
|
@@ -43884,7 +44139,7 @@ function CreatorWidgetInner({
|
|
|
43884
44139
|
isLoading
|
|
43885
44140
|
}
|
|
43886
44141
|
),
|
|
43887
|
-
/* @__PURE__ */
|
|
44142
|
+
/* @__PURE__ */ jsx177(
|
|
43888
44143
|
CreatorExpandedPanel,
|
|
43889
44144
|
{
|
|
43890
44145
|
isOpen: isExpanded,
|
|
@@ -44192,7 +44447,7 @@ __export(ui_exports, {
|
|
|
44192
44447
|
// src/components/ui/button-group.tsx
|
|
44193
44448
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
44194
44449
|
import { cva as cva8 } from "class-variance-authority";
|
|
44195
|
-
import { jsx as
|
|
44450
|
+
import { jsx as jsx178 } from "react/jsx-runtime";
|
|
44196
44451
|
var buttonGroupVariants = cva8(
|
|
44197
44452
|
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
44198
44453
|
{
|
|
@@ -44212,7 +44467,7 @@ function ButtonGroup({
|
|
|
44212
44467
|
orientation,
|
|
44213
44468
|
...props
|
|
44214
44469
|
}) {
|
|
44215
|
-
return /* @__PURE__ */
|
|
44470
|
+
return /* @__PURE__ */ jsx178(
|
|
44216
44471
|
"div",
|
|
44217
44472
|
{
|
|
44218
44473
|
role: "group",
|
|
@@ -44229,7 +44484,7 @@ function ButtonGroupText({
|
|
|
44229
44484
|
...props
|
|
44230
44485
|
}) {
|
|
44231
44486
|
const Comp = asChild ? Slot4 : "div";
|
|
44232
|
-
return /* @__PURE__ */
|
|
44487
|
+
return /* @__PURE__ */ jsx178(
|
|
44233
44488
|
Comp,
|
|
44234
44489
|
{
|
|
44235
44490
|
className: cn(
|
|
@@ -44245,7 +44500,7 @@ function ButtonGroupSeparator({
|
|
|
44245
44500
|
orientation = "vertical",
|
|
44246
44501
|
...props
|
|
44247
44502
|
}) {
|
|
44248
|
-
return /* @__PURE__ */
|
|
44503
|
+
return /* @__PURE__ */ jsx178(
|
|
44249
44504
|
Separator2,
|
|
44250
44505
|
{
|
|
44251
44506
|
"data-slot": "button-group-separator",
|
|
@@ -44261,9 +44516,9 @@ function ButtonGroupSeparator({
|
|
|
44261
44516
|
|
|
44262
44517
|
// src/components/ui/empty.tsx
|
|
44263
44518
|
import { cva as cva9 } from "class-variance-authority";
|
|
44264
|
-
import { jsx as
|
|
44519
|
+
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
44265
44520
|
function Empty({ className, ...props }) {
|
|
44266
|
-
return /* @__PURE__ */
|
|
44521
|
+
return /* @__PURE__ */ jsx179(
|
|
44267
44522
|
"div",
|
|
44268
44523
|
{
|
|
44269
44524
|
"data-slot": "empty",
|
|
@@ -44276,7 +44531,7 @@ function Empty({ className, ...props }) {
|
|
|
44276
44531
|
);
|
|
44277
44532
|
}
|
|
44278
44533
|
function EmptyHeader({ className, ...props }) {
|
|
44279
|
-
return /* @__PURE__ */
|
|
44534
|
+
return /* @__PURE__ */ jsx179(
|
|
44280
44535
|
"div",
|
|
44281
44536
|
{
|
|
44282
44537
|
"data-slot": "empty-header",
|
|
@@ -44307,7 +44562,7 @@ function EmptyMedia({
|
|
|
44307
44562
|
variant = "default",
|
|
44308
44563
|
...props
|
|
44309
44564
|
}) {
|
|
44310
|
-
return /* @__PURE__ */
|
|
44565
|
+
return /* @__PURE__ */ jsx179(
|
|
44311
44566
|
"div",
|
|
44312
44567
|
{
|
|
44313
44568
|
"data-slot": "empty-icon",
|
|
@@ -44318,7 +44573,7 @@ function EmptyMedia({
|
|
|
44318
44573
|
);
|
|
44319
44574
|
}
|
|
44320
44575
|
function EmptyTitle({ className, ...props }) {
|
|
44321
|
-
return /* @__PURE__ */
|
|
44576
|
+
return /* @__PURE__ */ jsx179(
|
|
44322
44577
|
"div",
|
|
44323
44578
|
{
|
|
44324
44579
|
"data-slot": "empty-title",
|
|
@@ -44328,7 +44583,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
44328
44583
|
);
|
|
44329
44584
|
}
|
|
44330
44585
|
function EmptyDescription({ className, ...props }) {
|
|
44331
|
-
return /* @__PURE__ */
|
|
44586
|
+
return /* @__PURE__ */ jsx179(
|
|
44332
44587
|
"div",
|
|
44333
44588
|
{
|
|
44334
44589
|
"data-slot": "empty-description",
|
|
@@ -44341,7 +44596,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
44341
44596
|
);
|
|
44342
44597
|
}
|
|
44343
44598
|
function EmptyContent({ className, ...props }) {
|
|
44344
|
-
return /* @__PURE__ */
|
|
44599
|
+
return /* @__PURE__ */ jsx179(
|
|
44345
44600
|
"div",
|
|
44346
44601
|
{
|
|
44347
44602
|
"data-slot": "empty-content",
|
|
@@ -44357,9 +44612,9 @@ function EmptyContent({ className, ...props }) {
|
|
|
44357
44612
|
// src/components/ui/field.tsx
|
|
44358
44613
|
import { useMemo as useMemo12 } from "react";
|
|
44359
44614
|
import { cva as cva10 } from "class-variance-authority";
|
|
44360
|
-
import { jsx as
|
|
44615
|
+
import { jsx as jsx180, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
44361
44616
|
function FieldSet({ className, ...props }) {
|
|
44362
|
-
return /* @__PURE__ */
|
|
44617
|
+
return /* @__PURE__ */ jsx180(
|
|
44363
44618
|
"fieldset",
|
|
44364
44619
|
{
|
|
44365
44620
|
"data-slot": "field-set",
|
|
@@ -44377,7 +44632,7 @@ function FieldLegend({
|
|
|
44377
44632
|
variant = "legend",
|
|
44378
44633
|
...props
|
|
44379
44634
|
}) {
|
|
44380
|
-
return /* @__PURE__ */
|
|
44635
|
+
return /* @__PURE__ */ jsx180(
|
|
44381
44636
|
"legend",
|
|
44382
44637
|
{
|
|
44383
44638
|
"data-slot": "field-legend",
|
|
@@ -44393,7 +44648,7 @@ function FieldLegend({
|
|
|
44393
44648
|
);
|
|
44394
44649
|
}
|
|
44395
44650
|
function FieldGroup({ className, ...props }) {
|
|
44396
|
-
return /* @__PURE__ */
|
|
44651
|
+
return /* @__PURE__ */ jsx180(
|
|
44397
44652
|
"div",
|
|
44398
44653
|
{
|
|
44399
44654
|
"data-slot": "field-group",
|
|
@@ -44433,7 +44688,7 @@ function Field({
|
|
|
44433
44688
|
orientation = "vertical",
|
|
44434
44689
|
...props
|
|
44435
44690
|
}) {
|
|
44436
|
-
return /* @__PURE__ */
|
|
44691
|
+
return /* @__PURE__ */ jsx180(
|
|
44437
44692
|
"div",
|
|
44438
44693
|
{
|
|
44439
44694
|
role: "group",
|
|
@@ -44445,7 +44700,7 @@ function Field({
|
|
|
44445
44700
|
);
|
|
44446
44701
|
}
|
|
44447
44702
|
function FieldContent({ className, ...props }) {
|
|
44448
|
-
return /* @__PURE__ */
|
|
44703
|
+
return /* @__PURE__ */ jsx180(
|
|
44449
44704
|
"div",
|
|
44450
44705
|
{
|
|
44451
44706
|
"data-slot": "field-content",
|
|
@@ -44461,7 +44716,7 @@ function FieldLabel({
|
|
|
44461
44716
|
className,
|
|
44462
44717
|
...props
|
|
44463
44718
|
}) {
|
|
44464
|
-
return /* @__PURE__ */
|
|
44719
|
+
return /* @__PURE__ */ jsx180(
|
|
44465
44720
|
Label,
|
|
44466
44721
|
{
|
|
44467
44722
|
"data-slot": "field-label",
|
|
@@ -44476,7 +44731,7 @@ function FieldLabel({
|
|
|
44476
44731
|
);
|
|
44477
44732
|
}
|
|
44478
44733
|
function FieldTitle({ className, ...props }) {
|
|
44479
|
-
return /* @__PURE__ */
|
|
44734
|
+
return /* @__PURE__ */ jsx180(
|
|
44480
44735
|
"div",
|
|
44481
44736
|
{
|
|
44482
44737
|
"data-slot": "field-label",
|
|
@@ -44489,7 +44744,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
44489
44744
|
);
|
|
44490
44745
|
}
|
|
44491
44746
|
function FieldDescription({ className, ...props }) {
|
|
44492
|
-
return /* @__PURE__ */
|
|
44747
|
+
return /* @__PURE__ */ jsx180(
|
|
44493
44748
|
"p",
|
|
44494
44749
|
{
|
|
44495
44750
|
"data-slot": "field-description",
|
|
@@ -44508,7 +44763,7 @@ function FieldSeparator({
|
|
|
44508
44763
|
className,
|
|
44509
44764
|
...props
|
|
44510
44765
|
}) {
|
|
44511
|
-
return /* @__PURE__ */
|
|
44766
|
+
return /* @__PURE__ */ jsxs137(
|
|
44512
44767
|
"div",
|
|
44513
44768
|
{
|
|
44514
44769
|
"data-slot": "field-separator",
|
|
@@ -44519,8 +44774,8 @@ function FieldSeparator({
|
|
|
44519
44774
|
),
|
|
44520
44775
|
...props,
|
|
44521
44776
|
children: [
|
|
44522
|
-
/* @__PURE__ */
|
|
44523
|
-
children && /* @__PURE__ */
|
|
44777
|
+
/* @__PURE__ */ jsx180(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
44778
|
+
children && /* @__PURE__ */ jsx180(
|
|
44524
44779
|
"span",
|
|
44525
44780
|
{
|
|
44526
44781
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -44548,14 +44803,14 @@ function FieldError({
|
|
|
44548
44803
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
44549
44804
|
return errors[0].message;
|
|
44550
44805
|
}
|
|
44551
|
-
return /* @__PURE__ */
|
|
44552
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
44806
|
+
return /* @__PURE__ */ jsx180("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
44807
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx180("li", { children: error.message }, index)
|
|
44553
44808
|
) });
|
|
44554
44809
|
}, [children, errors]);
|
|
44555
44810
|
if (!content) {
|
|
44556
44811
|
return null;
|
|
44557
44812
|
}
|
|
44558
|
-
return /* @__PURE__ */
|
|
44813
|
+
return /* @__PURE__ */ jsx180(
|
|
44559
44814
|
"div",
|
|
44560
44815
|
{
|
|
44561
44816
|
role: "alert",
|
|
@@ -44569,9 +44824,9 @@ function FieldError({
|
|
|
44569
44824
|
|
|
44570
44825
|
// src/components/ui/input-group.tsx
|
|
44571
44826
|
import { cva as cva11 } from "class-variance-authority";
|
|
44572
|
-
import { jsx as
|
|
44827
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
44573
44828
|
function InputGroup({ className, ...props }) {
|
|
44574
|
-
return /* @__PURE__ */
|
|
44829
|
+
return /* @__PURE__ */ jsx181(
|
|
44575
44830
|
"div",
|
|
44576
44831
|
{
|
|
44577
44832
|
"data-slot": "input-group",
|
|
@@ -44615,7 +44870,7 @@ function InputGroupAddon({
|
|
|
44615
44870
|
align = "inline-start",
|
|
44616
44871
|
...props
|
|
44617
44872
|
}) {
|
|
44618
|
-
return /* @__PURE__ */
|
|
44873
|
+
return /* @__PURE__ */ jsx181(
|
|
44619
44874
|
"div",
|
|
44620
44875
|
{
|
|
44621
44876
|
role: "group",
|
|
@@ -44655,7 +44910,7 @@ function InputGroupButton({
|
|
|
44655
44910
|
size = "xs",
|
|
44656
44911
|
...props
|
|
44657
44912
|
}) {
|
|
44658
|
-
return /* @__PURE__ */
|
|
44913
|
+
return /* @__PURE__ */ jsx181(
|
|
44659
44914
|
Button,
|
|
44660
44915
|
{
|
|
44661
44916
|
type,
|
|
@@ -44667,7 +44922,7 @@ function InputGroupButton({
|
|
|
44667
44922
|
);
|
|
44668
44923
|
}
|
|
44669
44924
|
function InputGroupText({ className, ...props }) {
|
|
44670
|
-
return /* @__PURE__ */
|
|
44925
|
+
return /* @__PURE__ */ jsx181(
|
|
44671
44926
|
"span",
|
|
44672
44927
|
{
|
|
44673
44928
|
className: cn(
|
|
@@ -44682,7 +44937,7 @@ function InputGroupInput({
|
|
|
44682
44937
|
className,
|
|
44683
44938
|
...props
|
|
44684
44939
|
}) {
|
|
44685
|
-
return /* @__PURE__ */
|
|
44940
|
+
return /* @__PURE__ */ jsx181(
|
|
44686
44941
|
Input,
|
|
44687
44942
|
{
|
|
44688
44943
|
"data-slot": "input-group-control",
|
|
@@ -44698,7 +44953,7 @@ function InputGroupTextarea({
|
|
|
44698
44953
|
className,
|
|
44699
44954
|
...props
|
|
44700
44955
|
}) {
|
|
44701
|
-
return /* @__PURE__ */
|
|
44956
|
+
return /* @__PURE__ */ jsx181(
|
|
44702
44957
|
Textarea,
|
|
44703
44958
|
{
|
|
44704
44959
|
"data-slot": "input-group-control",
|
|
@@ -44714,9 +44969,9 @@ function InputGroupTextarea({
|
|
|
44714
44969
|
// src/components/ui/item.tsx
|
|
44715
44970
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
44716
44971
|
import { cva as cva12 } from "class-variance-authority";
|
|
44717
|
-
import { jsx as
|
|
44972
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
44718
44973
|
function ItemGroup({ className, ...props }) {
|
|
44719
|
-
return /* @__PURE__ */
|
|
44974
|
+
return /* @__PURE__ */ jsx182(
|
|
44720
44975
|
"div",
|
|
44721
44976
|
{
|
|
44722
44977
|
role: "list",
|
|
@@ -44730,7 +44985,7 @@ function ItemSeparator({
|
|
|
44730
44985
|
className,
|
|
44731
44986
|
...props
|
|
44732
44987
|
}) {
|
|
44733
|
-
return /* @__PURE__ */
|
|
44988
|
+
return /* @__PURE__ */ jsx182(
|
|
44734
44989
|
Separator2,
|
|
44735
44990
|
{
|
|
44736
44991
|
"data-slot": "item-separator",
|
|
@@ -44768,7 +45023,7 @@ function Item8({
|
|
|
44768
45023
|
...props
|
|
44769
45024
|
}) {
|
|
44770
45025
|
const Comp = asChild ? Slot5 : "div";
|
|
44771
|
-
return /* @__PURE__ */
|
|
45026
|
+
return /* @__PURE__ */ jsx182(
|
|
44772
45027
|
Comp,
|
|
44773
45028
|
{
|
|
44774
45029
|
"data-slot": "item",
|
|
@@ -44799,7 +45054,7 @@ function ItemMedia({
|
|
|
44799
45054
|
variant = "default",
|
|
44800
45055
|
...props
|
|
44801
45056
|
}) {
|
|
44802
|
-
return /* @__PURE__ */
|
|
45057
|
+
return /* @__PURE__ */ jsx182(
|
|
44803
45058
|
"div",
|
|
44804
45059
|
{
|
|
44805
45060
|
"data-slot": "item-media",
|
|
@@ -44810,7 +45065,7 @@ function ItemMedia({
|
|
|
44810
45065
|
);
|
|
44811
45066
|
}
|
|
44812
45067
|
function ItemContent({ className, ...props }) {
|
|
44813
|
-
return /* @__PURE__ */
|
|
45068
|
+
return /* @__PURE__ */ jsx182(
|
|
44814
45069
|
"div",
|
|
44815
45070
|
{
|
|
44816
45071
|
"data-slot": "item-content",
|
|
@@ -44823,7 +45078,7 @@ function ItemContent({ className, ...props }) {
|
|
|
44823
45078
|
);
|
|
44824
45079
|
}
|
|
44825
45080
|
function ItemTitle({ className, ...props }) {
|
|
44826
|
-
return /* @__PURE__ */
|
|
45081
|
+
return /* @__PURE__ */ jsx182(
|
|
44827
45082
|
"div",
|
|
44828
45083
|
{
|
|
44829
45084
|
"data-slot": "item-title",
|
|
@@ -44836,7 +45091,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
44836
45091
|
);
|
|
44837
45092
|
}
|
|
44838
45093
|
function ItemDescription({ className, ...props }) {
|
|
44839
|
-
return /* @__PURE__ */
|
|
45094
|
+
return /* @__PURE__ */ jsx182(
|
|
44840
45095
|
"p",
|
|
44841
45096
|
{
|
|
44842
45097
|
"data-slot": "item-description",
|
|
@@ -44850,7 +45105,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
44850
45105
|
);
|
|
44851
45106
|
}
|
|
44852
45107
|
function ItemActions({ className, ...props }) {
|
|
44853
|
-
return /* @__PURE__ */
|
|
45108
|
+
return /* @__PURE__ */ jsx182(
|
|
44854
45109
|
"div",
|
|
44855
45110
|
{
|
|
44856
45111
|
"data-slot": "item-actions",
|
|
@@ -44860,7 +45115,7 @@ function ItemActions({ className, ...props }) {
|
|
|
44860
45115
|
);
|
|
44861
45116
|
}
|
|
44862
45117
|
function ItemHeader({ className, ...props }) {
|
|
44863
|
-
return /* @__PURE__ */
|
|
45118
|
+
return /* @__PURE__ */ jsx182(
|
|
44864
45119
|
"div",
|
|
44865
45120
|
{
|
|
44866
45121
|
"data-slot": "item-header",
|
|
@@ -44873,7 +45128,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
44873
45128
|
);
|
|
44874
45129
|
}
|
|
44875
45130
|
function ItemFooter({ className, ...props }) {
|
|
44876
|
-
return /* @__PURE__ */
|
|
45131
|
+
return /* @__PURE__ */ jsx182(
|
|
44877
45132
|
"div",
|
|
44878
45133
|
{
|
|
44879
45134
|
"data-slot": "item-footer",
|
|
@@ -44887,9 +45142,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
44887
45142
|
}
|
|
44888
45143
|
|
|
44889
45144
|
// src/components/ui/kbd.tsx
|
|
44890
|
-
import { jsx as
|
|
45145
|
+
import { jsx as jsx183 } from "react/jsx-runtime";
|
|
44891
45146
|
function Kbd({ className, ...props }) {
|
|
44892
|
-
return /* @__PURE__ */
|
|
45147
|
+
return /* @__PURE__ */ jsx183(
|
|
44893
45148
|
"kbd",
|
|
44894
45149
|
{
|
|
44895
45150
|
"data-slot": "kbd",
|
|
@@ -44904,7 +45159,7 @@ function Kbd({ className, ...props }) {
|
|
|
44904
45159
|
);
|
|
44905
45160
|
}
|
|
44906
45161
|
function KbdGroup({ className, ...props }) {
|
|
44907
|
-
return /* @__PURE__ */
|
|
45162
|
+
return /* @__PURE__ */ jsx183(
|
|
44908
45163
|
"kbd",
|
|
44909
45164
|
{
|
|
44910
45165
|
"data-slot": "kbd-group",
|
|
@@ -44915,16 +45170,16 @@ function KbdGroup({ className, ...props }) {
|
|
|
44915
45170
|
}
|
|
44916
45171
|
|
|
44917
45172
|
// src/components/ui/sidebar.tsx
|
|
44918
|
-
import * as
|
|
45173
|
+
import * as React115 from "react";
|
|
44919
45174
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
44920
45175
|
import { cva as cva13 } from "class-variance-authority";
|
|
44921
45176
|
|
|
44922
45177
|
// src/hooks/use-mobile.tsx
|
|
44923
|
-
import * as
|
|
45178
|
+
import * as React114 from "react";
|
|
44924
45179
|
var MOBILE_BREAKPOINT = 768;
|
|
44925
45180
|
function useIsMobile() {
|
|
44926
|
-
const [isMobile, setIsMobile] =
|
|
44927
|
-
|
|
45181
|
+
const [isMobile, setIsMobile] = React114.useState(void 0);
|
|
45182
|
+
React114.useEffect(() => {
|
|
44928
45183
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
44929
45184
|
const onChange = () => {
|
|
44930
45185
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -44937,22 +45192,22 @@ function useIsMobile() {
|
|
|
44937
45192
|
}
|
|
44938
45193
|
|
|
44939
45194
|
// src/components/ui/sidebar.tsx
|
|
44940
|
-
import { jsx as
|
|
45195
|
+
import { jsx as jsx184, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
44941
45196
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
44942
45197
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
44943
45198
|
var SIDEBAR_WIDTH = "16rem";
|
|
44944
45199
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
44945
45200
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
44946
45201
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
44947
|
-
var SidebarContext =
|
|
45202
|
+
var SidebarContext = React115.createContext(null);
|
|
44948
45203
|
function useSidebar() {
|
|
44949
|
-
const context =
|
|
45204
|
+
const context = React115.useContext(SidebarContext);
|
|
44950
45205
|
if (!context) {
|
|
44951
45206
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
44952
45207
|
}
|
|
44953
45208
|
return context;
|
|
44954
45209
|
}
|
|
44955
|
-
var SidebarProvider =
|
|
45210
|
+
var SidebarProvider = React115.forwardRef(
|
|
44956
45211
|
({
|
|
44957
45212
|
defaultOpen = true,
|
|
44958
45213
|
open: openProp,
|
|
@@ -44963,10 +45218,10 @@ var SidebarProvider = React114.forwardRef(
|
|
|
44963
45218
|
...props
|
|
44964
45219
|
}, ref) => {
|
|
44965
45220
|
const isMobile = useIsMobile();
|
|
44966
|
-
const [openMobile, setOpenMobile] =
|
|
44967
|
-
const [_open, _setOpen] =
|
|
45221
|
+
const [openMobile, setOpenMobile] = React115.useState(false);
|
|
45222
|
+
const [_open, _setOpen] = React115.useState(defaultOpen);
|
|
44968
45223
|
const open = openProp ?? _open;
|
|
44969
|
-
const setOpen =
|
|
45224
|
+
const setOpen = React115.useCallback(
|
|
44970
45225
|
(value) => {
|
|
44971
45226
|
const openState = typeof value === "function" ? value(open) : value;
|
|
44972
45227
|
if (setOpenProp) {
|
|
@@ -44978,10 +45233,10 @@ var SidebarProvider = React114.forwardRef(
|
|
|
44978
45233
|
},
|
|
44979
45234
|
[setOpenProp, open]
|
|
44980
45235
|
);
|
|
44981
|
-
const toggleSidebar =
|
|
45236
|
+
const toggleSidebar = React115.useCallback(() => {
|
|
44982
45237
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
44983
45238
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
44984
|
-
|
|
45239
|
+
React115.useEffect(() => {
|
|
44985
45240
|
const handleKeyDown = (event) => {
|
|
44986
45241
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
44987
45242
|
event.preventDefault();
|
|
@@ -44992,7 +45247,7 @@ var SidebarProvider = React114.forwardRef(
|
|
|
44992
45247
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
44993
45248
|
}, [toggleSidebar]);
|
|
44994
45249
|
const state = open ? "expanded" : "collapsed";
|
|
44995
|
-
const contextValue =
|
|
45250
|
+
const contextValue = React115.useMemo(
|
|
44996
45251
|
() => ({
|
|
44997
45252
|
state,
|
|
44998
45253
|
open,
|
|
@@ -45004,7 +45259,7 @@ var SidebarProvider = React114.forwardRef(
|
|
|
45004
45259
|
}),
|
|
45005
45260
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
45006
45261
|
);
|
|
45007
|
-
return /* @__PURE__ */
|
|
45262
|
+
return /* @__PURE__ */ jsx184(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx184(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx184(
|
|
45008
45263
|
"div",
|
|
45009
45264
|
{
|
|
45010
45265
|
style: {
|
|
@@ -45024,7 +45279,7 @@ var SidebarProvider = React114.forwardRef(
|
|
|
45024
45279
|
}
|
|
45025
45280
|
);
|
|
45026
45281
|
SidebarProvider.displayName = "SidebarProvider";
|
|
45027
|
-
var Sidebar =
|
|
45282
|
+
var Sidebar = React115.forwardRef(
|
|
45028
45283
|
({
|
|
45029
45284
|
side = "left",
|
|
45030
45285
|
variant = "sidebar",
|
|
@@ -45035,7 +45290,7 @@ var Sidebar = React114.forwardRef(
|
|
|
45035
45290
|
}, ref) => {
|
|
45036
45291
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
45037
45292
|
if (collapsible === "none") {
|
|
45038
|
-
return /* @__PURE__ */
|
|
45293
|
+
return /* @__PURE__ */ jsx184(
|
|
45039
45294
|
"div",
|
|
45040
45295
|
{
|
|
45041
45296
|
className: cn(
|
|
@@ -45049,7 +45304,7 @@ var Sidebar = React114.forwardRef(
|
|
|
45049
45304
|
);
|
|
45050
45305
|
}
|
|
45051
45306
|
if (isMobile) {
|
|
45052
|
-
return /* @__PURE__ */
|
|
45307
|
+
return /* @__PURE__ */ jsx184(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs138(
|
|
45053
45308
|
SheetContent,
|
|
45054
45309
|
{
|
|
45055
45310
|
"data-sidebar": "sidebar",
|
|
@@ -45060,16 +45315,16 @@ var Sidebar = React114.forwardRef(
|
|
|
45060
45315
|
},
|
|
45061
45316
|
side,
|
|
45062
45317
|
children: [
|
|
45063
|
-
/* @__PURE__ */
|
|
45064
|
-
/* @__PURE__ */
|
|
45065
|
-
/* @__PURE__ */
|
|
45318
|
+
/* @__PURE__ */ jsxs138(SheetHeader, { className: "sr-only", children: [
|
|
45319
|
+
/* @__PURE__ */ jsx184(SheetTitle, { children: "Sidebar" }),
|
|
45320
|
+
/* @__PURE__ */ jsx184(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
45066
45321
|
] }),
|
|
45067
|
-
/* @__PURE__ */
|
|
45322
|
+
/* @__PURE__ */ jsx184("div", { className: "flex h-full w-full flex-col", children })
|
|
45068
45323
|
]
|
|
45069
45324
|
}
|
|
45070
45325
|
) });
|
|
45071
45326
|
}
|
|
45072
|
-
return /* @__PURE__ */
|
|
45327
|
+
return /* @__PURE__ */ jsxs138(
|
|
45073
45328
|
"div",
|
|
45074
45329
|
{
|
|
45075
45330
|
ref,
|
|
@@ -45079,7 +45334,7 @@ var Sidebar = React114.forwardRef(
|
|
|
45079
45334
|
"data-variant": variant,
|
|
45080
45335
|
"data-side": side,
|
|
45081
45336
|
children: [
|
|
45082
|
-
/* @__PURE__ */
|
|
45337
|
+
/* @__PURE__ */ jsx184(
|
|
45083
45338
|
"div",
|
|
45084
45339
|
{
|
|
45085
45340
|
className: cn(
|
|
@@ -45090,7 +45345,7 @@ var Sidebar = React114.forwardRef(
|
|
|
45090
45345
|
)
|
|
45091
45346
|
}
|
|
45092
45347
|
),
|
|
45093
|
-
/* @__PURE__ */
|
|
45348
|
+
/* @__PURE__ */ jsx184(
|
|
45094
45349
|
"div",
|
|
45095
45350
|
{
|
|
45096
45351
|
className: cn(
|
|
@@ -45101,7 +45356,7 @@ var Sidebar = React114.forwardRef(
|
|
|
45101
45356
|
className
|
|
45102
45357
|
),
|
|
45103
45358
|
...props,
|
|
45104
|
-
children: /* @__PURE__ */
|
|
45359
|
+
children: /* @__PURE__ */ jsx184(
|
|
45105
45360
|
"div",
|
|
45106
45361
|
{
|
|
45107
45362
|
"data-sidebar": "sidebar",
|
|
@@ -45117,9 +45372,9 @@ var Sidebar = React114.forwardRef(
|
|
|
45117
45372
|
}
|
|
45118
45373
|
);
|
|
45119
45374
|
Sidebar.displayName = "Sidebar";
|
|
45120
|
-
var SidebarTrigger =
|
|
45375
|
+
var SidebarTrigger = React115.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
45121
45376
|
const { toggleSidebar } = useSidebar();
|
|
45122
|
-
return /* @__PURE__ */
|
|
45377
|
+
return /* @__PURE__ */ jsxs138(
|
|
45123
45378
|
Button,
|
|
45124
45379
|
{
|
|
45125
45380
|
ref,
|
|
@@ -45133,16 +45388,16 @@ var SidebarTrigger = React114.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
45133
45388
|
},
|
|
45134
45389
|
...props,
|
|
45135
45390
|
children: [
|
|
45136
|
-
/* @__PURE__ */
|
|
45137
|
-
/* @__PURE__ */
|
|
45391
|
+
/* @__PURE__ */ jsx184(PanelLeft, {}),
|
|
45392
|
+
/* @__PURE__ */ jsx184("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
45138
45393
|
]
|
|
45139
45394
|
}
|
|
45140
45395
|
);
|
|
45141
45396
|
});
|
|
45142
45397
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
45143
|
-
var SidebarRail =
|
|
45398
|
+
var SidebarRail = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45144
45399
|
const { toggleSidebar } = useSidebar();
|
|
45145
|
-
return /* @__PURE__ */
|
|
45400
|
+
return /* @__PURE__ */ jsx184(
|
|
45146
45401
|
"button",
|
|
45147
45402
|
{
|
|
45148
45403
|
ref,
|
|
@@ -45165,8 +45420,8 @@ var SidebarRail = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45165
45420
|
);
|
|
45166
45421
|
});
|
|
45167
45422
|
SidebarRail.displayName = "SidebarRail";
|
|
45168
|
-
var SidebarInset =
|
|
45169
|
-
return /* @__PURE__ */
|
|
45423
|
+
var SidebarInset = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45424
|
+
return /* @__PURE__ */ jsx184(
|
|
45170
45425
|
"main",
|
|
45171
45426
|
{
|
|
45172
45427
|
ref,
|
|
@@ -45180,8 +45435,8 @@ var SidebarInset = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45180
45435
|
);
|
|
45181
45436
|
});
|
|
45182
45437
|
SidebarInset.displayName = "SidebarInset";
|
|
45183
|
-
var SidebarInput =
|
|
45184
|
-
return /* @__PURE__ */
|
|
45438
|
+
var SidebarInput = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45439
|
+
return /* @__PURE__ */ jsx184(
|
|
45185
45440
|
Input,
|
|
45186
45441
|
{
|
|
45187
45442
|
ref,
|
|
@@ -45195,8 +45450,8 @@ var SidebarInput = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45195
45450
|
);
|
|
45196
45451
|
});
|
|
45197
45452
|
SidebarInput.displayName = "SidebarInput";
|
|
45198
|
-
var SidebarHeader =
|
|
45199
|
-
return /* @__PURE__ */
|
|
45453
|
+
var SidebarHeader = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45454
|
+
return /* @__PURE__ */ jsx184(
|
|
45200
45455
|
"div",
|
|
45201
45456
|
{
|
|
45202
45457
|
ref,
|
|
@@ -45207,8 +45462,8 @@ var SidebarHeader = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45207
45462
|
);
|
|
45208
45463
|
});
|
|
45209
45464
|
SidebarHeader.displayName = "SidebarHeader";
|
|
45210
|
-
var SidebarFooter =
|
|
45211
|
-
return /* @__PURE__ */
|
|
45465
|
+
var SidebarFooter = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45466
|
+
return /* @__PURE__ */ jsx184(
|
|
45212
45467
|
"div",
|
|
45213
45468
|
{
|
|
45214
45469
|
ref,
|
|
@@ -45219,8 +45474,8 @@ var SidebarFooter = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45219
45474
|
);
|
|
45220
45475
|
});
|
|
45221
45476
|
SidebarFooter.displayName = "SidebarFooter";
|
|
45222
|
-
var SidebarSeparator =
|
|
45223
|
-
return /* @__PURE__ */
|
|
45477
|
+
var SidebarSeparator = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45478
|
+
return /* @__PURE__ */ jsx184(
|
|
45224
45479
|
Separator2,
|
|
45225
45480
|
{
|
|
45226
45481
|
ref,
|
|
@@ -45231,8 +45486,8 @@ var SidebarSeparator = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45231
45486
|
);
|
|
45232
45487
|
});
|
|
45233
45488
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
45234
|
-
var SidebarContent =
|
|
45235
|
-
return /* @__PURE__ */
|
|
45489
|
+
var SidebarContent = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45490
|
+
return /* @__PURE__ */ jsx184(
|
|
45236
45491
|
"div",
|
|
45237
45492
|
{
|
|
45238
45493
|
ref,
|
|
@@ -45246,8 +45501,8 @@ var SidebarContent = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45246
45501
|
);
|
|
45247
45502
|
});
|
|
45248
45503
|
SidebarContent.displayName = "SidebarContent";
|
|
45249
|
-
var SidebarGroup =
|
|
45250
|
-
return /* @__PURE__ */
|
|
45504
|
+
var SidebarGroup = React115.forwardRef(({ className, ...props }, ref) => {
|
|
45505
|
+
return /* @__PURE__ */ jsx184(
|
|
45251
45506
|
"div",
|
|
45252
45507
|
{
|
|
45253
45508
|
ref,
|
|
@@ -45258,9 +45513,9 @@ var SidebarGroup = React114.forwardRef(({ className, ...props }, ref) => {
|
|
|
45258
45513
|
);
|
|
45259
45514
|
});
|
|
45260
45515
|
SidebarGroup.displayName = "SidebarGroup";
|
|
45261
|
-
var SidebarGroupLabel =
|
|
45516
|
+
var SidebarGroupLabel = React115.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
45262
45517
|
const Comp = asChild ? Slot6 : "div";
|
|
45263
|
-
return /* @__PURE__ */
|
|
45518
|
+
return /* @__PURE__ */ jsx184(
|
|
45264
45519
|
Comp,
|
|
45265
45520
|
{
|
|
45266
45521
|
ref,
|
|
@@ -45275,9 +45530,9 @@ var SidebarGroupLabel = React114.forwardRef(({ className, asChild = false, ...pr
|
|
|
45275
45530
|
);
|
|
45276
45531
|
});
|
|
45277
45532
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
45278
|
-
var SidebarGroupAction =
|
|
45533
|
+
var SidebarGroupAction = React115.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
45279
45534
|
const Comp = asChild ? Slot6 : "button";
|
|
45280
|
-
return /* @__PURE__ */
|
|
45535
|
+
return /* @__PURE__ */ jsx184(
|
|
45281
45536
|
Comp,
|
|
45282
45537
|
{
|
|
45283
45538
|
ref,
|
|
@@ -45294,7 +45549,7 @@ var SidebarGroupAction = React114.forwardRef(({ className, asChild = false, ...p
|
|
|
45294
45549
|
);
|
|
45295
45550
|
});
|
|
45296
45551
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
45297
|
-
var SidebarGroupContent =
|
|
45552
|
+
var SidebarGroupContent = React115.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx184(
|
|
45298
45553
|
"div",
|
|
45299
45554
|
{
|
|
45300
45555
|
ref,
|
|
@@ -45304,7 +45559,7 @@ var SidebarGroupContent = React114.forwardRef(({ className, ...props }, ref) =>
|
|
|
45304
45559
|
}
|
|
45305
45560
|
));
|
|
45306
45561
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
45307
|
-
var SidebarMenu =
|
|
45562
|
+
var SidebarMenu = React115.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx184(
|
|
45308
45563
|
"ul",
|
|
45309
45564
|
{
|
|
45310
45565
|
ref,
|
|
@@ -45314,7 +45569,7 @@ var SidebarMenu = React114.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
45314
45569
|
}
|
|
45315
45570
|
));
|
|
45316
45571
|
SidebarMenu.displayName = "SidebarMenu";
|
|
45317
|
-
var SidebarMenuItem =
|
|
45572
|
+
var SidebarMenuItem = React115.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx184(
|
|
45318
45573
|
"li",
|
|
45319
45574
|
{
|
|
45320
45575
|
ref,
|
|
@@ -45344,7 +45599,7 @@ var sidebarMenuButtonVariants = cva13(
|
|
|
45344
45599
|
}
|
|
45345
45600
|
}
|
|
45346
45601
|
);
|
|
45347
|
-
var SidebarMenuButton =
|
|
45602
|
+
var SidebarMenuButton = React115.forwardRef(
|
|
45348
45603
|
({
|
|
45349
45604
|
asChild = false,
|
|
45350
45605
|
isActive = false,
|
|
@@ -45356,7 +45611,7 @@ var SidebarMenuButton = React114.forwardRef(
|
|
|
45356
45611
|
}, ref) => {
|
|
45357
45612
|
const Comp = asChild ? Slot6 : "button";
|
|
45358
45613
|
const { isMobile, state } = useSidebar();
|
|
45359
|
-
const button = /* @__PURE__ */
|
|
45614
|
+
const button = /* @__PURE__ */ jsx184(
|
|
45360
45615
|
Comp,
|
|
45361
45616
|
{
|
|
45362
45617
|
ref,
|
|
@@ -45375,9 +45630,9 @@ var SidebarMenuButton = React114.forwardRef(
|
|
|
45375
45630
|
children: tooltip
|
|
45376
45631
|
};
|
|
45377
45632
|
}
|
|
45378
|
-
return /* @__PURE__ */
|
|
45379
|
-
/* @__PURE__ */
|
|
45380
|
-
/* @__PURE__ */
|
|
45633
|
+
return /* @__PURE__ */ jsxs138(Tooltip, { children: [
|
|
45634
|
+
/* @__PURE__ */ jsx184(TooltipTrigger, { asChild: true, children: button }),
|
|
45635
|
+
/* @__PURE__ */ jsx184(
|
|
45381
45636
|
TooltipContent,
|
|
45382
45637
|
{
|
|
45383
45638
|
side: "right",
|
|
@@ -45390,9 +45645,9 @@ var SidebarMenuButton = React114.forwardRef(
|
|
|
45390
45645
|
}
|
|
45391
45646
|
);
|
|
45392
45647
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
45393
|
-
var SidebarMenuAction =
|
|
45648
|
+
var SidebarMenuAction = React115.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
45394
45649
|
const Comp = asChild ? Slot6 : "button";
|
|
45395
|
-
return /* @__PURE__ */
|
|
45650
|
+
return /* @__PURE__ */ jsx184(
|
|
45396
45651
|
Comp,
|
|
45397
45652
|
{
|
|
45398
45653
|
ref,
|
|
@@ -45413,7 +45668,7 @@ var SidebarMenuAction = React114.forwardRef(({ className, asChild = false, showO
|
|
|
45413
45668
|
);
|
|
45414
45669
|
});
|
|
45415
45670
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
45416
|
-
var SidebarMenuBadge =
|
|
45671
|
+
var SidebarMenuBadge = React115.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx184(
|
|
45417
45672
|
"div",
|
|
45418
45673
|
{
|
|
45419
45674
|
ref,
|
|
@@ -45431,11 +45686,11 @@ var SidebarMenuBadge = React114.forwardRef(({ className, ...props }, ref) => /*
|
|
|
45431
45686
|
}
|
|
45432
45687
|
));
|
|
45433
45688
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
45434
|
-
var SidebarMenuSkeleton =
|
|
45435
|
-
const width =
|
|
45689
|
+
var SidebarMenuSkeleton = React115.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
45690
|
+
const width = React115.useMemo(() => {
|
|
45436
45691
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
45437
45692
|
}, []);
|
|
45438
|
-
return /* @__PURE__ */
|
|
45693
|
+
return /* @__PURE__ */ jsxs138(
|
|
45439
45694
|
"div",
|
|
45440
45695
|
{
|
|
45441
45696
|
ref,
|
|
@@ -45443,14 +45698,14 @@ var SidebarMenuSkeleton = React114.forwardRef(({ className, showIcon = false, ..
|
|
|
45443
45698
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
45444
45699
|
...props,
|
|
45445
45700
|
children: [
|
|
45446
|
-
showIcon && /* @__PURE__ */
|
|
45701
|
+
showIcon && /* @__PURE__ */ jsx184(
|
|
45447
45702
|
Skeleton,
|
|
45448
45703
|
{
|
|
45449
45704
|
className: "size-4 rounded-md",
|
|
45450
45705
|
"data-sidebar": "menu-skeleton-icon"
|
|
45451
45706
|
}
|
|
45452
45707
|
),
|
|
45453
|
-
/* @__PURE__ */
|
|
45708
|
+
/* @__PURE__ */ jsx184(
|
|
45454
45709
|
Skeleton,
|
|
45455
45710
|
{
|
|
45456
45711
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -45465,7 +45720,7 @@ var SidebarMenuSkeleton = React114.forwardRef(({ className, showIcon = false, ..
|
|
|
45465
45720
|
);
|
|
45466
45721
|
});
|
|
45467
45722
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
45468
|
-
var SidebarMenuSub =
|
|
45723
|
+
var SidebarMenuSub = React115.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx184(
|
|
45469
45724
|
"ul",
|
|
45470
45725
|
{
|
|
45471
45726
|
ref,
|
|
@@ -45479,11 +45734,11 @@ var SidebarMenuSub = React114.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
45479
45734
|
}
|
|
45480
45735
|
));
|
|
45481
45736
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
45482
|
-
var SidebarMenuSubItem =
|
|
45737
|
+
var SidebarMenuSubItem = React115.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx184("li", { ref, ...props }));
|
|
45483
45738
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
45484
|
-
var SidebarMenuSubButton =
|
|
45739
|
+
var SidebarMenuSubButton = React115.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
45485
45740
|
const Comp = asChild ? Slot6 : "a";
|
|
45486
|
-
return /* @__PURE__ */
|
|
45741
|
+
return /* @__PURE__ */ jsx184(
|
|
45487
45742
|
Comp,
|
|
45488
45743
|
{
|
|
45489
45744
|
ref,
|
|
@@ -45507,20 +45762,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
45507
45762
|
// src/components/ui/sonner.tsx
|
|
45508
45763
|
import { useTheme } from "next-themes";
|
|
45509
45764
|
import { Toaster as Sonner } from "sonner";
|
|
45510
|
-
import { jsx as
|
|
45765
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
45511
45766
|
var Toaster = ({ ...props }) => {
|
|
45512
45767
|
const { theme = "system" } = useTheme();
|
|
45513
|
-
return /* @__PURE__ */
|
|
45768
|
+
return /* @__PURE__ */ jsx185(
|
|
45514
45769
|
Sonner,
|
|
45515
45770
|
{
|
|
45516
45771
|
theme,
|
|
45517
45772
|
className: "toaster group",
|
|
45518
45773
|
icons: {
|
|
45519
|
-
success: /* @__PURE__ */
|
|
45520
|
-
info: /* @__PURE__ */
|
|
45521
|
-
warning: /* @__PURE__ */
|
|
45522
|
-
error: /* @__PURE__ */
|
|
45523
|
-
loading: /* @__PURE__ */
|
|
45774
|
+
success: /* @__PURE__ */ jsx185(CircleCheck, { className: "h-4 w-4" }),
|
|
45775
|
+
info: /* @__PURE__ */ jsx185(Info, { className: "h-4 w-4" }),
|
|
45776
|
+
warning: /* @__PURE__ */ jsx185(TriangleAlert, { className: "h-4 w-4" }),
|
|
45777
|
+
error: /* @__PURE__ */ jsx185(OctagonX, { className: "h-4 w-4" }),
|
|
45778
|
+
loading: /* @__PURE__ */ jsx185(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
45524
45779
|
},
|
|
45525
45780
|
toastOptions: {
|
|
45526
45781
|
classNames: {
|
|
@@ -45536,26 +45791,26 @@ var Toaster = ({ ...props }) => {
|
|
|
45536
45791
|
};
|
|
45537
45792
|
|
|
45538
45793
|
// src/components/ui/toggle-group.tsx
|
|
45539
|
-
import * as
|
|
45794
|
+
import * as React116 from "react";
|
|
45540
45795
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
45541
|
-
import { jsx as
|
|
45542
|
-
var ToggleGroupContext =
|
|
45796
|
+
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
45797
|
+
var ToggleGroupContext = React116.createContext({
|
|
45543
45798
|
size: "default",
|
|
45544
45799
|
variant: "default"
|
|
45545
45800
|
});
|
|
45546
|
-
var ToggleGroup =
|
|
45801
|
+
var ToggleGroup = React116.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx186(
|
|
45547
45802
|
ToggleGroupPrimitive.Root,
|
|
45548
45803
|
{
|
|
45549
45804
|
ref,
|
|
45550
45805
|
className: cn("flex items-center justify-center gap-1", className),
|
|
45551
45806
|
...props,
|
|
45552
|
-
children: /* @__PURE__ */
|
|
45807
|
+
children: /* @__PURE__ */ jsx186(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
45553
45808
|
}
|
|
45554
45809
|
));
|
|
45555
45810
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
45556
|
-
var ToggleGroupItem =
|
|
45557
|
-
const context =
|
|
45558
|
-
return /* @__PURE__ */
|
|
45811
|
+
var ToggleGroupItem = React116.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
45812
|
+
const context = React116.useContext(ToggleGroupContext);
|
|
45813
|
+
return /* @__PURE__ */ jsx186(
|
|
45559
45814
|
ToggleGroupPrimitive.Item,
|
|
45560
45815
|
{
|
|
45561
45816
|
ref,
|
|
@@ -45574,7 +45829,7 @@ var ToggleGroupItem = React115.forwardRef(({ className, children, variant, size,
|
|
|
45574
45829
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
45575
45830
|
|
|
45576
45831
|
// src/render/PXEngineRenderer.tsx
|
|
45577
|
-
import { jsx as
|
|
45832
|
+
import { jsx as jsx187, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
45578
45833
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
45579
45834
|
// Form components - require FormField + FormItem context
|
|
45580
45835
|
"FormLabel",
|
|
@@ -45679,24 +45934,24 @@ var REGISTERED_COMPONENTS = /* @__PURE__ */ new Set([
|
|
|
45679
45934
|
]);
|
|
45680
45935
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
45681
45936
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
45682
|
-
return /* @__PURE__ */
|
|
45937
|
+
return /* @__PURE__ */ jsxs139(
|
|
45683
45938
|
"div",
|
|
45684
45939
|
{
|
|
45685
45940
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
45686
45941
|
children: [
|
|
45687
|
-
/* @__PURE__ */
|
|
45688
|
-
/* @__PURE__ */
|
|
45689
|
-
/* @__PURE__ */
|
|
45690
|
-
/* @__PURE__ */
|
|
45942
|
+
/* @__PURE__ */ jsxs139("div", { className: "flex items-start gap-2", children: [
|
|
45943
|
+
/* @__PURE__ */ jsx187("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
45944
|
+
/* @__PURE__ */ jsxs139("div", { className: "flex-1", children: [
|
|
45945
|
+
/* @__PURE__ */ jsxs139("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
45691
45946
|
"Invalid Component: ",
|
|
45692
45947
|
componentName
|
|
45693
45948
|
] }),
|
|
45694
|
-
/* @__PURE__ */
|
|
45949
|
+
/* @__PURE__ */ jsx187("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
45695
45950
|
] })
|
|
45696
45951
|
] }),
|
|
45697
|
-
/* @__PURE__ */
|
|
45698
|
-
/* @__PURE__ */
|
|
45699
|
-
/* @__PURE__ */
|
|
45952
|
+
/* @__PURE__ */ jsxs139("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
45953
|
+
/* @__PURE__ */ jsx187("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
45954
|
+
/* @__PURE__ */ jsx187("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
45700
45955
|
] })
|
|
45701
45956
|
]
|
|
45702
45957
|
},
|
|
@@ -45774,12 +46029,12 @@ var PXEngineRenderer = ({
|
|
|
45774
46029
|
const root = schema.root || schema;
|
|
45775
46030
|
const renderRecursive = (component, index) => {
|
|
45776
46031
|
if (Array.isArray(component)) {
|
|
45777
|
-
return /* @__PURE__ */
|
|
46032
|
+
return /* @__PURE__ */ jsx187(React117.Fragment, { children: component.map((child, idx) => renderRecursive(child, idx)) }, index !== void 0 ? `array-${index}` : "array-root");
|
|
45778
46033
|
}
|
|
45779
46034
|
if (typeof component === "string" || typeof component === "number") {
|
|
45780
46035
|
return component;
|
|
45781
46036
|
}
|
|
45782
|
-
if (
|
|
46037
|
+
if (React117.isValidElement(component)) {
|
|
45783
46038
|
return component;
|
|
45784
46039
|
}
|
|
45785
46040
|
if (!component || typeof component !== "object") return null;
|
|
@@ -45861,7 +46116,7 @@ var PXEngineRenderer = ({
|
|
|
45861
46116
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
45862
46117
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
45863
46118
|
if (isAtomWithRenderProp) {
|
|
45864
|
-
return /* @__PURE__ */
|
|
46119
|
+
return /* @__PURE__ */ jsx187(
|
|
45865
46120
|
TargetComponent,
|
|
45866
46121
|
{
|
|
45867
46122
|
...finalProps,
|
|
@@ -45873,7 +46128,7 @@ var PXEngineRenderer = ({
|
|
|
45873
46128
|
uniqueKey
|
|
45874
46129
|
);
|
|
45875
46130
|
} else {
|
|
45876
|
-
return /* @__PURE__ */
|
|
46131
|
+
return /* @__PURE__ */ jsx187(
|
|
45877
46132
|
TargetComponent,
|
|
45878
46133
|
{
|
|
45879
46134
|
...finalProps,
|
|
@@ -45885,7 +46140,7 @@ var PXEngineRenderer = ({
|
|
|
45885
46140
|
);
|
|
45886
46141
|
}
|
|
45887
46142
|
};
|
|
45888
|
-
return /* @__PURE__ */
|
|
46143
|
+
return /* @__PURE__ */ jsx187("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
45889
46144
|
};
|
|
45890
46145
|
export {
|
|
45891
46146
|
Accordion,
|
|
@@ -46193,6 +46448,7 @@ export {
|
|
|
46193
46448
|
TooltipTrigger,
|
|
46194
46449
|
TopPostsGrid,
|
|
46195
46450
|
VideoAtom,
|
|
46451
|
+
WebSearchJobCard,
|
|
46196
46452
|
cn,
|
|
46197
46453
|
defaultFetchSelections,
|
|
46198
46454
|
defaultPersistSelection,
|