@meetelise/chat 1.43.26 → 1.43.28

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,8 @@ export declare class ChatAdditionalActions extends LitElement {
7
7
  buildingWebchatView: BuildingWebchatView | null;
8
8
  primaryColor: string | null;
9
9
  backgroundColor: string | null;
10
+ foregroundColorOnPrimaryBackgroundColor: string | null;
11
+ foregroundColorOnSecondaryBackgroundColor: string | null;
10
12
  enabledChatWidgets: {
11
13
  callDesktop: boolean;
12
14
  chatDesktop: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.43.26",
3
+ "version": "1.43.28",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",
@@ -4678,7 +4678,7 @@ xmlns="http://www.w3.org/2000/svg"
4678
4678
  </tbody>
4679
4679
  </table>
4680
4680
  </div>
4681
- `:B`<div class="empty-state">No add-ons available</div> `}};Vo.styles=Fo,Wo([ue({type:Array})],Vo.prototype,"addons",null),Wo([ue({type:Boolean})],Vo.prototype,"disabled",void 0),Wo([ue()],Vo.prototype,"onAddonSelect",void 0),Wo([ue({attribute:!1})],Vo.prototype,"onRentableItemAdd",void 0),Wo([ue({attribute:!1})],Vo.prototype,"onRentableItemRemove",void 0),Wo([ce()],Vo.prototype,"quantities",void 0),Wo([ce()],Vo.prototype,"selectedRentableItemIds",void 0),Vo=Wo([se("addon-table")],Vo);var Yo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Ko=class extends oe{constructor(){super(...arguments),this.id="",this.showChatAdditionalActions=!1,this.buildingWebchatView=null,this.primaryColor=null,this.backgroundColor=null,this.enabledChatWidgets={callDesktop:!1,chatDesktop:!1,emailDesktop:!1,textDesktop:!1,sstDesktop:!1},this.onClickMinimize=()=>{},this.onClickEmailOption=()=>{},this.onClickPhoneOption=()=>{},this.onClickSSTOption=()=>{},this.onClose=()=>{}}render(){const e=this.primaryColor||Le,t=this.backgroundColor||"#ffffff",n=this.buildingWebchatView&&He(this.buildingWebchatView.orgId,this.buildingWebchatView.id)&&e!==Le?Fe(e,.6):"black";return B`
4681
+ `:B`<div class="empty-state">No add-ons available</div> `}};Vo.styles=Fo,Wo([ue({type:Array})],Vo.prototype,"addons",null),Wo([ue({type:Boolean})],Vo.prototype,"disabled",void 0),Wo([ue()],Vo.prototype,"onAddonSelect",void 0),Wo([ue({attribute:!1})],Vo.prototype,"onRentableItemAdd",void 0),Wo([ue({attribute:!1})],Vo.prototype,"onRentableItemRemove",void 0),Wo([ce()],Vo.prototype,"quantities",void 0),Wo([ce()],Vo.prototype,"selectedRentableItemIds",void 0),Vo=Wo([se("addon-table")],Vo);var Yo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Ko=class extends oe{constructor(){super(...arguments),this.id="",this.showChatAdditionalActions=!1,this.buildingWebchatView=null,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.enabledChatWidgets={callDesktop:!1,chatDesktop:!1,emailDesktop:!1,textDesktop:!1,sstDesktop:!1},this.onClickMinimize=()=>{},this.onClickEmailOption=()=>{},this.onClickPhoneOption=()=>{},this.onClickSSTOption=()=>{},this.onClose=()=>{}}render(){const e=this.primaryColor||Le,t=this.backgroundColor||"#ffffff",n=this.buildingWebchatView&&He(this.buildingWebchatView.orgId,this.buildingWebchatView.id)&&e!==Le?Fe(e,.6):"black";return B`
4682
4682
  <style>
4683
4683
  #${this.id}::after {
4684
4684
  border-right-color: ${n} !important;
@@ -4695,6 +4695,8 @@ xmlns="http://www.w3.org/2000/svg"
4695
4695
  .onClickSSTOption=${this.onClickSSTOption}
4696
4696
  .primaryColor=${e}
4697
4697
  .backgroundColor=${t}
4698
+ .foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
4699
+ .foregroundColorOnSecondaryBackgroundColor=${this.foregroundColorOnSecondaryBackgroundColor}
4698
4700
  .hideChat=${!0}
4699
4701
  .hasCallUsEnabled=${this.enabledChatWidgets.callDesktop}
4700
4702
  .hasChatEnabled=${this.enabledChatWidgets.chatDesktop}
@@ -4718,7 +4720,7 @@ xmlns="http://www.w3.org/2000/svg"
4718
4720
  justify-content: space-between;
4719
4721
  gap: 32px;
4720
4722
  }
4721
- `,Yo([ue({type:String})],Ko.prototype,"id",void 0),Yo([ue({type:Boolean})],Ko.prototype,"showChatAdditionalActions",void 0),Yo([ue({type:Object})],Ko.prototype,"buildingWebchatView",void 0),Yo([ue({type:String})],Ko.prototype,"primaryColor",void 0),Yo([ue({type:String})],Ko.prototype,"backgroundColor",void 0),Yo([ue({type:Object})],Ko.prototype,"enabledChatWidgets",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickMinimize",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickEmailOption",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickPhoneOption",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickSSTOption",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClose",void 0),Ko=Yo([se("chat-additional-actions")],Ko);const Xo=u`
4723
+ `,Yo([ue({type:String})],Ko.prototype,"id",void 0),Yo([ue({type:Boolean})],Ko.prototype,"showChatAdditionalActions",void 0),Yo([ue({type:Object})],Ko.prototype,"buildingWebchatView",void 0),Yo([ue({type:String})],Ko.prototype,"primaryColor",void 0),Yo([ue({type:String})],Ko.prototype,"backgroundColor",void 0),Yo([ue({type:String})],Ko.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Yo([ue({type:String})],Ko.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),Yo([ue({type:Object})],Ko.prototype,"enabledChatWidgets",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickMinimize",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickEmailOption",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickPhoneOption",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClickSSTOption",void 0),Yo([ue({attribute:!0})],Ko.prototype,"onClose",void 0),Ko=Yo([se("chat-additional-actions")],Ko);const Xo=u`
4722
4724
  :host {
4723
4725
  display: block;
4724
4726
  }
@@ -6749,7 +6751,7 @@ xmlns="http://www.w3.org/2000/svg"
6749
6751
  </button>
6750
6752
  </div>
6751
6753
  </div>
6752
- `}};Pl.styles=[xn,hs,ds,cs,kl],Ol([ue({type:Number})],Pl.prototype,"right",void 0),Ol([ue({type:Number})],Pl.prototype,"bottom",void 0),Ol([ue({type:Number})],Pl.prototype,"top",void 0),Ol([ue({type:Number})],Pl.prototype,"left",void 0),Ol([ue({attribute:!0})],Pl.prototype,"onMount",void 0),Ol([ue({attribute:!0})],Pl.prototype,"channel",void 0),Ol([ue({attribute:!0})],Pl.prototype,"isHealthChat",void 0),Ol([ue({attribute:!0})],Pl.prototype,"myPubnub",void 0),Ol([ue({attribute:!0})],Pl.prototype,"orgSlug",void 0),Ol([ue({attribute:!0})],Pl.prototype,"buildingSlug",void 0),Ol([ue({attribute:!0})],Pl.prototype,"widgetType",void 0),Ol([ue({attribute:!0})],Pl.prototype,"building",void 0),Ol([ue({attribute:!0})],Pl.prototype,"primaryColor",void 0),Ol([ue({attribute:!0})],Pl.prototype,"backgroundColor",void 0),Ol([ue({attribute:!0})],Pl.prototype,"onClickExit",void 0),Ol([ue({attribute:!0})],Pl.prototype,"requiresConsent",void 0),Ol([de("#message-input",!0)],Pl.prototype,"messageInput",void 0),Ol([de("#conversation-body",!0)],Pl.prototype,"messageBody",void 0),Ol([ce()],Pl.prototype,"messages",void 0),Ol([ce()],Pl.prototype,"isLoadingMessages",void 0),Ol([ce()],Pl.prototype,"hasReceivedConsent",void 0),Ol([ce()],Pl.prototype,"privacyPolicyUrl",void 0),Ol([ce()],Pl.prototype,"websitePreviewMapping",void 0),Pl=Ol([se("pubnub-chat")],Pl);const Il="cdn.skypack.dev/@meetelise/chat",Ml="cdn.eliseai.com/@meetelise/chat",Nl=async(e,t)=>{try{if(Math.random()>=.15)return;const n=(()=>{try{const e=document.getElementsByTagName("script");for(const t of e){const e=t.src||"",n=t.textContent||"";if(e.includes(Il)||n.includes(Il))return"skypack";if(e.includes(Ml)||n.includes(Ml))return"eliseai"}return"unknown"}catch(e){return"unknown"}})();await r().post("https://app.meetelise.com/platformApi/webchat/cdn-version",{cdn_version:n},{params:{cdn_version:n},headers:{"Content-Type":"application/json","building-slug":t,"org-slug":e}})}catch(e){}},Dl=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?`${t}/units`:t;class Ul{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>En(kn(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=Ci();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(yi()).filter(e=>e)}},this.addSafeLeadSourceTouchpoint=e=>{const t=this.getLocalStorageMultitouchValue(),n=this._generateLeadSourceLocalStorageKey();if(!t||this.isExpiredTimestamp(t.timestampExpires)){const t={timestampExpires:this._generateNewExpirationTimestamp(),leadSources:[{parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"touchpoint"}]};localStorage.setItem(n,JSON.stringify(t))}else{if(t.leadSources.find(t=>t.leadSourceValue===e))return;if(t.leadSources.length<this.maxSourcesNonPropertyWebsiteCount)return t.leadSources.push({parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));vi({logType:bi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,logTitle:"TOO_MANY_LEAD_SOURCES",logData:{buildingSlug:this.buildingSlug}})}},this.getSafeLeadSourceTouchpointsWithDefault=({includedUserSelectedLeadSource:e})=>{const t=this.getLocalStorageMultitouchValue(),n=Ei(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:En(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Nn(e.timestampInitiallyLogged).getTime()-Nn(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:En(new Date),r=[{timestampInitiallyLogged:i,leadSourceValue:n,type:"default"},...t.leadSources.map(e=>({timestampInitiallyLogged:e.timestampInitiallyLogged,leadSourceValue:e.leadSourceValue,type:e.type}))];return e&&r.push({leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"user-selected"}),r},this.getLocalStorageMultitouchValue=()=>{const e=this._generateLeadSourceLocalStorageKey(),t=localStorage.getItem(e);if(!t)return null;return JSON.parse(t)},this.isExpiredTimestamp=e=>Nn(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var Ll,Rl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Bl=Ll=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=ei.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.LeadSourceMultitouchClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=Zl.Default,this.onWidgetLoaded=ya(),this.onSstClose=ya(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=ke(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await Mi(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,t)=>{const n=window.rentgrata;if(!n)return;const i=n.Widget;if(!i)return;const o=i.config;if(!o)return;const a=o.widgetKey;a&&await r().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=t?t:""}})})(this.buildingSlug,this.orgSlug)}catch(e){}try{Nl(this.orgSlug,this.buildingSlug)}catch(e){}await Cr(e,this.buildingSlug,this.orgSlug)&&(wi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==e?void 0:e.launchedDateTime)?.01:.05}),this.buildingWebchatView=e,await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)&&(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.updateAlreadyAutoOpenedTimestamp()),this.isLoading=!1,"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0))},this.setBuildingDerivedInfo=async()=>{var e,t,n,i,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,k,T,_,O,P,I,M,N,D,U,L,R,B,j,F,H,$,z,G,Q,q;const W=this.buildingWebchatView;if(!W)return;W&&this.orgSlug&&Fl(this.orgSlug,null!==(t=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==t?t:null,this.sampleRateToUse,this.buildingSlug,null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null);const V=W.featureFlagWebchatMarketingSourceDropdownConfiguration,Y=W.featureFlagWebchatUseDniPhoneNumberBySource,K=W.featureFlagInsertDniIntoWebsite,X=W.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite,[Z,J]=await Promise.all([ja(this.orgSlug,this.buildingSlug),ti(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Ie(W.phoneNumber)),this.leadSources=Z,this.featureFlagShowDropdown=V;const ee=W.textWithUsPhoneNumber?W.textWithUsPhoneNumber:await(async e=>{try{const t="https://app.meetelise.com",n=await r().get(`${t}/platformApi/webchat/${e}/phone-number`);if(n.data)return n.data}catch(t){return vi({logType:bi.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug),te=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,ne=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,ie={callDesktop:null!==(c=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==c&&c,callMobile:null!==(h=null===(d=this.buildingWebchatView)||void 0===d?void 0:d.shouldShowPhoneMobile)&&void 0!==h&&h,chatDesktop:null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.shouldShowChatDesktop)&&void 0!==f&&f,chatMobile:null!==(m=null===(g=this.buildingWebchatView)||void 0===g?void 0:g.shouldShowChatMobile)&&void 0!==m&&m,emailDesktop:null!==(b=null===(y=this.buildingWebchatView)||void 0===y?void 0:y.shouldShowEmailDesktop)&&void 0!==b&&b,emailMobile:null!==(w=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailMobile)&&void 0!==w&&w,textDesktop:null!==(x=(null===(C=this.buildingWebchatView)||void 0===C?void 0:C.shouldShowTextDesktop)&&!!ee)&&void 0!==x&&x,textMobile:null!==(S=(null===(A=this.buildingWebchatView)||void 0===A?void 0:A.shouldShowTextMobile)&&!!ee)&&void 0!==S&&S,sstDesktop:null!==(k=null===(E=this.buildingWebchatView)||void 0===E?void 0:E.shouldShowSstDesktop)&&void 0!==k&&k,sstMobile:null!==(_=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstMobile)&&void 0!==_&&_,calcDesktop:te,calcMobile:ne};var re,oe;this.enabledChatWidgets=Sa(ie),this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(oe=this.handleTourClicked,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",e=>{e.preventDefault(),oe(e)})}),X&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(t=>{t&&t.addEventListener("click",t=>{t.preventDefault(),e(t)})})})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.textContent=t.textContent,i.style.cursor="pointer",i.addEventListener("click",t=>{t.preventDefault(),e(t)}),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)})})(this.handleTourClicked)):(null===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&(re=null!==(I=null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&void 0!==I?I:null,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(re)}`)}})),this.buildingWebchatView&&(this.primaryColor=null!==(M=this.buildingWebchatView.primaryColor)&&void 0!==M?M:null,this.backgroundColor=null!==(N=this.buildingWebchatView.secondaryColor)&&void 0!==N?N:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(D=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==D?D:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(U=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==U?U:null,this.webchatConfigHasAutoOpenChat=null!==(L=this.buildingWebchatView.autoOpenChat)&&void 0!==L&&L,this.requiresConsent=null!==(R=this.buildingWebchatView.requiresConsentForChat)&&void 0!==R&&R,this.hideMobileFeatures=null!==(B=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==B&&B,this.privacyPolicyUrl=null!==(j=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==j?j:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===_i.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===_i.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===_i.EMOJI&&(this.designConcept=_i.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Le),null===this.backgroundColor&&(this.backgroundColor=Re);const ae=null!==(H=null===(F=this.buildingWebchatView)||void 0===F?void 0:F.phoneNumber)&&void 0!==H?H:"";let se=null;if(Y&&(se=await async function(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source`,{params:{source:t}});return n.data?{number:Ie(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(z=null===($=this.LeadSourceClient)||void 0===$?void 0:$.leadSource)&&void 0!==z?z:null),se&&!se.isMatch&&(se.number=ae)),K&&(null==se?void 0:se.number)){const e=ss(se.number,this.orgSlug,this.buildingSlug);e>0&&wi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const le=localStorage.getItem("eliseai_phone_number_devtest");le&&ss(le,this.orgSlug,this.buildingSlug),this.phoneNumberForSource=se||{number:ae,isMatch:!1,isPropertyWebsiteCatchall:!0};const ue=null!==(Q=null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&void 0!==Q?Q:null;if(ue&&(this.leadSources.includes(ue)||this.leadSources.push(ue)),Gn(W.id),J&&this.buildingSlug&&(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isLiveOnApplications)){const e=((e,t,n)=>{var i;const r=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/,/busboomgroup\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/],o=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<o.length;s++){const l=o[s];if(l.nodeType===Node.ELEMENT_NODE&&r.some(e=>e.test(l.href))){const r=l.getAttribute("href"),o=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=Dl(o,e);l.setAttribute("href",s),a++,vi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:bi.info,buildingSlug:n,orgSlug:t})}}return 0===a&&vi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:bi.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}`,this.orgSlug,this.buildingSlug);e>0&&wi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a;if(!this.buildingWebchatView)return;const s=es(this.buildingSlug),l=ts(this.buildingSlug,s)?s:Ja(this.buildingSlug,!1);if(!l.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new ki,this.LeadSourceMultitouchClient=new Ul(this.orgSlug,this.buildingSlug),this.myPubnub=new as(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,l.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel;const u=await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(n=null===(t=this.myPubnub)||void 0===t?void 0:t.leadUserId)&&void 0!==n?n:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));u&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(u),"property-website"!==Ei(this.orgSlug)?this.myPubnub.leadSource=null!==(r=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==r?r:Ei(this.orgSlug):this.myPubnub.leadSource=null!==(a=null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource)&&void 0!==a?a:null,l.initiatedChat&&await this.myPubnub.initializePubnub(s)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!Pn(Nn(t)));return!!e&&!!n&&!mn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",En(function(e,t){return Ge(2,arguments),st(e,6e4*at(t))}(new Date,15)))},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!r)return;const o=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==o?void 0:o.getBoundingClientRect();a&&(r.style.left=`${a.left}px`,r.style.top=`${a.bottom}px`)},this.handleKeydownTab=e=>{var t,n,i,r,o,a,s;if("Tab"===e.key){const l=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("meetelise-launcher"))||void 0===n?void 0:n.shadowRoot,u=this.displayPubnubChat?null===(o=null===(r=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat"))||void 0===r?void 0:r.shadowRoot)||void 0===o?void 0:o.getElementById("pubnub-chat-container"):null!==(s=null!==(a=null==l?void 0:l.getElementById("email-us-window"))&&void 0!==a?a:null==l?void 0:l.getElementById("tour-scheduler-window"))&&void 0!==s?s:null==l?void 0:l.getElementById("call-us-window");if(!u)return;e.preventDefault();const c=this.displayPubnubChat?Array.from(u.querySelectorAll(Ll.FOCUSABLE_SELECTOR)):this.collectFocusableElements(u),d=this.getDeepActiveElement(),h=c.findIndex(e=>e===d);c[e.shiftKey?(h-1+c.length)%c.length:(h+1)%c.length].focus()}},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false")}}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new mi(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),Za(this.buildingSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),window.addEventListener("keydown",this.handleKeydownTab)}static isFocusable(e){return!("disabled"in e)||!e.disabled}collectFocusableElements(e){const t=[];e instanceof Element&&e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));const n=e.querySelectorAll("*");for(const e of Array.from(n))e.matches(Ll.FOCUSABLE_SELECTOR)&&Ll.isFocusable(e)&&t.push(e),e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));return t}getDeepActiveElement(){let e=document.activeElement,t=0;for(;(null==e?void 0:e.shadowRoot)&&(null==e?void 0:e.shadowRoot.activeElement);)if(t+=1,e=null==e?void 0:e.shadowRoot.activeElement,t>100){vi({logType:bi.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_GETTING_DEEP_ELEMENT]",logData:{message:"error getting deep active element"}});break}return e}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),super.disconnectedCallback()}render(){var e,t,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,k,T,_,O,P,I,M,N,D,U;Ca();const L=this.hideLauncher&&!this.isLoading&&!mn();return B`
6754
+ `}};Pl.styles=[xn,hs,ds,cs,kl],Ol([ue({type:Number})],Pl.prototype,"right",void 0),Ol([ue({type:Number})],Pl.prototype,"bottom",void 0),Ol([ue({type:Number})],Pl.prototype,"top",void 0),Ol([ue({type:Number})],Pl.prototype,"left",void 0),Ol([ue({attribute:!0})],Pl.prototype,"onMount",void 0),Ol([ue({attribute:!0})],Pl.prototype,"channel",void 0),Ol([ue({attribute:!0})],Pl.prototype,"isHealthChat",void 0),Ol([ue({attribute:!0})],Pl.prototype,"myPubnub",void 0),Ol([ue({attribute:!0})],Pl.prototype,"orgSlug",void 0),Ol([ue({attribute:!0})],Pl.prototype,"buildingSlug",void 0),Ol([ue({attribute:!0})],Pl.prototype,"widgetType",void 0),Ol([ue({attribute:!0})],Pl.prototype,"building",void 0),Ol([ue({attribute:!0})],Pl.prototype,"primaryColor",void 0),Ol([ue({attribute:!0})],Pl.prototype,"backgroundColor",void 0),Ol([ue({attribute:!0})],Pl.prototype,"onClickExit",void 0),Ol([ue({attribute:!0})],Pl.prototype,"requiresConsent",void 0),Ol([de("#message-input",!0)],Pl.prototype,"messageInput",void 0),Ol([de("#conversation-body",!0)],Pl.prototype,"messageBody",void 0),Ol([ce()],Pl.prototype,"messages",void 0),Ol([ce()],Pl.prototype,"isLoadingMessages",void 0),Ol([ce()],Pl.prototype,"hasReceivedConsent",void 0),Ol([ce()],Pl.prototype,"privacyPolicyUrl",void 0),Ol([ce()],Pl.prototype,"websitePreviewMapping",void 0),Pl=Ol([se("pubnub-chat")],Pl);const Il="cdn.skypack.dev/@meetelise/chat",Ml="cdn.eliseai.com/@meetelise/chat",Nl=async(e,t)=>{try{if(Math.random()>=.15)return;const n=(()=>{try{const e=document.getElementsByTagName("script");for(const t of e){const e=t.src||"",n=t.textContent||"";if(e.includes(Il)||n.includes(Il))return"skypack";if(e.includes(Ml)||n.includes(Ml))return"eliseai"}return"unknown"}catch(e){return"unknown"}})();await r().post("https://app.meetelise.com/platformApi/webchat/cdn-version",{cdn_version:n},{params:{cdn_version:n},headers:{"Content-Type":"application/json","building-slug":t,"org-slug":e}})}catch(e){}},Dl=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?`${t}/units`:t;class Ul{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>En(kn(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=Ci();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(yi()).filter(e=>e)}},this.addSafeLeadSourceTouchpoint=e=>{const t=this.getLocalStorageMultitouchValue(),n=this._generateLeadSourceLocalStorageKey();if(!t||this.isExpiredTimestamp(t.timestampExpires)){const t={timestampExpires:this._generateNewExpirationTimestamp(),leadSources:[{parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"touchpoint"}]};localStorage.setItem(n,JSON.stringify(t))}else{if(t.leadSources.find(t=>t.leadSourceValue===e))return;if(t.leadSources.length<this.maxSourcesNonPropertyWebsiteCount)return t.leadSources.push({parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));vi({logType:bi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,logTitle:"TOO_MANY_LEAD_SOURCES",logData:{buildingSlug:this.buildingSlug}})}},this.getSafeLeadSourceTouchpointsWithDefault=({includedUserSelectedLeadSource:e})=>{const t=this.getLocalStorageMultitouchValue(),n=Ei(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:En(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Nn(e.timestampInitiallyLogged).getTime()-Nn(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:En(new Date),r=[{timestampInitiallyLogged:i,leadSourceValue:n,type:"default"},...t.leadSources.map(e=>({timestampInitiallyLogged:e.timestampInitiallyLogged,leadSourceValue:e.leadSourceValue,type:e.type}))];return e&&r.push({leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"user-selected"}),r},this.getLocalStorageMultitouchValue=()=>{const e=this._generateLeadSourceLocalStorageKey(),t=localStorage.getItem(e);if(!t)return null;return JSON.parse(t)},this.isExpiredTimestamp=e=>Nn(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var Ll,Rl=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Bl=Ll=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=ei.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.LeadSourceMultitouchClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=Zl.Default,this.onWidgetLoaded=ya(),this.onSstClose=ya(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=ke(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await Mi(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,t)=>{const n=window.rentgrata;if(!n)return;const i=n.Widget;if(!i)return;const o=i.config;if(!o)return;const a=o.widgetKey;a&&await r().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=t?t:""}})})(this.buildingSlug,this.orgSlug)}catch(e){}try{Nl(this.orgSlug,this.buildingSlug)}catch(e){}await Cr(e,this.buildingSlug,this.orgSlug)&&(wi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==e?void 0:e.launchedDateTime)?.01:.05}),this.buildingWebchatView=e,await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)&&(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.updateAlreadyAutoOpenedTimestamp()),this.isLoading=!1,"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0))},this.setBuildingDerivedInfo=async()=>{var e,t,n,i,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,k,T,_,O,P,I,M,N,D,U,L,R,B,j,F,H,$,z,G,Q,q;const W=this.buildingWebchatView;if(!W)return;W&&this.orgSlug&&Fl(this.orgSlug,null!==(t=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==t?t:null,this.sampleRateToUse,this.buildingSlug,null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null);const V=W.featureFlagWebchatMarketingSourceDropdownConfiguration,Y=W.featureFlagWebchatUseDniPhoneNumberBySource,K=W.featureFlagInsertDniIntoWebsite,X=W.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite,[Z,J]=await Promise.all([ja(this.orgSlug,this.buildingSlug),ti(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Ie(W.phoneNumber)),this.leadSources=Z,this.featureFlagShowDropdown=V;const ee=W.textWithUsPhoneNumber?W.textWithUsPhoneNumber:await(async e=>{try{const t="https://app.meetelise.com",n=await r().get(`${t}/platformApi/webchat/${e}/phone-number`);if(n.data)return n.data}catch(t){return vi({logType:bi.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug),te=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,ne=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,ie={callDesktop:null!==(c=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==c&&c,callMobile:null!==(h=null===(d=this.buildingWebchatView)||void 0===d?void 0:d.shouldShowPhoneMobile)&&void 0!==h&&h,chatDesktop:null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.shouldShowChatDesktop)&&void 0!==f&&f,chatMobile:null!==(m=null===(g=this.buildingWebchatView)||void 0===g?void 0:g.shouldShowChatMobile)&&void 0!==m&&m,emailDesktop:null!==(b=null===(y=this.buildingWebchatView)||void 0===y?void 0:y.shouldShowEmailDesktop)&&void 0!==b&&b,emailMobile:null!==(w=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailMobile)&&void 0!==w&&w,textDesktop:null!==(x=(null===(C=this.buildingWebchatView)||void 0===C?void 0:C.shouldShowTextDesktop)&&!!ee)&&void 0!==x&&x,textMobile:null!==(S=(null===(A=this.buildingWebchatView)||void 0===A?void 0:A.shouldShowTextMobile)&&!!ee)&&void 0!==S&&S,sstDesktop:null!==(k=null===(E=this.buildingWebchatView)||void 0===E?void 0:E.shouldShowSstDesktop)&&void 0!==k&&k,sstMobile:null!==(_=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstMobile)&&void 0!==_&&_,calcDesktop:te,calcMobile:ne};var re,oe;this.enabledChatWidgets=Sa(ie),this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(oe=this.handleTourClicked,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",e=>{e.preventDefault(),oe(e)})}),X&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(t=>{t&&t.addEventListener("click",t=>{t.preventDefault(),e(t)})})})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.textContent=t.textContent,i.style.cursor="pointer",i.addEventListener("click",t=>{t.preventDefault(),e(t)}),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)})})(this.handleTourClicked)):(null===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&(re=null!==(I=null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&void 0!==I?I:null,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(re)}`)}})),this.buildingWebchatView&&(this.primaryColor=null!==(M=this.buildingWebchatView.primaryColor)&&void 0!==M?M:null,this.backgroundColor=null!==(N=this.buildingWebchatView.secondaryColor)&&void 0!==N?N:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(D=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==D?D:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(U=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==U?U:null,this.webchatConfigHasAutoOpenChat=null!==(L=this.buildingWebchatView.autoOpenChat)&&void 0!==L&&L,this.requiresConsent=null!==(R=this.buildingWebchatView.requiresConsentForChat)&&void 0!==R&&R,this.hideMobileFeatures=null!==(B=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==B&&B,this.privacyPolicyUrl=null!==(j=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==j?j:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===_i.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===_i.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===_i.EMOJI&&(this.designConcept=_i.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Le),null===this.backgroundColor&&(this.backgroundColor=Re);const ae=null!==(H=null===(F=this.buildingWebchatView)||void 0===F?void 0:F.phoneNumber)&&void 0!==H?H:"";let se=null;if(Y&&(se=await async function(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source`,{params:{source:t}});return n.data?{number:Ie(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(z=null===($=this.LeadSourceClient)||void 0===$?void 0:$.leadSource)&&void 0!==z?z:null),se&&!se.isMatch&&(se.number=ae)),K&&(null==se?void 0:se.number)){const e=ss(se.number,this.orgSlug,this.buildingSlug);e>0&&wi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const le=localStorage.getItem("eliseai_phone_number_devtest");le&&ss(le,this.orgSlug,this.buildingSlug),this.phoneNumberForSource=se||{number:ae,isMatch:!1,isPropertyWebsiteCatchall:!0};const ue=null!==(Q=null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&void 0!==Q?Q:null;if(ue&&(this.leadSources.includes(ue)||this.leadSources.push(ue)),Gn(W.id),J&&this.buildingSlug&&(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isLiveOnApplications)){const e=((e,t,n)=>{var i;const r=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/,/busboomgroup\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/],o=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<o.length;s++){const l=o[s];if(l.nodeType===Node.ELEMENT_NODE&&r.some(e=>e.test(l.href))){const r=l.getAttribute("href"),o=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=Dl(o,e);l.setAttribute("href",s),a++,vi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:bi.info,buildingSlug:n,orgSlug:t})}}return 0===a&&vi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:bi.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}`,this.orgSlug,this.buildingSlug);e>0&&wi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a;if(!this.buildingWebchatView)return;const s=es(this.buildingSlug),l=ts(this.buildingSlug,s)?s:Ja(this.buildingSlug,!1);if(!l.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new ki,this.LeadSourceMultitouchClient=new Ul(this.orgSlug,this.buildingSlug),this.myPubnub=new as(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,l.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel;const u=await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(n=null===(t=this.myPubnub)||void 0===t?void 0:t.leadUserId)&&void 0!==n?n:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));u&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(u),"property-website"!==Ei(this.orgSlug)?this.myPubnub.leadSource=null!==(r=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==r?r:Ei(this.orgSlug):this.myPubnub.leadSource=null!==(a=null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource)&&void 0!==a?a:null,l.initiatedChat&&await this.myPubnub.initializePubnub(s)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!Pn(Nn(t)));return!!e&&!!n&&!mn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",En(function(e,t){return Ge(2,arguments),st(e,6e4*at(t))}(new Date,15)))},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!r)return;const o=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==o?void 0:o.getBoundingClientRect();a&&(r.style.left=`${a.left}px`,r.style.top=`${a.bottom}px`)},this.handleKeydownTab=e=>{var t,n,i,r,o,a,s;if("Tab"===e.key){const l=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("meetelise-launcher"))||void 0===n?void 0:n.shadowRoot,u=this.displayPubnubChat?null===(o=null===(r=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat"))||void 0===r?void 0:r.shadowRoot)||void 0===o?void 0:o.getElementById("pubnub-chat-container"):null!==(s=null!==(a=null==l?void 0:l.getElementById("email-us-window"))&&void 0!==a?a:null==l?void 0:l.getElementById("tour-scheduler-window"))&&void 0!==s?s:null==l?void 0:l.getElementById("call-us-window");if(!u)return;e.preventDefault();const c=this.displayPubnubChat?Array.from(u.querySelectorAll(Ll.FOCUSABLE_SELECTOR)):this.collectFocusableElements(u),d=this.getDeepActiveElement(),h=c.findIndex(e=>e===d);c[e.shiftKey?(h-1+c.length)%c.length:(h+1)%c.length].focus()}},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false")}}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new mi(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),Za(this.buildingSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),window.addEventListener("keydown",this.handleKeydownTab)}static isFocusable(e){return!("disabled"in e)||!e.disabled}collectFocusableElements(e){const t=[];e instanceof Element&&e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));const n=e.querySelectorAll("*");for(const e of Array.from(n))e.matches(Ll.FOCUSABLE_SELECTOR)&&Ll.isFocusable(e)&&t.push(e),e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));return t}getDeepActiveElement(){let e=document.activeElement,t=0;for(;(null==e?void 0:e.shadowRoot)&&(null==e?void 0:e.shadowRoot.activeElement);)if(t+=1,e=null==e?void 0:e.shadowRoot.activeElement,t>100){vi({logType:bi.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_GETTING_DEEP_ELEMENT]",logData:{message:"error getting deep active element"}});break}return e}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),super.disconnectedCallback()}render(){var e,t,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,k,T,_,O,P,I,M,N,D,U,L,R;Ca();const j=this.hideLauncher&&!this.isLoading&&!mn();return B`
6753
6755
  <meta name="viewport" content="width=device-width, initial-scale=1">
