webs-sdk 0.19.82 → 0.19.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/components/CreativeFaceSwap.d.ts +6 -1
  2. package/dist/components/CreativeFaceSwap.d.ts.map +1 -1
  3. package/dist/components/CreativeFaceSwap.js +193 -193
  4. package/dist/components/CreativeFaceSwap.js.map +1 -1
  5. package/dist/components/SpinningWheel/SpinningWheel.d.ts.map +1 -1
  6. package/dist/components/SpinningWheel/SpinningWheel.js +12 -4
  7. package/dist/components/SpinningWheel/SpinningWheel.js.map +1 -1
  8. package/dist/components/SpinningWheel/types.d.ts +4 -0
  9. package/dist/components/SpinningWheel/types.d.ts.map +1 -1
  10. package/dist/components/for-you/ForYouFullPage.d.ts.map +1 -1
  11. package/dist/components/for-you/ForYouFullPage.js +2 -2
  12. package/dist/components/for-you/ForYouFullPage.js.map +1 -1
  13. package/dist/components/for-you/ForYouPage.d.ts +5 -0
  14. package/dist/components/for-you/ForYouPage.d.ts.map +1 -1
  15. package/dist/components/for-you/ForYouPage.js +1 -1
  16. package/dist/components/for-you/ForYouPage.js.map +1 -1
  17. package/dist/network.d.ts +12 -0
  18. package/dist/network.d.ts.map +1 -0
  19. package/dist/network.js +15 -0
  20. package/dist/network.js.map +1 -0
  21. package/dist/server.d.ts +54 -0
  22. package/dist/server.d.ts.map +1 -0
  23. package/dist/server.js +74 -0
  24. package/dist/server.js.map +1 -0
  25. package/dist/utils/QRCode.d.ts +1 -0
  26. package/dist/utils/QRCode.d.ts.map +1 -0
  27. package/dist/utils/QRCode.js +2 -0
  28. package/dist/utils/QRCode.js.map +1 -0
  29. package/dist/utils/imageValidation.d.ts +6 -0
  30. package/dist/utils/imageValidation.d.ts.map +1 -0
  31. package/dist/utils/imageValidation.js +64 -0
  32. package/dist/utils/imageValidation.js.map +1 -0
  33. package/package.json +1 -1
  34. package/dist/libraries/globals.d.ts +0 -17
  35. package/dist/libraries/globals.d.ts.map +0 -1
  36. package/dist/libraries/globals.js +0 -38
  37. package/dist/libraries/globals.js.map +0 -1
@@ -70,6 +70,11 @@ export interface CreativeFaceSwapProps {
70
70
  texts?: FaceSwapTexts;
71
71
  onGenerationComplete?: (imageUrl: string) => void;
72
72
  onError?: (error: string) => void;
73
+ disclaimerAiCfg?: {
74
+ pais_ue: number;
75
+ text: string;
76
+ className?: string;
77
+ };
73
78
  }
