pxengine 0.1.47 → 0.1.49

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 CHANGED
@@ -122,6 +122,7 @@ __export(index_exports, {
122
122
  CountrySelectEdit: () => CountrySelectEdit,
123
123
  CreatorActionHeader: () => CreatorActionHeader,
124
124
  CreatorCompactView: () => CreatorCompactView,
125
+ CreatorExpandedPanel: () => CreatorExpandedPanel,
125
126
  CreatorGridCard: () => CreatorGridCard,
126
127
  CreatorImageList: () => CreatorImageList,
127
128
  CreatorProfileSummary: () => CreatorProfileSummary,
@@ -307,6 +308,8 @@ __export(index_exports, {
307
308
  VideoAtom: () => VideoAtom,
308
309
  WorkflowVisualizer: () => WorkflowVisualizer,
309
310
  cn: () => cn,
311
+ defaultFetchSelections: () => defaultFetchSelections,
312
+ defaultPersistSelection: () => defaultPersistSelection,
310
313
  generateFieldsFromData: () => generateFieldsFromData,
311
314
  generateFieldsFromPropDefinitions: () => generateFieldsFromPropDefinitions,
312
315
  useCreatorWidgetPolling: () => useCreatorWidgetPolling
@@ -314,7 +317,7 @@ __export(index_exports, {
314
317
  module.exports = __toCommonJS(index_exports);
315
318
 
316
319
  // src/render/PXEngineRenderer.tsx
317
- var import_react75 = __toESM(require("react"), 1);
320
+ var import_react79 = __toESM(require("react"), 1);
318
321
 
319
322
  // src/atoms/index.ts
320
323
  var atoms_exports = {};
@@ -33598,6 +33601,7 @@ __export(molecules_exports, {
33598
33601
  CountrySelectEdit: () => CountrySelectEdit,
33599
33602
  CreatorActionHeader: () => CreatorActionHeader,
33600
33603
  CreatorCompactView: () => CreatorCompactView,
33604
+ CreatorExpandedPanel: () => CreatorExpandedPanel,
33601
33605
  CreatorGridCard: () => CreatorGridCard,
33602
33606
  CreatorImageList: () => CreatorImageList,
33603
33607
  CreatorProfileSummary: () => CreatorProfileSummary,
@@ -33633,6 +33637,8 @@ __export(molecules_exports, {
33633
33637
  TopPostsGrid: () => TopPostsGrid,
33634
33638
  UIComponentSelector: () => UIComponentSelector,
33635
33639
  WorkflowVisualizer: () => WorkflowVisualizer,
33640
+ defaultFetchSelections: () => defaultFetchSelections,
33641
+ defaultPersistSelection: () => defaultPersistSelection,
33636
33642
  useCreatorWidgetPolling: () => useCreatorWidgetPolling
33637
33643
  });
33638
33644
 
@@ -35705,12 +35711,16 @@ var CampaignSeedCard = import_react60.default.memo(
35705
35711
  fields: providedFields,
35706
35712
  data,
35707
35713
  onAction,
35714
+ sendMessage,
35708
35715
  ...formCardProps
35709
35716
  }) => {
35710
35717
  const fields = (0, import_react60.useMemo)(() => {
35711
35718
  return providedFields || buildCampaignSeedFields(data);
35712
35719
  }, [providedFields, data]);
35713
35720
  const handleProceed = () => {
35721
+ if (sendMessage) {
35722
+ sendMessage("Continue to concepts");
35723
+ }
35714
35724
  onAction?.({
35715
35725
  type: "brief_confirmation",
35716
35726
  value: "Continue to concepts",
@@ -35867,6 +35877,7 @@ var SearchSpecCard = import_react61.default.memo(
35867
35877
  data,
35868
35878
  specData,
35869
35879
  onAction,
35880
+ sendMessage,
35870
35881
  ...formCardProps
35871
35882
  }) => {
35872
35883
  const resolvedData = data || specData;
@@ -35874,6 +35885,9 @@ var SearchSpecCard = import_react61.default.memo(
35874
35885
  return providedFields || buildSearchSpecFields(resolvedData ?? {});
35875
35886
  }, [providedFields, resolvedData]);
35876
35887
  const handleProceed = () => {
35888
+ if (sendMessage) {
35889
+ sendMessage("Continue with search");
35890
+ }
35877
35891
  onAction?.({
35878
35892
  type: "search_spec_confirmation",
35879
35893
  value: "Continue with search",
@@ -35904,6 +35918,68 @@ SearchSpecCard.displayName = "SearchSpecCard";
35904
35918
 
35905
35919
  // src/molecules/creator-discovery/MCQCard/MCQCard.tsx
35906
35920
  var import_react62 = __toESM(require("react"), 1);
35921
+
35922
+ // src/molecules/creator-discovery/MCQCard/defaultFetchers.ts
35923
+ var STORAGE_KEY = (sessionId) => `mcq_selections_${sessionId}`;
35924
+ function getLocalSelections(sessionId) {
35925
+ try {
35926
+ const raw = localStorage.getItem(STORAGE_KEY(sessionId));
35927
+ return raw ? JSON.parse(raw) : {};
35928
+ } catch {
35929
+ return {};
35930
+ }
35931
+ }
35932
+ function setLocalSelection(sessionId, questionKey, value) {
35933
+ try {
35934
+ const existing = getLocalSelections(sessionId);
35935
+ existing[questionKey] = value;
35936
+ localStorage.setItem(STORAGE_KEY(sessionId), JSON.stringify(existing));
35937
+ } catch {
35938
+ }
35939
+ }
35940
+ async function defaultFetchSelections(sessionId) {
35941
+ const local = getLocalSelections(sessionId);
35942
+ if (Object.keys(local).length > 0) return local;
35943
+ try {
35944
+ const res = await fetch(
35945
+ `/api/agents-proxy/custom-agents/sessions/${sessionId}/mcq-selections/get`,
35946
+ {
35947
+ method: "POST",
35948
+ headers: { "Content-Type": "application/json" },
35949
+ body: "{}"
35950
+ }
35951
+ );
35952
+ if (!res.ok) return {};
35953
+ const data = await res.json();
35954
+ const selections = data.selections || {};
35955
+ if (Object.keys(selections).length > 0) {
35956
+ try {
35957
+ localStorage.setItem(STORAGE_KEY(sessionId), JSON.stringify(selections));
35958
+ } catch {
35959
+ }
35960
+ }
35961
+ return selections;
35962
+ } catch {
35963
+ return {};
35964
+ }
35965
+ }
35966
+ async function defaultPersistSelection(sessionId, questionKey, value) {
35967
+ setLocalSelection(sessionId, questionKey, value);
35968
+ try {
35969
+ await fetch(
35970
+ `/api/agents-proxy/custom-agents/sessions/${sessionId}/mcq-selections`,
35971
+ {
35972
+ method: "PATCH",
35973
+ headers: { "Content-Type": "application/json" },
35974
+ body: JSON.stringify({ question_key: questionKey, value })
35975
+ }
35976
+ );
35977
+ } catch (err) {
35978
+ console.warn("[MCQ persist failed]", err);
35979
+ }
35980
+ }
35981
+
35982
+ // src/molecules/creator-discovery/MCQCard/MCQCard.tsx
35907
35983
  var import_jsx_runtime109 = require("react/jsx-runtime");
35908
35984
  var MCQCard = import_react62.default.memo(
35909
35985
  ({
@@ -35916,22 +35992,37 @@ var MCQCard = import_react62.default.memo(
35916
35992
  isLatestMessage = true,
35917
35993
  isLoading = false,
35918
35994
  className,
35919
- // selectionStatus,
35920
35995
  onAction,
35921
35996
  disabled = false,
35922
- disableContinueInDiscovery
35923
- // optional prop
35997
+ disableContinueInDiscovery,
35998
+ // Self-contained props
35999
+ sessionId,
36000
+ sendMessage,
36001
+ fetchSelections = defaultFetchSelections,
36002
+ persistSelection = defaultPersistSelection
35924
36003
  }) => {
35925
- const [selectedOption, setSelectedOption] = import_react62.default.useState(
35926
- propsSelectedOption
35927
- );
36004
+ const [selectedOption, setSelectedOption] = import_react62.default.useState(propsSelectedOption);
35928
36005
  const [isProceeded, setIsProceeded] = import_react62.default.useState(false);
36006
+ const fetchedSessionRef = import_react62.default.useRef("");
35929
36007
  import_react62.default.useEffect(() => {
35930
36008
  if (propsSelectedOption) {
35931
36009
  setSelectedOption(propsSelectedOption);
35932
36010
  setIsProceeded(true);
35933
36011
  }
35934
36012
  }, [propsSelectedOption]);
36013
+ import_react62.default.useEffect(() => {
36014
+ if (!sessionId || fetchedSessionRef.current === sessionId) return;
36015
+ if (propsSelectedOption) return;
36016
+ fetchedSessionRef.current = sessionId;
36017
+ const questionKey = question || "unknown";
36018
+ fetchSelections(sessionId).then((selections) => {
36019
+ const stored = selections[questionKey];
36020
+ if (stored) {
36021
+ setSelectedOption(stored);
36022
+ setIsProceeded(true);
36023
+ }
36024
+ });
36025
+ }, [sessionId, question, propsSelectedOption, fetchSelections]);
35935
36026
  const isDiscovery = disableContinueInDiscovery !== void 0 ? disableContinueInDiscovery : typeof window !== "undefined" && window.location.pathname.includes("creator-discovery");
35936
36027
  const handleOptionClick = (key, e) => {
35937
36028
  e.preventDefault();
@@ -35941,17 +36032,25 @@ var MCQCard = import_react62.default.memo(
35941
36032
  onSelect?.(key);
35942
36033
  }
35943
36034
  };
35944
- const handleProceed = (e) => {
36035
+ const handleProceed = async (e) => {
35945
36036
  e.preventDefault();
35946
36037
  e.stopPropagation();
35947
36038
  if ((selectedOption || recommended) && !disabled && !isProceeded) {
35948
36039
  const result = selectedOption || recommended || "";
36040
+ const label = options && options[result] || result;
35949
36041
  setIsProceeded(true);
36042
+ if (sessionId) {
36043
+ const questionKey = question || "unknown";
36044
+ await persistSelection(sessionId, questionKey, result);
36045
+ }
36046
+ if (sendMessage) {
36047
+ sendMessage(`Selected: ${label}`);
36048
+ }
35950
36049
  onProceed?.(result);
35951
36050
  onAction?.({
35952
36051
  type: "mcq_selection",
35953
36052
  value: result,
35954
- label: options && options[result] || result
36053
+ label
35955
36054
  });
35956
36055
  }
35957
36056
  };
@@ -36956,7 +37055,7 @@ var CampaignConceptCard = import_react64.default.memo(
36956
37055
  CampaignConceptCard.displayName = "CampaignConceptCard";
36957
37056
 
36958
37057
  // src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
36959
- var import_react68 = require("react");
37058
+ var import_react72 = require("react");
36960
37059
 
36961
37060
  // src/molecules/creator-discovery/CreatorWidget/CreatorImageList.tsx
36962
37061
  var import_react65 = require("react");
@@ -37214,8 +37313,1679 @@ function CreatorCompactView({
37214
37313
  ] }) });
37215
37314
  }
37216
37315
 
37217
- // src/molecules/creator-discovery/CreatorWidget/useCreatorWidgetPolling.ts
37316
+ // src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
37317
+ var import_react70 = require("react");
37318
+ var import_react_dom2 = __toESM(require("react-dom"), 1);
37319
+ var import_framer_motion5 = require("framer-motion");
37320
+
37321
+ // src/molecules/creator-discovery/CreatorWidget/defaultFetchers.ts
37322
+ async function defaultFetchVersions(params) {
37323
+ const versionParam = params.version ? `&version=${params.version}` : "";
37324
+ const res = await fetch(
37325
+ `/api/get-creator-versions?sessionId=${params.sessionId}${versionParam}&validated=${params.validated}`
37326
+ );
37327
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
37328
+ return res.json();
37329
+ }
37330
+ async function defaultFetchStatus(params) {
37331
+ const res = await fetch(
37332
+ `/api/get-creator-detail-status?session_id=${params.sessionId}&version_no=${params.versionNo}`
37333
+ );
37334
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
37335
+ return res.json();
37336
+ }
37337
+ async function defaultFetchCreatorDetails(params) {
37338
+ const res = await fetch("/api/get-creator-details-by-id", {
37339
+ method: "POST",
37340
+ headers: { "Content-Type": "application/json" },
37341
+ body: JSON.stringify({
37342
+ creator_ids: params.creatorIds,
37343
+ session_id: params.sessionId,
37344
+ version_no: params.versionNo
37345
+ })
37346
+ });
37347
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
37348
+ return res.json();
37349
+ }
37350
+
37351
+ // src/molecules/creator-discovery/CreatorWidget/countries.ts
37352
+ var countries2 = [
37353
+ { code: "AF", name: "Afghanistan", flag: "\u{1F1E6}\u{1F1EB}" },
37354
+ { code: "AL", name: "Albania", flag: "\u{1F1E6}\u{1F1F1}" },
37355
+ { code: "DZ", name: "Algeria", flag: "\u{1F1E9}\u{1F1FF}" },
37356
+ { code: "AD", name: "Andorra", flag: "\u{1F1E6}\u{1F1E9}" },
37357
+ { code: "AO", name: "Angola", flag: "\u{1F1E6}\u{1F1F4}" },
37358
+ { code: "AG", name: "Antigua and Barbuda", flag: "\u{1F1E6}\u{1F1EC}" },
37359
+ { code: "AR", name: "Argentina", flag: "\u{1F1E6}\u{1F1F7}" },
37360
+ { code: "AM", name: "Armenia", flag: "\u{1F1E6}\u{1F1F2}" },
37361
+ { code: "AU", name: "Australia", flag: "\u{1F1E6}\u{1F1FA}" },
37362
+ { code: "AT", name: "Austria", flag: "\u{1F1E6}\u{1F1F9}" },
37363
+ { code: "AZ", name: "Azerbaijan", flag: "\u{1F1E6}\u{1F1FF}" },
37364
+ { code: "BS", name: "Bahamas", flag: "\u{1F1E7}\u{1F1F8}" },
37365
+ { code: "BH", name: "Bahrain", flag: "\u{1F1E7}\u{1F1ED}" },
37366
+ { code: "BD", name: "Bangladesh", flag: "\u{1F1E7}\u{1F1E9}" },
37367
+ { code: "BB", name: "Barbados", flag: "\u{1F1E7}\u{1F1E7}" },
37368
+ { code: "BY", name: "Belarus", flag: "\u{1F1E7}\u{1F1FE}" },
37369
+ { code: "BE", name: "Belgium", flag: "\u{1F1E7}\u{1F1EA}" },
37370
+ { code: "BZ", name: "Belize", flag: "\u{1F1E7}\u{1F1FF}" },
37371
+ { code: "BJ", name: "Benin", flag: "\u{1F1E7}\u{1F1EF}" },
37372
+ { code: "BT", name: "Bhutan", flag: "\u{1F1E7}\u{1F1F9}" },
37373
+ { code: "BO", name: "Bolivia", flag: "\u{1F1E7}\u{1F1F4}" },
37374
+ { code: "BA", name: "Bosnia and Herzegovina", flag: "\u{1F1E7}\u{1F1E6}" },
37375
+ { code: "BW", name: "Botswana", flag: "\u{1F1E7}\u{1F1FC}" },
37376
+ { code: "BR", name: "Brazil", flag: "\u{1F1E7}\u{1F1F7}" },
37377
+ { code: "BN", name: "Brunei", flag: "\u{1F1E7}\u{1F1F3}" },
37378
+ { code: "BG", name: "Bulgaria", flag: "\u{1F1E7}\u{1F1EC}" },
37379
+ { code: "BF", name: "Burkina Faso", flag: "\u{1F1E7}\u{1F1EB}" },
37380
+ { code: "BI", name: "Burundi", flag: "\u{1F1E7}\u{1F1EE}" },
37381
+ { code: "CV", name: "Cabo Verde", flag: "\u{1F1E8}\u{1F1FB}" },
37382
+ { code: "KH", name: "Cambodia", flag: "\u{1F1F0}\u{1F1ED}" },
37383
+ { code: "CM", name: "Cameroon", flag: "\u{1F1E8}\u{1F1F2}" },
37384
+ { code: "CA", name: "Canada", flag: "\u{1F1E8}\u{1F1E6}" },
37385
+ { code: "CF", name: "Central African Republic", flag: "\u{1F1E8}\u{1F1EB}" },
37386
+ { code: "TD", name: "Chad", flag: "\u{1F1F9}\u{1F1E9}" },
37387
+ { code: "CL", name: "Chile", flag: "\u{1F1E8}\u{1F1F1}" },
37388
+ { code: "CN", name: "China", flag: "\u{1F1E8}\u{1F1F3}" },
37389
+ { code: "CO", name: "Colombia", flag: "\u{1F1E8}\u{1F1F4}" },
37390
+ { code: "KM", name: "Comoros", flag: "\u{1F1F0}\u{1F1F2}" },
37391
+ { code: "CG", name: "Congo", flag: "\u{1F1E8}\u{1F1EC}" },
37392
+ { code: "CD", name: "Democratic Republic of the Congo", flag: "\u{1F1E8}\u{1F1E9}" },
37393
+ { code: "CR", name: "Costa Rica", flag: "\u{1F1E8}\u{1F1F7}" },
37394
+ { code: "HR", name: "Croatia", flag: "\u{1F1ED}\u{1F1F7}" },
37395
+ { code: "CU", name: "Cuba", flag: "\u{1F1E8}\u{1F1FA}" },
37396
+ { code: "CY", name: "Cyprus", flag: "\u{1F1E8}\u{1F1FE}" },
37397
+ { code: "CZ", name: "Czech Republic", flag: "\u{1F1E8}\u{1F1FF}" },
37398
+ { code: "CI", name: "Ivory Coast", flag: "\u{1F1E8}\u{1F1EE}" },
37399
+ { code: "DK", name: "Denmark", flag: "\u{1F1E9}\u{1F1F0}" },
37400
+ { code: "DJ", name: "Djibouti", flag: "\u{1F1E9}\u{1F1EF}" },
37401
+ { code: "DM", name: "Dominica", flag: "\u{1F1E9}\u{1F1F2}" },
37402
+ { code: "DO", name: "Dominican Republic", flag: "\u{1F1E9}\u{1F1F4}" },
37403
+ { code: "EC", name: "Ecuador", flag: "\u{1F1EA}\u{1F1E8}" },
37404
+ { code: "EG", name: "Egypt", flag: "\u{1F1EA}\u{1F1EC}" },
37405
+ { code: "SV", name: "El Salvador", flag: "\u{1F1F8}\u{1F1FB}" },
37406
+ { code: "GQ", name: "Equatorial Guinea", flag: "\u{1F1EC}\u{1F1F6}" },
37407
+ { code: "ER", name: "Eritrea", flag: "\u{1F1EA}\u{1F1F7}" },
37408
+ { code: "EE", name: "Estonia", flag: "\u{1F1EA}\u{1F1EA}" },
37409
+ { code: "SZ", name: "Eswatini", flag: "\u{1F1F8}\u{1F1FF}" },
37410
+ { code: "ET", name: "Ethiopia", flag: "\u{1F1EA}\u{1F1F9}" },
37411
+ { code: "FJ", name: "Fiji", flag: "\u{1F1EB}\u{1F1EF}" },
37412
+ { code: "FI", name: "Finland", flag: "\u{1F1EB}\u{1F1EE}" },
37413
+ { code: "FR", name: "France", flag: "\u{1F1EB}\u{1F1F7}" },
37414
+ { code: "GA", name: "Gabon", flag: "\u{1F1EC}\u{1F1E6}" },
37415
+ { code: "GM", name: "Gambia", flag: "\u{1F1EC}\u{1F1F2}" },
37416
+ { code: "GE", name: "Georgia", flag: "\u{1F1EC}\u{1F1EA}" },
37417
+ { code: "DE", name: "Germany", flag: "\u{1F1E9}\u{1F1EA}" },
37418
+ { code: "GH", name: "Ghana", flag: "\u{1F1EC}\u{1F1ED}" },
37419
+ { code: "GR", name: "Greece", flag: "\u{1F1EC}\u{1F1F7}" },
37420
+ { code: "GD", name: "Grenada", flag: "\u{1F1EC}\u{1F1E9}" },
37421
+ { code: "GT", name: "Guatemala", flag: "\u{1F1EC}\u{1F1F9}" },
37422
+ { code: "GN", name: "Guinea", flag: "\u{1F1EC}\u{1F1F3}" },
37423
+ { code: "GW", name: "Guinea-Bissau", flag: "\u{1F1EC}\u{1F1FC}" },
37424
+ { code: "GY", name: "Guyana", flag: "\u{1F1EC}\u{1F1FE}" },
37425
+ { code: "HT", name: "Haiti", flag: "\u{1F1ED}\u{1F1F9}" },
37426
+ { code: "HN", name: "Honduras", flag: "\u{1F1ED}\u{1F1F3}" },
37427
+ { code: "HU", name: "Hungary", flag: "\u{1F1ED}\u{1F1FA}" },
37428
+ { code: "HK", name: "Hong Kong", flag: "\u{1F1ED}\u{1F1F0}" },
37429
+ { code: "IS", name: "Iceland", flag: "\u{1F1EE}\u{1F1F8}" },
37430
+ { code: "IN", name: "India", flag: "\u{1F1EE}\u{1F1F3}" },
37431
+ { code: "ID", name: "Indonesia", flag: "\u{1F1EE}\u{1F1E9}" },
37432
+ { code: "IR", name: "Iran", flag: "\u{1F1EE}\u{1F1F7}" },
37433
+ { code: "IQ", name: "Iraq", flag: "\u{1F1EE}\u{1F1F6}" },
37434
+ { code: "IE", name: "Ireland", flag: "\u{1F1EE}\u{1F1EA}" },
37435
+ { code: "IL", name: "Israel", flag: "\u{1F1EE}\u{1F1F1}" },
37436
+ { code: "IT", name: "Italy", flag: "\u{1F1EE}\u{1F1F9}" },
37437
+ { code: "JM", name: "Jamaica", flag: "\u{1F1EF}\u{1F1F2}" },
37438
+ { code: "JP", name: "Japan", flag: "\u{1F1EF}\u{1F1F5}" },
37439
+ { code: "JO", name: "Jordan", flag: "\u{1F1EF}\u{1F1F4}" },
37440
+ { code: "KZ", name: "Kazakhstan", flag: "\u{1F1F0}\u{1F1FF}" },
37441
+ { code: "KE", name: "Kenya", flag: "\u{1F1F0}\u{1F1EA}" },
37442
+ { code: "KI", name: "Kiribati", flag: "\u{1F1F0}\u{1F1EE}" },
37443
+ { code: "KP", name: "North Korea", flag: "\u{1F1F0}\u{1F1F5}" },
37444
+ { code: "KR", name: "South Korea", flag: "\u{1F1F0}\u{1F1F7}" },
37445
+ { code: "KW", name: "Kuwait", flag: "\u{1F1F0}\u{1F1FC}" },
37446
+ { code: "KG", name: "Kyrgyzstan", flag: "\u{1F1F0}\u{1F1EC}" },
37447
+ { code: "LA", name: "Laos", flag: "\u{1F1F1}\u{1F1E6}" },
37448
+ { code: "LV", name: "Latvia", flag: "\u{1F1F1}\u{1F1FB}" },
37449
+ { code: "LB", name: "Lebanon", flag: "\u{1F1F1}\u{1F1E7}" },
37450
+ { code: "LS", name: "Lesotho", flag: "\u{1F1F1}\u{1F1F8}" },
37451
+ { code: "LR", name: "Liberia", flag: "\u{1F1F1}\u{1F1F7}" },
37452
+ { code: "LY", name: "Libya", flag: "\u{1F1F1}\u{1F1FE}" },
37453
+ { code: "LI", name: "Liechtenstein", flag: "\u{1F1F1}\u{1F1EE}" },
37454
+ { code: "LT", name: "Lithuania", flag: "\u{1F1F1}\u{1F1F9}" },
37455
+ { code: "LU", name: "Luxembourg", flag: "\u{1F1F1}\u{1F1FA}" },
37456
+ { code: "MG", name: "Madagascar", flag: "\u{1F1F2}\u{1F1EC}" },
37457
+ { code: "MW", name: "Malawi", flag: "\u{1F1F2}\u{1F1FC}" },
37458
+ { code: "MY", name: "Malaysia", flag: "\u{1F1F2}\u{1F1FE}" },
37459
+ { code: "MV", name: "Maldives", flag: "\u{1F1F2}\u{1F1FB}" },
37460
+ { code: "ML", name: "Mali", flag: "\u{1F1F2}\u{1F1F1}" },
37461
+ { code: "MT", name: "Malta", flag: "\u{1F1F2}\u{1F1F9}" },
37462
+ { code: "MH", name: "Marshall Islands", flag: "\u{1F1F2}\u{1F1ED}" },
37463
+ { code: "MR", name: "Mauritania", flag: "\u{1F1F2}\u{1F1F7}" },
37464
+ { code: "MU", name: "Mauritius", flag: "\u{1F1F2}\u{1F1FA}" },
37465
+ { code: "MX", name: "Mexico", flag: "\u{1F1F2}\u{1F1FD}" },
37466
+ { code: "FM", name: "Micronesia", flag: "\u{1F1EB}\u{1F1F2}" },
37467
+ { code: "MD", name: "Moldova", flag: "\u{1F1F2}\u{1F1E9}" },
37468
+ { code: "MC", name: "Monaco", flag: "\u{1F1F2}\u{1F1E8}" },
37469
+ { code: "MN", name: "Mongolia", flag: "\u{1F1F2}\u{1F1F3}" },
37470
+ { code: "ME", name: "Montenegro", flag: "\u{1F1F2}\u{1F1EA}" },
37471
+ { code: "MA", name: "Morocco", flag: "\u{1F1F2}\u{1F1E6}" },
37472
+ { code: "MZ", name: "Mozambique", flag: "\u{1F1F2}\u{1F1FF}" },
37473
+ { code: "MM", name: "Myanmar", flag: "\u{1F1F2}\u{1F1F2}" },
37474
+ { code: "NA", name: "Namibia", flag: "\u{1F1F3}\u{1F1E6}" },
37475
+ { code: "NR", name: "Nauru", flag: "\u{1F1F3}\u{1F1F7}" },
37476
+ { code: "NP", name: "Nepal", flag: "\u{1F1F3}\u{1F1F5}" },
37477
+ { code: "NL", name: "Netherlands", flag: "\u{1F1F3}\u{1F1F1}" },
37478
+ { code: "NZ", name: "New Zealand", flag: "\u{1F1F3}\u{1F1FF}" },
37479
+ { code: "NI", name: "Nicaragua", flag: "\u{1F1F3}\u{1F1EE}" },
37480
+ { code: "NE", name: "Niger", flag: "\u{1F1F3}\u{1F1EA}" },
37481
+ { code: "NG", name: "Nigeria", flag: "\u{1F1F3}\u{1F1EC}" },
37482
+ { code: "MK", name: "North Macedonia", flag: "\u{1F1F2}\u{1F1F0}" },
37483
+ { code: "NO", name: "Norway", flag: "\u{1F1F3}\u{1F1F4}" },
37484
+ { code: "OM", name: "Oman", flag: "\u{1F1F4}\u{1F1F2}" },
37485
+ { code: "PK", name: "Pakistan", flag: "\u{1F1F5}\u{1F1F0}" },
37486
+ { code: "PW", name: "Palau", flag: "\u{1F1F5}\u{1F1FC}" },
37487
+ { code: "PS", name: "Palestine", flag: "\u{1F1F5}\u{1F1F8}" },
37488
+ { code: "PA", name: "Panama", flag: "\u{1F1F5}\u{1F1E6}" },
37489
+ { code: "PG", name: "Papua New Guinea", flag: "\u{1F1F5}\u{1F1EC}" },
37490
+ { code: "PY", name: "Paraguay", flag: "\u{1F1F5}\u{1F1FE}" },
37491
+ { code: "PE", name: "Peru", flag: "\u{1F1F5}\u{1F1EA}" },
37492
+ { code: "PH", name: "Philippines", flag: "\u{1F1F5}\u{1F1ED}" },
37493
+ { code: "PL", name: "Poland", flag: "\u{1F1F5}\u{1F1F1}" },
37494
+ { code: "PT", name: "Portugal", flag: "\u{1F1F5}\u{1F1F9}" },
37495
+ { code: "QA", name: "Qatar", flag: "\u{1F1F6}\u{1F1E6}" },
37496
+ { code: "RO", name: "Romania", flag: "\u{1F1F7}\u{1F1F4}" },
37497
+ { code: "RU", name: "Russia", flag: "\u{1F1F7}\u{1F1FA}" },
37498
+ { code: "RW", name: "Rwanda", flag: "\u{1F1F7}\u{1F1FC}" },
37499
+ { code: "KN", name: "Saint Kitts and Nevis", flag: "\u{1F1F0}\u{1F1F3}" },
37500
+ { code: "LC", name: "Saint Lucia", flag: "\u{1F1F1}\u{1F1E8}" },
37501
+ { code: "VC", name: "Saint Vincent and the Grenadines", flag: "\u{1F1FB}\u{1F1E8}" },
37502
+ { code: "WS", name: "Samoa", flag: "\u{1F1FC}\u{1F1F8}" },
37503
+ { code: "SM", name: "San Marino", flag: "\u{1F1F8}\u{1F1F2}" },
37504
+ { code: "ST", name: "Sao Tome and Principe", flag: "\u{1F1F8}\u{1F1F9}" },
37505
+ { code: "SA", name: "Saudi Arabia", flag: "\u{1F1F8}\u{1F1E6}" },
37506
+ { code: "SN", name: "Senegal", flag: "\u{1F1F8}\u{1F1F3}" },
37507
+ { code: "RS", name: "Serbia", flag: "\u{1F1F7}\u{1F1F8}" },
37508
+ { code: "SC", name: "Seychelles", flag: "\u{1F1F8}\u{1F1E8}" },
37509
+ { code: "SL", name: "Sierra Leone", flag: "\u{1F1F8}\u{1F1F1}" },
37510
+ { code: "SG", name: "Singapore", flag: "\u{1F1F8}\u{1F1EC}" },
37511
+ { code: "SK", name: "Slovakia", flag: "\u{1F1F8}\u{1F1F0}" },
37512
+ { code: "SI", name: "Slovenia", flag: "\u{1F1F8}\u{1F1EE}" },
37513
+ { code: "SB", name: "Solomon Islands", flag: "\u{1F1F8}\u{1F1E7}" },
37514
+ { code: "SO", name: "Somalia", flag: "\u{1F1F8}\u{1F1F4}" },
37515
+ { code: "ZA", name: "South Africa", flag: "\u{1F1FF}\u{1F1E6}" },
37516
+ { code: "SS", name: "South Sudan", flag: "\u{1F1F8}\u{1F1F8}" },
37517
+ { code: "ES", name: "Spain", flag: "\u{1F1EA}\u{1F1F8}" },
37518
+ { code: "LK", name: "Sri Lanka", flag: "\u{1F1F1}\u{1F1F0}" },
37519
+ { code: "SD", name: "Sudan", flag: "\u{1F1F8}\u{1F1E9}" },
37520
+ { code: "SR", name: "Suriname", flag: "\u{1F1F8}\u{1F1F7}" },
37521
+ { code: "SE", name: "Sweden", flag: "\u{1F1F8}\u{1F1EA}" },
37522
+ { code: "CH", name: "Switzerland", flag: "\u{1F1E8}\u{1F1ED}" },
37523
+ { code: "SY", name: "Syria", flag: "\u{1F1F8}\u{1F1FE}" },
37524
+ { code: "TW", name: "Taiwan", flag: "\u{1F1F9}\u{1F1FC}" },
37525
+ { code: "TJ", name: "Tajikistan", flag: "\u{1F1F9}\u{1F1EF}" },
37526
+ { code: "TZ", name: "Tanzania", flag: "\u{1F1F9}\u{1F1FF}" },
37527
+ { code: "TH", name: "Thailand", flag: "\u{1F1F9}\u{1F1ED}" },
37528
+ { code: "TL", name: "Timor-Leste", flag: "\u{1F1F9}\u{1F1F1}" },
37529
+ { code: "TG", name: "Togo", flag: "\u{1F1F9}\u{1F1EC}" },
37530
+ { code: "TO", name: "Tonga", flag: "\u{1F1F9}\u{1F1F4}" },
37531
+ { code: "TT", name: "Trinidad and Tobago", flag: "\u{1F1F9}\u{1F1F9}" },
37532
+ { code: "TN", name: "Tunisia", flag: "\u{1F1F9}\u{1F1F3}" },
37533
+ { code: "TR", name: "Turkey", flag: "\u{1F1F9}\u{1F1F7}" },
37534
+ { code: "TM", name: "Turkmenistan", flag: "\u{1F1F9}\u{1F1F2}" },
37535
+ { code: "TV", name: "Tuvalu", flag: "\u{1F1F9}\u{1F1FB}" },
37536
+ { code: "UG", name: "Uganda", flag: "\u{1F1FA}\u{1F1EC}" },
37537
+ { code: "UA", name: "Ukraine", flag: "\u{1F1FA}\u{1F1E6}" },
37538
+ { code: "AE", name: "United Arab Emirates", flag: "\u{1F1E6}\u{1F1EA}" },
37539
+ { code: "GB", name: "United Kingdom", flag: "\u{1F1EC}\u{1F1E7}" },
37540
+ { code: "US", name: "United States", flag: "\u{1F1FA}\u{1F1F8}" },
37541
+ { code: "UY", name: "Uruguay", flag: "\u{1F1FA}\u{1F1FE}" },
37542
+ { code: "UZ", name: "Uzbekistan", flag: "\u{1F1FA}\u{1F1FF}" },
37543
+ { code: "VU", name: "Vanuatu", flag: "\u{1F1FB}\u{1F1FA}" },
37544
+ { code: "VA", name: "Vatican City", flag: "\u{1F1FB}\u{1F1E6}" },
37545
+ { code: "VE", name: "Venezuela", flag: "\u{1F1FB}\u{1F1EA}" },
37546
+ { code: "VN", name: "Vietnam", flag: "\u{1F1FB}\u{1F1F3}" },
37547
+ { code: "YE", name: "Yemen", flag: "\u{1F1FE}\u{1F1EA}" },
37548
+ { code: "ZM", name: "Zambia", flag: "\u{1F1FF}\u{1F1F2}" },
37549
+ { code: "ZW", name: "Zimbabwe", flag: "\u{1F1FF}\u{1F1FC}" }
37550
+ ];
37551
+ var codeToMeta = Object.fromEntries(countries2.map((c) => [c.code, { name: c.name, flag: c.flag }]));
37552
+ var nameToCode = Object.fromEntries(countries2.map((c) => [c.name, c.code]));
37553
+ var normalizeToIso2 = (input) => {
37554
+ if (!input) return "US";
37555
+ const trimmed = String(input).trim();
37556
+ const upper = trimmed.toUpperCase();
37557
+ if (upper.length === 2 && codeToMeta[upper]) return upper;
37558
+ const fromName = nameToCode[trimmed];
37559
+ if (fromName) return fromName;
37560
+ return "US";
37561
+ };
37562
+
37563
+ // src/molecules/creator-discovery/CreatorWidget/EngagedAudienceDemographics.tsx
37564
+ var import_jsx_runtime126 = require("react/jsx-runtime");
37565
+ function EngagedAudienceDemographics({
37566
+ audienceDemographics
37567
+ }) {
37568
+ if (!audienceDemographics) return null;
37569
+ const hasCities = audienceDemographics?.cities && Object.keys(audienceDemographics.cities).length > 0;
37570
+ const hasCountries = audienceDemographics?.countries && Object.keys(audienceDemographics.countries).length > 0;
37571
+ const hasAges = audienceDemographics?.ages && Object.keys(audienceDemographics.ages).length > 0;
37572
+ const hasGenders = audienceDemographics?.genders && Object.keys(audienceDemographics.genders).length > 0;
37573
+ if (!hasCities && !hasCountries && !hasAges && !hasGenders) {
37574
+ return null;
37575
+ }
37576
+ const columns = [];
37577
+ if (hasCities) columns.push("1fr");
37578
+ if (hasCountries) columns.push("1fr");
37579
+ if (hasAges) columns.push("1fr");
37580
+ if (hasGenders) columns.push("0.4fr");
37581
+ const gridTemplate = columns.join(" ");
37582
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-4", children: [
37583
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "text-purpleText text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "ENGAGED AUDIENCE" }) }),
37584
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
37585
+ "div",
37586
+ {
37587
+ className: "flex flex-col sm:col-span-3 sm:grid gap-6",
37588
+ style: { gridTemplateColumns: gridTemplate },
37589
+ children: [
37590
+ hasCities && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { children: [
37591
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("h4", { className: "text-xs text-gray700 mb-3", children: "Cities" }),
37592
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.cities || {}).map(
37593
+ ([code, value]) => /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
37594
+ "div",
37595
+ {
37596
+ className: "flex items-center gap-3 text-sm text-gray700",
37597
+ children: [
37598
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "w-[90px]", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex gap-1 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { children: code.split(",")[0] }) }) }),
37599
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
37600
+ "div",
37601
+ {
37602
+ className: "h-[6px] bg-purple100 rounded-full",
37603
+ style: { width: `${value}%` }
37604
+ }
37605
+ ) }),
37606
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("span", { className: "w-10 text-right font-medium", children: [
37607
+ value,
37608
+ "%"
37609
+ ] })
37610
+ ]
37611
+ },
37612
+ code
37613
+ )
37614
+ ) })
37615
+ ] }),
37616
+ hasCountries && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { children: [
37617
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("h4", { className: "text-xs text-gray700 mb-3", children: "Countries" }),
37618
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.countries || {}).map(
37619
+ ([code, value]) => {
37620
+ const iso2 = normalizeToIso2(code);
37621
+ const meta = codeToMeta[iso2];
37622
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
37623
+ "div",
37624
+ {
37625
+ className: "flex items-center gap-3 text-sm text-gray700",
37626
+ children: [
37627
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "w-10", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex gap-1 items-center", children: [
37628
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "text-base", children: meta?.flag }),
37629
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { children: code })
37630
+ ] }) }),
37631
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
37632
+ "div",
37633
+ {
37634
+ className: "h-[6px] bg-purple100 rounded-full",
37635
+ style: { width: `${value}%` }
37636
+ }
37637
+ ) }),
37638
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("span", { className: "w-10 text-right font-medium", children: [
37639
+ value,
37640
+ "%"
37641
+ ] })
37642
+ ]
37643
+ },
37644
+ code
37645
+ );
37646
+ }
37647
+ ) })
37648
+ ] }),
37649
+ hasAges && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { children: [
37650
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("h4", { className: "text-xs text-gray700 mb-3", children: "Ages" }),
37651
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.ages || {}).map(
37652
+ ([ageRange, value]) => /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
37653
+ "div",
37654
+ {
37655
+ className: "flex items-center gap-3 text-sm text-gray700",
37656
+ children: [
37657
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "w-12", children: ageRange }),
37658
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
37659
+ "div",
37660
+ {
37661
+ className: "h-[6px] bg-purple100 rounded-full",
37662
+ style: { width: `${value}%` }
37663
+ }
37664
+ ) }),
37665
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("span", { className: "w-10 text-right font-medium", children: [
37666
+ value,
37667
+ "%"
37668
+ ] })
37669
+ ]
37670
+ },
37671
+ ageRange
37672
+ )
37673
+ ) })
37674
+ ] }),
37675
+ hasGenders && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex flex-col justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex sm:flex-col gap-3", children: Object.entries(audienceDemographics?.genders || {}).map(
37676
+ ([gender, value]) => /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
37677
+ "div",
37678
+ {
37679
+ className: "flex flex-col justify-center text-sm",
37680
+ children: [
37681
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
37682
+ gender === "female" ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Venus, { className: "text-red-500", strokeWidth: 3 }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Mars, { className: "text-blue-500", strokeWidth: 3 }),
37683
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("span", { className: "capitalize text-gray800 text-xl", children: [
37684
+ value,
37685
+ "%"
37686
+ ] })
37687
+ ] }),
37688
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "text-lg text-gray700", children: gender.charAt(0).toUpperCase() + gender.slice(1) })
37689
+ ]
37690
+ },
37691
+ gender
37692
+ )
37693
+ ) }) })
37694
+ ]
37695
+ }
37696
+ )
37697
+ ] });
37698
+ }
37699
+
37700
+ // src/molecules/creator-discovery/CreatorWidget/PlatformIcons.tsx
37701
+ var import_jsx_runtime127 = require("react/jsx-runtime");
37702
+ function InstagramIcon({ className }) {
37703
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
37704
+ "svg",
37705
+ {
37706
+ className,
37707
+ viewBox: "0 0 24 24",
37708
+ fill: "currentColor",
37709
+ xmlns: "http://www.w3.org/2000/svg",
37710
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("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" })
37711
+ }
37712
+ );
37713
+ }
37714
+ function YouTubeIcon({ className }) {
37715
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
37716
+ "svg",
37717
+ {
37718
+ className,
37719
+ viewBox: "0 0 24 24",
37720
+ fill: "currentColor",
37721
+ xmlns: "http://www.w3.org/2000/svg",
37722
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("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" })
37723
+ }
37724
+ );
37725
+ }
37726
+ function TikTokIcon3({ className }) {
37727
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
37728
+ "svg",
37729
+ {
37730
+ className,
37731
+ viewBox: "0 0 24 24",
37732
+ fill: "currentColor",
37733
+ xmlns: "http://www.w3.org/2000/svg",
37734
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("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" })
37735
+ }
37736
+ );
37737
+ }
37738
+ function getPlatformIcon(platform) {
37739
+ const key = platform.toLowerCase().replace(/metrics$/i, "");
37740
+ if (key === "instagram") return InstagramIcon;
37741
+ if (key === "tiktok") return TikTokIcon3;
37742
+ if (key === "youtube") return YouTubeIcon;
37743
+ return InstagramIcon;
37744
+ }
37745
+ function getPlatformName(platform) {
37746
+ const key = platform.toLowerCase().replace(/metrics$/i, "");
37747
+ if (key === "instagram") return "Instagram";
37748
+ if (key === "tiktok") return "TikTok";
37749
+ if (key === "youtube") return "YouTube";
37750
+ return platform;
37751
+ }
37752
+ function getPlatformBgColor(platform) {
37753
+ const key = platform.toLowerCase().replace(/metrics$/i, "");
37754
+ if (key === "instagram") return "#C4338680";
37755
+ if (key === "tiktok") return "#EBEBEB40";
37756
+ if (key === "youtube") return "#ff000080";
37757
+ return "#ccc";
37758
+ }
37759
+ function getPlatformIconColor(platform) {
37760
+ const key = platform.toLowerCase().replace(/metrics$/i, "");
37761
+ if (key === "instagram") return "text-[#7b1551]";
37762
+ if (key === "tiktok") return "text-pink-500";
37763
+ if (key === "youtube") return "text-red-600";
37764
+ return "text-primary";
37765
+ }
37766
+
37767
+ // src/molecules/creator-discovery/CreatorWidget/PostCard.tsx
37218
37768
  var import_react67 = require("react");