6754
6756
  <div id="aria-describe-info" style="display: none;">
6755
6757
  EliseAI widget that allows you to chat with a virtual assistant, book
@@ -6780,10 +6782,12 @@ xmlns="http://www.w3.org/2000/svg"
6780
6782
  ></pubnub-chat>
6781
6783
  <chat-additional-actions
6782
6784
  id="chatAdditionalActionsPubnub"
6783
- .showChatAdditionalActions=${L||this.showTourNextToChat}
6785
+ .showChatAdditionalActions=${j||this.showTourNextToChat}
6784
6786
  .buildingWebchatView=${this.buildingWebchatView}
6785
6787
  .primaryColor=${this.primaryColor}
6786
6788
  .backgroundColor=${this.backgroundColor}
6789
+ .foregroundColorOnPrimaryBackgroundColor=${null!==(t=this.foregroundColorOnPrimaryBackgroundColor)&&void 0!==t?t:"white"}
6790
+ .foregroundColorOnSecondaryBackgroundColor=${null!==(n=this.foregroundColorOnSecondaryBackgroundColor)&&void 0!==n?n:"black"}
6787
6791
  .enabledChatWidgets=${this.enabledChatWidgets}
6788
6792
  .onClickMinimize=${this.onClickMinimize}
6789
6793
  .onClickEmailOption=${this.handleContactClicked}