74
79
  export interface CreativeFaceSwapForYouCardProps {
75
80
  title: string;
@@ -97,6 +102,6 @@ export interface CreativeFaceSwapPageProps {
97
102
  componentPaddingClass?: string;
98
103
  }
99
104
  export declare function CreativeFaceSwapPage({ componentProps, heroDesktopImage, heroMobileImage, heroAlt, backgroundColor, componentPaddingClass, }: CreativeFaceSwapPageProps): import("react/jsx-runtime").JSX.Element;
100
- export declare function CreativeFaceSwap({ config, examples: examplesProp, collections, examplesTag, apiBaseUrl, locale, theme, texts, onGenerationComplete, onError, }: CreativeFaceSwapProps): import("react/jsx-runtime").JSX.Element;
105
+ export declare function CreativeFaceSwap({ config, examples: examplesProp, collections, examplesTag, apiBaseUrl, locale, theme, texts, onGenerationComplete, onError, disclaimerAiCfg, }: CreativeFaceSwapProps): import("react/jsx-runtime").JSX.Element;
101
106
  export default CreativeFaceSwap;
102
107
  //# sourceMappingURL=CreativeFaceSwap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreativeFaceSwap.d.ts","sourceRoot":"","sources":["../../src/components/CreativeFaceSwap.tsx"],"names":[],"mappings":"AA+BA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IAC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E,YAAiB,EAC3B,WAAgB,EAChB,WAAW,EACX,UAAU,EACV,MAAM,EACN,KAAU,EACV,KAAU,EACV,oBAAoB,EACpB,OAAO,EACP,eAAe,GAChB,EAAE,qBAAqB,2CA6tCvB;AAKD,eAAe,gBAAgB,CAAC"}
@@ -90,7 +90,7 @@ const DEFAULT_ACCEPTED_IMAGE_TYPES = [
90
90
  "image/webp",
91
91
  "image/gif",
92
92
  ];
93
- function CreativeFaceSwap({ config, examples: examplesProp = [], collections = [], examplesTag, apiBaseUrl, locale, theme = {}, texts = {}, onGenerationComplete, onError, }) {
93
+ function CreativeFaceSwap({ config, examples: examplesProp = [], collections = [], examplesTag, apiBaseUrl, locale, theme = {}, texts = {}, onGenerationComplete, onError, disclaimerAiCfg, }) {
94
94
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
95
95
  const mergedTheme = Object.assign(Object.assign({}, defaultTheme), theme);
96
96
  const mergedTexts = Object.assign(Object.assign({}, defaultTexts), texts);
@@ -394,204 +394,204 @@ function CreativeFaceSwap({ config, examples: examplesProp = [], collections = [
394
394
  return text;
395
395
  return text.substring(0, maxLength) + "...";
396
396
  };
397
- return ((0, jsx_runtime_1.jsx)("div", { style: Object.assign({ width: "100%" }, { "--fs-border-color": mergedTheme.borderColor || "transparent" }), children: (0, jsx_runtime_1.jsxs)("div", { style: { maxWidth: "1280px", margin: "0 auto" }, children: [hasCollections && ((0, jsx_runtime_1.jsx)("div", { style: {
398
- display: "flex",
399
- gap: "8px",
400
- padding: "16px 24px",
401
- background: (_f = mergedTheme.tabsHeaderBackground) !== null && _f !== void 0 ? _f : "var(--color-surface-base)",
402
- borderBottom: `1px solid ${(_g = mergedTheme.tabsHeaderBorderColor) !== null && _g !== void 0 ? _g : "var(--fs-border-color, transparent)"}`,
403
- }, children: [
404
- { id: "create", label: createTabLabel },
405
- { id: "collections", label: collectionsTabLabel },
406
- ].map((tab) => {
407
- var _a, _b;
408
- return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => setActiveTab(tab.id), style: {
409
- padding: "8px 20px",
410
- borderRadius: "20px",
411
- border: activeTab === tab.id
412
- ? "none"
413
- : `1px solid ${mergedTheme.textColor}33`,
414
- backgroundColor: activeTab === tab.id
415
- ? (_a = mergedTheme.primaryColor) !== null && _a !== void 0 ? _a : "#FF5500"
416
- : "transparent",
417
- color: activeTab === tab.id
418
- ? "#FFFFFF"
419
- : (_b = mergedTheme.textColor) !== null && _b !== void 0 ? _b : "#001B5E",
397
+ return ((0, jsx_runtime_1.jsxs)("div", { style: Object.assign({ width: "100%" }, { "--fs-border-color": mergedTheme.borderColor || "transparent" }), children: [(0, jsx_runtime_1.jsxs)("div", { style: { maxWidth: "1280px", margin: "0 auto" }, children: [hasCollections && ((0, jsx_runtime_1.jsx)("div", { style: {
398
+ display: "flex",
399
+ gap: "8px",
400
+ padding: "16px 24px",
401
+ background: (_f = mergedTheme.tabsHeaderBackground) !== null && _f !== void 0 ? _f : "var(--color-surface-base)",
402
+ borderBottom: `1px solid ${(_g = mergedTheme.tabsHeaderBorderColor) !== null && _g !== void 0 ? _g : "var(--fs-border-color, transparent)"}`,
403
+ }, children: [
404
+ { id: "create", label: createTabLabel },
405
+ { id: "collections", label: collectionsTabLabel },
406
+ ].map((tab) => {
407
+ var _a, _b;
408
+ return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => setActiveTab(tab.id), style: {
409
+ padding: "8px 20px",
410
+ borderRadius: "20px",
411
+ border: activeTab === tab.id
412
+ ? "none"
413
+ : `1px solid ${mergedTheme.textColor}33`,
414
+ backgroundColor: activeTab === tab.id
415
+ ? (_a = mergedTheme.primaryColor) !== null && _a !== void 0 ? _a : "#FF5500"
416
+ : "transparent",
417
+ color: activeTab === tab.id
418
+ ? "#FFFFFF"
419
+ : (_b = mergedTheme.textColor) !== null && _b !== void 0 ? _b : "#001B5E",
420
+ fontSize: "14px",
421
+ fontWeight: 600,
422
+ cursor: "pointer",
423
+ transition: "all 0.2s",
424
+ outline: "none",
425
+ }, children: tab.label }, tab.id));
426
+ }) })), hasCollections && activeTab === "collections" && ((0, jsx_runtime_1.jsx)("div", { style: {
427
+ padding: "24px",
428
+ background: (_h = mergedTheme.tabsHeaderBackground) !== null && _h !== void 0 ? _h : "var(--color-surface-base)",
429
+ }, children: collections.length === 0 ? ((0, jsx_runtime_1.jsx)("p", { style: {
430
+ color: mergedTheme.textColor,
431
+ opacity: 0.5,
420
432
  fontSize: "14px",
421
- fontWeight: 600,
422
- cursor: "pointer",
423
- transition: "all 0.2s",
424
- outline: "none",
425
- }, children: tab.label }, tab.id));
426
- }) })), hasCollections && activeTab === "collections" && ((0, jsx_runtime_1.jsx)("div", { style: {
427
- padding: "24px",
428
- background: (_h = mergedTheme.tabsHeaderBackground) !== null && _h !== void 0 ? _h : "var(--color-surface-base)",
429
- }, children: collections.length === 0 ? ((0, jsx_runtime_1.jsx)("p", { style: {
430
- color: mergedTheme.textColor,
431
- opacity: 0.5,
432
- fontSize: "14px",
433
- }, children: collectionsEmptyText })) : (collections.map((cat, catIdx) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "40px" }, children: [(0, jsx_runtime_1.jsx)("h3", { style: {
434
- fontSize: "18px",
435
- fontWeight: 700,
436
- color: mergedTheme.textColor,
437
- margin: "0 0 16px 0",
438
- }, children: cat.label }), (0, jsx_runtime_1.jsx)("div", { style: {
439
- display: "grid",
440
- gridTemplateColumns: "repeat(auto-fill, minmax(160px, 1fr))",
441
- gap: "16px",
442
- }, children: cat.items.map((item) => ((0, jsx_runtime_1.jsxs)("div", { style: {
443
- borderRadius: "12px",
444
- overflow: "hidden",
445
- cursor: "pointer",
446
- transition: "transform 0.18s, box-shadow 0.18s",
447
- }, onMouseEnter: (e) => {
448
- e.currentTarget.style.transform = "translateY(-4px)";
449
- e.currentTarget.style.boxShadow =
450
- "0 8px 24px rgba(0,0,0,0.18)";
451
- }, onMouseLeave: (e) => {
452
- e.currentTarget.style.transform = "translateY(0)";
453
- e.currentTarget.style.boxShadow = "none";
454
- }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
455
- overflow: "hidden",
456
- borderRadius: "10px 10px 0 0",
457
- }, children: (0, jsx_runtime_1.jsx)("img", { src: item.image, alt: item.description, style: {
458
- width: "100%",
459
- aspectRatio: "3/4",
460
- objectFit: "cover",
461
- display: "block",
462
- } }) }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: "8px 8px 10px" }, children: [(0, jsx_runtime_1.jsx)("p", { style: {
463
- margin: "0 0 8px",
464
- fontSize: "11px",
465
- color: mergedTheme.textColor,
466
- opacity: 0.7,
467
- lineHeight: 1.35,
468
- overflow: "hidden",
469
- display: "-webkit-box",
470
- WebkitLineClamp: 2,
471
- WebkitBoxOrient: "vertical",
472
- }, children: item.description }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => {
473
- setDescription(item.description);
474
- setActiveTab("create");
475
- setTimeout(() => window.scrollTo({
476
- top: 0,
477
- behavior: "smooth",
478
- }), 50);
479
- }, style: {
433
+ }, children: collectionsEmptyText })) : (collections.map((cat, catIdx) => ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "40px" }, children: [(0, jsx_runtime_1.jsx)("h3", { style: {
434
+ fontSize: "18px",
435
+ fontWeight: 700,
436
+ color: mergedTheme.textColor,
437
+ margin: "0 0 16px 0",
438
+ }, children: cat.label }), (0, jsx_runtime_1.jsx)("div", { style: {
439
+ display: "grid",
440
+ gridTemplateColumns: "repeat(auto-fill, minmax(160px, 1fr))",
441
+ gap: "16px",
442
+ }, children: cat.items.map((item) => ((0, jsx_runtime_1.jsxs)("div", { style: {
443
+ borderRadius: "12px",
444
+ overflow: "hidden",
445
+ cursor: "pointer",
446
+ transition: "transform 0.18s, box-shadow 0.18s",
447
+ }, onMouseEnter: (e) => {
448
+ e.currentTarget.style.transform = "translateY(-4px)";
449
+ e.currentTarget.style.boxShadow =
450
+ "0 8px 24px rgba(0,0,0,0.18)";
451
+ }, onMouseLeave: (e) => {
452
+ e.currentTarget.style.transform = "translateY(0)";
453
+ e.currentTarget.style.boxShadow = "none";
454
+ }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
455
+ overflow: "hidden",
456
+ borderRadius: "10px 10px 0 0",
457
+ }, children: (0, jsx_runtime_1.jsx)("img", { src: item.image, alt: item.description, style: {
480
458
  width: "100%",
481
- padding: "6px",
482
- borderRadius: "16px",
483
- border: `1px solid ${mergedTheme.primaryColor}`,
484
- backgroundColor: "transparent",
485
- color: mergedTheme.primaryColor,
486
- fontSize: "12px",
487
- fontWeight: 600,
488
- cursor: "pointer",
489
- display: "flex",
490
- alignItems: "center",
491
- justifyContent: "center",
492
- gap: "4px",
493
- }, onMouseEnter: (e) => {
494
- var _a;
495
- e.currentTarget.style.backgroundColor =
496
- (_a = mergedTheme.primaryColor) !== null && _a !== void 0 ? _a : "#FF5500";
497
- e.currentTarget.style.color = "#fff";
498
- }, onMouseLeave: (e) => {
499
- var _a;
500
- e.currentTarget.style.backgroundColor =
501
- "transparent";
502
- e.currentTarget.style.color =
503
- (_a = mergedTheme.primaryColor) !== null && _a !== void 0 ? _a : "#FF5500";
504
- }, children: [(0, jsx_runtime_1.jsxs)("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [(0, jsx_runtime_1.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), (0, jsx_runtime_1.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }), mergedTexts.tryButton] })] })] }, item.id))) })] }, catIdx)))) })), (!hasCollections || activeTab === "create") && ((0, jsx_runtime_1.jsxs)("div", { className: "faceswap-layout", children: [(0, jsx_runtime_1.jsxs)("div", { className: "faceswap-col-left", children: [(0, jsx_runtime_1.jsxs)("div", { style: { padding: "16px 24px 24px", borderBottom: `1px solid var(--fs-border-color, transparent)` }, children: [(0, jsx_runtime_1.jsx)("h3", { style: { color: mergedTheme.textColor, fontSize: "18px", fontWeight: 700, marginBottom: "16px" }, children: mergedTexts.uploadTitle }), (0, jsx_runtime_1.jsx)("input", { ref: fileInputRef, type: "file", accept: acceptedImageTypes.join(",") || "image/*", onChange: handleFileChange, className: "hidden" }), (0, jsx_runtime_1.jsx)("div", { className: "relative rounded-lg p-8 mb-4 flex items-center justify-center border-2 border-dashed border-(--fs-border-color) overflow-hidden", style: { minHeight: "300px", background: "var(--neutral-10)" }, children: uploadedImage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { src: uploadedImage, alt: "Uploaded photo", className: "w-full h-full object-contain max-h-[300px]" }), (0, jsx_runtime_1.jsx)("button", { onClick: handleRemoveImage, "aria-label": (_j = mergedTexts.changeImageButton) !== null && _j !== void 0 ? _j : "Remove image", className: "absolute top-4 right-4 rounded-full flex items-center justify-center shadow-lg transition-colors", style: { width: "48px", height: "48px", backgroundColor: "#ef4444", color: "#ffffff" }, onMouseEnter: (e) => { e.currentTarget.style.backgroundColor = "#dc2626"; }, onMouseLeave: (e) => { e.currentTarget.style.backgroundColor = "#ef4444"; }, children: (0, jsx_runtime_1.jsx)("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", style: { width: "24px", height: "24px" }, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })] })) : null }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleUploadClick, className: "w-full text-white font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 cursor-pointer flex items-center justify-center gap-2", style: { backgroundColor: mergedTheme.primaryColor }, onMouseEnter: (e) => {
505
- e.currentTarget.style.backgroundColor =
506
- mergedTheme.primaryHoverColor ||
507
- mergedTheme.primaryColor ||
508
- "#ff1600";
509
- }, onMouseLeave: (e) => {
510
- e.currentTarget.style.backgroundColor =
511
- mergedTheme.primaryColor || "#FF5500";
512
- }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) }), uploadedImage
513
- ? mergedTexts.changeImageButton
514
- : mergedTexts.uploadButton] }), uploadError && ((0, jsx_runtime_1.jsxs)("div", { role: "alert", className: "mt-4 flex items-start gap-2 p-3 rounded-lg border", style: {
515
- color: (_k = mergedTheme.errorColor) !== null && _k !== void 0 ? _k : "#dc2626",
516
- backgroundColor: (_l = mergedTheme.errorBackgroundColor) !== null && _l !== void 0 ? _l : "#fef2f2",
517
- borderColor: (_m = mergedTheme.errorBorderColor) !== null && _m !== void 0 ? _m : "#fecaca",
518
- }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", style: { width: "20px", height: "20px", marginTop: "2px" }, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm", children: uploadError })] }))] }), carouselExamples.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-bold mb-4", style: { color: mergedTheme.textColor }, children: mergedTexts.examplesTitle }), (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("button", { onClick: handlePrevExample, className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 w-8 h-8 bg-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-100 transition-colors -ml-4", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) }) }), (0, jsx_runtime_1.jsx)("div", { ref: carouselRef, className: "faceswap-examples-outer", children: (0, jsx_runtime_1.jsx)("div", { className: "faceswap-examples-grid", children: carouselExamples.map((example) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)("div", { className: "aspect-[3/4] rounded-lg overflow-hidden mb-2", style: { background: "rgba(255,255,255,0.07)" }, children: (0, jsx_runtime_1.jsx)("img", { src: example.image, alt: `Example ${example.id}`, className: "w-full h-full object-cover" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs leading-tight line-clamp-3 mb-2 min-h-[3rem]", style: { color: mergedTheme.textColor }, children: truncateText(example.description, 120) }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleTryExample(example.description), className: "w-full text-white font-bold text-sm px-4 py-2 rounded-full transition-colors duration-300 cursor-pointer flex items-center justify-center gap-2 mt-auto", style: {
519
- backgroundColor: mergedTheme.primaryColor,
520
- }, onMouseEnter: (e) => {
521
- e.currentTarget.style.backgroundColor =
522
- mergedTheme.primaryHoverColor ||
523
- mergedTheme.primaryColor ||
524
- "#ff1600";
525
- }, onMouseLeave: (e) => {
526
- e.currentTarget.style.backgroundColor =
527
- mergedTheme.primaryColor || "#FF5500";
528
- }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 5l7 7m0 0l-7 7m7-7H3" }) }), mergedTexts.tryButton] })] }, example.id))) }) }), (0, jsx_runtime_1.jsx)("button", { onClick: handleNextExample, className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 w-8 h-8 bg-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-100 transition-colors -mr-4", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })] })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "faceswap-col-right", children: [(0, jsx_runtime_1.jsxs)("div", { style: { padding: "16px 24px 24px", borderBottom: `1px solid var(--fs-border-color, transparent)` }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "16px", position: "relative" }, children: [(0, jsx_runtime_1.jsx)("h3", { style: { color: mergedTheme.textColor, fontSize: "18px", fontWeight: 700 }, children: mergedTexts.describeTitle }), (0, jsx_runtime_1.jsx)(ui_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(ui_1.Tooltip, { open: showTooltip, onOpenChange: setShowTooltip, children: [(0, jsx_runtime_1.jsx)(ui_1.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)("button", { className: "w-5 h-5 rounded-full border-2 flex items-center justify-center text-xs font-bold transition-colors border-[var(--theme-color)] text-[var(--theme-color)] hover:bg-(--theme-color) hover:text-white", style: {
529
- "--theme-color": mergedTheme.textColor || "#001B5E",
530
- }, children: "i" }) }), (0, jsx_runtime_1.jsx)(ui_1.TooltipContent, { className: "mt-2 w-64 rounded-lg p-4 z-20 text-sm", style: {
531
- backgroundColor: mergedTheme.backgroundColor || "#F9F9F9",
532
- border: `1px solid var(--fs-border-color, transparent)`,
533
- color: mergedTheme.textColor,
534
- boxShadow: `0 4px 20px rgba(0,0,0,0.25), 0 0 0 1px ${mergedTheme.textColor}22`,
535
- backdropFilter: "blur(8px)",
536
- opacity: 0.95,
537
- }, children: (0, jsx_runtime_1.jsx)("p", { className: "leading-relaxed whitespace-pre-line", style: { color: mergedTheme.textColor }, children: mergedTexts.describeTooltip }) })] }) })] }), (0, jsx_runtime_1.jsx)("textarea", { value: description, onChange: (e) => setDescription(e.target.value), placeholder: mergedTexts.descriptionPlaceholder, className: (0, utils_1.cn)("faceswap-textarea w-full rounded-lg p-4 italic text-(--text-color) placeholder-gray-400 border border-(--fs-border-color) focus:outline-none focus:ring-2", showTooltip && "border-(--active-border-color)"), style: {
538
- "--text-color": mergedTheme.textColor,
539
- "--active-border-color": mergedTheme.primaryColor,
540
- "--fs-border-color": mergedTheme.borderColor || "transparent",
541
- background: "var(--neutral-10)",
542
- } }), (0, jsx_runtime_1.jsx)("div", { className: "flex justify-end mt-4", children: (0, jsx_runtime_1.jsx)("button", { onClick: handleCreate, disabled: !uploadedImage ||
543
- !description.trim() ||
544
- isGenerating ||
545
- (!!generatedResult && !generatedImageUrl), className: `font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 flex items-center gap-2 ${uploadedImage &&
546
- description.trim() &&
547
- !isGenerating &&
548
- !(!!generatedResult && !generatedImageUrl)
549
- ? "text-white cursor-pointer"
550
- : "bg-gray-300 text-gray-500 cursor-not-allowed"}`, style: {
551
- backgroundColor: uploadedImage &&
552
- description.trim() &&
553
- !isGenerating &&
554
- !(!!generatedResult && !generatedImageUrl)
555
- ? mergedTheme.primaryColor
556
- : undefined,
557
- }, onMouseEnter: (e) => {
558
- if (uploadedImage &&
559
- description.trim() &&
560
- !isGenerating &&
561
- !(!!generatedResult && !generatedImageUrl)) {
562
- e.currentTarget.style.backgroundColor =
563
- mergedTheme.primaryHoverColor ||
564
- mergedTheme.primaryColor ||
565
- "#ff1600";
566
- }
459
+ aspectRatio: "3/4",
460
+ objectFit: "cover",
461
+ display: "block",
462
+ } }) }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: "8px 8px 10px" }, children: [(0, jsx_runtime_1.jsx)("p", { style: {
463
+ margin: "0 0 8px",
464
+ fontSize: "11px",
465
+ color: mergedTheme.textColor,
466
+ opacity: 0.7,
467
+ lineHeight: 1.35,
468
+ overflow: "hidden",
469
+ display: "-webkit-box",
470
+ WebkitLineClamp: 2,
471
+ WebkitBoxOrient: "vertical",
472
+ }, children: item.description }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => {
473
+ setDescription(item.description);
474
+ setActiveTab("create");
475
+ setTimeout(() => window.scrollTo({
476
+ top: 0,
477
+ behavior: "smooth",
478
+ }), 50);
479
+ }, style: {
480
+ width: "100%",
481
+ padding: "6px",
482
+ borderRadius: "16px",
483
+ border: `1px solid ${mergedTheme.primaryColor}`,
484
+ backgroundColor: "transparent",
485
+ color: mergedTheme.primaryColor,
486
+ fontSize: "12px",
487
+ fontWeight: 600,
488
+ cursor: "pointer",
489
+ display: "flex",
490
+ alignItems: "center",
491
+ justifyContent: "center",
492
+ gap: "4px",
493
+ }, onMouseEnter: (e) => {
494
+ var _a;
495
+ e.currentTarget.style.backgroundColor =
496
+ (_a = mergedTheme.primaryColor) !== null && _a !== void 0 ? _a : "#FF5500";
497
+ e.currentTarget.style.color = "#fff";
498
+ }, onMouseLeave: (e) => {
499
+ var _a;
500
+ e.currentTarget.style.backgroundColor =
501
+ "transparent";
502
+ e.currentTarget.style.color =
503
+ (_a = mergedTheme.primaryColor) !== null && _a !== void 0 ? _a : "#FF5500";
504
+ }, children: [(0, jsx_runtime_1.jsxs)("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [(0, jsx_runtime_1.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), (0, jsx_runtime_1.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }), mergedTexts.tryButton] })] })] }, item.id))) })] }, catIdx)))) })), (!hasCollections || activeTab === "create") && ((0, jsx_runtime_1.jsxs)("div", { className: "faceswap-layout", children: [(0, jsx_runtime_1.jsxs)("div", { className: "faceswap-col-left", children: [(0, jsx_runtime_1.jsxs)("div", { style: { padding: "16px 24px 24px", borderBottom: `1px solid var(--fs-border-color, transparent)` }, children: [(0, jsx_runtime_1.jsx)("h3", { style: { color: mergedTheme.textColor, fontSize: "18px", fontWeight: 700, marginBottom: "16px" }, children: mergedTexts.uploadTitle }), (0, jsx_runtime_1.jsx)("input", { ref: fileInputRef, type: "file", accept: acceptedImageTypes.join(",") || "image/*", onChange: handleFileChange, className: "hidden" }), (0, jsx_runtime_1.jsx)("div", { className: "relative rounded-lg p-8 mb-4 flex items-center justify-center border-2 border-dashed border-(--fs-border-color) overflow-hidden", style: { minHeight: "300px", background: "var(--neutral-10)" }, children: uploadedImage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { src: uploadedImage, alt: "Uploaded photo", className: "w-full h-full object-contain max-h-[300px]" }), (0, jsx_runtime_1.jsx)("button", { onClick: handleRemoveImage, "aria-label": (_j = mergedTexts.changeImageButton) !== null && _j !== void 0 ? _j : "Remove image", className: "absolute top-4 right-4 rounded-full flex items-center justify-center shadow-lg transition-colors", style: { width: "48px", height: "48px", backgroundColor: "#ef4444", color: "#ffffff" }, onMouseEnter: (e) => { e.currentTarget.style.backgroundColor = "#dc2626"; }, onMouseLeave: (e) => { e.currentTarget.style.backgroundColor = "#ef4444"; }, children: (0, jsx_runtime_1.jsx)("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", style: { width: "24px", height: "24px" }, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })] })) : null }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleUploadClick, className: "w-full text-white font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 cursor-pointer flex items-center justify-center gap-2", style: { backgroundColor: mergedTheme.primaryColor }, onMouseEnter: (e) => {
505
+ e.currentTarget.style.backgroundColor =
506
+ mergedTheme.primaryHoverColor ||
507
+ mergedTheme.primaryColor ||
508
+ "#ff1600";
567
509
  }, onMouseLeave: (e) => {
568
- if (uploadedImage &&
510
+ e.currentTarget.style.backgroundColor =
511
+ mergedTheme.primaryColor || "#FF5500";
512
+ }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) }), uploadedImage
513
+ ? mergedTexts.changeImageButton
514
+ : mergedTexts.uploadButton] }), uploadError && ((0, jsx_runtime_1.jsxs)("div", { role: "alert", className: "mt-4 flex items-start gap-2 p-3 rounded-lg border", style: {
515
+ color: (_k = mergedTheme.errorColor) !== null && _k !== void 0 ? _k : "#dc2626",
516
+ backgroundColor: (_l = mergedTheme.errorBackgroundColor) !== null && _l !== void 0 ? _l : "#fef2f2",
517
+ borderColor: (_m = mergedTheme.errorBorderColor) !== null && _m !== void 0 ? _m : "#fecaca",
518
+ }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", style: { width: "20px", height: "20px", marginTop: "2px" }, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm", children: uploadError })] }))] }), carouselExamples.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-bold mb-4", style: { color: mergedTheme.textColor }, children: mergedTexts.examplesTitle }), (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("button", { onClick: handlePrevExample, className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 w-8 h-8 bg-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-100 transition-colors -ml-4", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) }) }), (0, jsx_runtime_1.jsx)("div", { ref: carouselRef, className: "faceswap-examples-outer", children: (0, jsx_runtime_1.jsx)("div", { className: "faceswap-examples-grid", children: carouselExamples.map((example) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)("div", { className: "aspect-[3/4] rounded-lg overflow-hidden mb-2", style: { background: "rgba(255,255,255,0.07)" }, children: (0, jsx_runtime_1.jsx)("img", { src: example.image, alt: `Example ${example.id}`, className: "w-full h-full object-cover" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs leading-tight line-clamp-3 mb-2 min-h-[3rem]", style: { color: mergedTheme.textColor }, children: truncateText(example.description, 120) }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleTryExample(example.description), className: "w-full text-white font-bold text-sm px-4 py-2 rounded-full transition-colors duration-300 cursor-pointer flex items-center justify-center gap-2 mt-auto", style: {
519
+ backgroundColor: mergedTheme.primaryColor,
520
+ }, onMouseEnter: (e) => {
521
+ e.currentTarget.style.backgroundColor =
522
+ mergedTheme.primaryHoverColor ||
523
+ mergedTheme.primaryColor ||
524
+ "#ff1600";
525
+ }, onMouseLeave: (e) => {
526
+ e.currentTarget.style.backgroundColor =
527
+ mergedTheme.primaryColor || "#FF5500";
528
+ }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 5l7 7m0 0l-7 7m7-7H3" }) }), mergedTexts.tryButton] })] }, example.id))) }) }), (0, jsx_runtime_1.jsx)("button", { onClick: handleNextExample, className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 w-8 h-8 bg-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-100 transition-colors -mr-4", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })] })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "faceswap-col-right", children: [(0, jsx_runtime_1.jsxs)("div", { style: { padding: "16px 24px 24px", borderBottom: `1px solid var(--fs-border-color, transparent)` }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "16px", position: "relative" }, children: [(0, jsx_runtime_1.jsx)("h3", { style: { color: mergedTheme.textColor, fontSize: "18px", fontWeight: 700 }, children: mergedTexts.describeTitle }), (0, jsx_runtime_1.jsx)(ui_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(ui_1.Tooltip, { open: showTooltip, onOpenChange: setShowTooltip, children: [(0, jsx_runtime_1.jsx)(ui_1.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)("button", { className: "w-5 h-5 rounded-full border-2 flex items-center justify-center text-xs font-bold transition-colors border-[var(--theme-color)] text-[var(--theme-color)] hover:bg-(--theme-color) hover:text-white", style: {
529
+ "--theme-color": mergedTheme.textColor || "#001B5E",
530
+ }, children: "i" }) }), (0, jsx_runtime_1.jsx)(ui_1.TooltipContent, { className: "mt-2 w-64 rounded-lg p-4 z-20 text-sm", style: {
531
+ backgroundColor: mergedTheme.backgroundColor || "#F9F9F9",
532
+ border: `1px solid var(--fs-border-color, transparent)`,
533
+ color: mergedTheme.textColor,
534
+ boxShadow: `0 4px 20px rgba(0,0,0,0.25), 0 0 0 1px ${mergedTheme.textColor}22`,
535
+ backdropFilter: "blur(8px)",
536
+ opacity: 0.95,
537
+ }, children: (0, jsx_runtime_1.jsx)("p", { className: "leading-relaxed whitespace-pre-line", style: { color: mergedTheme.textColor }, children: mergedTexts.describeTooltip }) })] }) })] }), (0, jsx_runtime_1.jsx)("textarea", { value: description, onChange: (e) => setDescription(e.target.value), placeholder: mergedTexts.descriptionPlaceholder, className: (0, utils_1.cn)("faceswap-textarea w-full rounded-lg p-4 italic text-(--text-color) placeholder-gray-400 border border-(--fs-border-color) focus:outline-none focus:ring-2", showTooltip && "border-(--active-border-color)"), style: {
538
+ "--text-color": mergedTheme.textColor,
539
+ "--active-border-color": mergedTheme.primaryColor,
540
+ "--fs-border-color": mergedTheme.borderColor || "transparent",
541
+ background: "var(--neutral-10)",
542
+ } }), (0, jsx_runtime_1.jsx)("div", { className: "flex justify-end mt-4", children: (0, jsx_runtime_1.jsx)("button", { onClick: handleCreate, disabled: !uploadedImage ||
543
+ !description.trim() ||
544
+ isGenerating ||
545
+ (!!generatedResult && !generatedImageUrl), className: `font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 flex items-center gap-2 ${uploadedImage &&
569
546
  description.trim() &&
570
547
  !isGenerating &&
571
- !(!!generatedResult && !generatedImageUrl)) {
572
- e.currentTarget.style.backgroundColor =
573
- mergedTheme.primaryColor || "#FF5500";
574
- }
575
- }, children: isGenerating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("svg", { className: "w-5 h-5 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), mergedTexts.generatingButton] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), mergedTexts.createButton] })) }) }), error && ((0, jsx_runtime_1.jsx)("div", { className: "mt-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: (0, jsx_runtime_1.jsx)("p", { className: "text-red-600 text-sm", children: error }) }))] }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: "16px 24px 24px" }, children: [(0, jsx_runtime_1.jsx)("h3", { style: { color: mergedTheme.textColor, fontSize: "18px", fontWeight: 700, marginBottom: "16px" }, children: mergedTexts.resultTitle }), (0, jsx_runtime_1.jsx)("div", { className: "rounded-lg mb-4 border border-(--fs-border-color) flex items-center justify-center", style: { minHeight: "600px", background: mergedTheme.backgroundColor || "var(--neutral-10)" }, children: isGenerating ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsxs)("svg", { className: "w-16 h-16 animate-spin", fill: "none", viewBox: "0 0 24 24", style: { color: mergedTheme.primaryColor }, children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), (0, jsx_runtime_1.jsx)("p", { className: "font-bold", style: { color: mergedTheme.textColor }, children: "Generating your image..." }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500", children: "This may take a few moments" })] })) : generatedResult ? ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: generatedImageUrl ? ((0, jsx_runtime_1.jsxs)("div", { className: "w-full", children: [(0, jsx_runtime_1.jsx)("div", { className: "rounded-lg overflow-hidden mb-4", children: (0, jsx_runtime_1.jsx)("img", { src: generatedImageUrl, alt: "Generated image", className: "w-full h-auto" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-6 h-6 text-green-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-green-600 font-bold", children: mergedTexts.successMessage })] })] })) : progressPercent !== null ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-16 h-16 animate-pulse", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", style: { color: mergedTheme.primaryColor }, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "font-bold text-lg", style: { color: mergedTheme.textColor }, children: "Generating Image..." }), (0, jsx_runtime_1.jsx)("div", { className: "w-full max-w-md", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-white rounded-lg p-6 border border-(--fs-border-color)", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center mb-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm text-gray-600 font-bold", children: mergedTexts.progressText }), (0, jsx_runtime_1.jsxs)("span", { className: "text-2xl font-bold", style: { color: mergedTheme.primaryColor }, children: [progressPercent, "%"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full bg-gray-200 rounded-full h-4 overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-4 rounded-full transition-all duration-500 ease-out", style: {
576
- width: `${progressPercent}%`,
577
- background: `linear-gradient(to right, ${mergedTheme.primaryColor}, #FF8800)`,
578
- } }) })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-gray-500 text-center", children: "Creating your masterpiece..." })] }) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("svg", { className: "w-16 h-16 animate-spin", fill: "none", viewBox: "0 0 24 24", style: { color: mergedTheme.primaryColor }, children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), (0, jsx_runtime_1.jsx)("p", { className: "font-bold text-lg", style: { color: mergedTheme.textColor }, children: mergedTexts.startingText }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500 text-center", children: mergedTexts.preparingText })] })) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-3 text-gray-400", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-16 h-16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-center", children: mergedTexts.emptyStateText })] })) }), (0, jsx_runtime_1.jsxs)("div", { className: "faceswap-action-buttons", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: handleStartAgain, disabled: !generatedResult, className: "text-white font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 flex items-center gap-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed", style: { backgroundColor: mergedTheme.primaryColor }, onMouseEnter: (e) => {
579
- e.currentTarget.style.backgroundColor =
580
- mergedTheme.primaryHoverColor ||
581
- mergedTheme.primaryColor ||
582
- "#ff1600";
583
- }, onMouseLeave: (e) => {
584
- e.currentTarget.style.backgroundColor =
585
- mergedTheme.primaryColor || "#FF5500";
586
- }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" }) }), mergedTexts.startAgainButton] }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleDownload, disabled: !generatedImageUrl, className: "text-white font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 flex items-center gap-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed", style: { backgroundColor: mergedTheme.primaryColor }, onMouseEnter: (e) => {
587
- e.currentTarget.style.backgroundColor =
588
- mergedTheme.primaryHoverColor ||
589
- mergedTheme.primaryColor ||
590
- "#ff1600";
548
+ !(!!generatedResult && !generatedImageUrl)
549
+ ? "text-white cursor-pointer"
550
+ : "bg-gray-300 text-gray-500 cursor-not-allowed"}`, style: {
551
+ backgroundColor: uploadedImage &&
552
+ description.trim() &&
553
+ !isGenerating &&
554
+ !(!!generatedResult && !generatedImageUrl)
555
+ ? mergedTheme.primaryColor
556
+ : undefined,
557
+ }, onMouseEnter: (e) => {
558
+ if (uploadedImage &&
559
+ description.trim() &&
560
+ !isGenerating &&
561
+ !(!!generatedResult && !generatedImageUrl)) {
562
+ e.currentTarget.style.backgroundColor =
563
+ mergedTheme.primaryHoverColor ||
564
+ mergedTheme.primaryColor ||
565
+ "#ff1600";
566
+ }
591
567
  }, onMouseLeave: (e) => {
592
- e.currentTarget.style.backgroundColor =
593
- mergedTheme.primaryColor || "#FF5500";
594
- }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" }) }), mergedTexts.downloadButton] })] })] })] })] }))] }) }));
568
+ if (uploadedImage &&
569
+ description.trim() &&
570
+ !isGenerating &&
571
+ !(!!generatedResult && !generatedImageUrl)) {
572
+ e.currentTarget.style.backgroundColor =
573
+ mergedTheme.primaryColor || "#FF5500";
574
+ }
575
+ }, children: isGenerating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("svg", { className: "w-5 h-5 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), mergedTexts.generatingButton] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }), mergedTexts.createButton] })) }) }), error && ((0, jsx_runtime_1.jsx)("div", { className: "mt-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: (0, jsx_runtime_1.jsx)("p", { className: "text-red-600 text-sm", children: error }) }))] }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: "16px 24px 24px" }, children: [(0, jsx_runtime_1.jsx)("h3", { style: { color: mergedTheme.textColor, fontSize: "18px", fontWeight: 700, marginBottom: "16px" }, children: mergedTexts.resultTitle }), (0, jsx_runtime_1.jsx)("div", { className: "rounded-lg mb-4 border border-(--fs-border-color) flex items-center justify-center", style: { minHeight: "600px", background: mergedTheme.backgroundColor || "var(--neutral-10)" }, children: isGenerating ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsxs)("svg", { className: "w-16 h-16 animate-spin", fill: "none", viewBox: "0 0 24 24", style: { color: mergedTheme.primaryColor }, children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), (0, jsx_runtime_1.jsx)("p", { className: "font-bold", style: { color: mergedTheme.textColor }, children: "Generating your image..." }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500", children: "This may take a few moments" })] })) : generatedResult ? ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: generatedImageUrl ? ((0, jsx_runtime_1.jsxs)("div", { className: "w-full", children: [(0, jsx_runtime_1.jsx)("div", { className: "rounded-lg overflow-hidden mb-4", children: (0, jsx_runtime_1.jsx)("img", { src: generatedImageUrl, alt: "Generated image", className: "w-full h-auto" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-6 h-6 text-green-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-green-600 font-bold", children: mergedTexts.successMessage })] })] })) : progressPercent !== null ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-16 h-16 animate-pulse", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", style: { color: mergedTheme.primaryColor }, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "font-bold text-lg", style: { color: mergedTheme.textColor }, children: "Generating Image..." }), (0, jsx_runtime_1.jsx)("div", { className: "w-full max-w-md", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-white rounded-lg p-6 border border-(--fs-border-color)", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center mb-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm text-gray-600 font-bold", children: mergedTexts.progressText }), (0, jsx_runtime_1.jsxs)("span", { className: "text-2xl font-bold", style: { color: mergedTheme.primaryColor }, children: [progressPercent, "%"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full bg-gray-200 rounded-full h-4 overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-4 rounded-full transition-all duration-500 ease-out", style: {
576
+ width: `${progressPercent}%`,
577
+ background: `linear-gradient(to right, ${mergedTheme.primaryColor}, #FF8800)`,
578
+ } }) })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-gray-500 text-center", children: "Creating your masterpiece..." })] }) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("svg", { className: "w-16 h-16 animate-spin", fill: "none", viewBox: "0 0 24 24", style: { color: mergedTheme.primaryColor }, children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), (0, jsx_runtime_1.jsx)("p", { className: "font-bold text-lg", style: { color: mergedTheme.textColor }, children: mergedTexts.startingText }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500 text-center", children: mergedTexts.preparingText })] })) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-3 text-gray-400", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-16 h-16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-center", children: mergedTexts.emptyStateText })] })) }), (0, jsx_runtime_1.jsxs)("div", { className: "faceswap-action-buttons", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: handleStartAgain, disabled: !generatedResult, className: "text-white font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 flex items-center gap-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed", style: { backgroundColor: mergedTheme.primaryColor }, onMouseEnter: (e) => {
579
+ e.currentTarget.style.backgroundColor =
580
+ mergedTheme.primaryHoverColor ||
581
+ mergedTheme.primaryColor ||
582
+ "#ff1600";
583
+ }, onMouseLeave: (e) => {
584
+ e.currentTarget.style.backgroundColor =
585
+ mergedTheme.primaryColor || "#FF5500";
586
+ }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" }) }), mergedTexts.startAgainButton] }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleDownload, disabled: !generatedImageUrl, className: "text-white font-bold text-base px-6 py-3 rounded-full transition-colors duration-300 flex items-center gap-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed", style: { backgroundColor: mergedTheme.primaryColor }, onMouseEnter: (e) => {
587
+ e.currentTarget.style.backgroundColor =
588
+ mergedTheme.primaryHoverColor ||
589
+ mergedTheme.primaryColor ||
590
+ "#ff1600";
591
+ }, onMouseLeave: (e) => {
592
+ e.currentTarget.style.backgroundColor =
593
+ mergedTheme.primaryColor || "#FF5500";
594
+ }, children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" }) }), mergedTexts.downloadButton] })] })] })] })] }))] }), (disclaimerAiCfg === null || disclaimerAiCfg === void 0 ? void 0 : disclaimerAiCfg.pais_ue) === 1 && ((0, jsx_runtime_1.jsxs)("div", { style: { maxWidth: '1280px', margin: '16px auto', padding: '12px 16px', background: '#eff6ff', border: '1px solid #bfdbfe', borderRadius: 8, display: 'flex', alignItems: 'flex-start', gap: 10 }, className: disclaimerAiCfg.className, children: [(0, jsx_runtime_1.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "#2563eb", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { flexShrink: 0, marginTop: 2 }, children: [(0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "10" }), (0, jsx_runtime_1.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }), (0, jsx_runtime_1.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })] }), (0, jsx_runtime_1.jsx)("p", { style: { margin: 0, fontSize: 13, color: '#1e40af', lineHeight: 1.5 }, children: disclaimerAiCfg.text })] }))] }));
595
595
  }
596
596
  void ui_1.Button;
597
597
  exports.default = CreativeFaceSwap;