@meetelise/chat 1.17.1 → 1.19.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.
- package/package.json +1 -1
- package/public/dist/index.js +28 -23
- package/src/WebComponent/Launcher.ts +17 -7
- package/src/WebComponent/me-chat.ts +33 -16
- package/src/createConversation.ts +4 -1
- package/src/fetchBuildingInfo.ts +1 -0
package/package.json
CHANGED
package/public/dist/index.js
CHANGED
|
@@ -1047,7 +1047,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1047
1047
|
margin-top: 37px;
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
`,ln([oe({attribute:!1})],dn.prototype,"layoutOptions",void 0),ln([oe({attribute:!1})],dn.prototype,"tourTypeOptions",void 0),ln([oe({type:Number})],dn.prototype,"buildingId",void 0),ln([oe({attribute:!1})],dn.prototype,"onCloseClicked",void 0),ln([ae()],dn.prototype,"tourType",void 0),ln([ae()],dn.prototype,"shouldShowTourType",void 0),ln([ae()],dn.prototype,"email",void 0),ln([ae()],dn.prototype,"phoneNumber",void 0),ln([ae()],dn.prototype,"availabilitiesGroupedByDay",void 0),ln([ae()],dn.prototype,"waitingForAvailabilities",void 0),ln([ae()],dn.prototype,"selectedDate",void 0),ln([ae()],dn.prototype,"selectedTime",void 0),ln([ae()],dn.prototype,"mobilePageIndex",void 0),ln([ae()],dn.prototype,"isSubmitting",void 0),ln([ae()],dn.prototype,"tourIsBooked",void 0),ln([se(".inputContainer#firstName input")],dn.prototype,"firstNameInput",void 0),ln([se(".inputContainer#lastName input")],dn.prototype,"lastNameInput",void 0),ln([se(".inputContainer#email input")],dn.prototype,"emailInput",void 0),ln([se(".inputContainer#phone input")],dn.prototype,"phoneInput",void 0),ln([se("me-select#unitType")],dn.prototype,"unitTypeSelect",void 0),dn=ln([ie("tour-scheduler")],dn),function(e){e[e.Guided=0]="Guided",e[e.Self=1]="Self",e[e.Virtual=2]="Virtual"}(cn||(cn={}));const pn={[cn.Guided]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent,[cn.Self]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided,[cn.Virtual]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing},fn={[cn.Guided]:"escorted-tour",[cn.Self]:"self-guided-tour",[cn.Virtual]:"live-virtual-tour"};class hn{constructor(e,t,n){this.org=e,this.building=t,this.chatId=n,this.featureFlags={}}setFeatureFlags(e){this.featureFlags={...this.featureFlags,...e}}campaignSources(){var e,t,n;const i=new URL(window.location.href).searchParams,r=null!==(n=null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&void 0!==n?n:null;return{entrataCampaignSource:i.get("switch_cls[id]"),realpageCampaignSource:i.get("ilm"),utmCampaignSource:i.get("utm_source"),yardiCampaignSource:r}}ping(e){fetch("https://app.meetelise.com/platformApi/connectors/talk_js/analytics",{method:"POST",credentials:"omit",keepalive:!0,headers:{"content-type":"application/json; charset=UTF-8"},body:JSON.stringify({eventType:e,chatId:this.chatId,url:location.href,org:this.org,building:this.building,referrer:document.referrer,featureFlags:this.featureFlags,campaignSources:this.campaignSources()})})}}var mn,vn=new Uint8Array(16);function gn(){if(!mn&&!(mn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mn(vn)}const yn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,wn=function(e){return"string"==typeof e&&yn.test(e)};for(var bn=[],Sn=0;Sn<256;++Sn)bn.push((Sn+256).toString(16).substr(1));const Tn=function(e,t,n){var i=(e=e||{}).random||(e.rng||gn)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(bn[e[t+0]]+bn[e[t+1]]+bn[e[t+2]]+bn[e[t+3]]+"-"+bn[e[t+4]]+bn[e[t+5]]+"-"+bn[e[t+6]]+bn[e[t+7]]+"-"+bn[e[t+8]]+bn[e[t+9]]+"-"+bn[e[t+10]]+bn[e[t+11]]+bn[e[t+12]]+bn[e[t+13]]+bn[e[t+14]]+bn[e[t+15]]).toLowerCase();if(!wn(n))throw TypeError("Stringified UUID is invalid");return n}(i)};function xn(e,t){const n=In(e,t),i=Tn();return localStorage.setItem(n,i),On(e,t),i}function On(e,t){const n=Rn(e,t),i=(new Date).toISOString();return localStorage.setItem(n,i),i}function In(e,t){return`com.meetelise.chatID-${e}-${t}`}function Rn(e,t){return`com.meetelise.chatIDIssueTime-${e}-${t}`}const Nn="#FFFFFF",An="#202020",Cn={user:{textColor:Nn,backgroundColor:"#1990FF"},agent:{textColor:Nn,backgroundColor:"#1E1E1E"}},_n={user:{textColor:Nn,backgroundColor:"#83818E"},agent:{textColor:Nn,backgroundColor:An}},En={Light:{chatHeader:{backgroundColor:Nn,textColor:An},chatPaneBackgroundColor:"rgba(255, 255, 255, 0.9)",message:Cn},Dark:{chatHeader:{backgroundColor:An,textColor:Nn},chatPaneBackgroundColor:"rgba(32, 32, 32, 0.9)",message:Cn},Purple:{chatHeader:{backgroundColor:"#550098",textColor:Nn},chatPaneBackgroundColor:"rgba(85, 0, 152, 0.6)",message:Cn},Blue:{chatHeader:{backgroundColor:"#0814E5",textColor:Nn},chatPaneBackgroundColor:"rgba(4, 17, 245, 0.6)",message:Cn},Teal:{chatHeader:{backgroundColor:"#6EE7ED",textColor:An},chatPaneBackgroundColor:"rgba(115, 247, 253, 0.8)",message:_n},Green:{chatHeader:{backgroundColor:"#147B0E",textColor:Nn},chatPaneBackgroundColor:"rgba(13, 141, 5, 0.6)",message:Cn},Yellow:{chatHeader:{backgroundColor:"#F1E54F",textColor:An},chatPaneBackgroundColor:"rgba(251, 239, 80, 0.9)",message:_n},Orange:{chatHeader:{backgroundColor:"#C06C31",textColor:Nn},chatPaneBackgroundColor:"rgba(238, 126, 49, 0.7)",message:Cn},Pink:{chatHeader:{backgroundColor:"#A24599",textColor:Nn},chatPaneBackgroundColor:"rgba(167, 70, 157, 0.8)",message:Cn}},Fn=e=>En[e&&Object.keys(En).includes(e)?e:"Light"];function Mn(e,t,n,i,r,o){var a;const s=new Oe.User({id:`building_${t.id}`,name:t.userFirstName,email:null,role:"Default",welcomeMessage:t.welcomeMessage}),u=e.getOrCreateConversation(r);return u.setParticipant(e.me),u.setParticipant(s),u.subject=null!==(a=t.chatTitle)&&void 0!==a?a:t.userFirstName,u.custom={buildingId:t.id.toString(),userId:t.userId.toString(),orgId:t.orgId.toString(),subtitle:t.chatSubtitle,url:location.href,buildingName:t.name,isMobile:o.toString(),chatHeaderBackgroundColor:n.chatHeader.backgroundColor,chatHeaderTextColor:n.chatHeader.textColor,chatPaneBackgroundColor:n.chatPaneBackgroundColor,userMessageTextColor:n.message.user.textColor,userMessageBackgroundColor:n.message.user.backgroundColor,agentMessageTextColor:n.message.agent.textColor,agentMessageBackgroundColor:n.message.agent.backgroundColor,isLightTheme:(n.message===_n).toString(),avatarUrl:"image"===t.avatarType&&t.avatarSrc?i:"https://s3.us-west-2.amazonaws.com/meetelise.com/looping-gradient.gif"},u}const Pn=a`
|
|
1050
|
+
`,ln([oe({attribute:!1})],dn.prototype,"layoutOptions",void 0),ln([oe({attribute:!1})],dn.prototype,"tourTypeOptions",void 0),ln([oe({type:Number})],dn.prototype,"buildingId",void 0),ln([oe({attribute:!1})],dn.prototype,"onCloseClicked",void 0),ln([ae()],dn.prototype,"tourType",void 0),ln([ae()],dn.prototype,"shouldShowTourType",void 0),ln([ae()],dn.prototype,"email",void 0),ln([ae()],dn.prototype,"phoneNumber",void 0),ln([ae()],dn.prototype,"availabilitiesGroupedByDay",void 0),ln([ae()],dn.prototype,"waitingForAvailabilities",void 0),ln([ae()],dn.prototype,"selectedDate",void 0),ln([ae()],dn.prototype,"selectedTime",void 0),ln([ae()],dn.prototype,"mobilePageIndex",void 0),ln([ae()],dn.prototype,"isSubmitting",void 0),ln([ae()],dn.prototype,"tourIsBooked",void 0),ln([se(".inputContainer#firstName input")],dn.prototype,"firstNameInput",void 0),ln([se(".inputContainer#lastName input")],dn.prototype,"lastNameInput",void 0),ln([se(".inputContainer#email input")],dn.prototype,"emailInput",void 0),ln([se(".inputContainer#phone input")],dn.prototype,"phoneInput",void 0),ln([se("me-select#unitType")],dn.prototype,"unitTypeSelect",void 0),dn=ln([ie("tour-scheduler")],dn),function(e){e[e.Guided=0]="Guided",e[e.Self=1]="Self",e[e.Virtual=2]="Virtual"}(cn||(cn={}));const pn={[cn.Guided]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent,[cn.Self]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided,[cn.Virtual]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing},fn={[cn.Guided]:"escorted-tour",[cn.Self]:"self-guided-tour",[cn.Virtual]:"live-virtual-tour"};class hn{constructor(e,t,n){this.org=e,this.building=t,this.chatId=n,this.featureFlags={}}setFeatureFlags(e){this.featureFlags={...this.featureFlags,...e}}campaignSources(){var e,t,n;const i=new URL(window.location.href).searchParams,r=null!==(n=null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&void 0!==n?n:null;return{entrataCampaignSource:i.get("switch_cls[id]"),realpageCampaignSource:i.get("ilm"),utmCampaignSource:i.get("utm_source"),yardiCampaignSource:r}}ping(e){fetch("https://app.meetelise.com/platformApi/connectors/talk_js/analytics",{method:"POST",credentials:"omit",keepalive:!0,headers:{"content-type":"application/json; charset=UTF-8"},body:JSON.stringify({eventType:e,chatId:this.chatId,url:location.href,org:this.org,building:this.building,referrer:document.referrer,featureFlags:this.featureFlags,campaignSources:this.campaignSources()})})}}var mn,vn=new Uint8Array(16);function gn(){if(!mn&&!(mn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mn(vn)}const yn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,wn=function(e){return"string"==typeof e&&yn.test(e)};for(var bn=[],Sn=0;Sn<256;++Sn)bn.push((Sn+256).toString(16).substr(1));const Tn=function(e,t,n){var i=(e=e||{}).random||(e.rng||gn)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(bn[e[t+0]]+bn[e[t+1]]+bn[e[t+2]]+bn[e[t+3]]+"-"+bn[e[t+4]]+bn[e[t+5]]+"-"+bn[e[t+6]]+bn[e[t+7]]+"-"+bn[e[t+8]]+bn[e[t+9]]+"-"+bn[e[t+10]]+bn[e[t+11]]+bn[e[t+12]]+bn[e[t+13]]+bn[e[t+14]]+bn[e[t+15]]).toLowerCase();if(!wn(n))throw TypeError("Stringified UUID is invalid");return n}(i)};function xn(e,t){const n=In(e,t),i=Tn();return localStorage.setItem(n,i),On(e,t),i}function On(e,t){const n=Rn(e,t),i=(new Date).toISOString();return localStorage.setItem(n,i),i}function In(e,t){return`com.meetelise.chatID-${e}-${t}`}function Rn(e,t){return`com.meetelise.chatIDIssueTime-${e}-${t}`}const Nn="#FFFFFF",An="#202020",Cn={user:{textColor:Nn,backgroundColor:"#1990FF"},agent:{textColor:Nn,backgroundColor:"#1E1E1E"}},_n={user:{textColor:Nn,backgroundColor:"#83818E"},agent:{textColor:Nn,backgroundColor:An}},En={Light:{chatHeader:{backgroundColor:Nn,textColor:An},chatPaneBackgroundColor:"rgba(255, 255, 255, 0.9)",message:Cn},Dark:{chatHeader:{backgroundColor:An,textColor:Nn},chatPaneBackgroundColor:"rgba(32, 32, 32, 0.9)",message:Cn},Purple:{chatHeader:{backgroundColor:"#550098",textColor:Nn},chatPaneBackgroundColor:"rgba(85, 0, 152, 0.6)",message:Cn},Blue:{chatHeader:{backgroundColor:"#0814E5",textColor:Nn},chatPaneBackgroundColor:"rgba(4, 17, 245, 0.6)",message:Cn},Teal:{chatHeader:{backgroundColor:"#6EE7ED",textColor:An},chatPaneBackgroundColor:"rgba(115, 247, 253, 0.8)",message:_n},Green:{chatHeader:{backgroundColor:"#147B0E",textColor:Nn},chatPaneBackgroundColor:"rgba(13, 141, 5, 0.6)",message:Cn},Yellow:{chatHeader:{backgroundColor:"#F1E54F",textColor:An},chatPaneBackgroundColor:"rgba(251, 239, 80, 0.9)",message:_n},Orange:{chatHeader:{backgroundColor:"#C06C31",textColor:Nn},chatPaneBackgroundColor:"rgba(238, 126, 49, 0.7)",message:Cn},Pink:{chatHeader:{backgroundColor:"#A24599",textColor:Nn},chatPaneBackgroundColor:"rgba(167, 70, 157, 0.8)",message:Cn}},Fn=e=>En[e&&Object.keys(En).includes(e)?e:"Light"];function Mn(e,t,n,i,r,o){var a;const s=new Oe.User({id:`building_${t.id}`,name:t.userFirstName,email:null,role:"Default",welcomeMessage:t.welcomeMessage}),u=e.getOrCreateConversation(r);return u.setParticipant(e.me),u.setParticipant(s),u.subject=16===t.orgId?"Leasing team":null!==(a=t.chatTitle)&&void 0!==a?a:t.userFirstName,u.custom={buildingId:t.id.toString(),userId:t.userId.toString(),orgId:t.orgId.toString(),subtitle:t.chatSubtitle,url:location.href,buildingName:t.name,isMobile:o.toString(),chatHeaderBackgroundColor:n.chatHeader.backgroundColor,chatHeaderTextColor:n.chatHeader.textColor,chatPaneBackgroundColor:n.chatPaneBackgroundColor,userMessageTextColor:n.message.user.textColor,userMessageBackgroundColor:n.message.user.backgroundColor,agentMessageTextColor:n.message.agent.textColor,agentMessageBackgroundColor:n.message.agent.backgroundColor,isLightTheme:(n.message===_n).toString(),avatarUrl:"image"===t.avatarType&&t.avatarSrc?i:"https://s3.us-west-2.amazonaws.com/meetelise.com/looping-gradient.gif"},u}const Pn=a`
|
|
1051
1051
|
:host {
|
|
1052
1052
|
--glowBarHeight: 11.2px;
|
|
1053
1053
|
--enterAnimationDuration: 0.5s;
|
|
@@ -1863,7 +1863,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1863
1863
|
.call-us-window__open-times {
|
|
1864
1864
|
text-transform: lowercase;
|
|
1865
1865
|
}
|
|
1866
|
-
`],Kn([oe({attribute:!1})],Zn.prototype,"onCloseClicked",void 0),Kn([oe()],Zn.prototype,"phoneNumber",void 0),Kn([oe({attribute:!1})],Zn.prototype,"buildingId",void 0),Kn([oe({attribute:!1})],Zn.prototype,"officeHoursTextInfo",void 0),Zn=Kn([ie("call-us-window")],Zn);const Yn={};var ei=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 ti=class extends te{constructor(){super(...arguments),this.isMobile=!1,this.isFirstMount=!1,this.backgroundColor="rgba(255, 255, 255, 0.75)",this.textColor="#202020",this.isMini=!0,this.phoneNumber="",this.buildingId=0,this.hasEmailEnabled=!
|
|
1866
|
+
`],Kn([oe({attribute:!1})],Zn.prototype,"onCloseClicked",void 0),Kn([oe()],Zn.prototype,"phoneNumber",void 0),Kn([oe({attribute:!1})],Zn.prototype,"buildingId",void 0),Kn([oe({attribute:!1})],Zn.prototype,"officeHoursTextInfo",void 0),Zn=Kn([ie("call-us-window")],Zn);const Yn={};var ei=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 ti=class extends te{constructor(){super(...arguments),this.isMobile=!1,this.isFirstMount=!1,this.backgroundColor="rgba(255, 255, 255, 0.75)",this.textColor="#202020",this.isMini=!0,this.phoneNumber="",this.buildingId=0,this.hasCallUsEnabled=!1,this.hasChatEnabled=!1,this.hasEmailEnabled=!1,this.hasSSTEnabled=!1,this.hasTextUsEnabled=!1,this.layoutOptions=[],this.tourTypeOptions=[],this.onChatTapped=()=>{},this.launcherStyles={},this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.getNumCallToActions=()=>[this.hasEmailEnabled,!!this.phoneNumber&&this.hasCallUsEnabled,this.hasSSTEnabled,this.hasTextUsEnabled].filter((e=>e)).length,this.emailUsWindowRef=be(),this.textUsWindowRef=be(),this.tourSchedulerRef=be(),this.updated=async()=>{if(this.attachOnClickToEmailUsWindow(),this.attachOnClickToTextUsWindow(),this.attachOnClickToSSTWindow(),this.buildingId){const e=await(async e=>{if(Yn[e])return Yn[e];const t=`https://app.meetelise.com/sms_management_numbers/webchat/building/${e}/numbers`,n=await Xt().get(t);return Yn[e]=n.data,n.data})(this.buildingId);this.hasTextUsEnabled=e.length>0&&this.hasTextUsEnabled&&4895!==this.buildingId,await async function(e){return!!e}(this.buildingId)&&this.hasSSTEnabled&&(this.hasSSTEnabled=!0)}},this.attachOnClickToEmailUsWindow=()=>{const e=this.emailUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseEmailWindow)},this.attachOnClickToTextUsWindow=()=>{const e=this.textUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseTextUsWindow)},this.attachOnClickToSSTWindow=()=>{const e=this.tourSchedulerRef.value;e&&(e.onCloseClicked=this.onCloseSSTWindow)},this.onClickEmailOption=e=>{e.preventDefault(),e.stopPropagation(),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.renderEmailOption=()=>{const e=this.getNumCallToActions()>2?"Email":"Email us";return D`
|
|
1867
1867
|
<div
|
|
1868
1868
|
@click=${this.onClickEmailOption}
|
|
1869
1869
|
class="launcher__call-to-action-option"
|
|
@@ -1887,7 +1887,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1887
1887
|
`,this.renderCallToActions=()=>0===this.getNumCallToActions()?D``:D`
|
|
1888
1888
|
<div class="launcher__call-to-actions-wrapper">
|
|
1889
1889
|
${this.hasEmailEnabled?this.renderEmailOption():""}
|
|
1890
|
-
${this.phoneNumber?this.renderCallUsOption():""}
|
|
1890
|
+
${this.phoneNumber&&this.hasCallUsEnabled?this.renderCallUsOption():""}
|
|
1891
1891
|
${this.hasTextUsEnabled?this.renderTextUsOption():""}
|
|
1892
1892
|
${this.hasSSTEnabled?this.renderSSTOption():""}
|
|
1893
1893
|
</div>
|
|
@@ -1935,7 +1935,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1935
1935
|
></call-us-window>
|
|
1936
1936
|
</div>
|
|
1937
1937
|
`:""}
|
|
1938
|
-
${this.isCallToActionWindowOpen()?
|
|
1938
|
+
${this.hasChatEnabled&&!this.isCallToActionWindowOpen()?this.renderMiniOption(D`<svg
|
|
1939
1939
|
width="29"
|
|
1940
1940
|
height="28"
|
|
1941
1941
|
viewBox="0 0 29 28"
|
|
@@ -1947,7 +1947,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1947
1947
|
d="M21.0385 9.79957H7.03915C6.66786 9.79957 6.31178 9.94706 6.04924 10.2096C5.7867 10.4721 5.63921 10.8282 5.63921 11.1995C5.63921 11.5708 5.7867 11.9269 6.04924 12.1894C6.31178 12.4519 6.66786 12.5994 7.03915 12.5994H21.0385C21.4098 12.5994 21.7659 12.4519 22.0284 12.1894C22.291 11.9269 22.4385 11.5708 22.4385 11.1995C22.4385 10.8282 22.291 10.4721 22.0284 10.2096C21.7659 9.94706 21.4098 9.79957 21.0385 9.79957ZM15.4388 15.3993H7.03915C6.66786 15.3993 6.31178 15.5468 6.04924 15.8094C5.7867 16.0719 5.63921 16.428 5.63921 16.7993C5.63921 17.1705 5.7867 17.5266 6.04924 17.7892C6.31178 18.0517 6.66786 18.1992 7.03915 18.1992H15.4388C15.8101 18.1992 16.1661 18.0517 16.4287 17.7892C16.6912 17.5266 16.8387 17.1705 16.8387 16.7993C16.8387 16.428 16.6912 16.0719 16.4287 15.8094C16.1661 15.5468 15.8101 15.3993 15.4388 15.3993ZM14.0388 0C12.2004 0 10.38 0.362105 8.68151 1.06564C6.98302 1.76917 5.43975 2.80036 4.13978 4.10032C1.51439 6.72572 0.0394592 10.2865 0.0394592 13.9994C0.0272207 17.232 1.14652 20.3671 3.20332 22.861L0.403443 25.6609C0.209191 25.8577 0.077602 26.1077 0.0252806 26.3793C-0.0270409 26.6509 0.00224956 26.9319 0.109456 27.1868C0.225732 27.4387 0.414228 27.6503 0.651018 27.7949C0.887807 27.9395 1.16221 28.0104 1.4394 27.9988H14.0388C17.7517 27.9988 21.3125 26.5238 23.9379 23.8984C26.5633 21.273 28.0382 17.7122 28.0382 13.9994C28.0382 10.2865 26.5633 6.72572 23.9379 4.10032C21.3125 1.47493 17.7517 0 14.0388 0V0ZM14.0388 25.1989H4.81325L6.11519 23.8969C6.37593 23.6346 6.52228 23.2798 6.52228 22.91C6.52228 22.5401 6.37593 22.1853 6.11519 21.923C4.28209 20.092 3.14057 17.682 2.8851 15.1036C2.62964 12.5253 3.27604 9.93817 4.71417 7.78299C6.1523 5.6278 8.2932 4.03792 10.7721 3.28422C13.251 2.53051 15.9146 2.65961 18.309 3.64952C20.7033 4.63943 22.6805 6.4289 23.9034 8.71306C25.1264 10.9972 25.5195 13.6348 25.0159 16.1763C24.5123 18.7178 23.1431 21.0061 21.1415 22.6513C19.1399 24.2965 16.6298 25.1968 14.0388 25.1989V25.1989Z"
|
|
1948
1948
|
fill="#1E1E1E"
|
|
1949
1949
|
/>
|
|
1950
|
-
</svg>`,this.onChatTapped)}
|
|
1950
|
+
</svg>`,this.onChatTapped):""}
|
|
1951
1951
|
${this.hasEmailEnabled&&!this.isCallToActionWindowOpen()?this.renderMiniOption(D`
|
|
1952
1952
|
<svg
|
|
1953
1953
|
width="19"
|
|
@@ -1976,7 +1976,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1976
1976
|
/>
|
|
1977
1977
|
</svg>
|
|
1978
1978
|
`,this.onClickSSTOption,!0):""}
|
|
1979
|
-
${this.phoneNumber&&!this.isCallToActionWindowOpen()?this.renderMiniOption(D`
|
|
1979
|
+
${this.phoneNumber&&this.hasCallUsEnabled&&!this.isCallToActionWindowOpen()?this.renderMiniOption(D`
|
|
1980
1980
|
<svg
|
|
1981
1981
|
width="18"
|
|
1982
1982
|
height="18"
|
|
@@ -2079,25 +2079,30 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2079
2079
|
</div>
|
|
2080
2080
|
`}
|
|
2081
2081
|
</div>
|
|
2082
|
-
`}};ti.styles=Pn,ei([oe({type:Boolean})],ti.prototype,"isMobile",void 0),ei([oe({type:Boolean})],ti.prototype,"isFirstMount",void 0),ei([oe()],ti.prototype,"backgroundColor",void 0),ei([oe()],ti.prototype,"textColor",void 0),ei([oe({type:Boolean})],ti.prototype,"isMini",void 0),ei([oe()],ti.prototype,"phoneNumber",void 0),ei([oe({attribute:!1})],ti.prototype,"buildingId",void 0),ei([oe({type:Boolean})],ti.prototype,"hasEmailEnabled",void 0),ei([oe({type:Boolean})],ti.prototype,"hasSSTEnabled",void 0),ei([oe({type:Boolean})],ti.prototype,"hasTextUsEnabled",void 0),ei([oe({attribute:!1})],ti.prototype,"layoutOptions",void 0),ei([oe({attribute:!1})],ti.prototype,"tourTypeOptions",void 0),ei([oe({attribute:!1})],ti.prototype,"onChatTapped",void 0),ei([oe({attribute:!1})],ti.prototype,"launcherStyles",void 0),ei([ae()],ti.prototype,"isEmailWindowOpen",void 0),ei([ae()],ti.prototype,"isCallUsWindowOpen",void 0),ei([ae()],ti.prototype,"isSSTWindowOpen",void 0),ei([ae()],ti.prototype,"isTextUsWindowOpen",void 0),ti=ei([ie("meetelise-launcher")],ti);var ni=n(3379),ii=n.n(ni),ri=n(7795),oi=n.n(ri),ai=n(569),si=n.n(ai),ui=n(3565),li=n.n(ui),di=n(9216),ci=n.n(di),pi=n(4589),fi=n.n(pi),hi=n(3631),mi={};mi.styleTagTransform=fi(),mi.setAttributes=li(),mi.insert=si().bind(null,"head"),mi.domAPI=oi(),mi.insertStyleElement=ci(),ii()(hi.Z,mi),hi.Z&&hi.Z.locals&&hi.Z.locals;var vi,gi=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 yi=vi=class extends te{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.useMiniWidget=!0,this.launcherStyles={},this.popup=null,this.theme=Fn(),this.chatId="",this.analytics=null,this.isMobile=on(),this.launcher=null,this.building=null,this.hasMounted=!1,this.hideLauncher=!1,this.yardiDNIScriptInterval=null,this.launcherRef=be(),this.initializeInstanceVariables=async()=>{await this.setBuildingDerivedInfo(),await this.initializeLaunchJS(),this.attachOnClickToLauncher()},this.setBuildingDerivedInfo=async()=>{var e;this.buildingSlug&&this.orgSlug&&(this.building=await async function(e,t){const n=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}`,i=await fetch(n);return await i.json()}(this.orgSlug,this.buildingSlug),en(this.building.id),this.chatId=function(e,t){const n=In(e,t),i=localStorage.getItem(n);return i&&!function(e,t){const n=Rn(e,t),i=localStorage.getItem(n)||On(e,t),r=new Date(new Date(i).getTime()+864e5);return new Date>r}(e,t)?i:xn(e,t)}(this.orgSlug,this.buildingSlug),this.avatarSrc=this.avatarSrc||this.building.avatarSrc,this.theme=Fn(null!==(e=this.themeId)&&void 0!==e?e:this.building.themeId),this.analytics=new hn(this.orgSlug,this.buildingSlug,this.chatId))},this.initializeLaunchJS=async()=>{var e;if(!this.building||!this.theme)return;if(this.popup&&this.launcher)return;const[t,n,i,r]=await Promise.all([this.building,this.theme,this.avatarSrc,vi.session]);if(t.conversationMaintenanceMode)return new Promise((()=>{console.warn("MeetElise Chat is in maintenance mode. Chat icon will not appear.")}));await this.configureTalkJSPopup(t,n,r,i),this.configureLauncherElement(),null===(e=this.analytics)||void 0===e||e.ping("load"),this.yardiDNIScriptInterval=setInterval((()=>this.pollForYardiCampaignSource()),1e3),setTimeout(clearInterval,15e3,this.yardiDNIScriptInterval)},this.configureLauncherElement=()=>{this.popup&&this.launcherRef.value&&(this.launcher=this.launcherRef.value)},this.configureTalkJSPopup=async(e,t,n,i)=>{const r=n.createPopup(Mn(n,e,t,i||e.avatarSrc,this.chatId,this.isMobile),{launcher:"never",showCloseInHeader:!0,messageField:{placeholder:"Ask a question..."}});await r.mount({show:!1}),r.on("close",(()=>{this.hideLauncher=!1}));const o=document.querySelector(".__talkjs_popup");if(!o)throw new Error("Failed to find chat window");o.classList.add("meetelise-chat","pane"),this.isMobile||o.classList.add("launcher__desktop"),o.style.zIndex="99999999999",this.popup=r},this.firstUpdated=()=>{this.initializeInstanceVariables()},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{var e;this.popup&&(this.popup.show(),null===(e=this.analytics)||void 0===e||e.ping("open"),this.hideLauncher=!0,this.hasMounted=!0)})}}pollForYardiCampaignSource(){var e,t,n;(null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&(null===(n=this.analytics)||void 0===n||n.ping("yardi-DNI-init"),this.yardiDNIScriptInterval&&clearInterval(this.yardiDNIScriptInterval))}async restartConversation(){if(!(this.analytics&&this.analytics.chatId&&this.building&&this.popup&&vi.session))return;this.chatId=xn(this.orgSlug,this.buildingSlug);const e=await vi.session;this.analytics.chatId=this.chatId,this.popup.select(Mn(e,this.building,this.theme,this.avatarSrc||this.building.avatarSrc,this.chatId,this.isMobile))}remove(){var e;null===(e=this.popup)||void 0===e||e.destroy()}open(){var e;null===(e=this.popup)||void 0===e||e.show()}close(){var e;null===(e=this.popup)||void 0===e||e.hide()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}render(){var e,t,n,i,r,o,a,s;return window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",ti),D`
|
|
2082
|
+
`}};ti.styles=Pn,ei([oe({type:Boolean})],ti.prototype,"isMobile",void 0),ei([oe({type:Boolean})],ti.prototype,"isFirstMount",void 0),ei([oe()],ti.prototype,"backgroundColor",void 0),ei([oe()],ti.prototype,"textColor",void 0),ei([oe({type:Boolean})],ti.prototype,"isMini",void 0),ei([oe()],ti.prototype,"phoneNumber",void 0),ei([oe({attribute:!1})],ti.prototype,"buildingId",void 0),ei([oe({type:Boolean})],ti.prototype,"hasCallUsEnabled",void 0),ei([oe({type:Boolean})],ti.prototype,"hasChatEnabled",void 0),ei([oe({type:Boolean})],ti.prototype,"hasEmailEnabled",void 0),ei([oe({type:Boolean})],ti.prototype,"hasSSTEnabled",void 0),ei([oe({type:Boolean})],ti.prototype,"hasTextUsEnabled",void 0),ei([oe({attribute:!1})],ti.prototype,"layoutOptions",void 0),ei([oe({attribute:!1})],ti.prototype,"tourTypeOptions",void 0),ei([oe({attribute:!1})],ti.prototype,"onChatTapped",void 0),ei([oe({attribute:!1})],ti.prototype,"launcherStyles",void 0),ei([ae()],ti.prototype,"isEmailWindowOpen",void 0),ei([ae()],ti.prototype,"isCallUsWindowOpen",void 0),ei([ae()],ti.prototype,"isSSTWindowOpen",void 0),ei([ae()],ti.prototype,"isTextUsWindowOpen",void 0),ti=ei([ie("meetelise-launcher")],ti);var ni=n(3379),ii=n.n(ni),ri=n(7795),oi=n.n(ri),ai=n(569),si=n.n(ai),ui=n(3565),li=n.n(ui),di=n(9216),ci=n.n(di),pi=n(4589),fi=n.n(pi),hi=n(3631),mi={};mi.styleTagTransform=fi(),mi.setAttributes=li(),mi.insert=si().bind(null,"head"),mi.domAPI=oi(),mi.insertStyleElement=ci(),ii()(hi.Z,mi),hi.Z&&hi.Z.locals&&hi.Z.locals;var vi,gi=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 yi=vi=class extends te{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.useMiniWidget=!0,this.launcherStyles={},this.popup=null,this.theme=Fn(),this.chatId="",this.analytics=null,this.isMobile=on(),this.launcher=null,this.building=null,this.hasMounted=!1,this.hideLauncher=!1,this.yardiDNIScriptInterval=null,this.launcherRef=be(),this.initializeInstanceVariables=async()=>{await this.setBuildingDerivedInfo(),await this.initializeLaunchJS(),this.attachOnClickToLauncher()},this.setBuildingDerivedInfo=async()=>{var e;this.buildingSlug&&this.orgSlug&&(this.building=await async function(e,t){const n=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}`,i=await fetch(n);return await i.json()}(this.orgSlug,this.buildingSlug),en(this.building.id),this.chatId=function(e,t){const n=In(e,t),i=localStorage.getItem(n);return i&&!function(e,t){const n=Rn(e,t),i=localStorage.getItem(n)||On(e,t),r=new Date(new Date(i).getTime()+864e5);return new Date>r}(e,t)?i:xn(e,t)}(this.orgSlug,this.buildingSlug),this.avatarSrc=this.avatarSrc||this.building.avatarSrc,this.theme=Fn(null!==(e=this.themeId)&&void 0!==e?e:this.building.themeId),this.analytics=new hn(this.orgSlug,this.buildingSlug,this.chatId))},this.initializeLaunchJS=async()=>{var e;if(!this.building||!this.theme)return;if(this.popup&&this.launcher)return;const[t,n,i,r]=await Promise.all([this.building,this.theme,this.avatarSrc,vi.session]);if(t.conversationMaintenanceMode)return new Promise((()=>{console.warn("MeetElise Chat is in maintenance mode. Chat icon will not appear.")}));await this.configureTalkJSPopup(t,n,r,i),this.configureLauncherElement(),null===(e=this.analytics)||void 0===e||e.ping("load"),this.yardiDNIScriptInterval=setInterval((()=>this.pollForYardiCampaignSource()),1e3),setTimeout(clearInterval,15e3,this.yardiDNIScriptInterval)},this.configureLauncherElement=()=>{this.popup&&this.launcherRef.value&&(this.launcher=this.launcherRef.value)},this.configureTalkJSPopup=async(e,t,n,i)=>{const r=n.createPopup(Mn(n,e,t,i||e.avatarSrc,this.chatId,this.isMobile),{launcher:"never",showCloseInHeader:!0,messageField:{placeholder:"Ask a question..."}});await r.mount({show:!1}),r.on("close",(()=>{this.hideLauncher=!1}));const o=document.querySelector(".__talkjs_popup");if(!o)throw new Error("Failed to find chat window");o.classList.add("meetelise-chat","pane"),this.isMobile||o.classList.add("launcher__desktop"),o.style.zIndex="99999999999",this.popup=r},this.firstUpdated=()=>{this.initializeInstanceVariables()},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{var e;this.popup&&(this.popup.show(),null===(e=this.analytics)||void 0===e||e.ping("open"),this.hideLauncher=!0,this.hasMounted=!0)})}}pollForYardiCampaignSource(){var e,t,n;(null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&(null===(n=this.analytics)||void 0===n||n.ping("yardi-DNI-init"),this.yardiDNIScriptInterval&&clearInterval(this.yardiDNIScriptInterval))}async restartConversation(){if(!(this.analytics&&this.analytics.chatId&&this.building&&this.popup&&vi.session))return;this.chatId=xn(this.orgSlug,this.buildingSlug);const e=await vi.session;this.analytics.chatId=this.chatId,this.popup.select(Mn(e,this.building,this.theme,this.avatarSrc||this.building.avatarSrc,this.chatId,this.isMobile))}remove(){var e;null===(e=this.popup)||void 0===e||e.destroy()}open(){var e;null===(e=this.popup)||void 0===e||e.show()}close(){var e;null===(e=this.popup)||void 0===e||e.hide()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}render(){var e,t,n,i,r,o,a,s,u,l,d,c,p,f,h,m,v,g;return window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",ti),D`
|
|
2083
2083
|
<div
|
|
2084
2084
|
class=${ce({launcherContainer:!0,launcher__mobile:this.isMobile,launcher__desktop:!this.isMobile,"meetelise-chat":!0,launcher:!0,shouldBeVisible:!0})}
|
|
2085
2085
|
>
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2086
|
+
${this.building?D`<meetelise-launcher
|
|
2087
|
+
${xe(this.launcherRef)}
|
|
2088
|
+
.isMobile=${this.isMobile}
|
|
2089
|
+
.isFirstMount=${!this.hasMounted}
|
|
2090
|
+
.isMini=${this.useMiniWidget}
|
|
2091
|
+
.buildingId=${null!==(t=null===(e=this.building)||void 0===e?void 0:e.id)&&void 0!==t?t:0}
|
|
2092
|
+
.layoutOptions=${null!==(i=null===(n=this.building)||void 0===n?void 0:n.layoutOptions)&&void 0!==i?i:[]}
|
|
2093
|
+
.tourTypeOptions=${null!==(o=null===(r=this.building)||void 0===r?void 0:r.tourTypeOptions)&&void 0!==o?o:[]}
|
|
2094
|
+
.launcherStyles=${this.launcherStyles}
|
|
2095
|
+
phoneNumber="${null!==(s=null===(a=this.building)||void 0===a?void 0:a.phoneNumber)&&void 0!==s?s:""}"
|
|
2096
|
+
textColor="${this.theme.chatHeader.textColor}"
|
|
2097
|
+
backgroundColor="${this.theme.chatPaneBackgroundColor}"
|
|
2098
|
+
?hidden=${this.hideLauncher}
|
|
2099
|
+
?hasCallUsEnabled=${!(null===(u=this.building)||void 0===u?void 0:u.chatWidgets)||(null===(l=this.building)||void 0===l?void 0:l.chatWidgets.includes("CALL"))}
|
|
2100
|
+
?hasChatEnabled=${!(null===(d=this.building)||void 0===d?void 0:d.chatWidgets)||(null===(c=this.building)||void 0===c?void 0:c.chatWidgets.includes("CHAT"))}
|
|
2101
|
+
?hasEmailEnabled=${!(null===(p=this.building)||void 0===p?void 0:p.chatWidgets)||(null===(f=this.building)||void 0===f?void 0:f.chatWidgets.includes("EMAIL"))}
|
|
2102
|
+
?hasTextUsEnabled=${!(null===(h=this.building)||void 0===h?void 0:h.chatWidgets)||(null===(m=this.building)||void 0===m?void 0:m.chatWidgets.includes("SMS"))}
|
|
2103
|
+
?hasSSTEnabled=${!(null===(v=this.building)||void 0===v?void 0:v.chatWidgets)||(null===(g=this.building)||void 0===g?void 0:g.chatWidgets.includes("SST"))}
|
|
2104
|
+
>
|
|
2105
|
+
</meetelise-launcher>`:""}
|
|
2101
2106
|
</div>
|
|
2102
2107
|
`}};yi.styles=a`
|
|
2103
2108
|
:host {
|
|
@@ -2112,4 +2117,4 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2112
2117
|
width: 100%;
|
|
2113
2118
|
height: 100px;
|
|
2114
2119
|
}
|
|
2115
|
-
`,yi.session=Oe.ready.then((()=>{const e=new Oe.User({id:"anonymous",name:"Me",email:null,role:"Default"});return new Oe.Session({appId:"ogKIvCor",me:e})})),gi([oe({type:String})],yi.prototype,"buildingSlug",void 0),gi([oe({type:String})],yi.prototype,"orgSlug",void 0),gi([oe({type:String})],yi.prototype,"themeId",void 0),gi([oe({attribute:!1})],yi.prototype,"avatarSrc",void 0),gi([oe({type:Boolean})],yi.prototype,"useMiniWidget",void 0),gi([oe()],yi.prototype,"launcherStyles",void 0),gi([ae()],yi.prototype,"popup",void 0),gi([ae()],yi.prototype,"theme",void 0),gi([ae()],yi.prototype,"chatId",void 0),gi([ae()],yi.prototype,"analytics",void 0),gi([ae()],yi.prototype,"isMobile",void 0),gi([ae()],yi.prototype,"launcher",void 0),gi([ae()],yi.prototype,"building",void 0),gi([ae()],yi.prototype,"hasMounted",void 0),gi([ae()],yi.prototype,"hideLauncher",void 0),yi=vi=gi([ie("me-chat")],yi);class wi{static start(e){bi(),Si();const t=document.createElement("me-chat");t.setAttribute("orgSlug",e.organization),t.setAttribute("buildingSlug",e.building),t.setAttribute("class","meetelise-chat"),e.themeId&&t.setAttribute("themeId",e.themeId),e.avatarSrc&&t.setAttribute("avatarSrc",e.avatarSrc),void 0!==e.mini&&(t.useMiniWidget=e.mini),e.launcherStyles&&(t.launcherStyles=e.launcherStyles),document.body.appendChild(t),wi.meChat=t}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}}wi.meChat=null;const bi=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href","https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap"),document.head.appendChild(e)},Si=()=>{const e=document.createElement("meta");e.setAttribute("name","viewport"),e.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1"),document.head.appendChild(e)}})();var r=i.Z;export{r as default};
|
|
2120
|
+
`,yi.session=Oe.ready.then((()=>{const e=new Oe.User({id:"anonymous",name:"Me",email:null,role:"Default"});return new Oe.Session({appId:"ogKIvCor",me:e})})),gi([oe({type:String})],yi.prototype,"buildingSlug",void 0),gi([oe({type:String})],yi.prototype,"orgSlug",void 0),gi([oe({type:String})],yi.prototype,"themeId",void 0),gi([oe({attribute:!1})],yi.prototype,"avatarSrc",void 0),gi([oe({type:Boolean})],yi.prototype,"useMiniWidget",void 0),gi([oe({type:Object})],yi.prototype,"launcherStyles",void 0),gi([ae()],yi.prototype,"popup",void 0),gi([ae()],yi.prototype,"theme",void 0),gi([ae()],yi.prototype,"chatId",void 0),gi([ae()],yi.prototype,"analytics",void 0),gi([ae()],yi.prototype,"isMobile",void 0),gi([ae()],yi.prototype,"launcher",void 0),gi([ae()],yi.prototype,"building",void 0),gi([ae()],yi.prototype,"hasMounted",void 0),gi([ae()],yi.prototype,"hideLauncher",void 0),yi=vi=gi([ie("me-chat")],yi);class wi{static start(e){bi(),Si();const t=document.createElement("me-chat");t.setAttribute("orgSlug",e.organization),t.setAttribute("buildingSlug",e.building),t.setAttribute("class","meetelise-chat"),e.themeId&&t.setAttribute("themeId",e.themeId),e.avatarSrc&&t.setAttribute("avatarSrc",e.avatarSrc),void 0!==e.mini&&(t.useMiniWidget=e.mini),e.launcherStyles&&(t.launcherStyles=e.launcherStyles),document.body.appendChild(t),wi.meChat=t}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}}wi.meChat=null;const bi=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href","https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap"),document.head.appendChild(e)},Si=()=>{const e=document.createElement("meta");e.setAttribute("name","viewport"),e.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1"),document.head.appendChild(e)}})();var r=i.Z;export{r as default};
|
|
@@ -37,7 +37,11 @@ export class Launcher extends LitElement {
|
|
|
37
37
|
@property({ attribute: false })
|
|
38
38
|
buildingId = 0;
|
|
39
39
|
@property({ type: Boolean })
|
|
40
|
-
|
|
40
|
+
hasCallUsEnabled = false;
|
|
41
|
+
@property({ type: Boolean })
|
|
42
|
+
hasChatEnabled = false;
|
|
43
|
+
@property({ type: Boolean })
|
|
44
|
+
hasEmailEnabled = false;
|
|
41
45
|
@property({ type: Boolean })
|
|
42
46
|
hasSSTEnabled = false;
|
|
43
47
|
@property({ type: Boolean })
|
|
@@ -65,7 +69,7 @@ export class Launcher extends LitElement {
|
|
|
65
69
|
getNumCallToActions = (): number => {
|
|
66
70
|
return [
|
|
67
71
|
this.hasEmailEnabled,
|
|
68
|
-
!!this.phoneNumber,
|
|
72
|
+
!!this.phoneNumber && this.hasCallUsEnabled,
|
|
69
73
|
this.hasSSTEnabled,
|
|
70
74
|
this.hasTextUsEnabled,
|
|
71
75
|
].filter((v) => v).length;
|
|
@@ -84,14 +88,16 @@ export class Launcher extends LitElement {
|
|
|
84
88
|
this.buildingId
|
|
85
89
|
);
|
|
86
90
|
this.hasTextUsEnabled =
|
|
87
|
-
registeredPhoneNumbers.length > 0 &&
|
|
91
|
+
registeredPhoneNumbers.length > 0 &&
|
|
92
|
+
this.hasTextUsEnabled &&
|
|
93
|
+
this.buildingId !== 4895;
|
|
88
94
|
// TODO: replace this with the real API call once the endpoint exists
|
|
89
95
|
const schedulingIsEnabled = await (async function putApiCallHere(
|
|
90
96
|
buildingId: number
|
|
91
97
|
) {
|
|
92
98
|
return !!buildingId;
|
|
93
99
|
})(this.buildingId);
|
|
94
|
-
if (schedulingIsEnabled) {
|
|
100
|
+
if (schedulingIsEnabled && this.hasSSTEnabled) {
|
|
95
101
|
this.hasSSTEnabled = true;
|
|
96
102
|
}
|
|
97
103
|
}
|
|
@@ -209,7 +215,9 @@ export class Launcher extends LitElement {
|
|
|
209
215
|
return html`
|
|
210
216
|
<div class="launcher__call-to-actions-wrapper">
|
|
211
217
|
${this.hasEmailEnabled ? this.renderEmailOption() : ""}
|
|
212
|
-
${this.phoneNumber
|
|
218
|
+
${this.phoneNumber && this.hasCallUsEnabled
|
|
219
|
+
? this.renderCallUsOption()
|
|
220
|
+
: ""}
|
|
213
221
|
${this.hasTextUsEnabled ? this.renderTextUsOption() : ""}
|
|
214
222
|
${this.hasSSTEnabled ? this.renderSSTOption() : ""}
|
|
215
223
|
</div>
|
|
@@ -291,7 +299,7 @@ export class Launcher extends LitElement {
|
|
|
291
299
|
</div>
|
|
292
300
|
`
|
|
293
301
|
: ""}
|
|
294
|
-
${!this.isCallToActionWindowOpen()
|
|
302
|
+
${this.hasChatEnabled && !this.isCallToActionWindowOpen()
|
|
295
303
|
? this.renderMiniOption(
|
|
296
304
|
html`<svg
|
|
297
305
|
width="29"
|
|
@@ -349,7 +357,9 @@ export class Launcher extends LitElement {
|
|
|
349
357
|
true
|
|
350
358
|
)
|
|
351
359
|
: ""}
|
|
352
|
-
${this.phoneNumber &&
|
|
360
|
+
${this.phoneNumber &&
|
|
361
|
+
this.hasCallUsEnabled &&
|
|
362
|
+
!this.isCallToActionWindowOpen()
|
|
353
363
|
? this.renderMiniOption(
|
|
354
364
|
html`
|
|
355
365
|
<svg
|
|
@@ -63,7 +63,7 @@ export class MEChat extends LitElement {
|
|
|
63
63
|
private avatarSrc?: string | null;
|
|
64
64
|
@property({ type: Boolean })
|
|
65
65
|
useMiniWidget = true;
|
|
66
|
-
@property()
|
|
66
|
+
@property({ type: Object })
|
|
67
67
|
launcherStyles: StyleInfo = {};
|
|
68
68
|
|
|
69
69
|
@state()
|
|
@@ -278,21 +278,38 @@ export class MEChat extends LitElement {
|
|
|
278
278
|
shouldBeVisible: true,
|
|
279
279
|
})}
|
|
280
280
|
>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
281
|
+
${this.building
|
|
282
|
+
? html`<meetelise-launcher
|
|
283
|
+
${ref(this.launcherRef)}
|
|
284
|
+
.isMobile=${this.isMobile}
|
|
285
|
+
.isFirstMount=${!this.hasMounted}
|
|
286
|
+
.isMini=${this.useMiniWidget}
|
|
287
|
+
.buildingId=${this.building?.id ?? 0}
|
|
288
|
+
.layoutOptions=${this.building?.layoutOptions ?? []}
|
|
289
|
+
.tourTypeOptions=${this.building?.tourTypeOptions ?? []}
|
|
290
|
+
.launcherStyles=${this.launcherStyles}
|
|
291
|
+
phoneNumber="${this.building?.phoneNumber ?? ""}"
|
|
292
|
+
textColor="${this.theme.chatHeader.textColor}"
|
|
293
|
+
backgroundColor="${this.theme.chatPaneBackgroundColor}"
|
|
294
|
+
?hidden=${this.hideLauncher}
|
|
295
|
+
?hasCallUsEnabled=${!this.building?.chatWidgets
|
|
296
|
+
? true
|
|
297
|
+
: this.building?.chatWidgets.includes("CALL")}
|
|
298
|
+
?hasChatEnabled=${!this.building?.chatWidgets
|
|
299
|
+
? true
|
|
300
|
+
: this.building?.chatWidgets.includes("CHAT")}
|
|
301
|
+
?hasEmailEnabled=${!this.building?.chatWidgets
|
|
302
|
+
? true
|
|
303
|
+
: this.building?.chatWidgets.includes("EMAIL")}
|
|
304
|
+
?hasTextUsEnabled=${!this.building?.chatWidgets
|
|
305
|
+
? true
|
|
306
|
+
: this.building?.chatWidgets.includes("SMS")}
|
|
307
|
+
?hasSSTEnabled=${!this.building?.chatWidgets
|
|
308
|
+
? true
|
|
309
|
+
: this.building?.chatWidgets.includes("SST")}
|
|
310
|
+
>
|
|
311
|
+
</meetelise-launcher>`
|
|
312
|
+
: ""}
|
|
296
313
|
</div>
|
|
297
314
|
`;
|
|
298
315
|
}
|
|
@@ -24,7 +24,10 @@ export default function createConversation(
|
|
|
24
24
|
const conversation = session.getOrCreateConversation(chatID);
|
|
25
25
|
conversation.setParticipant(session.me);
|
|
26
26
|
conversation.setParticipant(agent);
|
|
27
|
-
conversation.subject =
|
|
27
|
+
conversation.subject =
|
|
28
|
+
building.orgId === 16
|
|
29
|
+
? "Leasing team" // by AVB request
|
|
30
|
+
: building.chatTitle ?? building.userFirstName;
|
|
28
31
|
conversation.custom = {
|
|
29
32
|
buildingId: building.id.toString(),
|
|
30
33
|
userId: building.userId.toString(),
|