@@ -6801,39 +6805,39 @@ xmlns="http://www.w3.org/2000/svg"
6801
6805
  id="meetelise-launcher"
6802
6806
  ${Oe(this.launcherRef)}
6803
6807
  .isFirstMount=${!this.hasMounted}
6804
- .buildingId=${null!==(n=null===(t=this.buildingWebchatView)||void 0===t?void 0:t.id)&&void 0!==n?n:0}
6805
- .hasDynamicSchedulingEnabled=${null!==(r=null===(i=this.buildingWebchatView)||void 0===i?void 0:i.usesDynamicScheduling)&&void 0!==r&&r}
6806
- .orgLegalName=${null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.orgLegalName)&&void 0!==a?a:""}
6807
- .tourTypeOptions=${null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.tourTypeOptions)&&void 0!==l?l:[]}
6808
+ .buildingId=${null!==(r=null===(i=this.buildingWebchatView)||void 0===i?void 0:i.id)&&void 0!==r?r:0}
6809
+ .hasDynamicSchedulingEnabled=${null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.usesDynamicScheduling)&&void 0!==a&&a}
6810
+ .orgLegalName=${null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.orgLegalName)&&void 0!==l?l:""}
6811
+ .tourTypeOptions=${null!==(c=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.tourTypeOptions)&&void 0!==c?c:[]}
6808
6812
  .launcherStyles=${this.launcherStyles}