37769
+ var import_jsx_runtime128 = require("react/jsx-runtime");
37770
+ var formatFollowerCount = (count) => {
37771
+ if (count >= 1e6) {
37772
+ const millions = count / 1e6;
37773
+ return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
37774
+ } else if (count >= 1e4) {
37775
+ return `${Math.floor(count / 1e3)}k`;
37776
+ } else if (count >= 1e3) {
37777
+ return `${(count / 1e3).toFixed(1)}k`;
37778
+ }
37779
+ return Math.floor(count).toString();
37780
+ };
37781
+ function PostCard({ post, platformUsername }) {
37782
+ const [expanded, setExpanded] = (0, import_react67.useState)(false);
37783
+ const [errored, setErrored] = (0, import_react67.useState)(false);
37784
+ const thumbnail = post.thumbnail_url || post.thumbnail || post.image || "";
37785
+ const likes = post.engagement?.likes ?? post.likes ?? null;
37786
+ const comments = post.engagement?.comments ?? post.comments ?? null;
37787
+ const views = post.engagement?.views ?? post.engagement?.plays ?? post.views ?? post.plays ?? null;
37788
+ const impressions = post.impressions ?? null;
37789
+ const reach = post.reach ?? null;
37790
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
37791
+ "div",
37792
+ {
37793
+ className: "rounded-xl overflow-hidden border border-gray500 bg-transparent shadow-sm cursor-pointer",
37794
+ onClick: (e) => {
37795
+ e.stopPropagation();
37796
+ window.open(post.url, "_blank", "noopener,noreferrer");
37797
+ },
37798
+ children: [
37799
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "w-full aspect-square relative bg-gray25", children: thumbnail && !errored ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
37800
+ "img",
37801
+ {
37802
+ src: thumbnail,
37803
+ alt: post.title || "post",
37804
+ className: "w-full h-full object-cover",
37805
+ onError: () => setErrored(true)
37806
+ }
37807
+ ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "w-full h-full flex items-center justify-center text-gray500 text-sm", children: "No preview" }) }),
37808
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "p-3", children: [
37809
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-4 text-sm text-gray600 mb-2", children: [
37810
+ likes !== null && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-1", children: [
37811
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { children: formatFollowerCount(likes) }),
37812
+ " ",
37813
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Heart, { size: 14 })
37814
+ ] }),
37815
+ comments !== null && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-1", children: [
37816
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { children: formatFollowerCount(comments) }),
37817
+ " ",
37818
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(MessageCircle, { size: 14 })
37819
+ ] }),
37820
+ views !== null && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-1", children: [
37821
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { children: formatFollowerCount(views) }),
37822
+ " ",
37823
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Eye, { size: 14 })
37824
+ ] })
37825
+ ] }),
37826
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex gap-4 text-sm text-gray800 mb-2", children: [
37827
+ impressions !== null && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { children: [
37828
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "text-gray500 font-bold", children: formatFollowerCount(impressions) }),
37829
+ " ",
37830
+ "est.Impressions"
37831
+ ] }),
37832
+ reach !== null && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { children: [
37833
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "text-gray500 font-bold", children: formatFollowerCount(reach) }),
37834
+ " ",
37835
+ "est.Reach"
37836
+ ] })
37837
+ ] }),
37838
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "text-sm mb-1", children: [
37839
+ platformUsername && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "text-md font-semibold text-gray500", children: [
37840
+ "@",
37841
+ platformUsername
37842
+ ] }),
37843
+ ["instagram", "tiktok"].includes(
37844
+ post.platform?.toLowerCase() || ""
37845
+ ) ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_jsx_runtime128.Fragment, { children: (() => {
37846
+ const text = post.title || post.description || "";
37847
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
37848
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
37849
+ "div",
37850
+ {
37851
+ className: `text-gray900 font-light mt-2 text-sm ${!expanded ? "line-clamp-3" : ""}`,
37852
+ children: text
37853
+ }
37854
+ ),
37855
+ text.length > 100 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
37856
+ "button",
37857
+ {
37858
+ onClick: (e) => {
37859
+ e.stopPropagation();
37860
+ setExpanded((s) => !s);
37861
+ },
37862
+ className: "text-xs text-purpleText mt-2",
37863
+ children: expanded ? "Show less" : "Show more"
37864
+ }
37865
+ )
37866
+ ] });
37867
+ })() }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
37868
+ post.title && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "text-gray900 font-light", children: post.title }),
37869
+ post.description && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
37870
+ "div",
37871
+ {
37872
+ className: "mt-2 text-sm text-gray900 overflow-hidden font-light",
37873
+ style: { maxHeight: expanded ? void 0 : 200 },
37874
+ children: post.description
37875
+ }
37876
+ ),
37877
+ post.description && post.description.length > 200 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
37878
+ "button",
37879
+ {
37880
+ onClick: (e) => {
37881
+ e.stopPropagation();
37882
+ setExpanded((s) => !s);
37883
+ },
37884
+ className: "text-xs text-purpleText mt-2",
37885
+ children: expanded ? "Show less" : "Show more"
37886
+ }
37887
+ )
37888
+ ] })
37889
+ ] })
37890
+ ] })
37891
+ ]
37892
+ }
37893
+ );
37894
+ }
37895
+
37896
+ // src/molecules/creator-discovery/CreatorWidget/PlatformPostsSection.tsx
37897
+ var import_jsx_runtime129 = require("react/jsx-runtime");
37898
+ var formatFollowerCount2 = (count) => {
37899
+ if (count >= 1e6) {
37900
+ const millions = count / 1e6;
37901
+ return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
37902
+ } else if (count >= 1e4) {
37903
+ return `${Math.floor(count / 1e3)}k`;
37904
+ } else if (count >= 1e3) {
37905
+ return `${(count / 1e3).toFixed(1)}k`;
37906
+ }
37907
+ return Math.floor(count).toString();
37908
+ };
37909
+ function filterPostsByPlatform(posts, platform) {
37910
+ const postsArr = (posts ?? []).slice();
37911
+ const shortKey = platform.replace(/Metrics$/i, "").toLowerCase();
37912
+ return postsArr.filter((p) => (p.platform || "").toLowerCase() === shortKey).slice(0, 3);
37913
+ }
37914
+ function PlatformMetricsBanner({
37915
+ platform,
37916
+ metrics
37917
+ }) {
37918
+ const platformName = getPlatformName(platform);
37919
+ const bgColor = getPlatformBgColor(platform);
37920
+ const IconComponent = getPlatformIcon(platform);
37921
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
37922
+ "div",
37923
+ {
37924
+ className: "\n flex overflow-x-auto gap-6 rounded-l-xl py-4 px-4 shadow-sm\n md:grid md:grid-cols-[0.5fr_1fr_1fr_1fr_1fr] md:items-center md:gap-0 md:px-0 md:ml-8\n ",
37925
+ style: { backgroundColor: bgColor },
37926
+ children: [
37927
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-center min-w-[90px] md:min-w-0", children: [
37928
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(IconComponent, { className: "w-5 h-5 md:w-6 md:h-6 text-gray900" }),
37929
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-lg md:text-xl font-bold text-gray900", children: platform === "youtubeMetrics" ? formatFollowerCount2(metrics.subscribers || 0) : formatFollowerCount2(metrics.followers || 0) })
37930
+ ] }),
37931
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-start min-w-[130px] md:min-w-0", children: [
37932
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
37933
+ "span",
37934
+ {
37935
+ className: "text-base md:text-lg dark:text-white max-w-[90%] truncate cursor-default",
37936
+ title: `@${platform === "youtubeMetrics" ? metrics.channelName : metrics.username}`,
37937
+ children: [
37938
+ "@",
37939
+ platform === "youtubeMetrics" ? metrics.channelName : metrics.username
37940
+ ]
37941
+ }
37942
+ ),
37943
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-xs md:text-sm text-gray900 opacity-90", children: platformName })
37944
+ ] }),
37945
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
37946
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("span", { className: "text-sm md:text-md font-semibold text-gray900", children: [
37947
+ (metrics.engagementRate * 100).toFixed(2),
37948
+ "%"
37949
+ ] }),
37950
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-xs text-gray900 opacity-80", children: "Engagement Rate" })
37951
+ ] }),
37952
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
37953
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgLikes)?.toLocaleString() }),
37954
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Likes" })
37955
+ ] }),
37956
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
37957
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgComments)?.toLocaleString() }),
37958
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Comments" })
37959
+ ] })
37960
+ ]
37961
+ }
37962
+ );
37963
+ }
37964
+ function PlatformPostsSection({
37965
+ platformMetrics,
37966
+ posts = []
37967
+ }) {
37968
+ if (!platformMetrics) return null;
37969
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "flex flex-col gap-8", children: Object.entries(platformMetrics || {}).map(
37970
+ ([platform, metrics]) => {
37971
+ if (!metrics) return null;
37972
+ if (metrics.followers === 0 && metrics.subscribers === 0)
37973
+ return null;
37974
+ const platformPosts = filterPostsByPlatform(posts, platform);
37975
+ const platformUsername = metrics.username ?? metrics.channelName ?? "";
37976
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "w-full flex flex-col gap-8", children: [
37977
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(PlatformMetricsBanner, { platform, metrics }),
37978
+ platformPosts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "pr-6 sm:ml-8 sm:pr-7", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: platformPosts.map((post, idx) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
37979
+ PostCard,
37980
+ {
37981
+ post,
37982
+ platformUsername
37983
+ },
37984
+ post.post_id ?? post.url ?? idx
37985
+ )) }) })
37986
+ ] }, platform);
37987
+ }
37988
+ ) }) });
37989
+ }
37990
+
37991
+ // src/molecules/creator-discovery/CreatorWidget/BrandCollaborationsList.tsx
37992
+ var import_react68 = require("react");
37993
+ var import_react_dom = __toESM(require("react-dom"), 1);
37994
+ var import_framer_motion3 = require("framer-motion");
37995
+ var import_jsx_runtime130 = require("react/jsx-runtime");
37996
+ var getSentimentRank = (score) => {
37997
+ if (score >= 80) {
37998
+ return {
37999
+ rank: "STRONG FIT",
38000
+ bgColor: "bg-greenBackground",
38001
+ textColor: "text-greenText",
38002
+ scoreColor: "text-[#499C54]"
38003
+ };
38004
+ } else if (score >= 50) {
38005
+ return {
38006
+ rank: "MODERATE FIT",
38007
+ bgColor: "bg-orangeBackground",
38008
+ textColor: "text-orangeText",
38009
+ scoreColor: "text-[#B3512F]"
38010
+ };
38011
+ } else if (score >= 0) {
38012
+ return {
38013
+ rank: "POOR FIT",
38014
+ bgColor: "bg-redBackground",
38015
+ textColor: "text-redText",
38016
+ scoreColor: "text-[#BE2C35]"
38017
+ };
38018
+ }
38019
+ return {
38020
+ rank: "Unranked",
38021
+ bgColor: "bg-gray500",
38022
+ textColor: "text-gray200",
38023
+ scoreColor: "text-gray500"
38024
+ };
38025
+ };
38026
+ function BrandMentionDetails({
38027
+ open,
38028
+ onClose,
38029
+ brandBreakdown,
38030
+ selectedBrand
38031
+ }) {
38032
+ const brandStats = brandBreakdown?.insights?.brandBreakdown?.find(
38033
+ (b) => b.brand.toLowerCase() === selectedBrand?.toLowerCase()
38034
+ );
38035
+ const brandMentions = brandBreakdown?.mentions?.filter(
38036
+ (m) => m.normalizedBrand?.toLowerCase() === selectedBrand?.toLowerCase() || m.brand?.toLowerCase() === selectedBrand?.toLowerCase()
38037
+ ) || [];
38038
+ if (typeof window === "undefined") return null;
38039
+ return import_react_dom.default.createPortal(
38040
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_framer_motion3.AnimatePresence, { mode: "sync", children: open && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
38041
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
38042
+ import_framer_motion3.motion.div,
38043
+ {
38044
+ initial: { opacity: 0 },
38045
+ animate: { opacity: 1 },
38046
+ exit: { opacity: 0 },
38047
+ transition: { duration: 0.2 },
38048
+ className: "fixed inset-0 bg-black bg-opacity-50 z-[80]",
38049
+ onClick: (e) => {
38050
+ e.stopPropagation();
38051
+ onClose();
38052
+ }
38053
+ },
38054
+ "brand-overlay"
38055
+ ),
38056
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
38057
+ import_framer_motion3.motion.div,
38058
+ {
38059
+ initial: { opacity: 0, scale: 0.95 },
38060
+ animate: { opacity: 1, scale: 1 },
38061
+ exit: { opacity: 0, scale: 0.95 },
38062
+ transition: { duration: 0.2 },
38063
+ 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",
38064
+ onClick: (e) => e.stopPropagation(),
38065
+ children: [
38066
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex justify-between items-center p-4 border-b border-gray300", children: [
38067
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("h3", { className: "text-lg font-bold text-gray900", children: [
38068
+ "Brand Mention Details: ",
38069
+ selectedBrand
38070
+ ] }),
38071
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
38072
+ "button",
38073
+ {
38074
+ onClick: onClose,
38075
+ className: "p-1 rounded-full hover:bg-gray200 transition-colors",
38076
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(X, { className: "w-4 h-4" })
38077
+ }
38078
+ )
38079
+ ] }),
38080
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col gap-6 max-h-[70vh] overflow-y-auto p-4", children: [
38081
+ brandStats && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "bg-gray25 border-2 border-gray200 rounded-xl p-4", children: [
38082
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("h3", { className: "text-lg font-bold text-gray900 mb-4", children: "Overview" }),
38083
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [
38084
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "bg-background rounded-lg p-3", children: [
38085
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-xs text-gray600", children: "Total Mentions" }),
38086
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-2xl font-bold text-gray900", children: brandStats.mentions })
38087
+ ] }),
38088
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "bg-background rounded-lg p-3", children: [
38089
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-xs text-gray600", children: "Posts Count" }),
38090
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-2xl font-bold text-gray900", children: brandStats.postCount })
38091
+ ] }),
38092
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "bg-background rounded-lg p-3", children: [
38093
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-xs text-gray600", children: "Avg Engagement" }),
38094
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "text-2xl font-bold text-gray900", children: [
38095
+ brandStats.averageEngagementRate?.toFixed(2),
38096
+ "%"
38097
+ ] })
38098
+ ] }),
38099
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "bg-background rounded-lg p-3", children: [
38100
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-xs text-gray600", children: "Effectiveness" }),
38101
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
38102
+ "div",
38103
+ {
38104
+ className: `text-2xl font-bold ${getSentimentRank(brandStats.effectivenessPercent).scoreColor}`,
38105
+ children: [
38106
+ brandStats.effectivenessPercent,
38107
+ "%"
38108
+ ]
38109
+ }
38110
+ )
38111
+ ] })
38112
+ ] }),
38113
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "mt-3 flex gap-2 flex-wrap", children: brandStats.collaborationTypes?.map(
38114
+ (type, idx) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
38115
+ "span",
38116
+ {
38117
+ className: "px-3 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]",
38118
+ children: type
38119
+ },
38120
+ idx
38121
+ )
38122
+ ) })
38123
+ ] }),
38124
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { children: [
38125
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("h3", { className: "text-lg font-bold text-gray900 mb-3", children: [
38126
+ "Individual Mentions (",
38127
+ brandMentions.length,
38128
+ ")"
38129
+ ] }),
38130
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "flex flex-col gap-3", children: brandMentions.map((mention, index) => {
38131
+ const IconComponent = getPlatformIcon(mention?.platform);
38132
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
38133
+ "div",
38134
+ {
38135
+ className: "bg-gray50 border-2 border-gray200 rounded-xl p-4 hover:border-purple100 transition-colors",
38136
+ children: [
38137
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
38138
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex items-center gap-2", children: [
38139
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(IconComponent, { className: "w-5 h-5 text-gray900" }),
38140
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-sm font-medium text-gray700 capitalize", children: mention.platform })
38141
+ ] }),
38142
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex items-center gap-2", children: [
38143
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "px-2 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]", children: mention.collaborationType }),
38144
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "text-xs text-gray600", children: [
38145
+ Math.round(mention.confidence * 100),
38146
+ "% confidence"
38147
+ ] })
38148
+ ] })
38149
+ ] }),
38150
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "mb-2", children: [
38151
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "text-xs text-gray500", children: [
38152
+ "Post ID:",
38153
+ " "
38154
+ ] }),
38155
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-xs font-mono text-gray700", children: mention.post_id })
38156
+ ] }),
38157
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "bg-background rounded-lg p-3 border border-gray300", children: [
38158
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-xs text-gray600 mb-1", children: "Evidence:" }),
38159
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("p", { className: "text-sm text-gray800 italic", children: [
38160
+ "\u201C",
38161
+ mention.evidence,
38162
+ "\u201D"
38163
+ ] })
38164
+ ] }),
38165
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "mt-2 text-xs text-gray500", children: [
38166
+ "Source:",
38167
+ " ",
38168
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "font-medium", children: mention.source }),
38169
+ mention.handle && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "ml-2", children: [
38170
+ "Handle:",
38171
+ " ",
38172
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "font-medium", children: mention.handle })
38173
+ ] })
38174
+ ] })
38175
+ ]
38176
+ },
38177
+ index
38178
+ );
38179
+ }) })
38180
+ ] }),
38181
+ brandMentions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-center py-8 text-gray500", children: "No mentions found for this brand" })
38182
+ ] })
38183
+ ]
38184
+ },
38185
+ "brand-modal"
38186
+ )
38187
+ ] }) }),
38188
+ document.body
38189
+ );
38190
+ }
38191
+ function BrandCollaborationsList({
38192
+ brandBreakdown
38193
+ }) {
38194
+ const [openDetails, setOpenDetails] = (0, import_react68.useState)(false);
38195
+ const [selectedBrand, setSelectedBrand] = (0, import_react68.useState)("");
38196
+ if (!brandBreakdown?.insights?.brandBreakdown || brandBreakdown.insights.brandBreakdown.length === 0) {
38197
+ return null;
38198
+ }
38199
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
38200
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { children: [
38201
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-purpleText text-xs mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTIONS" }) }),
38202
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "flex flex-col gap-2 max-h-[220px] overflow-y-auto", children: brandBreakdown.insights.brandBreakdown.map(
38203
+ (item, index) => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
38204
+ "div",
38205
+ {
38206
+ 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",
38207
+ onClick: (e) => {
38208
+ e.stopPropagation();
38209
+ setSelectedBrand(item?.brand);
38210
+ setOpenDetails(true);
38211
+ },
38212
+ children: [
38213
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "w-10 h-10 rounded-full bg-gray200 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-sm font-bold text-gray700", children: item.brand?.charAt(0)?.toUpperCase() || "?" }) }),
38214
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col gap-1", children: [
38215
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-gray900 text-sm", children: item.brand }),
38216
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex gap-2 text-xs text-gray600", children: [
38217
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { children: [
38218
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-gray900", children: item?.mentions }),
38219
+ " ",
38220
+ "Mention"
38221
+ ] }),
38222
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { children: [
38223
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
38224
+ "span",
38225
+ {
38226
+ className: `${getSentimentRank(item.effectivenessPercent).scoreColor} font-bold`,
38227
+ children: item.effectivenessPercent ? `${item.effectivenessPercent}%` : "N/A"
38228
+ }
38229
+ ),
38230
+ " ",
38231
+ "Effectiveness"
38232
+ ] })
38233
+ ] })
38234
+ ] })
38235
+ ]
38236
+ },
38237
+ index
38238
+ )
38239
+ ) })
38240
+ ] }),
38241
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
38242
+ BrandMentionDetails,
38243
+ {
38244
+ open: openDetails,
38245
+ onClose: () => setOpenDetails(false),
38246
+ brandBreakdown,
38247
+ selectedBrand
38248
+ }
38249
+ )
38250
+ ] });
38251
+ }
38252
+
38253
+ // src/molecules/creator-discovery/CreatorWidget/CreatorGridView.tsx
38254
+ var import_react69 = require("react");
38255
+ var import_framer_motion4 = require("framer-motion");
38256
+ var import_jsx_runtime131 = require("react/jsx-runtime");
38257
+ var formatFollowerCount3 = (count) => {
38258
+ if (count >= 1e6) {
38259
+ const millions = count / 1e6;
38260
+ return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
38261
+ } else if (count >= 1e4) {
38262
+ return `${Math.floor(count / 1e3)}k`;
38263
+ } else if (count >= 1e3) {
38264
+ return `${(count / 1e3).toFixed(1)}k`;
38265
+ }
38266
+ return Math.floor(count).toString();
38267
+ };
38268
+ var getSentimentRank2 = (score) => {
38269
+ if (score >= 80) {
38270
+ return {
38271
+ bgColor: "bg-greenBackground",
38272
+ textColor: "text-greenText",
38273
+ scoreColor: "text-[#499C54]"
38274
+ };
38275
+ } else if (score >= 50) {
38276
+ return {
38277
+ bgColor: "bg-orangeBackground",
38278
+ textColor: "text-orangeText",
38279
+ scoreColor: "text-[#B3512F]"
38280
+ };
38281
+ } else if (score >= 0) {
38282
+ return {
38283
+ bgColor: "bg-redBackground",
38284
+ textColor: "text-redText",
38285
+ scoreColor: "text-[#BE2C35]"
38286
+ };
38287
+ }
38288
+ return {
38289
+ bgColor: "bg-gray500",
38290
+ textColor: "text-gray200",
38291
+ scoreColor: "text-gray200"
38292
+ };
38293
+ };
38294
+ var itemsExplanation = [
38295
+ { key: "contentRelevance", label: "Content Relevance" },
38296
+ { key: "audienceMatch", label: "Audience Match" },
38297
+ { key: "authorityExpertise", label: "Expertise" },
38298
+ { key: "contentQuality", label: "Content Quality" },
38299
+ { key: "authenticity", label: "Authenticity" },
38300
+ { key: "brandSafety", label: "Brand Safety" }
38301
+ ];
38302
+ function CreatorGridViewCard({ creator }) {
38303
+ const [isExpanded, setIsExpanded] = (0, import_react69.useState)(false);
38304
+ const [showFullDescription, setShowFullDescription] = (0, import_react69.useState)(false);
38305
+ const [isDescriptionOverflowing, setIsDescriptionOverflowing] = (0, import_react69.useState)(false);
38306
+ const descriptionRef = (0, import_react69.useRef)(null);
38307
+ const cardRef = (0, import_react69.useRef)(null);
38308
+ const checkDescriptionOverflow = (0, import_react69.useCallback)(() => {
38309
+ const el = descriptionRef.current;
38310
+ if (!el) return;
38311
+ setIsDescriptionOverflowing(el.scrollHeight > el.clientHeight + 1);
38312
+ }, []);
38313
+ (0, import_react69.useEffect)(() => {
38314
+ checkDescriptionOverflow();
38315
+ }, [checkDescriptionOverflow, isExpanded, showFullDescription]);
38316
+ (0, import_react69.useEffect)(() => {
38317
+ const onResize = () => checkDescriptionOverflow();
38318
+ window.addEventListener("resize", onResize);
38319
+ return () => window.removeEventListener("resize", onResize);
38320
+ }, [checkDescriptionOverflow]);
38321
+ const platformStats = (0, import_react69.useMemo)(() => {
38322
+ return [
38323
+ {
38324
+ platform: "instagram",
38325
+ icon: InstagramIcon,
38326
+ followers: creator.metrics?.instagram?.followers || 0,
38327
+ engagement: creator.metrics?.instagram?.engagement || 0
38328
+ },
38329
+ {
38330
+ platform: "youtube",
38331
+ icon: YouTubeIcon,
38332
+ followers: creator.metrics?.youtube?.followers || 0,
38333
+ engagement: creator.metrics?.youtube?.engagement || 0
38334
+ },
38335
+ {
38336
+ platform: "tiktok",
38337
+ icon: TikTokIcon3,
38338
+ followers: creator.metrics?.tiktok?.followers || 0,
38339
+ engagement: creator.metrics?.tiktok?.engagement || 0
38340
+ }
38341
+ ];
38342
+ }, [creator]);
38343
+ const toggleExpanded = () => {
38344
+ const willExpand = !isExpanded;
38345
+ setIsExpanded(willExpand);
38346
+ setTimeout(() => {
38347
+ if (cardRef.current) {
38348
+ cardRef.current.scrollIntoView({
38349
+ behavior: "smooth",
38350
+ block: willExpand ? "center" : "nearest"
38351
+ });
38352
+ }
38353
+ }, 100);
38354
+ };
38355
+ const iso2 = normalizeToIso2(creator.country);
38356
+ const meta = codeToMeta[iso2];
38357
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38358
+ import_framer_motion4.motion.div,
38359
+ {
38360
+ ref: cardRef,
38361
+ layout: "position",
38362
+ initial: { opacity: 0, y: 10 },
38363
+ animate: { opacity: 1, y: 0 },
38364
+ transition: { duration: 0.3 },
38365
+ 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" : ""}`,
38366
+ style: isExpanded ? { gridColumn: "1 / -1" } : {},
38367
+ onClick: toggleExpanded,
38368
+ children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex", children: [
38369
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: `${isExpanded ? "w-1/3" : "w-full"}`, children: [
38370
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "relative w-full aspect-square mb-2", children: [
38371
+ creator.profile_pic ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38372
+ "img",
38373
+ {
38374
+ src: creator.profile_pic,
38375
+ alt: creator.name,
38376
+ className: "w-full h-full object-cover bg-primary/10",
38377
+ style: { borderRadius: "10px 10px 0 0" }
38378
+ }
38379
+ ) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38380
+ "div",
38381
+ {
38382
+ className: "w-full h-full bg-primary/10 flex items-center justify-center",
38383
+ style: { borderRadius: "10px 10px 0 0" },
38384
+ children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" })
38385
+ }
38386
+ ),
38387
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38388
+ "div",
38389
+ {
38390
+ 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`,
38391
+ children: creator.sentiment ? `${creator.sentiment?.matchScore?.toFixed(1)}%` : "N/A"
38392
+ }
38393
+ )
38394
+ ] }),
38395
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "px-3 pb-1", children: [
38396
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { children: [
38397
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38398
+ "h3",
38399
+ {
38400
+ className: `${isExpanded ? "text-md" : "text-sm"} font-normal text-gray900 mb-1 line-clamp-2 text-start`,
38401
+ children: creator.name || "Unnamed"
38402
+ }
38403
+ ),
38404
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
38405
+ "div",
38406
+ {
38407
+ className: `${isExpanded ? "text-sm" : "text-xs"} text-gray700 mb-1 text-start flex items-center gap-1`,
38408
+ children: [
38409
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "text-base", children: meta?.flag }),
38410
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { children: meta?.name || creator.country || "Unknown" })
38411
+ ]
38412
+ }
38413
+ ),
38414
+ isExpanded && creator?.sentiment?.detailedScores && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "mt-2 w-[150px] flex gap-2", children: Object.entries(creator.sentiment.detailedScores).map(
38415
+ ([key, value]) => {
38416
+ const itemRank = getSentimentRank2(value);
38417
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
38418
+ "div",
38419
+ {
38420
+ className: "flex flex-col items-center w-[100px]",
38421
+ children: [
38422
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
38423
+ "span",
38424
+ {
38425
+ className: `text-[14px] font-bold ${itemRank.scoreColor}`,
38426
+ children: [
38427
+ value,
38428
+ "%"
38429
+ ]
38430
+ }
38431
+ ),
38432
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex items-center justify-center gap-1 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "text-xs dark:text-gray500 text-center px-1", children: itemsExplanation.find(
38433
+ (item) => item.key === key
38434
+ )?.label }) })
38435
+ ]
38436
+ },
38437
+ key
38438
+ );
38439
+ }
38440
+ ) }) })
38441
+ ] }),
38442
+ !isExpanded && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex gap-2 justify-between", children: platformStats.map(
38443
+ ({ platform, icon: Icon3, followers }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
38444
+ "div",
38445
+ {
38446
+ className: "flex flex-col items-center gap-1",
38447
+ title: `${formatFollowerCount3(followers)} followers`,
38448
+ children: [
38449
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38450
+ Icon3,
38451
+ {
38452
+ className: `w-5 h-5 ${getPlatformIconColor(platform)}`
38453
+ }
38454
+ ),
38455
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "text-xs dark:text-gray500", children: followers > 0 && formatFollowerCount3(followers) })
38456
+ ]
38457
+ },
38458
+ platform
38459
+ )
38460
+ ) })
38461
+ ] })
38462
+ ] }),
38463
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex-1 border-l border-gray300 p-6 overflow-hidden transition-all duration-300 ease-in-out", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "space-y-4", children: [
38464
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { children: [
38465
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
38466
+ "div",
38467
+ {
38468
+ ref: descriptionRef,
38469
+ className: `${showFullDescription ? "" : "max-h-[80px] overflow-hidden"} relative`,
38470
+ children: [
38471
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-sm text-gray700 leading-relaxed", children: creator.description || "No description provided." }),
38472
+ !showFullDescription && isDescriptionOverflowing && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 h-10 bg-gradient-to-t from-gray25 to-transparent" })
38473
+ ]
38474
+ }
38475
+ ),
38476
+ (isDescriptionOverflowing || showFullDescription) && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38477
+ "button",
38478
+ {
38479
+ onClick: (e) => {
38480
+ e.stopPropagation();
38481
+ setShowFullDescription((v) => !v);
38482
+ },
38483
+ className: "mt-1 px-3 py-1 rounded border border-gray300 text-sm text-gray700 hover:text-gray900",
38484
+ children: showFullDescription ? "Show less" : "Show more"
38485
+ }
38486
+ )
38487
+ ] }),
38488
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex gap-6 justify-start items-center", children: platformStats.map(
38489
+ ({ platform, icon: Icon3, followers, engagement }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-center gap-3", children: [
38490
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
38491
+ "div",
38492
+ {
38493
+ className: "flex items-center gap-1",
38494
+ title: `${formatFollowerCount3(followers)} followers`,
38495
+ children: [
38496
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38497
+ Icon3,
38498
+ {
38499
+ className: `w-5 h-5 ${getPlatformIconColor(platform)}`
38500
+ }
38501
+ ),
38502
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "text-xs dark:text-gray500", children: followers > 0 ? formatFollowerCount3(followers) : "0" })
38503
+ ]
38504
+ }
38505
+ ),
38506
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-center gap-1", children: [
38507
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ChartColumn, { className: "w-5 h-5 dark:text-gray500" }),
38508
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("span", { className: "text-sm dark:text-gray500 w-[40px]", children: [
38509
+ (engagement * 100).toFixed(1),
38510
+ "%"
38511
+ ] })
38512
+ ] })
38513
+ ] }, platform)
38514
+ ) }),
38515
+ creator.posts?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "w-full overflow-hidden", children: [
38516
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("h3", { className: "mb-2 text-sm font-medium text-gray900", children: "Recent Posts" }),
38517
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex gap-3 overflow-x-auto", children: creator.posts.filter(
38518
+ (post) => post.thumbnail || post.thumbnail_url
38519
+ ).slice(0, 8).map((post, idx) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38520
+ "a",
38521
+ {
38522
+ href: post.url || "#",
38523
+ target: "_blank",
38524
+ rel: "noopener noreferrer",
38525
+ className: "block flex-shrink-0",
38526
+ onClick: (e) => e.stopPropagation(),
38527
+ children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38528
+ "img",
38529
+ {
38530
+ src: post.thumbnail_url || post.thumbnail,
38531
+ alt: post.title || `Post ${idx + 1}`,
38532
+ className: "rounded-md object-cover w-[120px] h-[120px]"
38533
+ }
38534
+ )
38535
+ },
38536
+ idx
38537
+ )) })
38538
+ ] }),
38539
+ creator?.sentiment?.aiReasoning && /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "text-gray700 max-h-[200px] overflow-auto", children: [
38540
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("h4", { className: "font-semibold text-sm", children: "AI Analysis" }),
38541
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-sm", children: creator.sentiment.aiReasoning })
38542
+ ] })
38543
+ ] }) })
38544
+ ] })
38545
+ }
38546
+ );
38547
+ }
38548
+ function CreatorGridView({
38549
+ creatorData
38550
+ }) {
38551
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("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__ */ (0, import_jsx_runtime131.jsx)(CreatorGridViewCard, { creator }, creator._id)) });
38552
+ }
38553
+
38554
+ // src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
38555
+ var import_jsx_runtime132 = require("react/jsx-runtime");
38556
+ var formatFollowerCount4 = (count) => {
38557
+ if (count >= 1e6) {
38558
+ const millions = count / 1e6;
38559
+ return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
38560
+ } else if (count >= 1e4) {
38561
+ return `${Math.floor(count / 1e3)}k`;
38562
+ } else if (count >= 1e3) {
38563
+ return `${(count / 1e3).toFixed(1)}k`;
38564
+ }
38565
+ return Math.floor(count).toString();
38566
+ };
38567
+ var getSentimentRank3 = (score) => {
38568
+ if (score >= 80) {
38569
+ return {
38570
+ rank: "STRONG FIT",
38571
+ bgColor: "bg-greenBackground",
38572
+ textColor: "text-greenText",
38573
+ scoreColor: "text-[#499C54]"
38574
+ };
38575
+ } else if (score >= 50) {
38576
+ return {
38577
+ rank: "MODERATE FIT",
38578
+ bgColor: "bg-orangeBackground",
38579
+ textColor: "text-orangeText",
38580
+ scoreColor: "text-[#B3512F]"
38581
+ };
38582
+ } else if (score >= 0) {
38583
+ return {
38584
+ rank: "POOR FIT",
38585
+ bgColor: "bg-redBackground",
38586
+ textColor: "text-redText",
38587
+ scoreColor: "text-[#BE2C35]"
38588
+ };
38589
+ }
38590
+ return {
38591
+ rank: "Unranked",
38592
+ bgColor: "bg-gray500",
38593
+ textColor: "text-gray200",
38594
+ scoreColor: "text-gray500"
38595
+ };
38596
+ };
38597
+ function formatCreator(raw) {
38598
+ return {
38599
+ _id: raw.creator_id || raw.profile?.upfluenceId,
38600
+ name: raw.profile?.name || "",
38601
+ description: raw.profile?.description || "",
38602
+ isVerified: raw.profile?.isVerified || false,
38603
+ country: raw.profile?.country || "",
38604
+ profile_pic: raw.profile?.profilePicture || "",
38605
+ platforms: raw.profile?.platforms,
38606
+ platformMetrics: raw.platformMetrics || {},
38607
+ metrics: {
38608
+ instagram: {
38609
+ engagement: raw.platformMetrics?.instagramMetrics?.engagementRate || 0,
38610
+ followers: raw.platformMetrics?.instagramMetrics?.followers || 0,
38611
+ avgLikes: raw.platformMetrics?.instagramMetrics?.avgLikes || 0,
38612
+ avgComments: raw.platformMetrics?.instagramMetrics?.avgComments || 0
38613
+ },
38614
+ youtube: {
38615
+ engagement: raw.platformMetrics?.youtubeMetrics?.engagementRate || 0,
38616
+ followers: raw.platformMetrics?.youtubeMetrics?.subscribers || 0,
38617
+ avgLikes: raw.platformMetrics?.youtubeMetrics?.avgLikes || 0,
38618
+ avgComments: raw.platformMetrics?.youtubeMetrics?.avgComments || 0
38619
+ },
38620
+ tiktok: {
38621
+ engagement: raw.platformMetrics?.tiktokMetrics?.engagementRate || 0,
38622
+ followers: raw.platformMetrics?.tiktokMetrics?.followers || 0,
38623
+ avgLikes: raw.platformMetrics?.tiktokMetrics?.avgLikes || 0,
38624
+ avgComments: raw.platformMetrics?.tiktokMetrics?.avgComments || 0
38625
+ }
38626
+ },
38627
+ posts: raw.posts || [],
38628
+ sentiment: raw.sentiment || null,
38629
+ audienceDemographics: raw.audienceDemographics || null,
38630
+ brandCollaborations: raw.brandCollaborations || null,
38631
+ profile: raw.profile || {}
38632
+ };
38633
+ }
38634
+ var truncateName2 = (name, maxLen) => {
38635
+ if (!name) return "";
38636
+ return name.length > maxLen ? name.slice(0, maxLen) + "..." : name;
38637
+ };
38638
+ function SearchSpecDisplay({ spec }) {
38639
+ if (!spec) return null;
38640
+ const priorityOneBundles = Array.isArray(spec?.keyword_bundles) ? spec.keyword_bundles.filter((b) => b?.priority !== void 0 ? b.priority === 1 : true).flatMap((b) => b?.keywords || []) : [];
38641
+ const textClass = "text-sm text-white dark:text-gray900";
38642
+ const paddingClass = "px-4 py-1";
38643
+ const roundedClass = "rounded-lg";
38644
+ const tagClass = `${textClass} ${paddingClass} bg-[#85888f] dark:bg-[rgba(249,249,249,0.2)] ${roundedClass} border border-[#85888f] dark:border-gray800 font-medium`;
38645
+ const items = [
38646
+ {
38647
+ key: "platforms",
38648
+ title: "Platforms",
38649
+ content: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex flex-wrap gap-2", children: (spec.platforms || []).filter((p) => ["instagram", "youtube", "tiktok"].includes(p.toLowerCase())).map((p, idx) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: `${tagClass} flex items-center justify-center`, children: p.charAt(0).toUpperCase() + p.slice(1).toLowerCase() }, idx)) })
38650
+ },
38651
+ {
38652
+ key: "follower_range",
38653
+ title: "Follower Range",
38654
+ content: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: `inline-block ${tagClass} font-grotesk`, children: [
38655
+ formatFollowerCount4(spec?.follower_range?.min ?? 0),
38656
+ " -",
38657
+ " ",
38658
+ formatFollowerCount4(spec?.follower_range?.max ?? 0)
38659
+ ] })
38660
+ },
38661
+ {
38662
+ key: "geography",
38663
+ title: "Geography",
38664
+ content: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: `inline-block ${tagClass} font-grotesk`, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38665
+ "div",
38666
+ {
38667
+ className: "max-w-[200px] overflow-x-auto whitespace-nowrap",
38668
+ style: { scrollbarWidth: "none", textOverflow: "ellipsis", overflow: "hidden" },
38669
+ onMouseEnter: (e) => {
38670
+ e.currentTarget.style.textOverflow = "clip";
38671
+ e.currentTarget.style.overflow = "auto";
38672
+ },
38673
+ onMouseLeave: (e) => {
38674
+ e.currentTarget.style.textOverflow = "ellipsis";
38675
+ e.currentTarget.style.overflow = "hidden";
38676
+ e.currentTarget.scrollLeft = 0;
38677
+ },
38678
+ children: (spec.geography || []).map((g, idx) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("span", { children: [
38679
+ g,
38680
+ idx < spec.geography.length - 1 ? ", " : ""
38681
+ ] }, idx))
38682
+ }
38683
+ ) })
38684
+ },
38685
+ {
38686
+ key: "keyword_bundles",
38687
+ title: "Keyword",
38688
+ content: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("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__ */ (0, import_jsx_runtime132.jsx)("div", { className: `${textClass} text-white/70`, children: "No priority 1 keywords" }) : priorityOneBundles.map((kw, idx) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: tagClass, children: kw }, idx)) })
38689
+ }
38690
+ ];
38691
+ const itemsToShow = ["platforms", "follower_range", "geography", "keyword_bundles"];
38692
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "mt-3", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("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__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex-none p-5 bg-paperBackground rounded-lg", children: [
38693
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "text-purpleText text-sm mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title.toUpperCase() }) }),
38694
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: `flex text-gray900 ${textClass}`, children: content })
38695
+ ] }, key)) }) });
38696
+ }
38697
+ function SentimentScoreRank({
38698
+ score,
38699
+ isValidationComplete,
38700
+ showMinialView = false
38701
+ }) {
38702
+ const sentimentScoreRank = getSentimentRank3(score);
38703
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: `flex flex-col justify-end ${showMinialView ? "w-[120px]" : "w-[150px]"} text-sm`, children: [
38704
+ score !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex justify-center items-center mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38705
+ "span",
38706
+ {
38707
+ 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]"}`,
38708
+ children: isValidationComplete ? sentimentScoreRank.rank : "Unranked"
38709
+ }
38710
+ ) }),
38711
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: `flex justify-center ${showMinialView ? "text-[24px]" : "text-[28px]"} font-bold mb-3 ${sentimentScoreRank.scoreColor}`, children: isValidationComplete ? score >= 0 ? `${score}%` : "0%" : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex items-center justify-center py-2", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "w-6 h-6 border-2 border-purple100 border-t-transparent rounded-full animate-spin" }) }) }),
38712
+ !showMinialView && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-gray600 dark:text-gray500 text-center", children: "Match Score" })
38713
+ ] }) });
38714
+ }
38715
+ function BrandMentionPerformance({ creator }) {
38716
+ const insights = creator?.brandCollaborations?.insights;
38717
+ if (!insights) return null;
38718
+ const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
38719
+ if (!isValid2(insights.averageBrandEngagementRate) && !isValid2(insights.effectivenessPercent) && !isValid2(insights.saturationRate)) {
38720
+ return null;
38721
+ }
38722
+ const metrics = [
38723
+ { title: "Avg engagement rate", subtitle: "on brand mention", value: `${insights?.averageBrandEngagementRate || 0} %` },
38724
+ { title: "Effectiveness", subtitle: "compared to all posts", value: `${insights?.effectivenessPercent || 0} %` },
38725
+ { title: "Saturation Rate", subtitle: "on brand mention", value: `${insights?.saturationRate || 0} %` }
38726
+ ];
38727
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { children: [
38728
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTION PERFORMANCE" }) }),
38729
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex flex-col gap-3", children: metrics.map((item) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex justify-between items-center text-gray700 text-sm", children: [
38730
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col gap-1", children: [
38731
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h5", { children: item.title }),
38732
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-xs", children: item.subtitle })
38733
+ ] }),
38734
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-purpleText text-lg", children: item.value })
38735
+ ] }, item.title)) })
38736
+ ] });
38737
+ }
38738
+ function CreatorFitSummary({ creator, showBrandPerformance }) {
38739
+ const hasDeepAnalysis = creator?.sentiment?.deepAnalysis?.deepAnalysis;
38740
+ const title = hasDeepAnalysis ? "CREATOR DEEP ANALYSIS" : "CREATOR FIT SUMMARY";
38741
+ const content = hasDeepAnalysis ? creator.sentiment.deepAnalysis.deepAnalysis : creator?.sentiment?.aiReasoning || "No data available.";
38742
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: showBrandPerformance ? "col-span-1" : "col-span-2", children: [
38743
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title }) }),
38744
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "max-h-[140px] overflow-y-auto slim-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-gray700 text-sm", children: content }) })
38745
+ ] });
38746
+ }
38747
+ function ProfileSection({ creator, isValidationComplete }) {
38748
+ 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}` : "";
38749
+ const iso2 = normalizeToIso2(creator.country);
38750
+ const meta = codeToMeta[iso2];
38751
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-start gap-1 md:gap-6", children: [
38752
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col items-center gap-6", children: [
38753
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("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__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
38754
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38755
+ "img",
38756
+ {
38757
+ src: creator.profile_pic,
38758
+ alt: creator.name,
38759
+ className: "object-cover w-[5rem] h-[5rem] rounded-[15px]"
38760
+ }
38761
+ ),
38762
+ creator?.profile?.isVerified && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38763
+ BadgeCheck,
38764
+ {
38765
+ size: 35,
38766
+ className: "absolute -top-2 -right-2 text-blue-500 drop-shadow-sm fill-blue-300"
38767
+ }
38768
+ )
38769
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" }) }),
38770
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "block sm:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete, showMinialView: true }) })
38771
+ ] }),
38772
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col gap-3 truncate", children: [
38773
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h4", { className: "text-lg text-gray900 max-w-[150px]", title: creator.name, children: truncateName2(creator.name, 100) }) }),
38774
+ username && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "text-xs text-gray700", children: username }),
38775
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "text-sm text-gray700 flex items-center gap-2", children: [
38776
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-base", children: meta?.flag }),
38777
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { children: meta?.name || creator.country || "Unknown" })
38778
+ ] }),
38779
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "text-xs text-gray700 text-wrap", children: truncateName2(creator.description, 100) })
38780
+ ] })
38781
+ ] });
38782
+ }
38783
+ function CreatorCardExpandedSection({
38784
+ creator
38785
+ }) {
38786
+ const hasBrandBreakdown = creator?.brandCollaborations?.insights?.brandBreakdown && creator?.sentiment?.deepAnalysis;
38787
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
38788
+ import_framer_motion5.motion.div,
38789
+ {
38790
+ initial: { y: 20, opacity: 0 },
38791
+ animate: { y: 0, opacity: 1 },
38792
+ transition: { duration: 0.3, delay: 0.1 },
38793
+ className: "md:mt-6 space-y-5",
38794
+ children: [
38795
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "md:grid md:grid-cols-[1.3fr_1fr_2fr_120px] gap-8 py-4 pr-7", children: [
38796
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "col-span-4 sm:col-span-1", children: hasBrandBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38797
+ BrandCollaborationsList,
38798
+ {
38799
+ brandBreakdown: creator?.brandCollaborations
38800
+ }
38801
+ ) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "hidden sm:block" }) }),
38802
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "col-span-4 sm:col-span-3", children: creator?.audienceDemographics ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38803
+ EngagedAudienceDemographics,
38804
+ {
38805
+ audienceDemographics: creator.audienceDemographics
38806
+ }
38807
+ ) : null })
38808
+ ] }),
38809
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38810
+ PlatformPostsSection,
38811
+ {
38812
+ platformMetrics: creator.platformMetrics,
38813
+ posts: creator.posts ?? creator.post
38814
+ }
38815
+ )
38816
+ ]
38817
+ }
38818
+ );
38819
+ }
38820
+ function CreatorCard({
38821
+ creator,
38822
+ isValidationComplete
38823
+ }) {
38824
+ const [detailsExpanded, setDetailsExpanded] = (0, import_react70.useState)(false);
38825
+ const hasValidBrandMention = (() => {
38826
+ const insights = creator?.brandCollaborations?.insights;
38827
+ if (!insights) return false;
38828
+ const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
38829
+ return isValid2(insights.averageBrandEngagementRate) || isValid2(insights.effectivenessPercent) || isValid2(insights.saturationRate);
38830
+ })();
38831
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
38832
+ import_framer_motion5.motion.div,
38833
+ {
38834
+ layout: true,
38835
+ initial: { opacity: 0, y: 20 },
38836
+ animate: { opacity: 1, y: 0 },
38837
+ exit: { opacity: 0, y: -20 },
38838
+ transition: { duration: 0.4, ease: [0.22, 1, 0.36, 1] },
38839
+ 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"}`,
38840
+ onClick: () => setDetailsExpanded((prev) => !prev),
38841
+ children: [
38842
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col gap-4 sm:grid sm:grid-cols-[1.3fr_1fr_2fr_120px] gap-8 items-start w-full pr-7", children: [
38843
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ProfileSection, { creator, isValidationComplete }),
38844
+ hasValidBrandMention && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(BrandMentionPerformance, { creator }),
38845
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CreatorFitSummary, { creator, showBrandPerformance: hasValidBrandMention }),
38846
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete }) })
38847
+ ] }),
38848
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_framer_motion5.AnimatePresence, { children: detailsExpanded && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38849
+ import_framer_motion5.motion.div,
38850
+ {
38851
+ initial: { height: 0, opacity: 0 },
38852
+ 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 } } },
38853
+ exit: { height: 0, opacity: 0, transition: { height: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] }, opacity: { duration: 0.2 } } },
38854
+ className: "overflow-hidden mt-4",
38855
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CreatorCardExpandedSection, { creator })
38856
+ }
38857
+ ) })
38858
+ ]
38859
+ }
38860
+ );
38861
+ }
38862
+ function CreatorDisplay({
38863
+ creators,
38864
+ isValidationComplete
38865
+ }) {
38866
+ const [viewMode, setViewMode] = (0, import_react70.useState)("list");
38867
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "px-4", children: [
38868
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex justify-end items-center my-3 gap-1", children: [
38869
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("span", { className: "text-xs text-gray600 mr-2", children: [
38870
+ creators.length,
38871
+ " creators"
38872
+ ] }),
38873
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38874
+ "button",
38875
+ {
38876
+ className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "list" ? "bg-gray200" : ""}`,
38877
+ onClick: () => setViewMode("list"),
38878
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38879
+ AlignJustify,
38880
+ {
38881
+ className: `h-5 w-5 ${viewMode === "list" ? "text-gray900 dark:text-white" : "text-gray500"}`
38882
+ }
38883
+ )
38884
+ }
38885
+ ),
38886
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38887
+ "button",
38888
+ {
38889
+ className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "grid" ? "bg-gray200" : ""}`,
38890
+ onClick: () => setViewMode("grid"),
38891
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38892
+ LayoutGrid,
38893
+ {
38894
+ className: `h-5 w-5 ${viewMode === "grid" ? "text-gray900 dark:text-white" : "text-gray500"}`
38895
+ }
38896
+ )
38897
+ }
38898
+ )
38899
+ ] }),
38900
+ creators.length > 0 ? viewMode === "list" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "space-y-4", children: creators.map((creator) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CreatorCard, { creator, isValidationComplete }, creator._id)) }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CreatorGridView, { creatorData: creators }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "text-center py-8 bg-gray100 rounded-lg border border-gray300", children: [
38901
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Users, { className: "w-6 h-6 text-primary" }) }),
38902
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h3", { className: "text-base font-medium text-gray900", children: "No creators found" }),
38903
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "mt-1 text-sm text-gray600", children: "Try adjusting your search criteria" })
38904
+ ] })
38905
+ ] });
38906
+ }
38907
+ function CreatorExpandedPanel({
38908
+ isOpen,
38909
+ onClose,
38910
+ sessionId,
38911
+ creatorIds,
38912
+ version,
38913
+ searchSpec,
38914
+ fetchCreatorDetails
38915
+ }) {
38916
+ const [creators, setCreators] = (0, import_react70.useState)([]);
38917
+ const [loading, setLoading] = (0, import_react70.useState)(false);
38918
+ const fetcher = fetchCreatorDetails ?? defaultFetchCreatorDetails;
38919
+ const loadCreators = (0, import_react70.useCallback)(async () => {
38920
+ if (!creatorIds.length) return;
38921
+ setLoading(true);
38922
+ try {
38923
+ const data = await fetcher({ creatorIds, sessionId, versionNo: version });
38924
+ setCreators((data.creatorData || []).map(formatCreator));
38925
+ } catch (err) {
38926
+ console.error("Failed to fetch creator details:", err);
38927
+ } finally {
38928
+ setLoading(false);
38929
+ }
38930
+ }, [creatorIds, sessionId, version, fetcher]);
38931
+ (0, import_react70.useEffect)(() => {
38932
+ if (isOpen && creatorIds.length > 0) {
38933
+ loadCreators();
38934
+ }
38935
+ }, [isOpen, loadCreators]);
38936
+ if (typeof window === "undefined") return null;
38937
+ return import_react_dom2.default.createPortal(
38938
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_framer_motion5.AnimatePresence, { mode: "sync", children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
38939
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38940
+ import_framer_motion5.motion.div,
38941
+ {
38942
+ initial: { opacity: 0 },
38943
+ animate: { opacity: 1 },
38944
+ exit: { opacity: 0, display: "none" },
38945
+ transition: { duration: 0.3 },
38946
+ className: "fixed inset-0 bg-black bg-opacity-50 z-[60]",
38947
+ onClick: (e) => {
38948
+ e.stopPropagation();
38949
+ onClose();
38950
+ }
38951
+ },
38952
+ "overlay"
38953
+ ),
38954
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38955
+ import_framer_motion5.motion.div,
38956
+ {
38957
+ initial: { x: "100%" },
38958
+ animate: { x: 0 },
38959
+ exit: { x: "100%" },
38960
+ transition: { type: "spring", damping: 30, stiffness: 400 },
38961
+ 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",
38962
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "py-4 font-noto", children: [
38963
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex justify-between items-center w-full mb-4 pl-2", children: [
38964
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("button", { onClick: onClose, className: "p-2 rounded-full transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(X, { className: "w-5 h-5" }) }),
38965
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex-1 flex flex-col w-[80%]", children: [
38966
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex flex-col md:flex-row justify-between gap-2 md:gap-0 md:items-center pr-16", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col", children: [
38967
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h4", { className: "text-xs font-medium text-purpleText", children: "VERIFIED SEARCH RESULTS" }) }),
38968
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h2", { className: "text-xl font-bold mb-1", children: "Creators Search Results" })
38969
+ ] }) }),
38970
+ searchSpec && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SearchSpecDisplay, { spec: searchSpec })
38971
+ ] })
38972
+ ] }),
38973
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "border-b border-gray300" }),
38974
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 gap-3", children: [
38975
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "w-8 h-8 border-3 border-purple100 border-t-transparent rounded-full animate-spin" }),
38976
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-sm text-gray600", children: "Fetching Creators" })
38977
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CreatorDisplay, { creators, isValidationComplete: version !== void 0 })
38978
+ ] })
38979
+ },
38980
+ "creator-panel"
38981
+ )
38982
+ ] }) }),
38983
+ document.body
38984
+ );
38985
+ }
38986
+
38987
+ // src/molecules/creator-discovery/CreatorWidget/useCreatorWidgetPolling.ts
38988
+ var import_react71 = require("react");
37219
38989
  var DEFAULT_POLLING_CONFIG = {
37220
38990
  pollInterval: 5e3,
37221
38991
  maxDuration: 15 * 60 * 1e3,
@@ -37225,27 +38995,29 @@ var DEFAULT_POLLING_CONFIG = {
37225
38995
  function useCreatorWidgetPolling({
37226
38996
  sessionId,
37227
38997
  currentVersion,
37228
- fetchVersions,
37229
- fetchStatus,
38998
+ fetchVersions: fetchVersionsProp,
38999
+ fetchStatus: fetchStatusProp,
37230
39000
  pollingConfig,
37231
39001
  onStatusChange
37232
39002
  }) {
37233
- const config = (0, import_react67.useMemo)(
39003
+ const fetchVersions = fetchVersionsProp ?? defaultFetchVersions;
39004
+ const fetchStatus = fetchStatusProp ?? defaultFetchStatus;
39005
+ const config = (0, import_react71.useMemo)(
37234
39006
  () => ({ ...DEFAULT_POLLING_CONFIG, ...pollingConfig }),
37235
39007
  [pollingConfig]
37236
39008
  );
37237
- const [versionData, setVersionData] = (0, import_react67.useState)(null);
37238
- const [totalVersions, setTotalVersions] = (0, import_react67.useState)(0);
37239
- const [selectedVersion, setSelectedVersion] = (0, import_react67.useState)();
37240
- const [isLoadingVersion, setIsLoadingVersion] = (0, import_react67.useState)(false);
37241
- const [isValidationComplete, setIsValidationComplete] = (0, import_react67.useState)(false);
37242
- const [versionStatus, setVersionStatus] = (0, import_react67.useState)("checking");
37243
- const [statusDetails, setStatusDetails] = (0, import_react67.useState)();
37244
- const [timeDisplay, setTimeDisplay] = (0, import_react67.useState)("");
37245
- const [loadingStatus, setLoadingStatus] = (0, import_react67.useState)(true);
37246
- const remainingTimeRef = (0, import_react67.useRef)(0);
39009
+ const [versionData, setVersionData] = (0, import_react71.useState)(null);
39010
+ const [totalVersions, setTotalVersions] = (0, import_react71.useState)(0);
39011
+ const [selectedVersion, setSelectedVersion] = (0, import_react71.useState)();
39012
+ const [isLoadingVersion, setIsLoadingVersion] = (0, import_react71.useState)(false);
39013
+ const [isValidationComplete, setIsValidationComplete] = (0, import_react71.useState)(false);
39014
+ const [versionStatus, setVersionStatus] = (0, import_react71.useState)("checking");
39015
+ const [statusDetails, setStatusDetails] = (0, import_react71.useState)();
39016
+ const [timeDisplay, setTimeDisplay] = (0, import_react71.useState)("");
39017
+ const [loadingStatus, setLoadingStatus] = (0, import_react71.useState)(true);
39018
+ const remainingTimeRef = (0, import_react71.useRef)(0);
37247
39019
  const requestedVersion = selectedVersion ?? currentVersion ?? versionData?.currentVersion;
37248
- const fetchVersionData = (0, import_react67.useCallback)(async () => {
39020
+ const fetchVersionData = (0, import_react71.useCallback)(async () => {
37249
39021
  if (!sessionId) return;
37250
39022
  if (!versionData) setIsLoadingVersion(true);
37251
39023
  try {
@@ -37266,17 +39038,17 @@ function useCreatorWidgetPolling({
37266
39038
  setIsLoadingVersion(false);
37267
39039
  }
37268
39040
  }, [sessionId, requestedVersion, isValidationComplete, fetchVersions, versionData]);
37269
- (0, import_react67.useEffect)(() => {
39041
+ (0, import_react71.useEffect)(() => {
37270
39042
  fetchVersionData();
37271
39043
  }, [sessionId, requestedVersion, isValidationComplete]);
37272
- (0, import_react67.useEffect)(() => {
39044
+ (0, import_react71.useEffect)(() => {
37273
39045
  if (totalVersions > 0 || !sessionId) return;
37274
39046
  const interval = setInterval(() => {
37275
39047
  if (totalVersions === 0) fetchVersionData();
37276
39048
  }, config.pollInterval);
37277
39049
  return () => clearInterval(interval);
37278
39050
  }, [totalVersions, sessionId, fetchVersionData, config.pollInterval]);
37279
- (0, import_react67.useEffect)(() => {
39051
+ (0, import_react71.useEffect)(() => {
37280
39052
  if (!selectedVersion && !requestedVersion) return;
37281
39053
  const activeVersion = selectedVersion ?? requestedVersion;
37282
39054
  let isMounted = true;
@@ -37359,7 +39131,7 @@ function useCreatorWidgetPolling({
37359
39131
  stopPolling();
37360
39132
  };
37361
39133
  }, [selectedVersion, requestedVersion, sessionId]);
37362
- const versionNumbers = (0, import_react67.useMemo)(() => {
39134
+ const versionNumbers = (0, import_react71.useMemo)(() => {
37363
39135
  if (!totalVersions) return [];
37364
39136
  return Array.from({ length: totalVersions }, (_, i) => i + 1);
37365
39137
  }, [totalVersions]);
@@ -37386,18 +39158,20 @@ function useCreatorWidgetPolling({
37386
39158
  }
37387
39159
 
37388
39160
  // src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
37389
- var import_jsx_runtime126 = require("react/jsx-runtime");
39161
+ var import_jsx_runtime133 = require("react/jsx-runtime");
37390
39162
  function CreatorWidgetInner({
37391
39163
  sessionId,
37392
39164
  currentVersion,
37393
39165
  isAgentOutput = false,
37394
39166
  fetchVersions,
37395
39167
  fetchStatus,
39168
+ fetchCreatorDetails,
37396
39169
  pollingConfig,
37397
39170
  onStatusChange,
37398
39171
  onAction,
37399
39172
  className
37400
39173
  }) {
39174
+ const [isExpanded, setIsExpanded] = (0, import_react72.useState)(false);
37401
39175
  const {
37402
39176
  versionNumbers,
37403
39177
  selectedVersion,
@@ -37418,11 +39192,12 @@ function CreatorWidgetInner({
37418
39192
  pollingConfig,
37419
39193
  onStatusChange
37420
39194
  });
37421
- const handleVersionSelect = (0, import_react68.useCallback)(
39195
+ const handleVersionSelect = (0, import_react72.useCallback)(
37422
39196
  (version) => setSelectedVersion(version),
37423
39197
  [setSelectedVersion]
37424
39198
  );
37425
- const handleViewCreators = (0, import_react68.useCallback)(() => {
39199
+ const handleViewCreators = (0, import_react72.useCallback)(() => {
39200
+ setIsExpanded(true);
37426
39201
  onAction?.({
37427
39202
  type: "view-creators",
37428
39203
  sessionId,
@@ -37431,30 +39206,41 @@ function CreatorWidgetInner({
37431
39206
  searchSpec
37432
39207
  });
37433
39208
  }, [onAction, sessionId, creatorIds, selectedVersion, searchSpec]);
37434
- if (!fetchVersions || !fetchStatus) {
37435
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(CreatorWidgetSkeleton, {});
37436
- }
37437
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
37438
- CreatorCompactView,
37439
- {
37440
- versions: versionNumbers,
37441
- selectedVersion,
37442
- creatorImages,
37443
- creatorLength,
37444
- isAgentOutput,
37445
- onVersionSelect: handleVersionSelect,
37446
- onViewCreators: handleViewCreators,
37447
- versionStatus,
37448
- statusDetails,
37449
- timeDisplay,
37450
- isLoading
37451
- }
37452
- ) });
39209
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className, children: [
39210
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
39211
+ CreatorCompactView,
39212
+ {
39213
+ versions: versionNumbers,
39214
+ selectedVersion,
39215
+ creatorImages,
39216
+ creatorLength,
39217
+ isAgentOutput,
39218
+ onVersionSelect: handleVersionSelect,
39219
+ onViewCreators: handleViewCreators,
39220
+ versionStatus,
39221
+ statusDetails,
39222
+ timeDisplay,
39223
+ isLoading
39224
+ }
39225
+ ),
39226
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
39227
+ CreatorExpandedPanel,
39228
+ {
39229
+ isOpen: isExpanded,
39230
+ onClose: () => setIsExpanded(false),
39231
+ sessionId,
39232
+ creatorIds,
39233
+ version: selectedVersion,
39234
+ searchSpec,
39235
+ fetchCreatorDetails
39236
+ }
39237
+ )
39238
+ ] });
37453
39239
  }
37454
- var CreatorWidget = (0, import_react68.memo)(CreatorWidgetInner);
39240
+ var CreatorWidget = (0, import_react72.memo)(CreatorWidgetInner);
37455
39241
 
37456
39242
  // src/molecules/workstream-builder/ToolListCard/ToolListCard.tsx
37457
- var import_jsx_runtime127 = require("react/jsx-runtime");
39243
+ var import_jsx_runtime134 = require("react/jsx-runtime");
37458
39244
  var FONT_STYLE = {
37459
39245
  fontFamily: "Inter, system-ui, sans-serif"
37460
39246
  };
@@ -37525,7 +39311,7 @@ var ToolListCard = ({
37525
39311
  grouped[cat].push(tool);
37526
39312
  }
37527
39313
  const categories = Object.keys(grouped);
37528
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
39314
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
37529
39315
  "div",
37530
39316
  {
37531
39317
  className: cn(
@@ -37534,34 +39320,34 @@ var ToolListCard = ({
37534
39320
  ),
37535
39321
  style: FONT_STYLE,
37536
39322
  children: [
37537
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
37538
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Wrench, { className: "w-3.5 h-3.5 text-interactive" }) }),
37539
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
37540
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: tools.length })
39323
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
39324
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Wrench, { className: "w-3.5 h-3.5 text-interactive" }) }),
39325
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
39326
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: tools.length })
37541
39327
  ] }),
37542
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
39328
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
37543
39329
  const CatIcon = resolveCategoryIcon(cat);
37544
39330
  const headerBg = CATEGORY_HEADER_BG[cat.toLowerCase()] || CATEGORY_HEADER_BG.general;
37545
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "px-4 py-3", children: [
37546
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: cn("flex items-center gap-2 mb-2.5 -mx-4 px-4 py-1.5", headerBg), children: [
37547
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
37548
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
37549
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
39331
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "px-4 py-3", children: [
39332
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: cn("flex items-center gap-2 mb-2.5 -mx-4 px-4 py-1.5", headerBg), children: [
39333
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
39334
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
39335
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
37550
39336
  ] }),
37551
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
39337
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
37552
39338
  const ToolIcon = resolveIcon(tool);
37553
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
39339
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
37554
39340
  "div",
37555
39341
  {
37556
39342
  className: "group flex items-start gap-3 px-3 py-2 rounded-lg hover:bg-[var(--foreground)]/[0.03] transition-colors",
37557
39343
  children: [
37558
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "shrink-0 mt-0.5 w-5 h-5 rounded flex items-center justify-center bg-interactive/[0.08]", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ToolIcon, { className: "w-3 h-3 text-interactive/60" }) }),
37559
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex-1 min-w-0", children: [
37560
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
37561
- tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)] truncate max-w-full", children: tool.display_name }),
37562
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-[11px] font-mono px-1.5 py-0.5 rounded bg-[var(--foreground)]/[0.06] text-[var(--foreground)]/50 border border-[var(--foreground)]/[0.06] truncate", children: tool.name })
39344
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "shrink-0 mt-0.5 w-5 h-5 rounded flex items-center justify-center bg-interactive/[0.08]", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ToolIcon, { className: "w-3 h-3 text-interactive/60" }) }),
39345
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex-1 min-w-0", children: [
39346
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
39347
+ tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)] truncate max-w-full", children: tool.display_name }),
39348
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "text-[11px] font-mono px-1.5 py-0.5 rounded bg-[var(--foreground)]/[0.06] text-[var(--foreground)]/50 border border-[var(--foreground)]/[0.06] truncate", children: tool.name })
37563
39349
  ] }),
