@meetelise/chat 1.12.10 → 1.12.11

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.12.10",
3
+ "version": "1.12.11",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "public/dist/index.js",
@@ -430,7 +430,7 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
430
430
  .option.active {
431
431
  background-color: var(--active-option-color);
432
432
  }
433
- `,Gt([oe({attribute:!1})],$t.prototype,"options",void 0),Gt([oe({type:String})],$t.prototype,"placeholder",void 0),Gt([oe({type:String})],$t.prototype,"value",void 0),Gt([ae()],$t.prototype,"activeOption",void 0),Gt([ae()],$t.prototype,"isOpen",void 0),Gt([se("#select",!0)],$t.prototype,"meSelect",void 0),$t=Gt([ne("me-select")],$t),Math.pow(10,8);var Vt=36e5,Xt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Qt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Kt(e){var t,i={},n=e.split(Xt.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?t=n[0]:(i.date=n[0],t=n[1],Xt.timeZoneDelimiter.test(i.date)&&(i.date=e.split(Xt.timeZoneDelimiter)[0],t=e.substr(i.date.length,e.length))),t){var r=Xt.timezone.exec(t);r?(i.time=t.replace(r[1],""),i.timezone=r[1]):i.time=t}return i}function ei(e,t){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(i);if(!n)return{year:NaN,restDateString:""};var r=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((n[1]||n[2]).length)}}function ti(e,t){if(null===t)return new Date(NaN);var i=e.match(Qt);if(!i)return new Date(NaN);var n=!!i[4],r=ii(i[1]),o=ii(i[2])-1,a=ii(i[3]),s=ii(i[4]),l=ii(i[5])-1;if(n)return function(e,t,i){return t>=1&&t<=53&&i>=0&&i<=6}(0,s,l)?function(e,t,i){var n=new Date(0);n.setUTCFullYear(e,0,4);var r=7*(t-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+r),n}(t,s,l):new Date(NaN);var u=new Date(0);return function(e,t,i){return t>=0&&t<=11&&i>=1&&i<=(ai[t]||(si(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(si(e)?366:365)}(t,r)?(u.setUTCFullYear(t,o,Math.max(r,a)),u):new Date(NaN)}function ii(e){return e?parseInt(e):1}function ni(e){var t=e.match(Zt);if(!t)return NaN;var i=ri(t[1]),n=ri(t[2]),r=ri(t[3]);return function(e,t,i){return 24===e?0===t&&0===i:i>=0&&i<60&&t>=0&&t<60&&e>=0&&e<25}(i,n,r)?i*Vt+6e4*n+1e3*r:NaN}function ri(e){return e&&parseFloat(e.replace(",","."))||0}function oi(e){if("Z"===e)return 0;var t=e.match(Yt);if(!t)return 0;var i="+"===t[1]?-1:1,n=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,r)?i*(n*Vt+6e4*r):NaN}var ai=[31,null,31,30,31,30,31,31,30,31,30,31];function si(e){return e%400==0||e%4==0&&e%100!=0}var li=i(9669),ui=i.n(li),di=i(7739),ci=i.n(di);const pi={},fi=async e=>{if(pi[e])return pi[e];const t=function(e){_e(1,arguments);var t=Fe(e);return t.setHours(0,0,0,0),t}(Date.now()),i=zt(function(e){_e(1,arguments);var t=Fe(e);return t.setHours(23,59,59,999),t}(function(e,t){_e(2,arguments);var i=Fe(e),n=Ve(t);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}(t,30))),n=`https://app.meetelise.com/api/pub/v1/buildings/${e}/tour/availabilities?startTime=${zt(t)}&endTime=${i}`,r=await ui().get(n);return pi[e]=r.data,r.data},mi=async e=>(async(e,t)=>{var i;const n=await(async(e,t)=>{var i,n,r;const o=await fi(e),a=(null===(i=o.availability)||void 0===i?void 0:i[t])?null===(r=null===(n=o.availability)||void 0===n?void 0:n[t].availableTourStartTimes)||void 0===r?void 0:r.map((e=>function(e,t){_e(1,arguments);var i=t||{},n=null==i.additionalDigits?2:Ve(i.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=Kt(e);if(o.date){var a=ei(o.date,n);r=ti(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,l=r.getTime(),u=0;if(o.time&&(u=ni(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var d=new Date(l+u),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return s=oi(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}(e))):[];return o.availability?{...o.availability[t],availableTourStartTimes:a}:null})(e,t);return n?ci()(null!==(i=n.availableTourStartTimes)&&void 0!==i?i:[],(e=>Pt(e,"yyyy-MM-dd"))):{}})(Object.keys(pi).map(Number)[0],e);var hi=i(9991);i(7294);const vi=()=>window.matchMedia("(max-width: 767px)").matches;var gi=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let yi=class extends te{constructor(){super(...arguments),this.layoutOptions=[],this.tourTypeOptions=[],this.buildingId=0,this.tourType=wi.Guided,this.email="",this.phoneNumber="",this.availabilitiesGroupedByDay={},this.mobilePageIndex=0,this.tourIsBooked=!1,this.firstUpdated=async()=>{this.availabilitiesGroupedByDay=await mi(Si[this.tourType])},this.willUpdate=async e=>{e.has("tourType")&&(this.availabilitiesGroupedByDay=await mi(Si[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const i=e.target.selectionStart;if(1!==e.key.length||Ne(e)){if("Backspace"===e.key){if(Ne(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,n=this.phoneNumber.slice(0,i).replace(/\D/g,""),r=this.phoneNumber.slice(i).replace(/\D/g,""),o=`${n.slice(0,-1)}${r}`;this.phoneNumber=Ie(o),this.phoneInput.value=this.phoneNumber;const a=i-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Ne(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,i).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,n=i-e>-1?i-e:0;this.phoneInput.setSelectionRange(n,n)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(i).split(/\d+/)[0].length||0)+1,t=i+e<this.phoneNumber.length?i+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,i)+e.key+this.phoneNumber.slice(i);this.phoneNumber=Ie(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const i=this.phoneInput.selectionStart,n=i?this.phoneInput.value.slice(i).replace(/\D/g,""):"";this.phoneNumber=Ie(this.phoneInput.value);let r=0,o=n.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>!isNaN(this.tourType),dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t;return!!(null===(e=this.nameInput)||void 0===e?void 0:e.value)&&(null===(t=this.emailInput)||void 0===t?void 0:t.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,i]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(i)]},this.submit=async()=>{var e;if(!this.selectedDate||!this.selectedTime)return;const[t,i]=this.timeStringToHoursAndMinutes(this.selectedTime),n=new Date(this.selectedDate.getTime());n.setHours(t,i);const r=n.toISOString(),o={email_address:this.email,phone_number:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,building_id:this.buildingId,first_name:this.nameInput.value.split(" ")[0],last_name:this.nameInput.value.split(" ").slice(1).join(" "),tour_type:bi[this.tourType],tour_time:r};200===(await ui().post("https://app.meetelise.com/platformApi/state/create/scheduleMe",o)).status&&(this.tourIsBooked=!0)},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.dateAndTimeMenu(!0)}`},{validate:()=>this.validators.leadInfo(),nextButtonText:"Schedule tour",nextButtonAction:this.submit,render:()=>D`${this.userInfoAndLayoutMenu()}`}]}tourTypeMenu(){return D`<h2 id="tourType">Tour Type</h2>
433
+ `,Gt([oe({attribute:!1})],$t.prototype,"options",void 0),Gt([oe({type:String})],$t.prototype,"placeholder",void 0),Gt([oe({type:String})],$t.prototype,"value",void 0),Gt([ae()],$t.prototype,"activeOption",void 0),Gt([ae()],$t.prototype,"isOpen",void 0),Gt([se("#select",!0)],$t.prototype,"meSelect",void 0),$t=Gt([ne("me-select")],$t),Math.pow(10,8);var Vt=36e5,Xt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Qt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Kt(e){var t,i={},n=e.split(Xt.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?t=n[0]:(i.date=n[0],t=n[1],Xt.timeZoneDelimiter.test(i.date)&&(i.date=e.split(Xt.timeZoneDelimiter)[0],t=e.substr(i.date.length,e.length))),t){var r=Xt.timezone.exec(t);r?(i.time=t.replace(r[1],""),i.timezone=r[1]):i.time=t}return i}function ei(e,t){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(i);if(!n)return{year:NaN,restDateString:""};var r=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((n[1]||n[2]).length)}}function ti(e,t){if(null===t)return new Date(NaN);var i=e.match(Qt);if(!i)return new Date(NaN);var n=!!i[4],r=ii(i[1]),o=ii(i[2])-1,a=ii(i[3]),s=ii(i[4]),l=ii(i[5])-1;if(n)return function(e,t,i){return t>=1&&t<=53&&i>=0&&i<=6}(0,s,l)?function(e,t,i){var n=new Date(0);n.setUTCFullYear(e,0,4);var r=7*(t-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+r),n}(t,s,l):new Date(NaN);var u=new Date(0);return function(e,t,i){return t>=0&&t<=11&&i>=1&&i<=(ai[t]||(si(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(si(e)?366:365)}(t,r)?(u.setUTCFullYear(t,o,Math.max(r,a)),u):new Date(NaN)}function ii(e){return e?parseInt(e):1}function ni(e){var t=e.match(Zt);if(!t)return NaN;var i=ri(t[1]),n=ri(t[2]),r=ri(t[3]);return function(e,t,i){return 24===e?0===t&&0===i:i>=0&&i<60&&t>=0&&t<60&&e>=0&&e<25}(i,n,r)?i*Vt+6e4*n+1e3*r:NaN}function ri(e){return e&&parseFloat(e.replace(",","."))||0}function oi(e){if("Z"===e)return 0;var t=e.match(Yt);if(!t)return 0;var i="+"===t[1]?-1:1,n=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,r)?i*(n*Vt+6e4*r):NaN}var ai=[31,null,31,30,31,30,31,31,30,31,30,31];function si(e){return e%400==0||e%4==0&&e%100!=0}var li=i(9669),ui=i.n(li),di=i(7739),ci=i.n(di);const pi={},fi=async e=>{if(pi[e])return pi[e];const t=function(e){_e(1,arguments);var t=Fe(e);return t.setHours(0,0,0,0),t}(Date.now()),i=zt(function(e){_e(1,arguments);var t=Fe(e);return t.setHours(23,59,59,999),t}(function(e,t){_e(2,arguments);var i=Fe(e),n=Ve(t);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}(t,30))),n=`https://app.meetelise.com/api/pub/v1/buildings/${e}/tour/availabilities?startTime=${zt(t)}&endTime=${i}`,r=await ui().get(n);return pi[e]=r.data,r.data},mi=async e=>(async(e,t)=>{var i;const n=await(async(e,t)=>{var i,n,r;const o=await fi(e),a=(null===(i=o.availability)||void 0===i?void 0:i[t])?null===(r=null===(n=o.availability)||void 0===n?void 0:n[t].availableTourStartTimes)||void 0===r?void 0:r.map((e=>function(e,t){_e(1,arguments);var i=t||{},n=null==i.additionalDigits?2:Ve(i.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=Kt(e);if(o.date){var a=ei(o.date,n);r=ti(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,l=r.getTime(),u=0;if(o.time&&(u=ni(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var d=new Date(l+u),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return s=oi(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}(e))):[];return o.availability?{...o.availability[t],availableTourStartTimes:a}:null})(e,t);return n?ci()(null!==(i=n.availableTourStartTimes)&&void 0!==i?i:[],(e=>Pt(e,"yyyy-MM-dd"))):{}})(Object.keys(pi).map(Number)[0],e);var hi=i(9991);i(7294);const vi=()=>window.matchMedia("(max-width: 767px)").matches;var gi=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let yi=class extends te{constructor(){super(...arguments),this.layoutOptions=[],this.tourTypeOptions=[],this.buildingId=0,this.tourType=wi.Guided,this.email="",this.phoneNumber="",this.availabilitiesGroupedByDay={},this.mobilePageIndex=0,this.tourIsBooked=!1,this.firstUpdated=async()=>{this.availabilitiesGroupedByDay=await mi(Si[this.tourType])},this.willUpdate=async e=>{e.has("tourType")&&(this.availabilitiesGroupedByDay=await mi(Si[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const i=e.target.selectionStart;if(1!==e.key.length||Ne(e)){if("Backspace"===e.key){if(Ne(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,n=this.phoneNumber.slice(0,i).replace(/\D/g,""),r=this.phoneNumber.slice(i).replace(/\D/g,""),o=`${n.slice(0,-1)}${r}`;this.phoneNumber=Ie(o),this.phoneInput.value=this.phoneNumber;const a=i-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Ne(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,i).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,n=i-e>-1?i-e:0;this.phoneInput.setSelectionRange(n,n)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(i).split(/\d+/)[0].length||0)+1,t=i+e<this.phoneNumber.length?i+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,i)+e.key+this.phoneNumber.slice(i);this.phoneNumber=Ie(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const i=this.phoneInput.selectionStart,n=i?this.phoneInput.value.slice(i).replace(/\D/g,""):"";this.phoneNumber=Ie(this.phoneInput.value);let r=0,o=n.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>!isNaN(this.tourType),dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t;return!!(null===(e=this.nameInput)||void 0===e?void 0:e.value)&&(null===(t=this.emailInput)||void 0===t?void 0:t.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,i]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(i)]},this.submit=async()=>{var e;if(!this.selectedDate||!this.selectedTime)return;const[t,i]=this.timeStringToHoursAndMinutes(this.selectedTime),n=new Date(this.selectedDate.getTime());n.setHours(t,i);const r=n.toISOString(),o={email_address:this.email,phone_number:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,building_id:this.buildingId,first_name:this.nameInput.value.split(" ")[0],last_name:this.nameInput.value.split(" ").slice(1).join(" "),tour_type:bi[this.tourType],tour_time:r};200===(await ui().post("https://app.meetelise.com/platformApi/state/create/scheduleMe",o,{headers:{"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG"}})).status&&(this.tourIsBooked=!0)},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.dateAndTimeMenu(!0)}`},{validate:()=>this.validators.leadInfo(),nextButtonText:"Schedule tour",nextButtonAction:this.submit,render:()=>D`${this.userInfoAndLayoutMenu()}`}]}tourTypeMenu(){return D`<h2 id="tourType">Tour Type</h2>
434
434
  <div id="tourTypeMenu">