6809
6813
  .primaryColor=${this.primaryColor}
6810
6814
  .backgroundColor=${this.backgroundColor}
6811
- .foregroundColorOnPrimaryBackgroundColor=${null!==(u=this.foregroundColorOnPrimaryBackgroundColor)&&void 0!==u?u:"white"}
6812
- .foregroundColorOnSecondaryBackgroundColor=${null!==(c=this.foregroundColorOnSecondaryBackgroundColor)&&void 0!==c?c:"black"}
6815
+ .foregroundColorOnPrimaryBackgroundColor=${null!==(d=this.foregroundColorOnPrimaryBackgroundColor)&&void 0!==d?d:"white"}
6816
+ .foregroundColorOnSecondaryBackgroundColor=${null!==(h=this.foregroundColorOnSecondaryBackgroundColor)&&void 0!==h?h:"black"}
6813
6817
  .isMinimized=${this.isMinimized}
6814
6818
  .onClickMinimize=${this.onClickMinimize}
6815
6819
  .onSstClose=${this.onSstClose}
6816
6820
  .overrideRentgrata=${this.overrideRentgrata}
6817
- .autoOpenChatWidget=${null!==(h=null===(d=this.buildingWebchatView)||void 0===d?void 0:d.autoOpenChat)&&void 0!==h&&h}
6821
+ .autoOpenChatWidget=${null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.autoOpenChat)&&void 0!==f&&f}
6818
6822
  .mobileStyles=${mn()||this.isMinimized?this.mobileStyles:{}}
