;window.vndo=window.vndo||{};window.vndo.q=window.vndo.q||[];if(!window.vndo._started){window.vndo._started=!0;window.vndo.version='1.0.0';window.vndo.publishedAt='2023-07-18 19:44:37';window.vndo.iud=(new Date()).getTime();window.vndo._ids={};window.vndo.dataLayer=[];window.vndo.setDoc=function(e){if(e){window.vndo.doc=e} else{window.vndo.doc=document}};window.vndo.loadScript=function(e,n,o,d){var t,i=e.getElementsByTagName('head')[0];if(e.getElementById(n)){if(d)d();return};t=e.createElement('script');t.id=n;t.type='text/javascript';t.async=!0;if(d){t.onload=d};t.src=o;i.insertBefore(t,i.lastChild)};window.vndo.loadTagContainer=function(e){window.vndo.loadScript(document,e,'https://cdn.vend-o.app/containers/'+e+'.min.js?cb='+(new Date).getTime(),function(){window.vndo._ids['c_'+e]['status']='ok'})};window.vndo.lfp=function(){var e;for(var n in window.vndo.q){e=typeof window.vndo.q[n].id!='undefined'?window.vndo.q[n].id:-1;dl=typeof window.vndo.q[n].dl!='undefined'?window.vndo.q[n].dl:null;if(e>=0&&typeof window.vndo._ids['c_'+e]=='undefined'){window.vndo._ids['c_'+e]=window.vndo.q[n];window.vndo._ids['c_'+e]['status']='processing';window.vndo._ids['c_'+e]['dl']=dl;window.vndo.loadTagContainer(e)}}};window.vndo.q.push=function(e){if(typeof e.id=='undefined'||typeof window.vndo._ids['c_'+e.id]!='undefined'){return};e['status']='processing';window.vndo._ids['c_'+e.id]=e;window.vndo.loadTagContainer(e.id);return Array.prototype.push.apply(this,[e])};window.vndo.loadTag=function(n,t,d,o,i,r,s){var w=window.vndo.doc.getElementsByTagName('head')[0],a=window.vndo.doc.getElementsByTagName('body')[0],e;if(window.vndo.doc.getElementById(n)&&n!='vendo-Html-html'){return} else if(!a){return setTimeout(function(){window.vndo.loadTag(n,t,d,o,i,r,s)},500)};t=t!=''?window.vndo.validateMacro(t,s,r):t;i=i!=''?window.vndo.validateMacro(i,s,r):i;switch(d){case'Javascript':e=window.vndo.doc.createElement('script');e.id=n;e.type='text/javascript';e.async=!0;if(o){e.onload=o};e.src=t;w.insertBefore(e,w.lastChild);break;case'Iframe':e=window.vndo.doc.createElement('iframe');e.id=n;if(o){e.onload=o};e.src=t;e.width=e.height=0;e.style.width=0;e.style.height=0;e.style.display='block';e.frameBorder=e.marginHeight=e.marginWidth=e.leftMargin=0;e.scrolling='no';a.append(e);break;case'Image':e=window.vndo.doc.createElement('img');e.id=n;if(o){e.onload=o};e.src=t;a.append(e);break;case'Html':if(!window.vndo.doc.getElementById(n)){e=window.vndo.doc.createElement('iframe');e.id=n;if(o&&o.length>0){e.onload=function(){for(var e in o){o[e]()}}};e.src='about:blank';e.width=e.height=0;e.style.width=0;e.style.height=0;e.style.display='block';e.frameBorder=e.marginHeight=e.marginWidth=e.leftMargin=0;e.scrolling='no';a.append(e);e.contentWindow.document.open();e.contentWindow.document.write('');e.contentWindow.document.close()} else{e=window.vndo.doc.getElementById(n)};var u=e.contentWindow.document.body,c=e.contentWindow.document.createRange();c.selectNode(e.contentWindow.document.getElementsByTagName('body')[0]);var l=c.createContextualFragment(i);u.appendChild(l);break}};window.vndo.unifyHTML=function(e){var t='',d=[],o=[];for(var n in e){switch(e[n].pixel.type){case'Javascript':case'Iframe':case'Image':o.push(e[n]['pixel']);break;case'Html':t=t+' \n '+e[n]['pixel'].src;htmlId=e[n].pixel.id;if(e[n].onload)d.push(e[n].onload);break}};if(t){o.push({'type':'Html','content':t,'id':htmlId,'onload':d})};return o};window.vndo.getPropertyValidate=function(n,e){var t=window.location;switch(n){case'Hostname':return t.hostname;break;case'Path':return t.pathname;break;case'Url':return t.href;break;case'Referrer':return window.vndo.doc.referrer;break;case'Id':return(e&&typeof e.target!=='undefined'&&typeof e.target.id!=='undefined')?e.target.id:'';break;case'Class':return(e&&typeof e.target!=='undefined'&&typeof e.target.className!=='undefined')?e.target.className:'';break;case'Tag':return(e&&typeof e.target!=='undefined'&&typeof e.target.localName!=='undefined')?e.target.localName:'';break;case'Value':return(e&&typeof e.target!=='undefined'&&typeof e.target.value!=='undefined')?e.target.value:'';break;case'Target':return(e&&typeof e.target!=='undefined'&&typeof e.target.target!=='undefined')?e.target.target:'';break;case'Text':return(e&&typeof e.target!=='undefined'&&typeof e.target.textContent!=='undefined')?e.target.textContent:'';break;case'Action':var d=(e&&typeof e.target!=='undefined'&&typeof e.target.action!=='undefined')?e.target.action.replace(t.protocol+'//'+t.host,''):'';return d;break;case'Method':var o=(e&&typeof e.target!=='undefined'&&typeof e.target.method!=='undefined')?e.target.method:'';o=!o&&e.method?e.method:o;return o;break;case'Ajaxurl':return(e&&typeof e.url!=='undefined')?e.url:'';break;case'Ajaxbodyresponse':return(e&&typeof e.responseText!=='undefined')?e.responseText:'';break;case'Ajaxbodyrequest':return(e&&typeof e.axbodyText!=='undefined')?e.axbodyText:'';break}};window.vndo.startsWith=function(e,n){return e.lastIndexOf(n,0)===0};window.vndo.endsWith=function(e,n){return e.indexOf(n,e.length-n.length)!==-1};window.vndo.getConditionValidate=function(n,t,o){var d=window.location,e=!0;switch(t){case'Equals':case'NotEquals':e=(n==o);e=('NotEquals'==t)?!e:e;break;case'Contains':case'NotContains':e=n.search(o)!=-1;e=('NotContains'==t)?!e:e;break;case'Starts':case'NotStarts':e=window.vndo.startsWith(n,o);e=('NotStarts'==t)?!e:e;break;case'Ends':case'NotEnds':e=window.vndo.endsWith(n,o);e=('NotEnds'==t)?!e:e;break;case'Selector':case'NotSelector':e=window.vndo.doc.body.querySelector(o);e=('NotSelector'==t)?!e:e;break;case'Regex':case'NotRegex':e=o.test(n);e=('NotRegex'==t)?!e:e;break;case'RegexIgnor':case'NotRegexIgnor':e=o.test(n+'i');e=('NotRegexIgnor'==t)?!e:e;break};return e};window.vndo.validateTrigger=function(e,n){var d=!0,o='';for(var t in e.trigger_conditions){if(e.trigger_conditions[t]){o=window.vndo.getPropertyValidate(e.trigger_conditions[t].property,n);if(!window.vndo.getConditionValidate(o,e.trigger_conditions[t].condition,e.trigger_conditions[t].value)){return!1}}};return d};window.vndo.validateMacro=function(e,d,t){var w=/\$\[([^\]]+)]/g,l={};if(window.location.search){var a=location.search.substr(1).split('&');for(var c in a){l[a[c].split('=')[0]]=a[c].split('=')[1]}};if(w.test(e)){var n=e.match(w);for(var o in n){switch(n[o].slice(2,-1)){case'PIXEL_ID':e=e.replace(n[o],d);break;case'CONT_ID':e=e.replace(n[o],t);break;case'TIMESTAMP':e=e.replace(n[o],(new Date()).getTime());break;case'UID':e=e.replace(n[o],window.vndo.iud);break;case'CURRENT_URL':e=e.replace(n[o],encodeURIComponent(window.vndo.getPropertyValidate('Url')));break;default:if(window.vndo.startsWith(n[o],'$[Q.')){var s=l[n[o].slice(4,-1)];e=e.replace(n[o],s?s:'')};if(window.vndo._ids['c_'+t].dl!=null&&window.vndo.startsWith(n[o],'$[DL.')){var i=n[o].slice(5,-1),r='';if(window.vndo._ids['c_'+t].dl.hasOwnProperty('push')){window.vndo._ids['c_'+t].dl.push(function(){window.vndo._ids['c_'+t].dl[i]=this.get(i)})};if(typeof window.vndo._ids['c_'+t].dl[i]!='undefined'){r=window.vndo._ids['c_'+t].dl[i]};e=e.replace(n[o],r)};break}}};return e};window.vndo.addEvent=function(e,n,t){if(n.addEventListener){n.addEventListener(e,t,!1)} else if(n.attachEvent){n.attachEvent('on'+e,t)}};window.vndo.propXMLRequest=function(){var e=window.XMLHttpRequest.prototype.open,n=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.open=function(){this.method=arguments[0];this.url=arguments[1];return e.apply(this,[].slice.call(arguments))};window.XMLHttpRequest.prototype.send=function(){var e=this,o=arguments[0];if(o instanceof FormData){var d={};for(const pair of o.entries()){d[pair[0]]=pair[1]};o=JSON.stringify(d)};var t=(e.method=='POST'&&o&&window.vndo.isJsonString(o)?JSON.parse(o):'');t=t&&t.length>0?t[0]:t;this.axbodyText=JSON.stringify(t);var i=window.setInterval(function(){if(e.readyState!=4){return};try{var n=(e.responseText&&window.vndo.isJsonString(e.responseText))?JSON.parse(e.responseText):e.responseText;n=n&&n.length>0&&(e.responseText&&window.vndo.isJsonString(e.responseText))?n[0]:n;window.vndo.dataLayer.push({'event':'ajaxSuccess','eventCategory':'AJAX '+e.method,'eventAction':e.url,'ajaxBody':t,'ajaxResponse':n});window.clearInterval(i)}catch(o){return}},1);return n.apply(this,[].slice.call(arguments))}};window.vndo.isJsonString=function(e){try{JSON.parse(e)}catch(n){return!1};return!0};window.vndo.addProtCustom=function(e,n,t){var o=n.prototype[e];n.prototype[e]=function(){var e=this,n=window.setInterval(function(){if(e.readyState!=4){return}(t)(e);window.clearInterval(n)},1);return o.apply(this,[].slice.call(arguments))}};window.vndo.lfp();window.vndo.setDoc();window.vndo.propXMLRequest()};