37564
- tool.description && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed mt-0.5 break-words whitespace-normal", children: tool.description })
39350
+ tool.description && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed mt-0.5 break-words whitespace-normal", children: tool.description })
37565
39351
  ] })
37566
39352
  ]
37567
39353
  },
@@ -37576,8 +39362,8 @@ var ToolListCard = ({
37576
39362
  };
37577
39363
 
37578
39364
  // src/molecules/workstream-builder/AgentCard/AgentCard.tsx
37579
- var import_react69 = require("react");
37580
- var import_jsx_runtime128 = require("react/jsx-runtime");
39365
+ var import_react73 = require("react");
39366
+ var import_jsx_runtime135 = require("react/jsx-runtime");
37581
39367
  var FONT_STYLE2 = {
37582
39368
  fontFamily: "Inter, system-ui, sans-serif"
37583
39369
  };
@@ -37588,15 +39374,15 @@ var AgentCard = ({
37588
39374
  onSave,
37589
39375
  className
37590
39376
  }) => {
37591
- const [isEditing, setIsEditing] = (0, import_react69.useState)(false);
37592
- const [isSaving, setIsSaving] = (0, import_react69.useState)(false);
37593
- const [editState, setEditState] = (0, import_react69.useState)({
39377
+ const [isEditing, setIsEditing] = (0, import_react73.useState)(false);
39378
+ const [isSaving, setIsSaving] = (0, import_react73.useState)(false);
39379
+ const [editState, setEditState] = (0, import_react73.useState)({
37594
39380
  display_name: agent.display_name,
37595
39381
  description: agent.description,
37596
39382
  image: agent.image || ""
37597
39383
  });
37598
39384
  const avatarUrl = agent.image || `https://api.dicebear.com/7.x/avataaars/svg?seed=${agent.name}`;
37599
- const handleEdit = (0, import_react69.useCallback)(() => {
39385
+ const handleEdit = (0, import_react73.useCallback)(() => {
37600
39386
  setEditState({
37601
39387
  display_name: agent.display_name,
37602
39388
  description: agent.description,
@@ -37604,10 +39390,10 @@ var AgentCard = ({
37604
39390
  });
37605
39391
  setIsEditing(true);
37606
39392
  }, [agent]);
37607
- const handleCancel = (0, import_react69.useCallback)(() => {
39393
+ const handleCancel = (0, import_react73.useCallback)(() => {
37608
39394
  setIsEditing(false);
37609
39395
  }, []);
37610
- const handleSave = (0, import_react69.useCallback)(async () => {
39396
+ const handleSave = (0, import_react73.useCallback)(async () => {
37611
39397
  if (!onSave) return;
37612
39398
  const updates = {};
37613
39399
  if (editState.display_name !== agent.display_name)
@@ -37631,7 +39417,7 @@ var AgentCard = ({
37631
39417
  }
37632
39418
  }, [onSave, agent, editState]);
37633
39419
  if (compact) {
37634
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
39420
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
37635
39421
  "div",
37636
39422
  {
37637
39423
  className: cn(
@@ -37640,14 +39426,14 @@ var AgentCard = ({
37640
39426
  ),
37641
39427
  style: FONT_STYLE2,
37642
39428
  children: [
37643
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Avatar, { className: "h-8 w-8 shrink-0", children: [
37644
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
37645
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
39429
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Avatar, { className: "h-8 w-8 shrink-0", children: [
39430
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
39431
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
37646
39432
  ] }),
37647
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex-1 min-w-0", children: [
37648
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-2", children: [
37649
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
37650
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
39433
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex-1 min-w-0", children: [
39434
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center gap-2", children: [
39435
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
39436
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
37651
39437
  "span",
37652
39438
  {
37653
39439
  className: cn(
@@ -37655,7 +39441,7 @@ var AgentCard = ({
37655
39441
  agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
37656
39442
  ),
37657
39443
  children: [
37658
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: cn(
39444
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: cn(
37659
39445
  "w-1.5 h-1.5 rounded-full",
37660
39446
  agent.enabled ? "bg-emerald-500" : "bg-red-500"
37661
39447
  ) }),
@@ -37664,13 +39450,13 @@ var AgentCard = ({
37664
39450
  }
37665
39451
  )
37666
39452
  ] }),
37667
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
39453
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
37668
39454
  ] })
37669
39455
  ]
37670
39456
  }
37671
39457
  );
37672
39458
  }
37673
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
39459
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
37674
39460
  "div",
37675
39461
  {
37676
39462
  className: cn(
@@ -37679,14 +39465,14 @@ var AgentCard = ({
37679
39465
  ),
37680
39466
  style: FONT_STYLE2,
37681
39467
  children: [
37682
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
37683
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
37684
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
37685
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
39468
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
39469
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
39470
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
39471
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
37686
39472
  ] }),
37687
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex-1 min-w-0", children: [
37688
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-2", children: [
37689
- isEditing ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
39473
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex-1 min-w-0", children: [
39474
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center gap-2", children: [
39475
+ isEditing ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
37690
39476
  "input",
37691
39477
  {
37692
39478
  type: "text",
@@ -37696,9 +39482,9 @@ var AgentCard = ({
37696
39482
  className: "flex-1 bg-transparent border-b border-interactive/30 text-sm font-semibold text-foreground outline-none focus:border-interactive transition-all",
37697
39483
  placeholder: "Agent name"
37698
39484
  }
37699
- ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
37700
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: agent.name }),
37701
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
39485
+ ) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
39486
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: agent.name }),
39487
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
37702
39488
  "span",
37703
39489
  {
37704
39490
  className: cn(
@@ -37706,7 +39492,7 @@ var AgentCard = ({
37706
39492
  agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
37707
39493
  ),
37708
39494
  children: [
37709
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: cn(
39495
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: cn(
37710
39496
  "w-1.5 h-1.5 rounded-full",
37711
39497
  agent.enabled ? "bg-emerald-500" : "bg-red-500"
37712
39498
  ) }),
@@ -37715,7 +39501,7 @@ var AgentCard = ({
37715
39501
  }
37716
39502
  )
37717
39503
  ] }),
37718
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
39504
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
37719
39505
  "textarea",
37720
39506
  {
37721
39507
  value: editState.description,
@@ -37725,10 +39511,10 @@ var AgentCard = ({
37725
39511
  rows: 2,
37726
39512
  placeholder: "Describe this agent..."
37727
39513
  }
37728
- ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
37729
- isEditing && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [
37730
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
37731
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
39514
+ ) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
39515
+ isEditing && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [
39516
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
39517
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
37732
39518
  "input",
37733
39519
  {
37734
39520
  type: "text",
@@ -37741,8 +39527,8 @@ var AgentCard = ({
37741
39527
  )
37742
39528
  ] })
37743
39529
  ] }),
37744
- editable && onSave && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
37745
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
39530
+ editable && onSave && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
39531
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
37746
39532
  "button",
37747
39533
  {
37748
39534
  onClick: handleCancel,
@@ -37751,7 +39537,7 @@ var AgentCard = ({
37751
39537
  children: "Cancel"
37752
39538
  }
37753
39539
  ),
37754
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
39540
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
37755
39541
  "button",
37756
39542
  {
37757
39543
  onClick: handleSave,
@@ -37760,7 +39546,7 @@ var AgentCard = ({
37760
39546
  children: isSaving ? "Saving..." : "Save"
37761
39547
  }
37762
39548
  )
37763
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
39549
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
37764
39550
  "button",
37765
39551
  {
37766
39552
  onClick: handleEdit,
@@ -37769,18 +39555,18 @@ var AgentCard = ({
37769
39555
  }
37770
39556
  ) })
37771
39557
  ] }),
37772
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex flex-wrap items-center gap-3 px-5 pb-3 text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("span", { className: "text-[var(--foreground)]/40", children: [
39558
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "flex flex-wrap items-center gap-3 px-5 pb-3 text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("span", { className: "text-[var(--foreground)]/40", children: [
37773
39559
  "Model:",
37774
39560
  " ",
37775
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
39561
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
37776
39562
  ] }) }),
37777
- agent.tools && agent.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
37778
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
39563
+ agent.tools && agent.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
39564
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
37779
39565
  "Tools (",
37780
39566
  agent.tools.length,
37781
39567
  ")"
37782
39568
  ] }),
37783
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
39569
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
37784
39570
  "span",
37785
39571
  {
37786
39572
  className: "text-[11px] px-2 py-0.5 rounded-md bg-interactive/10 text-interactive font-mono border border-interactive/20",
@@ -37795,7 +39581,7 @@ var AgentCard = ({
37795
39581
  };
37796
39582
 
37797
39583
  // src/molecules/workstream-builder/AgentDataTable/AgentDataTable.tsx
37798
- var import_jsx_runtime129 = require("react/jsx-runtime");
39584
+ var import_jsx_runtime136 = require("react/jsx-runtime");
37799
39585
  var FONT_STYLE3 = {
37800
39586
  fontFamily: "Inter, system-ui, sans-serif"
37801
39587
  };
@@ -37806,7 +39592,7 @@ var AgentDataTable = ({
37806
39592
  }) => {
37807
39593
  const renderCell = (value) => {
37808
39594
  if (typeof value === "boolean") {
37809
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
39595
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
37810
39596
  "span",
37811
39597
  {
37812
39598
  className: cn(
@@ -37814,18 +39600,18 @@ var AgentDataTable = ({
37814
39600
  value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
37815
39601
  ),
37816
39602
  children: [
37817
- value ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
37818
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
37819
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
39603
+ value ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
39604
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
39605
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
37820
39606
  ] }),
37821
39607
  value ? "Yes" : "No"
37822
39608
  ]
37823
39609
  }
37824
39610
  );
37825
39611
  }
37826
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-[var(--foreground)]", children: String(value) });
39612
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "text-[var(--foreground)]", children: String(value) });
37827
39613
  };
37828
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
39614
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
37829
39615
  "div",
37830
39616
  {
37831
39617
  className: cn(
@@ -37833,8 +39619,8 @@ var AgentDataTable = ({
37833
39619
  className
37834
39620
  ),
37835
39621
  style: FONT_STYLE3,
37836
- children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("table", { className: "w-full text-xs", children: [
37837
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
39622
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("table", { className: "w-full text-xs", children: [
39623
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
37838
39624
  "th",
37839
39625
  {
37840
39626
  className: "text-left px-4 py-2.5 text-[11px] font-semibold text-[var(--foreground)]/60 uppercase tracking-wide whitespace-nowrap",
@@ -37842,14 +39628,14 @@ var AgentDataTable = ({
37842
39628
  },
37843
39629
  header
37844
39630
  )) }) }),
37845
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
39631
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
37846
39632
  "tr",
37847
39633
  {
37848
39634
  className: cn(
37849
39635
  "border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.03] transition-colors",
37850
39636
  rowIdx % 2 === 1 && "bg-[var(--foreground)]/[0.015]"
37851
39637
  ),
37852
- children: row.map((cell, cellIdx) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
39638
+ children: row.map((cell, cellIdx) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
37853
39639
  "td",
37854
39640
  {
37855
39641
  className: "px-4 py-2.5 text-xs whitespace-nowrap",
@@ -37866,8 +39652,8 @@ var AgentDataTable = ({
37866
39652
  };
37867
39653
 
37868
39654
  // src/molecules/workstream-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
37869
- var import_react70 = require("react");
37870
- var import_jsx_runtime130 = require("react/jsx-runtime");
39655
+ var import_react74 = require("react");
39656
+ var import_jsx_runtime137 = require("react/jsx-runtime");
37871
39657
  var FONT_STYLE4 = {
37872
39658
  fontFamily: "Inter, system-ui, sans-serif"
37873
39659
  };
@@ -37875,10 +39661,10 @@ var WorkflowVisualizer = ({
37875
39661
  steps,
37876
39662
  className
37877
39663
  }) => {
37878
- const [expandedStep, setExpandedStep] = (0, import_react70.useState)(
39664
+ const [expandedStep, setExpandedStep] = (0, import_react74.useState)(
37879
39665
  steps[0]?.id || null
37880
39666
  );
37881
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
39667
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
37882
39668
  "div",
37883
39669
  {
37884
39670
  className: cn(
@@ -37887,8 +39673,8 @@ var WorkflowVisualizer = ({
37887
39673
  ),
37888
39674
  style: FONT_STYLE4,
37889
39675
  children: [
37890
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
37891
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
39676
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
39677
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
37892
39678
  "svg",
37893
39679
  {
37894
39680
  width: "14",
@@ -37900,24 +39686,24 @@ var WorkflowVisualizer = ({
37900
39686
  className: "text-interactive",
37901
39687
  strokeLinecap: "round",
37902
39688
  strokeLinejoin: "round",
37903
- children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
39689
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
37904
39690
  }
37905
39691
  ) }),
37906
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
37907
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: [
39692
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
39693
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: [
37908
39694
  steps.length,
37909
39695
  " steps"
37910
39696
  ] })
37911
39697
  ] }),
37912
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
39698
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
37913
39699
  const isLast = idx === steps.length - 1;
37914
39700
  const isExpanded = expandedStep === step.id;
37915
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex gap-3", children: [
37916
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col items-center shrink-0", children: [
37917
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "w-7 h-7 rounded-full bg-interactive/10 border-2 border-interactive/30 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-[10px] font-bold text-interactive", children: idx + 1 }) }),
37918
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
39701
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex gap-3", children: [
39702
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col items-center shrink-0", children: [
39703
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "w-7 h-7 rounded-full bg-interactive/10 border-2 border-interactive/30 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-[10px] font-bold text-interactive", children: idx + 1 }) }),
39704
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
37919
39705
  ] }),
37920
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
39706
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
37921
39707
  "div",
37922
39708
  {
37923
39709
  className: cn(
@@ -37925,14 +39711,14 @@ var WorkflowVisualizer = ({
37925
39711
  isExpanded ? "bg-[var(--foreground)]/[0.02] shadow-sm" : "hover:bg-[var(--foreground)]/[0.02] hover:shadow-sm hover:-translate-y-0.5"
37926
39712
  ),
37927
39713
  children: [
37928
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
39714
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
37929
39715
  "button",
37930
39716
  {
37931
39717
  onClick: () => setExpandedStep(isExpanded ? null : step.id),
37932
39718
  className: "w-full text-left px-3 py-2.5 flex items-center gap-2 whitespace-normal",
37933
39719
  children: [
37934
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }) }),
37935
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
39720
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }) }),
39721
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
37936
39722
  "svg",