6819
- chatCallUsHeader=${null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.chatCallUsHeader)&&void 0!==f?f:""}
6823
+ chatCallUsHeader=${null!==(m=null===(g=this.buildingWebchatView)||void 0===g?void 0:g.chatCallUsHeader)&&void 0!==m?m:""}
6820
6824
  chatId="${this.chatId}"
6821
- phoneNumber="${null!==(b=null!==(m=null===(g=this.phoneNumberForSource)||void 0===g?void 0:g.number)&&void 0!==m?m:null===(y=this.buildingWebchatView)||void 0===y?void 0:y.phoneNumber)&&void 0!==b?b:""}"
6822
- buildingName=${null!==(w=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.name)&&void 0!==w?w:""}
6825
+ phoneNumber="${null!==(w=null!==(b=null===(y=this.phoneNumberForSource)||void 0===y?void 0:y.number)&&void 0!==b?b:null===(v=this.buildingWebchatView)||void 0===v?void 0:v.phoneNumber)&&void 0!==w?w:""}"
6826
+ buildingName=${null!==(x=null===(C=this.buildingWebchatView)||void 0===C?void 0:C.name)&&void 0!==x?x:""}
6823
6827
  orgSlug="${this.orgSlug}"
6824
6828
  buildingSlug="${this.buildingSlug}"
