1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4760,8133],{49057:function(t,e,n){n.d(e,{contact_methods:function(){return i},hz:function(){return o},lead_type:function(){return r}});let r={Rent:"Rent",Sale:"Sale",All:"All"},o="/images/placeholder_property.png",i={Whatsapp:"Whatsapp",Phone:"Phone",Email:"Email"}},10638:function(t,e,n){n.d(e,{BC:function(){return N},CN:function(){return x},F6:function(){return p},FC:function(){return L},Hi:function(){return w},IF:function(){return S},LC:function(){return d},M1:function(){return C},Mt:function(){return m},PL:function(){return j},PX:function(){return c},SE:function(){return D},Tw:function(){return f},V0:function(){return M},Ws:function(){return b},Ys:function(){return l},aR:function(){return a},ct:function(){return u},gZ:function(){return k},m$:function(){return y},m7:function(){return v},mn:function(){return g},sP:function(){return s},uF:function(){return h}});var r=n(57437);function o(t){let{size:e=16,children:n,...o}=t;return(0,r.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,...o,children:n})}function i(t){let{scale:e,children:n,...o}=t;return(0,r.jsx)("g",{transform:"scale(".concat(e,")"),...o,children:n})}function l(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:1.5,stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M5.33333 4H14M5.33333 8H14M5.33333 12H14M2.33333 4H2.34M2.33333 8H2.34M2.33333 12H2.34"})})})}function a(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:1.5,stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M12.6667 2.66667H3.33333C2.59695 2.66667 2 3.26362 2 4V12.6667C2 13.403 2.59695 14 3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V4C14 3.26362 13.403 2.66667 12.6667 2.66667Z"}),(0,r.jsx)("path",{d:"M2 6H14M5.33333 1.33333V4M10.6667 1.33333V4"})]})})}function u(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:1.5,stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",children:(0,r.jsx)("path",{d:"M8 3.33333V12.6667M3.33333 8H12.6667"})})})}function d(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:24/13,stroke:"currentColor",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M2.70833 6.5L5.41667 9.20833L10.2917 3.79167"})})})}function s(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:24/11,stroke:"currentColor",strokeWidth:1.375,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M2.29167 5.5L4.58333 7.79167L8.70833 3.20833"})})})}function c(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:24/14,fill:"currentColor",children:(0,r.jsx)("path",{d:"M7.97883 2.3336C8.02346 2.33199 8.08057 2.33751 8.12292 2.35237C8.5218 2.49244 8.34546 2.91818 8.26344 3.22708L8.08821 3.89155C7.92587 4.50775 7.76002 5.1902 7.58193 5.79675L8.58743 6.09706C8.64302 6.11362 8.72095 6.14069 8.77503 6.15277C9.76203 6.3728 9.21008 6.92936 8.86148 7.45669L6.7634 10.6345L6.3959 11.1932C6.26471 11.3931 6.18077 11.5933 5.95134 11.6657C5.92789 11.6662 5.90275 11.6672 5.87784 11.6663L5.8055 11.6556C5.49002 11.5575 5.50926 11.2901 5.5744 11.0274L5.64438 10.7728L6.41118 7.86275L5.57558 7.61372C5.38722 7.55819 5.09544 7.48924 4.89523 7.39976L4.81585 7.36032C4.60981 7.24447 4.63976 6.94552 4.76939 6.7578L6.68343 3.98916L7.38967 2.96429L7.39433 2.95866C7.51292 2.78657 7.63758 2.59538 7.76773 2.43309C7.81912 2.36902 7.90358 2.3493 7.97883 2.3336Z"})})})}function w(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:24/14,stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M5.25 3.5L8.75 7L5.25 10.5"})})})}function f(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:24/14,stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M3.5 5.25L7 8.75L10.5 5.25"})})})}function m(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:1.5,stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M10 12L6 8L10 4"})})})}function v(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:1.5,stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M6 12L10 8L6 4"})})})}function h(t){let{strokeWidth:e=1.33333,...n}=t;return(0,r.jsx)(o,{...n,children:(0,r.jsx)(i,{scale:1.5,stroke:"currentColor",strokeWidth:e,strokeLinecap:"round",children:(0,r.jsx)("path",{d:"M4 4L12 12M12 4L4 12"})})})}function p(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:1.5,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M2.99219 6.44141H13.6865"}),(0,r.jsx)("path",{d:"M10.7625 2V3.97449"}),(0,r.jsx)("path",{d:"M5.91563 2V3.97449"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8787 2.94922H5.79843C4.03604 2.94922 2.93594 3.93063 2.93594 5.73453V11.165C2.93594 12.9975 4.03604 14.0016 5.79843 14.0016H10.8735C12.6411 14.0016 13.736 13.015 13.736 11.2104V5.73453C13.7411 3.93063 12.6463 2.94922 10.8787 2.94922Z"}),(0,r.jsx)("path",{d:"M8.33594 8.55078V11.5508"}),(0,r.jsx)("path",{d:"M9.83594 10.0508H6.83594"})]})})}function g(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)("g",{transform:"translate(1.303 1.5) scale(1.5)",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M8.902 0.666796C11.3693 0.940796 13.3187 2.88746 13.5953 5.3548"}),(0,r.jsx)("path",{d:"M8.902 3.0288C10.0827 3.25813 11.0053 4.18146 11.2353 5.36213"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68769 7.31505C9.34701 9.9737 9.9503 6.89794 11.6435 8.59C13.2759 10.222 14.2148 10.5489 12.1459
112.6166C11.8868 12.8248 10.2408 15.3296 4.45631 9.54657C-1.32893 3.7628 1.17438 2.11509 1.38263 1.8561C3.45585 -0.217307 3.77789 0.726385 5.41027 2.35835C7.10276 4.05113 4.02836 4.65641 6.68769 7.31505Z"})]})})}function x(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:1.5,fill:"currentColor",children:[(0,r.jsx)("path",{d:"M11.7185 12.1558H4.61451C4.28074 12.1558 3.9524 12.0714 3.65992 11.9106C3.36745 11.7498 3.1203 11.5178 2.94143 11.236C2.76257 10.9542 2.65777 10.6318 2.63675 10.2986C2.61573 9.96557 2.67916 9.63257 2.82117 9.3305L3.12452 8.6865C3.30835 8.29543 3.4037 7.86863 3.40384 7.4365V6.58049C3.39639 5.95044 3.51406 5.32517 3.75001 4.74093C3.98596 4.15668 4.33551 3.62506 4.77841 3.17689C5.22131 2.72871 5.74875 2.37289 6.33017 2.13005C6.9116 1.8872 7.5354 1.76215 8.16553 1.76215C8.7956 1.76215 9.41947 1.8872 10.0009 2.13005C10.5823 2.37289 11.1097 2.72871 11.5526 3.17689C11.9955 3.62506 12.3451 4.15668 12.581 4.74093C12.817 5.32517 12.9346 5.95044 12.9272 6.58049V7.43517C12.9282 7.8679 13.0237 8.29523 13.2072 8.68717L13.5099 9.32983C13.6521 9.63183 13.7156 9.96483 13.6947 10.298C13.6738 10.631 13.5691 10.9535 13.3903 11.2353C13.2114 11.5172 12.9643 11.7492 12.6718 11.91C12.3793 12.0708 12.0509 12.1552 11.7172 12.1552L11.7185 12.1558ZM8.16653 2.81916C7.16907 2.82022 6.21282 3.21691 5.50754 3.92219C4.80225 4.62748 4.40557 5.58374 4.40451 6.58116V7.4365C4.4039 8.01603 4.27623 8.5883 4.03051 9.11317L3.72718 9.7565C3.6568 9.9061 3.62534 10.0711 3.63571 10.2361C3.64609 10.4011 3.69797 10.5608 3.78653 10.7005C3.87509 10.8401 3.99746 10.9551 4.14233 11.0348C4.28719 11.1146 4.44984 11.1564 4.61518 11.1565H11.7192C11.8846 11.1566 12.0473 11.1149 12.1923 11.0352C12.3373 10.9556 12.4598 10.8406 12.5483 10.7008C12.6369 10.5611 12.6887 10.4012 12.6989 10.2362C12.709 10.071 12.6773 9.90603 12.6065 9.7565L12.3045 9.11383C12.0585 8.58903 11.9304 8.01677 11.9292 7.43717V6.58116C11.9281 5.58363 11.5313 4.62726 10.8259 3.92196C10.1205 3.21665 9.16407 2.82004 8.16653 2.81916Z"}),(0,r.jsx)("path",{d:"M8.16567 14.5016C7.49967 14.5008 6.86113 14.236 6.39018 13.7651C5.91924 13.2941 5.65435 12.6556 5.65365 11.9896C5.65365 11.857 5.70632 11.7298 5.80009 11.636C5.89386 11.5423 6.02104 11.4896 6.15365 11.4896C6.28625 11.4896 6.41343 11.5423 6.5072 11.636C6.60097 11.7298 6.65365 11.857 6.65365 11.9896C6.65365 12.3906 6.81293 12.7752 7.09647 13.0587C7.38007 13.3423 7.76467 13.5016 8.16567 13.5016C8.56667 13.5016 8.95127 13.3423 9.2348 13.0587C9.51833 12.7752 9.67767 12.3906 9.67767 11.9896C9.67767 11.857 9.73033 11.7298 9.82407 11.636C9.91787 11.5423 10.0451 11.4896 10.1777 11.4896C10.3103 11.4896 10.4375 11.5423 10.5312 11.636C10.625 11.7298 10.6777 11.857 10.6777 11.9896C10.6769 12.6556 10.4121 13.2941 9.94113 13.7651C9.4702 14.236 8.83167 14.5008 8.16567 14.5016Z"}),(0,r.jsx)("path",{d:"M2.87869 4.35303C2.80661 4.3531 2.73539 4.3374 2.67003 4.30703C2.60993 4.27961 2.55587 4.24055 2.51097 4.19212C2.46606 4.14368 2.4312 4.08682 2.40839 4.02484C2.38557 3.96285 2.37525 3.89696 2.37805 3.83097C2.38085 3.76498 2.39671 3.7002 2.42469 3.64036C2.79729 2.84238 3.35442 2.1445 4.05003 1.60436C4.15453 1.52268 4.28717 1.48585 4.41883 1.50198C4.55047 1.5181 4.67033 1.58586 4.75201 1.69036C4.8337 1.79486 4.87054 1.92752 4.85441 2.05918C4.83829 2.19083 4.77051 2.31068 4.66602 2.39236C4.09526 2.83388 3.63815 3.40528 3.33269 4.05903C3.29311 4.14636 3.22929 4.2205 3.14881 4.27261C3.06833 4.32473 2.97457 4.35264 2.87869 4.35303Z"}),(0,r.jsx)("path",{d:"M13.4567 4.35297C13.3609 4.35294 13.2673 4.32548 13.1867 4.27385C13.1061 4.22222 13.042 4.14857 13.002 4.06164C12.6965 3.40788 12.2394 2.83649 11.6687 2.39497C11.6169 2.35452 11.5736 2.30428 11.5413 2.24711C11.509 2.18994 11.4882 2.12697 11.4803 2.06178C11.4641 1.93013 11.5009 1.79746 11.5827 1.69297C11.6643 1.58848 11.7842 1.52071 11.9158 1.50458C12.0475 1.48845 12.1801 1.52528 12.2846 1.60697C12.9801 2.1471 13.5369 2.845 13.9093 3.64297C13.9373 3.7028 13.9531 3.76758 13.9559 3.83358C13.9587 3.89957 13.9484 3.96546 13.9256 4.02744C13.9028 4.08943 13.8679 4.14628 13.823 4.19472C13.7781 4.24316 13.7241 4.28221 13.6639 4.3
10964C13.5988 4.3389 13.5281 4.35368 13.4567 4.35297Z"})]})})}function b(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:1.5,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M7.96167 8.92333C9.6894 8.92333 11.09 7.52273 11.09 5.795C11.09 4.06727 9.6894 2.66667 7.96167 2.66667C6.23394 2.66667 4.83333 4.06727 4.83333 5.795C4.83333 7.52273 6.23394 8.92333 7.96167 8.92333Z"}),(0,r.jsx)("path",{d:"M9.42527 9.11198H6.57467C4.95792 9.11198 3.64728 10.4226 3.64728 12.0394C3.64728 12.0974 3.64672 12.1557 3.64594 12.2142C3.63725 12.8624 4.16395 13.3332 4.81229 13.3332H11.1877C11.836 13.3332 12.3627 12.8624 12.354 12.2142C12.3532 12.1557 12.3527 12.0974 12.3527 12.0394C12.3527 10.4226 11.042 9.11198 9.42527 9.11198Z"})]})})}function y(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:24/14,stroke:"currentColor",strokeWidth:1.05,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M7 7C8.28866 7 9.33333 5.95533 9.33333 4.66667C9.33333 3.378 8.28866 2.33333 7 2.33333C5.71134 2.33333 4.66667 3.378 4.66667 4.66667C4.66667 5.95533 5.71134 7 7 7Z"}),(0,r.jsx)("path",{d:"M2.33333 12.25V11.6667C2.33333 10.7384 2.70208 9.84817 3.35846 9.19179C4.01484 8.53542 4.90508 8.16667 5.83333 8.16667H8.16667C9.09492 8.16667 9.98516 8.53542 10.6415 9.19179C11.2979 9.84817 11.6667 10.7384 11.6667 11.6667V12.25"})]})})}function C(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:24/14,stroke:"currentColor",strokeWidth:1.05,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M1.75 6.125L7 1.75L12.25 6.125V12.25H1.75V6.125Z"}),(0,r.jsx)("path",{d:"M5.25 12.25V8.75H8.75V12.25"})]})})}function j(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:24/14,stroke:"currentColor",strokeWidth:1.05,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M12.8333 9.85833V11.6083C12.8342 11.7719 12.8006 11.9338 12.7348 12.0835C12.669 12.2332 12.5725 12.3674 12.4515 12.4774C12.3305 12.5875 12.1877 12.6708 12.0324 12.7221C11.8771 12.7733 11.7127 12.7914 11.55 12.775C9.75961 12.5718 8.04161 11.9525 6.53333 10.9667C5.1239 10.0711 3.92895 8.8761 3.03333 7.46667C2.04749 5.95839 1.42821 4.24039 1.225 2.45C1.20864 2.28728 1.22668 2.12294 1.27794 1.96763C1.3292 1.81233 1.41254 1.66955 1.52255 1.54853C1.63256 1.42752 1.76679 1.33099 1.91651 1.26521C2.06624 1.19942 2.22813 1.16585 2.39167 1.16667H4.14167C4.42302 1.16349 4.69605 1.2621 4.91045 1.44433C5.12484 1.62656 5.26615 1.88014 5.30833 2.15833C5.36667 2.68333 5.54167 3.20833 5.71667 3.73333C5.79032 3.94403 5.802 4.17143 5.7503 4.38856C5.6986 4.60569 5.5857 4.80344 5.425 4.95833L4.66667 5.71667C5.49707 7.17707 6.70626 8.38626 8.16667 9.21667L8.925 8.45833C9.0862 8.30754 9.28687 8.20557 9.50371 8.16426C9.72055 8.12296 9.94465 8.14402 10.15 8.225C10.675 8.4 11.2 8.575 11.725 8.63333C12.0032 8.67552 12.2568 8.81683 12.439 9.03122C12.6212 9.24561 12.7198 9.51864 12.7167 9.8L12.8333 9.85833Z"})})})}function k(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)("g",{transform:"scale(1.333333)",children:(0,r.jsx)("rect",{x:"0.5",y:"0.5",width:"17",height:"17",rx:"4",stroke:"currentColor",strokeWidth:"1"})})})}function S(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:24/14,stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",children:[(0,r.jsx)("path",{d:"M6.41667 10.5C8.67183 10.5 10.5 8.67183 10.5 6.41667C10.5 4.1615 8.67183 2.33333 6.41667 2.33333C4.1615 2.33333 2.33333 4.1615 2.33333 6.41667C2.33333 8.67183 4.1615 10.5 6.41667 10.5Z"}),(0,r.jsx)("path",{d:"M11.6667 11.6667L9.625 9.625"})]})})}function D(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M2 10H4L9.5 4.5L7.5 2.5L2 8V10Z"})})})}function N(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:24/14,stroke:"currentColor",strokeWidth:1.05,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M1.75 12.25H12.25M2.91667 12.25V2.33333H8.16667V12.25M8.16667 5.25H11.0833V12.25M4.66667 4.66667H5.25M4.66667 7H5.25M4.66667 9.33333H5.25"})})})}function L(t){return(0,r.jsx)(o,{...t,children:(0,r.jsx)(i,{scale:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M10 5V2H7M10 2L5.5 6.5M9 7V9.5C9 9.63261 8.94732 9.75979 8.85355 9.85355C8.75979 9.94732 8.63261 10 8.5 10H2.5C2.36739 10 2.24021 9.94732 2.14645 9.85355C2.05268 9.75979 2 9.63261 2 9.5V3.5C2 3.36739 2.05268 3.24021 2.14645 3.14645C2.24021 3.05268 2.36739 3 2.5 3H5"})})})}function M(t){return(0,r.jsx)(o,{...t,children:(0,r.jsxs)(i,{scale:24/18,stroke:"currentColor",strokeWidth:1.125,strokeMiterlimit:10,strokeLinecap:"round",children:[(0,r.jsx)("path",{d:"M4.28582 14.8872C3.2748 14.8872 2.66386 14.1605 2.62061 13.1484C2.62061 11.0881 4.63365 10.3774 7.66673 10.3535C10.7052 10.3855 12.7237 11.0962 12.7129 13.1484C12.6642 14.1605 12.0569 14.8872 11.0477 14.8872H4.28582Z"}),(0,r.jsx)("path",{d:"M13.7947 14.7738C14.753 14.7738 15.3296 14.0838 15.3759 13.1228C15.382 11.9471 14.6869 11.2351 13.5007 10.8486"}),(0,r.jsx)("path",{d:"M7.48676 8.38463C8.94218 8.38463 10.1219 7.20484 10.1219 5.74946C10.1219 4.29408 8.94218 3.11426 7.48676 3.11426C6.03138 3.11426 4.85156 4.29408 4.85156 5.74946C4.85156 7.20484 6.03138 8.38463 7.48676 8.38463Z"}),(0,r.jsx)("path",{d:"M11.7788 3.76465C12.646 4.08772 13.2637 4.92324 13.2637 5.90303C13.2637 6.88283 12.646 7.71836 11.7788 8.04139"})]})})}},39005:function(t,e,n){n.d(e,{$i:function(){return C},Bs:function(){return M},Cz:function(){return f},Dg:function(){return g},E4:function(){return u},IK:function(){return H},Ic:function(){return y},JZ:function(){return c},LU:function(){return S},MN:function(){return P},MY:function(){return F},SN:function(){return N},T2:function(){return x},TN:function(){return b},Vr:function(){return w},X_:function(){return A},Yt:function(){return O},_r:function(){return Y},b7:function(){return a},bg:function(){return s},ci:function(){return _},j$:function(){return E},jB:function(){return T},lt:function(){return Z},lw:function(){return D},mr:function(){return j},nn:function(){return m},ns:function(){return k},oW:function(){return I},so:function(){return o},yh:function(){return L},zA:function(){return p},zJ:function(){return d}});var r=n(73759);function o(t,e){if(t||e)return{name:(null==t?void 0:t.name)||(null==e?void 0:e.name)||"Agent",coreId:(null==t?void 0:t.coreId)||(null==e?void 0:e.coreId),cmsId:(null==t?void 0:t.cmsId)||(null==e?void 0:e.cmsId),avatarUrl:(null==t?void 0:t.avatarUrl)||(null==e?void 0:e.avatarUrl),role:(null==t?void 0:t.role)||(null==e?void 0:e.role),area:(null==t?void 0:t.area)||(null==e?void 0:e.area)}}function i(t){var e,n,r,o;let i=null==t?void 0:t.agent;if(!i||"object"!=typeof i)return;let l=i._id||i.id,a=v(i.name);if(a||l)return{cmsId:l?String(l):void 0,name:a||"Agent",avatarUrl:(null===(e=i.avatar)||void 0===e?void 0:e.file)||(null===(n=i.avatar)||void 0===n?void 0:n.url)||(null===(r=i.avatar2)||void 0===r?void 0:r.file)||i.photoUrl||null,role:v(i.type)||v(i.designation)||void 0,area:v(i.officeName)||v(null===(o=i.branch)||void 0===o?void 0:o.name)||void 0}}let l=t=>String(t).padStart(2,"0"),a=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),u=(t,e)=>{let n=new Date(t);return n.setDate(n.getDate()+e),n},d=t=>{let e=t.getDay()||7;return u(a(t),1-e)},s=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function c(t){let e=t.title.toLowerCase();return t.team_event||e.includes("callout")?"callout":e.includes("viewing")?"viewing":e.includes("remind")?"reminder":"personal"}function w(t){let e=(null==t?void 0:t.id)||(null==t?void 0:t._id);return e?String(e).toLowerCase():""}function f(t){return"/diary?activity=".concat(encodeURIComponent(String(t).toLowerCase()))}function m(t){return"/explore/activities/".concat(encodeURIComponent(String(t).toLowerCase()))}function v(t){if(null==t)return"";if("string"==typeof t){let e=t.trim();return"null"===e?"":e}return"number"==typeof t?String(t):"object"==typeof t?v(t.name||t.label||t.community||t.location):""}function h(t){return t&&"object"==typeof t?t.id&&"object"==typeof t.id?t.id:t:null}function p(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=null==t?void 0:t.customer;return v(null==n?void 0:n.fullName)||v(null==n?void 0:n.name)||[v(null==n?void 0:n.firstName),v(null==n?void 0:n.lastName)].filter(
1Boolean).join(" ")||v(e)}function g(t,e){var n;let r=function(t){let e=(Array.isArray(null==t?void 0:t.listings)?t.listings:[]).map(t=>(function(t){if(!t)return null;let e=v(t.unit),n=v(t.address),r=v(t.community)||v(t.building)||v(t.location)||v(t.subLocation)||n;return r||e||n?{name:r,unit:e,address:n}:null})(h(t))).filter(t=>null!=t);if(e.length)return e;let n=(Array.isArray(null==t?void 0:t.projects)?t.projects:[]).map(t=>{let e=h(t),n=v(null==e?void 0:e.name)||v(null==e?void 0:e.campaignName),r=v(null==e?void 0:e.address);return n||r?{name:n||r,unit:"",address:r}:null}).filter(t=>null!=t);return n.length?n:(Array.isArray(null==t?void 0:t.locations)?t.locations:[]).map(t=>{if("string"==typeof t){let e=v(t);return e?{name:e,unit:"",address:""}:null}let e=h(t),n=v(null==e?void 0:e.name)||v(null==e?void 0:e.location)||v(null==e?void 0:e.community),r=v(null==e?void 0:e.address);return n||r?{name:n||r,unit:"",address:r}:null}).filter(t=>null!=t)}(t),o=p(null==t?void 0:t.lead,e),i=r[0];if(!i)return{propertyLine:"",propertyAddress:"",subtitle:o};let l=(n=i.unit)?/^unit\b/i.test(n)?n:"Unit ".concat(n):"",a=r.length-1,u=a>0?[i.name,l?"".concat(l," +").concat(a," more"):"+".concat(a," more")].filter(Boolean).join(" \xb7 "):[i.name,l].filter(
1Boolean).join(" \xb7 ");return{propertyLine:u,propertyAddress:i.address||[l,i.name].filter(Boolean).join(", "),subtitle:[u,o].filter(Boolean).join(" \xb7 ")}}function x(t){let e=new Date(null==t?void 0:t.activityDate);if(Number.isNaN(e.getTime()))return null;let n=w(t);if(!n)return null;let o=(0,r.Du)(e,(0,r.T6)(null==t?void 0:t.eventSlot)),l=(null==t?void 0:t.lead)&&"object"==typeof t.lead?t.lead:void 0,a=p(l),u=function(t){var e,n,r,o,i,l;let a=null==t?void 0:null===(e=t.listings)||void 0===e?void 0:e[0],u=(null==a?void 0:null===(n=a.id)||void 0===n?void 0:n.reference)||(null==a?void 0:a.reference)||(null==t?void 0:t.propertyReference);if(u)return String(u);let d=null==t?void 0:null===(r=t.projects)||void 0===r?void 0:r[0],s=(null==d?void 0:null===(o=d.id)||void 0===o?void 0:o.name)||(null==d?void 0:d.name)||(null==d?void 0:null===(i=d.id)||void 0===i?void 0:i.campaignName);if(s)return String(s);let c=null==t?void 0:null===(l=t.locations)||void 0===l?void 0:l[0];return"string"==typeof c?c:(null==c?void 0:c.name)||(null==c?void 0:c.location)||""}(t),d=(null==l?void 0:l.leadID)||(null==l?void 0:l.sourceDataId),s=String((null==t?void 0:t.activityStatus)||"").toLowerCase();return{id:"viewing-".concat(n),kind:"viewing",title:a?"Viewing for ".concat(a):u?"Viewing \xb7 ".concat(u):"Viewing",subtitle:[u,d?"#".concat(d):""].filter(Boolean).join(" \xb7 "),start:e,end:o,done:"completed"===s||"closed"===s||"cancelled"===s||"canceled"===s,pendingConfirm:!1,leadName:a||void 0,propertyLine:u||void 0,activityId:n,cmsLead:l,agent:i(t)}}function b(t,e,n){var r,o,i;let l=new Date(t.start),a=new Date(t.end);if(Number.isNaN(l.getTime())||Number.isNaN(a.getTime()))return null;let u=c(t);if("viewing"===u)return null;let d=(null===(r=t.title)||void 0===r?void 0:r.trim())||"Untitled";return{id:t.id||[t.source,t.start,t.end,d].join("|"),kind:u,title:d,subtitle:(null===(o=t.location)||void 0===o?void 0:o.trim())||("personal"===u?"Personal":""),start:l,end:a,done:a.getTime()<e.getTime(),pendingConfirm:!1,propertyLine:null!==(i=t.location)&&void 0!==i?i:void 0,agent:n}}function y(t,e){var n,r;let o=new Date((null==t?void 0:t.datetime)||"");return Number.isNaN(o.getTime())||(null==t?void 0:t.id)==null?null:{id:"reminder-".concat(t.id),kind:"reminder",title:(null===(n=t.title)||void 0===n?void 0:n.trim())||"Reminder",subtitle:(null===(r=t.description)||void 0===r?void 0:r.trim())||"Reminder",start:o,end:o,done:!!t.completed_at||o.getTime()<e.getTime(),pendingConfirm:!1}}function C(t,e,n){var l,a,u;let d=new Date((null==n?void 0:n.activityDate)||(null==e?void 0:e.activityDate)||t.created_at||Date.now()),s=(0,r.Du)(d,(0,r.T6)(null==n?void 0:n.eventSlot)),c=p(null==n?void 0:n.lead,(null===(a=t.customer)||void 0===a?void 0:null===(l=a.name)||void 0===l?void 0:l.trim())||"")||"Unnamed lead",f=g(n,c),m=w(n)||((null==e?void 0:e.id)?String(e.id).toLowerCase():"");return{id:"pending-".concat(t.id,"-").concat(null!==(u=null==e?void 0:e.id)&&void 0!==u?u:"lead"),kind:"viewing",title:"Viewing for ".concat(c),subtitle:f.subtitle,start:d,end:s,done:!1,pendingConfirm:!0,requestedAt:(null==n?void 0:n.createdAt)||(null==n?void 0:n.dataSourceCreatedAt)||t.created_at,leadName:c,propertyLine:f.propertyLine||void 0,propertyAddress:f.propertyAddress||void 0,bookedVia:"SmartView AI",lead:t,viewing:e,activityId:m||void 0,cmsLead:(null==n?void 0:n.lead)&&"object"==typeof n.lead?n.lead:void 0,agent:o(i(n),function(t){var e,n,r;let o=null!==(r=null===(e=t.agent)||void 0===e?void 0:e.id)&&void 0!==r?r:t.agent_id,i=v(null===(n=t.agent)||void 0===n?void 0:n.name);if(null!=o||i)return{coreId:null!=o?String(o):void 0,name:i||"Agent"}}(t))}}function j(t){return new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!1}).format(t)}function k(t,e){return"".concat(j(t)," â ").concat(j(e))}function S(t,e){let n=Math.max(0,Math.round((e.getTime()-t.getTime())/6e4));if(n<60)return"".concat(n||1," min");let r=n/60;return Number.isInteger(r)&&1===r?"1 hr":"".concat(r," hrs")}function D(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(!t)return"";let n=new Date(t);if(Number.isNaN(n.getTime()))return"";let r=Math.max(0,Math.round((e.getTime()-n.getTime())/6e4));if(r<1)return"Requested just now";if(r<60)return"Requested ".concat(r," min ago");let o=Math.round(r/60);return o<24?"Requested ".concat(o," h ago"):"Requested ".concat(Math.round(o/24)," d ago")}function N(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return D(t,e).replace(/^Requested /,"")}function L(t,e){return s(t,e)?"Today":s(t,u(a(e),1))?"Tomorrow":new Intl.DateTimeFormat("en-GB",{weekday:"long"}).format(t)}function M(t,e){let n=new Intl.DateTimeFormat("en-GB",{weekday:"short",day:"numeric",month:"short"}).format(t);return"".concat(n," \xb7 ").concat(e," item").concat(1===e?"":"s")}function F(t){return{weekday:new Intl.DateTimeFormat("en-GB",{weekday:"short"}).format(t),day:String(t.getDate()),month:new Intl.DateTimeFormat("en-GB",{month:"short"}).format(t)}}function _(t,e){let n=new Intl.DateTimeFormat("en-GB",{weekday:"short",day:"numeric",month:"short",year:"numeric"}).format(t).replace(/,/g,"");return"".concat(n," \xb7 ").concat(k(t,e)," (").concat(S(t,e),")")}function T(t){let e=new Intl.DateTimeFormat("en-GB",{weekday:"short",day:"numeric",month:"short",year:"numeric"}).format(t).replace(/,/g,""),n=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).format(t);return"".concat(e," \xb7 ").concat(n)}function Z(t){let e=new Intl.DateTimeFormat("en-GB",{weekday:"short",day:"numeric",month:"short",year:"numeric"}).format(t).replace(/,/g,"");return"".concat(e," \xb7 ").concat(j(t))}function A(t){let e=d(t),n=u(e,6),r="".concat(e.getDate()),o=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric"}).format(n);if(e.getMonth()===n.getMonth())return"".concat(r," â ").concat(o);let i=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short"}).format(e);return"".concat(i," â ").concat(o)}function I(t){return new Intl.DateTimeFormat("en-GB",{month:"long",year:"numeric"}).format(t)}function O(t){return new Intl.DateTimeFormat("en-GB",{weekday:"long",day:"numeric",month:"long",year:"numeric"}).format(t)}let E={viewing:"Viewing",callout:"Callout",reminder:"Reminder",personal:"Personal"},B=[{icon:"tw-bg-[#e2f2fb] tw-text-[#1a6fa8]",block:"tw-bg-[#e2f2fb] tw-text-[#111318] tw-border-transparent"},{icon:"tw-bg-[#dfe2fb] tw-text-[#3d3a8c]",block:"tw-bg-[#e4dff8] tw-text-[#111318] tw-border-transparent"},{icon:"tw-bg-[#dcf4e6] tw-text-[#1d7a4a]",block:"tw-bg-[#dcf4e6] tw-text-[#111318] tw-border-transparent"},{icon:"tw-bg-[#fde4dc] tw-text-[#c2410c]",block:"tw-bg-[#fde4dc] tw-text-[#111318] tw-border-transparent"},{icon:"tw-bg-[#e2f2fb] tw-text-[#1a6fa8]",block:"tw-bg-[#f8efc8] tw-text-[#111318] tw-border-transparent"}];function R(t){let e=0;for(let n=0;n<t.length;n+=1)e=(e+t.charCodeAt(n)*(n+1))%B.length;return e}let V={viewing:{chip:"tw-bg-[#f3f4f6] tw-text-[#5b5f68]",icon:B[0].icon,block:B[0].block},callout:{chip:"tw-bg-[#f3f4f6] tw-text-[#5b5f68]",icon:"tw-bg-[#fcefd4] tw-text-[#b45309]",block:"tw-bg-[#fcefd4] tw-text-[#111318] tw-border-transparent"},reminder:{chip:"tw-bg-[#f3f4f6] tw-text-[#5b5f68]",icon:"tw-border tw-border-solid tw-border-[#e6e7ea] tw-bg-white tw-text-[#5b5f68]",block:"tw-bg-[#f6f7f9] tw-text-[#111318] tw-border-[#e6e7ea]"},personal:{chip:"tw-bg-[#f3f4f6] tw-text-[#5b5f68]",icon:"tw-bg-[#fde4dc] tw-text-[#c2410c]",block:"tw-bg-[#dceefb] tw-text-[#111318] tw-border-transparent"}};function P(t){return"viewing"===t.kind?B[R(t.id)].icon:V[t.kind].icon}function H(t){return t.pendingConfirm?"tw-border-[#b9bcc3] tw-bg-white tw-text-[#111318]":"viewing"===t.kind?B[R(t.id)].block:V[t.kind].block}function Y(t){return"".concat(t.getFullYear(),"-").concat(l(t.getMonth()+1),"-").concat(l(t.getDate()))}},73759:function(t,e,n){function r(t){let e=Number(t);return Number.isFinite(e)&&e>0?e:60}function o(t){return!["cancelled","canceled","completed","closed"].includes(String(t||"scheduled").toLowerCase())}function i(t,e){return new Date(t.getTime()+6e4*e)}function l(t,e,n,r){return t.getTime()<r.getTime()&&n.getTime()<e.getTime()}function a(t,e,n){if(Number.isNaN(t.getTime()))return null;let a=i(t,e);for(let u of n){if(!o(null==u?void 0:u.activityStatus))continue;let d=new Date(null==u?void 0:u.activityDate);if(Number.isNaN(d.getTime()))continue;let s=i(d,r(null==u?void 0:u.eventSlot));if(l(t,a,d,s))return{existingStart:d,existingEnd:s,label:function(t){let e=null==t?void 0:t.lead;if(e&&"object"==typeof e){let t=e.customer,n=(null==t?void 0:t.fullName)||[null==t?void 0:t.firstName,null==t?void 0:t.lastName].filter(
1Boolean).join(" ")||"";if(n)return n}return"another lead"}(u),durationMinutes:e,nextAvailable:function(t,e,n){if(Number.isNaN(t.getTime())||e<=0)return null;let a=n.filter(t=>o(null==t?void 0:t.activityStatus)).map(t=>{let e=new Date(null==t?void 0:t.activityDate);return Number.isNaN(e.getTime())?null:{start:e,end:i(e,r(null==t?void 0:t.eventSlot))}}).filter(t=>null!=t).sort((t,e)=>t.start.getTime()-e.start.getTime()),u=new Date(t);u.setDate(u.getDate()+21);let d=new Date(t);for(;d.getTime()<=u.getTime();){if(function(t,e,n){let r=i(t,e);return!n.some(e=>{let{start:n,end:o}=e;return l(t,r,n,o)})}(d,e,a))return d;d=new Date(d.getTime()+9e5)}return null}(t,e,n)}}return null}function u(t){let e=s(t.existingStart,t.existingEnd);return"A viewing for ".concat(t.label," is already scheduled at ").concat(e,".")}n.d(e,{Du:function(){return i},JC:function(){return d},PG:function(){return c},T6:function(){return r},aS:function(){return a},nW:function(){return u}});let d="No available slot found in the next few weeks. Try another day or duration.";function s(t,e){let n=t=>t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!0});return"".concat(n(t)," â ").concat(n(e))}function c(t,e){let n=i(t,e),r=t.toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric",year:"numeric"});return"".concat(r," \xb7 ").concat(s(t,n))}},22533:function(t,e,n){n.d(e,{A8:function(){return a},F9:function(){return c},MY:function(){return C},PR:function(){return D},QG:function(){return i},VJ:function(){return l},XM:function(){return f},YJ:function(){return w},Zo:function(){return x},_3:function(){return b},_C:function(){return v},a3:function(){return p},a9:function(){return u},bB:function(){return r},bR:function(){return h},cq:function(){return M},eN:function(){return j},e_:function(){return S},gH:function(){return s},hN:function(){return m},j8:function(){return L},ke:function(){return d},p1:function(){return N},wL:function(){return k},wf:function(){return o}});let r="tw-flex tw-h-9 tw-w-full tw-items-center tw-justify-between tw-gap-1 tw-rounded tw-border tw-border-solid tw-bg-white tw-pl-2 tw-pr-2.5 tw-text-sm tw-cursor-pointer",o="tw-border-[#EAECF0]",i="tw-border-[#181A1B]",l="tw-text-[13px] tw-text-[#262626]",a="tw-text-[#6B7280]",u="!tw-w-[var(--radix-popover-trigger-width)] tw-max-w-[calc(100vw-1.5rem)] tw-p-1",d="tw-flex tw-w-full tw-items-center tw-justify-between tw-rounded-lg tw-bg-white tw-px-2.5 tw-py-2 tw-transition-colors hover:tw-bg-[#F5F5F5]",s="tw-flex tw-w-full tw-items-center tw-justify-between tw-rounded-lg tw-bg-white tw-py-2 tw-pl-[34px] tw-pr-2.5 tw-transition-colors hover:tw-bg-[#F5F5F5]",c="tw-text-sm tw-font-normal tw-text-[#1F1F1F]",w="tw-text-sm tw-font-medium tw-text-[#1F1F1F]",f="tw-min-w-[24px] tw-rounded-xl tw-bg-[#f0f0f0] tw-px-2 tw-py-0.5 tw-text-center tw-text-xs tw-font-medium tw-text-[#8c8c8c]",m="tw-inline-flex tw-min-w-0 tw-max-w-[140px] tw-items-center tw-gap-1 tw-rounded tw-bg-[#F5F5F5] tw-px-1.5 tw-py-0.5 tw-text-xs",v="tw-shrink-0 tw-cursor-pointer tw-text-[#667085] hover:tw-text-[#1F1F1F]",h="tw-inline-flex tw-shrink-0 tw-cursor-default tw-items-center tw-rounded tw-bg-[#F5F5F5] tw-px-1.5 tw-py-0.5 tw-text-xs tw-text-[#667085]",p="tw-flex tw-flex-wrap tw-gap-2 tw-max-w-[min(552px,calc(100vw-3rem))] tw-px-3 tw-pt-3 tw-pb-1",g="tw-inline-flex tw-items-center tw-px-3 tw-py-1 tw-rounded-full tw-text-[13px] tw-leading-5 tw-whitespace-nowrap tw-cursor-pointer tw-transition-colors",x="".concat(g," tw-border tw-border-solid tw-border-[#eaecf0] tw-text-[#475467] tw-font-medium hover:tw-bg-[#f5f5f5] hover:tw-text-[#1f1f1f] hover:tw-border-[#d0d5dd]"),b="".concat(g," tw-border tw-border-solid tw-border-[#181a1b] tw-bg-[#181a1b] tw-font-semibold tw-text-white"),y="tw-flex tw-h-9 tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-shadow-none tw-outline-none focus-visible:tw-outline-none",C="".concat(y," tw-border tw-border-solid tw-border-[#EAECF0] tw-bg-white tw-text-[#1F1F1F] hover:tw-bg-[#F5F5F5]"),j="".concat(y," tw-border-0 tw-bg-[#1F1F1F] tw-text-white hover:tw-bg-black disabled:tw-cursor-not-allowed disabled:tw-opacity-40"),k="tw-px-4 tw-py-3",S="tw-flex tw-h-9 tw-w-full tw-items-center tw-gap-2 tw-rounded tw-border tw-border-solid tw-border-[#
1EAECF0] tw-bg-white tw-px-2",D="tw-h-full tw-min-w-0 tw-flex-1 tw-border-0 tw-bg-transparent tw-p-0 tw-text-sm tw-outline-none placeholder:tw-text-[#6B7280]",N="tw-min-h-0 tw-flex-1 tw-max-h-[280px] tw-overflow-y-auto tw-px-4 tw-pb-4",L="tw-box-border tw-m-0 tw-w-full tw-border-t tw-border-solid tw-border-[#EBEBEB] tw-p-4",M="preferences-dropdown-width !tw-w-[360px] tw-min-w-[360px] tw-box-border tw-flex tw-flex-col tw-max-h-[var(--radix-popover-content-available-height)] tw-max-w-[calc(100vw-1.5rem)] tw-overflow-hidden tw-rounded-lg tw-p-0"},18133:function(t,e,n){n.r(e),n.d(e,{Toast:function(){return u},default:function(){return a}});var r=n(57437),o=n(7261);function i(t){let{title:e,description:n}=t;return(0,r.jsxs)("div",{className:"toast-body prevent-close",children:[(0,r.jsx)("h3",{children:e}),(0,r.jsx)("p",{children:n})]})}n(2265);let l={success:"/icons/success-toast.svg",error:"/icons/error-toast.svg",info:"/icons/info-toast.svg",warning:"/icons/warning-toast.svg"};function a(t,e,n,a){(0,o.Am)((0,r.jsx)(i,{title:e,description:n}),{type:t,icon:(0,r.jsx)("img",{src:l[t],alt:t,width:20,height:20}),autoClose:(null==a?void 0:a.autoClose)||5e3,position:"top-right",...a})}let u={success(t,e,n){a("success",t,e,n)},error(t,e,n){a("error",t,e,n)},info(t,e,n){a("info",t,e,n)},warning(t,e,n){a("warning",t,e,n)}}},44921:function(t,e,n){n.d(e,{f:function(){return f}});var r=n(57437);n(2265);var o=n(82625),i=n(56562),l=n(41119),a=n(89308),u=n(24309),d=n(5375),s=n(22835);let c="tw-inline-flex tw-h-7 tw-w-7 tw-items-center tw-justify-center tw-rounded-md tw-border-0 tw-bg-transparent tw-p-0 tw-text-[#475467] tw-cursor-pointer tw-transition-colors hover:tw-bg-[#F5F5F5] hover:tw-text-[#1F1F1F]";function w(t){let{displayMonth:e}=t,{goToMonth:n,displayMonths:s}=(0,u.HJ)(),w=s.findIndex(t=>t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()),f=w===s.length-1,m=s[0];return(0,r.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-px-1",children:[(0,r.jsx)("div",{className:"tw-flex tw-items-center tw-gap-1",children:0===w&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",className:c,"aria-label":"Previous year",onClick:()=>n((0,d.Z)(m).subtract(1,"years").toDate()),children:(0,r.jsx)(o.Z,{className:"tw-h-4 tw-w-4"})}),(0,r.jsx)("button",{type:"button",className:c,"aria-label":"Previous month",onClick:()=>n((0,d.Z)(m).subtract(1,"months").toDate()),children:(0,r.jsx)(i.Z,{className:"tw-h-4 tw-w-4"})})]})}),(0,r.jsx)("span",{className:"tw-text-sm tw-font-semibold tw-text-[#1F1F1F]",children:(0,d.Z)(e).format("MMMM YYYY")}),(0,r.jsx)("div",{className:"tw-flex tw-items-center tw-gap-1",children:f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",className:c,"aria-label":"Next month",onClick:()=>n((0,d.Z)(m).add(1,"months").toDate()),children:(0,r.jsx)(l.Z,{className:"tw-h-4 tw-w-4"})}),(0,r.jsx)("button",{type:"button",className:c,"aria-label":"Next year",onClick:()=>n((0,d.Z)(m).add(1,"years").toDate()),children:(0,r.jsx)(a.Z,{className:"tw-h-4 tw-w-4"})})]})})]})}function f(t){let{className:e,classNames:n,showOutsideDays:o=!0,...i}=t;return(0,r.jsx)(u._W,{showOutsideDays:o,className:(0,s.cn)("tw-p-3",e),classNames:{months:"tw-flex tw-flex-col sm:tw-flex-row tw-justify-center tw-gap-4",month:"tw-flex tw-flex-col tw-gap-3",caption:"tw-flex tw-items-center tw-pt-1",caption_label:"tw-text-sm tw-font-semibold tw-text-[#1F1F1F]",table:"tw-w-full tw-border-collapse",head_row:"tw-flex",head_cell:"tw-flex-1 tw-rounded-md tw-text-[0.78rem] tw-font-normal tw-text-[#98A2B3]",row:"tw-mt-1 tw-flex tw-w-full",cell:"tw-flex-1 tw-relative tw-p-0 tw-text-center tw-text-sm focus-within:tw-relative focus-within:tw-z-20 [&:has([aria-selected])]:tw-bg-[#F5F5F5] [&:has([aria-selected].day-range-end)]:tw-rounded-r-md [&:has([aria-selected].day-range-start)]:tw-rounded-l-md first:[&:has([aria-selected])]:tw-rounded-l-md last:[&:has([aria-selected])]:tw-rounded-r-md",day:"tw-mx-auto tw-inline-flex tw-h-9 tw-w-9 tw-appearance-none tw-items-center tw-justify-center tw-rounded-md tw-border-0 tw-bg-transparent tw-p-0 tw-font-normal tw-text-[#1F1F1F] tw-shadow-none tw-outline-none hover:tw-bg-[#F5F5F5] focus-visible:tw-ring-2 focus-visible:tw-ring-[#181A1B] aria-selected:tw-opacity-100",day_range_start:"day-range-start !tw-bg-[#181A1B] !tw-text-white hover:!tw-bg-[#181A1B] focus:!tw-bg-[#181A1B]",day_range_end:"day-range-end !tw-bg-[#181A1B] !tw-text-white hover:!tw-bg-[#181A1B] focus:!tw-bg-[#181A1B]",day_selected:"!tw-bg-[#181A1B] !tw-text-white hover:!tw-bg-[#181A1B] focus:!tw-bg-[#181A1B]",day_today:"tw-font-semibold",day_outside:"day-outside tw-text-[#D0D5DD] aria-selected:tw-text-[#D0D5DD]",day_disabled:"tw-text-[#D0D5DD] tw-opacity-50",day_range_middle:"aria-selected:!tw-bg-[#F5F5F5] aria-selected:!tw-text-[#1F1F1F] aria-selected:hover:!tw-bg-[#F5F5F5]",day_hidden:"tw-invisible",...n},components:{Caption:w},...i})}
1f.displayName="Calendar"},14881:function(t,e,n){n.d(e,{DatePicker:function(){return m}});var r=n(57437),o=n(2265),i=n(5375),l=n(54891),a=n(17166),u=n(67189),d=n(44921),s=n(74411),c=n(22835),w=n(22533);let f=(t,e)=>(0,c.cn)("tw-group tw-flex tw-items-center tw-gap-2 tw-rounded-md tw-border tw-border-solid tw-border-[#EAECF0] tw-bg-white tw-pl-2 tw-pr-2.5 tw-text-[#1F1F1F] tw-cursor-pointer tw-transition-colors hover:tw-bg-[#F9FAFB] focus-within:tw-border-[#181A1B]","small"===t?"tw-h-8 tw-text-xs":"large"===t?"tw-h-11 tw-text-base":"tw-h-9 tw-text-sm",e&&"tw-bg-[#f5f5f5] tw-opacity-60 tw-cursor-not-allowed"),m=Object.assign(function(t){let{value:e,defaultValue:n,onChange:m,format:v,placeholder:h="Select date",open:p,onOpenChange:g,disabledDate:x,disabled:b=!1,allowClear:y=!0,size:C="middle",autoFocus:j,className:k,popupClassName:S,appearance:D="default",panelRender:N,style:L}=t,M=v||"YYYY-MM-DD",F=v||"MMM DD, YYYY",[_,T]=o.useState(!!j),[Z,A]=o.useState(n),I=!b&&(void 0!==p?p:_),O=void 0!==e?e:Z,E="filter"===D,B=t=>{b||(void 0===p&&T(t),null==g||g(t))},R=t=>{t.stopPropagation(),void 0===e&&A(null),null==m||m(null,"")},V=(0,r.jsx)(d.f,{mode:"single",selected:O?O.toDate():void 0,defaultMonth:O?O.toDate():void 0,onSelect:t=>{let n=t?(0,i.Z)(t):null;void 0===e&&A(n),null==m||m(n,n?n.format(M):""),B(!1)},disabled:x?t=>!!x((0,i.Z)(t)):void 0,className:(0,c.cn)("tw-w-full tw-min-w-[17.5rem] tw-max-w-[19.5rem] tw-p-2 sm:tw-p-3",E&&"tw-mx-auto"),classNames:E?{month:"tw-flex tw-w-full tw-flex-col tw-gap-2",table:"tw-w-full tw-max-w-none",row:"tw-mt-1 tw-flex tw-w-full tw-max-w-none tw-justify-between"}:void 0});return(0,r.jsxs)(s.J2,{open:I,onOpenChange:B,children:[(0,r.jsx)(s.xo,{asChild:!0,children:E?(0,r.jsxs)("div",{className:(0,c.cn)("tw-group",w.bB,I?w.QG:w.wf,b&&"tw-cursor-not-allowed tw-opacity-60",k),style:L,"aria-disabled":b||void 0,children:[(0,r.jsx)("span",{className:(0,c.cn)("tw-flex tw-min-w-0 tw-flex-1 tw-items-center tw-overflow-hidden tw-whitespace-nowrap tw-text-left tw-font-normal",O?w.VJ:w.A8),children:O?O.format(F):h}),y&&O?(0,r.jsx)("span",{className:"tw-hidden group-hover:tw-flex tw-shrink-0 tw-cursor-pointer tw-text-[#667085] hover:tw-text-[#1F1F1F]",onClick:R,onPointerDown:t=>t.stopPropagation(),children:(0,r.jsx)(l.Z,{size:14})}):null,(0,r.jsx)(a.Z,{size:16,className:(0,c.cn)("tw-shrink-0 tw-text-[#667085] tw-transition-transform",I&&"tw-rotate-180")})]}):(0,r.jsxs)("div",{className:(0,c.cn)(f(C,b),k),style:L,"aria-disabled":b||void 0,children:[(0,r.jsx)(u.Z,{size:15,className:"tw-shrink-0 tw-text-[#667085]"}),(0,r.jsx)("span",{className:(0,c.cn)("tw-flex-1 tw-whitespace-nowrap",!O&&"tw-text-[#6B7280]"),children:O?O.format(F):h}),y&&O&&(0,r.jsx)("span",{className:"tw-hidden group-hover:tw-flex tw-shrink-0 tw-cursor-pointer tw-text-[#667085] hover:tw-text-[#1F1F1F]",onClick:R,onPointerDown:t=>t.stopPropagation(),children:(0,r.jsx)(l.Z,{size:14})})]})}),(0,r.jsx)(s.yk,{align:"start",className:(0,c.cn)("tw-max-w-[calc(100vw-1.5rem)] tw-overflow-x-auto",S),children:N?N(V):V})]})},{RangePicker:void 0});m.RangePicker=function(t){var e;let{value:n,onChange:u,format:f,placeholder:m=["Start date","End date"],open:v,onOpenChange:h,disabledDate:p,panelRender:g,allowClear:x=!0,size:b="middle",autoFocus:y,separator:C="~",className:j,style:k,width:S}=t,D=f||"YYYY-MM-DD",N=f||"MMM DD, YYYY",L=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:640,[e,n]=o.useState(!1);return o.useEffect(()=>{let e=()=>n(window.innerWidth<t);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t]),e}(),[M,F]=o.useState(!!y),_=void 0!==v?v:M,T=t=>{void 0===v&&F(t),null==h||h(t)},Z=o.useRef(null),[A,I]=o.useState("start");o.useEffect(()=>{if(!_)return;let t=()=>{if(!Z.current)return;let t=Z.current.getBoundingClientRect(),e=L?320:560;I(t.left+e>window.innerWidth-12?"end":"start")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[_,L]);let[O,E]=o.useState((null==n?void 0:n[0])?{from:n[0].toDate(),to:null===(e=n[1])||void 0===e?void 0:e.toDate()}:void 0);o.useEffect(()=>{var t;E((null==n?void 0:n[0])?{from:n[0].toDate(),to:null===(t=n[1])||void 0===t?void 0:t.toDate()}:void 0)},[n]);let B=(0,r.jsx)(d.f,{mode:"range",numberOfMonths:L?1:2,defaultMonth:(null==n?void 0:n[0])?n[0].toDate():void 0,selected:O,onSelect:t=>{if(E(t),(null==t?void 0:t.from)&&(null==t?void 0:t.to)){let e=(0,i.Z)(t.from),n=(0,i.Z)(t.to);null==u||u([e,n],[e.format(D),n.format(D)]),T(!1)}},disabled:p?t=>!!p((0,i.Z)(t)):void 0}),R=!!((null==n?void 0:n[0])&&(null==n?void 0:n[1])),V=!(null==m?void 0:m[1]),P=R?"".concat(n[0].format(N)," ~ ").concat(n[1].format(N)):null;return(0,r.jsxs)(s.J2,{open:_,onOpenChange:T,children:[(0,r.jsx)(s.xo,{asChild:!0,children:(0,r.jsxs)("div",{ref:Z,className:(0,
1c.cn)("tw-group",w.bB,_?w.QG:w.wf,j),style:{width:S,...k},children:[(0,r.jsx)("span",{className:(0,c.cn)("tw-flex tw-min-w-0 tw-flex-1 tw-items-center tw-overflow-hidden tw-whitespace-nowrap tw-text-left tw-font-normal",P?w.VJ:w.A8),children:P||(V?m[0]:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:(0,c.cn)("tw-whitespace-nowrap",!(null==n?void 0:n[0])&&w.A8),children:(null==n?void 0:n[0])?n[0].format(N):m[0]}),(0,r.jsx)("span",{className:"tw-shrink-0 tw-text-[#98A2B3]",children:C}),(0,r.jsx)("span",{className:(0,c.cn)("tw-whitespace-nowrap",!(null==n?void 0:n[1])&&w.A8),children:(null==n?void 0:n[1])?n[1].format(N):m[1]})]}))}),x&&R?(0,r.jsx)("span",{className:"tw-hidden group-hover:tw-flex tw-shrink-0 tw-cursor-pointer tw-text-[#667085] hover:tw-text-[#1F1F1F]",onClick:t=>{t.stopPropagation(),E(void 0),null==u||u(null,["",""])},onPointerDown:t=>t.stopPropagation(),children:(0,r.jsx)(l.Z,{size:14})}):null,(0,r.jsx)(a.Z,{size:16,className:(0,c.cn)("tw-shrink-0 tw-text-[#667085] tw-transition-transform",_&&"tw-rotate-180")})]})}),(0,r.jsx)(s.yk,{align:A,className:"tw-max-w-[calc(100vw-1.5rem)] tw-overflow-x-auto",children:g?g(B):B})]})}},2351:function(t,e,n){n.d(e,{$F:function(){return u},AW:function(){return d},Xi:function(){return s},h_:function(){return a}});var r=n(57437),o=n(2265),i=n(73185),l=n(22835);let a=i.fC,u=i.xz;i.ZA,i.Uv;let d=o.forwardRef((t,e)=>{let{className:n,sideOffset:o=4,...a}=t;return(0,r.jsx)(i.Uv,{children:(0,r.jsx)(i.VY,{ref:e,sideOffset:o,className:(0,l.cn)("prevent-close tw-z-[1060] tw-min-w-[10rem] tw-overflow-hidden tw-rounded-md tw-border tw-border-solid tw-border-[#EAECF0] tw-bg-white tw-p-1 tw-text-bs-body t
1w-shadow-md data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-fade-out-0",n),...a})})});d.displayName=i.VY.displayName;let s=o.forwardRef((t,e)=>{let{className:n,...o}=t;return(0,r.jsx)(i.ck,{ref:e,className:(0,l.cn)("tw-relative tw-flex tw-cursor-pointer tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none hover:tw-bg-bs-light focus:tw-bg-bs-light data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",n),...o})});s.displayName=i.ck.displayName,o.forwardRef((t,e)=>{let{className:n,...o}=t;return(0,r.jsx)(i.Z0,{ref:e,className:(0,l.cn)("-tw-mx-1 tw-my-1 tw-h-px tw-bg-bs-light",n),...o})}).displayName=i.Z0.displayName,o.forwardRef((t,e)=>{let{className:n,...o}=t;return(0,r.jsx)(i.__,{ref:e,className:(0,l.cn)("tw-px-2 tw-py-1.5 tw-text-sm tw-font-semibold",n),...o})}).displayName=i.__.displayName},74411:function(t,e,n){n.d(e,{J2:function(){return a},xo:function(){return u},yk:function(){return d}});var r=n(57437),o=n(2265),i=n(64302),l=n(22835);let a=i.fC,u=i.xz;i.ee;let d=o.forwardRef((t,e)=>{let{className:n,align:o="start",sideOffset:a=6,collisionPadding:u=12,...d}=t;return(0,r.jsx)(i.h_,{children:(0,r.jsx)(i.VY,{ref:e,align:o,sideOffset:a,collisionPadding:u,className:(0,l.cn)("prevent-close tw-z-[1100] tw-w-auto tw-rounded-lg tw-border tw-border-solid tw-border-[#EAECF0] tw-bg-white tw-shadow-lg tw-outline-none",n),...d})})});d.displayName=i.VY.displayName},47778:function(t,e,n){n.d(e,{O:function(){return i}});var r=n(57437);n(2265);var o=n(22835);function i(t){let{className:e,...n}=t;return(0,r.jsx)("div",{className:(0,o.cn)("tw-animate-pulse tw-rounded-md tw-bg-gray-200/70",e),...n})}},34697:function(t,e,n){n.d(e,{BT:function(){return x},DP:function(){return c},G_:function(){return w},Kv:function(){return D},OC:function(){return s},Rj:function(){return N},Rv:function(){return b},TS:function(){return g},YD:function(){return f},d9:function(){return p},sb:function(){return u},vL:function(){return L},zw:function(){return F}});var r=n(71632),o=n(21340),i=n(7234),l=n(80147),a=n(83302);let u="SmartView â Pending",d=new Set([u.toLowerCase(),"smartview - pending"]),s=t=>d.has(String(null!=t?t:"").replace(/\s+/g," ").trim().toLowerCase()),c="smartview-confirmation-counts",w="smartview-confirmation-leads",f=t=>{let e=new Set,n=[];for(let r of null!=t?t:[]){if(null==r||""===r)continue;let t=String(r);e.has(t)||(e.add(t),n.push(r))}return n},m=t=>t.map(String).sort().join(","),v=(t,e,n,r,i,l)=>{let a=new o.zk().select(["id","reference","cms_id","status","state","type","customer_id","agent_id","created_at"]).filter({and:[{field:"agent_id",op:"in",value:t},{field:"state",op:"=",value:"Open"},{field:"tags",op:"has",value:{and:[{field:"name",op:"=",value:e}]}}]}).sort({created_at:"desc"});return i&&(a.addInclude(o.zk.withRelation("customer").select(["id","name","email","phone","raw_phone"])).addInclude(o.zk.withRelation("tags").select(["id","name"])),l&&a.addInclude(o.zk.withRelation("agent").select(["id","name"]))),a.page=n,a.limit=r,a.toParams()},h=async(t,e,n,r,o,l)=>{var u,d;let s=v(t,e,n,r,o,l),{data:c}=await (0,a.kE)(i.bV.BASE,s,void 0,{skipGlobalErrorRedirect:!0});return{data:null!==(u=null==c?void 0:c.data)&&void 0!==u?u:[],meta:null!==(d=null==c?void 0:c.meta)&&void 0!==d?d:{}}},p=function(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=f(t);return(0,r.a)({queryKey:[i.bV.BASE,c,m(n)],enabled:e&&n.length>0,queryFn:async()=>{var t;return{pending:null!==(t=(await h(n,u,1,1,!1,!1)).meta.total)&&void 0!==t?t:0}}})},g=t=>{let{agentIds:e,kind:n,page:o,enabled:l,includeAgent:a=!1,limit:d=20}=t,s=f(e),c=Math.max(1,d);return(0,r.a)({queryKey:[i.bV.BASE,w,m(s),n,o,a,c],enabled:l&&s.length>0,queryFn:()=>h(s,u,o,c,!0,a),placeholderData:t=>t})},x=async t=>{let{leadId:e,agentId:n}=t,{data:r}=await (0,a.Mr)("".concat(i.bV.BASE,"/").concat(e,"/reassign"),{agent_id:n});return null==r?void 0:r.data},b=async t=>{let{assetId:e,activityId:n,agentId:r}=t,{data:o}=await (0,l.Mr)("".concat(i.rl.UPDATE_ACTIVITY,"/").concat(n),{asset:e,agent:r,activityType:"Viewing"});return null==o?void 0:o.data},y=t=>{let e=null==t?void 0:t.lead;return e&&"object"==typeof e?String(e._id||e.id||""):null==e?"":String(e)},C=t=>"cancelled"===t||"canceled"===t,j=async function(t,e){var n;let r=arguments.length>
12&&void 0!==arguments[2]?arguments[2]:1,o={filter:JSON.stringify({query:{lead:{$in:[t]},activityType:{$in:["Viewing","viewing"]},...e},select:["_id","lead","activityDate","activityStatus","isConfirmed"],sort:{activityDate:"desc"},limit:r})},{data:a}=await (0,l.kE)(i.rl.PROPERTIES_ACTIVITES,o);return null!==(n=null==a?void 0:a.data)&&void 0!==n?n:[]},k={activityStatus:{$in:["Scheduled","scheduled"]},isConfirmed:{$ne:!0}},S={isConfirmed:!0},D=(t,e)=>{let n=Array.from(new Set(t.filter(Boolean))).sort();return(0,r.a)({queryKey:[i.rl.PROPERTIES_ACTIVITES,"smartview-confirm-viewings",n],enabled:e&&n.length>0,queryFn:async()=>(await Promise.all(n.flatMap(t=>[j(t,k,20),j(t,S)]))).flat()})},N=function(t){var e,n,r;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,i=new Map,l=new Set,a=[...null!=t?t:[]].sort((t,e)=>{var n,r;return String(null!==(n=null==e?void 0:e.activityDate)&&void 0!==n?n:"").localeCompare(String(null!==(r=null==t?void 0:t.activityDate)&&void 0!==r?r:""))});for(let t of a){let n=y(t);if(!n||i.has(n))continue;let r=String(null!==(e=null==t?void 0:t.activityStatus)&&void 0!==e?e:"").toLowerCase();if(C(r))continue;if((null==t?void 0:t.isConfirmed)===!0){l.add(n);continue}if("scheduled"!==r)continue;let o=(null==t?void 0:t._id)||(null==t?void 0:t.id),a=null==t?void 0:t.activityDate;o&&a&&i.set(n,{id:String(o),activityDate:String(a)})}let u=new Map,d=new Set;for(let t of a){let e=y(t),o=String(null!==(n=null==t?void 0:t.activityStatus)&&void 0!==n?n:"").toLowerCase(),i=(null==t?void 0:t._id)||(null==t?void 0:t.id),l=null==t?void 0:t.activityDate;if(!e||"scheduled"!==o||(null==t?void 0:t.isConfirmed)===!0||!i||!l||d.has(String(i)))continue;d.add(String(i));let a=null!==(r=u.get(e))&&void 0!==r?r:[];a.push({id:String(i),activityDate:String(l)}),u.set(e,a)}let s=o.getTime(),c=t=>new Date(t.activityDate).getTime();for(let t of u.values())t.sort((t,e)=>{let n=c(t)>=s;return n!==c(e)>=s?n?-1:1:n?c(t)-c(e):c(e)-c(t)});return{confirmable:i,confirmableAll:u,confirmed:l}},L=(t,e)=>{let n=t.cms_id?String(t.cms_id):"",r=n?e.confirmableAll.get(n):void 0;return(null==r?void 0:r.length)?r:M(t,e)?[]:[void 0]},M=(t,e)=>{let n=t.cms_id?String(t.cms_id):"";return!!n&&e.confirmed.has(n)&&!e.confirmable.has(n)},F=async t=>{var e,n;let{coreLeadId:r,cmsAgentId:l}=t,u=new o.zk().select(["id","external_id"]).filter({and:[{field:"external_id",op:"in",value:[l]}]});u.page=1,u.limit=1;let{data:d}=await (0,a.kE)(i.nb.USERS,u.toParams(),void 0,{skipGlobalErrorRedirect:!0}),s=Number(null==d?void 0:null===(n=d.data)||void 0===n?void 0:null===(e=n[0])||void 0===e?void 0:e.id);if(!Number.isFinite(s))throw Error("No Core user matches this agent");return x({leadId:r,agentId:s})}},80147:function(t,e,n){n.d(e,{Mr:function(){return m},Py:function(){return f},kE:function(){return w},pg:function(){return c}});var r=n(34307),o=n(55008),i=n(31271);let{ACTIVE_API_URL:l}=o.ACTIVE_URLS,{ACTIVE_ASSET_TOKEN:a}=o.ACTIVE_ASSETS_DETAILS,u=!1,d=[],s=r.Z.create({baseURL:l,timeout:6e4,headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a)}});s.interceptors.request.use(async t=>t,t=>(console.error("[Request Error]",t),Promise.reject(t))),s.interceptors.response.use(t=>t,async t=>{var e,n,r,o;let l=t.config;if((null===(e=t.response)||void 0===e?void 0:e.status)===401&&!l._retry){if(u)return new Promise((t,e)=>{d.push({resolve:t,reject:e})}).then(t=>(l.headers.Authorization="Bearer "+t,s(l))).catch(t=>Promise.reject(t));l._retry=!0,u=!0}if((0,i.g)(null===(n=t.response)||void 0===n?void 0:n.status)){let e=null===(r=t.response)||void 0===r?void 0:r.status;window.location.href="/error?error=".concat(e)}return t.response&&console.error("[Response Error] ".concat(t.response.status," - ").concat(null===(o=t.response.config)||void 0===o?void 0:o.url)),Promise.reject(t)});let c=(t,e,n)=>new Promise((r,o)=>{let i={...e};s.post(t,{...i},{...n}).then(t=>r(t)).catch(t=>o(t))}),w=(t,e)=>new Promise((n,r)=>{s.get(t,{params:{...e}}).then(t=>n(t)).catch(t=>r(t))}),f=(t,e)=>new Promise((n,r)=>{let o={params:(null==e?void 0:e.params)||{},responseType:"blob",headers:(null==e?void 0:e.headers)||{}};s.get(t,o).then(t=>n(t)).catch(t=>r(t))}),m=(t,e,n)=>new Promise((r,o)=>{let i={...e};s.patch(t,{...i},{...n}).then(t=>r(t)).catch(t=>o(t))});e.ZP=s},83302:function(t,e,n){n.d(e,{zj:function(){return D},G$:function(){return k},kE:function(){return j},Mr:function(){return N},pg:function(){return C},qF:function(){return S},ZP:function(){return L}});var r=n(34307),o=n(89256),i=n(55008),l=n(12994),a=n(73100),u=n(31271);let d=new Map,s=()=>Date.now(),c=t=>new Promise(e=>setTimeout(e,t));function w(t){let e=(t.method||"get").toUpperCase(),n=(t.url||"").split("?")[0];return"".concat(e," ").concat(n)}function f(t){let e=d.get(t);return e||(e={limit:4,nextAllowedAt:0},d.set(t,e)),e}function m(t,e){let n=f(t);n.nextAllowedAt=Math.max(n.nextAllowedAt,s()+e)}function v(t,e){var n,r;return t?"function"==typeof t.get?t.get(e):null!==(r=null!==(n=t[e])&&void 0!==n?n:t[e.toLowerCase()])&&void 0!==r?r:null:null}async function h(t){let e=function(t){let e=f(t),n=Math.max(s(),e.nextAllowedAt);return e.nextAllowedAt=n+1e3/Math.max(1,Math.round(.9*e.limit)),n-s()}(w(t));return e>0&&await c(e),t}async function p(t){let e=t.config;e._429Retries=(e._429Retries||0)+1;let n=w(e);m(n,Math.max(function(t){var e,n,r,o,i,l;let a=null!==(l=null===(n=t.response)||void 0===n?void 0:null===(e=n.headers)||void 0===e?void 0:e["retry-after"])&&void 0!==l?l:null===(i=t.response)||void 0===i?void 0:null===(o=i.headers)||void 0===o?void 0:null===(r=o.get)||void 0===r?void 0:r.call(o,"Retry-After");if(a){let t=Number(a);if(!Number.isNaN(t))return 1e3*t;let e=Date.parse(a);if(!Number.isNaN(e))return Math.max(0,e-s())}return 1e3}(t),1e3*e._429Retries)+1e3*Math.random());let r=Math.max(0,f(n).nextAllowedAt-s());r>0&&await c(r)}let{ACTIVE_CORE_URL:g}=i.ACTIVE_URLS,x=!1,b=[],y=r.Z.create({baseURL:g||"",timeout:6e4,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0});y.interceptors.request.use(async t=>(t.withCredentials=!0,h(t)),t=>(console.error("[Request Error]",t),Promise.reject(t))),y.interceptors.response.use(t=>((function(t,e){let n=w(t),r=v(e,"X-Ratelimit-Limit"),o=Number(r);null!=r&&!Number.isNaN(o)&&o>0&&(f(n).limit=o);let i=v(e,"X-Ratelimit-Remaining"),l=Number(i);!(null==i||Number.isNaN(l))&&l<=0&&m(n,1e3)})(t.config,t.headers),t),async t=>{var e,r,i,d,s,c;let w=t.config;if(function(t){var e;let n=t.config;return!!n&&(null===(e=t.response)||void 0===e?void 0:e.status)===429&&5>(n._429Retries||0)}(t))return await p(t),y(w);if((null===(e=t.response)||void 0===e?void 0:e.status)===401&&!w._retry){if(x)return new Promise((t,e)=>{b.push({resolve:t,reject:e})}).then(t=>(w.headers.Authorization="Bearer "+t,y(w))).catch(t=>Promise.reject(t));w._retry=!0,x=!0}if("401"==(0,a.toString)((0,a.get)(t,"response.status")))return l.Z.removeItem("nextauth.message"),l.Z.removeItem("leadHistory"),l.Z.removeItem("listingHistory"),l.Z.removeItem("contactsHistory"),l.Z.removeItem("propertyHistory"),l.Z.removeItem("agent"),l.Z.removeItem("activityHistory"),await (0,o.w7)({redirect:!0,callbackUrl:"/login"});if(!(null==w?void 0:w.skipGlobalErrorRedirect)&&(0,u.g)(null===(r=t.response)||void 0===r?void 0:r.status)){let e=null===(i=t.response)||void 0===i?void 0:i.status;(null==t?void 0:null===(s=t.response)||void 0===s?void 0:null===(d=s.data)||void 0===d?void 0:d.message)==="Unauthenticated."?((0,o.w7)({redirect:!0,callbackUrl:"/login"}),Promise.all([n.e(7261),n.e(8133)]).then(n.bind(n,18133)).then(t=>{let{Toast:e}=t;e.error("Error","Your session has been expired please log in again.",{autoClose:500})}),l.Z.removeItem("nextauth.message"),l.Z.removeItem("leadHistory"),l.Z.removeItem("listingHistory"),l.Z.removeItem("contactsHistory"),l.Z.removeItem("propertyHistory"),l.Z.removeItem("activityHistory")):window.location.href="/error?error=".concat(e)}return t.response&&console.error("[Response Error] ".concat(t.response.status," - ").concat(null===(c=t.response.config)||void 0===c?void 0:c.url)),Promise.reject(t)});let C=(t,e,n)=>new Promise((n,r)=>{let o={...e};y.post(t,o).then(t=>n(t)).catch(t=>r(t))}),j=(t,e,n,r)=>new Promise((o,i)=>{y.get(t,{...r,params:{...e},...n?{signal:n}:{}}).then(t=>o(t)).catch(t=>i(t))}),k=(t,e)=>new Promise((n,r)=>{let o={params:(null==e?void 0:e.params)||{},responseType:"blob",headers:(null==e?void 0:e.headers)||{},timeout:3e5};y.get(t,o).then(t=>n(t)).catch(t=>r(t))}),S=(t,e,n)=>new Promise((r,o)=>{let i={...e};y.put(t,{...i},{...n}).then(t=>r(t)).catch(t=>o(t))}),D=(t,e)=>new Promise((n,r)=>{y.delete(t,{...e}).then(t=>n(t)).catch(t=>r(t))}),N=(t,e,n)=>new Promise((r,o)=>{let i={...e};y.patch(t,{...i},{...n}).then(t=>r(t)).catch(t=>o(t))});var L=y},61085:function(t,e,n){n.d(e,{M:function(){return o}});var r=n(55008);n(49057);let o=t=>{t.target.src=r.user_placeholder}},15561:function(t,e,n){n.d(e,{De:function(){return o},F4:function(){return w},IJ:function(){return x},Lw:function(){return a},RD:function(){return m},Vh:function(){return l},Ys:function(){return i},b9:function(){return d},dA:function(){return g},hz:function(){return c},j7:function(){return u},kf:function(){return s},su:function(){return v},tW:function(){return h},xj:function(){return p},xq:function(){return f}});var r=n(5375);let o=()=>({startDate:(0,r.Z)().subtract(6,"day").startOf("day").toISOString(),endDate:(0,r.Z)().endOf("day").toISOString()}),i=t=>{let e,n;switch(t){case"today":default:e=(0,r.Z)().startOf("day"),n=(0,r.Z)().endOf("day");break;case"wtd":e=(0,r.Z)().startOf("week"),n=(0,r.Z)().endOf("day");break;case"mtd":e=(0,r.Z)().startOf("month"),n=(0,r.Z)().endOf("day");break;case"qtd":e=(0,r.Z)().startOf("quarter"),n=(0,r.Z)().endOf("day");break;case"ytd":e=(0,r.Z)().startOf("year"),n=(0,r.Z)().endOf("day");break;case"last_week":e=(0,r.Z)().subtract(1,"week").startOf("week"),n=(0,r.Z)().subtract(1,"week").endOf("week");break;case"last_month":e=(0,r.Z)().subtract(1,"month").startOf("month"),n=(0,r.Z)().subtract(1,"month").endOf("month");break;case"last_quarter":e=(0,r.Z)().subtract(1,"quarter").startOf("quarter"),n=(0,r.Z)().subtract(1,"quarter").endOf("quarter")}return{startDate:e.toISOString(),endDate:n.toISOString()}},l=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"created_at",{startDate:n,endDate:r}=i(t);return a({startDate:n,endDate:r},e)},a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"created_at";return{and:[{field:e,op:">=",value:t.startDate}
1,{field:e,op:"<=",value:t.endDate}]}},u=t=>{let e=(0,r.Z)(t).startOf("week"),n=e.isSame((0,r.Z)().startOf("week"),"day");return{startDate:e.startOf("day").toISOString(),endDate:(n?(0,r.Z)().endOf("day"):e.endOf("week")).toISOString()}},d=t=>{let e=(0,r.Z)(t).startOf("week").subtract(1,"week");return{startDate:e.startOf("day").toISOString(),endDate:e.endOf("week").toISOString()}},s=t=>{let e=(0,r.Z)(t).startOf("month"),n=e.isSame((0,r.Z)().startOf("month"),"month");return{startDate:e.startOf("day").toISOString(),endDate:(n?(0,r.Z)().endOf("day"):e.endOf("month")).toISOString()}},c=t=>{let e=(0,r.Z)(t).startOf("month").subtract(1,"month");return{startDate:e.startOf("day").toISOString(),endDate:e.endOf("month").toISOString()}},w=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"created_at",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"month",{startDate:r,endDate:o}=p(t,n);return{and:[{field:e,op:">=",value:r},{field:e,op:"<=",value:o}]}},f=[{value:"today",label:"Today"},{value:"wtd",label:"WTD"},{value:"mtd",label:"MTD"},{value:"qtd",label:"QTD"},{value:"ytd",label:"YTD"},{value:"last_week",label:"Last week"},{value:"last_month",label:"Last month"},{value:"last_quarter",label:"Last quarter"}],m=[{value:"today",label:"Today"},{value:"wtd",label:"WTD"},{value:"mtd",label:"MTD"},{value:"qtd",label:"QTD"},{value:"ytd",label:"YTD"},{value:"last_week",label:"Last week"}],v=[{value:"wtd",label:"WTD"},{value:"mtd",label:"MTD"},{value:"qtd",label:"QTD"},{value:"ytd",label:"YTD"}],h=[{value:"today",label:"Today"},{value:"mtd",label:"MTD"},{value:"ytd",label:"YTD"},{value:"last_week",label:"Last week"},{value:"last_month",label:"Last month"}],p=function(t){let e,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"month";if("week"===o)e=(0,r.Z)().subtract(1,"week").startOf("week"),n=(0,r.Z)().subtract(1,"week").endOf("week");else{let{startDate:o}=i(t);e=(0,r.Z)(o).subtract(1,"month").startOf("month"),n=(0,r.Z)(o).subtract(1,"month").endOf("month")}return{startDate:e.toISOString(),endDate:n.toISOString()}},g=(t,e)=>0===e?t>0?100:0:Number(((t-e)/e*100).toFixed(1)),x=t=>["today","wtd","mtd","last_week","last_month"].includes(t)?["created_at|daily"]:["created_at|monthly"]},5375:function(t,e,n){var r=n(71096),o=n.n(r),i=n(16206),l=n.n(i),a=n(77360),u=n.n(a),d=n(45721),s=n.n(d),c=n(13257),w=n.n(c),f=n(7517),m=n.n(f),v=n(58746),h=n.n(v),p=n(16211),g=n.n(p),x=n(96961),b=n.n(x),y=n(18300),C=n.n(y),j=n(46356),k=n.n(j),S=n(64043),D=n.n(S),N=n(22495),L=n.n(N);o().extend(l()),o().extend(u()),o().extend(s()),o().extend(w()),o().extend(m()),o().extend(h()),o().extend(g()),o().extend(b()),o().extend(C()),o().extend(k()),o().extend(D()),o().extend(L()),o().updateLocale("en",{weekStart:1}),e.Z=o()},31271:function(t,e,n){n.d(e,{g:function(){return o}});let r=["/login","/email-verification","/create-password","/reset-password","/forgot-password"];function o(t){return!function(t){let e=window.location.pathname;return r.some(t=>e===t||e.startsWith("".concat(t,"/")))}()&&["401","403","410","420","502"].includes(String(t))}},12994:function(t,e){class n{setItem(t,e){try{let n="object"==typeof e?JSON.stringify(e):e;localStorage.setItem(t,n)}catch(e){console.error('Error setting item in localStorage for key "'.concat(t,'":'),e)}}getItem(t){try{let e=localStorage.getItem(t);if(!e)return null;return this.isJSON(e)?JSON.parse(e):e}catch(e){return console.error('Error getting item from localStorage for key "'.concat(t,'":'),e),null}}removeItem(t){try{localStorage.removeItem(t)}catch(e){console.error('Error removing item from localStorage for key "'.concat(t,'":'),e)}}clear(){try{localStorage.clear()}catch(t){console.error("Error clearing localStorage:",t)}}isJSON(t){try{return JSON.parse(t),!0}catch(t){return!1}}}let r=new n;e.Z=r},46281:function(t,e,n){n.d(e,{F_:function(){return u},Vo:function(){return l},fC:function(){return d},useAuth:function(){return a}});var r=n(2265),o=n(66573),i=n(12994);let l=(0,r.createContext)({user:null,status:"loading",setUser:()=>{}}),a=()=>(0,r.useContext)(l),u=()=>{let{user:t,status:e}=a();return(0,r.useMemo)(()=>{var n,r,l;let a=(0,o.cO)(t);return{user:a,assetId:(0,o.GC)(t),assetSlug:null!==(n=i.Z.getItem("assetSlug"))&&void 0!==n?n:"",applicableDate:null!==(r=null==a?void 0:a.applicableDate)&&void 0!==r?r:"",accessDivisionIds:null!==(l=null==a?void 0:a.accessDivisionIds)&&void 0!==l?l:[],isLoading:"loading"===e,status:"authenticated"===e?"succeeded":e}},[t,e])},d=()=>u().user},66573:function(t,e,n){n.d(e,{Bj:function(){return a},GC:function(){return u},cO:function(){return s},lx:function(){return i},ts:function(){return l}});let r=null,o="",i=t=>{var e,n;if(r=t,!t){o="";return}let i=null==t?void 0:null===(n=t.branch)||void 0===n?void 0:null===(e=n.division)||void 0===e?void 0:e.external_id;i&&(o=String(i))},l=()=>r,a=()=>o;function u(t){var e,n;let r=null!=t?t:l(),i=null==r?void 0:r.asset;if("string"==typeof i&&i.trim())return i.trim();if(i&&"object"==typeof i&&i._id)return String(i._id);let a=null==r?void 0:null===(n=r.branch)||void 0===n?void 0:null===(e=n.division)||void 0===e?void 0:e.external_id;return a?String(a):o}let d=t=>Array.isArray(t)?t.map(t=>"string"==typeof t?t:null==t?void 0:t.name).filter(t=>"string"==typeof t&&t.length>0):t;function s(t){var e,n,r,i,l,a;if(!t)return null;let u=null==t?void 0:null===(n=t.branch)||void 0===n?void 0:null===(e=n.division)||void 0===e?void 0:e.id,s=null!==(l=null==t?void 0:null===(r=t.access)||void 0===r?void 0:r.find(t=>String(null==t?void 0:t.division_id)===String(u)))&&void 0!==l?l:null==t?void 0:null===(i=t.access)||void 0===i?void 0:i[0];return{...t,agentId:null==t?void 0:t.external_id,coreId:null==t?void 0:t.id,areas:d(null==t?void 0:t.locations),asset:o,reportedTo:null!==(a=null==s?void 0:s.manager_id)&&void 0!==a?a:null,accessDivisionIds:Array.isArray(null==t?void 0:t.access)?t.access.map(t=>null==t?void 0:t.division_id).filter(t=>null!=t):[]}}},89256:function(t,e,n){n.d(e,{Gg:function(){return u},kP:function(){return a},w7:function(){return s},zB:function(){return d}}),n(57437);var r=n(46281),o=n(66573),i=n(62321),l=n(44066);function a(){let{user:t}=(0,r.useAuth)(),e=(0,o.cO)(t);return{data:e?{user:e}:null,status:e?"authenticated":"unauthenticated",update:async()=>null}}async function u(){let t=(0,o.cO)((0,o.ts)());return t?{user:t}:null}async function d(t,e){return{ok:!1,error:"auth-disabled",status:401,url:null}}async function s(t){return await (0,i.kS)(),{url:l.Kg}}},22799:function(t,e,n){var r=n(8946);n.o(r,"get")&&n.d(e,{get:function(){return r.get}})},73100:function(t,e,n){var r=n(8946);n.o(r,"get")&&n.d(e,{get:function(){return r.get}}),n.o(r,"toString")&&n.d(e,{toString:function(){return r.toString}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.