37937
39723
  {
37938
39724
  width: "12",
@@ -37945,28 +39731,28 @@ var WorkflowVisualizer = ({
37945
39731
  "shrink-0 text-[var(--foreground)]/30 transition-transform",
37946
39732
  isExpanded && "rotate-180"
37947
39733
  ),
37948
- children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("polyline", { points: "6 9 12 15 18 9" })
39734
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("polyline", { points: "6 9 12 15 18 9" })
37949
39735
  }
37950
39736
  )
37951
39737
  ]
37952
39738
  }
37953
39739
  ),
37954
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "px-3 pb-3 space-y-2.5", children: [
37955
- step.description && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
37956
- step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
39740
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "px-3 pb-3 space-y-2.5", children: [
39741
+ step.description && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
39742
+ step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
37957
39743
  "div",
37958
39744
  {
37959
39745
  className: "flex items-start gap-2 text-xs",
37960
39746
  children: [
37961
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
37962
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-[var(--foreground)]/60", children: sub.action })
39747
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
39748
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-[var(--foreground)]/60", children: sub.action })
37963
39749
  ]
37964
39750
  },
37965
39751
  sub.id
37966
39752
  )) }),
37967
- step.tools && step.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
37968
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
37969
- step.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
39753
+ step.tools && step.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
39754
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
39755
+ step.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
37970
39756
  "span",
