From 86a8c2a979bfdd7bba7bf9cc38f2ff7fe26f649f Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 30 Mar 2019 15:37:13 +0100 Subject: [PATCH] update piwik.js --- static/piwik.js | 138 ++++++++++++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 56 deletions(-) diff --git a/static/piwik.js b/static/piwik.js index 72c5810..f15eae0 100644 --- a/static/piwik.js +++ b/static/piwik.js @@ -4,7 +4,7 @@ * JavaScript tracking client * * @link https://piwik.org - * @source https://github.com/piwik/piwik/blob/master/js/piwik.js + * @source https://github.com/matomo-org/matomo/blob/master/js/piwik.js * @license https://piwik.org/free-software/bsd/ BSD-3 Clause (also in js/LICENSE.txt) * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause */ @@ -18,60 +18,86 @@ var I="000000";var t=function(ac,ad){return(I+(ad||0)).slice(-ac)};var z="\\u00" }else{at=null}}else{if(typeof at.toJSON=="function"&&((ae!=N&&ae!=O&&ae!=E)||r.call(at,"toJSON"))){at=at.toJSON(ai)}}}if(ag){at=ag.call(aA,ai,at)}if(at===null){return"null"}ae=u.call(at);if(ae==A){return""+at}else{if(ae==N){return at>-1/0&&at<1/0?""+at:"null"}else{if(ae==O){return C(""+at)}}}if(typeof at=="object"){for(af=aj.length;af--;){if(aj[af]===at){throw aa()}}aj.push(at);ar=[];av=ac;ac+=ax;if(ae==E){for(ah=0,af=at.length;ah0){for(ad="",af>10&&(af=10); ad.length=48&&ad<=57||ad>=97&&ad<=102||ad>=65&&ad<=70)){H()}}ag+=M("0x"+ah.slice(ae,G));break;default:H()}}else{if(ad==34){break}ad=ah.charCodeAt(G);ae=G;while(ad>=32&&ad!=92&&ad!=34){ad=ah.charCodeAt(++G)}ag+=ah.slice(ae,G)}}}if(ah.charCodeAt(G)==34){G++; return ag}H();default:ae=G;if(ad==45){ai=true;ad=ah.charCodeAt(++G)}if(ad>=48&&ad<=57){if(ad==48&&((ad=ah.charCodeAt(G+1)),ad>=48&&ad<=57)){H()}ai=false;for(;G=48&&ad<=57);G++){}if(ah.charCodeAt(G)==46){ac=++G;for(;ac=48&&ad<=57);ac++){}if(ac==G){H()}G=ac}ad=ah.charCodeAt(G);if(ad==101||ad==69){ad=ah.charCodeAt(++G);if(ad==43||ad==45){G++}for(ac=G;ac=48&&ad<=57);ac++){}if(ac==G){H()}G=ac}return +ah.slice(ae,G)}if(ai){H()}if(ah.slice(G,G+4)=="true"){G+=4;return true}else{if(ah.slice(G,G+5)=="false"){G+=5;return false}else{if(ah.slice(G,G+4)=="null"){G+=4;return null}}}H()}}return"$"};var W=function(ad){var ac,ae;if(ad=="$"){H()}if(typeof ad=="string"){if((F?ad.charAt(0):ad[0])=="@"){return ad.slice(1)}if(ad=="["){ac=[];for(;;ae||(ae=true)){ad=y();if(ad=="]"){break}if(ae){if(ad==","){ad=y();if(ad=="]"){H()}}else{H()}}if(ad==","){H()}ac.push(W(ad))}return ac}else{if(ad=="{"){ac={};for(;;ae||(ae=true)){ad=y(); -if(ad=="}"){break}if(ae){if(ad==","){ad=y();if(ad=="}"){H()}}else{H()}}if(ad==","||typeof ad!="string"||(F?ad.charAt(0):ad[0])!="@"||y()!=":"){H()}ac[ad.slice(1)]=W(y())}return ac}}H()}return ad};var P=function(ae,ad,af){var ac=w(ae,ad,af);if(ac===L){delete ae[ad]}else{ae[ad]=ac}};var w=function(af,ae,ag){var ad=af[ae],ac;if(typeof ad=="object"&&ad){if(u.call(ad)==E){for(ac=ad.length;ac--;){P(ad,ac,ag)}}else{m(ad,function(ah){P(ad,ah,ag)})}}return ag.call(af,ae,ad)};V.parse=function(ae,af){var ac,ad;G=0;X=""+ae;ac=W(y());if(y()!="$"){H()}G=X=null;return af&&u.call(af)==U?w((ad={},ad[""]=ac,ad),"",af):ac}}}V.runInContext=j;return V}if(h&&!c){j(i,h)}else{var f=i.JSON,k=i.JSON3,d=false;var g=j(i,(i.JSON3={noConflict:function(){if(!d){d=true;i.JSON=f;i.JSON3=k;f=k=null}return g}}));i.JSON={parse:g.parse,stringify:g.stringify}}if(c){define(function(){return g})}}).call(this);JSON_PIWIK=a})()}if(typeof _paq!=="object"){_paq=[]}if(typeof window.Piwik!=="object"){window.Piwik=(function(){var r,b={},y={},G=document,h=navigator,W=screen,T=window,i=T.performance||T.mozPerformance||T.msPerformance||T.webkitPerformance,t=T.encodeURIComponent,S=T.decodeURIComponent,l=unescape,I=[],E,e,ad=[],x=0,m=false; -function p(ak){try{return S(ak)}catch(al){return unescape(ak)}}function J(al){var ak=typeof al;return ak!=="undefined"}function A(ak){return typeof ak==="function"}function V(ak){return typeof ak==="object"}function w(ak){return typeof ak==="string"||ak instanceof String}function B(al){if(!al){return true}var ak;var am=true;for(ak in al){if(Object.prototype.hasOwnProperty.call(al,ak)){am=false}}return am}function ag(ak){var al=typeof console;if(al!=="undefined"&&console&&console.error){console.error(ak)}}function ac(){var ap,ao,ar,al,ak;for(ap=0;ap0;if(an){aq=ar.split("::");am=aq[0];ar=aq[1];if("object"===typeof e[am]&&"function"===typeof e[am][ar]){e[am][ar].apply(e[am],al)}else{if(ak){ad.push(ak)}}}else{for(ao=0;ao0;if(at){aq=ar.split(".");if(am&&"object"===typeof am[aq[0]]){am=am[aq[0]]; -ar=aq[1]}else{if(ak){ad.push(ak);break}}}if(am[ar]){am[ar].apply(am,al)}else{var au="The method '"+ar+'\' was not found in "_paq" variable. Please have a look at the Piwik tracker documentation: https://developer.piwik.org/api-reference/tracking-javascript';ag(au);if(!at){throw new TypeError(au)}}if(ar==="addTracker"){break}if(ar==="setTrackerUrl"||ar==="setSiteId"){break}}else{ar.apply(I[ao],al)}}}}}function aj(an,am,al,ak){if(an.addEventListener){an.addEventListener(am,al,ak);return true}if(an.attachEvent){return an.attachEvent("on"+am,al)}an["on"+am]=al}function n(ak){if(G.readyState==="complete"){ak()}else{if(T.addEventListener){T.addEventListener("load",ak,false)}else{if(T.attachEvent){T.attachEvent("onload",ak)}}}}function q(an){var ak=false;if(G.attachEvent){ak=G.readyState==="complete"}else{ak=G.readyState!=="loading"}if(ak){an();return}var am;if(G.addEventListener){aj(G,"DOMContentLoaded",function al(){G.removeEventListener("DOMContentLoaded",al,false);if(!ak){ak=true;an()}})}else{if(G.attachEvent){G.attachEvent("onreadystatechange",function al(){if(G.readyState==="complete"){G.detachEvent("onreadystatechange",al); -if(!ak){ak=true;an()}}});if(G.documentElement.doScroll&&T===T.top){(function al(){if(!ak){try{G.documentElement.doScroll("left")}catch(ao){setTimeout(al,0);return}ak=true;an()}}())}}}aj(T,"load",function(){if(!ak){ak=true;an()}},false)}function Z(al,aq,ar){if(!al){return""}var ak="",an,am,ao,ap;for(an in b){if(Object.prototype.hasOwnProperty.call(b,an)){ap=b[an]&&"function"===typeof b[an][al];if(ap){am=b[an][al];ao=am(aq||{},ar);if(ao){ak+=ao}}}}return ak}function ae(){var ak;m=true;Z("unload");if(r){do{ak=new Date()}while(ak.getTimeAlias()=0;ap--){ao=aq[ap].split("=")[0];if(ao===am){aq.splice(ap,1)}}var au=aq.join("&");if(au){ar=ar+"?"+au}if(at){ar+="#"+at}}return ar}function f(am,al){var ak="[\\?&#]"+al+"=([^&#]*)";var ao=new RegExp(ak);var an=ao.exec(am);return an?S(an[1]):""}function a(ak){if(ak&&String(ak)===ak){return ak.replace(/^\s+|\s+$/g,"")}return ak}function D(ak){return unescape(t(ak))}function ai(aA){var am=function(aG,aF){return(aG<>>(32-aF))},aB=function(aI){var aG="",aH,aF;for(aH=7;aH>=0;aH--){aF=(aI>>>(aH*4))&15;aG+=aF.toString(16)}return aG},ap,aD,aC,al=[],au=1732584193,ar=4023233417,aq=2562383102,ao=271733878,an=3285377520,az,ay,ax,aw,av,aE,ak,at=[];aA=D(aA);ak=aA.length;for(aD=0;aD>>29);at.push((ak<<3)&4294967295);for(ap=0;apap.offsetWidth+ap.scrollLeft||ar+av-awap.offsetHeight+ap.scrollTop||ax+at-awat?-1:1});if(ak.length<=1){return ak}var al=0;var an=0;var ao=[];var am;am=ak[al++];while(am){if(am===ak[al]){an=ao.push(al) -}am=ak[al++]||null}while(an--){ak.splice(ao[an],1)}return ak},getAttributeValueFromNode:function(ao,am){if(!this.hasNodeAttribute(ao,am)){return}if(ao&&ao.getAttribute){return ao.getAttribute(am)}if(!ao||!ao.attributes){return}var an=(typeof ao.attributes[am]);if("undefined"===an){return}if(ao.attributes[am].value){return ao.attributes[am].value}if(ao.attributes[am].nodeValue){return ao.attributes[am].nodeValue}var al;var ak=ao.attributes;if(!ak){return}for(al=0;al1000){break}ak++}},findPieceNode:function(al){var ak;ak=ab.findFirstNodeHavingAttribute(al,this.CONTENT_PIECE_ATTR);if(!ak){ak=ab.findFirstNodeHavingClass(al,this.CONTENT_PIECE_CLASS)}if(ak){return ak}return al},findTargetNodeNoDefault:function(ak){if(!ak){return}var al=ab.findFirstNodeHavingAttributeWithValue(ak,this.CONTENT_TARGET_ATTR); -if(al){return al}al=ab.findFirstNodeHavingAttribute(ak,this.CONTENT_TARGET_ATTR);if(al){return al}al=ab.findFirstNodeHavingClass(ak,this.CONTENT_TARGET_CLASS);if(al){return al}},findTargetNode:function(ak){var al=this.findTargetNodeNoDefault(ak);if(al){return al}return ak},findContentName:function(al){if(!al){return}var ao=ab.findFirstNodeHavingAttributeWithValue(al,this.CONTENT_NAME_ATTR);if(ao){return ab.getAttributeValueFromNode(ao,this.CONTENT_NAME_ATTR)}var ak=this.findContentPiece(al);if(ak){return this.removeDomainIfIsInLink(ak)}if(ab.hasNodeAttributeWithValue(al,"title")){return ab.getAttributeValueFromNode(al,"title")}var am=this.findPieceNode(al);if(ab.hasNodeAttributeWithValue(am,"title")){return ab.getAttributeValueFromNode(am,"title")}var an=this.findTargetNode(al);if(ab.hasNodeAttributeWithValue(an,"title")){return ab.getAttributeValueFromNode(an,"title")}},findContentPiece:function(al){if(!al){return}var an=ab.findFirstNodeHavingAttributeWithValue(al,this.CONTENT_PIECE_ATTR); -if(an){return ab.getAttributeValueFromNode(an,this.CONTENT_PIECE_ATTR)}var ak=this.findPieceNode(al);var am=this.findMediaUrlInNode(ak);if(am){return this.toAbsoluteUrl(am)}},findContentTarget:function(am){if(!am){return}var an=this.findTargetNode(am);if(ab.hasNodeAttributeWithValue(an,this.CONTENT_TARGET_ATTR)){return ab.getAttributeValueFromNode(an,this.CONTENT_TARGET_ATTR)}var al;if(ab.hasNodeAttributeWithValue(an,"href")){al=ab.getAttributeValueFromNode(an,"href");return this.toAbsoluteUrl(al)}var ak=this.findPieceNode(am);if(ab.hasNodeAttributeWithValue(ak,"href")){al=ab.getAttributeValueFromNode(ak,"href");return this.toAbsoluteUrl(al)}},isSameDomain:function(ak){if(!ak||!ak.indexOf){return false}if(0===ak.indexOf(this.getLocation().origin)){return true}var al=ak.indexOf(this.getLocation().host);if(8>=al&&0<=al){return true}return false},removeDomainIfIsInLink:function(am){var al="^https?://[^/]+";var ak="^.*//[^/]+";if(am&&am.search&&-1!==am.search(new RegExp(al))&&this.isSameDomain(am)){am=am.replace(new RegExp(ak),""); -if(!am){am="/"}}return am},findMediaUrlInNode:function(ao){if(!ao){return}var am=["img","embed","video","audio"];var ak=ao.nodeName.toLowerCase();if(-1!==M(am,ak)&&ab.findFirstNodeHavingAttributeWithValue(ao,"src")){var an=ab.findFirstNodeHavingAttributeWithValue(ao,"src");return ab.getAttributeValueFromNode(an,"src")}if(ak==="object"&&ab.hasNodeAttributeWithValue(ao,"data")){return ab.getAttributeValueFromNode(ao,"data")}if(ak==="object"){var ap=ab.findNodesByTagName(ao,"param");if(ap&&ap.length){var al;for(al=0;al0}var al=an.clientWidth;if(T.innerWidth&&al>T.innerWidth){al=T.innerWidth}var ak=an.clientHeight;if(T.innerHeight&&ak>T.innerHeight){ak=T.innerHeight}return((ao.bottom>0||am)&&ao.right>0&&ao.left=0){c7=c7.slice(0,c6)}c6=c7.lastIndexOf("/");if(c6!==c7.length-1){c7=c7.slice(0,c6+1)}return c7+c5}function cx(c7,c5){var c6;c7=String(c7).toLowerCase();c5=String(c5).toLowerCase();if(c7===c5){return true}if(c5.slice(0,1)==="."){if(c7===c5.slice(1)){return true}c6=c7.length-c5.length;if((c6>0)&&(c7.slice(c6)===c5)){return true}}return false}function cc(c5){var c6=document.createElement("a"); -if(c5.indexOf("//")!==0&&c5.indexOf("http")!==0){if(c5.indexOf("*")===0){c5=c5.substr(1)}if(c5.indexOf(".")===0){c5=c5.substr(1)}c5="http://"+c5}c6.href=v.toAbsoluteUrl(c5);if(c6.pathname){return c6.pathname}return""}function aW(c6,c5){if(!af(c5,"/")){c5="/"+c5}if(!af(c6,"/")){c6="/"+c6}var c7=(c5==="/"||c5==="/*");if(c7){return true}if(c6===c5){return true}c5=String(c5).toLowerCase();c6=String(c6).toLowerCase();if(R(c5,"*")){c5=c5.slice(0,-1);c7=(!c5||c5==="/");if(c7){return true}if(c6===c5){return true}return c6.indexOf(c5)===0}if(!R(c6,"/")){c6+="/"}if(!R(c5,"/")){c5+="/"}return c6.indexOf(c5)===0}function an(c9,db){var c6,c5,c7,c8,da;for(c6=0;c60)&&(c8.slice(c7)===c5)){return true}}}return false}function ch(c5,c7){c5=c5.replace("send_image=0","send_image=1"); -var c6=new Image(1,1);c6.onload=function(){E=0;if(typeof c7==="function"){c7()}};c6.src=ay+(ay.indexOf("?")<0?"?":"&")+c5}function aZ(c6){var da="object"===typeof h&&"function"===typeof h.sendBeacon&&"function"===typeof Blob;if(!da){return false}var c9={type:"application/x-www-form-urlencoded; charset=UTF-8"};var c8=false;try{var c5=new Blob([c6],c9);c8=h.sendBeacon(ay,c5)}catch(c7){return false}return c8}function cS(c6,c7,c5){if(!J(c5)||null===c5){c5=true}if(m&&aZ(c6)){return}setTimeout(function(){if(m&&aZ(c6)){return}var da;try{var c9=T.XMLHttpRequest?new T.XMLHttpRequest():T.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;c9.open("POST",ay,true);c9.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var db=m&&aZ(c6);if(!db&&c5){ch(c6,c7)}}else{if(this.readyState===4&&(typeof c7==="function")){c7()}}};c9.setRequestHeader("Content-Type",co);c9.send(c6)}catch(c8){da=m&&aZ(c6);if(!da&&c5){ch(c6,c7)}}},50)}function b7(c6){var c5=new Date(); -var c7=c5.getTime()+c6;if(!r||c7>r){r=c7}}function cf(c5){if(b3||!aY||!bt){return}b3=setTimeout(function c6(){b3=null;if(!a5){a5=(!G.hasFocus||G.hasFocus())}if(!a5){cf(aY);return}if(bI()){return}var c7=new Date(),c8=aY-(c7.getTime()-cN);c8=Math.min(aY,c8);cf(c8)},c5||aY)}function bB(){if(!b3){return}clearTimeout(b3);b3=null}function a3(){a5=true;if(bI()){return}cf()}function at(){bB()}function c2(){if(aH||!aY){return}aH=true;aj(T,"focus",a3);aj(T,"blur",at);cf()}function ct(c9){var c6=new Date();var c5=c6.getTime();cN=c5;if(cs&&c52000){cS(c6,c7)}else{ch(c6,c7)}b7(c5)})}if(!aH){c2()}else{cf()}}function cb(c5){if(cG){return false}return(c5&&c5.length)}function c1(c7,c5){if(!cb(c7)){return}if(!bt){cA.push(c7);return}var c6='{"requests":["?'+c7.join('","?')+'"]}'; -ct(function(){cS(c6,null,false);b7(c5)})}function aM(c5){return bc+c5+"."+bX+"."+bg}function bW(){if(bd){return"0"}if(!J(h.cookieEnabled)){var c5=aM("testcookie");c0(c5,"1");return ax(c5)==="1"?"1":"0"}return h.cookieEnabled?"1":"0"}function ba(){bg=bY((cM||cK)+(bh||"/")).slice(0,4)}function bO(){var c6=aM("cvar"),c5=ax(c6);if(c5.length){c5=JSON_PIWIK.parse(c5);if(V(c5)){return c5}}return{}}function cu(){if(aJ===false){aJ=bO()}}function cH(){return bY((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(cV)+(new Date()).getTime()+Math.random()).slice(0,16)}function au(){return bY((h.userAgent||"")+(h.platform||"")+JSON_PIWIK.stringify(cV)).slice(0,6)}function a8(){return Math.floor((new Date()).getTime()/1000)}function aD(){var c6=a8();var c7=au();var c5=String(c6)+c7;return c5}function cR(c7){c7=String(c7);var da=au();var c8=da.length;var c9=c7.substr(-1*c8,c8);var c6=parseInt(c7.substr(0,c7.length-c8),10);if(c6&&c9&&c9===da){var c5=a8();if(aS<=0){return true}if(c5>=c6&&c5<=(c6+aS)){return true -}}return false}function c3(c5){if(!cD){return""}var c9=f(c5,aq);if(!c9){return""}c9=String(c9);var c7=new RegExp("^[a-zA-Z0-9]+$");if(c9.length===32&&c7.test(c9)){var c6=c9.substr(16,32);if(cR(c6)){var c8=c9.substr(0,16);return c8}}return""}function cE(){if(!bF){bF=c3(bE)}var c7=new Date(),c5=Math.round(c7.getTime()/1000),c6=aM("id"),da=ax(c6),c9,c8;if(da){c9=da.split(".");c9.unshift("0");if(bF.length){c9[1]=bF}return c9}if(bF.length){c8=bF}else{if("0"===bW()){c8=""}else{c8=cH()}}c9=["1",c8,c5,0,c5,"",""];return c9}function aR(){var dc=cE(),c8=dc[0],c9=dc[1],c6=dc[2],c5=dc[3],da=dc[4],c7=dc[5];if(!J(dc[6])){dc[6]=""}var db=dc[6];return{newVisitor:c8,uuid:c9,createTs:c6,visitCount:c5,currentVisitTs:da,lastVisitTs:c7,lastEcommerceOrderTs:db}}function aB(){var c8=new Date(),c6=c8.getTime(),c9=aR().createTs;var c5=parseInt(c9,10);var c7=(c5*1000)+cz-c6;return c7}function aF(c5){if(!bX){return}var c7=new Date(),c6=Math.round(c7.getTime()/1000);if(!J(c5)){c5=aR()}var c8=c5.uuid+"."+c5.createTs+"."+c5.visitCount+"."+c6+"."+c5.lastVisitTs+"."+c5.lastEcommerceOrderTs; -c0(aM("id"),c8,aB(),bh,cM,bJ)}function bD(){var c5=ax(aM("ref"));if(c5.length){try{c5=JSON_PIWIK.parse(c5);if(V(c5)){return c5}}catch(c6){}}return["","",0,""]}function bP(c7,c6,c5){c0(c7,"",-86400,c6,c5)}function bo(c6){var c5="testvalue";c0("test",c5,10000,null,c6);if(ax("test")===c5){bP("test",null,c6);return true}return false}function az(){var c6=bd;bd=false;var c5,c7;for(c5=0;c5dv){dl.visitCount++;dl.lastVisitTs=dl.currentVisitTs}if(!bn||!dd.length){for(ds in ci){if(Object.prototype.hasOwnProperty.call(ci,ds)){dd=f(dw,ci[ds]);if(dd.length){break}}}for(ds in bx){if(Object.prototype.hasOwnProperty.call(bx,ds)){c5=f(dw,bx[ds]);if(c5.length){break}}}}dz=d(bf);dg=dr.length?d(dr):"";if(dz.length&&!aO(dz)&&(!bn||!dg.length||aO(dg))){dr=bf}if(dr.length||dd.length){dc=df;dq=[dd,c5,dc,bT(dr.slice(0,c9))];c0(dm,JSON_PIWIK.stringify(dq),cT,bh,cM)}}c7+="&idsite="+bX+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+c6.getHours()+"&m="+c6.getMinutes()+"&s="+c6.getSeconds()+"&url="+t(bT(dw))+(bf.length?"&urlref="+t(bT(bf)):"")+((bq&&bq.length)?"&uid="+t(bq):"")+"&_id="+dl.uuid+"&_idts="+dl.createTs+"&_idvc="+dl.visitCount+"&_idn="+dl.newVisitor+(dd.length?"&_rcn="+t(dd):"")+(c5.length?"&_rck="+t(c5):"")+"&_refts="+dc+"&_viewts="+dl.lastVisitTs+(String(dl.lastEcommerceOrderTs).length?"&_ects="+dl.lastEcommerceOrderTs:"")+(String(dr).length?"&_ref="+t(bT(dr.slice(0,c9))):"")+(di?"&cs="+t(di):"")+"&send_image=0"; -for(ds in cV){if(Object.prototype.hasOwnProperty.call(cV,ds)){c7+="&"+ds+"="+cV[ds]}}var dy=[];if(dt){for(ds in dt){if(Object.prototype.hasOwnProperty.call(dt,ds)&&/^dimension\d+$/.test(ds)){var db=ds.replace("dimension","");dy.push(parseInt(db,10));dy.push(String(db));c7+="&"+ds+"="+dt[ds];delete dt[ds]}}}if(dt&&B(dt)){dt=null}for(ds in be){if(Object.prototype.hasOwnProperty.call(be,ds)){var dh=(-1===M(dy,ds));if(dh){c7+="&dimension"+ds+"="+be[ds]}}}if(dt){c7+="&data="+t(JSON_PIWIK.stringify(dt))}else{if(ak){c7+="&data="+t(JSON_PIWIK.stringify(ak))}}function de(dA,dB){var dC=JSON_PIWIK.stringify(dA);if(dC.length>2){return"&"+dB+"="+t(dC)}return""}var dx=c4(bN);var dn=c4(cd);c7+=de(dx,"cvar");c7+=de(dn,"e_cvar");if(aJ){c7+=de(aJ,"_cvar");for(ds in dp){if(Object.prototype.hasOwnProperty.call(dp,ds)){if(aJ[ds][0]===""||aJ[ds][1]===""){delete aJ[ds]}}}if(bH){c0(dj,JSON_PIWIK.stringify(aJ),cg,bh,cM)}}if(aV){if(ce){c7+=">_ms="+ce}else{if(i&&i.timing&&i.timing.requestStart&&i.timing.responseEnd){c7+=">_ms="+(i.timing.responseEnd-i.timing.requestStart) -}}}if(aE){c7+="&pv_id="+aE}dl.lastEcommerceOrderTs=J(c8)&&String(c8).length?c8:dl.lastEcommerceOrderTs;aF(dl);b4();c7+=Z(du,{tracker:bz,request:c7});if(cO.length){c7+="&"+cO}if(A(b2)){c7=b2(c7)}return c7}bI=function a0(){var c5=new Date();if(cN+aY<=c5.getTime()){var c6=ck("ping=1",null,"ping");bw(c6,bA);return true}return false};function bi(c8,c7,dd,c9,c5,dg){var db="idgoal=0",dc,c6=new Date(),de=[],df,da=String(c8).length;if(da){db+="&ec_id="+t(c8);dc=Math.round(c6.getTime()/1000)}db+="&revenue="+c7;if(String(dd).length){db+="&ec_st="+dd}if(String(c9).length){db+="&ec_tx="+c9}if(String(c5).length){db+="&ec_sh="+c5}if(String(dg).length){db+="&ec_dt="+dg}if(cP){for(df in cP){if(Object.prototype.hasOwnProperty.call(cP,df)){if(!J(cP[df][1])){cP[df][1]=""}if(!J(cP[df][2])){cP[df][2]=""}if(!J(cP[df][3])||String(cP[df][3]).length===0){cP[df][3]=0}if(!J(cP[df][4])||String(cP[df][4]).length===0){cP[df][4]=1}de.push(cP[df])}}db+="&ec_items="+t(JSON_PIWIK.stringify(de))}db=ck(db,ak,"ecommerce",dc); -bw(db,bA);if(da){cP={}}}function bQ(c5,c9,c8,c7,c6,da){if(String(c5).length&&J(c9)){bi(c5,c9,c8,c7,c6,da)}}function bk(c5){if(J(c5)){bi("",c5,"","","","")}}function bR(c6,c8,c7){aE=a9();var c5=ck("action_name="+t(ah(c6||bb)),c8,"log");bw(c5,bA,c7)}function aT(c7,c6){var c8,c5="(^| )(piwik[_-]"+c6;if(c7){for(c8=0;c80){c6+="&"}else{c6+="?"}var c7=bj();c6=F(c6,aq,c7);ab.setAnyAttribute(c5,"href",c6)}function av(c8){var c9=ab.getAttributeValueFromNode(c8,"href");if(!c9){return false}c9=String(c9);var c6=c9.indexOf("//")===0||c9.indexOf("http://")===0||c9.indexOf("https://")===0;if(!c6){return false}var c5=c8.pathname||cc(c8.href);var c7=(c8.hostname||d(c8.href)).toLowerCase();if(an(c7,c5)){if(!cx(cK,L(c7))){return true}return false}return false}function cw(c5){var c6=cZ(c5);if(c6&&c6.type){c6.href=p(c6.href);cQ(c6.href,c6.type,undefined,null,c5);return}if(cD){c5=ap(c5);if(av(c5)){ca(c5)}}}function cn(){return G.all&&!G.addEventListener}function cL(c5){var c7=c5.which;var c6=(typeof c5.button);if(!c7&&c6!=="undefined"){if(cn()){if(c5.button&1){c7=1}else{if(c5.button&2){c7=3}else{if(c5.button&4){c7=2}}}}else{if(c5.button===0||c5.button==="0"){c7=1}else{if(c5.button&1){c7=2}else{if(c5.button&2){c7=3}}}}}return c7}function bK(c5){switch(cL(c5)){case 1:return"left"; -case 2:return"middle";case 3:return"right"}}function aU(c5){return c5.target||c5.srcElement}function aw(c5){return function(c8){c8=c8||T.event;var c7=bK(c8);var c9=aU(c8);if(c8.type==="click"){var c6=false;if(c5&&c7==="middle"){c6=true}if(c9&&!c6){cw(c9)}}else{if(c8.type==="mousedown"){if(c7==="middle"&&c9){aK=c7;bs=c9}else{aK=bs=null}}else{if(c8.type==="mouseup"){if(c7===aK&&c9===bs){cw(c9)}aK=bs=null}else{if(c8.type==="contextmenu"){cw(c9)}}}}}}function am(c7,c6){var c5=typeof c6;if(c5==="undefined"){c6=true}aj(c7,"click",aw(c6),false);if(c6){aj(c7,"mouseup",aw(c6),false);aj(c7,"mousedown",aw(c6),false);aj(c7,"contextmenu",aw(c6),false)}}function bu(c7,c9){al=true;var c8,c6=aT(br,"ignore"),da=G.links,c5=null,db=null;if(da){for(c8=0;c80){c9=parseInt(c9,10);dc(c9)}})}function cv(){var c6,c8,c9={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(h.userAgent))){if(h.mimeTypes&&h.mimeTypes.length){for(c6 in c9){if(Object.prototype.hasOwnProperty.call(c9,c6)){c8=h.mimeTypes[c9[c6]];cV[c6]=(c8&&c8.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(h.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(h.javaEnabled)&&h.javaEnabled()){cV.java="1" -}if(A(T.GearsFactory)){cV.gears="1"}cV.cookie=bW()}var c7=parseInt(W.width,10);var c5=parseInt(W.height,10);cV.res=parseInt(c7,10)+"x"+parseInt(c5,10)}cv();ba();aF();this.getVisitorId=function(){return aR().uuid};this.getVisitorInfo=function(){return cE()};this.getAttributionInfo=function(){return bD()};this.getAttributionCampaignName=function(){return bD()[0]};this.getAttributionCampaignKeyword=function(){return bD()[1]};this.getAttributionReferrerTimestamp=function(){return bD()[2]};this.getAttributionReferrerUrl=function(){return bD()[3]};this.setTrackerUrl=function(c5){ay=c5};this.getTrackerUrl=function(){return ay};this.getPiwikUrl=function(){return O(this.getTrackerUrl(),by)};this.addTracker=function(c5,c7){if(!c7){throw new Error("A siteId must be given to add a new tracker")}if(!J(c5)||null===c5){c5=this.getTrackerUrl()}var c6=new Q(c5,c7);I.push(c6);return c6};this.getSiteId=function(){return bX};this.setSiteId=function(c5){bU(c5)};this.resetUserId=function(){bq=""};this.setUserId=function(c5){if(!J(c5)||!c5.length){return -}bq=c5};this.getUserId=function(){return bq};this.setCustomData=function(c5,c6){if(V(c5)){ak=c5}else{if(!ak){ak={}}ak[c5]=c6}};this.getCustomData=function(){return ak};this.setCustomRequestProcessing=function(c5){b2=c5};this.appendToTrackingUrl=function(c5){cO=c5};this.getRequest=function(c5){return ck(c5)};this.addPlugin=function(c5,c6){b[c5]=c6};this.setCustomDimension=function(c5,c6){c5=parseInt(c5,10);if(c5>0){if(!J(c6)){c6=""}if(!w(c6)){c6=String(c6)}be[c5]=c6}};this.getCustomDimension=function(c5){c5=parseInt(c5,10);if(c5>0&&Object.prototype.hasOwnProperty.call(be,c5)){return be[c5]}};this.deleteCustomDimension=function(c5){c5=parseInt(c5,10);if(c5>0){delete be[c5]}};this.setCustomVariable=function(c6,c5,c9,c7){var c8;if(!J(c7)){c7="visit"}if(!J(c5)){return}if(!J(c9)){c9=""}if(c6>0){c5=!w(c5)?String(c5):c5;c9=!w(c9)?String(c9):c9;c8=[c5.slice(0,bl),c9.slice(0,bl)];if(c7==="visit"||c7===2){cu();aJ[c6]=c8}else{if(c7==="page"||c7===3){bN[c6]=c8}else{if(c7==="event"){cd[c6]=c8}}}}};this.getCustomVariable=function(c6,c7){var c5; -if(!J(c7)){c7="visit"}if(c7==="page"||c7===3){c5=bN[c6]}else{if(c7==="event"){c5=cd[c6]}else{if(c7==="visit"||c7===2){cu();c5=aJ[c6]}}}if(!J(c5)||(c5&&c5[0]==="")){return false}return c5};this.deleteCustomVariable=function(c5,c6){if(this.getCustomVariable(c5,c6)){this.setCustomVariable(c5,"","",c6)}};this.deleteCustomVariables=function(c5){if(c5==="page"||c5===3){bN={}}else{if(c5==="event"){cd={}}else{if(c5==="visit"||c5===2){aJ={}}}}};this.storeCustomVariablesInCookie=function(){bH=true};this.setLinkTrackingTimer=function(c5){bA=c5};this.getLinkTrackingTimer=function(){return bA};this.setDownloadExtensions=function(c5){if(w(c5)){c5=c5.split("|")}cU=c5};this.addDownloadExtensions=function(c6){var c5;if(w(c6)){c6=c6.split("|")}for(c5=0;c51&&al!=="addTracker"){ag("The method "+al+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers') -}aq[al]++}}}}return ap}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","enableLinkTracking","requireConsent","setConsentGiven"];function aa(ak,am){var al=new Q(ak,am);I.push(al);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){ac(_paq[E])}}_paq=new H();return al}aj(T,"beforeunload",ae,false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(an,am,al,ak){var ao=typeof ak;if(ao==="undefined"){ak=false}aj(an,am,al,ak)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(al,ak){if(!y[al]){y[al]=[]}y[al].push(ak)},off:function(am,al){if(!y[am]){return}var ak=0;for(ak;ak0;if(ao){ar=at.split("::");an=ar[0];at=ar[1];if("object"===typeof e[an]&&"function"===typeof e[an][at]){e[an][at].apply(e[an],am)}else{if(al){ae.push(al)}}}else{for(ap=0;ap0;if(au){ar=at.split(".");if(an&&"object"===typeof an[ar[0]]){an=an[ar[0]]; +at=ar[1]}else{if(al){ae.push(al);break}}}if(an[at]){an[at].apply(an,am)}else{var av="The method '"+at+'\' was not found in "_paq" variable. Please have a look at the Piwik tracker documentation: https://developer.piwik.org/api-reference/tracking-javascript';ah(av);if(!au){throw new TypeError(av)}}if(at==="addTracker"){break}if(at==="setTrackerUrl"||at==="setSiteId"){break}}else{at.apply(I[ap],am)}}}}}function ak(ao,an,am,al){if(ao.addEventListener){ao.addEventListener(an,am,al);return true}if(ao.attachEvent){return ao.attachEvent("on"+an,am)}ao["on"+an]=am}function n(al){if(G.readyState==="complete"){al()}else{if(T.addEventListener){T.addEventListener("load",al,false)}else{if(T.attachEvent){T.attachEvent("onload",al)}}}}function q(ao){var al=false;if(G.attachEvent){al=G.readyState==="complete"}else{al=G.readyState!=="loading"}if(al){ao();return}var an;if(G.addEventListener){ak(G,"DOMContentLoaded",function am(){G.removeEventListener("DOMContentLoaded",am,false);if(!al){al=true;ao()}})}else{if(G.attachEvent){G.attachEvent("onreadystatechange",function am(){if(G.readyState==="complete"){G.detachEvent("onreadystatechange",am); +if(!al){al=true;ao()}}});if(G.documentElement.doScroll&&T===T.top){(function am(){if(!al){try{G.documentElement.doScroll("left")}catch(ap){setTimeout(am,0);return}al=true;ao()}}())}}}ak(T,"load",function(){if(!al){al=true;ao()}},false)}function aa(am,ar,at){if(!am){return""}var al="",ao,an,ap,aq;for(ao in b){if(Object.prototype.hasOwnProperty.call(b,ao)){aq=b[ao]&&"function"===typeof b[ao][am];if(aq){an=b[ao][am];ap=an(ar||{},at);if(ap){al+=ap}}}}return al}function af(){var al;m=true;aa("unload");if(r){do{al=new Date()}while(al.getTimeAlias()=0;aq--){ap=ar[aq].split("=")[0];if(ap===an){ar.splice(aq,1)}}var av=ar.join("&");if(av){at=at+"?"+av}if(au){at+="#"+au}}return at}function f(an,am){var al="[\\?&#]"+am+"=([^&#]*)";var ap=new RegExp(al);var ao=ap.exec(an);return ao?S(ao[1]):""}function a(al){if(al&&String(al)===al){return al.replace(/^\s+|\s+$/g,"")}return al}function D(al){return unescape(t(al))}function aj(aB){var an=function(aH,aG){return(aH<>>(32-aG))},aC=function(aJ){var aH="",aI,aG;for(aI=7;aI>=0;aI--){aG=(aJ>>>(aI*4))&15;aH+=aG.toString(16)}return aH},aq,aE,aD,am=[],av=1732584193,at=4023233417,ar=2562383102,ap=271733878,ao=3285377520,aA,az,ay,ax,aw,aF,al,au=[];aB=D(aB);al=aB.length;for(aE=0;aE>>29);au.push((al<<3)&4294967295);for(aq=0;aqaq.offsetWidth+aq.scrollLeft||at+aw-axaq.offsetHeight+aq.scrollTop||ay+au-axau?-1:1});if(al.length<=1){return al}var am=0;var ao=0;var ap=[];var an;an=al[am++];while(an){if(an===al[am]){ao=ap.push(am) +}an=al[am++]||null}while(ao--){al.splice(ap[ao],1)}return al},getAttributeValueFromNode:function(ap,an){if(!this.hasNodeAttribute(ap,an)){return}if(ap&&ap.getAttribute){return ap.getAttribute(an)}if(!ap||!ap.attributes){return}var ao=(typeof ap.attributes[an]);if("undefined"===ao){return}if(ap.attributes[an].value){return ap.attributes[an].value}if(ap.attributes[an].nodeValue){return ap.attributes[an].nodeValue}var am;var al=ap.attributes;if(!al){return}for(am=0;am1000){break}al++}},findPieceNode:function(am){var al;al=ac.findFirstNodeHavingAttribute(am,this.CONTENT_PIECE_ATTR);if(!al){al=ac.findFirstNodeHavingClass(am,this.CONTENT_PIECE_CLASS)}if(al){return al}return am},findTargetNodeNoDefault:function(al){if(!al){return}var am=ac.findFirstNodeHavingAttributeWithValue(al,this.CONTENT_TARGET_ATTR); +if(am){return am}am=ac.findFirstNodeHavingAttribute(al,this.CONTENT_TARGET_ATTR);if(am){return am}am=ac.findFirstNodeHavingClass(al,this.CONTENT_TARGET_CLASS);if(am){return am}},findTargetNode:function(al){var am=this.findTargetNodeNoDefault(al);if(am){return am}return al},findContentName:function(am){if(!am){return}var ap=ac.findFirstNodeHavingAttributeWithValue(am,this.CONTENT_NAME_ATTR);if(ap){return ac.getAttributeValueFromNode(ap,this.CONTENT_NAME_ATTR)}var al=this.findContentPiece(am);if(al){return this.removeDomainIfIsInLink(al)}if(ac.hasNodeAttributeWithValue(am,"title")){return ac.getAttributeValueFromNode(am,"title")}var an=this.findPieceNode(am);if(ac.hasNodeAttributeWithValue(an,"title")){return ac.getAttributeValueFromNode(an,"title")}var ao=this.findTargetNode(am);if(ac.hasNodeAttributeWithValue(ao,"title")){return ac.getAttributeValueFromNode(ao,"title")}},findContentPiece:function(am){if(!am){return}var ao=ac.findFirstNodeHavingAttributeWithValue(am,this.CONTENT_PIECE_ATTR); +if(ao){return ac.getAttributeValueFromNode(ao,this.CONTENT_PIECE_ATTR)}var al=this.findPieceNode(am);var an=this.findMediaUrlInNode(al);if(an){return this.toAbsoluteUrl(an)}},findContentTarget:function(an){if(!an){return}var ao=this.findTargetNode(an);if(ac.hasNodeAttributeWithValue(ao,this.CONTENT_TARGET_ATTR)){return ac.getAttributeValueFromNode(ao,this.CONTENT_TARGET_ATTR)}var am;if(ac.hasNodeAttributeWithValue(ao,"href")){am=ac.getAttributeValueFromNode(ao,"href");return this.toAbsoluteUrl(am)}var al=this.findPieceNode(an);if(ac.hasNodeAttributeWithValue(al,"href")){am=ac.getAttributeValueFromNode(al,"href");return this.toAbsoluteUrl(am)}},isSameDomain:function(al){if(!al||!al.indexOf){return false}if(0===al.indexOf(this.getLocation().origin)){return true}var am=al.indexOf(this.getLocation().host);if(8>=am&&0<=am){return true}return false},removeDomainIfIsInLink:function(an){var am="^https?://[^/]+";var al="^.*//[^/]+";if(an&&an.search&&-1!==an.search(new RegExp(am))&&this.isSameDomain(an)){an=an.replace(new RegExp(al),""); +if(!an){an="/"}}return an},findMediaUrlInNode:function(ap){if(!ap){return}var an=["img","embed","video","audio"];var al=ap.nodeName.toLowerCase();if(-1!==M(an,al)&&ac.findFirstNodeHavingAttributeWithValue(ap,"src")){var ao=ac.findFirstNodeHavingAttributeWithValue(ap,"src");return ac.getAttributeValueFromNode(ao,"src")}if(al==="object"&&ac.hasNodeAttributeWithValue(ap,"data")){return ac.getAttributeValueFromNode(ap,"data")}if(al==="object"){var aq=ac.findNodesByTagName(ap,"param");if(aq&&aq.length){var am;for(am=0;am0}var am=ao.clientWidth;if(T.innerWidth&&am>T.innerWidth){am=T.innerWidth}var al=ao.clientHeight;if(T.innerHeight&&al>T.innerHeight){al=T.innerHeight}return((ap.bottom>0||an)&&ap.right>0&&ap.left=0){dd=dd.slice(0,dc)}dc=dd.lastIndexOf("/");if(dc!==dd.length-1){dd=dd.slice(0,dc+1)}return dd+db}function cB(dd,db){var dc;dd=String(dd).toLowerCase();db=String(db).toLowerCase();if(dd===db){return true}if(db.slice(0,1)==="."){if(dd===db.slice(1)){return true}dc=dd.length-db.length;if((dc>0)&&(dd.slice(dc)===db)){return true}}return false}function cg(db){var dc=document.createElement("a"); +if(db.indexOf("//")!==0&&db.indexOf("http")!==0){if(db.indexOf("*")===0){db=db.substr(1)}if(db.indexOf(".")===0){db=db.substr(1)}db="http://"+db}dc.href=v.toAbsoluteUrl(db);if(dc.pathname){return dc.pathname}return""}function aZ(dc,db){if(!ag(db,"/")){db="/"+db}if(!ag(dc,"/")){dc="/"+dc}var dd=(db==="/"||db==="/*");if(dd){return true}if(dc===db){return true}db=String(db).toLowerCase();dc=String(dc).toLowerCase();if(R(db,"*")){db=db.slice(0,-1);dd=(!db||db==="/");if(dd){return true}if(dc===db){return true}return dc.indexOf(db)===0}if(!R(dc,"/")){dc+="/"}if(!R(db,"/")){db+="/"}return dc.indexOf(db)===0}function ao(df,dh){var dc,db,dd,de,dg;for(dc=0;dc0)&&(de.slice(dd)===db)){return true}}}return false}function cl(db,dd){db=db.replace("send_image=0","send_image=1"); +var dc=new Image(1,1);dc.onload=function(){E=0;if(typeof dd==="function"){dd({request:db,trackerUrl:aA,success:true})}};dc.onerror=function(){if(typeof dd==="function"){dd({request:db,trackerUrl:aA,success:false})}};dc.src=aA+(aA.indexOf("?")<0?"?":"&")+db}function aG(){return"object"===typeof h&&"function"===typeof h.sendBeacon&&"function"===typeof Blob}function a2(de,di){var dd=aG();if(!dd){return false}var dh={type:"application/x-www-form-urlencoded; charset=UTF-8"};var dg=false;var dc=aA;try{var db=new Blob([de],dh);if(de.length<=2000){db=new Blob([],dh);dc=dc+(dc.indexOf("?")<0?"?":"&")+de}dg=h.sendBeacon(dc,db)}catch(df){return false}if(dg&&typeof di==="function"){di({request:de,trackerUrl:aA,success:true,isSendBeacon:true})}return dg}function cY(dc,dd,db){if(!J(db)||null===db){db=true}if(m&&a2(dc,dd)){return}setTimeout(function(){if(m&&a2(dc,dd)){return}var dg;try{var df=T.XMLHttpRequest?new T.XMLHttpRequest():T.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;df.open("POST",aA,true); +df.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var dh=m&&a2(dc,dd);if(!dh&&db){cl(dc,dd)}else{if(typeof dd==="function"){dd({request:dc,trackerUrl:aA,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dd==="function")){dd({request:dc,trackerUrl:aA,success:true,xhr:this})}}};df.setRequestHeader("Content-Type",cs);df.send(dc)}catch(de){dg=m&&a2(dc,dd);if(!dg&&db){cl(dc,dd)}else{if(typeof dd==="function"){dd({request:dc,trackerUrl:aA,success:false})}}}},50)}function cb(dc){var db=new Date();var dd=db.getTime()+dc;if(!r||dd>r){r=dd}}function cj(db){if(b7||!a1||!bw){return}b7=setTimeout(function dc(){b7=null;if(!a8){a8=(!G.hasFocus||G.hasFocus())}if(!a8){cj(a1);return}if(bM()){return}var dd=new Date(),de=a1-(dd.getTime()-cS);de=Math.min(a1,de);cj(de)},db||a1)}function bF(){if(!b7){return}clearTimeout(b7);b7=null}function a6(){a8=true;if(bM()){return}cj()}function av(){bF()}function c8(){if(aK||!a1){return}aK=true;ak(T,"focus",a6);ak(T,"blur",av); +cj()}function cx(df){var dc=new Date();var db=dc.getTime();cS=db;if(cw&&db2000){cY(dc,dd)}else{cl(dc,dd)}cb(db)})}if(!aK){c8()}else{cj()}}function cf(db){if(cK){return false}return(db&&db.length)}function cX(db,df){if(!df||df>=db.length){return[db]}var dc=0;var dd=db.length;var de=[];for(dc;dc=dc&&db<=(dc+aV)){return true}}return false}function c9(db){if(!cH){return""}var df=f(db,ar);if(!df){return""}df=String(df);var dd=new RegExp("^[a-zA-Z0-9]+$");if(df.length===32&&dd.test(df)){var dc=df.substr(16,32);if(cW(dc)){var de=df.substr(0,16); +return de}}return""}function cI(){if(!bJ){bJ=c9(bI)}var dd=new Date(),db=Math.round(dd.getTime()/1000),dc=aP("id"),dg=az(dc),df,de;if(dg){df=dg.split(".");df.unshift("0");if(bJ.length){df[1]=bJ}return df}if(bJ.length){de=bJ}else{if("0"===b0()){de=""}else{de=cL()}}df=["1",de,db,0,db,"",""];return df}function aU(){var di=cI(),de=di[0],df=di[1],dc=di[2],db=di[3],dg=di[4],dd=di[5];if(!J(di[6])){di[6]=""}var dh=di[6];return{newVisitor:de,uuid:df,createTs:dc,visitCount:db,currentVisitTs:dg,lastVisitTs:dd,lastEcommerceOrderTs:dh}}function aD(){var de=new Date(),dc=de.getTime(),df=aU().createTs;var db=parseInt(df,10);var dd=(db*1000)+cD-dc;return dd}function aI(db){if(!b1){return}var dd=new Date(),dc=Math.round(dd.getTime()/1000);if(!J(db)){db=aU()}var de=db.uuid+"."+db.createTs+"."+db.visitCount+"."+dc+"."+db.lastVisitTs+"."+db.lastEcommerceOrderTs;c6(aP("id"),de,aD(),bk,cR,bN)}function bH(){var db=az(aP("ref"));if(db.length){try{db=JSON_PIWIK.parse(db);if(W(db)){return db}}catch(dc){}}return["","",0,""] +}function bT(dd,dc,db){c6(dd,"",-86400,dc,db)}function br(dc){var db="testvalue";c6("test",db,10000,null,dc);if(az("test")===db){bT("test",null,dc);return true}return false}function aB(){var dc=bg;bg=false;var db,dd;for(db=0;dbdB){ds.visitCount++;ds.lastVisitTs=ds.currentVisitTs}if(!bq||!dj.length){for(dy in cm){if(Object.prototype.hasOwnProperty.call(cm,dy)){dj=f(dC,cm[dy]);if(dj.length){break}}}for(dy in bB){if(Object.prototype.hasOwnProperty.call(bB,dy)){db=f(dC,bB[dy]);if(db.length){break}}}}dF=d(bi);dm=dx.length?d(dx):"";if(dF.length&&!aR(dF)&&(!bq||!dm.length||aR(dm))){dx=bi}if(dx.length||dj.length){di=dl;dw=[dj,db,di,bX(dx.slice(0,df))];c6(dt,JSON_PIWIK.stringify(dw),cZ,bk,cR)}}dd+="&idsite="+b1+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dc.getHours()+"&m="+dc.getMinutes()+"&s="+dc.getSeconds()+"&url="+t(bX(dC))+(bi.length?"&urlref="+t(bX(bi)):"")+((bt&&bt.length)?"&uid="+t(bt):"")+"&_id="+ds.uuid+"&_idts="+ds.createTs+"&_idvc="+ds.visitCount+"&_idn="+ds.newVisitor+(dj.length?"&_rcn="+t(dj):"")+(db.length?"&_rck="+t(db):"")+"&_refts="+di+"&_viewts="+ds.lastVisitTs+(String(ds.lastEcommerceOrderTs).length?"&_ects="+ds.lastEcommerceOrderTs:"")+(String(dx).length?"&_ref="+t(bX(dx.slice(0,df))):"")+(dp?"&cs="+t(dp):"")+"&send_image=0"; +for(dy in c1){if(Object.prototype.hasOwnProperty.call(c1,dy)){dd+="&"+dy+"="+c1[dy]}}var dE=[];if(dz){for(dy in dz){if(Object.prototype.hasOwnProperty.call(dz,dy)&&/^dimension\d+$/.test(dy)){var dh=dy.replace("dimension","");dE.push(parseInt(dh,10));dE.push(String(dh));dd+="&"+dy+"="+dz[dy];delete dz[dy]}}}if(dz&&B(dz)){dz=null}for(dy in bh){if(Object.prototype.hasOwnProperty.call(bh,dy)){var dn=(-1===M(dE,dy));if(dn){dd+="&dimension"+dy+"="+bh[dy]}}}if(dz){dd+="&data="+t(JSON_PIWIK.stringify(dz))}else{if(al){dd+="&data="+t(JSON_PIWIK.stringify(al))}}function dk(dG,dH){var dI=JSON_PIWIK.stringify(dG);if(dI.length>2){return"&"+dH+"="+t(dI)}return""}var dD=da(bR);var du=da(ch);dd+=dk(dD,"cvar");dd+=dk(du,"e_cvar");if(aM){dd+=dk(aM,"_cvar");for(dy in dv){if(Object.prototype.hasOwnProperty.call(dv,dy)){if(aM[dy][0]===""||aM[dy][1]===""){delete aM[dy]}}}if(bL){c6(dq,JSON_PIWIK.stringify(aM),ck,bk,cR)}}if(aY){if(ci){dd+=">_ms="+ci}else{if(i&&i.timing&&i.timing.requestStart&&i.timing.responseEnd){dd+=">_ms="+(i.timing.responseEnd-i.timing.requestStart) +}}}if(aH){dd+="&pv_id="+aH}ds.lastEcommerceOrderTs=J(de)&&String(de).length?de:ds.lastEcommerceOrderTs;aI(ds);b8();dd+=aa(dA,{tracker:bD,request:dd});if(cT.length){dd+="&"+cT}if(A(b6)){dd=b6(dd)}return dd}bM=function a3(){var db=new Date();if(cS+a1<=db.getTime()){var dc=co("ping=1",null,"ping");bA(dc,bE);return true}return false};function bl(de,dd,dj,df,db,dm){var dh="idgoal=0",di,dc=new Date(),dk=[],dl,dg=String(de).length;if(dg){dh+="&ec_id="+t(de);di=Math.round(dc.getTime()/1000)}dh+="&revenue="+dd;if(String(dj).length){dh+="&ec_st="+dj}if(String(df).length){dh+="&ec_tx="+df}if(String(db).length){dh+="&ec_sh="+db}if(String(dm).length){dh+="&ec_dt="+dm}if(cU){for(dl in cU){if(Object.prototype.hasOwnProperty.call(cU,dl)){if(!J(cU[dl][1])){cU[dl][1]=""}if(!J(cU[dl][2])){cU[dl][2]=""}if(!J(cU[dl][3])||String(cU[dl][3]).length===0){cU[dl][3]=0}if(!J(cU[dl][4])||String(cU[dl][4]).length===0){cU[dl][4]=1}dk.push(cU[dl])}}dh+="&ec_items="+t(JSON_PIWIK.stringify(dk))}dh=co(dh,al,"ecommerce",di); +bA(dh,bE);if(dg){cU={}}}function bU(db,df,de,dd,dc,dg){if(String(db).length&&J(df)){bl(db,df,de,dd,dc,dg)}}function bn(db){if(J(db)){bl("",db,"","","","")}}function bV(dc,de,dd){aH=bc();var db=co("action_name="+t(ai(dc||be)),de,"log");bA(db,bE,dd)}function aW(dd,dc){var de,db="(^| )(piwik[_-]"+dc;if(dd){for(de=0;de0){dc+="&"}else{dc+="?"}var dd=bm();dc=F(dc,ar,dd);ac.setAnyAttribute(db,"href",dc)}function ax(de){var df=ac.getAttributeValueFromNode(de,"href");if(!df){return false}df=String(df);var dc=df.indexOf("//")===0||df.indexOf("http://")===0||df.indexOf("https://")===0;if(!dc){return false}var db=de.pathname||cg(de.href);var dd=(de.hostname||d(de.href)).toLowerCase();if(ao(dd,db)){if(!cB(cO,L(dd))){return true}return false}return false}function cA(db){var dc=c5(db);if(dc&&dc.type){dc.href=p(dc.href);cV(dc.href,dc.type,undefined,null,db);return}if(cH){db=aq(db);if(ax(db)){ce(db)}}}function cr(){return G.all&&!G.addEventListener}function cP(db){var dd=db.which;var dc=(typeof db.button);if(!dd&&dc!=="undefined"){if(cr()){if(db.button&1){dd=1}else{if(db.button&2){dd=3}else{if(db.button&4){dd=2}}}}else{if(db.button===0||db.button==="0"){dd=1}else{if(db.button&1){dd=2}else{if(db.button&2){dd=3}}}}}return dd}function bO(db){switch(cP(db)){case 1:return"left"; +case 2:return"middle";case 3:return"right"}}function aX(db){return db.target||db.srcElement}function ay(db){return function(de){de=de||T.event;var dd=bO(de);var df=aX(de);if(de.type==="click"){var dc=false;if(db&&dd==="middle"){dc=true}if(df&&!dc){cA(df)}}else{if(de.type==="mousedown"){if(dd==="middle"&&df){aN=dd;bv=df}else{aN=bv=null}}else{if(de.type==="mouseup"){if(dd===aN&&df===bv){cA(df)}aN=bv=null}else{if(de.type==="contextmenu"){cA(df)}}}}}}function an(dd,dc){var db=typeof dc;if(db==="undefined"){dc=true}ak(dd,"click",ay(dc),false);if(dc){ak(dd,"mouseup",ay(dc),false);ak(dd,"mousedown",ay(dc),false);ak(dd,"contextmenu",ay(dc),false)}}function by(dd,df){am=true;var de,dc=aW(bu,"ignore"),dg=G.links,db=null,dh=null;if(dg){for(de=0;de0){df=parseInt(df,10);di(df)}})}function cz(){var dc,de,df={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(h.userAgent))){if(h.mimeTypes&&h.mimeTypes.length){for(dc in df){if(Object.prototype.hasOwnProperty.call(df,dc)){de=h.mimeTypes[df[dc]];c1[dc]=(de&&de.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(h.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(h.javaEnabled)&&h.javaEnabled()){c1.java="1" +}if(A(T.GearsFactory)){c1.gears="1"}c1.cookie=b0()}var dd=parseInt(X.width,10);var db=parseInt(X.height,10);c1.res=parseInt(dd,10)+"x"+parseInt(db,10)}var bx={enabled:true,requests:[],timeout:null,sendRequests:function(){var db=this.requests;this.requests=[];if(db.length===1){bA(db[0],bE)}else{c7(db,bE)}},push:function(db){if(!db){return}if(m||!this.enabled){bA(db,bE);return}bx.requests.push(db);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bx.timeout=null;bx.sendRequests()},1750);var dc="RequestQueue"+at;if(!Object.prototype.hasOwnProperty.call(b,dc)){b[dc]={unload:function(){if(bx.timeout){clearTimeout(bx.timeout)}bx.sendRequests()}}}}};cz();bd();aI();this.getVisitorId=function(){return aU().uuid};this.getVisitorInfo=function(){return cI()};this.getAttributionInfo=function(){return bH()};this.getAttributionCampaignName=function(){return bH()[0]};this.getAttributionCampaignKeyword=function(){return bH()[1]};this.getAttributionReferrerTimestamp=function(){return bH()[2] +};this.getAttributionReferrerUrl=function(){return bH()[3]};this.setTrackerUrl=function(db){aA=db};this.getTrackerUrl=function(){return aA};this.getPiwikUrl=function(){return O(this.getTrackerUrl(),bC)};this.addTracker=function(db,dd){if(!dd){throw new Error("A siteId must be given to add a new tracker")}if(!J(db)||null===db){db=this.getTrackerUrl()}var dc=new Q(db,dd);I.push(dc);e.trigger("TrackerAdded",[this]);return dc};this.getSiteId=function(){return b1};this.setSiteId=function(db){bY(db)};this.resetUserId=function(){bt=""};this.setUserId=function(db){if(!J(db)||!db.length){return}bt=db};this.getUserId=function(){return bt};this.setCustomData=function(db,dc){if(W(db)){al=db}else{if(!al){al={}}al[db]=dc}};this.getCustomData=function(){return al};this.setCustomRequestProcessing=function(db){b6=db};this.appendToTrackingUrl=function(db){cT=db};this.getRequest=function(db){return co(db)};this.addPlugin=function(db,dc){b[db]=dc};this.setCustomDimension=function(db,dc){db=parseInt(db,10); +if(db>0){if(!J(dc)){dc=""}if(!w(dc)){dc=String(dc)}bh[db]=dc}};this.getCustomDimension=function(db){db=parseInt(db,10);if(db>0&&Object.prototype.hasOwnProperty.call(bh,db)){return bh[db]}};this.deleteCustomDimension=function(db){db=parseInt(db,10);if(db>0){delete bh[db]}};this.setCustomVariable=function(dc,db,df,dd){var de;if(!J(dd)){dd="visit"}if(!J(db)){return}if(!J(df)){df=""}if(dc>0){db=!w(db)?String(db):db;df=!w(df)?String(df):df;de=[db.slice(0,bo),df.slice(0,bo)];if(dd==="visit"||dd===2){cy();aM[dc]=de}else{if(dd==="page"||dd===3){bR[dc]=de}else{if(dd==="event"){ch[dc]=de}}}}};this.getCustomVariable=function(dc,dd){var db;if(!J(dd)){dd="visit"}if(dd==="page"||dd===3){db=bR[dc]}else{if(dd==="event"){db=ch[dc]}else{if(dd==="visit"||dd===2){cy();db=aM[dc]}}}if(!J(db)||(db&&db[0]==="")){return false}return db};this.deleteCustomVariable=function(db,dc){if(this.getCustomVariable(db,dc)){this.setCustomVariable(db,"","",dc)}};this.deleteCustomVariables=function(db){if(db==="page"||db===3){bR={} +}else{if(db==="event"){ch={}}else{if(db==="visit"||db===2){aM={}}}}};this.storeCustomVariablesInCookie=function(){bL=true};this.setLinkTrackingTimer=function(db){bE=db};this.getLinkTrackingTimer=function(){return bE};this.setDownloadExtensions=function(db){if(w(db)){db=db.split("|")}c0=db};this.addDownloadExtensions=function(dc){var db;if(w(dc)){dc=dc.split("|")}for(db=0;db1&&am!=="addTracker"){ah("The method "+am+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}ar[am]++ +}}}}return aq}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ab(al,an){var am=new Q(al,an);I.push(am);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){ad(_paq[E])}}_paq=new H();e.trigger("TrackerAdded",[am]);return am}ak(T,"beforeunload",af,false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ao,an,am,al){var ap=typeof al;if(ap==="undefined"){al=false}ak(ao,an,am,al)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(am,al){if(!y[am]){y[am]=[]}y[am].push(al)},off:function(an,am){if(!y[an]){return}var al=0;for(al;al