@eka-care/apollo-assist 0.1.33-dev.0 → 0.1.33-dev.1

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.
Binary file
@@ -1 +1 @@
1
- !function(){const n=(()=>{if("undefined"==typeof document)return console.error("document is not defined"),null;const{currentScript:n}=document;if(n instanceof HTMLScriptElement)return n;const e=document.getElementsByTagName("script");return e.length?e[e.length-1]:null})();var e=n?.src?n.src.replace(/\/[^/]*$/,"/"):"https://unpkg.com/@eka-care/apollo-assist@latest/dist/",t={theme:"client",position:"bottom-right",scriptUrl:e+"widget.js",cssUrl:e+"assets/widget.css",mode:"widget",primaryColor:"#007C9E"},i={isLoaded:!1,isVisible:!1,instance:null,config:null,stage:1,inactivityTimer:null,stage2Timer:null,firstUserMessage:null,isClosed:!1};function a(n){const e=("; "+document.cookie).split("; "+n+"=");return 2===e.length?e.pop().split(";").shift():null}function o(n,e,t=1){const i=new Date;i.setTime(i.getTime()+24*t*60*60*1e3);const a=window.location.hostname;document.cookie=n+"="+e+";expires="+i.toUTCString()+";path=/; domain="+a+"; SameSite=Lax; Secure;"}function s(n,e){var t=e/200,i=80*t,a=60*t,o=60*t,s=90*t,r=40*t,d=50*t;if(!document.getElementById("apollo-icon-styles")){var l=document.createElement("style");l.id="apollo-icon-styles",l.textContent="\n @keyframes spinBlue {\n 0% { transform: rotate(0deg); }\n 22% { transform: rotate(147deg); }\n 38% { transform: rotate(311deg); }\n 61% { transform: rotate(73deg); }\n 79% { transform: rotate(222deg); }\n 100% { transform: rotate(360deg); }\n }\n @keyframes spinYellow {\n 0% { transform: rotate(0deg); }\n 18% { transform: rotate(260deg); }\n 36% { transform: rotate(105deg); }\n 59% { transform: rotate(330deg); }\n 83% { transform: rotate(185deg); }\n 100% { transform: rotate(540deg); }\n }\n @keyframes fadeA {\n 0%, 35% { opacity: 1; }\n 45%, 65% { opacity: 0; }\n 100% { opacity: 1; }\n }\n @keyframes fadeB {\n 0%, 35% { opacity: 0; }\n 45%, 65% { opacity: 1; }\n 100% { opacity: 0; }\n }\n ",document.head.appendChild(l)}n.innerHTML=`\n <div style="width: ${e}px; height: ${e}px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: #fff;">\n <div style="position: absolute; border-radius: 50%; overflow: hidden; width: ${i}px; height: ${i}px; left: ${o}px; top: ${s}px;">\n <div style="position: absolute; inset: 0; border-radius: 50%;">\n <div style="position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(0deg, #2582a1, #fde047); background-size: 200% 200%; animation: spinBlue 16s linear infinite, fadeA 16s ease-in-out infinite;"></div>\n <div style="position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(0deg, #fde047, #2582a1); background-size: 200% 200%; animation: spinBlue 16s linear infinite, fadeB 16s ease-in-out infinite;"></div>\n </div>\n </div>\n <div style="position: absolute; border-radius: 50%; overflow: hidden; width: ${a}px; height: ${a}px; left: ${r}px; top: ${d}px;">\n <div style="position: absolute; inset: 0; border-radius: 50%;">\n <div style="position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(0deg, #fde047, #2582a1); background-size: 200% 200%; animation: spinYellow 17s linear infinite 0.8s, fadeB 16s ease-in-out infinite 0.8s;"></div>\n <div style="position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(0deg, #2582a1, #fde047); background-size: 200% 200%; animation: spinYellow 17s linear infinite 0.8s, fadeA 16s ease-in-out infinite 0.8s;"></div>\n </div>\n </div>\n </div>\n `}function r(){var n=window.EkaMedAssist._button;if(n){var e=window.innerWidth<=768;if(n.className="eka-widget-button",n.innerHTML="",console.log("update button apperance called"),1===i.stage){n.className="eka-widget-button stage-1";var t=document.createElement("div");t.className="eka-icon-container",s(t,e?32:40),n.appendChild(t)}else if(2===i.stage){n.className="eka-widget-button stage-2",n.innerHTML='\n <div class="eka-stage-2-content" data-action="open">\n <button class="eka-chat-close" data-action="close">×</button>\n <div class="eka-stage-2-text">\n <p class="eka-stage-2-title">Hi, Need some help?</p>\n <p class="eka-stage-2-subtitle">I\'m happy to assist.</p>\n </div>\n <div class="eka-stage-2-icon"></div>\n </div>\n ';var a=n.querySelector(".eka-stage-2-icon");a&&s(a,e?28:36)}else if(3===i.stage){var o=function(n){var e=Date.now()-n,t=Math.floor(e/1e3),i=Math.floor(t/60),a=Math.floor(i/60),o=Math.floor(a/24);if(t<60)return"Just now";if(i<60)return`${i}m ago`;if(a<24)return`${a}h ago`;if(o<30)return`${o}d ago`}(Date.now());n.className="eka-widget-button stage-3",n.innerHTML=`\n <div class="eka-stage-3-overlay">\n \x3c!-- Chat bubble --\x3e\n <div class="eka-chat-bubble">\n <button class="eka-chat-close" data-action="close">×</button>\n <div class="eka-chat-bubble-content" data-action="open">\n <div class="eka-chat-avatar">🤖</div>\n <div class="eka-chat-message">\n <p class="eka-chat-text">Hi 👋🏻 Need help booking an appointment or finding the right doctor?</p>\n <p class="eka-chat-timestamp">Apollo Assist • ${o}</p>\n </div>\n </div>\n </div>\n\n \x3c!-- Pills --\x3e\n <div class="eka-pills-container">\n <button class="eka-pill" data-action="appointment">\n 📅 Book an appointment\n </button>\n <button class="eka-pill focused" data-action="doctor">\n 🔍 Help me find a doctor\n </button>\n <button class="eka-pill" data-action="emergency">\n 🆘 I'm in emergency\n </button>\n </div>\n\n \x3c!-- Widget icon button --\x3e\n <button class="eka-widget-icon-button" data-action="open">\n <div class="eka-icon-container"></div>\n <div class="eka-notification-badge">1</div>\n </button>\n </div>\n `;var r=n.querySelector(".eka-icon-container");r&&s(r,e?32:40)}}}function d(){clearTimeout(i.inactivityTimer),clearTimeout(i.stage2Timer);"close"===a("medassist-preferences")&&(i.isClosed=!0),i.isClosed||(i.inactivityTimer=setTimeout(function(){i.isVisible||1!==i.stage||i.isClosed||l(2)},5e3))}function l(n){console.log("setStage",n),clearTimeout(i.inactivityTimer),clearTimeout(i.stage2Timer),i.stage=n,r(),1===n&&d()}function c(n,e){console.log("Pill clicked:",n),l(1);var t="";switch(n){case"appointment":t="Book an appointment";break;case"doctor":t="Help me find a doctor";break;case"emergency":t="I'm in emergency";break;default:t="Other"}window._first_user_message=t,i.firstUserMessage=t,u(e)}function p(n,e){if(i.isLoaded)e();else{if(n.cssUrl){var t=document.createElement("link");t.rel="stylesheet",t.href=n.cssUrl,document.head.appendChild(t)}var a=document.createElement("script");a.src=n.scriptUrl,a.onload=function(){console.log("Eka Medical Assistant bundle loaded"),i.isLoaded=!0,e()},a.onerror=function(){console.error("Failed to load bundle")},document.head.appendChild(a)}}function g(n){window.EkaMedAssistWidget&&window.EkaMedAssistWidget.init?(i.instance=window.EkaMedAssistWidget.init({theme:n.theme,primaryColor:n.primaryColor,onMinimize:function(){m(),x()},onClose:function(){m(),x()},mode:n.mode,firstUserMessage:i?.firstUserMessage||""}),i.isVisible=!0,i.firstUserMessage=null,window._first_user_message=null,b()):console.error("EkaMedAssistWidget not available")}function u(n){i.isLoaded?i.isVisible?m():f(n):(clearTimeout(i.inactivityTimer),clearTimeout(i.stage2Timer),p(n,function(){g(n)}))}function f(n){o("medassist-preferences","open"),i.isClosed=!1,i.isLoaded?i.isVisible||(i.instance?i.instance.container&&(i.instance.container.style.display="block"):g(n),i.isVisible=!0,b()):p(n,function(){g(n)})}function m(){i.instance&&i.isVisible&&(i.instance.destroy&&(i.instance.destroy(),i.instance=null),i.isClosed=!0,i.isVisible=!1,o("medassist-preferences","close"),x(),d())}function x(){window.EkaMedAssist._button&&(window.EkaMedAssist._button.style.display="flex",l(1))}function b(){window.EkaMedAssist._button&&(window.EkaMedAssist._button.style.display="none")}function h(n){var e;if(!window.EkaMedAssist||!window.EkaMedAssist._initialized)if(n=Object.assign({},t,n),(e=document.createElement("style")).id="eka-widget-styles",e.textContent="\n /* Reset and base styles */\n .eka-widget-button {\n all: initial; // prevents the button from inheriting styles from the parent page\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n cursor: pointer;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n z-index: 2147483647;\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n }\n \n /* Stage 1: Icon only */\n .eka-widget-button.stage-1 {\n width: 56px;\n height: 56px;\n border-radius: 50%;\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: #ffffff;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n padding: 0;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n }\n\n .eka-widget-button.stage-1:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n }\n\n /* Stage 2: Oval with text */\n .eka-widget-button.stage-2 {\n width: 280px;\n height: 60px;\n border-radius: 30px;\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: #FDE047;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n padding: 8px 8px 8px 24px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n }\n\n .eka-widget-button.stage-2:hover {\n transform: translateY(-2px);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n }\n\n .eka-stage-2-content {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 16px;\n padding: 8px 24px 8px 8px;\n }\n\n .eka-stage-2-text {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n }\n\n .eka-stage-2-title {\n font-size: 16px;\n font-weight: 600;\n color: #000000;\n line-height: 1.2;\n margin: 0;\n }\n\n .eka-stage-2-subtitle {\n font-size: 12px;\n font-weight: 400;\n color: #000000;\n line-height: 1.2;\n margin: 0;\n }\n\n .eka-stage-2-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: #ffffff;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* Stage 3: Full overlay with floating elements */\n .eka-widget-button.stage-3 {\n width: auto;\n height: auto;\n background: transparent;\n box-shadow: none;\n bottom: 0;\n right: 0;\n pointer-events: none;\n }\n\n .eka-stage-3-overlay {\n position: fixed;\n bottom: 20px; /* Same as widget button */\n right: 20px; /* Same as widget button */\n width: auto;\n height: auto;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 16px;\n z-index: 2147483647;\n }\n\n /* Chat bubble */\n .eka-chat-bubble {\n position: relative;\n background: #fde047;\n border-radius: 16px;\n padding: 14px 16px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n max-width: 340px;\n pointer-events: auto;\n order: 1;\n z-index: 2147483647;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n }\n\n .eka-chat-bubble:hover {\n transform: translateY(-2px);\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);\n }\n\n .eka-chat-bubble-content {\n display: flex;\n gap: 12px;\n align-items: center;\n padding-right: 20px;\n }\n\n .eka-chat-avatar {\n font-size: 28px;\n line-height: 1;\n flex-shrink: 0;\n padding-bottom: 24px;\n }\n\n .eka-chat-message {\n flex: 1;\n }\n\n .eka-chat-text {\n margin: 0 0 4px 0;\n font-size: 14px;\n font-weight: 500;\n color: #000000;\n line-height: 1.3;\n }\n\n .eka-chat-timestamp {\n margin: 0;\n font-size: 11px;\n color: #666666;\n line-height: 1.2;\n }\n\n .eka-chat-close {\n position: absolute;\n top: 2px;\n right: 8px;\n width: 12px;\n height: 12px;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 22px;\n color: #666666;\n line-height: 1;\n padding: 0;\n border-radius: 50%;\n transition: background-color 0.2s ease;\n }\n\n .eka-chat-close:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n\n /* Pills container */\n .eka-pills-container {\n position: relative;\n display: flex;\n flex-direction: row;\n gap: 8px;\n justify-content: flex-end;\n flex-wrap: wrap;\n order: 2;\n z-index: 2147483647;\n }\n\n .eka-pill {\n background: #fde047;\n border: none;\n border-radius: 24px;\n padding: 10px 18px;\n font-size: 13px;\n font-weight: 500;\n pointer-events: auto;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n white-space: nowrap;\n transition: all 0.2s ease;\n color: #000000;\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .eka-pill:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n .eka-pill.focused {\n border: 2px solid #fde047;\n padding: 8px 16px;\n }\n\n /* Widget icon button */\n .eka-widget-icon-button {\n position: relative;\n width: 54px;\n height: 54px;\n background: white;\n border-radius: 50%;\n cursor: pointer;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n border: none;\n padding: 0;\n order: 3;\n z-index: 2147483647;\n }\n\n .eka-widget-icon-button:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);\n }\n\n .eka-notification-badge {\n position: absolute;\n top: -4px;\n right: -4px;\n background: #ff4444;\n color: #ffffff;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: bold;\n border: 2px solid #ffffff;\n }\n\n /* Icon container */\n .eka-icon-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* Mobile responsive styles */\n @media (max-width: 992px) {\n .eka-stage-3-overlay {\n bottom: 82px;\n }\n }\n\n @media (max-width: 767px) {\n .eka-stage-3-overlay {\n bottom: 246px;\n }\n }\n\n @media (max-width: 768px) {\n .eka-widget-button {\n bottom: 16px;\n right: 16px;\n }\n\n .eka-widget-button.stage-1 {\n width: 50px;\n height: 50px;\n }\n\n .eka-widget-button.stage-2 {\n width: auto;\n height: 55px;\n border-radius: 27.5px;\n // padding: 2px 15px;\n }\n\n .eka-stage-2-icon {\n width: 35px;\n height: 35px;\n }\n\n .eka-stage-2-title {\n font-size: 13px;\n }\n\n .eka-stage-2-subtitle {\n font-size: 11px;\n }\n\n .eka-chat-bubble {\n max-width: 300px;\n padding: 12px 14px;\n }\n\n .eka-chat-avatar {\n font-size: 24px;\n padding-bottom: 24px;\n }\n\n .eka-chat-text {\n font-size: 13px;\n }\n\n .eka-pills-container {\n display: none;\n // bottom: 80px;\n // right: 16px;\n // max-width: calc(100vw - 32px);\n }\n\n .eka-pill {\n font-size: 12px;\n padding: 8px 14px;\n }\n\n .eka-pill.focused {\n padding: 6px 12px;\n }\n\n .eka-widget-icon-button {\n display: none;\n // bottom: 16px;\n // right: 16px;\n // width: 56px;\n // height: 56px;\n }\n }\n\n /* Animation keyframes */\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\n .eka-chat-bubble,\n .eka-pills-container,\n .eka-widget-icon-button {\n animation: fadeIn 0.3s ease;\n }\n\n @keyframes stage2FadeIn {\n from {\n opacity: 0;\n transform: scale(0.8) translateX(20px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateX(0);\n }\n }\n\n @keyframes stage1FadeOut {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.9);\n }\n }\n ",document.head.appendChild(e),function(){const n=a("medassist-preferences");null===n?(o("medassist-preferences","open"),i.isClosed=!1):i.isClosed="close"===n}(),"full"===function(){const n=document.querySelectorAll('script[src*="widget-loader.js"]');let e=null,i=null;document.currentScript&&document.currentScript.src?e=document.currentScript.src:n.length>0&&(e=n[n.length-1].src),e&&(i=new URL(e,window.location.href).searchParams.get("mode"));return i||t.mode}())u({...n,mode:"full"}),window.EkaMedAssist&&(window.EkaMedAssist._initialized=!0);else{var p=function(n){var e=document.createElement("button");e.className="eka-widget-button stage-1";var t=document.createElement("div");return t.className="eka-icon-container",s(t,40),e.appendChild(t),e.addEventListener("click",function(e){console.log("click",e);var t=e.target.closest("[data-action]");if(t){var a=t.getAttribute("data-action");e.stopPropagation(),"close"===a?(console.log("close"),l(1),i.isClosed=!0,o("medassist-preferences","close")):"open"===a?u(n):"appointment"!==a&&"doctor"!==a&&"emergency"!==a||c(a,n)}else console.log("no target found, toggling widget"),u(n)}),e.addEventListener("mouseenter",function(){1===i.stage&&d()}),window.addEventListener("resize",r),d(),e}(n);document.body.appendChild(p),window.EkaMedAssist&&(window.EkaMedAssist._initialized=!0,window.EkaMedAssist._button=p)}}function k(){window.EkaMedAssist._initialized||h(t)}window.EkaMedAssist={init:function(n){h(n)},show:f,hide:m,toggle:u,setStage:l,handlePillClick:c,config:t,_initialized:!1,_button:null},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()}();
1
+ !function(){const n=()=>{if("undefined"==typeof document)return console.error("document is not defined"),null;const{currentScript:n}=document;if(n instanceof HTMLScriptElement)return n;const e=document.querySelectorAll('script[src*="widget-loader.js"]');return e.length?e[e.length-1]:null},e=n();var t=e?.src?e.src.replace(/\/[^/]*$/,"/"):"https://unpkg.com/@eka-care/apollo-assist@latest/dist/",i={theme:"client",position:"bottom-right",scriptUrl:t+"widget.js",cssUrl:t+"assets/widget.css",mode:"widget",primaryColor:"#007C9E"},s={isLoaded:!1,isVisible:!1,instance:null,config:null,stage:1,inactivityTimer:null,stage2Timer:null,firstUserMessage:null,isClosed:!1};function a(n){const e=("; "+document.cookie).split("; "+n+"=");return 2===e.length?e.pop().split(";").shift():null}function o(n,e,t=1){const i=new Date;i.setTime(i.getTime()+24*t*60*60*1e3);const s=window.location.hostname;document.cookie=n+"="+e+";expires="+i.toUTCString()+";path=/; domain="+s+"; SameSite=Lax; Secure;"}function r(n,e){var i=document.createElement("img");i.src=t+"assets/apollo_icon.gif",i.alt="Apollo Assist",i.setAttribute("width",e),i.setAttribute("height",e),i.style.width=e+"px",i.style.height=e+"px",i.style.objectFit="contain",i.style.display="block",n.innerHTML="",n.appendChild(i)}function d(){var n=window.EkaMedAssist._button;if(n){var e=window.innerWidth<=768;if(n.className="eka-widget-button",n.innerHTML="",1===s.stage){n.className="eka-widget-button stage-1";var t=document.createElement("div");t.className="eka-icon-container",r(t,e?32:40),n.appendChild(t)}else if(2===s.stage){n.className="eka-widget-button stage-2",n.innerHTML='\n <div class="eka-stage-2-content" data-action="open">\n <button class="eka-chat-close" data-action="close">×</button>\n <div class="eka-stage-2-text">\n <p class="eka-stage-2-title">Hi, Need some help?</p>\n <p class="eka-stage-2-subtitle">I\'m happy to assist.</p>\n </div>\n <div class="eka-stage-2-icon"></div>\n </div>\n ';var i=n.querySelector(".eka-stage-2-icon");i&&r(i,e?28:36)}}}function l(){clearTimeout(s.inactivityTimer),clearTimeout(s.stage2Timer);"close"===a("medassist-preferences")&&(s.isClosed=!0),s.isClosed||(s.inactivityTimer=setTimeout(function(){s.isVisible||1!==s.stage||s.isClosed||c(2)},5e3))}function c(n){clearTimeout(s.inactivityTimer),clearTimeout(s.stage2Timer),s.stage=n,d(),1===n&&l()}function p(n,e){if(s.isLoaded)e();else{if(n.cssUrl){var t=document.createElement("link");t.rel="stylesheet",t.href=n.cssUrl,document.head.appendChild(t)}var i=document.createElement("script");i.src=n.scriptUrl,i.onload=function(){s.isLoaded=!0,e()},i.onerror=function(){console.error("Failed to load bundle")},document.head.appendChild(i)}}function u(n){window.EkaMedAssistWidget&&window.EkaMedAssistWidget.init?(s.instance=window.EkaMedAssistWidget.init({theme:n.theme,primaryColor:n.primaryColor,onMinimize:function(){f(),x()},onClose:function(){f(),x()},mode:n.mode,firstUserMessage:s?.firstUserMessage||""}),s.isVisible=!0,s.firstUserMessage=null,window._first_user_message=null,h()):console.error("EkaMedAssistWidget not available")}function g(n){s.isLoaded?s.isVisible?f():m(n):(clearTimeout(s.inactivityTimer),clearTimeout(s.stage2Timer),p(n,function(){u(n)}))}function m(n){o("medassist-preferences","open"),s.isClosed=!1,s.isLoaded?s.isVisible||(s.instance?s.instance.container&&(s.instance.container.style.display="block"):u(n),s.isVisible=!0,h()):p(n,function(){u(n)})}function f(){s.instance&&s.isVisible&&(s.instance.destroy&&(s.instance.destroy(),s.instance=null),s.isClosed=!0,s.isVisible=!1,o("medassist-preferences","close"),x(),l())}function x(){window.EkaMedAssist._button&&(window.EkaMedAssist._button.style.display="flex",c(1))}function h(){window.EkaMedAssist._button&&(window.EkaMedAssist._button.style.display="none")}function w(e){var t;if(!window.EkaMedAssist||!window.EkaMedAssist._initialized)if(e=Object.assign({},i,e),(t=document.createElement("style")).id="eka-widget-styles",t.textContent="\n /* Reset and base styles */\n .eka-widget-button {\n all: initial; // prevents the button from inheriting styles from the parent page\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n cursor: pointer;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n z-index: 2147483647;\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n }\n \n /* Stage 1: Icon only */\n .eka-widget-button.stage-1 {\n width: 56px;\n height: 56px;\n border-radius: 50%;\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: #ffffff;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n padding: 0;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n }\n\n .eka-widget-button.stage-1:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n }\n\n /* Stage 2: Oval with text */\n .eka-widget-button.stage-2 {\n width: 280px;\n height: 60px;\n border-radius: 30px;\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: #FDE047;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n padding: 8px 8px 8px 24px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n }\n\n .eka-widget-button.stage-2:hover {\n transform: translateY(-2px);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n }\n\n .eka-stage-2-content {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 16px;\n padding: 8px 24px 8px 8px;\n }\n\n .eka-stage-2-text {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n }\n\n .eka-stage-2-title {\n font-size: 16px;\n font-weight: 600;\n color: #000000;\n line-height: 1.2;\n margin: 0;\n }\n\n .eka-stage-2-subtitle {\n font-size: 12px;\n font-weight: 400;\n color: #000000;\n line-height: 1.2;\n margin: 0;\n }\n\n .eka-stage-2-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: #ffffff;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* Stage 3: Full overlay with floating elements */\n .eka-chat-close {\n position: absolute;\n top: 2px;\n right: 8px;\n width: 12px;\n height: 12px;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 22px;\n color: #666666;\n line-height: 1;\n padding: 0;\n border-radius: 50%;\n transition: background-color 0.2s ease;\n }\n\n .eka-chat-close:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n\n .eka-widget-icon-button:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);\n }\n\n /* Icon container */\n .eka-icon-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* Mobile responsive styles */\n @media (max-width: 992px) {\n .eka-stage-3-overlay {\n bottom: 82px;\n }\n }\n\n @media (max-width: 767px) {\n .eka-stage-3-overlay {\n bottom: 246px;\n }\n }\n\n @media (max-width: 768px) {\n .eka-widget-button {\n bottom: 16px;\n right: 16px;\n }\n\n .eka-widget-button.stage-1 {\n width: 50px;\n height: 50px;\n }\n\n .eka-widget-button.stage-2 {\n width: auto;\n height: 55px;\n border-radius: 27.5px;\n // padding: 2px 15px;\n }\n\n .eka-stage-2-icon {\n width: 35px;\n height: 35px;\n }\n\n .eka-stage-2-title {\n font-size: 13px;\n }\n\n .eka-stage-2-subtitle {\n font-size: 11px;\n }\n\n .eka-widget-icon-button {\n display: none;\n // bottom: 16px;\n // right: 16px;\n // width: 56px;\n // height: 56px;\n }\n }\n\n /* Animation keyframes */\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\n .eka-widget-icon-button {\n animation: fadeIn 0.3s ease;\n }\n\n @keyframes stage2FadeIn {\n from {\n opacity: 0;\n transform: scale(0.8) translateX(20px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateX(0);\n }\n }\n\n @keyframes stage1FadeOut {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.9);\n }\n }\n ",document.head.appendChild(t),function(){const n=a("medassist-preferences");null===n?(o("medassist-preferences","open"),s.isClosed=!1):s.isClosed="close"===n}(),"full"===function(){let e=n()?.src||null,t=null;e&&(t=new URL(e,window.location.href).searchParams.get("mode"));return t||i.mode}())g({...e,mode:"full"}),window.EkaMedAssist&&(window.EkaMedAssist._initialized=!0);else{var p=function(n){var e=document.createElement("button");e.className="eka-widget-button stage-1";var t=document.createElement("div");return t.className="eka-icon-container",r(t,40),e.appendChild(t),e.addEventListener("click",function(e){var t=e.target.closest("[data-action]");if(t){var i=t.getAttribute("data-action");e.stopPropagation(),"close"===i?(c(1),s.isClosed=!0,o("medassist-preferences","close")):"open"===i&&g(n)}else g(n)}),e.addEventListener("mouseenter",function(){1===s.stage&&l()}),window.addEventListener("resize",d),l(),e}(e);document.body.appendChild(p),window.EkaMedAssist&&(window.EkaMedAssist._initialized=!0,window.EkaMedAssist._button=p)}}function b(){window.EkaMedAssist._initialized||w(i)}window.EkaMedAssist={init:function(n){w(n)},show:m,hide:f,toggle:g,setStage:c,config:i,_initialized:!1,_button:null},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",b):b()}();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eka-care/apollo-assist",
3
3
  "private": false,
4
- "version": "0.1.33-dev.0",
4
+ "version": "0.1.33-dev.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",