37971
39757
  {
37972
39758
  className: "text-[10px] font-mono px-1.5 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
@@ -37975,9 +39761,9 @@ var WorkflowVisualizer = ({
37975
39761
  tool
37976
39762
  ))
37977
39763
  ] }),
37978
- step.on_failure && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex items-start gap-2 text-xs bg-[var(--redBackground,_#ef4444)]/[0.06] border border-[var(--redText,_#ef4444)]/10 rounded-md px-2.5 py-2 whitespace-normal", children: [
37979
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "shrink-0 text-[10px] font-semibold text-[var(--redText,_#ef4444)]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
37980
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
39764
+ step.on_failure && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex items-start gap-2 text-xs bg-[var(--redBackground,_#ef4444)]/[0.06] border border-[var(--redText,_#ef4444)]/10 rounded-md px-2.5 py-2 whitespace-normal", children: [
39765
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "shrink-0 text-[10px] font-semibold text-[var(--redText,_#ef4444)]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
39766
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
37981
39767
  ] })
37982
39768
  ] })
37983
39769
  ]
@@ -37991,8 +39777,8 @@ var WorkflowVisualizer = ({
37991
39777
  };
37992
39778
 
37993
39779
  // src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
37994
- var import_react71 = require("react");
37995
- var import_jsx_runtime131 = require("react/jsx-runtime");
39780
+ var import_react75 = require("react");
39781
+ var import_jsx_runtime138 = require("react/jsx-runtime");
37996
39782
  var FONT_STYLE5 = {
37997
39783
  fontFamily: "Inter, system-ui, sans-serif"
37998
39784
  };
@@ -38004,12 +39790,12 @@ var InstructionPreview = ({
38004
39790
  tools,
38005
39791
  className
38006
39792
  }) => {
38007
- const [isExpanded, setIsExpanded] = (0, import_react71.useState)(false);
38008
- const [copied, setCopied] = (0, import_react71.useState)(false);
39793
+ const [isExpanded, setIsExpanded] = (0, import_react75.useState)(false);
39794
+ const [copied, setCopied] = (0, import_react75.useState)(false);
38009
39795
  const previewLength = 300;
38010
39796
  const isLong = instruction.length > previewLength;
38011
39797
  const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
38012
- const handleCopy = (0, import_react71.useCallback)(async () => {
39798
+ const handleCopy = (0, import_react75.useCallback)(async () => {
38013
39799
  try {
38014
39800
  await navigator.clipboard.writeText(instruction);
38015
39801
  setCopied(true);
@@ -38027,7 +39813,7 @@ var InstructionPreview = ({
38027
39813
  setTimeout(() => setCopied(false), 2e3);
38028
39814
  }
38029
39815
  }, [instruction]);
38030
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
39816
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
38031
39817
  "div",
38032
39818
  {
38033
39819
  className: cn(
@@ -38036,8 +39822,8 @@ var InstructionPreview = ({
38036
39822
  ),
38037
39823
  style: FONT_STYLE5,
38038
39824
  children: [
38039
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-center gap-2.5", children: [
38040
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
39825
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-2.5", children: [
39826
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
38041
39827
  "svg",
38042
39828
  {
38043
39829
  width: "14",
@@ -38050,24 +39836,24 @@ var InstructionPreview = ({
38050
39836
  strokeLinecap: "round",
38051
39837
  strokeLinejoin: "round",
38052
39838
  children: [
38053
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
38054
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("polyline", { points: "14 2 14 8 20 8" }),
38055
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
38056
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
38057
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("polyline", { points: "10 9 9 9 8 9" })
39839
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
39840
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("polyline", { points: "14 2 14 8 20 8" }),
39841
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
39842
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
39843
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("polyline", { points: "10 9 9 9 8 9" })
38058
39844
  ]
38059
39845
  }
38060
39846
  ) }),
38061
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex-1 min-w-0", children: [
38062
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
38063
- description && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
39847
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex-1 min-w-0", children: [
39848
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
39849
+ description && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
38064
39850
  ] })
38065
39851
  ] }) }),
38066
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "px-4 py-3 space-y-3", children: [
38067
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { children: [
38068
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-center justify-between mb-1.5", children: [
38069
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
38070
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
39852
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "px-4 py-3 space-y-3", children: [
39853
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { children: [
39854
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center justify-between mb-1.5", children: [
39855
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
39856
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
38071
39857
  "button",
38072
39858
  {
38073
39859
  onClick: handleCopy,
@@ -38076,14 +39862,14 @@ var InstructionPreview = ({
38076
39862
  }
38077
39863
  )
38078
39864
  ] }),
38079
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-pre-wrap font-mono bg-[var(--foreground)]/[0.02] border border-[var(--border-color)] rounded-lg p-3", children: displayText }),
38080
- isLong && /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
39865
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-pre-wrap font-mono bg-[var(--foreground)]/[0.02] border border-[var(--border-color)] rounded-lg p-3", children: displayText }),
39866
+ isLong && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
38081
39867
  "button",
38082
39868
  {
38083
39869
  onClick: () => setIsExpanded(!isExpanded),
38084
39870
  className: "inline-flex items-center gap-1 text-[11px] text-interactive hover:underline mt-1",
38085
39871
  children: [
38086
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
39872
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
38087
39873
  "svg",
38088
39874
  {
38089
39875
  width: "12",
@@ -38093,7 +39879,7 @@ var InstructionPreview = ({
38093
39879
  stroke: "currentColor",
38094
39880
  strokeWidth: "2",
38095
39881
  className: cn("transition-transform", isExpanded && "rotate-180"),
38096
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("polyline", { points: "6 9 12 15 18 9" })
39882
+ children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("polyline", { points: "6 9 12 15 18 9" })
38097
39883
  }
38098
39884
  ),
38099
39885
  isExpanded ? "Show less" : "Show full instruction"
@@ -38101,16 +39887,16 @@ var InstructionPreview = ({
38101
39887
  }
38102
39888
  )
38103
39889
  ] }),
38104
- workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { children: [
38105
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
38106
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "space-y-1", children: workflow_summary.map((step, idx) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-start gap-2 text-xs", children: [
38107
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "shrink-0 w-5 h-5 rounded-full bg-interactive/10 flex items-center justify-center text-[10px] font-bold text-interactive", children: idx + 1 }),
38108
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
39890
+ workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { children: [
39891
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
39892
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "space-y-1", children: workflow_summary.map((step, idx) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-start gap-2 text-xs", children: [
39893
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "shrink-0 w-5 h-5 rounded-full bg-interactive/10 flex items-center justify-center text-[10px] font-bold text-interactive", children: idx + 1 }),
39894
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
38109
39895
  ] }, idx)) })
38110
39896
  ] }),