6825
- sgtUrl="${null!==(x=null===(C=this.buildingWebchatView)||void 0===C?void 0:C.sgtUrl)&&void 0!==x?x:""}"
6826
- selfGuidedToursTypeOffered="${null===(A=this.buildingWebchatView)||void 0===A?void 0:A.selfGuidedToursTypeOffered}"
6827
- selfGuidedTourEnabled="${null===(S=this.buildingWebchatView)||void 0===S?void 0:S.isSelfGuidedTourEnabled}"
6828
- designConcept="${null!==(E=this.designConcept)&&void 0!==E?E:""}"
6829
- currentLeadSource="${null!==(_=null!==(T=null===(k=this.LeadSourceClient)||void 0===k?void 0:k.leadSource)&&void 0!==T?T:null)&&void 0!==_?_:""}"
6829
+ sgtUrl="${null!==(S=null===(A=this.buildingWebchatView)||void 0===A?void 0:A.sgtUrl)&&void 0!==S?S:""}"
6830
+ selfGuidedToursTypeOffered="${null===(E=this.buildingWebchatView)||void 0===E?void 0:E.selfGuidedToursTypeOffered}"
6831
+ selfGuidedTourEnabled="${null===(k=this.buildingWebchatView)||void 0===k?void 0:k.isSelfGuidedTourEnabled}"
6832
+ designConcept="${null!==(T=this.designConcept)&&void 0!==T?T:""}"
6833
+ currentLeadSource="${null!==(P=null!==(O=null===(_=this.LeadSourceClient)||void 0===_?void 0:_.leadSource)&&void 0!==O?O:null)&&void 0!==P?P:""}"
6830
6834
  featureFlagShowDropdown="${this.featureFlagShowDropdown}"
