((e,t)=>{let n=!1;const s="active",r={init:()=>{const o=document.createElement("style");o.innerText=` #abraxas-chatbot { z-index: 5000; position: fixed; right: 3rem; bottom: 3rem; width: auto; max-width: 450px; height: auto; max-height: 80vh; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 1rem; } #abraxas-chatbot-control-bar { display: flex; flex-direction: row-reverse; gap: 0.5rem; } #abraxas-chatbot-teaser { background-color: ${e.accentColor}; color: ${e.textColor}; font-weight: bold; border-radius: 10px; align-items: center; justify-content: center; display: flex; padding: 0.75rem 1rem; opacity: 1; transition: opacity 0.66s cubic-bezier(0.25, 0.46, 0.45, 0.94); } #abraxas-chatbot.${s} #abraxas-chatbot-teaser { display: none; opacity: 0; } #abraxas-chatbot-toggle { background-color: ${e.accentColor}; color: #fff; border-radius: 50%; width: 60px; height: 60px; display: flex; flex: none; justify-content: center; align-items: center; font-size: 20px; } .abraxas-icon:before, .abraxas-icon:after { content: ""; position: absolute; display: block; } .abraxas-chat-icon { width: 26px; height: 18px; border: 1px solid ${e.textColor}; border-radius: 5px; position: absolute; } .abraxas-chat-icon:before { width: 8px; height: 8px; -webkit-transform: rotate(45deg); transform: rotate(45deg); background-color: ${e.accentColor}; margin-bottom: 0; border-bottom: 1px solid white; border-right: 1px solid white; left: 5px; bottom: -5px; } .abraxas-close-icon { margin-top: 0; margin-left: 0; width: 30px; height: 30px; transform: translate(0px, 0px); } .abraxas-close-icon:before, .abraxas-close-icon:after { width: 30px; height: 1px; background-color: ${e.textColor}; bottom: 15px; -webkit-transform: rotate(45deg); transform: rotate(45deg); } .abraxas-close-icon:before { -webkit-transform: rotate(-45deg); transform: rotate(-45deg); } #abraxas-chatbot-toggle .abraxas-icon:nth-child(1) { opacity: 1; transition: all 0.66s cubic-bezier(0.25, 0.46, 0.45, 0.94); } #abraxas-chatbot-toggle .abraxas-icon:nth-child(2) { opacity: 0; transition: all 0.66s cubic-bezier(0.25, 0.46, 0.45, 0.94); } #abraxas-chatbot.${s} #abraxas-chatbot-toggle .abraxas-icon:nth-child(1) { opacity: 0; } #abraxas-chatbot.${s} #abraxas-chatbot-toggle .abraxas-icon:nth-child(2) { opacity: 1; } #abraxas-chatbot iframe { width: 0; height: 0vh; opacity: 0; visibility: hidden; /*border: 2px solid ${e.accentColor};*/ background: ${e.backgroundColor}; box-shadow: 0px -1px 4px 2px rgba(0, 0, 0, 0.10); transition: height 0.33s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.17s ease-in-out; } #abraxas-chatbot.${s} iframe { height: 80vh; width: 450px; opacity: 1; visibility: visible; } `,document.body.appendChild(o);const i=document.createElement("div");i.id="abraxas-chatbot",document.body.appendChild(i);const l=document.createElement("div");l.id="abraxas-chatbot-control-bar",i.appendChild(l);const c=document.createElement("div");if(c.id="abraxas-chatbot-toggle",c.addEventListener("click",()=>{i.classList.toggle(s),n=i.classList.contains(s),t(n?"CHAT_OPEN":"CHAT_CLOSE")}),l.appendChild(c),e.teaserText){const d=document.createElement("div");d.id="abraxas-chatbot-teaser",d.innerHTML=e.teaserText,l.appendChild(d)}const a=document.createElement("div");a.classList.add("abraxas-chat-icon","abraxas-icon"),c.appendChild(a);const u=document.createElement("div");u.classList.add("abraxas-close-icon","abraxas-icon"),c.appendChild(u);const $=document.createElement("iframe");$.src=e.embedUrl,window.addEventListener("message",function(d){d.data==="close"&&(i.classList.remove(s),n=i.classList.contains(s))}),i.appendChild($),t("PAGE_LOAD")}};document.readyState==="complete"?r.init():document.addEventListener("DOMContentLoaded",r.init)})({"embedUrl":"https://next.bot.abraxas-apps.ch/ksta_sg/","backgroundColor":"#fff","accentColor":"#000","textColor":"#fff","teaserText":"Haben Sie Fragen?"}, function je(e,t,n){if(typeof window<"u"){const s=location.host.includes("abraxas")?"https:":location.protocol,r=location.host.replace(/:\d{4}/g,":3001").replace(/-apps/,"-apis"),o="backoffice/public",i="ping";let l=location.pathname.split("/").find(h=>h.startsWith("tenant_"))||location.pathname.split("/")[1];const c=`${s}//${r}/${o}/${l}/${i}`,a=`${screen.availWidth}x${screen.availHeight}`;let u=encodeURI(location.host),$=encodeURI(location.pathname),d=`${c}?event=${e}&host=${u}&path=${$}&res=${a}`;t&&n&&(d+=`&dialogType=${n}&conversationId=${t}`),fetch(d).then(h=>{h.status<300?console.log("analytics: success tracking '%s'",e):console.log("analytics: could not track, url '%s', error: %s",d,h.statusText)}).catch(h=>{console.log("analytics: could not track, url '%s', error: %s",d,h)})}return""});