38111
- tools && tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { children: [
38112
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
38113
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
39897
+ tools && tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { children: [
39898
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
39899
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
38114
39900
  "span",
38115
39901
  {
38116
39902
  className: "text-[10px] font-mono px-2 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
@@ -38126,8 +39912,8 @@ var InstructionPreview = ({
38126
39912
  };
38127
39913
 
38128
39914
  // src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
38129
- var import_react72 = require("react");
38130
- var import_jsx_runtime132 = require("react/jsx-runtime");
39915
+ var import_react76 = require("react");
39916
+ var import_jsx_runtime139 = require("react/jsx-runtime");
38131
39917
  var FONT_STYLE6 = {
38132
39918
  fontFamily: "Inter, system-ui, sans-serif"
38133
39919
  };
@@ -38138,11 +39924,11 @@ function UIComponentSelector({
38138
39924
  className,
38139
39925
  isLatestMessage = true
38140
39926
  }) {
38141
- const [selected, setSelected] = (0, import_react72.useState)(() => {
39927
+ const [selected, setSelected] = (0, import_react76.useState)(() => {
38142
39928
  const recommended = components.filter((c) => c.recommended).map((c) => c.name);
38143
39929
  return new Set(recommended);
38144
39930
  });
38145
- const [submitted, setSubmitted] = (0, import_react72.useState)(false);
39931
+ const [submitted, setSubmitted] = (0, import_react76.useState)(false);
38146
39932
  const grouped = components.reduce(
38147
39933
  (acc, comp) => {
38148
39934
  const cat = comp.category || "Other";
@@ -38166,7 +39952,7 @@ function UIComponentSelector({
38166
39952
  onSelect?.(Array.from(selected));
38167
39953
  };
38168
39954
  const categoryOrder = Object.keys(grouped).sort();
38169
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
39955
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
38170
39956
  "div",
38171
39957
  {
38172
39958
  className: cn(
@@ -38175,8 +39961,8 @@ function UIComponentSelector({
38175
39961
  ),
38176
39962
  style: FONT_STYLE6,
38177
39963
  children: [
38178
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-2", children: [
38179
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
39964
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex items-center gap-2", children: [
39965
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
38180
39966
  "svg",
38181
39967
  {
38182
39968
  width: "12",
@@ -38187,21 +39973,21 @@ function UIComponentSelector({
38187
39973
  strokeWidth: "2",
38188
39974
  className: "text-interactive",
38189
39975
  children: [
38190
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
38191
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
38192
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
38193
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
39976
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
39977
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
39978
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
39979
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
38194
39980
  ]
38195
39981
  }
38196
39982
  ) }),
38197
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { children: [
38198
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h3", { className: "text-xs font-semibold text-foreground", children: "Select UI Components" }),
38199
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
39983
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { children: [
39984
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("h3", { className: "text-xs font-semibold text-foreground", children: "Select UI Components" }),
39985
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
38200
39986
  ] })
38201
39987
  ] }) }),
38202
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { children: [
38203
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h4", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-2", children: category }),
38204
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
39988
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { children: [
39989
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("h4", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-2", children: category }),
39990
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
38205
39991
  "label",
38206
39992
  {
38207
39993
  className: cn(
@@ -38211,7 +39997,7 @@ function UIComponentSelector({
38211
39997
  selected.has(comp.name) && submitted && "bg-interactive/5"
38212
39998
  ),
38213
39999
  children: [
38214
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
40000
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
38215
40001
  "div",
38216
40002
  {
38217
40003
  className: cn(
@@ -38222,7 +40008,7 @@ function UIComponentSelector({
38222
40008
  e.preventDefault();
38223
40009
  toggle(comp.name);
38224
40010
  },
38225
- children: selected.has(comp.name) && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
40011
+ children: selected.has(comp.name) && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
38226
40012
  "svg",
38227
40013
  {
38228
40014
  width: "10",
@@ -38231,12 +40017,12 @@ function UIComponentSelector({
38231
40017
  fill: "none",
38232
40018
  stroke: "white",
38233
40019
  strokeWidth: "3",
38234
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("polyline", { points: "20 6 9 17 4 12" })
40020
+ children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("polyline", { points: "20 6 9 17 4 12" })
38235
40021
  }
38236
40022
  )
38237
40023
  }
38238
40024
  ),
38239
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
40025
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
38240
40026
  "input",
38241
40027
  {
38242
40028
  type: "checkbox",
@@ -38246,11 +40032,11 @@ function UIComponentSelector({
38246
40032
  className: "sr-only"
38247
40033
  }
38248
40034
  ),
38249
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex-1 min-w-0", children: [
38250
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-1", children: [
38251
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
38252
- comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20", children: "Recommended" }),
38253
- onPreview && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
40035
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex-1 min-w-0", children: [
40036
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex items-center gap-1", children: [
40037
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
40038
+ comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20", children: "Recommended" }),
40039
+ onPreview && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
38254
40040
  "button",
38255
40041
  {
38256
40042
  type: "button",
@@ -38261,7 +40047,7 @@ function UIComponentSelector({
38261
40047
  },
38262
40048
  className: "shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
38263
40049
  title: `Preview ${comp.display_name}`,
38264
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
40050
+ children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
38265
40051
  "svg",
38266
40052
  {
38267
40053
  width: "14",
@@ -38274,28 +40060,28 @@ function UIComponentSelector({
38274
40060
  strokeLinejoin: "round",
38275
40061
  className: "text-muted-foreground hover:text-interactive",
38276
40062
  children: [
38277
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
38278
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
38279
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
40063
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
40064
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
40065
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
38280
40066
  ]
38281
40067
  }
38282
40068
  )
38283
40069
  }
38284
40070
  )
38285
40071
  ] }),
38286
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
40072
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
38287
40073
  ] })
38288
40074
  ]
38289
40075
  },
38290
40076
  comp.name
38291
40077
  )) })
38292
40078
  ] }, category)) }),
38293
- !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "px-4 py-3 border-t border-border/60 flex items-center justify-between bg-muted/30", children: [
38294
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
40079
+ !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "px-4 py-3 border-t border-border/60 flex items-center justify-between bg-muted/30", children: [
40080
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
38295
40081
  selected.size,
38296
40082
  " selected"
38297
40083
  ] }),
38298
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
40084
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
38299
40085
  "button",
38300
40086
  {
38301
40087
  onClick: handleContinue,
@@ -38304,14 +40090,14 @@ function UIComponentSelector({
38304
40090
  }
38305
40091
  )
38306
40092
  ] }),
38307
- submitted && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "px-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
40093
+ submitted && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "px-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
38308
40094
  ]
38309
40095
  }
38310
40096
  );
38311
40097
  }
38312
40098
 
38313
40099
  // src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
38314
- var import_jsx_runtime133 = require("react/jsx-runtime");
40100
+ var import_jsx_runtime140 = require("react/jsx-runtime");
38315
40101
  var FONT_STYLE7 = {
38316
40102
  fontFamily: "Inter, system-ui, sans-serif"
38317
40103
  };
@@ -38324,7 +40110,7 @@ var MultiAgentCard = ({
38324
40110
  className
38325
40111
  }) => {
38326
40112
  const avatarUrl = `https://api.dicebear.com/7.x/avataaars/svg?seed=${name}`;
38327
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
40113
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
38328
40114
  "div",
38329
40115
  {
38330
40116
  className: cn(
@@ -38333,14 +40119,14 @@ var MultiAgentCard = ({
38333
40119
  ),
38334
40120
  style: FONT_STYLE7,
38335
40121
  children: [
38336
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
38337
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "h-12 w-12 shrink-0 rounded-full border-2 border-interactive/20 overflow-hidden bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
38338
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex-1 min-w-0", children: [
38339
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-2", children: [
38340
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
38341
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: name }),
38342
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-[10px] px-2 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
38343
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
40122
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
40123
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "h-12 w-12 shrink-0 rounded-full border-2 border-interactive/20 overflow-hidden bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
40124
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex-1 min-w-0", children: [
40125
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex items-center gap-2", children: [
40126
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
40127
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: name }),
40128
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "text-[10px] px-2 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
40129
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
38344
40130
  "span",
38345
40131
  {
38346
40132
  className: cn(
@@ -38348,7 +40134,7 @@ var MultiAgentCard = ({
38348
40134
  enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
38349
40135
  ),
38350
40136
  children: [
38351
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: cn(
40137
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: cn(
38352
40138
  "w-1.5 h-1.5 rounded-full",
38353
40139
  enabled ? "bg-emerald-500" : "bg-red-500"
38354
40140
  ) }),
@@ -38357,18 +40143,18 @@ var MultiAgentCard = ({
38357
40143
  }
38358
40144
  )
38359
40145
  ] }),
38360
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed mt-1 whitespace-normal", style: { textWrap: "auto" }, children: description })
40146
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed mt-1 whitespace-normal", style: { textWrap: "auto" }, children: description })
38361
40147
  ] })
