{"version":3,"file":"ProductChat.BKG4O2_N.mjs","names":["useState","useRef","useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/DuGWyiGDm41mYGMhZTHF/qOaG5owckZ92pQ4UxouY/LTY5tTCWk.js","https:/framerusercontent.com/modules/48MhSufmY777vKtLPjcq/8N3j75aMzK1y2F1ZvrfC/ProductChat.js"],"sourcesContent":["// Generated by Framer (0f540f8)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Raleway-italic\",\"Inter-Bold\",\"Inter-BoldItalic\",\"Inter-Italic\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Raleway\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/raleway/v34/1Pt_g8zYS_SKggPNyCgSQamb1W0lwk4S4WjMPrEVIT9c2c8.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/DpPBYI0sL4fYLgAkX8KXOPVt7c.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/4RAEQdEOrcnDkhHiiCbJOw92Lk.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/1K3W8DizY3v4emK8Mb08YHxTbs.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/tUSCtfYVM1I1IchuyCwz9gDdQ.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/VgYFWiwsAC5OYxAycRXXvhze58.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/DXD0Q7LSl7HEvDzucnyLnGBHM.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"normal\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/GIryZETIX4IFypco5pYZONKhJIo.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/H89BbHkbHDzlxZzxi8uPzTsp90.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/u6gJwDuwB143kpNK1T1MDKDWkMc.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/43sJ6MfOPh1LCJt46OvyDuSbA6o.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/wccHG0r4gBDAIRhfHiOlq6oEkqw.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/WZ367JPwf9bRW6LdTHN8rXgSjw.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/QxmhnWTzLtyjIiZcfaLIJ8EFBXU.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/2A4Xx7CngadFGlVV4xrO06OBHY.woff2\",weight:\"700\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/CfMzU8w2e7tHgF4T4rATMPuWosA.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/867QObYax8ANsfX4TGEVU9YiCM.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/Oyn2ZbENFdnW7mt2Lzjk1h9Zb9k.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/cdAe8hgZ1cMyLu9g005pAW3xMo.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/DOfvtmE1UplCq161m6Hj8CSQYg.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/vFzuJY0c65av44uhEKB6vyjFMg.woff2\",weight:\"400\"},{family:\"Inter\",source:\"framer\",style:\"italic\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/tKtBcDnBMevsEEJKdNGhhkLzYo.woff2\",weight:\"400\"}]}];export const css=['.framer-JZ1Ay .framer-styles-preset-1eq0vb1:not(.rich-text-wrapper), .framer-JZ1Ay .framer-styles-preset-1eq0vb1.rich-text-wrapper p { --framer-font-family: \"Raleway\", \"Raleway Placeholder\", sans-serif; --framer-font-family-bold: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-family-italic: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 18px; --framer-font-style: italic; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: 0em; --framer-line-height: 1.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-d7ab75b2-6dc2-4f74-b9b6-ee15c7e7e6f4, #090e19); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-JZ1Ay\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect,useRef,useCallback}from\"react\";import{addPropertyControls,ControlType}from\"framer\";addPropertyControls(ProductChat,{assistantType:{title:\"Assistant Type\",type:ControlType.Enum,options:[\"CAMERA_PRODUCT_QA\",\"LAPTOP_PRODUCT_QA\"],defaultValue:\"CAMERA_PRODUCT_QA\"},productName:{type:ControlType.String,title:\"Product Name\",defaultValue:\"Sony A6600\"},initialMessage:{title:\"Initial Message\",type:ControlType.String,defaultValue:\"Wat wil je weten over de [PRODUCT_NAME]?\"},initialOptions:{title:\"Initial Options\",type:ControlType.Array,control:{type:ControlType.String},defaultValue:[\"Welke lens past hierbij\",\"Hoeveel megapixel heeft de camera?\"]}});const TIMEOUT=6e4;const MAX_RETRIES=2;// Main component for the chat interface\nexport default function ProductChat({productName,initialMessage,initialOptions,assistantType}){// State management\nconst[messages,setMessages]=useState([]);const[inputMessage,setInputMessage]=useState(\"\");const[threadId,setThreadId]=useState(null);const[isLoading,setIsLoading]=useState(false);const[ReactMarkdown,setReactMarkdown]=useState(null);const[showLengthWarning,setShowLengthWarning]=useState(false);const[showInitialMessage,setShowInitialMessage]=useState(false);const[isInitialState,setIsInitialState]=useState(true);const messageRefs=useRef({});// Load initial data and ReactMarkdown\nuseEffect(()=>{loadInitialData();loadReactMarkdown();},[productName]);// Animation on messages\nuseEffect(()=>{const showMessageTimer=setTimeout(()=>{setShowInitialMessage(true);},1e3)// 1 second delay\n;return()=>clearTimeout(showMessageTimer);},[]);// Save messages to localStorage\nuseEffect(()=>{localStorage.setItem(`chat_messages_${productName}`,JSON.stringify(messages));},[messages,productName]);// Save threadId to localStorage\nuseEffect(()=>{if(threadId){localStorage.setItem(`chat_threadId_${productName}`,threadId);}},[threadId,productName]);// Load initial data from localStorage\nconst loadInitialData=useCallback(()=>{const storedMessages=localStorage.getItem(`chat_messages_${productName}`);const storedThreadId=localStorage.getItem(`chat_threadId_${productName}`);if(storedMessages){const parsedMessages=JSON.parse(storedMessages);setMessages(parsedMessages);setIsInitialState(parsedMessages.length<=1);}else{setMessages([{id:Date.now().toString(),text:initialMessage.replace(\"[PRODUCT_NAME]\",productName),sender:\"ai\"}]);setIsInitialState(true);}if(storedThreadId){setThreadId(storedThreadId);}},[productName,initialMessage]);// Load ReactMarkdown dynamically\nconst loadReactMarkdown=useCallback(()=>{import(\"https://esm.sh/react-markdown@9.0.1\").then(module=>{setReactMarkdown(()=>module.default);});},[]);// Scroll to a specific message\nconst scrollToMessage=useCallback(id=>{if(messageRefs.current[id]){var _messageRefs_current_id;(_messageRefs_current_id=messageRefs.current[id])===null||_messageRefs_current_id===void 0?void 0:_messageRefs_current_id.scrollIntoView({behavior:\"smooth\",block:\"start\"});}},[]);// Fetch with timeout functionality\nconst fetchWithTimeout=useCallback((url,options,timeout)=>{return Promise.race([fetch(url,options),new Promise((_,reject)=>setTimeout(()=>reject(new Error(\"Request timed out\")),timeout))]);},[]);// Initialize chat session\nconst initChat=useCallback(async()=>{const attemptInitChat=async(retryCount=0)=>{try{const response=await fetchWithTimeout(\"https://product-chat-backend.onrender.com/product-chat/init\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({assistantType,productName})},TIMEOUT);const data=await response.json();if(data.threadId){setThreadId(data.threadId);return data.threadId;}else{throw new Error(\"No threadId received from server\");}}catch(error){console.error(`Error initializing chat (attempt ${retryCount+1}):`,error);if(retryCount<MAX_RETRIES-1){console.log(`Retrying... (${retryCount+2}/${MAX_RETRIES})`);return attemptInitChat(retryCount+1);}return null;}};return attemptInitChat();},[fetchWithTimeout,productName,assistantType]);// Send message to backend\nconst sendMessageToBackend=useCallback(async(message,currentThreadId)=>{const attemptSendMessage=async(retryCount=0)=>{try{const response=await fetchWithTimeout(\"https://product-chat-backend.onrender.com/product-chat/chat\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({message,threadId:currentThreadId,assistantType,productName})},TIMEOUT);const data=await response.json();if(data.reply){return data.reply;}else{throw new Error(\"No valid reply received from server\");}}catch(error){console.error(`Error in sendMessageToBackend (attempt ${retryCount+1}):`,error);if(retryCount<MAX_RETRIES-1){console.log(`Retrying... (${retryCount+2}/${MAX_RETRIES})`);return attemptSendMessage(retryCount+1);}throw new Error(\"Oeps... de chat lijkt even niet te werken. Probeer het later opnieuw.\");}};return attemptSendMessage();},[fetchWithTimeout,productName,assistantType]);// Sanitize user input\nconst sanitizeInput=useCallback(input=>{return input.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\");},[]);// Truncate text to word limit\nconst truncateToWordLimit=useCallback((text,limit)=>{const words=text.split(/\\s+/);if(words.length<=limit)return text;return words.slice(0,limit).join(\" \");},[]);// Handle input change\nconst handleInputChange=useCallback(e=>{const sanitizedInput=sanitizeInput(e.target.value);const truncatedInput=truncateToWordLimit(sanitizedInput,100);setInputMessage(truncatedInput);setShowLengthWarning(sanitizedInput.length>truncatedInput.length);},[sanitizeInput,truncateToWordLimit]);// Handle sending a message\nconst handleSendMessage=useCallback(async e=>{console.log(\"handleSendMessage called\");let messageToSend;if(typeof e===\"string\"){messageToSend=e;}else{e.preventDefault();messageToSend=inputMessage.trim();}console.log(\"messageToSend:\",messageToSend);console.log(\"threadId:\",threadId);if(messageToSend){setIsInitialState(false);try{setMessages(prevMessages=>[...prevMessages,{id:Date.now().toString(),text:messageToSend,sender:\"user\"}]);setInputMessage(\"\");setIsLoading(true);let currentThreadId=threadId;if(!currentThreadId){console.log(\"ThreadId is null, initializing chat\");currentThreadId=await initChat();if(!currentThreadId){throw new Error(\"Oeps... de chat lijkt even niet te werken. Probeer het later opnieuw.\");}}const aiResponse=await sendMessageToBackend(messageToSend,currentThreadId);console.log(\"Received AI response:\",aiResponse);if(aiResponse){setMessages(prevMessages=>[...prevMessages,{id:(Date.now()+1).toString(),text:aiResponse,sender:\"ai\"}]);}else{throw new Error(\"Geen geldig antwoord ontvangen van de AI.\");}}catch(error){console.error(\"Error in handleSendMessage:\",error);setMessages(prevMessages=>[...prevMessages,{id:Date.now().toString(),text:error instanceof Error?error.message:\"Er is een onbekende fout opgetreden.\",sender:\"ai\",isError:true}]);}finally{setIsLoading(false);}}else{console.log(\"Message not sent. Message is empty.\");}console.log(\"handleSendMessage completed\");},[inputMessage,threadId,initChat,sendMessageToBackend]);// Handle clearing the chat\nconst handleClearChat=useCallback(()=>{setMessages([{id:Date.now().toString(),text:initialMessage.replace(\"[PRODUCT_NAME]\",productName),sender:\"ai\"}]);setThreadId(null);setIsInitialState(true);localStorage.removeItem(`chat_messages_${productName}`);localStorage.removeItem(`chat_threadId_${productName}`);},[productName,initialMessage]);// Render the component\nreturn /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"link\",{href:\"https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css\",rel:\"stylesheet\"}),/*#__PURE__*/_jsxs(\"div\",{className:\"flex flex-col h-full bg-white rounded-lg relative\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"flex-1 overflow-y-auto p-4\",children:[messages.map((message,index)=>/*#__PURE__*/_jsx(\"div\",{ref:el=>messageRefs.current[message.id]=el,className:`mb-4 flex ${message.sender===\"user\"?\"justify-end\":\"justify-start\"} ${index===0?\"mb-2\":\"\"}`,children:/*#__PURE__*/_jsx(\"div\",{className:`inline-block p-3 rounded-lg max-w-[85%] break-words ${message.sender===\"user\"?\"bg-gray-900 text-white text-lg\":message.isError?\"bg-red-100 text-red-800 text-lg\":\"bg-indigo-100 text-gray-800 text-lg\"}`,children:message.sender===\"user\"?/*#__PURE__*/_jsx(\"div\",{children:sanitizeInput(message.text)}):ReactMarkdown?/*#__PURE__*/_jsx(ReactMarkdown,{className:\"prose prose-sm max-w-none\",components:{p:({node,children,...props})=>{const hasNextParagraph=node.next&&node.next.type===\"paragraph\";return /*#__PURE__*/_jsx(\"p\",{className:`text-lg ${hasNextParagraph?\"mb-4\":\"\"}`,...props,children:children});},ul:({node,...props})=>/*#__PURE__*/_jsx(\"ul\",{className:\"list-disc pl-6 mb-4 mt-4\",...props}),ol:({node,...props})=>/*#__PURE__*/_jsx(\"ol\",{className:\"list-decimal pl-6 mb-4 mt-4\",...props}),li:({node,children,...props})=>/*#__PURE__*/_jsx(\"li\",{className:\"mb-2\",...props,children:children},props.index),strong:({node,...props})=>/*#__PURE__*/_jsx(\"strong\",{className:\"font-bold\",...props}),h3:({node,...props})=>/*#__PURE__*/_jsx(\"h3\",{className:\"text-xl font-semibold mb-2\",...props})},children:message.text}):/*#__PURE__*/_jsx(\"div\",{children:message.text})})},message.id)),isLoading&&/*#__PURE__*/_jsx(\"div\",{className:\"text-left mb-4\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"inline-flex space-x-1\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"w-2 h-2 bg-indigo-200 rounded-full animate-bounce\"},\"dot1\"),/*#__PURE__*/_jsx(\"div\",{className:\"w-2 h-2 bg-indigo-200 rounded-full animate-bounce\",style:{animationDelay:\"0.1s\"}},\"dot2\"),/*#__PURE__*/_jsx(\"div\",{className:\"w-2 h-2 bg-indigo-200 rounded-full animate-bounce\",style:{animationDelay:\"0.2s\"}},\"dot3\")]})})]}),showInitialMessage&&isInitialState&&/*#__PURE__*/_jsx(\"div\",{className:\"flex flex-wrap justify-center items-center gap-2 mb-4 px-4\",children:initialOptions.map((option,index)=>/*#__PURE__*/_jsx(\"button\",{onClick:()=>handleSendMessage(option),className:`px-4 py-2 bg-indigo-100 text-gray-800 rounded-full text-sm hover:bg-indigo-200 transition-colors duration-200\n                    animate-option-in opacity-0\n                `,style:{animationDelay:`${index*200}ms`,animationFillMode:\"forwards\"},children:option},index))}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:e=>{e.preventDefault();console.log(\"Form submitted, default prevented\");handleSendMessage(e);},className:\"p-4 bg-gray-900 rounded-b-lg relative\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"flex items-center bg-gray-800 rounded-lg\",children:[/*#__PURE__*/_jsx(\"input\",{type:\"text\",value:inputMessage,onChange:handleInputChange,className:\"flex-1 bg-transparent text-white placeholder-gray-400 px-4 py-2 text-lg focus:outline-none\",placeholder:\"Stel je vraag...\",\"aria-label\":\"Chat input\"}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",className:`\n                                p-2 rounded-lg flex items-center justify-center\n                                ${inputMessage.trim()===\"\"?\"text-gray-400 cursor-not-allowed\":\"text-white hover:bg-gray-700\"}\n                                transition-colors duration-200\n                            `,disabled:inputMessage.trim()===\"\",\"aria-label\":\"Send message\",children:/*#__PURE__*/_jsxs(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",className:\"w-5 h-5\",children:[/*#__PURE__*/_jsx(\"line\",{x1:\"12\",y1:\"19\",x2:\"12\",y2:\"5\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"5 12 12 5 19 12\"})]})})]}),showLengthWarning&&/*#__PURE__*/_jsx(\"p\",{className:\"text-red-500 text-xs mt-1\",children:\"Maximaal aantal van 100 woorden bereikt.\"}),/*#__PURE__*/_jsx(\"p\",{className:\"text-gray-500 text-xs text-center mt-2\",children:\"AI chat kan foutjes maken. Check belangrijke informatie.\"})]}),/*#__PURE__*/_jsx(\"button\",{onClick:handleClearChat,className:\"absolute top-2 right-2 p-1 rounded-full bg-gray-200 hover:bg-gray-300 transition-colors duration-200\",title:\"Chat verwijderen\",\"aria-label\":\"Clear chat\",children:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",className:\"h-5 w-5 text-gray-600\",fill:\"none\",viewBox:\"0 0 24 24\",stroke:\"currentColor\",children:/*#__PURE__*/_jsx(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",strokeWidth:2,d:\"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16\"})})})]}),/*#__PURE__*/_jsx(\"style\",{jsx:true,global:true,children:`\n    @keyframes optionIn {\n        0% { opacity: 0; }\n        100% { opacity: 1; }\n    }\n    .animate-option-in {\n        animation: optionIn 0.3s ease-out;\n    }\n`})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProductChat\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProductChat.map"],"mappings":"2OAC8B,GAAU,UAAU,CAAC,oBAAoB,aAAa,mBAAmB,eAAe,CAAC,CAAc,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,OAAO,UAAU,OAAO,SAAS,MAAM,SAAS,IAAI,gGAAgG,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,0EAA0E,IAAI,wEAAwE,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,wDAAwD,IAAI,wEAAwE,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,cAAc,IAAI,wEAAwE,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,cAAc,IAAI,uEAAuE,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,uGAAuG,IAAI,wEAAwE,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,OAAO,SAAS,MAAM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