@aitronos/freddy-plugins 0.4.74 → 0.4.75

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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/plugins/icon-style.ts","../src/directives/frSanitize.ts","../src/plugin.ts","../src/plugins/index.ts","../src/animations/AnimeSpaceman.vue","../src/components/AdvancedModal.vue","../src/components/Assistant/AssistantField.vue","../src/components/Assistant/AssistantList.vue","../src/components/Assistant/AssistantsHeader.vue","../src/components/Assistant/AvatarChoosing.vue","../src/components/Assistant/AvatarList.vue","../src/components/Assistant/ChooseAssistantAvatar.vue","../src/components/Tabs/BaseTabButton.vue","../src/components/Assistant/RulesManagement.vue","../src/components/Assistant/VectorFrame.vue","../src/components/Assistant/VectorSection.vue","../src/components/Assistant/VoiceList.vue","../src/components/Assistant/VoiceSelection.vue","../src/composables/useTheme.ts","../src/components/Tooltip.vue","../src/components/Buttons/BaseButton.vue","../src/components/Buttons/SocialButtons.vue","../src/components/CodeBlock.vue","../src/components/CustomCheckbox.vue","../src/components/TooltipV2.vue","../src/services/AITextService.ts","../src/components/SimpleChatInterface.vue","../src/components/EditFeaturedExcerptModal.vue","../src/components/TextAreaInputField.vue","../src/components/Descriptions.vue","../src/components/DiffTextarea.vue","../src/components/Switch.vue","../src/components/Dropdown.vue","../src/components/EmailCodeVerification.vue","../src/components/InputField/BaseInput.vue","../src/components/InputField/CardInput.vue","../src/components/InputField/DefaultInput.vue","../src/components/InputField/PhoneInput.vue","../src/components/InputField/InputField.vue","../src/components/ModalBox.vue","../src/components/Instructions/InstructionsModal.vue","../src/components/Instructions/InstructiontextArea.vue","../src/components/ModalOverlay.vue","../src/components/Spinner.vue","../src/components/SearchInput.vue","../src/components/ModelDropdown.vue","../src/components/OutputModeModal.vue","../src/components/Pagination.vue","../src/components/SendButton.vue","../src/components/SkeletonLoader.vue","../src/components/Slider.vue","../src/components/SnackBar.vue","../src/components/SwitchSlot.vue","../src/components/TabList.vue","../src/components/ToastMessage.vue","../src/composables/useErrorHandler.ts","../src/composables/usePerformance.ts"],"sourcesContent":["// src/plugins/icon-style.ts\n\nimport type { Directive } from \"vue\";\n\nconst IconStyleDirective: Directive = {\n mounted(el: HTMLElement) {\n if (!el.getAttribute(\"class\")) {\n el.setAttribute(\"class\", \"base-fallback-style\");\n }\n },\n};\n\nexport default IconStyleDirective;\n","import type { DirectiveBinding } from \"vue\";\n\n// Optional dependency - handle gracefully if not installed\nlet DOMPurify: any = null;\n\n// Load DOMPurify asynchronously\nconst loadDOMPurify = async () => {\n try {\n const dompurifyModule = await import('dompurify');\n DOMPurify = dompurifyModule.default;\n } catch {\n // DOMPurify not available - will use basic sanitization\n }\n};\n\n// Load on module initialization\nloadDOMPurify();\n\nconst SAFE_TAGS = [\n \"a\",\n \"abbr\",\n \"b\",\n \"blockquote\",\n \"br\",\n \"code\",\n \"div\",\n \"em\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"hr\",\n \"i\",\n \"img\",\n \"li\",\n \"ol\",\n \"p\",\n \"pre\",\n \"span\",\n \"strong\",\n \"sub\",\n \"sup\",\n \"table\",\n \"tbody\",\n \"td\",\n \"th\",\n \"thead\",\n \"tr\",\n \"u\",\n \"ul\",\n];\n\nconst SAFE_ATTRS = [\n \"href\",\n \"src\",\n \"alt\",\n \"title\",\n \"width\",\n \"height\",\n \"align\",\n \"class\",\n \"id\",\n \"colspan\",\n \"rowspan\",\n];\n\n// Basic sanitization fallback\nconst basicSanitize = (html: string): string => {\n return html\n .replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi, '')\n .replace(/<iframe\\b[^<]*(?:(?!<\\/iframe>)<[^<]*)*<\\/iframe>/gi, '')\n .replace(/on\\w+=\"[^\"]*\"/gi, '')\n .replace(/javascript:/gi, '');\n};\n\nconst sanitizeContent = (content: string): string => {\n if (!DOMPurify) {\n return basicSanitize(content);\n }\n \n try {\n return DOMPurify.sanitize(content, {\n ALLOWED_TAGS: SAFE_TAGS,\n ALLOWED_ATTR: SAFE_ATTRS,\n USE_PROFILES: { html: true },\n });\n } catch {\n return basicSanitize(content);\n }\n};\n\nexport const vFrSanitize = {\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n el.innerHTML = sanitizeContent(binding.value || \"\");\n },\n updated(el: HTMLElement, binding: DirectiveBinding) {\n el.innerHTML = sanitizeContent(binding.value || \"\");\n },\n};\n","// plugin.ts\nimport type { App } from 'vue';\nimport { defineAsyncComponent } from 'vue';\nimport IconStyleDirective from './plugins/icon-style';\n// Theme service removed in v0.4.54 - SSR incompatibility\n// import { themeServicePlugin } from './plugins/theme-service.global';\nimport { vFrSanitize } from './directives/frSanitize';\n\nconst FreddyPlugin = {\n install(app: App) {\n // ❌ Theme service plugin removed in v0.4.54 due to SSR issues\n // themeServicePlugin.install(app);\n\n // ✅ Register directives\n app.directive('icon-style', IconStyleDirective);\n app.directive('fr-sanitize', vFrSanitize);\n\n // ✅ Auto-register icon components (SSR-safe lazy loading)\n // Use lazy loading instead of eager to prevent TDZ errors in Nuxt3 SSR\n // Components are loaded on-demand when first used, which is SSR-safe\n // Wrap in try-catch and type assertion for DTS compatibility\n try {\n // @ts-expect-error - import.meta.glob is a Vite build-time feature\n const components: Record<string, () => Promise<{ default: any }>> =\n import.meta.glob('./icons/**/*.vue', {\n eager: false,\n });\n\n // Register icons lazily using defineAsyncComponent for SSR compatibility\n // This prevents initialization errors in SSR environments like Nuxt3\n for (const path in components) {\n const name = path.split('/').pop()?.replace('.vue', '') || '';\n if (name && components[path]) {\n // Register component with async loader - SSR-safe\n app.component(\n name,\n defineAsyncComponent({\n loader: async () => {\n const component: any = await components[path]();\n return component.default || component;\n },\n delay: 0,\n timeout: 0,\n })\n );\n }\n }\n } catch (error) {\n // Silently fail during type generation - icons will be registered at runtime\n if (\n typeof process !== 'undefined' &&\n process.env.NODE_ENV !== 'production'\n ) {\n console.warn('Failed to register icons:', error);\n }\n }\n },\n};\n\nexport default FreddyPlugin;\n","// src/plugins/index.ts\nimport type { App } from \"vue\";\nimport { vFrSanitize } from \"../directives/frSanitize\";\nimport IconStyleDirective from \"./icon-style\";\n\n// Plugin that installs fr-sanitize directive\nexport const frSanitizePlugin = {\n install(app: App) {\n app.directive(\"fr-sanitize\", vFrSanitize);\n },\n};\n\n// Plugin that installs icon-style directive\nexport const iconStylePlugin = {\n install(app: App) {\n app.directive(\"icon-style\", IconStyleDirective);\n },\n};\n\n// Combined plugin that installs both directives\nexport default {\n install(app: App) {\n frSanitizePlugin.install(app);\n iconStylePlugin.install(app);\n },\n};\n","<template>\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 800 600\"\n class=\"spaceman-logo\"\n :class=\"customClass\"\n :style=\"customStyle\"\n >\n <g>\n <defs>\n <clipPath id=\"GlassClip\">\n <path\n d=\"M380.857,346.164c-1.247,4.651-4.668,8.421-9.196,10.06c-9.332,3.377-26.2,7.817-42.301,3.5\n s-28.485-16.599-34.877-24.192c-3.101-3.684-4.177-8.66-2.93-13.311l7.453-27.798c0.756-2.82,3.181-4.868,6.088-5.13\n c6.755-0.61,20.546-0.608,41.785,5.087s33.181,12.591,38.725,16.498c2.387,1.682,3.461,4.668,2.705,7.488L380.857,346.164z\"\n />\n </clipPath>\n <clipPath id=\"cordClip\">\n <rect width=\"800\" height=\"600\" />\n </clipPath>\n </defs>\n\n <g id=\"planet\">\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n cx=\"572.859\"\n cy=\"108.803\"\n r=\"90.788\"\n />\n\n <circle\n id=\"craterBig\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n cx=\"548.891\"\n cy=\"62.319\"\n r=\"13.074\"\n />\n\n <circle\n id=\"craterSmall\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n cx=\"591.743\"\n cy=\"158.918\"\n r=\"7.989\"\n />\n <path\n id=\"ring\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M476.562,101.461c-30.404,2.164-49.691,4.221-49.691,8.007c0,6.853,63.166,12.408,141.085,12.408s141.085-5.555,141.085-12.408\n c0-3.378-15.347-4.988-40.243-7.225\"\n />\n\n <path\n id=\"ringShadow\"\n opacity=\"0.5\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M483.985,127.43c23.462,1.531,52.515,2.436,83.972,2.436c36.069,0,68.978-1.19,93.922-3.149\"\n />\n </g>\n <g id=\"stars\">\n <g id=\"starsBig\">\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"518.07\"\n y1=\"245.375\"\n x2=\"518.07\"\n y2=\"266.581\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"508.129\"\n y1=\"255.978\"\n x2=\"528.01\"\n y2=\"255.978\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"154.55\"\n y1=\"231.391\"\n x2=\"154.55\"\n y2=\"252.598\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"144.609\"\n y1=\"241.995\"\n x2=\"164.49\"\n y2=\"241.995\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"320.135\"\n y1=\"132.746\"\n x2=\"320.135\"\n y2=\"153.952\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"310.194\"\n y1=\"143.349\"\n x2=\"330.075\"\n y2=\"143.349\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"200.67\"\n y1=\"483.11\"\n x2=\"200.67\"\n y2=\"504.316\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"210.611\"\n y1=\"493.713\"\n x2=\"190.73\"\n y2=\"493.713\"\n />\n </g>\n </g>\n <g id=\"starsSmall\">\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"432.173\"\n y1=\"380.52\"\n x2=\"432.173\"\n y2=\"391.83\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"426.871\"\n y1=\"386.175\"\n x2=\"437.474\"\n y2=\"386.175\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"489.555\"\n y1=\"299.765\"\n x2=\"489.555\"\n y2=\"308.124\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"485.636\"\n y1=\"303.945\"\n x2=\"493.473\"\n y2=\"303.945\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"231.468\"\n y1=\"291.009\"\n x2=\"231.468\"\n y2=\"299.369\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"227.55\"\n y1=\"295.189\"\n x2=\"235.387\"\n y2=\"295.189\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"244.032\"\n y1=\"547.539\"\n x2=\"244.032\"\n y2=\"555.898\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"247.95\"\n y1=\"551.719\"\n x2=\"240.113\"\n y2=\"551.719\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"186.359\"\n y1=\"406.967\"\n x2=\"186.359\"\n y2=\"415.326\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"190.277\"\n y1=\"411.146\"\n x2=\"182.44\"\n y2=\"411.146\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"480.296\"\n y1=\"406.967\"\n x2=\"480.296\"\n y2=\"415.326\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"484.215\"\n y1=\"411.146\"\n x2=\"476.378\"\n y2=\"411.146\"\n />\n </g>\n </g>\n <g id=\"circlesBig\">\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"588.977\"\n cy=\"255.978\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"450.066\"\n cy=\"320.259\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"168.303\"\n cy=\"353.753\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"429.522\"\n cy=\"201.185\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"200.67\"\n cy=\"176.313\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"133.343\"\n cy=\"477.014\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"283.521\"\n cy=\"568.033\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"413.618\"\n cy=\"482.387\"\n r=\"7.952\"\n />\n </g>\n <g id=\"circlesSmall\">\n <circle fill=\"#ffffff\" cx=\"549.879\" cy=\"296.402\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"253.29\" cy=\"229.24\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"434.824\" cy=\"263.931\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"183.708\" cy=\"544.176\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"382.515\" cy=\"530.923\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"130.693\" cy=\"305.608\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"480.296\" cy=\"477.014\" r=\"2.651\" />\n </g>\n </g>\n <g id=\"spaceman\" clip-path=\"url(cordClip)\">\n <path\n id=\"cord\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M273.813,410.969c0,0-54.527,39.501-115.34,38.218c-2.28-0.048-4.926-0.241-7.841-0.548\n c-68.038-7.178-134.288-43.963-167.33-103.87c-0.908-1.646-1.793-3.3-2.654-4.964c-18.395-35.511-37.259-83.385-32.075-118.817\"\n />\n\n <path\n id=\"backpack\"\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M338.164,454.689l-64.726-17.353c-11.086-2.972-17.664-14.369-14.692-25.455l15.694-58.537\n c3.889-14.504,18.799-23.11,33.303-19.221l52.349,14.035c14.504,3.889,23.11,18.799,19.221,33.303l-15.694,58.537\n C360.647,451.083,349.251,457.661,338.164,454.689z\"\n />\n <g id=\"antenna\">\n <line\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"323.396\"\n y1=\"236.625\"\n x2=\"295.285\"\n y2=\"353.753\"\n />\n <circle\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"323.666\"\n cy=\"235.617\"\n r=\"6.375\"\n />\n </g>\n <g id=\"armR\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M360.633,363.039c1.352,1.061,4.91,5.056,5.824,6.634l27.874,47.634c3.855,6.649,1.59,15.164-5.059,19.02l0,0\n c-6.649,3.855-15.164,1.59-19.02-5.059l-5.603-9.663\"\n />\n\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M388.762,434.677c5.234-3.039,7.731-8.966,6.678-14.594c2.344,1.343,4.383,3.289,5.837,5.793\n c4.411,7.596,1.829,17.33-5.767,21.741c-7.596,4.411-17.33,1.829-21.741-5.767c-1.754-3.021-2.817-5.818-2.484-9.046\n C375.625,437.355,383.087,437.973,388.762,434.677z\"\n />\n </g>\n <g id=\"armL\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M301.301,347.66c-1.702,0.242-5.91,1.627-7.492,2.536l-47.965,27.301c-6.664,3.829-8.963,12.335-5.134,18.999h0\n c3.829,6.664,12.335,8.963,18.999,5.134l9.685-5.564\"\n />\n\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M241.978,395.324c-3.012-5.25-2.209-11.631,1.518-15.977c-2.701-0.009-5.44,0.656-7.952,2.096\n c-7.619,4.371-10.253,14.09-5.883,21.71c4.371,7.619,14.09,10.253,21.709,5.883c3.03-1.738,5.35-3.628,6.676-6.59\n C252.013,404.214,245.243,401.017,241.978,395.324z\"\n />\n </g>\n <g id=\"body\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M353.351,365.387c-7.948,1.263-16.249,0.929-24.48-1.278c-8.232-2.207-15.586-6.07-21.836-11.14\n c-17.004,4.207-31.269,17.289-36.128,35.411l-1.374,5.123c-7.112,26.525,8.617,53.791,35.13,60.899l0,0\n c26.513,7.108,53.771-8.632,60.883-35.158l1.374-5.123C371.778,395.999,365.971,377.536,353.351,365.387z\"\n />\n <path\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M269.678,394.912L269.678,394.912c26.3,20.643,59.654,29.585,93.106,25.724l2.419-0.114\"\n />\n </g>\n <g id=\"legs\">\n <g id=\"legR\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M312.957,456.734l-14.315,53.395c-1.896,7.07,2.299,14.338,9.37,16.234l0,0c7.07,1.896,14.338-2.299,16.234-9.37l17.838-66.534\n C333.451,455.886,323.526,457.387,312.957,456.734z\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"304.883\"\n y1=\"486.849\"\n x2=\"330.487\"\n y2=\"493.713\"\n />\n </g>\n <g id=\"legL\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M296.315,452.273L282,505.667c-1.896,7.07-9.164,11.265-16.234,9.37l0,0c-7.07-1.896-11.265-9.164-9.37-16.234l17.838-66.534\n C278.993,441.286,286.836,447.55,296.315,452.273z\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"262.638\"\n y1=\"475.522\"\n x2=\"288.241\"\n y2=\"482.387\"\n />\n </g>\n </g>\n <g id=\"head\">\n <ellipse\n transform=\"matrix(0.259 -0.9659 0.9659 0.259 -51.5445 563.2371)\"\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"341.295\"\n cy=\"315.211\"\n rx=\"61.961\"\n ry=\"60.305\"\n />\n <path\n id=\"headStripe\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M330.868,261.338c-7.929,1.72-15.381,5.246-21.799,10.246\"\n />\n\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M380.857,346.164c-1.247,4.651-4.668,8.421-9.196,10.06c-9.332,3.377-26.2,7.817-42.301,3.5s-28.485-16.599-34.877-24.192\n c-3.101-3.684-4.177-8.66-2.93-13.311l7.453-27.798c0.756-2.82,3.181-4.868,6.088-5.13c6.755-0.61,20.546-0.608,41.785,5.087\n s33.181,12.591,38.725,16.498c2.387,1.682,3.461,4.668,2.705,7.488L380.857,346.164z\"\n />\n <g clip-path=\"url(#GlassClip)\">\n <polygon\n id=\"glassShine\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n points=\"\n 278.436,375.599 383.003,264.076 364.393,251.618 264.807,364.928 \t\t\t\t\"\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n</template>\n\n<script setup lang=\"ts\">\ninterface SpacemanLogoProps {\n /** Custom CSS class to apply to the component */\n customClass?: string;\n /** Custom inline styles to apply */\n customStyle?: string | Record<string, string>;\n}\n\ndefineProps<SpacemanLogoProps>();\n</script>\n\n<style>\n/* Spaceman animations */\n@keyframes float {\n 0%,\n 100% {\n transform: translateY(0px);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n.spaceman-logo {\n animation: float 3s ease-in-out infinite;\n}\n\n.spaceman-logo #planet {\n animation: rotate 20s linear infinite;\n}\n\n.spaceman-logo #stars {\n animation: float 4s ease-in-out infinite reverse;\n}\n</style>\n","<template>\n <Transition name=\"modal\">\n <div\n v-if=\"isVisible\"\n class=\"fixed z-[9998] top-0 left-0 w-full h-full bg-modalBackgroundBlur flex justify-center items-center\"\n >\n <div class=\"flex justify-center items-center\">\n <div\n :class=\"{\n 'p-8 bg-background rounded-[2.5rem] overflow-hidden text-white 2xl:w-[56.25rem] xl:w-[56.25rem] lg:w-[56.25rem] md:w-[45.625rem] sm:w-[31.25rem] xs:w-auto':\n largeModel,\n }\"\n >\n <div class=\"modal-header\">\n <slot name=\"header\" />\n </div>\n\n <div class=\"modal-body\">\n <slot name=\"body\" />\n </div>\n\n <div class=\"modal-footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n defineProps<{\n isVisible: boolean;\n largeModel: boolean;\n }>();\n</script>\n","<template>\n <div\n class=\"freddy-assistant-field\"\n :class=\"{ 'freddy-assistant-field--selected': isSelected }\"\n @click=\"handleClick\"\n >\n <div class=\"freddy-assistant-field__content\">\n <div class=\"freddy-assistant-field__header\">\n <div class=\"freddy-assistant-field__name\">{{ name }}</div>\n <div class=\"freddy-assistant-field__date\">{{ date }}</div>\n </div>\n <div class=\"freddy-assistant-field__footer\">\n <div class=\"freddy-assistant-field__id\">{{ assistantId }}</div>\n <div v-if=\"isDefault\" class=\"freddy-assistant-field__privacy-icon\">\n <IconLock class=\"freddy-assistant-field__lock-icon\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { IconLock } from '@/icons';\n import type { AssistantFieldProps, AssistantFieldEvents } from '@/interfaces';\n\n const props = withDefaults(defineProps<AssistantFieldProps>(), {\n name: 'Name of the assistant',\n date: 'mar 2024',\n assistantId: 'Ass_id.asdasddas',\n isDefault: false,\n isSelected: false,\n });\n\n const emit = defineEmits<AssistantFieldEvents>();\n\n const handleClick = (event: MouseEvent) => {\n emit('assistantFieldClick', event);\n };\n</script>\n\n<style scoped>\n .freddy-assistant-field {\n min-height: 54px;\n min-width: 346px;\n max-height: 80px;\n padding: 12px;\n background: #031525;\n overflow: hidden;\n border-radius: 16px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n }\n\n .freddy-assistant-field:hover {\n background: #0a1f3a;\n transform: scale(1.02);\n border-radius: 16px;\n }\n\n .freddy-assistant-field--selected {\n background: #1d2e47;\n transform: scale(1.02);\n border-radius: 16px;\n }\n\n .freddy-assistant-field__content {\n align-self: stretch;\n overflow: hidden;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-assistant-field__header {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: inline-flex;\n }\n\n .freddy-assistant-field__name {\n color: white;\n font-size: 16px;\n font-family: Inter;\n font-weight: 600;\n line-height: 24px;\n word-wrap: break-word;\n }\n\n .freddy-assistant-field__date {\n color: #cbd6e3;\n font-size: 10px;\n font-family: Inter;\n font-weight: 400;\n line-height: 18px;\n word-wrap: break-word;\n }\n\n .freddy-assistant-field__footer {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: inline-flex;\n }\n\n .freddy-assistant-field__id {\n justify-content: flex-start;\n display: flex;\n flex-direction: row;\n color: #cbd6e3;\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-assistant-field__privacy-icon {\n width: 22px;\n height: 22px;\n padding: 3px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 100px;\n justify-content: center;\n align-items: center;\n display: flex;\n }\n\n .freddy-assistant-field__lock-icon {\n width: 16px;\n height: 16px;\n position: relative;\n overflow: hidden;\n border-radius: 100px;\n color: black;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-assistant-field {\n padding: 10px;\n gap: 8px;\n }\n\n .freddy-assistant-field__name {\n font-size: 14px;\n line-height: 20px;\n }\n\n .freddy-assistant-field__id {\n font-size: 12px;\n line-height: 18px;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-assistant-field {\n padding: 8px;\n gap: 6px;\n }\n\n .freddy-assistant-field__name {\n font-size: 12px;\n line-height: 18px;\n }\n\n .freddy-assistant-field__date {\n font-size: 8px;\n line-height: 14px;\n }\n\n .freddy-assistant-field__id {\n font-size: 10px;\n line-height: 16px;\n }\n }\n</style>\n","<template>\n <div class=\"freddy-assistant-list\">\n <div class=\"freddy-assistant-list__container\">\n <AssistantField\n v-for=\"(assistant, index) in assistantsWithSelection\"\n :key=\"assistant.id || index\"\n :name=\"assistant.name\"\n :date=\"assistant.date\"\n :assistantId=\"assistant.assistantId\"\n :isDefault=\"assistant.isDefault\"\n :isSelected=\"assistant.isSelected\"\n @assistantFieldClick=\"handleAssistantClick(assistant, $event)\"\n />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed } from 'vue';\n import { AssistantField } from '@/components';\n import type {\n AssistantListProps,\n AssistantListEvents,\n AssistantItem,\n } from '@/interfaces';\n\n const props = withDefaults(defineProps<AssistantListProps>(), {\n assistants: () => [],\n selectedAssistantId: null,\n });\n\n const emit = defineEmits<AssistantListEvents>();\n\n // Track selected assistant (internal state)\n const internalSelectedId = ref<string | null>(props.selectedAssistantId);\n\n // Computed property to update assistant selection state\n const assistantsWithSelection = computed(() => {\n const currentSelectedId =\n props.selectedAssistantId ?? internalSelectedId.value;\n return props.assistants.map(assistant => ({\n ...assistant,\n isSelected: assistant.assistantId === currentSelectedId,\n }));\n });\n\n const handleAssistantClick = (\n assistant: AssistantItem,\n event: MouseEvent\n ) => {\n // Update internal selection state using assistantId\n internalSelectedId.value = assistant.assistantId;\n\n // Emit the event\n emit('assistantClick', assistant, event);\n };\n</script>\n\n<style scoped>\n .freddy-assistant-list {\n width: 100%;\n height: 100%;\n min-height: 824px;\n padding-right: 10px;\n background: #031525;\n border-right: 1px solid white;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n\n .freddy-assistant-list__container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-assistant-list {\n padding-right: 8px;\n gap: 8px;\n }\n\n .freddy-assistant-list__container {\n gap: 8px;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-assistant-list {\n padding-right: 6px;\n gap: 6px;\n }\n\n .freddy-assistant-list__container {\n gap: 6px;\n }\n }\n</style>\n","<template>\n <div class=\"freddy-assistants-header\">\n <!-- Avatar Section with Edit Button Overlay -->\n <div\n class=\"freddy-assistants-header__avatar-section\"\n :class=\"{\n 'freddy-assistants-header__avatar-section--with-image': assistantImage,\n 'freddy-assistants-header__avatar-section--no-image': !assistantImage,\n }\"\n >\n <!-- When assistantImage is provided -->\n <div v-if=\"assistantImage\" class=\"freddy-assistants-header__avatar\">\n <img\n :src=\"assistantImage\"\n alt=\"Assistant Avatar\"\n class=\"freddy-assistants-header__avatar-image\"\n />\n <!-- Edit Button Overlay for image -->\n <button\n class=\"freddy-assistants-header__edit-overlay\"\n @click=\"handleEditClick\"\n >\n <IconEdit class=\"freddy-assistants-header__edit-icon\" />\n </button>\n </div>\n\n <!-- When no assistantImage - show icon in place of image -->\n <div v-else class=\"freddy-assistants-header__icon-with-edit\">\n <component\n :is=\"iconComponent\"\n class=\"freddy-assistants-header__icon-component\"\n />\n <button\n class=\"freddy-assistants-header__edit-overlay-icon\"\n @click=\"handleEditClick\"\n >\n <IconEdit class=\"freddy-assistants-header__edit-icon\" />\n </button>\n </div>\n\n <!-- Icon next to avatar (when image is provided) -->\n <div\n v-if=\"assistantImage && assistantIcon\"\n class=\"freddy-assistants-header__side-icon\"\n >\n <component\n :is=\"iconComponent\"\n class=\"freddy-assistants-header__side-icon-component\"\n />\n </div>\n </div>\n\n <!-- Center Content Section -->\n <div class=\"freddy-assistants-header__content\">\n <div class=\"freddy-assistants-header__content-inner\">\n <!-- Text Content -->\n <div class=\"freddy-assistants-header__text-content\">\n <!-- Assistant ID Badge -->\n <div class=\"freddy-assistants-header__id-badge\">\n {{ assistantId || 'assistant ID' }}\n </div>\n </div>\n </div>\n </div>\n\n <!-- Right Action Button -->\n <div class=\"freddy-assistants-header__actions\">\n <button\n class=\"freddy-assistants-header__playground-button\"\n @click=\"handlePlaygroundClick\"\n >\n <IconNewTab class=\"freddy-assistants-header__playground-icon\" />\n <span class=\"freddy-assistants-header__playground-label\"\n >Playground</span\n >\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineAsyncComponent } from 'vue';\n import { IconEdit, IconNewTab, IconRobotScreen } from '@/icons';\n\n interface Props {\n // Assistant Props\n assistantImage?: string;\n assistantIcon: string; // Icon name as string (e.g., \"IconRobotScreen\") - REQUIRED\n assistantId?: string;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n assistantImage: undefined,\n assistantIcon: 'IconRobotScreen', // Default icon since it's required\n assistantId: 'assistant ID',\n });\n\n const emit = defineEmits<{\n edit: [event: MouseEvent];\n playground: [event: MouseEvent];\n }>();\n\n const handleEditClick = (event: MouseEvent) => {\n emit('edit', event);\n };\n\n const handlePlaygroundClick = (event: MouseEvent) => {\n emit('playground', event);\n };\n\n // Dynamic icon component resolver with lazy loading\n const getIconComponent = (iconName: string) => {\n if (!iconName) return IconRobotScreen;\n\n // Dynamically import the icon component\n return defineAsyncComponent(() =>\n import(`@/icons/${iconName}.vue`).catch(() => {\n // Fallback to IconRobotScreen if icon not found\n return import('@/icons/IconRobotScreen.vue');\n })\n );\n };\n\n // Computed property for reactive icon component\n const iconComponent = computed(() => getIconComponent(props.assistantIcon));\n</script>\n\n<style>\n .freddy-assistants-header {\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n\n padding: 0;\n background: transparent;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n /* Avatar Section */\n .freddy-assistants-header__avatar-section {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n /* When there's an image - gap between image and side icon */\n .freddy-assistants-header__avatar-section--with-image {\n gap: 30px;\n }\n\n /* When there's no image - gap between icon and text */\n .freddy-assistants-header__avatar-section--no-image {\n gap: 15px;\n }\n\n .freddy-assistants-header__avatar {\n width: 60px;\n height: 60px;\n border-radius: 50%;\n overflow: visible;\n background: #cfcbdc;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n\n .freddy-assistants-header__avatar-image {\n width: 60px;\n height: 60px;\n background: #cfcbdc;\n border-radius: 50%;\n object-fit: cover;\n }\n\n .freddy-assistants-header__avatar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background: #cfcbdc;\n border-radius: 50%;\n }\n\n .freddy-assistants-header__icon-component {\n width: 40px;\n height: 40px;\n color: #031525;\n }\n\n .freddy-assistants-header__avatar-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background: #cfcbdc;\n border-radius: 50%;\n }\n\n .freddy-assistants-header__placeholder-edit-icon {\n width: 24px;\n height: 24px;\n color: #031525;\n }\n\n /* Icon with Edit Overlay */\n .freddy-assistants-header__icon-with-edit {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n /* background: #cfcbdc; - Removed background for transparency */\n border-radius: 50%;\n }\n\n .freddy-assistants-header__icon-with-edit\n .freddy-assistants-header__icon-component {\n width: 40px;\n height: 40px;\n color: #031525;\n }\n\n .freddy-assistants-header__edit-overlay-icon {\n position: absolute;\n bottom: -2px;\n right: -2px;\n width: 20px;\n height: 20px;\n padding: 2px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n border-radius: 50%;\n border: 2px solid white;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-assistants-header__edit-overlay-icon:hover {\n background: var(--Colors-Background-bg-action-hover, #6b98df);\n transform: scale(1.05);\n }\n\n /* Side Icon (next to avatar when image is provided) */\n .freddy-assistants-header__side-icon {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-assistants-header__side-icon-component {\n width: 24px;\n height: 24px;\n color: #031525;\n }\n\n /* Content Section */\n .freddy-assistants-header__content {\n flex: 1 1 0;\n align-self: stretch;\n padding-top: 10px;\n padding-left: 10px;\n padding-right: 10px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n }\n\n /* Gap between side icon and content when image is present */\n .freddy-assistants-header__avatar-section--with-image\n + .freddy-assistants-header__content {\n margin-left: 24px;\n }\n\n .freddy-assistants-header__content-inner {\n align-self: stretch;\n justify-content: flex-start;\n align-items: center;\n gap: 16px;\n display: inline-flex;\n flex-wrap: wrap;\n align-content: center;\n }\n\n /* Assistant Icon */\n .freddy-assistants-header__icon {\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n position: relative;\n }\n\n .freddy-assistants-header__icon-image {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n\n .freddy-assistants-header__icon-component {\n width: 24px;\n height: 24px;\n color: #031525;\n }\n\n /* Text Content */\n .freddy-assistants-header__text-content {\n flex: 1 1 0;\n min-width: 320px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 4px;\n display: inline-flex;\n }\n\n /* Assistant ID Badge */\n .freddy-assistants-header__id-badge {\n display: inline-flex;\n align-items: center;\n height: 48px;\n padding: 0 8px;\n background: transparent;\n border-radius: 8px;\n font-family: 'Inter', sans-serif;\n font-size: 20px;\n font-weight: 700;\n line-height: 30px;\n color: var(--Colors-Texts-text-primary, #ffffff);\n white-space: nowrap;\n word-wrap: break-word;\n overflow: hidden;\n justify-content: center;\n gap: 8px;\n }\n\n /* Actions Section */\n .freddy-assistants-header__actions {\n flex-shrink: 0;\n }\n\n /* Playground Button */\n .freddy-assistants-header__playground-button {\n display: flex;\n align-items: center;\n gap: 8px;\n height: 40px;\n min-width: 40px;\n min-height: 20px;\n padding: 4px 8px;\n background: var(--Colors-Base-white, #ffffff);\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n outline: 2px white solid;\n outline-offset: -2px;\n position: relative;\n overflow: hidden;\n justify-content: center;\n }\n\n .freddy-assistants-header__playground-button:hover {\n background: #f9fafb;\n transform: translateY(-1px);\n }\n\n .freddy-assistants-header__playground-button:active {\n transform: translateY(0);\n background: #f3f4f6;\n }\n\n .freddy-assistants-header__playground-icon {\n width: 20px;\n height: 20px;\n color: var(--Colors-Texts-text-action-button, #031525);\n flex-shrink: 0;\n position: relative;\n overflow: hidden;\n }\n\n .freddy-assistants-header__playground-label {\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--Colors-Texts-text-action-button, #031525);\n white-space: nowrap;\n word-wrap: break-word;\n flex: 1 1 0;\n }\n\n /* Edit Button Overlay */\n .freddy-assistants-header__edit-overlay {\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 20px;\n height: 20px;\n padding: 2px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border: none;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n outline: 2px white solid;\n outline-offset: -2px;\n overflow: hidden;\n }\n\n .freddy-assistants-header__edit-overlay:hover {\n background: #6b9ae8;\n transform: scale(1.05);\n }\n\n .freddy-assistants-header__edit-overlay:active {\n transform: scale(0.95);\n }\n\n .freddy-assistants-header__edit-icon {\n width: 12px;\n height: 12px;\n color: var(--Colors-Texts-text-action-button, #031525);\n position: relative;\n overflow: hidden;\n }\n\n /* Responsive Design */\n @media (max-width: 768px) {\n .freddy-assistants-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n height: auto;\n padding: 16px;\n }\n\n .freddy-assistants-header__content {\n width: 100%;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-assistants-header__content-inner {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n }\n</style>\n","<template>\n <div\n class=\"freddy-avatar-choosing\"\n :class=\"{ 'freddy-avatar-choosing--selected': isSelected }\"\n @click=\"handleClick\"\n >\n <!-- Circular Background -->\n <div\n class=\"freddy-avatar-choosing__background\"\n :style=\"{ backgroundColor: backgroundColor }\"\n ></div>\n\n <!-- Avatar Image -->\n <img :src=\"imageUrl\" :alt=\"altText\" class=\"freddy-avatar-choosing__image\" />\n\n <!-- Selection Border (only when selected) -->\n <div v-if=\"isSelected\" class=\"freddy-avatar-choosing__border\"></div>\n\n <!-- Check Icon (only when selected) -->\n <div v-if=\"isSelected\" class=\"freddy-avatar-choosing__check-icon\">\n <IconTick class=\"freddy-avatar-choosing__check-icon-svg\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import IconTick from '@/icons/IconTick.vue';\n\n interface Props {\n imageUrl: string;\n isSelected?: boolean;\n altText?: string;\n backgroundColor?: string;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n isSelected: false,\n altText: 'Avatar',\n backgroundColor: '#cfcbdc',\n });\n\n const emit = defineEmits<{\n click: [event: MouseEvent];\n }>();\n\n const handleClick = (event: MouseEvent) => {\n emit('click', event);\n };\n</script>\n\n<style>\n .freddy-avatar-choosing {\n width: 138px;\n height: 138px;\n position: relative;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-avatar-choosing:hover {\n transform: scale(1.02);\n }\n\n .freddy-avatar-choosing__background {\n width: 118px;\n height: 118px;\n left: 10px;\n top: 10px;\n position: absolute;\n border-radius: 50%;\n z-index: 1;\n }\n\n .freddy-avatar-choosing__image {\n width: 118px;\n height: 118px;\n left: 10px;\n top: 10px;\n position: absolute;\n border-radius: 50%;\n object-fit: cover;\n transition: all 0.2s ease;\n z-index: 2;\n }\n\n .freddy-avatar-choosing--selected .freddy-avatar-choosing__image {\n box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 0.25);\n }\n\n .freddy-avatar-choosing__border {\n width: 138px;\n height: 138px;\n left: -1px;\n top: -2px;\n position: absolute;\n border-radius: 50%;\n border: 2px var(--Colors-Background-bg-action, #7ba8ef) solid;\n z-index: 3;\n }\n\n .freddy-avatar-choosing__check-icon {\n width: 25px;\n height: 25px;\n padding: 3px;\n left: 109px;\n top: 4px;\n position: absolute;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n z-index: 4;\n }\n\n .freddy-avatar-choosing__check-icon-svg {\n width: 13px;\n height: 13px;\n position: relative;\n overflow: hidden;\n color: var(--Colors-Base-white, white);\n }\n\n /* Check icon inner circle */\n .freddy-avatar-choosing__check-icon-svg::before {\n content: '';\n width: 8.67px;\n height: 5.96px;\n left: 2.17px;\n top: 3.25px;\n position: absolute;\n outline: 2px var(--Colors-Base-white, white) solid;\n outline-offset: -1px;\n }\n</style>\n","<template>\n <div class=\"freddy-avatar-list\">\n <h3 v-if=\"title\" class=\"freddy-avatar-list__title\">{{ title }}</h3>\n <div class=\"freddy-avatar-list__grid\">\n <AvatarChoosing\n v-for=\"avatar in avatars\"\n :key=\"avatar.id\"\n :imageUrl=\"avatar.url\"\n :isSelected=\"selectedAvatarId === avatar.id\"\n :altText=\"avatar.name\"\n @click=\"handleAvatarClick(avatar.id)\"\n />\n </div>\n <div v-if=\"showSelectedInfo\" class=\"freddy-avatar-list__selected-info\">\n <p>Selected: {{ selectedAvatar?.name || \"None\" }}</p>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { AvatarChoosing } from \"@/components\";\n\ninterface Avatar {\n id: string | number;\n url: string;\n name: string;\n}\n\ninterface Props {\n avatars: Avatar[];\n title?: string;\n showSelectedInfo?: boolean;\n allowDeselect?: boolean;\n multiple?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n title: \"\",\n showSelectedInfo: true,\n allowDeselect: true,\n multiple: false,\n});\n\nconst emit = defineEmits<{\n selectionChange: [selectedId: string | number | null];\n avatarClick: [avatarId: string | number, isSelected: boolean];\n}>();\n\nconst selectedAvatarId = ref<string | number | null>(null);\n\nconst selectedAvatar = computed(() => {\n return (\n props.avatars.find((avatar) => avatar.id === selectedAvatarId.value) || null\n );\n});\n\nconst handleAvatarClick = (avatarId: string | number) => {\n const isCurrentlySelected = selectedAvatarId.value === avatarId;\n\n if (isCurrentlySelected && props.allowDeselect) {\n // Deselect if already selected and deselection is allowed\n selectedAvatarId.value = null;\n } else {\n // Select the clicked avatar\n selectedAvatarId.value = avatarId;\n }\n\n // Emit events\n emit(\"selectionChange\", selectedAvatarId.value);\n emit(\"avatarClick\", avatarId, selectedAvatarId.value === avatarId);\n};\n\n// Expose methods for parent components\ndefineExpose({\n selectedAvatarId,\n selectedAvatar,\n selectAvatar: (id: string | number) => {\n selectedAvatarId.value = id;\n emit(\"selectionChange\", id);\n },\n clearSelection: () => {\n selectedAvatarId.value = null;\n emit(\"selectionChange\", null);\n },\n});\n</script>\n\n<style>\n.freddy-avatar-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.freddy-avatar-list__title {\n font-family: \"Inter\", sans-serif;\n font-size: 18px;\n font-weight: 600;\n color: var(--Colors-Texts-text-primary, #ffffff);\n margin: 0;\n}\n\n.freddy-avatar-list__grid {\n display: flex;\n gap: 16px;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.freddy-avatar-list__selected-info {\n padding: 12px;\n background: var(--Colors-Background-bg-secondary, #1a1a1a);\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-primary, #333333);\n}\n\n.freddy-avatar-list__selected-info p {\n font-family: \"Inter\", sans-serif;\n font-size: 14px;\n color: var(--Colors-Texts-text-secondary, #cccccc);\n margin: 0;\n}\n</style>\n","<template>\n <div class=\"freddy-choose-assistant-avatar\">\n <!-- Header Section -->\n <div class=\"freddy-choose-assistant-avatar__header\">\n <div class=\"freddy-choose-assistant-avatar__title-section\">\n <div class=\"freddy-choose-assistant-avatar__title-row\">\n <h1 class=\"freddy-choose-assistant-avatar__title\">{{ title }}</h1>\n <button\n class=\"freddy-choose-assistant-avatar__close-button\"\n @click=\"handleClose\"\n :aria-label=\"closeButtonAriaLabel\"\n >\n <IconCross class=\"freddy-choose-assistant-avatar__close-icon\" />\n </button>\n </div>\n </div>\n <p class=\"freddy-choose-assistant-avatar__description\">\n {{ description }}\n </p>\n </div>\n\n <!-- Main Content -->\n <div class=\"freddy-choose-assistant-avatar__content\">\n <!-- Icon Selection Section -->\n <div class=\"freddy-choose-assistant-avatar__section\">\n <h3 class=\"freddy-choose-assistant-avatar__section-title\">\n Choose the icon\n </h3>\n <div class=\"freddy-choose-assistant-avatar__icon-container\">\n <div class=\"freddy-choose-assistant-avatar__icon-search\">\n <button\n class=\"freddy-choose-assistant-avatar__search-button\"\n @click=\"handleUploadClick\"\n :aria-label=\"uploadButtonAriaLabel\"\n >\n <IconDataUpload\n class=\"freddy-choose-assistant-avatar__upload-icon\"\n />\n </button>\n <SearchInput\n v-model:searchInput=\"searchQuery\"\n :placeholder=\"searchPlaceholder\"\n class=\"freddy-choose-assistant-avatar__search-input-wrapper\"\n @update:searchInput=\"handleSearchInput\"\n />\n </div>\n <div class=\"freddy-choose-assistant-avatar__icon-grid\">\n <div\n v-for=\"(imageUrl, index) in props.imageUrls\"\n :key=\"index\"\n class=\"freddy-choose-assistant-avatar__icon-item\"\n :class=\"{\n 'freddy-choose-assistant-avatar__icon-item--selected':\n selectedImageIndex === index,\n }\"\n @click=\"handleImageSelect(imageUrl, index)\"\n :title=\"`Image ${index + 1}`\"\n >\n <div class=\"freddy-choose-assistant-avatar__icon-wrapper\">\n <img\n :src=\"imageUrl\"\n :alt=\"`Image ${index + 1}`\"\n class=\"freddy-choose-assistant-avatar__icon-image\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Face Selection Section -->\n <div\n v-if=\"faces && faces.length\"\n class=\"freddy-choose-assistant-avatar__section\"\n >\n <h3 class=\"freddy-choose-assistant-avatar__section-title\">\n Choose the face\n </h3>\n <div class=\"freddy-choose-assistant-avatar__face-grid\">\n <!-- <AvatarChoosing\n v-for=\"(face, index) in faces\"\n :key=\"face.id || index\"\n :imageUrl=\"face.imageUrl\"\n :altText=\"face.altText || `Face ${index + 1}`\"\n :backgroundColor=\"face.backgroundColor\"\n :isSelected=\"selectedFaceId === face.id\"\n @click=\"handleFaceSelect(face)\"\n /> -->\n </div>\n </div>\n\n <!-- Voice Selection Section -->\n <div\n v-if=\"voices && voices.length\"\n class=\"freddy-choose-assistant-avatar__section\"\n >\n <h3 class=\"freddy-choose-assistant-avatar__section-title\">\n Choose the voice\n </h3>\n <div class=\"freddy-choose-assistant-avatar__voice-list\">\n <VoiceSelection\n v-for=\"(voice, index) in voices\"\n :key=\"voice.id || index\"\n :voiceName=\"voice.name\"\n :isSelected=\"selectedVoiceId === voice.id\"\n @click=\"handleVoiceSelect(voice)\"\n />\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"freddy-choose-assistant-avatar__actions\">\n <button\n class=\"freddy-choose-assistant-avatar__cancel-button\"\n @click=\"handleCancel\"\n >\n {{ cancelButtonText }}\n </button>\n <button\n class=\"freddy-choose-assistant-avatar__save-button\"\n @click=\"handleSave\"\n :disabled=\"!canSave\"\n >\n {{ saveButtonText }}\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { AvatarChoosing, VoiceSelection, SearchInput } from '@/components';\n import * as Icons from '@/icons';\n import { IconCross, IconDataUpload } from '@/icons';\n\n interface Icon {\n id: string | number;\n name?: string;\n iconName?: string; // Icon name as string (e.g., \"IconRobotScreen\")\n component?: any; // Keep for backward compatibility\n }\n\n interface Face {\n id: string | number;\n imageUrl: string;\n altText?: string;\n backgroundColor?: string;\n }\n\n interface Voice {\n id: string | number;\n name: string;\n }\n\n interface Props {\n title?: string;\n description?: string;\n icons?: Icon[];\n imageUrls?: string[];\n faces?: Face[];\n voices?: Voice[];\n searchPlaceholder?: string;\n cancelButtonText?: string;\n saveButtonText?: string;\n closeButtonAriaLabel?: string;\n searchButtonAriaLabel?: string;\n uploadButtonAriaLabel?: string;\n allowMultipleSelection?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: 'Choose your assistant',\n description:\n \"Choose your assistant's appearance and select a preferred voice.\",\n icons: () => [],\n imageUrls: () => [],\n // faces: () => [\n // {\n // id: 1,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 1\",\n // backgroundColor: \"#ef4444\",\n // },\n // {\n // id: 2,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 2\",\n // backgroundColor: \"#14b8a6\",\n // },\n // {\n // id: 3,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 3\",\n // backgroundColor: \"#3b82f6\",\n // },\n // {\n // id: 4,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 4\",\n // backgroundColor: \"#10b981\",\n // },\n // {\n // id: 5,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 5\",\n // backgroundColor: \"#eab308\",\n // },\n // {\n // id: 6,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 6\",\n // backgroundColor: \"#a855f7\",\n // },\n // ],\n voices: () => [\n { id: 1, name: 'Alloy' },\n { id: 2, name: 'Echo' },\n { id: 3, name: 'Fable' },\n { id: 4, name: 'Onyx' },\n { id: 5, name: 'Nova' },\n { id: 6, name: 'Shimmer' },\n { id: 7, name: 'Aurora' },\n { id: 8, name: 'Phoenix' },\n ],\n searchPlaceholder: 'Search icon',\n cancelButtonText: 'Cancel',\n saveButtonText: 'Save',\n closeButtonAriaLabel: 'Close dialog',\n searchButtonAriaLabel: 'Search icons',\n uploadButtonAriaLabel: 'Upload custom icon',\n allowMultipleSelection: false,\n });\n\n // Create icon list from available icons if no icons provided\n const createIconList = () => {\n const iconList: Icon[] = [];\n let id = 1;\n\n console.log('Available Icons object:', Icons);\n console.log('Icons entries:', Object.entries(Icons));\n\n for (const [name, component] of Object.entries(Icons)) {\n console.log(`Processing icon: ${name}`, component);\n\n // Skip if it's not a Vue component\n if (\n typeof component === 'object' &&\n component &&\n 'default' in component\n ) {\n const iconComponent = (component as any).default;\n console.log(`Adding icon: ${name}, component:`, iconComponent);\n\n iconList.push({\n id: id++,\n name: name.replace('Icon', ''), // Remove 'Icon' prefix for display\n iconName: name, // Store the full icon name\n component: iconComponent, // Keep for backward compatibility\n });\n } else {\n console.log(`Skipping ${name} - not a valid Vue component:`, component);\n }\n }\n\n console.log(\n `Loaded ${iconList.length} icons:`,\n iconList.map(i => i.name)\n );\n return iconList;\n };\n\n // Use provided icons or create from available icons\n const availableIcons = computed(() => {\n return props.icons.length > 0 ? props.icons : createIconList();\n });\n\n const emit = defineEmits<{\n close: [];\n cancel: [];\n save: [\n data: {\n selectedIconId: string | number | null;\n selectedImageUrl: string | null;\n selectedFaceId: string | number | null;\n selectedVoiceId: string | number | null;\n }\n ];\n iconSelect: [icon: Icon];\n imageSelect: [imageUrl: string];\n faceSelect: [face: Face];\n voiceSelect: [voice: Voice];\n searchInput: [query: string];\n searchClick: [];\n uploadClick: [];\n }>();\n\n // State\n const selectedIconId = ref<string | number | null>(null);\n const selectedImageUrl = ref<string | null>(null);\n const selectedImageIndex = ref<number | null>(null);\n const selectedFaceId = ref<string | number | null>(null);\n const selectedVoiceId = ref<string | number | null>(null);\n const searchQuery = ref('');\n\n // Computed\n const filteredIcons = computed(() => {\n if (!searchQuery.value) {\n console.log(`Displaying all ${availableIcons.value.length} icons`);\n return availableIcons.value;\n }\n const filtered = availableIcons.value.filter(icon =>\n icon.name?.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n console.log(\n `Filtered to ${filtered.length} icons for search: \"${searchQuery.value}\"`\n );\n return filtered;\n });\n\n const canSave = computed(() => {\n return (\n selectedIconId.value !== null ||\n selectedImageUrl.value !== null ||\n selectedFaceId.value !== null ||\n selectedVoiceId.value !== null\n );\n });\n\n // Methods\n const handleClose = () => {\n emit('close');\n };\n\n const handleCancel = () => {\n emit('cancel');\n };\n\n const handleSave = () => {\n if (!canSave.value) return;\n\n emit('save', {\n selectedIconId: selectedIconId.value,\n selectedImageUrl: selectedImageUrl.value,\n selectedFaceId: selectedFaceId.value,\n selectedVoiceId: selectedVoiceId.value,\n });\n };\n\n const handleIconSelect = (icon: Icon) => {\n selectedIconId.value = icon.id;\n emit('iconSelect', icon);\n };\n\n const handleImageSelect = (imageUrl: string, index: number) => {\n selectedImageUrl.value = imageUrl;\n selectedImageIndex.value = index;\n emit('imageSelect', imageUrl);\n };\n\n const handleFaceSelect = (face: Face) => {\n selectedFaceId.value = face.id;\n emit('faceSelect', face);\n };\n\n const handleVoiceSelect = (voice: Voice) => {\n selectedVoiceId.value = voice.id;\n emit('voiceSelect', voice);\n };\n\n const handleSearchInput = (value: string | null) => {\n searchQuery.value = value || '';\n emit('searchInput', value || '');\n };\n\n const handleSearchClick = () => {\n emit('searchClick');\n };\n\n const handleUploadClick = () => {\n emit('uploadClick');\n };\n\n // Simple icon component resolver (same as AssistantsHeader)\n const getIconComponent = (iconName: string) => {\n // Get the icon component from the imported icons\n const IconComponent = Icons[iconName as keyof typeof Icons];\n\n // Return the component or fallback to IconRobotScreen\n return IconComponent || Icons.IconRobotScreen;\n };\n\n // Expose methods for parent components\n defineExpose({\n selectedIconId,\n selectedImageUrl,\n selectedImageIndex,\n selectedFaceId,\n selectedVoiceId,\n resetSelections: () => {\n selectedIconId.value = null;\n selectedImageUrl.value = null;\n selectedImageIndex.value = null;\n selectedFaceId.value = null;\n selectedVoiceId.value = null;\n },\n });\n</script>\n\n<style lang=\"scss\">\n .freddy-choose-assistant-avatar {\n /*width: 100%;\n height: 100%;*/\n padding: 32px;\n background: var(--Colors-Background-bg-primaty, #031525);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 40px;\n outline: 3px white solid;\n outline-offset: -3px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__header {\n width: 879px;\n justify-content: flex-start;\n align-items: flex-start;\n display: inline-flex;\n flex-wrap: wrap;\n align-content: flex-start;\n }\n\n .freddy-choose-assistant-avatar__title-section {\n width: 880px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 6px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__title-row {\n align-self: stretch;\n justify-content: space-between;\n align-items: flex-start;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__title {\n color: var(--Colors-Base-white, white);\n font-size: 36px;\n font-family: Inter;\n font-weight: 500;\n line-height: 44px;\n word-wrap: break-word;\n margin: 0;\n }\n\n .freddy-choose-assistant-avatar__close-button {\n /*width: 44px;\n height: 44px;*/\n padding: 8px;\n padding-right: 0px;\n overflow: hidden;\n border-radius: 8px;\n justify-content: center;\n align-items: center;\n display: flex;\n background: transparent;\n border: none;\n cursor: pointer;\n transition: background-color 0.2s ease;\n }\n\n /*.freddy-choose-assistant-avatar__close-button:hover {\n background: rgba(255, 255, 255, 0.1);\n}*/\n\n .freddy-choose-assistant-avatar__close-icon {\n width: 32px;\n height: 32px;\n color: var(--Colors-Forground-fg-primary, #d7d3d0);\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__close-button:hover\n .freddy-choose-assistant-avatar__close-icon {\n color: var(--Colors-Base-white, white);\n }\n\n .freddy-choose-assistant-avatar__description {\n align-self: stretch;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 412px;\n display: inline-flex;\n flex: 1 1 0;\n color: var(--Colors-Texts-Text-Tetriary, #cbd6e3);\n font-size: 16px;\n font-family: Inter;\n font-weight: 400;\n line-height: 24px;\n word-wrap: break-word;\n margin: 0;\n }\n\n .freddy-choose-assistant-avatar__content {\n flex: 1 1 0;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 20px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__section {\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: flex;\n }\n\n .freddy-choose-assistant-avatar__section-title {\n align-self: stretch;\n color: var(--Colors-Base-white, white);\n font-size: 14px;\n font-family: Inter;\n font-weight: 400;\n line-height: 20px;\n word-wrap: break-word;\n margin: 0;\n }\n\n .freddy-choose-assistant-avatar__icon-container {\n align-self: stretch;\n padding: 12px 0 12px 12px;\n position: relative;\n overflow-x: auto;\n overflow-y: hidden;\n border-radius: 20px;\n outline: 1px var(--Colors-Border-border-secondary, #35414b) solid;\n outline-offset: -1px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: flex;\n }\n\n .freddy-choose-assistant-avatar__icon-search {\n width: 860px; /* Match the icon grid width */\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 14px;\n display: flex;\n }\n\n .freddy-choose-assistant-avatar__search-button {\n width: 40px;\n height: 40px;\n padding: 8px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 8px;\n outline-offset: -2px;\n justify-content: center;\n align-items: center;\n display: flex;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__search-button:hover {\n background: var(--Colors-Background-bg-action, #6a9ae8);\n }\n\n .freddy-choose-assistant-avatar__upload-icon {\n width: 20px;\n height: 20px;\n color: var(--Colors-Texts-text-action-button, #031525);\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__search-input-wrapper {\n flex: 1 1 0;\n width: 100%;\n }\n\n /* Override SearchInput colors to make text and icon white */\n .freddy-choose-assistant-avatar__search-input-wrapper .freddy-search-icon {\n stroke: white !important;\n color: white !important;\n }\n\n .freddy-choose-assistant-avatar__search-input-wrapper .freddy-search-input {\n color: white !important;\n }\n\n .freddy-choose-assistant-avatar__search-input-wrapper\n .freddy-search-input::placeholder {\n color: rgba(255, 255, 255, 0.7) !important;\n }\n\n .freddy-choose-assistant-avatar__icon-grid {\n width: 860px; /* 19 items × 32px + 18 gaps × 13px = 842px */\n height: 122px; /* 3 rows × 32px + 2 gaps × 13px = 122px */\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n overflow-y: auto;\n overflow-x: hidden;\n padding-right: 8px;\n align-content: flex-start;\n column-gap: 13px;\n }\n\n /* Custom scrollbar styling */\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-corner {\n display: none;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 9999px;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-thumb {\n background: var(\n --Colors-Background-bg-quinary-transparent,\n rgba(255, 255, 255, 0.4)\n );\n border-radius: 9999px;\n outline: 1px var(--Colors-Border-border-secondary, #35414b) solid;\n opacity: 0.5;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-thumb:hover {\n background: var(\n --Colors-Background-bg-quinary-transparent,\n rgba(255, 255, 255, 0.5)\n );\n opacity: 0.7;\n }\n\n /* Firefox scrollbar styling */\n .freddy-choose-assistant-avatar__icon-grid {\n scrollbar-width: thin;\n scrollbar-color: var(\n --Colors-Background-bg-quinary-transparent,\n rgba(255, 255, 255, 0.4)\n )\n transparent;\n }\n\n .freddy-choose-assistant-avatar__icon-item {\n width: 32px;\n height: 32px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__icon-item:hover {\n transform: scale(1.1);\n }\n\n .freddy-choose-assistant-avatar__icon-item--selected {\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border-radius: 4px;\n }\n\n .freddy-choose-assistant-avatar__icon-wrapper {\n width: 32px;\n height: 32px;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-choose-assistant-avatar__icon-svg {\n width: 32px;\n height: 32px;\n color: var(--Colors-Forground-fg-secondary, #cbd6e3);\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__icon-item--selected\n .freddy-choose-assistant-avatar__icon-svg {\n color: var(--Colors-Base-white, white);\n }\n\n .freddy-choose-assistant-avatar__icon-image {\n width: 32px;\n height: 32px;\n object-fit: cover;\n border-radius: 4px;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__icon-placeholder {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--Colors-Forground-fg-secondary, #cbd6e3);\n font-size: 12px;\n font-weight: bold;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n }\n\n .freddy-choose-assistant-avatar__face-grid {\n align-self: stretch;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 12px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__voice-list {\n align-self: stretch;\n justify-content: flex-start;\n align-items: flex-start;\n row-gap: 12px;\n column-gap: 20px;\n display: flex;\n flex-wrap: wrap;\n max-width: 880px; /* 4 components × 205px + 3 gaps × 20px */\n }\n\n .freddy-choose-assistant-avatar__actions {\n align-self: stretch;\n justify-content: flex-end;\n align-items: flex-start;\n gap: 20px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__cancel-button {\n height: 40px;\n min-width: 80px;\n padding: 8px;\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 8px;\n outline: 1px var(--Colors-Border-border-action, #7ba8ef) solid;\n outline-offset: -1px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n background: transparent;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #7ba8ef;\n }\n\n .freddy-choose-assistant-avatar__cancel-button:hover {\n background: rgba(123, 168, 239, 0.1);\n }\n\n .freddy-choose-assistant-avatar__cancel-button:focus {\n outline: 2px var(--Colors-Border-border-action, #7ba8ef) solid;\n }\n\n .freddy-choose-assistant-avatar__save-button {\n height: 40px;\n min-width: 80px;\n min-height: 20px;\n padding: 8px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 8px;\n outline: 2px white solid;\n outline-offset: -2px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__save-button:hover:not(:disabled) {\n background: var(--Colors-Background-bg-action, #6a9ae8);\n }\n\n .freddy-choose-assistant-avatar__save-button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .freddy-choose-assistant-avatar__cancel-button div,\n .freddy-choose-assistant-avatar__save-button div {\n flex: 1 1 0;\n text-align: center;\n color: var(--Colors-Texts-Text-Action, #7ba8ef);\n font-size: 16px;\n font-family: Inter;\n font-weight: 500;\n line-height: 24px;\n word-wrap: break-word;\n }\n\n .freddy-choose-assistant-avatar__save-button div {\n color: var(--Colors-Texts-text-action-button, #031525);\n }\n</style>\n","<template>\n <div\n :class=\"[\n 'freddy-plugin-nav-bar',\n `freddy-plugin-nav-bar--${orientation}`,\n `freddy-plugin-nav-bar--${computedActiveStateType}`,\n { 'freddy-plugin-nav-bar--full-width': props.fullWidth },\n ]\"\n >\n <button\n :class=\"[\n 'freddy-plugin-menu-button',\n `freddy-plugin-menu-button--${computedActiveStateType}`,\n { 'freddy-plugin-menu-button--active': activeTab === tab.id },\n { 'freddy-plugin-menu-button--full-width': props.fullWidth },\n ]\"\n v-for=\"(tab, index) in props.tabList\"\n :key=\"index\"\n @click=\"handleTabSwitch(tab)\"\n :aria-selected=\"activeTab === tab.id\"\n role=\"tab\"\n tabindex=\"0\"\n @keydown.enter=\"handleTabSwitch(tab)\"\n @keydown.space.prevent=\"handleTabSwitch(tab)\"\n >\n <span class=\"freddy-plugin-menu-button-label\">{{ tab.title }}</span>\n <span\n v-if=\"tab.badge !== undefined\"\n class=\"freddy-plugin-menu-button-badge\"\n >\n {{ tab.badge }}\n </span>\n <span\n v-if=\"computedActiveStateType === 'bottom-dash' && activeTab === tab.id\"\n :class=\"{ 'freddy-plugin-active-tab-bottom': activeTab === tab.id }\"\n ></span>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { ref, watch, computed } from 'vue';\n import type { ITabList, IMenuListItem } from '@/interfaces';\n\n // props and emits\n const props = withDefaults(defineProps<ITabList>(), {\n currentTab: 0,\n activeStateType: 'bottom-dash',\n orientation: 'horizontal',\n fullWidth: false,\n });\n const emits = defineEmits(['tabSwitch']);\n\n // computed properties\n const activeStateType = computed(\n () => props.activeStateType || 'bottom-dash'\n );\n const orientation = computed(() => props.orientation || 'horizontal');\n\n // Auto-convert bottom-dash to left-dash for vertical orientation\n const computedActiveStateType = computed(() => {\n const currentOrientation = orientation.value;\n const currentStateType = activeStateType.value;\n\n // If vertical and bottom-dash, convert to left-dash\n if (\n currentOrientation === 'vertical' &&\n currentStateType === 'bottom-dash'\n ) {\n return 'left-dash';\n }\n\n // Map new activeStateType values to existing CSS class names\n const stateTypeMap: Record<string, string> = {\n 'bottom-dash': 'bottom-dash',\n 'bg-primary-active': 'background-21404F8F',\n 'primary-active': 'background-031525',\n 'bg-primary-active-bordered': 'background-border',\n };\n\n return stateTypeMap[currentStateType] || currentStateType;\n });\n\n // variables\n const activeTab = ref<number>(props.currentTab);\n\n // watch for prop changes\n watch(\n () => props.currentTab,\n newValue => {\n activeTab.value = newValue;\n }\n );\n\n // click event\n const handleTabSwitch = (tab: IMenuListItem): void => {\n if (activeTab.value === tab.id) return;\n activeTab.value = tab.id;\n emits('tabSwitch', tab.id);\n };\n</script>\n\n<style lang=\"css\">\n .freddy-plugin-nav-bar {\n display: flex;\n width: 100%;\n gap: 24px;\n font-family: 'Inter', sans-serif;\n font-size: 0.875rem; /* text-sm = 14px */\n font-weight: 600; /* font-semibold */\n }\n\n /* Horizontal orientation (default) */\n .freddy-plugin-nav-bar--horizontal {\n flex-direction: row;\n border-bottom: 1px solid #22262f;\n padding-right: 10px; /* pr-2.5 = 2.5 * 4px */\n }\n\n /* Vertical orientation */\n .freddy-plugin-nav-bar--vertical {\n flex-direction: column !important;\n gap: 8px;\n border-bottom: none;\n padding-right: 0;\n width: auto;\n }\n\n .freddy-plugin-nav-bar--vertical .freddy-plugin-menu-button {\n width: 100%;\n }\n\n .freddy-plugin-menu-button {\n all: unset; /* unset-all */\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n position: relative;\n transition: all 0.2s ease;\n color: var(--freddy-text-tertiary, #cbd6e3);\n outline: none;\n }\n\n .freddy-plugin-menu-button:focus-visible {\n outline: 2px solid var(--text-action, #7babef);\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n .freddy-plugin-menu-button:focus:not(:focus-visible) {\n outline: none;\n }\n\n .freddy-plugin-menu-button-label {\n white-space: nowrap;\n }\n\n .freddy-plugin-menu-button-badge {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--component-colors-utility-gray-blue-100, #eaecf5);\n border: 1px solid var(--text-gray, #717680);\n border-radius: 6px;\n padding: 2px 6px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: var(--freddy-text-secondary, #9597a7);\n min-width: 20px;\n text-align: center;\n flex-shrink: 0;\n }\n\n /* Bottom Dash Style (Horizontal) */\n .freddy-plugin-nav-bar--bottom-dash {\n border-bottom: 1px solid #22262f;\n }\n\n .freddy-plugin-nav-bar--bottom-dash .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 4px 4px 12px 4px;\n }\n\n .freddy-plugin-active-tab-bottom {\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n width: 100%;\n background-color: #9597a7;\n height: 2px; /* h-0.5 = 0.125rem = 2px */\n border-top-left-radius: 0.375rem; /* rounded-t-md */\n border-top-right-radius: 0.375rem;\n }\n\n /* For text-width underlines (not full-width), ensure underline matches content */\n .freddy-plugin-nav-bar--bottom-dash:not(.freddy-plugin-nav-bar--full-width)\n .freddy-plugin-menu-button {\n width: auto;\n }\n\n /* Text-width underline should match content area (excluding padding) */\n .freddy-plugin-nav-bar--bottom-dash:not(.freddy-plugin-nav-bar--full-width)\n .freddy-plugin-active-tab-bottom {\n left: 4px;\n right: 4px;\n width: auto;\n }\n\n /* Full width styles */\n .freddy-plugin-nav-bar--full-width {\n width: 100%;\n }\n\n .freddy-plugin-nav-bar--full-width .freddy-plugin-menu-button {\n flex: 1;\n justify-content: center;\n min-width: 0; /* Allow flex items to shrink below content size */\n }\n\n .freddy-plugin-nav-bar--full-width .freddy-plugin-active-tab-bottom {\n width: 100%;\n }\n\n .freddy-plugin-nav-bar--bottom-dash .freddy-plugin-menu-button--active {\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--bottom-dash .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--bottom-dash\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n .freddy-plugin-nav-bar--bottom-dash\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n /* Left Dash Style (Vertical) */\n .freddy-plugin-nav-bar--left-dash {\n border-bottom: none;\n }\n\n .freddy-plugin-nav-bar--left-dash .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 2px 12px;\n height: 24px;\n border-left: 2px solid transparent;\n }\n\n .freddy-plugin-nav-bar--left-dash .freddy-plugin-menu-button--active {\n border-left: 2px solid #9597a7;\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--left-dash .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--left-dash\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n .freddy-plugin-nav-bar--left-dash\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n /* Background Border Style */\n .freddy-plugin-nav-bar--background-border .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 8px 12px;\n border-radius: 8px;\n height: 36px;\n background: transparent;\n border: 1px solid transparent;\n }\n\n .freddy-plugin-nav-bar--vertical.freddy-plugin-nav-bar--background-border {\n flex-direction: column;\n }\n\n .freddy-plugin-nav-bar--background-border .freddy-plugin-menu-button--active {\n background: var(--freddy-bg-primary-hover, rgba(42, 57, 71, 0.73));\n border: 1px solid var(--text-gray, #717680);\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--background-border\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n .freddy-plugin-nav-bar--background-border\n .freddy-plugin-menu-button:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n /* Background 031525 Style (Vertical) */\n .freddy-plugin-nav-bar--background-031525 {\n border-bottom: none;\n }\n\n .freddy-plugin-nav-bar--vertical.freddy-plugin-nav-bar--background-031525 {\n flex-direction: column;\n }\n\n .freddy-plugin-nav-bar--background-031525 .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 8px 12px;\n border-radius: 8px;\n height: 44px;\n background: transparent;\n border: none;\n }\n\n .freddy-plugin-nav-bar--background-031525 .freddy-plugin-menu-button--active {\n background: #031525;\n border: none;\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-tertiary, #cbd6e3);\n }\n\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n /* Background 21404F8F Style (Vertical) */\n .freddy-plugin-nav-bar--background-21404F8F {\n border-bottom: none;\n }\n\n .freddy-plugin-nav-bar--vertical.freddy-plugin-nav-bar--background-21404F8F {\n flex-direction: column;\n }\n\n .freddy-plugin-nav-bar--background-21404F8F .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 8px 12px;\n border-radius: 8px;\n height: 44px;\n background: transparent;\n border: none;\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active {\n background: rgba(33, 64, 79, 0.561);\n border: none;\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-tertiary, #cbd6e3);\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n /* Hover states */\n .freddy-plugin-menu-button:hover:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-primary, #ffffff);\n }\n</style>\n","<template>\n <div class=\"rules-management\">\n <div class=\"rules-header\">\n <div class=\"header-content\">\n <h1 class=\"title\">Rules Management</h1>\n <p class=\"subtitle\">\n Manage and organize your organization's rules and guidelines\n </p>\n </div>\n <div class=\"header-actions\">\n <div class=\"search-wrapper\">\n <IconSearch class=\"search-icon\" aria-hidden=\"true\" />\n <input\n type=\"text\"\n class=\"search-input\"\n placeholder=\"Search\"\n v-model=\"searchQuery\"\n @input=\"handleSearch\"\n aria-label=\"Search rules\"\n />\n <kbd class=\"search-kbd\" aria-label=\"Keyboard shortcut\">⌘K</kbd>\n </div>\n <button\n class=\"create-rule-btn\"\n @click=\"handleCreateRule\"\n @keydown.enter=\"handleCreateRule\"\n @keydown.space.prevent=\"handleCreateRule\"\n aria-label=\"Create new rule\"\n tabindex=\"0\"\n >\n <IconPlus class=\"plus-icon\" aria-hidden=\"true\" />\n Create Rule\n </button>\n </div>\n </div>\n\n <div class=\"tabs-container\" role=\"tablist\" aria-label=\"Rules filter tabs\">\n <BaseTabButton\n :tabList=\"tabsForBaseTabButton\"\n :currentTab=\"activeTabIndex\"\n activeStateType=\"bottom-dash\"\n orientation=\"horizontal\"\n @tabSwitch=\"handleTabSwitch\"\n />\n </div>\n\n <div\n class=\"table-container\"\n role=\"tabpanel\"\n :id=\"`tabpanel-${activeTab}`\"\n :aria-labelledby=\"`tab-${activeTab}`\"\n >\n <table class=\"rules-table\" role=\"table\" aria-label=\"Rules list\">\n <thead>\n <tr>\n <th class=\"col-rule\" scope=\"col\">Rule</th>\n <th class=\"col-status\" scope=\"col\">Status</th>\n <th class=\"col-dependencies\" scope=\"col\">\n Dependencies\n <span\n class=\"info-icon\"\n title=\"Number of dependent rules\"\n aria-label=\"Information about dependencies\"\n role=\"img\"\n >\n <IconInfoRounded aria-hidden=\"true\" />\n </span>\n </th>\n <th class=\"col-created-by\" scope=\"col\">Created By</th>\n <th class=\"col-status-action\" scope=\"col\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"rule in filteredRules\"\n :key=\"rule.id\"\n class=\"rule-row\"\n role=\"row\"\n >\n <td class=\"rule-info\">\n <div class=\"rule-title\">{{ rule.title }}</div>\n <div class=\"rule-description\">{{ rule.description }}</div>\n </td>\n <td>\n <span\n :class=\"['status-badge', rule.status.toLowerCase()]\"\n :aria-label=\"`Status: ${rule.status}`\"\n >\n {{ rule.status }}\n </span>\n </td>\n <td class=\"dependencies-count\">\n <span :aria-label=\"`${rule.dependencies} dependencies`\">{{\n rule.dependencies\n }}</span>\n </td>\n <td class=\"creator-info\">\n <div class=\"creator-wrapper\">\n <img\n :src=\"rule.creator.avatar\"\n :alt=\"`${rule.creator.name} avatar`\"\n class=\"creator-avatar\"\n />\n <div class=\"creator-details\">\n <div class=\"creator-name\">{{ rule.creator.name }}</div>\n <div class=\"creator-username\">\n {{ rule.creator.username }}\n </div>\n </div>\n </div>\n </td>\n <td class=\"action-cell\">\n <span\n :class=\"['status-badge', rule.status.toLowerCase()]\"\n :aria-label=\"`Status: ${rule.status}`\"\n >\n {{ rule.status }}\n </span>\n <div class=\"action-icons\">\n <button\n class=\"icon-btn\"\n @click=\"handleEdit(rule)\"\n @keydown.enter=\"handleEdit(rule)\"\n @keydown.space.prevent=\"handleEdit(rule)\"\n :aria-label=\"`Edit ${rule.title}`\"\n tabindex=\"0\"\n >\n <IconEdit aria-hidden=\"true\" />\n </button>\n <button\n class=\"icon-btn\"\n @click=\"handleView(rule)\"\n @keydown.enter=\"handleView(rule)\"\n @keydown.space.prevent=\"handleView(rule)\"\n :aria-label=\"`View ${rule.title}`\"\n tabindex=\"0\"\n >\n <IconEye aria-hidden=\"true\" />\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <nav class=\"pagination-container\" role=\"navigation\" aria-label=\"Pagination\">\n <button\n class=\"pagination-btn\"\n :disabled=\"currentPage === 1\"\n @click=\"handlePreviousPage\"\n @keydown.enter=\"handlePreviousPage\"\n @keydown.space.prevent=\"handlePreviousPage\"\n aria-label=\"Go to previous page\"\n :tabindex=\"currentPage === 1 ? -1 : 0\"\n >\n Previous\n </button>\n <div class=\"page-numbers\" role=\"list\" aria-label=\"Page numbers\">\n <button\n v-for=\"page in visiblePages\"\n :key=\"page\"\n :class=\"[\n 'page-number',\n { active: currentPage === page, ellipsis: page === '...' },\n ]\"\n @click=\"page !== '...' && handlePageChange(page as number)\"\n @keydown.enter=\"page !== '...' && handlePageChange(page as number)\"\n @keydown.space.prevent=\"\n page !== '...' && handlePageChange(page as number)\n \"\n :disabled=\"page === '...'\"\n :aria-label=\"page === '...' ? 'More pages' : `Go to page ${page}`\"\n :aria-current=\"currentPage === page ? 'page' : undefined\"\n :tabindex=\"page === '...' ? -1 : 0\"\n role=\"listitem\"\n >\n {{ page }}\n </button>\n </div>\n <button\n class=\"pagination-btn\"\n :disabled=\"currentPage === totalPages\"\n @click=\"handleNextPage\"\n @keydown.enter=\"handleNextPage\"\n @keydown.space.prevent=\"handleNextPage\"\n aria-label=\"Go to next page\"\n :tabindex=\"currentPage === totalPages ? -1 : 0\"\n >\n Next\n </button>\n </nav>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed } from 'vue';\n import {\n IconEdit,\n IconEye,\n IconInfoRounded,\n IconPlus,\n IconSearch,\n } from '@/icons';\n import BaseTabButton from '@/components/Tabs/BaseTabButton.vue';\n import type { Rule, RuleTab } from '@/interfaces';\n\n interface Props {\n rules?: Rule[];\n tabs?: RuleTab[];\n initialTab?: string;\n totalPages?: number;\n }\n\n interface Emits {\n (e: 'search', query: string): void;\n (e: 'createRule'): void;\n (e: 'tabChange', tabId: string): void;\n (e: 'edit', rule: Rule): void;\n (e: 'view', rule: Rule): void;\n (e: 'pageChange', page: number): void;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n rules: () => [],\n tabs: () => [\n { id: 'all', label: 'All Rules', count: 43 },\n { id: 'my', label: 'My Rules', count: 5 },\n { id: 'others', label: \"Other's Rules\", count: 8 },\n { id: 'current', label: 'Current Assistant', count: 6 },\n ],\n initialTab: 'all',\n totalPages: 10,\n });\n\n const emit = defineEmits<Emits>();\n\n const searchQuery = ref('');\n const activeTab = ref(props.initialTab);\n const currentPage = ref(1);\n\n // Convert tabs to BaseTabButton format with numeric IDs\n const tabsForBaseTabButton = computed(() => {\n return props.tabs.map((tab, index) => ({\n id: index + 1,\n title: tab.label,\n badge: tab.count,\n originalId: tab.id,\n }));\n });\n\n // Find the active tab index\n const activeTabIndex = computed(() => {\n const index = props.tabs.findIndex(tab => tab.id === activeTab.value);\n return index >= 0 ? index + 1 : 1;\n });\n\n const handleTabSwitch = (tabId: number) => {\n const tab = tabsForBaseTabButton.value.find(t => t.id === tabId);\n if (tab && tab.originalId) {\n handleTabChange(tab.originalId);\n }\n };\n\n const filteredRules = computed(() => {\n if (!searchQuery.value) return props.rules;\n\n const query = searchQuery.value.toLowerCase();\n return props.rules.filter(\n rule =>\n rule.title.toLowerCase().includes(query) ||\n rule.description?.toLowerCase().includes(query) ||\n rule.creator.name.toLowerCase().includes(query)\n );\n });\n\n const visiblePages = computed(() => {\n const pages: (number | string)[] = [];\n const total = props.totalPages;\n const current = currentPage.value;\n\n if (total <= 7) {\n for (let i = 1; i <= total; i++) {\n pages.push(i);\n }\n } else {\n pages.push(1);\n\n if (current > 3) {\n pages.push('...');\n }\n\n for (\n let i = Math.max(2, current - 1);\n i <= Math.min(total - 1, current + 1);\n i++\n ) {\n pages.push(i);\n }\n\n if (current < total - 2) {\n pages.push('...');\n }\n\n pages.push(total);\n }\n\n return pages;\n });\n\n const handleSearch = () => {\n emit('search', searchQuery.value);\n };\n\n const handleCreateRule = () => {\n emit('createRule');\n };\n\n const handleTabChange = (tabId: string) => {\n activeTab.value = tabId;\n emit('tabChange', tabId);\n };\n\n const handleEdit = (rule: Rule) => {\n emit('edit', rule);\n };\n\n const handleView = (rule: Rule) => {\n emit('view', rule);\n };\n\n const handlePageChange = (page: number) => {\n currentPage.value = page;\n emit('pageChange', page);\n };\n\n const handlePreviousPage = () => {\n if (currentPage.value > 1) {\n handlePageChange(currentPage.value - 1);\n }\n };\n\n const handleNextPage = () => {\n if (currentPage.value < props.totalPages) {\n handlePageChange(currentPage.value + 1);\n }\n };\n</script>\n\n<style scoped>\n .rules-management {\n background: #031525;\n color: #ffffff;\n padding: 20px;\n min-height: 100vh;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n sans-serif;\n }\n\n .rules-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 20px;\n }\n\n .header-content {\n flex: 1;\n }\n\n .title {\n font-size: 18px;\n font-weight: 600;\n line-height: 28px;\n margin: 0 0 4px 0;\n color: #ffffff;\n }\n\n .subtitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #9597a7;\n margin: 0;\n }\n\n .header-actions {\n display: flex;\n gap: 12px;\n align-items: center;\n }\n\n .search-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n background: #071a2b;\n border: 1px solid #22262f;\n border-radius: 8px;\n padding: 10px 14px;\n min-width: 320px;\n height: 40px;\n }\n\n .search-icon {\n margin-right: 8px;\n color: #94979c;\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .search-input {\n flex: 1;\n background: transparent;\n border: none;\n color: #ffffff;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n outline: none;\n }\n\n .search-input::placeholder {\n color: #85888eb2;\n }\n\n .search-kbd {\n background: #1d2e47;\n border: 1px solid #22262f;\n border-radius: 4px;\n padding: 2px 8px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: #94979c;\n font-family: 'Inter', monospace;\n margin-left: 8px;\n flex-shrink: 0;\n }\n\n .create-rule-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: #7ba8ef;\n color: #031525;\n border: none;\n border-radius: 8px;\n padding: 10px 16px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n height: 40px;\n cursor: pointer;\n transition: background 0.2s ease;\n }\n\n .create-rule-btn:hover {\n background: #8fb5f2;\n }\n\n .create-rule-btn:focus {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .plus-icon {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .tabs-container {\n display: flex;\n gap: 8px;\n margin-bottom: 16px;\n border-bottom: 1px solid #22262f;\n }\n\n .table-container {\n background: #071a2b;\n border: 1px solid #22262f;\n border-radius: 16px;\n overflow: hidden;\n margin-bottom: 20px;\n }\n\n .rules-table {\n width: 100%;\n border-collapse: collapse;\n }\n\n .rules-table thead {\n background: #071a2b;\n border-bottom: 1px solid #22262f;\n }\n\n .rules-table th {\n text-align: left;\n padding: 12px 16px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: #94979c;\n text-transform: none;\n letter-spacing: 0;\n }\n\n .col-dependencies {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .info-icon {\n cursor: help;\n display: inline-flex;\n align-items: center;\n width: 16px;\n height: 16px;\n color: #61656c;\n }\n\n .rule-row {\n border-bottom: 1px solid #22262f;\n transition: background 0.2s ease;\n }\n\n .rule-row:last-child {\n border-bottom: none;\n }\n\n .rule-row:hover {\n background: #0a2137;\n }\n\n .rules-table td {\n padding: 16px;\n font-size: 14px;\n line-height: 20px;\n vertical-align: middle;\n }\n\n .rule-info {\n max-width: 400px;\n }\n\n .rule-title {\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #ffffff;\n margin-bottom: 4px;\n }\n\n .rule-description {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #94979c;\n }\n\n .status-badge {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 12px;\n font-weight: 600;\n line-height: 18px;\n text-transform: capitalize;\n }\n\n .status-badge.active {\n background: #dcfae6;\n color: #067647;\n }\n\n .status-badge.inactive {\n background: #d5d7da;\n color: #414651;\n }\n\n .dependencies-count {\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #ffffff;\n }\n\n .creator-wrapper {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .creator-avatar {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n border: none;\n }\n\n .creator-details {\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n\n .creator-name {\n font-weight: 400;\n color: #ffffff;\n font-size: 14px;\n line-height: 20px;\n }\n\n .creator-username {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #94979c;\n }\n\n .action-cell {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n }\n\n .action-icons {\n display: flex;\n gap: 4px;\n }\n\n .icon-btn {\n background: transparent;\n border: none;\n color: #94979c;\n cursor: pointer;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s ease;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n }\n\n .icon-btn:hover {\n background: #1d2e47;\n color: #ffffff;\n }\n\n .icon-btn:focus {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .pagination-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n }\n\n .pagination-btn {\n background: #071a2b;\n border: 1px solid #22262f;\n color: #ffffff;\n padding: 10px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n cursor: pointer;\n transition: all 0.2s ease;\n height: 40px;\n }\n\n .pagination-btn:hover:not(:disabled) {\n background: #0a2137;\n border-color: #2a3947;\n }\n\n .pagination-btn:focus:not(:disabled) {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .pagination-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n .page-numbers {\n display: flex;\n gap: 4px;\n }\n\n .page-number {\n background: #071a2b;\n border: 1px solid #22262f;\n color: #ffffff;\n padding: 10px 14px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n cursor: pointer;\n transition: all 0.2s ease;\n min-width: 40px;\n height: 40px;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .page-number:hover:not(.active):not(.ellipsis) {\n background: #0a2137;\n border-color: #2a3947;\n }\n\n .page-number:focus:not(.ellipsis) {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .page-number.active {\n background: #1d2e47;\n border-color: #22262f;\n color: #ffffff;\n }\n\n .page-number.ellipsis {\n cursor: default;\n border: none;\n background: transparent;\n }\n\n .page-number:disabled {\n cursor: not-allowed;\n }\n\n @media (max-width: 1024px) {\n .rules-header {\n flex-direction: column;\n gap: 16px;\n }\n\n .header-actions {\n width: 100%;\n flex-direction: column;\n }\n\n .search-wrapper {\n width: 100%;\n }\n\n .create-rule-btn {\n width: 100%;\n justify-content: center;\n }\n }\n\n @media (max-width: 768px) {\n .rules-management {\n padding: 16px;\n }\n\n .tabs-container {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n .table-container {\n overflow-x: auto;\n }\n\n .rules-table {\n min-width: 800px;\n }\n\n .pagination-container {\n flex-direction: column;\n }\n }\n</style>\n","<template>\n <div\n class=\"freddy-vector-frame\"\n :class=\"{ 'freddy-vector-frame--clicked': isClicked }\"\n @click=\"handleClick\"\n >\n <div class=\"freddy-vector-frame__content\">\n <!-- Icon -->\n <div class=\"freddy-vector-frame__icon-container\">\n <IconFileSystem class=\"freddy-vector-frame__icon\" />\n </div>\n\n <!-- Title -->\n <div class=\"freddy-vector-frame__title\">\n {{ title }}\n </div>\n\n <!-- Popular Badge or IconTick when clicked -->\n <div v-if=\"!isClicked\" class=\"freddy-vector-frame__badge\">\n <div class=\"freddy-vector-frame__badge-content\">\n <IconStar class=\"freddy-vector-frame__badge-icon\" />\n <div class=\"freddy-vector-frame__badge-text\">{{ badgeText }}</div>\n </div>\n </div>\n\n <!-- IconBadgeCheck when clicked -->\n <div v-if=\"isClicked\" class=\"freddy-vector-frame__tick-container\">\n <IconBadgeCheck class=\"freddy-vector-frame__tick-icon\" />\n </div>\n </div>\n\n <!-- Underline (only when clicked) -->\n <div v-if=\"isClicked\" class=\"freddy-vector-frame__underline\"></div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { IconFileSystem, IconStar, IconBadgeCheck } from '@/icons';\n\n interface Props {\n title?: string;\n badgeText?: string;\n isSelected?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: 'Main Vector Store',\n badgeText: 'Popular',\n isSelected: false,\n });\n\n const emit = defineEmits<{\n click: [event: MouseEvent];\n }>();\n\n const isClicked = ref(props.isSelected);\n\n const handleClick = (event: MouseEvent) => {\n isClicked.value = !isClicked.value;\n emit('click', event);\n };\n</script>\n\n<style scoped>\n .freddy-vector-frame {\n /*width: 100%;*/\n height: 38px;\n padding: 12px;\n background: rgba(123, 168, 239, 0.1);\n border-radius: 16px;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 16px;\n display: flex;\n cursor: pointer;\n transition: all 0.2s ease;\n border: 1px solid transparent;\n }\n\n .freddy-vector-frame:hover {\n transform: scale(1.02);\n background: rgba(167, 208, 248, 0.3);\n border: 1px solid #a1c9ef;\n }\n\n .freddy-vector-frame--clicked {\n flex-direction: column;\n height: auto;\n padding-top: 8px;\n padding-bottom: 0;\n background: rgba(167, 208, 248, 0.3);\n border: 1px solid #a1c9ef;\n gap: 0;\n }\n\n .freddy-vector-frame__content {\n width: 100%;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n display: flex;\n }\n\n .freddy-vector-frame__icon-container {\n width: 40px;\n height: 40px;\n position: relative;\n background: #1d2e47;\n box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);\n border-radius: 8px;\n border: 1px solid #535862;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n }\n\n .freddy-vector-frame:hover .freddy-vector-frame__icon-container {\n background: #a7d0f8;\n border: 1px solid #7ba8ef;\n }\n\n .freddy-vector-frame--clicked .freddy-vector-frame__icon-container {\n background: #a7d0f8;\n border: 1px solid #7ba8ef;\n }\n\n .freddy-vector-frame__icon {\n width: 20px;\n height: 20px;\n color: #cbd6e3;\n }\n\n .freddy-vector-frame:hover .freddy-vector-frame__icon {\n color: black;\n }\n\n .freddy-vector-frame--clicked .freddy-vector-frame__icon {\n color: black;\n }\n\n .freddy-vector-frame__title {\n flex: 1 1 0;\n height: 100%;\n max-height: 48px;\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #f7f7f7;\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-vector-frame__badge {\n padding: 4px 8px;\n background: #7ba8ef;\n border-radius: 6px;\n border: 1px solid #a1c9ef;\n justify-content: center;\n align-items: center;\n gap: 4px;\n display: flex;\n flex-shrink: 0;\n }\n\n .freddy-vector-frame__badge-content {\n justify-content: center;\n align-items: center;\n gap: 4px;\n display: flex;\n }\n\n .freddy-vector-frame__badge-icon {\n width: 8px;\n height: 8px;\n color: #031525;\n }\n\n .freddy-vector-frame__tick-container {\n width: 24px;\n height: 24px;\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n }\n\n .freddy-vector-frame__tick-icon {\n width: 20px;\n height: 20px;\n left: 2px;\n top: 2px;\n position: absolute;\n color: #a1c9ef;\n }\n\n .freddy-vector-frame__badge-text {\n text-align: center;\n color: #031525;\n font-size: 14px;\n font-family: Inter;\n font-weight: 600;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-frame__underline {\n align-self: stretch;\n height: 2px;\n position: relative;\n background: #a7d0f8;\n border-radius: 999px;\n border: 1px solid #7ba8ef;\n margin-bottom: 6px;\n margin-top: 4px;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-vector-frame {\n padding: 12px;\n gap: 10px;\n }\n\n .freddy-vector-frame__icon-container {\n width: 40px;\n height: 40px;\n }\n\n .freddy-vector-frame__icon {\n width: 20px;\n height: 20px;\n }\n\n .freddy-vector-frame__title {\n font-size: 14px;\n line-height: 20px;\n }\n\n .freddy-vector-frame__badge {\n padding: 4px 8px;\n }\n\n .freddy-vector-frame__badge-text {\n font-size: 12px;\n line-height: 16px;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-vector-frame {\n padding: 10px;\n gap: 8px;\n }\n\n .freddy-vector-frame__content {\n gap: 8px;\n }\n\n .freddy-vector-frame__icon-container {\n width: 36px;\n height: 36px;\n }\n\n .freddy-vector-frame__icon {\n width: 18px;\n height: 18px;\n }\n }\n</style>\n","<template>\n <div class=\"freddy-vector-section\">\n <div class=\"freddy-vector-section__content\">\n <!-- Header Section -->\n <div class=\"freddy-vector-section__header\">\n <div class=\"freddy-vector-section__title\">Knowledge</div>\n <div class=\"freddy-vector-section__count\">{{ dbCount }} DBs added</div>\n </div>\n\n <!-- Main Content -->\n <div class=\"freddy-vector-section__main\">\n <!-- Search Section -->\n <div class=\"freddy-vector-section__search-container\">\n <div class=\"freddy-vector-section__search-header\">\n <div class=\"freddy-vector-section__search-label\">\n Vector Stores\n <div class=\"freddy-vector-section__help-icon\">\n <IconQuestion class=\"freddy-vector-section__help-icon-svg\" />\n </div>\n </div>\n <div class=\"freddy-vector-section__search-input-container\">\n <SearchInput\n v-model:searchInput=\"searchQuery\"\n :placeholder=\"searchPlaceholder\"\n class=\"freddy-vector-section__search-input\"\n @update:searchInput=\"handleSearchInput\"\n />\n </div>\n </div>\n </div>\n\n <!-- Filter and Results Section -->\n <div class=\"freddy-vector-section__filter-results\">\n <div class=\"freddy-vector-section__filter\">\n <div class=\"freddy-vector-section__filter-button\">\n <IconFilter class=\"freddy-vector-section__filter-icon\" />\n <span class=\"freddy-vector-section__filter-text\">Filter by</span>\n <IconChevronDown class=\"freddy-vector-section__filter-arrow\" />\n </div>\n </div>\n <div class=\"freddy-vector-section__results-count\">\n {{ filteredCount }} databases found\n </div>\n </div>\n\n <!-- Vector Frames List -->\n <div class=\"freddy-vector-section__frames-container\">\n <div\n v-for=\"(frame, index) in displayedFrames\"\n :key=\"frame.id || index\"\n class=\"freddy-vector-section__frame-item\"\n >\n <!-- <VectorFrame\n :title=\"frame.title\"\n :badgeText=\"frame.badgeText\"\n :isSelected=\"frame.isSelected\"\n @click=\"handleFrameClick(frame, index)\"\n /> -->\n </div>\n </div>\n\n <!-- Show More Button -->\n <div v-if=\"hasMoreFrames\" class=\"freddy-vector-section__show-more\">\n <button\n class=\"freddy-vector-section__show-more-button\"\n @click=\"handleShowMore\"\n >\n <span class=\"freddy-vector-section__show-more-text\"\n >Show {{ remainingCount }} more</span\n >\n <IconChevronDown class=\"freddy-vector-section__show-more-icon\" />\n </button>\n </div>\n </div>\n\n <!-- Add Vector Store Section -->\n <div class=\"freddy-vector-section__add-section\">\n <div class=\"freddy-vector-section__add-title\">Knowledge</div>\n <div class=\"freddy-vector-section__add-container\">\n <button\n class=\"freddy-vector-section__add-button\"\n @click=\"handleAddVectorStore\"\n >\n <IconAddFileSystem class=\"freddy-vector-section__add-icon\" />\n <span class=\"freddy-vector-section__add-text\"\n >Add vector store to assistant</span\n >\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed } from 'vue';\n import { SearchInput } from '@/components';\n import {\n IconQuestion,\n IconChevronDown,\n IconAddFileSystem,\n IconFilter,\n } from '@/icons';\n\n interface VectorFrameData {\n id?: string | number;\n title: string;\n badgeText?: string;\n isSelected?: boolean;\n }\n\n interface Props {\n title?: string;\n dbCount?: number;\n searchPlaceholder?: string;\n frames?: VectorFrameData[];\n maxDisplayed?: number;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: 'Knowledge',\n dbCount: 0,\n searchPlaceholder: 'Search vector store',\n frames: () => [\n {\n id: 1,\n title: 'Main Vector Store',\n badgeText: 'Popular',\n isSelected: true,\n },\n {\n id: 2,\n title: 'Secondary Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 3,\n title: 'Custom Vector Store',\n badgeText: 'Popular',\n isSelected: true,\n },\n {\n id: 4,\n title: 'Backup Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 5,\n title: 'Analytics Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 6,\n title: 'User Data Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 7,\n title: 'Logs Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 8,\n title: 'Cache Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 9,\n title: 'Metrics Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 10,\n title: 'Archive Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 11,\n title: 'Test Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 12,\n title: 'Production Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n ],\n maxDisplayed: 4,\n });\n\n const emit = defineEmits<{\n frameClick: [frame: VectorFrameData, index: number];\n addVectorStore: [];\n showMore: [];\n searchInput: [query: string];\n }>();\n\n const searchQuery = ref('');\n const displayedCount = ref(props.maxDisplayed);\n\n const filteredFrames = computed(() => {\n if (!searchQuery.value.trim()) {\n return props.frames;\n }\n return props.frames.filter(frame =>\n frame.title.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n });\n\n const displayedFrames = computed(() => {\n return filteredFrames.value.slice(0, displayedCount.value);\n });\n\n const filteredCount = computed(() => {\n return filteredFrames.value.length;\n });\n\n const hasMoreFrames = computed(() => {\n return filteredFrames.value.length > displayedCount.value;\n });\n\n const remainingCount = computed(() => {\n return filteredFrames.value.length - displayedCount.value;\n });\n\n const handleFrameClick = (frame: VectorFrameData, index: number) => {\n emit('frameClick', frame, index);\n };\n\n const handleAddVectorStore = () => {\n emit('addVectorStore');\n };\n\n const handleShowMore = () => {\n displayedCount.value = filteredFrames.value.length;\n emit('showMore');\n };\n\n const handleSearchInput = (query: string | null) => {\n searchQuery.value = query || '';\n displayedCount.value = props.maxDisplayed; // Reset display count on search\n emit('searchInput', searchQuery.value);\n };\n</script>\n\n<style scoped>\n .freddy-vector-section {\n width: 100%;\n min-width: 1029px;\n min-height: 728px;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n padding: 24px;\n background: transparent;\n }\n\n .freddy-vector-section__content {\n width: 100%;\n max-width: 100%;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 20px;\n display: flex;\n }\n\n .freddy-vector-section__header {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: flex;\n margin-bottom: 4px;\n }\n\n .freddy-vector-section__title {\n color: var(--Colors-Text-text-primary, #ffffff);\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__count {\n color: var(--Colors-Texts-Text-Tetriary, #cbd6e3);\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__main {\n align-self: stretch;\n min-height: 300px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 16px;\n display: flex;\n }\n\n .freddy-vector-section__search-container {\n align-self: stretch;\n border-radius: 8px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-vector-section__search-header {\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-vector-section__search-label {\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n display: inline-flex;\n color: var(--Colors-Texts-Text-Tetriary, #cbd6e3);\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__help-icon {\n width: 16px;\n height: 16px;\n position: relative;\n cursor: pointer;\n }\n\n .freddy-vector-section__help-icon-svg {\n width: 13.33px;\n height: 13.33px;\n left: 1.33px;\n top: 1.33px;\n position: absolute;\n color: var(--Colors-Forground-fg-quaternary, #61656c);\n }\n\n .freddy-vector-section__search-input-container {\n align-self: stretch;\n /*padding: 8px 12px;*/\n background: #071a2b;\n /*box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);*/\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid #35414b;\n justify-content: flex-start;\n align-items: center;\n gap: 8px;\n display: flex;\n min-height: 40px;\n color: #85888eb2;\n }\n\n .freddy-vector-section__search-input {\n flex: 1 1 0;\n width: 100%;\n }\n\n /* Override SearchInput colors for dark theme */\n .freddy-vector-section__search-input .freddy-search-icon {\n stroke: #a0aec0 !important;\n color: #a0aec0 !important;\n }\n\n .freddy-vector-section__search-input .freddy-search-input {\n color: #a0aec0 !important;\n background: transparent !important;\n border: none !important;\n outline: none !important;\n font-size: 14px !important;\n }\n\n .freddy-vector-section__search-input .freddy-search-input::placeholder {\n color: rgba(160, 174, 192, 0.7) !important;\n }\n\n .freddy-vector-section__filter-results {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: flex;\n margin-top: 4px;\n }\n\n .freddy-vector-section__filter {\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n display: flex;\n }\n\n .freddy-vector-section__filter-button {\n padding: 8px 12px;\n overflow: hidden;\n border-radius: 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n cursor: pointer;\n transition: all 0.2s ease;\n background: transparent;\n }\n\n .freddy-vector-section__filter-button:hover {\n background: rgba(255, 255, 255, 0.1);\n }\n\n .freddy-vector-section__filter-icon {\n width: 16px;\n height: 16px;\n position: relative;\n color: var(--Colors-Forground-fg-tertiary, #94979c);\n }\n\n .freddy-vector-section__filter-text {\n color: var(--Colors-Texts-text-secondary, #9597a7);\n font-size: 14px;\n font-family: Inter;\n font-weight: 600;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__filter-arrow {\n width: 16px;\n height: 16px;\n position: relative;\n color: var(--Colors-Forground-fg-tertiary, #94979c);\n }\n\n .freddy-vector-section__results-count {\n color: var(--Colors-Texts-Text-Gray, #717680);\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__frames-container {\n align-self: stretch;\n /* min-height: 200px;*/\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n column-gap: 16px;\n row-gap: 10px;\n padding: 4px 0;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-vector-section__frames-container {\n grid-template-columns: 1fr;\n gap: 12px;\n }\n\n .freddy-vector-section {\n padding: 16px;\n }\n\n .freddy-vector-section__content {\n gap: 16px;\n }\n }\n\n @media (min-width: 769px) {\n .freddy-vector-section__frames-container {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n @media (max-width: 480px) {\n .freddy-vector-section {\n padding: 12px;\n }\n\n .freddy-vector-section__add-button {\n min-width: 150px;\n height: 40px;\n padding: 10px 16px;\n }\n\n .freddy-vector-section__show-more-button {\n min-width: 100px;\n height: 40px;\n padding: 10px 16px;\n }\n }\n\n .freddy-vector-section__frame-item {\n width: 100%;\n height: auto;\n min-height: 64px;\n }\n\n .freddy-vector-section__show-more {\n align-self: stretch;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 0;\n display: flex;\n margin-top: 16px;\n }\n\n .freddy-vector-section__show-more-button {\n height: 44px;\n min-width: 120px;\n padding: 12px 20px;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-action, #7ba8ef);\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n background: transparent;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-vector-section__show-more-button:hover {\n background: rgba(123, 168, 239, 0.1);\n }\n\n .freddy-vector-section__show-more-text {\n padding-left: 2px;\n padding-right: 2px;\n justify-content: center;\n align-items: center;\n display: flex;\n color: var(--Colors-Texts-Text-Action, #7ba8ef);\n font-size: 16px;\n font-family: Inter;\n font-weight: 500;\n line-height: 24px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__show-more-icon {\n width: 20px;\n height: 20px;\n position: relative;\n color: var(--Colors-Forground-fg-action, #a1c9ef);\n }\n\n .freddy-vector-section__add-section {\n width: 100%;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 12px;\n display: flex;\n margin-top: 24px;\n padding-top: 20px;\n }\n\n .freddy-vector-section__add-title {\n color: var(--Colors-Text-text-primary, #ffffff);\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__add-container {\n align-self: stretch;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 0;\n display: flex;\n }\n\n .freddy-vector-section__add-button {\n height: 44px;\n min-width: 200px;\n padding: 12px 20px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-action, #7ba8ef);\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-vector-section__add-button:hover {\n background: var(--Colors-Background-bg-action-hover, #a7d0f8);\n }\n\n .freddy-vector-section__add-icon {\n width: 20px;\n height: 20px;\n position: relative;\n color: var(--Colors-Texts-text-quaternary-active, #101a2c);\n }\n\n .freddy-vector-section__add-text {\n flex: 1 1 0;\n color: var(--Colors-Texts-text-action-button, #031525);\n font-size: 16px;\n font-family: Inter;\n font-weight: 500;\n line-height: 24px;\n word-wrap: break-word;\n }\n</style>\n","<template>\n <div class=\"freddy-voice-list\">\n <h3 v-if=\"title\" class=\"freddy-voice-list__title\">{{ title }}</h3>\n <div class=\"freddy-voice-list__container\">\n <VoiceSelection\n v-for=\"voice in voices\"\n :key=\"voice.id\"\n :voiceName=\"voice.name\"\n :isSelected=\"selectedVoiceId === voice.id\"\n @click=\"handleVoiceClick(voice.id)\"\n />\n </div>\n <div v-if=\"showSelectedInfo\" class=\"freddy-voice-list__selected-info\">\n <p>Selected: {{ selectedVoice?.name || 'None' }}</p>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { VoiceSelection } from '@/components';\n\n interface Voice {\n id: string | number;\n name: string;\n }\n\n interface Props {\n voices: Voice[];\n title?: string;\n showSelectedInfo?: boolean;\n allowDeselect?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: '',\n showSelectedInfo: true,\n allowDeselect: true,\n });\n\n const emit = defineEmits<{\n selectionChange: [selectedId: string | number | null];\n voiceClick: [voiceId: string | number, isSelected: boolean];\n }>();\n\n const selectedVoiceId = ref<string | number | null>(null);\n\n const selectedVoice = computed(() => {\n return (\n props.voices.find(voice => voice.id === selectedVoiceId.value) || null\n );\n });\n\n const handleVoiceClick = (voiceId: string | number) => {\n const isCurrentlySelected = selectedVoiceId.value === voiceId;\n\n if (isCurrentlySelected && props.allowDeselect) {\n // Deselect if already selected and deselection is allowed\n selectedVoiceId.value = null;\n } else {\n // Select the clicked voice\n selectedVoiceId.value = voiceId;\n }\n\n // Emit events\n emit('selectionChange', selectedVoiceId.value);\n emit('voiceClick', voiceId, selectedVoiceId.value === voiceId);\n };\n\n // Expose methods for parent components\n defineExpose({\n selectedVoiceId,\n selectedVoice,\n selectVoice: (id: string | number) => {\n selectedVoiceId.value = id;\n emit('selectionChange', id);\n },\n clearSelection: () => {\n selectedVoiceId.value = null;\n emit('selectionChange', null);\n },\n });\n</script>\n\n<style>\n .freddy-voice-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n .freddy-voice-list__title {\n font-family: 'Inter', sans-serif;\n font-size: 18px;\n font-weight: 600;\n color: var(--Colors-Texts-text-primary, #ffffff);\n margin: 0;\n }\n\n .freddy-voice-list__container {\n display: flex;\n flex-wrap: wrap;\n gap: 20px;\n align-items: flex-start;\n justify-content: flex-start;\n max-width: 880px; /* 4 components × 205px + 3 gaps × 20px */\n }\n\n .freddy-voice-list__selected-info {\n padding: 12px;\n background: var(--Colors-Background-bg-secondary, #1a1a1a);\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-primary, #333333);\n }\n\n .freddy-voice-list__selected-info p {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n color: var(--Colors-Texts-text-secondary, #cccccc);\n margin: 0;\n }\n</style>\n","<template>\n <div\n class=\"freddy-voice-selection\"\n :class=\"{ 'freddy-voice-selection--selected': isSelected }\"\n @click=\"handleClick\"\n >\n <div class=\"freddy-voice-selection__container\">\n <!-- Voice Icon -->\n <div class=\"freddy-voice-selection__icon-container\">\n <div class=\"freddy-voice-selection__icon\">\n <div class=\"freddy-voice-selection__play-background\">\n <IconRevertedTriangle\n class=\"freddy-voice-selection__triangle-icon\"\n />\n </div>\n </div>\n </div>\n\n <!-- Voice Name -->\n <div class=\"freddy-voice-selection__name-container\">\n <div class=\"freddy-voice-selection__name-wrapper\">\n <div class=\"freddy-voice-selection__name\">{{ voiceName }}</div>\n </div>\n </div>\n\n <!-- Selection Indicator -->\n\n <div v-if=\"isSelected\" class=\"freddy-voice-selection__check-icon\">\n <IconTick class=\"freddy-voice-selection__check-icon-svg\" />\n </div>\n <div v-else class=\"freddy-voice-selection__indicator\"></div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { IconTick, IconRevertedTriangle } from '@/icons';\n\n interface Props {\n voiceName: string;\n isSelected?: boolean;\n }\n\n withDefaults(defineProps<Props>(), {\n isSelected: false,\n });\n\n const emit = defineEmits<{\n handleClick: [event: MouseEvent];\n }>();\n\n const handleClick = (event: MouseEvent) => {\n emit('handleClick', event);\n };\n</script>\n\n<style>\n .freddy-voice-selection {\n width: 205px;\n /*height: 100%;*/\n border-radius: 16px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-voice-selection:hover {\n transform: scale(1.02);\n }\n\n .freddy-voice-selection__container {\n padding: 10px;\n background: var(--Colors-Background-bg-secondary, #071a2b);\n border-radius: 16px;\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n display: inline-flex;\n /*width: 100%;*/\n transition: all 0.2s ease;\n }\n\n .freddy-voice-selection--selected .freddy-voice-selection__container {\n outline: 2px var(--Colors-Background-bg-action, #7ba8ef) solid;\n outline-offset: -2px;\n }\n\n .freddy-voice-selection__icon-container {\n justify-content: center;\n align-items: center;\n gap: 10px;\n display: flex;\n }\n\n .freddy-voice-selection__icon {\n width: 40px;\n height: 40px;\n position: relative;\n }\n\n .freddy-voice-selection__play-background {\n width: 40px;\n height: 40px;\n left: 0px;\n top: 0px;\n position: absolute;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 48px;\n backdrop-filter: blur(8px);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-voice-selection__triangle-icon {\n width: 13.75px;\n height: 15px;\n color: var(--Colors-Base-White, white);\n fill: var(--Colors-Base-White, white);\n }\n\n .freddy-voice-selection__name-container {\n width: 100px;\n justify-content: space-between;\n align-items: center;\n display: flex;\n flex: 1;\n }\n\n .freddy-voice-selection__name-wrapper {\n flex: 1 1 0;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-voice-selection__name {\n flex: 1 1 0;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n display: inline-flex;\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n display: flex;\n align-self: stretch;\n height: 24px;\n text-align: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: var(--Colors-Base-white, white);\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-voice-selection__indicator {\n width: 25px;\n height: 25px;\n position: relative;\n transition: all 0.2s ease;\n }\n\n .freddy-voice-selection__indicator:not(.freddy-voice-selection__check-icon) {\n border: 1px var(--Colors-Border-border-grey-primary, #d1d3d5) solid;\n border-radius: 100px;\n }\n\n .freddy-voice-selection__check-icon {\n width: 25px;\n height: 25px;\n position: relative;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border-radius: 100px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n }\n\n .freddy-voice-selection__check-icon-svg {\n width: 13px;\n height: 13px;\n left: 6px;\n top: 6px;\n position: absolute;\n overflow: hidden;\n color: var(--Colors-Base-white, white);\n }\n\n /* Check icon inner circle */\n .freddy-voice-selection__check-icon-svg::before {\n content: '';\n width: 8.67px;\n height: 5.96px;\n left: 2.17px;\n top: 3.25px;\n position: absolute;\n outline: 2px var(--Colors-Base-white, white) solid;\n outline-offset: -1px;\n }\n</style>\n","/**\n * useTheme Composable - DEPRECATED in v0.4.54\n * \n * ⚠️ ThemeService was removed due to SSR incompatibility\n * This stub prevents build errors but returns no-op functions\n * \n * For theme functionality, implement theme management in your consuming app\n * Recovery: git checkout 70edb4d (v0.4.53) for full implementation\n * \n * @deprecated Use your app's theme system instead\n */\n\nimport { ref, computed } from 'vue';\n\n// Stub implementation to prevent build errors\nexport const useTheme = () => {\n const currentProject = ref(null);\n const currentColorMode = ref(null);\n const isLoading = ref(false);\n const error = ref(null);\n const availableBrands = computed(() => []);\n const availableModes = computed(() => []);\n\n return {\n currentProject,\n currentColorMode,\n isLoading,\n error,\n availableBrands,\n availableModes,\n setBrand: () => console.warn('ThemeService removed in v0.4.54'),\n setMode: () => console.warn('ThemeService removed in v0.4.54'),\n setTheme: () => console.warn('ThemeService removed in v0.4.54'),\n initializeTheme: () => Promise.resolve(),\n };\n};\n\n// Export stub implementations\nexport const useThemeState = () => {\n const theme = useTheme();\n return {\n currentProject: theme.currentProject,\n currentColorMode: theme.currentColorMode,\n isLoading: theme.isLoading,\n error: theme.error,\n availableBrands: theme.availableBrands,\n availableModes: theme.availableModes,\n };\n};\n\nexport const useThemeActions = () => {\n const theme = useTheme();\n return {\n setBrand: theme.setBrand,\n setMode: theme.setMode,\n setTheme: theme.setTheme,\n initializeTheme: theme.initializeTheme,\n };\n};\n\n","<script setup lang=\"ts\">\n import { useTheme } from '@/composables/useTheme';\n import { ref, nextTick, onUnmounted } from 'vue';\n\n const { currentProject, currentColorMode } = useTheme();\n\n interface TooltipProps {\n /** The text content to display in the tooltip */\n text?: string;\n /** The placement of the tooltip relative to the trigger element */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Whether to render the text as HTML */\n html?: boolean;\n /** Custom CSS class to apply to the tooltip content */\n contentClass?: string;\n }\n\n const props = defineProps<TooltipProps>();\n\n const show = ref(false);\n const tooltipWrapper = ref<HTMLElement | null>(null);\n const tooltipContent = ref<HTMLElement | null>(null);\n const tooltipStyle = ref({ top: '0px', left: '0px' });\n let showTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const updatePosition = () => {\n if (!tooltipWrapper.value || !tooltipContent.value) return;\n\n const triggerRect = tooltipWrapper.value.getBoundingClientRect();\n const contentRect = tooltipContent.value.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const gap = 8;\n\n // Default to top if not specified\n const placement = props.placement || 'top';\n\n // Check for auto-flip to bottom if too close to top (legacy behavior)\n const forceBottom = !props.placement && triggerRect.top < 150;\n const effectivePlacement = forceBottom ? 'bottom' : placement;\n\n switch (effectivePlacement) {\n case 'top':\n top = triggerRect.top - contentRect.height - gap;\n left = triggerRect.left + (triggerRect.width - contentRect.width) / 2;\n break;\n case 'bottom':\n top = triggerRect.bottom + gap;\n left = triggerRect.left + (triggerRect.width - contentRect.width) / 2;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - contentRect.height) / 2;\n left = triggerRect.left - contentRect.width - gap;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - contentRect.height) / 2;\n left = triggerRect.right + gap;\n break;\n }\n\n tooltipStyle.value = {\n top: `${top}px`,\n left: `${left}px`,\n };\n };\n\n function open() {\n if (showTimeout) clearTimeout(showTimeout);\n showTimeout = setTimeout(async () => {\n show.value = true;\n await nextTick();\n updatePosition();\n window.addEventListener('scroll', updatePosition, true);\n window.addEventListener('resize', updatePosition);\n }, 200); // 200ms delay for better responsiveness\n }\n\n function close() {\n if (showTimeout) clearTimeout(showTimeout);\n show.value = false;\n window.removeEventListener('scroll', updatePosition, true);\n window.removeEventListener('resize', updatePosition);\n }\n\n onUnmounted(() => {\n close();\n });\n</script>\n\n<template>\n <div\n ref=\"tooltipWrapper\"\n class=\"tooltip-wrapper\"\n @mouseenter=\"open\"\n @mouseleave=\"close\"\n @focusin=\"open\"\n @focusout=\"close\"\n tabindex=\"0\"\n >\n <slot />\n <Teleport to=\"body\">\n <transition name=\"fade\">\n <div\n v-if=\"show\"\n ref=\"tooltipContent\"\n class=\"tooltip-content-fixed\"\n :class=\"[contentClass]\"\n :style=\"tooltipStyle\"\n >\n <slot name=\"content\">\n <span v-if=\"html\" v-html=\"text\"></span>\n <span v-else>{{ text }}</span>\n </slot>\n </div>\n </transition>\n </Teleport>\n </div>\n</template>\n\n<style>\n .tooltip-wrapper {\n display: inline-block;\n position: relative;\n }\n\n .tooltip-content-fixed {\n position: fixed;\n z-index: 9999;\n background: #212529;\n color: #ffffff;\n font-size: 13px;\n padding: 8px 12px;\n border-radius: 6px;\n white-space: normal;\n max-width: 300px;\n pointer-events: none;\n opacity: 0.95;\n box-shadow: 0 4px 12px var(--freddy-border-color);\n line-height: 1.4;\n min-width: 200px;\n word-wrap: break-word;\n word-break: break-word;\n }\n\n .fade-enter-active,\n .fade-leave-active {\n transition: opacity 0.15s;\n }\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n }\n</style>\n","<template>\n <Tooltip v-if=\"tooltip\" :text=\"tooltip\" :placement=\"tooltipPlacement\">\n <button\n :class=\"buttonClasses\"\n :disabled=\"disabled || loading\"\n :aria-disabled=\"disabled || loading\"\n :aria-label=\"iconOnly ? label : undefined\"\n role=\"button\"\n @click=\"handleClick\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n >\n <!-- Loading state with spinner and optional text -->\n <template v-if=\"loading\">\n <span class=\"freddy-plugins-button-spinner\" aria-hidden=\"true\"></span>\n <span v-if=\"loadingText || label\" class=\"freddy-plugins-button-label\">\n {{ loadingText || label }}\n </span>\n </template>\n\n <!-- Icon only mode -->\n <template v-else-if=\"iconOnly\">\n <component\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-center\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n />\n </template>\n\n <!-- Normal mode: Left Icon, Label, Right Icon -->\n <template v-else>\n <component\n v-if=\"leftIcon\"\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-left\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleLeftIconClick\"\n />\n\n <span v-if=\"label\" class=\"freddy-plugins-button-label\">\n {{ label }}\n </span>\n\n <component\n v-if=\"rightIcon\"\n :is=\"RightIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-right\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleRightIconClick\"\n />\n </template>\n </button>\n </Tooltip>\n\n <button\n v-else\n :class=\"buttonClasses\"\n :disabled=\"disabled || loading\"\n :aria-disabled=\"disabled || loading\"\n :aria-label=\"iconOnly ? label : undefined\"\n role=\"button\"\n @click=\"handleClick\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n >\n <!-- Loading state with spinner and optional text -->\n <template v-if=\"loading\">\n <span class=\"freddy-plugins-button-spinner\" aria-hidden=\"true\"></span>\n <span v-if=\"loadingText || label\" class=\"freddy-plugins-button-label\">\n {{ loadingText || label }}\n </span>\n </template>\n\n <!-- Icon only mode -->\n <template v-else-if=\"iconOnly\">\n <component\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-center\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n />\n </template>\n\n <!-- Normal mode: Left Icon, Label, Right Icon -->\n <template v-else>\n <component\n v-if=\"leftIcon\"\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-left\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleLeftIconClick\"\n />\n\n <span v-if=\"label\" class=\"freddy-plugins-button-label\">\n {{ label }}\n </span>\n\n <component\n v-if=\"rightIcon\"\n :is=\"RightIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-right\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleRightIconClick\"\n />\n </template>\n </button>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, defineAsyncComponent } from 'vue';\n import type {\n BaseButtonProps,\n BaseButtonEmits,\n } from '@/interfaces/base-button.interfaces';\n import Tooltip from '../Tooltip.vue';\n\n const props = withDefaults(defineProps<BaseButtonProps>(), {\n size: 'md',\n hierarchy: 'primary',\n state: 'default',\n errorState: false,\n iconOnly: false,\n leftIcon: undefined,\n rightIcon: undefined,\n label: 'Button',\n loadingText: undefined,\n disabled: false,\n loading: false,\n tooltip: undefined,\n tooltipPlacement: 'top',\n });\n\n // Icon component mapping - only include icons that actually exist\n const iconComponents: Record<string, any> = {\n IconSearch: defineAsyncComponent(() => import('@/icons/IconSearch.vue')),\n IconUser: defineAsyncComponent(() => import('@/icons/IconUser.vue')),\n IconDelete: defineAsyncComponent(() => import('@/icons/IconDelete.vue')),\n IconSend: defineAsyncComponent(() => import('@/icons/IconSend.vue')),\n IconPlus: defineAsyncComponent(() => import('@/icons/IconPlus.vue')),\n IconEdit: defineAsyncComponent(() => import('@/icons/IconEdit.vue')),\n IconCross: defineAsyncComponent(() => import('@/icons/IconCross.vue')),\n IconTick: defineAsyncComponent(() => import('@/icons/IconTick.vue')),\n IconArrowLeft: defineAsyncComponent(\n () => import('@/icons/IconArrowLeft.vue')\n ),\n IconArrowDown: defineAsyncComponent(\n () => import('@/icons/IconArrowDown.vue')\n ),\n IconArrowUp: defineAsyncComponent(() => import('@/icons/IconArrowUp.vue')),\n IconChevronDown: defineAsyncComponent(\n () => import('@/icons/IconChevronDown.vue')\n ),\n IconChevronUp: defineAsyncComponent(\n () => import('@/icons/IconChevronUp.vue')\n ),\n IconChevronLeft: defineAsyncComponent(\n () => import('@/icons/IconChevronLeft.vue')\n ),\n IconChevronRight: defineAsyncComponent(\n () => import('@/icons/IconChevronRight.vue')\n ),\n IconSettings: defineAsyncComponent(\n () => import('@/icons/IconSettings.vue')\n ),\n IconHome: defineAsyncComponent(() => import('@/icons/IconHome.vue')),\n IconDownload: defineAsyncComponent(\n () => import('@/icons/IconDownload.vue')\n ),\n IconRefresh: defineAsyncComponent(() => import('@/icons/IconRefresh.vue')),\n IconCopy: defineAsyncComponent(() => import('@/icons/IconCopy.vue')),\n IconEye: defineAsyncComponent(() => import('@/icons/IconEye.vue')),\n IconLock: defineAsyncComponent(() => import('@/icons/IconLock.vue')),\n IconStar: defineAsyncComponent(() => import('@/icons/IconStar.vue')),\n IconFilter: defineAsyncComponent(() => import('@/icons/IconFilter.vue')),\n IconFile: defineAsyncComponent(() => import('@/icons/IconFile.vue')),\n IconFolder: defineAsyncComponent(() => import('@/icons/IconFolder.vue')),\n IconText: defineAsyncComponent(() => import('@/icons/IconText.vue')),\n IconLink04: defineAsyncComponent(() => import('@/icons/IconLink04.vue')),\n };\n\n const LeftIconComponent = computed(() => {\n if (!props.leftIcon) return null;\n return iconComponents[props.leftIcon] || null;\n });\n\n const RightIconComponent = computed(() => {\n if (!props.rightIcon) return null;\n return iconComponents[props.rightIcon] || null;\n });\n\n const emit = defineEmits<BaseButtonEmits>();\n\n const isHovered = ref(false);\n\n const buttonClasses = computed(() => [\n 'freddy-plugins-base-button',\n `freddy-plugins-base-button--${props.size}`,\n `freddy-plugins-base-button--${props.hierarchy}`,\n {\n 'freddy-plugins-base-button--disabled': props.disabled,\n 'freddy-plugins-base-button--loading': props.loading,\n 'freddy-plugins-base-button--icon-only': props.iconOnly,\n 'freddy-plugins-base-button--error': props.errorState,\n 'freddy-plugins-base-button--hover':\n isHovered.value && !props.disabled && !props.loading,\n 'freddy-plugins-base-button--focused': props.state === 'focused',\n },\n ]);\n\n const handleClick = (event: MouseEvent) => {\n if (!props.disabled && !props.loading) {\n emit('click', event);\n }\n };\n\n const handleLeftIconClick = (event: MouseEvent) => {\n if (!props.disabled && !props.loading) {\n emit('leftIconClick', event);\n }\n };\n\n const handleRightIconClick = (event: MouseEvent) => {\n if (!props.disabled && !props.loading) {\n emit('rightIconClick', event);\n }\n };\n\n const handleMouseEnter = () => {\n isHovered.value = true;\n };\n\n const handleMouseLeave = () => {\n isHovered.value = false;\n };\n</script>\n\n<style scoped>\n .freddy-plugins-base-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n sans-serif;\n cursor: pointer;\n transition: all 0.2s ease;\n box-sizing: border-box;\n position: relative;\n outline: none;\n }\n\n /* Size specifications from Figma */\n .freddy-plugins-base-button--s {\n height: 20px;\n min-width: 20px;\n font-size: 14px;\n font-weight: 500;\n gap: 2px;\n border-radius: 4px;\n padding: 2px;\n }\n\n .freddy-plugins-base-button--sm {\n height: 28px;\n min-width: 28px;\n font-size: 14px;\n font-weight: 500;\n gap: 4px;\n border-radius: 8px;\n padding: 4px;\n }\n\n .freddy-plugins-base-button--md {\n height: 40px;\n min-width: 40px;\n font-size: 16px;\n font-weight: 500;\n gap: 4px;\n border-radius: 8px;\n padding: 4px;\n }\n\n .freddy-plugins-base-button--lg {\n height: 48px;\n min-width: 48px;\n font-size: 16px;\n font-weight: 500;\n gap: 8px;\n border-radius: 8px;\n padding: 8px;\n }\n\n .freddy-plugins-base-button--xl {\n height: 52px;\n min-width: 52px;\n font-size: 18px;\n font-weight: 500;\n gap: 10px;\n border-radius: 8px;\n padding: 12px;\n }\n\n /* Hierarchy styles */\n .freddy-plugins-base-button--primary {\n background: var(--color-primary-500, #7ba8ef);\n color: var(--text-inverse);\n border: 2px solid rgba(255, 255, 255, 0.12);\n box-shadow: inset 0px 0px 0px 1px rgba(10, 13, 18, 0.18),\n inset 0px -2px 0px 0px rgba(10, 13, 18, 0.05);\n }\n\n .freddy-plugins-base-button--primary.freddy-plugins-base-button--error {\n background: var(--color-destructive-700, #d92d20) !important;\n border-color: rgba(255, 255, 255, 0.12) !important;\n color: var(--text-inverse) !important;\n }\n\n .freddy-plugins-base-button--secondary {\n background: transparent;\n color: var(--color-primary-500, #7ba8ef);\n border: 2px solid var(--color-primary-500, #7ba8ef);\n }\n\n .freddy-plugins-base-button--secondary.freddy-plugins-base-button--error {\n background: #000000 !important;\n color: var(--color-destructive-400, #f97066) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n .freddy-plugins-base-button--tertiary {\n background: transparent;\n color: var(--text-600, #4b5563);\n border: 1px solid var(--border-200, #e5e7eb);\n }\n\n .freddy-plugins-base-button--tertiary.freddy-plugins-base-button--error {\n background: #000000 !important;\n color: var(--color-destructive-400, #f97066) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n .freddy-plugins-base-button--link {\n background: none;\n color: var(--color-primary-600, #2563eb);\n border: none;\n padding: 0;\n min-width: 0;\n min-height: 0;\n }\n\n .freddy-plugins-base-button--link.freddy-plugins-base-button--error {\n color: var(--color-destructive-500, #ef4444) !important;\n }\n\n /* Hover states */\n .freddy-plugins-base-button--primary:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-primary-600, #2563eb);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n }\n\n .freddy-plugins-base-button--secondary:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-primary-50, #eff6ff);\n }\n\n .freddy-plugins-base-button--tertiary:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--bg-100, #f3f4f6);\n }\n\n .freddy-plugins-base-button--link:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n text-decoration: underline;\n }\n\n /* Error state hover styles */\n .freddy-plugins-base-button--primary.freddy-plugins-base-button--error:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-destructive-800, #b91c1c) !important;\n border-color: rgba(255, 255, 255, 0.12) !important;\n }\n\n .freddy-plugins-base-button--secondary.freddy-plugins-base-button--error:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-destructive-900, #55160c) !important;\n color: var(--color-destructive-300, #fda29b) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n .freddy-plugins-base-button--tertiary.freddy-plugins-base-button--error:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-destructive-900, #55160c) !important;\n color: var(--color-destructive-300, #fda29b) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n /* Focus states */\n .freddy-plugins-base-button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--text-inverse),\n 0 0 0 4px var(--color-primary-500, #7ba8ef);\n }\n\n .freddy-plugins-base-button--error:focus-visible {\n box-shadow: 0 0 0 2px var(--text-inverse),\n 0 0 0 4px var(--color-destructive-500, #ef4444);\n }\n\n /* Disabled state */\n .freddy-plugins-base-button--disabled {\n opacity: 1;\n cursor: not-allowed;\n transform: none !important;\n box-shadow: none !important;\n background: rgba(42, 57, 71, 0.73) !important;\n color: #55585e !important;\n border-color: #35414b !important;\n }\n\n .freddy-plugins-base-button--disabled:hover {\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Loading state */\n .freddy-plugins-base-button--loading {\n cursor: wait;\n }\n\n .freddy-plugins-base-button--loading:hover {\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Icon only mode */\n .freddy-plugins-base-button--icon-only {\n justify-content: center;\n align-items: center;\n padding: 0;\n gap: 0;\n aspect-ratio: 1;\n }\n\n /* Icon styles */\n .freddy-plugins-button-icon {\n flex-shrink: 0;\n color: currentColor;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-button-icon-left {\n margin-right: 0;\n }\n\n .freddy-plugins-button-icon-right {\n margin-left: 0;\n }\n\n .freddy-plugins-button-icon-center {\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n /* Icon sizes based on button size */\n .freddy-plugins-button-icon--s {\n width: 16px !important;\n height: 16px !important;\n }\n\n .freddy-plugins-button-icon--sm {\n width: 20px !important;\n height: 20px !important;\n }\n\n .freddy-plugins-button-icon--md {\n width: 20px !important;\n height: 20px !important;\n }\n\n .freddy-plugins-button-icon--lg {\n width: 24px !important;\n height: 24px !important;\n }\n\n .freddy-plugins-button-icon--xl {\n width: 24px !important;\n height: 24px !important;\n }\n\n /* Icon color based on button state and hierarchy */\n .freddy-plugins-base-button--primary .freddy-plugins-button-icon {\n color: var(--text-inverse) !important;\n }\n\n .freddy-plugins-base-button--primary.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--text-inverse) !important;\n }\n\n .freddy-plugins-base-button--secondary .freddy-plugins-button-icon {\n color: var(--color-primary-500, #7ba8ef) !important;\n }\n\n .freddy-plugins-base-button--secondary.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--color-destructive-400, #f97066) !important;\n }\n\n .freddy-plugins-base-button--tertiary .freddy-plugins-button-icon {\n color: var(--text-600, #4b5563) !important;\n }\n\n .freddy-plugins-base-button--tertiary.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--color-destructive-400, #f97066) !important;\n }\n\n .freddy-plugins-base-button--link .freddy-plugins-button-icon {\n color: var(--color-primary-600, #2563eb) !important;\n }\n\n .freddy-plugins-base-button--link.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--color-destructive-500, #ef4444) !important;\n }\n\n .freddy-plugins-base-button--disabled .freddy-plugins-button-icon {\n color: var(--text-400, #9ca3af) !important;\n }\n\n .freddy-plugins-button-label {\n display: flex;\n align-items: center;\n white-space: nowrap;\n }\n\n .freddy-plugins-button-spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n min-width: 16px;\n min-height: 16px;\n border: 2px solid rgba(0, 0, 0, 0.08);\n border-top: 2px solid currentColor;\n border-radius: 50%;\n animation: freddy-plugins-base-button-spin 1s linear infinite;\n margin-right: 8px;\n vertical-align: middle;\n }\n\n @keyframes freddy-plugins-base-button-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n</style>\n","<template>\n <div :class=\"containerClasses\" :style=\"style\">\n <button\n v-for=\"provider in providers\"\n :key=\"provider\"\n :class=\"getButtonClasses(provider)\"\n :disabled=\"disabled\"\n :aria-label=\"iconOnly ? getProviderLabel(provider) : undefined\"\n role=\"button\"\n @click=\"handleClick(provider, $event)\"\n >\n <component\n :is=\"getProviderIcon(provider)\"\n class=\"freddy-plugins-social-button-icon\"\n aria-hidden=\"true\"\n />\n <span v-if=\"!iconOnly\" class=\"freddy-plugins-social-button-label\">\n {{ getProviderLabel(provider) }}\n </span>\n </button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type {\n SocialButtonGroupProps,\n SocialButtonEmits,\n SocialProvider,\n SocialProviderConfig,\n } from '@/interfaces/social-buttons.interfaces';\n import {\n IconGoogle,\n IconFacebook,\n IconApple,\n IconX,\n IconFigma,\n IconDribbble,\n } from '@/icons';\n\n const props = withDefaults(defineProps<SocialButtonGroupProps>(), {\n variant: 'filled',\n size: 'md',\n disabled: false,\n iconOnly: false,\n layout: 'horizontal',\n });\n\n const emit = defineEmits<SocialButtonEmits>();\n\n // Provider configuration mapping\n const providerConfigs: Record<SocialProvider, SocialProviderConfig> = {\n google: {\n icon: IconGoogle,\n label: 'Sign in with Google',\n colors: {\n filled: {\n background: '#ffffff',\n color: '#1f2937',\n border: '#d1d5db',\n },\n outlined: {\n background: '#ffffff',\n color: '#1f2937',\n border: '#10b981',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n facebook: {\n icon: IconFacebook,\n label: 'Sign in with Facebook',\n colors: {\n filled: {\n background: '#1877f2',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#1877f2',\n border: '#1877f2',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n apple: {\n icon: IconApple,\n label: 'Sign in with Apple',\n colors: {\n filled: {\n background: '#000000',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#000000',\n border: '#000000',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n x: {\n icon: IconX,\n label: 'Sign in with X',\n colors: {\n filled: {\n background: '#000000',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#000000',\n border: '#000000',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n figma: {\n icon: IconFigma,\n label: 'Sign in with Figma',\n colors: {\n filled: {\n background: '#000000',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#000000',\n border: '#000000',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n dribbble: {\n icon: IconDribbble,\n label: 'Sign in with Dribbble',\n colors: {\n filled: {\n background: '#ea4c89',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#ea4c89',\n border: '#ea4c89',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n };\n\n const containerClasses = computed(() => [\n 'freddy-plugins-social-buttons',\n `freddy-plugins-social-buttons--${props.layout}`,\n `freddy-plugins-social-buttons--${props.size}`,\n {\n 'freddy-plugins-social-buttons--disabled': props.disabled,\n },\n props.class,\n ]);\n\n const getProviderIcon = (provider: SocialProvider) => {\n return providerConfigs[provider].icon;\n };\n\n const getProviderLabel = (provider: SocialProvider) => {\n return providerConfigs[provider].label;\n };\n\n const getButtonClasses = (provider: SocialProvider) => {\n return [\n 'freddy-plugins-social-button',\n `freddy-plugins-social-button--${props.variant}`,\n `freddy-plugins-social-button--${props.size}`,\n `freddy-plugins-social-button--${provider}`,\n {\n 'freddy-plugins-social-button--disabled': props.disabled,\n 'freddy-plugins-social-button--icon-only': props.iconOnly,\n },\n ];\n };\n\n const handleClick = (provider: SocialProvider, event: MouseEvent) => {\n if (!props.disabled) {\n emit('click', provider, event);\n }\n };\n</script>\n\n<style scoped>\n .freddy-plugins-social-buttons {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .freddy-plugins-social-buttons--vertical {\n flex-direction: column;\n align-items: stretch;\n }\n\n .freddy-plugins-social-buttons--horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n .freddy-plugins-social-buttons--sm {\n gap: 8px;\n }\n\n .freddy-plugins-social-buttons--md {\n gap: 12px;\n }\n\n .freddy-plugins-social-buttons--lg {\n gap: 16px;\n }\n\n .freddy-plugins-social-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1px solid;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n sans-serif;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n box-sizing: border-box;\n position: relative;\n outline: none;\n text-decoration: none;\n white-space: nowrap;\n }\n\n /* Size styles */\n .freddy-plugins-social-button--sm {\n height: 32px;\n min-width: 32px;\n font-size: 14px;\n padding: 6px 12px;\n border-radius: 6px;\n gap: 6px;\n }\n\n .freddy-plugins-social-button--md {\n height: 40px;\n min-width: 40px;\n font-size: 16px;\n padding: 8px 16px;\n border-radius: 8px;\n gap: 8px;\n }\n\n .freddy-plugins-social-button--lg {\n height: 48px;\n min-width: 48px;\n font-size: 18px;\n padding: 12px 20px;\n border-radius: 8px;\n gap: 10px;\n }\n\n /* Icon only styles */\n .freddy-plugins-social-button--icon-only {\n aspect-ratio: 1;\n padding: 0;\n min-width: auto;\n }\n\n .freddy-plugins-social-button--icon-only.freddy-plugins-social-button--sm {\n width: 32px;\n height: 32px;\n }\n\n .freddy-plugins-social-button--icon-only.freddy-plugins-social-button--md {\n width: 40px;\n height: 40px;\n }\n\n .freddy-plugins-social-button--icon-only.freddy-plugins-social-button--lg {\n width: 48px;\n height: 48px;\n }\n\n /* Provider-specific filled styles */\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--google {\n background: #ffffff;\n color: #1f2937;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--facebook {\n background: #1877f2;\n color: #ffffff;\n border-color: #1877f2;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--apple {\n background: #000000;\n color: #ffffff;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--x {\n background: #000000;\n color: #ffffff;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--figma {\n background: #000000;\n color: #ffffff;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--dribbble {\n background: #ea4c89;\n color: #ffffff;\n border-color: #ea4c89;\n }\n\n /* Provider-specific outlined styles */\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--google {\n background: #ffffff;\n color: #1f2937;\n border-color: #10b981;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--facebook {\n background: #ffffff;\n color: #1877f2;\n border-color: #1877f2;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--apple {\n background: #ffffff;\n color: #000000;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--x {\n background: #ffffff;\n color: #000000;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--figma {\n background: #ffffff;\n color: #000000;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--dribbble {\n background: #ffffff;\n color: #ea4c89;\n border-color: #ea4c89;\n }\n\n /* Provider-specific ghost styles */\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--google {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--facebook {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--apple {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--x {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--figma {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--dribbble {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n /* Hover states */\n .freddy-plugins-social-button:hover:not(\n .freddy-plugins-social-button--disabled\n ) {\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--google:hover:not(\n .social-button--disabled\n ) {\n background: #f9fafb;\n border-color: #9ca3af;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--facebook:hover:not(\n .social-button--disabled\n ) {\n background: #166fe5;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--apple:hover:not(\n .social-button--disabled\n ) {\n background: #1a1a1a;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--x:hover:not(\n .social-button--disabled\n ) {\n background: #1a1a1a;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--figma:hover:not(\n .social-button--disabled\n ) {\n background: #1a1a1a;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--dribbble:hover:not(\n .social-button--disabled\n ) {\n background: #e91e63;\n }\n\n .freddy-plugins-social-button--outlined:hover:not(\n .freddy-plugins-social-button--disabled\n ) {\n background: #f9fafb;\n }\n\n .freddy-plugins-social-button--ghost:hover:not(\n .freddy-plugins-social-button--disabled\n ) {\n background: #f9fafb;\n color: #6b7280;\n }\n\n /* Focus states */\n .freddy-plugins-social-button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #3b82f6;\n }\n\n /* Disabled state */\n .freddy-plugins-social-button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n transform: none !important;\n box-shadow: none !important;\n }\n\n .freddy-plugins-social-button--disabled:hover {\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Icon styles */\n .freddy-plugins-social-button-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: currentColor;\n }\n\n /* Icon sizes based on button size */\n .freddy-plugins-social-button--sm .freddy-plugins-social-button-icon {\n width: 16px;\n height: 16px;\n }\n\n .freddy-plugins-social-button--md .freddy-plugins-social-button-icon {\n width: 20px;\n height: 20px;\n }\n\n .freddy-plugins-social-button--lg .freddy-plugins-social-button-icon {\n width: 24px;\n height: 24px;\n }\n\n .freddy-plugins-social-button-label {\n display: flex;\n align-items: center;\n white-space: nowrap;\n }\n\n /* Responsive behavior */\n @media (max-width: 640px) {\n .freddy-plugins-social-buttons--horizontal {\n flex-direction: column;\n align-items: stretch;\n }\n }\n</style>\n","<template>\n <pre><code v-html=\"highlighted\"></code></pre>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, onMounted } from \"vue\";\n\nconst props = defineProps<{\n code: string;\n language: string;\n}>();\n\nconst theme = \"nord\";\nconst highlighted = ref(\"\");\nlet highlighter: any = null;\nlet createHighlighter: any = null;\n\n// Load shiki dependency asynchronously\nconst loadShiki = async () => {\n try {\n // Check if shiki is available globally first\n if (typeof window !== \"undefined\" && (window as any).shiki) {\n createHighlighter = (window as any).shiki.createHighlighter;\n return;\n }\n\n // For web components, shiki should be provided externally\n // Don't use dynamic import as it causes bundling issues\n console.warn(\"Shiki not available - using plain text fallback\");\n } catch {\n // shiki not available - will use plain text fallback\n }\n};\n\nconst supportedLangs = [\n \"js\",\n \"ts\",\n \"json\",\n \"python\",\n \"vue\",\n \"html\",\n \"css\",\n \"scss\",\n \"bash\",\n \"yaml\",\n \"markdown\",\n \"c\",\n \"cpp\",\n \"java\",\n \"go\",\n \"php\",\n \"ruby\",\n \"rust\",\n \"swift\",\n \"kotlin\",\n];\n\nconst highlightCode = async () => {\n // Ensure shiki is loaded\n if (!createHighlighter) {\n await loadShiki();\n }\n\n // If shiki is still not available, use plain text\n if (!createHighlighter) {\n highlighted.value = `<pre><code>${props.code\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")}</code></pre>`;\n return;\n }\n\n try {\n if (!highlighter) {\n highlighter = await createHighlighter({\n themes: [theme],\n langs: supportedLangs,\n });\n }\n highlighted.value = highlighter.codeToHtml(props.code, {\n lang: props.language,\n theme,\n });\n } catch (e) {\n // fallback: plain text\n highlighted.value = `<pre><code>${props.code\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")}</code></pre>`;\n }\n};\n\nwatch(() => [props.code, props.language], highlightCode, { immediate: true });\nonMounted(highlightCode);\n</script>\n\n<style>\npre,\ncode,\n.shiki {\n background: transparent !important;\n}\npre {\n font-family: \"Fira Mono\", \"Menlo\", \"Monaco\", \"Consolas\", \"Liberation Mono\",\n \"Courier New\", monospace;\n font-size: 14px;\n line-height: 1.6;\n padding: 16px;\n border-radius: 8px;\n overflow-x: auto;\n}\n</style>\n","<template>\n <label\n class=\"freddy-plugins-base-checkbox\"\n :class=\"{\n 'freddy-plugins-checked': isChecked && !blueCheckbox,\n 'freddy-plugins-checked-blue': isChecked && blueCheckbox,\n 'freddy-plugins-not-checked': !isChecked,\n 'freddy-plugins-is-disabled': disabled,\n }\"\n :aria-checked=\"isChecked\"\n :aria-disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n role=\"checkbox\"\n >\n <input\n id=\"checkbox-input\"\n type=\"checkbox\"\n class=\"freddy-plugins-checkbox-input\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n @change=\"onChange\"\n />\n <span v-if=\"isDashInput && isChecked\" class=\"freddy-plugins-checkbox-dash\"></span>\n <svg\n v-else-if=\"isChecked && !isDashInput\"\n class=\"freddy-plugins-checkbox-icon\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10 3L4.5 8.5L2 6\"\n :stroke=\"blueCheckbox ? 'var(--text-50, var(--text-inverse))' : '#000'\"\n stroke-width=\"1.6666\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </label>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\nconst props = defineProps<{\n isChecked: boolean;\n isDashInput?: boolean;\n blueCheckbox?: boolean;\n disabled?: boolean;\n ariaLabel?: string;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update:isChecked\", value: boolean): void;\n}>();\n\nfunction onChange(event: Event) {\n const target = event.target as HTMLInputElement;\n if (!props.disabled) {\n emit(\"update:isChecked\", target.checked);\n }\n}\n</script>\n\n<style>\n.freddy-plugins-base-checkbox {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border-radius: 4px;\n border: 2px solid currentColor;\n cursor: pointer;\n transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;\n user-select: none;\n}\n\n.freddy-plugins-checked {\n background-color: var(--freddy-text-primary);\n border-color: transparent;\n}\n\n.freddy-plugins-checked-blue {\n background-color: #7ba8ef;\n border-color: transparent;\n}\n\n.freddy-plugins-not-checked {\n background-color: transparent;\n border-color: currentColor;\n}\n\n.freddy-plugins-checkbox-input {\n position: absolute;\n opacity: 0;\n pointer-events: none;\n}\n\n.freddy-plugins-checkbox-dash {\n width: 8px;\n height: 2px;\n background-color: var(--freddy-text-primary);\n border-radius: 1px;\n}\n\n.freddy-plugins-checkbox-icon {\n width: 16px;\n height: 16px;\n pointer-events: none;\n}\n\n.freddy-plugins-is-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n</style>\n","<template>\n <div\n ref=\"tooltipWrapper\"\n class=\"freddy-plugins-tooltip-v2-wrapper\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @focusin=\"handleFocusIn\"\n @focusout=\"handleFocusOut\"\n tabindex=\"0\"\n >\n <slot />\n <transition name=\"fade\">\n <div\n v-if=\"show\"\n ref=\"tooltipContent\"\n class=\"freddy-plugins-tooltip-v2-content\"\n :class=\"[shouldShowBelow ? 'bottom' : 'top', contentClass]\"\n role=\"tooltip\"\n :aria-label=\"title\"\n >\n <div class=\"freddy-plugins-tooltip-v2-arrow\"></div>\n <slot name=\"content\">\n <div\n v-if=\"title || description\"\n class=\"freddy-plugins-tooltip-v2-inner\"\n >\n <div\n v-if=\"title\"\n class=\"freddy-plugins-tooltip-v2-title\"\n v-html=\"title\"\n ></div>\n <div\n v-if=\"description\"\n class=\"freddy-plugins-tooltip-v2-description\"\n v-html=\"description\"\n ></div>\n </div>\n </slot>\n </div>\n </transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n\n interface TooltipV2Props {\n /** The title to display at the top of the tooltip (supports HTML) */\n title?: string;\n /** The description to display below the title (supports HTML) */\n description?: string;\n /** The placement of the tooltip relative to the trigger element */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Custom CSS class to apply to the tooltip content */\n contentClass?: string;\n /** Delay before showing the tooltip (in milliseconds) */\n delay?: number;\n /** Delay before hiding the tooltip (in milliseconds) */\n hideDelay?: number;\n }\n\n const props = withDefaults(defineProps<TooltipV2Props>(), {\n placement: 'top',\n delay: 200,\n hideDelay: 0,\n });\n\n const show = ref(false);\n const shouldShowBelow = ref(false);\n const tooltipWrapper = ref<HTMLElement | null>(null);\n const tooltipContent = ref<HTMLElement | null>(null);\n let showTimeout: ReturnType<typeof setTimeout> | null = null;\n let hideTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const calculateBestPosition = () => {\n if (!tooltipWrapper.value) return;\n\n const rect = tooltipWrapper.value.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const tooltipHeight = 250; // Approximate tooltip height with padding\n\n // Calculate available space above and below\n const spaceTop = rect.top;\n const spaceBottom = viewportHeight - rect.bottom;\n\n // Simple logic: show below if there's more space below OR not enough space above\n // This ensures it shows below when at the top of the screen\n if (spaceBottom >= tooltipHeight || spaceBottom > spaceTop) {\n shouldShowBelow.value = true;\n } else {\n shouldShowBelow.value = false;\n }\n };\n\n const handleMouseEnter = () => {\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n hideTimeout = null;\n }\n if (showTimeout) clearTimeout(showTimeout);\n showTimeout = setTimeout(() => {\n calculateBestPosition();\n show.value = true;\n }, props.delay);\n };\n\n const handleMouseLeave = () => {\n if (showTimeout) {\n clearTimeout(showTimeout);\n showTimeout = null;\n }\n hideTimeout = setTimeout(() => {\n show.value = false;\n }, props.hideDelay);\n };\n\n const handleFocusIn = () => {\n handleMouseEnter();\n };\n\n const handleFocusOut = () => {\n handleMouseLeave();\n };\n</script>\n\n<style scoped>\n .freddy-plugins-tooltip-v2-wrapper {\n display: inline-block;\n position: relative;\n }\n\n .freddy-plugins-tooltip-v2-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n z-index: 1;\n }\n\n .freddy-plugins-tooltip-v2-content {\n position: absolute;\n z-index: 1000;\n background-color: var(--freddy-bg-tertiary, #535862);\n color: var(--freddy-text-primary);\n font-size: var(--freddy-font-size-sm, 14px);\n padding: 12px 16px;\n border-radius: var(--freddy-radius-md, 8px);\n border: 1px solid var(--freddy-border-primary, rgba(148, 163, 184, 0.2));\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3),\n 0 2px 4px -1px rgba(0, 0, 0, 0.2);\n white-space: normal;\n max-width: 380px;\n min-width: 200px;\n pointer-events: none;\n line-height: 1.5;\n word-wrap: break-word;\n word-break: break-word;\n left: 50%;\n transform: translateX(-50%);\n bottom: calc(100% + 12px);\n }\n\n .freddy-plugins-tooltip-v2-inner {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .freddy-plugins-tooltip-v2-title {\n font-weight: 600;\n font-size: 14px;\n color: var(--freddy-text-primary, #ffff);\n line-height: 1.5;\n margin-bottom: 4px;\n }\n\n .freddy-plugins-tooltip-v2-description {\n font-weight: 400;\n font-size: 13px;\n color: var(--freddy-text-secondary, #cbd5e1);\n line-height: 1.6;\n }\n\n /* Position modifiers */\n .freddy-plugins-tooltip-v2-content.top {\n bottom: calc(100% + 12px);\n top: auto;\n }\n\n .freddy-plugins-tooltip-v2-content.top .freddy-plugins-tooltip-v2-arrow {\n bottom: -6px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 6px 6px 0 6px;\n border-color: var(--freddy-bg-tertiary, #535862) transparent transparent\n transparent;\n }\n\n .freddy-plugins-tooltip-v2-content.bottom {\n top: calc(100% + 12px);\n bottom: auto;\n }\n\n .freddy-plugins-tooltip-v2-content.bottom .freddy-plugins-tooltip-v2-arrow {\n top: -6px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 0 6px 6px 6px;\n border-color: transparent transparent var(--freddy-bg-tertiary, #535862)\n transparent;\n }\n\n .freddy-plugins-tooltip-v2-content.left {\n left: auto;\n right: calc(100% + 12px);\n top: 50%;\n bottom: auto;\n transform: translateY(-50%);\n }\n\n .freddy-plugins-tooltip-v2-content.right {\n left: calc(100% + 12px);\n right: auto;\n top: 50%;\n bottom: auto;\n transform: translateY(-50%);\n }\n\n .fade-enter-active,\n .fade-leave-active {\n transition: opacity 0.15s ease-in-out;\n }\n\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n }\n</style>\n","/**\n * AI Text Service for intelligent text editing and generation\n * Provides smart content detection to avoid unnecessary greetings and responses\n */\n\nimport type {\n IAITextRequest,\n IAITextResponse,\n IAITextApiResponse,\n} from '@/interfaces';\n\n// Re-export for backward compatibility\nexport type AITextRequest = IAITextRequest;\nexport type AITextResponse = IAITextResponse;\n\nexport interface OpenAIResponse {\n choices: Array<{\n message: {\n content: string;\n role: string;\n };\n }>;\n usage?: {\n prompt_tokens: number;\n completion_tokens: number;\n total_tokens: number;\n };\n}\n\nclass AITextService {\n private apiKey: string | null = null;\n private baseUrl = 'https://api.openai.com/v1';\n\n constructor(apiKey?: string) {\n this.apiKey =\n apiKey ||\n this.getApiKeyFromEnv() ||\n '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';\n }\n\n private getApiKeyFromEnv(): string | null {\n // Try to get from environment variables or local storage\n // if (typeof window !== 'undefined') {\n // return localStorage.getItem('openai_api_key') || null;\n // }\n return process.env.OPENAI_API_KEY || null;\n }\n\n /**\n * Set the OpenAI API key\n */\n setApiKey(apiKey: string): void {\n this.apiKey = apiKey;\n // if (typeof window !== 'undefined') {\n // localStorage.setItem('openai_api_key', apiKey);\n // }\n }\n\n /**\n * Smart system prompt that determines action and provides contextual responses\n */\n private getSmartSystemPrompt(): string {\n return `You are an AI assistant that helps with text editing, code improvement, and content generation. You excel at working with JavaScript, HTML, CSS, JSON, and all programming languages. Analyze the user's request and respond with the appropriate action.\n\nRESPONSE RULES:\n- NEVER use greetings, pleasantries, or filler phrases\n- Get straight to the content the user needs\n- Be direct and focused on the task\n- Handle code with proper syntax and formatting\n- Preserve indentation and code structure\n- When working with JavaScript, consider modern ES6+ features and best practices\n\nRESPONSE FORMATS:\n\nFor text/code editing/improvement (when user wants to change existing content):\nReturn JSON: {\n \"action\": \"replace\",\n \"hasChanges\": true,\n \"improvedText\": \"the improved version with proper formatting\",\n \"changeDescription\": \"brief description of changes made\"\n}\nIMPORTANT: When improving existing content, ALWAYS use \"replace\" action with \"hasChanges\": true\n\nFor text/code continuation/expansion (when user wants to add to existing content):\nReturn JSON: {\n \"action\": \"complete\",\n \"content\": \"the continuation text or code\",\n \"hasChanges\": false\n}\n\nFor discussion/questions about text or code:\nReturn JSON: {\n \"action\": \"chat\",\n \"content\": \"your response to their question\",\n \"hasChanges\": false\n}\n\nIMPORTANT:\n- Always respond with valid JSON in one of these formats\n- The textBoxContent represents the current text/code the user is working with\n- When improving JavaScript code, ensure proper syntax, variable naming, and modern practices\n- Escape special characters properly in JSON responses\n- Maintain original code formatting and style when possible`;\n }\n\n /**\n * Analyze user input to determine the type of request\n */\n private analyzeRequest(\n userQuestion: string,\n textBoxContent?: string\n ): {\n isEdit: boolean;\n isGeneration: boolean;\n needsStructuredResponse: boolean;\n } {\n const question = userQuestion.toLowerCase();\n const hasExistingText = textBoxContent && textBoxContent.trim().length > 0;\n\n // Keywords that indicate editing\n const editKeywords = [\n 'edit',\n 'improve',\n 'fix',\n 'correct',\n 'rewrite',\n 'revise',\n 'polish',\n 'enhance',\n ];\n const isEdit = Boolean(\n hasExistingText &&\n editKeywords.some(keyword => question.includes(keyword))\n );\n\n // Keywords that indicate generation\n const generateKeywords = [\n 'write',\n 'create',\n 'generate',\n 'compose',\n 'draft',\n ];\n const isGeneration = Boolean(\n generateKeywords.some(keyword => question.includes(keyword))\n );\n\n // Determine if we need structured response (for significant changes)\n const needsStructuredResponse =\n isEdit &&\n (question.includes('significant') ||\n question.includes('major') ||\n question.includes('restructure') ||\n question.includes('rewrite'));\n\n return { isEdit, isGeneration, needsStructuredResponse };\n }\n\n /**\n * Create optimized prompt based on request analysis\n */\n private createPrompt(\n userQuestion: string,\n textBoxContent?: string\n ): Array<{\n role: string;\n content: any;\n }> {\n const analysis = this.analyzeRequest(userQuestion, textBoxContent);\n\n const messages: Array<{ role: string; content: any }> = [\n {\n role: 'system',\n content: this.getSmartSystemPrompt(),\n },\n ];\n\n // Build user message content\n const userContentParts: Array<{ type: string; text: string }> = [];\n\n if (textBoxContent && textBoxContent.trim()) {\n userContentParts.push({\n type: 'text',\n text: `Current text: ${textBoxContent.trim()}`,\n });\n }\n\n userContentParts.push({\n type: 'text',\n text: userQuestion,\n });\n\n // Add specific instructions based on analysis\n if (analysis.needsStructuredResponse) {\n userContentParts.push({\n type: 'text',\n text: 'Please respond with JSON format including change details and statistics.',\n });\n } else if (analysis.isEdit) {\n userContentParts.push({\n type: 'text',\n text: 'Provide only the improved text without explanations.',\n });\n }\n\n messages.push({\n role: 'user',\n content: userContentParts,\n });\n\n return messages;\n }\n\n /**\n * Create payload for the newer responses API\n */\n private createResponsesPayload(\n userQuestion: string,\n textBoxContent?: string\n ) {\n const input = [\n {\n role: 'system',\n content: this.getSmartSystemPrompt(),\n },\n {\n role: 'user',\n content: [\n {\n type: 'text',\n text: textBoxContent\n ? `Existing text: ${textBoxContent}`\n : 'No existing text.',\n },\n {\n type: 'text',\n text: userQuestion,\n },\n ],\n },\n ];\n\n return {\n model: 'gpt-4o-mini',\n input: input,\n temperature: 0.7,\n };\n }\n\n /**\n * Calculate basic statistics for text changes\n */\n private calculateStats(\n original: string,\n improved: string\n ): { added: number; removed: number } {\n const originalWords = original\n .trim()\n .split(/\\s+/)\n .filter(word => word.length > 0);\n const improvedWords = improved\n .trim()\n .split(/\\s+/)\n .filter(word => word.length > 0);\n\n const added = Math.max(0, improvedWords.length - originalWords.length);\n const removed = Math.max(0, originalWords.length - improvedWords.length);\n\n return { added, removed };\n }\n\n /**\n * Process the AI response and format it appropriately\n */\n private processResponse(\n response: string,\n userQuestion: string,\n originalText?: string\n ): AITextResponse {\n try {\n console.log('🔍 Processing AI Response:', response);\n // Try to parse as JSON first (for structured responses)\n const jsonResponse = JSON.parse(response);\n console.log('📋 Parsed JSON Response:', jsonResponse);\n\n // Handle new action-based format\n if (jsonResponse.action) {\n switch (jsonResponse.action) {\n case 'replace':\n const stats =\n originalText && jsonResponse.improvedText\n ? this.calculateStats(originalText, jsonResponse.improvedText)\n : jsonResponse.stats || { added: 0, removed: 0 };\n\n console.log(\n '✅ Replace action detected - will show Accept/Deny buttons'\n );\n return {\n success: true,\n content: jsonResponse.improvedText,\n hasChanges: true,\n action: 'replace',\n changeTitle: jsonResponse.changeTitle || 'Text Replacement',\n changeDescription:\n jsonResponse.changeDescription || 'Text has been improved',\n improvedText: jsonResponse.improvedText,\n stats,\n };\n\n case 'complete':\n return {\n success: true,\n content: jsonResponse.content,\n hasChanges: false,\n action: 'complete',\n };\n\n case 'chat':\n return {\n success: true,\n content: jsonResponse.content,\n hasChanges: false,\n action: 'chat',\n };\n }\n }\n\n // Legacy format support\n if (jsonResponse.hasChanges && jsonResponse.improvedText) {\n const stats = originalText\n ? this.calculateStats(originalText, jsonResponse.improvedText)\n : { added: 0, removed: 0 };\n\n return {\n success: true,\n content: jsonResponse.improvedText,\n hasChanges: true,\n action: 'replace',\n changeTitle: jsonResponse.changeTitle || 'Text Improvement',\n changeDescription:\n jsonResponse.changeDescription || 'Text has been improved',\n improvedText: jsonResponse.improvedText,\n stats,\n };\n }\n\n // Fallback: treat as plain text response\n // If there's existing text, always treat as replace to show Accept/Deny buttons\n if (originalText && jsonResponse.content) {\n console.log(\n '🔄 Fallback: Treating as replace action for existing content'\n );\n const stats = this.calculateStats(originalText, jsonResponse.content);\n return {\n success: true,\n content: jsonResponse.content,\n hasChanges: true,\n action: 'replace',\n changeTitle: 'AI Response',\n changeDescription: 'AI has provided a response to your request',\n improvedText: jsonResponse.content,\n stats,\n };\n }\n\n return {\n success: true,\n content: jsonResponse.content || response,\n hasChanges: false,\n action: 'chat',\n };\n } catch {\n // Handle as plain text response - simple fallback\n return {\n success: true,\n content: response,\n hasChanges: false,\n action: 'chat',\n };\n }\n }\n\n /**\n * Main method to ask AI for text editing or generation\n */\n async askAI(\n userQuestion: string,\n textBoxContent?: string\n ): Promise<AITextResponse> {\n if (!this.apiKey) {\n return {\n success: false,\n error:\n 'OpenAI API key is not configured. Please set your API key first.',\n };\n }\n\n if (!userQuestion.trim()) {\n return {\n success: false,\n error: 'User question cannot be empty.',\n };\n }\n\n try {\n const userContent = textBoxContent\n ? `Existing content:\\n\\`\\`\\`\\n${textBoxContent}\\n\\`\\`\\`\\n\\nUser request: ${userQuestion}`\n : userQuestion;\n\n const payload = {\n model: 'gpt-4o-mini',\n input: [\n {\n role: 'system',\n content: this.getSmartSystemPrompt(),\n },\n {\n role: 'user',\n content: userContent,\n },\n ],\n temperature: 0.7,\n };\n\n console.log('🚀 AITextService: Making request to OpenAI responses API');\n console.log('📡 Endpoint:', `${this.baseUrl}/responses`);\n console.log('📦 Payload:', payload);\n\n const response = await fetch(`${this.baseUrl}/responses`, {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${this.apiKey}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n console.log('📨 Response status:', response.status);\n console.log(\n '📨 Response headers:',\n Object.fromEntries(response.headers.entries())\n );\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n console.error('❌ API Error Details:', {\n status: response.status,\n statusText: response.statusText,\n errorData,\n apiKey: this.apiKey ? `${this.apiKey.substring(0, 10)}...` : 'null',\n headers: Object.fromEntries(response.headers.entries()),\n });\n return {\n success: false,\n error:\n errorData.error?.message ||\n `API request failed with status ${response.status}: ${response.statusText}`,\n };\n }\n\n const data = await response.json();\n console.log('📦 Full API Response:', JSON.stringify(data, null, 2));\n\n // Handle OpenAI Responses API format\n const aiResponse = data.output?.[0]?.content?.[0]?.text;\n\n if (!aiResponse) {\n return {\n success: false,\n error: 'No response received from AI',\n };\n }\n\n return this.processResponse(aiResponse, userQuestion, textBoxContent);\n } catch (error) {\n console.error('AI Text Service Error:', error);\n return {\n success: false,\n error:\n error instanceof Error\n ? error.message\n : 'An unexpected error occurred',\n };\n }\n }\n\n /**\n * Check if the service is properly configured\n */\n isConfigured(): boolean {\n return !!this.apiKey;\n }\n\n /**\n * Get current API key status (without exposing the key)\n */\n getStatus(): { configured: boolean; keyLength?: number } {\n return {\n configured: this.isConfigured(),\n keyLength: this.apiKey?.length,\n };\n }\n}\n\n// Export class and singleton instance\nexport { AITextService };\nexport const aiTextService = new AITextService(\n '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'\n);\nexport default aiTextService;\n","<template>\n <div class=\"freddy-plugins-simple-chat-interface\">\n <!-- Messages Container -->\n <div ref=\"messagesContainer\" class=\"freddy-plugins-chat-messages\">\n <!-- Chat Messages -->\n <div class=\"freddy-plugins-messages-list\">\n <div\n v-for=\"message in messages\"\n :key=\"message.id\"\n :class=\"['freddy-plugins-message', message.sender]\"\n >\n <!-- User Messages -->\n <div\n v-if=\"message.sender === 'user'\"\n class=\"freddy-plugins-user-message-container\"\n >\n <div class=\"freddy-plugins-user-bubble\">\n {{ message.content }}\n </div>\n <div class=\"freddy-plugins-user-actions\">\n <button class=\"freddy-plugins-action-btn\" title=\"Copy\">\n <IconCopy class=\"freddy-plugins-action-icon\" />\n </button>\n <button class=\"freddy-plugins-action-btn\" title=\"Edit\">\n <IconEdit class=\"freddy-plugins-action-icon\" />\n </button>\n </div>\n </div>\n\n <!-- Assistant Messages -->\n <div v-else class=\"freddy-plugins-assistant-message-container\">\n <div class=\"freddy-plugins-assistant-content\">\n <p class=\"freddy-plugins-assistant-text\">{{ message.content }}</p>\n\n <!-- Changes Card -->\n <div v-if=\"message.changes\" class=\"freddy-plugins-changes-card\">\n <div class=\"freddy-plugins-changes-header\">\n <div class=\"freddy-plugins-header-left\">\n <IconFile class=\"freddy-plugins-building-icon\" />\n <span class=\"freddy-plugins-change-title\">{{\n message.changes.title || 'Instructions'\n }}</span>\n <span\n v-if=\"message.changes.added > 0\"\n class=\"freddy-plugins-stat-added\"\n >+{{ message.changes.added }}</span\n >\n <span\n v-if=\"message.changes.removed > 0\"\n class=\"freddy-plugins-stat-removed\"\n >-{{ message.changes.removed }}</span\n >\n <span class=\"freddy-plugins-changes-applied\"\n >Changes applied</span\n >\n </div>\n </div>\n\n <div class=\"freddy-plugins-changes-content\">\n <div class=\"freddy-plugins-content-header\">\n <span class=\"freddy-plugins-content-title\"\n >Instructions</span\n >\n </div>\n <p class=\"freddy-plugins-content-description\">\n {{ message.changes.description }}\n </p>\n <!-- Show Accept/Deny buttons only if not applied -->\n <div\n v-if=\"!message.applied\"\n class=\"freddy-plugins-content-actions\"\n >\n <button\n class=\"freddy-plugins-accept-btn\"\n @click=\"handleAcceptChanges(message)\"\n >\n <IconCheckRounded class=\"freddy-plugins-btn-icon\" />\n Accept\n </button>\n <button\n class=\"freddy-plugins-deny-btn\"\n @click=\"handleDenyChanges(message)\"\n >\n <IconCross class=\"freddy-plugins-btn-icon\" />\n Deny\n </button>\n </div>\n\n <!-- Show simple Applied label if applied -->\n <div v-else class=\"freddy-plugins-applied-label\">\n <IconCheckRounded class=\"freddy-plugins-applied-icon\" />\n Applied\n </div>\n </div>\n </div>\n\n <div class=\"freddy-plugins-assistant-actions\">\n <button class=\"freddy-plugins-action-btn\" title=\"Refresh\">\n <IconRefresh class=\"freddy-plugins-action-icon\" />\n </button>\n <button class=\"freddy-plugins-action-btn\" title=\"Copy\">\n <IconCopy class=\"freddy-plugins-action-icon\" />\n </button>\n <button class=\"freddy-plugins-action-btn\" title=\"Thumbs down\">\n <IconThumbsDown class=\"freddy-plugins-action-icon\" />\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- AI Processing Indicator -->\n <div v-if=\"isProcessing\" class=\"freddy-plugins-processing-indicator\">\n <div class=\"freddy-plugins-processing-content\">\n <div class=\"freddy-plugins-processing-spinner\"></div>\n <span class=\"freddy-plugins-processing-text\"\n >AI is processing your request...</span\n >\n </div>\n </div>\n </div>\n\n <!-- Input Area -->\n <div class=\"freddy-plugins-chat-input-area\">\n <button class=\"freddy-plugins-folder-btn\">\n <IconFolder class=\"freddy-plugins-folder-icon\" />\n </button>\n <textarea\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :placeholder=\"placeholder || 'Type here...'\"\n class=\"freddy-plugins-chat-input\"\n rows=\"1\"\n @keydown.enter.exact.prevent=\"handleSend\"\n @keydown.enter.shift.exact=\"handleNewLine\"\n @input=\"adjustTextareaHeight\"\n />\n <button\n class=\"freddy-plugins-send-button\"\n :disabled=\"!inputValue.trim()\"\n @click=\"handleSend\"\n >\n <IconPaperAirPlane class=\"freddy-plugins-send-icon\" />\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, nextTick, watch } from 'vue';\n import {\n IconPaperAirPlane,\n IconCheckRounded,\n IconCross,\n IconFile,\n IconCopy,\n IconEdit,\n IconRefresh,\n IconFolder,\n IconThumbsDown,\n } from '@/icons';\n import {\n parseApiResponse,\n getDisplayContent,\n createChangesObject,\n } from '@/helpers';\n import { aiTextService } from '@/services';\n\n import type { IChatMessage } from '@/interfaces';\n\n const props = defineProps<{\n placeholder?: string;\n messages?: IChatMessage[];\n enableAI?: boolean;\n openaiApiKey?: string;\n textBoxContent?: string;\n }>();\n\n const emit = defineEmits<{\n send: [message: string];\n acceptChanges: [message: IChatMessage];\n denyChanges: [message: IChatMessage];\n textReplacement: [\n data: { original?: string; improved: string; stats?: any }\n ];\n textCompletion: [data: { original?: string; completion: string }];\n }>();\n\n const inputValue = ref('');\n const messagesContainer = ref<HTMLElement | null>(null);\n const inputRef = ref<HTMLTextAreaElement | null>(null);\n\n const messages = ref<IChatMessage[]>(props.messages || []);\n const isProcessing = ref(false);\n\n // Initialize AI service with API key if provided\n if (props.openaiApiKey) {\n aiTextService.setApiKey(props.openaiApiKey);\n }\n\n // Watch for prop changes\n watch(\n () => props.messages,\n newMessages => {\n if (newMessages) {\n messages.value = newMessages;\n scrollToBottom();\n }\n }\n );\n\n // Watch for API key changes\n watch(\n () => props.openaiApiKey,\n newApiKey => {\n if (newApiKey) {\n aiTextService.setApiKey(newApiKey);\n }\n }\n );\n\n // Helper functions for action-based responses\n const getActionTitle = (action?: string): string => {\n switch (action) {\n case 'replace':\n return 'Text Replacement';\n case 'complete':\n return 'Text Completion';\n case 'chat':\n return 'AI Response';\n default:\n return 'Text Improvement';\n }\n };\n\n const getActionDescription = (action?: string): string => {\n switch (action) {\n case 'replace':\n return 'Your text has been improved and replaced';\n case 'complete':\n return 'Your text has been continued';\n case 'chat':\n return 'AI provided a conversational response';\n default:\n return 'Text has been improved';\n }\n };\n\n const processWithAI = async (userMessage: string) => {\n if (!aiTextService.isConfigured()) {\n const errorMessage: IChatMessage = {\n id: Date.now().toString(),\n content:\n 'AI service is not configured. Please provide an OpenAI API key.',\n sender: 'assistant',\n timestamp: new Date(),\n };\n messages.value.push(errorMessage);\n scrollToBottom();\n return;\n }\n\n isProcessing.value = true;\n\n try {\n const response = await aiTextService.askAI(\n userMessage,\n props.textBoxContent\n );\n\n if (response.success && response.content) {\n const aiMessage: IChatMessage = {\n id: Date.now().toString(),\n content: response.content,\n sender: 'assistant',\n timestamp: new Date(),\n applied: false, // Explicitly set to false for new messages\n changes: response.hasChanges\n ? {\n title: response.changeTitle || getActionTitle(response.action),\n description:\n response.changeDescription ||\n getActionDescription(response.action),\n added: response.stats?.added || 0,\n removed: response.stats?.removed || 0,\n data: {\n originalText: props.textBoxContent,\n improvedText: response.improvedText || response.content,\n action: response.action,\n },\n }\n : undefined,\n };\n\n messages.value.push(aiMessage);\n console.log('📝 New AI message created:', {\n id: aiMessage.id,\n applied: aiMessage.applied,\n hasChanges: !!aiMessage.changes,\n action: aiMessage.changes?.data?.action,\n });\n scrollToBottom();\n\n // Note: Text replacement events are now only emitted when user accepts changes\n // This prevents premature text updates before user confirmation\n } else {\n const errorMessage: IChatMessage = {\n id: Date.now().toString(),\n content:\n response.error ||\n 'Failed to process your request. Please try again.',\n sender: 'assistant',\n timestamp: new Date(),\n };\n messages.value.push(errorMessage);\n scrollToBottom();\n }\n } catch (error) {\n console.error('AI processing error:', error);\n const errorMessage: IChatMessage = {\n id: Date.now().toString(),\n content: 'An unexpected error occurred while processing your request.',\n sender: 'assistant',\n timestamp: new Date(),\n };\n messages.value.push(errorMessage);\n scrollToBottom();\n } finally {\n isProcessing.value = false;\n }\n };\n\n const handleSend = async () => {\n const message = inputValue.value.trim();\n if (!message) return;\n\n // Add user message\n const userMessage: IChatMessage = {\n id: Date.now().toString(),\n content: message,\n sender: 'user',\n timestamp: new Date(),\n };\n\n messages.value.push(userMessage);\n emit('send', message);\n\n inputValue.value = '';\n adjustTextareaHeight();\n scrollToBottom();\n\n // Process with AI if enabled\n if (props.enableAI) {\n await processWithAI(message);\n }\n };\n\n const handleNewLine = () => {\n inputValue.value += '\\n';\n adjustTextareaHeight();\n };\n\n const adjustTextareaHeight = () => {\n nextTick(() => {\n if (inputRef.value) {\n inputRef.value.style.height = 'auto';\n inputRef.value.style.height =\n Math.min(inputRef.value.scrollHeight, 120) + 'px';\n }\n });\n };\n\n const scrollToBottom = () => {\n nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop =\n messagesContainer.value.scrollHeight;\n }\n });\n };\n\n const formatMessage = (content: string): string => {\n // Simple formatting for messages\n return content\n .replace(/\\n/g, '<br>')\n .replace(/\\*\\*(.*?)\\*\\*/g, '<strong>$1</strong>')\n .replace(/\\*(.*?)\\*/g, '<em>$1</em>')\n .replace(/`(.*?)`/g, '<code>$1</code>');\n };\n\n const formatTime = (timestamp: Date): string => {\n return timestamp.toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n };\n\n const handleAcceptChanges = (message: IChatMessage) => {\n console.log('🔄 Before accept - message.applied:', message.applied);\n\n // Emit the event for parent component to handle the actual text replacement\n // The parent will mark it as applied after successfully applying changes\n emit('acceptChanges', message);\n\n console.log('📤 Accept event emitted for message:', message.id);\n };\n\n const handleDenyChanges = (message: IChatMessage) => {\n // Mark the message as denied (remove changes UI)\n if (message.changes) {\n message.changes = undefined;\n }\n\n emit('denyChanges', message);\n\n console.log('❌ Changes denied for message:', message.id);\n };\n\n // Method to add AI response from API data (called from parent)\n const addAIResponseFromApi = (apiResponse: any) => {\n const parsed = parseApiResponse(apiResponse);\n const displayContent = getDisplayContent(parsed);\n const changes = createChangesObject(parsed);\n\n const aiMessage: IChatMessage = {\n id: Date.now().toString(),\n content: displayContent,\n sender: 'assistant',\n timestamp: new Date(),\n applied: false, // Explicitly set to false for new messages\n changes,\n };\n\n messages.value.push(aiMessage);\n scrollToBottom();\n };\n\n // Method to add AI response (called from parent) - legacy method\n const addAIResponse = (\n content: string,\n changes?: {\n title?: string;\n description: string;\n added: number;\n removed: number;\n data?: any;\n }\n ) => {\n const aiMessage: IChatMessage = {\n id: Date.now().toString(),\n content,\n sender: 'assistant',\n timestamp: new Date(),\n changes,\n };\n\n messages.value.push(aiMessage);\n scrollToBottom();\n };\n\n // Expose methods to parent\n defineExpose({\n addAIResponse,\n addAIResponseFromApi,\n });\n</script>\n\n<style>\n /* Figma Design Tokens */\n .freddy-plugins-simple-chat-interface {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n background-color: #071a2b; /* bg-secondary from Figma */\n gap: 10px;\n overflow: hidden;\n }\n\n /* Messages Container */\n .freddy-plugins-chat-messages {\n overflow-y: auto;\n height: calc(100% - 24px);\n display: flex;\n flex-direction: column;\n }\n\n .freddy-plugins-messages-list {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n\n .freddy-plugins-message {\n display: flex;\n width: 100%;\n }\n\n /* User Messages - Aligned Right */\n .freddy-plugins-user-message-container {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 2px;\n margin-left: auto;\n max-width: 80%;\n }\n\n .freddy-plugins-user-bubble {\n background-color: #555555; /* bg-transparent-grey from Figma */\n color: #ffffff;\n padding: 6px;\n border-radius: 8px 8px 5px 8px;\n font-family: 'Inter', sans-serif;\n font-size: 17px;\n font-weight: 500;\n line-height: normal;\n word-wrap: break-word;\n }\n\n .freddy-plugins-user-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n\n .freddy-plugins-action-btn {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n border-radius: 4px;\n padding: 2px;\n cursor: pointer;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),\n 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18);\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .freddy-plugins-action-icon {\n width: 16px;\n height: 16px;\n color: #94979c;\n }\n\n /* Assistant Messages - Aligned Left */\n .freddy-plugins-assistant-message-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-right: auto;\n max-width: 80%;\n }\n\n .freddy-plugins-assistant-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n }\n\n .freddy-plugins-assistant-text {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n margin: 0;\n }\n\n /* Changes Card */\n .freddy-plugins-changes-card {\n background-color: #071a2b;\n border: 1px solid #35414b;\n border-radius: 12px;\n overflow: hidden;\n }\n\n .freddy-plugins-changes-header {\n padding: 6px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .freddy-plugins-header-left {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .freddy-plugins-building-icon {\n width: 24px;\n height: 24px;\n color: #cbd6e3;\n }\n\n .freddy-plugins-change-title {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n\n .freddy-plugins-stat-added {\n color: #067647;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n\n .freddy-plugins-stat-removed {\n color: #d92d20;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n\n .freddy-plugins-changes-applied {\n color: #68c57c;\n font-family: 'Inter', sans-serif;\n font-size: 10px;\n font-weight: 500;\n line-height: 12px;\n }\n\n .freddy-plugins-changes-content {\n background-color: #031525;\n padding: 8px;\n border-radius: 8px;\n margin: 0 6px 6px 6px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .freddy-plugins-content-header {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 10px;\n }\n\n .freddy-plugins-content-title {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n }\n\n .freddy-plugins-content-description {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n margin: 0;\n }\n\n .freddy-plugins-content-actions {\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n }\n\n .freddy-plugins-accept-btn {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 20px;\n padding: 2px;\n background: transparent;\n border: none;\n border-radius: 4px;\n color: #68c57c;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n cursor: pointer;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),\n 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18);\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-accept-btn:hover {\n background-color: rgba(104, 197, 124, 0.1);\n }\n\n .freddy-plugins-deny-btn {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 20px;\n padding: 2px;\n background: transparent;\n border: none;\n border-radius: 4px;\n color: #f14d4d;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n cursor: pointer;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),\n 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18);\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-deny-btn:hover {\n background-color: rgba(241, 77, 77, 0.1);\n }\n\n .freddy-plugins-applied-status {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 20px;\n padding: 2px;\n background: rgba(104, 197, 124, 0.1);\n border: 1px solid rgba(104, 197, 124, 0.3);\n border-radius: 4px;\n color: #68c57c;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n }\n\n .freddy-plugins-applied-icon {\n width: 16px;\n height: 16px;\n color: #68c57c;\n }\n\n .freddy-plugins-applied-label {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--freddy-success-color, #10b981);\n font-size: 12px;\n font-weight: 500;\n padding: 8px 0;\n }\n\n .freddy-plugins-btn-icon {\n width: 16px;\n height: 16px;\n }\n\n .freddy-plugins-assistant-actions {\n display: flex;\n gap: 8px;\n }\n\n /* AI Processing Indicator */\n .freddy-plugins-processing-indicator {\n display: flex;\n justify-content: flex-start;\n margin-right: auto;\n max-width: 80%;\n margin-top: 20px;\n }\n\n .freddy-plugins-processing-content {\n display: flex;\n align-items: center;\n gap: 8px;\n background-color: rgba(255, 255, 255, 0.05);\n border: 1px solid #35414b;\n border-radius: 8px;\n padding: 8px 12px;\n }\n\n .freddy-plugins-processing-spinner {\n width: 16px;\n height: 16px;\n border: 2px solid #35414b;\n border-top: 2px solid #cbd6e3;\n border-radius: 50%;\n animation: freddy-plugins-spin 1s linear infinite;\n }\n\n @keyframes freddy-plugins-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .freddy-plugins-processing-text {\n color: #cbd6e3;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n\n /* Input Area */\n .freddy-plugins-chat-input-area {\n background-color: #071a2b;\n border: 1px solid #717680;\n border-radius: 16px;\n padding: 8px 12px;\n display: flex;\n gap: 12px;\n align-items: center;\n box-sizing: border-box;\n }\n\n .freddy-plugins-folder-btn {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n }\n\n .freddy-plugins-folder-icon {\n width: 28px;\n height: 28px;\n color: #cbd6e3;\n }\n\n .freddy-plugins-chat-input {\n flex: 1;\n background: transparent;\n border: none;\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 20px;\n font-weight: 400;\n line-height: 30px;\n resize: none;\n outline: none;\n min-height: 30px;\n max-height: 120px;\n }\n\n .freddy-plugins-chat-input::placeholder {\n color: rgba(133, 136, 142, 0.7);\n }\n\n .freddy-plugins-send-button {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-send-button:hover:not(:disabled) {\n opacity: 0.8;\n }\n\n .freddy-plugins-send-button:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .freddy-plugins-send-icon {\n width: 32px;\n height: 32px;\n color: #cbd6e3;\n }\n\n /* Scrollbar */\n .freddy-plugins-chat-messages::-webkit-scrollbar {\n width: 6px;\n }\n\n .freddy-plugins-chat-messages::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .freddy-plugins-chat-messages::-webkit-scrollbar-thumb {\n background: #35414b;\n border-radius: 3px;\n }\n\n .freddy-plugins-chat-messages::-webkit-scrollbar-thumb:hover {\n background: #717680;\n }\n</style>\n","<template>\n <Transition name=\"modal\">\n <div\n v-if=\"isVisible\"\n class=\"freddy-plugins-edit-excerpt-modal-overlay\"\n @click.self=\"handleClose\"\n >\n <div\n class=\"freddy-plugins-edit-excerpt-modal-container\"\n :class=\"{ 'ai-active': showAI }\"\n >\n <div class=\"freddy-plugins-edit-excerpt-modal-content\">\n <!-- Modal header -->\n <div class=\"freddy-plugins-edit-excerpt-modal-header\">\n <div class=\"freddy-plugins-edit-excerpt-modal-header-content\">\n <!-- Edit icon -->\n <div class=\"freddy-plugins-edit-excerpt-modal-icon\">\n <IconEditLinePath\n class=\"freddy-plugins-edit-excerpt-edit-icon\"\n :center-distance=\"36\"\n :circle-gap=\"44\"\n :show-circles=\"true\"\n />\n </div>\n\n <!-- Title and description -->\n <div class=\"freddy-plugins-edit-excerpt-modal-text\">\n <h2 class=\"freddy-plugins-edit-excerpt-modal-title\">\n {{ title }}\n </h2>\n <p class=\"freddy-plugins-edit-excerpt-modal-subtitle\">\n {{ description }}\n </p>\n </div>\n </div>\n\n <!-- Close button -->\n <button\n class=\"freddy-plugins-edit-excerpt-modal-close-btn\"\n :style=\"{ right: showAI ? '52px' : '16px' }\"\n @click=\"handleClose\"\n aria-label=\"Close modal\"\n >\n <IconCross class=\"freddy-plugins-edit-excerpt-modal-close-icon\" />\n </button>\n\n <!-- Hide AI button -->\n <button\n v-if=\"false\"\n class=\"freddy-plugins-edit-excerpt-modal-close-btn\"\n style=\"right: 16px\"\n @click=\"handleHideAI\"\n aria-label=\"Hide AI\"\n >\n <IconSectionHide\n class=\"freddy-plugins-edit-excerpt-hide-section-icon\"\n />\n </button>\n\n <!-- Bottom spacing -->\n <div class=\"freddy-plugins-edit-excerpt-modal-header-spacing\" />\n </div>\n\n <!-- Textarea section -->\n <div class=\"freddy-plugins-edit-excerpt-modal-textarea-section\">\n <textarea\n v-model=\"content\"\n class=\"freddy-plugins-edit-excerpt-modal-textarea\"\n placeholder=\"The text thats needed\"\n rows=\"12\"\n />\n </div>\n\n <!-- Footer actions -->\n <div class=\"freddy-plugins-edit-excerpt-modal-footer\">\n <div class=\"freddy-plugins-edit-excerpt-modal-footer-content\">\n <!-- Ask AI button -->\n <button\n v-if=\"!showAI\"\n class=\"freddy-plugins-edit-excerpt-modal-ai-btn\"\n @click=\"handleAskAI\"\n >\n <IconSparkle\n class=\"freddy-plugins-edit-excerpt-modal-ai-icon\"\n />\n <span class=\"freddy-plugins-edit-excerpt-modal-ai-text\">\n Ask AI\n </span>\n </button>\n\n <!-- Action buttons -->\n <div class=\"freddy-plugins-edit-excerpt-modal-action-buttons\">\n <!-- Cancel button -->\n <button\n class=\"freddy-plugins-edit-excerpt-modal-cancel-btn\"\n @click=\"handleCancel\"\n >\n Cancel\n </button>\n\n <!-- Save changes button -->\n <button\n class=\"freddy-plugins-edit-excerpt-modal-save-btn\"\n @click=\"handleSave\"\n >\n Save changes\n </button>\n </div>\n </div>\n </div>\n </div>\n <div\n v-if=\"showAI\"\n class=\"freddy-plugins-edit-excerpt-modal-ai-container\"\n >\n <SimpleChatInterface\n ref=\"chatRef\"\n :placeholder=\"'Type here...'\"\n :messages=\"chatMessages\"\n :enable-a-i=\"true\"\n :openai-api-key=\"openaiApiKey\"\n :text-box-content=\"content\"\n @send=\"handleChatMessage\"\n @accept-changes=\"handleAcceptChanges\"\n @deny-changes=\"handleDenyChanges\"\n @text-replacement=\"handleTextReplacement\"\n @text-completion=\"handleTextCompletion\"\n />\n </div>\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, watch } from 'vue';\n import { IconCross, IconEditLinePath, IconSparkle } from '@/icons';\n import SimpleChatInterface from './SimpleChatInterface.vue';\n import IconSectionHide from '@/icons/IconSectionHide.vue';\n import type { IChatMessage } from '@/interfaces';\n\n const props = defineProps({\n isVisible: {\n type: Boolean,\n required: true,\n },\n title: {\n type: String,\n default: 'Edit featured excerpt',\n },\n description: {\n type: String,\n default: 'This will be displayed on your profile.',\n },\n initialContent: {\n type: String,\n default: '',\n },\n openaiApiKey: {\n type: String,\n default: '',\n },\n openaiModel: {\n type: String,\n default: 'gpt-4o-mini',\n },\n openaiOrganization: {\n type: String,\n default: '',\n },\n });\n\n const emit = defineEmits(['close', 'save', 'cancel', 'askAI', 'toggleAI']);\n\n const content = ref(props.initialContent);\n const showAI = ref(false);\n const chatMessages = ref<IChatMessage[]>([]);\n const chatRef = ref<InstanceType<typeof SimpleChatInterface> | null>(null);\n\n // Watch for prop changes\n watch(\n () => props.initialContent,\n newContent => {\n content.value = newContent;\n }\n );\n\n const handleClose = () => {\n showAI.value = false;\n chatMessages.value = [];\n emit('close');\n };\n\n const handleSave = () => {\n emit('save', content.value);\n };\n\n const handleCancel = () => {\n showAI.value = false;\n chatMessages.value = [];\n emit('cancel');\n };\n\n const handleAskAI = () => {\n showAI.value = true;\n emit('toggleAI', showAI.value);\n emit('askAI', content.value);\n };\n\n const handleHideAI = () => {\n showAI.value = false;\n emit('toggleAI', showAI.value);\n };\n\n const handleChatMessage = async (message: string) => {\n // The SimpleChatInterface with enableAI will handle the AI processing automatically\n console.log('Chat message sent:', message);\n };\n\n const handleAcceptChanges = (message: any) => {\n console.log('📝 Applying changes for message:', message);\n\n if (message.changes && message.changes.data) {\n // Apply changes to content\n if (message.changes.data.improvedText) {\n const oldContent = content.value;\n content.value = message.changes.data.improvedText;\n console.log(\n '✅ Content updated from:',\n oldContent.substring(0, 50) + '...'\n );\n console.log(\n '✅ Content updated to:',\n content.value.substring(0, 50) + '...'\n );\n\n // Only mark as applied after successfully updating content\n message.applied = true;\n console.log('✅ Message marked as applied:', message.id);\n }\n } else {\n console.warn('⚠️ No changes data found in message:', message);\n }\n };\n\n const handleDenyChanges = (message: any) => {\n console.log('❌ Denying changes for message:', message);\n\n // The SimpleChatInterface already handles hiding the UI\n // No need to add additional messages\n };\n\n const handleTextReplacement = (data: any) => {\n console.log(\n '📋 Text replacement event received (should not auto-apply):',\n data\n );\n // Note: Text replacement now only happens through handleAcceptChanges\n // This handler is kept for compatibility but doesn't auto-apply changes\n };\n\n const handleTextCompletion = (data: any) => {\n console.log(\n '📋 Text completion event received (should not auto-apply):',\n data\n );\n // Note: Text completion now only happens through handleAcceptChanges\n // This handler is kept for compatibility but doesn't auto-apply changes\n };\n</script>\n\n<style scoped>\n /* Modal overlay */\n .freddy-plugins-edit-excerpt-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(29, 46, 71, 0.9);\n backdrop-filter: blur(4px);\n z-index: 9998;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .freddy-plugins-edit-excerpt-modal-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 600px;\n }\n\n .freddy-plugins-edit-excerpt-modal-content {\n height: 100%;\n background-color: #071a2b;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n max-width: 720px;\n overflow: hidden;\n position: relative;\n border-radius: 16px;\n box-shadow: 0px 20px 24px -4px rgba(0, 0, 0, 0.25);\n width: 720px;\n transition: border-radius 0.3s ease, border 0.3s ease;\n }\n\n /* When AI is shown, remove right border radius */\n .freddy-plugins-edit-excerpt-modal-container.ai-active\n .freddy-plugins-edit-excerpt-modal-content {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 1px solid #717680;\n }\n\n /* Background decorative pattern */\n .freddy-plugins-edit-excerpt-modal-bg-pattern {\n position: absolute;\n left: -120px;\n width: 336px;\n height: 336px;\n top: -120px;\n }\n\n .freddy-plugins-edit-excerpt-modal-bg-circle {\n position: absolute;\n left: 50%;\n width: 336px;\n height: 336px;\n top: 0;\n transform: translateX(-50%);\n background: radial-gradient(\n circle,\n rgba(203, 214, 227, 1) 0%,\n rgba(153, 160, 170, 0.75) 25%,\n rgba(102, 107, 113, 0.5) 50%,\n rgba(51, 53, 57, 0.25) 75%,\n rgba(0, 0, 0, 0) 100%\n );\n opacity: 0.2;\n }\n\n /* Modal header */\n .freddy-plugins-edit-excerpt-modal-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-header-content {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 16px;\n align-items: flex-start;\n padding: 24px 24px 0 24px;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-icon {\n background-color: #031525;\n border: 1px solid var(--freddy-border-disabled);\n position: relative;\n border-radius: 10px;\n flex-shrink: 0;\n width: 48px;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-edit-excerpt-edit-icon {\n width: 24px;\n height: 24px;\n color: #cecfd2;\n }\n\n .freddy-plugins-edit-excerpt-modal-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n align-items: flex-start;\n position: relative;\n width: 100%;\n z-index: 1;\n }\n\n .freddy-plugins-edit-excerpt-modal-title {\n font-weight: 600;\n font-size: 16px;\n color: white;\n line-height: 20px;\n margin: 0;\n }\n\n .freddy-plugins-edit-excerpt-modal-subtitle {\n font-weight: 400;\n color: #94979c;\n font-size: 14px;\n line-height: 20px;\n margin: 0;\n }\n\n .freddy-plugins-edit-excerpt-modal-close-btn {\n position: absolute;\n right: 16px;\n top: 16px;\n padding: 8px;\n border-radius: 8px;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 10px;\n transition: background-color 0.2s ease;\n }\n\n .freddy-plugins-edit-excerpt-modal-close-icon {\n width: 16px;\n stroke-width: 1px;\n height: 16px;\n color: #94979c;\n }\n\n .freddy-plugins-edit-excerpt-modal-header-spacing {\n height: 20px;\n width: 100%;\n }\n\n /* Textarea section */\n .freddy-plugins-edit-excerpt-modal-textarea-section {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n padding: 0 24px;\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n .freddy-plugins-edit-excerpt-modal-textarea {\n font-weight: 400;\n width: 100%;\n height: 100%;\n font-size: 16px;\n color: white;\n background-color: #031525;\n border: 1px solid #35414b;\n border-radius: 8px;\n outline: none;\n resize: none;\n font-family: inherit;\n padding: 12px 14px;\n box-sizing: border-box;\n }\n\n .freddy-plugins-edit-excerpt-modal-textarea::placeholder {\n color: #717680;\n }\n\n /* Footer section */\n .freddy-plugins-edit-excerpt-modal-footer {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 32px 0 0 0;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-footer-content {\n box-sizing: border-box;\n display: flex;\n gap: 12px;\n align-items: center;\n padding: 0 24px 24px 24px;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-btn {\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n padding: 0 8px;\n position: relative;\n border-radius: 8px;\n background: none;\n border: none;\n transition: background-color 0.2s ease;\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-icon {\n width: 20px;\n height: 20px;\n color: var(--freddy-fg-action);\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-text {\n font-weight: 500;\n color: #9597a7;\n font-size: 16px;\n line-height: 24px;\n }\n\n .freddy-plugins-edit-excerpt-modal-action-buttons {\n flex-basis: 0;\n cursor: pointer;\n display: flex;\n gap: 12px;\n flex-grow: 1;\n align-items: center;\n justify-content: flex-end;\n min-height: 0;\n min-width: 0;\n position: relative;\n }\n\n .freddy-plugins-edit-excerpt-modal-cancel-btn {\n height: 40px;\n min-width: 40px;\n position: relative;\n border-radius: 8px;\n border: 1px solid #7ba8ef;\n flex-shrink: 0;\n background: none;\n cursor: pointer;\n transition: background-color 0.2s ease;\n padding: 8px;\n font-weight: 500;\n color: #7ba8ef;\n font-size: 16px;\n line-height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-edit-excerpt-modal-cancel-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .freddy-plugins-edit-excerpt-modal-save-btn {\n background-color: #7ba8ef;\n height: 40px;\n min-width: 40px;\n position: relative;\n border-radius: 8px;\n border: 2px solid rgba(255, 255, 255, 0.12);\n flex-shrink: 0;\n cursor: pointer;\n transition: background-color 0.2s ease;\n padding: 8px;\n font-weight: 500;\n color: #031525;\n font-size: 16px;\n line-height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-edit-excerpt-modal-save-btn:hover {\n background-color: #6b9ae8;\n }\n\n /* AI Chat Container */\n .freddy-plugins-edit-excerpt-modal-ai-container {\n display: flex;\n width: 400px;\n height: 100%;\n background-color: #071a2b;\n border: 0;\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 16px;\n border-bottom-right-radius: 16px;\n padding: 16px;\n overflow: hidden;\n box-sizing: border-box;\n }\n\n .freddy-plugins-edit-excerpt-hide-section-icon {\n stroke-width: 2px;\n width: 16px;\n height: 16px;\n color: #94979c;\n }\n\n /* Modal transition animations */\n .modal-enter-active,\n .modal-leave-active {\n transition: all 0.3s ease;\n }\n\n .modal-enter-from,\n .modal-leave-to {\n opacity: 0;\n transform: scale(0.9);\n }\n\n .modal-enter-to,\n .modal-leave-from {\n opacity: 1;\n transform: scale(1);\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-textarea-input-field-wrapper\">\n <!-- Input with label -->\n <div class=\"freddy-plugins-textarea-input-container\">\n <!-- Header with label and AI button -->\n <div class=\"freddy-plugins-textarea-header\">\n <div class=\"freddy-plugins-textarea-label-wrapper\">\n <!-- Label with tooltip -->\n <div class=\"freddy-plugins-textarea-label-container\">\n <label\n class=\"freddy-plugins-textarea-label\"\n :class=\"{\n 'freddy-plugins-textarea-label--underlined': showUnderlines,\n }\"\n >\n {{ dynamicTitle || label }}\n </label>\n <span v-if=\"required\" class=\"freddy-plugins-textarea-required\"\n >*</span\n >\n <slot v-if=\"$slots.tooltip\" name=\"tooltip\" />\n <TooltipV2\n v-else-if=\"tooltipTitle || tooltipDescription\"\n :title=\"tooltipTitle\"\n :description=\"tooltipDescription\"\n placement=\"top\"\n >\n <button\n type=\"button\"\n class=\"freddy-plugins-textarea-tooltip-button\"\n aria-label=\"Help\"\n tabindex=\"0\"\n @click=\"handleTooltipClick\"\n @keydown=\"handleTooltipKeydown\"\n >\n <IconQuestion class=\"freddy-plugins-textarea-tooltip-icon\" />\n </button>\n </TooltipV2>\n </div>\n </div>\n\n <!-- Ask AI Button -->\n <button\n v-if=\"showAiButton\"\n type=\"button\"\n class=\"freddy-plugins-textarea-ai-button\"\n @click=\"handleAskAI\"\n @keydown=\"handleAiKeydown\"\n aria-label=\"Ask AI for help\"\n tabindex=\"0\"\n >\n <IconSparkle class=\"freddy-plugins-textarea-ai-icon\" />\n </button>\n </div>\n\n <!-- Textarea Input -->\n <div class=\"freddy-plugins-textarea-input-wrapper\">\n <textarea\n v-if=\"!diffMode\"\n ref=\"textareaRef\"\n v-model=\"localValue\"\n class=\"freddy-plugins-textarea-input\"\n :class=\"{\n 'freddy-plugins-textarea-input--error': hasError,\n 'freddy-plugins-textarea-input--disabled': disabled,\n 'freddy-plugins-textarea-input--focused': isFocused,\n 'freddy-plugins-textarea-input--with-tags':\n showTags && tags.length > 0,\n 'freddy-plugins-textarea-input--tags-only': tagsOnly,\n }\"\n :placeholder=\"computedPlaceholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly || tagsOnly\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydown\"\n @click=\"handleTextareaClick\"\n />\n\n <!-- Diff Mode Display -->\n <div v-if=\"diffMode\" class=\"freddy-plugins-textarea-diff-container\">\n <div class=\"freddy-plugins-textarea-diff-content\">\n <div\n class=\"freddy-plugins-textarea-diff-block freddy-plugins-textarea-diff-block--old\"\n >\n {{ oldText }}\n </div>\n <div\n class=\"freddy-plugins-textarea-diff-block freddy-plugins-textarea-diff-block--new\"\n >\n {{ newText }}\n </div>\n </div>\n </div>\n\n <!-- Tags Container -->\n <div\n v-if=\"showTags && tags.length > 0\"\n class=\"freddy-plugins-textarea-tags-container\"\n >\n <div class=\"freddy-plugins-textarea-tags\">\n <div\n v-for=\"(tag, index) in tags\"\n :key=\"`${tag}-${index}`\"\n class=\"freddy-plugins-textarea-tag\"\n >\n <div class=\"freddy-plugins-textarea-tag-content\">\n <span\n class=\"freddy-plugins-textarea-tag-text\"\n :class=\"{\n 'freddy-plugins-textarea-tag-text--underlined':\n showUnderlines,\n }\"\n >{{ tag }}</span\n >\n </div>\n <button\n type=\"button\"\n class=\"freddy-plugins-textarea-tag-close\"\n @click=\"handleRemoveTag(index)\"\n @keydown=\"handleTagCloseKeydown($event, index)\"\n :aria-label=\"`Remove ${tag} tag`\"\n tabindex=\"0\"\n >\n <IconCross class=\"freddy-plugins-textarea-tag-close-icon\" />\n </button>\n </div>\n </div>\n <span\n v-if=\"showAddTagsPlaceholder\"\n class=\"freddy-plugins-textarea-add-tags\"\n :class=\"{\n 'freddy-plugins-textarea-add-tags--underlined': showUnderlines,\n }\"\n >\n {{ addTagsPlaceholder }}\n </span>\n </div>\n\n <!-- Expand Button -->\n <button\n type=\"button\"\n class=\"freddy-plugins-textarea-expand-button\"\n @click=\"handleExpand\"\n @keydown=\"handleExpandKeydown\"\n aria-label=\"Expand textarea\"\n tabindex=\"0\"\n >\n <IconExpand class=\"freddy-plugins-textarea-expand-icon\" />\n </button>\n </div>\n </div>\n\n <!-- Hint text (only show if no error and showHint is true) -->\n <p\n v-if=\"showHint && hintText && !hasError\"\n class=\"freddy-plugins-textarea-hint-text\"\n :class=\"{\n 'freddy-plugins-textarea-hint-text--underlined': showUnderlines,\n }\"\n >\n {{ hintText }}\n </p>\n\n <!-- Error message (only show if there's an error) -->\n <p\n v-if=\"hasError && errorMessage\"\n class=\"freddy-plugins-textarea-error-text\"\n :class=\"{\n 'freddy-plugins-textarea-error-text--underlined': showUnderlines,\n }\"\n >\n {{ errorMessage }}\n </p>\n\n <!-- EditFeaturedExcerptModal for AI mode -->\n <EditFeaturedExcerptModal\n v-if=\"modalMode === 'ai'\"\n ref=\"aiModalRef\"\n :is-visible=\"showModal && modalMode === 'ai'\"\n :title=\"modalTitle\"\n :description=\"modalDescription\"\n :initial-content=\"localValue\"\n :openai-api-key=\"openaiApiKey\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"openaiOrganization\"\n :auto-show-a-i=\"true\"\n @close=\"handleModalClose\"\n @save=\"handleModalSave\"\n @cancel=\"handleModalCancel\"\n @ask-a-i=\"handleModalAskAI\"\n @toggle-a-i=\"handleToggleAI\"\n />\n\n <!-- EditFeaturedExcerptModal for expand mode (without AI) -->\n <EditFeaturedExcerptModal\n v-if=\"modalMode === 'expand'\"\n :is-visible=\"showModal && modalMode === 'expand'\"\n :title=\"modalTitle\"\n :description=\"modalDescription\"\n :initial-content=\"localValue\"\n :openai-api-key=\"''\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"''\"\n @close=\"handleModalClose\"\n @save=\"handleModalSave\"\n @cancel=\"handleModalCancel\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch } from 'vue';\n import { IconQuestion, IconSparkle, IconCross } from '@/icons';\n import { IconExpand } from '@/icons';\n import TooltipV2 from './TooltipV2.vue';\n import EditFeaturedExcerptModal from './EditFeaturedExcerptModal.vue';\n\n interface Props {\n modelValue?: string;\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n tooltipTitle?: string;\n tooltipDescription?: string;\n showAiButton?: boolean;\n showTags?: boolean;\n tags?: string[];\n showAddTagsPlaceholder?: boolean;\n addTagsPlaceholder?: string;\n hintText?: string;\n hasError?: boolean;\n errorMessage?: string;\n modalTitle?: string;\n modalDescription?: string;\n openaiApiKey?: string;\n openaiModel?: string;\n openaiOrganization?: string;\n // New scenario props\n showUnderlines?: boolean;\n dynamicTitle?: string;\n showHint?: boolean;\n diffMode?: boolean;\n oldText?: string;\n newText?: string;\n tagsOnly?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n modelValue: '',\n label: 'Description',\n placeholder: 'The text thats needed',\n disabled: false,\n readonly: false,\n required: false,\n tooltipTitle: '',\n tooltipDescription: '',\n showAiButton: true,\n showTags: false,\n tags: () => [],\n showAddTagsPlaceholder: false,\n addTagsPlaceholder: 'Add tags...',\n hintText: 'This is a hint text to help user.',\n hasError: false,\n errorMessage: '',\n modalTitle: 'Edit Description',\n modalDescription: 'Provide detailed description for your content.',\n openaiApiKey: '',\n openaiModel: 'gpt-4o-mini',\n openaiOrganization: '',\n // New scenario defaults\n showUnderlines: false,\n dynamicTitle: '',\n showHint: true,\n diffMode: false,\n oldText: '',\n newText: '',\n tagsOnly: false,\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: string];\n input: [value: string];\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n 'ask-ai': [content: string];\n expand: [content: string];\n 'remove-tag': [index: number];\n 'tooltip-click': [];\n 'add-tag': [tag: string];\n 'tags-click': [];\n }>();\n\n const textareaRef = ref<HTMLTextAreaElement | null>(null);\n const aiModalRef = ref<InstanceType<typeof EditFeaturedExcerptModal> | null>(\n null\n );\n const localValue = ref(props.modelValue);\n const originalValue = ref('');\n const showModal = ref(false);\n const modalMode = ref<'ai' | 'expand'>('expand');\n const isFocused = ref(false);\n\n // Computed properties\n const computedPlaceholder = computed(() => {\n // If tags exist, don't show placeholder in textarea\n if (props.showTags && props.tags.length > 0) {\n return '';\n }\n return props.placeholder;\n });\n\n // Watch for external changes to modelValue\n watch(\n () => props.modelValue,\n newValue => {\n localValue.value = newValue;\n }\n );\n\n const handleInput = () => {\n emit('update:modelValue', localValue.value);\n emit('input', localValue.value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n isFocused.value = true;\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n isFocused.value = false;\n emit('blur', event);\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n // Handle any specific keydown logic if needed\n };\n\n const handleTextareaClick = () => {\n if (props.tagsOnly) {\n emit('tags-click');\n }\n };\n\n const handleTooltipClick = () => {\n emit('tooltip-click');\n };\n\n const handleTooltipKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleTooltipClick();\n }\n };\n\n const handleAskAI = () => {\n originalValue.value = localValue.value;\n modalMode.value = 'ai';\n showModal.value = true;\n emit('ask-ai', localValue.value);\n };\n\n const handleAiKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleAskAI();\n }\n };\n\n const handleExpand = () => {\n originalValue.value = localValue.value;\n modalMode.value = 'expand';\n showModal.value = true;\n emit('expand', localValue.value);\n };\n\n const handleExpandKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleExpand();\n }\n };\n\n const handleRemoveTag = (index: number) => {\n emit('remove-tag', index);\n };\n\n const handleTagCloseKeydown = (event: KeyboardEvent, index: number) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleRemoveTag(index);\n }\n };\n\n const handleModalClose = () => {\n localValue.value = originalValue.value;\n emit('update:modelValue', originalValue.value);\n emit('input', originalValue.value);\n showModal.value = false;\n };\n\n const handleModalSave = (content: string) => {\n localValue.value = content;\n emit('update:modelValue', content);\n emit('input', content);\n showModal.value = false;\n };\n\n const handleModalCancel = () => {\n localValue.value = originalValue.value;\n emit('update:modelValue', originalValue.value);\n emit('input', originalValue.value);\n showModal.value = false;\n };\n\n const handleModalAskAI = () => {\n emit('ask-ai', localValue.value);\n };\n\n const handleToggleAI = (showAI: boolean) => {\n console.log('AI toggled:', showAI);\n };\n\n // Focus method for external use\n const focus = () => {\n textareaRef.value?.focus();\n };\n\n // Expose methods\n defineExpose({\n focus,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-textarea-input-field-wrapper {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n }\n\n .freddy-plugins-textarea-input-container {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n flex-grow: 1;\n min-height: 1px;\n min-width: 1px;\n flex-shrink: 0;\n z-index: 2;\n }\n\n .freddy-plugins-textarea-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-label-wrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n align-items: flex-start;\n width: 105px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-label-container {\n display: flex;\n gap: 2px;\n align-items: center;\n width: 100%;\n }\n\n .freddy-plugins-textarea-label {\n font-family: 'Inter', sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n color: #cbd6e3;\n white-space: nowrap;\n margin: 0;\n }\n\n .freddy-plugins-textarea-label--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-required {\n font-family: 'Inter', sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n color: #94979c;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tooltip-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n border-radius: 2px;\n transition: background-color 0.2s ease;\n flex-shrink: 0;\n position: relative;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-tooltip-button:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-tooltip-icon {\n width: 14px;\n height: 14px;\n color: #94979c;\n }\n\n .freddy-plugins-textarea-ai-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-textarea-ai-button::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18),\n 0px -2px 0px 0px inset rgba(10, 13, 18, 0.05);\n pointer-events: none;\n }\n\n .freddy-plugins-textarea-ai-button:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-ai-icon {\n width: 16px;\n height: 16px;\n color: #94979c;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-input-wrapper {\n position: relative;\n width: 100%;\n flex-grow: 1;\n min-height: 1px;\n min-width: 1px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-input {\n width: 100%;\n min-height: 180px;\n padding: 12px;\n padding-right: 40px; /* Space for expand button */\n background-color: #031525;\n border: 2px solid #d1d3d5;\n border-radius: 8px;\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n resize: none;\n outline: none;\n transition: border-color 0.2s ease;\n box-sizing: border-box;\n position: relative;\n }\n\n .freddy-plugins-textarea-input::placeholder {\n color: rgba(133, 136, 142, 0.7);\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n }\n\n .freddy-plugins-textarea-input--focused {\n border-color: #cbd6e3;\n }\n\n .freddy-plugins-textarea-input--error {\n border-color: #ff6b6b;\n }\n\n .freddy-plugins-textarea-input--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .freddy-plugins-textarea-input--with-tags {\n padding-top: 50px; /* Extra padding when tags are present */\n }\n\n .freddy-plugins-textarea-input--tags-only {\n cursor: pointer;\n background-color: #031525;\n }\n\n .freddy-plugins-textarea-input--tags-only:hover {\n border-color: #cbd6e3;\n }\n\n .freddy-plugins-textarea-tags-container {\n position: absolute;\n top: 12px;\n left: 12px;\n right: 40px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: flex-start;\n width: calc(100% - 52px);\n }\n\n .freddy-plugins-textarea-tags {\n display: flex;\n gap: 6px;\n align-items: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag {\n display: flex;\n gap: 3px;\n align-items: center;\n justify-content: center;\n padding: 2px 4px 2px 9px;\n background-color: #031525;\n border: 1px solid #35414b;\n border-radius: 6px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag-content {\n display: flex;\n gap: 5px;\n align-items: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag-text {\n font-family: 'Inter', sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n color: #cbd6e3;\n text-align: center;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag-text--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-tag-close {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n box-sizing: border-box;\n padding: 2px;\n border-radius: 3px;\n background: none;\n border: none;\n cursor: pointer;\n transition: background-color 0.2s ease;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-tag-close:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-tag-close-icon {\n width: 12px;\n height: 12px;\n color: #94979c;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-add-tags {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n color: rgba(133, 136, 142, 0.7);\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-add-tags--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-expand-button {\n position: absolute;\n bottom: 12px;\n right: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 2px;\n width: 20px;\n height: 20px;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n overflow: hidden;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);\n }\n\n .freddy-plugins-textarea-expand-button::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18),\n 0px -2px 0px 0px inset rgba(10, 13, 18, 0.05);\n pointer-events: none;\n }\n\n .freddy-plugins-textarea-expand-button:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-expand-icon {\n width: 16px;\n height: 16px;\n color: #94979c;\n stroke-width: 2px;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-hint-text {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #717680;\n width: 100%;\n z-index: 1;\n flex-shrink: 0;\n margin: 0;\n }\n\n .freddy-plugins-textarea-error-text {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #ff6b6b;\n width: 100%;\n z-index: 1;\n flex-shrink: 0;\n margin: 0;\n }\n\n .freddy-plugins-textarea-hint-text--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-error-text--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n /* Diff Mode Styles */\n .freddy-plugins-textarea-diff-container {\n width: auto;\n min-height: 180px;\n background-color: #031525;\n border: 2px solid #d1d3d5;\n border-radius: 8px;\n padding: 12px;\n position: relative;\n }\n\n .freddy-plugins-textarea-diff-content {\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 100%;\n height: 100%;\n }\n\n .freddy-plugins-textarea-diff-block {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n padding: 8px 12px;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n .freddy-plugins-textarea-diff-block--old {\n background-color: #d92d2033; /* Red background */\n color: #ffffff;\n }\n\n .freddy-plugins-textarea-diff-block--new {\n background-color: #07945533; /* Green background */\n color: #ffffff;\n }\n\n /* Responsive adjustments */\n @media (max-width: 768px) {\n .freddy-plugins-textarea-header {\n flex-direction: column;\n gap: 8px;\n align-items: flex-start;\n }\n\n .freddy-plugins-textarea-label-wrapper {\n width: 100%;\n }\n\n .freddy-plugins-textarea-ai-button {\n align-self: flex-end;\n }\n\n .freddy-plugins-textarea-input {\n min-height: 120px;\n }\n\n .freddy-plugins-textarea-tags-container {\n position: static;\n margin-bottom: 8px;\n }\n }\n</style>\n","<template>\n <TextAreaInputField\n v-model=\"localValue\"\n :label=\"label\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :required=\"required\"\n :tooltip-title=\"tooltipTitle\"\n :tooltip-description=\"tooltipDescription\"\n :show-ai-button=\"showAiButton\"\n :show-tags=\"showTags\"\n :tags=\"currentTags\"\n :show-add-tags-placeholder=\"showAddTagsPlaceholder\"\n :add-tags-placeholder=\"addTagsPlaceholder\"\n :hint-text=\"hintText\"\n :has-error=\"hasError\"\n :error-message=\"errorMessage\"\n :modal-title=\"modalTitle\"\n :modal-description=\"modalDescription\"\n :openai-api-key=\"openaiApiKey\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"openaiOrganization\"\n :show-underlines=\"showUnderlines\"\n :dynamic-title=\"dynamicTitle\"\n :show-hint=\"showHint\"\n :diff-mode=\"diffMode\"\n :old-text=\"oldText\"\n :new-text=\"newText\"\n :tags-only=\"tagsOnly\"\n @update:model-value=\"handleUpdateValue\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @ask-ai=\"handleAskAI\"\n @expand=\"handleExpand\"\n @remove-tag=\"handleRemoveTag\"\n @tooltip-click=\"handleTooltipClick\"\n @add-tag=\"handleAddTag\"\n @tags-click=\"handleTagsClick\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch } from 'vue';\n import TextAreaInputField from './TextAreaInputField.vue';\n import type {\n DescriptionsProps,\n DescriptionStage,\n DescriptionType,\n } from '@/interfaces/ui/descriptions.interfaces';\n\n const props = withDefaults(defineProps<DescriptionsProps>(), {\n modelValue: '',\n label: 'Description',\n placeholder: 'The text thats needed',\n disabled: false,\n readonly: false,\n required: true,\n tooltipTitle: '',\n tooltipDescription: '',\n showAiButton: true,\n stage: 'placeholder',\n type: 'default',\n destructive: false,\n tags: () => [],\n hintText: 'This is a hint text to help user.',\n errorMessage: 'This is an error message.',\n modalTitle: 'Edit Description',\n modalDescription: 'Provide detailed description for your content.',\n openaiApiKey: '',\n openaiModel: 'gpt-4o-mini',\n openaiOrganization: '',\n showUnderlines: false,\n dynamicTitle: '',\n showHint: true,\n diffMode: false,\n oldText: '',\n newText: '',\n tagsOnly: false,\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: string];\n input: [value: string];\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n 'ask-ai': [content: string];\n expand: [content: string];\n 'remove-tag': [index: number];\n 'tooltip-click': [];\n 'add-tag': [tag: string];\n 'tags-click': [];\n }>();\n\n const localValue = ref(props.modelValue);\n const currentTags = ref([...props.tags]);\n\n // Watch for external changes to modelValue\n watch(\n () => props.modelValue,\n newValue => {\n localValue.value = newValue;\n }\n );\n\n // Watch for external changes to tags\n watch(\n () => props.tags,\n newTags => {\n currentTags.value = [...newTags];\n },\n { deep: true }\n );\n\n // Computed properties based on stage and type\n const showTags = computed(() => props.type === 'tags');\n\n const showAddTagsPlaceholder = computed(() => {\n return (\n props.type === 'tags' &&\n (props.stage === 'placeholder' || props.stage === 'focused')\n );\n });\n\n const addTagsPlaceholder = computed(() => {\n return props.stage === 'focused' ? 'Add tags...' : 'Add tags...';\n });\n\n const hasError = computed(() => {\n return props.stage === 'error' || props.destructive;\n });\n\n const actualHintText = computed(() => {\n if (hasError.value && props.destructive) {\n return props.errorMessage;\n }\n return props.hintText;\n });\n\n const actualPlaceholder = computed(() => {\n if (props.stage === 'placeholder') {\n return props.placeholder;\n }\n if (props.stage === 'focused' && props.type === 'tags') {\n return '';\n }\n if (props.stage === 'default' || props.stage === 'focused') {\n return '';\n }\n return props.placeholder;\n });\n\n // Event handlers\n const handleUpdateValue = (value: string) => {\n localValue.value = value;\n emit('update:modelValue', value);\n };\n\n const handleInput = (value: string) => {\n emit('input', value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleAskAI = (content: string) => {\n emit('ask-ai', content);\n };\n\n const handleExpand = (content: string) => {\n emit('expand', content);\n };\n\n const handleRemoveTag = (index: number) => {\n currentTags.value.splice(index, 1);\n emit('remove-tag', index);\n };\n\n const handleTooltipClick = () => {\n emit('tooltip-click');\n };\n\n const handleAddTag = (tag: string) => {\n emit('add-tag', tag);\n };\n\n const handleTagsClick = () => {\n emit('tags-click');\n };\n\n // Expose methods for external use\n const focus = () => {\n // Focus will be handled by the TextAreaInputField component\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<style scoped>\n /* All styles are handled by TextAreaInputField component */\n</style>\n","<template>\n <div class=\"freddy-plugins-diff-container\">\n <div\n v-if=\"showDiff && diffContent\"\n class=\"freddy-plugins-diff-preview\"\n v-html=\"diffContent\"\n ></div>\n <textarea\n v-else\n ref=\"textareaRef\"\n v-model=\"localContent\"\n class=\"freddy-plugins-diff-textarea\"\n :placeholder=\"placeholder\"\n @input=\"handleInput\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch } from 'vue';\n\n interface DiffProps {\n modelValue: string;\n placeholder?: string;\n originalText?: string;\n improvedText?: string;\n showDiff?: boolean;\n }\n\n const props = withDefaults(defineProps<DiffProps>(), {\n placeholder: 'Enter your text...',\n showDiff: false,\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: string];\n }>();\n\n const textareaRef = ref<HTMLTextAreaElement | null>(null);\n const localContent = ref(props.modelValue);\n\n // Watch for external changes to modelValue\n watch(\n () => props.modelValue,\n newValue => {\n localContent.value = newValue;\n }\n );\n\n const handleInput = () => {\n emit('update:modelValue', localContent.value);\n };\n\n // Generate diff HTML with red/green highlighting\n const diffContent = computed(() => {\n if (!props.originalText || !props.improvedText) return '';\n\n // Simple diff algorithm - split by words for better granularity\n const originalWords = props.originalText.split(/(\\s+)/);\n const improvedWords = props.improvedText.split(/(\\s+)/);\n\n // For simplicity, we'll show the full diff with additions and removals\n let diffHtml = '';\n\n // Show removed text in red\n const removedText = originalWords\n .filter(word => !improvedWords.includes(word) && word.trim())\n .join(' ');\n\n if (removedText) {\n diffHtml += `<span class=\"freddy-plugins-diff-removed\">${removedText}</span>`;\n }\n\n // Show added text in green\n const addedText = improvedWords\n .filter(word => !originalWords.includes(word) && word.trim())\n .join(' ');\n\n if (addedText) {\n if (diffHtml) diffHtml += '<br>';\n diffHtml += `<span class=\"freddy-plugins-diff-added\">${addedText}</span>`;\n }\n\n // If no significant changes, show the improved text\n if (!diffHtml) {\n diffHtml = `<span class=\"freddy-plugins-diff-improved\">${props.improvedText}</span>`;\n }\n\n return diffHtml;\n });\n\n // Expose methods for parent component\n defineExpose({\n focus: () => textareaRef.value?.focus(),\n blur: () => textareaRef.value?.blur(),\n });\n</script>\n\n<style scoped>\n .freddy-plugins-diff-container {\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n .freddy-plugins-diff-textarea {\n width: 100%;\n min-height: 200px;\n padding: 16px;\n border: 1px solid var(--freddy-border-secondary, #35414b);\n border-radius: 8px;\n background-color: var(--freddy-text-action-button, #031525);\n color: var(--freddy-text-primary, #ffffff);\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n line-height: 24px;\n resize: none;\n outline: none;\n transition: border-color 0.2s ease;\n }\n\n .freddy-plugins-diff-textarea:focus {\n border-color: var(--freddy-border-primary, #cbd6e3);\n }\n\n .freddy-plugins-diff-textarea::placeholder {\n color: var(--freddy-text-secondary, #94979c);\n }\n\n .freddy-plugins-diff-preview {\n width: 100%;\n height: 100%;\n min-height: 200px;\n padding: 16px;\n border: 1px solid var(--freddy-border-secondary, #35414b);\n border-radius: 8px;\n background-color: var(--freddy-bg-secondary, #071a2b);\n color: var(--freddy-text-primary, #ffffff);\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n line-height: 24px;\n overflow-y: auto;\n white-space: pre-wrap;\n }\n\n :deep(.freddy-plugins-diff-removed) {\n background-color: #d92d20;\n color: #ffffff;\n padding: 2px 4px;\n border-radius: 4px;\n margin: 0 2px;\n }\n\n :deep(.freddy-plugins-diff-added) {\n background-color: #067647;\n color: #ffffff;\n padding: 2px 4px;\n border-radius: 4px;\n margin: 0 2px;\n }\n\n :deep(.freddy-plugins-diff-improved) {\n background-color: #68c57c;\n color: #031525;\n padding: 2px 4px;\n border-radius: 4px;\n }\n</style>\n","\n<template>\n <button\n class=\"freddy-plugins-switch\"\n :class=\"{ \n 'freddy-plugins-switch--on': modelValue, \n 'freddy-plugins-switch--disabled': disabled,\n [`freddy-plugins-switch--${size}`]: true\n }\"\n :aria-checked=\"modelValue\"\n role=\"switch\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"toggle\"\n @keydown.space.prevent=\"toggle\"\n @keydown.enter.prevent=\"toggle\"\n :disabled=\"disabled\"\n >\n <span class=\"freddy-plugins-switch__track\"></span>\n <span class=\"freddy-plugins-switch__thumb\"></span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\nconst props = defineProps<{\n modelValue: boolean;\n disabled?: boolean;\n size?: 's' | 'sm' | 'md' | 'lg' | 'xl';\n}>();\nconst emit = defineEmits(['update:modelValue']);\nfunction toggle(event: Event) {\n event.stopPropagation();\n if (!props.disabled) {\n emit('update:modelValue', !props.modelValue);\n }\n}\n</script>\n\n<style>\n.freddy-plugins-switch {\n position: relative;\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n outline: none;\n display: inline-flex;\n align-items: center;\n transition: opacity 0.2s;\n}\n\n/* Size variants */\n.freddy-plugins-switch--s {\n width: 28px;\n height: 16px;\n}\n\n.freddy-plugins-switch--sm {\n width: 32px;\n height: 18px;\n}\n\n.freddy-plugins-switch--md {\n width: 40px;\n height: 22px;\n}\n\n.freddy-plugins-switch--lg {\n width: 48px;\n height: 26px;\n}\n\n.freddy-plugins-switch--xl {\n width: 56px;\n height: 30px;\n}\n.freddy-plugins-switch--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.freddy-plugins-switch__track {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--freddy-border-color);\n border-radius: 999px;\n transition: background 0.2s;\n}\n.freddy-plugins-switch--on .freddy-plugins-switch__track {\n background: var(--freddy-primary-color);\n}\n.freddy-plugins-switch__thumb {\n position: absolute;\n background: var(--text-50, var(--text-inverse));\n border-radius: 50%;\n box-shadow: 0 1px 3px var(--freddy-border-color);\n transition: left 0.2s;\n}\n\n/* Size-specific thumb positioning */\n.freddy-plugins-switch--s .freddy-plugins-switch__thumb {\n top: 1px;\n left: 1px;\n width: 14px;\n height: 14px;\n}\n.freddy-plugins-switch--s.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 13px;\n}\n\n.freddy-plugins-switch--sm .freddy-plugins-switch__thumb {\n top: 1px;\n left: 1px;\n width: 16px;\n height: 16px;\n}\n.freddy-plugins-switch--sm.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 15px;\n}\n\n.freddy-plugins-switch--md .freddy-plugins-switch__thumb {\n top: 2px;\n left: 2px;\n width: 18px;\n height: 18px;\n}\n.freddy-plugins-switch--md.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 20px;\n}\n\n.freddy-plugins-switch--lg .freddy-plugins-switch__thumb {\n top: 2px;\n left: 2px;\n width: 22px;\n height: 22px;\n}\n.freddy-plugins-switch--lg.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 24px;\n}\n\n.freddy-plugins-switch--xl .freddy-plugins-switch__thumb {\n top: 3px;\n left: 3px;\n width: 24px;\n height: 24px;\n}\n.freddy-plugins-switch--xl.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 29px;\n}\n</style> ","<template>\n <div\n class=\"freddy-plugins-dropdown-wrapper\"\n @keydown.esc=\"closeDropdown\"\n tabindex=\"0\"\n >\n <BaseButton\n class=\"freddy-plugins-dropdown-trigger\"\n :label=\"displayLabel\"\n :iconOnly=\"iconOnly\"\n :rightIcon=\"chevronRight && showIcon ? iconToShow : undefined\"\n :leftIcon=\"!chevronRight && showIcon ? iconToShow : undefined\"\n :size=\"size\"\n hierarchy=\"tertiary\"\n @click=\"toggleDropdown\"\n :aria-expanded=\"open\"\n :aria-haspopup=\"true\"\n type=\"button\"\n >\n <template #default>\n <slot name=\"button\">\n {{ displayLabel }}\n </slot>\n </template>\n </BaseButton>\n <div\n v-if=\"open\"\n class=\"freddy-plugins-dropdown-menu\"\n :class=\"{\n 'freddy-plugins-dropdown-menu--up': openUp,\n 'freddy-plugins-dropdown-menu--down': !openUp,\n }\"\n >\n <div v-if=\"searchable\" class=\"freddy-plugins-dropdown-search-bar\">\n <input\n v-model=\"searchQuery\"\n type=\"text\"\n class=\"freddy-plugins-dropdown-search-input\"\n :placeholder=\"searchPlaceholder\"\n />\n </div>\n <ul class=\"freddy-plugins-dropdown-options\">\n <li\n v-for=\"option in filteredOptions\"\n :key=\"option.value\"\n class=\"freddy-plugins-dropdown-option\"\n :class=\"{\n 'freddy-plugins-dropdown-option--toggle': option.type === 'toggle',\n }\"\n @click=\"event => handleOptionClick(option, event)\"\n >\n <span class=\"freddy-plugins-dropdown-option-label\">\n <template v-if=\"!optionIconRight && option.icon\">\n <component\n :is=\"option.icon\"\n class=\"freddy-plugins-dropdown-option-icon\"\n />\n </template>\n <span>{{ option.label }}</span>\n <template v-if=\"showShortcut && option.shortcut\">\n <span class=\"freddy-plugins-dropdown-option-shortcut\">{{\n option.shortcut\n }}</span>\n </template>\n <template v-if=\"optionIconRight && option.icon\">\n <component\n :is=\"option.icon\"\n class=\"freddy-plugins-dropdown-option-icon freddy-plugins-dropdown-option-icon--right\"\n />\n </template>\n </span>\n <template v-if=\"option.type === 'toggle'\">\n <Switch\n :modelValue=\"option.checked ?? false\"\n :size=\"props.size\"\n @update:modelValue=\"\n val => {\n handleToggle(option, val);\n }\n \"\n @click.stop\n />\n </template>\n </li>\n <li\n v-if=\"filteredOptions.length === 0\"\n class=\"freddy-plugins-dropdown-no-options\"\n >\n <slot name=\"no-options\">No options</slot>\n </li>\n </ul>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch, type Component, shallowRef } from 'vue';\n import IconChevronDown from '@/icons/IconChevronDown.vue';\n import IconChevronUp from '@/icons/IconChevronUp.vue';\n import Switch from '@/components/Switch.vue';\n import BaseButton from './Buttons/BaseButton.vue';\n\n interface Option {\n label: string;\n value: string | number;\n icon?: Component;\n shortcut?: string;\n type?: 'option' | 'toggle';\n checked?: boolean;\n default?: boolean;\n refData?: any;\n }\n\n interface Props {\n label?: string;\n size?: 's' | 'sm' | 'md' | 'lg' | 'xl';\n iconOnly?: boolean;\n options?: Option[];\n searchable?: boolean;\n searchPlaceholder?: string;\n openUp?: boolean;\n chevronRight?: boolean;\n showIcon?: boolean;\n customIcon?: any;\n optionIconRight?: boolean;\n showShortcut?: boolean;\n background?: string;\n borderRadius?: string;\n activeBackground?: string;\n openBackground?: string;\n variant?: 'primary' | 'secondary' | 'blanc';\n stayOpen?: boolean;\n }\n\n export type { Option, Props };\n\n const props = withDefaults(defineProps<Props>(), {\n label: 'Select',\n size: 'sm',\n iconOnly: false,\n options: () => [],\n searchable: false,\n searchPlaceholder: 'Search...',\n openUp: false,\n chevronRight: true,\n showIcon: true,\n customIcon: null,\n optionIconRight: false,\n showShortcut: false,\n background: 'transparent',\n borderRadius: '8px',\n activeBackground: 'var(--freddy-bg-tertiary)',\n openBackground: 'var(--freddy-bg-tertiary)',\n variant: 'primary',\n stayOpen: false,\n });\n\n const emit = defineEmits<{\n (event: 'select', value: Option): void;\n (event: 'toggle', value: Option): void;\n }>();\n\n const open = ref(false);\n const searchQuery = ref('');\n // const isHovered = ref(false);\n\n // Internal selected state\n const selected = ref<Option | null>(null);\n\n // Local shallow copy of options for toggles to avoid deep reactivity\n const localOptions = shallowRef<Option[]>([...props.options]);\n\n watch(\n () => props.options,\n newOptions => {\n localOptions.value = [...newOptions];\n }\n );\n\n // Initialize selected option\n const initializeSelected = () => {\n if (selected.value) return;\n const def = localOptions.value.find((opt: Option) => opt.default);\n if (def) {\n selected.value = def;\n }\n };\n\n watch(\n localOptions,\n () => {\n initializeSelected();\n },\n { immediate: true }\n );\n\n const displayLabel = computed(() => {\n if (props.label !== 'Select') return props.label;\n if (selected.value) return selected.value.label;\n return 'Select';\n });\n\n // const computedBackground = computed(() => {\n // if (props.variant === \"primary\") return \"var(--border-light)\";\n // return props.background;\n // });\n\n // const computedActiveBackground = computed(() => {\n // if (props.variant === \"primary\") return \"#d0d0d0\";\n // return props.activeBackground;\n // });\n\n // const computedOpenBackground = computed(() => {\n // if (props.variant === \"primary\") return \"#d8d8d8\";\n // return props.openBackground;\n // });\n\n // const computedBorderRadius = computed(() => {\n // if (props.variant === \"primary\") return \"8px\";\n // return props.borderRadius;\n // });\n\n const iconToShow = computed(() => {\n if (!props.showIcon) return null;\n if (props.customIcon) return props.customIcon;\n return props.openUp ? IconChevronUp : IconChevronDown;\n });\n\n const toggleDropdown = () => {\n open.value = !open.value;\n if (!open.value) searchQuery.value = '';\n };\n\n const closeDropdown = () => {\n open.value = false;\n searchQuery.value = '';\n };\n\n const filteredOptions = computed(() => {\n if (!props.searchable || !searchQuery.value) return localOptions.value;\n return localOptions.value.filter((option: Option) =>\n option.label.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n });\n\n const handleOptionClick = (option: Option, event?: Event) => {\n if (event) {\n }\n if (option.type !== 'toggle') {\n selectOption(option);\n } else {\n }\n };\n\n const selectOption = (option: Option) => {\n selected.value = option;\n emit('select', option);\n if (!props.stayOpen) {\n closeDropdown();\n }\n };\n\n const handleToggle = (option: Option, val: boolean) => {\n const idx = localOptions.value.findIndex(\n (o: Option) => o.value === option.value\n );\n if (idx !== -1) localOptions.value[idx].checked = val;\n emit('toggle', { ...option, checked: val });\n };\n\n // Close dropdown on outside click\n const onClickOutside = (event: MouseEvent) => {\n const el = event.target as HTMLElement;\n if (!el.closest('.freddy-plugins-dropdown-wrapper')) {\n closeDropdown();\n }\n };\n\n watch(open, val => {\n if (val) {\n // Use a small delay to ensure the dropdown is rendered\n setTimeout(() => {\n document.addEventListener('click', onClickOutside);\n }, 0);\n } else {\n document.removeEventListener('click', onClickOutside);\n }\n });\n</script>\n\n<style>\n .freddy-plugins-dropdown-wrapper {\n position: relative;\n display: inline-block;\n }\n\n .freddy-plugins-dropdown-chevron {\n width: 16px;\n height: 16px;\n }\n\n .freddy-plugins-dropdown-menu {\n position: absolute;\n left: 0;\n min-width: 200px;\n width: fit-content;\n max-width: 360px;\n border: 2px solid var(--freddy-border-color);\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n z-index: 1000;\n padding: 4px 0;\n overflow: visible;\n background: var(--freddy-bg-secondary);\n pointer-events: auto;\n }\n\n .freddy-plugins-dropdown-menu--down {\n top: 100%;\n margin-top: 4px;\n }\n\n .freddy-plugins-dropdown-menu--up {\n bottom: 100%;\n margin-bottom: 4px;\n }\n\n .freddy-plugins-dropdown-search-bar {\n width: 100%;\n max-width: 100%;\n box-sizing: border-box;\n padding: 4px 8px;\n border-bottom: 1px solid var(--freddy-border-secondary);\n }\n\n .freddy-plugins-dropdown-search-input {\n width: 100%;\n max-width: 100%;\n box-sizing: border-box;\n padding: 4px 6px;\n border: 2px solid var(--freddy-border-color);\n border-radius: 4px;\n font-size: 13px;\n background: var(--freddy-bg-primary);\n color: var(--freddy-text-primary);\n }\n\n .freddy-plugins-dropdown-options {\n list-style: none;\n margin: 0;\n padding: 0;\n max-height: 280px;\n overflow-y: auto;\n }\n\n .freddy-plugins-dropdown-option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n padding: 6px 12px;\n cursor: pointer;\n font-size: 14px;\n border-radius: 4px;\n transition: all 0.2s ease;\n background: var(--freddy-bg-secondary) !important;\n pointer-events: auto;\n user-select: none;\n color: var(--freddy-text-primary);\n border: 2px solid transparent;\n }\n\n .freddy-plugins-dropdown-option-label {\n display: flex;\n align-items: center;\n gap: 6px;\n flex: 1 1 0;\n min-width: 0;\n white-space: normal;\n word-break: break-word;\n }\n\n .freddy-plugins-dropdown-option-icon {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-dropdown-option-icon--right {\n margin-left: auto;\n }\n\n .freddy-plugins-dropdown-option-shortcut {\n margin-left: auto;\n font-size: 12px;\n color: var(--freddy-text-tertiary);\n background: var(--freddy-bg-tertiary);\n border-radius: 4px;\n padding: 1px 6px;\n font-family: monospace;\n }\n\n .freddy-plugins-dropdown-option:hover {\n background: var(--freddy-bg-tertiary) !important;\n border-color: var(--freddy-border-secondary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-dropdown-no-options {\n padding: 8px 12px;\n color: var(--freddy-text-tertiary);\n font-size: 13px;\n }\n\n .freddy-plugins-dropdown-toggle-checkbox {\n width: 16px;\n height: 16px;\n border: 2px solid var(--freddy-border-color);\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n\n .freddy-plugins-dropdown-toggle-inner {\n width: 12px;\n height: 12px;\n background-color: var(--freddy-bg-primary);\n border-radius: 2px;\n }\n\n .freddy-plugins-checked {\n background-color: var(--freddy-primary-color);\n border-color: var(--freddy-primary-color);\n }\n\n .freddy-plugins-checked .freddy-plugins-dropdown-toggle-inner {\n display: none;\n }\n\n .freddy-plugins-dropdown-option > .freddy-plugins-switch {\n flex-shrink: 0;\n }\n</style>\n","<template>\n <div class=\"email-verification\" :class=\"`email-verification--${brand}`\">\n <div class=\"verification-container\">\n <div class=\"verification-header\">\n <h2 class=\"verification-title\">Verify Your Email</h2>\n <p class=\"verification-subtitle\">\n We've sent a 4-digit verification code to <strong>{{ email }}</strong>\n </p>\n </div>\n\n <form @submit.prevent=\"handleSubmit\" class=\"verification-form\">\n <div class=\"code-input-container\">\n <div class=\"code-inputs\">\n <input\n v-for=\"(_, index) in 4\"\n :key=\"index\"\n :ref=\"(el: any) => inputRefs[index] = el as HTMLInputElement | null\"\n v-model=\"codeDigits[index]\"\n type=\"text\"\n maxlength=\"1\"\n class=\"code-input\"\n :class=\"`code-input--${brand}`\"\n @input=\"handleDigitInput(index, $event)\"\n @keydown=\"handleKeydown(index, $event)\"\n @paste=\"handlePaste\"\n :disabled=\"loading\"\n autocomplete=\"one-time-code\"\n />\n </div>\n </div>\n\n <div class=\"verification-actions\">\n <BaseButton\n type=\"submit\"\n :label=\"loading ? 'Verifying...' : 'Verify Code'\"\n hierarchy=\"primary\"\n size=\"lg\"\n :loading=\"loading\"\n :disabled=\"!isCodeComplete || loading\"\n :class=\"`verify-button verify-button--${brand}`\"\n />\n </div>\n\n <div v-if=\"error\" class=\"error-message\">\n {{ error }}\n </div>\n\n <div class=\"verification-footer\">\n <p class=\"resend-text\">\n Didn't receive the code?\n <button\n type=\"button\"\n class=\"resend-button\"\n :disabled=\"resendCooldown > 0\"\n @click=\"handleResend\"\n >\n {{\n resendCooldown > 0\n ? `Resend in ${resendCooldown}s`\n : 'Resend code'\n }}\n </button>\n </p>\n </div>\n </form>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, onMounted, nextTick } from 'vue';\n import BaseButton from './Buttons/BaseButton.vue';\n\n interface Props {\n email: string;\n brand?: 'contentplate' | 'flowplate' | 'freddy';\n loading?: boolean;\n error?: string;\n resendCooldown?: number;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n brand: 'contentplate',\n loading: false,\n error: '',\n resendCooldown: 0,\n });\n\n // Use props to avoid unused variable warning\n const { brand, loading, error, resendCooldown } = props;\n\n const emit = defineEmits<{\n verify: [code: string];\n resend: [];\n }>();\n\n // Reactive state\n const codeDigits = ref(['', '', '', '']);\n const inputRefs = ref<(HTMLInputElement | null)[]>([]);\n\n // Computed\n const isCodeComplete = computed(() => {\n return codeDigits.value.every(digit => digit !== '');\n });\n\n const verificationCode = computed(() => {\n return codeDigits.value.join('');\n });\n\n // Methods\n const handleDigitInput = (index: number, event: Event) => {\n const target = event.target as HTMLInputElement;\n const value = target.value;\n\n // Only allow digits\n if (!/^\\d*$/.test(value)) {\n target.value = '';\n return;\n }\n\n codeDigits.value[index] = value;\n\n // Move to next input if digit entered\n if (value && index < 3) {\n nextTick(() => {\n inputRefs.value[index + 1]?.focus();\n });\n }\n };\n\n const handleKeydown = (index: number, event: KeyboardEvent) => {\n // Handle backspace\n if (event.key === 'Backspace' && !codeDigits.value[index] && index > 0) {\n nextTick(() => {\n inputRefs.value[index - 1]?.focus();\n });\n }\n };\n\n const handlePaste = (event: ClipboardEvent) => {\n event.preventDefault();\n const pastedData = event.clipboardData?.getData('text');\n if (!pastedData) return;\n\n const digits = pastedData.replace(/\\D/g, '').slice(0, 4).split('');\n codeDigits.value = [...digits, '', '', '', ''].slice(0, 4);\n\n // Focus the next empty input or the last one\n const nextEmptyIndex = codeDigits.value.findIndex(digit => digit === '');\n const focusIndex = nextEmptyIndex === -1 ? 3 : nextEmptyIndex;\n nextTick(() => {\n inputRefs.value[focusIndex]?.focus();\n });\n };\n\n const handleSubmit = () => {\n if (isCodeComplete.value) {\n emit('verify', verificationCode.value);\n }\n };\n\n const handleResend = () => {\n emit('resend');\n };\n\n // Focus first input on mount\n onMounted(() => {\n nextTick(() => {\n inputRefs.value[0]?.focus();\n });\n });\n</script>\n\n<style>\n .email-verification {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n padding: 2rem;\n }\n\n .verification-container {\n max-width: 400px;\n width: 100%;\n text-align: center;\n }\n\n .verification-header {\n margin-bottom: 2rem;\n }\n\n .verification-title {\n font-size: 1.5rem;\n font-weight: 600;\n margin-bottom: 0.5rem;\n }\n\n .verification-subtitle {\n color: var(--text-500, var(--freddy-text-secondary));\n font-size: 0.875rem;\n }\n\n .verification-form {\n display: flex;\n flex-direction: column;\n gap: 1.5rem;\n }\n\n .code-input-container {\n display: flex;\n justify-content: center;\n }\n\n .code-inputs {\n display: flex;\n gap: 0.75rem;\n }\n\n .code-input {\n width: 3rem;\n height: 3rem;\n text-align: center;\n font-size: 1.25rem;\n font-weight: 600;\n border: 2px solid var(--freddy-border-color);\n border-radius: 0.5rem;\n background: transparent;\n transition: all 0.2s ease;\n }\n\n .code-input:focus {\n outline: none;\n border-color: var(--color-primary-500, var(--freddy-primary-color));\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n\n .code-input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Disable browser autofill styling for code inputs */\n .code-input:-webkit-autofill,\n .code-input:-webkit-autofill:hover,\n .code-input:-webkit-autofill:focus,\n .code-input:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px transparent inset !important;\n -webkit-text-fill-color: inherit !important;\n transition: background-color 5000s ease-in-out 0s;\n background-color: transparent !important;\n background-image: none !important;\n }\n\n .code-input:-moz-autofill,\n .code-input:-moz-autofill:focus {\n background-color: transparent !important;\n color: inherit !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n .code-input:-ms-autofill,\n .code-input:-ms-autofill:focus {\n background-color: transparent !important;\n color: inherit !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n /* Brand-specific styles */\n .code-input--contentplate {\n border-color: var(--color-purple-500, var(--freddy-primary-color));\n }\n\n .code-input--contentplate:focus {\n border-color: var(--color-purple-600, var(--freddy-primary-color));\n box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);\n }\n\n .code-input--flowplate {\n border-color: var(--color-indigo-500, var(--freddy-primary-color));\n background: rgba(99, 102, 241, 0.05);\n }\n\n .code-input--flowplate:focus {\n border-color: var(--color-indigo-600, #4f46e5);\n box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);\n }\n\n .code-input--freddy {\n border-color: var(--freddy-primary-color);\n }\n\n .code-input--freddy:focus {\n border-color: var(--color-primary-600, #0099cc);\n box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);\n }\n\n .verification-actions {\n display: flex;\n justify-content: center;\n }\n\n .verify-button {\n min-width: 200px;\n }\n\n .error-message {\n color: var(--color-destructive-500, var(--freddy-error-color));\n font-size: 0.875rem;\n margin-top: 0.5rem;\n }\n\n .verification-footer {\n margin-top: 1rem;\n }\n\n .resend-text {\n font-size: 0.875rem;\n color: var(--text-500, var(--freddy-text-secondary));\n }\n\n .resend-button {\n background: none;\n border: none;\n color: var(--color-primary-500, var(--freddy-primary-color));\n cursor: pointer;\n font-size: 0.875rem;\n text-decoration: underline;\n }\n\n .resend-button:hover:not(:disabled) {\n color: var(--color-primary-600, var(--freddy-primary-color));\n }\n\n .resend-button:disabled {\n color: var(--border-300, #9ca3af);\n cursor: not-allowed;\n text-decoration: none;\n }\n\n /* Brand-specific button styles */\n .verify-button--contentplate {\n background: var(--color-purple-500, var(--freddy-primary-color)) !important;\n border-color: var(\n --color-purple-500,\n var(--freddy-primary-color)\n ) !important;\n }\n\n .verify-button--flowplate {\n background: var(--color-indigo-500, var(--freddy-primary-color)) !important;\n border-color: var(\n --color-indigo-500,\n var(--freddy-primary-color)\n ) !important;\n }\n\n .verify-button--freddy {\n background: var(--freddy-primary-color) !important;\n border-color: var(--freddy-primary-color) !important;\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-input-field-wrapper\">\n <!-- Label -->\n <label\n v-if=\"label\"\n :for=\"inputId\"\n class=\"freddy-plugins-input-field-label\"\n :class=\"`freddy-plugins-input-field-label--${colorStyle}`\"\n >\n {{ label }}\n <span v-if=\"required\" class=\"freddy-plugins-required-asterisk\">*</span>\n </label>\n\n <!-- Input Container -->\n <div\n class=\"freddy-plugins-input-field-container\"\n :class=\"containerClasses\"\n @click=\"focusInput\"\n >\n <slot />\n </div>\n\n <!-- Hint Text -->\n <p\n v-if=\"hintText\"\n class=\"freddy-plugins-input-hint-text\"\n :class=\"`freddy-plugins-input-hint-text--${colorStyle}`\"\n >\n {{ hintText }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { BaseInputProps } from '@/interfaces/input-field.interfaces';\n\n interface Props extends BaseInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n disabled: false,\n });\n\n const emit = defineEmits<{\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n }>();\n\n // Generate unique input ID\n const inputId = computed(\n () => `input-${Math.random().toString(36).substr(2, 9)}`\n );\n\n // Container classes\n const containerClasses = computed(() => ({\n [`freddy-plugins-input-field-container--${props.size}`]: true,\n [`freddy-plugins-input-field-container--${props.colorStyle}`]: true,\n 'freddy-plugins-input-field-container--destructive':\n props.destructive || props.state === 'error',\n 'freddy-plugins-input-field-container--focused': props.state === 'focused',\n 'freddy-plugins-input-field-container--disabled': props.state === 'disabled',\n 'freddy-plugins-input-field-container--loading': props.state === 'loading',\n 'freddy-plugins-input-field-container--success': props.state === 'success',\n }));\n\n const focusInput = () => {\n if (props.state !== 'disabled') {\n emit('focus', new FocusEvent('focus'));\n }\n };\n\n defineExpose({\n inputId,\n containerClasses,\n focusInput,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-input-field-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n width: 100%;\n position: relative;\n }\n\n .freddy-plugins-input-field-label {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n }\n\n .freddy-plugins-input-field-label--freddy {\n color: var(--text-300, var(--text-muted));\n }\n\n .freddy-plugins-input-field-label--contentplate {\n color: var(--text-700, var(--freddy-text-primary));\n }\n\n .freddy-plugins-required-asterisk {\n color: var(--freddy-fg-error-primary);\n margin-left: 0.125rem;\n }\n\n .freddy-plugins-input-field-container {\n position: relative;\n display: flex;\n align-items: center;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n cursor: text;\n overflow: visible;\n }\n\n /* Freddy color style (dark theme) */\n .freddy-plugins-input-field-container--freddy {\n background-color: #1d2e47;\n border: 2px solid #475569;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n }\n\n .freddy-plugins-input-field-container--freddy:hover:not(.freddy-plugins-input-field-container--disabled) {\n border-color: var(--freddy-text-secondary);\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--freddy.freddy-plugins-input-field-container--focused {\n background-color: #1d2e47;\n border: 2px solid #7ba8ef;\n box-shadow: 0 0 0 3px rgba(123, 168, 239, 0.1),\n 0 4px 6px -1px rgba(0, 0, 0, 0.1);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--freddy.freddy-plugins-input-field-container--destructive {\n border-color: var(--freddy-fg-error-primary);\n }\n\n /* Contentplate color style (light theme) */\n .freddy-plugins-input-field-container--contentplate {\n background-color: var(--bg-50, var(--freddy-bg-primary));\n border: 2px solid var(--border-200, var(--freddy-border-color));\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n }\n\n .freddy-plugins-input-field-container--contentplate:hover:not(\n .freddy-plugins-input-field-container--disabled\n ) {\n border-color: var(--border-300, #9ca3af);\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--contentplate.freddy-plugins-input-field-container--focused {\n border: 2px solid var(--color-primary-500, var(--freddy-primary-color));\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1),\n 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--contentplate.freddy-plugins-input-field-container--destructive {\n border-color: var(--freddy-fg-error-primary);\n }\n\n .freddy-plugins-input-field-container--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Size variants */\n .freddy-plugins-input-field-container--sm {\n height: 40px;\n border-radius: 8px;\n font-size: 0.875rem;\n }\n\n .freddy-plugins-input-field-container--md {\n height: 44px;\n border-radius: 12px;\n font-size: 0.875rem;\n }\n\n .freddy-plugins-input-field-container--lg {\n height: 48px;\n border-radius: 16px;\n font-size: 1rem;\n }\n\n /* Success state */\n .freddy-plugins-input-field-container--success {\n border-color: #10b981 !important;\n }\n\n .freddy-plugins-input-field-container--success.freddy-plugins-input-field-container--focused {\n box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;\n }\n\n /* Loading state */\n .freddy-plugins-input-field-container--loading {\n position: relative;\n }\n\n .freddy-plugins-input-field-container--loading::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(\n 90deg,\n transparent,\n rgba(255, 255, 255, 0.1),\n transparent\n );\n animation: freddy-plugins-shimmer 1.5s infinite;\n }\n\n @keyframes freddy-plugins-shimmer {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n\n /* Hint text */\n .freddy-plugins-input-hint-text {\n font-size: 0.75rem;\n line-height: 1rem;\n margin: 0;\n }\n\n .freddy-plugins-input-hint-text--freddy {\n color: var(--text-muted);\n }\n\n .freddy-plugins-input-hint-text--contentplate {\n color: var(--freddy-text-secondary);\n }\n</style>\n","<template>\n <BaseInput v-bind=\"baseProps\" @focus=\"handleFocus\" @blur=\"handleBlur\">\n <!-- Card Type Icon -->\n <div\n v-if=\"showCardIcon && detectedCardType !== 'unknown'\"\n class=\"freddy-plugins-card-type-icon\"\n :class=\"`freddy-plugins-card-type-icon--${colorStyle}`\"\n >\n <img\n :src=\"getCardTypeIcon(detectedCardType)\"\n :alt=\"`${detectedCardType} card`\"\n class=\"freddy-plugins-card-icon-image\"\n />\n </div>\n\n <!-- Card Input -->\n <input\n :id=\"baseInputRef?.inputId\"\n ref=\"inputRef\"\n v-model=\"displayValue\"\n type=\"text\"\n inputmode=\"numeric\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :maxlength=\"cardNumberMaxLength\"\n class=\"freddy-plugins-input-field freddy-plugins-card-input-field\"\n :class=\"inputClasses\"\n @input=\"handleCardInput\"\n @keydown=\"handleCardKeydown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n\n <!-- Trailing Icon -->\n <component\n v-if=\"resolvedTrailingIcon\"\n :is=\"resolvedTrailingIcon\"\n class=\"freddy-plugins-input-trailing-icon\"\n :class=\"`freddy-plugins-input-trailing-icon--${colorStyle}`\"\n @click=\"handleTrailingIconClick\"\n />\n </BaseInput>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch, defineAsyncComponent } from 'vue';\n import BaseInput from './BaseInput.vue';\n import type {\n CardInputProps,\n CardInputEvents,\n CardType,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends CardInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: '1234 5678 9012 3456',\n cardNumber: '',\n cardType: 'unknown',\n maskInput: true,\n showCardIcon: true,\n disabled: false,\n readonly: false,\n });\n\n const emit = defineEmits<CardInputEvents>();\n\n // Refs\n const inputRef = ref<HTMLInputElement | null>(null);\n const baseInputRef = ref<InstanceType<typeof BaseInput> | null>(null);\n const rawValue = ref('');\n const displayValue = ref('');\n const detectedCardType = ref<CardType>('unknown');\n\n // Computed properties\n const baseProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n disabled: props.disabled,\n }));\n\n // Dynamic icon resolution\n const resolveIcon = (iconName: any) => {\n if (!iconName) return null;\n\n if (typeof iconName === 'object') {\n return iconName;\n }\n\n if (typeof iconName === 'string') {\n return defineAsyncComponent(() =>\n import(`@/icons/${iconName}.vue`).catch(() => {\n console.warn(`Icon \"${iconName}\" not found`);\n return { template: '<div></div>' };\n })\n );\n }\n\n return null;\n };\n\n const resolvedTrailingIcon = computed(() => resolveIcon(props.trailingIcon));\n\n // Card number max length based on card type\n const cardNumberMaxLength = computed(() => {\n switch (detectedCardType.value) {\n case 'amex':\n return 17; // 15 digits + 2 spaces\n default:\n return 19; // 16 digits + 3 spaces\n }\n });\n\n const inputClasses = computed(() => ({\n [`freddy-plugins-input-field--${props.size}`]: true,\n [`freddy-plugins-input-field--${props.colorStyle}`]: true,\n 'freddy-plugins-input-field--destructive': props.destructive,\n 'freddy-plugins-input-field--focused': props.state === 'focused',\n 'freddy-plugins-input-field--disabled': props.state === 'disabled',\n 'freddy-plugins-input-field--with-leading':\n props.showCardIcon && detectedCardType.value !== 'unknown',\n 'freddy-plugins-input-field--with-trailing': !!resolvedTrailingIcon.value,\n }));\n\n // Card type detection\n const detectCardType = (number: string): CardType => {\n const cleanNumber = number.replace(/\\D/g, '');\n\n if (/^4/.test(cleanNumber)) {\n return 'visa';\n } else if (/^5[1-5]/.test(cleanNumber) || /^2[2-7]/.test(cleanNumber)) {\n return 'mastercard';\n } else if (/^3[47]/.test(cleanNumber)) {\n return 'amex';\n } else if (/^6/.test(cleanNumber)) {\n return 'discover';\n }\n\n return 'unknown';\n };\n\n // Card number formatting with proper spacing\n const formatCardNumber = (value: string): string => {\n const cleanValue = value.replace(/\\D/g, '');\n const cardType = detectCardType(cleanValue);\n\n if (cardType === 'amex') {\n // American Express: 4-6-5 format (XXXX XXXXXX XXXXX)\n return cleanValue\n .replace(/(\\d{4})(\\d{6})(\\d{5})/, '$1 $2 $3')\n .replace(/(\\d{4})(\\d{1,6})/, '$1 $2')\n .substring(0, 17);\n } else {\n // Visa, Mastercard, Discover: 4-4-4-4 format (XXXX XXXX XXXX XXXX)\n return cleanValue\n .replace(/(\\d{4})(\\d{4})(\\d{4})(\\d{4})/, '$1 $2 $3 $4')\n .replace(/(\\d{4})(\\d{4})(\\d{4})/, '$1 $2 $3')\n .replace(/(\\d{4})(\\d{4})/, '$1 $2')\n .replace(/(\\d{4})/, '$1')\n .substring(0, 19);\n }\n };\n\n // Card type icons\n const getCardTypeIcon = (cardType: CardType): string => {\n const icons = {\n visa: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qg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sPSJ3aGl0ZSIvPgo8L3N2Zz4=',\n discover:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iI0ZGNjAwMCIvPgo8cGF0aCBkPSJNOCA4SDE2VjE2SDhWOFoiIGZpbGw9IndoaXRlIi8+CjxjaXJjbGUgY3g9IjI4IiBjeT0iMTIiIHI9IjYiIGZpbGw9IndoaXRlIi8+CjwvdXZnPg==',\n unknown: '',\n };\n\n return icons[cardType] || icons.unknown;\n };\n\n // Methods\n const handleCardInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n const inputValue = target.value;\n\n // Store raw value (digits only)\n rawValue.value = inputValue.replace(/\\D/g, '');\n\n // Always format for display with proper spacing\n displayValue.value = formatCardNumber(inputValue);\n\n // Detect card type\n const newCardType = detectCardType(rawValue.value);\n if (newCardType !== detectedCardType.value) {\n detectedCardType.value = newCardType;\n emit('card-type-detected', newCardType);\n }\n\n emit('update:modelValue', displayValue.value);\n emit('update:cardNumber', rawValue.value);\n emit('input', displayValue.value);\n };\n\n const handleCardKeydown = (event: KeyboardEvent) => {\n // Allow backspace, delete, tab, escape, enter\n if (\n [8, 9, 27, 13, 46].indexOf(event.keyCode) !== -1 ||\n // Allow Ctrl+A, Ctrl+C, Ctrl+V, Ctrl+X\n (event.keyCode === 65 && event.ctrlKey === true) ||\n (event.keyCode === 67 && event.ctrlKey === true) ||\n (event.keyCode === 86 && event.ctrlKey === true) ||\n (event.keyCode === 88 && event.ctrlKey === true) ||\n // Allow home, end, left, right\n (event.keyCode >= 35 && event.keyCode <= 39)\n ) {\n return;\n }\n\n // Only allow numbers\n if (\n (event.shiftKey || event.keyCode < 48 || event.keyCode > 57) &&\n (event.keyCode < 96 || event.keyCode > 105)\n ) {\n event.preventDefault();\n }\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleTrailingIconClick = (event: MouseEvent) => {\n emit('trailing-icon-click', event);\n };\n\n const focus = () => {\n inputRef.value?.focus();\n };\n\n // Watch for external card number changes\n watch(\n () => props.cardNumber,\n newValue => {\n if (newValue !== rawValue.value) {\n rawValue.value = newValue;\n displayValue.value = formatCardNumber(newValue);\n detectedCardType.value = detectCardType(newValue);\n }\n },\n { immediate: true }\n );\n\n defineExpose({\n focus,\n inputRef,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-card-type-icon {\n display: flex;\n align-items: center;\n padding: 0 0.75rem;\n margin-right: 8px;\n }\n\n .freddy-plugins-card-type-icon--freddy {\n border-right: 1px solid var(--border-600, #475569);\n }\n\n .freddy-plugins-card-type-icon--contentplate {\n border-right: 1px solid var(--border-200, var(--freddy-border-color));\n }\n\n .freddy-plugins-card-icon-image {\n width: 32px;\n height: 20px;\n object-fit: contain;\n border-radius: 2px;\n }\n\n .freddy-plugins-card-input-field {\n flex: 1;\n background: transparent;\n border: none;\n outline: none;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n padding: 0 0.75rem;\n height: 100%;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono',\n 'Courier New', monospace;\n letter-spacing: 0.05em;\n }\n\n .freddy-plugins-card-input-field--freddy {\n color: var(--text-300, var(--text-muted));\n }\n\n .freddy-plugins-card-input-field--contentplate {\n color: var(--text-700, var(--freddy-text-primary));\n }\n\n .freddy-plugins-card-input-field--freddy::placeholder {\n color: var(--text-muted);\n opacity: 0.7;\n }\n\n .freddy-plugins-card-input-field--contentplate::placeholder {\n color: #9ca3af;\n opacity: 0.7;\n }\n\n .freddy-plugins-card-input-field--disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-input-trailing-icon {\n width: 1.25rem;\n height: 1.25rem;\n margin-right: 0.75rem;\n margin-left: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-trailing-icon--freddy,\n .freddy-plugins-input-trailing-icon--contentplate {\n stroke: var(--freddy-fg-tertiary);\n }\n\n .freddy-plugins-input-trailing-icon:hover {\n transform: scale(1.1);\n }\n</style>\n","<template>\n <BaseInput v-bind=\"baseProps\" @focus=\"handleFocus\" @blur=\"handleBlur\">\n <!-- Leading Icon -->\n <component\n v-if=\"resolvedLeadingIcon\"\n :is=\"resolvedLeadingIcon\"\n class=\"freddy-plugins-input-leading-icon\"\n :class=\"`freddy-plugins-input-leading-icon--${colorStyle}`\"\n @click=\"handleLeadingIconClick\"\n />\n\n <!-- Main Input -->\n <input\n :id=\"baseInputRef?.inputId\"\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n class=\"freddy-plugins-input-field\"\n :class=\"inputClasses\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydown\"\n />\n\n <!-- Trailing Icon with Tooltip -->\n <Tooltip\n v-if=\"trailingIcon === 'IconQuestion' && tooltipText\"\n :text=\"tooltipText\"\n placement=\"top\"\n >\n <component\n :is=\"resolvedTrailingIcon\"\n class=\"freddy-plugins-input-trailing-icon\"\n :class=\"`freddy-plugins-input-trailing-icon--${colorStyle}`\"\n />\n </Tooltip>\n <component\n v-else-if=\"resolvedTrailingIcon\"\n :is=\"resolvedTrailingIcon\"\n class=\"freddy-plugins-input-trailing-icon\"\n :class=\"`freddy-plugins-input-trailing-icon--${colorStyle}`\"\n @click=\"handleTrailingIconClick\"\n />\n </BaseInput>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch, defineAsyncComponent } from 'vue';\n import BaseInput from './BaseInput.vue';\n import Tooltip from '../Tooltip.vue';\n import type {\n DefaultInputProps,\n DefaultInputEvents,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends DefaultInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: '',\n inputType: 'text',\n modelValue: '',\n disabled: false,\n readonly: false,\n });\n\n const emit = defineEmits<DefaultInputEvents>();\n\n // Refs\n const inputRef = ref<HTMLInputElement | null>(null);\n const baseInputRef = ref<InstanceType<typeof BaseInput> | null>(null);\n const inputValue = ref(props.modelValue || '');\n\n // Computed properties\n const baseProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n disabled: props.disabled,\n }));\n\n // Dynamic icon resolution with lazy loading for better performance\n const resolveIcon = (iconName: any) => {\n if (!iconName) return null;\n\n // If it's already a component, return it\n if (typeof iconName === 'object') {\n return iconName;\n }\n\n // If it's a string, create an async component that dynamically imports the icon\n if (typeof iconName === 'string') {\n return defineAsyncComponent(() =>\n import(`@/icons/${iconName}.vue`).catch(() => {\n console.warn(`Icon \"${iconName}\" not found`);\n return { template: '<div></div>' }; // Return empty component as fallback\n })\n );\n }\n\n return null;\n };\n\n const resolvedLeadingIcon = computed(() => resolveIcon(props.leadingIcon));\n const resolvedTrailingIcon = computed(() => resolveIcon(props.trailingIcon));\n\n const inputClasses = computed(() => ({\n [`freddy-plugins-input-field--${props.size}`]: true,\n [`freddy-plugins-input-field--${props.colorStyle}`]: true,\n 'freddy-plugins-input-field--destructive': props.destructive,\n 'freddy-plugins-input-field--focused': props.state === 'focused',\n 'freddy-plugins-input-field--disabled': props.state === 'disabled',\n 'freddy-plugins-input-field--with-leading': !!resolvedLeadingIcon.value,\n 'freddy-plugins-input-field--with-trailing': !!resolvedTrailingIcon.value,\n }));\n\n // Methods\n const handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n inputValue.value = target.value;\n emit('update:modelValue', target.value);\n emit('input', target.value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n emit('keydown', event);\n };\n\n const handleLeadingIconClick = (event: MouseEvent) => {\n emit('leading-icon-click', event);\n };\n\n const handleTrailingIconClick = (event: MouseEvent) => {\n emit('trailing-icon-click', event);\n };\n\n const focus = () => {\n inputRef.value?.focus();\n };\n\n // Watch for external value changes\n watch(\n () => props.modelValue,\n newValue => {\n if (newValue !== undefined) {\n inputValue.value = newValue;\n }\n }\n );\n\n defineExpose({\n focus,\n inputRef,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-input-leading-icon {\n width: 1.25rem;\n height: 1.25rem;\n margin-left: 0.75rem;\n margin-right: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-leading-icon--freddy,\n .freddy-plugins-input-leading-icon--contentplate {\n stroke: var(--freddy-fg-tertiary);\n }\n\n .freddy-plugins-input-leading-icon:hover {\n transform: scale(1.1);\n }\n\n .freddy-plugins-input-trailing-icon {\n width: 1.25rem;\n height: 1.25rem;\n margin-right: 0.75rem;\n margin-left: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-trailing-icon--freddy,\n .freddy-plugins-input-trailing-icon--contentplate {\n stroke: var(--freddy-fg-tertiary);\n }\n\n .freddy-plugins-input-trailing-icon:hover {\n transform: scale(1.1);\n }\n\n .freddy-plugins-input-field {\n flex: 1;\n background: transparent;\n border: none;\n outline: none;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n padding: 0 0.75rem;\n height: 100%;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-field--freddy {\n color: var(--text-300, var(--text-muted));\n }\n\n .freddy-plugins-input-field--contentplate {\n color: var(--text-700, var(--freddy-text-primary));\n }\n\n .freddy-plugins-input-field--freddy::placeholder {\n color: var(--text-muted);\n opacity: 0.7;\n }\n\n .freddy-plugins-input-field--contentplate::placeholder {\n color: #9ca3af;\n opacity: 0.7;\n }\n\n .freddy-plugins-input-field--disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-input-field--with-leading {\n padding-left: 0;\n }\n\n .freddy-plugins-input-field--with-trailing {\n padding-right: 0;\n }\n\n /* Disable browser autofill styling */\n .freddy-plugins-input-field:-webkit-autofill,\n .freddy-plugins-input-field:-webkit-autofill:hover,\n .freddy-plugins-input-field:-webkit-autofill:focus,\n .freddy-plugins-input-field:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px transparent inset !important;\n -webkit-text-fill-color: inherit !important;\n transition: background-color 5000s ease-in-out 0s;\n background-color: transparent !important;\n background-image: none !important;\n }\n</style>\n","<template>\n <BaseInput v-bind=\"baseProps\" @focus=\"handleFocus\" @blur=\"handleBlur\">\n <!-- Country Code Dropdown -->\n <div\n class=\"freddy-plugins-figma-dropdown\"\n :class=\"`freddy-plugins-figma-dropdown--${colorStyle}`\"\n @click=\"toggleCountryDropdown\"\n >\n <span class=\"freddy-plugins-figma-dropdown-text\">{{ selectedCountry.code }}</span>\n <IconChevronDown class=\"freddy-plugins-figma-dropdown-icon\" />\n </div>\n\n <!-- Country Options Dropdown -->\n <div\n v-if=\"showCountryDropdown\"\n class=\"freddy-plugins-country-options-dropdown\"\n :class=\"`freddy-plugins-country-options-dropdown--${colorStyle}`\"\n >\n <div\n v-for=\"country in countryOptions\"\n :key=\"country.code\"\n class=\"freddy-plugins-country-option\"\n :class=\"`freddy-plugins-country-option--${colorStyle}`\"\n @click=\"selectCountry(country)\"\n >\n <span class=\"freddy-plugins-country-flag\">{{ country.flag }}</span>\n <span class=\"freddy-plugins-country-name\">{{ country.name }}</span>\n <span class=\"freddy-plugins-country-dial-code\">{{ country.dialCode }}</span>\n </div>\n </div>\n\n <!-- Phone Input Section -->\n <div class=\"freddy-plugins-figma-text-input\" :class=\"`freddy-plugins-figma-text-input--${colorStyle}`\">\n <input\n :id=\"baseInputRef?.inputId\"\n ref=\"inputRef\"\n v-model=\"phoneNumberValue\"\n type=\"tel\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n class=\"freddy-plugins-figma-phone-input\"\n @input=\"handlePhoneInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n\n <!-- Help Icon -->\n <div v-if=\"trailingIcon === 'IconQuestion'\" class=\"freddy-plugins-figma-help-icon\">\n <Tooltip v-if=\"tooltipText\" :text=\"tooltipText\" placement=\"top\">\n <IconQuestion class=\"freddy-plugins-figma-help-icon-svg\" />\n </Tooltip>\n <IconQuestion v-else class=\"freddy-plugins-figma-help-icon-svg\" />\n </div>\n </div>\n </BaseInput>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch, onMounted, onUnmounted } from 'vue';\n import BaseInput from './BaseInput.vue';\n import Tooltip from '../Tooltip.vue';\n import { IconChevronDown, IconQuestion } from '@/icons/';\n import type {\n PhoneInputProps,\n PhoneInputEvents,\n CountryOption,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends PhoneInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: 'Enter phone number',\n countryCode: 'US',\n phoneNumber: '',\n disabled: false,\n readonly: false,\n });\n\n const emit = defineEmits<PhoneInputEvents>();\n\n // Refs\n const inputRef = ref<HTMLInputElement | null>(null);\n const baseInputRef = ref<InstanceType<typeof BaseInput> | null>(null);\n const phoneNumberValue = ref(props.phoneNumber || '');\n const showCountryDropdown = ref(false);\n const localCountryCode = ref(props.countryCode || 'US');\n\n // Default country options\n const defaultCountryOptions: CountryOption[] = [\n { code: 'US', name: 'United States', flag: '🇺🇸', dialCode: '+1' },\n { code: 'GB', name: 'United Kingdom', flag: '🇬🇧', dialCode: '+44' },\n { code: 'CA', name: 'Canada', flag: '🇨🇦', dialCode: '+1' },\n { code: 'AU', name: 'Australia', flag: '🇦🇺', dialCode: '+61' },\n { code: 'DE', name: 'Germany', flag: '🇩🇪', dialCode: '+49' },\n { code: 'FR', name: 'France', flag: '🇫🇷', dialCode: '+33' },\n { code: 'IT', name: 'Italy', flag: '🇮🇹', dialCode: '+39' },\n { code: 'ES', name: 'Spain', flag: '🇪🇸', dialCode: '+34' },\n { code: 'JP', name: 'Japan', flag: '🇯🇵', dialCode: '+81' },\n { code: 'IN', name: 'India', flag: '🇮🇳', dialCode: '+91' },\n ];\n\n // Computed properties\n const baseProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n disabled: props.disabled,\n }));\n\n const countryOptions = computed(\n () => props.countryOptions || defaultCountryOptions\n );\n\n const selectedCountry = computed(() => {\n return (\n countryOptions.value.find(\n country => country.code === localCountryCode.value\n ) || countryOptions.value[0]\n );\n });\n\n // Methods\n const toggleCountryDropdown = () => {\n if (!props.disabled) {\n showCountryDropdown.value = !showCountryDropdown.value;\n }\n };\n\n const selectCountry = (country: CountryOption) => {\n localCountryCode.value = country.code;\n emit('update:countryCode', country.code);\n emit('country-change', country);\n\n // Update phone number format when country changes\n const currentNumber = phoneNumberValue.value.replace(/^\\+\\d+\\s*/, '');\n const newFormattedNumber = `${country.dialCode} ${currentNumber}`.trim();\n\n phoneNumberValue.value = newFormattedNumber;\n emit('update:phoneNumber', newFormattedNumber);\n emit('update:modelValue', newFormattedNumber);\n\n showCountryDropdown.value = false;\n };\n\n const handlePhoneInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n phoneNumberValue.value = target.value;\n\n const fullNumber = `${selectedCountry.value.dialCode} ${target.value}`;\n emit('update:modelValue', fullNumber);\n emit('update:phoneNumber', target.value);\n emit('input', fullNumber);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const focus = () => {\n inputRef.value?.focus();\n };\n\n // Close dropdown when clicking outside\n const handleClickOutside = (event: Event) => {\n const target = event.target as HTMLElement;\n if (!target.closest('.freddy-plugins-input-field-container')) {\n showCountryDropdown.value = false;\n }\n };\n\n // Watch for prop changes\n watch(\n () => props.countryCode,\n newCode => {\n if (newCode && newCode !== localCountryCode.value) {\n localCountryCode.value = newCode;\n }\n },\n { immediate: true }\n );\n\n watch(\n () => props.phoneNumber,\n newValue => {\n if (newValue !== undefined) {\n phoneNumberValue.value = newValue;\n }\n }\n );\n\n onMounted(() => {\n document.addEventListener('click', handleClickOutside);\n });\n\n onUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n });\n\n defineExpose({\n focus,\n inputRef,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-figma-dropdown {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 8px 12px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n border-right: 1px solid transparent;\n }\n\n .freddy-plugins-figma-dropdown--freddy {\n border-right-color: #475569;\n }\n\n .freddy-plugins-figma-dropdown--contentplate {\n border-right-color: #e5e7eb;\n }\n\n .freddy-plugins-figma-dropdown-text {\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n color: #717680;\n white-space: nowrap;\n }\n\n .freddy-plugins-figma-dropdown-icon {\n width: 16px;\n height: 16px;\n stroke: var(--freddy-fg-tertiary);\n cursor: pointer;\n }\n\n .freddy-plugins-country-options-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 50;\n max-height: 200px;\n overflow-y: auto;\n border-radius: 8px;\n margin-top: 4px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n }\n\n .freddy-plugins-country-options-dropdown--freddy {\n background-color: var(--bg-800, var(--freddy-bg-primary));\n border: 1px solid var(--border-600, #475569);\n }\n\n .freddy-plugins-country-options-dropdown--contentplate {\n background-color: var(--bg-50, var(--freddy-bg-primary));\n border: 1px solid var(--border-200, var(--freddy-border-color));\n }\n\n .freddy-plugins-country-option {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-country-option--freddy:hover {\n background-color: var(--bg-700, #374151);\n }\n\n .freddy-plugins-country-option--contentplate:hover {\n background-color: var(--bg-100, #f3f4f6);\n }\n\n .freddy-plugins-country-flag {\n font-size: 1rem;\n }\n\n .freddy-plugins-country-name {\n flex: 1;\n font-size: 0.875rem;\n }\n\n .freddy-plugins-country-dial-code {\n font-size: 0.875rem;\n font-weight: 500;\n }\n\n .freddy-plugins-figma-text-input {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px 8px 10px;\n flex: 1;\n box-sizing: border-box;\n min-height: 1px;\n min-width: 1px;\n }\n\n .freddy-plugins-figma-phone-input {\n flex: 1;\n background: transparent;\n border: none;\n outline: none;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n color: #ffffff;\n min-height: 1px;\n min-width: 1px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .freddy-plugins-figma-phone-input::placeholder {\n color: #717680;\n }\n\n .freddy-plugins-figma-help-icon {\n width: 16px;\n height: 16px;\n position: relative;\n flex-shrink: 0;\n }\n\n .freddy-plugins-figma-help-icon-svg {\n width: 16px;\n height: 16px;\n stroke: var(--freddy-fg-tertiary);\n cursor: pointer;\n }\n</style>\n","<template>\n <!-- Phone Variant -->\n <PhoneInput\n v-if=\"variant === 'phone'\"\n v-bind=\"phoneProps\"\n @update:modelValue=\"handleUpdate\"\n @update:countryCode=\"handleCountryCodeUpdate\"\n @update:phoneNumber=\"handlePhoneNumberUpdate\"\n @country-change=\"handleCountryChange\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n\n <!-- Card Variant -->\n <CardInput\n v-else-if=\"variant === 'card'\"\n v-bind=\"cardProps\"\n @update:modelValue=\"handleUpdate\"\n @update:cardNumber=\"handleCardNumberUpdate\"\n @card-type-detected=\"handleCardTypeDetected\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @trailing-icon-click=\"handleTrailingIconClick\"\n />\n\n <!-- Default/Other Variants -->\n <DefaultInput\n v-else\n v-bind=\"defaultProps\"\n @update:modelValue=\"handleUpdate\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydown\"\n @leading-icon-click=\"handleLeadingIconClick\"\n @trailing-icon-click=\"handleTrailingIconClick\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import PhoneInput from './PhoneInput.vue';\n import CardInput from './CardInput.vue';\n import DefaultInput from './DefaultInput.vue';\n import type {\n UnifiedInputFieldProps,\n UnifiedInputFieldEvents,\n CountryOption,\n CardType,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends UnifiedInputFieldProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n variant: 'default',\n type: 'default',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: '',\n inputType: 'text',\n modelValue: '',\n disabled: false,\n readonly: false,\n countryCode: 'US',\n phoneNumber: '',\n });\n\n const emit = defineEmits<UnifiedInputFieldEvents>();\n\n // Determine the actual variant to use\n const variant = computed(() => props.variant || props.type || 'default');\n\n // Props for PhoneInput\n const phoneProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n placeholder: props.placeholder,\n countryCode: props.countryCode,\n phoneNumber: props.phoneNumber,\n countryOptions: props.countryOptions,\n trailingIcon: props.trailingIcon,\n tooltipText: props.tooltipText,\n disabled: props.disabled,\n readonly: props.readonly,\n }));\n\n // Props for CardInput\n const cardProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n placeholder: props.placeholder,\n cardNumber: props.cardNumber,\n cardType: props.cardType,\n maskInput: props.maskInput,\n showCardIcon: props.showCardIcon,\n trailingIcon: props.trailingIcon,\n disabled: props.disabled,\n readonly: props.readonly,\n }));\n\n // Props for DefaultInput\n const defaultProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n placeholder: props.placeholder,\n inputType: props.inputType,\n modelValue: props.modelValue,\n leadingIcon: props.leadingIcon,\n trailingIcon: props.trailingIcon,\n tooltipText: props.tooltipText,\n disabled: props.disabled,\n readonly: props.readonly,\n }));\n\n // Event handlers\n const handleUpdate = (value: string) => {\n emit('update:modelValue', value);\n };\n\n const handleInput = (value: string) => {\n emit('input', value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n emit('keydown', event);\n };\n\n const handleLeadingIconClick = (event: MouseEvent) => {\n emit('leading-icon-click', event);\n };\n\n const handleTrailingIconClick = (event: MouseEvent) => {\n emit('trailing-icon-click', event);\n };\n\n // Phone-specific event handlers\n const handleCountryCodeUpdate = (code: string) => {\n emit('update:countryCode', code);\n };\n\n const handlePhoneNumberUpdate = (number: string) => {\n emit('update:phoneNumber', number);\n };\n\n const handleCountryChange = (country: CountryOption) => {\n emit('country-change', country);\n };\n\n // Card-specific event handlers\n const handleCardNumberUpdate = (number: string) => {\n emit('update:cardNumber', number);\n };\n\n const handleCardTypeDetected = (cardType: CardType) => {\n emit('card-type-detected', cardType);\n };\n</script>\n\n<style scoped>\n /* No styles needed - all styling is handled by child components */\n</style>\n","<template>\n <transition name=\"modal\">\n <div\n v-if=\"isVisible\"\n class=\"fixed z-[9998] top-0 left-0 w-full h-full bg-modalBackgroundBlur flex justify-center items-center\"\n >\n <div class=\"flex justify-center items-center\">\n <div\n :class=\"{\n 'p-8 bg-background rounded-[2.5rem] overflow-hidden text-white':\n largeModel,\n 'freddy-plugins-modal-container-large': largeModel,\n }\"\n >\n <div class=\"freddy-plugins-modal-header\">\n <slot name=\"header\"></slot>\n </div>\n\n <div class=\"freddy-plugins-modal-body\">\n <slot name=\"body\"></slot>\n </div>\n\n <div class=\"freddy-plugins-modal-footer\">\n <slot name=\"footer\">\n <!-- <button class=\"modal-default-button\" @click=\"$emit('close')\">\n OK\n </button> -->\n </slot>\n </div>\n </div>\n </div>\n </div>\n </transition>\n</template>\n\n<script>\nexport default {\n name: \"ModalBox\",\n props: {\n isVisible: {\n type: Boolean,\n default: true,\n },\n largeModel: {\n type: Boolean,\n default: true,\n },\n },\n methods: {\n closeModal() {\n this.$emit(\"close\");\n },\n },\n};\n</script>\n\n<style>\n/* Modal background blur */\n.bg-modalBackgroundBlur {\n background-color: rgba(29, 46, 71, 0.9);\n backdrop-filter: blur(4px);\n}\n\n/* Background color */\n.bg-background {\n background-color: #0f172a;\n}\n\n/* Modal container */\n.freddy-plugins-modal-container {\n background-color: var(--bg-900, var(--freddy-bg-primary)); /* background */\n padding: 2rem; /* p-8 */\n border-radius: 2.5rem; /* rounded-[2.5rem] */\n overflow: hidden;\n color: white;\n}\n\n.freddy-plugins-modal-header:last-child,\n.freddy-plugins-modal-body:last-child,\n.freddy-plugins-modal-footer:last-child {\n margin-bottom: 0;\n}\n\n/* Modal transition animations */\n.modal-enter-active,\n.modal-leave-active {\n transition: all 0.3s ease;\n}\n\n.modal-enter-from,\n.modal-leave-to {\n opacity: 0;\n transform: scale(0.9);\n}\n\n.modal-enter-to,\n.modal-leave-from {\n opacity: 1;\n transform: scale(1);\n}\n\n/* Responsive width utilities - using proper CSS instead of escaped class names */\n@media (min-width: 1280px) {\n .freddy-plugins-modal-container-large {\n width: 56.25rem;\n }\n}\n\n@media (max-width: 1279px) and (min-width: 1024px) {\n .freddy-plugins-modal-container-large {\n width: 56.25rem;\n }\n}\n\n@media (max-width: 1023px) and (min-width: 768px) {\n .freddy-plugins-modal-container-large {\n width: 56.25rem;\n }\n}\n\n@media (max-width: 767px) and (min-width: 640px) {\n .freddy-plugins-modal-container-large {\n width: 45.625rem;\n }\n}\n\n@media (max-width: 639px) and (min-width: 480px) {\n .freddy-plugins-modal-container-large {\n width: 31.25rem;\n }\n}\n\n@media (max-width: 479px) {\n .freddy-plugins-modal-container-large {\n width: auto;\n max-width: 90%;\n }\n}\n</style>\n","<template>\n <ModalBox :isVisible=\"isVisible\" >\n <template #header>\n <h2>Instructions</h2>\n </template>\n <template #body>\n <p>Instructions</p>\n </template>\n </ModalBox>\n</template>\n\n<script setup lang=\"ts\">\nimport ModalBox from '@/components/ModalBox.vue'\n\ndefineProps({\n isVisible: {\n type: Boolean,\n required: true\n }\n})\n</script>","<template>\n <input\n type=\"text\"\n :value=\"inputValue\"\n :placeholder=\"placeholder\"\n :style=\"{ width: '100%', height: height }\"\n @input=\"handleInput\"\n class=\"instruction-text-input\"\n aria-label=\"Instruction input\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n const props = defineProps<{\n inputValue: string;\n placeholder: string;\n height?: string;\n }>();\n\n const emit = defineEmits<{\n (e: 'update:inputValue', value: string): void;\n }>();\n\n const height = computed(() => props.height || '40px');\n\n const handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n emit('update:inputValue', target.value);\n };\n</script>\n\n<style scoped>\n .instruction-text-input {\n box-sizing: border-box;\n font-size: 1rem;\n padding: 0.5rem 1rem;\n border-radius: var(--radius-md, 8px);\n border: 1px solid var(--freddy-border-secondary, #35414b);\n background: var(--freddy-bg-primary, #031525);\n color: #222;\n width: 100%;\n outline: none;\n box-shadow: 0 1px 2px 0 var(--freddy-shadow-sm, rgba(255, 255, 255, 0));\n transition: border-color 0.2s;\n }\n .instruction-text-input:focus {\n border-color: #888;\n }\n</style>\n","<template>\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n class=\"freddy-plugins-modal-overlay\"\n @click=\"clickOutside\"\n >\n <div class=\"freddy-plugins-modal-content\" @click.stop>\n <header class=\"freddy-plugins-modal-header\">\n <h2 class=\"freddy-plugins-modal-title\" :class=\"headerClass\">\n {{ modalTitle }}\n </h2>\n <button class=\"freddy-plugins-modal-close\" @click=\"closeModal\">\n <IconLightCross class=\"freddy-plugins-modal-close-icon\" />\n </button>\n </header>\n <div class=\"freddy-plugins-modal-body\">\n <slot name=\"content\" />\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\nimport IconLightCross from \"@/icons/IconLightCross.vue\";\n\nconst props = defineProps<{\n modalTitle: string;\n headerClass: string;\n disableClickOutside?: boolean;\n}>();\n\nconst emits = defineEmits([\"close\"]);\n\nconst closeModal = () => {\n emits(\"close\");\n};\n\nconst clickOutside = () => {\n if (!props.disableClickOutside) {\n closeModal();\n }\n};\n</script>\n\n<style>\n.freddy-plugins-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(3, 21, 37, 0.77);\n backdrop-filter: blur(4px);\n z-index: 1000;\n overflow: auto;\n}\n\n.freddy-plugins-modal-content {\n background-color: var(--text-900, var(--freddy-bg-primary));\n border-radius: 40px;\n box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.25);\n padding: 30px;\n position: relative;\n margin: auto;\n min-width: 370px;\n max-width: 90%;\n width: auto;\n}\n\n.freddy-plugins-modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 28px;\n gap: 8px;\n}\n\n.freddy-plugins-modal-title {\n font-size: 29px;\n line-height: 35px;\n font-weight: 600;\n margin: 0;\n}\n\n.freddy-plugins-modal-close {\n background: none;\n border: none;\n font-size: 35px;\n font-weight: 400;\n color: white;\n padding: 0;\n line-height: 1;\n cursor: pointer;\n}\n\n.freddy-plugins-modal-close-icon {\n width: 16px;\n height: 16px;\n stroke-width: 2px;\n}\n\n.freddy-plugins-modal-body {\n /* optional: wrap content styles */\n}\n</style>\n","<!-- Spinner.vue -->\n<template>\n <div class=\"freddy-plugin-spinner\" :class=\"customClass\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\ndefineProps<{\n customClass?: string;\n}>();\n</script>\n\n<style>\n.freddy-plugin-spinner {\n width: 20px;\n height: 20px;\n border: 2px solid #f3f3f3;\n border-top-color: transparent;\n border-radius: 50%;\n animation: freddy-plugin-spin 1s linear infinite;\n}\n\n@keyframes freddy-plugin-spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n</style>\n","<template>\n <div\n ref=\"dropdownRef\"\n class=\"freddy-search-wrapper\"\n :class=\"attrs.class\"\n @click=\"focusInput\"\n >\n <IconSearchOptimised class=\"freddy-search-icon\" />\n <input\n type=\"text\"\n id=\"search-input\"\n class=\"freddy-search-input\"\n ref=\"searchInput\"\n v-model=\"inputValue\"\n @input=\"handleInput\"\n :placeholder=\"placeholder\"\n :maxlength=\"maxCharLimit\"\n />\n <Spinner class=\"freddy-search-spinner\" v-if=\"showLoaderForSearch\" />\n <IconCross\n class=\"freddy-search-close\"\n v-if=\"showCloseButton && !showLoaderForSearch && inputValue?.length\"\n @click=\"handleClear\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, useAttrs } from 'vue';\n import Spinner from '@/components/Spinner.vue';\n import { IconSearchOptimised, IconCross } from '@/icons';\n\n defineOptions({ inheritAttrs: false });\n\n const attrs = useAttrs();\n\n const inputValue = ref<string | null>(null);\n const searchInput = ref<HTMLInputElement | null>(null);\n const dropdownRef = ref<HTMLElement | null>(null);\n\n interface SearchInputProps {\n /** Placeholder text for the search input */\n placeholder?: string;\n /** Whether to show a loading spinner */\n showLoaderForSearch?: boolean;\n /** Maximum number of characters allowed in the input */\n maxCharLimit?: number;\n /** Whether to show a close button */\n showCloseButton?: boolean;\n }\n\n withDefaults(defineProps<SearchInputProps>(), {\n placeholder: 'Search here...',\n showLoaderForSearch: false,\n maxCharLimit: undefined,\n showCloseButton: false,\n });\n\n const emit = defineEmits<{\n (event: 'update:searchInput', inputValue: string | null): void;\n (event: 'clear'): void;\n }>();\n\n const focusInput = () => {\n searchInput.value?.focus();\n };\n\n const handleInput = () => {\n emit('update:searchInput', inputValue.value);\n };\n\n const handleClear = () => {\n emit('clear');\n };\n</script>\n\n<style>\n .freddy-search-wrapper {\n display: flex;\n box-sizing: border-box;\n align-items: flex-start;\n gap: 0.5rem; /* gap-2 */\n height: 37px;\n width: 100%;\n border: 2px solid var(--freddy-border-color);\n padding-left: 0.875rem;\n padding-right: 0.875rem;\n border-radius: 0.5rem;\n cursor: text;\n }\n\n .freddy-search-icon {\n flex-shrink: 0;\n width: 1.25rem;\n height: 1.25rem;\n align-self: center;\n stroke: var(--text-muted);\n }\n\n .freddy-search-input {\n flex: 1 1 auto;\n width: 100%;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n background: transparent;\n border: none;\n outline: none;\n color: var(--text-300, var(--text-muted));\n align-self: center;\n }\n\n .freddy-search-input::placeholder {\n color: #cbd6e3;\n }\n\n /* Disable browser autofill styling for search input */\n .freddy-search-input:-webkit-autofill,\n .freddy-search-input:-webkit-autofill:hover,\n .freddy-search-input:-webkit-autofill:focus,\n .freddy-search-input:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px transparent inset !important;\n -webkit-text-fill-color: var(--text-300, var(--text-muted)) !important;\n transition: background-color 5000s ease-in-out 0s;\n background-color: transparent !important;\n background-image: none !important;\n }\n\n .freddy-search-input:-moz-autofill,\n .freddy-search-input:-moz-autofill:focus {\n background-color: transparent !important;\n color: var(--text-300, var(--text-muted)) !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n .freddy-search-input:-ms-autofill,\n .freddy-search-input:-ms-autofill:focus {\n background-color: transparent !important;\n color: var(--text-300, var(--text-muted)) !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n .freddy-search-spinner {\n width: 21px !important;\n align-self: center;\n }\n\n .freddy-search-close {\n width: 12px;\n height: 12p;\n align-self: center;\n color: var(--freddy-text-quaternary);\n }\n</style>\n","<template>\n <div class=\"model-dropdown-wrapper\" @keydown.esc=\"closeDropdown\">\n <div\n class=\"model-dropdown-trigger\"\n :class=\"[\n `model-dropdown-trigger--${size}`,\n { 'model-dropdown-trigger--open': open },\n ]\"\n @click=\"toggleDropdown\"\n >\n <div class=\"model-dropdown-selected-content\">\n <img\n v-if=\"selectedOption?.imageSrc\"\n :src=\"selectedOption.imageSrc\"\n :alt=\"selectedOption.value\"\n class=\"model-dropdown-selected-image\"\n />\n <span class=\"model-dropdown-placeholder\">\n {{ selectedOption?.value || modelPlaceholder }}\n </span>\n </div>\n <IconChevronDown v-if=\"!open\" class=\"model-dropdown-chevron\" />\n <IconChevronUp v-else class=\"model-dropdown-chevron\" />\n </div>\n\n <!-- Dropdown Menu -->\n <div v-if=\"open\" class=\"model-dropdown-menu\">\n <div v-if=\"searchable\" class=\"model-dropdown-search\">\n <SearchInput\n v-model=\"searchQuery\"\n :placeholder=\"searchPlaceholder\"\n :showCloseButton=\"true\"\n />\n </div>\n\n <ul class=\"model-dropdown-options\">\n <li\n v-for=\"option in filteredOptions\"\n :key=\"option.id\"\n class=\"model-dropdown-option\"\n :class=\"{\n 'model-dropdown-option--selected': selectedOption?.id === option.id,\n }\"\n @click=\"selectOption(option)\"\n >\n <img\n v-if=\"option.imageSrc\"\n :src=\"option.imageSrc\"\n :alt=\"option.value\"\n class=\"model-dropdown-option-image\"\n />\n <span class=\"model-dropdown-option-value\">{{ option.value }}</span>\n </li>\n\n <li\n v-if=\"filteredOptions.length === 0\"\n class=\"model-dropdown-no-options\"\n >\n No providers found\n </li>\n </ul>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, watch, onUnmounted } from \"vue\";\nimport IconChevronDown from \"@/icons/IconChevronDown.vue\";\nimport IconChevronUp from \"@/icons/IconChevronUp.vue\";\nimport SearchInput from \"./SearchInput.vue\";\n\nexport interface ModelOption {\n id: string | number;\n value: string;\n imageSrc?: string;\n}\n\nexport interface ModelDropdownProps {\n options: ModelOption[];\n searchable?: boolean;\n searchPlaceholder?: string;\n modelPlaceholder?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst props = withDefaults(defineProps<ModelDropdownProps>(), {\n searchable: false,\n searchPlaceholder: \"Search providers...\",\n modelPlaceholder: \"Select a model\",\n size: \"md\",\n});\n\nconst emit = defineEmits<{\n (event: \"select\", option: ModelOption): void;\n}>();\n\nconst open = ref(false);\nconst searchQuery = ref(\"\");\nconst selectedOption = ref<ModelOption | null>(null);\n\n// Computed properties\nconst filteredOptions = computed(() => {\n if (!props.searchable || !searchQuery.value) return props.options;\n return props.options.filter((option) =>\n option.value.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n});\n\n// Methods\nconst toggleDropdown = () => {\n open.value = !open.value;\n if (!open.value) searchQuery.value = \"\";\n};\n\nconst closeDropdown = () => {\n open.value = false;\n searchQuery.value = \"\";\n};\n\nconst selectOption = (option: ModelOption) => {\n selectedOption.value = option;\n emit(\"select\", option);\n closeDropdown();\n};\n\n// Outside click handler\nconst handleClickOutside = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n if (!target.closest(\".model-dropdown-wrapper\")) {\n closeDropdown();\n }\n};\n\n// Watch for dropdown state changes\nwatch(open, (isOpen) => {\n if (isOpen) {\n setTimeout(() => {\n document.addEventListener(\"click\", handleClickOutside);\n }, 0);\n } else {\n document.removeEventListener(\"click\", handleClickOutside);\n }\n});\n\nonUnmounted(() => {\n document.removeEventListener(\"click\", handleClickOutside);\n});\n</script>\n\n<style scoped>\n.model-dropdown-wrapper {\n position: relative;\n width: 100%;\n}\n\n.model-dropdown-trigger {\n gap: 40px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 12px;\n border: 1px solid var(--Colors-Border-border-secondary, #35414b);\n border-radius: 8px;\n background: var(--freddy-bg-primary);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.model-dropdown-trigger:hover {\n border-color: var(--freddy-primary-color);\n}\n\n.model-dropdown-trigger--open {\n border-color: var(--freddy-primary-color);\n}\n\n/* Size variants */\n.model-dropdown-trigger--sm {\n height: 36px;\n}\n\n.model-dropdown-trigger--md {\n height: 40px;\n}\n\n.model-dropdown-trigger--lg {\n height: 42px;\n}\n\n.model-dropdown-selected-content {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n}\n\n.model-dropdown-selected-image {\n width: 20px;\n height: 20px;\n object-fit: contain;\n border-radius: 4px;\n flex-shrink: 0;\n}\n\n.model-dropdown-placeholder {\n font-size: 14px;\n color: var(--freddy-text-primary);\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.model-dropdown-chevron {\n width: 16px;\n height: 16px;\n color: var(--freddy-text-tertiary);\n}\n\n/* Dropdown Menu */\n.model-dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n margin-top: 4px;\n background: var(--freddy-bg-primary);\n border: 2px solid var(--freddy-border-color);\n border-radius: 8px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n overflow: hidden;\n}\n\n.model-dropdown-search {\n padding: 8px;\n border-bottom: 1px solid var(--freddy-border-secondary);\n}\n\n.model-dropdown-options {\n list-style: none;\n margin: 0;\n padding: 4px 0;\n max-height: 280px;\n overflow-y: auto;\n}\n\n.model-dropdown-search .freddy-search-wrapper {\n width: 100%;\n background: var(--freddy-bg-secondary);\n border: 1px solid var(--freddy-border-color);\n border-radius: 4px;\n}\n\n.model-dropdown-search .freddy-search-input {\n color: var(--freddy-text-primary);\n font-size: 13px;\n}\n\n.model-dropdown-search .freddy-search-wrapper:focus-within {\n border-color: var(--freddy-primary-color);\n}\n\n.model-dropdown-option {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n\n.model-dropdown-option:hover {\n background: var(--freddy-bg-secondary);\n}\n\n.model-dropdown-option--selected {\n background: var(--freddy-bg-tertiary);\n}\n\n.model-dropdown-option-image {\n width: 20px;\n height: 20px;\n object-fit: contain;\n border-radius: 4px;\n}\n\n.model-dropdown-option-value {\n font-size: 14px;\n color: var(--freddy-text-primary);\n}\n\n.model-dropdown-no-options {\n padding: 12px;\n text-align: center;\n color: var(--freddy-text-tertiary);\n font-size: 13px;\n}\n</style>\n","<template>\n <EditFeaturedExcerptModal\n :is-visible=\"isVisible\"\n title=\"Edit response format\"\n description=\"Use a JSON schema to define the structure of the model's response format. Learn more.\"\n :initial-content=\"initialJsonContent\"\n :openai-api-key=\"openaiApiKey\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"openaiOrganization\"\n @close=\"$emit('close')\"\n @save=\"handleSave\"\n @cancel=\"$emit('cancel')\"\n @ask-a-i=\"$emit('askAI', $event)\"\n @toggle-a-i=\"handleToggleAI\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import EditFeaturedExcerptModal from './EditFeaturedExcerptModal.vue';\n\n const props = defineProps({\n isVisible: {\n type: Boolean,\n required: true,\n },\n initialJsonContent: {\n type: String,\n default: '{}',\n },\n openaiApiKey: {\n type: String,\n default: '',\n },\n openaiModel: {\n type: String,\n default: 'gpt-4o-mini',\n },\n openaiOrganization: {\n type: String,\n default: '',\n },\n });\n\n const emit = defineEmits(['close', 'save', 'cancel', 'askAI', 'toggleAI']);\n\n const handleSave = (content: string) => {\n // Validate JSON before saving\n try {\n JSON.parse(content);\n emit('save', content);\n } catch {\n alert('Invalid JSON format. Please fix the JSON before saving.');\n }\n };\n\n const handleToggleAI = (isActive: boolean) => {\n emit('toggleAI', isActive);\n };\n</script>\n","<template>\n <nav\n v-if=\"totalPages > 0\"\n class=\"freddy-pagination-nav\"\n aria-label=\"Pagination\"\n >\n <button\n class=\"freddy-pagination-end-button\"\n :class=\"{ 'freddy-pagination-hover-enabled': currentPage !== 1 }\"\n @click=\"goToPage(currentPage - 1)\"\n :disabled=\"currentPage === 1\"\n >\n Previous\n </button>\n\n <div class=\"freddy-pagination-dynamic-container\">\n <button\n v-for=\"page in pages\"\n :key=\"String(page)\"\n class=\"freddy-pagination-number-button\"\n :class=\"{ active: page === currentPage }\"\n @click=\"goToPage(page)\"\n :disabled=\"page === '...' || page === currentPage\"\n >\n {{ page }}\n </button>\n\n <button\n class=\"freddy-pagination-end-button freddy-pagination-next-button\"\n :class=\"{\n 'freddy-pagination-hover-enabled': currentPage !== totalPages,\n }\"\n @click=\"goToPage(currentPage + 1)\"\n :disabled=\"currentPage === totalPages || totalPages === 0\"\n >\n Next\n </button>\n </div>\n </nav>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed } from 'vue';\n\n const props = defineProps({\n totalItems: { type: Number, required: true, default: 0 },\n itemsPerPage: { type: Number, required: true, default: 10 },\n currentPage: { type: Number, required: true, default: 1 },\n });\n\n const emit = defineEmits(['update:currentPage']);\n\n const totalPages = computed(() => {\n if (!props.totalItems || isNaN(props.totalItems)) return 0;\n return Math.ceil(props.totalItems / props.itemsPerPage);\n });\n\n const pages = computed(() => {\n const result: (number | string)[] = [];\n const tp = totalPages.value;\n const cp = props.currentPage;\n\n if (tp <= 7) {\n for (let i = 1; i <= tp; i++) {\n result.push(i);\n }\n } else {\n result.push(1);\n\n if (cp > 4) {\n result.push('...');\n } else {\n result.push(2, 3);\n }\n\n for (let i = Math.max(4, cp - 1); i <= Math.min(tp - 3, cp + 1); i++) {\n result.push(i);\n }\n\n if (cp < tp - 4) {\n result.push('...');\n }\n\n result.push(tp - 2, tp - 1, tp);\n }\n\n return result;\n });\n\n function goToPage(page: number | string) {\n if (page === '...' || page === props.currentPage) return;\n if (typeof page === 'number' && page >= 1 && page <= totalPages.value) {\n emit('update:currentPage', page);\n }\n }\n</script>\n\n<style>\n .freddy-pagination-nav {\n width: 100%;\n display: flex;\n gap: 0.25rem;\n justify-content: space-between;\n padding-top: 14px;\n padding-bottom: 18px;\n position: relative;\n bottom: 0;\n }\n\n .freddy-pagination-number-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n color: rgb(107 114 128);\n cursor: pointer;\n padding: 0.5rem 0.75rem;\n height: auto;\n background: transparent;\n border: none;\n transition: background-color 0.2s, color 0.2s;\n }\n\n /* Active Page Button Style */\n .freddy-pagination-number-button.active {\n background-color: rgba(255, 255, 255, 0.1);\n color: white;\n }\n\n .freddy-pagination-dynamic-container {\n display: flex;\n gap: 0.25rem;\n }\n\n .freddy-pagination-end-button {\n margin-inline-start: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 1rem;\n height: 2.5rem;\n line-height: 1.25rem;\n color: rgb(107 114 128);\n background-color: rgb(3 21 37);\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 0.5rem;\n cursor: pointer;\n transition: background-color 0.2s, color 0.2s;\n }\n\n .freddy-pagination-next-button {\n margin-left: 1rem;\n }\n\n /* Hover Enabled State */\n .freddy-pagination-hover-enabled:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: white;\n cursor: pointer;\n }\n</style>\n","<template>\n <button\n class=\"chat-bar-send-btn\"\n :class=\"{ active: active, [`chat-bar-send-btn--${size}`]: true }\"\n :disabled=\"disabled\"\n @click=\"$emit('click')\"\n >\n <component :is=\"IconSend\" class=\"chat-bar-send-icon\" />\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from \"@/composables/useTheme\";\n\nconst { currentProject, currentColorMode } = useTheme();\n\nimport IconSend from \"@/icons/IconSend.vue\";\nimport IconStopCircle from \"@/icons/IconStopCircle.vue\";\ndefineProps<{\n disabled?: boolean;\n active?: boolean;\n size?: \"s\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n}>();\n</script>\n\n<style>\n.chat-bar-send-btn {\n background: var(--color-primary-500, var(--freddy-primary-color));\n border: none;\n padding: 0;\n margin-bottom: 4px;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--text-inverse); /* Default icon color */\n transition: color 0.2s, background 0.2s;\n}\n\n/* Size variants */\n.chat-bar-send-btn--s {\n width: 24px;\n height: 24px;\n}\n\n.chat-bar-send-btn--sm {\n width: 28px;\n height: 28px;\n}\n\n.chat-bar-send-btn--md {\n width: 32px;\n height: 32px;\n}\n\n.chat-bar-send-btn--lg {\n width: 36px;\n height: 36px;\n}\n\n.chat-bar-send-btn--xl {\n width: 40px;\n height: 40px;\n}\n\n.chat-bar-send-btn.active {\n color: var(--text-300, #cbd6e3); /* Active icon color */\n}\n\n.chat-bar-send-btn:disabled {\n background: var(--bg-300, var(--freddy-border-color));\n cursor: not-allowed;\n color: var(--text-400, var(--text-muted)); /* Disabled icon color */\n}\n\n.chat-bar-send-icon {\n width: 20px;\n height: 20px;\n}\n\n/* Adjust icon size for different button sizes */\n.chat-bar-send-btn--s .chat-bar-send-icon {\n width: 14px;\n height: 14px;\n}\n\n.chat-bar-send-btn--sm .chat-bar-send-icon {\n width: 16px;\n height: 16px;\n}\n\n.chat-bar-send-btn--lg .chat-bar-send-icon {\n width: 22px;\n height: 22px;\n}\n\n.chat-bar-send-btn--xl .chat-bar-send-icon {\n width: 24px;\n height: 24px;\n}\n</style>\n","<script setup lang=\"ts\">\n import type { ISkeletonType } from '@/interfaces';\n\n const props = defineProps<{\n type: ISkeletonType;\n hasHeader?: boolean;\n count?: number;\n }>();\n\n const { type, hasHeader = false, count = 5 } = props;\n</script>\n\n<template>\n <!-- Card Skeleton -->\n <template v-if=\"type === 'card'\">\n <div class=\"skeleton-card\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-w-32 skeleton-h-6 mb-2\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-3-4\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-full\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-5-6\"\n ></div>\n </div>\n </template>\n\n <!-- Paragraph Skeleton -->\n <template v-else-if=\"type === 'paragraph'\">\n <div class=\"skeleton-paragraph\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-40 mb-2\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-full\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-5-6\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-3-4\"\n ></div>\n </div>\n </template>\n\n <!-- Single Box Skeleton -->\n <template v-else-if=\"type === 'single-box'\">\n <div class=\"skeleton-single-box\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-40 mb-2\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-full\"\n ></div>\n </div>\n </template>\n\n <!-- Table Skeleton -->\n <template v-else-if=\"type === 'table'\">\n <div class=\"skeleton-table\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-40\"\n ></div>\n <table class=\"table-full\">\n <tbody>\n <tr v-for=\"i in count\" :key=\"i\">\n <td class=\"td-padding\">\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-8 skeleton-w-full\"\n ></div>\n </td>\n <td class=\"td-padding\">\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-8 skeleton-w-full\"\n ></div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </template>\n</template>\n\n<style>\n /* Main container styles */\n .skeleton-card {\n background-color: var(--freddy-bg-primary) a8;\n padding: 1rem;\n border: 2px solid var(--text-50, var(--text-inverse)) fff0a;\n border-radius: 0.5rem;\n box-shadow: 4px 7px 27px -13px #fdfdff0f;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n .skeleton-paragraph,\n .skeleton-single-box,\n .skeleton-single-paragraph {\n padding: 1rem;\n border: 2px solid var(--text-50, var(--text-inverse)) fff0a;\n border-radius: 0.75rem;\n background-color: var(--freddy-bg-primary) a8;\n box-shadow: 4px 7px 27px -13px #fdfdff0f;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .skeleton-single-box {\n padding: 8px;\n }\n\n .skeleton-table {\n background-color: var(--freddy-bg-primary) a8;\n padding: 1rem;\n border: 2px solid var(--text-50, var(--text-inverse)) fff0a;\n border-radius: 0.5rem;\n overflow: hidden;\n box-shadow: 4px 7px 27px -13px #fdfdff0f;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n /* Skeleton shimmer */\n .skeleton-wave {\n position: relative;\n overflow: hidden;\n background-color: var(--text-900, var(--freddy-bg-primary));\n }\n .skeleton-wave::after {\n content: '';\n position: absolute;\n top: 0;\n left: -150%;\n height: 100%;\n width: 150%;\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0) 0%,\n rgba(255, 255, 255, 0.7) 50%,\n rgba(255, 255, 255, 0) 100%\n );\n animation: wave 3s ease-in-out infinite;\n }\n @keyframes wave {\n 0% {\n left: -150%;\n }\n 50% {\n left: 100%;\n }\n 100% {\n left: 100%;\n }\n }\n\n /* Skeleton line sizes */\n .skeleton-line {\n background-color: var(--text-50, var(--text-inverse)) fff17;\n border-radius: 0.25rem;\n }\n .skeleton-h-4 {\n height: 1rem;\n }\n .skeleton-h-6 {\n height: 1.5rem;\n }\n .skeleton-h-8 {\n height: 2rem;\n }\n\n .skeleton-w-full {\n width: 100%;\n }\n .skeleton-w-5-6 {\n width: 83.333333%;\n }\n .skeleton-w-3-4 {\n width: 75%;\n }\n .skeleton-w-40 {\n width: 10rem;\n }\n .skeleton-w-32 {\n width: 8rem;\n }\n\n /* Table styles */\n .table-full {\n min-width: 100%;\n border-collapse: collapse;\n }\n .td-padding {\n padding: 0.5rem 1.5rem;\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-slider-container\">\n <!-- Header row with label/tooltip and value display -->\n <div v-if=\"label || showValue\" class=\"freddy-plugins-slider-header\">\n <div v-if=\"label\" class=\"freddy-plugins-slider-label-section\">\n <span class=\"freddy-plugins-slider-label\">{{ label }}</span>\n <Tooltip v-if=\"tooltip\" :text=\"tooltip\" :placement=\"tooltipPlacement\">\n <IconInfoRounded class=\"freddy-plugins-slider-tooltip-icon\" />\n </Tooltip>\n </div>\n <div v-if=\"showValue\" class=\"freddy-plugins-slider-value-badge\">\n {{ displayValue }}\n </div>\n </div>\n\n <!-- Slider track -->\n <div\n class=\"freddy-plugins-slider-track-container\"\n :class=\"{ 'freddy-plugins-slider-disabled': disabled }\"\n @click=\"handleTrackClick\"\n @keydown=\"handleKeyDown\"\n :tabindex=\"disabled ? -1 : 0\"\n role=\"slider\"\n :aria-valuemin=\"min\"\n :aria-valuemax=\"max\"\n :aria-valuenow=\"modelValue\"\n :aria-disabled=\"disabled\"\n :aria-label=\"label || 'Slider'\"\n >\n <!-- Background track -->\n <div\n ref=\"sliderTrack\"\n class=\"freddy-plugins-slider-track-background\"\n ></div>\n\n <!-- Progress fill -->\n <div\n class=\"freddy-plugins-slider-track-progress\"\n :style=\"{ width: progressPercentage + '%' }\"\n ></div>\n\n <!-- Thumb -->\n <div\n class=\"freddy-plugins-slider-thumb\"\n :class=\"{\n 'freddy-plugins-slider-thumb-dragging': isDragging,\n 'freddy-plugins-slider-thumb-disabled': disabled,\n }\"\n :style=\"{ left: thumbPosition + '%' }\"\n @mousedown=\"handleMouseDown\"\n @touchstart=\"handleTouchStart\"\n ></div>\n </div>\n\n <!-- Hint text -->\n <p v-if=\"hint\" class=\"freddy-plugins-slider-hint\">\n {{ hint }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import IconInfoRounded from '@/icons/IconInfoRounded.vue';\n import Tooltip from './Tooltip.vue';\n import type { SliderProps } from '@/interfaces/slider.interfaces';\n\n const props = withDefaults(defineProps<SliderProps>(), {\n min: 0,\n max: 100,\n step: 1,\n disabled: false,\n showValue: true,\n range: false,\n tooltipPlacement: 'top',\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: number];\n 'update:rangeValue': [range: [number, number]];\n }>();\n\n // Refs\n const isDragging = ref(false);\n const sliderTrack = ref<HTMLElement | null>(null);\n\n // Computed values\n const displayValue = computed(() => {\n // Determine decimal places based on step value\n const decimalPlaces = props.step.toString().split('.')[1]?.length || 0;\n return decimalPlaces > 0\n ? props.modelValue.toFixed(decimalPlaces)\n : Math.round(props.modelValue);\n });\n\n const progressPercentage = computed(() => {\n const range = props.max - props.min;\n const value = props.modelValue - props.min;\n return Math.min(100, Math.max(0, (value / range) * 100));\n });\n\n const thumbPosition = computed(() => {\n return progressPercentage.value;\n });\n\n // Methods\n const clampValue = (value: number): number => {\n const stepped = Math.round(value / props.step) * props.step;\n return Math.min(props.max, Math.max(props.min, stepped));\n };\n\n const calculateValueFromPosition = (clientX: number): number => {\n if (!sliderTrack.value) return props.modelValue;\n\n const rect = sliderTrack.value.getBoundingClientRect();\n const percentage = Math.max(\n 0,\n Math.min(1, (clientX - rect.left) / rect.width)\n );\n const rawValue = props.min + percentage * (props.max - props.min);\n\n // Apply step rounding\n const steppedValue = Math.round(rawValue / props.step) * props.step;\n return Math.min(props.max, Math.max(props.min, steppedValue));\n };\n\n const updateValue = (newValue: number) => {\n const clampedValue = clampValue(newValue);\n if (clampedValue !== props.modelValue) {\n emit('update:modelValue', clampedValue);\n }\n };\n\n // Mouse handlers\n const handleMouseDown = (event: MouseEvent) => {\n if (props.disabled) return;\n\n event.preventDefault();\n event.stopPropagation();\n isDragging.value = true;\n\n const handleMouseMove = (e: MouseEvent) => {\n if (!isDragging.value) return;\n e.preventDefault();\n const newValue = calculateValueFromPosition(e.clientX);\n updateValue(newValue);\n };\n\n const handleMouseUp = () => {\n isDragging.value = false;\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n };\n\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n };\n\n // Touch handlers\n const handleTouchStart = (event: TouchEvent) => {\n if (props.disabled) return;\n\n event.preventDefault();\n event.stopPropagation();\n isDragging.value = true;\n\n const handleTouchMove = (e: TouchEvent) => {\n if (!isDragging.value || !e.touches[0]) return;\n e.preventDefault();\n updateValue(calculateValueFromPosition(e.touches[0].clientX));\n };\n\n const handleTouchEnd = () => {\n isDragging.value = false;\n document.removeEventListener('touchmove', handleTouchMove);\n document.removeEventListener('touchend', handleTouchEnd);\n };\n\n document.addEventListener('touchmove', handleTouchMove);\n document.addEventListener('touchend', handleTouchEnd);\n };\n\n // Track click handler\n const handleTrackClick = (event: MouseEvent) => {\n if (props.disabled || isDragging.value) return;\n event.preventDefault();\n event.stopPropagation();\n const newValue = calculateValueFromPosition(event.clientX);\n updateValue(newValue);\n };\n\n // Keyboard handler\n const handleKeyDown = (event: KeyboardEvent) => {\n if (props.disabled) return;\n\n let newValue = props.modelValue;\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n event.preventDefault();\n newValue = props.modelValue - props.step;\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n event.preventDefault();\n newValue = props.modelValue + props.step;\n break;\n case 'Home':\n event.preventDefault();\n newValue = props.min;\n break;\n case 'End':\n event.preventDefault();\n newValue = props.max;\n break;\n case 'PageDown':\n event.preventDefault();\n newValue = props.modelValue - props.step * 10;\n break;\n case 'PageUp':\n event.preventDefault();\n newValue = props.modelValue + props.step * 10;\n break;\n default:\n return;\n }\n\n updateValue(newValue);\n };\n</script>\n\n<style scoped>\n .freddy-plugins-slider-container {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n }\n\n .freddy-plugins-slider-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .freddy-plugins-slider-label-section {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .freddy-plugins-slider-label {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n }\n\n .freddy-plugins-slider-tooltip-icon {\n width: 16px;\n height: 16px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n cursor: pointer;\n }\n\n .freddy-plugins-slider-value-badge {\n border: 1px solid var(--colors-border-border-secondary, #35414b);\n border-radius: 4px;\n padding: 0 3px;\n font-family: 'Inter', sans-serif;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n text-align: center;\n min-width: 20px;\n }\n\n .freddy-plugins-slider-track-container {\n position: relative;\n height: 24px;\n width: 100%;\n cursor: pointer;\n outline: none;\n transition: opacity 0.2s ease;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n }\n\n .freddy-plugins-slider-track-container:focus-visible {\n outline: 2px solid var(--colors-texts-text-action, #7ba8ef);\n outline-offset: 2px;\n }\n\n .freddy-plugins-slider-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .freddy-plugins-slider-track-background {\n position: absolute;\n top: 8px;\n left: 0;\n right: 0;\n height: 8px;\n background-color: var(--colors-texts-text-tetriary, #cbd6e3);\n border-radius: 9999px;\n }\n\n .freddy-plugins-slider-track-progress {\n position: absolute;\n top: 8px;\n left: 0;\n height: 8px;\n background-color: var(--colors-texts-text-action, #7ba8ef);\n border-radius: 9999px;\n transition: width 0.2s ease;\n }\n\n .freddy-plugins-slider-thumb {\n position: absolute;\n top: 0;\n width: 24px;\n height: 24px;\n background-color: #ffffff;\n border: 2px solid var(--colors-texts-text-action, #7ba8ef);\n border-radius: 50%;\n cursor: grab;\n transform: translateX(-50%);\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n touch-action: none;\n }\n\n .freddy-plugins-slider-thumb:hover:not(\n .freddy-plugins-slider-thumb-disabled\n ) {\n transform: translateX(-50%) scale(1.1);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n }\n\n .freddy-plugins-slider-thumb-dragging {\n transform: translateX(-50%) scale(1.15);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);\n cursor: grabbing;\n }\n\n .freddy-plugins-slider-thumb-disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-slider-hint {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n margin: 0;\n }\n</style>\n","<template>\n <div\n class=\"freddy-plugins-snackbar-container\"\n :class=\"`freddy-plugins-snackbar-container--${getContainerSize}`\"\n >\n <div\n v-for=\"(toast, index) in snackQueue\"\n :key=\"index\"\n class=\"freddy-plugins-snackbar\"\n :class=\"`freddy-plugins-snackbar--${toast.toastType}`\"\n >\n <div class=\"freddy-plugins-snackbar-content\">\n <div class=\"freddy-plugins-snackbar-left\">\n <component\n :is=\"getToastIcon(toast.toastType)\"\n class=\"freddy-plugins-snackbar-icon\"\n :class=\"[\n toast.toastType === 'info' && 'freddy-plugins-snackbar-icon--info',\n toast.toastType === 'danger' &&\n 'freddy-plugins-snackbar-icon--danger',\n toast.toastType === 'success' &&\n 'freddy-plugins-snackbar-icon--success',\n ]\"\n />\n\n <div class=\"freddy-plugins-snackbar-text\">\n <p class=\"freddy-plugins-snackbar-title\" v-html=\"toast.title\" />\n <p class=\"freddy-plugins-snackbar-message\" v-html=\"toast.message\" />\n </div>\n </div>\n\n <button\n class=\"freddy-plugins-snackbar-close-btn\"\n @click=\"closeToast(index)\"\n >\n <IconLightCross class=\"freddy-plugins-snackbar-close-icon\" />\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\nimport { useSnackBar } from \"@/utility\";\nimport { computed } from \"vue\";\nimport IconLightCross from \"@/icons/IconLightCross.vue\";\nimport { IconCross, IconInfoRounded, IconCheckInCircle } from \"@/icons\";\n\nconst { snackQueue } = useSnackBar();\n\nconst getToastIcon = (toastType: string) => {\n switch (toastType) {\n case \"success\":\n return IconCheckInCircle;\n case \"danger\":\n return IconCross;\n case \"info\":\n return IconInfoRounded;\n default:\n return IconCheckInCircle;\n }\n};\n\nconst getContainerSize = computed(() => {\n const lastToast = snackQueue.value[snackQueue.value.length - 1];\n if (!lastToast) return \"side70\";\n switch (lastToast.toastContainerSize) {\n case \"half\":\n return \"half\";\n case \"full\":\n return \"full\";\n default:\n return \"side70\";\n }\n});\n\nconst closeToast = (index: number) => {\n snackQueue.value.splice(index, 1);\n};\n</script>\n\n<style>\n@keyframes fade-in-right {\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n.freddy-plugins-snackbar-container {\n position: fixed;\n right: 1.25rem; /* 20px */\n bottom: 0.5rem; /* 8px */\n padding-bottom: 17px;\n z-index: 9999; /* Ensure snackbar appears above all modals and overlays */\n}\n\n.freddy-plugins-snackbar-container--side70 {\n width: 78%;\n}\n\n.freddy-plugins-snackbar-container--half {\n width: 50%;\n}\n\n.freddy-plugins-snackbar-container--full {\n width: 100%;\n padding-left: 2.5rem; /* 40px */\n}\n\n.freddy-plugins-snackbar {\n margin-top: 0.75rem; /* 12px */\n padding: 1rem; /* 16px */\n border-radius: 1.5rem; /* 24px */\n background-color: var(--text-900, var(--freddy-bg-primary));\n animation: fade-in-right 0.5s ease-out;\n}\n\n.freddy-plugins-snackbar--info {\n border: 2px solid var(--text-50, var(--text-inverse))fff;\n box-shadow: 0 0 0 1px var(--text-50, var(--text-inverse));\n}\n\n.freddy-plugins-snackbar--danger {\n border: 2px solid var(--color-warning-500, var(--freddy-warning-color));\n box-shadow: 0 0 0 1px var(--color-warning-500, var(--freddy-warning-color));\n}\n\n.freddy-plugins-snackbar--success {\n border: 2px solid var(--color-success-500, var(--freddy-success-color));\n box-shadow: 0 0 0 1px var(--color-success-500, var(--freddy-success-color));\n}\n\n.freddy-plugins-snackbar-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n}\n\n.freddy-plugins-snackbar-left {\n display: flex;\n gap: 1rem; /* 16px */\n}\n\n.freddy-plugins-snackbar-icon {\n height: 16px; /* 32px */\n width: 16px;\n stroke-width: 2;\n color: var(--text-50, var(--text-inverse))fff;\n border-radius: 9999px;\n padding: 0.25rem; /* 4px */\n border: 4px solid transparent;\n box-sizing: content-box;\n}\n\n.freddy-plugins-snackbar-icon--info {\n border-color: var(--text-50, var(--text-inverse))fff33;\n background-color: var(--text-50, var(--text-inverse))fff17;\n}\n\n.freddy-plugins-snackbar-icon--danger {\n border-color: var(--color-warning-500, var(--freddy-warning-color));\n background-color: var(--color-warning-500, var(--freddy-warning-color));\n}\n\n.freddy-plugins-snackbar-icon--success {\n border-color: var(--color-success-500, var(--freddy-success-color));\n background-color: var(--color-success-400, var(--freddy-success-color));\n}\n\n.freddy-plugins-snackbar-text {\n display: flex;\n flex-direction: column;\n gap: 0.375rem; /* 6px */\n color: var(--text-50, var(--text-inverse))fff;\n}\n\n.freddy-plugins-snackbar-title {\n font-size: 0.875rem; /* 14px */\n font-weight: 600;\n margin: 0;\n color: var(--text-50, var(--text-inverse))fff;\n}\n\n.freddy-plugins-snackbar-message {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: normal;\n margin: 0;\n color: var(--text-50, var(--text-inverse))fff;\n}\n\n.freddy-plugins-snackbar-close-btn {\n position: absolute;\n right: 0.5rem;\n top: 0;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.freddy-plugins-snackbar-close-icon {\n height: 10px; /* 16px */\n width: 10px;\n stroke-width: 1.67;\n color: white;\n}\n</style>\n","<template>\n <div\n class=\"freddy-plugins-switch-slot\"\n :class=\"{\n 'freddy-plugins-switch-slot--bordered': variant === 'bordered',\n 'freddy-plugins-switch-slot--disabled': disabled,\n }\"\n >\n <!-- Header row with label/tooltip and switch -->\n <div class=\"freddy-plugins-switch-slot__header\">\n <div v-if=\"label || tooltip\" class=\"freddy-plugins-switch-slot__label-section\">\n <span v-if=\"label\" class=\"freddy-plugins-switch-slot__label\">{{ label }}</span>\n <Tooltip v-if=\"tooltip\" :text=\"tooltip\" :placement=\"tooltipPlacement\">\n <IconInfoRounded class=\"freddy-plugins-switch-slot__tooltip-icon\" />\n </Tooltip>\n </div>\n\n <!-- Switch control -->\n <button\n class=\"freddy-plugins-switch-slot__switch\"\n :class=\"{ 'freddy-plugins-switch-slot__switch--on': modelValue }\"\n :aria-checked=\"modelValue\"\n role=\"switch\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"handleToggle\"\n @keydown.space.prevent=\"handleToggle\"\n @keydown.enter.prevent=\"handleToggle\"\n :disabled=\"disabled\"\n >\n <span class=\"freddy-plugins-switch-slot__track\"></span>\n <span class=\"freddy-plugins-switch-slot__thumb\"></span>\n </button>\n </div>\n\n <!-- Slot content section (appears when showSlotContent is true) -->\n <div v-if=\"showSlotContent\" class=\"freddy-plugins-switch-slot__content\">\n <slot name=\"content\" />\n </div>\n\n <!-- Hint text -->\n <p v-if=\"hint\" class=\"freddy-plugins-switch-slot__hint\">\n {{ hint }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import IconInfoRounded from '@/icons/IconInfoRounded.vue';\n import Tooltip from './Tooltip.vue';\n import type {\n SwitchSlotProps,\n SwitchSlotEmits,\n } from '@/interfaces/switch-slot.interfaces';\n\n const props = defineProps<SwitchSlotProps>();\n\n const emit = defineEmits<SwitchSlotEmits>();\n\n const handleToggle = (event: Event) => {\n event.stopPropagation();\n if (!props.disabled) {\n emit('update:modelValue', !props.modelValue);\n }\n };\n</script>\n\n<style scoped>\n .freddy-plugins-switch-slot {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n }\n\n .freddy-plugins-switch-slot--bordered {\n border: 1px solid var(--colors-border-border-secondary, #35414b);\n border-radius: 8px;\n padding: 6px;\n }\n\n .freddy-plugins-switch-slot--disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .freddy-plugins-switch-slot__header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .freddy-plugins-switch-slot__label-section {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .freddy-plugins-switch-slot__label {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n }\n\n .freddy-plugins-switch-slot__tooltip-icon {\n width: 16px;\n height: 16px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n cursor: pointer;\n }\n\n .freddy-plugins-switch-slot__switch {\n position: relative;\n width: 56px;\n height: 30px;\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n outline: none;\n display: inline-flex;\n align-items: center;\n transition: opacity 0.2s;\n }\n\n .freddy-plugins-switch-slot__switch:focus-visible {\n outline: 2px solid var(--colors-texts-text-action, #7ba8ef);\n outline-offset: 2px;\n }\n\n .freddy-plugins-switch-slot__switch:disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-switch-slot__track {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--colors-background-bg-transparent-grey, #555555);\n border-radius: 100px;\n transition: background 0.2s;\n }\n\n .freddy-plugins-switch-slot__switch--on .freddy-plugins-switch-slot__track {\n background: var(--colors-texts-text-action, #7ba8ef);\n }\n\n .freddy-plugins-switch-slot__thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 26px;\n height: 26px;\n background: #ffffff;\n border-radius: 50%;\n transition: left 0.2s;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n }\n\n .freddy-plugins-switch-slot__switch--on .freddy-plugins-switch-slot__thumb {\n left: 28px;\n }\n\n .freddy-plugins-switch-slot__content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n gap: 8px;\n }\n\n .freddy-plugins-switch-slot__hint {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n margin: 0;\n }\n</style>\n","<template>\n <div class=\"freddy-plugin-nav-bar\">\n <button\n class=\"freddy-plugin-tab-list-menu-button\"\n v-for=\"(tab, index) in tabList\"\n :key=\"index\"\n @click=\"handleTabSwitch(tab)\"\n >\n {{ tab.title }}\n <span\n :class=\"{ 'freddy-plugin-active-tab': activeTab === tab.id }\"\n ></span>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { ref } from 'vue';\n import type { ITabList, IMenuListItem } from '@/interfaces';\n\n // props and emits\n const props = withDefaults(defineProps<ITabList>(), {\n currentTab: 0,\n });\n const emits = defineEmits(['tabSwitch']);\n\n // variables\n const activeTab = ref<number>(props.currentTab);\n\n // click event\n const handleTabSwitch = (tab: IMenuListItem): void => {\n if (activeTab.value === tab.id) return;\n activeTab.value = tab.id;\n emits('tabSwitch', tab.id);\n };\n</script>\n\n<style lang=\"css\">\n .freddy-plugin-nav-bar {\n display: flex;\n width: 100%;\n gap: 24px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.09); /* #FFFFFF17 */\n padding-right: 10px; /* pr-2.5 = 2.5 * 4px */\n font-family: 'Inter', sans-serif;\n font-size: 0.875rem; /* text-sm = 14px */\n font-weight: 600; /* font-semibold */\n }\n\n .freddy-plugin-tab-list-menu-button {\n all: unset; /* unset-all */\n display: flex;\n flex-direction: column;\n padding-top: 8px; /* pt-2 = 0.5rem = 8px */\n cursor: pointer;\n }\n\n .freddy-plugin-active-tab {\n width: 100%;\n background-color: #fff;\n height: 2px; /* h-0.5 = 0.125rem = 2px */\n border-top-left-radius: 0.375rem; /* rounded-t-md */\n border-top-right-radius: 0.375rem;\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-toast-wrapper\">\n <div\n v-for=\"(toast, index) in toastQueue\"\n :key=\"index\"\n :class=\"['freddy-plugins-toast-item', getToastClass(toast.toastType)]\"\n >\n <div class=\"freddy-plugins-toast-icon-wrapper\">\n <component\n :is=\"getToastIcon(toast.toastType)\"\n class=\"freddy-plugins-toast-icon\"\n />\n </div>\n\n <span class=\"freddy-plugins-toast-message\">\n {{ toast.message }}\n </span>\n\n <button\n class=\"freddy-plugins-toast-close-button\"\n @click=\"closeToast(index)\"\n >\n <IconCross class=\"freddy-plugins-toast-close-icon\" />\n </button>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { useToast } from '@/utility/useToast';\n import { IconTick, IconInfoRounded, IconCross } from '@/icons';\n\n const { toastQueue } = useToast();\n\n type ToastType = 'success' | 'danger' | 'info';\n\n const toastTypeMap: Record<ToastType, string> = {\n success: 'freddy-plugins-toast-success',\n danger: 'freddy-plugins-toast-danger',\n info: 'freddy-plugins-toast-info',\n };\n\n const getToastClass = (toastType: ToastType): string =>\n toastTypeMap[toastType];\n\n const getToastIcon = (toastType: string) => {\n switch (toastType) {\n case 'success':\n return IconTick;\n case 'danger':\n return IconCross;\n case 'info':\n return IconInfoRounded;\n default:\n return IconTick;\n }\n };\n\n const closeToast = (index: number) => {\n toastQueue.value.splice(index, 1);\n };\n</script>\n\n<style>\n .freddy-plugins-toast-wrapper {\n position: fixed;\n right: 10px;\n bottom: 10px;\n display: flex;\n flex-direction: column;\n gap: 0.5rem; /* 2px spacing (Tailwind space-y-2) */\n z-index: 9999; /* Ensure toast appears above all modals and overlays */\n }\n\n .freddy-plugins-toast-item {\n display: flex;\n align-items: center;\n padding: 0.625rem; /* Tailwind p-2.5 */\n gap: 0.625rem; /* Tailwind gap-2.5 */\n border-radius: 10px;\n box-shadow: 0 1px 3px var(--border-light);\n animation: fadeIn 0.3s ease;\n }\n\n .freddy-plugins-toast-success {\n background-color: var(--color-success-500, var(--freddy-success-color));\n --toast-icon-color: var(--color-success-500, var(--freddy-success-color));\n }\n\n .freddy-plugins-toast-danger {\n background-color: var(--color-destructive-500, var(--freddy-error-color));\n --toast-icon-color: var(--color-destructive-500, var(--freddy-error-color));\n }\n\n .freddy-plugins-toast-info {\n background-color: var(--color-primary-500, var(--freddy-primary-color));\n --toast-icon-color: var(--color-primary-500, var(--freddy-primary-color));\n }\n\n .freddy-plugins-toast-icon-wrapper {\n width: 1.25rem; /* Tailwind w-5 */\n height: 1.25rem; /* Tailwind h-5 */\n background-color: var(--freddy-bg-secondary);\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-toast-icon {\n width: 100%;\n height: 100%;\n padding: 0.25rem; /* Tailwind p-1 */\n color: var(--toast-icon-color);\n }\n\n .freddy-plugins-toast-message {\n min-width: 16rem; /* Tailwind min-w-64 */\n max-width: 420px; /* Tailwind max-w-[420px] */\n flex: 1 1 auto; /* Tailwind flex-1 */\n font-size: 1rem; /* Tailwind text-[16px] */\n font-weight: 500; /* Tailwind font-medium */\n color: white;\n }\n\n .freddy-plugins-toast-close-button {\n width: 1rem; /* Tailwind w-4 */\n height: 1rem; /* Tailwind h-4 */\n background: transparent;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-toast-close-icon {\n width: 100%;\n height: 100%;\n padding: 0.125rem; /* Tailwind p-0.5 */\n color: white;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n</style>\n","import { ref, computed } from 'vue';\n\nexport interface ErrorDetails {\n message: string;\n code?: string | number;\n stack?: string;\n timestamp: string;\n context?: Record<string, unknown>;\n}\n\nexport interface UseErrorHandlerOptions {\n logErrors?: boolean;\n throwOnCritical?: boolean;\n maxRetries?: number;\n}\n\n/**\n * Composable for centralized error handling\n */\nexport function useErrorHandler(options: UseErrorHandlerOptions = {}) {\n const {\n logErrors = true,\n throwOnCritical = false,\n maxRetries = 3\n } = options;\n\n const errors = ref<ErrorDetails[]>([]);\n const isLoading = ref(false);\n const retryCount = ref(0);\n\n const hasErrors = computed(() => errors.value.length > 0);\n const latestError = computed(() => errors.value[errors.value.length - 1] || null);\n\n /**\n * Handle an error with enhanced context\n */\n const handleError = (\n error: unknown,\n context?: Record<string, unknown>\n ): ErrorDetails => {\n const errorDetails: ErrorDetails = {\n message: error instanceof Error ? error.message : String(error),\n stack: error instanceof Error ? error.stack : undefined,\n timestamp: new Date().toISOString(),\n context: {\n ...context,\n retryCount: retryCount.value,\n userAgent: typeof navigator !== 'undefined' ? navigator.userAgent : 'Unknown'\n }\n };\n\n // Add HTTP status code if available\n if (error && typeof error === 'object' && 'status' in error) {\n errorDetails.code = (error as { status: number }).status;\n }\n\n errors.value.push(errorDetails);\n\n // Log in development\n if (logErrors && process.env.NODE_ENV === 'development') {\n // Error logging - implement proper error reporting in production\n // Error: error, Context: context, Details: errorDetails\n }\n\n // Throw critical errors if configured\n if (throwOnCritical && isCriticalError(error)) {\n throw error;\n }\n\n return errorDetails;\n };\n\n /**\n * Handle async operations with error catching\n */\n const handleAsync = async <T>(\n operation: () => Promise<T>,\n context?: Record<string, unknown>\n ): Promise<{ data: T | null; error: ErrorDetails | null }> => {\n isLoading.value = true;\n \n try {\n const data = await operation();\n retryCount.value = 0; // Reset on success\n return { data, error: null };\n } catch (error) {\n const errorDetails = handleError(error, context);\n return { data: null, error: errorDetails };\n } finally {\n isLoading.value = false;\n }\n };\n\n /**\n * Retry an async operation with exponential backoff\n */\n const retryAsync = async <T>(\n operation: () => Promise<T>,\n context?: Record<string, unknown>\n ): Promise<{ data: T | null; error: ErrorDetails | null }> => {\n let lastError: ErrorDetails | null = null;\n\n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n retryCount.value = attempt - 1;\n \n const result = await handleAsync(operation, {\n ...context,\n attempt,\n maxRetries\n });\n\n if (result.data !== null) {\n return result;\n }\n\n lastError = result.error;\n\n // Don't retry on client errors (4xx)\n if (lastError?.code && typeof lastError.code === 'number' && \n lastError.code >= 400 && lastError.code < 500) {\n break;\n }\n\n // Wait before retrying (exponential backoff)\n if (attempt < maxRetries) {\n await new Promise(resolve => \n setTimeout(resolve, Math.pow(2, attempt) * 1000)\n );\n }\n }\n\n return { data: null, error: lastError };\n };\n\n /**\n * Clear all errors\n */\n const clearErrors = () => {\n errors.value = [];\n retryCount.value = 0;\n };\n\n /**\n * Clear specific error by index\n */\n const clearError = (index: number) => {\n if (index >= 0 && index < errors.value.length) {\n errors.value.splice(index, 1);\n }\n };\n\n /**\n * Check if error is critical (should stop execution)\n */\n const isCriticalError = (error: unknown): boolean => {\n if (error instanceof Error) {\n // Network errors are usually not critical\n if (error.name === 'NetworkError' || error.name === 'TypeError') {\n return false;\n }\n \n // Syntax errors are critical\n if (error.name === 'SyntaxError') {\n return true;\n }\n }\n\n // HTTP 5xx errors are critical\n if (error && typeof error === 'object' && 'status' in error) {\n const status = (error as { status: number }).status;\n return status >= 500;\n }\n\n return false;\n };\n\n return {\n // State\n errors: computed(() => errors.value),\n hasErrors,\n latestError,\n isLoading: computed(() => isLoading.value),\n retryCount: computed(() => retryCount.value),\n\n // Methods\n handleError,\n handleAsync,\n retryAsync,\n clearErrors,\n clearError,\n isCriticalError\n };\n}\n","import { ref, computed, onMounted, nextTick } from 'vue';\n\nexport interface PerformanceMetrics {\n renderTime: number;\n componentCount: number;\n memoryUsage?: number;\n timestamp: string;\n}\n\nexport interface UsePerformanceOptions {\n enableMetrics?: boolean;\n trackMemory?: boolean;\n sampleRate?: number; // 0-1, percentage of operations to track\n}\n\n/**\n * Composable for performance monitoring and optimization\n */\nexport function usePerformance(options: UsePerformanceOptions = {}) {\n const {\n enableMetrics = process.env.NODE_ENV === 'development',\n trackMemory = false,\n sampleRate = 0.1\n } = options;\n\n const metrics = ref<PerformanceMetrics[]>([]);\n const isTracking = ref(false);\n const startTime = ref(0);\n\n const averageRenderTime = computed(() => {\n if (metrics.value.length === 0) return 0;\n const total = metrics.value.reduce((sum, m) => sum + m.renderTime, 0);\n return total / metrics.value.length;\n });\n\n const maxRenderTime = computed(() => {\n if (metrics.value.length === 0) return 0;\n return Math.max(...metrics.value.map(m => m.renderTime));\n });\n\n /**\n * Start performance tracking\n */\n const startTracking = (label?: string) => {\n if (!enableMetrics || Math.random() > sampleRate) return;\n \n isTracking.value = true;\n startTime.value = performance.now();\n \n if (label && process.env.NODE_ENV === 'development') {\n }\n };\n\n /**\n * End performance tracking and record metrics\n */\n const endTracking = (label?: string, componentCount = 1) => {\n if (!isTracking.value || !enableMetrics) return;\n \n const endTime = performance.now();\n const renderTime = endTime - startTime.value;\n \n const metric: PerformanceMetrics = {\n renderTime,\n componentCount,\n timestamp: new Date().toISOString()\n };\n\n // Add memory usage if tracking is enabled\n if (trackMemory && 'memory' in performance) {\n const memory = (performance as any).memory;\n metric.memoryUsage = memory.usedJSHeapSize;\n }\n\n metrics.value.push(metric);\n \n // Keep only last 100 metrics to prevent memory leaks\n if (metrics.value.length > 100) {\n metrics.value.shift();\n }\n\n isTracking.value = false;\n \n if (label && process.env.NODE_ENV === 'development') {\n \n // Warn about slow renders\n if (renderTime > 16) { // 60fps threshold\n // Slow render detected - implement performance monitoring in production\n }\n }\n\n return metric;\n };\n\n /**\n * Measure async operation performance\n */\n const measureAsync = async <T>(\n operation: () => Promise<T>,\n label?: string\n ): Promise<{ result: T; metrics: PerformanceMetrics }> => {\n startTracking(label);\n \n try {\n const result = await operation();\n const metrics = endTracking(label) || {\n renderTime: 0,\n componentCount: 1,\n timestamp: new Date().toISOString()\n };\n \n return { result, metrics };\n } catch (error) {\n endTracking(label);\n throw error;\n }\n };\n\n /**\n * Debounce function for performance optimization\n */\n const debounce = <T extends (...args: any[]) => any>(\n func: T,\n wait: number\n ): ((...args: Parameters<T>) => void) => {\n let timeout: ReturnType<typeof setTimeout>;\n \n return (...args: Parameters<T>) => {\n clearTimeout(timeout);\n timeout = setTimeout(() => func(...args), wait);\n };\n };\n\n /**\n * Throttle function for performance optimization\n */\n const throttle = <T extends (...args: any[]) => any>(\n func: T,\n limit: number\n ): ((...args: Parameters<T>) => void) => {\n let inThrottle: boolean;\n \n return (...args: Parameters<T>) => {\n if (!inThrottle) {\n func(...args);\n inThrottle = true;\n setTimeout(() => inThrottle = false, limit);\n }\n };\n };\n\n /**\n * Optimize heavy computations with requestIdleCallback\n */\n const scheduleWork = (callback: () => void, timeout = 5000) => {\n if ('requestIdleCallback' in window) {\n (window as any).requestIdleCallback(callback, { timeout });\n } else {\n // Fallback for browsers without requestIdleCallback\n setTimeout(callback, 0);\n }\n };\n\n /**\n * Lazy load components or data\n */\n const lazyLoad = async <T>(\n loader: () => Promise<T>,\n delay = 0\n ): Promise<T> => {\n if (delay > 0) {\n await new Promise(resolve => setTimeout(resolve, delay));\n }\n \n return new Promise((resolve) => {\n scheduleWork(async () => {\n try {\n const result = await loader();\n resolve(result);\n } catch (error) {\n throw error;\n }\n });\n });\n };\n\n /**\n * Virtual scrolling helper for large lists\n */\n const createVirtualList = <T>(\n items: T[],\n itemHeight: number,\n containerHeight: number\n ) => {\n const visibleCount = Math.ceil(containerHeight / itemHeight);\n const buffer = Math.ceil(visibleCount * 0.5); // 50% buffer\n \n return (scrollTop: number) => {\n const startIndex = Math.max(0, Math.floor(scrollTop / itemHeight) - buffer);\n const endIndex = Math.min(items.length, startIndex + visibleCount + buffer * 2);\n \n return {\n visibleItems: items.slice(startIndex, endIndex),\n startIndex,\n endIndex,\n totalHeight: items.length * itemHeight,\n offsetY: startIndex * itemHeight\n };\n };\n };\n\n /**\n * Clear all metrics\n */\n const clearMetrics = () => {\n metrics.value = [];\n };\n\n /**\n * Get performance summary\n */\n const getSummary = () => {\n return {\n totalMeasurements: metrics.value.length,\n averageRenderTime: averageRenderTime.value,\n maxRenderTime: maxRenderTime.value,\n recentMetrics: metrics.value.slice(-10)\n };\n };\n\n // Auto-track component lifecycle in development\n if (enableMetrics && process.env.NODE_ENV === 'development') {\n onMounted(() => {\n startTracking('Component Mount');\n nextTick(() => {\n endTracking('Component Mount');\n });\n });\n }\n\n return {\n // State\n metrics: computed(() => metrics.value),\n isTracking: computed(() => isTracking.value),\n averageRenderTime,\n maxRenderTime,\n\n // Performance tracking\n startTracking,\n endTracking,\n measureAsync,\n\n // Optimization utilities\n debounce,\n throttle,\n scheduleWork,\n lazyLoad,\n createVirtualList,\n\n // Management\n clearMetrics,\n getSummary\n };\n}\n"],"names":["IconStyleDirective","el","DOMPurify","loadDOMPurify","SAFE_TAGS","SAFE_ATTRS","basicSanitize","html","sanitizeContent","content","vFrSanitize","binding","FreddyPlugin","app","components","n","path","name","_a","defineAsyncComponent","component","frSanitizePlugin","iconStylePlugin","_createElementBlock","_normalizeClass","customClass","customStyle","_createBlock","_Transition","isVisible","_openBlock","_hoisted_1","_createElementVNode","_hoisted_2","largeModel","_hoisted_3","_renderSlot","_ctx","_hoisted_4","_hoisted_5","emit","__emit","handleClick","event","isSelected","_toDisplayString","date","_hoisted_6","assistantId","isDefault","_hoisted_7","_createVNode","_unref","IconLock","props","__props","internalSelectedId","ref","assistantsWithSelection","computed","currentSelectedId","assistant","handleAssistantClick","_Fragment","_renderList","index","AssistantField","$event","handleEditClick","handlePlaygroundClick","getIconComponent","iconName","__variableDynamicImportRuntimeHelper","IconRobotScreen","iconComponent","assistantImage","IconEdit","_resolveDynamicComponent","assistantIcon","_hoisted_8","_hoisted_9","_hoisted_10","IconNewTab","_cache","backgroundColor","imageUrl","altText","IconTick","selectedAvatarId","selectedAvatar","avatar","handleAvatarClick","avatarId","__expose","id","title","avatars","AvatarChoosing","showSelectedInfo","createIconList","iconList","Icons","availableIcons","selectedIconId","selectedImageUrl","selectedImageIndex","selectedFaceId","selectedVoiceId","searchQuery","icon","canSave","handleClose","handleCancel","handleSave","handleImageSelect","handleVoiceSelect","voice","handleSearchInput","value","handleUploadClick","closeButtonAriaLabel","IconCross","description","_hoisted_11","uploadButtonAriaLabel","IconDataUpload","SearchInput","searchPlaceholder","_hoisted_13","_hoisted_15","faces","_hoisted_17","voices","_hoisted_18","_hoisted_19","VoiceSelection","_hoisted_20","cancelButtonText","saveButtonText","_hoisted_21","emits","activeStateType","orientation","computedActiveStateType","currentOrientation","currentStateType","activeTab","watch","newValue","handleTabSwitch","tab","_withKeys","_withModifiers","currentPage","tabsForBaseTabButton","activeTabIndex","tabId","t","handleTabChange","filteredRules","query","rule","visiblePages","pages","total","current","i","handleSearch","handleCreateRule","handleEdit","handleView","handlePageChange","page","handlePreviousPage","handleNextPage","IconSearch","IconPlus","BaseTabButton","IconInfoRounded","_hoisted_12","_hoisted_14","_hoisted_16","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","IconEye","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","totalPages","_hoisted_32","isClicked","IconFileSystem","IconStar","badgeText","IconBadgeCheck","displayedCount","filteredFrames","frame","displayedFrames","filteredCount","hasMoreFrames","remainingCount","handleAddVectorStore","handleShowMore","dbCount","IconQuestion","IconFilter","IconChevronDown","IconAddFileSystem","selectedVoice","handleVoiceClick","voiceId","IconRevertedTriangle","voiceName","useTheme","currentProject","currentColorMode","isLoading","error","availableBrands","availableModes","show","tooltipWrapper","tooltipContent","tooltipStyle","showTimeout","updatePosition","triggerRect","contentRect","top","left","gap","placement","open","nextTick","close","onUnmounted","_Teleport","contentClass","text","iconComponents","LeftIconComponent","RightIconComponent","isHovered","buttonClasses","handleLeftIconClick","handleRightIconClick","handleMouseEnter","handleMouseLeave","tooltip","Tooltip","tooltipPlacement","disabled","loading","iconOnly","label","loadingText","size","leftIcon","rightIcon","providerConfigs","IconGoogle","IconFacebook","IconApple","IconX","IconFigma","IconDribbble","containerClasses","getProviderIcon","provider","getProviderLabel","getButtonClasses","style","providers","theme","highlighted","highlighter","createHighlighter","loadShiki","supportedLangs","highlightCode","onMounted","onChange","target","isChecked","blueCheckbox","ariaLabel","isDashInput","shouldShowBelow","hideTimeout","calculateBestPosition","rect","viewportHeight","tooltipHeight","spaceTop","spaceBottom","handleFocusIn","handleFocusOut","AITextService","apiKey","__publicField","userQuestion","textBoxContent","question","isEdit","keyword","isGeneration","needsStructuredResponse","analysis","messages","userContentParts","original","improved","originalWords","word","improvedWords","added","removed","response","originalText","jsonResponse","stats","userContent","payload","aiResponse","_e","_d","_c","_b","aiTextService","inputValue","messagesContainer","inputRef","isProcessing","newMessages","scrollToBottom","newApiKey","getActionTitle","action","getActionDescription","processWithAI","userMessage","errorMessage","aiMessage","handleSend","message","adjustTextareaHeight","handleNewLine","handleAcceptChanges","handleDenyChanges","changes","apiResponse","parsed","parseApiResponse","displayContent","getDisplayContent","createChangesObject","IconCopy","IconFile","IconCheckRounded","IconRefresh","_hoisted_26","IconThumbsDown","_hoisted_27","IconFolder","placeholder","IconPaperAirPlane","showAI","chatMessages","chatRef","newContent","handleAskAI","handleChatMessage","handleTextReplacement","data","handleTextCompletion","IconEditLinePath","IconSparkle","SimpleChatInterface","textareaRef","aiModalRef","localValue","originalValue","showModal","modalMode","isFocused","computedPlaceholder","handleInput","handleFocus","handleBlur","handleKeydown","handleTextareaClick","handleTooltipClick","handleTooltipKeydown","handleAiKeydown","handleExpand","handleExpandKeydown","handleRemoveTag","handleTagCloseKeydown","handleModalClose","handleModalSave","handleModalCancel","handleModalAskAI","handleToggleAI","showUnderlines","dynamicTitle","required","$slots","tooltipTitle","tooltipDescription","TooltipV2","showAiButton","diffMode","hasError","showTags","tags","tagsOnly","readonly","oldText","newText","tag","showAddTagsPlaceholder","addTagsPlaceholder","IconExpand","showHint","hintText","EditFeaturedExcerptModal","modalTitle","modalDescription","openaiApiKey","openaiModel","openaiOrganization","currentTags","newTags","handleUpdateValue","handleAddTag","handleTagsClick","TextAreaInputField","localContent","diffContent","diffHtml","removedText","addedText","showDiff","toggle","modelValue","selected","localOptions","shallowRef","newOptions","initializeSelected","def","opt","displayLabel","iconToShow","IconChevronUp","toggleDropdown","closeDropdown","filteredOptions","option","handleOptionClick","selectOption","handleToggle","val","idx","o","onClickOutside","BaseButton","chevronRight","showIcon","openUp","searchable","optionIconRight","showShortcut","Switch","brand","resendCooldown","codeDigits","inputRefs","isCodeComplete","digit","verificationCode","handleDigitInput","handlePaste","pastedData","digits","nextEmptyIndex","focusIndex","handleSubmit","handleResend","email","_","_vModelText","inputId","focusInput","colorStyle","baseInputRef","rawValue","displayValue","detectedCardType","baseProps","resolveIcon","resolvedTrailingIcon","cardNumberMaxLength","inputClasses","detectCardType","number","cleanNumber","formatCardNumber","cleanValue","getCardTypeIcon","cardType","icons","handleCardInput","newCardType","handleCardKeydown","handleTrailingIconClick","focus","BaseInput","_mergeProps","showCardIcon","resolvedLeadingIcon","handleLeadingIconClick","inputType","trailingIcon","tooltipText","phoneNumberValue","showCountryDropdown","localCountryCode","defaultCountryOptions","countryOptions","selectedCountry","country","toggleCountryDropdown","selectCountry","currentNumber","newFormattedNumber","handlePhoneInput","fullNumber","handleClickOutside","newCode","variant","phoneProps","cardProps","defaultProps","handleUpdate","handleCountryCodeUpdate","code","handlePhoneNumberUpdate","handleCountryChange","handleCardNumberUpdate","handleCardTypeDetected","PhoneInput","CardInput","DefaultInput","_sfc_main","$props","ModalBox","height","closeModal","clickOutside","headerClass","IconLightCross","attrs","useAttrs","searchInput","dropdownRef","handleClear","IconSearchOptimised","maxCharLimit","showLoaderForSearch","Spinner","showCloseButton","selectedOption","isOpen","modelPlaceholder","isActive","$emit","result","tp","cp","goToPage","active","IconSend","type","hasHeader","count","isDragging","sliderTrack","decimalPlaces","progressPercentage","range","thumbPosition","clampValue","stepped","calculateValueFromPosition","clientX","percentage","steppedValue","updateValue","clampedValue","handleMouseDown","handleMouseMove","e","handleMouseUp","handleTouchStart","handleTouchMove","handleTouchEnd","handleTrackClick","handleKeyDown","showValue","min","max","hint","snackQueue","useSnackBar","getToastIcon","toastType","IconCheckInCircle","getContainerSize","lastToast","closeToast","toast","showSlotContent","tabList","toastQueue","useToast","toastTypeMap","getToastClass","useErrorHandler","options","logErrors","throwOnCritical","maxRetries","errors","retryCount","hasErrors","latestError","handleError","context","errorDetails","isCriticalError","handleAsync","operation","retryAsync","lastError","attempt","resolve","clearErrors","clearError","usePerformance","enableMetrics","trackMemory","sampleRate","metrics","isTracking","startTime","averageRenderTime","sum","m","maxRenderTime","startTracking","endTracking","componentCount","metric","memory","measureAsync","debounce","func","wait","timeout","args","throttle","limit","inThrottle","scheduleWork","callback","lazyLoad","loader","delay","createVirtualList","items","itemHeight","containerHeight","visibleCount","buffer","scrollTop","startIndex","endIndex","clearMetrics","getSummary"],"mappings":";;;;;;AAIA,MAAMA,KAAgC;AAAA,EACpC,QAAQC,GAAiB;AACvB,IAAKA,EAAG,aAAa,OAAO,KAC1BA,EAAG,aAAa,SAAS,qBAAqB;AAAA,EAElD;AACF;ACPA,IAAIC,KAAiB;AAGrB,MAAMC,KAAgB,YAAY;AAChC,MAAI;AAEF,IAAAD,MADwB,MAAM,OAAO,WAAW,GACpB;AAAA,EAC9B,QAAQ;AAAA,EAER;AACF;AAGAC,GAAA;AAEA,MAAMC,KAAY;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAC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AAS,MAAM;AACb,MAAA4a,EAAY,iBAAiB;AAAA,IAC/B,CAAC;AAAA,EACH,CAAC,GAGI;AAAA;AAAA,IAEL,SAAS9lB,EAAS,MAAMslB,EAAQ,KAAK;AAAA,IACrC,YAAYtlB,EAAS,MAAMulB,EAAW,KAAK;AAAA,IAC3C,mBAAAE;AAAA,IACA,eAAAG;AAAA;AAAA,IAGA,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAI;AAAA;AAAA,IAGA,UAAAC;AAAA,IACA,UAAAK;AAAA,IACA,cAAAG;AAAA,IACA,UAAAE;AAAA,IACA,mBAAAG;AAAA;AAAA,IAGA,cAAAS;AAAA,IACA,YAAAC;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../src/plugins/icon-style.ts","../src/directives/frSanitize.ts","../src/plugin.ts","../src/plugins/index.ts","../src/animations/AnimeSpaceman.vue","../src/components/AdvancedModal.vue","../src/components/Assistant/AssistantField.vue","../src/components/Assistant/AssistantList.vue","../src/components/Assistant/AssistantsHeader.vue","../src/components/Assistant/AvatarChoosing.vue","../src/components/Assistant/AvatarList.vue","../src/components/Assistant/ChooseAssistantAvatar.vue","../src/components/Tabs/BaseTabButton.vue","../src/components/Assistant/RulesManagement.vue","../src/components/Assistant/VectorFrame.vue","../src/components/Assistant/VectorSection.vue","../src/components/Assistant/VoiceList.vue","../src/components/Assistant/VoiceSelection.vue","../src/composables/useTheme.ts","../src/components/Tooltip.vue","../src/components/Buttons/BaseButton.vue","../src/components/Buttons/SocialButtons.vue","../src/components/CodeBlock.vue","../src/components/CustomCheckbox.vue","../src/components/TooltipV2.vue","../src/services/AITextService.ts","../src/components/SimpleChatInterface.vue","../src/components/EditFeaturedExcerptModal.vue","../src/components/TextAreaInputField.vue","../src/components/Descriptions.vue","../src/components/DiffTextarea.vue","../src/components/Switch.vue","../src/components/Dropdown.vue","../src/components/EmailCodeVerification.vue","../src/components/InputField/BaseInput.vue","../src/components/InputField/CardInput.vue","../src/components/InputField/DefaultInput.vue","../src/components/InputField/PhoneInput.vue","../src/components/InputField/InputField.vue","../src/components/ModalBox.vue","../src/components/Instructions/InstructionsModal.vue","../src/components/Instructions/InstructiontextArea.vue","../src/components/ModalOverlay.vue","../src/components/Spinner.vue","../src/components/SearchInput.vue","../src/components/ModelDropdown.vue","../src/components/OutputModeModal.vue","../src/components/Pagination.vue","../src/components/SendButton.vue","../src/components/SkeletonLoader.vue","../src/components/Slider.vue","../src/components/SnackBar.vue","../src/components/SwitchSlot.vue","../src/components/TabList.vue","../src/components/ToastMessage.vue","../src/composables/useErrorHandler.ts","../src/composables/usePerformance.ts"],"sourcesContent":["// src/plugins/icon-style.ts\n\nimport type { Directive } from \"vue\";\n\nconst IconStyleDirective: Directive = {\n mounted(el: HTMLElement) {\n if (!el.getAttribute(\"class\")) {\n el.setAttribute(\"class\", \"base-fallback-style\");\n }\n },\n};\n\nexport default IconStyleDirective;\n","import type { DirectiveBinding } from \"vue\";\n\n// Optional dependency - handle gracefully if not installed\nlet DOMPurify: any = null;\n\n// Load DOMPurify asynchronously\nconst loadDOMPurify = async () => {\n try {\n const dompurifyModule = await import('dompurify');\n DOMPurify = dompurifyModule.default;\n } catch {\n // DOMPurify not available - will use basic sanitization\n }\n};\n\n// Load on module initialization\nloadDOMPurify();\n\nconst SAFE_TAGS = [\n \"a\",\n \"abbr\",\n \"b\",\n \"blockquote\",\n \"br\",\n \"code\",\n \"div\",\n \"em\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"hr\",\n \"i\",\n \"img\",\n \"li\",\n \"ol\",\n \"p\",\n \"pre\",\n \"span\",\n \"strong\",\n \"sub\",\n \"sup\",\n \"table\",\n \"tbody\",\n \"td\",\n \"th\",\n \"thead\",\n \"tr\",\n \"u\",\n \"ul\",\n];\n\nconst SAFE_ATTRS = [\n \"href\",\n \"src\",\n \"alt\",\n \"title\",\n \"width\",\n \"height\",\n \"align\",\n \"class\",\n \"id\",\n \"colspan\",\n \"rowspan\",\n];\n\n// Basic sanitization fallback\nconst basicSanitize = (html: string): string => {\n return html\n .replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi, '')\n .replace(/<iframe\\b[^<]*(?:(?!<\\/iframe>)<[^<]*)*<\\/iframe>/gi, '')\n .replace(/on\\w+=\"[^\"]*\"/gi, '')\n .replace(/javascript:/gi, '');\n};\n\nconst sanitizeContent = (content: string): string => {\n if (!DOMPurify) {\n return basicSanitize(content);\n }\n \n try {\n return DOMPurify.sanitize(content, {\n ALLOWED_TAGS: SAFE_TAGS,\n ALLOWED_ATTR: SAFE_ATTRS,\n USE_PROFILES: { html: true },\n });\n } catch {\n return basicSanitize(content);\n }\n};\n\nexport const vFrSanitize = {\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n el.innerHTML = sanitizeContent(binding.value || \"\");\n },\n updated(el: HTMLElement, binding: DirectiveBinding) {\n el.innerHTML = sanitizeContent(binding.value || \"\");\n },\n};\n","// plugin.ts\nimport type { App } from 'vue';\nimport { defineAsyncComponent } from 'vue';\nimport IconStyleDirective from './plugins/icon-style';\n// Theme service removed in v0.4.54 - SSR incompatibility\n// import { themeServicePlugin } from './plugins/theme-service.global';\nimport { vFrSanitize } from './directives/frSanitize';\n\nconst FreddyPlugin = {\n install(app: App) {\n // ❌ Theme service plugin removed in v0.4.54 due to SSR issues\n // themeServicePlugin.install(app);\n\n // ✅ Register directives\n app.directive('icon-style', IconStyleDirective);\n app.directive('fr-sanitize', vFrSanitize);\n\n // ✅ Auto-register icon components (SSR-safe lazy loading)\n // Use lazy loading instead of eager to prevent TDZ errors in Nuxt3 SSR\n // Components are loaded on-demand when first used, which is SSR-safe\n // Wrap in try-catch and type assertion for DTS compatibility\n try {\n // @ts-expect-error - import.meta.glob is a Vite build-time feature\n const components: Record<string, () => Promise<{ default: any }>> =\n import.meta.glob('./icons/**/*.vue', {\n eager: false,\n });\n\n // Register icons lazily using defineAsyncComponent for SSR compatibility\n // This prevents initialization errors in SSR environments like Nuxt3\n for (const path in components) {\n const name = path.split('/').pop()?.replace('.vue', '') || '';\n if (name && components[path]) {\n // Register component with async loader - SSR-safe\n app.component(\n name,\n defineAsyncComponent({\n loader: async () => {\n const component: any = await components[path]();\n return component.default || component;\n },\n delay: 0,\n timeout: 0,\n })\n );\n }\n }\n } catch (error) {\n // Silently fail during type generation - icons will be registered at runtime\n if (\n typeof process !== 'undefined' &&\n process.env.NODE_ENV !== 'production'\n ) {\n console.warn('Failed to register icons:', error);\n }\n }\n },\n};\n\nexport default FreddyPlugin;\n","// src/plugins/index.ts\nimport type { App } from \"vue\";\nimport { vFrSanitize } from \"../directives/frSanitize\";\nimport IconStyleDirective from \"./icon-style\";\n\n// Plugin that installs fr-sanitize directive\nexport const frSanitizePlugin = {\n install(app: App) {\n app.directive(\"fr-sanitize\", vFrSanitize);\n },\n};\n\n// Plugin that installs icon-style directive\nexport const iconStylePlugin = {\n install(app: App) {\n app.directive(\"icon-style\", IconStyleDirective);\n },\n};\n\n// Combined plugin that installs both directives\nexport default {\n install(app: App) {\n frSanitizePlugin.install(app);\n iconStylePlugin.install(app);\n },\n};\n","<template>\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 800 600\"\n class=\"spaceman-logo\"\n :class=\"customClass\"\n :style=\"customStyle\"\n >\n <g>\n <defs>\n <clipPath id=\"GlassClip\">\n <path\n d=\"M380.857,346.164c-1.247,4.651-4.668,8.421-9.196,10.06c-9.332,3.377-26.2,7.817-42.301,3.5\n s-28.485-16.599-34.877-24.192c-3.101-3.684-4.177-8.66-2.93-13.311l7.453-27.798c0.756-2.82,3.181-4.868,6.088-5.13\n c6.755-0.61,20.546-0.608,41.785,5.087s33.181,12.591,38.725,16.498c2.387,1.682,3.461,4.668,2.705,7.488L380.857,346.164z\"\n />\n </clipPath>\n <clipPath id=\"cordClip\">\n <rect width=\"800\" height=\"600\" />\n </clipPath>\n </defs>\n\n <g id=\"planet\">\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n cx=\"572.859\"\n cy=\"108.803\"\n r=\"90.788\"\n />\n\n <circle\n id=\"craterBig\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n cx=\"548.891\"\n cy=\"62.319\"\n r=\"13.074\"\n />\n\n <circle\n id=\"craterSmall\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n cx=\"591.743\"\n cy=\"158.918\"\n r=\"7.989\"\n />\n <path\n id=\"ring\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M476.562,101.461c-30.404,2.164-49.691,4.221-49.691,8.007c0,6.853,63.166,12.408,141.085,12.408s141.085-5.555,141.085-12.408\n c0-3.378-15.347-4.988-40.243-7.225\"\n />\n\n <path\n id=\"ringShadow\"\n opacity=\"0.5\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M483.985,127.43c23.462,1.531,52.515,2.436,83.972,2.436c36.069,0,68.978-1.19,93.922-3.149\"\n />\n </g>\n <g id=\"stars\">\n <g id=\"starsBig\">\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"518.07\"\n y1=\"245.375\"\n x2=\"518.07\"\n y2=\"266.581\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"508.129\"\n y1=\"255.978\"\n x2=\"528.01\"\n y2=\"255.978\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"154.55\"\n y1=\"231.391\"\n x2=\"154.55\"\n y2=\"252.598\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"144.609\"\n y1=\"241.995\"\n x2=\"164.49\"\n y2=\"241.995\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"320.135\"\n y1=\"132.746\"\n x2=\"320.135\"\n y2=\"153.952\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"310.194\"\n y1=\"143.349\"\n x2=\"330.075\"\n y2=\"143.349\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"200.67\"\n y1=\"483.11\"\n x2=\"200.67\"\n y2=\"504.316\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"210.611\"\n y1=\"493.713\"\n x2=\"190.73\"\n y2=\"493.713\"\n />\n </g>\n </g>\n <g id=\"starsSmall\">\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"432.173\"\n y1=\"380.52\"\n x2=\"432.173\"\n y2=\"391.83\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"426.871\"\n y1=\"386.175\"\n x2=\"437.474\"\n y2=\"386.175\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"489.555\"\n y1=\"299.765\"\n x2=\"489.555\"\n y2=\"308.124\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"485.636\"\n y1=\"303.945\"\n x2=\"493.473\"\n y2=\"303.945\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"231.468\"\n y1=\"291.009\"\n x2=\"231.468\"\n y2=\"299.369\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"227.55\"\n y1=\"295.189\"\n x2=\"235.387\"\n y2=\"295.189\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"244.032\"\n y1=\"547.539\"\n x2=\"244.032\"\n y2=\"555.898\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"247.95\"\n y1=\"551.719\"\n x2=\"240.113\"\n y2=\"551.719\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"186.359\"\n y1=\"406.967\"\n x2=\"186.359\"\n y2=\"415.326\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"190.277\"\n y1=\"411.146\"\n x2=\"182.44\"\n y2=\"411.146\"\n />\n </g>\n <g>\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"480.296\"\n y1=\"406.967\"\n x2=\"480.296\"\n y2=\"415.326\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"484.215\"\n y1=\"411.146\"\n x2=\"476.378\"\n y2=\"411.146\"\n />\n </g>\n </g>\n <g id=\"circlesBig\">\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"588.977\"\n cy=\"255.978\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"450.066\"\n cy=\"320.259\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"168.303\"\n cy=\"353.753\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"429.522\"\n cy=\"201.185\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"200.67\"\n cy=\"176.313\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"133.343\"\n cy=\"477.014\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"283.521\"\n cy=\"568.033\"\n r=\"7.952\"\n />\n\n <circle\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"413.618\"\n cy=\"482.387\"\n r=\"7.952\"\n />\n </g>\n <g id=\"circlesSmall\">\n <circle fill=\"#ffffff\" cx=\"549.879\" cy=\"296.402\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"253.29\" cy=\"229.24\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"434.824\" cy=\"263.931\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"183.708\" cy=\"544.176\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"382.515\" cy=\"530.923\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"130.693\" cy=\"305.608\" r=\"2.651\" />\n <circle fill=\"#ffffff\" cx=\"480.296\" cy=\"477.014\" r=\"2.651\" />\n </g>\n </g>\n <g id=\"spaceman\" clip-path=\"url(cordClip)\">\n <path\n id=\"cord\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M273.813,410.969c0,0-54.527,39.501-115.34,38.218c-2.28-0.048-4.926-0.241-7.841-0.548\n c-68.038-7.178-134.288-43.963-167.33-103.87c-0.908-1.646-1.793-3.3-2.654-4.964c-18.395-35.511-37.259-83.385-32.075-118.817\"\n />\n\n <path\n id=\"backpack\"\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M338.164,454.689l-64.726-17.353c-11.086-2.972-17.664-14.369-14.692-25.455l15.694-58.537\n c3.889-14.504,18.799-23.11,33.303-19.221l52.349,14.035c14.504,3.889,23.11,18.799,19.221,33.303l-15.694,58.537\n C360.647,451.083,349.251,457.661,338.164,454.689z\"\n />\n <g id=\"antenna\">\n <line\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"323.396\"\n y1=\"236.625\"\n x2=\"295.285\"\n y2=\"353.753\"\n />\n <circle\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"323.666\"\n cy=\"235.617\"\n r=\"6.375\"\n />\n </g>\n <g id=\"armR\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M360.633,363.039c1.352,1.061,4.91,5.056,5.824,6.634l27.874,47.634c3.855,6.649,1.59,15.164-5.059,19.02l0,0\n c-6.649,3.855-15.164,1.59-19.02-5.059l-5.603-9.663\"\n />\n\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M388.762,434.677c5.234-3.039,7.731-8.966,6.678-14.594c2.344,1.343,4.383,3.289,5.837,5.793\n c4.411,7.596,1.829,17.33-5.767,21.741c-7.596,4.411-17.33,1.829-21.741-5.767c-1.754-3.021-2.817-5.818-2.484-9.046\n C375.625,437.355,383.087,437.973,388.762,434.677z\"\n />\n </g>\n <g id=\"armL\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M301.301,347.66c-1.702,0.242-5.91,1.627-7.492,2.536l-47.965,27.301c-6.664,3.829-8.963,12.335-5.134,18.999h0\n c3.829,6.664,12.335,8.963,18.999,5.134l9.685-5.564\"\n />\n\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M241.978,395.324c-3.012-5.25-2.209-11.631,1.518-15.977c-2.701-0.009-5.44,0.656-7.952,2.096\n c-7.619,4.371-10.253,14.09-5.883,21.71c4.371,7.619,14.09,10.253,21.709,5.883c3.03-1.738,5.35-3.628,6.676-6.59\n C252.013,404.214,245.243,401.017,241.978,395.324z\"\n />\n </g>\n <g id=\"body\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M353.351,365.387c-7.948,1.263-16.249,0.929-24.48-1.278c-8.232-2.207-15.586-6.07-21.836-11.14\n c-17.004,4.207-31.269,17.289-36.128,35.411l-1.374,5.123c-7.112,26.525,8.617,53.791,35.13,60.899l0,0\n c26.513,7.108,53.771-8.632,60.883-35.158l1.374-5.123C371.778,395.999,365.971,377.536,353.351,365.387z\"\n />\n <path\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M269.678,394.912L269.678,394.912c26.3,20.643,59.654,29.585,93.106,25.724l2.419-0.114\"\n />\n </g>\n <g id=\"legs\">\n <g id=\"legR\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M312.957,456.734l-14.315,53.395c-1.896,7.07,2.299,14.338,9.37,16.234l0,0c7.07,1.896,14.338-2.299,16.234-9.37l17.838-66.534\n C333.451,455.886,323.526,457.387,312.957,456.734z\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"304.883\"\n y1=\"486.849\"\n x2=\"330.487\"\n y2=\"493.713\"\n />\n </g>\n <g id=\"legL\">\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M296.315,452.273L282,505.667c-1.896,7.07-9.164,11.265-16.234,9.37l0,0c-7.07-1.896-11.265-9.164-9.37-16.234l17.838-66.534\n C278.993,441.286,286.836,447.55,296.315,452.273z\"\n />\n\n <line\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n x1=\"262.638\"\n y1=\"475.522\"\n x2=\"288.241\"\n y2=\"482.387\"\n />\n </g>\n </g>\n <g id=\"head\">\n <ellipse\n transform=\"matrix(0.259 -0.9659 0.9659 0.259 -51.5445 563.2371)\"\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n cx=\"341.295\"\n cy=\"315.211\"\n rx=\"61.961\"\n ry=\"60.305\"\n />\n <path\n id=\"headStripe\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M330.868,261.338c-7.929,1.72-15.381,5.246-21.799,10.246\"\n />\n\n <path\n fill=\"#FFFFFF\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-miterlimit=\"10\"\n d=\"\n M380.857,346.164c-1.247,4.651-4.668,8.421-9.196,10.06c-9.332,3.377-26.2,7.817-42.301,3.5s-28.485-16.599-34.877-24.192\n c-3.101-3.684-4.177-8.66-2.93-13.311l7.453-27.798c0.756-2.82,3.181-4.868,6.088-5.13c6.755-0.61,20.546-0.608,41.785,5.087\n s33.181,12.591,38.725,16.498c2.387,1.682,3.461,4.668,2.705,7.488L380.857,346.164z\"\n />\n <g clip-path=\"url(#GlassClip)\">\n <polygon\n id=\"glassShine\"\n fill=\"none\"\n stroke=\"#ffffff\"\n stroke-width=\"3\"\n stroke-miterlimit=\"10\"\n points=\"\n 278.436,375.599 383.003,264.076 364.393,251.618 264.807,364.928 \t\t\t\t\"\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n</template>\n\n<script setup lang=\"ts\">\ninterface SpacemanLogoProps {\n /** Custom CSS class to apply to the component */\n customClass?: string;\n /** Custom inline styles to apply */\n customStyle?: string | Record<string, string>;\n}\n\ndefineProps<SpacemanLogoProps>();\n</script>\n\n<style>\n/* Spaceman animations */\n@keyframes float {\n 0%,\n 100% {\n transform: translateY(0px);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n.spaceman-logo {\n animation: float 3s ease-in-out infinite;\n}\n\n.spaceman-logo #planet {\n animation: rotate 20s linear infinite;\n}\n\n.spaceman-logo #stars {\n animation: float 4s ease-in-out infinite reverse;\n}\n</style>\n","<template>\n <Transition name=\"modal\">\n <div v-if=\"isVisible\" class=\"freddy-plugins-adv-modal-wrapper\">\n <div class=\"freddy-plugins-adv-modal-center\">\n <div\n :class=\"{\n 'freddy-plugins-adv-modal-container': largeModel,\n }\"\n >\n <div class=\"freddy-plugins-adv-modal-header\">\n <slot name=\"header\" />\n </div>\n\n <div class=\"freddy-plugins-adv-modal-body\">\n <slot name=\"body\" />\n </div>\n\n <div class=\"freddy-plugins-adv-modal-footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n defineProps<{\n isVisible: boolean;\n largeModel: boolean;\n }>();\n</script>\n\n<style scoped>\n .freddy-plugins-adv-modal-wrapper {\n position: fixed;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(29, 46, 71, 0.9);\n backdrop-filter: blur(4px);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .freddy-plugins-adv-modal-center {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .freddy-plugins-adv-modal-container {\n padding: 2rem;\n background-color: #0f172a;\n border-radius: 2.5rem;\n overflow: hidden;\n color: white;\n width: auto;\n }\n\n /* Responsive widths */\n @media (min-width: 640px) {\n .freddy-plugins-adv-modal-container {\n width: 31.25rem;\n }\n }\n\n @media (min-width: 768px) {\n .freddy-plugins-adv-modal-container {\n width: 45.625rem;\n }\n }\n\n @media (min-width: 1024px) {\n .freddy-plugins-adv-modal-container {\n width: 56.25rem;\n }\n }\n</style>\n","<template>\n <div\n class=\"freddy-assistant-field\"\n :class=\"{ 'freddy-assistant-field--selected': isSelected }\"\n @click=\"handleClick\"\n >\n <div class=\"freddy-assistant-field__content\">\n <div class=\"freddy-assistant-field__header\">\n <div class=\"freddy-assistant-field__name\">{{ name }}</div>\n <div class=\"freddy-assistant-field__date\">{{ date }}</div>\n </div>\n <div class=\"freddy-assistant-field__footer\">\n <div class=\"freddy-assistant-field__id\">{{ assistantId }}</div>\n <div v-if=\"isDefault\" class=\"freddy-assistant-field__privacy-icon\">\n <IconLock class=\"freddy-assistant-field__lock-icon\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { IconLock } from '@/icons';\n import type { AssistantFieldProps, AssistantFieldEvents } from '@/interfaces';\n\n const props = withDefaults(defineProps<AssistantFieldProps>(), {\n name: 'Name of the assistant',\n date: 'mar 2024',\n assistantId: 'Ass_id.asdasddas',\n isDefault: false,\n isSelected: false,\n });\n\n const emit = defineEmits<AssistantFieldEvents>();\n\n const handleClick = (event: MouseEvent) => {\n emit('assistantFieldClick', event);\n };\n</script>\n\n<style scoped>\n .freddy-assistant-field {\n min-height: 54px;\n min-width: 346px;\n max-height: 80px;\n padding: 12px;\n background: #031525;\n overflow: hidden;\n border-radius: 16px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n }\n\n .freddy-assistant-field:hover {\n background: #0a1f3a;\n transform: scale(1.02);\n border-radius: 16px;\n }\n\n .freddy-assistant-field--selected {\n background: #1d2e47;\n transform: scale(1.02);\n border-radius: 16px;\n }\n\n .freddy-assistant-field__content {\n align-self: stretch;\n overflow: hidden;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-assistant-field__header {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: inline-flex;\n }\n\n .freddy-assistant-field__name {\n color: white;\n font-size: 16px;\n font-family: Inter;\n font-weight: 600;\n line-height: 24px;\n word-wrap: break-word;\n }\n\n .freddy-assistant-field__date {\n color: #cbd6e3;\n font-size: 10px;\n font-family: Inter;\n font-weight: 400;\n line-height: 18px;\n word-wrap: break-word;\n }\n\n .freddy-assistant-field__footer {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: inline-flex;\n }\n\n .freddy-assistant-field__id {\n justify-content: flex-start;\n display: flex;\n flex-direction: row;\n color: #cbd6e3;\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-assistant-field__privacy-icon {\n width: 22px;\n height: 22px;\n padding: 3px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 100px;\n justify-content: center;\n align-items: center;\n display: flex;\n }\n\n .freddy-assistant-field__lock-icon {\n width: 16px;\n height: 16px;\n position: relative;\n overflow: hidden;\n border-radius: 100px;\n color: black;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-assistant-field {\n padding: 10px;\n gap: 8px;\n }\n\n .freddy-assistant-field__name {\n font-size: 14px;\n line-height: 20px;\n }\n\n .freddy-assistant-field__id {\n font-size: 12px;\n line-height: 18px;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-assistant-field {\n padding: 8px;\n gap: 6px;\n }\n\n .freddy-assistant-field__name {\n font-size: 12px;\n line-height: 18px;\n }\n\n .freddy-assistant-field__date {\n font-size: 8px;\n line-height: 14px;\n }\n\n .freddy-assistant-field__id {\n font-size: 10px;\n line-height: 16px;\n }\n }\n</style>\n","<template>\n <div class=\"freddy-assistant-list\">\n <div class=\"freddy-assistant-list__container\">\n <AssistantField\n v-for=\"(assistant, index) in assistantsWithSelection\"\n :key=\"assistant.id || index\"\n :name=\"assistant.name\"\n :date=\"assistant.date\"\n :assistantId=\"assistant.assistantId\"\n :isDefault=\"assistant.isDefault\"\n :isSelected=\"assistant.isSelected\"\n @assistantFieldClick=\"handleAssistantClick(assistant, $event)\"\n />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed } from 'vue';\n import { AssistantField } from '@/components';\n import type {\n AssistantListProps,\n AssistantListEvents,\n AssistantItem,\n } from '@/interfaces';\n\n const props = withDefaults(defineProps<AssistantListProps>(), {\n assistants: () => [],\n selectedAssistantId: null,\n });\n\n const emit = defineEmits<AssistantListEvents>();\n\n // Track selected assistant (internal state)\n const internalSelectedId = ref<string | null>(props.selectedAssistantId);\n\n // Computed property to update assistant selection state\n const assistantsWithSelection = computed(() => {\n const currentSelectedId =\n props.selectedAssistantId ?? internalSelectedId.value;\n return props.assistants.map(assistant => ({\n ...assistant,\n isSelected: assistant.assistantId === currentSelectedId,\n }));\n });\n\n const handleAssistantClick = (\n assistant: AssistantItem,\n event: MouseEvent\n ) => {\n // Update internal selection state using assistantId\n internalSelectedId.value = assistant.assistantId;\n\n // Emit the event\n emit('assistantClick', assistant, event);\n };\n</script>\n\n<style scoped>\n .freddy-assistant-list {\n width: 100%;\n height: 100%;\n min-height: 824px;\n padding-right: 10px;\n background: #031525;\n border-right: 1px solid white;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n\n .freddy-assistant-list__container {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-assistant-list {\n padding-right: 8px;\n gap: 8px;\n }\n\n .freddy-assistant-list__container {\n gap: 8px;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-assistant-list {\n padding-right: 6px;\n gap: 6px;\n }\n\n .freddy-assistant-list__container {\n gap: 6px;\n }\n }\n</style>\n","<template>\n <div class=\"freddy-assistants-header\">\n <!-- Avatar Section with Edit Button Overlay -->\n <div\n class=\"freddy-assistants-header__avatar-section\"\n :class=\"{\n 'freddy-assistants-header__avatar-section--with-image': assistantImage,\n 'freddy-assistants-header__avatar-section--no-image': !assistantImage,\n }\"\n >\n <!-- When assistantImage is provided -->\n <div v-if=\"assistantImage\" class=\"freddy-assistants-header__avatar\">\n <img\n :src=\"assistantImage\"\n alt=\"Assistant Avatar\"\n class=\"freddy-assistants-header__avatar-image\"\n />\n <!-- Edit Button Overlay for image -->\n <button\n class=\"freddy-assistants-header__edit-overlay\"\n @click=\"handleEditClick\"\n >\n <IconEdit class=\"freddy-assistants-header__edit-icon\" />\n </button>\n </div>\n\n <!-- When no assistantImage - show icon in place of image -->\n <div v-else class=\"freddy-assistants-header__icon-with-edit\">\n <component\n :is=\"iconComponent\"\n class=\"freddy-assistants-header__icon-component\"\n />\n <button\n class=\"freddy-assistants-header__edit-overlay-icon\"\n @click=\"handleEditClick\"\n >\n <IconEdit class=\"freddy-assistants-header__edit-icon\" />\n </button>\n </div>\n\n <!-- Icon next to avatar (when image is provided) -->\n <div\n v-if=\"assistantImage && assistantIcon\"\n class=\"freddy-assistants-header__side-icon\"\n >\n <component\n :is=\"iconComponent\"\n class=\"freddy-assistants-header__side-icon-component\"\n />\n </div>\n </div>\n\n <!-- Center Content Section -->\n <div class=\"freddy-assistants-header__content\">\n <div class=\"freddy-assistants-header__content-inner\">\n <!-- Text Content -->\n <div class=\"freddy-assistants-header__text-content\">\n <!-- Assistant ID Badge -->\n <div class=\"freddy-assistants-header__id-badge\">\n {{ assistantId || 'assistant ID' }}\n </div>\n </div>\n </div>\n </div>\n\n <!-- Right Action Button -->\n <div class=\"freddy-assistants-header__actions\">\n <button\n class=\"freddy-assistants-header__playground-button\"\n @click=\"handlePlaygroundClick\"\n >\n <IconNewTab class=\"freddy-assistants-header__playground-icon\" />\n <span class=\"freddy-assistants-header__playground-label\"\n >Playground</span\n >\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineAsyncComponent } from 'vue';\n import { IconEdit, IconNewTab, IconRobotScreen } from '@/icons';\n\n interface Props {\n // Assistant Props\n assistantImage?: string;\n assistantIcon: string; // Icon name as string (e.g., \"IconRobotScreen\") - REQUIRED\n assistantId?: string;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n assistantImage: undefined,\n assistantIcon: 'IconRobotScreen', // Default icon since it's required\n assistantId: 'assistant ID',\n });\n\n const emit = defineEmits<{\n edit: [event: MouseEvent];\n playground: [event: MouseEvent];\n }>();\n\n const handleEditClick = (event: MouseEvent) => {\n emit('edit', event);\n };\n\n const handlePlaygroundClick = (event: MouseEvent) => {\n emit('playground', event);\n };\n\n // Dynamic icon component resolver with lazy loading\n const getIconComponent = (iconName: string) => {\n if (!iconName) return IconRobotScreen;\n\n // Dynamically import the icon component\n return defineAsyncComponent(() =>\n import(`@/icons/${iconName}.vue`).catch(() => {\n // Fallback to IconRobotScreen if icon not found\n return import('@/icons/IconRobotScreen.vue');\n })\n );\n };\n\n // Computed property for reactive icon component\n const iconComponent = computed(() => getIconComponent(props.assistantIcon));\n</script>\n\n<style>\n .freddy-assistants-header {\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n\n padding: 0;\n background: transparent;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n /* Avatar Section */\n .freddy-assistants-header__avatar-section {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n /* When there's an image - gap between image and side icon */\n .freddy-assistants-header__avatar-section--with-image {\n gap: 30px;\n }\n\n /* When there's no image - gap between icon and text */\n .freddy-assistants-header__avatar-section--no-image {\n gap: 15px;\n }\n\n .freddy-assistants-header__avatar {\n width: 60px;\n height: 60px;\n border-radius: 50%;\n overflow: visible;\n background: #cfcbdc;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n\n .freddy-assistants-header__avatar-image {\n width: 60px;\n height: 60px;\n background: #cfcbdc;\n border-radius: 50%;\n object-fit: cover;\n }\n\n .freddy-assistants-header__avatar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background: #cfcbdc;\n border-radius: 50%;\n }\n\n .freddy-assistants-header__icon-component {\n width: 40px;\n height: 40px;\n color: #031525;\n }\n\n .freddy-assistants-header__avatar-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background: #cfcbdc;\n border-radius: 50%;\n }\n\n .freddy-assistants-header__placeholder-edit-icon {\n width: 24px;\n height: 24px;\n color: #031525;\n }\n\n /* Icon with Edit Overlay */\n .freddy-assistants-header__icon-with-edit {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n /* background: #cfcbdc; - Removed background for transparency */\n border-radius: 50%;\n }\n\n .freddy-assistants-header__icon-with-edit\n .freddy-assistants-header__icon-component {\n width: 40px;\n height: 40px;\n color: #031525;\n }\n\n .freddy-assistants-header__edit-overlay-icon {\n position: absolute;\n bottom: -2px;\n right: -2px;\n width: 20px;\n height: 20px;\n padding: 2px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n border-radius: 50%;\n border: 2px solid white;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-assistants-header__edit-overlay-icon:hover {\n background: var(--Colors-Background-bg-action-hover, #6b98df);\n transform: scale(1.05);\n }\n\n /* Side Icon (next to avatar when image is provided) */\n .freddy-assistants-header__side-icon {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-assistants-header__side-icon-component {\n width: 24px;\n height: 24px;\n color: #031525;\n }\n\n /* Content Section */\n .freddy-assistants-header__content {\n flex: 1 1 0;\n align-self: stretch;\n padding-top: 10px;\n padding-left: 10px;\n padding-right: 10px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n }\n\n /* Gap between side icon and content when image is present */\n .freddy-assistants-header__avatar-section--with-image\n + .freddy-assistants-header__content {\n margin-left: 24px;\n }\n\n .freddy-assistants-header__content-inner {\n align-self: stretch;\n justify-content: flex-start;\n align-items: center;\n gap: 16px;\n display: inline-flex;\n flex-wrap: wrap;\n align-content: center;\n }\n\n /* Assistant Icon */\n .freddy-assistants-header__icon {\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n position: relative;\n }\n\n .freddy-assistants-header__icon-image {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n\n .freddy-assistants-header__icon-component {\n width: 24px;\n height: 24px;\n color: #031525;\n }\n\n /* Text Content */\n .freddy-assistants-header__text-content {\n flex: 1 1 0;\n min-width: 320px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 4px;\n display: inline-flex;\n }\n\n /* Assistant ID Badge */\n .freddy-assistants-header__id-badge {\n display: inline-flex;\n align-items: center;\n height: 48px;\n padding: 0 8px;\n background: transparent;\n border-radius: 8px;\n font-family: 'Inter', sans-serif;\n font-size: 20px;\n font-weight: 700;\n line-height: 30px;\n color: var(--Colors-Texts-text-primary, #ffffff);\n white-space: nowrap;\n word-wrap: break-word;\n overflow: hidden;\n justify-content: center;\n gap: 8px;\n }\n\n /* Actions Section */\n .freddy-assistants-header__actions {\n flex-shrink: 0;\n }\n\n /* Playground Button */\n .freddy-assistants-header__playground-button {\n display: flex;\n align-items: center;\n gap: 8px;\n height: 40px;\n min-width: 40px;\n min-height: 20px;\n padding: 4px 8px;\n background: var(--Colors-Base-white, #ffffff);\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n outline: 2px white solid;\n outline-offset: -2px;\n position: relative;\n overflow: hidden;\n justify-content: center;\n }\n\n .freddy-assistants-header__playground-button:hover {\n background: #f9fafb;\n transform: translateY(-1px);\n }\n\n .freddy-assistants-header__playground-button:active {\n transform: translateY(0);\n background: #f3f4f6;\n }\n\n .freddy-assistants-header__playground-icon {\n width: 20px;\n height: 20px;\n color: var(--Colors-Texts-text-action-button, #031525);\n flex-shrink: 0;\n position: relative;\n overflow: hidden;\n }\n\n .freddy-assistants-header__playground-label {\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--Colors-Texts-text-action-button, #031525);\n white-space: nowrap;\n word-wrap: break-word;\n flex: 1 1 0;\n }\n\n /* Edit Button Overlay */\n .freddy-assistants-header__edit-overlay {\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 20px;\n height: 20px;\n padding: 2px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border: none;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n outline: 2px white solid;\n outline-offset: -2px;\n overflow: hidden;\n }\n\n .freddy-assistants-header__edit-overlay:hover {\n background: #6b9ae8;\n transform: scale(1.05);\n }\n\n .freddy-assistants-header__edit-overlay:active {\n transform: scale(0.95);\n }\n\n .freddy-assistants-header__edit-icon {\n width: 12px;\n height: 12px;\n color: var(--Colors-Texts-text-action-button, #031525);\n position: relative;\n overflow: hidden;\n }\n\n /* Responsive Design */\n @media (max-width: 768px) {\n .freddy-assistants-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n height: auto;\n padding: 16px;\n }\n\n .freddy-assistants-header__content {\n width: 100%;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-assistants-header__content-inner {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n }\n</style>\n","<template>\n <div\n class=\"freddy-avatar-choosing\"\n :class=\"{ 'freddy-avatar-choosing--selected': isSelected }\"\n @click=\"handleClick\"\n >\n <!-- Circular Background -->\n <div\n class=\"freddy-avatar-choosing__background\"\n :style=\"{ backgroundColor: backgroundColor }\"\n ></div>\n\n <!-- Avatar Image -->\n <img :src=\"imageUrl\" :alt=\"altText\" class=\"freddy-avatar-choosing__image\" />\n\n <!-- Selection Border (only when selected) -->\n <div v-if=\"isSelected\" class=\"freddy-avatar-choosing__border\"></div>\n\n <!-- Check Icon (only when selected) -->\n <div v-if=\"isSelected\" class=\"freddy-avatar-choosing__check-icon\">\n <IconTick class=\"freddy-avatar-choosing__check-icon-svg\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import IconTick from '@/icons/IconTick.vue';\n\n interface Props {\n imageUrl: string;\n isSelected?: boolean;\n altText?: string;\n backgroundColor?: string;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n isSelected: false,\n altText: 'Avatar',\n backgroundColor: '#cfcbdc',\n });\n\n const emit = defineEmits<{\n click: [event: MouseEvent];\n }>();\n\n const handleClick = (event: MouseEvent) => {\n emit('click', event);\n };\n</script>\n\n<style>\n .freddy-avatar-choosing {\n width: 138px;\n height: 138px;\n position: relative;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-avatar-choosing:hover {\n transform: scale(1.02);\n }\n\n .freddy-avatar-choosing__background {\n width: 118px;\n height: 118px;\n left: 10px;\n top: 10px;\n position: absolute;\n border-radius: 50%;\n z-index: 1;\n }\n\n .freddy-avatar-choosing__image {\n width: 118px;\n height: 118px;\n left: 10px;\n top: 10px;\n position: absolute;\n border-radius: 50%;\n object-fit: cover;\n transition: all 0.2s ease;\n z-index: 2;\n }\n\n .freddy-avatar-choosing--selected .freddy-avatar-choosing__image {\n box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 0.25);\n }\n\n .freddy-avatar-choosing__border {\n width: 138px;\n height: 138px;\n left: -1px;\n top: -2px;\n position: absolute;\n border-radius: 50%;\n border: 2px var(--Colors-Background-bg-action, #7ba8ef) solid;\n z-index: 3;\n }\n\n .freddy-avatar-choosing__check-icon {\n width: 25px;\n height: 25px;\n padding: 3px;\n left: 109px;\n top: 4px;\n position: absolute;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n z-index: 4;\n }\n\n .freddy-avatar-choosing__check-icon-svg {\n width: 13px;\n height: 13px;\n position: relative;\n overflow: hidden;\n color: var(--Colors-Base-white, white);\n }\n\n /* Check icon inner circle */\n .freddy-avatar-choosing__check-icon-svg::before {\n content: '';\n width: 8.67px;\n height: 5.96px;\n left: 2.17px;\n top: 3.25px;\n position: absolute;\n outline: 2px var(--Colors-Base-white, white) solid;\n outline-offset: -1px;\n }\n</style>\n","<template>\n <div class=\"freddy-avatar-list\">\n <h3 v-if=\"title\" class=\"freddy-avatar-list__title\">{{ title }}</h3>\n <div class=\"freddy-avatar-list__grid\">\n <AvatarChoosing\n v-for=\"avatar in avatars\"\n :key=\"avatar.id\"\n :imageUrl=\"avatar.url\"\n :isSelected=\"selectedAvatarId === avatar.id\"\n :altText=\"avatar.name\"\n @click=\"handleAvatarClick(avatar.id)\"\n />\n </div>\n <div v-if=\"showSelectedInfo\" class=\"freddy-avatar-list__selected-info\">\n <p>Selected: {{ selectedAvatar?.name || \"None\" }}</p>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { AvatarChoosing } from \"@/components\";\n\ninterface Avatar {\n id: string | number;\n url: string;\n name: string;\n}\n\ninterface Props {\n avatars: Avatar[];\n title?: string;\n showSelectedInfo?: boolean;\n allowDeselect?: boolean;\n multiple?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n title: \"\",\n showSelectedInfo: true,\n allowDeselect: true,\n multiple: false,\n});\n\nconst emit = defineEmits<{\n selectionChange: [selectedId: string | number | null];\n avatarClick: [avatarId: string | number, isSelected: boolean];\n}>();\n\nconst selectedAvatarId = ref<string | number | null>(null);\n\nconst selectedAvatar = computed(() => {\n return (\n props.avatars.find((avatar) => avatar.id === selectedAvatarId.value) || null\n );\n});\n\nconst handleAvatarClick = (avatarId: string | number) => {\n const isCurrentlySelected = selectedAvatarId.value === avatarId;\n\n if (isCurrentlySelected && props.allowDeselect) {\n // Deselect if already selected and deselection is allowed\n selectedAvatarId.value = null;\n } else {\n // Select the clicked avatar\n selectedAvatarId.value = avatarId;\n }\n\n // Emit events\n emit(\"selectionChange\", selectedAvatarId.value);\n emit(\"avatarClick\", avatarId, selectedAvatarId.value === avatarId);\n};\n\n// Expose methods for parent components\ndefineExpose({\n selectedAvatarId,\n selectedAvatar,\n selectAvatar: (id: string | number) => {\n selectedAvatarId.value = id;\n emit(\"selectionChange\", id);\n },\n clearSelection: () => {\n selectedAvatarId.value = null;\n emit(\"selectionChange\", null);\n },\n});\n</script>\n\n<style>\n.freddy-avatar-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.freddy-avatar-list__title {\n font-family: \"Inter\", sans-serif;\n font-size: 18px;\n font-weight: 600;\n color: var(--Colors-Texts-text-primary, #ffffff);\n margin: 0;\n}\n\n.freddy-avatar-list__grid {\n display: flex;\n gap: 16px;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.freddy-avatar-list__selected-info {\n padding: 12px;\n background: var(--Colors-Background-bg-secondary, #1a1a1a);\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-primary, #333333);\n}\n\n.freddy-avatar-list__selected-info p {\n font-family: \"Inter\", sans-serif;\n font-size: 14px;\n color: var(--Colors-Texts-text-secondary, #cccccc);\n margin: 0;\n}\n</style>\n","<template>\n <div class=\"freddy-choose-assistant-avatar\">\n <!-- Header Section -->\n <div class=\"freddy-choose-assistant-avatar__header\">\n <div class=\"freddy-choose-assistant-avatar__title-section\">\n <div class=\"freddy-choose-assistant-avatar__title-row\">\n <h1 class=\"freddy-choose-assistant-avatar__title\">{{ title }}</h1>\n <button\n class=\"freddy-choose-assistant-avatar__close-button\"\n @click=\"handleClose\"\n :aria-label=\"closeButtonAriaLabel\"\n >\n <IconCross class=\"freddy-choose-assistant-avatar__close-icon\" />\n </button>\n </div>\n </div>\n <p class=\"freddy-choose-assistant-avatar__description\">\n {{ description }}\n </p>\n </div>\n\n <!-- Main Content -->\n <div class=\"freddy-choose-assistant-avatar__content\">\n <!-- Icon Selection Section -->\n <div class=\"freddy-choose-assistant-avatar__section\">\n <h3 class=\"freddy-choose-assistant-avatar__section-title\">\n Choose the icon\n </h3>\n <div class=\"freddy-choose-assistant-avatar__icon-container\">\n <div class=\"freddy-choose-assistant-avatar__icon-search\">\n <button\n class=\"freddy-choose-assistant-avatar__search-button\"\n @click=\"handleUploadClick\"\n :aria-label=\"uploadButtonAriaLabel\"\n >\n <IconDataUpload\n class=\"freddy-choose-assistant-avatar__upload-icon\"\n />\n </button>\n <SearchInput\n v-model:searchInput=\"searchQuery\"\n :placeholder=\"searchPlaceholder\"\n class=\"freddy-choose-assistant-avatar__search-input-wrapper\"\n @update:searchInput=\"handleSearchInput\"\n />\n </div>\n <div class=\"freddy-choose-assistant-avatar__icon-grid\">\n <div\n v-for=\"(imageUrl, index) in props.imageUrls\"\n :key=\"index\"\n class=\"freddy-choose-assistant-avatar__icon-item\"\n :class=\"{\n 'freddy-choose-assistant-avatar__icon-item--selected':\n selectedImageIndex === index,\n }\"\n @click=\"handleImageSelect(imageUrl, index)\"\n :title=\"`Image ${index + 1}`\"\n >\n <div class=\"freddy-choose-assistant-avatar__icon-wrapper\">\n <img\n :src=\"imageUrl\"\n :alt=\"`Image ${index + 1}`\"\n class=\"freddy-choose-assistant-avatar__icon-image\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Face Selection Section -->\n <div\n v-if=\"faces && faces.length\"\n class=\"freddy-choose-assistant-avatar__section\"\n >\n <h3 class=\"freddy-choose-assistant-avatar__section-title\">\n Choose the face\n </h3>\n <div class=\"freddy-choose-assistant-avatar__face-grid\">\n <!-- <AvatarChoosing\n v-for=\"(face, index) in faces\"\n :key=\"face.id || index\"\n :imageUrl=\"face.imageUrl\"\n :altText=\"face.altText || `Face ${index + 1}`\"\n :backgroundColor=\"face.backgroundColor\"\n :isSelected=\"selectedFaceId === face.id\"\n @click=\"handleFaceSelect(face)\"\n /> -->\n </div>\n </div>\n\n <!-- Voice Selection Section -->\n <div\n v-if=\"voices && voices.length\"\n class=\"freddy-choose-assistant-avatar__section\"\n >\n <h3 class=\"freddy-choose-assistant-avatar__section-title\">\n Choose the voice\n </h3>\n <div class=\"freddy-choose-assistant-avatar__voice-list\">\n <VoiceSelection\n v-for=\"(voice, index) in voices\"\n :key=\"voice.id || index\"\n :voiceName=\"voice.name\"\n :isSelected=\"selectedVoiceId === voice.id\"\n @click=\"handleVoiceSelect(voice)\"\n />\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"freddy-choose-assistant-avatar__actions\">\n <button\n class=\"freddy-choose-assistant-avatar__cancel-button\"\n @click=\"handleCancel\"\n >\n {{ cancelButtonText }}\n </button>\n <button\n class=\"freddy-choose-assistant-avatar__save-button\"\n @click=\"handleSave\"\n :disabled=\"!canSave\"\n >\n {{ saveButtonText }}\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { AvatarChoosing, VoiceSelection, SearchInput } from '@/components';\n import * as Icons from '@/icons';\n import { IconCross, IconDataUpload } from '@/icons';\n\n interface Icon {\n id: string | number;\n name?: string;\n iconName?: string; // Icon name as string (e.g., \"IconRobotScreen\")\n component?: any; // Keep for backward compatibility\n }\n\n interface Face {\n id: string | number;\n imageUrl: string;\n altText?: string;\n backgroundColor?: string;\n }\n\n interface Voice {\n id: string | number;\n name: string;\n }\n\n interface Props {\n title?: string;\n description?: string;\n icons?: Icon[];\n imageUrls?: string[];\n faces?: Face[];\n voices?: Voice[];\n searchPlaceholder?: string;\n cancelButtonText?: string;\n saveButtonText?: string;\n closeButtonAriaLabel?: string;\n searchButtonAriaLabel?: string;\n uploadButtonAriaLabel?: string;\n allowMultipleSelection?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: 'Choose your assistant',\n description:\n \"Choose your assistant's appearance and select a preferred voice.\",\n icons: () => [],\n imageUrls: () => [],\n // faces: () => [\n // {\n // id: 1,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 1\",\n // backgroundColor: \"#ef4444\",\n // },\n // {\n // id: 2,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 2\",\n // backgroundColor: \"#14b8a6\",\n // },\n // {\n // id: 3,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 3\",\n // backgroundColor: \"#3b82f6\",\n // },\n // {\n // id: 4,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 4\",\n // backgroundColor: \"#10b981\",\n // },\n // {\n // id: 5,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 5\",\n // backgroundColor: \"#eab308\",\n // },\n // {\n // id: 6,\n // imageUrl: \"https://placehold.co/118x118\",\n // altText: \"Face 6\",\n // backgroundColor: \"#a855f7\",\n // },\n // ],\n voices: () => [\n { id: 1, name: 'Alloy' },\n { id: 2, name: 'Echo' },\n { id: 3, name: 'Fable' },\n { id: 4, name: 'Onyx' },\n { id: 5, name: 'Nova' },\n { id: 6, name: 'Shimmer' },\n { id: 7, name: 'Aurora' },\n { id: 8, name: 'Phoenix' },\n ],\n searchPlaceholder: 'Search icon',\n cancelButtonText: 'Cancel',\n saveButtonText: 'Save',\n closeButtonAriaLabel: 'Close dialog',\n searchButtonAriaLabel: 'Search icons',\n uploadButtonAriaLabel: 'Upload custom icon',\n allowMultipleSelection: false,\n });\n\n // Create icon list from available icons if no icons provided\n const createIconList = () => {\n const iconList: Icon[] = [];\n let id = 1;\n\n console.log('Available Icons object:', Icons);\n console.log('Icons entries:', Object.entries(Icons));\n\n for (const [name, component] of Object.entries(Icons)) {\n console.log(`Processing icon: ${name}`, component);\n\n // Skip if it's not a Vue component\n if (\n typeof component === 'object' &&\n component &&\n 'default' in component\n ) {\n const iconComponent = (component as any).default;\n console.log(`Adding icon: ${name}, component:`, iconComponent);\n\n iconList.push({\n id: id++,\n name: name.replace('Icon', ''), // Remove 'Icon' prefix for display\n iconName: name, // Store the full icon name\n component: iconComponent, // Keep for backward compatibility\n });\n } else {\n console.log(`Skipping ${name} - not a valid Vue component:`, component);\n }\n }\n\n console.log(\n `Loaded ${iconList.length} icons:`,\n iconList.map(i => i.name)\n );\n return iconList;\n };\n\n // Use provided icons or create from available icons\n const availableIcons = computed(() => {\n return props.icons.length > 0 ? props.icons : createIconList();\n });\n\n const emit = defineEmits<{\n close: [];\n cancel: [];\n save: [\n data: {\n selectedIconId: string | number | null;\n selectedImageUrl: string | null;\n selectedFaceId: string | number | null;\n selectedVoiceId: string | number | null;\n }\n ];\n iconSelect: [icon: Icon];\n imageSelect: [imageUrl: string];\n faceSelect: [face: Face];\n voiceSelect: [voice: Voice];\n searchInput: [query: string];\n searchClick: [];\n uploadClick: [];\n }>();\n\n // State\n const selectedIconId = ref<string | number | null>(null);\n const selectedImageUrl = ref<string | null>(null);\n const selectedImageIndex = ref<number | null>(null);\n const selectedFaceId = ref<string | number | null>(null);\n const selectedVoiceId = ref<string | number | null>(null);\n const searchQuery = ref('');\n\n // Computed\n const filteredIcons = computed(() => {\n if (!searchQuery.value) {\n console.log(`Displaying all ${availableIcons.value.length} icons`);\n return availableIcons.value;\n }\n const filtered = availableIcons.value.filter(icon =>\n icon.name?.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n console.log(\n `Filtered to ${filtered.length} icons for search: \"${searchQuery.value}\"`\n );\n return filtered;\n });\n\n const canSave = computed(() => {\n return (\n selectedIconId.value !== null ||\n selectedImageUrl.value !== null ||\n selectedFaceId.value !== null ||\n selectedVoiceId.value !== null\n );\n });\n\n // Methods\n const handleClose = () => {\n emit('close');\n };\n\n const handleCancel = () => {\n emit('cancel');\n };\n\n const handleSave = () => {\n if (!canSave.value) return;\n\n emit('save', {\n selectedIconId: selectedIconId.value,\n selectedImageUrl: selectedImageUrl.value,\n selectedFaceId: selectedFaceId.value,\n selectedVoiceId: selectedVoiceId.value,\n });\n };\n\n const handleIconSelect = (icon: Icon) => {\n selectedIconId.value = icon.id;\n emit('iconSelect', icon);\n };\n\n const handleImageSelect = (imageUrl: string, index: number) => {\n selectedImageUrl.value = imageUrl;\n selectedImageIndex.value = index;\n emit('imageSelect', imageUrl);\n };\n\n const handleFaceSelect = (face: Face) => {\n selectedFaceId.value = face.id;\n emit('faceSelect', face);\n };\n\n const handleVoiceSelect = (voice: Voice) => {\n selectedVoiceId.value = voice.id;\n emit('voiceSelect', voice);\n };\n\n const handleSearchInput = (value: string | null) => {\n searchQuery.value = value || '';\n emit('searchInput', value || '');\n };\n\n const handleSearchClick = () => {\n emit('searchClick');\n };\n\n const handleUploadClick = () => {\n emit('uploadClick');\n };\n\n // Simple icon component resolver (same as AssistantsHeader)\n const getIconComponent = (iconName: string) => {\n // Get the icon component from the imported icons\n const IconComponent = Icons[iconName as keyof typeof Icons];\n\n // Return the component or fallback to IconRobotScreen\n return IconComponent || Icons.IconRobotScreen;\n };\n\n // Expose methods for parent components\n defineExpose({\n selectedIconId,\n selectedImageUrl,\n selectedImageIndex,\n selectedFaceId,\n selectedVoiceId,\n resetSelections: () => {\n selectedIconId.value = null;\n selectedImageUrl.value = null;\n selectedImageIndex.value = null;\n selectedFaceId.value = null;\n selectedVoiceId.value = null;\n },\n });\n</script>\n\n<style lang=\"scss\">\n .freddy-choose-assistant-avatar {\n /*width: 100%;\n height: 100%;*/\n padding: 32px;\n background: var(--Colors-Background-bg-primaty, #031525);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 40px;\n outline: 3px white solid;\n outline-offset: -3px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__header {\n width: 879px;\n justify-content: flex-start;\n align-items: flex-start;\n display: inline-flex;\n flex-wrap: wrap;\n align-content: flex-start;\n }\n\n .freddy-choose-assistant-avatar__title-section {\n width: 880px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 6px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__title-row {\n align-self: stretch;\n justify-content: space-between;\n align-items: flex-start;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__title {\n color: var(--Colors-Base-white, white);\n font-size: 36px;\n font-family: Inter;\n font-weight: 500;\n line-height: 44px;\n word-wrap: break-word;\n margin: 0;\n }\n\n .freddy-choose-assistant-avatar__close-button {\n /*width: 44px;\n height: 44px;*/\n padding: 8px;\n padding-right: 0px;\n overflow: hidden;\n border-radius: 8px;\n justify-content: center;\n align-items: center;\n display: flex;\n background: transparent;\n border: none;\n cursor: pointer;\n transition: background-color 0.2s ease;\n }\n\n /*.freddy-choose-assistant-avatar__close-button:hover {\n background: rgba(255, 255, 255, 0.1);\n}*/\n\n .freddy-choose-assistant-avatar__close-icon {\n width: 32px;\n height: 32px;\n color: var(--Colors-Forground-fg-primary, #d7d3d0);\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__close-button:hover\n .freddy-choose-assistant-avatar__close-icon {\n color: var(--Colors-Base-white, white);\n }\n\n .freddy-choose-assistant-avatar__description {\n align-self: stretch;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 412px;\n display: inline-flex;\n flex: 1 1 0;\n color: var(--Colors-Texts-Text-Tetriary, #cbd6e3);\n font-size: 16px;\n font-family: Inter;\n font-weight: 400;\n line-height: 24px;\n word-wrap: break-word;\n margin: 0;\n }\n\n .freddy-choose-assistant-avatar__content {\n flex: 1 1 0;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 20px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__section {\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: flex;\n }\n\n .freddy-choose-assistant-avatar__section-title {\n align-self: stretch;\n color: var(--Colors-Base-white, white);\n font-size: 14px;\n font-family: Inter;\n font-weight: 400;\n line-height: 20px;\n word-wrap: break-word;\n margin: 0;\n }\n\n .freddy-choose-assistant-avatar__icon-container {\n align-self: stretch;\n padding: 12px 0 12px 12px;\n position: relative;\n overflow-x: auto;\n overflow-y: hidden;\n border-radius: 20px;\n outline: 1px var(--Colors-Border-border-secondary, #35414b) solid;\n outline-offset: -1px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: flex;\n }\n\n .freddy-choose-assistant-avatar__icon-search {\n width: 860px; /* Match the icon grid width */\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 14px;\n display: flex;\n }\n\n .freddy-choose-assistant-avatar__search-button {\n width: 40px;\n height: 40px;\n padding: 8px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 8px;\n outline-offset: -2px;\n justify-content: center;\n align-items: center;\n display: flex;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__search-button:hover {\n background: var(--Colors-Background-bg-action, #6a9ae8);\n }\n\n .freddy-choose-assistant-avatar__upload-icon {\n width: 20px;\n height: 20px;\n color: var(--Colors-Texts-text-action-button, #031525);\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__search-input-wrapper {\n flex: 1 1 0;\n width: 100%;\n }\n\n /* Override SearchInput colors to make text and icon white */\n .freddy-choose-assistant-avatar__search-input-wrapper .freddy-search-icon {\n stroke: white !important;\n color: white !important;\n }\n\n .freddy-choose-assistant-avatar__search-input-wrapper .freddy-search-input {\n color: white !important;\n }\n\n .freddy-choose-assistant-avatar__search-input-wrapper\n .freddy-search-input::placeholder {\n color: rgba(255, 255, 255, 0.7) !important;\n }\n\n .freddy-choose-assistant-avatar__icon-grid {\n width: 860px; /* 19 items × 32px + 18 gaps × 13px = 842px */\n height: 122px; /* 3 rows × 32px + 2 gaps × 13px = 122px */\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n overflow-y: auto;\n overflow-x: hidden;\n padding-right: 8px;\n align-content: flex-start;\n column-gap: 13px;\n }\n\n /* Custom scrollbar styling */\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-corner {\n display: none;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 9999px;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-thumb {\n background: var(\n --Colors-Background-bg-quinary-transparent,\n rgba(255, 255, 255, 0.4)\n );\n border-radius: 9999px;\n outline: 1px var(--Colors-Border-border-secondary, #35414b) solid;\n opacity: 0.5;\n }\n\n .freddy-choose-assistant-avatar__icon-grid::-webkit-scrollbar-thumb:hover {\n background: var(\n --Colors-Background-bg-quinary-transparent,\n rgba(255, 255, 255, 0.5)\n );\n opacity: 0.7;\n }\n\n /* Firefox scrollbar styling */\n .freddy-choose-assistant-avatar__icon-grid {\n scrollbar-width: thin;\n scrollbar-color: var(\n --Colors-Background-bg-quinary-transparent,\n rgba(255, 255, 255, 0.4)\n )\n transparent;\n }\n\n .freddy-choose-assistant-avatar__icon-item {\n width: 32px;\n height: 32px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__icon-item:hover {\n transform: scale(1.1);\n }\n\n .freddy-choose-assistant-avatar__icon-item--selected {\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border-radius: 4px;\n }\n\n .freddy-choose-assistant-avatar__icon-wrapper {\n width: 32px;\n height: 32px;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-choose-assistant-avatar__icon-svg {\n width: 32px;\n height: 32px;\n color: var(--Colors-Forground-fg-secondary, #cbd6e3);\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__icon-item--selected\n .freddy-choose-assistant-avatar__icon-svg {\n color: var(--Colors-Base-white, white);\n }\n\n .freddy-choose-assistant-avatar__icon-image {\n width: 32px;\n height: 32px;\n object-fit: cover;\n border-radius: 4px;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__icon-placeholder {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--Colors-Forground-fg-secondary, #cbd6e3);\n font-size: 12px;\n font-weight: bold;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n }\n\n .freddy-choose-assistant-avatar__face-grid {\n align-self: stretch;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 12px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__voice-list {\n align-self: stretch;\n justify-content: flex-start;\n align-items: flex-start;\n row-gap: 12px;\n column-gap: 20px;\n display: flex;\n flex-wrap: wrap;\n max-width: 880px; /* 4 components × 205px + 3 gaps × 20px */\n }\n\n .freddy-choose-assistant-avatar__actions {\n align-self: stretch;\n justify-content: flex-end;\n align-items: flex-start;\n gap: 20px;\n display: inline-flex;\n }\n\n .freddy-choose-assistant-avatar__cancel-button {\n height: 40px;\n min-width: 80px;\n padding: 8px;\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 8px;\n outline: 1px var(--Colors-Border-border-action, #7ba8ef) solid;\n outline-offset: -1px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n background: transparent;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #7ba8ef;\n }\n\n .freddy-choose-assistant-avatar__cancel-button:hover {\n background: rgba(123, 168, 239, 0.1);\n }\n\n .freddy-choose-assistant-avatar__cancel-button:focus {\n outline: 2px var(--Colors-Border-border-action, #7ba8ef) solid;\n }\n\n .freddy-choose-assistant-avatar__save-button {\n height: 40px;\n min-width: 80px;\n min-height: 20px;\n padding: 8px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(10, 12.67, 18, 0.05);\n overflow: hidden;\n border-radius: 8px;\n outline: 2px white solid;\n outline-offset: -2px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n border: none;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-choose-assistant-avatar__save-button:hover:not(:disabled) {\n background: var(--Colors-Background-bg-action, #6a9ae8);\n }\n\n .freddy-choose-assistant-avatar__save-button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .freddy-choose-assistant-avatar__cancel-button div,\n .freddy-choose-assistant-avatar__save-button div {\n flex: 1 1 0;\n text-align: center;\n color: var(--Colors-Texts-Text-Action, #7ba8ef);\n font-size: 16px;\n font-family: Inter;\n font-weight: 500;\n line-height: 24px;\n word-wrap: break-word;\n }\n\n .freddy-choose-assistant-avatar__save-button div {\n color: var(--Colors-Texts-text-action-button, #031525);\n }\n</style>\n","<template>\n <div\n :class=\"[\n 'freddy-plugin-nav-bar',\n `freddy-plugin-nav-bar--${orientation}`,\n `freddy-plugin-nav-bar--${computedActiveStateType}`,\n { 'freddy-plugin-nav-bar--full-width': props.fullWidth },\n ]\"\n >\n <button\n :class=\"[\n 'freddy-plugin-menu-button',\n `freddy-plugin-menu-button--${computedActiveStateType}`,\n { 'freddy-plugin-menu-button--active': activeTab === tab.id },\n { 'freddy-plugin-menu-button--full-width': props.fullWidth },\n ]\"\n v-for=\"(tab, index) in props.tabList\"\n :key=\"index\"\n @click=\"handleTabSwitch(tab)\"\n :aria-selected=\"activeTab === tab.id\"\n role=\"tab\"\n tabindex=\"0\"\n @keydown.enter=\"handleTabSwitch(tab)\"\n @keydown.space.prevent=\"handleTabSwitch(tab)\"\n >\n <span class=\"freddy-plugin-menu-button-label\">{{ tab.title }}</span>\n <span\n v-if=\"tab.badge !== undefined\"\n class=\"freddy-plugin-menu-button-badge\"\n >\n {{ tab.badge }}\n </span>\n <span\n v-if=\"computedActiveStateType === 'bottom-dash' && activeTab === tab.id\"\n :class=\"{ 'freddy-plugin-active-tab-bottom': activeTab === tab.id }\"\n ></span>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { ref, watch, computed } from 'vue';\n import type { ITabList, IMenuListItem } from '@/interfaces';\n\n // props and emits\n const props = withDefaults(defineProps<ITabList>(), {\n currentTab: 0,\n activeStateType: 'bottom-dash',\n orientation: 'horizontal',\n fullWidth: false,\n });\n const emits = defineEmits(['tabSwitch']);\n\n // computed properties\n const activeStateType = computed(\n () => props.activeStateType || 'bottom-dash'\n );\n const orientation = computed(() => props.orientation || 'horizontal');\n\n // Auto-convert bottom-dash to left-dash for vertical orientation\n const computedActiveStateType = computed(() => {\n const currentOrientation = orientation.value;\n const currentStateType = activeStateType.value;\n\n // If vertical and bottom-dash, convert to left-dash\n if (\n currentOrientation === 'vertical' &&\n currentStateType === 'bottom-dash'\n ) {\n return 'left-dash';\n }\n\n // Map new activeStateType values to existing CSS class names\n const stateTypeMap: Record<string, string> = {\n 'bottom-dash': 'bottom-dash',\n 'bg-primary-active': 'background-21404F8F',\n 'primary-active': 'background-031525',\n 'bg-primary-active-bordered': 'background-border',\n };\n\n return stateTypeMap[currentStateType] || currentStateType;\n });\n\n // variables\n const activeTab = ref<number>(props.currentTab);\n\n // watch for prop changes\n watch(\n () => props.currentTab,\n newValue => {\n activeTab.value = newValue;\n }\n );\n\n // click event\n const handleTabSwitch = (tab: IMenuListItem): void => {\n if (activeTab.value === tab.id) return;\n activeTab.value = tab.id;\n emits('tabSwitch', tab.id);\n };\n</script>\n\n<style lang=\"css\">\n .freddy-plugin-nav-bar {\n display: flex;\n width: 100%;\n gap: 24px;\n font-family: 'Inter', sans-serif;\n font-size: 0.875rem; /* text-sm = 14px */\n font-weight: 600; /* font-semibold */\n }\n\n /* Horizontal orientation (default) */\n .freddy-plugin-nav-bar--horizontal {\n flex-direction: row;\n border-bottom: 1px solid #22262f;\n padding-right: 10px; /* pr-2.5 = 2.5 * 4px */\n }\n\n /* Vertical orientation */\n .freddy-plugin-nav-bar--vertical {\n flex-direction: column !important;\n gap: 8px;\n border-bottom: none;\n padding-right: 0;\n width: auto;\n }\n\n .freddy-plugin-nav-bar--vertical .freddy-plugin-menu-button {\n width: 100%;\n }\n\n .freddy-plugin-menu-button {\n all: unset; /* unset-all */\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n position: relative;\n transition: all 0.2s ease;\n color: var(--freddy-text-tertiary, #cbd6e3);\n outline: none;\n }\n\n .freddy-plugin-menu-button:focus-visible {\n outline: 2px solid var(--text-action, #7babef);\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n .freddy-plugin-menu-button:focus:not(:focus-visible) {\n outline: none;\n }\n\n .freddy-plugin-menu-button-label {\n white-space: nowrap;\n }\n\n .freddy-plugin-menu-button-badge {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--component-colors-utility-gray-blue-100, #eaecf5);\n border: 1px solid var(--text-gray, #717680);\n border-radius: 6px;\n padding: 2px 6px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: var(--freddy-text-secondary, #9597a7);\n min-width: 20px;\n text-align: center;\n flex-shrink: 0;\n }\n\n /* Bottom Dash Style (Horizontal) */\n .freddy-plugin-nav-bar--bottom-dash {\n border-bottom: 1px solid #22262f;\n }\n\n .freddy-plugin-nav-bar--bottom-dash .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 4px 4px 12px 4px;\n }\n\n .freddy-plugin-active-tab-bottom {\n position: absolute;\n bottom: -1px;\n left: 0;\n right: 0;\n width: 100%;\n background-color: #9597a7;\n height: 2px; /* h-0.5 = 0.125rem = 2px */\n border-top-left-radius: 0.375rem; /* rounded-t-md */\n border-top-right-radius: 0.375rem;\n }\n\n /* For text-width underlines (not full-width), ensure underline matches content */\n .freddy-plugin-nav-bar--bottom-dash:not(.freddy-plugin-nav-bar--full-width)\n .freddy-plugin-menu-button {\n width: auto;\n }\n\n /* Text-width underline should match content area (excluding padding) */\n .freddy-plugin-nav-bar--bottom-dash:not(.freddy-plugin-nav-bar--full-width)\n .freddy-plugin-active-tab-bottom {\n left: 4px;\n right: 4px;\n width: auto;\n }\n\n /* Full width styles */\n .freddy-plugin-nav-bar--full-width {\n width: 100%;\n }\n\n .freddy-plugin-nav-bar--full-width .freddy-plugin-menu-button {\n flex: 1;\n justify-content: center;\n min-width: 0; /* Allow flex items to shrink below content size */\n }\n\n .freddy-plugin-nav-bar--full-width .freddy-plugin-active-tab-bottom {\n width: 100%;\n }\n\n .freddy-plugin-nav-bar--bottom-dash .freddy-plugin-menu-button--active {\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--bottom-dash .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--bottom-dash\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n .freddy-plugin-nav-bar--bottom-dash\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n /* Left Dash Style (Vertical) */\n .freddy-plugin-nav-bar--left-dash {\n border-bottom: none;\n }\n\n .freddy-plugin-nav-bar--left-dash .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 2px 12px;\n height: 24px;\n border-left: 2px solid transparent;\n }\n\n .freddy-plugin-nav-bar--left-dash .freddy-plugin-menu-button--active {\n border-left: 2px solid #9597a7;\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--left-dash .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--left-dash\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n .freddy-plugin-nav-bar--left-dash\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n /* Background Border Style */\n .freddy-plugin-nav-bar--background-border .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 8px 12px;\n border-radius: 8px;\n height: 36px;\n background: transparent;\n border: 1px solid transparent;\n }\n\n .freddy-plugin-nav-bar--vertical.freddy-plugin-nav-bar--background-border {\n flex-direction: column;\n }\n\n .freddy-plugin-nav-bar--background-border .freddy-plugin-menu-button--active {\n background: var(--freddy-bg-primary-hover, rgba(42, 57, 71, 0.73));\n border: 1px solid var(--text-gray, #717680);\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--background-border\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n .freddy-plugin-nav-bar--background-border\n .freddy-plugin-menu-button:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n /* Background 031525 Style (Vertical) */\n .freddy-plugin-nav-bar--background-031525 {\n border-bottom: none;\n }\n\n .freddy-plugin-nav-bar--vertical.freddy-plugin-nav-bar--background-031525 {\n flex-direction: column;\n }\n\n .freddy-plugin-nav-bar--background-031525 .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 8px 12px;\n border-radius: 8px;\n height: 44px;\n background: transparent;\n border: none;\n }\n\n .freddy-plugin-nav-bar--background-031525 .freddy-plugin-menu-button--active {\n background: #031525;\n border: none;\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-tertiary, #cbd6e3);\n }\n\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--background-031525\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n /* Background 21404F8F Style (Vertical) */\n .freddy-plugin-nav-bar--background-21404F8F {\n border-bottom: none;\n }\n\n .freddy-plugin-nav-bar--vertical.freddy-plugin-nav-bar--background-21404F8F {\n flex-direction: column;\n }\n\n .freddy-plugin-nav-bar--background-21404F8F .freddy-plugin-menu-button {\n flex-direction: row;\n padding: 8px 12px;\n border-radius: 8px;\n height: 44px;\n background: transparent;\n border: none;\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active {\n background: rgba(33, 64, 79, 0.561);\n border: none;\n color: var(--freddy-text-primary, #ffffff);\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active\n .freddy-plugin-menu-button-badge {\n color: var(--freddy-text-secondary, #9597a7);\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-tertiary, #cbd6e3);\n }\n\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active:focus,\n .freddy-plugin-nav-bar--background-21404F8F\n .freddy-plugin-menu-button--active:focus-visible {\n outline: none;\n }\n\n /* Hover states */\n .freddy-plugin-menu-button:hover:not(.freddy-plugin-menu-button--active) {\n color: var(--freddy-text-primary, #ffffff);\n }\n</style>\n","<template>\n <div class=\"rules-management\">\n <div class=\"rules-header\">\n <div class=\"header-content\">\n <h1 class=\"title\">Rules Management</h1>\n <p class=\"subtitle\">\n Manage and organize your organization's rules and guidelines\n </p>\n </div>\n <div class=\"header-actions\">\n <div class=\"search-wrapper\">\n <IconSearch class=\"search-icon\" aria-hidden=\"true\" />\n <input\n type=\"text\"\n class=\"search-input\"\n placeholder=\"Search\"\n v-model=\"searchQuery\"\n @input=\"handleSearch\"\n aria-label=\"Search rules\"\n />\n <kbd class=\"search-kbd\" aria-label=\"Keyboard shortcut\">⌘K</kbd>\n </div>\n <button\n class=\"create-rule-btn\"\n @click=\"handleCreateRule\"\n @keydown.enter=\"handleCreateRule\"\n @keydown.space.prevent=\"handleCreateRule\"\n aria-label=\"Create new rule\"\n tabindex=\"0\"\n >\n <IconPlus class=\"plus-icon\" aria-hidden=\"true\" />\n Create Rule\n </button>\n </div>\n </div>\n\n <div class=\"tabs-container\" role=\"tablist\" aria-label=\"Rules filter tabs\">\n <BaseTabButton\n :tabList=\"tabsForBaseTabButton\"\n :currentTab=\"activeTabIndex\"\n activeStateType=\"bottom-dash\"\n orientation=\"horizontal\"\n @tabSwitch=\"handleTabSwitch\"\n />\n </div>\n\n <div\n class=\"table-container\"\n role=\"tabpanel\"\n :id=\"`tabpanel-${activeTab}`\"\n :aria-labelledby=\"`tab-${activeTab}`\"\n >\n <table class=\"rules-table\" role=\"table\" aria-label=\"Rules list\">\n <thead>\n <tr>\n <th class=\"col-rule\" scope=\"col\">Rule</th>\n <th class=\"col-status\" scope=\"col\">Status</th>\n <th class=\"col-dependencies\" scope=\"col\">\n Dependencies\n <span\n class=\"info-icon\"\n title=\"Number of dependent rules\"\n aria-label=\"Information about dependencies\"\n role=\"img\"\n >\n <IconInfoRounded aria-hidden=\"true\" />\n </span>\n </th>\n <th class=\"col-created-by\" scope=\"col\">Created By</th>\n <th class=\"col-status-action\" scope=\"col\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"rule in filteredRules\"\n :key=\"rule.id\"\n class=\"rule-row\"\n role=\"row\"\n >\n <td class=\"rule-info\">\n <div class=\"rule-title\">{{ rule.title }}</div>\n <div class=\"rule-description\">{{ rule.description }}</div>\n </td>\n <td>\n <span\n :class=\"['status-badge', rule.status.toLowerCase()]\"\n :aria-label=\"`Status: ${rule.status}`\"\n >\n {{ rule.status }}\n </span>\n </td>\n <td class=\"dependencies-count\">\n <span :aria-label=\"`${rule.dependencies} dependencies`\">{{\n rule.dependencies\n }}</span>\n </td>\n <td class=\"creator-info\">\n <div class=\"creator-wrapper\">\n <img\n :src=\"rule.creator.avatar\"\n :alt=\"`${rule.creator.name} avatar`\"\n class=\"creator-avatar\"\n />\n <div class=\"creator-details\">\n <div class=\"creator-name\">{{ rule.creator.name }}</div>\n <div class=\"creator-username\">\n {{ rule.creator.username }}\n </div>\n </div>\n </div>\n </td>\n <td class=\"action-cell\">\n <span\n :class=\"['status-badge', rule.status.toLowerCase()]\"\n :aria-label=\"`Status: ${rule.status}`\"\n >\n {{ rule.status }}\n </span>\n <div class=\"action-icons\">\n <button\n class=\"icon-btn\"\n @click=\"handleEdit(rule)\"\n @keydown.enter=\"handleEdit(rule)\"\n @keydown.space.prevent=\"handleEdit(rule)\"\n :aria-label=\"`Edit ${rule.title}`\"\n tabindex=\"0\"\n >\n <IconEdit aria-hidden=\"true\" />\n </button>\n <button\n class=\"icon-btn\"\n @click=\"handleView(rule)\"\n @keydown.enter=\"handleView(rule)\"\n @keydown.space.prevent=\"handleView(rule)\"\n :aria-label=\"`View ${rule.title}`\"\n tabindex=\"0\"\n >\n <IconEye aria-hidden=\"true\" />\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <nav class=\"pagination-container\" role=\"navigation\" aria-label=\"Pagination\">\n <button\n class=\"pagination-btn\"\n :disabled=\"currentPage === 1\"\n @click=\"handlePreviousPage\"\n @keydown.enter=\"handlePreviousPage\"\n @keydown.space.prevent=\"handlePreviousPage\"\n aria-label=\"Go to previous page\"\n :tabindex=\"currentPage === 1 ? -1 : 0\"\n >\n Previous\n </button>\n <div class=\"page-numbers\" role=\"list\" aria-label=\"Page numbers\">\n <button\n v-for=\"page in visiblePages\"\n :key=\"page\"\n :class=\"[\n 'page-number',\n { active: currentPage === page, ellipsis: page === '...' },\n ]\"\n @click=\"page !== '...' && handlePageChange(page as number)\"\n @keydown.enter=\"page !== '...' && handlePageChange(page as number)\"\n @keydown.space.prevent=\"\n page !== '...' && handlePageChange(page as number)\n \"\n :disabled=\"page === '...'\"\n :aria-label=\"page === '...' ? 'More pages' : `Go to page ${page}`\"\n :aria-current=\"currentPage === page ? 'page' : undefined\"\n :tabindex=\"page === '...' ? -1 : 0\"\n role=\"listitem\"\n >\n {{ page }}\n </button>\n </div>\n <button\n class=\"pagination-btn\"\n :disabled=\"currentPage === totalPages\"\n @click=\"handleNextPage\"\n @keydown.enter=\"handleNextPage\"\n @keydown.space.prevent=\"handleNextPage\"\n aria-label=\"Go to next page\"\n :tabindex=\"currentPage === totalPages ? -1 : 0\"\n >\n Next\n </button>\n </nav>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed } from 'vue';\n import {\n IconEdit,\n IconEye,\n IconInfoRounded,\n IconPlus,\n IconSearch,\n } from '@/icons';\n import BaseTabButton from '@/components/Tabs/BaseTabButton.vue';\n import type { Rule, RuleTab } from '@/interfaces';\n\n interface Props {\n rules?: Rule[];\n tabs?: RuleTab[];\n initialTab?: string;\n totalPages?: number;\n }\n\n interface Emits {\n (e: 'search', query: string): void;\n (e: 'createRule'): void;\n (e: 'tabChange', tabId: string): void;\n (e: 'edit', rule: Rule): void;\n (e: 'view', rule: Rule): void;\n (e: 'pageChange', page: number): void;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n rules: () => [],\n tabs: () => [\n { id: 'all', label: 'All Rules', count: 43 },\n { id: 'my', label: 'My Rules', count: 5 },\n { id: 'others', label: \"Other's Rules\", count: 8 },\n { id: 'current', label: 'Current Assistant', count: 6 },\n ],\n initialTab: 'all',\n totalPages: 10,\n });\n\n const emit = defineEmits<Emits>();\n\n const searchQuery = ref('');\n const activeTab = ref(props.initialTab);\n const currentPage = ref(1);\n\n // Convert tabs to BaseTabButton format with numeric IDs\n const tabsForBaseTabButton = computed(() => {\n return props.tabs.map((tab, index) => ({\n id: index + 1,\n title: tab.label,\n badge: tab.count,\n originalId: tab.id,\n }));\n });\n\n // Find the active tab index\n const activeTabIndex = computed(() => {\n const index = props.tabs.findIndex(tab => tab.id === activeTab.value);\n return index >= 0 ? index + 1 : 1;\n });\n\n const handleTabSwitch = (tabId: number) => {\n const tab = tabsForBaseTabButton.value.find(t => t.id === tabId);\n if (tab && tab.originalId) {\n handleTabChange(tab.originalId);\n }\n };\n\n const filteredRules = computed(() => {\n if (!searchQuery.value) return props.rules;\n\n const query = searchQuery.value.toLowerCase();\n return props.rules.filter(\n rule =>\n rule.title.toLowerCase().includes(query) ||\n rule.description?.toLowerCase().includes(query) ||\n rule.creator.name.toLowerCase().includes(query)\n );\n });\n\n const visiblePages = computed(() => {\n const pages: (number | string)[] = [];\n const total = props.totalPages;\n const current = currentPage.value;\n\n if (total <= 7) {\n for (let i = 1; i <= total; i++) {\n pages.push(i);\n }\n } else {\n pages.push(1);\n\n if (current > 3) {\n pages.push('...');\n }\n\n for (\n let i = Math.max(2, current - 1);\n i <= Math.min(total - 1, current + 1);\n i++\n ) {\n pages.push(i);\n }\n\n if (current < total - 2) {\n pages.push('...');\n }\n\n pages.push(total);\n }\n\n return pages;\n });\n\n const handleSearch = () => {\n emit('search', searchQuery.value);\n };\n\n const handleCreateRule = () => {\n emit('createRule');\n };\n\n const handleTabChange = (tabId: string) => {\n activeTab.value = tabId;\n emit('tabChange', tabId);\n };\n\n const handleEdit = (rule: Rule) => {\n emit('edit', rule);\n };\n\n const handleView = (rule: Rule) => {\n emit('view', rule);\n };\n\n const handlePageChange = (page: number) => {\n currentPage.value = page;\n emit('pageChange', page);\n };\n\n const handlePreviousPage = () => {\n if (currentPage.value > 1) {\n handlePageChange(currentPage.value - 1);\n }\n };\n\n const handleNextPage = () => {\n if (currentPage.value < props.totalPages) {\n handlePageChange(currentPage.value + 1);\n }\n };\n</script>\n\n<style scoped>\n .rules-management {\n background: #031525;\n color: #ffffff;\n padding: 20px;\n min-height: 100vh;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n sans-serif;\n }\n\n .rules-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 20px;\n }\n\n .header-content {\n flex: 1;\n }\n\n .title {\n font-size: 18px;\n font-weight: 600;\n line-height: 28px;\n margin: 0 0 4px 0;\n color: #ffffff;\n }\n\n .subtitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #9597a7;\n margin: 0;\n }\n\n .header-actions {\n display: flex;\n gap: 12px;\n align-items: center;\n }\n\n .search-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n background: #071a2b;\n border: 1px solid #22262f;\n border-radius: 8px;\n padding: 10px 14px;\n min-width: 320px;\n height: 40px;\n }\n\n .search-icon {\n margin-right: 8px;\n color: #94979c;\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .search-input {\n flex: 1;\n background: transparent;\n border: none;\n color: #ffffff;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n outline: none;\n }\n\n .search-input::placeholder {\n color: #85888eb2;\n }\n\n .search-kbd {\n background: #1d2e47;\n border: 1px solid #22262f;\n border-radius: 4px;\n padding: 2px 8px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: #94979c;\n font-family: 'Inter', monospace;\n margin-left: 8px;\n flex-shrink: 0;\n }\n\n .create-rule-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: #7ba8ef;\n color: #031525;\n border: none;\n border-radius: 8px;\n padding: 10px 16px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n height: 40px;\n cursor: pointer;\n transition: background 0.2s ease;\n }\n\n .create-rule-btn:hover {\n background: #8fb5f2;\n }\n\n .create-rule-btn:focus {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .plus-icon {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .tabs-container {\n display: flex;\n gap: 8px;\n margin-bottom: 16px;\n border-bottom: 1px solid #22262f;\n }\n\n .table-container {\n background: #071a2b;\n border: 1px solid #22262f;\n border-radius: 16px;\n overflow: hidden;\n margin-bottom: 20px;\n }\n\n .rules-table {\n width: 100%;\n border-collapse: collapse;\n }\n\n .rules-table thead {\n background: #071a2b;\n border-bottom: 1px solid #22262f;\n }\n\n .rules-table th {\n text-align: left;\n padding: 12px 16px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: #94979c;\n text-transform: none;\n letter-spacing: 0;\n }\n\n .col-dependencies {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .info-icon {\n cursor: help;\n display: inline-flex;\n align-items: center;\n width: 16px;\n height: 16px;\n color: #61656c;\n }\n\n .rule-row {\n border-bottom: 1px solid #22262f;\n transition: background 0.2s ease;\n }\n\n .rule-row:last-child {\n border-bottom: none;\n }\n\n .rule-row:hover {\n background: #0a2137;\n }\n\n .rules-table td {\n padding: 16px;\n font-size: 14px;\n line-height: 20px;\n vertical-align: middle;\n }\n\n .rule-info {\n max-width: 400px;\n }\n\n .rule-title {\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #ffffff;\n margin-bottom: 4px;\n }\n\n .rule-description {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #94979c;\n }\n\n .status-badge {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 12px;\n font-weight: 600;\n line-height: 18px;\n text-transform: capitalize;\n }\n\n .status-badge.active {\n background: #dcfae6;\n color: #067647;\n }\n\n .status-badge.inactive {\n background: #d5d7da;\n color: #414651;\n }\n\n .dependencies-count {\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #ffffff;\n }\n\n .creator-wrapper {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .creator-avatar {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n border: none;\n }\n\n .creator-details {\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n\n .creator-name {\n font-weight: 400;\n color: #ffffff;\n font-size: 14px;\n line-height: 20px;\n }\n\n .creator-username {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #94979c;\n }\n\n .action-cell {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n }\n\n .action-icons {\n display: flex;\n gap: 4px;\n }\n\n .icon-btn {\n background: transparent;\n border: none;\n color: #94979c;\n cursor: pointer;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s ease;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n }\n\n .icon-btn:hover {\n background: #1d2e47;\n color: #ffffff;\n }\n\n .icon-btn:focus {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .pagination-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n }\n\n .pagination-btn {\n background: #071a2b;\n border: 1px solid #22262f;\n color: #ffffff;\n padding: 10px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n cursor: pointer;\n transition: all 0.2s ease;\n height: 40px;\n }\n\n .pagination-btn:hover:not(:disabled) {\n background: #0a2137;\n border-color: #2a3947;\n }\n\n .pagination-btn:focus:not(:disabled) {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .pagination-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n .page-numbers {\n display: flex;\n gap: 4px;\n }\n\n .page-number {\n background: #071a2b;\n border: 1px solid #22262f;\n color: #ffffff;\n padding: 10px 14px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n cursor: pointer;\n transition: all 0.2s ease;\n min-width: 40px;\n height: 40px;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .page-number:hover:not(.active):not(.ellipsis) {\n background: #0a2137;\n border-color: #2a3947;\n }\n\n .page-number:focus:not(.ellipsis) {\n outline: 2px solid #7ba8ef;\n outline-offset: 2px;\n }\n\n .page-number.active {\n background: #1d2e47;\n border-color: #22262f;\n color: #ffffff;\n }\n\n .page-number.ellipsis {\n cursor: default;\n border: none;\n background: transparent;\n }\n\n .page-number:disabled {\n cursor: not-allowed;\n }\n\n @media (max-width: 1024px) {\n .rules-header {\n flex-direction: column;\n gap: 16px;\n }\n\n .header-actions {\n width: 100%;\n flex-direction: column;\n }\n\n .search-wrapper {\n width: 100%;\n }\n\n .create-rule-btn {\n width: 100%;\n justify-content: center;\n }\n }\n\n @media (max-width: 768px) {\n .rules-management {\n padding: 16px;\n }\n\n .tabs-container {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n .table-container {\n overflow-x: auto;\n }\n\n .rules-table {\n min-width: 800px;\n }\n\n .pagination-container {\n flex-direction: column;\n }\n }\n</style>\n","<template>\n <div\n class=\"freddy-vector-frame\"\n :class=\"{ 'freddy-vector-frame--clicked': isClicked }\"\n @click=\"handleClick\"\n >\n <div class=\"freddy-vector-frame__content\">\n <!-- Icon -->\n <div class=\"freddy-vector-frame__icon-container\">\n <IconFileSystem class=\"freddy-vector-frame__icon\" />\n </div>\n\n <!-- Title -->\n <div class=\"freddy-vector-frame__title\">\n {{ title }}\n </div>\n\n <!-- Popular Badge or IconTick when clicked -->\n <div v-if=\"!isClicked\" class=\"freddy-vector-frame__badge\">\n <div class=\"freddy-vector-frame__badge-content\">\n <IconStar class=\"freddy-vector-frame__badge-icon\" />\n <div class=\"freddy-vector-frame__badge-text\">{{ badgeText }}</div>\n </div>\n </div>\n\n <!-- IconBadgeCheck when clicked -->\n <div v-if=\"isClicked\" class=\"freddy-vector-frame__tick-container\">\n <IconBadgeCheck class=\"freddy-vector-frame__tick-icon\" />\n </div>\n </div>\n\n <!-- Underline (only when clicked) -->\n <div v-if=\"isClicked\" class=\"freddy-vector-frame__underline\"></div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { IconFileSystem, IconStar, IconBadgeCheck } from '@/icons';\n\n interface Props {\n title?: string;\n badgeText?: string;\n isSelected?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: 'Main Vector Store',\n badgeText: 'Popular',\n isSelected: false,\n });\n\n const emit = defineEmits<{\n click: [event: MouseEvent];\n }>();\n\n const isClicked = ref(props.isSelected);\n\n const handleClick = (event: MouseEvent) => {\n isClicked.value = !isClicked.value;\n emit('click', event);\n };\n</script>\n\n<style scoped>\n .freddy-vector-frame {\n /*width: 100%;*/\n height: 38px;\n padding: 12px;\n background: rgba(123, 168, 239, 0.1);\n border-radius: 16px;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 16px;\n display: flex;\n cursor: pointer;\n transition: all 0.2s ease;\n border: 1px solid transparent;\n }\n\n .freddy-vector-frame:hover {\n transform: scale(1.02);\n background: rgba(167, 208, 248, 0.3);\n border: 1px solid #a1c9ef;\n }\n\n .freddy-vector-frame--clicked {\n flex-direction: column;\n height: auto;\n padding-top: 8px;\n padding-bottom: 0;\n background: rgba(167, 208, 248, 0.3);\n border: 1px solid #a1c9ef;\n gap: 0;\n }\n\n .freddy-vector-frame__content {\n width: 100%;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n display: flex;\n }\n\n .freddy-vector-frame__icon-container {\n width: 40px;\n height: 40px;\n position: relative;\n background: #1d2e47;\n box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);\n border-radius: 8px;\n border: 1px solid #535862;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n }\n\n .freddy-vector-frame:hover .freddy-vector-frame__icon-container {\n background: #a7d0f8;\n border: 1px solid #7ba8ef;\n }\n\n .freddy-vector-frame--clicked .freddy-vector-frame__icon-container {\n background: #a7d0f8;\n border: 1px solid #7ba8ef;\n }\n\n .freddy-vector-frame__icon {\n width: 20px;\n height: 20px;\n color: #cbd6e3;\n }\n\n .freddy-vector-frame:hover .freddy-vector-frame__icon {\n color: black;\n }\n\n .freddy-vector-frame--clicked .freddy-vector-frame__icon {\n color: black;\n }\n\n .freddy-vector-frame__title {\n flex: 1 1 0;\n height: 100%;\n max-height: 48px;\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #f7f7f7;\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-vector-frame__badge {\n padding: 4px 8px;\n background: #7ba8ef;\n border-radius: 6px;\n border: 1px solid #a1c9ef;\n justify-content: center;\n align-items: center;\n gap: 4px;\n display: flex;\n flex-shrink: 0;\n }\n\n .freddy-vector-frame__badge-content {\n justify-content: center;\n align-items: center;\n gap: 4px;\n display: flex;\n }\n\n .freddy-vector-frame__badge-icon {\n width: 8px;\n height: 8px;\n color: #031525;\n }\n\n .freddy-vector-frame__tick-container {\n width: 24px;\n height: 24px;\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n }\n\n .freddy-vector-frame__tick-icon {\n width: 20px;\n height: 20px;\n left: 2px;\n top: 2px;\n position: absolute;\n color: #a1c9ef;\n }\n\n .freddy-vector-frame__badge-text {\n text-align: center;\n color: #031525;\n font-size: 14px;\n font-family: Inter;\n font-weight: 600;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-frame__underline {\n align-self: stretch;\n height: 2px;\n position: relative;\n background: #a7d0f8;\n border-radius: 999px;\n border: 1px solid #7ba8ef;\n margin-bottom: 6px;\n margin-top: 4px;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-vector-frame {\n padding: 12px;\n gap: 10px;\n }\n\n .freddy-vector-frame__icon-container {\n width: 40px;\n height: 40px;\n }\n\n .freddy-vector-frame__icon {\n width: 20px;\n height: 20px;\n }\n\n .freddy-vector-frame__title {\n font-size: 14px;\n line-height: 20px;\n }\n\n .freddy-vector-frame__badge {\n padding: 4px 8px;\n }\n\n .freddy-vector-frame__badge-text {\n font-size: 12px;\n line-height: 16px;\n }\n }\n\n @media (max-width: 480px) {\n .freddy-vector-frame {\n padding: 10px;\n gap: 8px;\n }\n\n .freddy-vector-frame__content {\n gap: 8px;\n }\n\n .freddy-vector-frame__icon-container {\n width: 36px;\n height: 36px;\n }\n\n .freddy-vector-frame__icon {\n width: 18px;\n height: 18px;\n }\n }\n</style>\n","<template>\n <div class=\"freddy-vector-section\">\n <div class=\"freddy-vector-section__content\">\n <!-- Header Section -->\n <div class=\"freddy-vector-section__header\">\n <div class=\"freddy-vector-section__title\">Knowledge</div>\n <div class=\"freddy-vector-section__count\">{{ dbCount }} DBs added</div>\n </div>\n\n <!-- Main Content -->\n <div class=\"freddy-vector-section__main\">\n <!-- Search Section -->\n <div class=\"freddy-vector-section__search-container\">\n <div class=\"freddy-vector-section__search-header\">\n <div class=\"freddy-vector-section__search-label\">\n Vector Stores\n <div class=\"freddy-vector-section__help-icon\">\n <IconQuestion class=\"freddy-vector-section__help-icon-svg\" />\n </div>\n </div>\n <div class=\"freddy-vector-section__search-input-container\">\n <SearchInput\n v-model:searchInput=\"searchQuery\"\n :placeholder=\"searchPlaceholder\"\n class=\"freddy-vector-section__search-input\"\n @update:searchInput=\"handleSearchInput\"\n />\n </div>\n </div>\n </div>\n\n <!-- Filter and Results Section -->\n <div class=\"freddy-vector-section__filter-results\">\n <div class=\"freddy-vector-section__filter\">\n <div class=\"freddy-vector-section__filter-button\">\n <IconFilter class=\"freddy-vector-section__filter-icon\" />\n <span class=\"freddy-vector-section__filter-text\">Filter by</span>\n <IconChevronDown class=\"freddy-vector-section__filter-arrow\" />\n </div>\n </div>\n <div class=\"freddy-vector-section__results-count\">\n {{ filteredCount }} databases found\n </div>\n </div>\n\n <!-- Vector Frames List -->\n <div class=\"freddy-vector-section__frames-container\">\n <div\n v-for=\"(frame, index) in displayedFrames\"\n :key=\"frame.id || index\"\n class=\"freddy-vector-section__frame-item\"\n >\n <!-- <VectorFrame\n :title=\"frame.title\"\n :badgeText=\"frame.badgeText\"\n :isSelected=\"frame.isSelected\"\n @click=\"handleFrameClick(frame, index)\"\n /> -->\n </div>\n </div>\n\n <!-- Show More Button -->\n <div v-if=\"hasMoreFrames\" class=\"freddy-vector-section__show-more\">\n <button\n class=\"freddy-vector-section__show-more-button\"\n @click=\"handleShowMore\"\n >\n <span class=\"freddy-vector-section__show-more-text\"\n >Show {{ remainingCount }} more</span\n >\n <IconChevronDown class=\"freddy-vector-section__show-more-icon\" />\n </button>\n </div>\n </div>\n\n <!-- Add Vector Store Section -->\n <div class=\"freddy-vector-section__add-section\">\n <div class=\"freddy-vector-section__add-title\">Knowledge</div>\n <div class=\"freddy-vector-section__add-container\">\n <button\n class=\"freddy-vector-section__add-button\"\n @click=\"handleAddVectorStore\"\n >\n <IconAddFileSystem class=\"freddy-vector-section__add-icon\" />\n <span class=\"freddy-vector-section__add-text\"\n >Add vector store to assistant</span\n >\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed } from 'vue';\n import { SearchInput } from '@/components';\n import {\n IconQuestion,\n IconChevronDown,\n IconAddFileSystem,\n IconFilter,\n } from '@/icons';\n\n interface VectorFrameData {\n id?: string | number;\n title: string;\n badgeText?: string;\n isSelected?: boolean;\n }\n\n interface Props {\n title?: string;\n dbCount?: number;\n searchPlaceholder?: string;\n frames?: VectorFrameData[];\n maxDisplayed?: number;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: 'Knowledge',\n dbCount: 0,\n searchPlaceholder: 'Search vector store',\n frames: () => [\n {\n id: 1,\n title: 'Main Vector Store',\n badgeText: 'Popular',\n isSelected: true,\n },\n {\n id: 2,\n title: 'Secondary Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 3,\n title: 'Custom Vector Store',\n badgeText: 'Popular',\n isSelected: true,\n },\n {\n id: 4,\n title: 'Backup Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 5,\n title: 'Analytics Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 6,\n title: 'User Data Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 7,\n title: 'Logs Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 8,\n title: 'Cache Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 9,\n title: 'Metrics Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 10,\n title: 'Archive Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 11,\n title: 'Test Database',\n badgeText: 'Popular',\n isSelected: false,\n },\n {\n id: 12,\n title: 'Production Store',\n badgeText: 'Popular',\n isSelected: false,\n },\n ],\n maxDisplayed: 4,\n });\n\n const emit = defineEmits<{\n frameClick: [frame: VectorFrameData, index: number];\n addVectorStore: [];\n showMore: [];\n searchInput: [query: string];\n }>();\n\n const searchQuery = ref('');\n const displayedCount = ref(props.maxDisplayed);\n\n const filteredFrames = computed(() => {\n if (!searchQuery.value.trim()) {\n return props.frames;\n }\n return props.frames.filter(frame =>\n frame.title.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n });\n\n const displayedFrames = computed(() => {\n return filteredFrames.value.slice(0, displayedCount.value);\n });\n\n const filteredCount = computed(() => {\n return filteredFrames.value.length;\n });\n\n const hasMoreFrames = computed(() => {\n return filteredFrames.value.length > displayedCount.value;\n });\n\n const remainingCount = computed(() => {\n return filteredFrames.value.length - displayedCount.value;\n });\n\n const handleFrameClick = (frame: VectorFrameData, index: number) => {\n emit('frameClick', frame, index);\n };\n\n const handleAddVectorStore = () => {\n emit('addVectorStore');\n };\n\n const handleShowMore = () => {\n displayedCount.value = filteredFrames.value.length;\n emit('showMore');\n };\n\n const handleSearchInput = (query: string | null) => {\n searchQuery.value = query || '';\n displayedCount.value = props.maxDisplayed; // Reset display count on search\n emit('searchInput', searchQuery.value);\n };\n</script>\n\n<style scoped>\n .freddy-vector-section {\n width: 100%;\n min-width: 1029px;\n min-height: 728px;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n padding: 24px;\n background: transparent;\n }\n\n .freddy-vector-section__content {\n width: 100%;\n max-width: 100%;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 20px;\n display: flex;\n }\n\n .freddy-vector-section__header {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: flex;\n margin-bottom: 4px;\n }\n\n .freddy-vector-section__title {\n color: var(--Colors-Text-text-primary, #ffffff);\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__count {\n color: var(--Colors-Texts-Text-Tetriary, #cbd6e3);\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__main {\n align-self: stretch;\n min-height: 300px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 16px;\n display: flex;\n }\n\n .freddy-vector-section__search-container {\n align-self: stretch;\n border-radius: 8px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-vector-section__search-header {\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-vector-section__search-label {\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n display: inline-flex;\n color: var(--Colors-Texts-Text-Tetriary, #cbd6e3);\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__help-icon {\n width: 16px;\n height: 16px;\n position: relative;\n cursor: pointer;\n }\n\n .freddy-vector-section__help-icon-svg {\n width: 13.33px;\n height: 13.33px;\n left: 1.33px;\n top: 1.33px;\n position: absolute;\n color: var(--Colors-Forground-fg-quaternary, #61656c);\n }\n\n .freddy-vector-section__search-input-container {\n align-self: stretch;\n /*padding: 8px 12px;*/\n background: #071a2b;\n /*box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);*/\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid #35414b;\n justify-content: flex-start;\n align-items: center;\n gap: 8px;\n display: flex;\n min-height: 40px;\n color: #85888eb2;\n }\n\n .freddy-vector-section__search-input {\n flex: 1 1 0;\n width: 100%;\n }\n\n /* Override SearchInput colors for dark theme */\n .freddy-vector-section__search-input .freddy-search-icon {\n stroke: #a0aec0 !important;\n color: #a0aec0 !important;\n }\n\n .freddy-vector-section__search-input .freddy-search-input {\n color: #a0aec0 !important;\n background: transparent !important;\n border: none !important;\n outline: none !important;\n font-size: 14px !important;\n }\n\n .freddy-vector-section__search-input .freddy-search-input::placeholder {\n color: rgba(160, 174, 192, 0.7) !important;\n }\n\n .freddy-vector-section__filter-results {\n align-self: stretch;\n justify-content: space-between;\n align-items: center;\n display: flex;\n margin-top: 4px;\n }\n\n .freddy-vector-section__filter {\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n display: flex;\n }\n\n .freddy-vector-section__filter-button {\n padding: 8px 12px;\n overflow: hidden;\n border-radius: 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n cursor: pointer;\n transition: all 0.2s ease;\n background: transparent;\n }\n\n .freddy-vector-section__filter-button:hover {\n background: rgba(255, 255, 255, 0.1);\n }\n\n .freddy-vector-section__filter-icon {\n width: 16px;\n height: 16px;\n position: relative;\n color: var(--Colors-Forground-fg-tertiary, #94979c);\n }\n\n .freddy-vector-section__filter-text {\n color: var(--Colors-Texts-text-secondary, #9597a7);\n font-size: 14px;\n font-family: Inter;\n font-weight: 600;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__filter-arrow {\n width: 16px;\n height: 16px;\n position: relative;\n color: var(--Colors-Forground-fg-tertiary, #94979c);\n }\n\n .freddy-vector-section__results-count {\n color: var(--Colors-Texts-Text-Gray, #717680);\n font-size: 14px;\n font-family: Inter;\n font-weight: 500;\n line-height: 20px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__frames-container {\n align-self: stretch;\n /* min-height: 200px;*/\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n column-gap: 16px;\n row-gap: 10px;\n padding: 4px 0;\n }\n\n /* Responsive design for smaller screens */\n @media (max-width: 768px) {\n .freddy-vector-section__frames-container {\n grid-template-columns: 1fr;\n gap: 12px;\n }\n\n .freddy-vector-section {\n padding: 16px;\n }\n\n .freddy-vector-section__content {\n gap: 16px;\n }\n }\n\n @media (min-width: 769px) {\n .freddy-vector-section__frames-container {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n @media (max-width: 480px) {\n .freddy-vector-section {\n padding: 12px;\n }\n\n .freddy-vector-section__add-button {\n min-width: 150px;\n height: 40px;\n padding: 10px 16px;\n }\n\n .freddy-vector-section__show-more-button {\n min-width: 100px;\n height: 40px;\n padding: 10px 16px;\n }\n }\n\n .freddy-vector-section__frame-item {\n width: 100%;\n height: auto;\n min-height: 64px;\n }\n\n .freddy-vector-section__show-more {\n align-self: stretch;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 0;\n display: flex;\n margin-top: 16px;\n }\n\n .freddy-vector-section__show-more-button {\n height: 44px;\n min-width: 120px;\n padding: 12px 20px;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-action, #7ba8ef);\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n background: transparent;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-vector-section__show-more-button:hover {\n background: rgba(123, 168, 239, 0.1);\n }\n\n .freddy-vector-section__show-more-text {\n padding-left: 2px;\n padding-right: 2px;\n justify-content: center;\n align-items: center;\n display: flex;\n color: var(--Colors-Texts-Text-Action, #7ba8ef);\n font-size: 16px;\n font-family: Inter;\n font-weight: 500;\n line-height: 24px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__show-more-icon {\n width: 20px;\n height: 20px;\n position: relative;\n color: var(--Colors-Forground-fg-action, #a1c9ef);\n }\n\n .freddy-vector-section__add-section {\n width: 100%;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 12px;\n display: flex;\n margin-top: 24px;\n padding-top: 20px;\n }\n\n .freddy-vector-section__add-title {\n color: var(--Colors-Text-text-primary, #ffffff);\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-vector-section__add-container {\n align-self: stretch;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: 0;\n display: flex;\n }\n\n .freddy-vector-section__add-button {\n height: 44px;\n min-width: 200px;\n padding: 12px 20px;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-action, #7ba8ef);\n justify-content: center;\n align-items: center;\n gap: 8px;\n display: flex;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-vector-section__add-button:hover {\n background: var(--Colors-Background-bg-action-hover, #a7d0f8);\n }\n\n .freddy-vector-section__add-icon {\n width: 20px;\n height: 20px;\n position: relative;\n color: var(--Colors-Texts-text-quaternary-active, #101a2c);\n }\n\n .freddy-vector-section__add-text {\n flex: 1 1 0;\n color: var(--Colors-Texts-text-action-button, #031525);\n font-size: 16px;\n font-family: Inter;\n font-weight: 500;\n line-height: 24px;\n word-wrap: break-word;\n }\n</style>\n","<template>\n <div class=\"freddy-voice-list\">\n <h3 v-if=\"title\" class=\"freddy-voice-list__title\">{{ title }}</h3>\n <div class=\"freddy-voice-list__container\">\n <VoiceSelection\n v-for=\"voice in voices\"\n :key=\"voice.id\"\n :voiceName=\"voice.name\"\n :isSelected=\"selectedVoiceId === voice.id\"\n @click=\"handleVoiceClick(voice.id)\"\n />\n </div>\n <div v-if=\"showSelectedInfo\" class=\"freddy-voice-list__selected-info\">\n <p>Selected: {{ selectedVoice?.name || 'None' }}</p>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { VoiceSelection } from '@/components';\n\n interface Voice {\n id: string | number;\n name: string;\n }\n\n interface Props {\n voices: Voice[];\n title?: string;\n showSelectedInfo?: boolean;\n allowDeselect?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n title: '',\n showSelectedInfo: true,\n allowDeselect: true,\n });\n\n const emit = defineEmits<{\n selectionChange: [selectedId: string | number | null];\n voiceClick: [voiceId: string | number, isSelected: boolean];\n }>();\n\n const selectedVoiceId = ref<string | number | null>(null);\n\n const selectedVoice = computed(() => {\n return (\n props.voices.find(voice => voice.id === selectedVoiceId.value) || null\n );\n });\n\n const handleVoiceClick = (voiceId: string | number) => {\n const isCurrentlySelected = selectedVoiceId.value === voiceId;\n\n if (isCurrentlySelected && props.allowDeselect) {\n // Deselect if already selected and deselection is allowed\n selectedVoiceId.value = null;\n } else {\n // Select the clicked voice\n selectedVoiceId.value = voiceId;\n }\n\n // Emit events\n emit('selectionChange', selectedVoiceId.value);\n emit('voiceClick', voiceId, selectedVoiceId.value === voiceId);\n };\n\n // Expose methods for parent components\n defineExpose({\n selectedVoiceId,\n selectedVoice,\n selectVoice: (id: string | number) => {\n selectedVoiceId.value = id;\n emit('selectionChange', id);\n },\n clearSelection: () => {\n selectedVoiceId.value = null;\n emit('selectionChange', null);\n },\n });\n</script>\n\n<style>\n .freddy-voice-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n .freddy-voice-list__title {\n font-family: 'Inter', sans-serif;\n font-size: 18px;\n font-weight: 600;\n color: var(--Colors-Texts-text-primary, #ffffff);\n margin: 0;\n }\n\n .freddy-voice-list__container {\n display: flex;\n flex-wrap: wrap;\n gap: 20px;\n align-items: flex-start;\n justify-content: flex-start;\n max-width: 880px; /* 4 components × 205px + 3 gaps × 20px */\n }\n\n .freddy-voice-list__selected-info {\n padding: 12px;\n background: var(--Colors-Background-bg-secondary, #1a1a1a);\n border-radius: 8px;\n border: 1px solid var(--Colors-Border-border-primary, #333333);\n }\n\n .freddy-voice-list__selected-info p {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n color: var(--Colors-Texts-text-secondary, #cccccc);\n margin: 0;\n }\n</style>\n","<template>\n <div\n class=\"freddy-voice-selection\"\n :class=\"{ 'freddy-voice-selection--selected': isSelected }\"\n @click=\"handleClick\"\n >\n <div class=\"freddy-voice-selection__container\">\n <!-- Voice Icon -->\n <div class=\"freddy-voice-selection__icon-container\">\n <div class=\"freddy-voice-selection__icon\">\n <div class=\"freddy-voice-selection__play-background\">\n <IconRevertedTriangle\n class=\"freddy-voice-selection__triangle-icon\"\n />\n </div>\n </div>\n </div>\n\n <!-- Voice Name -->\n <div class=\"freddy-voice-selection__name-container\">\n <div class=\"freddy-voice-selection__name-wrapper\">\n <div class=\"freddy-voice-selection__name\">{{ voiceName }}</div>\n </div>\n </div>\n\n <!-- Selection Indicator -->\n\n <div v-if=\"isSelected\" class=\"freddy-voice-selection__check-icon\">\n <IconTick class=\"freddy-voice-selection__check-icon-svg\" />\n </div>\n <div v-else class=\"freddy-voice-selection__indicator\"></div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { IconTick, IconRevertedTriangle } from '@/icons';\n\n interface Props {\n voiceName: string;\n isSelected?: boolean;\n }\n\n withDefaults(defineProps<Props>(), {\n isSelected: false,\n });\n\n const emit = defineEmits<{\n handleClick: [event: MouseEvent];\n }>();\n\n const handleClick = (event: MouseEvent) => {\n emit('handleClick', event);\n };\n</script>\n\n<style>\n .freddy-voice-selection {\n width: 205px;\n /*height: 100%;*/\n border-radius: 16px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-voice-selection:hover {\n transform: scale(1.02);\n }\n\n .freddy-voice-selection__container {\n padding: 10px;\n background: var(--Colors-Background-bg-secondary, #071a2b);\n border-radius: 16px;\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n display: inline-flex;\n /*width: 100%;*/\n transition: all 0.2s ease;\n }\n\n .freddy-voice-selection--selected .freddy-voice-selection__container {\n outline: 2px var(--Colors-Background-bg-action, #7ba8ef) solid;\n outline-offset: -2px;\n }\n\n .freddy-voice-selection__icon-container {\n justify-content: center;\n align-items: center;\n gap: 10px;\n display: flex;\n }\n\n .freddy-voice-selection__icon {\n width: 40px;\n height: 40px;\n position: relative;\n }\n\n .freddy-voice-selection__play-background {\n width: 40px;\n height: 40px;\n left: 0px;\n top: 0px;\n position: absolute;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 48px;\n backdrop-filter: blur(8px);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-voice-selection__triangle-icon {\n width: 13.75px;\n height: 15px;\n color: var(--Colors-Base-White, white);\n fill: var(--Colors-Base-White, white);\n }\n\n .freddy-voice-selection__name-container {\n width: 100px;\n justify-content: space-between;\n align-items: center;\n display: flex;\n flex: 1;\n }\n\n .freddy-voice-selection__name-wrapper {\n flex: 1 1 0;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n display: flex;\n }\n\n .freddy-voice-selection__name {\n flex: 1 1 0;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n display: inline-flex;\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n display: flex;\n align-self: stretch;\n height: 24px;\n text-align: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: var(--Colors-Base-white, white);\n font-size: 18px;\n font-family: Inter;\n font-weight: 600;\n line-height: 28px;\n word-wrap: break-word;\n }\n\n .freddy-voice-selection__indicator {\n width: 25px;\n height: 25px;\n position: relative;\n transition: all 0.2s ease;\n }\n\n .freddy-voice-selection__indicator:not(.freddy-voice-selection__check-icon) {\n border: 1px var(--Colors-Border-border-grey-primary, #d1d3d5) solid;\n border-radius: 100px;\n }\n\n .freddy-voice-selection__check-icon {\n width: 25px;\n height: 25px;\n position: relative;\n background: var(--Colors-Background-bg-action, #7ba8ef);\n border-radius: 100px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n }\n\n .freddy-voice-selection__check-icon-svg {\n width: 13px;\n height: 13px;\n left: 6px;\n top: 6px;\n position: absolute;\n overflow: hidden;\n color: var(--Colors-Base-white, white);\n }\n\n /* Check icon inner circle */\n .freddy-voice-selection__check-icon-svg::before {\n content: '';\n width: 8.67px;\n height: 5.96px;\n left: 2.17px;\n top: 3.25px;\n position: absolute;\n outline: 2px var(--Colors-Base-white, white) solid;\n outline-offset: -1px;\n }\n</style>\n","/**\n * useTheme Composable - DEPRECATED in v0.4.54\n * \n * ⚠️ ThemeService was removed due to SSR incompatibility\n * This stub prevents build errors but returns no-op functions\n * \n * For theme functionality, implement theme management in your consuming app\n * Recovery: git checkout 70edb4d (v0.4.53) for full implementation\n * \n * @deprecated Use your app's theme system instead\n */\n\nimport { ref, computed } from 'vue';\n\n// Stub implementation to prevent build errors\nexport const useTheme = () => {\n const currentProject = ref(null);\n const currentColorMode = ref(null);\n const isLoading = ref(false);\n const error = ref(null);\n const availableBrands = computed(() => []);\n const availableModes = computed(() => []);\n\n return {\n currentProject,\n currentColorMode,\n isLoading,\n error,\n availableBrands,\n availableModes,\n setBrand: () => console.warn('ThemeService removed in v0.4.54'),\n setMode: () => console.warn('ThemeService removed in v0.4.54'),\n setTheme: () => console.warn('ThemeService removed in v0.4.54'),\n initializeTheme: () => Promise.resolve(),\n };\n};\n\n// Export stub implementations\nexport const useThemeState = () => {\n const theme = useTheme();\n return {\n currentProject: theme.currentProject,\n currentColorMode: theme.currentColorMode,\n isLoading: theme.isLoading,\n error: theme.error,\n availableBrands: theme.availableBrands,\n availableModes: theme.availableModes,\n };\n};\n\nexport const useThemeActions = () => {\n const theme = useTheme();\n return {\n setBrand: theme.setBrand,\n setMode: theme.setMode,\n setTheme: theme.setTheme,\n initializeTheme: theme.initializeTheme,\n };\n};\n\n","<script setup lang=\"ts\">\n import { useTheme } from '@/composables/useTheme';\n import { ref, nextTick, onUnmounted } from 'vue';\n\n const { currentProject, currentColorMode } = useTheme();\n\n interface TooltipProps {\n /** The text content to display in the tooltip */\n text?: string;\n /** The placement of the tooltip relative to the trigger element */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Whether to render the text as HTML */\n html?: boolean;\n /** Custom CSS class to apply to the tooltip content */\n contentClass?: string;\n }\n\n const props = defineProps<TooltipProps>();\n\n const show = ref(false);\n const tooltipWrapper = ref<HTMLElement | null>(null);\n const tooltipContent = ref<HTMLElement | null>(null);\n const tooltipStyle = ref({ top: '0px', left: '0px' });\n let showTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const updatePosition = () => {\n if (!tooltipWrapper.value || !tooltipContent.value) return;\n\n const triggerRect = tooltipWrapper.value.getBoundingClientRect();\n const contentRect = tooltipContent.value.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n const gap = 8;\n\n // Default to top if not specified\n const placement = props.placement || 'top';\n\n // Check for auto-flip to bottom if too close to top (legacy behavior)\n const forceBottom = !props.placement && triggerRect.top < 150;\n const effectivePlacement = forceBottom ? 'bottom' : placement;\n\n switch (effectivePlacement) {\n case 'top':\n top = triggerRect.top - contentRect.height - gap;\n left = triggerRect.left + (triggerRect.width - contentRect.width) / 2;\n break;\n case 'bottom':\n top = triggerRect.bottom + gap;\n left = triggerRect.left + (triggerRect.width - contentRect.width) / 2;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - contentRect.height) / 2;\n left = triggerRect.left - contentRect.width - gap;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - contentRect.height) / 2;\n left = triggerRect.right + gap;\n break;\n }\n\n tooltipStyle.value = {\n top: `${top}px`,\n left: `${left}px`,\n };\n };\n\n function open() {\n if (showTimeout) clearTimeout(showTimeout);\n showTimeout = setTimeout(async () => {\n show.value = true;\n await nextTick();\n updatePosition();\n window.addEventListener('scroll', updatePosition, true);\n window.addEventListener('resize', updatePosition);\n }, 200); // 200ms delay for better responsiveness\n }\n\n function close() {\n if (showTimeout) clearTimeout(showTimeout);\n show.value = false;\n window.removeEventListener('scroll', updatePosition, true);\n window.removeEventListener('resize', updatePosition);\n }\n\n onUnmounted(() => {\n close();\n });\n</script>\n\n<template>\n <div\n ref=\"tooltipWrapper\"\n class=\"tooltip-wrapper\"\n @mouseenter=\"open\"\n @mouseleave=\"close\"\n @focusin=\"open\"\n @focusout=\"close\"\n tabindex=\"0\"\n >\n <slot />\n <Teleport to=\"body\">\n <transition name=\"fade\">\n <div\n v-if=\"show\"\n ref=\"tooltipContent\"\n class=\"tooltip-content-fixed\"\n :class=\"[contentClass]\"\n :style=\"tooltipStyle\"\n >\n <slot name=\"content\">\n <span v-if=\"html\" v-html=\"text\"></span>\n <span v-else>{{ text }}</span>\n </slot>\n </div>\n </transition>\n </Teleport>\n </div>\n</template>\n\n<style>\n .tooltip-wrapper {\n display: inline-block;\n position: relative;\n }\n\n .tooltip-content-fixed {\n position: fixed;\n z-index: 9999;\n background: #212529;\n color: #ffffff;\n font-size: 13px;\n padding: 8px 12px;\n border-radius: 6px;\n white-space: normal;\n max-width: 300px;\n pointer-events: none;\n opacity: 0.95;\n box-shadow: 0 4px 12px var(--freddy-border-color);\n line-height: 1.4;\n min-width: 200px;\n word-wrap: break-word;\n word-break: break-word;\n }\n\n .fade-enter-active,\n .fade-leave-active {\n transition: opacity 0.15s;\n }\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n }\n</style>\n","<template>\n <Tooltip v-if=\"tooltip\" :text=\"tooltip\" :placement=\"tooltipPlacement\">\n <button\n :class=\"buttonClasses\"\n :disabled=\"disabled || loading\"\n :aria-disabled=\"disabled || loading\"\n :aria-label=\"iconOnly ? label : undefined\"\n role=\"button\"\n @click=\"handleClick\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n >\n <!-- Loading state with spinner and optional text -->\n <template v-if=\"loading\">\n <span class=\"freddy-plugins-button-spinner\" aria-hidden=\"true\"></span>\n <span v-if=\"loadingText || label\" class=\"freddy-plugins-button-label\">\n {{ loadingText || label }}\n </span>\n </template>\n\n <!-- Icon only mode -->\n <template v-else-if=\"iconOnly\">\n <component\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-center\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n />\n </template>\n\n <!-- Normal mode: Left Icon, Label, Right Icon -->\n <template v-else>\n <component\n v-if=\"leftIcon\"\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-left\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleLeftIconClick\"\n />\n\n <span v-if=\"label\" class=\"freddy-plugins-button-label\">\n {{ label }}\n </span>\n\n <component\n v-if=\"rightIcon\"\n :is=\"RightIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-right\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleRightIconClick\"\n />\n </template>\n </button>\n </Tooltip>\n\n <button\n v-else\n :class=\"buttonClasses\"\n :disabled=\"disabled || loading\"\n :aria-disabled=\"disabled || loading\"\n :aria-label=\"iconOnly ? label : undefined\"\n role=\"button\"\n @click=\"handleClick\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n >\n <!-- Loading state with spinner and optional text -->\n <template v-if=\"loading\">\n <span class=\"freddy-plugins-button-spinner\" aria-hidden=\"true\"></span>\n <span v-if=\"loadingText || label\" class=\"freddy-plugins-button-label\">\n {{ loadingText || label }}\n </span>\n </template>\n\n <!-- Icon only mode -->\n <template v-else-if=\"iconOnly\">\n <component\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-center\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n />\n </template>\n\n <!-- Normal mode: Left Icon, Label, Right Icon -->\n <template v-else>\n <component\n v-if=\"leftIcon\"\n :is=\"LeftIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-left\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleLeftIconClick\"\n />\n\n <span v-if=\"label\" class=\"freddy-plugins-button-label\">\n {{ label }}\n </span>\n\n <component\n v-if=\"rightIcon\"\n :is=\"RightIconComponent\"\n class=\"freddy-plugins-button-icon freddy-plugins-button-icon-right\"\n :class=\"`freddy-plugins-button-icon--${size}`\"\n aria-hidden=\"true\"\n @click.stop=\"handleRightIconClick\"\n />\n </template>\n </button>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, defineAsyncComponent } from 'vue';\n import type {\n BaseButtonProps,\n BaseButtonEmits,\n } from '@/interfaces/base-button.interfaces';\n import Tooltip from '../Tooltip.vue';\n\n const props = withDefaults(defineProps<BaseButtonProps>(), {\n size: 'md',\n hierarchy: 'primary',\n state: 'default',\n errorState: false,\n iconOnly: false,\n leftIcon: undefined,\n rightIcon: undefined,\n label: 'Button',\n loadingText: undefined,\n disabled: false,\n loading: false,\n tooltip: undefined,\n tooltipPlacement: 'top',\n });\n\n // Icon component mapping - only include icons that actually exist\n const iconComponents: Record<string, any> = {\n IconSearch: defineAsyncComponent(() => import('@/icons/IconSearch.vue')),\n IconUser: defineAsyncComponent(() => import('@/icons/IconUser.vue')),\n IconDelete: defineAsyncComponent(() => import('@/icons/IconDelete.vue')),\n IconSend: defineAsyncComponent(() => import('@/icons/IconSend.vue')),\n IconPlus: defineAsyncComponent(() => import('@/icons/IconPlus.vue')),\n IconEdit: defineAsyncComponent(() => import('@/icons/IconEdit.vue')),\n IconCross: defineAsyncComponent(() => import('@/icons/IconCross.vue')),\n IconTick: defineAsyncComponent(() => import('@/icons/IconTick.vue')),\n IconArrowLeft: defineAsyncComponent(\n () => import('@/icons/IconArrowLeft.vue')\n ),\n IconArrowDown: defineAsyncComponent(\n () => import('@/icons/IconArrowDown.vue')\n ),\n IconArrowUp: defineAsyncComponent(() => import('@/icons/IconArrowUp.vue')),\n IconChevronDown: defineAsyncComponent(\n () => import('@/icons/IconChevronDown.vue')\n ),\n IconChevronUp: defineAsyncComponent(\n () => import('@/icons/IconChevronUp.vue')\n ),\n IconChevronLeft: defineAsyncComponent(\n () => import('@/icons/IconChevronLeft.vue')\n ),\n IconChevronRight: defineAsyncComponent(\n () => import('@/icons/IconChevronRight.vue')\n ),\n IconSettings: defineAsyncComponent(\n () => import('@/icons/IconSettings.vue')\n ),\n IconHome: defineAsyncComponent(() => import('@/icons/IconHome.vue')),\n IconDownload: defineAsyncComponent(\n () => import('@/icons/IconDownload.vue')\n ),\n IconRefresh: defineAsyncComponent(() => import('@/icons/IconRefresh.vue')),\n IconCopy: defineAsyncComponent(() => import('@/icons/IconCopy.vue')),\n IconEye: defineAsyncComponent(() => import('@/icons/IconEye.vue')),\n IconLock: defineAsyncComponent(() => import('@/icons/IconLock.vue')),\n IconStar: defineAsyncComponent(() => import('@/icons/IconStar.vue')),\n IconFilter: defineAsyncComponent(() => import('@/icons/IconFilter.vue')),\n IconFile: defineAsyncComponent(() => import('@/icons/IconFile.vue')),\n IconFolder: defineAsyncComponent(() => import('@/icons/IconFolder.vue')),\n IconText: defineAsyncComponent(() => import('@/icons/IconText.vue')),\n IconLink04: defineAsyncComponent(() => import('@/icons/IconLink04.vue')),\n };\n\n const LeftIconComponent = computed(() => {\n if (!props.leftIcon) return null;\n return iconComponents[props.leftIcon] || null;\n });\n\n const RightIconComponent = computed(() => {\n if (!props.rightIcon) return null;\n return iconComponents[props.rightIcon] || null;\n });\n\n const emit = defineEmits<BaseButtonEmits>();\n\n const isHovered = ref(false);\n\n const buttonClasses = computed(() => [\n 'freddy-plugins-base-button',\n `freddy-plugins-base-button--${props.size}`,\n `freddy-plugins-base-button--${props.hierarchy}`,\n {\n 'freddy-plugins-base-button--disabled': props.disabled,\n 'freddy-plugins-base-button--loading': props.loading,\n 'freddy-plugins-base-button--icon-only': props.iconOnly,\n 'freddy-plugins-base-button--error': props.errorState,\n 'freddy-plugins-base-button--hover':\n isHovered.value && !props.disabled && !props.loading,\n 'freddy-plugins-base-button--focused': props.state === 'focused',\n },\n ]);\n\n const handleClick = (event: MouseEvent) => {\n if (!props.disabled && !props.loading) {\n emit('click', event);\n }\n };\n\n const handleLeftIconClick = (event: MouseEvent) => {\n if (!props.disabled && !props.loading) {\n emit('leftIconClick', event);\n }\n };\n\n const handleRightIconClick = (event: MouseEvent) => {\n if (!props.disabled && !props.loading) {\n emit('rightIconClick', event);\n }\n };\n\n const handleMouseEnter = () => {\n isHovered.value = true;\n };\n\n const handleMouseLeave = () => {\n isHovered.value = false;\n };\n</script>\n\n<style scoped>\n .freddy-plugins-base-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n sans-serif;\n cursor: pointer;\n transition: all 0.2s ease;\n box-sizing: border-box;\n position: relative;\n outline: none;\n }\n\n /* Size specifications from Figma */\n .freddy-plugins-base-button--s {\n height: 20px;\n min-width: 20px;\n font-size: 14px;\n font-weight: 500;\n gap: 2px;\n border-radius: 4px;\n padding: 2px;\n }\n\n .freddy-plugins-base-button--sm {\n height: 28px;\n min-width: 28px;\n font-size: 14px;\n font-weight: 500;\n gap: 4px;\n border-radius: 8px;\n padding: 4px;\n }\n\n .freddy-plugins-base-button--md {\n height: 40px;\n min-width: 40px;\n font-size: 16px;\n font-weight: 500;\n gap: 4px;\n border-radius: 8px;\n padding: 4px;\n }\n\n .freddy-plugins-base-button--lg {\n height: 48px;\n min-width: 48px;\n font-size: 16px;\n font-weight: 500;\n gap: 8px;\n border-radius: 8px;\n padding: 8px;\n }\n\n .freddy-plugins-base-button--xl {\n height: 52px;\n min-width: 52px;\n font-size: 18px;\n font-weight: 500;\n gap: 10px;\n border-radius: 8px;\n padding: 12px;\n }\n\n /* Hierarchy styles */\n .freddy-plugins-base-button--primary {\n background: var(--color-primary-500, #7ba8ef);\n color: var(--text-inverse);\n border: 2px solid rgba(255, 255, 255, 0.12);\n box-shadow: inset 0px 0px 0px 1px rgba(10, 13, 18, 0.18),\n inset 0px -2px 0px 0px rgba(10, 13, 18, 0.05);\n }\n\n .freddy-plugins-base-button--primary.freddy-plugins-base-button--error {\n background: var(--color-destructive-700, #d92d20) !important;\n border-color: rgba(255, 255, 255, 0.12) !important;\n color: var(--text-inverse) !important;\n }\n\n .freddy-plugins-base-button--secondary {\n background: transparent;\n color: var(--color-primary-500, #7ba8ef);\n border: 2px solid var(--color-primary-500, #7ba8ef);\n }\n\n .freddy-plugins-base-button--secondary.freddy-plugins-base-button--error {\n background: #000000 !important;\n color: var(--color-destructive-400, #f97066) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n .freddy-plugins-base-button--tertiary {\n background: transparent;\n color: var(--text-600, #4b5563);\n border: 1px solid var(--border-200, #e5e7eb);\n }\n\n .freddy-plugins-base-button--tertiary.freddy-plugins-base-button--error {\n background: #000000 !important;\n color: var(--color-destructive-400, #f97066) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n .freddy-plugins-base-button--link {\n background: none;\n color: var(--color-primary-600, #2563eb);\n border: none;\n padding: 0;\n min-width: 0;\n min-height: 0;\n }\n\n .freddy-plugins-base-button--link.freddy-plugins-base-button--error {\n color: var(--color-destructive-500, #ef4444) !important;\n }\n\n /* Hover states */\n .freddy-plugins-base-button--primary:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-primary-600, #2563eb);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n }\n\n .freddy-plugins-base-button--secondary:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-primary-50, #eff6ff);\n }\n\n .freddy-plugins-base-button--tertiary:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--bg-100, #f3f4f6);\n }\n\n .freddy-plugins-base-button--link:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n text-decoration: underline;\n }\n\n /* Error state hover styles */\n .freddy-plugins-base-button--primary.freddy-plugins-base-button--error:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-destructive-800, #b91c1c) !important;\n border-color: rgba(255, 255, 255, 0.12) !important;\n }\n\n .freddy-plugins-base-button--secondary.freddy-plugins-base-button--error:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-destructive-900, #55160c) !important;\n color: var(--color-destructive-300, #fda29b) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n .freddy-plugins-base-button--tertiary.freddy-plugins-base-button--error:hover:not(\n .freddy-plugins-base-button--disabled\n ):not(.freddy-plugins-base-button--loading) {\n background: var(--color-destructive-900, #55160c) !important;\n color: var(--color-destructive-300, #fda29b) !important;\n border-color: var(--color-destructive-500, #f04438) !important;\n }\n\n /* Focus states */\n .freddy-plugins-base-button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--text-inverse),\n 0 0 0 4px var(--color-primary-500, #7ba8ef);\n }\n\n .freddy-plugins-base-button--error:focus-visible {\n box-shadow: 0 0 0 2px var(--text-inverse),\n 0 0 0 4px var(--color-destructive-500, #ef4444);\n }\n\n /* Disabled state */\n .freddy-plugins-base-button--disabled {\n opacity: 1;\n cursor: not-allowed;\n transform: none !important;\n box-shadow: none !important;\n background: rgba(42, 57, 71, 0.73) !important;\n color: #55585e !important;\n border-color: #35414b !important;\n }\n\n .freddy-plugins-base-button--disabled:hover {\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Loading state */\n .freddy-plugins-base-button--loading {\n cursor: wait;\n }\n\n .freddy-plugins-base-button--loading:hover {\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Icon only mode */\n .freddy-plugins-base-button--icon-only {\n justify-content: center;\n align-items: center;\n padding: 0;\n gap: 0;\n aspect-ratio: 1;\n }\n\n /* Icon styles */\n .freddy-plugins-button-icon {\n flex-shrink: 0;\n color: currentColor;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-button-icon-left {\n margin-right: 0;\n }\n\n .freddy-plugins-button-icon-right {\n margin-left: 0;\n }\n\n .freddy-plugins-button-icon-center {\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n /* Icon sizes based on button size */\n .freddy-plugins-button-icon--s {\n width: 16px !important;\n height: 16px !important;\n }\n\n .freddy-plugins-button-icon--sm {\n width: 20px !important;\n height: 20px !important;\n }\n\n .freddy-plugins-button-icon--md {\n width: 20px !important;\n height: 20px !important;\n }\n\n .freddy-plugins-button-icon--lg {\n width: 24px !important;\n height: 24px !important;\n }\n\n .freddy-plugins-button-icon--xl {\n width: 24px !important;\n height: 24px !important;\n }\n\n /* Icon color based on button state and hierarchy */\n .freddy-plugins-base-button--primary .freddy-plugins-button-icon {\n color: var(--text-inverse) !important;\n }\n\n .freddy-plugins-base-button--primary.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--text-inverse) !important;\n }\n\n .freddy-plugins-base-button--secondary .freddy-plugins-button-icon {\n color: var(--color-primary-500, #7ba8ef) !important;\n }\n\n .freddy-plugins-base-button--secondary.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--color-destructive-400, #f97066) !important;\n }\n\n .freddy-plugins-base-button--tertiary .freddy-plugins-button-icon {\n color: var(--text-600, #4b5563) !important;\n }\n\n .freddy-plugins-base-button--tertiary.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--color-destructive-400, #f97066) !important;\n }\n\n .freddy-plugins-base-button--link .freddy-plugins-button-icon {\n color: var(--color-primary-600, #2563eb) !important;\n }\n\n .freddy-plugins-base-button--link.freddy-plugins-base-button--error\n .freddy-plugins-button-icon {\n color: var(--color-destructive-500, #ef4444) !important;\n }\n\n .freddy-plugins-base-button--disabled .freddy-plugins-button-icon {\n color: var(--text-400, #9ca3af) !important;\n }\n\n .freddy-plugins-button-label {\n display: flex;\n align-items: center;\n white-space: nowrap;\n }\n\n .freddy-plugins-button-spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n min-width: 16px;\n min-height: 16px;\n border: 2px solid rgba(0, 0, 0, 0.08);\n border-top: 2px solid currentColor;\n border-radius: 50%;\n animation: freddy-plugins-base-button-spin 1s linear infinite;\n margin-right: 8px;\n vertical-align: middle;\n }\n\n @keyframes freddy-plugins-base-button-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n</style>\n","<template>\n <div :class=\"containerClasses\" :style=\"style\">\n <button\n v-for=\"provider in providers\"\n :key=\"provider\"\n :class=\"getButtonClasses(provider)\"\n :disabled=\"disabled\"\n :aria-label=\"iconOnly ? getProviderLabel(provider) : undefined\"\n role=\"button\"\n @click=\"handleClick(provider, $event)\"\n >\n <component\n :is=\"getProviderIcon(provider)\"\n class=\"freddy-plugins-social-button-icon\"\n aria-hidden=\"true\"\n />\n <span v-if=\"!iconOnly\" class=\"freddy-plugins-social-button-label\">\n {{ getProviderLabel(provider) }}\n </span>\n </button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type {\n SocialButtonGroupProps,\n SocialButtonEmits,\n SocialProvider,\n SocialProviderConfig,\n } from '@/interfaces/social-buttons.interfaces';\n import {\n IconGoogle,\n IconFacebook,\n IconApple,\n IconX,\n IconFigma,\n IconDribbble,\n } from '@/icons';\n\n const props = withDefaults(defineProps<SocialButtonGroupProps>(), {\n variant: 'filled',\n size: 'md',\n disabled: false,\n iconOnly: false,\n layout: 'horizontal',\n });\n\n const emit = defineEmits<SocialButtonEmits>();\n\n // Provider configuration mapping\n const providerConfigs: Record<SocialProvider, SocialProviderConfig> = {\n google: {\n icon: IconGoogle,\n label: 'Sign in with Google',\n colors: {\n filled: {\n background: '#ffffff',\n color: '#1f2937',\n border: '#d1d5db',\n },\n outlined: {\n background: '#ffffff',\n color: '#1f2937',\n border: '#10b981',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n facebook: {\n icon: IconFacebook,\n label: 'Sign in with Facebook',\n colors: {\n filled: {\n background: '#1877f2',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#1877f2',\n border: '#1877f2',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n apple: {\n icon: IconApple,\n label: 'Sign in with Apple',\n colors: {\n filled: {\n background: '#000000',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#000000',\n border: '#000000',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n x: {\n icon: IconX,\n label: 'Sign in with X',\n colors: {\n filled: {\n background: '#000000',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#000000',\n border: '#000000',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n figma: {\n icon: IconFigma,\n label: 'Sign in with Figma',\n colors: {\n filled: {\n background: '#000000',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#000000',\n border: '#000000',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n dribbble: {\n icon: IconDribbble,\n label: 'Sign in with Dribbble',\n colors: {\n filled: {\n background: '#ea4c89',\n color: '#ffffff',\n },\n outlined: {\n background: '#ffffff',\n color: '#ea4c89',\n border: '#ea4c89',\n },\n ghost: {\n background: 'transparent',\n color: '#9ca3af',\n border: '#d1d5db',\n },\n },\n },\n };\n\n const containerClasses = computed(() => [\n 'freddy-plugins-social-buttons',\n `freddy-plugins-social-buttons--${props.layout}`,\n `freddy-plugins-social-buttons--${props.size}`,\n {\n 'freddy-plugins-social-buttons--disabled': props.disabled,\n },\n props.class,\n ]);\n\n const getProviderIcon = (provider: SocialProvider) => {\n return providerConfigs[provider].icon;\n };\n\n const getProviderLabel = (provider: SocialProvider) => {\n return providerConfigs[provider].label;\n };\n\n const getButtonClasses = (provider: SocialProvider) => {\n return [\n 'freddy-plugins-social-button',\n `freddy-plugins-social-button--${props.variant}`,\n `freddy-plugins-social-button--${props.size}`,\n `freddy-plugins-social-button--${provider}`,\n {\n 'freddy-plugins-social-button--disabled': props.disabled,\n 'freddy-plugins-social-button--icon-only': props.iconOnly,\n },\n ];\n };\n\n const handleClick = (provider: SocialProvider, event: MouseEvent) => {\n if (!props.disabled) {\n emit('click', provider, event);\n }\n };\n</script>\n\n<style scoped>\n .freddy-plugins-social-buttons {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .freddy-plugins-social-buttons--vertical {\n flex-direction: column;\n align-items: stretch;\n }\n\n .freddy-plugins-social-buttons--horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n .freddy-plugins-social-buttons--sm {\n gap: 8px;\n }\n\n .freddy-plugins-social-buttons--md {\n gap: 12px;\n }\n\n .freddy-plugins-social-buttons--lg {\n gap: 16px;\n }\n\n .freddy-plugins-social-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1px solid;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n sans-serif;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n box-sizing: border-box;\n position: relative;\n outline: none;\n text-decoration: none;\n white-space: nowrap;\n }\n\n /* Size styles */\n .freddy-plugins-social-button--sm {\n height: 32px;\n min-width: 32px;\n font-size: 14px;\n padding: 6px 12px;\n border-radius: 6px;\n gap: 6px;\n }\n\n .freddy-plugins-social-button--md {\n height: 40px;\n min-width: 40px;\n font-size: 16px;\n padding: 8px 16px;\n border-radius: 8px;\n gap: 8px;\n }\n\n .freddy-plugins-social-button--lg {\n height: 48px;\n min-width: 48px;\n font-size: 18px;\n padding: 12px 20px;\n border-radius: 8px;\n gap: 10px;\n }\n\n /* Icon only styles */\n .freddy-plugins-social-button--icon-only {\n aspect-ratio: 1;\n padding: 0;\n min-width: auto;\n }\n\n .freddy-plugins-social-button--icon-only.freddy-plugins-social-button--sm {\n width: 32px;\n height: 32px;\n }\n\n .freddy-plugins-social-button--icon-only.freddy-plugins-social-button--md {\n width: 40px;\n height: 40px;\n }\n\n .freddy-plugins-social-button--icon-only.freddy-plugins-social-button--lg {\n width: 48px;\n height: 48px;\n }\n\n /* Provider-specific filled styles */\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--google {\n background: #ffffff;\n color: #1f2937;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--facebook {\n background: #1877f2;\n color: #ffffff;\n border-color: #1877f2;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--apple {\n background: #000000;\n color: #ffffff;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--x {\n background: #000000;\n color: #ffffff;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--figma {\n background: #000000;\n color: #ffffff;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--dribbble {\n background: #ea4c89;\n color: #ffffff;\n border-color: #ea4c89;\n }\n\n /* Provider-specific outlined styles */\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--google {\n background: #ffffff;\n color: #1f2937;\n border-color: #10b981;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--facebook {\n background: #ffffff;\n color: #1877f2;\n border-color: #1877f2;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--apple {\n background: #ffffff;\n color: #000000;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--x {\n background: #ffffff;\n color: #000000;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--figma {\n background: #ffffff;\n color: #000000;\n border-color: #000000;\n }\n\n .freddy-plugins-social-button--outlined.freddy-plugins-social-button--dribbble {\n background: #ffffff;\n color: #ea4c89;\n border-color: #ea4c89;\n }\n\n /* Provider-specific ghost styles */\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--google {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--facebook {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--apple {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--x {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--figma {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n .freddy-plugins-social-button--ghost.freddy-plugins-social-button--dribbble {\n background: transparent;\n color: #9ca3af;\n border-color: #d1d5db;\n }\n\n /* Hover states */\n .freddy-plugins-social-button:hover:not(\n .freddy-plugins-social-button--disabled\n ) {\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--google:hover:not(\n .social-button--disabled\n ) {\n background: #f9fafb;\n border-color: #9ca3af;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--facebook:hover:not(\n .social-button--disabled\n ) {\n background: #166fe5;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--apple:hover:not(\n .social-button--disabled\n ) {\n background: #1a1a1a;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--x:hover:not(\n .social-button--disabled\n ) {\n background: #1a1a1a;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--figma:hover:not(\n .social-button--disabled\n ) {\n background: #1a1a1a;\n }\n\n .freddy-plugins-social-button--filled.freddy-plugins-social-button--dribbble:hover:not(\n .social-button--disabled\n ) {\n background: #e91e63;\n }\n\n .freddy-plugins-social-button--outlined:hover:not(\n .freddy-plugins-social-button--disabled\n ) {\n background: #f9fafb;\n }\n\n .freddy-plugins-social-button--ghost:hover:not(\n .freddy-plugins-social-button--disabled\n ) {\n background: #f9fafb;\n color: #6b7280;\n }\n\n /* Focus states */\n .freddy-plugins-social-button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #3b82f6;\n }\n\n /* Disabled state */\n .freddy-plugins-social-button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n transform: none !important;\n box-shadow: none !important;\n }\n\n .freddy-plugins-social-button--disabled:hover {\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Icon styles */\n .freddy-plugins-social-button-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: currentColor;\n }\n\n /* Icon sizes based on button size */\n .freddy-plugins-social-button--sm .freddy-plugins-social-button-icon {\n width: 16px;\n height: 16px;\n }\n\n .freddy-plugins-social-button--md .freddy-plugins-social-button-icon {\n width: 20px;\n height: 20px;\n }\n\n .freddy-plugins-social-button--lg .freddy-plugins-social-button-icon {\n width: 24px;\n height: 24px;\n }\n\n .freddy-plugins-social-button-label {\n display: flex;\n align-items: center;\n white-space: nowrap;\n }\n\n /* Responsive behavior */\n @media (max-width: 640px) {\n .freddy-plugins-social-buttons--horizontal {\n flex-direction: column;\n align-items: stretch;\n }\n }\n</style>\n","<template>\n <pre><code v-html=\"highlighted\"></code></pre>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, onMounted } from \"vue\";\n\nconst props = defineProps<{\n code: string;\n language: string;\n}>();\n\nconst theme = \"nord\";\nconst highlighted = ref(\"\");\nlet highlighter: any = null;\nlet createHighlighter: any = null;\n\n// Load shiki dependency asynchronously\nconst loadShiki = async () => {\n try {\n // Check if shiki is available globally first\n if (typeof window !== \"undefined\" && (window as any).shiki) {\n createHighlighter = (window as any).shiki.createHighlighter;\n return;\n }\n\n // For web components, shiki should be provided externally\n // Don't use dynamic import as it causes bundling issues\n console.warn(\"Shiki not available - using plain text fallback\");\n } catch {\n // shiki not available - will use plain text fallback\n }\n};\n\nconst supportedLangs = [\n \"js\",\n \"ts\",\n \"json\",\n \"python\",\n \"vue\",\n \"html\",\n \"css\",\n \"scss\",\n \"bash\",\n \"yaml\",\n \"markdown\",\n \"c\",\n \"cpp\",\n \"java\",\n \"go\",\n \"php\",\n \"ruby\",\n \"rust\",\n \"swift\",\n \"kotlin\",\n];\n\nconst highlightCode = async () => {\n // Ensure shiki is loaded\n if (!createHighlighter) {\n await loadShiki();\n }\n\n // If shiki is still not available, use plain text\n if (!createHighlighter) {\n highlighted.value = `<pre><code>${props.code\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")}</code></pre>`;\n return;\n }\n\n try {\n if (!highlighter) {\n highlighter = await createHighlighter({\n themes: [theme],\n langs: supportedLangs,\n });\n }\n highlighted.value = highlighter.codeToHtml(props.code, {\n lang: props.language,\n theme,\n });\n } catch (e) {\n // fallback: plain text\n highlighted.value = `<pre><code>${props.code\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")}</code></pre>`;\n }\n};\n\nwatch(() => [props.code, props.language], highlightCode, { immediate: true });\nonMounted(highlightCode);\n</script>\n\n<style>\npre,\ncode,\n.shiki {\n background: transparent !important;\n}\npre {\n font-family: \"Fira Mono\", \"Menlo\", \"Monaco\", \"Consolas\", \"Liberation Mono\",\n \"Courier New\", monospace;\n font-size: 14px;\n line-height: 1.6;\n padding: 16px;\n border-radius: 8px;\n overflow-x: auto;\n}\n</style>\n","<template>\n <label\n class=\"freddy-plugins-base-checkbox\"\n :class=\"{\n 'freddy-plugins-checked': isChecked && !blueCheckbox,\n 'freddy-plugins-checked-blue': isChecked && blueCheckbox,\n 'freddy-plugins-not-checked': !isChecked,\n 'freddy-plugins-is-disabled': disabled,\n }\"\n :aria-checked=\"isChecked\"\n :aria-disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n role=\"checkbox\"\n >\n <input\n id=\"checkbox-input\"\n type=\"checkbox\"\n class=\"freddy-plugins-checkbox-input\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n @change=\"onChange\"\n />\n <span v-if=\"isDashInput && isChecked\" class=\"freddy-plugins-checkbox-dash\"></span>\n <svg\n v-else-if=\"isChecked && !isDashInput\"\n class=\"freddy-plugins-checkbox-icon\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10 3L4.5 8.5L2 6\"\n :stroke=\"blueCheckbox ? 'var(--text-50, var(--text-inverse))' : '#000'\"\n stroke-width=\"1.6666\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </label>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\nconst props = defineProps<{\n isChecked: boolean;\n isDashInput?: boolean;\n blueCheckbox?: boolean;\n disabled?: boolean;\n ariaLabel?: string;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update:isChecked\", value: boolean): void;\n}>();\n\nfunction onChange(event: Event) {\n const target = event.target as HTMLInputElement;\n if (!props.disabled) {\n emit(\"update:isChecked\", target.checked);\n }\n}\n</script>\n\n<style>\n.freddy-plugins-base-checkbox {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border-radius: 4px;\n border: 2px solid currentColor;\n cursor: pointer;\n transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;\n user-select: none;\n}\n\n.freddy-plugins-checked {\n background-color: var(--freddy-text-primary);\n border-color: transparent;\n}\n\n.freddy-plugins-checked-blue {\n background-color: #7ba8ef;\n border-color: transparent;\n}\n\n.freddy-plugins-not-checked {\n background-color: transparent;\n border-color: currentColor;\n}\n\n.freddy-plugins-checkbox-input {\n position: absolute;\n opacity: 0;\n pointer-events: none;\n}\n\n.freddy-plugins-checkbox-dash {\n width: 8px;\n height: 2px;\n background-color: var(--freddy-text-primary);\n border-radius: 1px;\n}\n\n.freddy-plugins-checkbox-icon {\n width: 16px;\n height: 16px;\n pointer-events: none;\n}\n\n.freddy-plugins-is-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n</style>\n","<template>\n <div\n ref=\"tooltipWrapper\"\n class=\"freddy-plugins-tooltip-v2-wrapper\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @focusin=\"handleFocusIn\"\n @focusout=\"handleFocusOut\"\n tabindex=\"0\"\n >\n <slot />\n <transition name=\"fade\">\n <div\n v-if=\"show\"\n ref=\"tooltipContent\"\n class=\"freddy-plugins-tooltip-v2-content\"\n :class=\"[shouldShowBelow ? 'bottom' : 'top', contentClass]\"\n role=\"tooltip\"\n :aria-label=\"title\"\n >\n <div class=\"freddy-plugins-tooltip-v2-arrow\"></div>\n <slot name=\"content\">\n <div\n v-if=\"title || description\"\n class=\"freddy-plugins-tooltip-v2-inner\"\n >\n <div\n v-if=\"title\"\n class=\"freddy-plugins-tooltip-v2-title\"\n v-html=\"title\"\n ></div>\n <div\n v-if=\"description\"\n class=\"freddy-plugins-tooltip-v2-description\"\n v-html=\"description\"\n ></div>\n </div>\n </slot>\n </div>\n </transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n\n interface TooltipV2Props {\n /** The title to display at the top of the tooltip (supports HTML) */\n title?: string;\n /** The description to display below the title (supports HTML) */\n description?: string;\n /** The placement of the tooltip relative to the trigger element */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Custom CSS class to apply to the tooltip content */\n contentClass?: string;\n /** Delay before showing the tooltip (in milliseconds) */\n delay?: number;\n /** Delay before hiding the tooltip (in milliseconds) */\n hideDelay?: number;\n }\n\n const props = withDefaults(defineProps<TooltipV2Props>(), {\n placement: 'top',\n delay: 200,\n hideDelay: 0,\n });\n\n const show = ref(false);\n const shouldShowBelow = ref(false);\n const tooltipWrapper = ref<HTMLElement | null>(null);\n const tooltipContent = ref<HTMLElement | null>(null);\n let showTimeout: ReturnType<typeof setTimeout> | null = null;\n let hideTimeout: ReturnType<typeof setTimeout> | null = null;\n\n const calculateBestPosition = () => {\n if (!tooltipWrapper.value) return;\n\n const rect = tooltipWrapper.value.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const tooltipHeight = 250; // Approximate tooltip height with padding\n\n // Calculate available space above and below\n const spaceTop = rect.top;\n const spaceBottom = viewportHeight - rect.bottom;\n\n // Simple logic: show below if there's more space below OR not enough space above\n // This ensures it shows below when at the top of the screen\n if (spaceBottom >= tooltipHeight || spaceBottom > spaceTop) {\n shouldShowBelow.value = true;\n } else {\n shouldShowBelow.value = false;\n }\n };\n\n const handleMouseEnter = () => {\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n hideTimeout = null;\n }\n if (showTimeout) clearTimeout(showTimeout);\n showTimeout = setTimeout(() => {\n calculateBestPosition();\n show.value = true;\n }, props.delay);\n };\n\n const handleMouseLeave = () => {\n if (showTimeout) {\n clearTimeout(showTimeout);\n showTimeout = null;\n }\n hideTimeout = setTimeout(() => {\n show.value = false;\n }, props.hideDelay);\n };\n\n const handleFocusIn = () => {\n handleMouseEnter();\n };\n\n const handleFocusOut = () => {\n handleMouseLeave();\n };\n</script>\n\n<style scoped>\n .freddy-plugins-tooltip-v2-wrapper {\n display: inline-block;\n position: relative;\n }\n\n .freddy-plugins-tooltip-v2-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n z-index: 1;\n }\n\n .freddy-plugins-tooltip-v2-content {\n position: absolute;\n z-index: 1000;\n background-color: var(--freddy-bg-tertiary, #535862);\n color: var(--freddy-text-primary);\n font-size: var(--freddy-font-size-sm, 14px);\n padding: 12px 16px;\n border-radius: var(--freddy-radius-md, 8px);\n border: 1px solid var(--freddy-border-primary, rgba(148, 163, 184, 0.2));\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3),\n 0 2px 4px -1px rgba(0, 0, 0, 0.2);\n white-space: normal;\n max-width: 380px;\n min-width: 200px;\n pointer-events: none;\n line-height: 1.5;\n word-wrap: break-word;\n word-break: break-word;\n left: 50%;\n transform: translateX(-50%);\n bottom: calc(100% + 12px);\n }\n\n .freddy-plugins-tooltip-v2-inner {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .freddy-plugins-tooltip-v2-title {\n font-weight: 600;\n font-size: 14px;\n color: var(--freddy-text-primary, #ffff);\n line-height: 1.5;\n margin-bottom: 4px;\n }\n\n .freddy-plugins-tooltip-v2-description {\n font-weight: 400;\n font-size: 13px;\n color: var(--freddy-text-secondary, #cbd5e1);\n line-height: 1.6;\n }\n\n /* Position modifiers */\n .freddy-plugins-tooltip-v2-content.top {\n bottom: calc(100% + 12px);\n top: auto;\n }\n\n .freddy-plugins-tooltip-v2-content.top .freddy-plugins-tooltip-v2-arrow {\n bottom: -6px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 6px 6px 0 6px;\n border-color: var(--freddy-bg-tertiary, #535862) transparent transparent\n transparent;\n }\n\n .freddy-plugins-tooltip-v2-content.bottom {\n top: calc(100% + 12px);\n bottom: auto;\n }\n\n .freddy-plugins-tooltip-v2-content.bottom .freddy-plugins-tooltip-v2-arrow {\n top: -6px;\n left: 50%;\n transform: translateX(-50%);\n border-width: 0 6px 6px 6px;\n border-color: transparent transparent var(--freddy-bg-tertiary, #535862)\n transparent;\n }\n\n .freddy-plugins-tooltip-v2-content.left {\n left: auto;\n right: calc(100% + 12px);\n top: 50%;\n bottom: auto;\n transform: translateY(-50%);\n }\n\n .freddy-plugins-tooltip-v2-content.right {\n left: calc(100% + 12px);\n right: auto;\n top: 50%;\n bottom: auto;\n transform: translateY(-50%);\n }\n\n .fade-enter-active,\n .fade-leave-active {\n transition: opacity 0.15s ease-in-out;\n }\n\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n }\n</style>\n","/**\n * AI Text Service for intelligent text editing and generation\n * Provides smart content detection to avoid unnecessary greetings and responses\n */\n\nimport type {\n IAITextRequest,\n IAITextResponse,\n IAITextApiResponse,\n} from '@/interfaces';\n\n// Re-export for backward compatibility\nexport type AITextRequest = IAITextRequest;\nexport type AITextResponse = IAITextResponse;\n\nexport interface OpenAIResponse {\n choices: Array<{\n message: {\n content: string;\n role: string;\n };\n }>;\n usage?: {\n prompt_tokens: number;\n completion_tokens: number;\n total_tokens: number;\n };\n}\n\nclass AITextService {\n private apiKey: string | null = null;\n private baseUrl = 'https://api.openai.com/v1';\n\n constructor(apiKey?: string) {\n this.apiKey =\n apiKey ||\n this.getApiKeyFromEnv() ||\n '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';\n }\n\n private getApiKeyFromEnv(): string | null {\n // Try to get from environment variables or local storage\n // if (typeof window !== 'undefined') {\n // return localStorage.getItem('openai_api_key') || null;\n // }\n return process.env.OPENAI_API_KEY || null;\n }\n\n /**\n * Set the OpenAI API key\n */\n setApiKey(apiKey: string): void {\n this.apiKey = apiKey;\n // if (typeof window !== 'undefined') {\n // localStorage.setItem('openai_api_key', apiKey);\n // }\n }\n\n /**\n * Smart system prompt that determines action and provides contextual responses\n */\n private getSmartSystemPrompt(): string {\n return `You are an AI assistant that helps with text editing, code improvement, and content generation. You excel at working with JavaScript, HTML, CSS, JSON, and all programming languages. Analyze the user's request and respond with the appropriate action.\n\nRESPONSE RULES:\n- NEVER use greetings, pleasantries, or filler phrases\n- Get straight to the content the user needs\n- Be direct and focused on the task\n- Handle code with proper syntax and formatting\n- Preserve indentation and code structure\n- When working with JavaScript, consider modern ES6+ features and best practices\n\nRESPONSE FORMATS:\n\nFor text/code editing/improvement (when user wants to change existing content):\nReturn JSON: {\n \"action\": \"replace\",\n \"hasChanges\": true,\n \"improvedText\": \"the improved version with proper formatting\",\n \"changeDescription\": \"brief description of changes made\"\n}\nIMPORTANT: When improving existing content, ALWAYS use \"replace\" action with \"hasChanges\": true\n\nFor text/code continuation/expansion (when user wants to add to existing content):\nReturn JSON: {\n \"action\": \"complete\",\n \"content\": \"the continuation text or code\",\n \"hasChanges\": false\n}\n\nFor discussion/questions about text or code:\nReturn JSON: {\n \"action\": \"chat\",\n \"content\": \"your response to their question\",\n \"hasChanges\": false\n}\n\nIMPORTANT:\n- Always respond with valid JSON in one of these formats\n- The textBoxContent represents the current text/code the user is working with\n- When improving JavaScript code, ensure proper syntax, variable naming, and modern practices\n- Escape special characters properly in JSON responses\n- Maintain original code formatting and style when possible`;\n }\n\n /**\n * Analyze user input to determine the type of request\n */\n private analyzeRequest(\n userQuestion: string,\n textBoxContent?: string\n ): {\n isEdit: boolean;\n isGeneration: boolean;\n needsStructuredResponse: boolean;\n } {\n const question = userQuestion.toLowerCase();\n const hasExistingText = textBoxContent && textBoxContent.trim().length > 0;\n\n // Keywords that indicate editing\n const editKeywords = [\n 'edit',\n 'improve',\n 'fix',\n 'correct',\n 'rewrite',\n 'revise',\n 'polish',\n 'enhance',\n ];\n const isEdit = Boolean(\n hasExistingText &&\n editKeywords.some(keyword => question.includes(keyword))\n );\n\n // Keywords that indicate generation\n const generateKeywords = [\n 'write',\n 'create',\n 'generate',\n 'compose',\n 'draft',\n ];\n const isGeneration = Boolean(\n generateKeywords.some(keyword => question.includes(keyword))\n );\n\n // Determine if we need structured response (for significant changes)\n const needsStructuredResponse =\n isEdit &&\n (question.includes('significant') ||\n question.includes('major') ||\n question.includes('restructure') ||\n question.includes('rewrite'));\n\n return { isEdit, isGeneration, needsStructuredResponse };\n }\n\n /**\n * Create optimized prompt based on request analysis\n */\n private createPrompt(\n userQuestion: string,\n textBoxContent?: string\n ): Array<{\n role: string;\n content: any;\n }> {\n const analysis = this.analyzeRequest(userQuestion, textBoxContent);\n\n const messages: Array<{ role: string; content: any }> = [\n {\n role: 'system',\n content: this.getSmartSystemPrompt(),\n },\n ];\n\n // Build user message content\n const userContentParts: Array<{ type: string; text: string }> = [];\n\n if (textBoxContent && textBoxContent.trim()) {\n userContentParts.push({\n type: 'text',\n text: `Current text: ${textBoxContent.trim()}`,\n });\n }\n\n userContentParts.push({\n type: 'text',\n text: userQuestion,\n });\n\n // Add specific instructions based on analysis\n if (analysis.needsStructuredResponse) {\n userContentParts.push({\n type: 'text',\n text: 'Please respond with JSON format including change details and statistics.',\n });\n } else if (analysis.isEdit) {\n userContentParts.push({\n type: 'text',\n text: 'Provide only the improved text without explanations.',\n });\n }\n\n messages.push({\n role: 'user',\n content: userContentParts,\n });\n\n return messages;\n }\n\n /**\n * Create payload for the newer responses API\n */\n private createResponsesPayload(\n userQuestion: string,\n textBoxContent?: string\n ) {\n const input = [\n {\n role: 'system',\n content: this.getSmartSystemPrompt(),\n },\n {\n role: 'user',\n content: [\n {\n type: 'text',\n text: textBoxContent\n ? `Existing text: ${textBoxContent}`\n : 'No existing text.',\n },\n {\n type: 'text',\n text: userQuestion,\n },\n ],\n },\n ];\n\n return {\n model: 'gpt-4o-mini',\n input: input,\n temperature: 0.7,\n };\n }\n\n /**\n * Calculate basic statistics for text changes\n */\n private calculateStats(\n original: string,\n improved: string\n ): { added: number; removed: number } {\n const originalWords = original\n .trim()\n .split(/\\s+/)\n .filter(word => word.length > 0);\n const improvedWords = improved\n .trim()\n .split(/\\s+/)\n .filter(word => word.length > 0);\n\n const added = Math.max(0, improvedWords.length - originalWords.length);\n const removed = Math.max(0, originalWords.length - improvedWords.length);\n\n return { added, removed };\n }\n\n /**\n * Process the AI response and format it appropriately\n */\n private processResponse(\n response: string,\n userQuestion: string,\n originalText?: string\n ): AITextResponse {\n try {\n console.log('🔍 Processing AI Response:', response);\n // Try to parse as JSON first (for structured responses)\n const jsonResponse = JSON.parse(response);\n console.log('📋 Parsed JSON Response:', jsonResponse);\n\n // Handle new action-based format\n if (jsonResponse.action) {\n switch (jsonResponse.action) {\n case 'replace':\n const stats =\n originalText && jsonResponse.improvedText\n ? this.calculateStats(originalText, jsonResponse.improvedText)\n : jsonResponse.stats || { added: 0, removed: 0 };\n\n console.log(\n '✅ Replace action detected - will show Accept/Deny buttons'\n );\n return {\n success: true,\n content: jsonResponse.improvedText,\n hasChanges: true,\n action: 'replace',\n changeTitle: jsonResponse.changeTitle || 'Text Replacement',\n changeDescription:\n jsonResponse.changeDescription || 'Text has been improved',\n improvedText: jsonResponse.improvedText,\n stats,\n };\n\n case 'complete':\n return {\n success: true,\n content: jsonResponse.content,\n hasChanges: false,\n action: 'complete',\n };\n\n case 'chat':\n return {\n success: true,\n content: jsonResponse.content,\n hasChanges: false,\n action: 'chat',\n };\n }\n }\n\n // Legacy format support\n if (jsonResponse.hasChanges && jsonResponse.improvedText) {\n const stats = originalText\n ? this.calculateStats(originalText, jsonResponse.improvedText)\n : { added: 0, removed: 0 };\n\n return {\n success: true,\n content: jsonResponse.improvedText,\n hasChanges: true,\n action: 'replace',\n changeTitle: jsonResponse.changeTitle || 'Text Improvement',\n changeDescription:\n jsonResponse.changeDescription || 'Text has been improved',\n improvedText: jsonResponse.improvedText,\n stats,\n };\n }\n\n // Fallback: treat as plain text response\n // If there's existing text, always treat as replace to show Accept/Deny buttons\n if (originalText && jsonResponse.content) {\n console.log(\n '🔄 Fallback: Treating as replace action for existing content'\n );\n const stats = this.calculateStats(originalText, jsonResponse.content);\n return {\n success: true,\n content: jsonResponse.content,\n hasChanges: true,\n action: 'replace',\n changeTitle: 'AI Response',\n changeDescription: 'AI has provided a response to your request',\n improvedText: jsonResponse.content,\n stats,\n };\n }\n\n return {\n success: true,\n content: jsonResponse.content || response,\n hasChanges: false,\n action: 'chat',\n };\n } catch {\n // Handle as plain text response - simple fallback\n return {\n success: true,\n content: response,\n hasChanges: false,\n action: 'chat',\n };\n }\n }\n\n /**\n * Main method to ask AI for text editing or generation\n */\n async askAI(\n userQuestion: string,\n textBoxContent?: string\n ): Promise<AITextResponse> {\n if (!this.apiKey) {\n return {\n success: false,\n error:\n 'OpenAI API key is not configured. Please set your API key first.',\n };\n }\n\n if (!userQuestion.trim()) {\n return {\n success: false,\n error: 'User question cannot be empty.',\n };\n }\n\n try {\n const userContent = textBoxContent\n ? `Existing content:\\n\\`\\`\\`\\n${textBoxContent}\\n\\`\\`\\`\\n\\nUser request: ${userQuestion}`\n : userQuestion;\n\n const payload = {\n model: 'gpt-4o-mini',\n input: [\n {\n role: 'system',\n content: this.getSmartSystemPrompt(),\n },\n {\n role: 'user',\n content: userContent,\n },\n ],\n temperature: 0.7,\n };\n\n console.log('🚀 AITextService: Making request to OpenAI responses API');\n console.log('📡 Endpoint:', `${this.baseUrl}/responses`);\n console.log('📦 Payload:', payload);\n\n const response = await fetch(`${this.baseUrl}/responses`, {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${this.apiKey}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n console.log('📨 Response status:', response.status);\n console.log(\n '📨 Response headers:',\n Object.fromEntries(response.headers.entries())\n );\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n console.error('❌ API Error Details:', {\n status: response.status,\n statusText: response.statusText,\n errorData,\n apiKey: this.apiKey ? `${this.apiKey.substring(0, 10)}...` : 'null',\n headers: Object.fromEntries(response.headers.entries()),\n });\n return {\n success: false,\n error:\n errorData.error?.message ||\n `API request failed with status ${response.status}: ${response.statusText}`,\n };\n }\n\n const data = await response.json();\n console.log('📦 Full API Response:', JSON.stringify(data, null, 2));\n\n // Handle OpenAI Responses API format\n const aiResponse = data.output?.[0]?.content?.[0]?.text;\n\n if (!aiResponse) {\n return {\n success: false,\n error: 'No response received from AI',\n };\n }\n\n return this.processResponse(aiResponse, userQuestion, textBoxContent);\n } catch (error) {\n console.error('AI Text Service Error:', error);\n return {\n success: false,\n error:\n error instanceof Error\n ? error.message\n : 'An unexpected error occurred',\n };\n }\n }\n\n /**\n * Check if the service is properly configured\n */\n isConfigured(): boolean {\n return !!this.apiKey;\n }\n\n /**\n * Get current API key status (without exposing the key)\n */\n getStatus(): { configured: boolean; keyLength?: number } {\n return {\n configured: this.isConfigured(),\n keyLength: this.apiKey?.length,\n };\n }\n}\n\n// Export class and singleton instance\nexport { AITextService };\nexport const aiTextService = new AITextService(\n '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'\n);\nexport default aiTextService;\n","<template>\n <div class=\"freddy-plugins-simple-chat-interface\">\n <!-- Messages Container -->\n <div ref=\"messagesContainer\" class=\"freddy-plugins-chat-messages\">\n <!-- Chat Messages -->\n <div class=\"freddy-plugins-messages-list\">\n <div\n v-for=\"message in messages\"\n :key=\"message.id\"\n :class=\"['freddy-plugins-message', message.sender]\"\n >\n <!-- User Messages -->\n <div\n v-if=\"message.sender === 'user'\"\n class=\"freddy-plugins-user-message-container\"\n >\n <div class=\"freddy-plugins-user-bubble\">\n {{ message.content }}\n </div>\n <div class=\"freddy-plugins-user-actions\">\n <button class=\"freddy-plugins-action-btn\" title=\"Copy\">\n <IconCopy class=\"freddy-plugins-action-icon\" />\n </button>\n <button class=\"freddy-plugins-action-btn\" title=\"Edit\">\n <IconEdit class=\"freddy-plugins-action-icon\" />\n </button>\n </div>\n </div>\n\n <!-- Assistant Messages -->\n <div v-else class=\"freddy-plugins-assistant-message-container\">\n <div class=\"freddy-plugins-assistant-content\">\n <p class=\"freddy-plugins-assistant-text\">{{ message.content }}</p>\n\n <!-- Changes Card -->\n <div v-if=\"message.changes\" class=\"freddy-plugins-changes-card\">\n <div class=\"freddy-plugins-changes-header\">\n <div class=\"freddy-plugins-header-left\">\n <IconFile class=\"freddy-plugins-building-icon\" />\n <span class=\"freddy-plugins-change-title\">{{\n message.changes.title || 'Instructions'\n }}</span>\n <span\n v-if=\"message.changes.added > 0\"\n class=\"freddy-plugins-stat-added\"\n >+{{ message.changes.added }}</span\n >\n <span\n v-if=\"message.changes.removed > 0\"\n class=\"freddy-plugins-stat-removed\"\n >-{{ message.changes.removed }}</span\n >\n <span class=\"freddy-plugins-changes-applied\"\n >Changes applied</span\n >\n </div>\n </div>\n\n <div class=\"freddy-plugins-changes-content\">\n <div class=\"freddy-plugins-content-header\">\n <span class=\"freddy-plugins-content-title\"\n >Instructions</span\n >\n </div>\n <p class=\"freddy-plugins-content-description\">\n {{ message.changes.description }}\n </p>\n <!-- Show Accept/Deny buttons only if not applied -->\n <div\n v-if=\"!message.applied\"\n class=\"freddy-plugins-content-actions\"\n >\n <button\n class=\"freddy-plugins-accept-btn\"\n @click=\"handleAcceptChanges(message)\"\n >\n <IconCheckRounded class=\"freddy-plugins-btn-icon\" />\n Accept\n </button>\n <button\n class=\"freddy-plugins-deny-btn\"\n @click=\"handleDenyChanges(message)\"\n >\n <IconCross class=\"freddy-plugins-btn-icon\" />\n Deny\n </button>\n </div>\n\n <!-- Show simple Applied label if applied -->\n <div v-else class=\"freddy-plugins-applied-label\">\n <IconCheckRounded class=\"freddy-plugins-applied-icon\" />\n Applied\n </div>\n </div>\n </div>\n\n <div class=\"freddy-plugins-assistant-actions\">\n <button class=\"freddy-plugins-action-btn\" title=\"Refresh\">\n <IconRefresh class=\"freddy-plugins-action-icon\" />\n </button>\n <button class=\"freddy-plugins-action-btn\" title=\"Copy\">\n <IconCopy class=\"freddy-plugins-action-icon\" />\n </button>\n <button class=\"freddy-plugins-action-btn\" title=\"Thumbs down\">\n <IconThumbsDown class=\"freddy-plugins-action-icon\" />\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- AI Processing Indicator -->\n <div v-if=\"isProcessing\" class=\"freddy-plugins-processing-indicator\">\n <div class=\"freddy-plugins-processing-content\">\n <div class=\"freddy-plugins-processing-spinner\"></div>\n <span class=\"freddy-plugins-processing-text\"\n >AI is processing your request...</span\n >\n </div>\n </div>\n </div>\n\n <!-- Input Area -->\n <div class=\"freddy-plugins-chat-input-area\">\n <button class=\"freddy-plugins-folder-btn\">\n <IconFolder class=\"freddy-plugins-folder-icon\" />\n </button>\n <textarea\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :placeholder=\"placeholder || 'Type here...'\"\n class=\"freddy-plugins-chat-input\"\n rows=\"1\"\n @keydown.enter.exact.prevent=\"handleSend\"\n @keydown.enter.shift.exact=\"handleNewLine\"\n @input=\"adjustTextareaHeight\"\n />\n <button\n class=\"freddy-plugins-send-button\"\n :disabled=\"!inputValue.trim()\"\n @click=\"handleSend\"\n >\n <IconPaperAirPlane class=\"freddy-plugins-send-icon\" />\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, nextTick, watch } from 'vue';\n import {\n IconPaperAirPlane,\n IconCheckRounded,\n IconCross,\n IconFile,\n IconCopy,\n IconEdit,\n IconRefresh,\n IconFolder,\n IconThumbsDown,\n } from '@/icons';\n import {\n parseApiResponse,\n getDisplayContent,\n createChangesObject,\n } from '@/helpers';\n import { aiTextService } from '@/services';\n\n import type { IChatMessage } from '@/interfaces';\n\n const props = defineProps<{\n placeholder?: string;\n messages?: IChatMessage[];\n enableAI?: boolean;\n openaiApiKey?: string;\n textBoxContent?: string;\n }>();\n\n const emit = defineEmits<{\n send: [message: string];\n acceptChanges: [message: IChatMessage];\n denyChanges: [message: IChatMessage];\n textReplacement: [\n data: { original?: string; improved: string; stats?: any }\n ];\n textCompletion: [data: { original?: string; completion: string }];\n }>();\n\n const inputValue = ref('');\n const messagesContainer = ref<HTMLElement | null>(null);\n const inputRef = ref<HTMLTextAreaElement | null>(null);\n\n const messages = ref<IChatMessage[]>(props.messages || []);\n const isProcessing = ref(false);\n\n // Initialize AI service with API key if provided\n if (props.openaiApiKey) {\n aiTextService.setApiKey(props.openaiApiKey);\n }\n\n // Watch for prop changes\n watch(\n () => props.messages,\n newMessages => {\n if (newMessages) {\n messages.value = newMessages;\n scrollToBottom();\n }\n }\n );\n\n // Watch for API key changes\n watch(\n () => props.openaiApiKey,\n newApiKey => {\n if (newApiKey) {\n aiTextService.setApiKey(newApiKey);\n }\n }\n );\n\n // Helper functions for action-based responses\n const getActionTitle = (action?: string): string => {\n switch (action) {\n case 'replace':\n return 'Text Replacement';\n case 'complete':\n return 'Text Completion';\n case 'chat':\n return 'AI Response';\n default:\n return 'Text Improvement';\n }\n };\n\n const getActionDescription = (action?: string): string => {\n switch (action) {\n case 'replace':\n return 'Your text has been improved and replaced';\n case 'complete':\n return 'Your text has been continued';\n case 'chat':\n return 'AI provided a conversational response';\n default:\n return 'Text has been improved';\n }\n };\n\n const processWithAI = async (userMessage: string) => {\n if (!aiTextService.isConfigured()) {\n const errorMessage: IChatMessage = {\n id: Date.now().toString(),\n content:\n 'AI service is not configured. Please provide an OpenAI API key.',\n sender: 'assistant',\n timestamp: new Date(),\n };\n messages.value.push(errorMessage);\n scrollToBottom();\n return;\n }\n\n isProcessing.value = true;\n\n try {\n const response = await aiTextService.askAI(\n userMessage,\n props.textBoxContent\n );\n\n if (response.success && response.content) {\n const aiMessage: IChatMessage = {\n id: Date.now().toString(),\n content: response.content,\n sender: 'assistant',\n timestamp: new Date(),\n applied: false, // Explicitly set to false for new messages\n changes: response.hasChanges\n ? {\n title: response.changeTitle || getActionTitle(response.action),\n description:\n response.changeDescription ||\n getActionDescription(response.action),\n added: response.stats?.added || 0,\n removed: response.stats?.removed || 0,\n data: {\n originalText: props.textBoxContent,\n improvedText: response.improvedText || response.content,\n action: response.action,\n },\n }\n : undefined,\n };\n\n messages.value.push(aiMessage);\n console.log('📝 New AI message created:', {\n id: aiMessage.id,\n applied: aiMessage.applied,\n hasChanges: !!aiMessage.changes,\n action: aiMessage.changes?.data?.action,\n });\n scrollToBottom();\n\n // Note: Text replacement events are now only emitted when user accepts changes\n // This prevents premature text updates before user confirmation\n } else {\n const errorMessage: IChatMessage = {\n id: Date.now().toString(),\n content:\n response.error ||\n 'Failed to process your request. Please try again.',\n sender: 'assistant',\n timestamp: new Date(),\n };\n messages.value.push(errorMessage);\n scrollToBottom();\n }\n } catch (error) {\n console.error('AI processing error:', error);\n const errorMessage: IChatMessage = {\n id: Date.now().toString(),\n content: 'An unexpected error occurred while processing your request.',\n sender: 'assistant',\n timestamp: new Date(),\n };\n messages.value.push(errorMessage);\n scrollToBottom();\n } finally {\n isProcessing.value = false;\n }\n };\n\n const handleSend = async () => {\n const message = inputValue.value.trim();\n if (!message) return;\n\n // Add user message\n const userMessage: IChatMessage = {\n id: Date.now().toString(),\n content: message,\n sender: 'user',\n timestamp: new Date(),\n };\n\n messages.value.push(userMessage);\n emit('send', message);\n\n inputValue.value = '';\n adjustTextareaHeight();\n scrollToBottom();\n\n // Process with AI if enabled\n if (props.enableAI) {\n await processWithAI(message);\n }\n };\n\n const handleNewLine = () => {\n inputValue.value += '\\n';\n adjustTextareaHeight();\n };\n\n const adjustTextareaHeight = () => {\n nextTick(() => {\n if (inputRef.value) {\n inputRef.value.style.height = 'auto';\n inputRef.value.style.height =\n Math.min(inputRef.value.scrollHeight, 120) + 'px';\n }\n });\n };\n\n const scrollToBottom = () => {\n nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop =\n messagesContainer.value.scrollHeight;\n }\n });\n };\n\n const formatMessage = (content: string): string => {\n // Simple formatting for messages\n return content\n .replace(/\\n/g, '<br>')\n .replace(/\\*\\*(.*?)\\*\\*/g, '<strong>$1</strong>')\n .replace(/\\*(.*?)\\*/g, '<em>$1</em>')\n .replace(/`(.*?)`/g, '<code>$1</code>');\n };\n\n const formatTime = (timestamp: Date): string => {\n return timestamp.toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n };\n\n const handleAcceptChanges = (message: IChatMessage) => {\n console.log('🔄 Before accept - message.applied:', message.applied);\n\n // Emit the event for parent component to handle the actual text replacement\n // The parent will mark it as applied after successfully applying changes\n emit('acceptChanges', message);\n\n console.log('📤 Accept event emitted for message:', message.id);\n };\n\n const handleDenyChanges = (message: IChatMessage) => {\n // Mark the message as denied (remove changes UI)\n if (message.changes) {\n message.changes = undefined;\n }\n\n emit('denyChanges', message);\n\n console.log('❌ Changes denied for message:', message.id);\n };\n\n // Method to add AI response from API data (called from parent)\n const addAIResponseFromApi = (apiResponse: any) => {\n const parsed = parseApiResponse(apiResponse);\n const displayContent = getDisplayContent(parsed);\n const changes = createChangesObject(parsed);\n\n const aiMessage: IChatMessage = {\n id: Date.now().toString(),\n content: displayContent,\n sender: 'assistant',\n timestamp: new Date(),\n applied: false, // Explicitly set to false for new messages\n changes,\n };\n\n messages.value.push(aiMessage);\n scrollToBottom();\n };\n\n // Method to add AI response (called from parent) - legacy method\n const addAIResponse = (\n content: string,\n changes?: {\n title?: string;\n description: string;\n added: number;\n removed: number;\n data?: any;\n }\n ) => {\n const aiMessage: IChatMessage = {\n id: Date.now().toString(),\n content,\n sender: 'assistant',\n timestamp: new Date(),\n changes,\n };\n\n messages.value.push(aiMessage);\n scrollToBottom();\n };\n\n // Expose methods to parent\n defineExpose({\n addAIResponse,\n addAIResponseFromApi,\n });\n</script>\n\n<style>\n /* Figma Design Tokens */\n .freddy-plugins-simple-chat-interface {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n background-color: #071a2b; /* bg-secondary from Figma */\n gap: 10px;\n overflow: hidden;\n }\n\n /* Messages Container */\n .freddy-plugins-chat-messages {\n overflow-y: auto;\n height: calc(100% - 24px);\n display: flex;\n flex-direction: column;\n }\n\n .freddy-plugins-messages-list {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n\n .freddy-plugins-message {\n display: flex;\n width: 100%;\n }\n\n /* User Messages - Aligned Right */\n .freddy-plugins-user-message-container {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 2px;\n margin-left: auto;\n max-width: 80%;\n }\n\n .freddy-plugins-user-bubble {\n background-color: #555555; /* bg-transparent-grey from Figma */\n color: #ffffff;\n padding: 6px;\n border-radius: 8px 8px 5px 8px;\n font-family: 'Inter', sans-serif;\n font-size: 17px;\n font-weight: 500;\n line-height: normal;\n word-wrap: break-word;\n }\n\n .freddy-plugins-user-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n\n .freddy-plugins-action-btn {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n border-radius: 4px;\n padding: 2px;\n cursor: pointer;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),\n 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18);\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .freddy-plugins-action-icon {\n width: 16px;\n height: 16px;\n color: #94979c;\n }\n\n /* Assistant Messages - Aligned Left */\n .freddy-plugins-assistant-message-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-right: auto;\n max-width: 80%;\n }\n\n .freddy-plugins-assistant-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n }\n\n .freddy-plugins-assistant-text {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n margin: 0;\n }\n\n /* Changes Card */\n .freddy-plugins-changes-card {\n background-color: #071a2b;\n border: 1px solid #35414b;\n border-radius: 12px;\n overflow: hidden;\n }\n\n .freddy-plugins-changes-header {\n padding: 6px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .freddy-plugins-header-left {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .freddy-plugins-building-icon {\n width: 24px;\n height: 24px;\n color: #cbd6e3;\n }\n\n .freddy-plugins-change-title {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n\n .freddy-plugins-stat-added {\n color: #067647;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n\n .freddy-plugins-stat-removed {\n color: #d92d20;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n\n .freddy-plugins-changes-applied {\n color: #68c57c;\n font-family: 'Inter', sans-serif;\n font-size: 10px;\n font-weight: 500;\n line-height: 12px;\n }\n\n .freddy-plugins-changes-content {\n background-color: #031525;\n padding: 8px;\n border-radius: 8px;\n margin: 0 6px 6px 6px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .freddy-plugins-content-header {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 10px;\n }\n\n .freddy-plugins-content-title {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n }\n\n .freddy-plugins-content-description {\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n margin: 0;\n }\n\n .freddy-plugins-content-actions {\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n }\n\n .freddy-plugins-accept-btn {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 20px;\n padding: 2px;\n background: transparent;\n border: none;\n border-radius: 4px;\n color: #68c57c;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n cursor: pointer;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),\n 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18);\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-accept-btn:hover {\n background-color: rgba(104, 197, 124, 0.1);\n }\n\n .freddy-plugins-deny-btn {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 20px;\n padding: 2px;\n background: transparent;\n border: none;\n border-radius: 4px;\n color: #f14d4d;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n cursor: pointer;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),\n 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18);\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-deny-btn:hover {\n background-color: rgba(241, 77, 77, 0.1);\n }\n\n .freddy-plugins-applied-status {\n display: flex;\n align-items: center;\n gap: 2px;\n height: 20px;\n padding: 2px;\n background: rgba(104, 197, 124, 0.1);\n border: 1px solid rgba(104, 197, 124, 0.3);\n border-radius: 4px;\n color: #68c57c;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n }\n\n .freddy-plugins-applied-icon {\n width: 16px;\n height: 16px;\n color: #68c57c;\n }\n\n .freddy-plugins-applied-label {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--freddy-success-color, #10b981);\n font-size: 12px;\n font-weight: 500;\n padding: 8px 0;\n }\n\n .freddy-plugins-btn-icon {\n width: 16px;\n height: 16px;\n }\n\n .freddy-plugins-assistant-actions {\n display: flex;\n gap: 8px;\n }\n\n /* AI Processing Indicator */\n .freddy-plugins-processing-indicator {\n display: flex;\n justify-content: flex-start;\n margin-right: auto;\n max-width: 80%;\n margin-top: 20px;\n }\n\n .freddy-plugins-processing-content {\n display: flex;\n align-items: center;\n gap: 8px;\n background-color: rgba(255, 255, 255, 0.05);\n border: 1px solid #35414b;\n border-radius: 8px;\n padding: 8px 12px;\n }\n\n .freddy-plugins-processing-spinner {\n width: 16px;\n height: 16px;\n border: 2px solid #35414b;\n border-top: 2px solid #cbd6e3;\n border-radius: 50%;\n animation: freddy-plugins-spin 1s linear infinite;\n }\n\n @keyframes freddy-plugins-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .freddy-plugins-processing-text {\n color: #cbd6e3;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n\n /* Input Area */\n .freddy-plugins-chat-input-area {\n background-color: #071a2b;\n border: 1px solid #717680;\n border-radius: 16px;\n padding: 8px 12px;\n display: flex;\n gap: 12px;\n align-items: center;\n box-sizing: border-box;\n }\n\n .freddy-plugins-folder-btn {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n }\n\n .freddy-plugins-folder-icon {\n width: 28px;\n height: 28px;\n color: #cbd6e3;\n }\n\n .freddy-plugins-chat-input {\n flex: 1;\n background: transparent;\n border: none;\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 20px;\n font-weight: 400;\n line-height: 30px;\n resize: none;\n outline: none;\n min-height: 30px;\n max-height: 120px;\n }\n\n .freddy-plugins-chat-input::placeholder {\n color: rgba(133, 136, 142, 0.7);\n }\n\n .freddy-plugins-send-button {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-send-button:hover:not(:disabled) {\n opacity: 0.8;\n }\n\n .freddy-plugins-send-button:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .freddy-plugins-send-icon {\n width: 32px;\n height: 32px;\n color: #cbd6e3;\n }\n\n /* Scrollbar */\n .freddy-plugins-chat-messages::-webkit-scrollbar {\n width: 6px;\n }\n\n .freddy-plugins-chat-messages::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .freddy-plugins-chat-messages::-webkit-scrollbar-thumb {\n background: #35414b;\n border-radius: 3px;\n }\n\n .freddy-plugins-chat-messages::-webkit-scrollbar-thumb:hover {\n background: #717680;\n }\n</style>\n","<template>\n <Transition name=\"modal\">\n <div\n v-if=\"isVisible\"\n class=\"freddy-plugins-edit-excerpt-modal-overlay\"\n @click.self=\"handleClose\"\n >\n <div\n class=\"freddy-plugins-edit-excerpt-modal-container\"\n :class=\"{ 'ai-active': showAI }\"\n >\n <div class=\"freddy-plugins-edit-excerpt-modal-content\">\n <!-- Modal header -->\n <div class=\"freddy-plugins-edit-excerpt-modal-header\">\n <div class=\"freddy-plugins-edit-excerpt-modal-header-content\">\n <!-- Edit icon -->\n <div class=\"freddy-plugins-edit-excerpt-modal-icon\">\n <IconEditLinePath\n class=\"freddy-plugins-edit-excerpt-edit-icon\"\n :center-distance=\"36\"\n :circle-gap=\"44\"\n :show-circles=\"true\"\n />\n </div>\n\n <!-- Title and description -->\n <div class=\"freddy-plugins-edit-excerpt-modal-text\">\n <h2 class=\"freddy-plugins-edit-excerpt-modal-title\">\n {{ title }}\n </h2>\n <p class=\"freddy-plugins-edit-excerpt-modal-subtitle\">\n {{ description }}\n </p>\n </div>\n </div>\n\n <!-- Close button -->\n <button\n class=\"freddy-plugins-edit-excerpt-modal-close-btn\"\n :style=\"{ right: showAI ? '52px' : '16px' }\"\n @click=\"handleClose\"\n aria-label=\"Close modal\"\n >\n <IconCross class=\"freddy-plugins-edit-excerpt-modal-close-icon\" />\n </button>\n\n <!-- Hide AI button -->\n <button\n v-if=\"false\"\n class=\"freddy-plugins-edit-excerpt-modal-close-btn\"\n style=\"right: 16px\"\n @click=\"handleHideAI\"\n aria-label=\"Hide AI\"\n >\n <IconSectionHide\n class=\"freddy-plugins-edit-excerpt-hide-section-icon\"\n />\n </button>\n\n <!-- Bottom spacing -->\n <div class=\"freddy-plugins-edit-excerpt-modal-header-spacing\" />\n </div>\n\n <!-- Textarea section -->\n <div class=\"freddy-plugins-edit-excerpt-modal-textarea-section\">\n <textarea\n v-model=\"content\"\n class=\"freddy-plugins-edit-excerpt-modal-textarea\"\n placeholder=\"The text thats needed\"\n rows=\"12\"\n />\n </div>\n\n <!-- Footer actions -->\n <div class=\"freddy-plugins-edit-excerpt-modal-footer\">\n <div class=\"freddy-plugins-edit-excerpt-modal-footer-content\">\n <!-- Ask AI button -->\n <button\n v-if=\"!showAI\"\n class=\"freddy-plugins-edit-excerpt-modal-ai-btn\"\n @click=\"handleAskAI\"\n >\n <IconSparkle\n class=\"freddy-plugins-edit-excerpt-modal-ai-icon\"\n />\n <span class=\"freddy-plugins-edit-excerpt-modal-ai-text\">\n Ask AI\n </span>\n </button>\n\n <!-- Action buttons -->\n <div class=\"freddy-plugins-edit-excerpt-modal-action-buttons\">\n <!-- Cancel button -->\n <button\n class=\"freddy-plugins-edit-excerpt-modal-cancel-btn\"\n @click=\"handleCancel\"\n >\n Cancel\n </button>\n\n <!-- Save changes button -->\n <button\n class=\"freddy-plugins-edit-excerpt-modal-save-btn\"\n @click=\"handleSave\"\n >\n Save changes\n </button>\n </div>\n </div>\n </div>\n </div>\n <div\n v-if=\"showAI\"\n class=\"freddy-plugins-edit-excerpt-modal-ai-container\"\n >\n <SimpleChatInterface\n ref=\"chatRef\"\n :placeholder=\"'Type here...'\"\n :messages=\"chatMessages\"\n :enable-a-i=\"true\"\n :openai-api-key=\"openaiApiKey\"\n :text-box-content=\"content\"\n @send=\"handleChatMessage\"\n @accept-changes=\"handleAcceptChanges\"\n @deny-changes=\"handleDenyChanges\"\n @text-replacement=\"handleTextReplacement\"\n @text-completion=\"handleTextCompletion\"\n />\n </div>\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, watch } from 'vue';\n import { IconCross, IconEditLinePath, IconSparkle } from '@/icons';\n import SimpleChatInterface from './SimpleChatInterface.vue';\n import IconSectionHide from '@/icons/IconSectionHide.vue';\n import type { IChatMessage } from '@/interfaces';\n\n const props = defineProps({\n isVisible: {\n type: Boolean,\n required: true,\n },\n title: {\n type: String,\n default: 'Edit featured excerpt',\n },\n description: {\n type: String,\n default: 'This will be displayed on your profile.',\n },\n initialContent: {\n type: String,\n default: '',\n },\n openaiApiKey: {\n type: String,\n default: '',\n },\n openaiModel: {\n type: String,\n default: 'gpt-4o-mini',\n },\n openaiOrganization: {\n type: String,\n default: '',\n },\n });\n\n const emit = defineEmits(['close', 'save', 'cancel', 'askAI', 'toggleAI']);\n\n const content = ref(props.initialContent);\n const showAI = ref(false);\n const chatMessages = ref<IChatMessage[]>([]);\n const chatRef = ref<InstanceType<typeof SimpleChatInterface> | null>(null);\n\n // Watch for prop changes\n watch(\n () => props.initialContent,\n newContent => {\n content.value = newContent;\n }\n );\n\n const handleClose = () => {\n showAI.value = false;\n chatMessages.value = [];\n emit('close');\n };\n\n const handleSave = () => {\n emit('save', content.value);\n };\n\n const handleCancel = () => {\n showAI.value = false;\n chatMessages.value = [];\n emit('cancel');\n };\n\n const handleAskAI = () => {\n showAI.value = true;\n emit('toggleAI', showAI.value);\n emit('askAI', content.value);\n };\n\n const handleHideAI = () => {\n showAI.value = false;\n emit('toggleAI', showAI.value);\n };\n\n const handleChatMessage = async (message: string) => {\n // The SimpleChatInterface with enableAI will handle the AI processing automatically\n console.log('Chat message sent:', message);\n };\n\n const handleAcceptChanges = (message: any) => {\n console.log('📝 Applying changes for message:', message);\n\n if (message.changes && message.changes.data) {\n // Apply changes to content\n if (message.changes.data.improvedText) {\n const oldContent = content.value;\n content.value = message.changes.data.improvedText;\n console.log(\n '✅ Content updated from:',\n oldContent.substring(0, 50) + '...'\n );\n console.log(\n '✅ Content updated to:',\n content.value.substring(0, 50) + '...'\n );\n\n // Only mark as applied after successfully updating content\n message.applied = true;\n console.log('✅ Message marked as applied:', message.id);\n }\n } else {\n console.warn('⚠️ No changes data found in message:', message);\n }\n };\n\n const handleDenyChanges = (message: any) => {\n console.log('❌ Denying changes for message:', message);\n\n // The SimpleChatInterface already handles hiding the UI\n // No need to add additional messages\n };\n\n const handleTextReplacement = (data: any) => {\n console.log(\n '📋 Text replacement event received (should not auto-apply):',\n data\n );\n // Note: Text replacement now only happens through handleAcceptChanges\n // This handler is kept for compatibility but doesn't auto-apply changes\n };\n\n const handleTextCompletion = (data: any) => {\n console.log(\n '📋 Text completion event received (should not auto-apply):',\n data\n );\n // Note: Text completion now only happens through handleAcceptChanges\n // This handler is kept for compatibility but doesn't auto-apply changes\n };\n</script>\n\n<style scoped>\n /* Modal overlay */\n .freddy-plugins-edit-excerpt-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(29, 46, 71, 0.9);\n backdrop-filter: blur(4px);\n z-index: 9998;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .freddy-plugins-edit-excerpt-modal-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 600px;\n }\n\n .freddy-plugins-edit-excerpt-modal-content {\n height: 100%;\n background-color: #071a2b;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n max-width: 720px;\n overflow: hidden;\n position: relative;\n border-radius: 16px;\n box-shadow: 0px 20px 24px -4px rgba(0, 0, 0, 0.25);\n width: 720px;\n transition: border-radius 0.3s ease, border 0.3s ease;\n }\n\n /* When AI is shown, remove right border radius */\n .freddy-plugins-edit-excerpt-modal-container.ai-active\n .freddy-plugins-edit-excerpt-modal-content {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 1px solid #717680;\n }\n\n /* Background decorative pattern */\n .freddy-plugins-edit-excerpt-modal-bg-pattern {\n position: absolute;\n left: -120px;\n width: 336px;\n height: 336px;\n top: -120px;\n }\n\n .freddy-plugins-edit-excerpt-modal-bg-circle {\n position: absolute;\n left: 50%;\n width: 336px;\n height: 336px;\n top: 0;\n transform: translateX(-50%);\n background: radial-gradient(\n circle,\n rgba(203, 214, 227, 1) 0%,\n rgba(153, 160, 170, 0.75) 25%,\n rgba(102, 107, 113, 0.5) 50%,\n rgba(51, 53, 57, 0.25) 75%,\n rgba(0, 0, 0, 0) 100%\n );\n opacity: 0.2;\n }\n\n /* Modal header */\n .freddy-plugins-edit-excerpt-modal-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-header-content {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 16px;\n align-items: flex-start;\n padding: 24px 24px 0 24px;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-icon {\n background-color: #031525;\n border: 1px solid var(--freddy-border-disabled);\n position: relative;\n border-radius: 10px;\n flex-shrink: 0;\n width: 48px;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-edit-excerpt-edit-icon {\n width: 24px;\n height: 24px;\n color: #cecfd2;\n }\n\n .freddy-plugins-edit-excerpt-modal-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n align-items: flex-start;\n position: relative;\n width: 100%;\n z-index: 1;\n }\n\n .freddy-plugins-edit-excerpt-modal-title {\n font-weight: 600;\n font-size: 16px;\n color: white;\n line-height: 20px;\n margin: 0;\n }\n\n .freddy-plugins-edit-excerpt-modal-subtitle {\n font-weight: 400;\n color: #94979c;\n font-size: 14px;\n line-height: 20px;\n margin: 0;\n }\n\n .freddy-plugins-edit-excerpt-modal-close-btn {\n position: absolute;\n right: 16px;\n top: 16px;\n padding: 8px;\n border-radius: 8px;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 10px;\n transition: background-color 0.2s ease;\n }\n\n .freddy-plugins-edit-excerpt-modal-close-icon {\n width: 16px;\n stroke-width: 1px;\n height: 16px;\n color: #94979c;\n }\n\n .freddy-plugins-edit-excerpt-modal-header-spacing {\n height: 20px;\n width: 100%;\n }\n\n /* Textarea section */\n .freddy-plugins-edit-excerpt-modal-textarea-section {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n padding: 0 24px;\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n\n .freddy-plugins-edit-excerpt-modal-textarea {\n font-weight: 400;\n width: 100%;\n height: 100%;\n font-size: 16px;\n color: white;\n background-color: #031525;\n border: 1px solid #35414b;\n border-radius: 8px;\n outline: none;\n resize: none;\n font-family: inherit;\n padding: 12px 14px;\n box-sizing: border-box;\n }\n\n .freddy-plugins-edit-excerpt-modal-textarea::placeholder {\n color: #717680;\n }\n\n /* Footer section */\n .freddy-plugins-edit-excerpt-modal-footer {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 32px 0 0 0;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-footer-content {\n box-sizing: border-box;\n display: flex;\n gap: 12px;\n align-items: center;\n padding: 0 24px 24px 24px;\n position: relative;\n width: 100%;\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-btn {\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n padding: 0 8px;\n position: relative;\n border-radius: 8px;\n background: none;\n border: none;\n transition: background-color 0.2s ease;\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-icon {\n width: 20px;\n height: 20px;\n color: var(--freddy-fg-action);\n }\n\n .freddy-plugins-edit-excerpt-modal-ai-text {\n font-weight: 500;\n color: #9597a7;\n font-size: 16px;\n line-height: 24px;\n }\n\n .freddy-plugins-edit-excerpt-modal-action-buttons {\n flex-basis: 0;\n cursor: pointer;\n display: flex;\n gap: 12px;\n flex-grow: 1;\n align-items: center;\n justify-content: flex-end;\n min-height: 0;\n min-width: 0;\n position: relative;\n }\n\n .freddy-plugins-edit-excerpt-modal-cancel-btn {\n height: 40px;\n min-width: 40px;\n position: relative;\n border-radius: 8px;\n border: 1px solid #7ba8ef;\n flex-shrink: 0;\n background: none;\n cursor: pointer;\n transition: background-color 0.2s ease;\n padding: 8px;\n font-weight: 500;\n color: #7ba8ef;\n font-size: 16px;\n line-height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-edit-excerpt-modal-cancel-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .freddy-plugins-edit-excerpt-modal-save-btn {\n background-color: #7ba8ef;\n height: 40px;\n min-width: 40px;\n position: relative;\n border-radius: 8px;\n border: 2px solid rgba(255, 255, 255, 0.12);\n flex-shrink: 0;\n cursor: pointer;\n transition: background-color 0.2s ease;\n padding: 8px;\n font-weight: 500;\n color: #031525;\n font-size: 16px;\n line-height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .freddy-plugins-edit-excerpt-modal-save-btn:hover {\n background-color: #6b9ae8;\n }\n\n /* AI Chat Container */\n .freddy-plugins-edit-excerpt-modal-ai-container {\n display: flex;\n width: 400px;\n height: 100%;\n background-color: #071a2b;\n border: 0;\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 16px;\n border-bottom-right-radius: 16px;\n padding: 16px;\n overflow: hidden;\n box-sizing: border-box;\n }\n\n .freddy-plugins-edit-excerpt-hide-section-icon {\n stroke-width: 2px;\n width: 16px;\n height: 16px;\n color: #94979c;\n }\n\n /* Modal transition animations */\n .modal-enter-active,\n .modal-leave-active {\n transition: all 0.3s ease;\n }\n\n .modal-enter-from,\n .modal-leave-to {\n opacity: 0;\n transform: scale(0.9);\n }\n\n .modal-enter-to,\n .modal-leave-from {\n opacity: 1;\n transform: scale(1);\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-textarea-input-field-wrapper\">\n <!-- Input with label -->\n <div class=\"freddy-plugins-textarea-input-container\">\n <!-- Header with label and AI button -->\n <div class=\"freddy-plugins-textarea-header\">\n <div class=\"freddy-plugins-textarea-label-wrapper\">\n <!-- Label with tooltip -->\n <div class=\"freddy-plugins-textarea-label-container\">\n <label\n class=\"freddy-plugins-textarea-label\"\n :class=\"{\n 'freddy-plugins-textarea-label--underlined': showUnderlines,\n }\"\n >\n {{ dynamicTitle || label }}\n </label>\n <span v-if=\"required\" class=\"freddy-plugins-textarea-required\"\n >*</span\n >\n <slot v-if=\"$slots.tooltip\" name=\"tooltip\" />\n <TooltipV2\n v-else-if=\"tooltipTitle || tooltipDescription\"\n :title=\"tooltipTitle\"\n :description=\"tooltipDescription\"\n placement=\"top\"\n >\n <button\n type=\"button\"\n class=\"freddy-plugins-textarea-tooltip-button\"\n aria-label=\"Help\"\n tabindex=\"0\"\n @click=\"handleTooltipClick\"\n @keydown=\"handleTooltipKeydown\"\n >\n <IconQuestion class=\"freddy-plugins-textarea-tooltip-icon\" />\n </button>\n </TooltipV2>\n </div>\n </div>\n\n <!-- Ask AI Button -->\n <button\n v-if=\"showAiButton\"\n type=\"button\"\n class=\"freddy-plugins-textarea-ai-button\"\n @click=\"handleAskAI\"\n @keydown=\"handleAiKeydown\"\n aria-label=\"Ask AI for help\"\n tabindex=\"0\"\n >\n <IconSparkle class=\"freddy-plugins-textarea-ai-icon\" />\n </button>\n </div>\n\n <!-- Textarea Input -->\n <div class=\"freddy-plugins-textarea-input-wrapper\">\n <textarea\n v-if=\"!diffMode\"\n ref=\"textareaRef\"\n v-model=\"localValue\"\n class=\"freddy-plugins-textarea-input\"\n :class=\"{\n 'freddy-plugins-textarea-input--error': hasError,\n 'freddy-plugins-textarea-input--disabled': disabled,\n 'freddy-plugins-textarea-input--focused': isFocused,\n 'freddy-plugins-textarea-input--with-tags':\n showTags && tags.length > 0,\n 'freddy-plugins-textarea-input--tags-only': tagsOnly,\n }\"\n :placeholder=\"computedPlaceholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly || tagsOnly\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydown\"\n @click=\"handleTextareaClick\"\n />\n\n <!-- Diff Mode Display -->\n <div v-if=\"diffMode\" class=\"freddy-plugins-textarea-diff-container\">\n <div class=\"freddy-plugins-textarea-diff-content\">\n <div\n class=\"freddy-plugins-textarea-diff-block freddy-plugins-textarea-diff-block--old\"\n >\n {{ oldText }}\n </div>\n <div\n class=\"freddy-plugins-textarea-diff-block freddy-plugins-textarea-diff-block--new\"\n >\n {{ newText }}\n </div>\n </div>\n </div>\n\n <!-- Tags Container -->\n <div\n v-if=\"showTags && tags.length > 0\"\n class=\"freddy-plugins-textarea-tags-container\"\n >\n <div class=\"freddy-plugins-textarea-tags\">\n <div\n v-for=\"(tag, index) in tags\"\n :key=\"`${tag}-${index}`\"\n class=\"freddy-plugins-textarea-tag\"\n >\n <div class=\"freddy-plugins-textarea-tag-content\">\n <span\n class=\"freddy-plugins-textarea-tag-text\"\n :class=\"{\n 'freddy-plugins-textarea-tag-text--underlined':\n showUnderlines,\n }\"\n >{{ tag }}</span\n >\n </div>\n <button\n type=\"button\"\n class=\"freddy-plugins-textarea-tag-close\"\n @click=\"handleRemoveTag(index)\"\n @keydown=\"handleTagCloseKeydown($event, index)\"\n :aria-label=\"`Remove ${tag} tag`\"\n tabindex=\"0\"\n >\n <IconCross class=\"freddy-plugins-textarea-tag-close-icon\" />\n </button>\n </div>\n </div>\n <span\n v-if=\"showAddTagsPlaceholder\"\n class=\"freddy-plugins-textarea-add-tags\"\n :class=\"{\n 'freddy-plugins-textarea-add-tags--underlined': showUnderlines,\n }\"\n >\n {{ addTagsPlaceholder }}\n </span>\n </div>\n\n <!-- Expand Button -->\n <button\n type=\"button\"\n class=\"freddy-plugins-textarea-expand-button\"\n @click=\"handleExpand\"\n @keydown=\"handleExpandKeydown\"\n aria-label=\"Expand textarea\"\n tabindex=\"0\"\n >\n <IconExpand class=\"freddy-plugins-textarea-expand-icon\" />\n </button>\n </div>\n </div>\n\n <!-- Hint text (only show if no error and showHint is true) -->\n <p\n v-if=\"showHint && hintText && !hasError\"\n class=\"freddy-plugins-textarea-hint-text\"\n :class=\"{\n 'freddy-plugins-textarea-hint-text--underlined': showUnderlines,\n }\"\n >\n {{ hintText }}\n </p>\n\n <!-- Error message (only show if there's an error) -->\n <p\n v-if=\"hasError && errorMessage\"\n class=\"freddy-plugins-textarea-error-text\"\n :class=\"{\n 'freddy-plugins-textarea-error-text--underlined': showUnderlines,\n }\"\n >\n {{ errorMessage }}\n </p>\n\n <!-- EditFeaturedExcerptModal for AI mode -->\n <EditFeaturedExcerptModal\n v-if=\"modalMode === 'ai'\"\n ref=\"aiModalRef\"\n :is-visible=\"showModal && modalMode === 'ai'\"\n :title=\"modalTitle\"\n :description=\"modalDescription\"\n :initial-content=\"localValue\"\n :openai-api-key=\"openaiApiKey\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"openaiOrganization\"\n :auto-show-a-i=\"true\"\n @close=\"handleModalClose\"\n @save=\"handleModalSave\"\n @cancel=\"handleModalCancel\"\n @ask-a-i=\"handleModalAskAI\"\n @toggle-a-i=\"handleToggleAI\"\n />\n\n <!-- EditFeaturedExcerptModal for expand mode (without AI) -->\n <EditFeaturedExcerptModal\n v-if=\"modalMode === 'expand'\"\n :is-visible=\"showModal && modalMode === 'expand'\"\n :title=\"modalTitle\"\n :description=\"modalDescription\"\n :initial-content=\"localValue\"\n :openai-api-key=\"''\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"''\"\n @close=\"handleModalClose\"\n @save=\"handleModalSave\"\n @cancel=\"handleModalCancel\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch } from 'vue';\n import { IconQuestion, IconSparkle, IconCross } from '@/icons';\n import { IconExpand } from '@/icons';\n import TooltipV2 from './TooltipV2.vue';\n import EditFeaturedExcerptModal from './EditFeaturedExcerptModal.vue';\n\n interface Props {\n modelValue?: string;\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n tooltipTitle?: string;\n tooltipDescription?: string;\n showAiButton?: boolean;\n showTags?: boolean;\n tags?: string[];\n showAddTagsPlaceholder?: boolean;\n addTagsPlaceholder?: string;\n hintText?: string;\n hasError?: boolean;\n errorMessage?: string;\n modalTitle?: string;\n modalDescription?: string;\n openaiApiKey?: string;\n openaiModel?: string;\n openaiOrganization?: string;\n // New scenario props\n showUnderlines?: boolean;\n dynamicTitle?: string;\n showHint?: boolean;\n diffMode?: boolean;\n oldText?: string;\n newText?: string;\n tagsOnly?: boolean;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n modelValue: '',\n label: 'Description',\n placeholder: 'The text thats needed',\n disabled: false,\n readonly: false,\n required: false,\n tooltipTitle: '',\n tooltipDescription: '',\n showAiButton: true,\n showTags: false,\n tags: () => [],\n showAddTagsPlaceholder: false,\n addTagsPlaceholder: 'Add tags...',\n hintText: 'This is a hint text to help user.',\n hasError: false,\n errorMessage: '',\n modalTitle: 'Edit Description',\n modalDescription: 'Provide detailed description for your content.',\n openaiApiKey: '',\n openaiModel: 'gpt-4o-mini',\n openaiOrganization: '',\n // New scenario defaults\n showUnderlines: false,\n dynamicTitle: '',\n showHint: true,\n diffMode: false,\n oldText: '',\n newText: '',\n tagsOnly: false,\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: string];\n input: [value: string];\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n 'ask-ai': [content: string];\n expand: [content: string];\n 'remove-tag': [index: number];\n 'tooltip-click': [];\n 'add-tag': [tag: string];\n 'tags-click': [];\n }>();\n\n const textareaRef = ref<HTMLTextAreaElement | null>(null);\n const aiModalRef = ref<InstanceType<typeof EditFeaturedExcerptModal> | null>(\n null\n );\n const localValue = ref(props.modelValue);\n const originalValue = ref('');\n const showModal = ref(false);\n const modalMode = ref<'ai' | 'expand'>('expand');\n const isFocused = ref(false);\n\n // Computed properties\n const computedPlaceholder = computed(() => {\n // If tags exist, don't show placeholder in textarea\n if (props.showTags && props.tags.length > 0) {\n return '';\n }\n return props.placeholder;\n });\n\n // Watch for external changes to modelValue\n watch(\n () => props.modelValue,\n newValue => {\n localValue.value = newValue;\n }\n );\n\n const handleInput = () => {\n emit('update:modelValue', localValue.value);\n emit('input', localValue.value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n isFocused.value = true;\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n isFocused.value = false;\n emit('blur', event);\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n // Handle any specific keydown logic if needed\n };\n\n const handleTextareaClick = () => {\n if (props.tagsOnly) {\n emit('tags-click');\n }\n };\n\n const handleTooltipClick = () => {\n emit('tooltip-click');\n };\n\n const handleTooltipKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleTooltipClick();\n }\n };\n\n const handleAskAI = () => {\n originalValue.value = localValue.value;\n modalMode.value = 'ai';\n showModal.value = true;\n emit('ask-ai', localValue.value);\n };\n\n const handleAiKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleAskAI();\n }\n };\n\n const handleExpand = () => {\n originalValue.value = localValue.value;\n modalMode.value = 'expand';\n showModal.value = true;\n emit('expand', localValue.value);\n };\n\n const handleExpandKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleExpand();\n }\n };\n\n const handleRemoveTag = (index: number) => {\n emit('remove-tag', index);\n };\n\n const handleTagCloseKeydown = (event: KeyboardEvent, index: number) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleRemoveTag(index);\n }\n };\n\n const handleModalClose = () => {\n localValue.value = originalValue.value;\n emit('update:modelValue', originalValue.value);\n emit('input', originalValue.value);\n showModal.value = false;\n };\n\n const handleModalSave = (content: string) => {\n localValue.value = content;\n emit('update:modelValue', content);\n emit('input', content);\n showModal.value = false;\n };\n\n const handleModalCancel = () => {\n localValue.value = originalValue.value;\n emit('update:modelValue', originalValue.value);\n emit('input', originalValue.value);\n showModal.value = false;\n };\n\n const handleModalAskAI = () => {\n emit('ask-ai', localValue.value);\n };\n\n const handleToggleAI = (showAI: boolean) => {\n console.log('AI toggled:', showAI);\n };\n\n // Focus method for external use\n const focus = () => {\n textareaRef.value?.focus();\n };\n\n // Expose methods\n defineExpose({\n focus,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-textarea-input-field-wrapper {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n }\n\n .freddy-plugins-textarea-input-container {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n flex-grow: 1;\n min-height: 1px;\n min-width: 1px;\n flex-shrink: 0;\n z-index: 2;\n }\n\n .freddy-plugins-textarea-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-label-wrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n align-items: flex-start;\n width: 105px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-label-container {\n display: flex;\n gap: 2px;\n align-items: center;\n width: 100%;\n }\n\n .freddy-plugins-textarea-label {\n font-family: 'Inter', sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n color: #cbd6e3;\n white-space: nowrap;\n margin: 0;\n }\n\n .freddy-plugins-textarea-label--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-required {\n font-family: 'Inter', sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n color: #94979c;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tooltip-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n border-radius: 2px;\n transition: background-color 0.2s ease;\n flex-shrink: 0;\n position: relative;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-tooltip-button:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-tooltip-icon {\n width: 14px;\n height: 14px;\n color: #94979c;\n }\n\n .freddy-plugins-textarea-ai-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: all 0.2s ease;\n }\n\n .freddy-plugins-textarea-ai-button::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18),\n 0px -2px 0px 0px inset rgba(10, 13, 18, 0.05);\n pointer-events: none;\n }\n\n .freddy-plugins-textarea-ai-button:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-ai-icon {\n width: 16px;\n height: 16px;\n color: #94979c;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-input-wrapper {\n position: relative;\n width: 100%;\n flex-grow: 1;\n min-height: 1px;\n min-width: 1px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-input {\n width: 100%;\n min-height: 180px;\n padding: 12px;\n padding-right: 40px; /* Space for expand button */\n background-color: #031525;\n border: 2px solid #d1d3d5;\n border-radius: 8px;\n color: #ffffff;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n resize: none;\n outline: none;\n transition: border-color 0.2s ease;\n box-sizing: border-box;\n position: relative;\n }\n\n .freddy-plugins-textarea-input::placeholder {\n color: rgba(133, 136, 142, 0.7);\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n }\n\n .freddy-plugins-textarea-input--focused {\n border-color: #cbd6e3;\n }\n\n .freddy-plugins-textarea-input--error {\n border-color: #ff6b6b;\n }\n\n .freddy-plugins-textarea-input--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .freddy-plugins-textarea-input--with-tags {\n padding-top: 50px; /* Extra padding when tags are present */\n }\n\n .freddy-plugins-textarea-input--tags-only {\n cursor: pointer;\n background-color: #031525;\n }\n\n .freddy-plugins-textarea-input--tags-only:hover {\n border-color: #cbd6e3;\n }\n\n .freddy-plugins-textarea-tags-container {\n position: absolute;\n top: 12px;\n left: 12px;\n right: 40px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: flex-start;\n width: calc(100% - 52px);\n }\n\n .freddy-plugins-textarea-tags {\n display: flex;\n gap: 6px;\n align-items: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag {\n display: flex;\n gap: 3px;\n align-items: center;\n justify-content: center;\n padding: 2px 4px 2px 9px;\n background-color: #031525;\n border: 1px solid #35414b;\n border-radius: 6px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag-content {\n display: flex;\n gap: 5px;\n align-items: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag-text {\n font-family: 'Inter', sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n color: #cbd6e3;\n text-align: center;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-tag-text--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-tag-close {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n box-sizing: border-box;\n padding: 2px;\n border-radius: 3px;\n background: none;\n border: none;\n cursor: pointer;\n transition: background-color 0.2s ease;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-tag-close:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-tag-close-icon {\n width: 12px;\n height: 12px;\n color: #94979c;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-add-tags {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n color: rgba(133, 136, 142, 0.7);\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .freddy-plugins-textarea-add-tags--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-expand-button {\n position: absolute;\n bottom: 12px;\n right: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 2px;\n width: 20px;\n height: 20px;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n overflow: hidden;\n box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);\n }\n\n .freddy-plugins-textarea-expand-button::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: 0px 0px 0px 1px inset rgba(10, 13, 18, 0.18),\n 0px -2px 0px 0px inset rgba(10, 13, 18, 0.05);\n pointer-events: none;\n }\n\n .freddy-plugins-textarea-expand-button:hover {\n background-color: rgba(148, 151, 156, 0.1);\n }\n\n .freddy-plugins-textarea-expand-icon {\n width: 16px;\n height: 16px;\n color: #94979c;\n stroke-width: 2px;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .freddy-plugins-textarea-hint-text {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #717680;\n width: 100%;\n z-index: 1;\n flex-shrink: 0;\n margin: 0;\n }\n\n .freddy-plugins-textarea-error-text {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #ff6b6b;\n width: 100%;\n z-index: 1;\n flex-shrink: 0;\n margin: 0;\n }\n\n .freddy-plugins-textarea-hint-text--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n .freddy-plugins-textarea-error-text--underlined {\n text-decoration: underline;\n text-underline-position: from-font;\n text-decoration-line: underline;\n text-decoration-style: solid;\n }\n\n /* Diff Mode Styles */\n .freddy-plugins-textarea-diff-container {\n width: auto;\n min-height: 180px;\n background-color: #031525;\n border: 2px solid #d1d3d5;\n border-radius: 8px;\n padding: 12px;\n position: relative;\n }\n\n .freddy-plugins-textarea-diff-content {\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 100%;\n height: 100%;\n }\n\n .freddy-plugins-textarea-diff-block {\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n padding: 8px 12px;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n .freddy-plugins-textarea-diff-block--old {\n background-color: #d92d2033; /* Red background */\n color: #ffffff;\n }\n\n .freddy-plugins-textarea-diff-block--new {\n background-color: #07945533; /* Green background */\n color: #ffffff;\n }\n\n /* Responsive adjustments */\n @media (max-width: 768px) {\n .freddy-plugins-textarea-header {\n flex-direction: column;\n gap: 8px;\n align-items: flex-start;\n }\n\n .freddy-plugins-textarea-label-wrapper {\n width: 100%;\n }\n\n .freddy-plugins-textarea-ai-button {\n align-self: flex-end;\n }\n\n .freddy-plugins-textarea-input {\n min-height: 120px;\n }\n\n .freddy-plugins-textarea-tags-container {\n position: static;\n margin-bottom: 8px;\n }\n }\n</style>\n","<template>\n <TextAreaInputField\n v-model=\"localValue\"\n :label=\"label\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :required=\"required\"\n :tooltip-title=\"tooltipTitle\"\n :tooltip-description=\"tooltipDescription\"\n :show-ai-button=\"showAiButton\"\n :show-tags=\"showTags\"\n :tags=\"currentTags\"\n :show-add-tags-placeholder=\"showAddTagsPlaceholder\"\n :add-tags-placeholder=\"addTagsPlaceholder\"\n :hint-text=\"hintText\"\n :has-error=\"hasError\"\n :error-message=\"errorMessage\"\n :modal-title=\"modalTitle\"\n :modal-description=\"modalDescription\"\n :openai-api-key=\"openaiApiKey\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"openaiOrganization\"\n :show-underlines=\"showUnderlines\"\n :dynamic-title=\"dynamicTitle\"\n :show-hint=\"showHint\"\n :diff-mode=\"diffMode\"\n :old-text=\"oldText\"\n :new-text=\"newText\"\n :tags-only=\"tagsOnly\"\n @update:model-value=\"handleUpdateValue\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @ask-ai=\"handleAskAI\"\n @expand=\"handleExpand\"\n @remove-tag=\"handleRemoveTag\"\n @tooltip-click=\"handleTooltipClick\"\n @add-tag=\"handleAddTag\"\n @tags-click=\"handleTagsClick\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch } from 'vue';\n import TextAreaInputField from './TextAreaInputField.vue';\n import type {\n DescriptionsProps,\n DescriptionStage,\n DescriptionType,\n } from '@/interfaces/ui/descriptions.interfaces';\n\n const props = withDefaults(defineProps<DescriptionsProps>(), {\n modelValue: '',\n label: 'Description',\n placeholder: 'The text thats needed',\n disabled: false,\n readonly: false,\n required: true,\n tooltipTitle: '',\n tooltipDescription: '',\n showAiButton: true,\n stage: 'placeholder',\n type: 'default',\n destructive: false,\n tags: () => [],\n hintText: 'This is a hint text to help user.',\n errorMessage: 'This is an error message.',\n modalTitle: 'Edit Description',\n modalDescription: 'Provide detailed description for your content.',\n openaiApiKey: '',\n openaiModel: 'gpt-4o-mini',\n openaiOrganization: '',\n showUnderlines: false,\n dynamicTitle: '',\n showHint: true,\n diffMode: false,\n oldText: '',\n newText: '',\n tagsOnly: false,\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: string];\n input: [value: string];\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n 'ask-ai': [content: string];\n expand: [content: string];\n 'remove-tag': [index: number];\n 'tooltip-click': [];\n 'add-tag': [tag: string];\n 'tags-click': [];\n }>();\n\n const localValue = ref(props.modelValue);\n const currentTags = ref([...props.tags]);\n\n // Watch for external changes to modelValue\n watch(\n () => props.modelValue,\n newValue => {\n localValue.value = newValue;\n }\n );\n\n // Watch for external changes to tags\n watch(\n () => props.tags,\n newTags => {\n currentTags.value = [...newTags];\n },\n { deep: true }\n );\n\n // Computed properties based on stage and type\n const showTags = computed(() => props.type === 'tags');\n\n const showAddTagsPlaceholder = computed(() => {\n return (\n props.type === 'tags' &&\n (props.stage === 'placeholder' || props.stage === 'focused')\n );\n });\n\n const addTagsPlaceholder = computed(() => {\n return props.stage === 'focused' ? 'Add tags...' : 'Add tags...';\n });\n\n const hasError = computed(() => {\n return props.stage === 'error' || props.destructive;\n });\n\n const actualHintText = computed(() => {\n if (hasError.value && props.destructive) {\n return props.errorMessage;\n }\n return props.hintText;\n });\n\n const actualPlaceholder = computed(() => {\n if (props.stage === 'placeholder') {\n return props.placeholder;\n }\n if (props.stage === 'focused' && props.type === 'tags') {\n return '';\n }\n if (props.stage === 'default' || props.stage === 'focused') {\n return '';\n }\n return props.placeholder;\n });\n\n // Event handlers\n const handleUpdateValue = (value: string) => {\n localValue.value = value;\n emit('update:modelValue', value);\n };\n\n const handleInput = (value: string) => {\n emit('input', value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleAskAI = (content: string) => {\n emit('ask-ai', content);\n };\n\n const handleExpand = (content: string) => {\n emit('expand', content);\n };\n\n const handleRemoveTag = (index: number) => {\n currentTags.value.splice(index, 1);\n emit('remove-tag', index);\n };\n\n const handleTooltipClick = () => {\n emit('tooltip-click');\n };\n\n const handleAddTag = (tag: string) => {\n emit('add-tag', tag);\n };\n\n const handleTagsClick = () => {\n emit('tags-click');\n };\n\n // Expose methods for external use\n const focus = () => {\n // Focus will be handled by the TextAreaInputField component\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<style scoped>\n /* All styles are handled by TextAreaInputField component */\n</style>\n","<template>\n <div class=\"freddy-plugins-diff-container\">\n <div\n v-if=\"showDiff && diffContent\"\n class=\"freddy-plugins-diff-preview\"\n v-html=\"diffContent\"\n ></div>\n <textarea\n v-else\n ref=\"textareaRef\"\n v-model=\"localContent\"\n class=\"freddy-plugins-diff-textarea\"\n :placeholder=\"placeholder\"\n @input=\"handleInput\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch } from 'vue';\n\n interface DiffProps {\n modelValue: string;\n placeholder?: string;\n originalText?: string;\n improvedText?: string;\n showDiff?: boolean;\n }\n\n const props = withDefaults(defineProps<DiffProps>(), {\n placeholder: 'Enter your text...',\n showDiff: false,\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: string];\n }>();\n\n const textareaRef = ref<HTMLTextAreaElement | null>(null);\n const localContent = ref(props.modelValue);\n\n // Watch for external changes to modelValue\n watch(\n () => props.modelValue,\n newValue => {\n localContent.value = newValue;\n }\n );\n\n const handleInput = () => {\n emit('update:modelValue', localContent.value);\n };\n\n // Generate diff HTML with red/green highlighting\n const diffContent = computed(() => {\n if (!props.originalText || !props.improvedText) return '';\n\n // Simple diff algorithm - split by words for better granularity\n const originalWords = props.originalText.split(/(\\s+)/);\n const improvedWords = props.improvedText.split(/(\\s+)/);\n\n // For simplicity, we'll show the full diff with additions and removals\n let diffHtml = '';\n\n // Show removed text in red\n const removedText = originalWords\n .filter(word => !improvedWords.includes(word) && word.trim())\n .join(' ');\n\n if (removedText) {\n diffHtml += `<span class=\"freddy-plugins-diff-removed\">${removedText}</span>`;\n }\n\n // Show added text in green\n const addedText = improvedWords\n .filter(word => !originalWords.includes(word) && word.trim())\n .join(' ');\n\n if (addedText) {\n if (diffHtml) diffHtml += '<br>';\n diffHtml += `<span class=\"freddy-plugins-diff-added\">${addedText}</span>`;\n }\n\n // If no significant changes, show the improved text\n if (!diffHtml) {\n diffHtml = `<span class=\"freddy-plugins-diff-improved\">${props.improvedText}</span>`;\n }\n\n return diffHtml;\n });\n\n // Expose methods for parent component\n defineExpose({\n focus: () => textareaRef.value?.focus(),\n blur: () => textareaRef.value?.blur(),\n });\n</script>\n\n<style scoped>\n .freddy-plugins-diff-container {\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n .freddy-plugins-diff-textarea {\n width: 100%;\n min-height: 200px;\n padding: 16px;\n border: 1px solid var(--freddy-border-secondary, #35414b);\n border-radius: 8px;\n background-color: var(--freddy-text-action-button, #031525);\n color: var(--freddy-text-primary, #ffffff);\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n line-height: 24px;\n resize: none;\n outline: none;\n transition: border-color 0.2s ease;\n }\n\n .freddy-plugins-diff-textarea:focus {\n border-color: var(--freddy-border-primary, #cbd6e3);\n }\n\n .freddy-plugins-diff-textarea::placeholder {\n color: var(--freddy-text-secondary, #94979c);\n }\n\n .freddy-plugins-diff-preview {\n width: 100%;\n height: 100%;\n min-height: 200px;\n padding: 16px;\n border: 1px solid var(--freddy-border-secondary, #35414b);\n border-radius: 8px;\n background-color: var(--freddy-bg-secondary, #071a2b);\n color: var(--freddy-text-primary, #ffffff);\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n line-height: 24px;\n overflow-y: auto;\n white-space: pre-wrap;\n }\n\n :deep(.freddy-plugins-diff-removed) {\n background-color: #d92d20;\n color: #ffffff;\n padding: 2px 4px;\n border-radius: 4px;\n margin: 0 2px;\n }\n\n :deep(.freddy-plugins-diff-added) {\n background-color: #067647;\n color: #ffffff;\n padding: 2px 4px;\n border-radius: 4px;\n margin: 0 2px;\n }\n\n :deep(.freddy-plugins-diff-improved) {\n background-color: #68c57c;\n color: #031525;\n padding: 2px 4px;\n border-radius: 4px;\n }\n</style>\n","\n<template>\n <button\n class=\"freddy-plugins-switch\"\n :class=\"{ \n 'freddy-plugins-switch--on': modelValue, \n 'freddy-plugins-switch--disabled': disabled,\n [`freddy-plugins-switch--${size}`]: true\n }\"\n :aria-checked=\"modelValue\"\n role=\"switch\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"toggle\"\n @keydown.space.prevent=\"toggle\"\n @keydown.enter.prevent=\"toggle\"\n :disabled=\"disabled\"\n >\n <span class=\"freddy-plugins-switch__track\"></span>\n <span class=\"freddy-plugins-switch__thumb\"></span>\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\nconst props = defineProps<{\n modelValue: boolean;\n disabled?: boolean;\n size?: 's' | 'sm' | 'md' | 'lg' | 'xl';\n}>();\nconst emit = defineEmits(['update:modelValue']);\nfunction toggle(event: Event) {\n event.stopPropagation();\n if (!props.disabled) {\n emit('update:modelValue', !props.modelValue);\n }\n}\n</script>\n\n<style>\n.freddy-plugins-switch {\n position: relative;\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n outline: none;\n display: inline-flex;\n align-items: center;\n transition: opacity 0.2s;\n}\n\n/* Size variants */\n.freddy-plugins-switch--s {\n width: 28px;\n height: 16px;\n}\n\n.freddy-plugins-switch--sm {\n width: 32px;\n height: 18px;\n}\n\n.freddy-plugins-switch--md {\n width: 40px;\n height: 22px;\n}\n\n.freddy-plugins-switch--lg {\n width: 48px;\n height: 26px;\n}\n\n.freddy-plugins-switch--xl {\n width: 56px;\n height: 30px;\n}\n.freddy-plugins-switch--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.freddy-plugins-switch__track {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--freddy-border-color);\n border-radius: 999px;\n transition: background 0.2s;\n}\n.freddy-plugins-switch--on .freddy-plugins-switch__track {\n background: var(--freddy-primary-color);\n}\n.freddy-plugins-switch__thumb {\n position: absolute;\n background: var(--text-50, var(--text-inverse));\n border-radius: 50%;\n box-shadow: 0 1px 3px var(--freddy-border-color);\n transition: left 0.2s;\n}\n\n/* Size-specific thumb positioning */\n.freddy-plugins-switch--s .freddy-plugins-switch__thumb {\n top: 1px;\n left: 1px;\n width: 14px;\n height: 14px;\n}\n.freddy-plugins-switch--s.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 13px;\n}\n\n.freddy-plugins-switch--sm .freddy-plugins-switch__thumb {\n top: 1px;\n left: 1px;\n width: 16px;\n height: 16px;\n}\n.freddy-plugins-switch--sm.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 15px;\n}\n\n.freddy-plugins-switch--md .freddy-plugins-switch__thumb {\n top: 2px;\n left: 2px;\n width: 18px;\n height: 18px;\n}\n.freddy-plugins-switch--md.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 20px;\n}\n\n.freddy-plugins-switch--lg .freddy-plugins-switch__thumb {\n top: 2px;\n left: 2px;\n width: 22px;\n height: 22px;\n}\n.freddy-plugins-switch--lg.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 24px;\n}\n\n.freddy-plugins-switch--xl .freddy-plugins-switch__thumb {\n top: 3px;\n left: 3px;\n width: 24px;\n height: 24px;\n}\n.freddy-plugins-switch--xl.freddy-plugins-switch--on .freddy-plugins-switch__thumb {\n left: 29px;\n}\n</style> ","<template>\n <div\n class=\"freddy-plugins-dropdown-wrapper\"\n @keydown.esc=\"closeDropdown\"\n tabindex=\"0\"\n >\n <BaseButton\n class=\"freddy-plugins-dropdown-trigger\"\n :label=\"displayLabel\"\n :iconOnly=\"iconOnly\"\n :rightIcon=\"chevronRight && showIcon ? iconToShow : undefined\"\n :leftIcon=\"!chevronRight && showIcon ? iconToShow : undefined\"\n :size=\"size\"\n hierarchy=\"tertiary\"\n @click=\"toggleDropdown\"\n :aria-expanded=\"open\"\n :aria-haspopup=\"true\"\n type=\"button\"\n >\n <template #default>\n <slot name=\"button\">\n {{ displayLabel }}\n </slot>\n </template>\n </BaseButton>\n <div\n v-if=\"open\"\n class=\"freddy-plugins-dropdown-menu\"\n :class=\"{\n 'freddy-plugins-dropdown-menu--up': openUp,\n 'freddy-plugins-dropdown-menu--down': !openUp,\n }\"\n >\n <div v-if=\"searchable\" class=\"freddy-plugins-dropdown-search-bar\">\n <input\n v-model=\"searchQuery\"\n type=\"text\"\n class=\"freddy-plugins-dropdown-search-input\"\n :placeholder=\"searchPlaceholder\"\n />\n </div>\n <ul class=\"freddy-plugins-dropdown-options\">\n <li\n v-for=\"option in filteredOptions\"\n :key=\"option.value\"\n class=\"freddy-plugins-dropdown-option\"\n :class=\"{\n 'freddy-plugins-dropdown-option--toggle': option.type === 'toggle',\n }\"\n @click=\"event => handleOptionClick(option, event)\"\n >\n <span class=\"freddy-plugins-dropdown-option-label\">\n <template v-if=\"!optionIconRight && option.icon\">\n <component\n :is=\"option.icon\"\n class=\"freddy-plugins-dropdown-option-icon\"\n />\n </template>\n <span>{{ option.label }}</span>\n <template v-if=\"showShortcut && option.shortcut\">\n <span class=\"freddy-plugins-dropdown-option-shortcut\">{{\n option.shortcut\n }}</span>\n </template>\n <template v-if=\"optionIconRight && option.icon\">\n <component\n :is=\"option.icon\"\n class=\"freddy-plugins-dropdown-option-icon freddy-plugins-dropdown-option-icon--right\"\n />\n </template>\n </span>\n <template v-if=\"option.type === 'toggle'\">\n <Switch\n :modelValue=\"option.checked ?? false\"\n :size=\"props.size\"\n @update:modelValue=\"\n val => {\n handleToggle(option, val);\n }\n \"\n @click.stop\n />\n </template>\n </li>\n <li\n v-if=\"filteredOptions.length === 0\"\n class=\"freddy-plugins-dropdown-no-options\"\n >\n <slot name=\"no-options\">No options</slot>\n </li>\n </ul>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, watch, type Component, shallowRef } from 'vue';\n import IconChevronDown from '@/icons/IconChevronDown.vue';\n import IconChevronUp from '@/icons/IconChevronUp.vue';\n import Switch from '@/components/Switch.vue';\n import BaseButton from './Buttons/BaseButton.vue';\n\n interface Option {\n label: string;\n value: string | number;\n icon?: Component;\n shortcut?: string;\n type?: 'option' | 'toggle';\n checked?: boolean;\n default?: boolean;\n refData?: any;\n }\n\n interface Props {\n label?: string;\n size?: 's' | 'sm' | 'md' | 'lg' | 'xl';\n iconOnly?: boolean;\n options?: Option[];\n searchable?: boolean;\n searchPlaceholder?: string;\n openUp?: boolean;\n chevronRight?: boolean;\n showIcon?: boolean;\n customIcon?: any;\n optionIconRight?: boolean;\n showShortcut?: boolean;\n background?: string;\n borderRadius?: string;\n activeBackground?: string;\n openBackground?: string;\n variant?: 'primary' | 'secondary' | 'blanc';\n stayOpen?: boolean;\n }\n\n export type { Option, Props };\n\n const props = withDefaults(defineProps<Props>(), {\n label: 'Select',\n size: 'sm',\n iconOnly: false,\n options: () => [],\n searchable: false,\n searchPlaceholder: 'Search...',\n openUp: false,\n chevronRight: true,\n showIcon: true,\n customIcon: null,\n optionIconRight: false,\n showShortcut: false,\n background: 'transparent',\n borderRadius: '8px',\n activeBackground: 'var(--freddy-bg-tertiary)',\n openBackground: 'var(--freddy-bg-tertiary)',\n variant: 'primary',\n stayOpen: false,\n });\n\n const emit = defineEmits<{\n (event: 'select', value: Option): void;\n (event: 'toggle', value: Option): void;\n }>();\n\n const open = ref(false);\n const searchQuery = ref('');\n // const isHovered = ref(false);\n\n // Internal selected state\n const selected = ref<Option | null>(null);\n\n // Local shallow copy of options for toggles to avoid deep reactivity\n const localOptions = shallowRef<Option[]>([...props.options]);\n\n watch(\n () => props.options,\n newOptions => {\n localOptions.value = [...newOptions];\n }\n );\n\n // Initialize selected option\n const initializeSelected = () => {\n if (selected.value) return;\n const def = localOptions.value.find((opt: Option) => opt.default);\n if (def) {\n selected.value = def;\n }\n };\n\n watch(\n localOptions,\n () => {\n initializeSelected();\n },\n { immediate: true }\n );\n\n const displayLabel = computed(() => {\n if (props.label !== 'Select') return props.label;\n if (selected.value) return selected.value.label;\n return 'Select';\n });\n\n // const computedBackground = computed(() => {\n // if (props.variant === \"primary\") return \"var(--border-light)\";\n // return props.background;\n // });\n\n // const computedActiveBackground = computed(() => {\n // if (props.variant === \"primary\") return \"#d0d0d0\";\n // return props.activeBackground;\n // });\n\n // const computedOpenBackground = computed(() => {\n // if (props.variant === \"primary\") return \"#d8d8d8\";\n // return props.openBackground;\n // });\n\n // const computedBorderRadius = computed(() => {\n // if (props.variant === \"primary\") return \"8px\";\n // return props.borderRadius;\n // });\n\n const iconToShow = computed(() => {\n if (!props.showIcon) return null;\n if (props.customIcon) return props.customIcon;\n return props.openUp ? IconChevronUp : IconChevronDown;\n });\n\n const toggleDropdown = () => {\n open.value = !open.value;\n if (!open.value) searchQuery.value = '';\n };\n\n const closeDropdown = () => {\n open.value = false;\n searchQuery.value = '';\n };\n\n const filteredOptions = computed(() => {\n if (!props.searchable || !searchQuery.value) return localOptions.value;\n return localOptions.value.filter((option: Option) =>\n option.label.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n });\n\n const handleOptionClick = (option: Option, event?: Event) => {\n if (event) {\n }\n if (option.type !== 'toggle') {\n selectOption(option);\n } else {\n }\n };\n\n const selectOption = (option: Option) => {\n selected.value = option;\n emit('select', option);\n if (!props.stayOpen) {\n closeDropdown();\n }\n };\n\n const handleToggle = (option: Option, val: boolean) => {\n const idx = localOptions.value.findIndex(\n (o: Option) => o.value === option.value\n );\n if (idx !== -1) localOptions.value[idx].checked = val;\n emit('toggle', { ...option, checked: val });\n };\n\n // Close dropdown on outside click\n const onClickOutside = (event: MouseEvent) => {\n const el = event.target as HTMLElement;\n if (!el.closest('.freddy-plugins-dropdown-wrapper')) {\n closeDropdown();\n }\n };\n\n watch(open, val => {\n if (val) {\n // Use a small delay to ensure the dropdown is rendered\n setTimeout(() => {\n document.addEventListener('click', onClickOutside);\n }, 0);\n } else {\n document.removeEventListener('click', onClickOutside);\n }\n });\n</script>\n\n<style>\n .freddy-plugins-dropdown-wrapper {\n position: relative;\n display: inline-block;\n }\n\n .freddy-plugins-dropdown-chevron {\n width: 16px;\n height: 16px;\n }\n\n .freddy-plugins-dropdown-menu {\n position: absolute;\n left: 0;\n min-width: 200px;\n width: fit-content;\n max-width: 360px;\n border: 2px solid var(--freddy-border-color);\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n z-index: 1000;\n padding: 4px 0;\n overflow: visible;\n background: var(--freddy-bg-secondary);\n pointer-events: auto;\n }\n\n .freddy-plugins-dropdown-menu--down {\n top: 100%;\n margin-top: 4px;\n }\n\n .freddy-plugins-dropdown-menu--up {\n bottom: 100%;\n margin-bottom: 4px;\n }\n\n .freddy-plugins-dropdown-search-bar {\n width: 100%;\n max-width: 100%;\n box-sizing: border-box;\n padding: 4px 8px;\n border-bottom: 1px solid var(--freddy-border-secondary);\n }\n\n .freddy-plugins-dropdown-search-input {\n width: 100%;\n max-width: 100%;\n box-sizing: border-box;\n padding: 4px 6px;\n border: 2px solid var(--freddy-border-color);\n border-radius: 4px;\n font-size: 13px;\n background: var(--freddy-bg-primary);\n color: var(--freddy-text-primary);\n }\n\n .freddy-plugins-dropdown-options {\n list-style: none;\n margin: 0;\n padding: 0;\n max-height: 280px;\n overflow-y: auto;\n }\n\n .freddy-plugins-dropdown-option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n padding: 6px 12px;\n cursor: pointer;\n font-size: 14px;\n border-radius: 4px;\n transition: all 0.2s ease;\n background: var(--freddy-bg-secondary) !important;\n pointer-events: auto;\n user-select: none;\n color: var(--freddy-text-primary);\n border: 2px solid transparent;\n }\n\n .freddy-plugins-dropdown-option-label {\n display: flex;\n align-items: center;\n gap: 6px;\n flex: 1 1 0;\n min-width: 0;\n white-space: normal;\n word-break: break-word;\n }\n\n .freddy-plugins-dropdown-option-icon {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n }\n\n .freddy-plugins-dropdown-option-icon--right {\n margin-left: auto;\n }\n\n .freddy-plugins-dropdown-option-shortcut {\n margin-left: auto;\n font-size: 12px;\n color: var(--freddy-text-tertiary);\n background: var(--freddy-bg-tertiary);\n border-radius: 4px;\n padding: 1px 6px;\n font-family: monospace;\n }\n\n .freddy-plugins-dropdown-option:hover {\n background: var(--freddy-bg-tertiary) !important;\n border-color: var(--freddy-border-secondary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-dropdown-no-options {\n padding: 8px 12px;\n color: var(--freddy-text-tertiary);\n font-size: 13px;\n }\n\n .freddy-plugins-dropdown-toggle-checkbox {\n width: 16px;\n height: 16px;\n border: 2px solid var(--freddy-border-color);\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n\n .freddy-plugins-dropdown-toggle-inner {\n width: 12px;\n height: 12px;\n background-color: var(--freddy-bg-primary);\n border-radius: 2px;\n }\n\n .freddy-plugins-checked {\n background-color: var(--freddy-primary-color);\n border-color: var(--freddy-primary-color);\n }\n\n .freddy-plugins-checked .freddy-plugins-dropdown-toggle-inner {\n display: none;\n }\n\n .freddy-plugins-dropdown-option > .freddy-plugins-switch {\n flex-shrink: 0;\n }\n</style>\n","<template>\n <div class=\"email-verification\" :class=\"`email-verification--${brand}`\">\n <div class=\"verification-container\">\n <div class=\"verification-header\">\n <h2 class=\"verification-title\">Verify Your Email</h2>\n <p class=\"verification-subtitle\">\n We've sent a 4-digit verification code to <strong>{{ email }}</strong>\n </p>\n </div>\n\n <form @submit.prevent=\"handleSubmit\" class=\"verification-form\">\n <div class=\"code-input-container\">\n <div class=\"code-inputs\">\n <input\n v-for=\"(_, index) in 4\"\n :key=\"index\"\n :ref=\"(el: any) => inputRefs[index] = el as HTMLInputElement | null\"\n v-model=\"codeDigits[index]\"\n type=\"text\"\n maxlength=\"1\"\n class=\"code-input\"\n :class=\"`code-input--${brand}`\"\n @input=\"handleDigitInput(index, $event)\"\n @keydown=\"handleKeydown(index, $event)\"\n @paste=\"handlePaste\"\n :disabled=\"loading\"\n autocomplete=\"one-time-code\"\n />\n </div>\n </div>\n\n <div class=\"verification-actions\">\n <BaseButton\n type=\"submit\"\n :label=\"loading ? 'Verifying...' : 'Verify Code'\"\n hierarchy=\"primary\"\n size=\"lg\"\n :loading=\"loading\"\n :disabled=\"!isCodeComplete || loading\"\n :class=\"`verify-button verify-button--${brand}`\"\n />\n </div>\n\n <div v-if=\"error\" class=\"error-message\">\n {{ error }}\n </div>\n\n <div class=\"verification-footer\">\n <p class=\"resend-text\">\n Didn't receive the code?\n <button\n type=\"button\"\n class=\"resend-button\"\n :disabled=\"resendCooldown > 0\"\n @click=\"handleResend\"\n >\n {{\n resendCooldown > 0\n ? `Resend in ${resendCooldown}s`\n : 'Resend code'\n }}\n </button>\n </p>\n </div>\n </form>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, computed, onMounted, nextTick } from 'vue';\n import BaseButton from './Buttons/BaseButton.vue';\n\n interface Props {\n email: string;\n brand?: 'contentplate' | 'flowplate' | 'freddy';\n loading?: boolean;\n error?: string;\n resendCooldown?: number;\n }\n\n const props = withDefaults(defineProps<Props>(), {\n brand: 'contentplate',\n loading: false,\n error: '',\n resendCooldown: 0,\n });\n\n // Use props to avoid unused variable warning\n const { brand, loading, error, resendCooldown } = props;\n\n const emit = defineEmits<{\n verify: [code: string];\n resend: [];\n }>();\n\n // Reactive state\n const codeDigits = ref(['', '', '', '']);\n const inputRefs = ref<(HTMLInputElement | null)[]>([]);\n\n // Computed\n const isCodeComplete = computed(() => {\n return codeDigits.value.every(digit => digit !== '');\n });\n\n const verificationCode = computed(() => {\n return codeDigits.value.join('');\n });\n\n // Methods\n const handleDigitInput = (index: number, event: Event) => {\n const target = event.target as HTMLInputElement;\n const value = target.value;\n\n // Only allow digits\n if (!/^\\d*$/.test(value)) {\n target.value = '';\n return;\n }\n\n codeDigits.value[index] = value;\n\n // Move to next input if digit entered\n if (value && index < 3) {\n nextTick(() => {\n inputRefs.value[index + 1]?.focus();\n });\n }\n };\n\n const handleKeydown = (index: number, event: KeyboardEvent) => {\n // Handle backspace\n if (event.key === 'Backspace' && !codeDigits.value[index] && index > 0) {\n nextTick(() => {\n inputRefs.value[index - 1]?.focus();\n });\n }\n };\n\n const handlePaste = (event: ClipboardEvent) => {\n event.preventDefault();\n const pastedData = event.clipboardData?.getData('text');\n if (!pastedData) return;\n\n const digits = pastedData.replace(/\\D/g, '').slice(0, 4).split('');\n codeDigits.value = [...digits, '', '', '', ''].slice(0, 4);\n\n // Focus the next empty input or the last one\n const nextEmptyIndex = codeDigits.value.findIndex(digit => digit === '');\n const focusIndex = nextEmptyIndex === -1 ? 3 : nextEmptyIndex;\n nextTick(() => {\n inputRefs.value[focusIndex]?.focus();\n });\n };\n\n const handleSubmit = () => {\n if (isCodeComplete.value) {\n emit('verify', verificationCode.value);\n }\n };\n\n const handleResend = () => {\n emit('resend');\n };\n\n // Focus first input on mount\n onMounted(() => {\n nextTick(() => {\n inputRefs.value[0]?.focus();\n });\n });\n</script>\n\n<style>\n .email-verification {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n padding: 2rem;\n }\n\n .verification-container {\n max-width: 400px;\n width: 100%;\n text-align: center;\n }\n\n .verification-header {\n margin-bottom: 2rem;\n }\n\n .verification-title {\n font-size: 1.5rem;\n font-weight: 600;\n margin-bottom: 0.5rem;\n }\n\n .verification-subtitle {\n color: var(--text-500, var(--freddy-text-secondary));\n font-size: 0.875rem;\n }\n\n .verification-form {\n display: flex;\n flex-direction: column;\n gap: 1.5rem;\n }\n\n .code-input-container {\n display: flex;\n justify-content: center;\n }\n\n .code-inputs {\n display: flex;\n gap: 0.75rem;\n }\n\n .code-input {\n width: 3rem;\n height: 3rem;\n text-align: center;\n font-size: 1.25rem;\n font-weight: 600;\n border: 2px solid var(--freddy-border-color);\n border-radius: 0.5rem;\n background: transparent;\n transition: all 0.2s ease;\n }\n\n .code-input:focus {\n outline: none;\n border-color: var(--color-primary-500, var(--freddy-primary-color));\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n\n .code-input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Disable browser autofill styling for code inputs */\n .code-input:-webkit-autofill,\n .code-input:-webkit-autofill:hover,\n .code-input:-webkit-autofill:focus,\n .code-input:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px transparent inset !important;\n -webkit-text-fill-color: inherit !important;\n transition: background-color 5000s ease-in-out 0s;\n background-color: transparent !important;\n background-image: none !important;\n }\n\n .code-input:-moz-autofill,\n .code-input:-moz-autofill:focus {\n background-color: transparent !important;\n color: inherit !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n .code-input:-ms-autofill,\n .code-input:-ms-autofill:focus {\n background-color: transparent !important;\n color: inherit !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n /* Brand-specific styles */\n .code-input--contentplate {\n border-color: var(--color-purple-500, var(--freddy-primary-color));\n }\n\n .code-input--contentplate:focus {\n border-color: var(--color-purple-600, var(--freddy-primary-color));\n box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);\n }\n\n .code-input--flowplate {\n border-color: var(--color-indigo-500, var(--freddy-primary-color));\n background: rgba(99, 102, 241, 0.05);\n }\n\n .code-input--flowplate:focus {\n border-color: var(--color-indigo-600, #4f46e5);\n box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);\n }\n\n .code-input--freddy {\n border-color: var(--freddy-primary-color);\n }\n\n .code-input--freddy:focus {\n border-color: var(--color-primary-600, #0099cc);\n box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);\n }\n\n .verification-actions {\n display: flex;\n justify-content: center;\n }\n\n .verify-button {\n min-width: 200px;\n }\n\n .error-message {\n color: var(--color-destructive-500, var(--freddy-error-color));\n font-size: 0.875rem;\n margin-top: 0.5rem;\n }\n\n .verification-footer {\n margin-top: 1rem;\n }\n\n .resend-text {\n font-size: 0.875rem;\n color: var(--text-500, var(--freddy-text-secondary));\n }\n\n .resend-button {\n background: none;\n border: none;\n color: var(--color-primary-500, var(--freddy-primary-color));\n cursor: pointer;\n font-size: 0.875rem;\n text-decoration: underline;\n }\n\n .resend-button:hover:not(:disabled) {\n color: var(--color-primary-600, var(--freddy-primary-color));\n }\n\n .resend-button:disabled {\n color: var(--border-300, #9ca3af);\n cursor: not-allowed;\n text-decoration: none;\n }\n\n /* Brand-specific button styles */\n .verify-button--contentplate {\n background: var(--color-purple-500, var(--freddy-primary-color)) !important;\n border-color: var(\n --color-purple-500,\n var(--freddy-primary-color)\n ) !important;\n }\n\n .verify-button--flowplate {\n background: var(--color-indigo-500, var(--freddy-primary-color)) !important;\n border-color: var(\n --color-indigo-500,\n var(--freddy-primary-color)\n ) !important;\n }\n\n .verify-button--freddy {\n background: var(--freddy-primary-color) !important;\n border-color: var(--freddy-primary-color) !important;\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-input-field-wrapper\">\n <!-- Label -->\n <label\n v-if=\"label\"\n :for=\"inputId\"\n class=\"freddy-plugins-input-field-label\"\n :class=\"`freddy-plugins-input-field-label--${colorStyle}`\"\n >\n {{ label }}\n <span v-if=\"required\" class=\"freddy-plugins-required-asterisk\">*</span>\n </label>\n\n <!-- Input Container -->\n <div\n class=\"freddy-plugins-input-field-container\"\n :class=\"containerClasses\"\n @click=\"focusInput\"\n >\n <slot />\n </div>\n\n <!-- Hint Text -->\n <p\n v-if=\"hintText\"\n class=\"freddy-plugins-input-hint-text\"\n :class=\"`freddy-plugins-input-hint-text--${colorStyle}`\"\n >\n {{ hintText }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { BaseInputProps } from '@/interfaces/input-field.interfaces';\n\n interface Props extends BaseInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n disabled: false,\n });\n\n const emit = defineEmits<{\n focus: [event: FocusEvent];\n blur: [event: FocusEvent];\n }>();\n\n // Generate unique input ID\n const inputId = computed(\n () => `input-${Math.random().toString(36).substr(2, 9)}`\n );\n\n // Container classes\n const containerClasses = computed(() => ({\n [`freddy-plugins-input-field-container--${props.size}`]: true,\n [`freddy-plugins-input-field-container--${props.colorStyle}`]: true,\n 'freddy-plugins-input-field-container--destructive':\n props.destructive || props.state === 'error',\n 'freddy-plugins-input-field-container--focused': props.state === 'focused',\n 'freddy-plugins-input-field-container--disabled': props.state === 'disabled',\n 'freddy-plugins-input-field-container--loading': props.state === 'loading',\n 'freddy-plugins-input-field-container--success': props.state === 'success',\n }));\n\n const focusInput = () => {\n if (props.state !== 'disabled') {\n emit('focus', new FocusEvent('focus'));\n }\n };\n\n defineExpose({\n inputId,\n containerClasses,\n focusInput,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-input-field-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n width: 100%;\n position: relative;\n }\n\n .freddy-plugins-input-field-label {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n }\n\n .freddy-plugins-input-field-label--freddy {\n color: var(--text-300, var(--text-muted));\n }\n\n .freddy-plugins-input-field-label--contentplate {\n color: var(--text-700, var(--freddy-text-primary));\n }\n\n .freddy-plugins-required-asterisk {\n color: var(--freddy-fg-error-primary);\n margin-left: 0.125rem;\n }\n\n .freddy-plugins-input-field-container {\n position: relative;\n display: flex;\n align-items: center;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n cursor: text;\n overflow: visible;\n }\n\n /* Freddy color style (dark theme) */\n .freddy-plugins-input-field-container--freddy {\n background-color: #1d2e47;\n border: 2px solid #475569;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n }\n\n .freddy-plugins-input-field-container--freddy:hover:not(.freddy-plugins-input-field-container--disabled) {\n border-color: var(--freddy-text-secondary);\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--freddy.freddy-plugins-input-field-container--focused {\n background-color: #1d2e47;\n border: 2px solid #7ba8ef;\n box-shadow: 0 0 0 3px rgba(123, 168, 239, 0.1),\n 0 4px 6px -1px rgba(0, 0, 0, 0.1);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--freddy.freddy-plugins-input-field-container--destructive {\n border-color: var(--freddy-fg-error-primary);\n }\n\n /* Contentplate color style (light theme) */\n .freddy-plugins-input-field-container--contentplate {\n background-color: var(--bg-50, var(--freddy-bg-primary));\n border: 2px solid var(--border-200, var(--freddy-border-color));\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n }\n\n .freddy-plugins-input-field-container--contentplate:hover:not(\n .freddy-plugins-input-field-container--disabled\n ) {\n border-color: var(--border-300, #9ca3af);\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--contentplate.freddy-plugins-input-field-container--focused {\n border: 2px solid var(--color-primary-500, var(--freddy-primary-color));\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1),\n 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n transform: translateY(-1px);\n }\n\n .freddy-plugins-input-field-container--contentplate.freddy-plugins-input-field-container--destructive {\n border-color: var(--freddy-fg-error-primary);\n }\n\n .freddy-plugins-input-field-container--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n transform: none !important;\n box-shadow: none !important;\n }\n\n /* Size variants */\n .freddy-plugins-input-field-container--sm {\n height: 40px;\n border-radius: 8px;\n font-size: 0.875rem;\n }\n\n .freddy-plugins-input-field-container--md {\n height: 44px;\n border-radius: 12px;\n font-size: 0.875rem;\n }\n\n .freddy-plugins-input-field-container--lg {\n height: 48px;\n border-radius: 16px;\n font-size: 1rem;\n }\n\n /* Success state */\n .freddy-plugins-input-field-container--success {\n border-color: #10b981 !important;\n }\n\n .freddy-plugins-input-field-container--success.freddy-plugins-input-field-container--focused {\n box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;\n }\n\n /* Loading state */\n .freddy-plugins-input-field-container--loading {\n position: relative;\n }\n\n .freddy-plugins-input-field-container--loading::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(\n 90deg,\n transparent,\n rgba(255, 255, 255, 0.1),\n transparent\n );\n animation: freddy-plugins-shimmer 1.5s infinite;\n }\n\n @keyframes freddy-plugins-shimmer {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n\n /* Hint text */\n .freddy-plugins-input-hint-text {\n font-size: 0.75rem;\n line-height: 1rem;\n margin: 0;\n }\n\n .freddy-plugins-input-hint-text--freddy {\n color: var(--text-muted);\n }\n\n .freddy-plugins-input-hint-text--contentplate {\n color: var(--freddy-text-secondary);\n }\n</style>\n","<template>\n <BaseInput v-bind=\"baseProps\" @focus=\"handleFocus\" @blur=\"handleBlur\">\n <!-- Card Type Icon -->\n <div\n v-if=\"showCardIcon && detectedCardType !== 'unknown'\"\n class=\"freddy-plugins-card-type-icon\"\n :class=\"`freddy-plugins-card-type-icon--${colorStyle}`\"\n >\n <img\n :src=\"getCardTypeIcon(detectedCardType)\"\n :alt=\"`${detectedCardType} card`\"\n class=\"freddy-plugins-card-icon-image\"\n />\n </div>\n\n <!-- Card Input -->\n <input\n :id=\"baseInputRef?.inputId\"\n ref=\"inputRef\"\n v-model=\"displayValue\"\n type=\"text\"\n inputmode=\"numeric\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :maxlength=\"cardNumberMaxLength\"\n class=\"freddy-plugins-input-field freddy-plugins-card-input-field\"\n :class=\"inputClasses\"\n @input=\"handleCardInput\"\n @keydown=\"handleCardKeydown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n\n <!-- Trailing Icon -->\n <component\n v-if=\"resolvedTrailingIcon\"\n :is=\"resolvedTrailingIcon\"\n class=\"freddy-plugins-input-trailing-icon\"\n :class=\"`freddy-plugins-input-trailing-icon--${colorStyle}`\"\n @click=\"handleTrailingIconClick\"\n />\n </BaseInput>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch, defineAsyncComponent } from 'vue';\n import BaseInput from './BaseInput.vue';\n import type {\n CardInputProps,\n CardInputEvents,\n CardType,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends CardInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: '1234 5678 9012 3456',\n cardNumber: '',\n cardType: 'unknown',\n maskInput: true,\n showCardIcon: true,\n disabled: false,\n readonly: false,\n });\n\n const emit = defineEmits<CardInputEvents>();\n\n // Refs\n const inputRef = ref<HTMLInputElement | null>(null);\n const baseInputRef = ref<InstanceType<typeof BaseInput> | null>(null);\n const rawValue = ref('');\n const displayValue = ref('');\n const detectedCardType = ref<CardType>('unknown');\n\n // Computed properties\n const baseProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n disabled: props.disabled,\n }));\n\n // Dynamic icon resolution\n const resolveIcon = (iconName: any) => {\n if (!iconName) return null;\n\n if (typeof iconName === 'object') {\n return iconName;\n }\n\n if (typeof iconName === 'string') {\n return defineAsyncComponent(() =>\n import(`@/icons/${iconName}.vue`).catch(() => {\n console.warn(`Icon \"${iconName}\" not found`);\n return { template: '<div></div>' };\n })\n );\n }\n\n return null;\n };\n\n const resolvedTrailingIcon = computed(() => resolveIcon(props.trailingIcon));\n\n // Card number max length based on card type\n const cardNumberMaxLength = computed(() => {\n switch (detectedCardType.value) {\n case 'amex':\n return 17; // 15 digits + 2 spaces\n default:\n return 19; // 16 digits + 3 spaces\n }\n });\n\n const inputClasses = computed(() => ({\n [`freddy-plugins-input-field--${props.size}`]: true,\n [`freddy-plugins-input-field--${props.colorStyle}`]: true,\n 'freddy-plugins-input-field--destructive': props.destructive,\n 'freddy-plugins-input-field--focused': props.state === 'focused',\n 'freddy-plugins-input-field--disabled': props.state === 'disabled',\n 'freddy-plugins-input-field--with-leading':\n props.showCardIcon && detectedCardType.value !== 'unknown',\n 'freddy-plugins-input-field--with-trailing': !!resolvedTrailingIcon.value,\n }));\n\n // Card type detection\n const detectCardType = (number: string): CardType => {\n const cleanNumber = number.replace(/\\D/g, '');\n\n if (/^4/.test(cleanNumber)) {\n return 'visa';\n } else if (/^5[1-5]/.test(cleanNumber) || /^2[2-7]/.test(cleanNumber)) {\n return 'mastercard';\n } else if (/^3[47]/.test(cleanNumber)) {\n return 'amex';\n } else if (/^6/.test(cleanNumber)) {\n return 'discover';\n }\n\n return 'unknown';\n };\n\n // Card number formatting with proper spacing\n const formatCardNumber = (value: string): string => {\n const cleanValue = value.replace(/\\D/g, '');\n const cardType = detectCardType(cleanValue);\n\n if (cardType === 'amex') {\n // American Express: 4-6-5 format (XXXX XXXXXX XXXXX)\n return cleanValue\n .replace(/(\\d{4})(\\d{6})(\\d{5})/, '$1 $2 $3')\n .replace(/(\\d{4})(\\d{1,6})/, '$1 $2')\n .substring(0, 17);\n } else {\n // Visa, Mastercard, Discover: 4-4-4-4 format (XXXX XXXX XXXX XXXX)\n return cleanValue\n .replace(/(\\d{4})(\\d{4})(\\d{4})(\\d{4})/, '$1 $2 $3 $4')\n .replace(/(\\d{4})(\\d{4})(\\d{4})/, '$1 $2 $3')\n .replace(/(\\d{4})(\\d{4})/, '$1 $2')\n .replace(/(\\d{4})/, '$1')\n .substring(0, 19);\n }\n };\n\n // Card type icons\n const getCardTypeIcon = (cardType: CardType): string => {\n const icons = {\n visa: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iIzAwNTFBNSIvPgo8cGF0aCBkPSJNMTYuNzUgN0wxNC4yNSAxN0gxMS43NUwxMy41IDEwLjVMMTIuMjUgOC41SDEwLjc1TDEyLjc1IDdIMTYuNzVaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjkuMjUgN0wyNi43NSAxN0gyNC4yNUwyNi43NSA3SDI5LjI1WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+',\n mastercard:\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzM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own;\n };\n\n // Methods\n const handleCardInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n const inputValue = target.value;\n\n // Store raw value (digits only)\n rawValue.value = inputValue.replace(/\\D/g, '');\n\n // Always format for display with proper spacing\n displayValue.value = formatCardNumber(inputValue);\n\n // Detect card type\n const newCardType = detectCardType(rawValue.value);\n if (newCardType !== detectedCardType.value) {\n detectedCardType.value = newCardType;\n emit('card-type-detected', newCardType);\n }\n\n emit('update:modelValue', displayValue.value);\n emit('update:cardNumber', rawValue.value);\n emit('input', displayValue.value);\n };\n\n const handleCardKeydown = (event: KeyboardEvent) => {\n // Allow backspace, delete, tab, escape, enter\n if (\n [8, 9, 27, 13, 46].indexOf(event.keyCode) !== -1 ||\n // Allow Ctrl+A, Ctrl+C, Ctrl+V, Ctrl+X\n (event.keyCode === 65 && event.ctrlKey === true) ||\n (event.keyCode === 67 && event.ctrlKey === true) ||\n (event.keyCode === 86 && event.ctrlKey === true) ||\n (event.keyCode === 88 && event.ctrlKey === true) ||\n // Allow home, end, left, right\n (event.keyCode >= 35 && event.keyCode <= 39)\n ) {\n return;\n }\n\n // Only allow numbers\n if (\n (event.shiftKey || event.keyCode < 48 || event.keyCode > 57) &&\n (event.keyCode < 96 || event.keyCode > 105)\n ) {\n event.preventDefault();\n }\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleTrailingIconClick = (event: MouseEvent) => {\n emit('trailing-icon-click', event);\n };\n\n const focus = () => {\n inputRef.value?.focus();\n };\n\n // Watch for external card number changes\n watch(\n () => props.cardNumber,\n newValue => {\n if (newValue !== rawValue.value) {\n rawValue.value = newValue;\n displayValue.value = formatCardNumber(newValue);\n detectedCardType.value = detectCardType(newValue);\n }\n },\n { immediate: true }\n );\n\n defineExpose({\n focus,\n inputRef,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-card-type-icon {\n display: flex;\n align-items: center;\n padding: 0 0.75rem;\n margin-right: 8px;\n }\n\n .freddy-plugins-card-type-icon--freddy {\n border-right: 1px solid var(--border-600, #475569);\n }\n\n .freddy-plugins-card-type-icon--contentplate {\n border-right: 1px solid var(--border-200, var(--freddy-border-color));\n }\n\n .freddy-plugins-card-icon-image {\n width: 32px;\n height: 20px;\n object-fit: contain;\n border-radius: 2px;\n }\n\n .freddy-plugins-card-input-field {\n flex: 1;\n background: transparent;\n border: none;\n outline: none;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n padding: 0 0.75rem;\n height: 100%;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono',\n 'Courier New', monospace;\n letter-spacing: 0.05em;\n }\n\n .freddy-plugins-card-input-field--freddy {\n color: var(--text-300, var(--text-muted));\n }\n\n .freddy-plugins-card-input-field--contentplate {\n color: var(--text-700, var(--freddy-text-primary));\n }\n\n .freddy-plugins-card-input-field--freddy::placeholder {\n color: var(--text-muted);\n opacity: 0.7;\n }\n\n .freddy-plugins-card-input-field--contentplate::placeholder {\n color: #9ca3af;\n opacity: 0.7;\n }\n\n .freddy-plugins-card-input-field--disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-input-trailing-icon {\n width: 1.25rem;\n height: 1.25rem;\n margin-right: 0.75rem;\n margin-left: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-trailing-icon--freddy,\n .freddy-plugins-input-trailing-icon--contentplate {\n stroke: var(--freddy-fg-tertiary);\n }\n\n .freddy-plugins-input-trailing-icon:hover {\n transform: scale(1.1);\n }\n</style>\n","<template>\n <BaseInput v-bind=\"baseProps\" @focus=\"handleFocus\" @blur=\"handleBlur\">\n <!-- Leading Icon -->\n <component\n v-if=\"resolvedLeadingIcon\"\n :is=\"resolvedLeadingIcon\"\n class=\"freddy-plugins-input-leading-icon\"\n :class=\"`freddy-plugins-input-leading-icon--${colorStyle}`\"\n @click=\"handleLeadingIconClick\"\n />\n\n <!-- Main Input -->\n <input\n :id=\"baseInputRef?.inputId\"\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n class=\"freddy-plugins-input-field\"\n :class=\"inputClasses\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydown\"\n />\n\n <!-- Trailing Icon with Tooltip -->\n <Tooltip\n v-if=\"trailingIcon === 'IconQuestion' && tooltipText\"\n :text=\"tooltipText\"\n placement=\"top\"\n >\n <component\n :is=\"resolvedTrailingIcon\"\n class=\"freddy-plugins-input-trailing-icon\"\n :class=\"`freddy-plugins-input-trailing-icon--${colorStyle}`\"\n />\n </Tooltip>\n <component\n v-else-if=\"resolvedTrailingIcon\"\n :is=\"resolvedTrailingIcon\"\n class=\"freddy-plugins-input-trailing-icon\"\n :class=\"`freddy-plugins-input-trailing-icon--${colorStyle}`\"\n @click=\"handleTrailingIconClick\"\n />\n </BaseInput>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch, defineAsyncComponent } from 'vue';\n import BaseInput from './BaseInput.vue';\n import Tooltip from '../Tooltip.vue';\n import type {\n DefaultInputProps,\n DefaultInputEvents,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends DefaultInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: '',\n inputType: 'text',\n modelValue: '',\n disabled: false,\n readonly: false,\n });\n\n const emit = defineEmits<DefaultInputEvents>();\n\n // Refs\n const inputRef = ref<HTMLInputElement | null>(null);\n const baseInputRef = ref<InstanceType<typeof BaseInput> | null>(null);\n const inputValue = ref(props.modelValue || '');\n\n // Computed properties\n const baseProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n disabled: props.disabled,\n }));\n\n // Dynamic icon resolution with lazy loading for better performance\n const resolveIcon = (iconName: any) => {\n if (!iconName) return null;\n\n // If it's already a component, return it\n if (typeof iconName === 'object') {\n return iconName;\n }\n\n // If it's a string, create an async component that dynamically imports the icon\n if (typeof iconName === 'string') {\n return defineAsyncComponent(() =>\n import(`@/icons/${iconName}.vue`).catch(() => {\n console.warn(`Icon \"${iconName}\" not found`);\n return { template: '<div></div>' }; // Return empty component as fallback\n })\n );\n }\n\n return null;\n };\n\n const resolvedLeadingIcon = computed(() => resolveIcon(props.leadingIcon));\n const resolvedTrailingIcon = computed(() => resolveIcon(props.trailingIcon));\n\n const inputClasses = computed(() => ({\n [`freddy-plugins-input-field--${props.size}`]: true,\n [`freddy-plugins-input-field--${props.colorStyle}`]: true,\n 'freddy-plugins-input-field--destructive': props.destructive,\n 'freddy-plugins-input-field--focused': props.state === 'focused',\n 'freddy-plugins-input-field--disabled': props.state === 'disabled',\n 'freddy-plugins-input-field--with-leading': !!resolvedLeadingIcon.value,\n 'freddy-plugins-input-field--with-trailing': !!resolvedTrailingIcon.value,\n }));\n\n // Methods\n const handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n inputValue.value = target.value;\n emit('update:modelValue', target.value);\n emit('input', target.value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n emit('keydown', event);\n };\n\n const handleLeadingIconClick = (event: MouseEvent) => {\n emit('leading-icon-click', event);\n };\n\n const handleTrailingIconClick = (event: MouseEvent) => {\n emit('trailing-icon-click', event);\n };\n\n const focus = () => {\n inputRef.value?.focus();\n };\n\n // Watch for external value changes\n watch(\n () => props.modelValue,\n newValue => {\n if (newValue !== undefined) {\n inputValue.value = newValue;\n }\n }\n );\n\n defineExpose({\n focus,\n inputRef,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-input-leading-icon {\n width: 1.25rem;\n height: 1.25rem;\n margin-left: 0.75rem;\n margin-right: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-leading-icon--freddy,\n .freddy-plugins-input-leading-icon--contentplate {\n stroke: var(--freddy-fg-tertiary);\n }\n\n .freddy-plugins-input-leading-icon:hover {\n transform: scale(1.1);\n }\n\n .freddy-plugins-input-trailing-icon {\n width: 1.25rem;\n height: 1.25rem;\n margin-right: 0.75rem;\n margin-left: 8px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-trailing-icon--freddy,\n .freddy-plugins-input-trailing-icon--contentplate {\n stroke: var(--freddy-fg-tertiary);\n }\n\n .freddy-plugins-input-trailing-icon:hover {\n transform: scale(1.1);\n }\n\n .freddy-plugins-input-field {\n flex: 1;\n background: transparent;\n border: none;\n outline: none;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n padding: 0 0.75rem;\n height: 100%;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-input-field--freddy {\n color: var(--text-300, var(--text-muted));\n }\n\n .freddy-plugins-input-field--contentplate {\n color: var(--text-700, var(--freddy-text-primary));\n }\n\n .freddy-plugins-input-field--freddy::placeholder {\n color: var(--text-muted);\n opacity: 0.7;\n }\n\n .freddy-plugins-input-field--contentplate::placeholder {\n color: #9ca3af;\n opacity: 0.7;\n }\n\n .freddy-plugins-input-field--disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-input-field--with-leading {\n padding-left: 0;\n }\n\n .freddy-plugins-input-field--with-trailing {\n padding-right: 0;\n }\n\n /* Disable browser autofill styling */\n .freddy-plugins-input-field:-webkit-autofill,\n .freddy-plugins-input-field:-webkit-autofill:hover,\n .freddy-plugins-input-field:-webkit-autofill:focus,\n .freddy-plugins-input-field:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px transparent inset !important;\n -webkit-text-fill-color: inherit !important;\n transition: background-color 5000s ease-in-out 0s;\n background-color: transparent !important;\n background-image: none !important;\n }\n</style>\n","<template>\n <BaseInput v-bind=\"baseProps\" @focus=\"handleFocus\" @blur=\"handleBlur\">\n <!-- Country Code Dropdown -->\n <div\n class=\"freddy-plugins-figma-dropdown\"\n :class=\"`freddy-plugins-figma-dropdown--${colorStyle}`\"\n @click=\"toggleCountryDropdown\"\n >\n <span class=\"freddy-plugins-figma-dropdown-text\">{{ selectedCountry.code }}</span>\n <IconChevronDown class=\"freddy-plugins-figma-dropdown-icon\" />\n </div>\n\n <!-- Country Options Dropdown -->\n <div\n v-if=\"showCountryDropdown\"\n class=\"freddy-plugins-country-options-dropdown\"\n :class=\"`freddy-plugins-country-options-dropdown--${colorStyle}`\"\n >\n <div\n v-for=\"country in countryOptions\"\n :key=\"country.code\"\n class=\"freddy-plugins-country-option\"\n :class=\"`freddy-plugins-country-option--${colorStyle}`\"\n @click=\"selectCountry(country)\"\n >\n <span class=\"freddy-plugins-country-flag\">{{ country.flag }}</span>\n <span class=\"freddy-plugins-country-name\">{{ country.name }}</span>\n <span class=\"freddy-plugins-country-dial-code\">{{ country.dialCode }}</span>\n </div>\n </div>\n\n <!-- Phone Input Section -->\n <div class=\"freddy-plugins-figma-text-input\" :class=\"`freddy-plugins-figma-text-input--${colorStyle}`\">\n <input\n :id=\"baseInputRef?.inputId\"\n ref=\"inputRef\"\n v-model=\"phoneNumberValue\"\n type=\"tel\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n class=\"freddy-plugins-figma-phone-input\"\n @input=\"handlePhoneInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n\n <!-- Help Icon -->\n <div v-if=\"trailingIcon === 'IconQuestion'\" class=\"freddy-plugins-figma-help-icon\">\n <Tooltip v-if=\"tooltipText\" :text=\"tooltipText\" placement=\"top\">\n <IconQuestion class=\"freddy-plugins-figma-help-icon-svg\" />\n </Tooltip>\n <IconQuestion v-else class=\"freddy-plugins-figma-help-icon-svg\" />\n </div>\n </div>\n </BaseInput>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch, onMounted, onUnmounted } from 'vue';\n import BaseInput from './BaseInput.vue';\n import Tooltip from '../Tooltip.vue';\n import { IconChevronDown, IconQuestion } from '@/icons/';\n import type {\n PhoneInputProps,\n PhoneInputEvents,\n CountryOption,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends PhoneInputProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: 'Enter phone number',\n countryCode: 'US',\n phoneNumber: '',\n disabled: false,\n readonly: false,\n });\n\n const emit = defineEmits<PhoneInputEvents>();\n\n // Refs\n const inputRef = ref<HTMLInputElement | null>(null);\n const baseInputRef = ref<InstanceType<typeof BaseInput> | null>(null);\n const phoneNumberValue = ref(props.phoneNumber || '');\n const showCountryDropdown = ref(false);\n const localCountryCode = ref(props.countryCode || 'US');\n\n // Default country options\n const defaultCountryOptions: CountryOption[] = [\n { code: 'US', name: 'United States', flag: '🇺🇸', dialCode: '+1' },\n { code: 'GB', name: 'United Kingdom', flag: '🇬🇧', dialCode: '+44' },\n { code: 'CA', name: 'Canada', flag: '🇨🇦', dialCode: '+1' },\n { code: 'AU', name: 'Australia', flag: '🇦🇺', dialCode: '+61' },\n { code: 'DE', name: 'Germany', flag: '🇩🇪', dialCode: '+49' },\n { code: 'FR', name: 'France', flag: '🇫🇷', dialCode: '+33' },\n { code: 'IT', name: 'Italy', flag: '🇮🇹', dialCode: '+39' },\n { code: 'ES', name: 'Spain', flag: '🇪🇸', dialCode: '+34' },\n { code: 'JP', name: 'Japan', flag: '🇯🇵', dialCode: '+81' },\n { code: 'IN', name: 'India', flag: '🇮🇳', dialCode: '+91' },\n ];\n\n // Computed properties\n const baseProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n disabled: props.disabled,\n }));\n\n const countryOptions = computed(\n () => props.countryOptions || defaultCountryOptions\n );\n\n const selectedCountry = computed(() => {\n return (\n countryOptions.value.find(\n country => country.code === localCountryCode.value\n ) || countryOptions.value[0]\n );\n });\n\n // Methods\n const toggleCountryDropdown = () => {\n if (!props.disabled) {\n showCountryDropdown.value = !showCountryDropdown.value;\n }\n };\n\n const selectCountry = (country: CountryOption) => {\n localCountryCode.value = country.code;\n emit('update:countryCode', country.code);\n emit('country-change', country);\n\n // Update phone number format when country changes\n const currentNumber = phoneNumberValue.value.replace(/^\\+\\d+\\s*/, '');\n const newFormattedNumber = `${country.dialCode} ${currentNumber}`.trim();\n\n phoneNumberValue.value = newFormattedNumber;\n emit('update:phoneNumber', newFormattedNumber);\n emit('update:modelValue', newFormattedNumber);\n\n showCountryDropdown.value = false;\n };\n\n const handlePhoneInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n phoneNumberValue.value = target.value;\n\n const fullNumber = `${selectedCountry.value.dialCode} ${target.value}`;\n emit('update:modelValue', fullNumber);\n emit('update:phoneNumber', target.value);\n emit('input', fullNumber);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const focus = () => {\n inputRef.value?.focus();\n };\n\n // Close dropdown when clicking outside\n const handleClickOutside = (event: Event) => {\n const target = event.target as HTMLElement;\n if (!target.closest('.freddy-plugins-input-field-container')) {\n showCountryDropdown.value = false;\n }\n };\n\n // Watch for prop changes\n watch(\n () => props.countryCode,\n newCode => {\n if (newCode && newCode !== localCountryCode.value) {\n localCountryCode.value = newCode;\n }\n },\n { immediate: true }\n );\n\n watch(\n () => props.phoneNumber,\n newValue => {\n if (newValue !== undefined) {\n phoneNumberValue.value = newValue;\n }\n }\n );\n\n onMounted(() => {\n document.addEventListener('click', handleClickOutside);\n });\n\n onUnmounted(() => {\n document.removeEventListener('click', handleClickOutside);\n });\n\n defineExpose({\n focus,\n inputRef,\n });\n</script>\n\n<style scoped>\n .freddy-plugins-figma-dropdown {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 8px 12px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n border-right: 1px solid transparent;\n }\n\n .freddy-plugins-figma-dropdown--freddy {\n border-right-color: #475569;\n }\n\n .freddy-plugins-figma-dropdown--contentplate {\n border-right-color: #e5e7eb;\n }\n\n .freddy-plugins-figma-dropdown-text {\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n color: #717680;\n white-space: nowrap;\n }\n\n .freddy-plugins-figma-dropdown-icon {\n width: 16px;\n height: 16px;\n stroke: var(--freddy-fg-tertiary);\n cursor: pointer;\n }\n\n .freddy-plugins-country-options-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 50;\n max-height: 200px;\n overflow-y: auto;\n border-radius: 8px;\n margin-top: 4px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n }\n\n .freddy-plugins-country-options-dropdown--freddy {\n background-color: var(--bg-800, var(--freddy-bg-primary));\n border: 1px solid var(--border-600, #475569);\n }\n\n .freddy-plugins-country-options-dropdown--contentplate {\n background-color: var(--bg-50, var(--freddy-bg-primary));\n border: 1px solid var(--border-200, var(--freddy-border-color));\n }\n\n .freddy-plugins-country-option {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .freddy-plugins-country-option--freddy:hover {\n background-color: var(--bg-700, #374151);\n }\n\n .freddy-plugins-country-option--contentplate:hover {\n background-color: var(--bg-100, #f3f4f6);\n }\n\n .freddy-plugins-country-flag {\n font-size: 1rem;\n }\n\n .freddy-plugins-country-name {\n flex: 1;\n font-size: 0.875rem;\n }\n\n .freddy-plugins-country-dial-code {\n font-size: 0.875rem;\n font-weight: 500;\n }\n\n .freddy-plugins-figma-text-input {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px 8px 10px;\n flex: 1;\n box-sizing: border-box;\n min-height: 1px;\n min-width: 1px;\n }\n\n .freddy-plugins-figma-phone-input {\n flex: 1;\n background: transparent;\n border: none;\n outline: none;\n font-family: 'Inter', sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n color: #ffffff;\n min-height: 1px;\n min-width: 1px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .freddy-plugins-figma-phone-input::placeholder {\n color: #717680;\n }\n\n .freddy-plugins-figma-help-icon {\n width: 16px;\n height: 16px;\n position: relative;\n flex-shrink: 0;\n }\n\n .freddy-plugins-figma-help-icon-svg {\n width: 16px;\n height: 16px;\n stroke: var(--freddy-fg-tertiary);\n cursor: pointer;\n }\n</style>\n","<template>\n <!-- Phone Variant -->\n <PhoneInput\n v-if=\"variant === 'phone'\"\n v-bind=\"phoneProps\"\n @update:modelValue=\"handleUpdate\"\n @update:countryCode=\"handleCountryCodeUpdate\"\n @update:phoneNumber=\"handlePhoneNumberUpdate\"\n @country-change=\"handleCountryChange\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n\n <!-- Card Variant -->\n <CardInput\n v-else-if=\"variant === 'card'\"\n v-bind=\"cardProps\"\n @update:modelValue=\"handleUpdate\"\n @update:cardNumber=\"handleCardNumberUpdate\"\n @card-type-detected=\"handleCardTypeDetected\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @trailing-icon-click=\"handleTrailingIconClick\"\n />\n\n <!-- Default/Other Variants -->\n <DefaultInput\n v-else\n v-bind=\"defaultProps\"\n @update:modelValue=\"handleUpdate\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @keydown=\"handleKeydown\"\n @leading-icon-click=\"handleLeadingIconClick\"\n @trailing-icon-click=\"handleTrailingIconClick\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import PhoneInput from './PhoneInput.vue';\n import CardInput from './CardInput.vue';\n import DefaultInput from './DefaultInput.vue';\n import type {\n UnifiedInputFieldProps,\n UnifiedInputFieldEvents,\n CountryOption,\n CardType,\n } from '@/interfaces/input-field.interfaces';\n\n interface Props extends UnifiedInputFieldProps {}\n\n const props = withDefaults(defineProps<Props>(), {\n size: 'md',\n colorStyle: 'freddy',\n variant: 'default',\n type: 'default',\n state: 'placeholder',\n destructive: false,\n required: false,\n label: '',\n hintText: '',\n placeholder: '',\n inputType: 'text',\n modelValue: '',\n disabled: false,\n readonly: false,\n countryCode: 'US',\n phoneNumber: '',\n });\n\n const emit = defineEmits<UnifiedInputFieldEvents>();\n\n // Determine the actual variant to use\n const variant = computed(() => props.variant || props.type || 'default');\n\n // Props for PhoneInput\n const phoneProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n placeholder: props.placeholder,\n countryCode: props.countryCode,\n phoneNumber: props.phoneNumber,\n countryOptions: props.countryOptions,\n trailingIcon: props.trailingIcon,\n tooltipText: props.tooltipText,\n disabled: props.disabled,\n readonly: props.readonly,\n }));\n\n // Props for CardInput\n const cardProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n placeholder: props.placeholder,\n cardNumber: props.cardNumber,\n cardType: props.cardType,\n maskInput: props.maskInput,\n showCardIcon: props.showCardIcon,\n trailingIcon: props.trailingIcon,\n disabled: props.disabled,\n readonly: props.readonly,\n }));\n\n // Props for DefaultInput\n const defaultProps = computed(() => ({\n size: props.size,\n colorStyle: props.colorStyle,\n state: props.state,\n destructive: props.destructive,\n required: props.required,\n label: props.label,\n hintText: props.hintText,\n placeholder: props.placeholder,\n inputType: props.inputType,\n modelValue: props.modelValue,\n leadingIcon: props.leadingIcon,\n trailingIcon: props.trailingIcon,\n tooltipText: props.tooltipText,\n disabled: props.disabled,\n readonly: props.readonly,\n }));\n\n // Event handlers\n const handleUpdate = (value: string) => {\n emit('update:modelValue', value);\n };\n\n const handleInput = (value: string) => {\n emit('input', value);\n };\n\n const handleFocus = (event: FocusEvent) => {\n emit('focus', event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n emit('blur', event);\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n emit('keydown', event);\n };\n\n const handleLeadingIconClick = (event: MouseEvent) => {\n emit('leading-icon-click', event);\n };\n\n const handleTrailingIconClick = (event: MouseEvent) => {\n emit('trailing-icon-click', event);\n };\n\n // Phone-specific event handlers\n const handleCountryCodeUpdate = (code: string) => {\n emit('update:countryCode', code);\n };\n\n const handlePhoneNumberUpdate = (number: string) => {\n emit('update:phoneNumber', number);\n };\n\n const handleCountryChange = (country: CountryOption) => {\n emit('country-change', country);\n };\n\n // Card-specific event handlers\n const handleCardNumberUpdate = (number: string) => {\n emit('update:cardNumber', number);\n };\n\n const handleCardTypeDetected = (cardType: CardType) => {\n emit('card-type-detected', cardType);\n };\n</script>\n\n<style scoped>\n /* No styles needed - all styling is handled by child components */\n</style>\n","<template>\n <transition name=\"modal\">\n <div v-if=\"isVisible\" class=\"freddy-plugins-modal-box-overlay\">\n <div class=\"freddy-plugins-modal-box-wrapper\">\n <div\n :class=\"[\n 'freddy-plugins-modal-box-container',\n { 'freddy-plugins-modal-box-container-large': largeModel },\n ]\"\n >\n <div class=\"freddy-plugins-modal-box-header\">\n <slot name=\"header\"></slot>\n </div>\n\n <div class=\"freddy-plugins-modal-box-body\">\n <slot name=\"body\"></slot>\n </div>\n\n <div class=\"freddy-plugins-modal-box-footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </div>\n </div>\n </transition>\n</template>\n\n<script>\n export default {\n name: 'ModalBox',\n props: {\n isVisible: {\n type: Boolean,\n default: true,\n },\n largeModel: {\n type: Boolean,\n default: true,\n },\n },\n methods: {\n closeModal() {\n this.$emit('close');\n },\n },\n };\n</script>\n\n<style>\n /* Modal overlay */\n .freddy-plugins-modal-box-overlay {\n position: fixed;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(29, 46, 71, 0.9);\n backdrop-filter: blur(4px);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n /* Modal wrapper */\n .freddy-plugins-modal-box-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n /* Modal container */\n .freddy-plugins-modal-box-container {\n background-color: #0f172a;\n padding: 2rem;\n border-radius: 2.5rem;\n overflow: hidden;\n color: white;\n }\n\n /* Modal header */\n .freddy-plugins-modal-box-header:last-child,\n .freddy-plugins-modal-box-body:last-child,\n .freddy-plugins-modal-box-footer:last-child {\n margin-bottom: 0;\n }\n\n /* Modal transition animations */\n .freddy-plugins-modal-box-transition-enter-active,\n .freddy-plugins-modal-box-transition-leave-active {\n transition: all 0.3s ease;\n }\n\n .freddy-plugins-modal-box-transition-enter-from,\n .freddy-plugins-modal-box-transition-leave-to {\n opacity: 0;\n transform: scale(0.9);\n }\n\n .freddy-plugins-modal-box-transition-enter-to,\n .freddy-plugins-modal-box-transition-leave-from {\n opacity: 1;\n transform: scale(1);\n }\n\n /* Responsive width utilities */\n @media (min-width: 1280px) {\n .freddy-plugins-modal-box-container-large {\n width: 56.25rem;\n }\n }\n\n @media (max-width: 1279px) and (min-width: 1024px) {\n .freddy-plugins-modal-box-container-large {\n width: 56.25rem;\n }\n }\n\n @media (max-width: 1023px) and (min-width: 768px) {\n .freddy-plugins-modal-box-container-large {\n width: 56.25rem;\n }\n }\n\n @media (max-width: 767px) and (min-width: 640px) {\n .freddy-plugins-modal-box-container-large {\n width: 45.625rem;\n }\n }\n\n @media (max-width: 639px) and (min-width: 480px) {\n .freddy-plugins-modal-box-container-large {\n width: 31.25rem;\n }\n }\n\n @media (max-width: 479px) {\n .freddy-plugins-modal-box-container-large {\n width: auto;\n max-width: 90%;\n }\n }\n</style>\n","<template>\n <ModalBox :isVisible=\"isVisible\" >\n <template #header>\n <h2>Instructions</h2>\n </template>\n <template #body>\n <p>Instructions</p>\n </template>\n </ModalBox>\n</template>\n\n<script setup lang=\"ts\">\nimport ModalBox from '@/components/ModalBox.vue'\n\ndefineProps({\n isVisible: {\n type: Boolean,\n required: true\n }\n})\n</script>","<template>\n <input\n type=\"text\"\n :value=\"inputValue\"\n :placeholder=\"placeholder\"\n :style=\"{ width: '100%', height: height }\"\n @input=\"handleInput\"\n class=\"instruction-text-input\"\n aria-label=\"Instruction input\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n const props = defineProps<{\n inputValue: string;\n placeholder: string;\n height?: string;\n }>();\n\n const emit = defineEmits<{\n (e: 'update:inputValue', value: string): void;\n }>();\n\n const height = computed(() => props.height || '40px');\n\n const handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n emit('update:inputValue', target.value);\n };\n</script>\n\n<style scoped>\n .instruction-text-input {\n box-sizing: border-box;\n font-size: 1rem;\n padding: 0.5rem 1rem;\n border-radius: var(--radius-md, 8px);\n border: 1px solid var(--freddy-border-secondary, #35414b);\n background: var(--freddy-bg-primary, #031525);\n color: #222;\n width: 100%;\n outline: none;\n box-shadow: 0 1px 2px 0 var(--freddy-shadow-sm, rgba(255, 255, 255, 0));\n transition: border-color 0.2s;\n }\n .instruction-text-input:focus {\n border-color: #888;\n }\n</style>\n","<template>\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n class=\"freddy-plugins-modal-overlay\"\n @click=\"clickOutside\"\n >\n <div class=\"freddy-plugins-modal-content\" @click.stop>\n <header class=\"freddy-plugins-modal-header\">\n <h2 class=\"freddy-plugins-modal-title\" :class=\"headerClass\">\n {{ modalTitle }}\n </h2>\n <button class=\"freddy-plugins-modal-close\" @click=\"closeModal\">\n <IconLightCross class=\"freddy-plugins-modal-close-icon\" />\n </button>\n </header>\n <div class=\"freddy-plugins-modal-body\">\n <slot name=\"content\" />\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\nimport IconLightCross from \"@/icons/IconLightCross.vue\";\n\nconst props = defineProps<{\n modalTitle: string;\n headerClass: string;\n disableClickOutside?: boolean;\n}>();\n\nconst emits = defineEmits([\"close\"]);\n\nconst closeModal = () => {\n emits(\"close\");\n};\n\nconst clickOutside = () => {\n if (!props.disableClickOutside) {\n closeModal();\n }\n};\n</script>\n\n<style>\n.freddy-plugins-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(3, 21, 37, 0.77);\n backdrop-filter: blur(4px);\n z-index: 1000;\n overflow: auto;\n}\n\n.freddy-plugins-modal-content {\n background-color: var(--text-900, var(--freddy-bg-primary));\n border-radius: 40px;\n box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.25);\n padding: 30px;\n position: relative;\n margin: auto;\n min-width: 370px;\n max-width: 90%;\n width: auto;\n}\n\n.freddy-plugins-modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 28px;\n gap: 8px;\n}\n\n.freddy-plugins-modal-title {\n font-size: 29px;\n line-height: 35px;\n font-weight: 600;\n margin: 0;\n}\n\n.freddy-plugins-modal-close {\n background: none;\n border: none;\n font-size: 35px;\n font-weight: 400;\n color: white;\n padding: 0;\n line-height: 1;\n cursor: pointer;\n}\n\n.freddy-plugins-modal-close-icon {\n width: 16px;\n height: 16px;\n stroke-width: 2px;\n}\n\n.freddy-plugins-modal-body {\n /* optional: wrap content styles */\n}\n</style>\n","<!-- Spinner.vue -->\n<template>\n <div class=\"freddy-plugin-spinner\" :class=\"customClass\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from '@/composables/useTheme'\n\nconst { currentProject, currentColorMode } = useTheme()\n\n\ndefineProps<{\n customClass?: string;\n}>();\n</script>\n\n<style>\n.freddy-plugin-spinner {\n width: 20px;\n height: 20px;\n border: 2px solid #f3f3f3;\n border-top-color: transparent;\n border-radius: 50%;\n animation: freddy-plugin-spin 1s linear infinite;\n}\n\n@keyframes freddy-plugin-spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n</style>\n","<template>\n <div\n ref=\"dropdownRef\"\n class=\"freddy-search-wrapper\"\n :class=\"attrs.class\"\n @click=\"focusInput\"\n >\n <IconSearchOptimised class=\"freddy-search-icon\" />\n <input\n type=\"text\"\n id=\"search-input\"\n class=\"freddy-search-input\"\n ref=\"searchInput\"\n v-model=\"inputValue\"\n @input=\"handleInput\"\n :placeholder=\"placeholder\"\n :maxlength=\"maxCharLimit\"\n />\n <Spinner class=\"freddy-search-spinner\" v-if=\"showLoaderForSearch\" />\n <IconCross\n class=\"freddy-search-close\"\n v-if=\"showCloseButton && !showLoaderForSearch && inputValue?.length\"\n @click=\"handleClear\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref, useAttrs } from 'vue';\n import Spinner from '@/components/Spinner.vue';\n import { IconSearchOptimised, IconCross } from '@/icons';\n\n defineOptions({ inheritAttrs: false });\n\n const attrs = useAttrs();\n\n const inputValue = ref<string | null>(null);\n const searchInput = ref<HTMLInputElement | null>(null);\n const dropdownRef = ref<HTMLElement | null>(null);\n\n interface SearchInputProps {\n /** Placeholder text for the search input */\n placeholder?: string;\n /** Whether to show a loading spinner */\n showLoaderForSearch?: boolean;\n /** Maximum number of characters allowed in the input */\n maxCharLimit?: number;\n /** Whether to show a close button */\n showCloseButton?: boolean;\n }\n\n withDefaults(defineProps<SearchInputProps>(), {\n placeholder: 'Search here...',\n showLoaderForSearch: false,\n maxCharLimit: undefined,\n showCloseButton: false,\n });\n\n const emit = defineEmits<{\n (event: 'update:searchInput', inputValue: string | null): void;\n (event: 'clear'): void;\n }>();\n\n const focusInput = () => {\n searchInput.value?.focus();\n };\n\n const handleInput = () => {\n emit('update:searchInput', inputValue.value);\n };\n\n const handleClear = () => {\n emit('clear');\n };\n</script>\n\n<style>\n .freddy-search-wrapper {\n display: flex;\n box-sizing: border-box;\n align-items: flex-start;\n gap: 0.5rem; /* gap-2 */\n height: 37px;\n width: 100%;\n border: 2px solid var(--freddy-border-color);\n padding-left: 0.875rem;\n padding-right: 0.875rem;\n border-radius: 0.5rem;\n cursor: text;\n }\n\n .freddy-search-icon {\n flex-shrink: 0;\n width: 1.25rem;\n height: 1.25rem;\n align-self: center;\n stroke: var(--text-muted);\n }\n\n .freddy-search-input {\n flex: 1 1 auto;\n width: 100%;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n background: transparent;\n border: none;\n outline: none;\n color: var(--text-300, var(--text-muted));\n align-self: center;\n }\n\n .freddy-search-input::placeholder {\n color: #cbd6e3;\n }\n\n /* Disable browser autofill styling for search input */\n .freddy-search-input:-webkit-autofill,\n .freddy-search-input:-webkit-autofill:hover,\n .freddy-search-input:-webkit-autofill:focus,\n .freddy-search-input:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px transparent inset !important;\n -webkit-text-fill-color: var(--text-300, var(--text-muted)) !important;\n transition: background-color 5000s ease-in-out 0s;\n background-color: transparent !important;\n background-image: none !important;\n }\n\n .freddy-search-input:-moz-autofill,\n .freddy-search-input:-moz-autofill:focus {\n background-color: transparent !important;\n color: var(--text-300, var(--text-muted)) !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n .freddy-search-input:-ms-autofill,\n .freddy-search-input:-ms-autofill:focus {\n background-color: transparent !important;\n color: var(--text-300, var(--text-muted)) !important;\n border: none !important;\n box-shadow: none !important;\n }\n\n .freddy-search-spinner {\n width: 21px !important;\n align-self: center;\n }\n\n .freddy-search-close {\n width: 12px;\n height: 12p;\n align-self: center;\n color: var(--freddy-text-quaternary);\n }\n</style>\n","<template>\n <div class=\"model-dropdown-wrapper\" @keydown.esc=\"closeDropdown\">\n <div\n class=\"model-dropdown-trigger\"\n :class=\"[\n `model-dropdown-trigger--${size}`,\n { 'model-dropdown-trigger--open': open },\n ]\"\n @click=\"toggleDropdown\"\n >\n <div class=\"model-dropdown-selected-content\">\n <img\n v-if=\"selectedOption?.imageSrc\"\n :src=\"selectedOption.imageSrc\"\n :alt=\"selectedOption.value\"\n class=\"model-dropdown-selected-image\"\n />\n <span class=\"model-dropdown-placeholder\">\n {{ selectedOption?.value || modelPlaceholder }}\n </span>\n </div>\n <IconChevronDown v-if=\"!open\" class=\"model-dropdown-chevron\" />\n <IconChevronUp v-else class=\"model-dropdown-chevron\" />\n </div>\n\n <!-- Dropdown Menu -->\n <div v-if=\"open\" class=\"model-dropdown-menu\">\n <div v-if=\"searchable\" class=\"model-dropdown-search\">\n <SearchInput\n v-model=\"searchQuery\"\n :placeholder=\"searchPlaceholder\"\n :showCloseButton=\"true\"\n />\n </div>\n\n <ul class=\"model-dropdown-options\">\n <li\n v-for=\"option in filteredOptions\"\n :key=\"option.id\"\n class=\"model-dropdown-option\"\n :class=\"{\n 'model-dropdown-option--selected': selectedOption?.id === option.id,\n }\"\n @click=\"selectOption(option)\"\n >\n <img\n v-if=\"option.imageSrc\"\n :src=\"option.imageSrc\"\n :alt=\"option.value\"\n class=\"model-dropdown-option-image\"\n />\n <span class=\"model-dropdown-option-value\">{{ option.value }}</span>\n </li>\n\n <li\n v-if=\"filteredOptions.length === 0\"\n class=\"model-dropdown-no-options\"\n >\n No providers found\n </li>\n </ul>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, watch, onUnmounted } from \"vue\";\nimport IconChevronDown from \"@/icons/IconChevronDown.vue\";\nimport IconChevronUp from \"@/icons/IconChevronUp.vue\";\nimport SearchInput from \"./SearchInput.vue\";\n\nexport interface ModelOption {\n id: string | number;\n value: string;\n imageSrc?: string;\n}\n\nexport interface ModelDropdownProps {\n options: ModelOption[];\n searchable?: boolean;\n searchPlaceholder?: string;\n modelPlaceholder?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst props = withDefaults(defineProps<ModelDropdownProps>(), {\n searchable: false,\n searchPlaceholder: \"Search providers...\",\n modelPlaceholder: \"Select a model\",\n size: \"md\",\n});\n\nconst emit = defineEmits<{\n (event: \"select\", option: ModelOption): void;\n}>();\n\nconst open = ref(false);\nconst searchQuery = ref(\"\");\nconst selectedOption = ref<ModelOption | null>(null);\n\n// Computed properties\nconst filteredOptions = computed(() => {\n if (!props.searchable || !searchQuery.value) return props.options;\n return props.options.filter((option) =>\n option.value.toLowerCase().includes(searchQuery.value.toLowerCase())\n );\n});\n\n// Methods\nconst toggleDropdown = () => {\n open.value = !open.value;\n if (!open.value) searchQuery.value = \"\";\n};\n\nconst closeDropdown = () => {\n open.value = false;\n searchQuery.value = \"\";\n};\n\nconst selectOption = (option: ModelOption) => {\n selectedOption.value = option;\n emit(\"select\", option);\n closeDropdown();\n};\n\n// Outside click handler\nconst handleClickOutside = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n if (!target.closest(\".model-dropdown-wrapper\")) {\n closeDropdown();\n }\n};\n\n// Watch for dropdown state changes\nwatch(open, (isOpen) => {\n if (isOpen) {\n setTimeout(() => {\n document.addEventListener(\"click\", handleClickOutside);\n }, 0);\n } else {\n document.removeEventListener(\"click\", handleClickOutside);\n }\n});\n\nonUnmounted(() => {\n document.removeEventListener(\"click\", handleClickOutside);\n});\n</script>\n\n<style scoped>\n.model-dropdown-wrapper {\n position: relative;\n width: 100%;\n}\n\n.model-dropdown-trigger {\n gap: 40px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 12px;\n border: 1px solid var(--Colors-Border-border-secondary, #35414b);\n border-radius: 8px;\n background: var(--freddy-bg-primary);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.model-dropdown-trigger:hover {\n border-color: var(--freddy-primary-color);\n}\n\n.model-dropdown-trigger--open {\n border-color: var(--freddy-primary-color);\n}\n\n/* Size variants */\n.model-dropdown-trigger--sm {\n height: 36px;\n}\n\n.model-dropdown-trigger--md {\n height: 40px;\n}\n\n.model-dropdown-trigger--lg {\n height: 42px;\n}\n\n.model-dropdown-selected-content {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n}\n\n.model-dropdown-selected-image {\n width: 20px;\n height: 20px;\n object-fit: contain;\n border-radius: 4px;\n flex-shrink: 0;\n}\n\n.model-dropdown-placeholder {\n font-size: 14px;\n color: var(--freddy-text-primary);\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.model-dropdown-chevron {\n width: 16px;\n height: 16px;\n color: var(--freddy-text-tertiary);\n}\n\n/* Dropdown Menu */\n.model-dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n margin-top: 4px;\n background: var(--freddy-bg-primary);\n border: 2px solid var(--freddy-border-color);\n border-radius: 8px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n overflow: hidden;\n}\n\n.model-dropdown-search {\n padding: 8px;\n border-bottom: 1px solid var(--freddy-border-secondary);\n}\n\n.model-dropdown-options {\n list-style: none;\n margin: 0;\n padding: 4px 0;\n max-height: 280px;\n overflow-y: auto;\n}\n\n.model-dropdown-search .freddy-search-wrapper {\n width: 100%;\n background: var(--freddy-bg-secondary);\n border: 1px solid var(--freddy-border-color);\n border-radius: 4px;\n}\n\n.model-dropdown-search .freddy-search-input {\n color: var(--freddy-text-primary);\n font-size: 13px;\n}\n\n.model-dropdown-search .freddy-search-wrapper:focus-within {\n border-color: var(--freddy-primary-color);\n}\n\n.model-dropdown-option {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n\n.model-dropdown-option:hover {\n background: var(--freddy-bg-secondary);\n}\n\n.model-dropdown-option--selected {\n background: var(--freddy-bg-tertiary);\n}\n\n.model-dropdown-option-image {\n width: 20px;\n height: 20px;\n object-fit: contain;\n border-radius: 4px;\n}\n\n.model-dropdown-option-value {\n font-size: 14px;\n color: var(--freddy-text-primary);\n}\n\n.model-dropdown-no-options {\n padding: 12px;\n text-align: center;\n color: var(--freddy-text-tertiary);\n font-size: 13px;\n}\n</style>\n","<template>\n <EditFeaturedExcerptModal\n :is-visible=\"isVisible\"\n title=\"Edit response format\"\n description=\"Use a JSON schema to define the structure of the model's response format. Learn more.\"\n :initial-content=\"initialJsonContent\"\n :openai-api-key=\"openaiApiKey\"\n :openai-model=\"openaiModel\"\n :openai-organization=\"openaiOrganization\"\n @close=\"$emit('close')\"\n @save=\"handleSave\"\n @cancel=\"$emit('cancel')\"\n @ask-a-i=\"$emit('askAI', $event)\"\n @toggle-a-i=\"handleToggleAI\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import EditFeaturedExcerptModal from './EditFeaturedExcerptModal.vue';\n\n const props = defineProps({\n isVisible: {\n type: Boolean,\n required: true,\n },\n initialJsonContent: {\n type: String,\n default: '{}',\n },\n openaiApiKey: {\n type: String,\n default: '',\n },\n openaiModel: {\n type: String,\n default: 'gpt-4o-mini',\n },\n openaiOrganization: {\n type: String,\n default: '',\n },\n });\n\n const emit = defineEmits(['close', 'save', 'cancel', 'askAI', 'toggleAI']);\n\n const handleSave = (content: string) => {\n // Validate JSON before saving\n try {\n JSON.parse(content);\n emit('save', content);\n } catch {\n alert('Invalid JSON format. Please fix the JSON before saving.');\n }\n };\n\n const handleToggleAI = (isActive: boolean) => {\n emit('toggleAI', isActive);\n };\n</script>\n","<template>\n <nav\n v-if=\"totalPages > 0\"\n class=\"freddy-pagination-nav\"\n aria-label=\"Pagination\"\n >\n <button\n class=\"freddy-pagination-end-button\"\n :class=\"{ 'freddy-pagination-hover-enabled': currentPage !== 1 }\"\n @click=\"goToPage(currentPage - 1)\"\n :disabled=\"currentPage === 1\"\n >\n Previous\n </button>\n\n <div class=\"freddy-pagination-dynamic-container\">\n <button\n v-for=\"page in pages\"\n :key=\"String(page)\"\n class=\"freddy-pagination-number-button\"\n :class=\"{ active: page === currentPage }\"\n @click=\"goToPage(page)\"\n :disabled=\"page === '...' || page === currentPage\"\n >\n {{ page }}\n </button>\n\n <button\n class=\"freddy-pagination-end-button freddy-pagination-next-button\"\n :class=\"{\n 'freddy-pagination-hover-enabled': currentPage !== totalPages,\n }\"\n @click=\"goToPage(currentPage + 1)\"\n :disabled=\"currentPage === totalPages || totalPages === 0\"\n >\n Next\n </button>\n </div>\n </nav>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed } from 'vue';\n\n const props = defineProps({\n totalItems: { type: Number, required: true, default: 0 },\n itemsPerPage: { type: Number, required: true, default: 10 },\n currentPage: { type: Number, required: true, default: 1 },\n });\n\n const emit = defineEmits(['update:currentPage']);\n\n const totalPages = computed(() => {\n if (!props.totalItems || isNaN(props.totalItems)) return 0;\n return Math.ceil(props.totalItems / props.itemsPerPage);\n });\n\n const pages = computed(() => {\n const result: (number | string)[] = [];\n const tp = totalPages.value;\n const cp = props.currentPage;\n\n if (tp <= 7) {\n for (let i = 1; i <= tp; i++) {\n result.push(i);\n }\n } else {\n result.push(1);\n\n if (cp > 4) {\n result.push('...');\n } else {\n result.push(2, 3);\n }\n\n for (let i = Math.max(4, cp - 1); i <= Math.min(tp - 3, cp + 1); i++) {\n result.push(i);\n }\n\n if (cp < tp - 4) {\n result.push('...');\n }\n\n result.push(tp - 2, tp - 1, tp);\n }\n\n return result;\n });\n\n function goToPage(page: number | string) {\n if (page === '...' || page === props.currentPage) return;\n if (typeof page === 'number' && page >= 1 && page <= totalPages.value) {\n emit('update:currentPage', page);\n }\n }\n</script>\n\n<style>\n .freddy-pagination-nav {\n width: 100%;\n display: flex;\n gap: 0.25rem;\n justify-content: space-between;\n padding-top: 14px;\n padding-bottom: 18px;\n position: relative;\n bottom: 0;\n }\n\n .freddy-pagination-number-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n color: rgb(107 114 128);\n cursor: pointer;\n padding: 0.5rem 0.75rem;\n height: auto;\n background: transparent;\n border: none;\n transition: background-color 0.2s, color 0.2s;\n }\n\n /* Active Page Button Style */\n .freddy-pagination-number-button.active {\n background-color: rgba(255, 255, 255, 0.1);\n color: white;\n }\n\n .freddy-pagination-dynamic-container {\n display: flex;\n gap: 0.25rem;\n }\n\n .freddy-pagination-end-button {\n margin-inline-start: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 1rem;\n height: 2.5rem;\n line-height: 1.25rem;\n color: rgb(107 114 128);\n background-color: rgb(3 21 37);\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 0.5rem;\n cursor: pointer;\n transition: background-color 0.2s, color 0.2s;\n }\n\n .freddy-pagination-next-button {\n margin-left: 1rem;\n }\n\n /* Hover Enabled State */\n .freddy-pagination-hover-enabled:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: white;\n cursor: pointer;\n }\n</style>\n","<template>\n <button\n class=\"chat-bar-send-btn\"\n :class=\"{ active: active, [`chat-bar-send-btn--${size}`]: true }\"\n :disabled=\"disabled\"\n @click=\"$emit('click')\"\n >\n <component :is=\"IconSend\" class=\"chat-bar-send-icon\" />\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { useTheme } from \"@/composables/useTheme\";\n\nconst { currentProject, currentColorMode } = useTheme();\n\nimport IconSend from \"@/icons/IconSend.vue\";\nimport IconStopCircle from \"@/icons/IconStopCircle.vue\";\ndefineProps<{\n disabled?: boolean;\n active?: boolean;\n size?: \"s\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n}>();\n</script>\n\n<style>\n.chat-bar-send-btn {\n background: var(--color-primary-500, var(--freddy-primary-color));\n border: none;\n padding: 0;\n margin-bottom: 4px;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--text-inverse); /* Default icon color */\n transition: color 0.2s, background 0.2s;\n}\n\n/* Size variants */\n.chat-bar-send-btn--s {\n width: 24px;\n height: 24px;\n}\n\n.chat-bar-send-btn--sm {\n width: 28px;\n height: 28px;\n}\n\n.chat-bar-send-btn--md {\n width: 32px;\n height: 32px;\n}\n\n.chat-bar-send-btn--lg {\n width: 36px;\n height: 36px;\n}\n\n.chat-bar-send-btn--xl {\n width: 40px;\n height: 40px;\n}\n\n.chat-bar-send-btn.active {\n color: var(--text-300, #cbd6e3); /* Active icon color */\n}\n\n.chat-bar-send-btn:disabled {\n background: var(--bg-300, var(--freddy-border-color));\n cursor: not-allowed;\n color: var(--text-400, var(--text-muted)); /* Disabled icon color */\n}\n\n.chat-bar-send-icon {\n width: 20px;\n height: 20px;\n}\n\n/* Adjust icon size for different button sizes */\n.chat-bar-send-btn--s .chat-bar-send-icon {\n width: 14px;\n height: 14px;\n}\n\n.chat-bar-send-btn--sm .chat-bar-send-icon {\n width: 16px;\n height: 16px;\n}\n\n.chat-bar-send-btn--lg .chat-bar-send-icon {\n width: 22px;\n height: 22px;\n}\n\n.chat-bar-send-btn--xl .chat-bar-send-icon {\n width: 24px;\n height: 24px;\n}\n</style>\n","<script setup lang=\"ts\">\n import type { ISkeletonType } from '@/interfaces';\n\n const props = defineProps<{\n type: ISkeletonType;\n hasHeader?: boolean;\n count?: number;\n }>();\n\n const { type, hasHeader = false, count = 5 } = props;\n</script>\n\n<template>\n <!-- Card Skeleton -->\n <template v-if=\"type === 'card'\">\n <div class=\"skeleton-card\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-w-32 skeleton-h-6 mb-2\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-3-4\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-full\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-5-6\"\n ></div>\n </div>\n </template>\n\n <!-- Paragraph Skeleton -->\n <template v-else-if=\"type === 'paragraph'\">\n <div class=\"skeleton-paragraph\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-40 mb-2\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-full\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-5-6\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-3-4\"\n ></div>\n </div>\n </template>\n\n <!-- Single Box Skeleton -->\n <template v-else-if=\"type === 'single-box'\">\n <div class=\"skeleton-single-box\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-40 mb-2\"\n ></div>\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-4 skeleton-w-full\"\n ></div>\n </div>\n </template>\n\n <!-- Table Skeleton -->\n <template v-else-if=\"type === 'table'\">\n <div class=\"skeleton-table\">\n <div\n v-if=\"hasHeader\"\n class=\"skeleton-line skeleton-wave skeleton-h-6 skeleton-w-40\"\n ></div>\n <table class=\"table-full\">\n <tbody>\n <tr v-for=\"i in count\" :key=\"i\">\n <td class=\"td-padding\">\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-8 skeleton-w-full\"\n ></div>\n </td>\n <td class=\"td-padding\">\n <div\n class=\"skeleton-line skeleton-wave skeleton-h-8 skeleton-w-full\"\n ></div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </template>\n</template>\n\n<style>\n /* Main container styles */\n .skeleton-card {\n background-color: var(--freddy-bg-primary) a8;\n padding: 1rem;\n border: 2px solid var(--text-50, var(--text-inverse)) fff0a;\n border-radius: 0.5rem;\n box-shadow: 4px 7px 27px -13px #fdfdff0f;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n .skeleton-paragraph,\n .skeleton-single-box,\n .skeleton-single-paragraph {\n padding: 1rem;\n border: 2px solid var(--text-50, var(--text-inverse)) fff0a;\n border-radius: 0.75rem;\n background-color: var(--freddy-bg-primary) a8;\n box-shadow: 4px 7px 27px -13px #fdfdff0f;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .skeleton-single-box {\n padding: 8px;\n }\n\n .skeleton-table {\n background-color: var(--freddy-bg-primary) a8;\n padding: 1rem;\n border: 2px solid var(--text-50, var(--text-inverse)) fff0a;\n border-radius: 0.5rem;\n overflow: hidden;\n box-shadow: 4px 7px 27px -13px #fdfdff0f;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n /* Skeleton shimmer */\n .skeleton-wave {\n position: relative;\n overflow: hidden;\n background-color: var(--text-900, var(--freddy-bg-primary));\n }\n .skeleton-wave::after {\n content: '';\n position: absolute;\n top: 0;\n left: -150%;\n height: 100%;\n width: 150%;\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0) 0%,\n rgba(255, 255, 255, 0.7) 50%,\n rgba(255, 255, 255, 0) 100%\n );\n animation: wave 3s ease-in-out infinite;\n }\n @keyframes wave {\n 0% {\n left: -150%;\n }\n 50% {\n left: 100%;\n }\n 100% {\n left: 100%;\n }\n }\n\n /* Skeleton line sizes */\n .skeleton-line {\n background-color: var(--text-50, var(--text-inverse)) fff17;\n border-radius: 0.25rem;\n }\n .skeleton-h-4 {\n height: 1rem;\n }\n .skeleton-h-6 {\n height: 1.5rem;\n }\n .skeleton-h-8 {\n height: 2rem;\n }\n\n .skeleton-w-full {\n width: 100%;\n }\n .skeleton-w-5-6 {\n width: 83.333333%;\n }\n .skeleton-w-3-4 {\n width: 75%;\n }\n .skeleton-w-40 {\n width: 10rem;\n }\n .skeleton-w-32 {\n width: 8rem;\n }\n\n /* Table styles */\n .table-full {\n min-width: 100%;\n border-collapse: collapse;\n }\n .td-padding {\n padding: 0.5rem 1.5rem;\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-slider-container\">\n <!-- Header row with label/tooltip and value display -->\n <div v-if=\"label || showValue\" class=\"freddy-plugins-slider-header\">\n <div v-if=\"label\" class=\"freddy-plugins-slider-label-section\">\n <span class=\"freddy-plugins-slider-label\">{{ label }}</span>\n <Tooltip v-if=\"tooltip\" :text=\"tooltip\" :placement=\"tooltipPlacement\">\n <IconInfoRounded class=\"freddy-plugins-slider-tooltip-icon\" />\n </Tooltip>\n </div>\n <div v-if=\"showValue\" class=\"freddy-plugins-slider-value-badge\">\n {{ displayValue }}\n </div>\n </div>\n\n <!-- Slider track -->\n <div\n class=\"freddy-plugins-slider-track-container\"\n :class=\"{ 'freddy-plugins-slider-disabled': disabled }\"\n @click=\"handleTrackClick\"\n @keydown=\"handleKeyDown\"\n :tabindex=\"disabled ? -1 : 0\"\n role=\"slider\"\n :aria-valuemin=\"min\"\n :aria-valuemax=\"max\"\n :aria-valuenow=\"modelValue\"\n :aria-disabled=\"disabled\"\n :aria-label=\"label || 'Slider'\"\n >\n <!-- Background track -->\n <div\n ref=\"sliderTrack\"\n class=\"freddy-plugins-slider-track-background\"\n ></div>\n\n <!-- Progress fill -->\n <div\n class=\"freddy-plugins-slider-track-progress\"\n :style=\"{ width: progressPercentage + '%' }\"\n ></div>\n\n <!-- Thumb -->\n <div\n class=\"freddy-plugins-slider-thumb\"\n :class=\"{\n 'freddy-plugins-slider-thumb-dragging': isDragging,\n 'freddy-plugins-slider-thumb-disabled': disabled,\n }\"\n :style=\"{ left: thumbPosition + '%' }\"\n @mousedown=\"handleMouseDown\"\n @touchstart=\"handleTouchStart\"\n ></div>\n </div>\n\n <!-- Hint text -->\n <p v-if=\"hint\" class=\"freddy-plugins-slider-hint\">\n {{ hint }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import IconInfoRounded from '@/icons/IconInfoRounded.vue';\n import Tooltip from './Tooltip.vue';\n import type { SliderProps } from '@/interfaces/slider.interfaces';\n\n const props = withDefaults(defineProps<SliderProps>(), {\n min: 0,\n max: 100,\n step: 1,\n disabled: false,\n showValue: true,\n range: false,\n tooltipPlacement: 'top',\n });\n\n const emit = defineEmits<{\n 'update:modelValue': [value: number];\n 'update:rangeValue': [range: [number, number]];\n }>();\n\n // Refs\n const isDragging = ref(false);\n const sliderTrack = ref<HTMLElement | null>(null);\n\n // Computed values\n const displayValue = computed(() => {\n // Determine decimal places based on step value\n const decimalPlaces = props.step.toString().split('.')[1]?.length || 0;\n return decimalPlaces > 0\n ? props.modelValue.toFixed(decimalPlaces)\n : Math.round(props.modelValue);\n });\n\n const progressPercentage = computed(() => {\n const range = props.max - props.min;\n const value = props.modelValue - props.min;\n return Math.min(100, Math.max(0, (value / range) * 100));\n });\n\n const thumbPosition = computed(() => {\n return progressPercentage.value;\n });\n\n // Methods\n const clampValue = (value: number): number => {\n const stepped = Math.round(value / props.step) * props.step;\n return Math.min(props.max, Math.max(props.min, stepped));\n };\n\n const calculateValueFromPosition = (clientX: number): number => {\n if (!sliderTrack.value) return props.modelValue;\n\n const rect = sliderTrack.value.getBoundingClientRect();\n const percentage = Math.max(\n 0,\n Math.min(1, (clientX - rect.left) / rect.width)\n );\n const rawValue = props.min + percentage * (props.max - props.min);\n\n // Apply step rounding\n const steppedValue = Math.round(rawValue / props.step) * props.step;\n return Math.min(props.max, Math.max(props.min, steppedValue));\n };\n\n const updateValue = (newValue: number) => {\n const clampedValue = clampValue(newValue);\n if (clampedValue !== props.modelValue) {\n emit('update:modelValue', clampedValue);\n }\n };\n\n // Mouse handlers\n const handleMouseDown = (event: MouseEvent) => {\n if (props.disabled) return;\n\n event.preventDefault();\n event.stopPropagation();\n isDragging.value = true;\n\n const handleMouseMove = (e: MouseEvent) => {\n if (!isDragging.value) return;\n e.preventDefault();\n const newValue = calculateValueFromPosition(e.clientX);\n updateValue(newValue);\n };\n\n const handleMouseUp = () => {\n isDragging.value = false;\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n };\n\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n };\n\n // Touch handlers\n const handleTouchStart = (event: TouchEvent) => {\n if (props.disabled) return;\n\n event.preventDefault();\n event.stopPropagation();\n isDragging.value = true;\n\n const handleTouchMove = (e: TouchEvent) => {\n if (!isDragging.value || !e.touches[0]) return;\n e.preventDefault();\n updateValue(calculateValueFromPosition(e.touches[0].clientX));\n };\n\n const handleTouchEnd = () => {\n isDragging.value = false;\n document.removeEventListener('touchmove', handleTouchMove);\n document.removeEventListener('touchend', handleTouchEnd);\n };\n\n document.addEventListener('touchmove', handleTouchMove);\n document.addEventListener('touchend', handleTouchEnd);\n };\n\n // Track click handler\n const handleTrackClick = (event: MouseEvent) => {\n if (props.disabled || isDragging.value) return;\n event.preventDefault();\n event.stopPropagation();\n const newValue = calculateValueFromPosition(event.clientX);\n updateValue(newValue);\n };\n\n // Keyboard handler\n const handleKeyDown = (event: KeyboardEvent) => {\n if (props.disabled) return;\n\n let newValue = props.modelValue;\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n event.preventDefault();\n newValue = props.modelValue - props.step;\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n event.preventDefault();\n newValue = props.modelValue + props.step;\n break;\n case 'Home':\n event.preventDefault();\n newValue = props.min;\n break;\n case 'End':\n event.preventDefault();\n newValue = props.max;\n break;\n case 'PageDown':\n event.preventDefault();\n newValue = props.modelValue - props.step * 10;\n break;\n case 'PageUp':\n event.preventDefault();\n newValue = props.modelValue + props.step * 10;\n break;\n default:\n return;\n }\n\n updateValue(newValue);\n };\n</script>\n\n<style scoped>\n .freddy-plugins-slider-container {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n }\n\n .freddy-plugins-slider-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .freddy-plugins-slider-label-section {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .freddy-plugins-slider-label {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n }\n\n .freddy-plugins-slider-tooltip-icon {\n width: 16px;\n height: 16px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n cursor: pointer;\n }\n\n .freddy-plugins-slider-value-badge {\n border: 1px solid var(--colors-border-border-secondary, #35414b);\n border-radius: 4px;\n padding: 0 3px;\n font-family: 'Inter', sans-serif;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n text-align: center;\n min-width: 20px;\n }\n\n .freddy-plugins-slider-track-container {\n position: relative;\n height: 24px;\n width: 100%;\n cursor: pointer;\n outline: none;\n transition: opacity 0.2s ease;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n }\n\n .freddy-plugins-slider-track-container:focus-visible {\n outline: 2px solid var(--colors-texts-text-action, #7ba8ef);\n outline-offset: 2px;\n }\n\n .freddy-plugins-slider-disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .freddy-plugins-slider-track-background {\n position: absolute;\n top: 8px;\n left: 0;\n right: 0;\n height: 8px;\n background-color: var(--colors-texts-text-tetriary, #cbd6e3);\n border-radius: 9999px;\n }\n\n .freddy-plugins-slider-track-progress {\n position: absolute;\n top: 8px;\n left: 0;\n height: 8px;\n background-color: var(--colors-texts-text-action, #7ba8ef);\n border-radius: 9999px;\n transition: width 0.2s ease;\n }\n\n .freddy-plugins-slider-thumb {\n position: absolute;\n top: 0;\n width: 24px;\n height: 24px;\n background-color: #ffffff;\n border: 2px solid var(--colors-texts-text-action, #7ba8ef);\n border-radius: 50%;\n cursor: grab;\n transform: translateX(-50%);\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n touch-action: none;\n }\n\n .freddy-plugins-slider-thumb:hover:not(\n .freddy-plugins-slider-thumb-disabled\n ) {\n transform: translateX(-50%) scale(1.1);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n }\n\n .freddy-plugins-slider-thumb-dragging {\n transform: translateX(-50%) scale(1.15);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);\n cursor: grabbing;\n }\n\n .freddy-plugins-slider-thumb-disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-slider-hint {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n margin: 0;\n }\n</style>\n","<template>\n <div\n class=\"freddy-plugins-snackbar-container\"\n :class=\"`freddy-plugins-snackbar-container--${getContainerSize}`\"\n >\n <div\n v-for=\"(toast, index) in snackQueue\"\n :key=\"index\"\n class=\"freddy-plugins-snackbar\"\n :class=\"`freddy-plugins-snackbar--${toast.toastType}`\"\n >\n <div class=\"freddy-plugins-snackbar-content\">\n <div class=\"freddy-plugins-snackbar-left\">\n <component\n :is=\"getToastIcon(toast.toastType)\"\n class=\"freddy-plugins-snackbar-icon\"\n :class=\"[\n toast.toastType === 'info' &&\n 'freddy-plugins-snackbar-icon--info',\n toast.toastType === 'danger' &&\n 'freddy-plugins-snackbar-icon--danger',\n toast.toastType === 'success' &&\n 'freddy-plugins-snackbar-icon--success',\n ]\"\n />\n\n <div class=\"freddy-plugins-snackbar-text\">\n <p class=\"freddy-plugins-snackbar-title\" v-html=\"toast.title\" />\n <p class=\"freddy-plugins-snackbar-message\" v-html=\"toast.message\" />\n </div>\n </div>\n\n <button\n class=\"freddy-plugins-snackbar-close-btn\"\n @click=\"closeToast(index)\"\n >\n <IconLightCross class=\"freddy-plugins-snackbar-close-icon\" />\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { useTheme } from '@/composables/useTheme';\n\n const { currentProject, currentColorMode } = useTheme();\n\n import { useSnackBar } from '@/utility';\n import { computed } from 'vue';\n import IconLightCross from '@/icons/IconLightCross.vue';\n import { IconCross, IconInfoRounded, IconCheckInCircle } from '@/icons';\n\n const { snackQueue } = useSnackBar();\n\n const getToastIcon = (toastType: string) => {\n switch (toastType) {\n case 'success':\n return IconCheckInCircle;\n case 'danger':\n return IconCross;\n case 'info':\n return IconInfoRounded;\n default:\n return IconCheckInCircle;\n }\n };\n\n const getContainerSize = computed(() => {\n const lastToast = snackQueue.value[snackQueue.value.length - 1];\n if (!lastToast) return 'side70';\n switch (lastToast.toastContainerSize) {\n case 'half':\n return 'half';\n case 'full':\n return 'full';\n default:\n return 'side70';\n }\n });\n\n const closeToast = (index: number) => {\n snackQueue.value.splice(index, 1);\n };\n</script>\n\n<style>\n @keyframes fade-in-right {\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n .freddy-plugins-snackbar-container {\n position: fixed;\n right: 1.25rem; /* 20px */\n bottom: 0.5rem; /* 8px */\n padding-bottom: 17px;\n z-index: 99999; /* Ensure snackbar appears above all modals and overlays */\n }\n\n .freddy-plugins-snackbar-container--side70 {\n width: 78%;\n }\n\n .freddy-plugins-snackbar-container--half {\n width: 50%;\n }\n\n .freddy-plugins-snackbar-container--full {\n width: 100%;\n padding-left: 2.5rem; /* 40px */\n }\n\n .freddy-plugins-snackbar {\n margin-top: 0.75rem; /* 12px */\n padding: 1rem; /* 16px */\n border-radius: 1.5rem; /* 24px */\n background-color: var(--text-900, var(--freddy-bg-primary));\n animation: fade-in-right 0.5s ease-out;\n }\n\n .freddy-plugins-snackbar--info {\n border: 2px solid var(--text-50, var(--text-inverse)) fff;\n box-shadow: 0 0 0 1px var(--text-50, var(--text-inverse));\n }\n\n .freddy-plugins-snackbar--danger {\n border: 2px solid var(--color-warning-500, var(--freddy-warning-color));\n box-shadow: 0 0 0 1px var(--color-warning-500, var(--freddy-warning-color));\n }\n\n .freddy-plugins-snackbar--success {\n border: 2px solid var(--color-success-500, var(--freddy-success-color));\n box-shadow: 0 0 0 1px var(--color-success-500, var(--freddy-success-color));\n }\n\n .freddy-plugins-snackbar-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n }\n\n .freddy-plugins-snackbar-left {\n display: flex;\n gap: 1rem; /* 16px */\n }\n\n .freddy-plugins-snackbar-icon {\n height: 16px; /* 32px */\n width: 16px;\n stroke-width: 2;\n color: var(--text-50, var(--text-inverse)) fff;\n border-radius: 9999px;\n padding: 0.25rem; /* 4px */\n border: 4px solid transparent;\n box-sizing: content-box;\n }\n\n .freddy-plugins-snackbar-icon--info {\n border-color: var(--text-50, var(--text-inverse)) fff33;\n background-color: var(--text-50, var(--text-inverse)) fff17;\n }\n\n .freddy-plugins-snackbar-icon--danger {\n border-color: var(--color-warning-500, var(--freddy-warning-color));\n background-color: var(--color-warning-500, var(--freddy-warning-color));\n }\n\n .freddy-plugins-snackbar-icon--success {\n border-color: var(--color-success-500, var(--freddy-success-color));\n background-color: var(--color-success-400, var(--freddy-success-color));\n }\n\n .freddy-plugins-snackbar-text {\n display: flex;\n flex-direction: column;\n gap: 0.375rem; /* 6px */\n color: var(--text-50, var(--text-inverse)) fff;\n }\n\n .freddy-plugins-snackbar-title {\n font-size: 0.875rem; /* 14px */\n font-weight: 600;\n margin: 0;\n color: var(--text-50, var(--text-inverse)) fff;\n }\n\n .freddy-plugins-snackbar-message {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: normal;\n margin: 0;\n color: var(--text-50, var(--text-inverse)) fff;\n }\n\n .freddy-plugins-snackbar-close-btn {\n position: absolute;\n right: 0.5rem;\n top: 0;\n background: none;\n border: none;\n cursor: pointer;\n }\n\n .freddy-plugins-snackbar-close-icon {\n height: 10px; /* 16px */\n width: 10px;\n stroke-width: 1.67;\n color: white;\n }\n</style>\n","<template>\n <div\n class=\"freddy-plugins-switch-slot\"\n :class=\"{\n 'freddy-plugins-switch-slot--bordered': variant === 'bordered',\n 'freddy-plugins-switch-slot--disabled': disabled,\n }\"\n >\n <!-- Header row with label/tooltip and switch -->\n <div class=\"freddy-plugins-switch-slot__header\">\n <div v-if=\"label || tooltip\" class=\"freddy-plugins-switch-slot__label-section\">\n <span v-if=\"label\" class=\"freddy-plugins-switch-slot__label\">{{ label }}</span>\n <Tooltip v-if=\"tooltip\" :text=\"tooltip\" :placement=\"tooltipPlacement\">\n <IconInfoRounded class=\"freddy-plugins-switch-slot__tooltip-icon\" />\n </Tooltip>\n </div>\n\n <!-- Switch control -->\n <button\n class=\"freddy-plugins-switch-slot__switch\"\n :class=\"{ 'freddy-plugins-switch-slot__switch--on': modelValue }\"\n :aria-checked=\"modelValue\"\n role=\"switch\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"handleToggle\"\n @keydown.space.prevent=\"handleToggle\"\n @keydown.enter.prevent=\"handleToggle\"\n :disabled=\"disabled\"\n >\n <span class=\"freddy-plugins-switch-slot__track\"></span>\n <span class=\"freddy-plugins-switch-slot__thumb\"></span>\n </button>\n </div>\n\n <!-- Slot content section (appears when showSlotContent is true) -->\n <div v-if=\"showSlotContent\" class=\"freddy-plugins-switch-slot__content\">\n <slot name=\"content\" />\n </div>\n\n <!-- Hint text -->\n <p v-if=\"hint\" class=\"freddy-plugins-switch-slot__hint\">\n {{ hint }}\n </p>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import IconInfoRounded from '@/icons/IconInfoRounded.vue';\n import Tooltip from './Tooltip.vue';\n import type {\n SwitchSlotProps,\n SwitchSlotEmits,\n } from '@/interfaces/switch-slot.interfaces';\n\n const props = defineProps<SwitchSlotProps>();\n\n const emit = defineEmits<SwitchSlotEmits>();\n\n const handleToggle = (event: Event) => {\n event.stopPropagation();\n if (!props.disabled) {\n emit('update:modelValue', !props.modelValue);\n }\n };\n</script>\n\n<style scoped>\n .freddy-plugins-switch-slot {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n }\n\n .freddy-plugins-switch-slot--bordered {\n border: 1px solid var(--colors-border-border-secondary, #35414b);\n border-radius: 8px;\n padding: 6px;\n }\n\n .freddy-plugins-switch-slot--disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .freddy-plugins-switch-slot__header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .freddy-plugins-switch-slot__label-section {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .freddy-plugins-switch-slot__label {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n }\n\n .freddy-plugins-switch-slot__tooltip-icon {\n width: 16px;\n height: 16px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n cursor: pointer;\n }\n\n .freddy-plugins-switch-slot__switch {\n position: relative;\n width: 56px;\n height: 30px;\n border: none;\n background: none;\n padding: 0;\n cursor: pointer;\n outline: none;\n display: inline-flex;\n align-items: center;\n transition: opacity 0.2s;\n }\n\n .freddy-plugins-switch-slot__switch:focus-visible {\n outline: 2px solid var(--colors-texts-text-action, #7ba8ef);\n outline-offset: 2px;\n }\n\n .freddy-plugins-switch-slot__switch:disabled {\n cursor: not-allowed;\n }\n\n .freddy-plugins-switch-slot__track {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--colors-background-bg-transparent-grey, #555555);\n border-radius: 100px;\n transition: background 0.2s;\n }\n\n .freddy-plugins-switch-slot__switch--on .freddy-plugins-switch-slot__track {\n background: var(--colors-texts-text-action, #7ba8ef);\n }\n\n .freddy-plugins-switch-slot__thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 26px;\n height: 26px;\n background: #ffffff;\n border-radius: 50%;\n transition: left 0.2s;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n }\n\n .freddy-plugins-switch-slot__switch--on .freddy-plugins-switch-slot__thumb {\n left: 28px;\n }\n\n .freddy-plugins-switch-slot__content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n gap: 8px;\n }\n\n .freddy-plugins-switch-slot__hint {\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--colors-texts-text-tetriary, #cbd6e3);\n margin: 0;\n }\n</style>\n","<template>\n <div class=\"freddy-plugin-nav-bar\">\n <button\n class=\"freddy-plugin-tab-list-menu-button\"\n v-for=\"(tab, index) in tabList\"\n :key=\"index\"\n @click=\"handleTabSwitch(tab)\"\n >\n {{ tab.title }}\n <span\n :class=\"{ 'freddy-plugin-active-tab': activeTab === tab.id }\"\n ></span>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { ref } from 'vue';\n import type { ITabList, IMenuListItem } from '@/interfaces';\n\n // props and emits\n const props = withDefaults(defineProps<ITabList>(), {\n currentTab: 0,\n });\n const emits = defineEmits(['tabSwitch']);\n\n // variables\n const activeTab = ref<number>(props.currentTab);\n\n // click event\n const handleTabSwitch = (tab: IMenuListItem): void => {\n if (activeTab.value === tab.id) return;\n activeTab.value = tab.id;\n emits('tabSwitch', tab.id);\n };\n</script>\n\n<style lang=\"css\">\n .freddy-plugin-nav-bar {\n display: flex;\n width: 100%;\n gap: 24px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.09); /* #FFFFFF17 */\n padding-right: 10px; /* pr-2.5 = 2.5 * 4px */\n font-family: 'Inter', sans-serif;\n font-size: 0.875rem; /* text-sm = 14px */\n font-weight: 600; /* font-semibold */\n }\n\n .freddy-plugin-tab-list-menu-button {\n all: unset; /* unset-all */\n display: flex;\n flex-direction: column;\n padding-top: 8px; /* pt-2 = 0.5rem = 8px */\n cursor: pointer;\n }\n\n .freddy-plugin-active-tab {\n width: 100%;\n background-color: #fff;\n height: 2px; /* h-0.5 = 0.125rem = 2px */\n border-top-left-radius: 0.375rem; /* rounded-t-md */\n border-top-right-radius: 0.375rem;\n }\n</style>\n","<template>\n <div class=\"freddy-plugins-toast-wrapper\">\n <div\n v-for=\"(toast, index) in toastQueue\"\n :key=\"index\"\n :class=\"['freddy-plugins-toast-item', getToastClass(toast.toastType)]\"\n >\n <div class=\"freddy-plugins-toast-icon-wrapper\">\n <component\n :is=\"getToastIcon(toast.toastType)\"\n class=\"freddy-plugins-toast-icon\"\n />\n </div>\n\n <span class=\"freddy-plugins-toast-message\">\n {{ toast.message }}\n </span>\n\n <button\n class=\"freddy-plugins-toast-close-button\"\n @click=\"closeToast(index)\"\n >\n <IconCross class=\"freddy-plugins-toast-close-icon\" />\n </button>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { useToast } from '@/utility/useToast';\n import { IconTick, IconInfoRounded, IconCross } from '@/icons';\n\n const { toastQueue } = useToast();\n\n type ToastType = 'success' | 'danger' | 'info';\n\n const toastTypeMap: Record<ToastType, string> = {\n success: 'freddy-plugins-toast-success',\n danger: 'freddy-plugins-toast-danger',\n info: 'freddy-plugins-toast-info',\n };\n\n const getToastClass = (toastType: ToastType): string =>\n toastTypeMap[toastType];\n\n const getToastIcon = (toastType: string) => {\n switch (toastType) {\n case 'success':\n return IconTick;\n case 'danger':\n return IconCross;\n case 'info':\n return IconInfoRounded;\n default:\n return IconTick;\n }\n };\n\n const closeToast = (index: number) => {\n toastQueue.value.splice(index, 1);\n };\n</script>\n\n<style>\n .freddy-plugins-toast-wrapper {\n position: fixed;\n right: 10px;\n bottom: 10px;\n display: flex;\n flex-direction: column;\n gap: 0.5rem; /* 2px spacing (Tailwind space-y-2) */\n z-index: 99999; /* Ensure toast appears above all modals and overlays */\n }\n\n .freddy-plugins-toast-item {\n display: flex;\n align-items: center;\n padding: 0.625rem; /* Tailwind p-2.5 */\n gap: 0.625rem; /* Tailwind gap-2.5 */\n border-radius: 10px;\n box-shadow: 0 1px 3px var(--border-light);\n animation: fadeIn 0.3s ease;\n }\n\n .freddy-plugins-toast-success {\n background-color: var(--color-success-500, var(--freddy-success-color));\n --toast-icon-color: var(--color-success-500, var(--freddy-success-color));\n }\n\n .freddy-plugins-toast-danger {\n background-color: var(--color-destructive-500, var(--freddy-error-color));\n --toast-icon-color: var(--color-destructive-500, var(--freddy-error-color));\n }\n\n .freddy-plugins-toast-info {\n background-color: var(--color-primary-500, var(--freddy-primary-color));\n --toast-icon-color: var(--color-primary-500, var(--freddy-primary-color));\n }\n\n .freddy-plugins-toast-icon-wrapper {\n width: 1.25rem; /* Tailwind w-5 */\n height: 1.25rem; /* Tailwind h-5 */\n background-color: var(--freddy-bg-secondary);\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-toast-icon {\n width: 100%;\n height: 100%;\n padding: 0.25rem; /* Tailwind p-1 */\n color: var(--toast-icon-color);\n }\n\n .freddy-plugins-toast-message {\n min-width: 16rem; /* Tailwind min-w-64 */\n max-width: 420px; /* Tailwind max-w-[420px] */\n flex: 1 1 auto; /* Tailwind flex-1 */\n font-size: 1rem; /* Tailwind text-[16px] */\n font-weight: 500; /* Tailwind font-medium */\n color: white;\n }\n\n .freddy-plugins-toast-close-button {\n width: 1rem; /* Tailwind w-4 */\n height: 1rem; /* Tailwind h-4 */\n background: transparent;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .freddy-plugins-toast-close-icon {\n width: 100%;\n height: 100%;\n padding: 0.125rem; /* Tailwind p-0.5 */\n color: white;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n</style>\n","import { ref, computed } from 'vue';\n\nexport interface ErrorDetails {\n message: string;\n code?: string | number;\n stack?: string;\n timestamp: string;\n context?: Record<string, unknown>;\n}\n\nexport interface UseErrorHandlerOptions {\n logErrors?: boolean;\n throwOnCritical?: boolean;\n maxRetries?: number;\n}\n\n/**\n * Composable for centralized error handling\n */\nexport function useErrorHandler(options: UseErrorHandlerOptions = {}) {\n const {\n logErrors = true,\n throwOnCritical = false,\n maxRetries = 3\n } = options;\n\n const errors = ref<ErrorDetails[]>([]);\n const isLoading = ref(false);\n const retryCount = ref(0);\n\n const hasErrors = computed(() => errors.value.length > 0);\n const latestError = computed(() => errors.value[errors.value.length - 1] || null);\n\n /**\n * Handle an error with enhanced context\n */\n const handleError = (\n error: unknown,\n context?: Record<string, unknown>\n ): ErrorDetails => {\n const errorDetails: ErrorDetails = {\n message: error instanceof Error ? error.message : String(error),\n stack: error instanceof Error ? error.stack : undefined,\n timestamp: new Date().toISOString(),\n context: {\n ...context,\n retryCount: retryCount.value,\n userAgent: typeof navigator !== 'undefined' ? navigator.userAgent : 'Unknown'\n }\n };\n\n // Add HTTP status code if available\n if (error && typeof error === 'object' && 'status' in error) {\n errorDetails.code = (error as { status: number }).status;\n }\n\n errors.value.push(errorDetails);\n\n // Log in development\n if (logErrors && process.env.NODE_ENV === 'development') {\n // Error logging - implement proper error reporting in production\n // Error: error, Context: context, Details: errorDetails\n }\n\n // Throw critical errors if configured\n if (throwOnCritical && isCriticalError(error)) {\n throw error;\n }\n\n return errorDetails;\n };\n\n /**\n * Handle async operations with error catching\n */\n const handleAsync = async <T>(\n operation: () => Promise<T>,\n context?: Record<string, unknown>\n ): Promise<{ data: T | null; error: ErrorDetails | null }> => {\n isLoading.value = true;\n \n try {\n const data = await operation();\n retryCount.value = 0; // Reset on success\n return { data, error: null };\n } catch (error) {\n const errorDetails = handleError(error, context);\n return { data: null, error: errorDetails };\n } finally {\n isLoading.value = false;\n }\n };\n\n /**\n * Retry an async operation with exponential backoff\n */\n const retryAsync = async <T>(\n operation: () => Promise<T>,\n context?: Record<string, unknown>\n ): Promise<{ data: T | null; error: ErrorDetails | null }> => {\n let lastError: ErrorDetails | null = null;\n\n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n retryCount.value = attempt - 1;\n \n const result = await handleAsync(operation, {\n ...context,\n attempt,\n maxRetries\n });\n\n if (result.data !== null) {\n return result;\n }\n\n lastError = result.error;\n\n // Don't retry on client errors (4xx)\n if (lastError?.code && typeof lastError.code === 'number' && \n lastError.code >= 400 && lastError.code < 500) {\n break;\n }\n\n // Wait before retrying (exponential backoff)\n if (attempt < maxRetries) {\n await new Promise(resolve => \n setTimeout(resolve, Math.pow(2, attempt) * 1000)\n );\n }\n }\n\n return { data: null, error: lastError };\n };\n\n /**\n * Clear all errors\n */\n const clearErrors = () => {\n errors.value = [];\n retryCount.value = 0;\n };\n\n /**\n * Clear specific error by index\n */\n const clearError = (index: number) => {\n if (index >= 0 && index < errors.value.length) {\n errors.value.splice(index, 1);\n }\n };\n\n /**\n * Check if error is critical (should stop execution)\n */\n const isCriticalError = (error: unknown): boolean => {\n if (error instanceof Error) {\n // Network errors are usually not critical\n if (error.name === 'NetworkError' || error.name === 'TypeError') {\n return false;\n }\n \n // Syntax errors are critical\n if (error.name === 'SyntaxError') {\n return true;\n }\n }\n\n // HTTP 5xx errors are critical\n if (error && typeof error === 'object' && 'status' in error) {\n const status = (error as { status: number }).status;\n return status >= 500;\n }\n\n return false;\n };\n\n return {\n // State\n errors: computed(() => errors.value),\n hasErrors,\n latestError,\n isLoading: computed(() => isLoading.value),\n retryCount: computed(() => retryCount.value),\n\n // Methods\n handleError,\n handleAsync,\n retryAsync,\n clearErrors,\n clearError,\n isCriticalError\n };\n}\n","import { ref, computed, onMounted, nextTick } from 'vue';\n\nexport interface PerformanceMetrics {\n renderTime: number;\n componentCount: number;\n memoryUsage?: number;\n timestamp: string;\n}\n\nexport interface UsePerformanceOptions {\n enableMetrics?: boolean;\n trackMemory?: boolean;\n sampleRate?: number; // 0-1, percentage of operations to track\n}\n\n/**\n * Composable for performance monitoring and optimization\n */\nexport function usePerformance(options: UsePerformanceOptions = {}) {\n const {\n enableMetrics = process.env.NODE_ENV === 'development',\n trackMemory = false,\n sampleRate = 0.1\n } = options;\n\n const metrics = ref<PerformanceMetrics[]>([]);\n const isTracking = ref(false);\n const startTime = ref(0);\n\n const averageRenderTime = computed(() => {\n if (metrics.value.length === 0) return 0;\n const total = metrics.value.reduce((sum, m) => sum + m.renderTime, 0);\n return total / metrics.value.length;\n });\n\n const maxRenderTime = computed(() => {\n if (metrics.value.length === 0) return 0;\n return Math.max(...metrics.value.map(m => m.renderTime));\n });\n\n /**\n * Start performance tracking\n */\n const startTracking = (label?: string) => {\n if (!enableMetrics || Math.random() > sampleRate) return;\n \n isTracking.value = true;\n startTime.value = performance.now();\n \n if (label && process.env.NODE_ENV === 'development') {\n }\n };\n\n /**\n * End performance tracking and record metrics\n */\n const endTracking = (label?: string, componentCount = 1) => {\n if (!isTracking.value || !enableMetrics) return;\n \n const endTime = performance.now();\n const renderTime = endTime - startTime.value;\n \n const metric: PerformanceMetrics = {\n renderTime,\n componentCount,\n timestamp: new Date().toISOString()\n };\n\n // Add memory usage if tracking is enabled\n if (trackMemory && 'memory' in performance) {\n const memory = (performance as any).memory;\n metric.memoryUsage = memory.usedJSHeapSize;\n }\n\n metrics.value.push(metric);\n \n // Keep only last 100 metrics to prevent memory leaks\n if (metrics.value.length > 100) {\n metrics.value.shift();\n }\n\n isTracking.value = false;\n \n if (label && process.env.NODE_ENV === 'development') {\n \n // Warn about slow renders\n if (renderTime > 16) { // 60fps threshold\n // Slow render detected - implement performance monitoring in production\n }\n }\n\n return metric;\n };\n\n /**\n * Measure async operation performance\n */\n const measureAsync = async <T>(\n operation: () => Promise<T>,\n label?: string\n ): Promise<{ result: T; metrics: PerformanceMetrics }> => {\n startTracking(label);\n \n try {\n const result = await operation();\n const metrics = endTracking(label) || {\n renderTime: 0,\n componentCount: 1,\n timestamp: new Date().toISOString()\n };\n \n return { result, metrics };\n } catch (error) {\n endTracking(label);\n throw error;\n }\n };\n\n /**\n * Debounce function for performance optimization\n */\n const debounce = <T extends (...args: any[]) => any>(\n func: T,\n wait: number\n ): ((...args: Parameters<T>) => void) => {\n let timeout: ReturnType<typeof setTimeout>;\n \n return (...args: Parameters<T>) => {\n clearTimeout(timeout);\n timeout = setTimeout(() => func(...args), wait);\n };\n };\n\n /**\n * Throttle function for performance optimization\n */\n const throttle = <T extends (...args: any[]) => any>(\n func: T,\n limit: number\n ): ((...args: Parameters<T>) => void) => {\n let inThrottle: boolean;\n \n return (...args: Parameters<T>) => {\n if (!inThrottle) {\n func(...args);\n inThrottle = true;\n setTimeout(() => inThrottle = false, limit);\n }\n };\n };\n\n /**\n * Optimize heavy computations with requestIdleCallback\n */\n const scheduleWork = (callback: () => void, timeout = 5000) => {\n if ('requestIdleCallback' in window) {\n (window as any).requestIdleCallback(callback, { timeout });\n } else {\n // Fallback for browsers without requestIdleCallback\n setTimeout(callback, 0);\n }\n };\n\n /**\n * Lazy load components or data\n */\n const lazyLoad = async <T>(\n loader: () => Promise<T>,\n delay = 0\n ): Promise<T> => {\n if (delay > 0) {\n await new Promise(resolve => setTimeout(resolve, delay));\n }\n \n return new Promise((resolve) => {\n scheduleWork(async () => {\n try {\n const result = await loader();\n resolve(result);\n } catch (error) {\n throw error;\n }\n });\n });\n };\n\n /**\n * Virtual scrolling helper for large lists\n */\n const createVirtualList = <T>(\n items: T[],\n itemHeight: number,\n containerHeight: number\n ) => {\n const visibleCount = Math.ceil(containerHeight / itemHeight);\n const buffer = Math.ceil(visibleCount * 0.5); // 50% buffer\n \n return (scrollTop: number) => {\n const startIndex = Math.max(0, Math.floor(scrollTop / itemHeight) - buffer);\n const endIndex = Math.min(items.length, startIndex + visibleCount + buffer * 2);\n \n return {\n visibleItems: items.slice(startIndex, endIndex),\n startIndex,\n endIndex,\n totalHeight: items.length * itemHeight,\n offsetY: startIndex * itemHeight\n };\n };\n };\n\n /**\n * Clear all metrics\n */\n const clearMetrics = () => {\n metrics.value = [];\n };\n\n /**\n * Get performance summary\n */\n const getSummary = () => {\n return {\n totalMeasurements: metrics.value.length,\n averageRenderTime: averageRenderTime.value,\n maxRenderTime: maxRenderTime.value,\n recentMetrics: metrics.value.slice(-10)\n };\n };\n\n // Auto-track component lifecycle in development\n if (enableMetrics && process.env.NODE_ENV === 'development') {\n onMounted(() => {\n startTracking('Component Mount');\n nextTick(() => {\n endTracking('Component Mount');\n });\n });\n }\n\n return {\n // State\n metrics: computed(() => metrics.value),\n isTracking: computed(() => isTracking.value),\n averageRenderTime,\n maxRenderTime,\n\n // Performance tracking\n startTracking,\n endTracking,\n measureAsync,\n\n // Optimization utilities\n debounce,\n throttle,\n scheduleWork,\n lazyLoad,\n createVirtualList,\n\n // Management\n clearMetrics,\n getSummary\n };\n}\n"],"names":["IconStyleDirective","el","DOMPurify","loadDOMPurify","SAFE_TAGS","SAFE_ATTRS","basicSanitize","html","sanitizeContent","content","vFrSanitize","binding","FreddyPlugin","app","components","n","path","name","_a","defineAsyncComponent","component","frSanitizePlugin","iconStylePlugin","_createElementBlock","_normalizeClass","customClass","customStyle","_createBlock","_Transition","isVisible","_openBlock","_hoisted_1","_createElementVNode","_hoisted_2","largeModel","_hoisted_3","_renderSlot","_ctx","_hoisted_4","_hoisted_5","emit","__emit","handleClick","event","isSelected","_toDisplayString","date","_hoisted_6","assistantId","isDefault","_hoisted_7","_createVNode","_unref","IconLock","props","__props","internalSelectedId","ref","assistantsWithSelection","computed","currentSelectedId","assistant","handleAssistantClick","_Fragment","_renderList","index","AssistantField","$event","handleEditClick","handlePlaygroundClick","getIconComponent","iconName","__variableDynamicImportRuntimeHelper","IconRobotScreen","iconComponent","assistantImage","IconEdit","_resolveDynamicComponent","assistantIcon","_hoisted_8","_hoisted_9","_hoisted_10","IconNewTab","_cache","backgroundColor","imageUrl","altText","IconTick","selectedAvatarId","selectedAvatar","avatar","handleAvatarClick","avatarId","__expose","id","title","avatars","AvatarChoosing","showSelectedInfo","createIconList","iconList","Icons","availableIcons","selectedIconId","selectedImageUrl","selectedImageIndex","selectedFaceId","selectedVoiceId","searchQuery","icon","canSave","handleClose","handleCancel","handleSave","handleImageSelect","handleVoiceSelect","voice","handleSearchInput","value","handleUploadClick","closeButtonAriaLabel","IconCross","description","_hoisted_11","uploadButtonAriaLabel","IconDataUpload","SearchInput","searchPlaceholder","_hoisted_13","_hoisted_15","faces","_hoisted_17","voices","_hoisted_18","_hoisted_19","VoiceSelection","_hoisted_20","cancelButtonText","saveButtonText","_hoisted_21","emits","activeStateType","orientation","computedActiveStateType","currentOrientation","currentStateType","activeTab","watch","newValue","handleTabSwitch","tab","_withKeys","_withModifiers","currentPage","tabsForBaseTabButton","activeTabIndex","tabId","t","handleTabChange","filteredRules","query","rule","visiblePages","pages","total","current","i","handleSearch","handleCreateRule","handleEdit","handleView","handlePageChange","page","handlePreviousPage","handleNextPage","IconSearch","IconPlus","BaseTabButton","IconInfoRounded","_hoisted_12","_hoisted_14","_hoisted_16","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","IconEye","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","totalPages","_hoisted_32","isClicked","IconFileSystem","IconStar","badgeText","IconBadgeCheck","displayedCount","filteredFrames","frame","displayedFrames","filteredCount","hasMoreFrames","remainingCount","handleAddVectorStore","handleShowMore","dbCount","IconQuestion","IconFilter","IconChevronDown","IconAddFileSystem","selectedVoice","handleVoiceClick","voiceId","IconRevertedTriangle","voiceName","useTheme","currentProject","currentColorMode","isLoading","error","availableBrands","availableModes","show","tooltipWrapper","tooltipContent","tooltipStyle","showTimeout","updatePosition","triggerRect","contentRect","top","left","gap","placement","open","nextTick","close","onUnmounted","_Teleport","contentClass","text","iconComponents","LeftIconComponent","RightIconComponent","isHovered","buttonClasses","handleLeftIconClick","handleRightIconClick","handleMouseEnter","handleMouseLeave","tooltip","Tooltip","tooltipPlacement","disabled","loading","iconOnly","label","loadingText","size","leftIcon","rightIcon","providerConfigs","IconGoogle","IconFacebook","IconApple","IconX","IconFigma","IconDribbble","containerClasses","getProviderIcon","provider","getProviderLabel","getButtonClasses","style","providers","theme","highlighted","highlighter","createHighlighter","loadShiki","supportedLangs","highlightCode","onMounted","onChange","target","isChecked","blueCheckbox","ariaLabel","isDashInput","shouldShowBelow","hideTimeout","calculateBestPosition","rect","viewportHeight","tooltipHeight","spaceTop","spaceBottom","handleFocusIn","handleFocusOut","AITextService","apiKey","__publicField","userQuestion","textBoxContent","question","isEdit","keyword","isGeneration","needsStructuredResponse","analysis","messages","userContentParts","original","improved","originalWords","word","improvedWords","added","removed","response","originalText","jsonResponse","stats","userContent","payload","aiResponse","_e","_d","_c","_b","aiTextService","inputValue","messagesContainer","inputRef","isProcessing","newMessages","scrollToBottom","newApiKey","getActionTitle","action","getActionDescription","processWithAI","userMessage","errorMessage","aiMessage","handleSend","message","adjustTextareaHeight","handleNewLine","handleAcceptChanges","handleDenyChanges","changes","apiResponse","parsed","parseApiResponse","displayContent","getDisplayContent","createChangesObject","IconCopy","IconFile","IconCheckRounded","IconRefresh","_hoisted_26","IconThumbsDown","_hoisted_27","IconFolder","placeholder","IconPaperAirPlane","showAI","chatMessages","chatRef","newContent","handleAskAI","handleChatMessage","handleTextReplacement","data","handleTextCompletion","IconEditLinePath","IconSparkle","SimpleChatInterface","textareaRef","aiModalRef","localValue","originalValue","showModal","modalMode","isFocused","computedPlaceholder","handleInput","handleFocus","handleBlur","handleKeydown","handleTextareaClick","handleTooltipClick","handleTooltipKeydown","handleAiKeydown","handleExpand","handleExpandKeydown","handleRemoveTag","handleTagCloseKeydown","handleModalClose","handleModalSave","handleModalCancel","handleModalAskAI","handleToggleAI","showUnderlines","dynamicTitle","required","$slots","tooltipTitle","tooltipDescription","TooltipV2","showAiButton","diffMode","hasError","showTags","tags","tagsOnly","readonly","oldText","newText","tag","showAddTagsPlaceholder","addTagsPlaceholder","IconExpand","showHint","hintText","EditFeaturedExcerptModal","modalTitle","modalDescription","openaiApiKey","openaiModel","openaiOrganization","currentTags","newTags","handleUpdateValue","handleAddTag","handleTagsClick","TextAreaInputField","localContent","diffContent","diffHtml","removedText","addedText","showDiff","toggle","modelValue","selected","localOptions","shallowRef","newOptions","initializeSelected","def","opt","displayLabel","iconToShow","IconChevronUp","toggleDropdown","closeDropdown","filteredOptions","option","handleOptionClick","selectOption","handleToggle","val","idx","o","onClickOutside","BaseButton","chevronRight","showIcon","openUp","searchable","optionIconRight","showShortcut","Switch","brand","resendCooldown","codeDigits","inputRefs","isCodeComplete","digit","verificationCode","handleDigitInput","handlePaste","pastedData","digits","nextEmptyIndex","focusIndex","handleSubmit","handleResend","email","_","_vModelText","inputId","focusInput","colorStyle","baseInputRef","rawValue","displayValue","detectedCardType","baseProps","resolveIcon","resolvedTrailingIcon","cardNumberMaxLength","inputClasses","detectCardType","number","cleanNumber","formatCardNumber","cleanValue","getCardTypeIcon","cardType","icons","handleCardInput","newCardType","handleCardKeydown","handleTrailingIconClick","focus","BaseInput","_mergeProps","showCardIcon","resolvedLeadingIcon","handleLeadingIconClick","inputType","trailingIcon","tooltipText","phoneNumberValue","showCountryDropdown","localCountryCode","defaultCountryOptions","countryOptions","selectedCountry","country","toggleCountryDropdown","selectCountry","currentNumber","newFormattedNumber","handlePhoneInput","fullNumber","handleClickOutside","newCode","variant","phoneProps","cardProps","defaultProps","handleUpdate","handleCountryCodeUpdate","code","handlePhoneNumberUpdate","handleCountryChange","handleCardNumberUpdate","handleCardTypeDetected","PhoneInput","CardInput","DefaultInput","_sfc_main","$props","ModalBox","height","closeModal","clickOutside","headerClass","IconLightCross","attrs","useAttrs","searchInput","dropdownRef","handleClear","IconSearchOptimised","maxCharLimit","showLoaderForSearch","Spinner","showCloseButton","selectedOption","isOpen","modelPlaceholder","isActive","$emit","result","tp","cp","goToPage","active","IconSend","type","hasHeader","count","isDragging","sliderTrack","decimalPlaces","progressPercentage","range","thumbPosition","clampValue","stepped","calculateValueFromPosition","clientX","percentage","steppedValue","updateValue","clampedValue","handleMouseDown","handleMouseMove","e","handleMouseUp","handleTouchStart","handleTouchMove","handleTouchEnd","handleTrackClick","handleKeyDown","showValue","min","max","hint","snackQueue","useSnackBar","getToastIcon","toastType","IconCheckInCircle","getContainerSize","lastToast","closeToast","toast","showSlotContent","tabList","toastQueue","useToast","toastTypeMap","getToastClass","useErrorHandler","options","logErrors","throwOnCritical","maxRetries","errors","retryCount","hasErrors","latestError","handleError","context","errorDetails","isCriticalError","handleAsync","operation","retryAsync","lastError","attempt","resolve","clearErrors","clearError","usePerformance","enableMetrics","trackMemory","sampleRate","metrics","isTracking","startTime","averageRenderTime","sum","m","maxRenderTime","startTracking","endTracking","componentCount","metric","memory","measureAsync","debounce","func","wait","timeout","args","throttle","limit","inThrottle","scheduleWork","callback","lazyLoad","loader","delay","createVirtualList","items","itemHeight","containerHeight","visibleCount","buffer","scrollTop","startIndex","endIndex","clearMetrics","getSummary"],"mappings":";;;;;;AAIA,MAAMA,KAAgC;AAAA,EACpC,QAAQC,GAAiB;AACvB,IAAKA,EAAG,aAAa,OAAO,KAC1BA,EAAG,aAAa,SAAS,qBAAqB;AAAA,EAElD;AACF;ACPA,IAAIC,KAAiB;AAGrB,MAAMC,KAAgB,YAAY;AAChC,MAAI;AAEF,IAAAD,MADwB,MAAM,OAAO,WAAW,GACpB;AAAA,EAC9B,QAAQ;AAAA,EAER;AACF;AAGAC,GAAA;AAEA,MAAMC,KAAY;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEMC,KAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAGMC,KAAgB,CAACC,MACdA,EACJ,QAAQ,uDAAuD,EAAE,EACjE,QAAQ,uDAAuD,EAAE,EACjE,QAAQ,mBAAmB,EAAE,EAC7B,QAAQ,iBAAiB,EAAE,GAG1BC,KAAkB,CAACC,MAA4B;AACnD,MAAI,CAACP;A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