435
435
  ${this.tourTypeOptions.map((e=>e.value)).includes("WITH_AGENT")?D` <tour-type-option
436
436
  tourtype="guided"
@@ -1738,7 +1738,7 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
1738
1738
  .call-us-window__open-times {
1739
1739
  text-transform: lowercase;
1740
1740
  }
1741
- `],sn([oe({attribute:!1})],ln.prototype,"onCloseClicked",void 0),sn([oe()],ln.prototype,"phoneNumber",void 0),sn([oe({attribute:!1})],ln.prototype,"buildingId",void 0),sn([oe({attribute:!1})],ln.prototype,"officeHoursTextInfo",void 0),ln=sn([ne("call-us-window")],ln);const un={};var dn=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let cn=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=!0,this.hasSSTEnabled=!0,this.hasTextUsEnabled=!1,this.layoutOptions=[],this.tourTypeOptions=[],this.onChatTapped=()=>{},this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.getNumCallToActions=()=>[this.hasEmailEnabled,!!this.phoneNumber,this.hasSSTEnabled,this.hasTextUsEnabled].filter((e=>e)).length,this.emailUsWindowRef=Se(),this.textUsWindowRef=Se(),this.tourSchedulerRef=Se(),this.updated=async()=>{if(this.attachOnClickToEmailUsWindow(),this.attachOnClickToTextUsWindow(),this.attachOnClickToSSTWindow(),this.buildingId){const e=await(async e=>{if(un[e])return un[e];const t=`http://ivr.internal-meetelise.com/sms_management_numbers/webchat/building/${e}/numbers`,i=await ui().get(t);return un[e]=i.data,i.data})(this.buildingId);this.hasTextUsEnabled=e.length>0&&4895!==this.buildingId}},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`
1741
+ `],sn([oe({attribute:!1})],ln.prototype,"onCloseClicked",void 0),sn([oe()],ln.prototype,"phoneNumber",void 0),sn([oe({attribute:!1})],ln.prototype,"buildingId",void 0),sn([oe({attribute:!1})],ln.prototype,"officeHoursTextInfo",void 0),ln=sn([ne("call-us-window")],ln);const un={};var dn=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let cn=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=!0,this.hasSSTEnabled=!1,this.hasTextUsEnabled=!1,this.layoutOptions=[],this.tourTypeOptions=[],this.onChatTapped=()=>{},this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.getNumCallToActions=()=>[this.hasEmailEnabled,!!this.phoneNumber,this.hasTextUsEnabled].filter((e=>e)).length,this.emailUsWindowRef=Se(),this.textUsWindowRef=Se(),this.tourSchedulerRef=Se(),this.updated=async()=>{if(this.attachOnClickToEmailUsWindow(),this.attachOnClickToTextUsWindow(),this.attachOnClickToSSTWindow(),this.buildingId){const e=await(async e=>{if(un[e])return un[e];const t=`http://ivr.internal-meetelise.com/sms_management_numbers/webchat/building/${e}/numbers`,i=await ui().get(t);return un[e]=i.data,i.data})(this.buildingId);this.hasTextUsEnabled=e.length>0&&4895!==this.buildingId}},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`
1742
1742
  <div
1743
1743
  @click=${this.onClickEmailOption}
1744
1744
  class="launcher__call-to-action-option"
@@ -1764,7 +1764,8 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
1764
1764
  ${this.hasEmailEnabled?this.renderEmailOption():""}
1765
1765
  ${this.phoneNumber?this.renderCallUsOption():""}
1766
1766
  ${this.hasTextUsEnabled?this.renderTextUsOption():""}
1767
- ${this.hasSSTEnabled?this.renderSSTOption():""}
1767
+ <!-- TODO: re-enable -->
1768
+ <!-- ${this.hasSSTEnabled?this.renderSSTOption():""} -->
1768
1769
  </div>
1769
1770
  `,this.isCallToActionWindowOpen=()=>1===[this.isEmailWindowOpen,this.isCallUsWindowOpen,this.isSSTWindowOpen,this.isTextUsWindowOpen].filter((e=>e)).length,this.renderMiniOption=(e,t,i)=>D`
1770
1771
  <div class="launcher__mini-option-wrapper">
@@ -1834,7 +1835,8 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
1834
1835
  />
1835
1836
  </svg>
1836
1837
  `,this.onClickEmailOption,!0):""}
