1import{d as S}from"./debounce.CDyj8mlB.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"v3.265.0"};var t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="5ca0bf46-75fc-47db-9521-b7608b51e45d",n._sentryDebugIdIdentifier="sentry-dbid-5ca0bf46-75fc-47db-9521-b7608b51e45d")}catch{}})();const C=1,k=2,E=3,j=7,N=10;class l{constructor(){this.modelId=null,this.modelType=null,this.name=null,this.trackingType=null,this.section=null,this.version=null,this.dom=null,this.position=null,this.pageName=null,this.sessionId=null,this.domTagName=null,this.domGroup=null,this.domSelector=null,this.description=null}getId(){const t=this;return`${t.name}-${t.modelType}-${t.modelId}-${t.trackingType}`}static fromDom(t){var d,r,c,g;if(!window.track)return null;const e=new l;let i,s,a;return e.pageName=window.track.pageName,t&&(a=t.getAttribute("data-tk"),e.dom={_prevClass:t._prevClass??null},e.section=t.getAttribute("data-section"),e.version=t.getAttribute("data-version")||((r=(d=t.closest)==null?void 0:d.call(t,"[data-version]"))==null?void 0:r.getAttribute("data-version"))||null,e.position=t.getAttribute("data-position"),e.domTagName=t.tagName,e.domGroup=t.getAttribute("data-group"),e.domSelector=t.getAttribute("data-selector"),e.description=t.getAttribute("data-description"),e.saleType=t.getAttribute("data-saleType"),i=t.getAttribute("data-type"),s=t.getAttribute("data-id")),i||(i=(c=window.tracking)==null?void 0:c.type),s||(s=(g=window.tracking)==null?void 0:g.id),e.modelId=s,e.modelType=i,a&&(e.name=l.cleanName(a)),e}static cleanName(t){return t.replace(/ /g,"_")}}class L{constructor(){this.loading=!1,this.data=[],this.added={},this.pendingStorageKey="tracking.pending.v2",this.boundDoms=new WeakSet,this.pageName=null,this.syncedTimeOnPage=!1,this.sessionId=null,this.initialized=!1,this.debug=!1,this.sync=S(this.syncTracking.bind(this),2e3,{leading:!1,trailing:!0}),this.startTime=new Date,this.intersectionObserver=null,this.onDomClickListener=this.onDomClick.bind(this),this.latestImpress=null,this.latestClick=null}onDomInScreen(t){const e=l.fromDom(t);e&&(e.trackingType=C,this.log(`Dom in screen ${e.name}`),this.addResult(e))}onDomOutOfScreen(t){}onClickInDom(t){this.log("Dom Clicking");const e=l.fromDom(t);e&&(e.trackingType=k,this.latestClick=e,this.addResult(e))}onDomClick(t){const e=t.currentTarget;e&&(this.onClickInDom(e),this.syncTracking())}ensureIntersectionObserver(){return this.intersectionObserver||(this.intersectionObserver=new IntersectionObserver(t=>{this.observerCallback(t)},{threshold:1})),this.intersectionObserver}observerCallback(t,e,i){t.forEach((s,a)=>{this.log(s.isIntersecting),s.isIntersecting?(this.log("dom out in screen"),this.onDomInScreen(s.target)):this.onDomOutOfScreen(s.target)})}init(){var e,i;if(this.enableTimeOnPage=((e=window.tracking)==null?void 0:e.type)&&((i=window.tracking)==null?void 0:i.id),this.log("Init"),this.enableTimeOnPage&&this.log("Enabled time usage on page"),window.track)this.pageName=window.track.pageName,this.sessionId=window.track.sessionId;else return;if(this.ensureIntersectionObserver(),this.bindDom(),this.initialized)return;this.initialized=!0,this.loadPendingTracking();const t="onpagehide"in window?"pagehide":"beforeunload";window.addEventListener(t,s=>{this.onPageLeave()}),this.trackPageVisited()}trackTimeOnPage(){var i;const t=l.fromDom();t.section="time_on_page",t.time=new Date-this.startTime,t.trackingType=E,t.domTagName="html",t.name=l.cleanName("TIME_ON_PAGE");const e=(i=window==null?void 0:window.site)==null?void 0:i.cta;e===2?t.domGroup="scheduler-view":e===1&&(t.domGroup="v3"),this.data.push(t),this.persistPendingTracking()}trackPageVisited(){var i,s;this.log("track page visited");const t=l.fromDom();t.section="page_visit",t.trackingType=N,t.domTagName="html",t.name=l.cleanName("PAGE_VISITED"),t.saleType=(i=window.track)==null?void 0:i.saleType;const e=(s=window==null?void 0:window.site)==null?void 0:s.cta;e===2?t.domGroup="scheduler-view":e===1&&(t.domGroup="v3"),this.addResult(t)}onPageLeave(){this.log("on page leave"),this.enableTimeOnPage&&this.syncedTimeOnPage===!1&&(this.trackTimeOnPage(),this.syncedTimeOnPage=!0),this.syncTracking({useBeacon:!0})}log(t){this.debug&&console.log(`[Tracking] ${t}`)}addResult(t,e=!0){const i=t.trackingType!==k,s=t.getId();if(this.log(`Found new result = ${s}`),i&&s in this.added){this.log(`Already posted = ${s}`);return}this.data.push(t),i&&(this.added[s]=!0),this.persistPendingTracking(),e&&!this.loading&&this.sync(),this.log(this.added)}syncTracking({useBeacon:t=!1}={}){if(this.loading&&!t)return;const e=this.data.slice();if(this.log("Starting sync tracking total:"+this.data.length),this.data=[],this.persistPendingTracking(),e.length>0){if(t){this.restoreUnsentTracking(e),this.sendByBeacon(e);return}this.loading=!0,axios.post(`${window.urlApi}track/v2`,{sessionId:this.sessionId,data:e}).then(()=>{this.loading=!1}
1).catch(i=>{console.error(i),this.loading=!1,this.restoreUnsentTracking(e)})}}loadPendingTracking(){let t=[];try{t=JSON.parse(localStorage.getItem(this.pendingStorageKey)||"[]")}catch(e){console.error(e),t=[]}!Array.isArray(t)||t.length===0||(this.data=t.concat(this.data),this.persistPendingTracking(),this.sync())}persistPendingTracking(){try{this.data.length>0?localStorage.setItem(this.pendingStorageKey,JSON.stringify(this.data)):localStorage.removeItem(this.pendingStorageKey)}catch(t){console.error(t)}}restoreUnsentTracking(t){this.data=t.concat(this.data),this.persistPendingTracking()}sendByBeacon(t){const e=`${window.urlApi}track/v2`,i=JSON.stringify({sessionId:this.sessionId,data:t});try{if(navigator.sendBeacon){const s=new Blob([i],{type:"application/json"});if(navigator.sendBeacon(e,s))return!0}}catch(s){console.error(s)}try{if(window.fetch)return fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:i,keepalive:!0,credentials:"same-origin"}),!0}catch(s){console.error(s)}return!1}bindDom(){const t=this.ensureIntersectionObserver();document.querySelectorAll("[data-tk]").forEach(e=>{!e||this.boundDoms.has(e)||(this.boundDoms.add(e),t.observe(e),e.addEventListener("click",this.onDomClickListener))})}}class x{constructor(){this.ref_domain=null,this.ref_path=null,this.ref_search=null,this.ref_path=null}crumbleCookie(t){const e={};let i=0;const s=document.cookie.split(";");for(;i<s.length;i++){const a=s[i].substring(0,s[i].indexOf("=")).trim();e[a]=s[i].substring(s[i].indexOf("=")+1,s[i].length).trim()}return t?e[t]?e[t]:null:e}bakeCookie(t,e,i,s,a,d){let r=new Date;r.setTime(r.getTime()),i&&(i*=864e5),r=new Date(r.getTime()+i),document.cookie=t+"="+escape(e)+(i?";expires="+r.toGMTString():"")+(s?";path="+s:"")+(a?";domain="+a:"")+(d?";secure":"")}writeLogic(t){let e=this.getTrafficSource(t,".example.com");e=e.replace(/\|{2,}/g,"|"),e=e.replace(/^\|/,""),e=unescape(e),this.bakeCookie(t,e,182,"/","","")}getParam(t,e){try{const i=t.match("[?&]"+e+"=([^&]+)");return i?i[1]:""}catch{return""}}calculateTrafficSource(){let t="",e="",i="",s="",a="";const d=[["bing","q"],["google","q"],["yahoo","q"],["baidu","q"],["yandex","q"],["ask","q"]];let r=document.referrer;r=r.substr(r.indexOf("//")+2),this.ref_domain=r,this.ref_path="/",this.ref_search="";const c=document.location.search,g=this.getParam(c,"gclid");if(c.indexOf("utm_source")>-1)t=this.getParam(c,"utm_source"),e=this.getParam(c,"utm_medium"),i=this.getParam(c,"utm_campaign"),s=this.getParam(c,"utm_term"),a=this.getParam(c,"utm_content");else if(this.getParam(c,"gclid"))t="google",e="cpc",i="(not set)";else if(r){r.indexOf("/")>-1&&(this.ref_domain=r.substr(0,r.indexOf("/")),this.ref_path=r.substr(r.indexOf("/")),this.ref_path.indexOf("?")>-1&&(this.ref_search=this.ref_path.substr(this.ref_path.indexOf("?")+1),this.ref_path=this.ref_path.substr(0,this.ref_path.indexOf("?")))),e="referral",t=this.ref_domain;for(let o=0;o<d.length;o++)if(this.ref_domain.indexOf(d[o][0])>-1){e="organic",t=d[o][0],s=this.getParam(this.ref_search,d[o][1])||"(not provided)";break}}return{source:t,medium:e,campaign:i,term:s,gclid:g,content:a}}getTrafficSource(t,e){const i=this.calculateTrafficSource(),s=i.source.length===0?"direct":i.source,a=i.medium.length===0?"":i.medium;let d=i.campaign.length===0?"direct":i.campaign;const r=i.campaign.length===0?"":i.gclid;a==="referral"&&(d="");const c=new Date;return"source="+s+"&medium="+a+"&gclid="+r+"&campaign="+d+"&term="+i.term+"&content="+i.content+"&date="+c.toISOString().slice(0,10).replace(/-/g,"")}init(){typeof this.crumbleCookie().FirstSession>"u"?this.writeLogic("FirstSession"):this.writeLogic("ReturningSession")}}const R="Contact CTA Click";function G({contactChannel:n,isProject:t,modelId:e,pageName:i,saleType:s,sendGTMEvent:a}){a({event:R,data:{contact_channel:n,model_type:t?"project":"unit",model_id:e,sale_type:t?"sale":s,page_name:i||M(t),...$()}})}function M(n){return n?"project-detail-page":"unit-detail-page"}function $(){const n=new URLSearchParams(window.location.search),t=y(n,{utm_source:"utm_source",utm_medium:"utm_medium",utm_campaign:"utm_campaign",utm_term:"utm_term",utm_content:"utm_content",gclid:"gclid"});if(V(t))return T(t);const e=y(q("FirstSession"),{utm_source:"source",utm_medium:"medium",utm_campaign:"campaign",utm_term:"term",utm_content:"content",gclid:"gclid"});return T(B(e))}function B(n){return n.utm_campaign!=="direct"||n.gclid?n:{...n,utm_source:null,utm_medium:null}}function y(n,t){return{utm_source:m(n.get(t.utm_source)),utm_medium:m(n.get(t.utm_medium)),utm_campaign:m(n.get(t.utm_campaign)),utm_term:m(n.get(t.utm_term)),utm_c
1ontent:m(n.get(t.utm_content)),gclid:m(n.get(t.gclid))}}function V(n){return Object.values(n).some(t=>t)}function m(n){return String(n||"").trim()||null}function T(n){const t=n.utm_source||n.utm_medium;return n.gclid&&!n.utm_source&&!n.utm_medium?{...n,utm_source:"google",utm_medium:"cpc",utm_campaign:n.utm_campaign||"(not set)",utm_term:n.utm_term||"",utm_content:n.utm_content||"",gclid:n.gclid||""}:{...n,utm_source:n.utm_source||"direct",utm_medium:n.utm_medium||"organic",utm_campaign:n.utm_campaign||(t?"(not set)":"direct"),utm_term:n.utm_term||"",utm_content:n.utm_content||"",gclid:n.gclid||""}}function q(n){const t=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(`${n}=`));return new URLSearchParams(t?z(t):"")}function z(n){try{return decodeURIComponent(n.split("=").slice(1).join("="))}catch{return""}}function F(n,t){try{if(typeof navigator>"u"||typeof navigator.sendBeacon!="function")return!1;const e=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(n,e)===!0}catch{return!1}}window.trackContactCtaGTM=n=>G({...n,sendGTMEvent:({event:t,data:e})=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:t,...e})}});if(window.site&&!window.site.isRobot){let a=function(o){const u=n;n=[],axios.post(`${window.urlApi}track`,{pageName:i,sessionId:s,type:1,data:u}).catch(()=>{n=u.concat(n).slice(-500)})},d=function(o){const u={pageName:i,sessionId:s,type:2,data:[o]};F(`${window.urlApi}track`,u)||axios.post(`${window.urlApi}track`,u).catch(()=>{})},r=function(o){const u=o.target.getAttribute("data-type"),I=o.target.getAttribute("data-id"),A=o.target.getAttribute("data-section"),O=o.target.getAttribute("data-version"),P=o.target.getAttribute("data-position"),p=o.target.getAttribute("data-parent-selector");if(u){const _={type:u,id:I,section:A,version:O,position:P};n.push(_),g();const h=p?document.getElementById(p):o.target;if(h){const w=h.onclick;h.onclick=function(D){d(_),w&&w(D)}}}},n=[],i="error: window.track not loaded yet",s="error: window.track not loaded yet";window.track&&(i=window.track.pageName,s=window.track.sessionId);const c=document.querySelectorAll("img.track");for(let o=0;o<c.length;o++)c[o].addEventListener("load",r);const g=S(a,2e3,{leading:!1,trailing:!0});document.addEventListener("lazybeforeunveil",r),window.iTracking=new L,document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{window.iTracking.init()},2e3)}),window.gaTracking=new x,window.gaTracking.init()}const b=(n,t)=>!!(n&&n.state&&n.state[t]),J=async(n,t)=>{(await Promise.all(t.map(async({name:i,loader:s})=>{if(b(n,i))return null;const a=await s();return{name:i,module:a.default}}))).forEach(i=>{!i||b(n,i.name)||n.registerModule(i.name,i.module)})},v="frontendAppReady",f=new WeakMap,K=n=>(f.has(n)||f.set(n,new Set),f.get(n)),Y=(n,t=window)=>{const e=t.app;if(e&&typeof e.onLoadedSection=="function")return e.onLoadedSection(n),!0;const i=K(t);return i.has(n)||(i.add(n),t.document.addEventListener(v,s=>{i.delete(n);const a=s.detail;a&&typeof a.onLoadedSection=="function"&&a.onLoadedSection(n)},{once:!0})),!1},H=(n,t=window)=>{t.app=n,t.document.dispatchEvent(new t.CustomEvent(v,{detail:n}))};export{j as L,l as T,Y as l,H as p,J as r,G as t};
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.