/*! * Copyright (c) 2025 Woopra, Inc. * * For license information please see https://static.woopra.com/js/w.js.LICENSE.txt */ !function(){"use strict";function t(t){return void 0===t}var e="object"==typeof global&&global&&global.Object===Object&&global,n="object"==typeof self&&self&&self.Object===Object&&self,i=e||n||Function("return this")(),o=i.Symbol,a=Object.prototype,r=a.hasOwnProperty,s=a.toString,c=o?o.toStringTag:void 0;var u=Object.prototype.toString;var l=o?o.toStringTag:void 0;function h(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":l&&l in Object(t)?function(t){var e=r.call(t,c),n=t[c];try{t[c]=void 0;var i=!0}catch(t){}var o=s.call(t);return i&&(e?t[c]=n:delete t[c]),o}(t):function(t){return u.call(t)}(t)}function d(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function f(t){if(!d(t))return!1;var e=h(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var p=function(){return i.Date.now()},g=/\s/;var m=/^\s+/;function v(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&g.test(t.charAt(e)););return e}(t)+1).replace(m,""):t}function _(t){return null!=t&&"object"==typeof t}function w(t){return"symbol"==typeof t||_(t)&&"[object Symbol]"==h(t)}var y=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,b=/^0o[0-7]+$/i,C=parseInt;function E(t){if("number"==typeof t)return t;if(w(t))return NaN;if(d(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=d(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=v(t);var n=k.test(t);return n||b.test(t)?C(t.slice(2),n?2:8):y.test(t)?NaN:+t}var S=Math.max,D=Math.min;function x(t,e,n){var i,o,a,r,s,c,u=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=i,a=o;return i=o=void 0,u=e,r=t.apply(a,n)}function m(t){return u=t,s=setTimeout(_,e),l?g(t):r}function v(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-u>=a}function _(){var t=p();if(v(t))return w(t);s=setTimeout(_,function(t){var n=e-(t-c);return h?D(n,a-(t-u)):n}(t))}function w(t){return s=void 0,f&&i?g(t):(i=o=void 0,r)}function y(){var t=p(),n=v(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return m(c);if(h)return clearTimeout(s),s=setTimeout(_,e),g(c)}return void 0===s&&(s=setTimeout(_,e)),r}return e=E(e)||0,d(n)&&(l=!!n.leading,a=(h="maxWait"in n)?S(E(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,i=c=o=s=void 0},y.flush=function(){return void 0===s?r:w(p())},y}var N;var O,B=((N={}).eu="www.woopra.com/track/",N.kr="kr.track.airis.appier.net/track/",N),j="__woopraid",P=["campaign","content","id","medium","source","term"],I=["com.au","net.au","org.au","co.hu","com.ru","ac.za","net.za","com.za","co.za","co.uk","org.uk","me.uk","net.uk"],T="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",A=new RegExp("__woopraid=([^&#]+)"),U="action",R="page",L="scroll depth",W="pv",$="idptnc",M="_blank",F="data-tracked",H="ce_",z="co_",q="ce",Q="update",J="active",K="passive",V="hidden",G="frozen",X="terminated",Y="beforeunload",Z="blur",tt="click",et="download",nt="focus",it="freeze",ot="link",at="mousemove",rt="outgoing",st="pagehide",ct="pageshow",ut="resume",lt="scroll",ht="statechange",dt="unload",ft="visibilitychange",pt="app",gt="appier_app_id",mt="augment_action",vt="auto_decorate",_t="beacons",wt="campaign_once",yt="click_tracking_matcher_selectors",kt="click_pause",bt="context",Ct="cookie_domain",Et="cookie_expire",St="cookie_name",Dt="cookie_path",xt="cookie_secure",Nt="cross_domain",Ot="domain",Bt="download_extensions",jt="download_pause",Pt="download_tracking",It="form_pause",Tt="hide_campaign",At="hide_xdm_data",Ut="idle_threshold",Rt="idle_timeout",Lt="ignore_query_url",Wt="map_query_params",$t="outgoing_pause",Mt="outgoing_tracking",Ft="personalization",Ht="ping",zt="ping_interval",qt="protocol",Qt="region",Jt="save_url_hash",Kt="third_party",Vt="use_cookies",Gt=[[$,$],["$duration","duration"],["$domain",Ot],["$app",pt],["$timestamp","timestamp"],["$action","event"],[gt,gt]],Xt=["avi","css","dmg","doc","eps","exe","js","m4v","mov","mp3","mp4","msi","pdf","ppt","rar","svg","txt","vsd","vxd","wma","wmv","xls","xlsx","zip"],Yt=["a"],Zt=["a","button","input[type=button]","input[type=submit]","[role=button]"],te=((O={}).auto_decorate=void 0,O.download_tracking=!1,O.outgoing_ignore_subdomain=!0,O.outgoing_tracking=!1,O),ee={};function ne(t,e){ee[t][e]=null}function ie(t,e,n){null!=t&&t.addEventListener&&t.addEventListener(e,n)}function oe(t,e,n){var i=t.instanceName;ee[e]||(ee[e]={}),ee[e][i]=t,t.__l&&(t.__l[e]||(t.__l[e]=[]),t.__l[e].push(n))}function ae(t){var e,n,i=ee[t];if(i)for(var o in i)if(i.hasOwnProperty(o)&&(n=(e=i[o])&&e.__l)&&n[t])for(var a=0;at.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function he(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var de=function(){function t(){this._registry={}}var e=t.prototype;return e.addEventListener=function(t,e,n){this._getRegistry(t).push(e)},e.removeEventListener=function(t,e,n){var i=this._getRegistry(t),o=i.indexOf(e);o>-1&&i.splice(o,1)},e.dispatchEvent=function(t){return t.target=this,Object.freeze(t),this._getRegistry(t.type).forEach((function(e){return e(t)})),!0},e._getRegistry=function(t){return this._registry[t]=this._registry[t]||[]},t}(),fe=function(t,e){this.type=t,this.newState=e.newState,this.oldState=e.oldState,this.originalEvent=e.originalEvent},pe="object"==typeof safari&&safari.pushNotification,ge="onpageshow"in self,me=[nt,Z,ft,it,ut,ct,ge?st:dt],ve=function(t){return t.preventDefault(),t.returnValue="Are you sure?"},_e=[[J,K,V,X],[J,K,V,G],[V,K,J],[G,V],[G,J],[G,K]].map((function(t){return t.reduce((function(t,e,n){return t[e]=n,t}),{})})),we=function(){return document.visibilityState===V?V:document.hasFocus()?J:K},ye=new(function(t){var e,n;function i(){var e;e=t.call(this)||this;var n=we();return e._state=n,e._unsavedChanges=[],e._handleEvents=e._handleEvents.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)),me.forEach((function(t){return addEventListener(t,e._handleEvents,!0)})),pe&&addEventListener(Y,(function(t){e._safariBeforeUnloadTimeout=setTimeout((function(){t.defaultPrevented||t.returnValue.length>0||e._dispatchChangesIfNeeded(t,V)}),0)})),e}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,ce(e,n);var o,a,r,s=i.prototype;return s.addUnsavedChanges=function(t){!this._unsavedChanges.indexOf(t)>-1&&(0===this._unsavedChanges.length&&addEventListener(Y,ve),this._unsavedChanges.push(t))},s.removeUnsavedChanges=function(t){var e=this._unsavedChanges.indexOf(t);e>-1&&(this._unsavedChanges.splice(e,1),0===this._unsavedChanges.length&&removeEventListener(Y,ve))},s._dispatchChangesIfNeeded=function(t,e){if(e!==this._state)for(var n=function(t,e){for(var n,i=0;n=_e[i];++i){var o=n[t],a=n[e];if(o>=0&&a>=0&&a>o)return Object.keys(n).slice(o,a+1)}return[]}(this._state,e),i=0;i1?e.unshift(s+"["+o+"]"):e.unshift(s),n=n.parentNode}return e.slice(1).join(" > ")}function He(e){var n=e.srcElement||e.target;Te(e)&&ae(tt,e,n),(te.download_tracking||te.outgoing_tracking)&&(t(n=Me(e.srcElement||e.target,Yt))||null===n||n.getAttribute(F)||ae(ot,e,n))}function ze(e){var n;ae(at,e,Date.now()),te.auto_decorate&&(t(n=Me(e.srcElement||e.target,Yt))||null===n||ae(vt,n))}function qe(t){ae(at,t,Date.now())}var Qe=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return d(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),x(t,e,{leading:i,maxWait:e,trailing:o})}((function(t){ae(lt,t)}),500);function Je(t){ae(ht,t)}function Ke(){}var Ve=function(){function t(t,e,n,i){this.woopra=t,this.id=e,this.params=n,this.meta=i}var e=t.prototype;return e.update=function(t,e){void 0===t&&(t={}),t.event&&t.event!==this.params.event&&(this.params.event=t.event),this.woopra.update(this.id,se({},t,{$action:this.params.event}),e)},e.cancel=function(){this.woopra.cancelAction(this.id)},t}();function Ge(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}var Xe=o?o.prototype:void 0,Ye=Xe?Xe.toString:void 0;function Ze(t){if("string"==typeof t)return t;if(ke(t))return function(t,e){for(var n=-1,i=null==t?0:t.length,o=Array(i);++n=0;o-=1)if(!(""===t.elements[o].name||n.indexOf(t.elements[o].name)>-1))switch(t.elements[o].nodeName){case"INPUT":switch(t.elements[o].type){case"text":case"hidden":case rn:case cn:case sn:i[t.elements[o].name]=t.elements[o].value;break;case"checkbox":case"radio":t.elements[o].checked&&(i[t.elements[o].name]=t.elements[o].value)}break;case"TEXTAREA":i[t.elements[o].name]=t.elements[o].value;break;case"SELECT":switch(t.elements[o].type){case"select-one":i[t.elements[o].name]=t.elements[o].value;break;case"select-multiple":for(var a=t.elements[o].options.length-1;a>=0;a-=1)t.elements[o].options[a].selected&&(i[t.elements[o].name]=t.elements[o].options[a].value)}break;case"BUTTON":switch(t.elements[o].type){case cn:case sn:case rn:i[t.elements[o].name]=t.elements[o].value}}return i}},ln._on=oe,ln._fire=ae,ln.attachEvent=ie,ln.startsWith=function(t,e,n){return t=nn(t),n=null==n?0:Ge(en(n),0,t.length),e=Ze(e),t.slice(n,n+e.length)==e},ln.endsWith=function(t,e,n){t=nn(t),e=Ze(e);var i=t.length,o=n=void 0===n?i:Ge(en(n),0,i);return(n-=e.length)>=0&&t.slice(n,o)==e};var dn=ln._fire,fn=function(){function e(t){var e;this.visitorData={},this.sessionData={},this.orgData={},this.options=((e={}).app="js-client",e.beacons=f(navigator.sendBeacon),e.campaign_once=!1,e.click_tracking_matcher_selectors=Zt,e.cookie_domain="."+ln.getHostnameNoWww(),e.cookie_expire=new Date((new Date).setDate((new Date).getDate()+730)),e.cookie_name="wooTracker",e.cookie_path="/",e.cookie_secure="https:"===ln.location("protocol"),e.cross_domain=!1,e.download_extensions=Xt,e.download_pause=200,e.download_tracking=!1,e.hide_campaign=!1,e.hide_xdm_data=!1,e.idle_threshold=1e4,e.idle_timeout=3e5,e.ignore_query_url=!1,e.map_query_params={},e.outgoing_ignore_subdomain=!0,e.outgoing_pause=200,e.outgoing_tracking=!1,e.personalization=!0,e.ping_interval=12e3,e.ping=!1,e.protocol="https",e.region="eu",e.save_url_hash=!0,e.third_party=!1,e.click_pause=250,e.form_pause=250,e.use_cookies=!0,e),this.instanceName=t||"woopra",this.idle=0,this.cookie="",this.last_activity=Date.now(),this.loaded=!1,this.dirtyCookie=!1,this.sentCampaign=!1,this.version=11,this.pending=[],this.beaconQueue=[],this.lastAction=null,t&&""!==t&&(window[t]=this)}var n=e.prototype;return n.init=function(){var t=this;this.__l={},this._processQueue("config"),this._setupCookie(),this._bindEvents(),setTimeout((function(){return t._processQueue()}),1),this.loaded=!0;var e=this.config("initialized");f(e)&&e(this.instanceName),this.config(At)&&ln.hideCrossDomainId()},n._processQueue=function(e){var n=window.__woo?window.__woo[this.instanceName]:n;if((n=window._w?window._w[this.instanceName]:n)&&n._e)for(var i=n._e,o=0;o0)for(var s in i)r(i[s],t)},n.trackFormHandler=function(t,e,n,i){void 0===i&&(i={});var o=!1;if(!e.getAttribute(F)){var a=Boolean(this.config(_t)),r=ln.serializeForm(e,i);if(f(i.identify)){var s=i.identify(r)||{};s&&this.identify(s)}var c=f(i.onBeforeSend)?i.onBeforeSend:void 0,u=f(i.callback)?function(){return i.callback(r)}:void 0,l=f(i.onError)?i.onError:void 0;if(i.noSubmit||e.setAttribute(F,1),i.noSubmit||a)this.track(n,r,{onBeforeSend:c,onError:l,onSuccess:u,useBeacon:a});else{t.preventDefault(),t.stopPropagation();var h=setTimeout((function(){o||e.submit()}),this.config(It));this.track(n,r,{onBeforeSend:c,onSuccess:function(){clearTimeout(h),u&&u(),o||e.submit(),o=!0},onError:l})}}},n.trackClick=function(t,e,n,i){var o=this;void 0===t&&(t="Item Clicked"),void 0===i&&(i={});var a=[],r=function(t,e,n,i){ie(t,tt,(function(a){o.trackClickHandler(a,t,e,n,i)}))};if(a=i.elements?i.elements:Ae(e,i))for(var s=0;sthis.config(Ut)&&(this.idle=t-this.last_activity),this},n.push=function(t){return this._push({endpoint:"identify",visitorData:this.visitorData,sessionData:this.sessionData,orgData:this.orgData,callback:t}),this.sendBeacons(),this},n._updateDurations=function(t,e){var n=Date.now();function i(i){var o,a,r;switch(e){case J:case K:var s;return n-i.meta.leave>i.params.timeout?((s={}).expired=!0,s):e===J&&t===K||e===K&&t===J?{}:((o={}).timestamp=n,o);case V:return(a={}).dirty=i.meta.dirty||n-i.meta.timestamp>100,a.duration=i.meta.duration+(n-i.meta.timestamp),a.leave=n,a;case X:return(r={}).dirty=i.meta.dirty||n-i.meta.leave>100,r;default:return{}}}this.pending=this.pending.map((function(t){return t.lifecycle!==R?t:se({},t,{meta:se({},t.meta,i(t))})})),this.lastAction&&(this.lastAction=se({},this.lastAction,{meta:se({},this.lastAction.meta,i(this.lastAction))}))},n._processLifecycle=function(t){var e,n=this,i=[];(this.pending.forEach((function(t){var e;t.meta.expired&&!t.meta.cancelled&&t.meta.retrack&&i.push(se({},t.args,{eventData:se({},t.args.eventData||{},(e={},e[$]=Ie(),e.returning=!0,e))}))})),i.forEach((function(t){return n._push(t)})),this.pending=this.pending.filter((function(e){return!e.meta.expired&&(e.meta.dirty&&n.beaconQueue.push({lifecycle:e.lifecycle,endpoint:e.endpoint,params:se({},e.params),meta:se({},e.meta),successCallback:e.callback,errorCallback:e.errorCallback}),!e.meta.cancelled&&(e.lifecycle===R&&t!==R))})),this.pending=this.pending.map((function(t){var e;return se({},t,{meta:se({},t.meta,(e={},e.dirty=!1,e.sent=!0,e))})})),t===R&&this.lastAction)&&this.beaconQueue.push({lifecycle:R,endpoint:q,params:se({},this.lastAction.params),meta:se({},this.lastAction.meta,(e={},e.sent=!0,e))});return i.length>0},n._drainBeaconQueue=function(){var t=this,e=this.config(Vt);function n(t){t[$],t.cookie,t.project,t.event;var e=function(t,e){if(null==t)return{};var n,i,o={},a=Object.keys(t);for(i=0;i=0||(o[n]=t[n]);return o}(t,[$,"cookie","project","event"].map(he));return Object.keys(e).length>0}var i=this.beaconQueue.reduce((function(t,e){return t[e.params[$]]=[],t}),{});this.beaconQueue.forEach((function(t){i[t.params[$]].push(t)})),this.beaconQueue=[];var o=Object.keys(i).map((function(n){var o=i[n],a={endpoint:void 0,params:{},onSuccess:[],onError:[]};return o.forEach((function(n){var i;a.endpoint||(n.endpoint===q&&n.meta.sent?a.endpoint=Q:a.endpoint=n.endpoint),a.params.project=n.params.project,a.params.event=n.params.event,a.params[$]=n.params[$],e&&(a.params.cookie=t.getCookie()||t.cookie),(n.lifecycle===R||n.params[$]===(null==(i=t.lastAction)?void 0:i.id))&&n.meta.duration>0&&(a.params.duration=n.meta.duration),n.meta[L]&&(a.params["ce_scroll depth"]=Math.round(1e4*n.meta[L])/1e4),n.meta.sent||(a.params=se({},a.params,n.params),f(n.successCallback)&&a.onSuccess.push(n.successCallback),f(n.errorCallback)&&a.onError.push(n.errorCallback))})),a.params.project||(a.params.project=t.config(Ot)||ln.getHostnameNoWww()),a})).filter((function(t){return n(t.params)})),a=navigator.sendBeacon&&navigator.sendBeacon.bind(navigator),r=Boolean(this.config(_t))&&f(a);if(o.length>0)if(r){var s=[""];o.map((function(t){var e=t.endpoint,n=t.params;return JSON.stringify({endpoint:e,params:n})})).forEach((function(t){new Blob([""+s[s.length-1]+t]).size>=65e3&&s.push(""),s[s.length-1]+=t+"\n"})),s.forEach((function(e,n){var i=new FormData;i.append("payload",e.slice(0,-1));try{a(t.getEndpoint("push"),i)}catch(t){console.error("Woopra: sendBeacon failed:",t)}})),o.forEach((function(t){t.onSuccess.forEach((function(e){return We(e,t.params.event)}))}))}else o.forEach((function(e){var n=t.getEndpoint(e.endpoint)+"?"+ln.buildUrlParams(se({close:!0},e.params));ln.loadScript(n,(function(){return e.onSuccess.forEach((function(t){return We(t,e.params.event)}))}),(function(){return e.onError.forEach((function(t){return We(t,e.params.event)}))}))}))},n.sendBeacons=function(t){void 0===t&&(t=U),this._processLifecycle(t),this._drainBeaconQueue()},n.sleep=function(){},n._touch=function(t){void 0===t&&(t=Date.now()),this.last_activity=t,this.idle=0},n.moved=function(t,e){this._touch(e)},n.onClick=function(t){if(this.config("click_tracking")){var e=Boolean(this.config(_t)),n=Me(t.target,this.config(yt));if(n){var i=n.tagName.toLowerCase(),o=n.getAttributeNames().reduce((function(t,e){return ln.startsWith(e,"data-woopra-")&&(t[e.slice(12)]=n.getAttribute(e)),t}),{}),a=n.getAttribute("data-woopra")||"button click",r=se({"page url":this.getPageUrl(),"page title":this.getPageTitle(),text:n.innerText||n.value||n.textContent,title:n.textContent,type:"a"===i?"link":n.type,tagname:i,classname:n.className,"dom path":Fe(n),url:n.href,"pointer type":t.pointerType},o);if(this.config(Jt)){var s=this.getPageHash();""!==s&&"#"!==s&&(r["page hash"]=s)}this.track(a,r,{useBeacon:e})}}},n.onLink=function(t,e){var n=Boolean(this.config(_t)),i=this.config(Bt),o=new RegExp("(?:"+i.join("|")+")($|&)","i").test(e.pathname);this.config(Pt)&&o&&(dn(et,e.href),e.target!==M&&ln.leftClick(t)&&(e.setAttribute(F,1),n||(t.preventDefault(),t.stopPropagation(),setTimeout((function(){e.click()}),this.config(jt))))),this.config(Mt)&&!o&&ln.isOutgoingLink(e.hostname)&&(dn(rt,e.href),e.target!==M&&ln.leftClick(t)&&(e.setAttribute(F,1),n||(t.preventDefault(),t.stopPropagation(),setTimeout((function(){e.click()}),this.config($t)))))},n.downloaded=function(t){var e=Boolean(this.config(_t));this.track(et,{url:t},{useBeacon:e})},n.outgoing=function(t){var e=Boolean(this.config(_t));this.track(rt,{url:t},{useBeacon:e})},n.onUnload=function(){this.isUnloading||(this.isUnloading=!0,this._updateDurations(V,X),this.sendBeacons(R))},n.onPageStateChange=function(t){var e=t.newState,n=t.oldState;switch(e){case J:this._updateDurations(n,e),this.sendBeacons(),this._touch();break;case K:case V:this._updateDurations(n,e),this.sendBeacons();break;case X:this.onUnload()}},n.onScroll=function(t){this._touch();var e=Le();this.pending.filter((function(t){return t.lifecycle===R})).forEach((function(t){t.meta[L]=Math.min(1,Math.max(e,t.meta[L]||0))}))},n.autoDecorate=function(t){var e=this.config(Nt);if(e){for(var n,i=be(e)?[e]:ke(e)?e:[],o=0;o