var MonsterInsights=function(){var lastClicked=[];var internalAsOutboundCategory='';this.setLastClicked=function(valuesArray,fieldsArray,tracked){valuesArray=typeof valuesArray!=='undefined'?valuesArray:[];fieldsArray=typeof fieldsArray!=='undefined'?fieldsArray:[];tracked=typeof tracked!=='undefined'?tracked:false;lastClicked.valuesArray=valuesArray;lastClicked.fieldsArray=fieldsArray;};this.getLastClicked=function(){return lastClicked;};this.setInternalAsOutboundCategory=function(category){internalAsOutboundCategory=category;};this.getInternalAsOutboundCategory=function(){return internalAsOutboundCategory;};this.sendEvent=function(fieldsArray){__gaTrackerSend([],fieldsArray);};function __gaTrackerIsDebug(){if(window.monsterinsights_debug_mode){return true;}else{return false;}}
function __gaTrackerSend(valuesArray,fieldsArray){valuesArray=typeof valuesArray!=='undefined'?valuesArray:[];fieldsArray=typeof fieldsArray!=='undefined'?fieldsArray:{};__gaTracker('send',fieldsArray);lastClicked.valuesArray=valuesArray;lastClicked.fieldsArray=fieldsArray;lastClicked.tracked=true;__gaTrackerLog('Tracked: '+valuesArray.type);__gaTrackerLog(lastClicked);}
function __gaTrackerNotSend(valuesArray){valuesArray=typeof valuesArray!=='undefined'?valuesArray:[];lastClicked.valuesArray=valuesArray;lastClicked.fieldsArray=[];lastClicked.tracked=false;__gaTrackerLog('Not Tracked: '+valuesArray.exit);__gaTrackerLog(lastClicked);}
function __gaTrackerLog(message){if(__gaTrackerIsDebug()){console.dir(message);}}
function __gaTrackerStringTrim(x){return x.replace(/^\s+|\s+$/gm,'');}
function __gaTrackerGetDomain(){var i=0,currentdomain=document.domain,p=currentdomain.split('.'),s='_gd'+(new Date()).getTime();while(i<(p.length-1)&&document.cookie.indexOf(s+'='+s)==-1){currentdomain=p.slice(-1-(++i)).join('.');document.cookie=s+"="+s+";domain="+currentdomain+";";}
document.cookie=s+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain="+currentdomain+";";return currentdomain;}
function __gaTrackerGetExtension(extension){extension=extension.toString();extension=extension.substring(0,(extension.indexOf("#")==-1)?extension.length:extension.indexOf("#"));extension=extension.substring(0,(extension.indexOf("?")==-1)?extension.length:extension.indexOf("?"));extension=extension.substring(extension.lastIndexOf("/")+1,extension.length);if(extension.length>0&&extension.indexOf('.')!==-1){extension=extension.substring(extension.indexOf(".")+1);return extension;}else{return "";}}
function __gaTrackerLoaded(){return typeof(__gaTracker)!=='undefined'&&__gaTracker&&__gaTracker.hasOwnProperty("loaded")&&__gaTracker.loaded==true;}
function __gaTrackerTrackedClick(event){return event.which==1||event.which==2||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey;}
function __gaTrackerGetDownloadExtensions(){var download_extensions=[];if(typeof monsterinsights_frontend.download_extensions=='string'){download_extensions=monsterinsights_frontend.download_extensions.split(",");}
return download_extensions;}
function __gaTrackerGetInboundPaths(){var inbound_paths=[];if(typeof monsterinsights_frontend.inbound_paths=='string'){inbound_paths=JSON.parse(monsterinsights_frontend.inbound_paths);}
return inbound_paths;}
function __gaTrackerTrackedClickType(event){if(event.which==1){return 'event.which=1';}else if(event.which==2){return 'event.which=2';}else if(event.metaKey){return 'metaKey';}else if(event.ctrlKey){return 'ctrlKey';}else if(event.shiftKey){return 'shiftKey';}else if(event.altKey){return 'altKey';}else{return '';}}
function __gaTrackerLinkType(el){var download_extensions=__gaTrackerGetDownloadExtensions();var inbound_paths=__gaTrackerGetInboundPaths();var type='unknown';var link=el.href;var extension=__gaTrackerGetExtension(el.href);var currentdomain=__gaTrackerGetDomain();var hostname=el.hostname;var protocol=el.protocol;var pathname=el.pathname;link=link.toString();var index,len;var category=el.getAttribute("data-vars-ga-category");if(category){return category;}
if(link.match(/^javascript\:/i)){type='internal';}else if(protocol&&protocol.length>0&&(__gaTrackerStringTrim(protocol)=='tel'||__gaTrackerStringTrim(protocol)=='tel:')){type="tel";}else if(protocol&&protocol.length>0&&(__gaTrackerStringTrim(protocol)=='mailto'||__gaTrackerStringTrim(protocol)=='mailto:')){type="mailto";}else if(hostname&&currentdomain&&hostname.length>0&&currentdomain.length>0&&!hostname.endsWith('.'+currentdomain)&&hostname!==currentdomain){type="external";}else if(pathname&&JSON.stringify(inbound_paths)!="{}"&&pathname.length>0){var inbound_paths_length=inbound_paths.length;for(var inbound_paths_index=0;inbound_paths_index<inbound_paths_length;inbound_paths_index++){if(inbound_paths[inbound_paths_index].path&&inbound_paths[inbound_paths_index].label&&inbound_paths[inbound_paths_index].path.length>0&&inbound_paths[inbound_paths_index].label.length>0&&pathname.startsWith(inbound_paths[inbound_paths_index].path)){type="internal-as-outbound";internalAsOutboundCategory="outbound-link-"+inbound_paths[inbound_paths_index].label;break;}}}else if(hostname&&window.monsterinsights_experimental_mode&&hostname.length>0&&document.domain.length>0&&hostname!==document.domain){type="cross-hostname";}
if(extension&&(type==='unknown'||'external'===type)&&download_extensions.length>0&&extension.length>0){for(index=0,len=download_extensions.length;index<len;++index){if(download_extensions[index].length>0&&(link.endsWith(download_extensions[index])||download_extensions[index]==extension)){type="download";break;}}}
if(type==='unknown'){type='internal';}
return type;}
function __gaTrackerLinkTarget(el,event){var target=(el.target&&!el.target.match(/^_(self|parent|top)$/i))?el.target:false;if(event.ctrlKey||event.shiftKey||event.metaKey||event.which==2){target="_blank";}
return target;}
function __gaTrackerGetTitle(el){if(el.getAttribute("data-vars-ga-label")&&el.getAttribute("data-vars-ga-label").replace(/\n/ig,'')){return el.getAttribute("data-vars-ga-label").replace(/\n/ig,'');}else if(el.title&&el.title.replace(/\n/ig,'')){return el.title.replace(/\n/ig,'');}else if(el.innerText&&el.innerText.replace(/\n/ig,'')){return el.innerText.replace(/\n/ig,'');}else if(el.getAttribute('aria-label')&&el.getAttribute('aria-label').replace(/\n/ig,'')){return el.getAttribute('aria-label').replace(/\n/ig,'');}else if(el.alt&&el.alt.replace(/\n/ig,'')){return el.alt.replace(/\n/ig,'');}else if(el.textContent&&el.textContent.replace(/\n/ig,'')){return el.textContent.replace(/\n/ig,'');}else{return undefined;}}
function __gaTrackerGetInnerTitle(el){var children=el.children;var count=0;var child;var value;for(var i=0;i<children.length;i++){child=children[i];value=__gaTrackerGetTitle(child);if(value){return value;}
if(count==99){return undefined;}
count++;}
return undefined;}
function __gaTrackerClickEvent(event){var el=event.srcElement||event.target;var valuesArray=[];var fieldsArray;valuesArray.el=el;valuesArray.ga_loaded=__gaTrackerLoaded();valuesArray.click_type=__gaTrackerTrackedClickType(event);if(!__gaTrackerLoaded()||!__gaTrackerTrackedClick(event)){valuesArray.exit='loaded';__gaTrackerNotSend(valuesArray);return;}
while(el&&(typeof el.tagName=='undefined'||el.tagName.toLowerCase()!='a'||!el.href)){el=el.parentNode;}
if(el&&el.href&&!el.hasAttribute('xlink:href')){var link=el.href;var extension=__gaTrackerGetExtension(el.href);var download_extensions=__gaTrackerGetDownloadExtensions();var inbound_paths=__gaTrackerGetInboundPaths();var home_url=monsterinsights_frontend.home_url;var currentdomain=__gaTrackerGetDomain();var type=__gaTrackerLinkType(el);var target=__gaTrackerLinkTarget(el,event);var action=el.getAttribute("data-vars-ga-action");var label=el.getAttribute("data-vars-ga-label");valuesArray.el=el;valuesArray.el_href=el.href;valuesArray.el_protocol=el.protocol;valuesArray.el_hostname=el.hostname;valuesArray.el_port=el.port;valuesArray.el_pathname=el.pathname;valuesArray.el_search=el.search;valuesArray.el_hash=el.hash;valuesArray.el_host=el.host;valuesArray.debug_mode=__gaTrackerIsDebug();valuesArray.download_extensions=download_extensions;valuesArray.inbound_paths=inbound_paths;valuesArray.home_url=home_url;valuesArray.link=link;valuesArray.extension=extension;valuesArray.type=type;valuesArray.target=target;valuesArray.title=__gaTrackerGetTitle(el);if(!valuesArray.label&&!valuesArray.title){valuesArray.title=__gaTrackerGetInnerTitle(el);}
if(type!=='internal'&&type!=='javascript'){var __gaTrackerHitBackRun=false;var __gaTrackerHitBack=function(){if(__gaTrackerHitBackRun){return;}
__gaTrackerHitBackRun=true;window.location.href=link;};var __gaTrackerNoRedirectExternal=function(){valuesArray.exit='external';__gaTrackerNotSend(valuesArray);};var __gaTrackerNoRedirectInboundAsExternal=function(){valuesArray.exit='internal-as-outbound';__gaTrackerNotSend(valuesArray);};var __gaTrackerNoRedirectCrossHostname=function(){valuesArray.exit='cross-hostname';__gaTrackerNotSend(valuesArray);};if(target||type=='mailto'||type=='tel'){if(type=='download'){fieldsArray={hitType:'event',eventCategory:'download',eventAction:action||link,eventLabel:label||valuesArray.title,};__gaTrackerSend(valuesArray,fieldsArray);}else if(type=='tel'){fieldsArray={hitType:'event',eventCategory:'tel',eventAction:action||link,eventLabel:label||valuesArray.title.replace('tel:',''),};__gaTrackerSend(valuesArray,fieldsArray);}else if(type=='mailto'){fieldsArray={hitType:'event',eventCategory:'mailto',eventAction:action||link,eventLabel:label||valuesArray.title.replace('mailto:',''),};__gaTrackerSend(valuesArray,fieldsArray);}else if(type=='internal-as-outbound'){fieldsArray={hitType:'event',eventCategory:internalAsOutboundCategory,eventAction:action||link,eventLabel:label||valuesArray.title,};__gaTrackerSend(valuesArray,fieldsArray);}else if(type=='external'){fieldsArray={hitType:'event',eventCategory:'outbound-link',eventAction:action||link,eventLabel:label||valuesArray.title,};__gaTrackerSend(valuesArray,fieldsArray);}else if(type=='cross-hostname'){fieldsArray={hitType:'event',eventCategory:'cross-hostname',eventAction:action||link,eventLabel:label||valuesArray.title,};__gaTrackerSend(valuesArray,fieldsArray);}else{if(type&&type!='internal'){fieldsArray={hitType:'event',eventCategory:type,eventAction:action||link,eventLabel:label||valuesArray.title,};__gaTrackerSend(valuesArray,fieldsArray);}else{valuesArray.exit='type';__gaTrackerNotSend(valuesArray);}}}else{if(type!='cross-hostname'&&type!='external'&&type!='internal-as-outbound'){if(!event.defaultPrevented){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}}
if(type=='download'){fieldsArray={hitType:'event',eventCategory:'download',eventAction:action||link,eventLabel:label||valuesArray.title,hitCallback:__gaTrackerHitBack,};__gaTrackerSend(valuesArray,fieldsArray);}else if(type=='internal-as-outbound'){window.onbeforeunload=function(e){if(!event.defaultPrevented){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
fieldsArray={hitType:'event',eventCategory:internalAsOutboundCategory,eventAction:action||link,eventLabel:label||valuesArray.title,hitCallback:__gaTrackerHitBack,};if(navigator.sendBeacon){fieldsArray.transport='beacon';}
__gaTrackerSend(valuesArray,fieldsArray);setTimeout(__gaTrackerHitBack,1000);};}else if(type=='external'){window.onbeforeunload=function(e){if(!event.defaultPrevented){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
fieldsArray={hitType:'event',eventCategory:'outbound-link',eventAction:action||link,eventLabel:label||valuesArray.title,hitCallback:__gaTrackerHitBack,};if(navigator.sendBeacon){fieldsArray.transport='beacon';}
__gaTrackerSend(valuesArray,fieldsArray);setTimeout(__gaTrackerHitBack,1000);};}else if(type=='cross-hostname'){window.onbeforeunload=function(e){if(!event.defaultPrevented){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
fieldsArray={hitType:'event',eventCategory:'cross-hostname',eventAction:action||link,eventLabel:label||valuesArray.title,hitCallback:__gaTrackerHitBack,};if(navigator.sendBeacon){fieldsArray.transport='beacon';}
__gaTrackerSend(valuesArray,fieldsArray);setTimeout(__gaTrackerHitBack,1000);};}else{if(type&&type!=='internal'){fieldsArray={hitType:'event',eventCategory:type,eventAction:action||link,eventLabel:label||valuesArray.title,hitCallback:__gaTrackerHitBack,};__gaTrackerSend(valuesArray,fieldsArray);}else{valuesArray.exit='type';__gaTrackerNotSend(valuesArray);}}
if(type!='external'&&type!='cross-hostname'&&type!='internal-as-outbound'){setTimeout(__gaTrackerHitBack,1000);}else{if(type=='external'){setTimeout(__gaTrackerNoRedirectExternal,1100);}else if(type=='cross-hostname'){setTimeout(__gaTrackerNoRedirectCrossHostname,1100);}else{setTimeout(__gaTrackerNoRedirectInboundAsExternal,1100);}}}}else{valuesArray.exit='internal';__gaTrackerNotSend(valuesArray);}}else{valuesArray.exit='notlink';__gaTrackerNotSend(valuesArray);}}
var prevHash=window.location.hash;function __gaTrackerHashChangeEvent(){if(monsterinsights_frontend.hash_tracking==="true"&&prevHash!=window.location.hash){prevHash=window.location.hash;__gaTracker('set','page',location.pathname+location.search+location.hash);__gaTracker('send','pageview');__gaTrackerLog("Hash change to: "+location.pathname+location.search+location.hash);}else{__gaTrackerLog("Hash change to (untracked): "+location.pathname+location.search+location.hash);}}
var __gaTrackerWindow=window;if(__gaTrackerWindow.addEventListener){__gaTrackerWindow.addEventListener("load",function(){document.body.addEventListener("click",__gaTrackerClickEvent,false);},false);window.addEventListener("hashchange",__gaTrackerHashChangeEvent,false);}else{if(__gaTrackerWindow.attachEvent){__gaTrackerWindow.attachEvent("onload",function(){document.body.attachEvent("onclick",__gaTrackerClickEvent);});window.attachEvent("onhashchange",__gaTrackerHashChangeEvent);}}
if(typeof String.prototype.endsWith!=='function'){String.prototype.endsWith=function(suffix){return this.indexOf(suffix,this.length-suffix.length)!==-1;};}
if(typeof String.prototype.startsWith!=='function'){String.prototype.startsWith=function(prefix){return this.indexOf(prefix)===0;};}
if(typeof Array.prototype.lastIndexOf!=='function'){Array.prototype.lastIndexOf=function(searchElement){'use strict';if(this===void 0||this===null){throw new TypeError();}
var n,k,t=Object(this),len=t.length>>>0;if(len===0){return-1;}
n=len-1;if(arguments.length>1){n=Number(arguments[1]);if(n!=n){n=0;}
else if(n!=0&&n!=(1/0)&&n!=-(1/0)){n=(n>0||-1)*Math.floor(Math.abs(n));}}
for(k=n>=0?Math.min(n,len-1):len-Math.abs(n);k>=0;k--){if(k in t&&t[k]===searchElement){return k;}}
return-1;};}};var MonsterInsightsObject=new MonsterInsights();