@meetelise/chat 1.43.37 → 1.43.39
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/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +1 -1
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +1 -1
- package/package.json +1 -1
- package/public/dist/index.js +163 -96
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +4 -0
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +7 -0
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +12 -1
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +34 -0
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +23 -4
- package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +0 -6
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +32 -29
- package/src/WebComponent/Scheduler/date-picker.ts +59 -48
- package/src/WebComponent/launcher/Launcher.ts +21 -2
- package/src/main/MEChat.ts +2 -4
package/public/dist/index.js
CHANGED
|
@@ -76,40 +76,50 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
76
76
|
</button>`}),c=Yt(7,u);return B`
|
|
77
77
|
<div id="calendar">
|
|
78
78
|
<div id="header">
|
|
79
|
-
<
|
|
79
|
+
<h2 aria-live="polite" aria-atomic="true">
|
|
80
|
+
${Gt[this.monthShown]} ${this.yearShown}
|
|
81
|
+
</h2>
|
|
80
82
|
<div
|
|
81
83
|
id="arrows"
|
|
82
84
|
@click="${e=>{var t,n;(null===(t=e.target)||void 0===t?void 0:t.closest("#back"))&&!qe(this.now,new Date(this.yearShown,this.monthShown,1))&&this.monthShown--,(null===(n=e.target)||void 0===n?void 0:n.closest("#forward"))&&this.monthShown++}}"
|
|
83
|
-
@keydown="${e=>{var t,n;[" ","Enter"].includes(e.key)&&((null===(t=e.target)||void 0===t?void 0:t.closest("#back"))&&!qe(this.now,new Date(this.yearShown,this.monthShown,1))?(e.preventDefault(),e.stopPropagation(),this.monthShown--):(null===(n=e.target)||void 0===n?void 0:n.closest("#forward"))&&(e.preventDefault(),e.stopPropagation(),this.monthShown++))}}"
|
|
84
85
|
>
|
|
85
|
-
<
|
|
86
|
+
<button
|
|
86
87
|
id="back"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
viewBox="0 0 9 16"
|
|
91
|
-
fill="none"
|
|
92
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
88
|
+
type="button"
|
|
89
|
+
aria-label="Previous month"
|
|
90
|
+
?disabled=${qe(this.now,new Date(this.yearShown,this.monthShown,1))}
|
|
93
91
|
>
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
92
|
+
<svg
|
|
93
|
+
aria-hidden="true"
|
|
94
|
+
focusable="false"
|
|
95
|
+
width="9"
|
|
96
|
+
height="16"
|
|
97
|
+
viewBox="0 0 9 16"
|
|
98
|
+
fill="none"
|
|
99
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
100
|
+
>
|
|
101
|
+
<path
|
|
102
|
+
d="M8.67727 2.34317L7.26305 0.928955L0.192017 8.00001L7.26308 15.0711L8.6773 13.6569L3.02044 8L8.67727 2.34317Z"
|
|
103
|
+
fill="#83818E"
|
|
104
|
+
/>
|
|
105
|
+
</svg>
|
|
106
|
+
</button>
|
|
107
|
+
<button id="forward" type="button" aria-label="Next month">
|
|
108
|
+
<svg
|
|
109
|
+
aria-hidden="true"
|
|
110
|
+
focusable="false"
|
|
111
|
+
width="9"
|
|
112
|
+
height="16"
|
|
113
|
+
viewBox="0 0 9 16"
|
|
114
|
+
fill="none"
|
|
115
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
116
|
+
>
|
|
117
|
+
<path
|
|
118
|
+
d="M0.157227 2.34315L1.57144 0.928932L8.64251 8L1.57144 15.0711L0.157227 13.6569L5.81408 8L0.157227 2.34315Z"
|
|
119
|
+
fill="#83818E"
|
|
120
|
+
/>
|
|
121
|
+
</svg>
|
|
122
|
+
</button>
|
|
113
123
|
</div>
|
|
114
124
|
</div>
|
|
115
125
|
|
|
@@ -163,7 +173,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
163
173
|
margin-bottom: 13px;
|
|
164
174
|
}
|
|
165
175
|
|
|
166
|
-
|
|
176
|
+
h2 {
|
|
167
177
|
font-weight: 600;
|
|
168
178
|
font-size: 12px;
|
|
169
179
|
margin: 0;
|
|
@@ -177,6 +187,23 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
177
187
|
align-items: center;
|
|
178
188
|
}
|
|
179
189
|
|
|
190
|
+
#arrows button {
|
|
191
|
+
background: none;
|
|
192
|
+
border: none;
|
|
193
|
+
padding: 0;
|
|
194
|
+
margin: 0;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
display: inline-flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
justify-content: center;
|
|
199
|
+
color: inherit;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
#arrows button:disabled {
|
|
203
|
+
cursor: default;
|
|
204
|
+
opacity: 0.4;
|
|
205
|
+
}
|
|
206
|
+
|
|
180
207
|
#rows {
|
|
181
208
|
display: flex;
|
|
182
209
|
flex-direction: column;
|
|
@@ -3303,12 +3330,6 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3303
3330
|
background-color: var(--primary-color, #ffffff);
|
|
3304
3331
|
}
|
|
3305
3332
|
|
|
3306
|
-
.recalculating-loader {
|
|
3307
|
-
display: flex;
|
|
3308
|
-
align-items: center;
|
|
3309
|
-
justify-content: center;
|
|
3310
|
-
}
|
|
3311
|
-
|
|
3312
3333
|
@media (max-width: 767px) {
|
|
3313
3334
|
.fee-calculator-container {
|
|
3314
3335
|
width: 100vw;
|
|
@@ -3462,6 +3483,40 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3462
3483
|
color: white;
|
|
3463
3484
|
}
|
|
3464
3485
|
|
|
3486
|
+
.floor-plan-badge.skeleton {
|
|
3487
|
+
cursor: default;
|
|
3488
|
+
width: 56px;
|
|
3489
|
+
height: 18px;
|
|
3490
|
+
padding: 0;
|
|
3491
|
+
border: 1px solid #eaeaea;
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3494
|
+
.unit-card-skeleton {
|
|
3495
|
+
display: flex;
|
|
3496
|
+
min-width: 18rem;
|
|
3497
|
+
width: 100%;
|
|
3498
|
+
height: 4.75rem;
|
|
3499
|
+
border-radius: 4px;
|
|
3500
|
+
border: 2px solid transparent;
|
|
3501
|
+
background-color: #f8f9fa;
|
|
3502
|
+
box-sizing: border-box;
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
.shimmer {
|
|
3506
|
+
background: linear-gradient(90deg, #eaeaea 25%, #f5f5f5 50%, #eaeaea 75%);
|
|
3507
|
+
background-size: 400px 100%;
|
|
3508
|
+
animation: shimmer 1.4s ease-in-out infinite;
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3511
|
+
@keyframes shimmer {
|
|
3512
|
+
0% {
|
|
3513
|
+
background-position: -200px 0;
|
|
3514
|
+
}
|
|
3515
|
+
100% {
|
|
3516
|
+
background-position: 200px 0;
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3519
|
+
|
|
3465
3520
|
.advanced-section {
|
|
3466
3521
|
max-height: 0;
|
|
3467
3522
|
overflow: hidden;
|
|
@@ -3685,38 +3740,20 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3685
3740
|
</p>
|
|
3686
3741
|
</div>
|
|
3687
3742
|
</div>
|
|
3688
|
-
`}};fo.styles=ho,po([ue({type:Object})],fo.prototype,"unit",void 0),po([ue()],fo.prototype,"onUnitSelect",void 0),po([ue({type:Boolean})],fo.prototype,"selected",void 0),fo=po([se("floorplan-image-card")],fo);var go=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 mo=class extends oe{constructor(){super(...arguments),this.
|
|
3689
|
-
.spinner {
|
|
3690
|
-
border: 4px solid rgba(0, 0, 0, 0.2);
|
|
3691
|
-
border-top: 4px solid var(--primary-color, #c057ff);
|
|
3692
|
-
border-radius: 50%;
|
|
3693
|
-
width: var(--mega-loader-size, 64px);
|
|
3694
|
-
height: var(--mega-loader-size, 64px);
|
|
3695
|
-
animation: spin var(--mega-loader-spin-speed, 0.8s) linear infinite;
|
|
3696
|
-
}
|
|
3697
|
-
|
|
3698
|
-
@keyframes spin {
|
|
3699
|
-
0% {
|
|
3700
|
-
transform: rotate(0deg);
|
|
3701
|
-
}
|
|
3702
|
-
100% {
|
|
3703
|
-
transform: rotate(360deg);
|
|
3704
|
-
}
|
|
3705
|
-
}
|
|
3706
|
-
`,go([ue({type:Number})],mo.prototype,"size",void 0),go([ue({type:Number})],mo.prototype,"spinSpeed",void 0),mo=go([se("mega-loader")],mo);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 bo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.layoutOptions=[],this.selectedLayoutIds=[eo],this.units=[],this.isLoading=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.moveInDate=pn,this.leaseTerm=12,this.selectedUnit=null,this.handleUnitSelect=e=>{var t;this.selectedUnit=e,null===(t=this.onUnitSelect)||void 0===t||t.call(this,e)},this.handleLayoutChange=e=>{var t;let n;e===eo?n=[eo]:this.selectedLayoutIds.includes(eo)?n=[e]:this.selectedLayoutIds.includes(e)?(n=this.selectedLayoutIds.filter(t=>t!==e),0===n.length&&(n=[eo])):n=[...this.selectedLayoutIds,e],this.selectedLayoutIds=n,null===(t=this.onSelectLayout)||void 0===t||t.call(this,this.selectedLayoutIds)},this.handleMoveInDateChange=e=>{var t;const n=e.target.value;if(n){const[e,t,i]=n.split("-").map(Number);this.moveInDate=new Date(e,t-1,i)}else this.moveInDate=pn;null===(t=this.onMoveInDateChange)||void 0===t||t.call(this,n||pn.toISOString().split("T")[0])},this.handleLeaseTermChange=e=>{var t;this.leaseTerm=parseInt(e.target.value),null===(t=this.onLeaseTermChange)||void 0===t||t.call(this,this.leaseTerm)},this.renderUnitSelection=()=>{var e,t;return this.isLoading?B`
|
|
3743
|
+
`}};fo.styles=ho,po([ue({type:Object})],fo.prototype,"unit",void 0),po([ue()],fo.prototype,"onUnitSelect",void 0),po([ue({type:Boolean})],fo.prototype,"selected",void 0),fo=po([se("floorplan-image-card")],fo);var go=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 mo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.layoutOptions=[],this.selectedLayoutIds=[eo],this.units=[],this.isLoading=!1,this.isLoadingLayouts=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.moveInDate=pn,this.leaseTerm=12,this.selectedUnit=null,this.handleUnitSelect=e=>{var t;this.selectedUnit=e,null===(t=this.onUnitSelect)||void 0===t||t.call(this,e)},this.handleLayoutChange=e=>{var t;let n;e===eo?n=[eo]:this.selectedLayoutIds.includes(eo)?n=[e]:this.selectedLayoutIds.includes(e)?(n=this.selectedLayoutIds.filter(t=>t!==e),0===n.length&&(n=[eo])):n=[...this.selectedLayoutIds,e],this.selectedLayoutIds=n,null===(t=this.onSelectLayout)||void 0===t||t.call(this,this.selectedLayoutIds)},this.handleMoveInDateChange=e=>{var t;const n=e.target.value;if(n){const[e,t,i]=n.split("-").map(Number);this.moveInDate=new Date(e,t-1,i)}else this.moveInDate=pn;null===(t=this.onMoveInDateChange)||void 0===t||t.call(this,n||pn.toISOString().split("T")[0])},this.handleLeaseTermChange=e=>{var t;this.leaseTerm=parseInt(e.target.value),null===(t=this.onLeaseTermChange)||void 0===t||t.call(this,this.leaseTerm)},this.renderUnitSelection=()=>{var e,t;return this.isLoading?B`
|
|
3707
3744
|
<div class="unit-selection">
|
|
3708
|
-
<div class="
|
|
3709
|
-
|
|
3745
|
+
<div class="image-carousel">
|
|
3746
|
+
${Array.from({length:3},()=>B`<div class="unit-card-skeleton shimmer"></div>`)}
|
|
3710
3747
|
</div>
|
|
3711
3748
|
</div>
|
|
3712
3749
|
`:B`
|
|
3713
3750
|
<div class="unit-selection">
|
|
3714
3751
|
<div class="image-carousel">
|
|
3715
|
-
${
|
|
3752
|
+
${0===(null===(e=this.units)||void 0===e?void 0:e.length)?B`
|
|
3716
3753
|
<div class="no-floorplans-container">
|
|
3717
3754
|
<p>No floorplans found</p>
|
|
3718
3755
|
</div>
|
|
3719
|
-
|
|
3756
|
+
`:""}
|
|
3720
3757
|
${null===(t=this.units)||void 0===t?void 0:t.map(e=>{var t;return B`
|
|
3721
3758
|
<floorplan-image-card
|
|
3722
3759
|
.unit=${e}
|
|
@@ -3726,7 +3763,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3726
3763
|
`})}
|
|
3727
3764
|
</div>
|
|
3728
3765
|
</div>
|
|
3729
|
-
`},this.renderBadges=()=>B`
|
|
3766
|
+
`},this.renderBadges=()=>this.isLoadingLayouts?B`
|
|
3767
|
+
<div class="floor-plan-selector-badges">
|
|
3768
|
+
${Array.from({length:4},()=>B`<div class="floor-plan-badge skeleton shimmer"></div>`)}
|
|
3769
|
+
</div>
|
|
3770
|
+
`:B`
|
|
3730
3771
|
<div class="floor-plan-selector-badges">
|
|
3731
3772
|
${this.displayOptions.map(e=>B`
|
|
3732
3773
|
<div
|
|
@@ -3768,7 +3809,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3768
3809
|
${this.renderUnitSelection()}
|
|
3769
3810
|
</div>
|
|
3770
3811
|
</div>
|
|
3771
|
-
`}};
|
|
3812
|
+
`}};mo.styles=co,go([ue({type:String})],mo.prototype,"buildingSlug",void 0),go([ue({type:Array})],mo.prototype,"layoutOptions",void 0),go([ue({type:Array})],mo.prototype,"selectedLayoutIds",void 0),go([ue({type:Array})],mo.prototype,"units",void 0),go([ue({type:Boolean})],mo.prototype,"isLoading",void 0),go([ue({type:Boolean})],mo.prototype,"isLoadingLayouts",void 0),go([ue()],mo.prototype,"onSelectLayout",void 0),go([ue()],mo.prototype,"onUnitSelect",void 0),go([ue()],mo.prototype,"onMoveInDateChange",void 0),go([ue()],mo.prototype,"onLeaseTermChange",void 0),go([ce()],mo.prototype,"moveInDate",void 0),go([ce()],mo.prototype,"leaseTerm",void 0),go([ce()],mo.prototype,"selectedUnit",void 0),mo=go([se("floor-plan-selector")],mo);const yo=u`
|
|
3772
3813
|
:host {
|
|
3773
3814
|
display: block;
|
|
3774
3815
|
width: 100%;
|
|
@@ -3803,22 +3844,32 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3803
3844
|
margin-top: 4px;
|
|
3804
3845
|
}
|
|
3805
3846
|
|
|
3847
|
+
.fee-additional-info {
|
|
3848
|
+
color: #868e96;
|
|
3849
|
+
font-size: 0.8rem;
|
|
3850
|
+
margin-top: 2px;
|
|
3851
|
+
font-style: italic;
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3806
3854
|
.fee-amount {
|
|
3807
3855
|
font-size: 1rem;
|
|
3808
3856
|
align-self: center;
|
|
3809
3857
|
}
|
|
3810
|
-
`;var
|
|
3858
|
+
`;var bo=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 vo=class extends oe{constructor(){super(...arguments),this.feeQuote=null}get name(){var e,t;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem)return Sn(this.feeQuote.sourceRentableItem.description||"");const n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee;return(null==n?void 0:n.feeName)?Sn(n.feeName):""}get description(){var e,t,n,i;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem){return`${this.feeQuote.sourceRentableItem.id}`}return null!==(i=null===(n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee)||void 0===n?void 0:n.description)&&void 0!==i?i:""}get additionalInfo(){var e,t,n;return null!==(n=null===(t=null===(e=this.feeQuote)||void 0===e?void 0:e.marketableFee)||void 0===t?void 0:t.additionalInfo)&&void 0!==n?n:""}get triggeredEvent(){var e,t;const n=null===(t=null===(e=this.feeQuote)||void 0===e?void 0:e.marketableFee)||void 0===t?void 0:t.triggeredByEvent;if(!n)return"";return{APPLICATION_SUBMISSION:"Due at Application Submission",APPLICATION_APPROVAL:"Due at Application Approval",LEASE_SIGNING:"Due at Lease Signing",MOVE_IN:"Due at Move-In"}[n]||n}get amount(){var e;if(!this.feeQuote)return null;const t=null!==(e=this.feeQuote.amountRange.fixedValue)&&void 0!==e?e:0;return 0===t?null:En(t,2)}render(){return this.feeQuote&&this.amount?B`
|
|
3811
3859
|
<div class="fee-item">
|
|
3812
3860
|
<div class="fee-info">
|
|
3813
3861
|
<div class="fee-name">${this.name}</div>
|
|
3814
|
-
|
|
3862
|
+
${this.description?B`<div class="fee-description">${this.description}</div>`:""}
|
|
3863
|
+
${this.additionalInfo?B`<div class="fee-additional-info">
|
|
3864
|
+
${this.additionalInfo}
|
|
3865
|
+
</div>`:""}
|
|
3815
3866
|
${this.triggeredEvent?B`<div class="fee-triggered-event">
|
|
3816
3867
|
${this.triggeredEvent}
|
|
3817
3868
|
</div>`:""}
|
|
3818
3869
|
</div>
|
|
3819
3870
|
<div class="fee-amount">${this.amount}</div>
|
|
3820
3871
|
</div>
|
|
3821
|
-
`:B``}};
|
|
3872
|
+
`:B``}};vo.styles=yo,bo([ue({type:Object})],vo.prototype,"feeQuote",void 0),vo=bo([se("fee-item")],vo);var wo=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 Co=class extends oe{constructor(){super(...arguments),this.feeQuotes=[]}get itemType(){const e=this.feeQuotes[0];return(null==e?void 0:e.sourceRentableItem)?Sn(e.sourceRentableItem.description||""):""}get priceGroups(){const e=new Map;return this.feeQuotes.forEach(t=>{var n;const i=null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0;e.set(i,(e.get(i)||0)+1)}),Array.from(e.entries()).map(([e,t])=>({price:e,count:t})).sort((e,t)=>e.price-t.price)}get totalAmount(){const e=this.feeQuotes.reduce((e,t)=>{var n;return e+(null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0)},0);return En(e,2)}get priceBreakdown(){const e=this.priceGroups;if(0===e.length)return"";const t=this.getUnitName();return e.map(e=>{return`${e.count} ${n=t,i=e.count,1===i?n:`${n}s`} @ ${En(e.price,2)}/month`;var n,i}).join(" + ")}getUnitName(){var e;const t=this.feeQuotes[0];return function(e){const t=e.toLowerCase();return t.includes("garage")||t.includes("parking")?"space":t.includes("storage")?"unit":t.includes("locker")?"locker":t.includes("bike")?"spot":"unit"}((null===(e=null==t?void 0:t.sourceRentableItem)||void 0===e?void 0:e.description)||"")}render(){return this.feeQuotes.length&&this.totalAmount!==En(0,2)?B`
|
|
3822
3873
|
<div class="fee-item">
|
|
3823
3874
|
<div class="fee-info">
|
|
3824
3875
|
<div class="fee-name">${this.itemType}</div>
|
|
@@ -3826,7 +3877,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3826
3877
|
</div>
|
|
3827
3878
|
<div class="fee-amount">${this.totalAmount}</div>
|
|
3828
3879
|
</div>
|
|
3829
|
-
`:B``}};
|
|
3880
|
+
`:B``}};Co.styles=yo,wo([ue({type:Array})],Co.prototype,"feeQuotes",void 0),Co=wo([se("grouped-rentable-item")],Co);const xo=u`
|
|
3830
3881
|
.fee-card-section-container {
|
|
3831
3882
|
margin: 0 12px;
|
|
3832
3883
|
border-radius: 4px;
|
|
@@ -3886,7 +3937,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3886
3937
|
margin: 12px;
|
|
3887
3938
|
justify-content: space-between;
|
|
3888
3939
|
}
|
|
3889
|
-
`;var
|
|
3940
|
+
`;var Ao=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 So=class extends oe{constructor(){super(...arguments),this.title="Fees",this.fees=[],this.buildingFeesToQuantity={},this.handleQuantityChange=(e,t)=>{this.buildingFeesToQuantity[e]=t,this.requestUpdate()}}get totalAmount(){const e=this.fees.reduce((e,t)=>{var n;return e+(null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0)},0);return En(e,2)}get groupedRentableItems(){const e=this.fees.filter(e=>e.sourceRentableItem);e.sort((e,t)=>{var n,i;const r=(null===(n=e.sourceRentableItem)||void 0===n?void 0:n.description)||"",o=(null===(i=t.sourceRentableItem)||void 0===i?void 0:i.description)||"";return r.localeCompare(o,navigator.language,{numeric:!0})});const t={};return e.forEach(e=>{var n;const i=(null===(n=e.sourceRentableItem)||void 0===n?void 0:n.description)||"unknown";t[i]||(t[i]=[]),t[i].push(e)}),t}get nonRentableItems(){return this.fees.filter(e=>!e.sourceRentableItem)}render(){return B`
|
|
3890
3941
|
<div class="fee-card-section-container">
|
|
3891
3942
|
<div class="fee-card-section-header">
|
|
3892
3943
|
<h1 class="section-title">${this.title}</h1>
|
|
@@ -3910,7 +3961,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3910
3961
|
</div>
|
|
3911
3962
|
</div>
|
|
3912
3963
|
</div>
|
|
3913
|
-
`}};
|
|
3964
|
+
`}};So.styles=xo,Ao([ue({type:String})],So.prototype,"title",void 0),Ao([ue({type:Array})],So.prototype,"fees",void 0),Ao([ce()],So.prototype,"buildingFeesToQuantity",void 0),So=Ao([se("fee-card")],So);const Eo=u`
|
|
3914
3965
|
:host {
|
|
3915
3966
|
--transition-timing: 0.2s ease;
|
|
3916
3967
|
display: flex;
|
|
@@ -4112,7 +4163,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4112
4163
|
font-weight: bold;
|
|
4113
4164
|
color: #0066cc;
|
|
4114
4165
|
}
|
|
4115
|
-
`;var
|
|
4166
|
+
`;var ko;!function(e){e.NEVER="NEVER",e.ONE_TIME="ONE_TIME",e.MONTHLY="MONTHLY",e.WEEKLY="WEEKLY",e.BI_WEEKLY="BI_WEEKLY",e.ANNUALLY="ANNUALLY",e.DAILY="DAILY"}(ko||(ko={}));var To=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 _o=class extends oe{constructor(){super(...arguments),this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1,num_cats:0,num_dogs:0,num_other_pets:0},this.onChargeInputsChange=null,this.disabled=!1,this.rentableItems=[],this.selectedRentableItems=[],this.onRentableItemAdd=null,this.onRentableItemRemove=null,this.handleRentableItemToggle=e=>{var t,n;if(this.selectedRentableItems.some(t=>t.type===e.type)){const n=this.selectedRentableItems.find(t=>t.type===e.type);n&&(null===(t=this.onRentableItemRemove)||void 0===t||t.call(this,n))}else{const t=e.minAvailableItem||e.allItems[0];if(t){const i={id:t.id,type:e.type};null===(n=this.onRentableItemAdd)||void 0===n||n.call(this,i)}}}}handleIncrement(e){var t,n;const i=(null!==(t=this.chargeInputs[e])&&void 0!==t?t:0)+1;"num_cats"===e||"num_dogs"===e||"num_other_pets"===e?this.updatePetCount({[e]:i}):null===(n=this.onChargeInputsChange)||void 0===n||n.call(this,{[e]:i})}handleDecrement(e){var t,n;const i=null!==(t=this.chargeInputs[e])&&void 0!==t?t:0,r="num_applicants"===e?1:0,o=Math.max(r,i-1);"num_cats"===e||"num_dogs"===e||"num_other_pets"===e?this.updatePetCount({[e]:o}):null===(n=this.onChargeInputsChange)||void 0===n||n.call(this,{[e]:o})}updatePetCount(e){var t,n,i,r;const o={...this.chargeInputs,...e},a=(null!==(t=o.num_cats)&&void 0!==t?t:0)+(null!==(n=o.num_dogs)&&void 0!==n?n:0)+(null!==(i=o.num_other_pets)&&void 0!==i?i:0);null===(r=this.onChargeInputsChange)||void 0===r||r.call(this,{...e,num_pets:a})}getFieldLabel(e){return{base_rent:"Base Rent ($)",num_pets:"Pets",num_vehicles:"Vehicles",num_applicants:"Applicants",num_cats:"Cats",num_dogs:"Dogs",num_other_pets:"All Other Pets"}[e]||e}renderRentableItemRow(e){const t=this.selectedRentableItems.some(t=>t.type===e.type);return B`
|
|
4116
4167
|
<div class="rentable-item-row">
|
|
4117
4168
|
<div class="rentable-item-info">
|
|
4118
4169
|
<div class="rentable-item-label">${e.description}</div>
|
|
@@ -4168,7 +4219,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4168
4219
|
</div>
|
|
4169
4220
|
`:""}
|
|
4170
4221
|
</div>
|
|
4171
|
-
`}};
|
|
4222
|
+
`}};_o.styles=u`
|
|
4172
4223
|
.charge-inputs-container {
|
|
4173
4224
|
background: white;
|
|
4174
4225
|
border-radius: 8px;
|
|
@@ -4305,7 +4356,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4305
4356
|
opacity: 0.5;
|
|
4306
4357
|
cursor: not-allowed;
|
|
4307
4358
|
}
|
|
4308
|
-
`,
|
|
4359
|
+
`,To([ue({type:Object})],_o.prototype,"chargeInputs",void 0),To([ue()],_o.prototype,"onChargeInputsChange",void 0),To([ue({type:Boolean})],_o.prototype,"disabled",void 0),To([ue({type:Array})],_o.prototype,"rentableItems",void 0),To([ue({type:Array})],_o.prototype,"selectedRentableItems",void 0),To([ue()],_o.prototype,"onRentableItemAdd",void 0),To([ue()],_o.prototype,"onRentableItemRemove",void 0),_o=To([se("charge-inputs")],_o);const Oo=u`
|
|
4309
4360
|
:host {
|
|
4310
4361
|
--skeleton-bg-color: #eaeaea;
|
|
4311
4362
|
--skeleton-highlight-color: #f5f5f5;
|
|
@@ -4319,8 +4370,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4319
4370
|
background-position: 200px 0;
|
|
4320
4371
|
}
|
|
4321
4372
|
}
|
|
4322
|
-
`,
|
|
4323
|
-
${
|
|
4373
|
+
`,Po=u`
|
|
4374
|
+
${Oo}
|
|
4324
4375
|
|
|
4325
4376
|
:host {
|
|
4326
4377
|
display: block;
|
|
@@ -4385,8 +4436,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4385
4436
|
margin-bottom: 10px;
|
|
4386
4437
|
}
|
|
4387
4438
|
}
|
|
4388
|
-
`,
|
|
4389
|
-
${
|
|
4439
|
+
`,Io=u`
|
|
4440
|
+
${Oo}
|
|
4390
4441
|
|
|
4391
4442
|
:host {
|
|
4392
4443
|
display: block;
|
|
@@ -4408,16 +4459,34 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4408
4459
|
box-sizing: border-box;
|
|
4409
4460
|
}
|
|
4410
4461
|
}
|
|
4411
|
-
`;var
|
|
4462
|
+
`;var Mo=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 No=class extends oe{constructor(){super(...arguments),this.rows=2,this.header=!0}render(){return B`
|
|
4412
4463
|
<div class="skeleton-card">
|
|
4413
4464
|
${this.header?B`<div class="skeleton-header"></div>`:""}
|
|
4414
4465
|
${Array(this.rows).fill(0).map(()=>B`<div class="skeleton-row"></div>`)}
|
|
4415
4466
|
</div>
|
|
4416
|
-
`}};
|
|
4467
|
+
`}};No.styles=Po,Mo([ue({type:Number})],No.prototype,"rows",void 0),Mo([ue({type:Boolean})],No.prototype,"header",void 0),No=Mo([se("skeleton-card")],No);var Do=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 Lo=class extends oe{constructor(){super(...arguments),this.cards=3,this.rowsPerCard=[3,2,1]}render(){return B`
|
|
4417
4468
|
<div class="skeleton-loader">
|
|
4418
4469
|
${Array.from({length:this.cards},(e,t)=>{const n=Array.isArray(this.rowsPerCard)?this.rowsPerCard[t]||2:this.rowsPerCard;return B`<skeleton-card .rows=${n}></skeleton-card>`})}
|
|
4419
4470
|
</div>
|
|
4420
|
-
`}};
|
|
4471
|
+
`}};Lo.styles=Io,Do([ue({type:Number})],Lo.prototype,"cards",void 0),Do([ue({type:Array})],Lo.prototype,"rowsPerCard",void 0),Lo=Do([se("skeleton-loader")],Lo);var Uo=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 Ro=class extends oe{constructor(){super(...arguments),this.size=64,this.spinSpeed=.8}updated(){this.style.setProperty("--mega-loader-size",`${this.size}px`),this.style.setProperty("--mega-loader-spin-speed",`${this.spinSpeed}s`)}render(){return B`<div class="spinner"></div>`}};Ro.styles=u`
|
|
4472
|
+
.spinner {
|
|
4473
|
+
border: 4px solid rgba(0, 0, 0, 0.2);
|
|
4474
|
+
border-top: 4px solid var(--primary-color, #c057ff);
|
|
4475
|
+
border-radius: 50%;
|
|
4476
|
+
width: var(--mega-loader-size, 64px);
|
|
4477
|
+
height: var(--mega-loader-size, 64px);
|
|
4478
|
+
animation: spin var(--mega-loader-spin-speed, 0.8s) linear infinite;
|
|
4479
|
+
}
|
|
4480
|
+
|
|
4481
|
+
@keyframes spin {
|
|
4482
|
+
0% {
|
|
4483
|
+
transform: rotate(0deg);
|
|
4484
|
+
}
|
|
4485
|
+
100% {
|
|
4486
|
+
transform: rotate(360deg);
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
`,Uo([ue({type:Number})],Ro.prototype,"size",void 0),Uo([ue({type:Number})],Ro.prototype,"spinSpeed",void 0),Ro=Uo([se("mega-loader")],Ro);var Bo=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 jo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.showSkeletonLoader=!1,this.selectedUnit=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[eo],this.groupedFees={[qr.ONE_TIME]:[],[qr.MONTHLY]:[],[qr.WEEKLY]:[],[qr.BI_WEEKLY]:[],[qr.ANNUALLY]:[],[qr.DAILY]:[],[qr.AS_NEEDED]:[],[qr.NEVER]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!1,this.isLoadingLayouts=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1},this.onChargeInputsChange=null,this.selectedRentableItems=[],this.onRentableItemAdd=null,this.onRentableItemRemove=null}get rentAsFeeQuote(){var e,t;return(null===(e=this.quote)||void 0===e?void 0:e.rentCost)?{marketableFee:{id:"rent",buildingId:this.quote.buildingId||0,feeName:"Rent",amount:this.quote.rentCost,amountDisplay:En(this.quote.rentCost,2),minEstimate:null,maxEstimate:null,percentRentMin:null,percentRentMax:null,percentRent:null,frequency:ko.MONTHLY,category:"Rent",hiddenReason:null,description:`Unit ${null===(t=this.selectedUnit)||void 0===t?void 0:t.unitNumber}`,additionalInfo:null,refundable:!1,unitIds:null,layoutIds:null,startDate:null,endDate:null,triggeredByEvent:null,externalKey:null,chargeCode:null,bundleKey:null,source:null,publicFacing:!0,perApplicant:!1,prorated:null,syncActive:!0},amountRange:{fixedValue:this.quote.rentCost,minValue:null,maxValue:null},chargeInputs:{baseRent:this.quote.rentCost,numPets:0,numDogs:0,numCats:0,numOtherPets:0,numVehicles:0,numApplicants:1,unitId:this.quote.unitId,layoutId:null},isAddon:!1}:null}renderRecurringFeeSection(e,t){return(null==t?void 0:t.length)?B` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t;const n=[],i=[{freq:ko.ANNUALLY,title:"Yearly Charges"},{freq:ko.MONTHLY,title:"Monthly Charges"},{freq:ko.BI_WEEKLY,title:"Bi-Weekly Charges"},{freq:ko.WEEKLY,title:"Weekly Charges"},{freq:ko.DAILY,title:"Daily Charges"},{freq:ko.ONE_TIME,title:"One-Time"},{freq:ko.NEVER,title:"No Charges"}],r=null===(e=this.quote)||void 0===e?void 0:e.feeQuotes;for(const{freq:e,title:o}of i){if(!(null==r?void 0:r.length)&&e!==ko.MONTHLY)continue;let i=null!==(t=null==r?void 0:r.filter(t=>{var n,i;if((null===(n=t.marketableFee)||void 0===n?void 0:n.frequency)===e){if(e===ko.ONE_TIME){return["APPLICATION_SUBMISSION","APPLICATION_APPROVAL","LEASE_SIGNING","MOVE_IN"].includes((null===(i=t.marketableFee)||void 0===i?void 0:i.triggeredByEvent)||"")}return!0}return!!t.sourceRentableItem&&("monthly"===t.sourceRentableItem.rentFrequency&&e===ko.MONTHLY||"annually"===t.sourceRentableItem.rentFrequency&&e===ko.ANNUALLY)}))&&void 0!==t?t:[];if(e===ko.MONTHLY){const e=this.rentAsFeeQuote;e&&(i=[e,...i])}const a=this.renderRecurringFeeSection(o,i);a&&n.push(a)}return n}renderTotalCost(){var e;if(!(null===(e=this.quote)||void 0===e?void 0:e.totalMonthlyCost))return null;const t=this.quote.totalMonthlyCost.fixedValue;return t?B`
|
|
4421
4490
|
<div class="total-cost-section">
|
|
4422
4491
|
<div class="total-cost-row">
|
|
4423
4492
|
<span class="total-cost-label">Total Monthly Cost:</span>
|
|
@@ -4449,6 +4518,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4449
4518
|
.selectedLayoutIds=${this.selectedLayoutIds}
|
|
4450
4519
|
.units=${this.units}
|
|
4451
4520
|
.isLoading=${this.isLoadingUnits}
|
|
4521
|
+
.isLoadingLayouts=${this.isLoadingLayouts}
|
|
4452
4522
|
.onSelectLayout=${this.onSelectLayout}
|
|
4453
4523
|
.onUnitSelect=${this.onUnitSelect}
|
|
4454
4524
|
.onMoveInDateChange=${this.onMoveInDateChange}
|
|
@@ -4472,7 +4542,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4472
4542
|
|
|
4473
4543
|
${this.renderFeesContent()}
|
|
4474
4544
|
</div>
|
|
4475
|
-
`}};jo.styles=
|
|
4545
|
+
`}};jo.styles=Eo,Bo([ue({type:String})],jo.prototype,"buildingSlug",void 0),Bo([ue({type:Boolean})],jo.prototype,"showSkeletonLoader",void 0),Bo([ue({type:Object})],jo.prototype,"selectedUnit",void 0),Bo([ue({type:Object})],jo.prototype,"quote",void 0),Bo([ue({type:Array})],jo.prototype,"layoutOptions",void 0),Bo([ue({type:Array})],jo.prototype,"selectedLayoutIds",void 0),Bo([ue({type:Object})],jo.prototype,"groupedFees",void 0),Bo([ue({type:Array})],jo.prototype,"rentableItems",void 0),Bo([ue({type:Array})],jo.prototype,"units",void 0),Bo([ue({type:Boolean})],jo.prototype,"isLoadingUnits",void 0),Bo([ue({type:Boolean})],jo.prototype,"isLoadingLayouts",void 0),Bo([ue()],jo.prototype,"onSelectLayout",void 0),Bo([ue()],jo.prototype,"onUnitSelect",void 0),Bo([ue()],jo.prototype,"onMoveInDateChange",void 0),Bo([ue()],jo.prototype,"onLeaseTermChange",void 0),Bo([ue({type:Object})],jo.prototype,"chargeInputs",void 0),Bo([ue()],jo.prototype,"onChargeInputsChange",void 0),Bo([ue({type:Array})],jo.prototype,"selectedRentableItems",void 0),Bo([ue()],jo.prototype,"onRentableItemAdd",void 0),Bo([ue()],jo.prototype,"onRentableItemRemove",void 0),jo=Bo([se("fee-calculator-layout")],jo);var Fo,Ho,$o,zo;!function(e){e.OneTime="OneTime",e.Daily="Daily",e.Weekly="Weekly",e.BiWeekly="BiWeekly",e.Monthly="Monthly",e.Yearly="Yearly",e.Unknown="Unknown"}(Fo||(Fo={})),function(e){e.Debit="Debit",e.Credit="Credit"}(Ho||(Ho={})),function(e){e.Fixed="Fixed",e.UsageBased="UsageBased",e.Varies="Varies"}($o||($o={})),function(e){e.AdminFee="AdminFee",e.ApplicationFee="ApplicationFee",e.Concession="Concession",e.Insurance="Insurance",e.LateFee="LateFee",e.Legal="Legal",e.NonSufficientFundFee="NSF",e.Other="Other",e.Parking="Parking",e.Penalty="Penalty",e.Pest="Pest",e.PetDeposit="PetDeposit",e.PetRent="PetRent",e.Refund="Refund",e.Relet="Relet",e.Rent="Rent",e.SecurityDeposit="SecurityDeposit",e.Storage="Storage",e.Trash="Trash",e.Utility="Utility",e.WaterSewer="WaterSewer"}(zo||(zo={}));const Go=u`
|
|
4476
4546
|
:host {
|
|
4477
4547
|
display: block;
|
|
4478
4548
|
--table-header-bg: white;
|
|
@@ -4819,7 +4889,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4819
4889
|
</p>
|
|
4820
4890
|
</div>
|
|
4821
4891
|
</div>
|
|
4822
|
-
`:B``}};ia.styles=ta,na([ue({type:Object})],ia.prototype,"incentive",void 0),ia=na([se("incentive-banner")],ia);var ra=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 oa=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.primaryColor=Ue,this.backgroundColor=Re,this.onCloseClicked=null,this.onClickEmailOption=null,this.onClickPhoneOption=null,this.onClickSSTOption=null,this.onClickTextUsOption=null,this.
|
|
4892
|
+
`:B``}};ia.styles=ta,na([ue({type:Object})],ia.prototype,"incentive",void 0),ia=na([se("incentive-banner")],ia);var ra=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 oa=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.primaryColor=Ue,this.backgroundColor=Re,this.onCloseClicked=null,this.onClickEmailOption=null,this.onClickPhoneOption=null,this.onClickSSTOption=null,this.onClickTextUsOption=null,this.isCalculatingQuote=!1,this.isLoadingLayouts=!0,this.isExporting=!1,this.selectedLayoutIds=[eo],this.selectedUnit=null,this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1,num_cats:0,num_dogs:0,num_other_pets:0},this.desiredRentableItems=[],this.moveInDateString=pn.toISOString().split("T")[0],this.leaseTerm=12,this.buildingWebchatView=null,this.incentives=[],this.quote=null,this.pdfUrl=null,this.groupedFees={[qr.ONE_TIME]:[],[qr.MONTHLY]:[],[qr.WEEKLY]:[],[qr.BI_WEEKLY]:[],[qr.ANNUALLY]:[],[qr.DAILY]:[],[qr.AS_NEEDED]:[],[qr.NEVER]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!0,this.quoteAbortController=null,this.quoteDebounceTimer=null,this.startQuoteApiCall=async()=>{var e;null===(e=this.quoteAbortController)||void 0===e||e.abort(),this.quoteAbortController=new AbortController,this.isCalculatingQuote=!0,await this.performQuoteCalculation(this.quoteAbortController.signal)},this.firstUpdated=async()=>{this.style.setProperty("--primary-color",this.primaryColor),this.style.setProperty("--background-color",this.backgroundColor),await Promise.allSettled([this.setupCalculator(),this.fetchUnits()])},this.setupCalculator=async()=>{if(!this.buildingSlug||!this.orgSlug)return void(this.isLoadingLayouts=!1);const e=Ui(this.orgSlug,this.buildingSlug).then(e=>{e&&(this.buildingWebchatView=e)}).finally(()=>{this.isLoadingLayouts=!1}),t=Jr(this.buildingSlug).then(e=>{e&&(this.groupedFees=this.groupFees(e.fees),this.rentableItems=e.rentableItems)});await Promise.allSettled([e,t])},this.requestQuoteCalculation=()=>{if(this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),!this.selectedUnit||!this.moveInDateString)return this.quote=null,this.pdfUrl=null,void(this.isCalculatingQuote=!1);this.quoteDebounceTimer=window.setTimeout(()=>{this.startQuoteApiCall(),this.quoteDebounceTimer=null},1e3)},this.handleUnitSelect=e=>{const t=!this.selectedUnit;if(this.selectedUnit=e,t)return this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),this.isCalculatingQuote=!0,void this.startQuoteApiCall();this.requestQuoteCalculation()},this.handleMoveInDateChange=async e=>{this.moveInDateString=e,this.quote=null,this.pdfUrl=null,await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleLeaseTermChange=async e=>{this.leaseTerm=e,this.quote=null,this.pdfUrl=null,await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleChargeInputsChange=e=>{this.chargeInputs={...this.chargeInputs,...e},this.requestQuoteCalculation()},this.handleRentableItemAdd=e=>{this.desiredRentableItems.some(t=>t.id===e.id)||this.desiredRentableItems.push(e),this.requestQuoteCalculation()},this.handleRentableItemRemove=e=>{this.desiredRentableItems=this.desiredRentableItems.filter(t=>t.id!==e.id),this.requestQuoteCalculation()},this.groupFees=e=>e.reduce((e,t)=>{const n=t.frequency||qr.ONE_TIME;return e[n]=[...e[n]||[],t],e},{}),this.handleClickEmailOption=e=>{this.handleClose(),this.onClickEmailOption&&this.onClickEmailOption(e)},this.handleClickPhoneOption=e=>{this.handleClose(),this.onClickPhoneOption&&this.onClickPhoneOption(e)},this.handleClickSSTOption=e=>{this.handleClose(),this.onClickSSTOption&&this.onClickSSTOption(e)},this.handleClickTextUsOption=e=>{this.handleClose(),this.onClickTextUsOption&&this.onClickTextUsOption(e)},this.handleClose=()=>{var e;null===(e=this.onCloseClicked)||void 0===e||e.call(this)},this.handleSelectLayout=async e=>{this.selectedLayoutIds=e,await this.fetchUnits()},this.handleShare=async()=>{var e,t;this.selectedUnit&&this.moveInDateString&&this.pdfUrl&&(ai("feeCalculatorPdfDownloaded",{buildingSlug:this.buildingSlug,quoteId:null!==(t=null===(e=this.quote)||void 0===e?void 0:e.id)&&void 0!==t?t:null}),window.open(this.pdfUrl,"_blank"))},this.fetchUnits=async()=>{let e;this.isLoadingUnits=!0,this.selectedLayoutIds.includes(eo)||(e=this.selectedLayoutIds.map(e=>{return 0===(t=e)?0:Math.floor(t/10);var t}));try{if(this.units=await oo({buildingSlug:this.buildingSlug,moveInDateEarliestString:this.moveInDateString,...e?{numBedrooms:e}:{},leaseTermMin:this.leaseTerm}),this.selectedUnit){this.units.some(e=>{var t;return e.id===(null===(t=this.selectedUnit)||void 0===t?void 0:t.id)})||(this.selectedUnit=null,this.quote=null,this.pdfUrl=null)}}finally{this.isLoadingUnits=!1}}}async performQuoteCalculation(e){if(!this.selectedUnit||!this.moveInDateString)return this.quote=null,this.pdfUrl=null,void(this.isCalculatingQuote=!1);const t=dn(Rn(this.moveInDateString),Rn(this.selectedUnit.earliestAvailable))?this.selectedUnit.earliestAvailable:this.moveInDateString,n=this.selectedUnit.id,i=this.leaseTerm;try{const r=await no({buildingSlug:this.buildingSlug,unitId:n,chargeInputs:this.chargeInputs,rentableItems:this.desiredRentableItems,leaseTerm:i,moveInDate:t},e);this.quote=r.quote,this.pdfUrl=r.pdfUrl||null,this.quote&&ai("feeCalculatorQuoteGenerated",{buildingSlug:this.buildingSlug,unitId:n,leaseTerm:i})}catch(e){"AbortError"!==(null==e?void 0:e.name)&&(this.quote=null,this.pdfUrl=null,this.isCalculatingQuote=!1,Ai({logType:xi.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_CALCULATING_QUOTE]",logData:{error:e}}))}finally{e.aborted||(this.isCalculatingQuote=!1)}}get layouts(){var e,t;return null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.layoutOptions)&&void 0!==t?t:[]}updated(e){(e.has("primaryColor")||e.has("backgroundColor"))&&(this.style.setProperty("--primary-color",this.primaryColor),this.style.setProperty("--background-color",this.backgroundColor))}disconnectedCallback(){var e;super.disconnectedCallback(),this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),null===(e=this.quoteAbortController)||void 0===e||e.abort(),this.quoteAbortController=null}render(){var e,t;const n=this.isExporting||this.isCalculatingQuote||!this.selectedUnit||!this.moveInDateString||!this.pdfUrl;return B`
|
|
4823
4893
|
<div
|
|
4824
4894
|
class="fee-calculator-container"
|
|
4825
4895
|
@keydown=${e=>e.stopPropagation()}
|
|
@@ -4829,14 +4899,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4829
4899
|
<h1>Estimated Cost Calculator</h1>
|
|
4830
4900
|
|
|
4831
4901
|
<div class="calculator-header-right">
|
|
4832
|
-
${n?B`<div class="recalculating-loader">
|
|
4833
|
-
<mega-loader .size=${16} .spinSpeed=${.54}></mega-loader>
|
|
4834
|
-
</div>`:""}
|
|
4835
|
-
|
|
4836
4902
|
<button
|
|
4837
4903
|
class="share-button"
|
|
4838
4904
|
@click=${this.handleShare}
|
|
4839
|
-
?disabled=${
|
|
4905
|
+
?disabled=${n}
|
|
4840
4906
|
>
|
|
4841
4907
|
${this.isExporting?B`<mega-loader
|
|
4842
4908
|
.size=${24}
|
|
@@ -4846,7 +4912,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4846
4912
|
<button
|
|
4847
4913
|
class="apply-button"
|
|
4848
4914
|
@click=${()=>{var e,t;window.open(null!==(t=null===(e=this.quote)||void 0===e?void 0:e.applicationLink)&&void 0!==t?t:"","_blank","noopener,noreferrer")}}
|
|
4849
|
-
?disabled=${
|
|
4915
|
+
?disabled=${this.isCalculatingQuote||!(null===(e=this.quote)||void 0===e?void 0:e.applicationLink)}
|
|
4850
4916
|
>
|
|
4851
4917
|
Apply
|
|
4852
4918
|
</button>
|
|
@@ -4875,7 +4941,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4875
4941
|
|
|
4876
4942
|
<fee-calculator-layout
|
|
4877
4943
|
.buildingSlug=${this.buildingSlug}
|
|
4878
|
-
.showSkeletonLoader=${this.
|
|
4944
|
+
.showSkeletonLoader=${this.isCalculatingQuote}
|
|
4879
4945
|
.selectedUnit=${this.selectedUnit}
|
|
4880
4946
|
.groupedFees=${this.groupedFees}
|
|
4881
4947
|
.rentableItems=${this.rentableItems}
|
|
@@ -4884,6 +4950,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4884
4950
|
.selectedLayoutIds=${this.selectedLayoutIds}
|
|
4885
4951
|
.units=${this.units}
|
|
4886
4952
|
.isLoadingUnits=${this.isLoadingUnits}
|
|
4953
|
+
.isLoadingLayouts=${this.isLoadingLayouts}
|
|
4887
4954
|
.onSelectLayout=${this.handleSelectLayout}
|
|
4888
4955
|
.onUnitSelect=${this.handleUnitSelect}
|
|
4889
4956
|
.onMoveInDateChange=${this.handleMoveInDateChange}
|
|
@@ -4902,7 +4969,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4902
4969
|
</div>
|
|
4903
4970
|
`:""}
|
|
4904
4971
|
</div>
|
|
4905
|
-
`}};oa.styles=zr,ra([ue({attribute:!0})],oa.prototype,"buildingSlug",void 0),ra([ue({attribute:!0})],oa.prototype,"orgSlug",void 0),ra([ue({type:String})],oa.prototype,"primaryColor",void 0),ra([ue({type:String})],oa.prototype,"backgroundColor",void 0),ra([ue()],oa.prototype,"onCloseClicked",void 0),ra([ue()],oa.prototype,"onClickEmailOption",void 0),ra([ue()],oa.prototype,"onClickPhoneOption",void 0),ra([ue()],oa.prototype,"onClickSSTOption",void 0),ra([ue()],oa.prototype,"onClickTextUsOption",void 0),ra([ce()],oa.prototype,"
|
|
4972
|
+
`}};oa.styles=zr,ra([ue({attribute:!0})],oa.prototype,"buildingSlug",void 0),ra([ue({attribute:!0})],oa.prototype,"orgSlug",void 0),ra([ue({type:String})],oa.prototype,"primaryColor",void 0),ra([ue({type:String})],oa.prototype,"backgroundColor",void 0),ra([ue()],oa.prototype,"onCloseClicked",void 0),ra([ue()],oa.prototype,"onClickEmailOption",void 0),ra([ue()],oa.prototype,"onClickPhoneOption",void 0),ra([ue()],oa.prototype,"onClickSSTOption",void 0),ra([ue()],oa.prototype,"onClickTextUsOption",void 0),ra([ce()],oa.prototype,"isCalculatingQuote",void 0),ra([ce()],oa.prototype,"isLoadingLayouts",void 0),ra([ce()],oa.prototype,"isExporting",void 0),ra([ce()],oa.prototype,"selectedLayoutIds",void 0),ra([ce()],oa.prototype,"selectedUnit",void 0),ra([ce()],oa.prototype,"chargeInputs",void 0),ra([ce()],oa.prototype,"desiredRentableItems",void 0),ra([ce()],oa.prototype,"moveInDateString",void 0),ra([ce()],oa.prototype,"leaseTerm",void 0),ra([ce()],oa.prototype,"buildingWebchatView",void 0),ra([ce()],oa.prototype,"incentives",void 0),ra([ce()],oa.prototype,"quote",void 0),ra([ce()],oa.prototype,"pdfUrl",void 0),ra([ce()],oa.prototype,"groupedFees",void 0),ra([ce()],oa.prototype,"rentableItems",void 0),ra([ce()],oa.prototype,"units",void 0),ra([ce()],oa.prototype,"isLoadingUnits",void 0),oa=ra([se("fee-calculator")],oa);const aa=u`
|
|
4906
4973
|
#minimize-mobile {
|
|
4907
4974
|
position: absolute;
|
|
4908
4975
|
top: -12px;
|
|
@@ -5345,7 +5412,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5345
5412
|
</div>
|
|
5346
5413
|
</div>
|
|
5347
5414
|
</div>
|
|
5348
|
-
`},this.verticalPillList=()=>{const e="Pacific Urban Residential"===this.orgSlug||"cbc11aba-21c4-4571-bc43-ff9d86a029e3"===this.orgSlug,t=[{pillKey:"Chat",pill:this.hasChatEnabledDesktop?B`
|
|
5415
|
+
`},this.verticalPillList=()=>{const e="Pacific Urban Residential"===this.orgSlug||"cbc11aba-21c4-4571-bc43-ff9d86a029e3"===this.orgSlug,t=[{pillKey:"Chat",optionLabel:"Chat with us",pill:this.hasChatEnabledDesktop?B`
|
|
5349
5416
|
<button
|
|
5350
5417
|
class="inner-pill-wrapper"
|
|
5351
5418
|
style=${Le({background:e?this.backgroundColor:this.primaryColor})}
|
|
@@ -5367,7 +5434,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5367
5434
|
${fa(e?this.foregroundColorOnSecondaryBackgroundColor:this.foregroundColorOnPrimaryBackgroundColor)}
|
|
5368
5435
|
</div>
|
|
5369
5436
|
</button>
|
|
5370
|
-
`:null},{pillKey:"Price Calculator",pill:this.hasPricingCalculatorEnabledDesktop?B`
|
|
5437
|
+
`:null},{pillKey:"Price Calculator",optionLabel:"Calculate cost",pill:this.hasPricingCalculatorEnabledDesktop?B`
|
|
5371
5438
|
<button
|
|
5372
5439
|
@click=${this.onClickPriceCalculatorOption}
|
|
5373
5440
|
class="inner-pill-wrapper"
|
|
@@ -5386,7 +5453,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5386
5453
|
${fa(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5387
5454
|
</div>
|
|
5388
5455
|
</button>
|
|
5389
|
-
`:null},{pillKey:"SST",pill:this.hasSSTEnabledDesktop?B`
|
|
5456
|
+
`:null},{pillKey:"SST",optionLabel:"Book a tour",pill:this.hasSSTEnabledDesktop?B`
|
|
5390
5457
|
<button
|
|
5391
5458
|
@click=${this.onClickSSTOption}
|
|
5392
5459
|
id="overlay-inner-pill"
|
|
@@ -5410,7 +5477,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5410
5477
|
${fa(e?this.foregroundColorOnPrimaryBackgroundColor:this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5411
5478
|
</div>
|
|
5412
5479
|
</button>
|
|
5413
|
-
`:null},{pillKey:"Email",pill:this.hasEmailEnabledDesktop?B`
|
|
5480
|
+
`:null},{pillKey:"Email",optionLabel:"Email an agent",pill:this.hasEmailEnabledDesktop?B`
|
|
5414
5481
|
<button
|
|
5415
5482
|
@click=${this.onClickEmailOption}
|
|
5416
5483
|
class="inner-pill-wrapper"
|
|
@@ -5433,7 +5500,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5433
5500
|
${fa(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5434
5501
|
</div>
|
|
5435
5502
|
</button>
|
|
5436
|
-
`:null},{pillKey:"Phone",pill:this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasTextUsEnabledDesktop)?B`
|
|
5503
|
+
`:null},{pillKey:"Phone",optionLabel:this.hasCallUsEnabledDesktop&&this.hasTextUsEnabledDesktop?"Call or text us":this.hasCallUsEnabledDesktop?"Call us":"Text us",pill:this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasTextUsEnabledDesktop)?B`
|
|
5437
5504
|
<button
|
|
5438
5505
|
@click=${this.onClickPhoneOption}
|
|
5439
5506
|
class="inner-pill-wrapper"
|
|
@@ -5474,7 +5541,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5474
5541
|
${fa(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5475
5542
|
</div>
|
|
5476
5543
|
</button>
|
|
5477
|
-
`:null},{pillKey:"Apply",pill:this.applicationLink&&this.hasApplyNowEnabledDesktop?B`
|
|
5544
|
+
`:null},{pillKey:"Apply",optionLabel:"Apply now",pill:this.applicationLink&&this.hasApplyNowEnabledDesktop?B`
|
|
5478
5545
|
<button
|
|
5479
5546
|
@click=${this.onClickApplyNowOption}
|
|
5480
5547
|
class="inner-pill-wrapper"
|
|
@@ -5497,8 +5564,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5497
5564
|
${fa(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5498
5565
|
</div>
|
|
5499
5566
|
</button>
|
|
5500
|
-
`:null}].filter(e=>!!e.pill);if(e){const e=t.findIndex(e=>"SST"===e.pillKey);if(-1!==e){const[n]=t.splice(e,1);t.unshift(n)}}return B`
|
|
5501
|
-
<
|
|
5567
|
+
`:null}].filter(e=>!!e.pill);if(e){const e=t.findIndex(e=>"SST"===e.pillKey);if(-1!==e){const[n]=t.splice(e,1);t.unshift(n)}}const n=t.map(e=>e.optionLabel);this.overrideRentgrata&&va()&&n.push("Contact a resident");const i=n.length?`EliseAI options: ${n.join(", ")}`:"EliseAI options";return B`
|
|
5568
|
+
<nav class="vertical-pill-list" aria-label=${i}>
|
|
5502
5569
|
<div class="vertical-pill-list">
|
|
5503
5570
|
${this.hasChatEnabledDesktop?B`<button
|
|
5504
5571
|
@click=${this.onClickMinimize}
|
|
@@ -5525,7 +5592,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5525
5592
|
<div class="chevron-right">${fa("black")}</div>
|
|
5526
5593
|
</button>`:""}
|
|
5527
5594
|
</div>
|
|
5528
|
-
</
|
|
5595
|
+
</nav>
|
|
5529
5596
|
`}}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=vn(e=>{this._isMobile=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}render(){window.customElements.get("email-us-window")||window.customElements.define("email-us-window",Dr),window.customElements.get("call-us-window")||window.customElements.define("call-us-window",Hr),window.eliseAi.onOpenSST=e=>{this.isSSTWindowOpen=!0,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.onExitChat(),e&&e()},(this.hasChatEnabledDesktop||this.hasChatEnabledMobile)&&(window.eliseAi.onOpenChat=e=>{this.handleChatTapped(),this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,e&&e()}),(this.hasCallUsEnabledDesktop||this.hasCallUsEnabledMobile)&&(window.eliseAi.onOpenCallUsWindow=e=>{this.isCallUsWindowOpen=!0,this.isSSTWindowOpen=!1,this.isEmailWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasEmailEnabledDesktop||this.hasEmailEnabledMobile)&&(window.eliseAi.onOpenEmailUsWindow=e=>{this.isEmailWindowOpen=!0,this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasPricingCalculatorEnabledDesktop||this.hasPricingCalculatorEnabledMobile)&&(window.eliseAi.onOpenPriceCalculatorWindow=e=>{this.isCalculatorWindowOpen=!0,e&&e()});const e={top:this._isMobile||void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:this._isMobile||void 0===this.bottom||isNaN(this.bottom)?void 0:`${this.bottom}px`,left:this._isMobile||void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:this._isMobile||void 0===this.right||isNaN(this.right)?void 0:`${this.right}px`};return B`
|
|
5530
5597
|
<div
|
|
5531
5598
|
class=${ni()({"launcher__mobile-launcher-wrapper":this._isMobile||this.isMinimized,"launcher__mini-launcher-wrapper":!this._isMobile&&!this.isMinimized,"launcher__mini-elevated":"livcor"===this.orgSlug.toLowerCase()&&(this._isMobile||this.isMinimized)})}
|
|
@@ -7228,4 +7295,4 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7228
7295
|
line-height: 150%;
|
|
7229
7296
|
font-size: 16px;
|
|
7230
7297
|
}
|
|
7231
|
-
`,iu([ue({type:String})],ru.prototype,"orgSlug",void 0),iu([ue({type:Number})],ru.prototype,"right",void 0),iu([ue({type:Number})],ru.prototype,"bottom",void 0),iu([ue({type:Number})],ru.prototype,"top",void 0),iu([ue({type:Number})],ru.prototype,"left",void 0),iu([ce()],ru.prototype,"launcher",void 0),iu([ce()],ru.prototype,"currentLeadSource",void 0),iu([ce()],ru.prototype,"displayPubnubChat",void 0),iu([ce()],ru.prototype,"myPubnub",void 0),iu([ce()],ru.prototype,"requiresConsent",void 0),iu([ce()],ru.prototype,"privacyPolicyUrl",void 0),iu([ce()],ru.prototype,"isLoading",void 0),ru=iu([se("utilities-chat")],ru);const ou=async e=>{const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":e}});return Math.random()<.2&&Ai({logType:i&&i.data?xi.info:xi.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:e,givenBuildingSlug:null,reason:i&&i.data?null:"No match found"}}),i.data},au=async(e,t=5e3)=>new Promise((n,i)=>{const r=new MutationObserver((t,i)=>{const r=document.getElementById(e);r&&(i.disconnect(),n(r))});r.observe(document.body,{childList:!0,subtree:!0});const o=setTimeout(()=>{r.disconnect(),i(new Error(`Element ${e} did not appear within ${t}ms`))},t),a=document.querySelector(e);a&&(clearTimeout(o),r.disconnect(),n(a))});class su{static healthcareStart(e,t=!0){var n,i,r,o;t&&(this.healthcareId=e.id,this.overridePlacement={right:e.right,bottom:e.bottom,top:e.top,left:e.left}),uu();const a=document.createElement("health-chat");a.setAttribute("class","health-chat"),a.setAttribute("role","
|
|
7298
|
+
`,iu([ue({type:String})],ru.prototype,"orgSlug",void 0),iu([ue({type:Number})],ru.prototype,"right",void 0),iu([ue({type:Number})],ru.prototype,"bottom",void 0),iu([ue({type:Number})],ru.prototype,"top",void 0),iu([ue({type:Number})],ru.prototype,"left",void 0),iu([ce()],ru.prototype,"launcher",void 0),iu([ce()],ru.prototype,"currentLeadSource",void 0),iu([ce()],ru.prototype,"displayPubnubChat",void 0),iu([ce()],ru.prototype,"myPubnub",void 0),iu([ce()],ru.prototype,"requiresConsent",void 0),iu([ce()],ru.prototype,"privacyPolicyUrl",void 0),iu([ce()],ru.prototype,"isLoading",void 0),ru=iu([se("utilities-chat")],ru);const ou=async e=>{const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":e}});return Math.random()<.2&&Ai({logType:i&&i.data?xi.info:xi.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:e,givenBuildingSlug:null,reason:i&&i.data?null:"No match found"}}),i.data},au=async(e,t=5e3)=>new Promise((n,i)=>{const r=new MutationObserver((t,i)=>{const r=document.getElementById(e);r&&(i.disconnect(),n(r))});r.observe(document.body,{childList:!0,subtree:!0});const o=setTimeout(()=>{r.disconnect(),i(new Error(`Element ${e} did not appear within ${t}ms`))},t),a=document.querySelector(e);a&&(clearTimeout(o),r.disconnect(),n(a))});class su{static healthcareStart(e,t=!0){var n,i,r,o;t&&(this.healthcareId=e.id,this.overridePlacement={right:e.right,bottom:e.bottom,top:e.top,left:e.left}),uu();const a=document.createElement("health-chat");a.setAttribute("class","health-chat"),a.setAttribute("role","region"),a.setAttribute("aria-label","EliseAI Healthcare Widget"),a.setAttribute("aria-describedby","aria-describe-info"),a.setAttribute("healthcareId",e.id),a.setAttribute("right",(null===(n=e.right)||void 0===n?void 0:n.toString())||"unset"),a.setAttribute("bottom",(null===(i=e.bottom)||void 0===i?void 0:i.toString())||"unset"),a.setAttribute("top",(null===(r=e.top)||void 0===r?void 0:r.toString())||"unset"),a.setAttribute("left",(null===(o=e.left)||void 0===o?void 0:o.toString())||"unset"),document.body.appendChild(a),su.healthChat=a}static start(e,t=!0){var n,i,r,o,a,s,l,u;if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;t&&(this.orgSlug="Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization,this.hasBuildingSlug=!!e.building,this.overridePlacement={right:null===(n=null==e?void 0:e.position)||void 0===n?void 0:n.right,bottom:null===(i=null==e?void 0:e.position)||void 0===i?void 0:i.bottom,top:null===(r=null==e?void 0:e.position)||void 0===r?void 0:r.top,left:null===(o=null==e?void 0:e.position)||void 0===o?void 0:o.left}),uu();let c=null;switch(e.widgetType){case lu.Healthcare:throw new Error("Healthcare widget is not supported yet, please use the healthcareStart method instead.");case lu.Default:c=document.createElement("me-chat");break;case lu.Utilities:c=document.createElement("utilities-chat");break;default:c=document.createElement("me-chat")}if(!c)throw new Error("Invalid widget type");c.setAttribute("orgSlug","Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization),c.setAttribute("widgetType",e.widgetType||lu.Default),c.setAttribute("class","meetelise-chat"),c.setAttribute("role","region"),c.setAttribute("aria-label","EliseAI Widget"),c.setAttribute("aria-describedby","aria-describe-info"),e.brandColor&&(this.brandColor=e.brandColor,c.setAttribute("primaryColor",((e,t)=>{const n=Be(e),i=0,r=0,o=0,a={r:n.r+Math.round((i-n.r)*t),g:n.g+Math.round((r-n.g)*t),b:n.b+Math.round((o-n.b)*t)};return je(a.r,a.g,a.b)})(e.brandColor,.3))),e.backgroundColor&&(this.backgroundColor=e.backgroundColor),c instanceof Vl&&(this.handleBuildingslug(c,e.organization,e.building,e),e.launcherStyles&&(c.launcherStyles=e.launcherStyles),e.mobileStyles&&(c.mobileStyles=e.mobileStyles),e.onWidgetLoaded&&(c.onWidgetLoaded=e.onWidgetLoaded),e.overrideRentgrata&&((async()=>{const e=await au("rg-widget-compact");e&&e.setAttribute("style","display: none")})(),c.overrideRentgrata=!0),e.onSstClose&&(c.onSstClose=e.onSstClose)),e.position&&(c.setAttribute("right",(null===(a=e.position.right)||void 0===a?void 0:a.toString())||"unset"),c.setAttribute("bottom",(null===(s=e.position.bottom)||void 0===s?void 0:s.toString())||"unset"),c.setAttribute("top",(null===(l=e.position.top)||void 0===l?void 0:l.toString())||"unset"),c.setAttribute("left",(null===(u=e.position.left)||void 0===u?void 0:u.toString())||"unset")),window.eliseAi={},document.body.appendChild(c),c instanceof Vl&&(su.meChat=c),c instanceof ru&&(su.utilitiesChat=c)}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.meChat&&(await this.meChat.remove(),document.body.removeChild(this.meChat),su.meChat=null)}static async handleBuildingslug(e,t,n,i){if(n)return void e.setAttribute("buildingSlug",n);if(this.mutationObserver)return;if(!t)return;const r=await ou(t);if(r){const e={...i,organization:t,building:r};this.start(e,!1)}this.previousUrl=window.location.href,document.body.addEventListener("click",()=>{requestAnimationFrame(()=>{this.previousUrl===window.location.href||this.hasBuildingSlug||(this.previousUrl=window.location.href,ou(t).then(e=>{if(!e)return;const n={...i,organization:t,building:e};this.start(n,!1)}))})},!0)}static async handleSingleFamilyUrl(){if(this.hasBuildingSlug)return;this.remove();const e=window.location.href,t=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(e)}`,n=await r().get(t,{headers:{"org-slug":this.orgSlug}});if(Math.random()<.2&&Ai({logType:n&&n.data?xi.info:xi.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${n?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:n.data,url:e,orgSlug:this.orgSlug,givenBuildingSlug:null,reason:n&&n.data?null:"No match found"}}),!n||!n.data)return;const i={organization:this.orgSlug,building:n.data,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(i,!1)}static async calculateBuildingSlugForLogging(e){const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":this.orgSlug}});Math.random()<.2&&Ai({logType:i&&i.data===e?xi.info:xi.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i&&i.data===e?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:this.orgSlug,givenBuildingSlug:e,reason:i&&i.data===e?null:i&&!i.data?"No match found":i&&i.data!==e?"Mismatch":"No match found"}}),i&&i.data}}var lu;su.meChat=null,su.healthChat=null,su.utilitiesChat=null,su.orgSlug="",su.mutationObserver=null,su.previousUrl="",su.hasBuildingSlug=null,su.brandColor="",su.backgroundColor="",su.healthcareId="",su.overridePlacement={},function(e){e.Default="default",e.Healthcare="healthcare",e.Utilities="utilities"}(lu||(lu={}));const uu=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),document.head.appendChild(e)};export{lu as WidgetType,su as default};
|