6831
- .leadSources="${null!==(O=this.leadSources)&&void 0!==O?O:[]}"
6832
- escortedToursLink="${null!==(I=null===(P=this.buildingWebchatView)||void 0===P?void 0:P.escortedToursLink)&&void 0!==I?I:""}"
6835
+ .leadSources="${null!==(I=this.leadSources)&&void 0!==I?I:[]}"
6836
+ escortedToursLink="${null!==(N=null===(M=this.buildingWebchatView)||void 0===M?void 0:M.escortedToursLink)&&void 0!==N?N:""}"
6833
6837
  .escortedToursTypeOffered="${this.buildingWebchatView.escortedToursTypeOffered}"
6834
- virtualToursLink="${null!==(N=null===(M=this.buildingWebchatView)||void 0===M?void 0:M.virtualToursLink)&&void 0!==N?N:""}"
6835
- virtualToursTypeOffered="${null!==(D=this.buildingWebchatView.virtualToursTypeOffered)&&void 0!==D?D:""}"
6836
- .showTourNextToChat="${null!==(U=this.showTourNextToChat)&&void 0!==U?U:""}"
6838
+ virtualToursLink="${null!==(U=null===(D=this.buildingWebchatView)||void 0===D?void 0:D.virtualToursLink)&&void 0!==U?U:""}"
6839
+ virtualToursTypeOffered="${null!==(L=this.buildingWebchatView.virtualToursTypeOffered)&&void 0!==L?L:""}"
6840
+ .showTourNextToChat="${null!==(R=this.showTourNextToChat)&&void 0!==R?R:""}"
6837
6841
  @closeShowTourNextToChat=${()=>{this.showTourNextToChat=!1,this.hideLauncher=!0}}
