1(function(l){Object.defineProperty(l,Symbol.toStringTag,{value:"Module"});var x="__dava_anon",rn=31536e3,I="__dava_session",$="_dvs",F="anoid",Ve="__dava_test_token",Ye="__dava_debug",Ze=3600,Y="__dava_fallback_";function Z(e,t){try{return typeof sessionStorage>"u"?!1:(sessionStorage.setItem(Y+e,t),!0)}catch{return!1}}function A(e){try{return typeof sessionStorage>"u"?null:sessionStorage.getItem(Y+e)}catch{return null}}var Qe=new Set(["com.au","net.au","org.au","edu.au","gov.au","id.au","asn.au","csiro.au","act.au","nsw.au","nt.au","qld.au","sa.au","tas.au","vic.au","wa.au","co.uk","org.uk","gov.uk","ac.uk","me.uk","ltd.uk","plc.uk","net.uk","sch.uk","co.nz","net.nz","org.nz","govt.nz","ac.nz","maori.nz","co.jp","or.jp","go.jp","ne.jp","ac.jp","ed.jp","com.br","net.br","org.br","gov.br","edu.br","gob.br","mil.br","co.in","net.in","org.in","gov.in","ac.in","res.in","co.za","org.za","gov.za","ac.za","net.za","web.za","co.kr","or.kr","go.kr","ne.kr","ac.kr","com.cn","net.cn","org.cn","gov.cn","ac.cn","edu.cn","com.mx","org.mx","gob.mx","net.mx","com.sg","org.sg","gov.sg","net.sg","edu.sg","com.hk","org.hk","gov.hk","edu.hk","net.hk","co.id","or.id","go.id","ac.id","net.id","web.id","co.th","or.th","go.th","ac.th","net.th","com.my","gov.my","net.my","org.my","edu.my","com.ph","gov.ph","org.ph","net.ph","edu.ph","com.vn","org.vn","gov.vn","ac.vn","net.vn","com.tr","org.tr","gov.tr","net.tr","edu.tr","co.il","org.il","gov.il","ac.il","net.il","com.ua","org.ua","gov.ua","ac.ua","net.ua","edu.ua","com.ru","org.ru","gov.ru","net.ru","com.pl","org.pl","gov.pl","net.pl","com.es","org.es","gov.es","net.es","com.fr","org.fr","gov.fr","net.fr","com.it","org.it","gov.it","net.it","com.de","org.de","gov.de","net.de","com.at","org.at","gov.at","net.at","com.se","org.se","net.se","com.no","org.no","gov.no","net.no","com.dk","org.dk","gov.dk","net.dk","com.be","org.be","gov.be","net.be","com.nl","org.nl","gov.nl","net.nl","com.ch","org.ch","gov.ch","net.ch","com.gr","org.gr","gov.gr","net.gr","com.pt","org.pt","gov.pt","net.pt","com.cz","org.cz","gov.cz","net.cz","com.sk","org.sk","gov.sk","net.sk","com.hu","org.hu","gov.hu","net.hu","com.ro","org.ro","gov.ro","net.ro","com.bg","org.bg","gov.bg","net.bg","com.hr","org.hr","gov.hr","net.hr","com.rs","org.rs","gov.rs","net.rs","com.si","org.si","gov.si","net.si","com.lt","org.lt","gov.lt","net.lt","com.lv","org.lv","gov.lv","net.lv","com.ee","org.ee","gov.ee","net.ee","com.ie","org.ie","gov.ie","net.ie","com.is","org.is","gov.is","net.is","com.lu","org.lu","gov.lu","net.lu","com.mt","org.mt","gov.mt","net.mt","com.cy","org.cy","gov.cy","net.cy","co.ae","org.ae","gov.ae","net.ae","ac.ae","com.sa","org.sa","gov.sa","net.sa","edu.sa","com.eg","org.eg","gov.eg","net.eg","edu.eg","com.ng","org.ng","gov.ng","net.ng","edu.ng","co.ke","org.ke","gov.ke","net.ke","ac.ke","com.pk","org.pk","gov.pk","net.pk","edu.pk","com.bd","org.bd","gov.bd","net.bd","edu.bd","com.lk","org.lk","gov.lk","net.lk","ac.lk","com.tw","org.tw","gov.tw","net.tw","edu.tw","com.ar","org.ar","gov.ar","net.ar","edu.ar","com.cl","org.cl","gov.cl","net.cl","edu.cl","com.co","org.co","gov.co","net.co","edu.co","com.pe","org.pe","gov.pe","net.pe","edu.pe","com.ve","org.ve","gov.ve","net.ve","edu.ve","com.ec","org.ec","gov.ec","net.ec","edu.ec","co.ca","co.com","nom.br","nom.ad","nom.af"]);function v(e){if(!e||e==="localhost"||/^\d{1,3}(\.\d{1,3}){3}$/.test(e))return"";const t=e.split(".");if(t.length===1)return"";if(t.length>=3){const n=t.slice(-2).join(".");if(Qe.has(n))return`.${t.slice(-3).join(".")}`}return`.${t.slice(-2).join(".")}`}function d(e){if(typeof document>"u")return null;try{const t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=document.cookie.match(new RegExp(`(?:^|;\\s*)${t}=([^;]*)`));return n?decodeURIComponent(n[1]):null}catch{return null}}function M(e,t,n){if(typeof document>"u")return!1;try{let r=`${e}=${encodeURIComponent(t)}; Path=/; Max-Age=${n.maxAgeSeconds}; SameSite=Lax`;return n.domain&&(r+=`; Domain=${n.domain}`),n.secure&&(r+="; Secure"),document.cookie=r,d(e)===t}catch{return!1}}function et(e,t,n){if(typeof document>"u")return!1;try{let r=`${e}=${encodeURIComponent(t)}; Path=/; SameSite=Lax`;return n.domain&&(r+=`; Domain=${n.domain}`),n.secure&&(r+="; Secure"),document.cookie=r,d(e)===t}catch{return!1}}function C(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}var h=null;function Q(){if(h!==null)return h;if(typeof window>"u")return h={dvs:null,anoid:null},h;const e=new URLSearchParams(window.location.search),t=e.get($),n=e.get(F);if(t!==null||n!==null){e.delete($),e.delete(F);const r=e.toString(),o=r?`?${r}`:"",i=window.location.pathname+o+window.location.hash;try{history.replaceState(null,"",i)}catch{}}return h={dvs:t,anoid:n},h}function U(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,11)}-${Math.random().toString(36).slice(2,11)}`}function ee(e){const{anoid:t}=Q(),n=d(x);if(n)return n;const r=A(x);if(r)return!M("__dava_anon",r,{domain:e.cookie_domain??v(typeof window<"u"?window.location.hostname:""),maxAgeSeconds:31536e3,secure:typeof window<"u"&&window.location.protocol==="https:"})&&e.debug&&console.warn("[Dáva] Cookie still blocked, using sessionStorage fallback"),r;const o=t!==null&&C(t)?t:U();return M("__dava_anon",o,{domain:e.cookie_domain??v(typeof window<"u"?window.location.hostname:""),maxAgeSeconds:31536e3,secure:typeof window<"u"&&window.location.protocol==="https:"})||(Z(x,o),e.debug&&console.warn("[Dáva] Cookie blocked (ad blocker or corporate firewall), using sessionStorage fallback. Cross-domain stitching degraded.")),o}function u(){return d("__dava_anon")??A("__dava_anon")}function te(){try{const e=sessionStorage.getItem(I);if(!e)return null;const t=e.lastIndexOf("|");return t!==-1&&Number.isFinite(Number(e.slice(t+1)))?e.slice(0,t)||null:e}catch{return null}}function ne(e){try{return sessionStorage.setItem(I,e),!0}catch{return!1}}function re(){try{return sessionStorage.getItem(I),!0}catch{return!1}}function tt(){if(typeof window>"u"||!window.name)return null;try{const e=JSON.parse(window.name);if(e===null||typeof e!="object"||Array.isArray(e))return null;const t=e.dvs;return typeof t=="string"&&C(t)?t:null}catch{return null}}function oe(e){if(!(typeof window>"u"))try{let t={};if(window.name){const n=JSON.parse(window.name);if(n===null||typeof n!="object"||Array.isArray(n))return;t=n}window.name=JSON.stringify({...t,dvs:e})}catch{}}function f(){return re()?te():d("__dava_session")??A("__dava_session")}function m(e){const{dvs:t}=Q();if(re()){const r=te();if(r)return ne(r),oe(r),r;const o=t!==null&&C(t)?t:tt()??U();return ne(o),oe(o),o}const n=d("__dava_session")??A("__dava_session")??(t!==null&&C(t)?t:U());return et("__dava_session",n,{domain:e.cookie_domain??v(typeof window<"u"?window.location.hostname:""),secure:typeof window<"u"&&window.location.protocol==="https:"})||(Z(I,n),e.debug&&console.warn("[Dáva] Session storage AND cookie blocked, using fallback id. Session grouping may be impacted.")),n}function nt(){try{const e=d("afx_profile");if(e){const t=JSON.parse(e),n=t.acid;if(typeof n=="string"&&n.length>0)return{acid:n,dnt:t.consent?.dnt===!0}}}catch{}try{const e=window.getAFXProfile;if(typeof e=="function"){const t=e();if(typeof t=="string"&&t.length>0)return{acid:t,dnt:!1}}}catch{}try{const e=window.AfxIdentity;if(e){const t=e.getProfile;if(typeof t=="function"){const n=t();if(n!==null&&typeof n=="object"){const r=n,o=r.acid;
1if(typeof o=="string"&&o.length>0)return{acid:o,dnt:r.consent?.dnt===!0}}}}}catch{}return null}function ie(){try{const e=nt();if(e!==null&&e.dnt!==!0)return e.acid}catch{}}var ae=null,rt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ot(e){try{const t=e.split("/sessions/");if(t.length<2)return null;const n=t[1].split("?")[0].split("#")[0].trim();return rt.test(n)?n.toLowerCase():null}catch{return null}}function ce(){try{const e=window.sessionRewind;if(e==null||typeof e.getSessionUrl!="function")return;e.getSessionUrl(t=>{typeof t=="string"&&(ae=ot(t))})}catch{}}function w(){return ae??void 0}function p(e,t,n={}){const r=JSON.stringify(t);if(n.preferBeacon&&se())try{const o=new Blob([r],{type:"application/json"});if(navigator.sendBeacon(e,o))return}catch{}if(typeof fetch<"u")try{fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:r,keepalive:!0,mode:"cors",credentials:"omit"}).catch(o=>{n.debug&&console.warn("[Dáva] fetch failed, trying beacon:",o),ue(e,r)});return}catch{}ue(e,r)}function ue(e,t){if(!se()){try{z(e,JSON.parse(t))}catch{H(e,t)}return}try{const n=new Blob([t],{type:"application/json"});if(!navigator.sendBeacon(e,n))try{z(e,JSON.parse(t))}catch{H(e,t)}}catch{try{z(e,JSON.parse(t))}catch{H(e,t)}}}function H(e,t){if(!(typeof document>"u"))try{const n=`${e}?p=${encodeURIComponent(t)}`,r=8192;if(n.length>r){typeof console<"u"&&console.warn(`[Dáva] Pixel payload exceeds ${r} bytes (${n.length} bytes), skipping pixel transport. Consider enabling fetch or sendBeacon.`);return}const o=new Image(1,1);o.src=n}catch{}}function se(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}function z(e,t){const n=JSON.stringify(t);if(!(typeof document>"u"))try{const r=`${e}?p=${encodeURIComponent(n)}`,o=8192;if(r.length>o){typeof console<"u"&&console.warn(`[Dáva] Pixel payload exceeds ${o} bytes (${r.length} bytes), skipping pixel transport. Consider enabling fetch or sendBeacon.`);return}const i=new Image(1,1);i.src=r}catch{}}function b(){if(!(typeof sessionStorage>"u"))try{return sessionStorage.getItem("__dava_test_token")??void 0}catch{return}}function k(e){try{return new URLSearchParams(e).get("contact_id")??void 0}catch{return}}var de=/(?:\+61[\s-]?4\d{2}[\s-]?\d{3}[\s-]?\d{3}|\+61[\s-]?[2378][\s-]?\d{4}[\s-]?\d{4}|\(?0[2378]\)?[\s-]?\d{4}[\s-]?\d{4}|04\d{2}[\s-]?\d{3}[\s-]?\d{3}|(?:1300|1800)[\s-]?\d{3}[\s-]?\d{3})/g;function S(e){let t=e.replace(/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,"[email]");return t=t.replace(de,"[phone]"),t=t.replace(/\d{3}[-.]?\d{3}[-.]?\d{4}/g,"[phone]"),t=t.replace(/\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}/g,"[card]"),t=t.replace(/\$[\d.,]+/g,"[amount]"),t}var it=new Set(["SCRIPT","STYLE","NOSCRIPT","TEMPLATE"]);function T(e){const t=e.ownerDocument;if(!t||typeof t.createTreeWalker!="function")return e.textContent?.trim()??"";const n=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(o){return o.nodeType===1?it.has(o.tagName.toUpperCase())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}});let r="";for(let o=n.nextNode();o!==null;o=n.nextNode())r+=o.nodeValue??"";return r.trim()}function B(e,t=255){return e.length>t?e.slice(0,t):e}function L(e,t=50){let n=e.toLowerCase();return n=n.replace(/[^a-z0-9_]+/g,"_"),n=n.replace(/_+/g,"_"),n=n.replace(/^_+|_+$/g,""),n.substring(0,t)}function at(e){if(!e||e.includes(":")||/^[a-f0-9]+$/i.test(e))return!1;for(const t of["css-","sc-","jsx-","radix-","headlessui-","chakra-","mui","jss"])if(e.toLowerCase().startsWith(t))return!1;return!0}function E(e){const t=e.getAttribute("data-dava-goal");if(t)return t;const n=e.getAttribute("data-dava-event");if(n)return n;const r=e.getAttribute("aria-label");return r?.trim()?S(r.trim()):null}function j(e,t=8){let n=e;for(let r=0;r<t&&n;r++){if(n.hasAttribute("data-dava-ignore"))return!0;n=n.parentElement}return!1}function le(e){const t=E(e);if(t)return t;const n=e.getAttribute("id");if(n&&at(n))return n;if(e instanceof HTMLAnchorElement&&e.href)try{const o=new URL(e.href);if(o.pathname&&o.pathname!=="/")return o.pathname.substring(1)}catch{}if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button")&&e.value?.trim())return L(S(e.value.trim()));const r=T(e);return r?L(S(r)):null}function ct(e){if(typeof window>"u"||typeof document>"u")return null;const t=u();if(!t)return null;const n=window.location,r=ie(),o=w(),i=b();return{anonymous_id:t,session_id:f()??void 0,contact_id:k(n.search),event_type:"pageview",url_path:n.pathname,full_url:n.href,referrer:document.referrer||"",occurred_at:new Date().toISOString(),page_title:document.title||void 0,properties:e.properties,data_site:e.data_site,...r!==void 0?{adfixus_id:r}:{},...o!==void 0?{rewind_id:o}:{},...i!==void 0?{dava_test:i}:{}}}function ut(e,t,n){if(typeof window>"u"||typeof document>"u")return null;const r=u();if(!r)return null;const o=window.location,i=w(),c=b();return{anonymous_id:r,session_id:f()??m(e),contact_id:k(o.search),event_type:"form_submit",url_path:o.pathname,full_url:o.href,referrer:document.referrer||"",occurred_at:new Date().toISOString(),hashed_email:t,data_site:e.data_site,...n?{event_name:B(n)}:{},...i!==void 0?{rewind_id:i}:{},...c!==void 0?{dava_test:c}:{}}}function st(e,t){if(typeof window>"u"||typeof document>"u")return null;const n=u();if(!n)return null;const r=window.location,o=w(),i=b();return{anonymous_id:n,session_id:f()??m(e),contact_id:k(r.search),event_type:"custom_event",event_name:"email_captured",url_path:r.pathname,full_url:r.href,referrer:document.referrer||"",occurred_at:new Date().toISOString(),hashed_email:t,data_site:e.data_site,...o!==void 0?{rewind_id:o}:{},...i!==void 0?{dava_test:i}:{}}}function D(e,t,n){if(typeof window>"u"||typeof document>"u")return null;const r=u();if(!r)return null;const o=window.location,i=w(),c=b();return{anonymous_id:r,session_id:f()??m(e),contact_id:k(o.search),event_type:t,name:n,event_name:B(n),url_path:o.pathname,full_url:o.href,referrer:document.referrer||"",occurred_at:new Date().toISOString(),properties:{event_name:n},data_site:e.data_site,...i!==void 0?{rewind_id:i}:{},...c!==void 0?{dava_test:c}:{}}}function dt(e,t){return D(e,"click",t)}function lt(e,t){return D(e,"contact_click",t)}function ft(e,t){return D(e,"outbound_click",t)}function g(e){return e.endpoint?e.endpoint:typeof window>"u"?"/t/event":`${window.location.origin}/t/event`}function pt(e,t){return D(e,"file_download",t)}function gt(e){if(typeof window>"u"||typeof document>"u")return null;const t=u();if(!t)return null;const n=window.location,r=w(),o=b();return{anonymous_id:t,session_id:f()??m(e),contact_id:k(n.search),event_type:"scroll",url_path:n.pathname,full_url:n.href,referrer:document.referrer||"",occurred_at:new Date().toISOString(),properties:e.properties,data_site:e.data_site,...r!==void 0?{rewind_id:r}:{},...o!==void 0?{dava_test:o}:{}}}function P(e){m(e);const t=ct(e);if(!t){e.debug&&console.warn("[Dáva] pageview skipped: no anonymous_id");return}p(g(e),t,{debug:e.debug,preferBeacon:!0}),e.debug&&console.log("[Dáva] Browser event sent:",t.event_type)}var fe=!1,pe=null,mt=["tel:","mailto:"],q=8,vt=new RegExp(`^(?:${de.source})$`);function ge(e){fe||typeof document>"u"||(pe=t=>{const n=t.target;if(n instanceof Element)try{kt(n,e)}catch(r){e.debug&&console.warn("[Dáva] contact click failed:",r)}},document.addEventListener("click",pe,{capture:!0}),fe=!0)}function me(e){if(!e)return!1;const t=e.trim().toLowerCase();return mt.some(n=>t.startsWith(n))}function ht(e){let t=e;for(let n=0;n<q&&t;n++){if(t instanceof HTMLAnchorElement&&me(t.getAttribute("href")))return t;t=t.parentElement}return null}function wt(e){let t=e;for(let n=0;n<q&&t;n++){if(t.hasAttribute("data-dava-phone"))return t;t=t.parentElement}return null}function _t(e){return e instanceof HTMLButtonElement?!0:e instanceof HTMLAnchorElement?!me(e.getAttribute("href")):e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button")||e.getAttribute("role")==="button"}function yt(e){let t=e;for(let n=0;n<q&&t;n++){if(_t(t)){const r=T(t);if(r&&vt.test(r))return t}t=t.parentElement}return null}function bt(e){const t=E(e);if(t)return t;const n=T(e);return n?L(S(n)):null}function ve(e){const t=E(e);if(t)return t;const n=T(e);return n?L(S(n)):null}function K(e,t){const n=lt(e,t);n&&p(g(e),n,{debug:e.debug,preferBeacon:!0})}function kt(e,t){if(j(e)||!u())return;const n=wt(e);if(n){const i=ve(n);if(i){K(t,i);return}}const r=ht(e);
1if(r){const i=bt(r);if(i){K(t,i);return}}const o=yt(e);if(o){const i=ve(o);i&&K(t,i)}}var St=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(?:s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)$/i,he=!1,we=null,Et=8;function _e(e){he||typeof document>"u"||(we=t=>{const n=t.target;if(n instanceof Element)try{Ct(n,e)}catch(r){e.debug&&console.warn("[Dáva] file download click failed:",r)}},document.addEventListener("click",we,{capture:!0}),he=!0)}function It(e){try{const t=new URL(e.href);return t.protocol!=="http:"&&t.protocol!=="https:"?!1:St.test(t.pathname)}catch{return!1}}function ye(e){let t=e;for(let n=0;n<Et&&t;n++){if(t instanceof HTMLAnchorElement&&It(t))return t;t=t.parentElement}return null}function At(e){const t=E(e);if(t)return t;try{const n=new URL(e.href).pathname.split("/").pop();return n&&n.length>0?n:null}catch{return null}}function Ct(e,t){if(j(e))return;const n=ye(e);if(!n||!u())return;const r=At(n);if(!r)return;const o=pt(t,r);o&&p(g(t),o,{debug:t.debug,preferBeacon:!0})}var be=!1,ke=null;function Se(e){be||typeof document>"u"||(ke=t=>{const n=t.target;if(n instanceof Element)try{Dt(n,e)}catch(r){e.debug&&console.warn("[Dáva] cta click failed:",r)}},document.addEventListener("click",ke,{capture:!0}),be=!0)}function Tt(e){let t=e;for(let n=0;n<8&&t;n++){if(t.hasAttribute("data-dava-ignore"))return!1;t=t.parentElement}return e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement||e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button")||e.getAttribute("role")==="button"}var Ee=8;function Lt(e){let t=e;for(let n=0;n<Ee&&t;n++){const r=le(t);if(r)return r;t=t.parentElement}return null}function Dt(e,t){let n=e;for(let i=0;i<Ee&&n&&!Tt(n);i++)n=n.parentElement;if(!n||ye(e))return;const r=Lt(n);if(!r||!u())return;const o=dt(t,r);o&&p(g(t),o,{debug:t.debug,preferBeacon:!0})}function Pt(e){let t="";for(let n=0;n<e.length;n++)t+=e[n].toString(16).padStart(2,"0");return t}async function Ot(e){if(typeof crypto>"u"||!crypto.subtle)throw new Error("crypto.subtle unavailable, modern browser required");const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Pt(new Uint8Array(n))}function Nt(e){return e.trim().toLowerCase()}async function Ie(e){if(!e)return null;const t=Nt(e);return t?.includes("@")?Ot(t):null}var X=["email","user_email","useremail","email_address","e-mail","e_mail","your-email","your_email","contact_email","contact-email"];function Rt(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r===45||r===95?t+=e[n]:t+=`\\${String.fromCharCode(r)}`}return t}function xt(e,t){const n=e.querySelector("[data-dava-email]");if(n?.value)return n.value;if(t)try{const i=e.querySelector(t);if(i?.value)return i.value}catch{}const r=e.querySelector("input[type=email]");if(r?.value)return r.value;for(const i of X){const c=e.querySelector(`input[name="${i}"]`);if(c?.value)return c.value;const s=e.querySelector(`#${Rt(i)}`);if(s?.value)return s.value}const o=e.querySelectorAll("input");for(const i of o)if(i.type!=="password"&&i?.value?.includes("@"))return i.value;return null}var Ae=!1,Ce=null;function Te(e){Ae||typeof document>"u"||(Ce=t=>{const n=t.target;n instanceof HTMLFormElement&&$t(n,e).catch(r=>{e.debug&&console.warn("[Dáva] form_submit failed:",r)})},document.addEventListener("submit",Ce,{capture:!0}),Ae=!0)}async function $t(e,t){if(!u())return;const n=await Ie(xt(e,t.form_email_selector));if(!n)return;const r=le(e)??void 0,o=ut(t,n,r);if(!o)return;const i={};e.id&&(i.form_id=e.id),r&&(i.event_name=B(r)),Object.keys(i).length>0&&(o.properties=i),p(g(t),o,{debug:t.debug,preferBeacon:!0})}var Le=!1,De=null,Pe=null,O=null,Oe=0;function Ft(e,t){if(e.hasAttribute("data-dava-email"))return!0;if(t)try{if(e.matches(t))return!0}catch{}if(e.type==="email")return!0;const n=(e.getAttribute("name")??"").toLowerCase(),r=(e.id??"").toLowerCase();return X.includes(n)||X.includes(r)?!0:e.type==="password"?!1:typeof e.value=="string"&&e.value.includes("@")}function Ne(e){Le||typeof document>"u"||(De=t=>{const n=t.target;
1n instanceof HTMLInputElement&&Mt(n,e).catch(r=>{e.debug&&console.warn("[Dáva] email_captured failed:",r)})},document.addEventListener("blur",De,{capture:!0}),Le=!0)}async function Mt(e,t){if(!u()||!Ft(e,t.form_email_selector))return;const n=e.value;if(!n||n===O)return;O=n;const r=Oe;try{const o=await Ie(n);if(r!==Oe||!o||o===Pe)return;const i=st(t,o);if(!i)return;Pe=o,p(g(t),i,{debug:t.debug,preferBeacon:!0})}finally{O===n&&(O=null)}}function Ut(e,t){if(typeof window>"u")return!1;const n=window.location.hostname;if(e===n)return!1;const r=v(e),o=v(n);if(r.length>0&&r===o)return!0;const i=t.owned_domains??[];for(const c of i){const s=c.startsWith(".")?c.slice(1):c;if(e===s||e.endsWith(`.${s}`))return!0}return!1}function Ht(e,t){let n;try{n=new URL(e.href)}catch{return}if(n.protocol!=="http:"&&n.protocol!=="https:"||!Ut(n.hostname,t)||n.searchParams.has("_dvs"))return;const r=f();if(!r){t.debug&&console.log("[Dáva] linker: no session_id yet, skipping decoration for",n.hostname);return}const o=u(),i=new URL(e.href);i.searchParams.set($,r),o!==null&&i.searchParams.set(F,o),e.href=i.toString(),t.debug&&console.log("[Dáva] linker: decorated",n.hostname,"â",e.href)}function Re(e){if(typeof document>"u")return()=>{};const t=n=>{const r=n.target;if(!(r instanceof Element))return;const o=r.closest("a[href]");if(o)try{Ht(o,e)}catch(i){e.debug&&console.warn("[Dáva] linker: decoration error:",i)}};return document.addEventListener("click",t,!0),()=>{document.removeEventListener("click",t,!0)}}var xe=!1,$e=null,zt=8;function Fe(e){xe||typeof document>"u"||($e=t=>{const n=t.target;if(n instanceof Element)try{qt(n,e)}catch(r){e.debug&&console.warn("[Dáva] outbound click failed:",r)}},document.addEventListener("click",$e,{capture:!0}),xe=!0)}function Me(e){try{const t=new URL(e.href);return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.hostname}catch{return null}}function Bt(e){if(typeof window>"u")return null;const t=window.location.hostname;let n=e;for(let r=0;r<zt&&n;r++){if(n instanceof HTMLAnchorElement){const o=Me(n);if(o&&o!==t)return n}n=n.parentElement}return null}function jt(e){const t=E(e);return t||Me(e)}function qt(e,t){if(j(e))return;
1const n=Bt(e);if(!n||!u())return;const r=jt(n);if(!r)return;const o=ft(t,r);o&&p(g(t),o,{debug:t.debug,preferBeacon:!0})}var Kt=.9,Ue=!1,He=null,N=!1,R=!1;function Xt(e){if(R)return;const t=document.documentElement.scrollHeight-window.innerHeight;if(!(t<=0)&&window.scrollY/t>=Kt){if(R=!0,!u())return;const n=gt(e);if(!n)return;p(g(e),n,{debug:e.debug,preferBeacon:!0})}}function ze(e){e.track_scroll!==!1&&(Ue||typeof window>"u"||typeof document>"u"||(He=()=>{R||N||(N=!0,requestAnimationFrame(()=>{N=!1;try{Xt(e)}catch(t){e.debug&&console.warn("[Dáva] scroll depth check failed:",t)}}))},window.addEventListener("scroll",He,{passive:!0}),Ue=!0))}function Be(){R=!1,N=!1}var Wt=new Set(["my.duda.co","app.multiscreensite.com"]),Gt=[".multiscreensite.com",".duda.co"];function Jt(e=typeof window<"u"?window.location:void 0){if(!e)return!1;if(e.protocol!=="http:"&&e.protocol!=="https:")return!0;const t=e.hostname.toLowerCase();return!!(Wt.has(t)||Gt.some(n=>t.endsWith(n))||new URLSearchParams(e.search).get("dm_try_mode")==="true")}function je(e){if(typeof window>"u"||typeof window.history>"u")return()=>{};const t=window.history;let n=window.location.pathname;const r=()=>{const s=window.location.pathname;s!==n&&(n=s,e(s))},o=t.pushState,i=t.replaceState;t.pushState=function(...V){o.apply(t,V);try{r()}catch{}},t.replaceState=function(...V){i.apply(t,V);try{r()}catch{}};const c=()=>{try{r()}catch{}};return window.addEventListener("popstate",c),function(){t.pushState=o,t.replaceState=i,window.removeEventListener("popstate",c)}}var W=typeof document<"u"?document.currentScript??document.querySelector('script[src$="/t.js"], script[src*="/t.js?"]'):null,a=null,_=null,qe=!1,y=null;function Vt(){if(!(typeof window>"u"))try{const e=new URLSearchParams(window.location.search).get("dava_test");e&&sessionStorage.setItem(Ve,e)}catch{}}function Ke(e){if(typeof window>"u")return;let t=!1;try{new URLSearchParams(window.location.search).get("dava_debug")==="1"&&(t=!0)}catch{}if(!t&&d("__dava_debug")==="1"&&(t=!0),!t)return;e.debug=!0;const n=v(window.location.hostname),r=window.location.protocol==="https:";M(Ye,"1",{domain:n||void 0,maxAgeSeconds:Ze,secure:r})}function G(e){if(Jt()){e.debug&&console.log("[Dáva] editor/preview environment detected, tracking disabled");return}if(Vt(),a={track_forms:!0,track_cta:!1,autocapture:!0,track_scroll:!0,debug:!1,require_consent:!1,...e},a.require_consent===!0&&d("dava-consent")!=="true"){a.debug&&console.log("[Dáva] consent required but not granted, tracking gated");return}if(ee(a),m(a),ce(),P(a),a.debug){const t=f();t&&console.log("[Dáva] Session ID:",t)}_&&_(),_=je(()=>{a&&(P(a),Be())}),a.track_forms&&(Te(a),Ne(a)),(a.autocapture!==!1||a.track_cta)&&(Se(a),ge(a),Fe(a
1),_e(a)),ze(a),y&&y(),y=Re(a),a.debug&&console.log("[Dáva] Listener loaded")}function Xe(){return u()}function We(){return f()}function J(){return ie()??null}function Ge(){return w()??null}function Je(){if(!(!a||a.require_consent!==!0)&&d("dava-consent")==="true"){if(qe){a.debug&&console.log("[Dáva] checkConsent: already started, skipping (idempotent)");return}qe=!0,ee(a),m(a),ce(),P(a),_&&_(),_=je(()=>{a&&(P(a),Be())}),a.track_forms&&(Te(a),Ne(a)),(a.autocapture!==!1||a.track_cta)&&(Se(a),ge(a),Fe(a),_e(a)),ze(a),y&&y(),y=Re(a),a.debug&&console.log("[Dáva] checkConsent: consent now granted, tracking enabled")}}var Yt={site:"data_site",trackForms:"track_forms",trackCta:"track_cta",autocapture:"autocapture",trackScroll:"track_scroll",debug:"debug",endpoint:"endpoint",formEmailSelector:"form_email_selector",requireConsent:"require_consent",ownedDomains:"owned_domains"},Zt=new Set(["track_forms","track_cta","autocapture","track_scroll","debug","require_consent"]),Qt=new Set(["owned_domains"]);function en(e){return e==="true"||e==="1"?!0:e==="false"||e==="0"||e===""?!1:null}function tn(){const e=W?.src;if(!e)return null;try{return new URL(e).origin}catch{return null}}function nn(){if(!W)return;const e=W.dataset,t={};for(const[n,r]of Object.entries(Yt)){const o=e[n];if(o!==void 0)if(Zt.has(r)){const i=en(o);if(i===null)continue;t[r]=i}else if(Qt.has(r)){const i=o.split(",").map(c=>c.trim()).filter(c=>c.length>0);i.length>0&&(t[r]=i)}else t[r]=o}if(Object.keys(t).length!==0){if(t.endpoint===void 0){const n=tn();n&&(t.endpoint=`${n}/t/event`)}Ke(t),G({account_id:"",...t}),t.debug&&console.log("[Dáva] auto-configured from <script data-*>",t)}}typeof window<"u"&&!window.dava?.__initialized&&(window.dava={__initialized:!0,configure:G,checkConsent:Je,get anonId(){return Xe()},get sessionId(){return We()},get acid(){return J()},get adfixusId(){return J()},get rewindId(){return Ge()},get debug(){return a?.debug??!1},get endpoint(){return a?.endpoint??null}},nn()),l.checkConsent=Je,l.configure=G,l.detectAndApplyDebugTrigger=Ke,l.getAnonId=Xe,l.getSnippetAdfixusId=J,l.getSnippetRewindId=Ge,l.getSnippetSessionId=We})(this.dava=this.dava||{}); 2 3//# sourceMappingURL=t.js.map
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.