@eusate/messenger-sdk 0.1.2 → 0.2.0

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.
@@ -7,6 +7,7 @@ declare class EusateMessenger {
7
7
  private fabIcon;
8
8
  private fab;
9
9
  private apiKey;
10
+ private chatUrl;
10
11
  private onReady?;
11
12
  private onError?;
12
13
  private chatInitialized;
@@ -1 +1 @@
1
- {"version":3,"file":"MessengerUI.d.ts","sourceRoot":"","sources":["../src/MessengerUI.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAKhB,MAAM,SAAS,CAAA;AAEhB,cAAM,eAAe;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA+B;IAEtD,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,GAAG,CAAmB;IAC9B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAC,CAAY;IAC5B,OAAO,CAAC,OAAO,CAAC,CAAwB;IACxC,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,WAAW,CAAiB;IAEpC,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,cAAc,CAA6C;IACnE,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO;IAcP,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,eAAe;IA2B7D,OAAO,CAAC,IAAI,CAqBX;IAED,OAAO,CAAC,cAAc,CAUrB;IAED,OAAO,CAAC,cAAc,CAgBrB;IAED,OAAO,CAAC,eAAe,CAiCtB;IAED,OAAO,CAAC,oBAAoB,CAmB3B;IAED,OAAO,CAAC,iBAAiB,CAExB;IAED,OAAO,CAAC,oBAAoB,CAuB3B;IAED,OAAO,CAAC,WAAW,CAalB;IAED,OAAO,CAAC,WAAW,CAkBlB;IAED,OAAO,CAAC,aAAa,CAuFpB;IAED,aAAa,gBAA6B;IAC1C,MAAM,gBAAwB;IAE9B,IAAI,QAAO,IAAI,CAwBd;IAED,KAAK,aAoBJ;IAED,MAAM,aAYL;IAED,OAAO,aA+CN;CACF;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"MessengerUI.d.ts","sourceRoot":"","sources":["../src/MessengerUI.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAOhB,MAAM,SAAS,CAAA;AAEhB,cAAM,eAAe;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA+B;IAEtD,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,GAAG,CAAmB;IAC9B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,OAAO,CAAC,CAAY;IAC5B,OAAO,CAAC,OAAO,CAAC,CAAwB;IACxC,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,WAAW,CAAiB;IAEpC,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,cAAc,CAA6C;IACnE,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO;IAeP,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,eAAe;IA2B7D,OAAO,CAAC,IAAI,CAqBX;IAED,OAAO,CAAC,cAAc,CAUrB;IAED,OAAO,CAAC,cAAc,CAgBrB;IAED,OAAO,CAAC,eAAe,CAiCtB;IAED,OAAO,CAAC,oBAAoB,CAmB3B;IAED,OAAO,CAAC,iBAAiB,CAExB;IAED,OAAO,CAAC,oBAAoB,CAuB3B;IAED,OAAO,CAAC,WAAW,CAalB;IAED,OAAO,CAAC,WAAW,CAkBlB;IAED,OAAO,CAAC,aAAa,CAuFpB;IAED,aAAa,gBAA6B;IAC1C,MAAM,gBAAwB;IAE9B,IAAI,QAAO,IAAI,CAwBd;IAED,KAAK,aAoBJ;IAED,MAAM,aAYL;IAED,OAAO,aA+CN;CACF;AAED,eAAe,eAAe,CAAA"}
@@ -1 +1 @@
1
- const t="https://cdn.jsdelivr.net/gh/eusate/eusate-messenger-sdk@latest/src/assets/icomoon/style.css",e="https://chat.eusate.com",i="0.1.2",n="EUSATE_INIT",s="EUSATE_READY",a="EUSATE_AUTH_ERROR",o="CLOSE_CHAT",r="OPEN_CHAT",h="EUSATE_DESTROY",l="[EUSATE SDK] API Key is required for initialization",d="[EUSATE SDK] Error:",c="[EUSATE SDK] Initialization timeout",f="[EUSATE SDK] Failed to load chat iframe",m="[EUSATE SDK] Not initialized yet. Call init() first.",u="[EUSATE SDK] Already destroyed",p="[Eusate SDK] Already initialized. Call destroy() first to reinitialize.";var b;!function(t){t.INIT="init",t.AUTH="auth"}(b||(b={}));class y{constructor(i){this.chatInitialized=!1,this.isChatOpen=!1,this.isDestroyed=!1,this.fabClickHandler=null,this.messageHandler=null,this.initTimeout=null,this.init=()=>{try{this.setupContainer(),this.setupFabIframe(),this.setupChatIframe(),this.setupMessageHandlers(),document.body?document.body.appendChild(this.container):document.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(this.container)}),this.loadFabButton()}catch(t){this.handleError(new Error(`${d}, ${t.message}`))}},this.setupContainer=()=>{this.container.id="eusate-chat-widget-container",this.container.style.cssText="\n position: fixed;\n bottom: 20px;\n right: 20px;\n z-index: 10000;\n ",this.container.setAttribute("data-eusate-widget","true")},this.setupFabIframe=()=>{this.fabIframe.id="eusate-chat-widget-fab",this.fabIframe.style.cssText="\n position: relative;\n z-index: 1;\n height: 80px;\n width: 80px;\n border: none;\n background: transparent;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.fabIframe.setAttribute("title","Open chat support"),this.fabIframe.setAttribute("aria-label","Open chat support"),this.container.appendChild(this.fabIframe)},this.setupChatIframe=()=>{this.chatIframe.id="eusate-chat-widget",this.chatIframe.src=e,this.chatIframe.style.cssText="\n position: absolute;\n bottom: 100px;\n right: 0px;\n width: 390px;\n height: 576px;\n transform: scale(0);\n opacity: 0;\n transition-property: transform, translate, scale, rotate, opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 500ms;\n border: none;\n transform-origin: bottom right;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.chatIframe.setAttribute("title","Eusate chat support"),this.chatIframe.setAttribute("aria-hidden","true"),this.chatIframe.setAttribute("sandbox","allow-scripts allow-forms allow-same-origin allow-popups"),this.chatIframe.onload=()=>this.handleChatIframeLoad(),this.chatIframe.onerror=()=>this.handleIframeError(),this.container.appendChild(this.chatIframe)},this.handleChatIframeLoad=()=>{setTimeout(()=>{var t;const i={type:n,data:{apiKey:this.apiKey},timestamp:Date.now()};null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage(i,e)},1e3),this.initTimeout=setTimeout(()=>{this.isInitialized||this.handleError(new Error(c))},1e4)},this.handleIframeError=()=>{this.handleError(new Error(f))},this.setupMessageHandlers=()=>{this.messageHandler=t=>{if(t.origin===new URL(e).origin)switch(t.data.type){case s:this.handleReady();break;case a:this.chatInitialized=!1,this.handleError(new Error(t.data.message||"Authentication failed"));break;case o:this.close()}},window.addEventListener("message",this.messageHandler,!1)},this.handleReady=()=>{var t;this.chatInitialized=!0,this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.fab&&(this.fab.disabled=!1),null===(t=this.onReady)||void 0===t||t.call(this)},this.handleError=t=>{var e;console.error(t.message),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.destroy(),null===(e=this.onError)||void 0===e||e.call(this,t)},this.loadFabButton=()=>{const e=this.fabIframe.contentDocument;if(!e)return void setTimeout(()=>this.loadFabButton(),100);const i=e.head||e.createElement("head"),n=e.createElement("link");n.href=t,n.rel="stylesheet",i.appendChild(n),e.head||e.documentElement.appendChild(i);const s=e.body||e.createElement("body");s.style.cssText="\n margin: 0;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n overflow: hidden;\n border: none;\n outline: none;\n ",this.fab.id="eusate-messenger-fab-btn",this.fab.style.cssText="\n width: 80px;\n height: 80px;\n background-color: #0a0a0a;\n border-radius: 50%;\n cursor: pointer;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: scale(0.95);\n transition: transform 0.2s ease;\n border: none;\n outline: none;\n ",this.fab.disabled=!0,this.fab.onmouseenter=()=>{this.fab.disabled||(this.fab.style.transform="scale(1)")},this.fab.onmouseleave=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.95)")},this.fab.onmousedown=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.8)")},this.fabIcon.id="button-icon",this.fabIcon.className="icon-eusate",this.fabIcon.style.cssText="\n font-size: 36px;\n ",this.fab.appendChild(this.fabIcon),s.appendChild(this.fab),e.body||e.documentElement.appendChild(s),this.fabClickHandler=()=>this.toggle(),this.fab.addEventListener("click",this.fabClickHandler,!1)},this.isInitialized=()=>this.chatInitialized,this.isOpen=()=>this.isChatOpen,this.open=()=>{var t;this.chatInitialized?this.isChatOpen||(this.isChatOpen=!0,this.chatIframe.style.transform="scale(1)",this.chatIframe.style.opacity="1",this.fabIcon.classList.add("icon-chevron-down"),this.fabIcon.classList.remove("icon-eusate"),this.fab.style.transform="scale(0.8)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:r,timestamp:Date.now()},e)):console.warn(m)},this.close=()=>{var t;this.isChatOpen&&(this.isChatOpen=!1,this.chatIframe.style.transform="scale(0)",this.chatIframe.style.opacity="0",this.fabIcon.classList.add("icon-eusate"),this.fabIcon.classList.remove("icon-chevron-down"),this.fab.style.transform="scale(0.95)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:o,timestamp:Date.now()},e))},this.toggle=()=>{this.chatInitialized?"scale(1)"===this.chatIframe.style.transform?this.close():this.open():console.warn(m)},this.destroy=()=>{this.isDestroyed?console.warn(u):(this.isChatOpen&&this.close(),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.messageHandler&&(window.removeEventListener("message",this.messageHandler,!1),this.messageHandler=null),this.fab&&this.fabClickHandler&&(this.fab.removeEventListener("click",this.fabClickHandler,!1),this.fabClickHandler=null),this.chatIframe.contentWindow&&this.chatIframe.contentWindow.postMessage({type:h,timestamp:Date.now()},e),this.container.remove(),y.instance=null,this.isDestroyed=!0,console.log("EusateMessenger instance destroyed successfully"))},this.apiKey=null==i?void 0:i.apiKey.trim(),this.onReady=i.onReady,this.onError=i.onError,this.container=document.createElement("div"),this.fabIframe=document.createElement("iframe"),this.chatIframe=document.createElement("iframe"),this.fabIcon=document.createElement("span"),this.fab=document.createElement("button"),this.init()}static getInstance(t){if("undefined"==typeof window)throw new Error("[Eusate] Cannot create instance on server-side");if(y.instance)return t&&console.warn(p),y.instance;if(!t)throw new Error(l);if(!t.apiKey||"string"!=typeof t.apiKey||""===t.apiKey.trim())throw new Error(l);return y.instance=new y(t),y.instance}}y.instance=null;const w={init:t=>{if("undefined"!=typeof window)try{const e="string"==typeof t?{apiKey:t}:t;y.getInstance(e)}catch(t){throw console.error(d,t),t}else console.warn("[Eusate] Cannot initialize on server-side. Will initialize when browser loads.")},open:()=>{if("undefined"!=typeof window)try{y.getInstance().open()}catch(t){console.error(d,t)}},close:()=>{if("undefined"!=typeof window)try{y.getInstance().close()}catch(t){console.error(d,t)}},destroy:()=>{if("undefined"!=typeof window)try{y.getInstance().destroy()}catch(t){console.error(d,t)}},isInitialized:()=>{if("undefined"==typeof window)return!1;try{return y.getInstance().isInitialized()}catch(t){return!1}},isOpen:()=>{if("undefined"==typeof window)return!1;try{return y.getInstance().isOpen()}catch(t){return!1}},version:i};"undefined"!=typeof window&&(console.log("window",window),window.Eusate=w);export{w as default};
1
+ const t="https://cdn.jsdelivr.net/gh/eusate/eusate-messenger-sdk@latest/src/assets/icomoon/style.css",e="0.2.0",i={development:"https://chat.dev.eusate.com",production:"https://chat.eusate.com"},n="EUSATE_INIT",s="EUSATE_READY",a="EUSATE_AUTH_ERROR",o="CLOSE_CHAT",r="OPEN_CHAT",h="EUSATE_DESTROY",l="[EUSATE SDK] API Key is required for initialization",c="[EUSATE SDK] Error:",d="[EUSATE SDK] Initialization timeout",f="[EUSATE SDK] Failed to load chat iframe",m="[EUSATE SDK] Not initialized yet. Call init() first.",u="[EUSATE SDK] Already destroyed",p="[Eusate SDK] Already initialized. Call destroy() first to reinitialize.";var b,y;!function(t){t.INIT="init",t.AUTH="auth"}(b||(b={})),function(t){t.PROD="production",t.DEV="development"}(y||(y={}));class w{constructor(e){this.chatInitialized=!1,this.isChatOpen=!1,this.isDestroyed=!1,this.fabClickHandler=null,this.messageHandler=null,this.initTimeout=null,this.init=()=>{try{this.setupContainer(),this.setupFabIframe(),this.setupChatIframe(),this.setupMessageHandlers(),document.body?document.body.appendChild(this.container):document.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(this.container)}),this.loadFabButton()}catch(t){this.handleError(new Error(`${c}, ${t.message}`))}},this.setupContainer=()=>{this.container.id="eusate-chat-widget-container",this.container.style.cssText="\n position: fixed;\n bottom: 20px;\n right: 20px;\n z-index: 10000;\n ",this.container.setAttribute("data-eusate-widget","true")},this.setupFabIframe=()=>{this.fabIframe.id="eusate-chat-widget-fab",this.fabIframe.style.cssText="\n position: relative;\n z-index: 1;\n height: 80px;\n width: 80px;\n border: none;\n background: transparent;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.fabIframe.setAttribute("title","Open chat support"),this.fabIframe.setAttribute("aria-label","Open chat support"),this.container.appendChild(this.fabIframe)},this.setupChatIframe=()=>{this.chatIframe.id="eusate-chat-widget",this.chatIframe.src=this.chatUrl,this.chatIframe.style.cssText="\n position: absolute;\n bottom: 100px;\n right: 0px;\n width: 390px;\n height: 576px;\n transform: scale(0);\n opacity: 0;\n transition-property: transform, translate, scale, rotate, opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 500ms;\n border: none;\n transform-origin: bottom right;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.chatIframe.setAttribute("title","Eusate chat support"),this.chatIframe.setAttribute("aria-hidden","true"),this.chatIframe.setAttribute("sandbox","allow-scripts allow-forms allow-same-origin allow-popups"),this.chatIframe.onload=()=>this.handleChatIframeLoad(),this.chatIframe.onerror=()=>this.handleIframeError(),this.container.appendChild(this.chatIframe)},this.handleChatIframeLoad=()=>{setTimeout(()=>{var t;const e={type:n,data:{apiKey:this.apiKey},timestamp:Date.now()};null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage(e,this.chatUrl)},1e3),this.initTimeout=setTimeout(()=>{this.isInitialized||this.handleError(new Error(d))},1e4)},this.handleIframeError=()=>{this.handleError(new Error(f))},this.setupMessageHandlers=()=>{this.messageHandler=t=>{if(t.origin===new URL(this.chatUrl).origin)switch(t.data.type){case s:this.handleReady();break;case a:this.chatInitialized=!1,this.handleError(new Error(t.data.message||"Authentication failed"));break;case o:this.close()}},window.addEventListener("message",this.messageHandler,!1)},this.handleReady=()=>{var t;this.chatInitialized=!0,this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.fab&&(this.fab.disabled=!1),null===(t=this.onReady)||void 0===t||t.call(this)},this.handleError=t=>{var e;console.error(t.message),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.destroy(),null===(e=this.onError)||void 0===e||e.call(this,t)},this.loadFabButton=()=>{const e=this.fabIframe.contentDocument;if(!e)return void setTimeout(()=>this.loadFabButton(),100);const i=e.head||e.createElement("head"),n=e.createElement("link");n.href=t,n.rel="stylesheet",i.appendChild(n),e.head||e.documentElement.appendChild(i);const s=e.body||e.createElement("body");s.style.cssText="\n margin: 0;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n overflow: hidden;\n border: none;\n outline: none;\n ",this.fab.id="eusate-messenger-fab-btn",this.fab.style.cssText="\n width: 80px;\n height: 80px;\n background-color: #0a0a0a;\n border-radius: 50%;\n cursor: pointer;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: scale(0.95);\n transition: transform 0.2s ease;\n border: none;\n outline: none;\n ",this.fab.disabled=!0,this.fab.onmouseenter=()=>{this.fab.disabled||(this.fab.style.transform="scale(1)")},this.fab.onmouseleave=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.95)")},this.fab.onmousedown=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.8)")},this.fabIcon.id="button-icon",this.fabIcon.className="icon-eusate",this.fabIcon.style.cssText="\n font-size: 36px;\n ",this.fab.appendChild(this.fabIcon),s.appendChild(this.fab),e.body||e.documentElement.appendChild(s),this.fabClickHandler=()=>this.toggle(),this.fab.addEventListener("click",this.fabClickHandler,!1)},this.isInitialized=()=>this.chatInitialized,this.isOpen=()=>this.isChatOpen,this.open=()=>{var t;this.chatInitialized?this.isChatOpen||(this.isChatOpen=!0,this.chatIframe.style.transform="scale(1)",this.chatIframe.style.opacity="1",this.fabIcon.classList.add("icon-chevron-down"),this.fabIcon.classList.remove("icon-eusate"),this.fab.style.transform="scale(0.8)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:r,timestamp:Date.now()},this.chatUrl)):console.warn(m)},this.close=()=>{var t;this.isChatOpen&&(this.isChatOpen=!1,this.chatIframe.style.transform="scale(0)",this.chatIframe.style.opacity="0",this.fabIcon.classList.add("icon-eusate"),this.fabIcon.classList.remove("icon-chevron-down"),this.fab.style.transform="scale(0.95)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:o,timestamp:Date.now()},this.chatUrl))},this.toggle=()=>{this.chatInitialized?"scale(1)"===this.chatIframe.style.transform?this.close():this.open():console.warn(m)},this.destroy=()=>{this.isDestroyed?console.warn(u):(this.isChatOpen&&this.close(),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.messageHandler&&(window.removeEventListener("message",this.messageHandler,!1),this.messageHandler=null),this.fab&&this.fabClickHandler&&(this.fab.removeEventListener("click",this.fabClickHandler,!1),this.fabClickHandler=null),this.chatIframe.contentWindow&&this.chatIframe.contentWindow.postMessage({type:h,timestamp:Date.now()},this.chatUrl),this.container.remove(),w.instance=null,this.isDestroyed=!0,console.log("EusateMessenger instance destroyed successfully"))},this.apiKey=null==e?void 0:e.apiKey.trim(),this.onReady=e.onReady,this.onError=e.onError,this.chatUrl=i[(null==e?void 0:e.environment)||y.PROD],this.container=document.createElement("div"),this.fabIframe=document.createElement("iframe"),this.chatIframe=document.createElement("iframe"),this.fabIcon=document.createElement("span"),this.fab=document.createElement("button"),this.init()}static getInstance(t){if("undefined"==typeof window)throw new Error("[Eusate] Cannot create instance on server-side");if(w.instance)return t&&console.warn(p),w.instance;if(!t)throw new Error(l);if(!t.apiKey||"string"!=typeof t.apiKey||""===t.apiKey.trim())throw new Error(l);return w.instance=new w(t),w.instance}}w.instance=null;const I={init:t=>{if("undefined"!=typeof window)try{const e="string"==typeof t?{apiKey:t}:t;w.getInstance(e)}catch(t){throw console.error(c,t),t}else console.warn("[Eusate] Cannot initialize on server-side. Will initialize when browser loads.")},open:()=>{if("undefined"!=typeof window)try{w.getInstance().open()}catch(t){console.error(c,t)}},close:()=>{if("undefined"!=typeof window)try{w.getInstance().close()}catch(t){console.error(c,t)}},destroy:()=>{if("undefined"!=typeof window)try{w.getInstance().destroy()}catch(t){console.error(c,t)}},isInitialized:()=>{if("undefined"==typeof window)return!1;try{return w.getInstance().isInitialized()}catch(t){return!1}},isOpen:()=>{if("undefined"==typeof window)return!1;try{return w.getInstance().isOpen()}catch(t){return!1}},version:e};"undefined"!=typeof window&&(window.Eusate=I);export{I as default};
@@ -1 +1 @@
1
- this.Eusate=function(){"use strict";const t="https://cdn.jsdelivr.net/gh/eusate/eusate-messenger-sdk@latest/src/assets/icomoon/style.css",e="https://chat.eusate.com",i="0.1.2",n="EUSATE_INIT",s="EUSATE_READY",a="EUSATE_AUTH_ERROR",o="CLOSE_CHAT",r="OPEN_CHAT",h="EUSATE_DESTROY",l="[EUSATE SDK] API Key is required for initialization",c="[EUSATE SDK] Error:",d="[EUSATE SDK] Initialization timeout",f="[EUSATE SDK] Failed to load chat iframe",m="[EUSATE SDK] Not initialized yet. Call init() first.",u="[EUSATE SDK] Already destroyed",p="[Eusate SDK] Already initialized. Call destroy() first to reinitialize.";var b;!function(t){t.INIT="init",t.AUTH="auth"}(b||(b={}));class y{constructor(i){this.chatInitialized=!1,this.isChatOpen=!1,this.isDestroyed=!1,this.fabClickHandler=null,this.messageHandler=null,this.initTimeout=null,this.init=()=>{try{this.setupContainer(),this.setupFabIframe(),this.setupChatIframe(),this.setupMessageHandlers(),document.body?document.body.appendChild(this.container):document.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(this.container)}),this.loadFabButton()}catch(t){this.handleError(new Error(`${c}, ${t.message}`))}},this.setupContainer=()=>{this.container.id="eusate-chat-widget-container",this.container.style.cssText="\n position: fixed;\n bottom: 20px;\n right: 20px;\n z-index: 10000;\n ",this.container.setAttribute("data-eusate-widget","true")},this.setupFabIframe=()=>{this.fabIframe.id="eusate-chat-widget-fab",this.fabIframe.style.cssText="\n position: relative;\n z-index: 1;\n height: 80px;\n width: 80px;\n border: none;\n background: transparent;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.fabIframe.setAttribute("title","Open chat support"),this.fabIframe.setAttribute("aria-label","Open chat support"),this.container.appendChild(this.fabIframe)},this.setupChatIframe=()=>{this.chatIframe.id="eusate-chat-widget",this.chatIframe.src=e,this.chatIframe.style.cssText="\n position: absolute;\n bottom: 100px;\n right: 0px;\n width: 390px;\n height: 576px;\n transform: scale(0);\n opacity: 0;\n transition-property: transform, translate, scale, rotate, opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 500ms;\n border: none;\n transform-origin: bottom right;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.chatIframe.setAttribute("title","Eusate chat support"),this.chatIframe.setAttribute("aria-hidden","true"),this.chatIframe.setAttribute("sandbox","allow-scripts allow-forms allow-same-origin allow-popups"),this.chatIframe.onload=()=>this.handleChatIframeLoad(),this.chatIframe.onerror=()=>this.handleIframeError(),this.container.appendChild(this.chatIframe)},this.handleChatIframeLoad=()=>{setTimeout(()=>{var t;const i={type:n,data:{apiKey:this.apiKey},timestamp:Date.now()};null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage(i,e)},1e3),this.initTimeout=setTimeout(()=>{this.isInitialized||this.handleError(new Error(d))},1e4)},this.handleIframeError=()=>{this.handleError(new Error(f))},this.setupMessageHandlers=()=>{this.messageHandler=t=>{if(t.origin===new URL(e).origin)switch(t.data.type){case s:this.handleReady();break;case a:this.chatInitialized=!1,this.handleError(new Error(t.data.message||"Authentication failed"));break;case o:this.close()}},window.addEventListener("message",this.messageHandler,!1)},this.handleReady=()=>{var t;this.chatInitialized=!0,this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.fab&&(this.fab.disabled=!1),null===(t=this.onReady)||void 0===t||t.call(this)},this.handleError=t=>{var e;console.error(t.message),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.destroy(),null===(e=this.onError)||void 0===e||e.call(this,t)},this.loadFabButton=()=>{const e=this.fabIframe.contentDocument;if(!e)return void setTimeout(()=>this.loadFabButton(),100);const i=e.head||e.createElement("head"),n=e.createElement("link");n.href=t,n.rel="stylesheet",i.appendChild(n),e.head||e.documentElement.appendChild(i);const s=e.body||e.createElement("body");s.style.cssText="\n margin: 0;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n overflow: hidden;\n border: none;\n outline: none;\n ",this.fab.id="eusate-messenger-fab-btn",this.fab.style.cssText="\n width: 80px;\n height: 80px;\n background-color: #0a0a0a;\n border-radius: 50%;\n cursor: pointer;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: scale(0.95);\n transition: transform 0.2s ease;\n border: none;\n outline: none;\n ",this.fab.disabled=!0,this.fab.onmouseenter=()=>{this.fab.disabled||(this.fab.style.transform="scale(1)")},this.fab.onmouseleave=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.95)")},this.fab.onmousedown=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.8)")},this.fabIcon.id="button-icon",this.fabIcon.className="icon-eusate",this.fabIcon.style.cssText="\n font-size: 36px;\n ",this.fab.appendChild(this.fabIcon),s.appendChild(this.fab),e.body||e.documentElement.appendChild(s),this.fabClickHandler=()=>this.toggle(),this.fab.addEventListener("click",this.fabClickHandler,!1)},this.isInitialized=()=>this.chatInitialized,this.isOpen=()=>this.isChatOpen,this.open=()=>{var t;this.chatInitialized?this.isChatOpen||(this.isChatOpen=!0,this.chatIframe.style.transform="scale(1)",this.chatIframe.style.opacity="1",this.fabIcon.classList.add("icon-chevron-down"),this.fabIcon.classList.remove("icon-eusate"),this.fab.style.transform="scale(0.8)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:r,timestamp:Date.now()},e)):console.warn(m)},this.close=()=>{var t;this.isChatOpen&&(this.isChatOpen=!1,this.chatIframe.style.transform="scale(0)",this.chatIframe.style.opacity="0",this.fabIcon.classList.add("icon-eusate"),this.fabIcon.classList.remove("icon-chevron-down"),this.fab.style.transform="scale(0.95)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:o,timestamp:Date.now()},e))},this.toggle=()=>{this.chatInitialized?"scale(1)"===this.chatIframe.style.transform?this.close():this.open():console.warn(m)},this.destroy=()=>{this.isDestroyed?console.warn(u):(this.isChatOpen&&this.close(),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.messageHandler&&(window.removeEventListener("message",this.messageHandler,!1),this.messageHandler=null),this.fab&&this.fabClickHandler&&(this.fab.removeEventListener("click",this.fabClickHandler,!1),this.fabClickHandler=null),this.chatIframe.contentWindow&&this.chatIframe.contentWindow.postMessage({type:h,timestamp:Date.now()},e),this.container.remove(),y.instance=null,this.isDestroyed=!0,console.log("EusateMessenger instance destroyed successfully"))},this.apiKey=null==i?void 0:i.apiKey.trim(),this.onReady=i.onReady,this.onError=i.onError,this.container=document.createElement("div"),this.fabIframe=document.createElement("iframe"),this.chatIframe=document.createElement("iframe"),this.fabIcon=document.createElement("span"),this.fab=document.createElement("button"),this.init()}static getInstance(t){if("undefined"==typeof window)throw new Error("[Eusate] Cannot create instance on server-side");if(y.instance)return t&&console.warn(p),y.instance;if(!t)throw new Error(l);if(!t.apiKey||"string"!=typeof t.apiKey||""===t.apiKey.trim())throw new Error(l);return y.instance=new y(t),y.instance}}y.instance=null;const w={init:t=>{if("undefined"!=typeof window)try{const e="string"==typeof t?{apiKey:t}:t;y.getInstance(e)}catch(t){throw console.error(c,t),t}else console.warn("[Eusate] Cannot initialize on server-side. Will initialize when browser loads.")},open:()=>{if("undefined"!=typeof window)try{y.getInstance().open()}catch(t){console.error(c,t)}},close:()=>{if("undefined"!=typeof window)try{y.getInstance().close()}catch(t){console.error(c,t)}},destroy:()=>{if("undefined"!=typeof window)try{y.getInstance().destroy()}catch(t){console.error(c,t)}},isInitialized:()=>{if("undefined"==typeof window)return!1;try{return y.getInstance().isInitialized()}catch(t){return!1}},isOpen:()=>{if("undefined"==typeof window)return!1;try{return y.getInstance().isOpen()}catch(t){return!1}},version:i};return"undefined"!=typeof window&&(console.log("window",window),window.Eusate=w),w}();
1
+ this.Eusate=function(){"use strict";const t="https://cdn.jsdelivr.net/gh/eusate/eusate-messenger-sdk@latest/src/assets/icomoon/style.css",e="0.2.0",i={development:"https://chat.dev.eusate.com",production:"https://chat.eusate.com"},n="EUSATE_INIT",s="EUSATE_READY",a="EUSATE_AUTH_ERROR",o="CLOSE_CHAT",r="OPEN_CHAT",h="EUSATE_DESTROY",c="[EUSATE SDK] API Key is required for initialization",l="[EUSATE SDK] Error:",d="[EUSATE SDK] Initialization timeout",f="[EUSATE SDK] Failed to load chat iframe",m="[EUSATE SDK] Not initialized yet. Call init() first.",u="[EUSATE SDK] Already destroyed",p="[Eusate SDK] Already initialized. Call destroy() first to reinitialize.";var b,y;!function(t){t.INIT="init",t.AUTH="auth"}(b||(b={})),function(t){t.PROD="production",t.DEV="development"}(y||(y={}));class w{constructor(e){this.chatInitialized=!1,this.isChatOpen=!1,this.isDestroyed=!1,this.fabClickHandler=null,this.messageHandler=null,this.initTimeout=null,this.init=()=>{try{this.setupContainer(),this.setupFabIframe(),this.setupChatIframe(),this.setupMessageHandlers(),document.body?document.body.appendChild(this.container):document.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(this.container)}),this.loadFabButton()}catch(t){this.handleError(new Error(`${l}, ${t.message}`))}},this.setupContainer=()=>{this.container.id="eusate-chat-widget-container",this.container.style.cssText="\n position: fixed;\n bottom: 20px;\n right: 20px;\n z-index: 10000;\n ",this.container.setAttribute("data-eusate-widget","true")},this.setupFabIframe=()=>{this.fabIframe.id="eusate-chat-widget-fab",this.fabIframe.style.cssText="\n position: relative;\n z-index: 1;\n height: 80px;\n width: 80px;\n border: none;\n background: transparent;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.fabIframe.setAttribute("title","Open chat support"),this.fabIframe.setAttribute("aria-label","Open chat support"),this.container.appendChild(this.fabIframe)},this.setupChatIframe=()=>{this.chatIframe.id="eusate-chat-widget",this.chatIframe.src=this.chatUrl,this.chatIframe.style.cssText="\n position: absolute;\n bottom: 100px;\n right: 0px;\n width: 390px;\n height: 576px;\n transform: scale(0);\n opacity: 0;\n transition-property: transform, translate, scale, rotate, opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 500ms;\n border: none;\n transform-origin: bottom right;\n box-shadow: 0px 40px 72px -12px #10192824;\n ",this.chatIframe.setAttribute("title","Eusate chat support"),this.chatIframe.setAttribute("aria-hidden","true"),this.chatIframe.setAttribute("sandbox","allow-scripts allow-forms allow-same-origin allow-popups"),this.chatIframe.onload=()=>this.handleChatIframeLoad(),this.chatIframe.onerror=()=>this.handleIframeError(),this.container.appendChild(this.chatIframe)},this.handleChatIframeLoad=()=>{setTimeout(()=>{var t;const e={type:n,data:{apiKey:this.apiKey},timestamp:Date.now()};null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage(e,this.chatUrl)},1e3),this.initTimeout=setTimeout(()=>{this.isInitialized||this.handleError(new Error(d))},1e4)},this.handleIframeError=()=>{this.handleError(new Error(f))},this.setupMessageHandlers=()=>{this.messageHandler=t=>{if(t.origin===new URL(this.chatUrl).origin)switch(t.data.type){case s:this.handleReady();break;case a:this.chatInitialized=!1,this.handleError(new Error(t.data.message||"Authentication failed"));break;case o:this.close()}},window.addEventListener("message",this.messageHandler,!1)},this.handleReady=()=>{var t;this.chatInitialized=!0,this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.fab&&(this.fab.disabled=!1),null===(t=this.onReady)||void 0===t||t.call(this)},this.handleError=t=>{var e;console.error(t.message),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.destroy(),null===(e=this.onError)||void 0===e||e.call(this,t)},this.loadFabButton=()=>{const e=this.fabIframe.contentDocument;if(!e)return void setTimeout(()=>this.loadFabButton(),100);const i=e.head||e.createElement("head"),n=e.createElement("link");n.href=t,n.rel="stylesheet",i.appendChild(n),e.head||e.documentElement.appendChild(i);const s=e.body||e.createElement("body");s.style.cssText="\n margin: 0;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n overflow: hidden;\n border: none;\n outline: none;\n ",this.fab.id="eusate-messenger-fab-btn",this.fab.style.cssText="\n width: 80px;\n height: 80px;\n background-color: #0a0a0a;\n border-radius: 50%;\n cursor: pointer;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: scale(0.95);\n transition: transform 0.2s ease;\n border: none;\n outline: none;\n ",this.fab.disabled=!0,this.fab.onmouseenter=()=>{this.fab.disabled||(this.fab.style.transform="scale(1)")},this.fab.onmouseleave=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.95)")},this.fab.onmousedown=()=>{this.fab.disabled||(this.fab.style.transform="scale(0.8)")},this.fabIcon.id="button-icon",this.fabIcon.className="icon-eusate",this.fabIcon.style.cssText="\n font-size: 36px;\n ",this.fab.appendChild(this.fabIcon),s.appendChild(this.fab),e.body||e.documentElement.appendChild(s),this.fabClickHandler=()=>this.toggle(),this.fab.addEventListener("click",this.fabClickHandler,!1)},this.isInitialized=()=>this.chatInitialized,this.isOpen=()=>this.isChatOpen,this.open=()=>{var t;this.chatInitialized?this.isChatOpen||(this.isChatOpen=!0,this.chatIframe.style.transform="scale(1)",this.chatIframe.style.opacity="1",this.fabIcon.classList.add("icon-chevron-down"),this.fabIcon.classList.remove("icon-eusate"),this.fab.style.transform="scale(0.8)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:r,timestamp:Date.now()},this.chatUrl)):console.warn(m)},this.close=()=>{var t;this.isChatOpen&&(this.isChatOpen=!1,this.chatIframe.style.transform="scale(0)",this.chatIframe.style.opacity="0",this.fabIcon.classList.add("icon-eusate"),this.fabIcon.classList.remove("icon-chevron-down"),this.fab.style.transform="scale(0.95)",null===(t=this.chatIframe.contentWindow)||void 0===t||t.postMessage({type:o,timestamp:Date.now()},this.chatUrl))},this.toggle=()=>{this.chatInitialized?"scale(1)"===this.chatIframe.style.transform?this.close():this.open():console.warn(m)},this.destroy=()=>{this.isDestroyed?console.warn(u):(this.isChatOpen&&this.close(),this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.messageHandler&&(window.removeEventListener("message",this.messageHandler,!1),this.messageHandler=null),this.fab&&this.fabClickHandler&&(this.fab.removeEventListener("click",this.fabClickHandler,!1),this.fabClickHandler=null),this.chatIframe.contentWindow&&this.chatIframe.contentWindow.postMessage({type:h,timestamp:Date.now()},this.chatUrl),this.container.remove(),w.instance=null,this.isDestroyed=!0,console.log("EusateMessenger instance destroyed successfully"))},this.apiKey=null==e?void 0:e.apiKey.trim(),this.onReady=e.onReady,this.onError=e.onError,this.chatUrl=i[(null==e?void 0:e.environment)||y.PROD],this.container=document.createElement("div"),this.fabIframe=document.createElement("iframe"),this.chatIframe=document.createElement("iframe"),this.fabIcon=document.createElement("span"),this.fab=document.createElement("button"),this.init()}static getInstance(t){if("undefined"==typeof window)throw new Error("[Eusate] Cannot create instance on server-side");if(w.instance)return t&&console.warn(p),w.instance;if(!t)throw new Error(c);if(!t.apiKey||"string"!=typeof t.apiKey||""===t.apiKey.trim())throw new Error(c);return w.instance=new w(t),w.instance}}w.instance=null;const I={init:t=>{if("undefined"!=typeof window)try{const e="string"==typeof t?{apiKey:t}:t;w.getInstance(e)}catch(t){throw console.error(l,t),t}else console.warn("[Eusate] Cannot initialize on server-side. Will initialize when browser loads.")},open:()=>{if("undefined"!=typeof window)try{w.getInstance().open()}catch(t){console.error(l,t)}},close:()=>{if("undefined"!=typeof window)try{w.getInstance().close()}catch(t){console.error(l,t)}},destroy:()=>{if("undefined"!=typeof window)try{w.getInstance().destroy()}catch(t){console.error(l,t)}},isInitialized:()=>{if("undefined"==typeof window)return!1;try{return w.getInstance().isInitialized()}catch(t){return!1}},isOpen:()=>{if("undefined"==typeof window)return!1;try{return w.getInstance().isOpen()}catch(t){return!1}},version:e};return"undefined"!=typeof window&&(window.Eusate=I),I}();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,EAGnB,MAAM,SAAS,CAAA;AAEhB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,CAAA;KACf;CACF;AAED,QAAA,MAAM,MAAM,EAAE,kBA2Db,CAAA;AAOD,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,EAGnB,MAAM,SAAS,CAAA;AAEhB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,CAAA;KACf;CACF;AAED,QAAA,MAAM,MAAM,EAAE,kBA2Db,CAAA;AAMD,eAAe,MAAM,CAAA"}
@@ -1,10 +1,13 @@
1
1
  export declare const PROD_CONFIG: {
2
2
  readonly ICOMOON_URL: "https://cdn.jsdelivr.net/gh/eusate/eusate-messenger-sdk@latest/src/assets/icomoon/style.css";
3
- readonly CHAT_URL: "https://chat.eusate.com";
4
3
  readonly VERSION: string;
5
4
  readonly ENV: string | undefined;
6
5
  readonly DEBUG: boolean;
7
6
  };
7
+ export declare const ENVIRONMENT_URLS: {
8
+ development: string;
9
+ production: string;
10
+ };
8
11
  export declare const POST_MESSAGE_TYPES: {
9
12
  readonly INIT: "EUSATE_INIT";
10
13
  readonly READY: "EUSATE_READY";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;CAQd,CAAA;AAEV,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAA;AAEV,eAAO,MAAM,cAAc;;;;;;;;CASjB,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;CAMd,CAAA;AAEV,eAAO,MAAM,gBAAgB;;;CAG5B,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAA;AAEV,eAAO,MAAM,cAAc;;;;;;;;CASjB,CAAA"}
@@ -1,7 +1,2 @@
1
1
  export declare const debug: (...args: unknown[]) => void;
2
- export declare const getSDKInfo: () => {
3
- version: string;
4
- environment: string | undefined;
5
- chatUrl: "https://chat.eusate.com";
6
- };
7
2
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,OAAO,EAAE,SAIvC,CAAA;AAED,eAAO,MAAM,UAAU;;;;CAIrB,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,OAAO,EAAE,SAIvC,CAAA"}
@@ -4,8 +4,13 @@ export declare enum ErrorType {
4
4
  INIT = "init",
5
5
  AUTH = "auth"
6
6
  }
7
+ export declare enum Environment {
8
+ PROD = "production",
9
+ DEV = "development"
10
+ }
7
11
  export type MessengerConfig = {
8
12
  apiKey: string;
13
+ environment?: Environment;
9
14
  onReady?: () => void;
10
15
  onError?: (error: Error) => void;
11
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAEnC,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC3C,IAAI,EAAE,OAAO,CAAC,OAAO,kBAAkB,CAAC,CAAA;IACxC,IAAI,CAAC,EAAE,CAAC,CAAA;IACR,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,KAAK,IAAI,CAAA;IAChD,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,EAAE,MAAM,OAAO,CAAA;IAC5B,MAAM,EAAE,MAAM,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAEnC,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AACD,oBAAY,WAAW;IACrB,IAAI,eAAe;IACnB,GAAG,gBAAgB;CACpB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC3C,IAAI,EAAE,OAAO,CAAC,OAAO,kBAAkB,CAAC,CAAA;IACxC,IAAI,CAAC,EAAE,CAAC,CAAA;IACR,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,KAAK,IAAI,CAAA;IAChD,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,EAAE,MAAM,OAAO,CAAA;IAC5B,MAAM,EAAE,MAAM,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eusate/messenger-sdk",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Eusate Messenger SDK - Embeddable AI-powered customer support",
5
5
  "main": "dist/eusate-sdk.esm.js",
6
6
  "module": "dist/eusate-sdk.esm.js",