document.addEventListener("DOMContentLoaded",(()=>{const n=document.bubbleSettings;n.hide_coco_mention=!0,n.custom_css="#OJIAJ978617_notification-bubble { height: 30px; } #OJIAJ978617_chat-widget-content button { font-size: 16px !important; /* Adjust this value to your desired font size */ } #OJIAJ978617_chat-widget-footer input { font-size: 16px !important; /* Adjust this value as needed */ } #OJIAJ978617_coco-body { margin-bottom: 80px !important; } #OJIAJ978617_notification-bubble, #OJIAJ978617_chat-widget { margin-bottom: 100px !important; } #OJIAJ978617_whatsapp-icon { height: 28px; width: 28px; } #OJIAJ978617_whatsapp-icon img { height: 24px; width: 24px; }",n.phone_number="33756855311";let t="";n.show_mobile_only&&(t+="\n @media (min-width: 768px) {\n #OJIAJ978617_coco-body {\n display: none !important;\n }\n }\n ");const e="full-coco-left"===n.tooltip_position?"left: 15px; right: auto;":"right: 15px; left: auto;",o=n.custom_css||"",i=n.disable_breathe?"":"animation: breathe 2s infinite ease-in-out;";let a=document.getElementById("OJIAJ978617_coco-body");a||(a=document.createElement("div"),a.id="OJIAJ978617_coco-body",document.body.appendChild(a));const s=`\n \n\n
\n ${n.whatsapp_message}\n ×\n
\n \n
\n
1
\n
\n\n \n `;if(a.innerHTML=s,t){const n=document.createElement("style");n.type="text/css",n.innerText=t,document.head.appendChild(n)}const d={cocoBody:a,chatWidget:document.getElementById("OJIAJ978617_chat-widget-container"),whatsappIcon:document.getElementById("OJIAJ978617_whatsapp-icon"),notificationBubble:document.getElementById("OJIAJ978617_notification-bubble"),closeChat:document.getElementById("OJIAJ978617_chat-widget-close"),sendMessageButton:document.getElementById("OJIAJ978617_chat-widget-send"),messageInput:document.querySelector("#OJIAJ978617_chat-widget-footer input"),chatMessages:document.getElementById("OJIAJ978617_chat-messages"),closeAllMessages:document.getElementById("OJIAJ978617_notification-bubble-close"),notificationText:document.getElementById("OJIAJ978617_notification-bubble-text"),headerChatBox:document.getElementById("OJIAJ978617_chat-widget-header"),cartDrawer:document.querySelector(".drawer.is-empty"),poweredBy:document.getElementById("OJIAJ978617_powered-by"),messageNotification:document.getElementById("OJIAJ978617_message-notification"),chatWidgetContent:document.getElementById("OJIAJ978617_chat-widget-content")};if(setTimeout((()=>{d.cocoBody.style.display="block"}),n.delay),d.cartDrawer){new MutationObserver((n=>{n.forEach((n=>{if("class"===n.attributeName){const n=d.cartDrawer.classList.contains("active");d.cocoBody.style.display=n?"none":"block"}}))})).observe(d.cartDrawer,{attributes:!0})}function c(t){let e=n.phone_number;n.is_relayed&&(t=`@[${n.relaying_slug_name}]\n${t}`,e=n.relaying_phone_number);const o=`https://api.whatsapp.com/send/?phone=${e}&text=${encodeURIComponent(t)}`;window.open(o,"_blank")}function r(){const t=document.createElement("div");t.textContent="...",t.className="typing-indicator",d.chatMessages.appendChild(t),setTimeout((()=>{d.chatMessages.removeChild(t),function(){const t=document.createElement("div");t.textContent=n.whatsapp_message_inside,t.className="welcome-message",d.chatMessages.appendChild(t)}()}),2e3)}function l(t=!1){"block"===d.chatWidget.style.display?function(t=!1){d.chatWidget.style.display="none",d.notificationBubble.style.display="flex",localStorage.removeItem("notificationBubbleHidden"),d.chatMessages.innerHTML="",u(),n.show_notification_bubble||(d.notificationBubble.style.display="none");t&&localStorage.setItem("keepClosed","true")}(t):(d.chatWidget.style.display="block",function(n=!1){d.notificationBubble.style.display="none",n&&localStorage.setItem("notificationBubbleHidden","true")}(),r(),b&&(clearInterval(b),d.notificationText.textContent=n.whatsapp_message,b=null))}const p=window.location.href,g=n.path_filter,h=!g||function(n,t){try{return new RegExp(t).test(n)}catch(n){return console.error("Invalid regex pattern:",t),!1}}(p,g);d.notificationText.addEventListener("click",(()=>l())),d.headerChatBox.addEventListener("click",(()=>l())),d.closeAllMessages.addEventListener("click",(()=>{n.show_notification_bubble=!1,localStorage.setItem("notificationBubbleHidden","true"),d.notificationBubble.style.display="none"})),d.sendMessageButton.addEventListener("click",(()=>{const n=d.messageInput.value.trim();n&&(c(n),d.messageInput.value="")})),d.messageInput.addEventListener("keypress",(n=>{"Enter"===n.key&&(n.preventDefault(),d.sendMessageButton.click())})),n.hide_coco_mention&&d.poweredBy&&(d.poweredBy.style.display="none"),n.show_notification_bubble||(d.notificationBubble.style.display="none"),d.chatWidgetContent.addEventListener("click",(n=>{if("BUTTON"===n.target.tagName){c(n.target.getAttribute("data-message"))}})),d.whatsappIcon.addEventListener("click",(()=>l()));let b=null;function u(){if(b)return;let t=1;const e=[n.whatsapp_message,n.button_one,n.button_two,n.button_three];b=setInterval((()=>{d.notificationText.textContent=e[t],t=(t+1)%e.length}),3500)}u(),h||(d.cocoBody.style.display="none",d.whatsappIcon.style.display="none",d.messageNotification&&(d.messageNotification.style.display="none"),d.notificationBubble.style.display="none")}));