1837
- ${this.hasSSTEnabled&&!this.isCallToActionWindowOpen()?this.renderMiniOption(D`
1838
+ <!-- TODO: re-enable -->
1839
+ <!-- ${this.hasSSTEnabled&&!this.isCallToActionWindowOpen()?this.renderMiniOption(D`
1838
1840
  <svg
1839
1841
  width="18"
1840
1842
  height="18"
@@ -1847,7 +1849,7 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
1847
1849
  fill="#1E1E1E"
1848
1850
  />
1849
1851
  </svg>
1850
- `,this.onClickSSTOption,!0):""}
1852
+ `,this.onClickSSTOption,!0):""} -->
1851
1853
  ${this.phoneNumber&&!this.isCallToActionWindowOpen()?this.renderMiniOption(D`
1852
1854
  <svg
1853
1855
  width="18"
@@ -1,3 +1,5 @@
1
+ // TODO: remove this when sst fixed
2
+ /* eslint-disable lit/binding-positions */
1
3
  import classnames from "classnames";
2
4
  import { html, LitElement, TemplateResult } from "lit";
3
5
  import { customElement, property, state } from "lit/decorators.js";
@@ -39,7 +41,9 @@ export class Launcher extends LitElement {
39
41
  @property({ type: Boolean })
40
42
  hasEmailEnabled = true;
41
43
  @property({ type: Boolean })
42
- hasSSTEnabled = true;
44
+ // TODO: re-enable
45
+ // hasSSTEnabled = true;
46
+ hasSSTEnabled = false;
43
47
  @property({ type: Boolean })
44
48
  hasTextUsEnabled = false;
45
49
  @property({ attribute: false })
@@ -64,7 +68,8 @@ export class Launcher extends LitElement {
64
68
  return [
65
69
  this.hasEmailEnabled,
66
70
  !!this.phoneNumber,
67
- this.hasSSTEnabled,
71
+ // TODO: re-enable
72
+ // this.hasSSTEnabled,
68
73
  this.hasTextUsEnabled,
69
74
  ].filter((v) => v).length;
70
75
  };
@@ -200,7 +205,8 @@ export class Launcher extends LitElement {
200
205
  ${this.hasEmailEnabled ? this.renderEmailOption() : ""}
201
206
  ${this.phoneNumber ? this.renderCallUsOption() : ""}
202
207
  ${this.hasTextUsEnabled ? this.renderTextUsOption() : ""}
203
- ${this.hasSSTEnabled ? this.renderSSTOption() : ""}
208
+ <!-- TODO: re-enable -->
209
+ <!-- ${this.hasSSTEnabled ? this.renderSSTOption() : ""} -->
204
210
  </div>
205
211
  `;
206
212
  };
@@ -315,7 +321,8 @@ export class Launcher extends LitElement {
315
321
  true
316
322
  )
317
323
  : ""}
318
- ${this.hasSSTEnabled && !this.isCallToActionWindowOpen()
324
+ <!-- TODO: re-enable -->
325
+ <!-- ${this.hasSSTEnabled && !this.isCallToActionWindowOpen()
319
326
  ? this.renderMiniOption(
320
327
  html`
321
328
  <svg
@@ -334,7 +341,7 @@ export class Launcher extends LitElement {
334
341
  this.onClickSSTOption,
335
342
  true
336
343
  )
337
- : ""}
344
+ : ""} -->
338
345
  ${this.phoneNumber && !this.isCallToActionWindowOpen()
339
346
  ? this.renderMiniOption(
340
347
  html`
@@ -273,7 +273,9 @@ export class TourScheduler extends LitElement {
273
273
  tour_time: tourTimeString,
274
274
  };
275
275
  const url = `https://app.meetelise.com/platformApi/state/create/scheduleMe`;
276
- const response = await axios.post(url, data);
276
+ const response = await axios.post(url, data, {
277
+ headers: { ["X-SecurityKey"]: "JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG" },
278
+ });
277
279
  if (response.status === 200) {
278
280
  this.tourIsBooked = true;
279
281
  }