/*!! * Piwik - free/libre analytics platform * * JavaScript tracking client * * @link https://piwik.org * @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 */ ;if(typeof JSON_PIWIK!=="object"&&typeof window.JSON==="object"&&window.JSON.stringify&&window.JSON.parse){JSON_PIWIK=window.JSON}else{(function(){var a={}; /*!! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */ (function(){var c=typeof define==="function"&&define.amd;var e={"function":true,object:true};var h=e[typeof a]&&a&&!a.nodeType&&a;var i=e[typeof window]&&window||this,b=h&&e[typeof module]&&module&&!module.nodeType&&typeof global=="object"&&global;if(b&&(b.global===b||b.window===b||b.self===b)){i=b}function j(ab,V){ab||(ab=i.Object());V||(V=i.Object()); var K=ab.Number||i.Number,R=ab.String||i.String,x=ab.Object||i.Object,S=ab.Date||i.Date,T=ab.SyntaxError||i.SyntaxError,aa=ab.TypeError||i.TypeError,J=ab.Math||i.Math,Y=ab.JSON||i.JSON;if(typeof Y=="object"&&Y){V.stringify=Y.stringify;V.parse=Y.parse}var n=x.prototype,u=n.toString,r,m,L;var B=new S(-3509827334573292);try{B=B.getUTCFullYear()==-109252&&B.getUTCMonth()===0&&B.getUTCDate()===1&&B.getUTCHours()==10&&B.getUTCMinutes()==37&&B.getUTCSeconds()==6&&B.getUTCMilliseconds()==708}catch(v){}function o(ac){if(o[ac]!==L){return o[ac]}var ad;if(ac=="bug-string-char-index"){ad="a"[0]!="a"}else{if(ac=="json"){ad=o("json-stringify")&&o("json-parse")}else{var ak,ah='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(ac=="json-stringify"){var ai=V.stringify,aj=typeof ai=="function"&&B;if(aj){(ak=function(){return 1}).toJSON=ak;try{aj=ai(0)==="0"&&ai(new K())==="0"&&ai(new R())=='""'&&ai(u)===L&&ai(L)===L&&ai()===L&&ai(ak)==="1"&&ai([ak])=="[1]"&&ai([L])=="[null]"&&ai(null)=="null"&&ai([L,u,null])=="[null,null,null]"&&ai({a:[ak,true,false,null,"\x00\b\n\f\r\t"]})==ah&&ai(null,ak)==="1"&&ai([1,2],null,1)=="[\n 1,\n 2\n]"&&ai(new S(-8640000000000000))=='"-271821-04-20T00:00:00.000Z"'&&ai(new S(8640000000000000))=='"+275760-09-13T00:00:00.000Z"'&&ai(new S(-62198755200000))=='"-000001-01-01T00:00:00.000Z"'&&ai(new S(-1))=='"1969-12-31T23:59:59.999Z"' }catch(ae){aj=false}}ad=aj}if(ac=="json-parse"){var ag=V.parse;if(typeof ag=="function"){try{if(ag("0")===0&&!ag(false)){ak=ag(ah);var af=ak.a.length==5&&ak.a[0]===1;if(af){try{af=!ag('"\t"')}catch(ae){}if(af){try{af=ag("01")!==1}catch(ae){}}if(af){try{af=ag("1.")!==1}catch(ae){}}}}}catch(ae){af=false}}ad=af}}}return o[ac]=!!ad}if(!o("json")){var U="[object Function]",Q="[object Date]",N="[object Number]",O="[object String]",E="[object Array]",A="[object Boolean]";var F=o("bug-string-char-index");if(!B){var s=J.floor;var Z=[0,31,59,90,120,151,181,212,243,273,304,334];var D=function(ac,ad){return Z[ad]+365*(ac-1970)+s((ac-1969+(ad=+(ad>1)))/4)-s((ac-1901+ad)/100)+s((ac-1601+ad)/400)}}if(!(r=n.hasOwnProperty)){r=function(ae){var ac={},ad;if((ac.__proto__=null,ac.__proto__={toString:1},ac).toString!=u){r=function(ah){var ag=this.__proto__,af=ah in (this.__proto__=null,this);this.__proto__=ag;return af}}else{ad=ac.constructor;r=function(ag){var af=(this.constructor||ad).prototype;return ag in this&&!(ag in af&&this[ag]===af[ag]) }}ac=null;return r.call(this,ae)}}m=function(ae,ah){var af=0,ac,ad,ag;(ac=function(){this.valueOf=0}).prototype.valueOf=0;ad=new ac();for(ag in ad){if(r.call(ad,ag)){af++}}ac=ad=null;if(!af){ad=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];m=function(aj,an){var am=u.call(aj)==U,al,ak;var ai=!am&&typeof aj.constructor!="function"&&e[typeof aj.hasOwnProperty]&&aj.hasOwnProperty||r;for(al in aj){if(!(am&&al=="prototype")&&ai.call(aj,al)){an(al)}}for(ak=ad.length;al=ad[--ak];ai.call(aj,al)&&an(al)){}}}else{if(af==2){m=function(aj,am){var ai={},al=u.call(aj)==U,ak;for(ak in aj){if(!(al&&ak=="prototype")&&!r.call(ai,ak)&&(ai[ak]=1)&&r.call(aj,ak)){am(ak)}}}}else{m=function(aj,am){var al=u.call(aj)==U,ak,ai;for(ak in aj){if(!(al&&ak=="prototype")&&r.call(aj,ak)&&!(ai=ak==="constructor")){am(ak)}}if(ai||r.call(aj,(ak="constructor"))){am(ak)}}}}return m(ae,ah)};if(!o("json-stringify")){var q={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"}; var I="000000";var t=function(ac,ad){return(I+(ad||0)).slice(-ac)};var z="\\u00";var C=function(ai){var ad='"',ag=0,ah=ai.length,ac=!F||ah>10;var af=ac&&(F?ai.split(""):ai);for(;ag-1/0&&at<1/0){if(D){ay=s(at/86400000);for(ap=s(ay/365.2425)+1970-1;D(ap+1,0)<=ay;ap++){}for(az=s((ay-D(ap,0))/30.42);D(ap,az+1)<=ay;az++){}ay=1+ay-D(ap,az);ak=(at%86400000+86400000)%86400000;aw=s(ak/3600000)%24;au=s(ak/60000)%60;aq=s(ak/1000)%60;an=ak%1000}else{ap=at.getUTCFullYear();az=at.getUTCMonth();ay=at.getUTCDate();aw=at.getUTCHours();au=at.getUTCMinutes();aq=at.getUTCSeconds();an=at.getUTCMilliseconds()}at=(ap<=0||ap>=10000?(ap<0?"-":"+")+t(6,ap<0?-ap:ap):t(4,ap))+"-"+t(2,az+1)+"-"+t(2,ay)+"T"+t(2,aw)+":"+t(2,au)+":"+t(2,aq)+"."+t(3,an)+"Z" }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.Matomo=window.Piwik=(function(){var r,b={},y={},G=document,h=navigator,X=screen,T=window,i=T.performance||T.mozPerformance||T.msPerformance||T.webkitPerformance,t=T.encodeURIComponent,S=T.decodeURIComponent,l=unescape,I=[],E,e,ah=[],x=0,ab=0,U=0,m=false; function p(ao){try{return S(ao)}catch(ap){return unescape(ao)}}function J(ap){var ao=typeof ap;return ao!=="undefined"}function A(ao){return typeof ao==="function"}function W(ao){return typeof ao==="object"}function w(ao){return typeof ao==="string"||ao instanceof String}function ag(ao){return typeof ao==="number"||ao instanceof Number}function Y(ao){return J(ao)&&(ag(ao)||(w(ao)&&ao.length))}function B(ap){if(!ap){return true}var ao;var aq=true;for(ao in ap){if(Object.prototype.hasOwnProperty.call(ap,ao)){aq=false}}return aq}function ak(ao){var ap=typeof console;if(ap!=="undefined"&&console&&console.error){console.error(ao)}}function af(){var au,at,aw,ap,ao;for(au=0;au0;if(ar){av=aw.split("::");aq=av[0];aw=av[1];if("object"===typeof e[aq]&&"function"===typeof e[aq][aw]){e[aq][aw].apply(e[aq],ap)}else{if(ao){ah.push(ao)}}}else{for(at=0; at0;if(ax){av=aw.split(".");if(aq&&"object"===typeof aq[av[0]]){aq=aq[av[0]];aw=av[1]}else{if(ao){ah.push(ao);break}}}if(aq[aw]){aq[aw].apply(aq,ap)}else{var ay="The method '"+aw+'\' was not found in "_paq" variable. Please have a look at the Piwik tracker documentation: https://developer.piwik.org/api-reference/tracking-javascript';ak(ay);if(!ax){throw new TypeError(ay)}}if(aw==="addTracker"){break}if(aw==="setTrackerUrl"||aw==="setSiteId"){break}}else{aw.apply(I[at],ap)}}}}}function an(ar,aq,ap,ao){if(ar.addEventListener){ar.addEventListener(aq,ap,ao);return true}if(ar.attachEvent){return ar.attachEvent("on"+aq,ap)}ar["on"+aq]=ap}function n(ao){if(G.readyState==="complete"){ao()}else{if(T.addEventListener){T.addEventListener("load",ao,false)}else{if(T.attachEvent){T.attachEvent("onload",ao)}}}}function q(ar){var ao=false;if(G.attachEvent){ao=G.readyState==="complete"}else{ao=G.readyState!=="loading"}if(ao){ar();return}var aq;if(G.addEventListener){an(G,"DOMContentLoaded",function ap(){G.removeEventListener("DOMContentLoaded",ap,false); if(!ao){ao=true;ar()}})}else{if(G.attachEvent){G.attachEvent("onreadystatechange",function ap(){if(G.readyState==="complete"){G.detachEvent("onreadystatechange",ap);if(!ao){ao=true;ar()}}});if(G.documentElement.doScroll&&T===T.top){(function ap(){if(!ao){try{G.documentElement.doScroll("left")}catch(at){setTimeout(ap,0);return}ao=true;ar()}}())}}}an(T,"load",function(){if(!ao){ao=true;ar()}},false)}function ac(ap,av,aw){if(!ap){return""}var ao="",ar,aq,at,au;for(ar in b){if(Object.prototype.hasOwnProperty.call(b,ar)){au=b[ar]&&"function"===typeof b[ar][ap];if(au){aq=b[ar][ap];at=aq(av||{},aw);if(at){ao+=at}}}}return ao}function ai(){var ao;m=true;ac("unload");if(r){do{ao=new Date()}while(ao.getTimeAlias()=0;au--){at=av[au].split("=")[0];if(at===aq){av.splice(au,1)}}var ay=av.join("&");if(ay){aw=aw+"?"+ay}if(ax){aw+="#"+ax}}return aw}function f(aq,ap){var ao="[\\?&#]"+ap+"=([^&#]*)";var at=new RegExp(ao);var ar=at.exec(aq);return ar?S(ar[1]):""}function a(ao){if(ao&&String(ao)===ao){return ao.replace(/^\s+|\s+$/g,"")}return ao}function D(ao){return unescape(t(ao))}function am(aE){var aq=function(aK,aJ){return(aK<>>(32-aJ))},aF=function(aM){var aK="",aL,aJ;for(aL=7;aL>=0;aL--){aJ=(aM>>>(aL*4))&15;aK+=aJ.toString(16)}return aK},au,aH,aG,ap=[],ay=1732584193,aw=4023233417,av=2562383102,at=271733878,ar=3285377520,aD,aC,aB,aA,az,aI,ao,ax=[];aE=D(aE);ao=aE.length;for(aH=0;aH>>29);ax.push((ao<<3)&4294967295);for(au=0;auau.offsetWidth+au.scrollLeft||aw+az-aAau.offsetHeight+au.scrollTop||aB+ax-aAax?-1:1});if(ao.length<=1){return ao}var ap=0;var ar=0;var at=[];var aq;aq=ao[ap++];while(aq){if(aq===ao[ap]){ar=at.push(ap)}aq=ao[ap++]||null}while(ar--){ao.splice(at[ar],1)}return ao},getAttributeValueFromNode:function(at,aq){if(!this.hasNodeAttribute(at,aq)){return}if(at&&at.getAttribute){return at.getAttribute(aq)}if(!at||!at.attributes){return}var ar=(typeof at.attributes[aq]);if("undefined"===ar){return}if(at.attributes[aq].value){return at.attributes[aq].value}if(at.attributes[aq].nodeValue){return at.attributes[aq].nodeValue}var ap;var ao=at.attributes;if(!ao){return}for(ap=0;ap1000){break}ao++}},findPieceNode:function(ap){var ao;ao=ae.findFirstNodeHavingAttribute(ap,this.CONTENT_PIECE_ATTR);if(!ao){ao=ae.findFirstNodeHavingClass(ap,this.CONTENT_PIECE_CLASS)}if(ao){return ao}return ap},findTargetNodeNoDefault:function(ao){if(!ao){return}var ap=ae.findFirstNodeHavingAttributeWithValue(ao,this.CONTENT_TARGET_ATTR); if(ap){return ap}ap=ae.findFirstNodeHavingAttribute(ao,this.CONTENT_TARGET_ATTR);if(ap){return ap}ap=ae.findFirstNodeHavingClass(ao,this.CONTENT_TARGET_CLASS);if(ap){return ap}},findTargetNode:function(ao){var ap=this.findTargetNodeNoDefault(ao);if(ap){return ap}return ao},findContentName:function(ap){if(!ap){return}var at=ae.findFirstNodeHavingAttributeWithValue(ap,this.CONTENT_NAME_ATTR);if(at){return ae.getAttributeValueFromNode(at,this.CONTENT_NAME_ATTR)}var ao=this.findContentPiece(ap);if(ao){return this.removeDomainIfIsInLink(ao)}if(ae.hasNodeAttributeWithValue(ap,"title")){return ae.getAttributeValueFromNode(ap,"title")}var aq=this.findPieceNode(ap);if(ae.hasNodeAttributeWithValue(aq,"title")){return ae.getAttributeValueFromNode(aq,"title")}var ar=this.findTargetNode(ap);if(ae.hasNodeAttributeWithValue(ar,"title")){return ae.getAttributeValueFromNode(ar,"title")}},findContentPiece:function(ap){if(!ap){return}var ar=ae.findFirstNodeHavingAttributeWithValue(ap,this.CONTENT_PIECE_ATTR); if(ar){return ae.getAttributeValueFromNode(ar,this.CONTENT_PIECE_ATTR)}var ao=this.findPieceNode(ap);var aq=this.findMediaUrlInNode(ao);if(aq){return this.toAbsoluteUrl(aq)}},findContentTarget:function(aq){if(!aq){return}var ar=this.findTargetNode(aq);if(ae.hasNodeAttributeWithValue(ar,this.CONTENT_TARGET_ATTR)){return ae.getAttributeValueFromNode(ar,this.CONTENT_TARGET_ATTR)}var ap;if(ae.hasNodeAttributeWithValue(ar,"href")){ap=ae.getAttributeValueFromNode(ar,"href");return this.toAbsoluteUrl(ap)}var ao=this.findPieceNode(aq);if(ae.hasNodeAttributeWithValue(ao,"href")){ap=ae.getAttributeValueFromNode(ao,"href");return this.toAbsoluteUrl(ap)}},isSameDomain:function(ao){if(!ao||!ao.indexOf){return false}if(0===ao.indexOf(this.getLocation().origin)){return true}var ap=ao.indexOf(this.getLocation().host);if(8>=ap&&0<=ap){return true}return false},removeDomainIfIsInLink:function(aq){var ap="^https?://[^/]+";var ao="^.*//[^/]+";if(aq&&aq.search&&-1!==aq.search(new RegExp(ap))&&this.isSameDomain(aq)){aq=aq.replace(new RegExp(ao),""); if(!aq){aq="/"}}return aq},findMediaUrlInNode:function(at){if(!at){return}var aq=["img","embed","video","audio"];var ao=at.nodeName.toLowerCase();if(-1!==M(aq,ao)&&ae.findFirstNodeHavingAttributeWithValue(at,"src")){var ar=ae.findFirstNodeHavingAttributeWithValue(at,"src");return ae.getAttributeValueFromNode(ar,"src")}if(ao==="object"&&ae.hasNodeAttributeWithValue(at,"data")){return ae.getAttributeValueFromNode(at,"data")}if(ao==="object"){var au=ae.findNodesByTagName(at,"param");if(au&&au.length){var ap;for(ap=0;ap0}var ap=ar.clientWidth;if(T.innerWidth&&ap>T.innerWidth){ap=T.innerWidth}var ao=ar.clientHeight;if(T.innerHeight&&ao>T.innerHeight){ao=T.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left=0){dj=dj.slice(0,di)}di=dj.lastIndexOf("/");if(di!==dj.length-1){dj=dj.slice(0,di+1)}return dj+dh}function cD(dj,dh){var di;dj=String(dj).toLowerCase();dh=String(dh).toLowerCase();if(dj===dh){return true}if(dh.slice(0,1)==="."){if(dj===dh.slice(1)){return true}di=dj.length-dh.length;if((di>0)&&(dj.slice(di)===dh)){return true}}return false}function cj(dh){var di=document.createElement("a"); if(dh.indexOf("//")!==0&&dh.indexOf("http")!==0){if(dh.indexOf("*")===0){dh=dh.substr(1)}if(dh.indexOf(".")===0){dh=dh.substr(1)}dh="http://"+dh}di.href=v.toAbsoluteUrl(dh);if(di.pathname){return di.pathname}return""}function a2(di,dh){if(!aj(dh,"/")){dh="/"+dh}if(!aj(di,"/")){di="/"+di}var dj=(dh==="/"||dh==="/*");if(dj){return true}if(di===dh){return true}dh=String(dh).toLowerCase();di=String(di).toLowerCase();if(R(dh,"*")){dh=dh.slice(0,-1);dj=(!dh||dh==="/");if(dj){return true}if(di===dh){return true}return di.indexOf(dh)===0}if(!R(di,"/")){di+="/"}if(!R(dh,"/")){dh+="/"}return di.indexOf(dh)===0}function ar(dl,dn){var di,dh,dj,dk,dm;for(di=0;di0)&&(dk.slice(dj)===dh)){return true}}}return false}function co(dh,dj){dh=dh.replace("send_image=0","send_image=1"); var di=new Image(1,1);di.onload=function(){E=0;if(typeof dj==="function"){dj({request:dh,trackerUrl:aD,success:true})}};di.onerror=function(){if(typeof dj==="function"){dj({request:dh,trackerUrl:aD,success:false})}};di.src=aD+(aD.indexOf("?")<0?"?":"&")+dh}function aJ(){return"object"===typeof h&&"function"===typeof h.sendBeacon&&"function"===typeof Blob}function a5(dk,dp){var dj=aJ();if(!dj){return false}var dn={type:"application/x-www-form-urlencoded; charset=UTF-8"};var dm=false;var di=aD;try{var dh=new Blob([dk],dn);if(dk.length<=2000){dh=new Blob([],dn);di=di+(di.indexOf("?")<0?"?":"&")+dk}dm=h.sendBeacon(di,dh)}catch(dl){return false}if(dm&&typeof dp==="function"){dp({request:dk,trackerUrl:aD,success:true,isSendBeacon:true})}return dm}function c2(di,dj,dh){if(!J(dh)||null===dh){dh=true}if(m&&a5(di,dj)){return}setTimeout(function(){if(m&&a5(di,dj)){return}var dm;try{var dl=T.XMLHttpRequest?new T.XMLHttpRequest():T.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;dl.open("POST",aD,true); dl.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var dn=m&&a5(di,dj);if(!dn&&dh){co(di,dj)}else{if(typeof dj==="function"){dj({request:di,trackerUrl:aD,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dj==="function")){dj({request:di,trackerUrl:aD,success:true,xhr:this})}}};dl.setRequestHeader("Content-Type",cv);dl.withCredentials=true;dl.send(di)}catch(dk){dm=m&&a5(di,dj);if(!dm&&dh){co(di,dj)}else{if(typeof dj==="function"){dj({request:di,trackerUrl:aD,success:false})}}}},50)}function ce(di){var dh=new Date();var dj=dh.getTime()+di;if(!r||dj>r){r=dj}}function cm(dh){if(ca||!a4||!bz){return}ca=setTimeout(function di(){ca=null;if(!bb){bb=(!G.hasFocus||G.hasFocus())}if(!bb){cm(a4);return}if(bP()){return}var dj=new Date(),dk=a4-(dj.getTime()-cW);dk=Math.min(a4,dk);cm(dk)},dh||a4)}function bI(){if(!ca){return}clearTimeout(ca);ca=null}function a9(){bb=true;cP=new Date().getTime()}function db(){var dh=new Date().getTime();return !cP||(dh-cP)>a4 }function ay(){if(db()){bP()}bI()}function de(){if(aN||!a4){return}aN=true;an(T,"focus",a9);an(T,"blur",ay);ab++;e.addPlugin("HeartBeat"+ab,{unload:function(){if(aN&&db()){bP()}}})}function cA(dl){var di=new Date();var dh=di.getTime();cW=dh;if(cz&&dh2000){c2(di,dj)}else{co(di,dj)}ce(dh)})}if(!aN){de()}}function ci(dh){if(cN){return false}return(dh&&dh.length)}function c1(dh,dl){if(!dl||dl>=dh.length){return[dh]}var di=0;var dj=dh.length;var dk=[];for(di;di=di&&dh<=(di+aY)){return true}}return false}function df(dh){if(!cK){return""}var dl=f(dh,av);if(!dl){return""}dl=String(dl);var dj=new RegExp("^[a-zA-Z0-9]+$");if(dl.length===32&&dj.test(dl)){var di=dl.substr(16,32);if(c0(di)){var dk=dl.substr(0,16);return dk}}return""}function cL(){if(!bM){bM=df(bL)}var dj=new Date(),dh=Math.round(dj.getTime()/1000),di=aS("id"),dm=aC(di),dl,dk; if(dm){dl=dm.split(".");dl.unshift("0");if(bM.length){dl[1]=bM}return dl}if(bM.length){dk=bM}else{if("0"===b3()){dk=""}else{dk=cO()}}dl=["1",dk,dh,0,dh,"",""];return dl}function aX(){var dp=cL(),dk=dp[0],dl=dp[1],di=dp[2],dh=dp[3],dm=dp[4],dj=dp[5];if(!J(dp[6])){dp[6]=""}var dn=dp[6];return{newVisitor:dk,uuid:dl,createTs:di,visitCount:dh,currentVisitTs:dm,lastVisitTs:dj,lastEcommerceOrderTs:dn}}function aG(){var dk=new Date(),di=dk.getTime(),dl=aX().createTs;var dh=parseInt(dl,10);var dj=(dh*1000)+cG-di;return dj}function aL(dh){if(!b4){return}var dj=new Date(),di=Math.round(dj.getTime()/1000);if(!J(dh)){dh=aX()}var dk=dh.uuid+"."+dh.createTs+"."+dh.visitCount+"."+di+"."+dh.lastVisitTs+"."+dh.lastEcommerceOrderTs;dc(aS("id"),dk,aG(),bn,cV,bQ)}function bK(){var dh=aC(aS("ref"));if(dh.length){try{dh=JSON_PIWIK.parse(dh);if(W(dh)){return dh}}catch(di){}}return["","",0,""]}function bW(dj,di,dh){dc(dj,"",-86400,di,dh)}function bu(di){var dh="testvalue";dc("test",dh,10000,null,di);if(aC("test")===dh){bW("test",null,di); return true}return false}function aE(){var di=bj;bj=false;var dh,dj;for(dh=0;dhdH){dy.visitCount++;dy.lastVisitTs=dy.currentVisitTs}if(!bt||!dq.length){for(dE in cp){if(Object.prototype.hasOwnProperty.call(cp,dE)){dq=f(dI,cp[dE]);if(dq.length){break}}}for(dE in bE){if(Object.prototype.hasOwnProperty.call(bE,dE)){dh=f(dI,bE[dE]);if(dh.length){break}}}}dM=d(bl);dt=dD.length?d(dD):"";if(dM.length&&!aU(dM)&&(!bt||!dt.length||aU(dt))){dD=bl}if(dD.length||dq.length){dp=ds;dC=[dq,dh,dp,b0(dD.slice(0,dl))];dc(dz,JSON_PIWIK.stringify(dC),c3,bn,cV)}}dj+="&idsite="+b4+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+di.getHours()+"&m="+di.getMinutes()+"&s="+di.getSeconds()+"&url="+t(b0(dI))+(bl.length?"&urlref="+t(b0(bl)):"")+((bw&&bw.length)?"&uid="+t(bw):"")+"&_id="+dy.uuid+"&_idts="+dy.createTs+"&_idvc="+dy.visitCount+"&_idn="+dy.newVisitor+(dq.length?"&_rcn="+t(dq):"")+(dh.length?"&_rck="+t(dh):"")+"&_refts="+dp+"&_viewts="+dy.lastVisitTs+(String(dy.lastEcommerceOrderTs).length?"&_ects="+dy.lastEcommerceOrderTs:"")+(String(dD).length?"&_ref="+t(b0(dD.slice(0,dl))):"")+(dv?"&cs="+t(dv):"")+"&send_image=0"; var dL=cE();for(dE in dL){if(Object.prototype.hasOwnProperty.call(dL,dE)){dj+="&"+dE+"="+dL[dE]}}var dK=[];if(dF){for(dE in dF){if(Object.prototype.hasOwnProperty.call(dF,dE)&&/^dimension\d+$/.test(dE)){var dn=dE.replace("dimension","");dK.push(parseInt(dn,10));dK.push(String(dn));dj+="&"+dE+"="+t(dF[dE]);delete dF[dE]}}}if(dF&&B(dF)){dF=null}for(dE in bk){if(Object.prototype.hasOwnProperty.call(bk,dE)){var du=(-1===M(dK,dE));if(du){dj+="&dimension"+dE+"="+t(bk[dE])}}}if(dF){dj+="&data="+t(JSON_PIWIK.stringify(dF))}else{if(ao){dj+="&data="+t(JSON_PIWIK.stringify(ao))}}function dr(dN,dO){var dP=JSON_PIWIK.stringify(dN);if(dP.length>2){return"&"+dO+"="+t(dP)}return""}var dJ=dg(bU);var dA=dg(ck);dj+=dr(dJ,"cvar");dj+=dr(dA,"e_cvar");if(aP){dj+=dr(aP,"_cvar");for(dE in dB){if(Object.prototype.hasOwnProperty.call(dB,dE)){if(aP[dE][0]===""||aP[dE][1]===""){delete aP[dE]}}}if(bO){dc(dw,JSON_PIWIK.stringify(aP),cn,bn,cV)}}if(a1){if(cl){dj+=">_ms="+cl}else{if(i&&i.timing&&i.timing.requestStart&&i.timing.responseEnd){dj+=">_ms="+(i.timing.responseEnd-i.timing.requestStart) }}}if(aK){dj+="&pv_id="+aK}dy.lastEcommerceOrderTs=J(dk)&&String(dk).length?dk:dy.lastEcommerceOrderTs;aL(dy);cb();dj+=ac(dG,{tracker:bG,request:dj});if(cX.length){dj+="&"+cX}if(A(b9)){dj=b9(dj)}return dj}bP=function a6(){var dh=new Date();dh=dh.getTime();if(!cW){return false}if((cW+(1000*c5))<=dh){return false}if(cW+a4<=dh){bG.ping();return true}return false};function bo(dk,dj,dq,dl,dh,dt){var dn="idgoal=0",dp,di=new Date(),dr=[],ds,dm=String(dk).length;if(dm){dn+="&ec_id="+t(dk);dp=Math.round(di.getTime()/1000)}dn+="&revenue="+dj;if(String(dq).length){dn+="&ec_st="+dq}if(String(dl).length){dn+="&ec_tx="+dl}if(String(dh).length){dn+="&ec_sh="+dh}if(String(dt).length){dn+="&ec_dt="+dt}if(cY){for(ds in cY){if(Object.prototype.hasOwnProperty.call(cY,ds)){if(!J(cY[ds][1])){cY[ds][1]=""}if(!J(cY[ds][2])){cY[ds][2]=""}if(!J(cY[ds][3])||String(cY[ds][3]).length===0){cY[ds][3]=0}if(!J(cY[ds][4])||String(cY[ds][4]).length===0){cY[ds][4]=1}dr.push(cY[ds])}}dn+="&ec_items="+t(JSON_PIWIK.stringify(dr)) }dn=cr(dn,ao,"ecommerce",dp);bD(dn,bH);if(dm){cY={}}}function bX(dh,dl,dk,dj,di,dm){if(String(dh).length&&J(dl)){bo(dh,dl,dk,dj,di,dm)}}function bq(dh){if(J(dh)){bo("",dh,"","","","")}}function bY(di,dk,dj){aK=bf();var dh=cr("action_name="+t(al(di||bh)),dk,"log");bD(dh,bH,dj)}function aZ(dj,di){var dk,dh="(^| )(piwik[_-]"+di;if(dj){for(dk=0;dk0){dl=parseInt(dl,10);dp(dl)}})}var bA={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dh=this.requests;this.requests=[];if(dh.length===1){bD(dh[0],bH)}else{dd(dh,bH)}},push:function(dh){if(!dh){return}if(m||!this.enabled){bD(dh,bH);return}bA.requests.push(dh);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bA.timeout=null;bA.sendRequests()},bA.interval);var di="RequestQueue"+aw;if(!Object.prototype.hasOwnProperty.call(b,di)){b[di]={unload:function(){if(bA.timeout){clearTimeout(bA.timeout)}bA.sendRequests()}}}}};bg();aL();this.getVisitorId=function(){return aX().uuid };this.getVisitorInfo=function(){return cL()};this.getAttributionInfo=function(){return bK()};this.getAttributionCampaignName=function(){return bK()[0]};this.getAttributionCampaignKeyword=function(){return bK()[1]};this.getAttributionReferrerTimestamp=function(){return bK()[2]};this.getAttributionReferrerUrl=function(){return bK()[3]};this.setTrackerUrl=function(dh){aD=dh};this.getTrackerUrl=function(){return aD};this.getPiwikUrl=function(){return O(this.getTrackerUrl(),bF)};this.addTracker=function(dh,dj){if(!J(dh)||null===dh){dh=this.getTrackerUrl()}var di=new Q(dh,dj);I.push(di);e.trigger("TrackerAdded",[this]);return di};this.getSiteId=function(){return b4};this.setSiteId=function(dh){b1(dh)};this.resetUserId=function(){bw=""};this.setUserId=function(dh){if(Y(dh)){bw=dh}};this.getUserId=function(){return bw};this.setCustomData=function(dh,di){if(W(dh)){ao=dh}else{if(!ao){ao={}}ao[dh]=di}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dh){b9=dh};this.appendToTrackingUrl=function(dh){cX=dh };this.getRequest=function(dh){return cr(dh)};this.addPlugin=function(dh,di){b[dh]=di};this.setCustomDimension=function(dh,di){dh=parseInt(dh,10);if(dh>0){if(!J(di)){di=""}if(!w(di)){di=String(di)}bk[dh]=di}};this.getCustomDimension=function(dh){dh=parseInt(dh,10);if(dh>0&&Object.prototype.hasOwnProperty.call(bk,dh)){return bk[dh]}};this.deleteCustomDimension=function(dh){dh=parseInt(dh,10);if(dh>0){delete bk[dh]}};this.setCustomVariable=function(di,dh,dl,dj){var dk;if(!J(dj)){dj="visit"}if(!J(dh)){return}if(!J(dl)){dl=""}if(di>0){dh=!w(dh)?String(dh):dh;dl=!w(dl)?String(dl):dl;dk=[dh.slice(0,br),dl.slice(0,br)];if(dj==="visit"||dj===2){cB();aP[di]=dk}else{if(dj==="page"||dj===3){bU[di]=dk}else{if(dj==="event"){ck[di]=dk}}}}};this.getCustomVariable=function(di,dj){var dh;if(!J(dj)){dj="visit"}if(dj==="page"||dj===3){dh=bU[di]}else{if(dj==="event"){dh=ck[di]}else{if(dj==="visit"||dj===2){cB();dh=aP[di]}}}if(!J(dh)||(dh&&dh[0]==="")){return false}return dh};this.deleteCustomVariable=function(dh,di){if(this.getCustomVariable(dh,di)){this.setCustomVariable(dh,"","",di) }};this.deleteCustomVariables=function(dh){if(dh==="page"||dh===3){bU={}}else{if(dh==="event"){ck={}}else{if(dh==="visit"||dh===2){aP={}}}}};this.storeCustomVariablesInCookie=function(){bO=true};this.setLinkTrackingTimer=function(dh){bH=dh};this.getLinkTrackingTimer=function(){return bH};this.setDownloadExtensions=function(dh){if(w(dh)){dh=dh.split("|")}c4=dh};this.addDownloadExtensions=function(di){var dh;if(w(di)){di=di.split("|")}for(dh=0;dh1&&ap!=="addTracker"){ak("The method "+ap+' 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')}av[ap]++}}}}return au}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ad(ao,aq){var ap=new Q(ao,aq);I.push(ap);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();e.trigger("TrackerAdded",[ap]);return ap}an(T,"beforeunload",ai,false); Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;aoE){this.disable();return}}var Q=P();var R="Media"+this.type;var T=this.mediaTitle||this.resource;var U=this.makeRequestUrlFromParams({e_c:R,e_a:W,e_n:T,e_v:parseInt(Math.round(this.mediaProgressInSeconds),10)});if(Q&&Q.length){var S=0,V;for(S;SE){this.disable();return}}if(this.isPlaying&&!Y){Y=1 }var ag={ma_id:U,ma_ti:W!==null?W:"",ma_pn:V,ma_mt:R,ma_re:S,ma_st:parseInt(Math.floor(Y),10),ma_ps:parseInt(ah,10),ma_le:Z,ma_ttp:ae!==null?ae:"",ma_w:aa?aa:"",ma_h:X?X:"",ma_fs:Q?"1":"0",ma_se:ac.join(",")};var ab=this.makeRequestUrlFromParams(ag);var af=P();if(af&&af.length){var ad=0,T;for(ad;ad25||h>50){this.disable() }else{if(this.numPlaysSameMediaOffScreen>10||l>15){this.disable()}}}this.trackUpdate()};j.prototype.startWatchedTime=function(){this.lastTimeCheck=N.getCurrentTime()};j.prototype.stopWatchedTime=function(){if(this.lastTimeCheck){this.watchedTime+=N.getCurrentTime()-this.lastTimeCheck;this.lastTimeCheck=null}};j.prototype.seekStart=function(){if(this.isPlaying){this.stopWatchedTime()}};j.prototype.seekFinish=function(){if(this.isPlaying){this.startWatchedTime()}};j.prototype.pause=function(){if(this.isPlaying){this.isPaused=true;this.isPlaying=false;if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.stopWatchedTime();this.trackUpdate();this.trackEvent("pause")}};j.prototype.finish=function(){if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.stopWatchedTime();this.trackUpdate();this.trackEvent("finish");this.id=N.generateUniqueId();this.timeToInitialPlay=null;this.lastTimeCheck=null;this.isPlaying=false;this.isPaused=false;this.watchedTime=0;this.mediaProgressInSeconds=0 };j.prototype.trackUpdate=function(){if(this.timeout){clearTimeout(this.timeout);this.timeout=null}var Q=N.getCurrentTime();if(this.lastTimeCheck){this.watchedTime+=(Q-this.lastTimeCheck);this.lastTimeCheck=Q}var W=this.mediaLengthInSeconds;if(!W||!N.isNumber(W)){W=""}else{W=parseInt(this.mediaLengthInSeconds,10)}var T=N.roundTimeToSeconds(this.watchedTime);var U=this.mediaProgressInSeconds;if(U>W&&W){U=W}var R=[];var S,V;for(S=0;S=0&&V<=W){if(V<=300){V=N.roundUp(V,15)}else{V=N.roundUp(V,30)}if(V>=0&&V<1){V=15}if(-1===N.indexOfArray(R,V)&&-1===N.indexOfArray(this.trackedSegments,V)){R.push(V);this.trackedSegments.push(V)}}}this.viewedSegments=[];this.trackProgress(this.id,this.mediaTitle,this.playerName,this.type,this.resource,T,U,W,this.timeToInitialPlay,this.width,this.height,this.fullscreen,R)};j.prototype.update=function(){if(this.timeout){return}var S=N.roundTimeToSeconds(this.watchedTime);var R=B;if(!I&&(S>=1800||h>10)){R=300 }else{if(!I&&(S>=600||h>4)){R=240}else{if(!I&&(S>=300||h>2)){R=120}else{if(!I&&S>=60){R=60}}}}R=R*1000;var Q=this;this.timeout=setTimeout(function(){Q.trackUpdate();Q.timeout=null},R)};var c={players:{},registerPlayer:function(Q,R){if(!R||!R.scanForMedia||"function"!==typeof R.scanForMedia){throw new Error("A registered player does not implement the scanForMedia function")}Q=Q.toLowerCase();this.players[Q]=R},removePlayer:function(Q){Q=Q.toLowerCase();delete this.players[Q]},getPlayer:function(Q){Q=Q.toLowerCase();if(Q in this.players){return this.players[Q]}return null},getPlayers:function(){return this.players},scanForMedia:function(R){if(!a){return}if("undefined"===typeof R||!R){R=document}var Q;for(Q in this.players){if(Object.prototype.hasOwnProperty.call(this.players,Q)){this.players[Q].scanForMedia(R)}}}};var M=function(ac,S){if(!ac){return}if(!C.addEventListener){return}if(ac.hasPlayerInstance){return}ac.hasPlayerInstance=true;var ah=f.VIDEO===S;var V=F.makeUrlAbsolute(ac.currentSrc); var Q=m.getMediaResource(ac,V);var W="html5"+S.toLowerCase();if(typeof paella==="object"&&typeof paella.opencast==="object"){W="paella-opencast"}else{if(m.getFirstParentWithClass(ac,"video-js",1)){W="video.js"}else{if(m.hasCssClass(ac,"jw-video")){W="jwplayer"}else{if(m.getFirstParentWithClass(ac,"flowplayer",3)){W="flowplayer"}}}}var U=new j(W,S,Q);G.push(U);function R(){if(ac.duration){U.setMediaTotalLengthInSeconds(ac.duration)}}function X(){if(ah){if("undefined"!==typeof ac.videoWidth&&ac.videoWidth){U.setWidth(ac.videoWidth)}else{if("undefined"!==typeof ac.clientWidth&&ac.clientWidth){U.setWidth(ac.clientWidth)}}if("undefined"!==typeof ac.videoHeight&&ac.videoHeight){U.setHeight(ac.videoHeight)}else{if("undefined"!==typeof ac.clientHeight&&ac.clientHeight){U.setHeight(ac.clientHeight)}}U.setFullscreen(m.isFullscreen(ac))}}function Y(){U.setMediaProgressInSeconds(ac.currentTime)}function ai(){var am=m.getMediaTitle(ac);if(am){U.setMediaTitle(am)}else{ae(ac,U)}}al(ac,U);X();ai();R(); Y();var T=false;var aa=false;var ab=null;if(ac.currentSrc){ab=ac.currentSrc}function ae(ao,at){if(b()&&!at.getMediaTitle()){var aq=m.getFirstParentWithClass(ao,"jwplayer",3);if(!aq){aq=m.getFirstParentWithClass(ao,"jwplayer-video",3);if(aq&&"undefined"!==typeof aq.children&&aq.children&&aq.children.length&&aq.children[0]){aq=aq.children[0]}}if(aq){try{var au=jwplayer(aq);if(au&&au.getPlaylistItem){var av=au.getPlaylistItem();if(av&&av.matomoTitle){at.setMediaTitle(av.matomoTitle)}else{if(av&&av.piwikTitle){at.setMediaTitle(av.piwikTitle)}else{if(av&&av.title){at.setMediaTitle(av.title)}}}}}catch(ap){e(ap)}}}if(k()&&!at.getMediaTitle()){var am=m.getFirstParentWithClass(ao,"flowplayer",4);if(am){var au=flowplayer(am);if(au&&au.video&&au.video.matomoTitle){at.setMediaTitle(au.video.matomoTitle)}else{if(au&&au.video&&au.video.piwikTitle){at.setMediaTitle(au.video.piwikTitle)}else{if(au&&au.video&&au.video.title){at.setMediaTitle(au.video.title)}}}}}if(!at.getMediaTitle()){var an=q.getElementById("engage_basic_description_title"); if(an&&an.innerText){var ar=N.trim(an.innerText);if(ar){at.setMediaTitle(ar)}}else{if(typeof paella==="object"&&typeof paella.opencast==="object"&&typeof paella.opencast._episode==="object"&&paella.opencast._episode.dcTitle){var ar=N.trim(paella.opencast._episode.dcTitle);if(ar){at.setMediaTitle(ar)}}}}o(ao,at)}function al(aq,ap){if(b()){var at=m.getFirstParentWithClass(aq,"jwplayer",3);if(!at){at=m.getFirstParentWithClass(aq,"jwplayer-video",3);if(at&&"undefined"!==typeof at.children&&at.children&&at.children.length&&at.children[0]){at=at.children[0]}}if(at){try{var an=jwplayer(at);if(an&&an.getPlaylistItem){var ao=an.getPlaylistItem();if(ao&&"undefined"!==typeof ao.matomoResource&&ao.matomoResource){ap.setResource(ao.matomoResource)}else{if(ao&&"undefined"!==typeof ao.piwikResource&&ao.piwikResource){ap.setResource(ao.piwikResource)}}}}catch(ar){e(ar)}}}if(k()){var am=m.getFirstParentWithClass(aq,"flowplayer",4);if(am){var an=flowplayer(am);if(an&&an.video&&"undefined"!==typeof an.video.matomoResource&&an.video.matomoResource){ap.setResource(an.video.matomoResource) }else{if(an&&an.video&&"undefined"!==typeof an.video.piwikResource&&an.video.piwikResource){ap.setResource(an.video.piwikResource)}}}}}function ad(){if(!ab&&ac.currentSrc){ab=ac.currentSrc}else{if(ab&&ac.currentSrc&&ab!=ac.currentSrc){ab=ac.currentSrc;var an=F.makeUrlAbsolute(ab);var am=U.getMediaTitle();T=false;U.reset();U.setResource(an);U.setMediaTitle("");var ao=m.getMediaTitle(ac);if(ao&&ao!==am){U.setMediaTitle(ao)}else{ae(ac,U)}al(ac,U);R()}}}function ak(){if(!aa&&(U.getResource()||U.getMediaTitle())){aa=true;ai(ac,U);al(ac,U);U.trackUpdate()}}function af(){ad();X();R();Y();ak()}var ag=null;if(ac.loop){ag=0}var Z=0;var aj=false;if(ac.loop&&ac.autoplay&&ac.muted){aj=true}ac.addEventListener("playing",function(){ad();if("undefined"!==typeof ac.paused&&ac.paused){return}if("undefined"!==typeof ac.ended&&ac.ended){return}if(!T){Y();T=true;U.play()}},true);ac.addEventListener("durationchange",R,true);ac.addEventListener("loadedmetadata",af,true);ac.addEventListener("loadeddata",af,true); ac.addEventListener("pause",function(){if(ac.currentTime&&ac.duration&&ac.currentTime===ac.duration){return}if(ac.seeking){return}Y();T=false;U.pause()},true);ac.addEventListener("seeking",function(){if(ac.seeking){Y();var am=parseInt(U.getMediaProgressInSeconds(),10);if((ag===null||ag!==am)&&Z<25){ag=am;U.trackEvent("seek");Z++}}},true);ac.addEventListener("ended",function(){T=false;U.finish()},true);ac.addEventListener("timeupdate",function(){Y();R();if(ah&&!U.width){X()}if("undefined"!==typeof ac.paused&&ac.paused){return}if("undefined"!==typeof ac.ended&&ac.ended){return}if(aj){var am=N.roundTimeToSeconds(U.watchedTime);var an=U.getMediaTotalLengthInSeconds();if(am>=30&&an>=1&&an<30&&(am/an)>=3){U.disable()}}aa=true;if(!T){T=true;U.play()}else{U.update()}},true);ac.addEventListener("seeking",function(){U.seekStart()},true);ac.addEventListener("seeked",function(){Y();R();U.seekFinish()},true);if(ah){ac.addEventListener("resize",af,true);C.addEventListener("resize",function(){X()},false) }U.timeout=setTimeout(function(){af();U.timeout=null},1500)};M.scanForMedia=function(T){if(!C.addEventListener){return}var U=H();var X=T.getElementsByTagName("video");var R;for(var S=0;S=8&&ab<10){Z=n().stringify(Z)}}T.contentWindow.postMessage(Z,V)}}W("ping")};p.scanForMedia=function(S){if(!C.addEventListener){return}var R=S.getElementsByTagName("iframe");for(var Q=0;Q0){new p(R[Q],f.VIDEO)}}R=null};var t=function(U,X){if(!U){return}if(!C.addEventListener){return}if(U.playerInstance){return}var R=m.getMediaResource(U,null);var aa=new j("youtube",X,R);aa.setWidth(U.clientWidth);aa.setHeight(U.clientHeight);aa.setFullscreen(m.isFullscreen(U));G.push(aa);C.addEventListener("resize",function(){aa.setWidth(U.clientWidth);aa.setHeight(U.clientHeight);aa.setFullscreen(m.isFullscreen(U))},false);var Z=m.getMediaTitle(U);if(Z){aa.setMediaTitle(Z)}var S=false;var T=null;var W=!m.getAttribute(U,"data-piwik-title")&&!m.getAttribute(U,"data-matomo-title");var Q=false;var V=false;var Y=null;U.playerInstance=new YT.Player(U,{events:{onReady:function(ab){if(!ab||!ab.target){return }if(W&&ab.target&&ab.target.getVideoData){var ac=ab.target.getVideoData();if(ac&&ac.title){aa.setMediaTitle(ac.title)}else{o(U,aa)}}aa.trackUpdate()},onStateChange:function(ab){if(!ab||!ab.target){return}var ae=ab.target;var ad;if(ab&&"undefined"!==typeof ab.data){ad=ab.data}else{if(!ae.getPlayerState){e("youtubeMissingPlayerState");return}ad=ae.getPlayerState()}e("youtubeStateChange",ad);switch(ad){case YT.PlayerState.ENDED:if(ae.getCurrentTime){aa.setMediaProgressInSeconds(ae.getCurrentTime())}if(ae.getDuration){aa.setMediaTotalLengthInSeconds(ae.getDuration())}aa.finish();if(T){clearInterval(T);T=null}break;case YT.PlayerState.PLAYING:var ac=null;if(ae.getVideoData){ac=ae.getVideoData()}if(!Y&&ac&&ac.video_id){Y=ac.video_id}else{if(Y&&ac&&ac.video_id&&Y!=ac.video_id){Y=ac.video_id;aa.reset();if(ae.getVideoUrl){aa.setResource(ae.getVideoUrl())}W=true;Q=false;S=false;e("currentVideoId has changed to "+Y)}}if(ae.getCurrentTime){aa.setMediaProgressInSeconds(ae.getCurrentTime())}if(ae.getDuration){aa.setMediaTotalLengthInSeconds(ae.getDuration()) }if(W){if(ac&&ac.title){aa.setMediaTitle(ac.title)}W=false}if(!Q||V){Q=true;V=false;S=false;aa.play()}else{if(S){S=false;aa.seekFinish()}}aa.update();if(!T){T=setInterval(function(){if(aa.isPlaying){if(ae&&ae.getCurrentTime){aa.setMediaProgressInSeconds(ae.getCurrentTime())}aa.update()}},1*1000)}break;case -1:case YT.PlayerState.PAUSED:setTimeout(function(){if(ae&&ae.getPlayerState&&ae.getPlayerState()==YT.PlayerState.PAUSED){if(ae&&ae.getCurrentTime){aa.setMediaProgressInSeconds(ae.getCurrentTime())}aa.pause();V=true;if(T){clearInterval(T);T=null}}},1000);break;case YT.PlayerState.BUFFERING:aa.seekStart();S=true;if(T){clearInterval(T);T=null}break}}}})};t.scanForMedia=function(Z){if(!C.addEventListener){return}var S=[];var Y=Z.getElementsByTagName("iframe");for(var W=0;W0||Q.indexOf("youtube-nocookie.com")>0)){m.setAttribute(Y[W],"enablejsapi","true");S.push(Y[W])}}Y=null; function R(ae,ad){if(!(ae in window)){return}var af=window[ae];if("function"!==typeof af){return}try{if(af.toString&&af.toString().indexOf("function replaceMe")===0){return}}catch(ac){}function ab(){try{af.apply(window,[].slice.call(arguments,0));ad()}catch(ag){ad();throw ag}}window[ae]=ab}function X(){return"object"===typeof YT&&YT&&YT.Player}function V(){if(!X()){return}var ab=Z.getElementsByTagName("iframe");for(var ac=0;ac0||ad.indexOf("youtube-nocookie.com")>0)){if(ab[ac].setAttribute){ab[ac].setAttribute("enablejsapi","1")}new t(ab[ac],f.VIDEO)}}}if(S&&S.length){if(X()){V()}else{if(C.onYouTubeIframeAPIReady){R("onYouTubeIframeAPIReady",V)}else{if(C.onYouTubePlayerAPIReady){R("onYouTubePlayerAPIReady",V)}else{C.onYouTubeIframeAPIReady=V;var aa=q.createElement("script");aa.src="https://www.youtube.com/iframe_api";var U=q.getElementsByTagName("script");if(U&&U.length){var T=U[0]; T.parentNode.insertBefore(aa,T)}else{if(q.body){q.body.appendChild(aa)}}}}}}S=null};var D=function(T,ad){if(!T){return}if(T.playerInstance){return}var ag=new SC.Widget(T);T.playerInstance=ag;var Q=m.getAttribute(T,"data-matomo-resource");if(!Q){Q=m.getAttribute(T,"data-piwik-resource")}var af=new j("soundcloud",ad,Q);G.push(af);var ae=m.getMediaTitle(T);if(ae){af.setMediaTitle(ae)}var R=false;var S=null;var Y=!m.getAttribute(T,"data-piwik-title")&&!m.getAttribute(T,"data-matomo-title");function V(){return af.getMediaTitle()&&af.getResource()}var ac=null;function ab(ah){ag.getCurrentSound(function(ai){if(ai===null){ag.getCurrentSoundIndex(function(aj){if(aj>=0){ag.getSounds(function(ak){if(aj in ak&&ak[aj]){ah(ak[aj])}})}})}else{ah(ai)}})}function aa(ah){if(!ah){return}ac=ah.id;if(Y&&!af.getMediaTitle()&&ah.title){af.setMediaTitle(ah.title)}if(ah.uri&&!af.getResource()){af.setResource(ah.uri)}if(ah.duration){af.setMediaTotalLengthInSeconds(parseInt(Math.floor(ah.duration/1000)))}af.trackUpdate() }function X(ah){if(ah&&ah.soundId&&ac!==ah.soundId){ac=ah.soundId;af.reset();af.setResource("");af.setMediaTitle("");Y=true;R=false;ab(aa);e("currentId has changed to "+ac);return true}return false}function U(){ag.getDuration(function(ah){af.setMediaTotalLengthInSeconds(parseInt(Math.floor(ah/1000)))})}function Z(ah){if("object"===typeof ah&&"undefined"!==typeof ah.currentPosition){af.setMediaProgressInSeconds(parseInt(Math.floor(ah.currentPosition/1000)))}}var W=false;ag.bind(SC.Widget.Events.READY,function(ah){ab(aa);ag.bind(SC.Widget.Events.PLAY,function(ai){if(!V()){return}if(X(ai)){return}U();Z(ai);af.play()});ag.bind(SC.Widget.Events.PLAY_PROGRESS,function(ai){if(!V()){return}if(X(ai)){return}U();Z(ai);if(W){return}if(af.isPaused){af.play();return}if(!af.isPlaying){return}if(R){R=false;af.seekFinish()}af.update()});ag.bind(SC.Widget.Events.PAUSE,function(ai){if(!V()){return}if(X(ai)){return}U();Z(ai);if(af.getMediaProgressInSeconds()&&af.getMediaTotalLengthInSeconds()===af.getMediaProgressInSeconds()){e("ignoring pause event because video is finished"); return}af.pause();W=true;setTimeout(function(){W=false},1000)});ag.bind(SC.Widget.Events.FINISH,function(ai){if(!V()){return}if(X(ai)){return}U();Z(ai);af.finish()});ag.bind(SC.Widget.Events.SEEK,function(ai){if(!V()){return}if(X(ai)){return}U();Z(ai);af.seekStart();R=true})})};D.scanForMedia=function(V){function T(){var aa=[];var Y=V.getElementsByTagName("iframe");for(var Z=0;Z0){aa.push(Y[Z])}}return aa}function U(){return"object"===typeof SC&&SC&&SC.Widget}function X(){if(!U()){return}var Z=T();for(var Y=0;Y0){new D(Z[Y],f.AUDIO)}}}var S=T();if(S&&S.length){if(U()){X()}else{var R=q.createElement("script");R.src="https://w.soundcloud.com/player/api.js";R.onload=X;var Q=q.getElementsByTagName("script");if(Q&&Q.length){var W=Q[0];W.parentNode.insertBefore(R,W)}else{if(q.body){q.body.appendChild(R) }}}}S=null};c.registerPlayer("html5",M);c.registerPlayer("vimeo",p);c.registerPlayer("youtube",t);c.registerPlayer("jwplayer",J);c.registerPlayer("soundcloud",D);function y(Q){if("undefined"!==typeof Q.MediaAnalytics){return}Q.MediaAnalytics={enableEvents:true,enableProgress:true,disableTrackEvents:function(){this.enableEvents=false},enableTrackEvents:function(){this.enableEvents=true},isTrackEventsEnabled:function(){return a&&this.enableEvents},disableTrackProgress:function(){this.enableProgress=false},enableTrackProgress:function(){this.enableProgress=true},isTrackProgressEnabled:function(){return a&&this.enableProgress}};Piwik.trigger("MediaAnalytics.TrackerInitialized",[Q])}function v(){if(typeof window==="object"&&"function"===typeof C.piwikMediaAnalyticsAsyncInit){C.piwikMediaAnalyticsAsyncInit()}A=true}var x=false;var i=false;function g(){if(!x&&b()){x=true;var R=jwplayer();if("object"===typeof R&&"function"===typeof R.on){R.on("ready",function(S){c.scanForMedia(document)})}}if(!i&&k()){i=true; flowplayer(function(T,S){if(T){T.on("ready",function(){c.scanForMedia(document)});T.on("load",function(){c.scanForMedia(document)})}});var Q=flowplayer();if("object"===typeof Q&&"function"===typeof Q.on){Q.on("ready",function(){c.scanForMedia(document)});Q.on("load",function(){c.scanForMedia(document)})}}}function K(){Piwik.DOM.onReady(function(){var Q=P();if(!Q||!s(Q)||!Q.length){return}c.scanForMedia(document);g()});Piwik.DOM.onLoad(function(){var Q=P();if(!Q||!s(Q)||!Q.length){return}c.scanForMedia(document);g()})}function L(){if("object"===typeof C&&"object"===typeof C.Piwik&&"object"===typeof C.Piwik.MediaAnalytics){return}if("object"===typeof C&&!C.Piwik){return}Piwik.MediaAnalytics={utils:N,url:F,element:m,players:c,MediaTracker:j,mediaType:f,scanForMedia:function(S){c.scanForMedia(S||document)},setPingInterval:function(S){if(10>S){throw new Error("Ping interval needs to be at least ten seconds")}I=true;B=parseInt(S,10)},removePlayer:function(S){c.removePlayer(S)},addPlayer:function(T,S){c.registerPlayer(T,S) },disableMediaAnalytics:function(){a=false},enableMediaAnalytics:function(){a=true},setPiwikTrackers:function(S){if(S===null){w=null;return}if(!s(S)){S=[S]}w=S;if(A){K()}},setMediaTitleFallback:function(S){if("function"!==typeof S){throw new Error("The mediaTitleFallback needs to be callback function")}r=S},getPiwikTrackers:function(){return P()},isMediaAnalyticsEnabled:function(){return a},setMaxTrackingTime:function(S){E=parseInt(S,10)*1000},enableDebugMode:function(){O=true}};Piwik.addPlugin("MediaAnalytics",{unload:function(){var T;e("tracker intances mediaTrackerInstances");for(var S=0;S(n.getTime()+(n.getTimezoneOffset()*60000))){return false}return true},_getValueForAttribute:function(o){var n=(""+o.attribute).toLowerCase();switch(n){case j.TARGET_ATTRIBUTE_URL:return i.decodeSafe(this.location.href);case j.TARGET_ATTRIBUTE_PATH:return i.decodeSafe(this.location.pathname);case j.TARGET_ATTRIBUTE_URLPARAM:return i.getQueryParameter(this.location.search,o.value)}},_matchesAttribute:function(p,n){var o=(""+p.attribute).toLowerCase();switch(o){case j.TARGET_ATTRIBUTE_URL:case j.TARGET_ATTRIBUTE_PATH:return this._matchesTargetValue(n,p.type,p.inverted,p.value);case j.TARGET_ATTRIBUTE_URLPARAM:return this._matchesTargetValue(n,p.type,p.inverted,p.value2);default:b("Invalid target attribute")}return false},_matchesTargetValue:function(p,o,r,n){var q=false; var r=!!r&&r!=="0";if("string"===typeof p){p=p.toLowerCase()}if("string"===typeof n&&o!=="regexp"){n=n.toLowerCase()}switch(o){case j.TARGET_TYPE_ANY:q=true;break;case j.TARGET_TYPE_EXISTS:if(typeof p!=="undefined"&&p!==null){q=true}break;case j.TARGET_TYPE_EQUALS_SIMPLE:if(p&&p===String(n)){q=true}p=i.removeQueryAndHashFromUrl(p);p=i.removeProtocol(p);n=i.removeProtocol(n);p=i.removeWwwSubdomain(p);n=i.removeWwwSubdomain(n);if(p&&(p===String(n)||p+"/"===String(n)||p==="/"+n||p===n+"/"||p==="/"+n+"/")){q=true}break;case j.TARGET_TYPE_EQUALS_EXACTLY:if(p&&p===String(n)){q=true}if(p&&p.indexOf("://")>0&&p.charAt(p.length-1)==="/"&&3===(p.split("/").length-1)&&p===(n+"/")){q=true}if(n&&n.indexOf("://")>0&&n.charAt(n.length-1)==="/"&&3===(n.split("/").length-1)&&n===(p+"/")){q=true}break;case j.TARGET_TYPE_CONTAINS:if(p&&p.indexOf(String(n))!==-1){q=true}break;case j.TARGET_TYPE_STARTS_WITH:if(p&&p.indexOf(String(n))===0){q=true}break;case j.TARGET_TYPE_REGEXP:if(new RegExp(n).test(p)){q=true }break;default:b("Invalid target type given")}if(r){return !q}return q}};var j=function(o){this.options=o?o:{};l("creating experiment with options",o);if(!this.options.name){b('Missing experiment name in options. Use eg: new PiwikAbTesting.Experiment({name: "MyName"})')}if(!this.options.variations){b('Missing "variations" option. Use eg: new PiwikAbTesting.Experiment({variations: [{...}, {...}]})')}if(typeof this.options.variations!=="object"||!this.options.variations.length){b('"variations" has to be an array')}var p;for(p=0;p100){b("percentage has to be between 0 and 100")}this.name=null;this.variations=null;this.includedTargets=null;this.excludedTargets=null;this.startDateTime=null;this.endDateTime=null;this.percentage=100;this.piwikTracker=null;this.trigger=function(){return true};this._cacheForcedVariationName=null;if(i.hasLocalStorage()){l("using local storage");this.storage=new d.local()}else{l("using cookies storage");this.storage=new d.cookies()}var n;for(n in this.options){if(Object.prototype.hasOwnProperty.call(this.options,n)){this[n]=this.options[n]}}this._track=function(t,s){if(this.piwikTracker){this.piwikTracker[t].apply(this.piwikTracker,s) }else{if(typeof _paq==="undefined"){_paq=[]}s.unshift(t);_paq.push(s)}l("sent tracking request",t,s)};this.trackUsedVariation=function(s){this._track("trackEvent",["abtesting",this.name,s])};this.trackGoal=function(s){if(s){this._track("trackGoal",[s])}};this._getVariationByName=function(t){t=(""+t).toLowerCase();for(var s=0;s100){s=100}if(s<0){s=0}return s};this.getRandomVariationName=function(){var y=this._getVariationDefaultPercentage(); var v=[];for(var w=0;w