38362
40148
  ] }),
38363
- stages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
38364
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
40149
+ stages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
40150
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
38365
40151
  "Stages (",
38366
40152
  stages.length,
38367
40153
  ")"
38368
40154
  ] }),
38369
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-stretch", children: [
38370
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex flex-col items-center mr-3 w-5", children: [
38371
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
40155
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex items-stretch", children: [
40156
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex flex-col items-center mr-3 w-5", children: [
40157
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
38372
40158
  "div",
38373
40159
  {
38374
40160
  className: cn(
@@ -38378,20 +40164,20 @@ var MultiAgentCard = ({
38378
40164
  children: idx + 1
38379
40165
  }
38380
40166
  ),
38381
- idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "w-px flex-1 min-h-[16px] border-l border-dashed border-interactive/30" })
40167
+ idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "w-px flex-1 min-h-[16px] border-l border-dashed border-interactive/30" })
38382
40168
  ] }),
38383
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
38384
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-2", children: [
38385
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
38386
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30 bg-[var(--foreground)]/[0.04] px-1.5 py-0.5 rounded", children: stage.agent_name })
40169
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
40170
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex items-center gap-2", children: [
40171
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
40172
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30 bg-[var(--foreground)]/[0.04] px-1.5 py-0.5 rounded", children: stage.agent_name })
38387
40173
  ] }),
