UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 733 B
import{intercomStore as i}from"../store";const s="k5f7wyx2";let a=!1;export function bootIntercom(c){if(a)return;a=!0;const{subDomain:r,subscriptionStatus:d}=c,n=window;n.intercomSettings={api_base:"https://api-iam.intercom.io",app_id:s,alignment:"right",hide_default_launcher:!0,expofp_subdomain:r,expofp_subscription_status:d};const e=function(){e.c(arguments)};e.q=[],e.c=function(t){e.q.push(t)},n.Intercom=e,e("onUnreadCountChange",t=>i.setUnreadCount(t));const o=()=>{const t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=`https://widget.intercom.io/widget/${s}`,t.onload=()=>i.setEnabled(!0),document.head.appendChild(t)};document.readyState==="complete"?o():window.addEventListener("load",o,!1)}