6838
6842
  ?hidden=${this.hideLauncher}
6839
6843
  .hasCallUsEnabledDesktop=${this.enabledChatWidgets.callDesktop}
@@ -37,6 +37,12 @@ export class ChatAdditionalActions extends LitElement {
37
37
  @property({ type: String })
38
38
  backgroundColor: string | null = null;
39
39
 
40
+ @property({ type: String })
41
+ foregroundColorOnPrimaryBackgroundColor: string | null = null;
42
+
43
+ @property({ type: String })
44
+ foregroundColorOnSecondaryBackgroundColor: string | null = null;
45
+
40
46
  @property({ type: Object })
41
47
  enabledChatWidgets: {
42
48
  callDesktop: boolean;
@@ -111,6 +117,10 @@ export class ChatAdditionalActions extends LitElement {
111
117
  .onClickSSTOption=${this.onClickSSTOption}
112
118
  .primaryColor=${primaryColorValue}
113
119
  .backgroundColor=${backgroundColorValue}
120
+ .foregroundColorOnPrimaryBackgroundColor=${this
121
+ .foregroundColorOnPrimaryBackgroundColor}
122
+ .foregroundColorOnSecondaryBackgroundColor=${this
123
+ .foregroundColorOnSecondaryBackgroundColor}
114
124
  .hideChat=${true}
115
125
  .hasCallUsEnabled=${this.enabledChatWidgets.callDesktop}
116
126
  .hasChatEnabled=${this.enabledChatWidgets.chatDesktop}
@@ -896,6 +896,10 @@ export class MEChat extends LitElement {
896
896
  .buildingWebchatView=${this.buildingWebchatView}
897
897
  .primaryColor=${this.primaryColor}
898
898
  .backgroundColor=${this.backgroundColor}
899
+ .foregroundColorOnPrimaryBackgroundColor=${this
900
+ .foregroundColorOnPrimaryBackgroundColor ?? "white"}
901
+ .foregroundColorOnSecondaryBackgroundColor=${this
902
+ .foregroundColorOnSecondaryBackgroundColor ?? "black"}
899
903
  .enabledChatWidgets=${this.enabledChatWidgets}
900
904
  .onClickMinimize=${this.onClickMinimize}
901
905
  .onClickEmailOption=${this.handleContactClicked}