38388
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
38389
- stage.tools && stage.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("span", { children: [
40174
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
40175
+ stage.tools && stage.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("span", { children: [
38390
40176
  stage.tools.length,
38391
40177
  " tool",
38392
40178
  stage.tools.length !== 1 ? "s" : ""
38393
40179
  ] }),
38394
- stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("span", { children: [
40180
+ stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("span", { children: [
38395
40181
  stage.ui_components.length,
38396
40182
  " component",
38397
40183
  stage.ui_components.length !== 1 ? "s" : ""
@@ -38406,7 +40192,7 @@ var MultiAgentCard = ({
38406
40192
  };
38407
40193
 
38408
40194
  // src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
38409
- var import_jsx_runtime134 = require("react/jsx-runtime");
40195
+ var import_jsx_runtime141 = require("react/jsx-runtime");
38410
40196
  var FONT_STYLE8 = {
38411
40197
  fontFamily: "Inter, system-ui, sans-serif"
38412
40198
  };
@@ -38414,7 +40200,7 @@ var MultiAgentPlan = ({
38414
40200
  stages = [],
38415
40201
  className
38416
40202
  }) => {
38417
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
40203
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
38418
40204
  "div",
38419
40205
  {
38420
40206
  className: cn(
@@ -38423,8 +40209,8 @@ var MultiAgentPlan = ({
38423
40209
  ),
38424
40210
  style: FONT_STYLE8,
38425
40211
  children: [
38426
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex items-center gap-2", children: [
38427
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
40212
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex items-center gap-2", children: [
40213
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
38428
40214
  "svg",
38429
40215
  {
38430
40216
  width: "10",
@@ -38434,20 +40220,20 @@ var MultiAgentPlan = ({
38434
40220
  stroke: "currentColor",
38435
40221
  strokeWidth: "2",
38436
40222
  className: "text-violet-600",
38437
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
40223
+ children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
38438
40224
  }
38439
40225
  ) }),
38440
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
38441
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-600 font-medium", children: "Draft" })
40226
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
40227
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-600 font-medium", children: "Draft" })
38442
40228
  ] }) }),
38443
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex items-stretch min-w-0", children: [
38444
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-col items-center mr-3 w-6", children: [
38445
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0 bg-interactive/10 text-interactive border border-interactive/30", children: idx + 1 }),
38446
- idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "w-px flex-1 min-h-[12px] border-l border-dashed border-interactive/30" })
40229
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex items-stretch min-w-0", children: [
40230
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex flex-col items-center mr-3 w-6", children: [
40231
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0 bg-interactive/10 text-interactive border border-interactive/30", children: idx + 1 }),
40232
+ idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "w-px flex-1 min-h-[12px] border-l border-dashed border-interactive/30" })
38447
40233
  ] }),
38448
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
38449
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
38450
- stage.description && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
40234
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
40235
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
40236
+ stage.description && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
38451
40237
  "p",
38452
40238
  {
38453
40239
  className: "text-[11px] text-foreground/50 mt-0.5 whitespace-normal",
@@ -38455,7 +40241,7 @@ var MultiAgentPlan = ({
38455
40241
  children: stage.description
38456
40242
  }
38457
40243
  ),
38458
- stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "flex flex-wrap gap-1 mt-1.5", children: stage.proposed_tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
40244
+ stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", { className: "flex flex-wrap gap-1 mt-1.5", children: stage.proposed_tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
38459
40245
  "span",
38460
40246
  {
38461
40247
  className: "text-[10px] px-1.5 py-0.5 rounded bg-interactive/10 text-interactive font-mono",
@@ -38471,8 +40257,8 @@ var MultiAgentPlan = ({
38471
40257
  };
38472
40258
 
38473
40259
  // src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
38474
- var import_react73 = require("react");
38475
- var import_jsx_runtime135 = require("react/jsx-runtime");
40260
+ var import_react77 = require("react");
40261
+ var import_jsx_runtime142 = require("react/jsx-runtime");
38476
40262
  var FONT_STYLE9 = {
38477
40263
  fontFamily: "Inter, system-ui, sans-serif"
38478
40264
  };
@@ -38484,8 +40270,8 @@ var MultiAgentUISelector = ({
38484
40270
  className,
38485
40271
  isLatestMessage = true
38486
40272
  }) => {
38487
- const [activeStageId, setActiveStageId] = (0, import_react73.useState)(stages[0]?.id || "");
38488
- const [selections, setSelections] = (0, import_react73.useState)(
40273
+ const [activeStageId, setActiveStageId] = (0, import_react77.useState)(stages[0]?.id || "");
40274
+ const [selections, setSelections] = (0, import_react77.useState)(
38489
40275
  () => {
38490
40276
  const init = {};
38491
40277
  const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
@@ -38496,14 +40282,14 @@ var MultiAgentUISelector = ({
38496
40282
  return init;
38497
40283
  }
38498
40284
  );
38499
- const [submitted, setSubmitted] = (0, import_react73.useState)(false);
40285
+ const [submitted, setSubmitted] = (0, import_react77.useState)(false);
38500
40286
  const grouped = components.reduce((acc, comp) => {
38501
40287
  const cat = comp.category || "Other";
38502
40288
  if (!acc[cat]) acc[cat] = [];
38503
40289
  acc[cat].push(comp);
38504
40290
  return acc;
38505
40291
  }, {});
38506
- const toggleComponent = (0, import_react73.useCallback)(
40292
+ const toggleComponent = (0, import_react77.useCallback)(
38507
40293
  (stageId, compName) => {
38508
40294
  if (submitted || !isLatestMessage) return;
38509
40295
  setSelections((prev) => {
@@ -38520,7 +40306,7 @@ var MultiAgentUISelector = ({
38520
40306
  },
38521
40307
  [submitted]
38522
40308
  );
38523
- const selectAll = (0, import_react73.useCallback)(
40309
+ const selectAll = (0, import_react77.useCallback)(
38524
40310
  (stageId) => {
38525
40311
  if (submitted || !isLatestMessage) return;
38526
40312
  setSelections((prev) => {
@@ -38531,7 +40317,7 @@ var MultiAgentUISelector = ({
38531
40317
  },
38532
40318
  [submitted, isLatestMessage, components]
38533
40319
  );
38534
- const clearAll = (0, import_react73.useCallback)(
40320
+ const clearAll = (0, import_react77.useCallback)(
38535
40321
  (stageId) => {
38536
40322
  if (submitted || !isLatestMessage) return;
38537
40323
  setSelections((prev) => {
@@ -38542,7 +40328,7 @@ var MultiAgentUISelector = ({
38542
40328
  },
38543
40329
  [submitted, isLatestMessage]
38544
40330
  );
38545
- const handleContinue = (0, import_react73.useCallback)(() => {
40331
+ const handleContinue = (0, import_react77.useCallback)(() => {
38546
40332
  setSubmitted(true);
38547
40333
  if (onSelect) {
38548
40334
  const result = {};
@@ -38553,7 +40339,7 @@ var MultiAgentUISelector = ({
38553
40339
  }
38554
40340
  }, [onSelect, selections]);
38555
40341
  const activeStage = stages.find((s) => s.id === activeStageId);
38556
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
40342
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
38557
40343
  "div",
38558
40344
  {
38559
40345
  className: cn(
@@ -38562,8 +40348,8 @@ var MultiAgentUISelector = ({
38562
40348
  ),
38563
40349
  style: FONT_STYLE9,
38564
40350
  children: [
38565
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center gap-2", children: [
38566
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
40351
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-2", children: [
40352
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
38567
40353
  "svg",
38568
40354
  {
38569
40355
  width: "12",
@@ -38574,16 +40360,16 @@ var MultiAgentUISelector = ({
38574
40360
  strokeWidth: "2",
38575
40361
  className: "text-interactive",
38576
40362
  children: [
38577
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
38578
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
38579
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
38580
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
40363
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
40364
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
40365
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
40366
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
38581
40367
  ]
38582
40368
  }
38583
40369
  ) }),
38584
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "text-xs font-semibold text-foreground", children: "UI Components per Stage" })
40370
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-xs font-semibold text-foreground", children: "UI Components per Stage" })
38585
40371
  ] }) }),
38586
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "flex gap-1 border-b border-border/60 px-4 py-2 bg-muted/20", children: stages.map((stage) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40372
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "flex gap-1 border-b border-border/60 px-4 py-2 bg-muted/20", children: stages.map((stage) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
38587
40373
  "button",
38588
40374
  {
38589
40375
  onClick: () => setActiveStageId(stage.id),
@@ -38595,17 +40381,17 @@ var MultiAgentUISelector = ({
38595
40381
  },
38596
40382
  stage.id
38597
40383
  )) }),
38598
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "px-4 py-3", children: [
38599
- activeStage && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
38600
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("p", { className: "text-[10px] text-muted-foreground", children: [
40384
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "px-4 py-3", children: [
40385
+ activeStage && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
40386
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("p", { className: "text-[10px] text-muted-foreground", children: [
38601
40387
  "Select components for ",
38602
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("strong", { className: "text-foreground", children: activeStage.name }),
40388
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("strong", { className: "text-foreground", children: activeStage.name }),
38603
40389
  " (",
38604
40390
  activeStage.agent_name,
38605
40391
  ")"
38606
40392
  ] }),
38607
- !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center gap-2", children: [
38608
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40393
+ !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-2", children: [
40394
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
38609
40395
  "button",
38610
40396
  {
38611
40397
  onClick: () => selectAll(activeStageId),
@@ -38613,8 +40399,8 @@ var MultiAgentUISelector = ({
38613
40399
  children: "Select All"
38614
40400
  }
38615
40401
  ),
38616
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "text-muted-foreground/40", children: "|" }),
38617
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40402
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-muted-foreground/40", children: "|" }),
40403
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
38618
40404
  "button",
38619
40405
  {
38620
40406
  onClick: () => clearAll(activeStageId),
@@ -38624,11 +40410,11 @@ var MultiAgentUISelector = ({
38624
40410
  )
38625
40411
  ] })
38626
40412
  ] }),
38627
- Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "mb-3", children: [
38628
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("p", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wide mb-1.5", children: category }),
38629
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
40413
+ Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "mb-3", children: [
40414
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wide mb-1.5", children: category }),
40415
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
38630
40416
  const isSelected = selections[activeStageId]?.has(comp.name) || false;
38631
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
40417
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
38632
40418
  "div",
38633
40419
  {
38634
40420
  role: "button",
@@ -38646,15 +40432,15 @@ var MultiAgentUISelector = ({
38646
40432
  (submitted || !isLatestMessage) && "opacity-60 cursor-default"
38647
40433
  ),
38648
40434
  children: [
38649
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center gap-1.5", children: [
38650
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40435
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-1.5", children: [
40436
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
38651
40437
  "div",
38652
40438
  {
38653
40439
  className: cn(
38654
40440
  "w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0",
38655
40441
  isSelected ? "bg-interactive border-interactive" : "border-muted-foreground/30"
38656
40442
  ),
38657
- children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40443
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
38658
40444
  "svg",
38659
40445
  {
38660
40446
  width: "8",
@@ -38663,14 +40449,14 @@ var MultiAgentUISelector = ({
38663
40449
  fill: "none",
38664
40450
  stroke: "white",
38665
40451
  strokeWidth: "3",
38666
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("polyline", { points: "20 6 9 17 4 12" })
40452
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("polyline", { points: "20 6 9 17 4 12" })
38667
40453
  }
38668
40454
  )
38669
40455
  }
38670
40456
  ),
38671
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-medium text-foreground", children: comp.display_name }),
38672
- comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "px-1 py-px text-[8px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 leading-tight", children: "Rec" }),
38673
- onPreview && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40457
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "font-medium text-foreground", children: comp.display_name }),
40458
+ comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "px-1 py-px text-[8px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 leading-tight", children: "Rec" }),
40459
+ onPreview && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
38674
40460
  "button",
38675
40461
  {
38676
40462
  type: "button",
@@ -38680,7 +40466,7 @@ var MultiAgentUISelector = ({
38680
40466
  },
38681
40467
  className: "ml-auto shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
38682
40468
  title: `Preview ${comp.display_name}`,
38683
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
40469
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
38684
40470
  "svg",
38685
40471
  {
38686
40472
  width: "14",
@@ -38693,16 +40479,16 @@ var MultiAgentUISelector = ({
38693
40479
  strokeLinejoin: "round",
38694
40480
  className: "text-muted-foreground hover:text-primary",
38695
40481
  children: [
38696
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
38697
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
38698
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
40482
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
40483
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
40484
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
38699
40485
  ]
38700
40486
  }
38701
40487
  )
38702
40488
  }
38703
40489
  )
38704
40490
  ] }),
38705
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("p", { className: "text-[10px] text-muted-foreground mt-0.5 ml-5 whitespace-normal", children: comp.description })
40491
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-[10px] text-muted-foreground mt-0.5 ml-5 whitespace-normal", children: comp.description })
38706
40492
  ]
38707
40493
  },
38708
40494
  comp.name
@@ -38710,7 +40496,7 @@ var MultiAgentUISelector = ({
38710
40496
  }) })
38711
40497
  ] }, category))
38712
40498
  ] }),
38713
- !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "px-4 py-3 border-t border-border/60 bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40499
+ !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "px-4 py-3 border-t border-border/60 bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
38714
40500
  "button",
38715
40501
  {
38716
40502
  onClick: handleContinue,
@@ -38718,14 +40504,14 @@ var MultiAgentUISelector = ({
38718
40504
  children: "Continue"
38719
40505
  }
38720
40506
  ) }),
38721
- submitted && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "px-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
40507
+ submitted && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "px-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
38722
40508
  ]
38723
40509
  }
38724
40510
  );
38725
40511
  };
38726
40512
 
38727
40513
  // src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
38728
- var import_jsx_runtime136 = require("react/jsx-runtime");
40514
+ var import_jsx_runtime143 = require("react/jsx-runtime");
38729
40515
  var FONT_STYLE10 = {
38730
40516
  fontFamily: "Inter, system-ui, sans-serif"
38731
40517
  };
@@ -38734,7 +40520,7 @@ var StageIndicator = ({
38734
40520
  agent_name,
38735
40521
  className
38736
40522
  }) => {
38737
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
40523
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
38738
40524
  "div",
38739
40525
  {
38740
40526
  className: cn(
@@ -38743,12 +40529,12 @@ var StageIndicator = ({
38743
40529
  ),
38744
40530
  style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
38745
40531
  children: [
38746
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
38747
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-1 rounded-full bg-violet-500/10 border border-violet-500/20", children: [
38748
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
38749
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
40532
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
40533
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-1 rounded-full bg-violet-500/10 border border-violet-500/20", children: [
40534
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
40535
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
38750
40536
  ] }),
38751
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
40537
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
38752
40538
  ]
38753
40539
  }
38754
40540
  );
@@ -39046,7 +40832,7 @@ __export(ui_exports, {
39046
40832
  // src/components/ui/button-group.tsx
39047
40833
  var import_react_slot4 = require("@radix-ui/react-slot");
39048
40834
  var import_class_variance_authority8 = require("class-variance-authority");
39049
- var import_jsx_runtime137 = require("react/jsx-runtime");
40835
+ var import_jsx_runtime144 = require("react/jsx-runtime");
39050
40836
  var buttonGroupVariants = (0, import_class_variance_authority8.cva)(
39051
40837
  "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",
39052
40838
  {
@@ -39066,7 +40852,7 @@ function ButtonGroup({
39066
40852
  orientation,
39067
40853
  ...props
39068
40854
  }) {
39069
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
40855
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
39070
40856
  "div",
39071
40857
  {
39072
40858
  role: "group",
@@ -39083,7 +40869,7 @@ function ButtonGroupText({
39083
40869
  ...props
39084
40870
  }) {
39085
40871
  const Comp = asChild ? import_react_slot4.Slot : "div";
39086
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
40872
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
39087
40873
  Comp,
39088
40874
  {
39089
40875
  className: cn(
@@ -39099,7 +40885,7 @@ function ButtonGroupSeparator({
39099
40885
  orientation = "vertical",
39100
40886
  ...props
39101
40887
  }) {
39102
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
40888
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
39103
40889
  Separator2,
39104
40890
  {
39105
40891
  "data-slot": "button-group-separator",
@@ -39115,9 +40901,9 @@ function ButtonGroupSeparator({
39115
40901
 
39116
40902
  // src/components/ui/empty.tsx
39117
40903
  var import_class_variance_authority9 = require("class-variance-authority");
39118
- var import_jsx_runtime138 = require("react/jsx-runtime");
40904
+ var import_jsx_runtime145 = require("react/jsx-runtime");
39119
40905
  function Empty({ className, ...props }) {
39120
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
40906
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
39121
40907
  "div",
39122
40908
  {
39123
40909
  "data-slot": "empty",
@@ -39130,7 +40916,7 @@ function Empty({ className, ...props }) {
39130
40916
  );
39131
40917
  }
39132
40918
  function EmptyHeader({ className, ...props }) {
39133
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
40919
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
39134
40920
  "div",
39135
40921
  {
39136
40922
  "data-slot": "empty-header",
@@ -39161,7 +40947,7 @@ function EmptyMedia({
39161
40947
  variant = "default",
39162
40948
  ...props
39163
40949
  }) {
39164
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
40950
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
39165
40951
  "div",
39166
40952
  {
39167
40953
  "data-slot": "empty-icon",
@@ -39172,7 +40958,7 @@ function EmptyMedia({
39172
40958
  );
39173
40959
  }
39174
40960
  function EmptyTitle({ className, ...props }) {
39175
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
40961
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
39176
40962
  "div",
39177
40963
  {
39178
40964
  "data-slot": "empty-title",
@@ -39182,7 +40968,7 @@ function EmptyTitle({ className, ...props }) {
39182
40968
  );
39183
40969
  }
39184
40970
  function EmptyDescription({ className, ...props }) {
39185
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
40971
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
39186
40972
  "div",
39187
40973
  {
39188
40974
  "data-slot": "empty-description",
@@ -39195,7 +40981,7 @@ function EmptyDescription({ className, ...props }) {
39195
40981
  );
39196
40982
  }
39197
40983
  function EmptyContent({ className, ...props }) {
39198
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
40984
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
39199
40985
  "div",
39200
40986
  {
39201
40987
  "data-slot": "empty-content",
@@ -39209,11 +40995,11 @@ function EmptyContent({ className, ...props }) {
39209
40995
  }
39210
40996
 
39211
40997
  // src/components/ui/field.tsx
39212
- var import_react74 = require("react");
40998
+ var import_react78 = require("react");
39213
40999
  var import_class_variance_authority10 = require("class-variance-authority");
39214
- var import_jsx_runtime139 = require("react/jsx-runtime");
41000
+ var import_jsx_runtime146 = require("react/jsx-runtime");
39215
41001
  function FieldSet({ className, ...props }) {
39216
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41002
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39217
41003
  "fieldset",
39218
41004
  {
39219
41005
  "data-slot": "field-set",
@@ -39231,7 +41017,7 @@ function FieldLegend({
39231
41017
  variant = "legend",
39232
41018
  ...props
39233
41019
  }) {
39234
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41020
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39235
41021
  "legend",
39236
41022
  {
39237
41023
  "data-slot": "field-legend",
@@ -39247,7 +41033,7 @@ function FieldLegend({
39247
41033
  );
39248
41034
  }
39249
41035
  function FieldGroup({ className, ...props }) {
39250
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41036
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39251
41037
  "div",
39252
41038
  {
39253
41039
  "data-slot": "field-group",
@@ -39287,7 +41073,7 @@ function Field({
39287
41073
  orientation = "vertical",
39288
41074
  ...props
39289
41075
  }) {
39290
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41076
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39291
41077
  "div",
39292
41078
  {
39293
41079
  role: "group",
@@ -39299,7 +41085,7 @@ function Field({
39299
41085
  );
39300
41086
  }
39301
41087
  function FieldContent({ className, ...props }) {
39302
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41088
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39303
41089
  "div",
39304
41090
  {
39305
41091
  "data-slot": "field-content",
@@ -39315,7 +41101,7 @@ function FieldLabel({
39315
41101
  className,
39316
41102
  ...props
39317
41103
  }) {
39318
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41104
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39319
41105
  Label,
39320
41106
  {
39321
41107
  "data-slot": "field-label",
@@ -39330,7 +41116,7 @@ function FieldLabel({
39330
41116
  );
39331
41117
  }
39332
41118
  function FieldTitle({ className, ...props }) {
39333
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41119
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39334
41120
  "div",
39335
41121
  {
39336
41122
  "data-slot": "field-label",
@@ -39343,7 +41129,7 @@ function FieldTitle({ className, ...props }) {
39343
41129
  );
39344
41130
  }
39345
41131
  function FieldDescription({ className, ...props }) {
39346
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41132
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39347
41133
  "p",
39348
41134
  {
39349
41135
  "data-slot": "field-description",
@@ -39362,7 +41148,7 @@ function FieldSeparator({
39362
41148
  className,
39363
41149
  ...props
39364
41150
  }) {
39365
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
41151
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
39366
41152
  "div",
39367
41153
  {
39368
41154
  "data-slot": "field-separator",
@@ -39373,8 +41159,8 @@ function FieldSeparator({
39373
41159
  ),
39374
41160
  ...props,
39375
41161
  children: [
39376
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
39377
- children && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41162
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
41163
+ children && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39378
41164
  "span",
39379
41165
  {
39380
41166
  className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
@@ -39392,7 +41178,7 @@ function FieldError({
39392
41178
  errors,
39393
41179
  ...props
39394
41180
  }) {
39395
- const content = (0, import_react74.useMemo)(() => {
41181
+ const content = (0, import_react78.useMemo)(() => {
39396
41182
  if (children) {
39397
41183
  return children;
39398
41184
  }
@@ -39402,14 +41188,14 @@ function FieldError({
39402
41188
  if (errors?.length === 1 && errors[0]?.message) {
39403
41189
  return errors[0].message;
39404
41190
  }
39405
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
39406
- (error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("li", { children: error.message }, index)
41191
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
41192
+ (error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("li", { children: error.message }, index)
39407
41193
  ) });
39408
41194
  }, [children, errors]);
39409
41195
  if (!content) {
39410
41196
  return null;
39411
41197
  }
39412
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
41198
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
39413
41199
  "div",
39414
41200
  {
39415
41201
  role: "alert",
@@ -39423,9 +41209,9 @@ function FieldError({
39423
41209
 
39424
41210
  // src/components/ui/input-group.tsx
39425
41211
  var import_class_variance_authority11 = require("class-variance-authority");
39426
- var import_jsx_runtime140 = require("react/jsx-runtime");
41212
+ var import_jsx_runtime147 = require("react/jsx-runtime");
39427
41213
  function InputGroup({ className, ...props }) {
39428
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
41214
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
39429
41215
  "div",
39430
41216
  {
39431
41217
  "data-slot": "input-group",
@@ -39469,7 +41255,7 @@ function InputGroupAddon({
39469
41255
  align = "inline-start",
39470
41256
  ...props
39471
41257
  }) {
39472
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
41258
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
39473
41259
  "div",
39474
41260
  {
39475
41261
  role: "group",
@@ -39509,7 +41295,7 @@ function InputGroupButton({
39509
41295
  size = "xs",
39510
41296
  ...props
39511
41297
  }) {
39512
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
41298
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
39513
41299
  Button,
39514
41300
  {
39515
41301
  type,
@@ -39521,7 +41307,7 @@ function InputGroupButton({
39521
41307
  );
39522
41308
  }
39523
41309
  function InputGroupText({ className, ...props }) {
39524
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
41310
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
39525
41311
  "span",
39526
41312
  {
39527
41313
  className: cn(
@@ -39536,7 +41322,7 @@ function InputGroupInput({
39536
41322
  className,
39537
41323
  ...props
39538
41324
  }) {
39539
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
41325
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
39540
41326
  Input,
39541
41327
  {
39542
41328
  "data-slot": "input-group-control",
@@ -39552,7 +41338,7 @@ function InputGroupTextarea({
39552
41338
  className,
39553
41339
  ...props
39554
41340
  }) {
39555
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
41341
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
39556
41342
  Textarea,
39557
41343
  {
39558
41344
  "data-slot": "input-group-control",
@@ -39568,9 +41354,9 @@ function InputGroupTextarea({
39568
41354
  // src/components/ui/item.tsx
39569
41355
  var import_react_slot5 = require("@radix-ui/react-slot");
39570
41356
  var import_class_variance_authority12 = require("class-variance-authority");
39571
- var import_jsx_runtime141 = require("react/jsx-runtime");
41357
+ var import_jsx_runtime148 = require("react/jsx-runtime");
39572
41358
  function ItemGroup({ className, ...props }) {
39573
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41359
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39574
41360
  "div",
39575
41361
  {
39576
41362
  role: "list",
@@ -39584,7 +41370,7 @@ function ItemSeparator({
39584
41370
  className,
39585
41371
  ...props
39586
41372
  }) {
39587
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41373
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39588
41374
  Separator2,
39589
41375
  {
39590
41376
  "data-slot": "item-separator",
@@ -39622,7 +41408,7 @@ function Item8({
39622
41408
  ...props
39623
41409
  }) {
39624
41410
  const Comp = asChild ? import_react_slot5.Slot : "div";
39625
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41411
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39626
41412
  Comp,
39627
41413
  {
39628
41414
  "data-slot": "item",
@@ -39653,7 +41439,7 @@ function ItemMedia({
39653
41439
  variant = "default",
39654
41440
  ...props
39655
41441
  }) {
39656
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41442
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39657
41443
  "div",
39658
41444
  {
39659
41445
  "data-slot": "item-media",
@@ -39664,7 +41450,7 @@ function ItemMedia({
39664
41450
  );
39665
41451
  }
39666
41452
  function ItemContent({ className, ...props }) {
39667
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41453
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39668
41454
  "div",
39669
41455
  {
39670
41456
  "data-slot": "item-content",
@@ -39677,7 +41463,7 @@ function ItemContent({ className, ...props }) {
39677
41463
  );
39678
41464
  }
39679
41465
  function ItemTitle({ className, ...props }) {
39680
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41466
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39681
41467
  "div",
39682
41468
  {
39683
41469
  "data-slot": "item-title",
@@ -39690,7 +41476,7 @@ function ItemTitle({ className, ...props }) {
39690
41476
  );
39691
41477
  }
39692
41478
  function ItemDescription({ className, ...props }) {
39693
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41479
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39694
41480
  "p",
39695
41481
  {
39696
41482
  "data-slot": "item-description",
@@ -39704,7 +41490,7 @@ function ItemDescription({ className, ...props }) {
39704
41490
  );
39705
41491
  }
39706
41492
  function ItemActions({ className, ...props }) {
39707
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41493
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39708
41494
  "div",
39709
41495
  {
39710
41496
  "data-slot": "item-actions",
@@ -39714,7 +41500,7 @@ function ItemActions({ className, ...props }) {
39714
41500
  );
39715
41501
  }
39716
41502
  function ItemHeader({ className, ...props }) {
39717
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41503
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39718
41504
  "div",
39719
41505
  {
39720
41506
  "data-slot": "item-header",
@@ -39727,7 +41513,7 @@ function ItemHeader({ className, ...props }) {
39727
41513
  );
39728
41514
  }
39729
41515
  function ItemFooter({ className, ...props }) {
39730
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
41516
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
39731
41517
  "div",
39732
41518
  {
39733
41519
  "data-slot": "item-footer",
@@ -39741,9 +41527,9 @@ function ItemFooter({ className, ...props }) {
39741
41527
  }
39742
41528
 
39743
41529
  // src/components/ui/kbd.tsx
39744
- var import_jsx_runtime142 = require("react/jsx-runtime");
41530
+ var import_jsx_runtime149 = require("react/jsx-runtime");
39745
41531
  function Kbd({ className, ...props }) {
39746
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
41532
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
39747
41533
  "kbd",
39748
41534
  {
39749
41535
  "data-slot": "kbd",
@@ -39758,7 +41544,7 @@ function Kbd({ className, ...props }) {
39758
41544
  );
39759
41545
  }
39760
41546
  function KbdGroup({ className, ...props }) {
39761
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
41547
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
39762
41548
  "kbd",
39763
41549
  {
39764
41550
  "data-slot": "kbd-group",
@@ -39791,7 +41577,7 @@ function useIsMobile() {
39791
41577
  }
39792
41578
 
39793
41579
  // src/components/ui/sidebar.tsx
39794
- var import_jsx_runtime143 = require("react/jsx-runtime");
41580
+ var import_jsx_runtime150 = require("react/jsx-runtime");
39795
41581
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
39796
41582
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
39797
41583
  var SIDEBAR_WIDTH = "16rem";
@@ -39858,7 +41644,7 @@ var SidebarProvider = React100.forwardRef(
39858
41644
  }),
39859
41645
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
39860
41646
  );
39861
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41647
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
39862
41648
  "div",
39863
41649
  {
39864
41650
  style: {
@@ -39889,7 +41675,7 @@ var Sidebar = React100.forwardRef(
39889
41675
  }, ref) => {
39890
41676
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
39891
41677
  if (collapsible === "none") {
39892
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41678
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
39893
41679
  "div",
39894
41680
  {
39895
41681
  className: cn(
@@ -39903,7 +41689,7 @@ var Sidebar = React100.forwardRef(
39903
41689
  );
39904
41690
  }
39905
41691
  if (isMobile) {
39906
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
41692
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
39907
41693
  SheetContent,
39908
41694
  {
39909
41695
  "data-sidebar": "sidebar",
@@ -39914,16 +41700,16 @@ var Sidebar = React100.forwardRef(
39914
41700
  },
39915
41701
  side,
39916
41702
  children: [
39917
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(SheetHeader, { className: "sr-only", children: [
39918
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(SheetTitle, { children: "Sidebar" }),
39919
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
41703
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(SheetHeader, { className: "sr-only", children: [
41704
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(SheetTitle, { children: "Sidebar" }),
41705
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
39920
41706
  ] }),
39921
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex h-full w-full flex-col", children })
41707
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "flex h-full w-full flex-col", children })
39922
41708
  ]
39923
41709
  }
39924
41710
  ) });
39925
41711
  }
39926
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
41712
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
39927
41713
  "div",
39928
41714
  {
39929
41715
  ref,
@@ -39933,7 +41719,7 @@ var Sidebar = React100.forwardRef(
39933
41719
  "data-variant": variant,
39934
41720
  "data-side": side,
39935
41721
  children: [
39936
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41722
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
39937
41723
  "div",
39938
41724
  {
39939
41725
  className: cn(
@@ -39944,7 +41730,7 @@ var Sidebar = React100.forwardRef(
39944
41730
  )
39945
41731
  }
39946
41732
  ),
39947
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41733
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
39948
41734
  "div",
39949
41735
  {
39950
41736
  className: cn(
@@ -39955,7 +41741,7 @@ var Sidebar = React100.forwardRef(
39955
41741
  className
39956
41742
  ),
39957
41743
  ...props,
39958
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41744
+ children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
39959
41745
  "div",
39960
41746
  {
39961
41747
  "data-sidebar": "sidebar",
@@ -39973,7 +41759,7 @@ var Sidebar = React100.forwardRef(
39973
41759
  Sidebar.displayName = "Sidebar";
39974
41760
  var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref) => {
39975
41761
  const { toggleSidebar } = useSidebar();
39976
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
41762
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
39977
41763
  Button,
39978
41764
  {
39979
41765
  ref,
@@ -39987,8 +41773,8 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
39987
41773
  },
39988
41774
  ...props,
39989
41775
  children: [
39990
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(PanelLeft, {}),
39991
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
41776
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(PanelLeft, {}),
41777
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
39992
41778
  ]
39993
41779
  }
39994
41780
  );
@@ -39996,7 +41782,7 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
39996
41782
  SidebarTrigger.displayName = "SidebarTrigger";
39997
41783
  var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
39998
41784
  const { toggleSidebar } = useSidebar();
39999
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41785
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40000
41786
  "button",
40001
41787
  {
40002
41788
  ref,
@@ -40020,7 +41806,7 @@ var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
40020
41806
  });
40021
41807
  SidebarRail.displayName = "SidebarRail";
40022
41808
  var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
40023
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41809
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40024
41810
  "main",
40025
41811
  {
40026
41812
  ref,
@@ -40035,7 +41821,7 @@ var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
40035
41821
  });
40036
41822
  SidebarInset.displayName = "SidebarInset";
40037
41823
  var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
40038
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41824
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40039
41825
  Input,
40040
41826
  {
40041
41827
  ref,
@@ -40050,7 +41836,7 @@ var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
40050
41836
  });
40051
41837
  SidebarInput.displayName = "SidebarInput";
40052
41838
  var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
40053
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41839
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40054
41840
  "div",
40055
41841
  {
40056
41842
  ref,
@@ -40062,7 +41848,7 @@ var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
40062
41848
  });
40063
41849
  SidebarHeader.displayName = "SidebarHeader";
40064
41850
  var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
40065
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41851
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40066
41852
  "div",
40067
41853
  {
40068
41854
  ref,
@@ -40074,7 +41860,7 @@ var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
40074
41860
  });
40075
41861
  SidebarFooter.displayName = "SidebarFooter";
40076
41862
  var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
40077
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41863
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40078
41864
  Separator2,
40079
41865
  {
40080
41866
  ref,
@@ -40086,7 +41872,7 @@ var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
40086
41872
  });
40087
41873
  SidebarSeparator.displayName = "SidebarSeparator";
40088
41874
  var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
40089
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41875
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40090
41876
  "div",
40091
41877
  {
40092
41878
  ref,
@@ -40101,7 +41887,7 @@ var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
40101
41887
  });
40102
41888
  SidebarContent.displayName = "SidebarContent";
40103
41889
  var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
40104
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41890
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40105
41891
  "div",
40106
41892
  {
40107
41893
  ref,
@@ -40114,7 +41900,7 @@ var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
40114
41900
  SidebarGroup.displayName = "SidebarGroup";
40115
41901
  var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
40116
41902
  const Comp = asChild ? import_react_slot6.Slot : "div";
40117
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41903
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40118
41904
  Comp,
40119
41905
  {
40120
41906
  ref,
@@ -40131,7 +41917,7 @@ var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...pr
40131
41917
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
40132
41918
  var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
40133
41919
  const Comp = asChild ? import_react_slot6.Slot : "button";
40134
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41920
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40135
41921
  Comp,
40136
41922
  {
40137
41923
  ref,
@@ -40148,7 +41934,7 @@ var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...p
40148
41934
  );
40149
41935
  });
40150
41936
  SidebarGroupAction.displayName = "SidebarGroupAction";
40151
- var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41937
+ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40152
41938
  "div",
40153
41939
  {
40154
41940
  ref,
@@ -40158,7 +41944,7 @@ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) =>
40158
41944
  }
40159
41945
  ));
40160
41946
  SidebarGroupContent.displayName = "SidebarGroupContent";
40161
- var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41947
+ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40162
41948
  "ul",
40163
41949
  {
40164
41950
  ref,
@@ -40168,7 +41954,7 @@ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PU
40168
41954
  }
40169
41955
  ));
40170
41956
  SidebarMenu.displayName = "SidebarMenu";
40171
- var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41957
+ var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40172
41958
  "li",
40173
41959
  {
40174
41960
  ref,
@@ -40210,7 +41996,7 @@ var SidebarMenuButton = React100.forwardRef(
40210
41996
  }, ref) => {
40211
41997
  const Comp = asChild ? import_react_slot6.Slot : "button";
40212
41998
  const { isMobile, state } = useSidebar();
40213
- const button = /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41999
+ const button = /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40214
42000
  Comp,
40215
42001
  {
40216
42002
  ref,
@@ -40229,9 +42015,9 @@ var SidebarMenuButton = React100.forwardRef(
40229
42015
  children: tooltip
40230
42016
  };
40231
42017
  }
40232
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(Tooltip, { children: [
40233
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(TooltipTrigger, { asChild: true, children: button }),
40234
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
42018
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(Tooltip, { children: [
42019
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(TooltipTrigger, { asChild: true, children: button }),
42020
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40235
42021
  TooltipContent,
40236
42022
  {
40237
42023
  side: "right",
@@ -40246,7 +42032,7 @@ var SidebarMenuButton = React100.forwardRef(
40246
42032
  SidebarMenuButton.displayName = "SidebarMenuButton";
40247
42033
  var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
40248
42034
  const Comp = asChild ? import_react_slot6.Slot : "button";
40249
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
42035
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40250
42036
  Comp,
40251
42037
  {
40252
42038
  ref,
@@ -40267,7 +42053,7 @@ var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showO
40267
42053
  );
40268
42054
  });
40269
42055
  SidebarMenuAction.displayName = "SidebarMenuAction";
40270
- var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
42056
+ var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40271
42057
  "div",
40272
42058
  {
40273
42059
  ref,
@@ -40289,7 +42075,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
40289
42075
  const width = React100.useMemo(() => {
40290
42076
  return `${Math.floor(Math.random() * 40) + 50}%`;
40291
42077
  }, []);
40292
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
42078
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
40293
42079
  "div",
40294
42080
  {
40295
42081
  ref,
@@ -40297,14 +42083,14 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
40297
42083
  className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
40298
42084
  ...props,
40299
42085
  children: [
40300
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
42086
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40301
42087
  Skeleton,
40302
42088
  {
40303
42089
  className: "size-4 rounded-md",
40304
42090
  "data-sidebar": "menu-skeleton-icon"
40305
42091
  }
40306
42092
  ),
40307
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
42093
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40308
42094
  Skeleton,
40309
42095
  {
40310
42096
  className: "h-4 max-w-[--skeleton-width] flex-1",
@@ -40319,7 +42105,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
40319
42105
  );
40320
42106
  });
40321
42107
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
40322
- var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
42108
+ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40323
42109
  "ul",
40324
42110
  {
40325
42111
  ref,
@@ -40333,11 +42119,11 @@ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @_
40333
42119
  }
40334
42120
  ));
40335
42121
  SidebarMenuSub.displayName = "SidebarMenuSub";
40336
- var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("li", { ref, ...props }));
42122
+ var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("li", { ref, ...props }));
40337
42123
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
40338
42124
  var SidebarMenuSubButton = React100.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
40339
42125
  const Comp = asChild ? import_react_slot6.Slot : "a";
40340
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
42126
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
40341
42127
  Comp,
40342
42128
  {
40343
42129
  ref,
@@ -40361,20 +42147,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
40361
42147
  // src/components/ui/sonner.tsx
40362
42148
  var import_next_themes = require("next-themes");
40363
42149
  var import_sonner = require("sonner");
40364
- var import_jsx_runtime144 = require("react/jsx-runtime");
42150
+ var import_jsx_runtime151 = require("react/jsx-runtime");
40365
42151
  var Toaster = ({ ...props }) => {
40366
42152
  const { theme = "system" } = (0, import_next_themes.useTheme)();
40367
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
42153
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
40368
42154
  import_sonner.Toaster,
40369
42155
  {
40370
42156
  theme,
40371
42157
  className: "toaster group",
40372
42158
  icons: {
40373
- success: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(CircleCheck, { className: "h-4 w-4" }),
40374
- info: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Info, { className: "h-4 w-4" }),
40375
- warning: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(TriangleAlert, { className: "h-4 w-4" }),
40376
- error: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(OctagonX, { className: "h-4 w-4" }),
40377
- loading: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" })
42159
+ success: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(CircleCheck, { className: "h-4 w-4" }),
42160
+ info: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(Info, { className: "h-4 w-4" }),
42161
+ warning: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(TriangleAlert, { className: "h-4 w-4" }),
42162
+ error: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(OctagonX, { className: "h-4 w-4" }),
42163
+ loading: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" })
40378
42164
  },
40379
42165
  toastOptions: {
40380
42166
  classNames: {
@@ -40392,24 +42178,24 @@ var Toaster = ({ ...props }) => {
40392
42178
  // src/components/ui/toggle-group.tsx
40393
42179
  var React101 = __toESM(require("react"), 1);
40394
42180
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
40395
- var import_jsx_runtime145 = require("react/jsx-runtime");
42181
+ var import_jsx_runtime152 = require("react/jsx-runtime");
40396
42182
  var ToggleGroupContext = React101.createContext({
40397
42183
  size: "default",
40398
42184
  variant: "default"
40399
42185
  });
40400
- var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
42186
+ var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
40401
42187
  ToggleGroupPrimitive.Root,
40402
42188
  {
40403
42189
  ref,
40404
42190
  className: cn("flex items-center justify-center gap-1", className),
40405
42191
  ...props,
40406
- children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
42192
+ children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
40407
42193
  }
40408
42194
  ));
40409
42195
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
40410
42196
  var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size, ...props }, ref) => {
40411
42197
  const context = React101.useContext(ToggleGroupContext);
40412
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
42198
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
40413
42199
  ToggleGroupPrimitive.Item,
40414
42200
  {
40415
42201
  ref,
@@ -40428,7 +42214,7 @@ var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size,
40428
42214
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
40429
42215
 
40430
42216
  // src/render/PXEngineRenderer.tsx
40431
- var import_jsx_runtime146 = require("react/jsx-runtime");
42217
+ var import_jsx_runtime153 = require("react/jsx-runtime");
40432
42218
  var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
40433
42219
  // Form components - require FormField + FormItem context
40434
42220
  "FormLabel",
@@ -40520,24 +42306,24 @@ var COMPONENT_SUGGESTIONS = {
40520
42306
  };
40521
42307
  var renderContextDependentError = (componentName, normalizedName, key) => {
40522
42308
  const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
40523
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
42309
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
40524
42310
  "div",
40525
42311
  {
40526
42312
  className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
40527
42313
  children: [
40528
- /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "flex items-start gap-2", children: [
40529
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
40530
- /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "flex-1", children: [
40531
- /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("p", { className: "text-sm font-semibold text-amber-900", children: [
42314
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex items-start gap-2", children: [
42315
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
42316
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex-1", children: [
42317
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("p", { className: "text-sm font-semibold text-amber-900", children: [
40532
42318
  "Invalid Component: ",
40533
42319
  componentName
40534
42320
  ] }),
40535
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
42321
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
40536
42322
  ] })
40537
42323
  ] }),
40538
- /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
40539
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
40540
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
42324
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
42325
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
42326
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
40541
42327
  ] })
40542
42328
  ]
40543
42329
  },
@@ -40617,7 +42403,7 @@ var PXEngineRenderer = ({
40617
42403
  if (typeof component === "string" || typeof component === "number") {
40618
42404
  return component;
40619
42405
  }
40620
- if (import_react75.default.isValidElement(component)) {
42406
+ if (import_react79.default.isValidElement(component)) {
40621
42407
  return component;
40622
42408
  }
40623
42409
  if (!component || typeof component !== "object") return null;
@@ -40696,7 +42482,7 @@ var PXEngineRenderer = ({
40696
42482
  const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
40697
42483
  const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
40698
42484
  if (isAtomWithRenderProp) {
40699
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
42485
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
40700
42486
  TargetComponent,
40701
42487
  {
40702
42488
  ...finalProps,
@@ -40708,7 +42494,7 @@ var PXEngineRenderer = ({
40708
42494
  uniqueKey
40709
42495
  );
40710
42496
  } else {
40711
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
42497
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
40712
42498
  TargetComponent,
40713
42499
  {
40714
42500
  ...finalProps,
@@ -40720,7 +42506,7 @@ var PXEngineRenderer = ({
40720
42506
  );
40721
42507
  }
40722
42508
  };
40723
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
42509
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
40724
42510
  };
40725
42511
  // Annotate the CommonJS export names for ESM import in node:
40726
42512
  0 && (module.exports = {
@@ -40816,6 +42602,7 @@ var PXEngineRenderer = ({
40816
42602
  CountrySelectEdit,
40817
42603
  CreatorActionHeader,
40818
42604
  CreatorCompactView,
42605
+ CreatorExpandedPanel,
40819
42606
  CreatorGridCard,
40820
42607
  CreatorImageList,
40821
42608
  CreatorProfileSummary,
@@ -41001,6 +42788,8 @@ var PXEngineRenderer = ({
41001
42788
  VideoAtom,
41002
42789
  WorkflowVisualizer,
41003
42790
  cn,
42791
+ defaultFetchSelections,
42792
+ defaultPersistSelection,
41004
42793
  generateFieldsFromData,
41005
42794
  generateFieldsFromPropDefinitions,
41006
42795
  useCreatorWidgetPolling