Chriser_

amp-analytics-0.1.js

Jun 10th, 2018
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (self.AMP=self.AMP||[]).push({n:"amp-analytics",v:"1528391646530",f:(function(AMP){var g;function m(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}function aa(a,b){b=void 0===b?"":b;try{return decodeURIComponent(a)}catch(c){return b}};var ba=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function t(a){var b=Object.create(null);if(!a)return b;for(var c;c=ba.exec(a);){var d=aa(c[1],c[1]),e=c[2]?aa(c[2],c[2]):"";b[d]=e}return b};var ca="";function da(a){var b=a||self,c;if(b.AMP_MODE)c=b.AMP_MODE;else{c=b;var d=t(c.location.originalHash||c.location.hash),e=t(c.location.search);ca||(ca=c.AMP_CONFIG&&c.AMP_CONFIG.v?c.AMP_CONFIG.v:"011528391646530");c=b.AMP_MODE={localDev:!1,development:!("1"!=d.development&&!c.AMP_DEV_MODE),examiner:"2"==d.development,filter:d.filter,geoOverride:d["amp-geo"],minified:!0,lite:void 0!=e.amp_lite,test:!1,log:d.log,version:"1528391646530",rtvVersion:ca}}return c};var ea=Object.prototype.toString;function fa(a){return"[object Object]"===ea.call(a)}function u(a){return"number"===typeof a&&isFinite(a)}function ga(a){var b=ha,c;for(c in b)if(b[c]===a)return!0;return!1};function ia(a){for(var b=null,c="",d=0;d<arguments.length;d++){var e=arguments[d];if(e instanceof Error&&!b){var b=void 0,f=e.message,h=String(Math.random());e.message=h;if(e.message===h)e.message=f,b=e;else{f=Error(e.message);for(b in e)f[b]=e[b];f.stack=e.stack;b=f}}else c&&(c+=" "),c+=e}b?c&&(b.message=c+": "+b.message):b=Error(c);return b}function ja(a){var b=ia.apply(null,arguments);setTimeout(function(){self.reportError(b);throw b;})}self.log=self.log||{user:null,dev:null,userForEmbed:null};
  2. var ka=self.log;function v(){if(!ka.user)throw Error("failed to call initLogConstructor");return ka.user}function w(){if(ka.dev)return ka.dev;throw Error("failed to call initLogConstructor");};var x=Object.prototype.hasOwnProperty;function y(){var a,b=Object.create(null);a&&Object.assign(b,a);return b}function A(a){return a||{}};function la(a,b){return b.length>a.length?!1:0==a.lastIndexOf(b,0)}function ma(a,b){for(var c=5,d=c||1,e={},f=0;f<d&&(e.matches=0,a=a.replace(/\${([^}]*)}/g,function(a){return function(c,d){a.matches++;return b(d)}}(e)),e.matches);e={matches:e.matches},f++);return a};var na=(self.AMP_CONFIG||{}).thirdPartyUrl||"https://3p.ampproject.net";function oa(a){this.Wb=a;this.Na=this.ib=0;this.va=Object.create(null)}oa.prototype.has=function(a){return!!this.va[a]};oa.prototype.get=function(a){var b=this.va[a];if(b)return b.access=++this.Na,b.payload};oa.prototype.put=function(a,b){this.has(a)||this.ib++;this.va[a]={payload:b,access:this.Na};if(!(this.ib<=this.Wb)){w().warn("lru-cache","Trimming LRU cache");a=this.va;var c=this.Na+1,d,e;for(e in a){var f=a[e].access;f<c&&(c=f,d=e)}void 0!==d&&(delete a[d],this.ib--)}};A({c:!0,v:!0,a:!0,ad:!0});var pa,qa;
  3. function B(a){var b;pa||(pa=self.document.createElement("a"),qa=self.UrlCache||(self.UrlCache=new oa(100)));var c=b?null:qa,d=pa;if(c&&c.has(a))a=c.get(a);else{d.href=a;d.protocol||(d.href=d.href);var e={href:d.href,protocol:d.protocol,host:d.host,hostname:d.hostname,port:"0"==d.port?"":d.port,pathname:d.pathname,search:d.search,hash:d.hash,origin:null};"/"!==e.pathname[0]&&(e.pathname="/"+e.pathname);if("http:"==e.protocol&&80==e.port||"https:"==e.protocol&&443==e.port)e.port="",e.host=e.hostname;
  4. e.origin=d.origin&&"null"!=d.origin?d.origin:"data:"!=e.protocol&&e.host?e.protocol+"//"+e.host:e.href;c&&c.put(a,e);a=e}return a}function ra(a,b){var c;if(!b)return a;var d=a.split("#",2),e=d[0].split("?",2),f=e[0]+(e[1]?c?"?"+b+"&"+e[1]:"?"+e[1]+"&"+b:"?"+b);return f+=d[1]?"#"+d[1]:""}function sa(a){"string"==typeof a&&(a=B(a));var b;(b="https:"==a.protocol||"localhost"==a.hostname)||(a=a.hostname,b=a.length-10,b=0<=b&&a.indexOf(".localhost",b)==b);return b}
  5. function ta(a,b){var c;c=void 0===c?"source":c;v().assert(null!=a,"%s %s must be available",b,c);var d=a;v().assert(sa(d)||/^(\/\/)/.test(d),'%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s',b,c,d)};function ua(a){a:{var b;try{b=a.document.cookie}catch(k){b=""}if(a=b)for(a=a.split(";"),b=0;b<a.length;b++){var c=a[b].trim(),d=c.indexOf("="),e;if(e=-1!=d)e=c.substring(0,d).trim(),e="AMP_EXP"==aa(e,void 0);if(e){a=c.substring(d+1).trim();a=aa(a,a);break a}}a=null}var f=a,h=f?f.split(/\s*,\s*/g):[];a=Object.create(null);for(b=0;b<h.length;b++)0!=h[b].length&&("-"==h[b][0]?a[h[b].substr(1)]=!1:a[h[b]]=!0);return a};function va(){var a,b;this.promise=new Promise(function(c,d){a=c;b=d});this.resolve=a;this.reject=b}function wa(a){return new Promise(function(b){b(a())})};function C(a,b){a=E(a);return F(a,b)}function G(a,b){a=xa(a);a=ya(a);return F(a,b)}function E(a){return a.__AMP_TOP||a}function za(a,b){var c=(a.ownerDocument||a).defaultView;if(c&&c!=b&&E(c)==b)try{return c.frameElement}catch(d){}return null}function xa(a){return a.nodeType?C((a.ownerDocument||a).defaultView,"ampdoc").getAmpDoc(a):a}function ya(a){a=xa(a);return a.isSingleDoc()?a.win:a}
  6. function F(a,b){Aa(a,b);var c=Ba(a);a=c[b];a.obj||(a.obj=new a.ctor(a.context),a.ctor=null,a.context=null,a.resolve&&a.resolve(a.obj));return a.obj}function Ca(a,b){var c=Da(a,b);if(c)return c;var d=new va,e=d,f=e.promise,e=e.resolve;Ba(a)[b]={obj:null,promise:f,resolve:e,context:null,ctor:null};return f}function Da(a,b){var c=Ba(a)[b];if(c){if(c.promise)return c.promise;F(a,b);return c.promise=Promise.resolve(c.obj)}return null}function Ba(a){var b=a.services;b||(b=a.services={});return b}
  7. function Aa(a,b){a=a.services&&a.services[b];return!(!a||!a.ctor&&!a.obj)};/*
  8.  https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
  9. function Ea(a,b){for(var c,d=a;d&&d!==c;d=d.parentElement)if(b(d))return d;return null}function Fa(a,b){return a.closest?a.closest(b):Ea(a,function(a){return Ga(a,b)})}function Ga(a,b){var c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector;return c?c.call(a,b):!1}var Ha;
  10. function Ia(a){var b=void 0,c=Ja,d=b||function(a){return a},e=a.dataset;a={};var f=c?c:/^param(.+)/,h;for(h in e){var k=h.match(f);if(k){var n=k[1][0].toLowerCase()+k[1].substr(1);a[d(n)]=e[h]}}return a};var Ka=[];function La(a){return Ma(a).then(function(a){return v().assert(a,"Service %s was requested to be provided through %s, but %s is not loaded in the current page. To fix this problem load the JavaScript file for %s in this page.","userNotificationManager","amp-user-notification","amp-user-notification","amp-user-notification")})}
  11. function Ma(a){var b=xa(a),c=Da(ya(a),"userNotificationManager");return c?c:b.whenBodyAvailable().then(function(){return Na(b.win)}).then(function(){var c=b.win;return c.ampExtendedElements&&c.ampExtendedElements["amp-user-notification"]?Ca(ya(a),"userNotificationManager"):null})}function Na(a){return Promise.resolve().then(function(){if(Ka.includes("amp-user-notification")){var b=C(a,"extensions");return b.waitForExtension(a,"amp-user-notification")}})};function Oa(a){a:{if(a.nodeType){var b=(a.ownerDocument||a).defaultView,c=E(b);if(b=b!=c&&Aa(b,"url-replace")?F(b,"url-replace"):null){a=b;break a}}a=G(a,"url-replace")}return a}function H(a){return G(a,"viewer")}function I(a){return G(a,"viewport")};function Pa(a,b){try{return JSON.parse(a)}catch(c){b&&b(c)}};var Qa,Ra="Webkit webkit Moz moz ms O o".split(" ");function Sa(a,b){var c=void 0;if(la(b,"--"))return b;Qa||(Qa=y());var d=Qa[b];if(!d||c){d=b;if(void 0===a[b]){var e=b.charAt(0).toUpperCase()+b.slice(1);a:{for(var f=0;f<Ra.length;f++){var h=Ra[f]+e;if(void 0!==a[h]){e=h;break a}}e=""}var k=e;void 0!==a[k]&&(d=k)}c||(Qa[b]=d)}return d}function Ta(a,b,c){var d;(b=Sa(a.style,b))&&(a.style[b]=d?c+d:c)}
  12. function Ua(a){var b=!1;if(void 0===b){var c;c=(c=Sa(a.style,"display"))?a.style[c]:void 0;b="none"==c}Ta(a,"display",b?"":"none")};var J;function Va(a,b,c){function d(a){try{return h(a)}catch(p){throw self.reportError(p),p;}}var e=void 0,f=a,h=c,k=Wa(),n=!1;e&&(n=e.capture);f.addEventListener(b,d,k?e:n);return function(){f&&f.removeEventListener(b,d,k?e:n);d=f=h=null}}function Wa(){if(void 0!==J)return J;J=!1;try{var a={get capture(){J=!0}};self.addEventListener("test-options",null,a);self.removeEventListener("test-options",null,a)}catch(b){}return J};function Xa(a,b,c){return Va(a,b,c)}function Ya(a,b,c){var d=c,e=Va(a,b,function(a){try{d(a)}finally{d=null,e()}});return e}
  13. function Za(a){var b,c;if(a.complete||"complete"==a.readyState||a.document&&"complete"==a.document.readyState)return Promise.resolve(a);var d=new Promise(function(d,f){var e=a.tagName;b="AUDIO"===e||"VIDEO"===e?Ya(a,"loadstart",d):Ya(a,"load",d);e&&(c=Ya(a,"error",f))});return d.then(function(){c&&c();return a},function(){b&&b();var c=a;c&&c.src&&(c=c.src);throw v().createError("Failed to load:",c);})};function $a(a,b){try{var c=za(a,b).parentElement;if("AMP-AD"==c.nodeName)return String(c.getResourceId())}catch(d){}return null};function K(){this.w=null}g=K.prototype;g.add=function(a){var b=this;this.w||(this.w=[]);this.w.push(a);return function(){b.remove(a)}};g.remove=function(a){this.w&&(a=this.w.indexOf(a),-1<a&&this.w.splice(a,1))};g.removeAll=function(){this.w&&(this.w.length=0)};g.fire=function(a){if(this.w)for(var b=this.w,c=0;c<b.length;c++)(0,b[c])(a)};g.getHandlerCount=function(){return this.w?this.w.length:0};function L(a,b,c,d){return{left:a,top:b,width:c,height:d,bottom:b+d,right:a+c,x:a,y:b}}function ab(a){for(var b=-Infinity,c=Infinity,d=-Infinity,e=Infinity,f=0;f<arguments.length;f++){var h=arguments[f];if(h&&(b=Math.max(b,h.left),c=Math.min(c,h.left+h.width),d=Math.max(d,h.top),e=Math.min(e,h.top+h.height),c<b||e<d))return null}return Infinity==c?null:L(b,d,c-b,e-d)}function M(a,b,c){return 0==b&&0==c||0==a.width&&0==a.height?a:L(a.left+b,a.top+c,a.width,a.height)};var bb=["AMP-AD","AMP-ANALYTICS","AMP-PIXEL","AMP-AD-EXIT"];function cb(a,b,c){return G(a,"resources").getResourcesInRect(b,c).then(function(a){var b=[];a.forEach(function(a){bb.includes(a.element.tagName)||b.push(a.loadedOnce())});return Promise.all(b)})};function db(a){if(!eb(a))return null;var b=a.indexOf("{");try{return JSON.parse(a.substr(b))}catch(c){return w().error("MESSAGING","Failed to parse message: "+a,c),null}}function eb(a){return"string"==typeof a&&0==a.indexOf("amp-")&&-1!=a.indexOf("{")};function fb(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];b(f,e,a)?(d<e&&(a[d]=f),d++):c.push(f)}d<a.length&&(a.length=d)}function gb(a,b){for(var c=0;c<a.length;c++)if(b(a[c],c,a))return c;return-1};function hb(a,b,c){var d=a.listeningFors;!d&&c&&(d=a.listeningFors=Object.create(null));a=d||null;if(!a)return a;var e=a[b];!e&&c&&(e=a[b]=[]);return e||null}function ib(a,b,c){var d=B(b.src).origin,e=c?b.getAttribute("data-amp-3p-sentinel"):"amp";a=hb(a,e,!0);for(var f,e=0;e<a.length;e++){var h=a[e];if(h.frame===b){f=h;break}}f||(f={frame:b,origin:d,events:Object.create(null)},a.push(f));return f.events}
  14. function jb(a){for(var b=A({sentinel:"unlisten"}),c=a.length-1;0<=c;c--){var d=a[c];if(!d.frame.contentWindow){a.splice(c,1);var e=d.events,f;for(f in e)e[f].splice(0,Infinity).forEach(function(a){a(b)})}}}
  15. function kb(a){if(!a.listeningFors){var b=function(b){if(b.data){var c=lb(b.data);if(c&&c.sentinel){var e;e=c.sentinel;var f=b.origin,h=b.source,k=hb(a,e);if(k){for(var n,l=0;l<k.length;l++){var p=k[l],q=p.frame.contentWindow;if(q)if("amp"===e){if(p.origin===f&&q==h){n=p;break}}else{var r;if(!(r=h==q))b:{for(r=h;r&&r!=r.parent;r=r.parent)if(r==q){r=!0;break b}r=!1}if(r){n=p;break}}else setTimeout(jb,0,k)}e=n?n.events:null}else e=k;var z=e;if(z){var D=z[c.type];if(D)for(D=D.slice(),e=0;e<D.length;e++)(0,D[e])(c,
  16. b.source,b.origin)}}}};a.addEventListener("message",b)}}function mb(a,b,c,d,e){function f(b,d,f){if(e||d==a.contentWindow)"unlisten"==b.sentinel?n():c(b,d,f)}var h=a.ownerDocument.defaultView;kb(h);d=ib(h,a,d);var k=d[b]||(d[b]=[]),n;k.push(f);return n=function(){if(f){var a=k.indexOf(f);-1<a&&k.splice(a,1);c=k=f=null}}}
  17. function nb(a,b,c,d,e){if(a.contentWindow)for(d.type=c,d.sentinel=e?a.getAttribute("data-amp-3p-sentinel"):"amp",a=d,e&&(a="amp-"+JSON.stringify(d)),d=0;d<b.length;d++)e=b[d],e.win.postMessage(a,e.origin)}function lb(a){"string"==typeof a&&(a="{"==a.charAt(0)?Pa(a,function(a){w().warn("IFRAME-HELPER","Postmessage could not be parsed. Is it in a valid JSON format?",a)})||null:eb(a)?db(a):null);return a}
  18. function ob(a,b,c,d){var e=this;this.xb=a;this.Ya=c;this.ga=[];this.kb=mb(this.xb,b,function(a,b,c){e.ga.some(function(a){return a.win==b})||e.ga.push({win:b,origin:c});d(a,b,c)},this.Ya,this.Ya)}ob.prototype.send=function(a,b){fb(this.ga,function(a){return!!a.win.parent});nb(this.xb,this.ga,a,b,this.Ya)};ob.prototype.destroy=function(){this.kb();this.ga.length=0};var pb=[0,.05,.1,.15,.2,.25,.3,.35,.4,.45,.5,.55,.6,.65,.7,.75,.8,.85,.9,.95,1],qb=Date.now();function rb(a){return"IntersectionObserver"in a&&"IntersectionObserverEntry"in a&&"intersectionRatio"in a.IntersectionObserverEntry.prototype}function N(a,b){this.sb=a;var c=b&&b.threshold,c=c?Array.isArray(c)?c:[c]:[0];for(a=0;a<c.length;a++)u(c[a]);this.rc=c.sort();this.ab=null;this.Cb=void 0;this.D=[]}N.prototype.disconnect=function(){this.D.length=0};
  19. N.prototype.observe=function(a){for(var b=0;b<this.D.length;b++)if(this.D[b].element===a){w().warn("INTERSECTION-OBSERVER","should observe same element once");return}var c={element:a,currentThresholdSlot:0};this.ab&&(a=sb(this,c,this.ab,this.Cb))&&this.sb([a]);this.D.push(c)};N.prototype.unobserve=function(a){for(var b=0;b<this.D.length;b++)if(this.D[b].element===a){this.D.splice(b,1);return}w().warn("INTERSECTION-OBSERVER","unobserve non-observed element")};
  20. N.prototype.tick=function(a,b){b&&(a=M(a,-b.left,-b.top),b=M(b,-b.left,-b.top));this.ab=a;this.Cb=b;for(var c=[],d=0;d<this.D.length;d++){var e=sb(this,this.D[d],a,b);e&&c.push(e)}c.length&&this.sb(c)};
  21. function sb(a,b,c,d){var e=b.element,f=null,h=e.getLayoutBox(),k=e.getOwner(),f=k&&k.getLayoutBox(),n=ab(h,f,c,d)||L(0,0,0,0),k=n,l=h,k=k.width*k.height/(l.width*l.height);a=a.rc;var l=0,p=a.length;if(0==k)a=0;else{for(var q=(l+p)/2|0;l<q;)k<a[q]?p=q:l=q,q=(l+p)/2|0;a=p}var r=a;if(r==b.currentThresholdSlot)return null;b.currentThresholdSlot=r;c=d?null:c;d=n;a=h;if(l=c)d=M(d,-c.left,-c.top),a=M(a,-c.left,-c.top),l=M(l,-c.left,-c.top);var z={time:"undefined"!==typeof performance&&performance.now?performance.now():
  22. Date.now()-qb,rootBounds:l,boundingClientRect:a,intersectionRect:d,intersectionRatio:k,target:e};return z};function tb(a,b){var c=0;"active"===a.type&&(c=5);return Math.min(b-a.time,c)}function ub(){this.jb=0;this.R=void 0}ub.prototype.push=function(a){this.R||(this.R=a);this.R.time<a.time&&(this.jb+=tb(this.R,a.time),this.R=a)};ub.prototype.getTotalEngagedTime=function(a){var b=0;void 0!==this.R&&(b=this.jb+tb(this.R,a));return b};var vb=["mousedown","mouseup","mousemove","keydown","keyup"];
  23. function wb(a){this.ampdoc=a;this.Tb=this.qc.bind(this);this.qb=this.Wa.bind(this);this.Sb=this.cc.bind(this);this.oa={};this.pa=[];this.Ba=this.Aa=!1;this.nb=new ub;this.G=H(this.ampdoc);this.m=I(this.ampdoc);this.G.whenFirstVisible().then(this.pc.bind(this))}g=wb.prototype;g.pc=function(){this.ca=Date.now();this.Wa();for(var a=0;a<vb.length;a++)this.pa.push(Xa(this.ampdoc.getRootNode(),vb[a],this.qb));this.pa.push(this.G.onVisibilityChanged(this.Sb));this.m.onScroll(this.qb)};
  24. function xb(a){var b=Date.now()-a.ca;return 0<b?b:0}g.qc=function(){this.Ba=this.Aa=!1};g.Wa=function(){this.Aa||(this.Aa=!0,this.Ba=!1,yb(this,"active"))};function yb(a,b){var c=xb(a),d=Math.floor(c/1E3),e=1E3-c%1E3;setTimeout(a.Tb,e);a.nb.push({type:b,time:d})}g.cc=function(){this.G.isVisible()?this.Wa():this.Ba||(this.Ba=!0,this.Aa=!1,yb(this,"inactive"))};g.kb=function(){for(var a=0;a<this.pa.length;a++){var b=this.pa[a];"function"===typeof b&&b()}this.pa=[]};g.tc=function(){this.kb()};
  25. g.getTotalEngagedTime=function(){var a=Math.floor(xb(this)/1E3);return this.nb.getTotalEngagedTime(a)};g.getIncrementalEngagedTime=function(a,b){b=void 0===b?!0:b;if(!this.oa.hasOwnProperty(a))return b&&(this.oa[a]=this.getTotalEngagedTime()),this.getTotalEngagedTime();var c=this.oa[a];if(!1===b)return this.getTotalEngagedTime()-c;this.oa[a]=this.getTotalEngagedTime();return this.oa[a]-c};var zb={"default":{transport:{beacon:!0,xhrpost:!0,image:!0},vars:{accessReaderId:"ACCESS_READER_ID",adNavTiming:"AD_NAV_TIMING",adNavType:"AD_NAV_TYPE",adRedirectCount:"AD_NAV_REDIRECT_COUNT",ampdocHost:"AMPDOC_HOST",ampdocHostname:"AMPDOC_HOSTNAME",ampdocUrl:"AMPDOC_URL",ampGeo:"AMP_GEO",ampState:"AMP_STATE",ampVersion:"AMP_VERSION",ancestorOrigin:"ANCESTOR_ORIGIN",authdata:"AUTHDATA",availableScreenHeight:"AVAILABLE_SCREEN_HEIGHT",availableScreenWidth:"AVAILABLE_SCREEN_WIDTH",backgroundState:"BACKGROUND_STATE",
  26. browserLanguage:"BROWSER_LANGUAGE",canonicalHost:"CANONICAL_HOST",canonicalHostname:"CANONICAL_HOSTNAME",canonicalPath:"CANONICAL_PATH",canonicalUrl:"CANONICAL_URL",clientId:"CLIENT_ID",contentLoadTime:"CONTENT_LOAD_TIME",counter:"COUNTER",documentCharset:"DOCUMENT_CHARSET",documentReferrer:"DOCUMENT_REFERRER",domainLookupTime:"DOMAIN_LOOKUP_TIME",domInteractiveTime:"DOM_INTERACTIVE_TIME",externalReferrer:"EXTERNAL_REFERRER",firstContentfulPaint:"FIRST_CONTENTFUL_PAINT",firstViewportReady:"FIRST_VIEWPORT_READY",
  27. fragmentParam:"FRAGMENT_PARAM",makeBodyVisible:"MAKE_BODY_VISIBLE",htmlAttr:"HTML_ATTR",incrementalEngagedTime:"INCREMENTAL_ENGAGED_TIME",navRedirectCount:"NAV_REDIRECT_COUNT",navTiming:"NAV_TIMING",navType:"NAV_TYPE",pageDownloadTime:"PAGE_DOWNLOAD_TIME",pageLoadTime:"PAGE_LOAD_TIME",pageViewId:"PAGE_VIEW_ID",queryParam:"QUERY_PARAM",random:"RANDOM",redirectTime:"REDIRECT_TIME",screenColorDepth:"SCREEN_COLOR_DEPTH",screenHeight:"SCREEN_HEIGHT",screenWidth:"SCREEN_WIDTH",scrollHeight:"SCROLL_HEIGHT",
  28. scrollLeft:"SCROLL_LEFT",scrollTop:"SCROLL_TOP",scrollWidth:"SCROLL_WIDTH",serverResponseTime:"SERVER_RESPONSE_TIME",sourceUrl:"SOURCE_URL",sourceHost:"SOURCE_HOST",sourceHostname:"SOURCE_HOSTNAME",sourcePath:"SOURCE_PATH",tcpConnectTime:"TCP_CONNECT_TIME",timestamp:"TIMESTAMP",timezone:"TIMEZONE",timezoneCode:"TIMEZONE_CODE",title:"TITLE",totalEngagedTime:"TOTAL_ENGAGED_TIME",userAgent:"USER_AGENT",viewer:"VIEWER",viewportHeight:"VIEWPORT_HEIGHT",viewportWidth:"VIEWPORT_WIDTH"}},acquialift:{vars:{decisionApiUrl:"us-east-1-decisionapi.lift.acquia.com",
  29. accountId:"xxxxxxxx",siteId:"xxxxxxxx"},transport:{beacon:!0,xhrpost:!0,image:!1},requests:{base:"https://${decisionApiUrl}/capture?account_id=${accountId}&site_id=${siteId}",basicCapture:"${base}&ident=${clientId(tc_ptid)}&identsrc=amp&es=Amp&url=${canonicalUrl}&rurl=${documentReferrer}&cttl=${title}",pageview:"${basicCapture}&en=Content View",click:"${basicCapture}&en=Click-Through"},triggers:{defaultPageview:{on:"visible",request:"pageview"}}},afsanalytics:{vars:{server:"www",websiteid:"xxxxxxxx",
  30. event:"click",clicklabel:"clicked from AMP page"},transport:{beacon:!1,xhrpost:!1,image:!0},requests:{host:"//${server}.afsanalytics.com",base:"${host}/cgi_bin/",pageview:"${base}connect.cgi?usr=${websiteid}Pauto&js=1&amp=1&title=${title}&url=${canonicalUrl}&refer=${documentReferrer}&resolution=${screenWidth}x${screenHeight}&color=${screenColorDepth}&Tips=${random}",click:"${base}click.cgi?usr=${websiteid}&event=${event}&exit=${clicklabel}"},triggers:{defaultPageview:{on:"visible",request:"pageview"}}},
  31. alexametrics:{requests:{base:"https://${ampAtrkHost}/atrk.gif?account=${atrk_acct}&domain=${domain}",pageview:"${base}&jsv=amp-${ampVersion}&frame_height=${viewportHeight}&frame_width=${viewportWidth}&title=${title}&time=${timestamp}&time_zone_offset=${timezone}&screen_params=${screenWidth}x${screenHeight}x${screenColorDepth}&ref_url=${documentReferrer}&host_url=${sourceUrl}&random_number=${random}&user_cookie=${clientId(__auc)}&user_cookie_flag=0&user_lang=${browserLanguage}&amp_doc_url=${ampdocUrl}"},
  32. vars:{atrk_acct:"",domain:"",ampAtrkHost:"certify-amp.alexametrics.com"},triggers:{trackPageview:{on:"visible",request:"pageview"}},transport:{xhrpost:!1,beacon:!1,image:!0}},atinternet:{transport:{beacon:!1,xhrpost:!1,image:!0},requests:{base:"https://${log}${domain}/hit.xiti?s=${site}&ts=${timestamp}&r=${screenWidth}x${screenHeight}x${screenColorDepth}&re=${availableScreenWidth}x${availableScreenHeight}",suffix:"&medium=amp&${extraUrlParams}&ref=${documentReferrer}",pageview:"${base}&p=${title}&s2=${level2}${suffix}",
  33. click:"${base}&pclick=${title}&s2click=${level2}&p=${label}&s2=${level2Click}&type=click&click=${type}${suffix}"}},umenganalytics:{vars:{siteid:"",initial_view_time:"",eventName:"",eventProps:""},requests:{base:"https://b.cnzz.com/utrack?&_siteid=${siteid}&_distinct_id=${clientId(umeng_amp_id)}&_t=${timestamp}&_s=google&_b=web&_r=${externalReferrer}&_h=${screenHeight}&_w=${screenWidth}&_ivt=${initial_view_time}",pageview:"${base}&_ename=$w_page_view&_eprops=${eventProps}",event:"${base}&_ename=${eventName}&_eprops=${eventProps}"},
  34. triggers:{defaultPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},baiduanalytics:{requests:{host:"https://hm.baidu.com",base:"${host}/hm.gif?si=${token}&nv=0&st=4&v=pixel-1.0&rnd=${timestamp}",pageview:"${base}&et=0",event:"${base}&ep=${category}*${action}*${label}*${value}&et=4&api=8_0"},transport:{beacon:!1,xhrpost:!1,image:!0}},burt:{vars:{trackingKey:"ignore",category:"",subCategory:""},requests:{host:"//${trackingKey}.c.richmetrics.com/",base:"${host}imglog?e=${trackingKey}&pi=${trackingKey}|${pageViewId}|${canonicalPath}|${clientId(burt-amp-user-id)}&ui=${clientId(burt-amp-user-id)}&v=amp&ts=${timestamp}&sn=${requestCount}&",
  35. pageview:"${base}type=page&ca=${category}&sc=${subCategory}&ln=${browserLanguage}&lr=${documentReferrer}&eu=${sourceUrl}&tz=${timezone}&pd=${scrollWidth}x${scrollHeight}&sd=${screenWidth}x${screenHeight}&wd=${availableScreenWidth}x${availableScreenHeight}&ws=${scrollLeft}x${scrollTop}",pageping:"${base}type=pageping"},triggers:{pageview:{on:"visible",request:"pageview"},pageping:{on:"timer",timerSpec:{interval:15,maxTimerLength:1200},request:"pageping"}},transport:{beacon:!1,xhrpost:!1,image:!0}},
  36. byside:{vars:{webcareZone:"webcare",webcareId:"",channel:"",fid:"",lang:"pt"},requests:{host:"//${webcareZone}.byside.com/",base:"${host}BWA${webcareId}/amp/",pageview:"${base}pixel.php",event:"${base}signal.php?event_id=${eventId}&event_label=${eventLabel}&fields=${fields}"},extraUrlParams:{webcare_id:"${webcareId}",bwch:"${channel}",lang:"${lang}",fid:"${fid}",bwit:"A",tuid:"${clientId(byside_webcare_tuid)}",suid:"",puid:"${pageViewId}p${timestamp}",referrer:"${documentReferrer}",page:"${sourceUrl}",
  37. amppage:"${ampdocUrl}",bwpt:"${title}",bres:"${viewportWidth}x${viewportHeight}",res:"${screenWidth}x${screenHeight}",v:"v20171116a",ampv:"${ampVersion}",viewer:"${viewer}",ua:"${userAgent}",r:"${random}"},triggers:{pageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},chartbeat:{requests:{host:"https://ping.chartbeat.net",basePrefix:"/ping?h=${domain}&p=${canonicalPath}&u=${clientId(_cb)}&d=${canonicalHost}&g=${uid}&g0=${sections}&g1=${authors}&g2=${zone}&g3=${sponsorName}&g4=${contentType}&c=120&x=${scrollTop}&y=${scrollHeight}&j=${decayTime}&R=1&W=0&I=0&E=${totalEngagedTime}&r=${documentReferrer}&t=${pageViewId}${clientId(_cb)}&b=${pageLoadTime}&i=${title}&T=${timestamp}&tz=${timezone}&C=2",
  38. baseSuffix:"&_",interval:"${host}${basePrefix}${baseSuffix}",anchorClick:"${host}${basePrefix}${baseSuffix}"},triggers:{trackInterval:{on:"timer",timerSpec:{interval:15,maxTimerLength:7200},request:"interval",vars:{decayTime:30}},trackAnchorClick:{on:"click",selector:"a",request:"anchorClick",vars:{decayTime:30}}},transport:{beacon:!1,xhrpost:!1,image:!0}},clicky:{vars:{site_id:""},requests:{base:"https://in.getclicky.com/in.php?site_id=${site_id}",baseSuffix:"&mime=${contentType}&x=${random}",pageview:"${base}&res=${screenWidth}x${screenHeight}&lang=${browserLanguage}&secure=1&type=pageview&href=${canonicalPath}&title=${title}${baseSuffix}",
  39. interval:"${base}&type=ping${baseSuffix}"},triggers:{defaultPageview:{on:"visible",request:"pageview"},interval:{on:"timer",timerSpec:{interval:60,maxTimerLength:600},request:"interval"}},transport:{beacon:!1,xhrpost:!1,image:!0}},colanalytics:{requests:{host:"https://ase.clmbtech.com",base:"${host}/message",pageview:"${base}?cid=${id}&val_101=${id}&val_101=${canonicalPath}&ch=${canonicalHost}&uuid=${uid}&au=${authors}&zo=${zone}&sn=${sponsorName}&ct=${contentType}&st=${scrollTop}&sh=${scrollHeight}&dct=${decayTime}&tet=${totalEngagedTime}&dr=${documentReferrer}&plt=${pageLoadTime}&val_108=${title}&val_120=3"},
  40. triggers:{defaultPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},comscore:{vars:{c2:"1000001"},requests:{host:"https://sb.scorecardresearch.com",base:"${host}/b?",pageview:"${base}c1=2&c2=${c2}&cs_pv=${pageViewId}&c12=${clientId(comScore)}&rn=${random}&c8=${title}&c7=${canonicalUrl}&c9=${documentReferrer}&cs_c7amp=${ampdocUrl}"},triggers:{defaultPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},cxense:{requests:{host:"https://scomcluster.cxense.com",
  41. base:"${host}/Repo/rep.gif",pageview:"${base}?ver=1&typ=pgv&sid=${siteId}&ckp=${clientId(cX_P)}&loc=${sourceUrl}&rnd=${random}&ref=${documentReferrer}&ltm=${timestamp}&wsz=${screenWidth}x${screenHeight}&bln=${browserLanguage}&chs=${documentCharset}&col=${screenColorDepth}&tzo=${timezone}&cp_cx_channel=amp"},triggers:{defaultPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},dynatrace:{requests:{endpoint:"${protocol}://${tenant}${separator}${environment}:${port}/ampbf/${tenantpath}",
  42. pageview:"${endpoint}?type=js&flavor=amp&v=1&a=1%7C1%7C_load_%7C_load_%7C-%7C${navTiming(navigationStart)}%7C${navTiming(domContentLoadedEventEnd)}%7C0%2C2%7C2%7C_onload_%7C_load_%7C-%7C${navTiming(domContentLoadedEventStart)}%7C${navTiming(domContentLoadedEventEnd)}%7C0&fId=${pageViewId}&vID=${clientId(rxVisitor)}&referer=${sourceUrl}&title=${title}&sw=${screenWidth}&sh=${screenHeight}&w=${viewportWidth}&h=${viewportHeight}&nt=a${navType}b${navTiming(navigationStart)}c${navTiming(navigationStart,redirectStart)}d${navTiming(navigationStart,redirectEnd)}e${navTiming(navigationStart,fetchStart)}f${navTiming(navigationStart,domainLookupStart)}g${navTiming(navigationStart,domainLookupEnd)}h${navTiming(navigationStart,connectStart)}i${navTiming(navigationStart,connectEnd)}j${navTiming(navigationStart,secureConnectionStart)}k${navTiming(navigationStart,requestStart)}l${navTiming(navigationStart,responseStart)}m${navTiming(navigationStart,responseEnd)}n${navTiming(navigationStart,domLoading)}o${navTiming(navigationStart,domInteractive)}p${navTiming(navigationStart,domContentLoadedEventStart)}q${navTiming(navigationStart,domContentLoadedEventEnd)}r${navTiming(navigationStart,domComplete)}s${navTiming(navigationStart,loadEventStart)}t${navTiming(navigationStart,loadEventEnd)}&app=${app}&time=${timestamp}"},
  43. triggers:{trackPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0},vars:{app:"ampapp",protocol:"https",tenant:"",environment:"live.dynatrace.com",port:"443",separator:"."}},euleriananalytics:{vars:{analyticsHost:"",documentLocation:"SOURCE_URL"},requests:{base:"https://${analyticsHost}",basePrefix:"-/${random}?euid-amp=${clientId(etuix)}&url=${documentLocation}&",pageview:"${base}/col2/${basePrefix}rf=${documentReferrer}&sd=${screenWidth}x${screenHeight}&sd=${screenColorDepth}&elg=${browserLanguage}",
  44. action:"${base}/action/${basePrefix}eact=${actionCode}&actr=${actionRef}",user:"${base}/uparam/${basePrefix}euk${userParamKey}=${userParamVal}"},transport:{beacon:!1,xhrpost:!1,image:!0}},facebookpixel:{vars:{pixelId:"PIXEL-ID"},requests:{host:"https://www.facebook.com",base:"${host}/tr?noscript=1",pageview:"${base}&ev=PageView&id=${pixelId}",event:"${base}&ev=${eventName}&id=${pixelId}&cd[content_name]=${content_name}",eventViewContent:"${base}&ev=ViewContent&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_type]=${content_type}&cd[content_ids]=${content_ids}",
  45. eventSearch:"${base}&ev=Search&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_category]=${content_category}&cd[content_ids]=${content_ids}&cd[search_string]=${search_string}",eventAddToCart:"${base}&ev=AddToCart&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_type]=${content_type}&cd[content_ids]=${content_ids}",eventAddToWishlist:"${base}&ev=AddToWishlist&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_category]=${content_category}&cd[content_ids]=${content_ids}",
  46. eventInitiateCheckout:"${base}&ev=InitiateCheckout&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_category]=${content_category}&cd[num_items]=${num_items}&cd[content_ids]=${content_ids}",eventAddPaymentInfo:"${base}&ev=AddPaymentInfo&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_category]=${content_category}&cd[content_ids]=${content_ids}",eventPurchase:"${base}&ev=Purchase&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_type]=${content_type}&cd[content_ids]=${content_ids}&cd[num_items]=${num_items}",
  47. eventLead:"${base}&ev=Lead&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_category]=${content_category}",eventCompleteRegistration:"${base}&ev=CompleteRegistration&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[status]=${status}"},triggers:{trackPageview:{on:"visible",request:"pageview"}}},gemius:{requests:{base:"https://${prefix}.hit.gemius.pl/_${timestamp}/redot.gif?l=91&id=${identifier}&screen=${screenWidth}x${screenHeight}&window=${viewportWidth}x${viewportHeight}&fr=1&href=${sourceUrl}&ref=${documentReferrer}&extra=gemamp%3D1%7Campid%3D${clientId(gemius)}%7C${extraparams}",
  48. pageview:"${base}&et=view&hsrc=1",event:"${base}&et=action&hsrc=3"},triggers:{defaultPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},googleadwords:{requests:{conversion_prefix:"https://www.googleadservices.com/pagead/conversion/",remarketing_prefix:"https://googleads.g.doubleclick.net/pagead/viewthroughconversion/",common_params:"${googleConversionId}/?cv=amp2&label=${googleConversionLabel}&random=${random}&url=${sourceUrl}&ref=${documentReferrer}&fst=${pageViewId}&num=${counter(googleadwords)}&fmt=3&async=1&u_h=${screenHeight}&u_w=${screenWidth}&u_ah=${availableScreenHeight}&u_aw=${availableScreenWidth}&u_cd=${screenColorDepth}&u_tz=${timezone}&tiba=${title}&guid=ON&script=0",
  49. conversion_params:"value=${googleConversionValue}&currency_code=${googleConversionCurrency}&bg=${googleConversionColor}&hl=${googleConversionLanguage}",conversion:"${conversion_prefix}${common_params}&${conversion_params}",remarketing:"${remarketing_prefix}${common_params}"},transport:{beacon:!1,xhrpost:!1,image:!0}},googleanalytics:{vars:{eventValue:"0",documentLocation:"SOURCE_URL",clientId:"CLIENT_ID(AMP_ECID_GOOGLE,,_ga)",dataSource:"AMP",anonymizeIP:"aip",errorParam:"${errorName}-${errorMessage}"},
  50. requests:{host:"https://www.google-analytics.com",basePrefix:"v=1&_v=a1&ds=${dataSource}&${anonymizeIP}&_s=${requestCount}&dt=${title}&sr=${screenWidth}x${screenHeight}&_utmht=${timestamp}&cid=${clientId}&tid=${account}&dl=${documentLocation}&dr=${externalReferrer}&sd=${screenColorDepth}&ul=${browserLanguage}&de=${documentCharset}",baseSuffix:"&a=${pageViewId}&z=${random}",pageview:"${host}/r/collect?${basePrefix}&t=pageview&jid=${random}&_r=1${baseSuffix}",event:"${host}/collect?${basePrefix}&t=event&jid=&ec=${eventCategory}&ea=${eventAction}&el=${eventLabel}&ev=${eventValue}${baseSuffix}",
  51. social:"${host}/collect?${basePrefix}&t=social&jid=&sa=${socialAction}&sn=${socialNetwork}&st=${socialTarget}${baseSuffix}",timing:"${host}/collect?${basePrefix}&t=${timingRequestType}&jid=&plt=${pageLoadTime}&dns=${domainLookupTime}&tcp=${tcpConnectTime}&rrt=${redirectTime}&srt=${serverResponseTime}&pdt=${pageDownloadTime}&clt=${contentLoadTime}&dit=${domInteractiveTime}${baseSuffix}",error:"${host}/collect?${basePrefix}&t=exception&exd=${errorParam}${baseSuffix}"},triggers:{performanceTiming:{on:"visible",
  52. request:"timing",sampleSpec:{sampleOn:"${clientId}",threshold:1},vars:{timingRequestType:"timing"}},adwordsTiming:{on:"visible",request:"timing",enabled:"${queryParam(gclid)}",vars:{timingRequestType:"adtiming"}}},extraUrlParamsReplaceMap:{dimension:"cd",metric:"cm"},optout:"_gaUserPrefs.ioo"},"googleanalytics-alpha":{vars:{eventValue:"0",documentLocation:"SOURCE_URL",clientId:"CLIENT_ID(AMP_ECID_GOOGLE,,_ga)",dataSource:"AMP",anonymizeIP:"aip",errorParam:"${errorName}-${errorMessage}"},requests:{host:"https://www.google-analytics.com",
  53. basePrefix:"v=1&_v=a1&ds=${dataSource}&${anonymizeIP}&_s=${requestCount}&dt=${title}&sr=${screenWidth}x${screenHeight}&_utmht=${timestamp}&cid=${clientId}&tid=${account}&dl=${documentLocation}&dr=${externalReferrer}&sd=${screenColorDepth}&ul=${browserLanguage}&de=${documentCharset}",baseSuffix:"&a=${pageViewId}&z=${random}",pageview:"${host}/r/collect?${basePrefix}&t=pageview&jid=${random}&_r=1${baseSuffix}",event:"${host}/collect?${basePrefix}&t=event&jid=&ec=${eventCategory}&ea=${eventAction}&el=${eventLabel}&ev=${eventValue}${baseSuffix}",
  54. social:"${host}/collect?${basePrefix}&t=social&jid=&sa=${socialAction}&sn=${socialNetwork}&st=${socialTarget}${baseSuffix}",timing:"${host}/collect?${basePrefix}&t=${timingRequestType}&jid=&plt=${pageLoadTime}&dns=${domainLookupTime}&tcp=${tcpConnectTime}&rrt=${redirectTime}&srt=${serverResponseTime}&pdt=${pageDownloadTime}&clt=${contentLoadTime}&dit=${domInteractiveTime}${baseSuffix}",error:"${host}/collect?${basePrefix}&t=exception&exd=${errorParam}${baseSuffix}"},triggers:{performanceTiming:{on:"visible",
  55. request:"timing",sampleSpec:{sampleOn:"${clientId}",threshold:1},vars:{timingRequestType:"timing"}},adwordsTiming:{on:"visible",request:"timing",enabled:"${queryParam(gclid)}",vars:{timingRequestType:"adtiming"}}},extraUrlParamsReplaceMap:{dimension:"cd",metric:"cm"},optout:"_gaUserPrefs.ioo"},krux:{requests:{beaconHost:"https://beacon.krxd.net",timing:"t_navigation_type=0&t_dns=${domainLookupTime}&t_tcp=${tcpConnectTime}&t_http_request=${serverResponseTime}&t_http_response=${pageDownloadTime}&t_content_ready=${contentLoadTime}&t_window_load=${pageLoadTime}&t_redirect=${redirectTime}",
  56. common:"source=amp&confid=${confid}&_kpid=${pubid}&_kcp_s=${site}&_kcp_sc=${section}&_kcp_ssc=${subsection}&_kcp_d=${canonicalHost}&_kpref_=${documentReferrer}&_kua_kx_amp_client_id=${clientId(_kuid_)}&_kua_kx_lang=${browserLanguage}&_kua_kx_tech_browser_language=${browserLanguage}&_kua_kx_tz=${timezone}",pageview:"${beaconHost}/pixel.gif?${common}&${timing}",event:"${beaconHost}/event.gif?${common}&${timing}&pageview=false"},transport:{beacon:!1,xhrpost:!1,image:!0},extraUrlParamsReplaceMap:{"user.":"_kua_",
  57. "page.":"_kpa_"}},lotame:{requests:{pageview:"https://bcp.crwdcntrl.net/amp?c=${account}&pv=y"},triggers:{"track pageview":{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},mediametrie:{requests:{host:"https://prof.estat.com/m/web",pageview:"${host}/${serial}?c=${level1}&dom=${ampdocUrl}&enc=${documentCharset}&l3=${level3}&l4=${level4}&n=${random}&p=${level2}&r=${documentReferrer}&sch=${screenHeight}&scw=${screenWidth}&tn=amp&v=1&vh=${availableScreenHeight}&vw=${availableScreenWidth}"},
  58. triggers:{trackPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},mediarithmics:{vars:{domain:"events.mediarithmics.com",url:"SOURCE_URL",event_name:"$page_view",referrer:"DOCUMENT_REFERRER"},requests:{host:"https://${domain}",pageview:"${host}/v1/visits/pixel?$site_token=${site_token}&$url=${url}&$ev=${event_name}&$referrer=${referrer}"},triggers:{trackPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},mediator:{requests:{host:"//collector.mediator.media/script/${mediator_id}/amp/",
  59. renderstart:"${host}init/?url=${canonicalUrl}",prefix:"${host}register/?url=${canonicalUrl}&ref=${documentReferrer}&",suffix:"vh=${viewportHeight}&sh=${scrollHeight}&st=${scrollTop}",pageview:"${prefix}e=v",timer:"${prefix}e=t&${suffix}",s0:"${prefix}e=s0",s1:"${prefix}e=s1",s2:"${prefix}e=s2",s3:"${prefix}e=s3"},vars:{mediator_id:""},triggers:{renderStart:{on:"render-start",request:"renderstart"},trackPageview:{on:"visible",request:"pageview"},scrollPing0:{on:"scroll",scrollSpec:{verticalBoundaries:[5]},
  60. request:"s0"},scrollPing1:{on:"scroll",scrollSpec:{verticalBoundaries:[35]},request:"s1"},scrollPing2:{on:"scroll",scrollSpec:{verticalBoundaries:[65]},request:"s2"},scrollPing3:{on:"scroll",scrollSpec:{verticalBoundaries:[95]},request:"s3"},pageTimer:{on:"timer",timerSpec:{interval:5,maxTimerLength:600,immediate:!1},request:"timer"}}},metrika:{transport:{beacon:!0,xhrpost:!0,image:!1},requests:{pageview:"${_watch}?browser-info=${_brInfo}&${_siteInfo}&${_suffix}",notBounce:"${_watch}?browser-info=ar%3A1%3Anb%3A1%3A${_brInfo}&${_suffix}",
  61. externalLink:"${_watch}?browser-info=ln%3A1%3A${_brInfo}&${_suffix}",reachGoal:"${_watch}?browser-info=ar%3A1%3A${_brInfo}&${_siteInfo}&${_goalSuffix}",_domain:"https://mc.yandex.ru",_watch:"${_domain}/watch/${counterId}",_suffix:"page-url=${sourceUrl}&page-ref=${documentReferrer}",_goalSuffix:"page-url=goal%3A%2F%2F${sourceHost}%2F${goalId}&page-ref=${sourceUrl}",_techInfo:"amp%3A1%3Az%3A${timezone}%3Ai%3A${timestamp}%3Arn%3A${random}%3Ala%3A${browserLanguage}%3Aen%3A${documentCharset}%3Arqn%3A${requestCount}%3As%3A${screenWidth}x${screenHeight}x${screenColorDepth}%3Aw%3A${availableScreenWidth}x${availableScreenHeight}%3Ads%3A${_timings}%3Auid%3A${clientId(_ym_uid)}%3Apvid%3A${pageViewId}",
  62. _timings:"${domainLookupTime}%2C${tcpConnectTime}%2C${serverResponseTime}%2C${pageDownloadTime}%2C${redirectTime}%2C${navTiming(redirectStart,redirectEnd)}%2C${navRedirectCount}%2C${navTiming(domLoading,domInteractive)}%2C${navTiming(domContentLoadedEventStart,domContentLoadedEventEnd)}%2C${navTiming(navigationStart,domComplete)}%2C${pageLoadTime}%2C${navTiming(loadEventStart,loadEventEnd)}%2C${contentLoadTime}",_brInfo:"${_techInfo}%3A${_title}",_title:"t%3A${title}",_siteInfo:"site-info=${yaParams}"},
  63. triggers:{pageview:{on:"visible",request:"pageview"}}},mobify:{vars:{projectSlug:"mobify-project-id",templateName:"page-type"},requests:{_host:"https://engagement-collector.mobify.net",_dimensions:"%22platform%22%3a%22AMP%22%2c%22client_id%22%3a%22${clientId(sandy-client-id)}%22%2c%22title%22%3a%22${title}%22%2c%22location%22%3a%22${sourceUrl}%22%2c%22page%22%3a%22${sourcePath}%22%2c%22src_location%22%3a%22${ampdocUrl}%22%2c%22referrer%22%3a%22${documentReferrer}%22%2c%22templateName%22%3a%22${templateName}%22",
  64. _basePrefix:"${_host}/s.gif?slug=${projectSlug}&timestamp_local=${timestamp}&channel=web&dimensions=%7b${_dimensions}%7d",ampstart:"${_basePrefix}&data=%7b%22category%22%3a%22timing%22%2c%22action%22%3a%22ampStart%22%2c%22value%22%3a${navTiming(navigationStart,domLoading)}%7d",pageview:"${_basePrefix}&data=%7b%22action%22%3a%22pageview%22%7d",pageload:"${_basePrefix}&data=%7b%22category%22%3a%22timing%22%2c%22action%22%3a%22load%22%2c%22value%22%3a${pageLoadTime}%7d",pagedcl:"${_basePrefix}&data=%7b%22category%22%3a%22timing%22%2c%22action%22%3a%22DOMContentLoaded%22%2c%22value%22%3a${contentLoadTime}%7d"},
  65. triggers:{triggerName:{on:"visible",request:["ampstart","pageload","pagedcl"]},pageview:{on:"ini-load",request:"pageview"}},transport:{beacon:!0,xhrpost:!1,image:!0}},mparticle:{vars:{eventType:"Unknown",debug:!1,amp_clientId:"CLIENT_ID(mparticle_amp_id)"},requests:{host:"https://pixels.mparticle.com",endpointPath:"/v1/${apiKey}/Pixel",baseParams:"et=${eventType}&amp_id=${amp_clientId}&attrs_k=${eventAttributes_Keys}&attrs_v=${eventAttributes_Values}&ua_k=${userAttributes_Keys}&ua_v=${userAttributes_Values}&ui_t=${userIdentities_Types}&ui_v=${userIdentities_Values}&flags_k=${customFlags_Keys}&flags_v=${customFlags_Values}&ct=${timestamp}&dbg=${debug}&lc=${location}&av=${appVersion}",
  66. pageview:"${host}${endpointPath}?dt=ScreenView&n=${canonicalPath}&hn=${ampdocUrl}&ttl=${title}&${baseParams}",event:"${host}${endpointPath}?dt=AppEvent&n=${eventName}&${baseParams}"},transport:{beacon:!1,xhrpost:!1,image:!0}},newrelic:{requests:{pageview:"https://${beacon}/amp?appId=${appId}&licenseKey=${licenseKey}&ampUrl=${ampdocUrl}&canonicalUrl=${canonicalUrl}&timeToDomContentLoadedEventEnd=${navTiming(domContentLoadedEventEnd)}&timeToDomInteractive=${navTiming(domInteractive)}&timeToDomComplete=${navTiming(domComplete)}&timeToDomLoading=${navTiming(domLoading)}&timeToResponseStart=${navTiming(responseStart)}&timeToResponseEnd=${navTiming(responseEnd)}&timeToLoadEventStart=${navTiming(loadEventStart)}&timeToLoadEventEnd=${navTiming(loadEventEnd)}&timeToConnectStart=${navTiming(connectStart)}&timeToConnectEnd=${navTiming(connectEnd)}&timeToFetchStart=${navTiming(fetchStart)}&timeToRequestStart=${navTiming(requestStart)}&timeToUnloadEventStart=${navTiming(unloadEventStart)}&timeToUnloadEventEnd=${navTiming(unloadEventEnd)}&timeToDomainLookupStart=${navTiming(domainLookupStart)}&timeToDomainLookupEnd=${navTiming(domainLookupEnd)}&timeToRedirectStart=${navTiming(redirectStart)}&timeToRedirectEnd=${navTiming(redirectEnd)}&timeToSecureConnection=${navTiming(secureConnectionStart)}&timestamp=${timestamp}&ampVersion=${ampVersion}&pageLoadTime=${pageLoadTime}"},
  67. vars:{beacon:"bam.nr-data.net",appId:[],licenseKey:""},triggers:{trackPageview:{on:"ini-load",request:"pageview"}}},nielsen:{vars:{sessionId:"CLIENT_ID(imrworldwide)",prefix:""},requests:{session:"https://${prefix}uaid-linkage.imrworldwide.com/cgi-bin/gn?prd=session&c13=asid,P${apid}&sessionId=${sessionId}_${pageViewId}&pingtype=4&enc=false&c61=createtm,${timestamp}&rnd=${random}",cloudapi:"https://${prefix}cloudapi.imrworldwide.com/nmapi/v2/${apid}/${sessionId}_${pageViewId}/a?b=%7B%22devInfo%22%3A%7B%22devId%22%3A%22${sessionId}_${pageViewId}%22%2C%22apn%22%3A%22${apn}%22%2C%22apv%22%3A%22${apv}%22%2C%22apid%22%3A%22${apid}%22%7D%2C%22metadata%22%3A%7B%22static%22%3A%7B%22type%22%3A%22static%22%2C%22section%22%3A%22${section}%22%2C%22assetid%22%3A%22${pageViewId}%22%2C%22segA%22%3A%22${segA}%22%2C%22segB%22%3A%22${segB}%22%2C%22segC%22%3A%22${segC}%22%2C%22adModel%22%3A%220%22%2C%22dataSrc%22%3A%22cms%22%7D%2C%22content%22%3A%7B%7D%2C%22ad%22%3A%7B%7D%7D%2C%22event%22%3A%22playhead%22%2C%22position%22%3A%22${timestamp}%22%2C%22data%22%3A%7B%22hidden%22%3A%22${backgroundState}%22%2C%22blur%22%3A%22${backgroundState}%22%2C%22position%22%3A%22${timestamp}%22%7D%2C%22type%22%3A%22static%22%2C%22utc%22%3A%22${timestamp}%22%2C%22index%22%3A%22${requestCount}%22%7D"},
  68. triggers:{visible:{on:"visible",request:["session","cloudapi"]},hidden:{on:"hidden",request:"cloudapi"},duration:{on:"timer",timerSpec:{interval:10,maxTimerLength:86400,immediate:!1},request:"cloudapi"}},transport:{beacon:!1,xhrpost:!1,image:!0}},"nielsen-marketing-cloud":{transport:{beacon:!1,xhrpost:!1,image:!0},vars:{pubId:"",siteId:""},requests:{host:"loadeu.exelator.com",pathPrefix:"load/",trackurl:"https://${host}/${pathPrefix}?p=${pubId}&g=${siteId}&j=0"},triggers:{defaultPageview:{on:"visible",
  69. request:"trackurl"}}},oewadirect:{transport:{beacon:!1,xhrpost:!1,image:!0},requests:{pageview:"https://${s}.oewabox.at/j0=,,,r=${canonicalUrl};+,amp=1+cp=${cp}+ssl=1+hn=${canonicalHost};;;?lt=${pageViewId}&x=${screenWidth}x${screenHeight}x24&c=CLIENT_ID(oewa)"},triggers:{pageview:{on:"visible",request:"pageview"}}},oewa:{transport:{beacon:!1,xhrpost:!1,image:!0},requests:{pageview:"${url}?s=${s}&amp=1&cp=${cp}&host=${canonicalHost}&path=${canonicalPath}"},triggers:{pageview:{on:"visible",request:"pageview"}}},
  70. parsely:{requests:{host:"https://srv.pixel.parsely.com",basePrefix:"${host}/plogger/?rand=${timestamp}&idsite=${apikey}&url=${ampdocUrl}&urlref=${documentReferrer}&screen=${screenWidth}x${screenHeight}%7C${availableScreenWidth}x${availableScreenHeight}%7C${screenColorDepth}&title=${title}&date=${timestamp}&ampid=${clientId(_parsely_visitor)}",pageview:"${basePrefix}&action=pageview",heartbeat:"${basePrefix}&action=heartbeat&tt=${totalEngagedTime}&inc=${incrementalEngagedTime(parsely-js)}"},triggers:{defaultPageview:{on:"visible",
  71. request:"pageview"},defaultHeartbeat:{on:"timer",enabled:"${incrementalEngagedTime(parsely-js,false)}",timerSpec:{interval:10,maxTimerLength:7200},request:"heartbeat"}},transport:{beacon:!1,xhrpost:!1,image:!0}},piano:{requests:{host:"https://api-v3.tinypass.com",basePrefix:"/api/v3",baseSuffix:"&pageview_id=${pageViewId}&rand=${random}&amp_client_id=${clientId}&aid=${aid}",pageview:"${host}${basePrefix}/page/track?url=${canonicalUrl}&referer=${documentReferrer}&content_created=${contentCreated}&content_author=${contentAuthor}&content_section=${contentSection}&timezone_offset=${timezone}&tags=${tags}&amp_url=${ampdocUrl}&screen=${screenWidth}x${screenHeight}${baseSuffix}"}},
  72. quantcast:{vars:{labels:""},requests:{host:"https://pixel.quantserve.com/pixel",pageview:"${host};r=${random};a=${pcode};labels=${labels};fpan=;fpa=${clientId(__qca)};ns=0;ce=1;cm=;je=0;sr=${screenWidth}x${screenHeight}x${screenColorDepth};enc=n;et=${timestamp};ref=${documentReferrer};url=${canonicalUrl}"},triggers:{defaultPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},adobeanalytics:{transport:{xhrpost:!1,beacon:!1,image:!0},vars:{pageName:"TITLE",host:"",
  73. reportSuites:"",linkType:"o",linkUrl:"",linkName:""},requests:{requestPath:"/b/ss/${reportSuites}/0/amp-1.0/s${random}",basePrefix:"vid=z${clientId(adobe_amp_id)}&ndh=0&ce=${documentCharset}&pageName=${pageName}&g=${ampdocUrl}&r=${documentReferrer}&bh=${availableScreenHeight}&bw=${availableScreenWidth}&c=${screenColorDepth}&j=amp&s=${screenWidth}x${screenHeight}",pageview:"https://${host}${requestPath}?${basePrefix}",click:"https://${host}${requestPath}?${basePrefix}&pe=lnk_${linkType}&pev1=${linkUrl}&pev2=${linkName}"}},
  74. adobeanalytics_nativeConfig:{triggers:{pageLoad:{on:"visible",request:"iframeMessage"}}},infonline:{vars:{sv:"ke",ap:"1"},transport:{beacon:!1,xhrpost:!1,image:!0},requests:{pageview:"${url}?st=${st}&sv=${sv}&ap=${ap}&co=${co}&cp=${cp}&host=${canonicalHost}&path=${canonicalPath}"},triggers:{pageview:{on:"visible",request:"pageview"}}},simplereach:{vars:{pid:"",published_at:"",authors:[],channels:[],tags:[]},requests:{host:"https://edge.simplereach.com",baseParams:"amp=true&pid=${pid}&title=${title}&url=${canonicalUrl}&date=${published_at}&authors=${authors}&channels=${categories}&tags=${tags}&referrer=${documentReferrer}&page_url=${sourceUrl}&user_id=${clientId(sr_amp_id)}&domain=${canonicalHost}&article_id=${article_id}&ignore_metadata=${ignore_metadata}",
  75. visible:"${host}/n?${baseParams}",timer:"${host}/t?${baseParams}&t=5000&e=5000"},triggers:{visible:{on:"visible",request:"visible"},timer:{on:"timer",timerSpec:{interval:5,maxTimerLength:1200},request:"timer"}}},segment:{transport:{beacon:!1,xhrpost:!1,image:!0},vars:{anonymousId:"CLIENT_ID(segment_amp_id)"},requests:{host:"https://api.segment.io/v1/pixel",base:"?writeKey=${writeKey}&context.library.name=amp&anonymousId=${anonymousId}&context.locale=${browserLanguage}&context.page.path=${canonicalPath}&context.page.url=${canonicalUrl}&context.page.referrer=${documentReferrer}&context.page.title=${title}&context.screen.width=${screenWidth}&context.screen.height=${screenHeight}",
  76. page:"${host}/page${base}&name=${name}",track:"${host}/track${base}&event=${event}"},triggers:{page:{on:"visible",request:"page"}}},shinystat:{transport:{beacon:!1,xhrpost:!1,image:!0},requests:{base:"https://amp.shinystat.com/cgi-bin/shinyamp.cgi",commpar:"AMP=1&RM=${random}&USER=${account}&PAG=${page}&HR=${canonicalUrl}&REFER=${documentReferrer}&RES=${screenWidth}X${screenHeight}&COLOR=${screenColorDepth}&CID=${clientId(AMP_CID)}&PAGID=${pageViewId}&TITL=${title}&RQC=${requestCount}",pagepar:"&VIE=${viewer}&PLT=${pageLoadTime}",
  77. eventpar:"&SSXL=1",linkpar:"&LINK=${outboundLink}",pageview:"${base}?${commpar}${pagepar}",event:"${base}?${commpar}${eventpar}",link:"${base}?${commpar}${linkpar}"},triggers:{pageview:{on:"visible",request:"pageview"}}},snowplow:{vars:{duid:"CLIENT_ID(_sp_id)"},requests:{aaVersion:"amp-0.2",basePrefix:"https://${collectorHost}/i?url=${canonicalUrl}&page=${title}&res=${screenWidth}x${screenHeight}&stm=${timestamp}&tz=${timezone}&aid=${appId}&p=web&tv=${aaVersion}&cd=${screenColorDepth}&cs=${documentCharset}&duid=${duid}&lang=${browserLanguage}&refr=${documentReferrer}&stm=${timezone}&vp=${viewportWidth}x${viewportHeight}",
  78. pageView:"${basePrefix}&e=pv",structEvent:"${basePrefix}&e=se&se_ca=${structEventCategory}&se_ac=${structEventAction}&se_la=${structEventLabel}&se_pr=${structEventProperty}&se_va=${structEventValue}"},transport:{beacon:!1,xhrpost:!1,image:!0}},top100:{vars:{pid:"",rid:"PAGE_VIEW_ID",ruid:"CLIENT_ID(ruid)",version:"1.0.0"},requests:{host:"https://kraken.rambler.ru",base:"${host}/cnt/?pid=${pid}&rid=${rid}&v=${version}&rn=${random}&ruid=${ruid}&ct=amp",pageview:"${base}&et=pv${_pageData}${_screenData}",
  79. _screenData:"&sr=${screenWidth}x${screenHeight}&cd=${screenColorDepth}-bit&bs=${scrollWidth}x${scrollHeight}",_pageData:"&pt=${title}&rf=${documentReferrer}&en=${documentCharset}&la=${browserLanguage}&tz=${timezone}"},triggers:{trackPageview:{on:"visible",request:"pageview"}},transport:{beacon:!1,xhrpost:!1,image:!0}},treasuredata:{vars:{host:"in.treasuredata.com",writeKey:"",database:"",table:"events"},requests:{base:"https://${host}/postback/v3/event/${database}",baseParams:"td_write_key=${writeKey}&td_global_id=td_global_id&td_client_id=CLIENT_ID(_td)&td_charset=DOCUMENT_CHARSET&td_language=BROWSER_LANGUAGE&td_color=SCREEN_COLOR_DEPTH&td_screen=${screenWidth}x${scrollHeight}&td_viewport=${availableScreenWidth}x${availableScreenHeight}&td_title=TITLE&td_url=SOURCE_URL&td_user_agent=USER_AGENT&td_host=SOURCE_HOST&td_path=SOURCE_PATH&td_referrer=DOCUMENT_REFERRER&td_ip=td_ip",
  80. pageview:"${base}/${table}?${baseParams}",event:"${base}/${table}?${baseParams}"}},webtrekk:{requests:{trackURL:"https://${trackDomain}/${trackId}/wt",parameterPrefix:"?p=432,${contentId},1,${screenWidth}x${screenHeight},${screenColorDepth},1,${timestamp},${documentReferrer},${viewportWidth}x${viewportHeight},0&tz=${timezone}&eid=${clientId(amp-wt3-eid)}&la=${browserLanguage}",parameterSuffix:"&pu=${sourceUrl}",pageParameter:"&cp1=${pageParameter1}&cp2=${pageParameter2}&cp3=${pageParameter3}&cp4=${pageParameter4}&cp5=${pageParameter5}&cp6=${pageParameter6}&cp7=${pageParameter7}&cp8=${pageParameter8}&cp9=${pageParameter9}&cp10=${pageParameter10}",
  81. pageCategories:"&cg1=${pageCategory1}&cg2=${pageCategory2}&cg3=${pageCategory3}&cg4=${pageCategory4}&cg5=${pageCategory5}&cg6=${pageCategory6}&cg7=${pageCategory7}&cg8=${pageCategory8}&cg9=${pageCategory9}&cg10=${pageCategory10}",pageview:"${trackURL}${parameterPrefix}${pageParameter}${pageCategories}${parameterSuffix}",actionParameter:"&ck1=${actionParameter1}&ck2=${actionParameter2}&ck3=${actionParameter3}&ck4=${actionParameter4}&ck5=${actionParameter5}",event:"${trackURL}${parameterPrefix}&ct=${actionName}${actionParameter}${parameterSuffix}"},
  82. transport:{beacon:!1,xhrpost:!1,image:!0}},webtrekk_v2:{vars:{actionName:"webtrekk_ignore",contentId:"${title}",mediaName:"${id}",everId:"${clientId(amp-wt3-eid)}"},requests:{trackURL:"https://${trackDomain}/${trackId}/wt",basePrefix:"?p=440,${contentId},1,${screenWidth}x${screenHeight},${screenColorDepth},1,",baseSuffix:",${documentReferrer},${viewportWidth}x${viewportHeight},0&tz=${timezone}&eid=${everId}&la=${browserLanguage}",parameterPrefix:"${basePrefix}${timestamp}${baseSuffix}",parameterSuffix:"&pu=${sourceUrl}&eor=1",
  83. pageview:"${trackURL}${parameterPrefix}&${extraUrlParams}&cp570=${pageLoadTime}${parameterSuffix}",event:"${trackURL}${parameterPrefix}&ct=${actionName}&${extraUrlParams}${parameterSuffix}",scroll:"${trackURL}${parameterPrefix}&ct=${actionName}&ck540=${verticalScrollBoundary}${parameterSuffix}",mediaPrefix:"${trackURL}${basePrefix}${baseSuffix}&mi=${mediaName}",mediaSuffix:"&mt1=${currentTime}&mt2=${duration}&${extraUrlParams}${parameterSuffix}&x=${playedTotal}",mediaPlay:"${mediaPrefix}&mk=play${mediaSuffix}",
  84. mediaPause:"${mediaPrefix}&mk=pause${mediaSuffix}",mediaPosition:"${mediaPrefix}&mk=pos${mediaSuffix}",mediaEnded:"${mediaPrefix}&mk=eof${mediaSuffix}"},extraUrlParamsReplaceMap:{pageParameter:"cp",contentGroup:"cg",actionParameter:"ck",sessionParameter:"cs",ecommerceParameter:"cb",urmCategory:"uc",campaignParameter:"cc",mediaCategory:"mg"},transport:{beacon:!1,xhrpost:!1,image:!0}},mpulse:{requests:{onvisible:"https://${beacon_url}?h.d=${h.d}&h.key=${h.key}&h.t=${h.t}&h.cr=${h.cr}&rt.start=navigation&rt.si=${clientId(amp_mpulse)}&rt.ss=${timestamp}&rt.end=${timestamp}&t_resp=${navTiming(navigationStart,responseStart)}&t_page=${navTiming(responseStart,loadEventStart)}&t_done=${navTiming(navigationStart,loadEventStart)}&nt_nav_type=${navType}&nt_red_cnt=${navRedirectCount}&nt_nav_st=${navTiming(navigationStart)}&nt_red_st=${navTiming(redirectStart)}&nt_red_end=${navTiming(redirectEnd)}&nt_fet_st=${navTiming(fetchStart)}&nt_dns_st=${navTiming(domainLookupStart)}&nt_dns_end=${navTiming(domainLookupEnd)}&nt_con_st=${navTiming(connectStart)}&nt_ssl_st=${navTiming(secureConnectionStart)}&nt_con_end=${navTiming(connectEnd)}&nt_req_st=${navTiming(requestStart)}&nt_res_st=${navTiming(responseStart)}&nt_unload_st=${navTiming(unloadEventStart)}&nt_unload_end=${navTiming(unloadEventEnd)}&nt_domloading=${navTiming(domLoading)}&nt_res_end=${navTiming(responseEnd)}&nt_domint=${navTiming(domInteractive)}&nt_domcontloaded_st=${navTiming(domContentLoadedEventStart)}&nt_domcontloaded_end=${navTiming(domContentLoadedEventEnd)}&nt_domcomp=${navTiming(domComplete)}&nt_load_st=${navTiming(loadEventStart)}&nt_load_end=${navTiming(loadEventEnd)}&v=1&http.initiator=amp&u=${sourceUrl}&amp.u=${ampdocUrl}&r2=${documentReferrer}&scr.xy=${screenWidth}x${screenHeight}"},
  85. triggers:{onvisible:{on:"visible",request:"onvisible"}},transport:{beacon:!1,xhrpost:!1,image:!0},extraUrlParamsReplaceMap:{ab_test:"h.ab",page_group:"h.pg","custom_dimension.":"cdim.","custom_metric.":"cmet."}},linkpulse:{vars:{id:"",pageUrl:"CANONICAL_URL",title:"TITLE",section:"",channel:"amp",type:"",host:"pp.lp4.io",empty:""},requests:{base:"https://${host}",pageview:"${base}/p?i=${id}&r=${documentReferrer}&p=${pageUrl}&s=${section}&t=${type}&c=${channel}&mt=${title}&_t=amp&_r=${random}",pageload:"${base}/pl?i=${id}&ct=${domInteractiveTime}&rt=${pageDownloadTime}&pt=${pageLoadTime}&p=${pageUrl}&c=${channel}&t=${type}&s=${section}&_t=amp&_r=${random}",
  86. ping:"${base}/u?i=${id}&u=${clientId(_lp4_u)}&p=${pageUrl}&uActive=true&isPing=yes&c=${channel}&t=${type}&s=${section}&_t=amp&_r=${random}"},triggers:{pageview:{on:"visible",request:"pageview"},pageload:{on:"visible",request:"pageload"},ping:{on:"timer",timerSpec:{interval:30,maxTimerLength:7200},request:"ping"}},transport:{beacon:!1,xhrpost:!1,image:!0}},rakam:{vars:{deviceId:"CLIENT_ID(rakam_device_id)"},requests:{base:"?api.api_key=${writeKey}&prop._platform=amp&prop._device_id=${deviceId}&prop.locale=${browserLanguage}&prop.path=${canonicalPath}&prop.url=${canonicalUrl}&prop.color_depth=${screenColorDepth}&prop._referrer=${documentReferrer}&prop.title=${title}&prop.timezone=${timezone}&prop._time=${timestamp}&prop.resolution=${screenWidth} \u00d7 ${screenHeight}",
  87. pageview:"https://${apiEndpoint}/event/pixel${base}&collection=${pageViewName}",custom:"https://${apiEndpoint}/event/pixel${base}&collection=${collection}"}},ibeatanalytics:{requests:{host:"https://ibeat.indiatimes.com",base:"https://ibeat.indiatimes.com/iBeat/pageTrendlogAmp.html",pageview:"${base}?&h=${h}&d=${h}&url=${url}&k=${key}&ts=${time}&ch=${channel}&sid=${uid}&at=${agentType}&ref=${documentReferrer}&aid=${aid}&loc=1&ct=1&cat=${cat}&scat=${scat}&ac=1&tg=${tags}&ctids=${catIds}&pts=${pagePublishTime}&auth=${author}&pos=${position}&iBeatField=${ibeatFields}&cid=${clientId(MSCSAuthDetails)}"},
  88. triggers:{defaultPageview:{on:"visible",request:"pageview"}}},topmailru:{transport:{beacon:!1,xhrpost:!1,image:!0},vars:{url:"${sourceUrl}",referrer:"${documentReferrer}"},requests:{pageView:"${_domain}/counter?${_basicMessage};title=${title}",reachGoal:"${_domain}/tracker?${_basicMessage};title=${title};e=RG%3A${value}%2F${goal}",sendEvent:"${_domain}/tracker?${_basicMessage};e=CE%3A${value}%2F${category}%3B${action}%3B${label}",_domain:"https://top-fwz1.mail.ru",_basicMessage:"js=13;id=${id};u=${url};r=${referrer};s=${screenWidth}*${screenHeight};vp=${viewportWidth}*${viewportHeight};st=${start};gender=${gender};age=${age};pid=${pid};userid=${userid};device=${device};params=${params};_=${random}"},
  89. triggers:{pageView:{on:"visible",request:"pageView"}}}};zb.infonline.triggers.pageview.iframePing=!0;zb.adobeanalytics_nativeConfig.triggers.pageLoad.iframePing=!0;zb.oewa.triggers.pageview.iframePing=!0;Object.assign(zb,{bg:{transport:{iframe:"https://tpc.googlesyndication.com/b4a/b4a-runner.html"}}});var Ab={ENDED:"video-ended",PAUSE:"video-pause",PLAY:"video-play",SESSION:"video-session",SESSION_VISIBLE:"video-session-visible",SECONDS_PLAYED:"video-seconds-played"};var Ja=/^vars(.+)/;function Bb(){}
  90. var ha={VISIBLE:"visible",CLICK:"click",TIMER:"timer",SCROLL:"scroll",HIDDEN:"hidden"},O=["ampdoc","embed"],S=Object.freeze({click:{name:"click",allowedFor:O.concat(["timer"]),klass:function(a){return new Cb(a)}},custom:{name:"custom",allowedFor:O.concat(["timer"]),klass:function(a){return new P(a)}},"render-start":{name:"render-start",allowedFor:O.concat(["timer","visible"]),klass:function(a){return new Q(a)}},"ini-load":{name:"ini-load",allowedFor:O.concat(["timer","visible"]),klass:function(a){return new R(a)}},
  91. timer:{name:"timer",allowedFor:O,klass:function(a){return new Db(a)}},visible:{name:"visible",allowedFor:O.concat(["timer"]),klass:function(a){return new Eb(a)}},hidden:{name:"visible",allowedFor:O.concat(["timer"]),klass:function(a){return new Eb(a)}},video:{name:"video",allowedFor:O.concat(["timer"]),klass:function(a){return new Fb(a)}}});function Gb(a){return la(a,"video")?"video":S[a]||ga(a)?S.hasOwnProperty(a)?S[a].name:a:"custom"}
  92. function Hb(a){var b={};Object.keys(S).forEach(function(c){S.hasOwnProperty(c)&&-1!=S[c].allowedFor.indexOf(a)&&(b[c]=S[c].klass)},this);return b}function T(a,b,c){this.target=a;this.type=b;this.vars=c||Object.create(null)}function U(a){this.root=a}U.prototype.dispose=function(){};U.prototype.add=function(){};function P(a){this.root=a;var b=this;this.aa={};this.H={};this.S={};setTimeout(function(){b.H=void 0},1E4)}m(P,U);P.prototype.dispose=function(){this.S=this.H=void 0;for(var a in this.aa)this.aa[a].removeAll()};
  93. P.prototype.add=function(a,b,c,d){var e=this,f=c.selector;f||(f=":root");var h=c.selectionMethod||null,k=this.root.getElement(a,f,h),n=la(b,"sandbox-"),l=n?this.S&&this.S[b]:this.H&&this.H[b];if(l){var p=l.length;k.then(function(a){setTimeout(function(){for(var c=0;c<p;c++){var f=l[c];a.contains(f.target)&&d(f)}n&&(e.S[b]=void 0)},1)})}var q=this.aa[b];q||(q=new K,this.aa[b]=q);return this.aa[b].add(function(a){k.then(function(b){b.contains(a.target)&&d(a)})})};
  94. P.prototype.trigger=function(a){var b=a.type,c=la(b,"sandbox-"),d=this.aa[b];if(d&&(d.fire(a),c))return;c?(this.S[b]=this.S[b]||[],this.S[b].push(a)):this.H&&(this.H[b]=this.H[b]||[],this.H[b].push(a))};function Cb(a){this.root=a;this.wa=new K;this.rb=this.wa.fire.bind(this.wa);this.root.getRoot().addEventListener("click",this.rb)}m(Cb,U);Cb.prototype.dispose=function(){this.root.getRoot().removeEventListener("click",this.rb);this.wa.removeAll()};
  95. Cb.prototype.add=function(a,b,c,d){b=v().assert(c.selector,"Missing required selector on click trigger");c=c.selectionMethod||null;return this.wa.add(this.root.createSelectiveListener(this.ac.bind(this,d),a.parentElement||a,b,c))};Cb.prototype.ac=function(a,b){var c=Ia(b);a(new T(b,"click",c))};function Q(a){this.root=a}m(Q,U);Q.prototype.dispose=function(){};
  96. Q.prototype.add=function(a,b,c,d){var e=this,f,h,k=c.selector||":root";":root"==k||":host"==k?(f=this.root.getRootElement(),h=this.getRootSignal(b)):h=this.root.getAmpElement(a.parentElement||a,k,c.selectionMethod).then(function(a){f=a;return e.getElementSignal(b,f)});h.then(function(){d(new T(f,b))});return Bb};Q.prototype.getRootSignal=function(a){return this.root.signals().whenSignal(a)};Q.prototype.getElementSignal=function(a,b){return"function"!=typeof b.signals?Promise.resolve():b.signals().whenSignal(a)};
  97. function R(a){this.root=a}m(R,U);R.prototype.dispose=function(){};R.prototype.add=function(a,b,c,d){var e=this,f,h=c.selector||":root";":root"==h||":host"==h?(f=this.root.getRootElement(),a=this.getRootSignal()):a=this.root.getAmpElement(a.parentElement||a,h,c.selectionMethod).then(function(a){f=a;return e.getElementSignal("ini-load",f)});a.then(function(){d(new T(f,b))});return Bb};R.prototype.getRootSignal=function(){return this.root.whenIniLoaded()};
  98. R.prototype.getElementSignal=function(a,b){if("function"!=typeof b.signals)return Promise.resolve();var c=b.signals();return Promise.race([c.whenSignal("ini-load"),c.whenSignal("load-end")])};
  99. function Ib(a,b,c){this.Da=void 0;v().assert("interval"in a,"Timer interval specification required");this.zb=Number(a.interval)||0;v().assert(.5<=this.zb,"Bad timer interval specification");this.Eb="maxTimerLength"in a?Number(a.maxTimerLength):7200;v().assert(0<this.Eb,"Bad maxTimerLength specification");this.gc="maxTimerLength"in a;this.Vb="immediate"in a?!!a.immediate:!0;this.U=this.K=this.Xa=null;this.na=b||null;this.La=c||null;this.Ea=this.ca=void 0}g=Ib.prototype;
  100. g.init=function(a){this.na?this.na&&(this.K=this.na()):a()};g.dispose=function(){this.U&&(this.U(),this.U=null);this.K&&(this.K(),this.K=null)};g.isRunning=function(){return!!this.Da};
  101. g.startIntervalInWindow=function(a,b,c){if(!this.isRunning()&&(this.ca=Date.now(),this.Ea=void 0,this.Xa=b,this.Da=a.setInterval(function(){b()},1E3*this.zb),(!this.La||this.La&&this.gc)&&a.setTimeout(function(){c()},1E3*this.Eb),this.K&&(this.K(),this.K=null),this.Vb&&b(),this.La))try{this.U=this.La()}catch(d){throw this.dispose(),d;}};g.Ma=function(a){this.isRunning()&&(this.Xa(),this.Xa=null,a.clearInterval(this.Da),this.Ea=this.Da=void 0,this.U&&(this.U(),this.U=null),this.na&&(this.K=this.na()))};
  102. g.getTimerVars=function(){var a=0;this.isRunning()&&(a=this.ca?Date.now()-(this.Ea||this.ca):0,this.Ea=Date.now());return{timerDuration:a,timerStart:this.ca||0}};function Db(a){this.root=a;this.l={};this.sc=1}m(Db,U);g=Db.prototype;g.getTrackedTimerKeys=function(){return Object.keys(this.l)};g.dispose=function(){var a=this;this.getTrackedTimerKeys().forEach(function(b){a.eb(b)})};
  103. g.add=function(a,b,c,d){var e=this;c=c.timerSpec;v().assert(c&&"object"==typeof c,"Bad timer specification");var f="startSpec"in c?c.startSpec:null;v().assert(!f||"object"==typeof f,"Bad timer start specification");var h="stopSpec"in c?c.stopSpec:null;v().assert(!f&&!h||"object"==typeof h,"Bad timer stop specification");var k=++this.sc,n,l;if(f){var p=Jb(this,f);v().assert(p,"Cannot track timer start");n=p.add.bind(p,a,f.on,f,this.wb.bind(this,k,b,d))}if(h){var q=Jb(this,h);v().assert(q,"Cannot track timer stop");
  104. l=q.add.bind(q,a,h.on,h,this.wb.bind(this,k,b,d))}var r=new Ib(c,n,l);this.l[k]=r;r.init(this.Ob.bind(this,k,b,d));return function(){e.eb(k)}};function Jb(a,b){b=v().assertString(b.on);var c=Gb(b);return a.root.getTrackerForWhitelist(c,Hb("timer"))}g.wb=function(a,b,c){var d=this.l[a];d&&(d.isRunning()?this.Ma(a):this.Ob(a,b,c))};
  105. g.Ob=function(a,b,c){var d=this;this.l[a].startIntervalInWindow(this.root.ampdoc.win,function(){var e;e=new T(d.root.getRootElement(),b,d.l[a].getTimerVars());c(e)},this.eb.bind(this,a))};g.Ma=function(a){this.l[a].Ma(this.root.ampdoc.win)};g.eb=function(a){this.l[a]&&(this.Ma(a),this.l[a].dispose(),delete this.l[a])};function Fb(a){this.root=a;var b=this;this.Ka=new K;this.Sa=this.Ka.fire.bind(this.Ka);Object.keys(Ab).forEach(function(a){b.root.getRoot().addEventListener(Ab[a],b.Sa)})}m(Fb,U);
  106. Fb.prototype.dispose=function(){var a=this,b=this.root.getRoot();Object.keys(Ab).forEach(function(c){b.removeEventListener(Ab[c],a.Sa)});this.Ka=this.Sa=null};
  107. Fb.prototype.add=function(a,b,c,d){var e=c.videoSpec||{},f=this.root.getElement(a,c.selector||e.selector,c.selectionMethod||null),h=e["end-session-when-invisible"],k=e["exclude-autoplay"],n=e.interval,l=c.on,p=0;return this.Ka.add(function(a){var b=a.type,c="video-session-visible"===b,e=c?"video-session":b,q=a.data;if(e===l)if("video-seconds-played"!==e||n){if("video-seconds-played"===e&&(p++,0!==p%n))return;if(!c||h)if(!k||"playing_auto"!==q.state){var xc=a.target;f.then(function(a){a.contains(xc)&&
  108. d(new T(a,e,q))})}}else v().error("analytics-events","video-seconds-played requires interval spec with non-zero value")})};function Eb(a){this.root=a;this.Qb={}}m(Eb,U);g=Eb.prototype;g.dispose=function(){};
  109. g.add=function(a,b,c,d){var e=this,f=c.visibilitySpec||{},h=c.selector||f.selector,k=f.waitFor,n=this.root.getVisibilityManager(),l=null;"hidden"==b&&(l=this.X.bind(this));if(!h||":root"==h||":host"==h)return n.listenRoot(f,this.getReadyPromise(k,h),l,this.Fb.bind(this,b,d,this.root.getRootElement()));var p=this.root.getAmpElement(a.parentElement||a,h,c.selectionMethod||f.selectionMethod).then(function(a){return n.listenElement(a,f,e.getReadyPromise(k,h,a),l,e.Fb.bind(e,b,d,a))});return function(){p.then(function(a){a()})}};
  110. g.X=function(){var a=this.root.getViewer();return a.isVisible()?new Promise(function(b){a.onVisibilityChanged(function(){a.isVisible()||b()})}):Promise.resolve()};g.getReadyPromise=function(a,b,c){if(!a)if(b)a="ini-load";else return null;var d=Hb("visible");v().assert("none"==a||void 0!==d[a],"waitFor value %s not supported",a);var e=this.Qb[a]||this.root.getTrackerForWhitelist(a,d);if(e)this.Qb[a]=e;else return null;return c?e.getElementSignal(a,c):e.getRootSignal(a)};
  111. g.Fb=function(a,b,c,d){var e=Ia(c),f;for(f in e)d[f]=e[f];b(new T(c,a,d))};function Kb(a,b){var c=this;this.$b=b;this.Bb=!1;this.ka=[];this.ic=new ob(this.$b,"send-iframe-transport-events",!0,function(){c.setIsReady()})}Kb.prototype.isReady=function(){return this.Bb};Kb.prototype.setIsReady=function(){this.Bb=!0;Lb(this)};Kb.prototype.queueSize=function(){return this.ka.length};
  112. Kb.prototype.enqueue=function(a){this.ka.push(a);100<=this.queueSize()&&(w().warn("amp-analytics.IframeTransportMessageQueue","Exceeded maximum size of queue for: "+a.creativeId),this.ka.shift());Lb(this)};function Lb(a){a.isReady()&&a.queueSize()&&(a.ic.send("iframe-transport-events",{events:a.ka}),a.ka=[])};function Mb(a){return!!a.PerformanceObserver&&!!a.TaskAttributionTiming&&"containerName"in a.TaskAttributionTiming.prototype};function Nb(){var a;return na+"/1528391646530/iframe-transport-client-v0.js"}function Ob(a,b,c,d){this.da=a;this.C=b;this.ub=d;this.vb=c.iframe;this.hc=0;this.processCrossDomainIframe()}g=Ob.prototype;g.detach=function(){var a=this.da.document,b=this.C,c=V[b];--c.usageCount||(a.body.removeChild(c.frame),delete V[b],Pb[b]&&(Pb[b].disconnect(),Pb[b]=null))};
  113. g.processCrossDomainIframe=function(){var a;x.call(V,this.C)?(a=V[this.C],++a.usageCount):(a=this.createCrossDomainIframe(),this.da.document.body.appendChild(a.frame),Qb(this))};
  114. g.createCrossDomainIframe=function(){var a=String(++Rb),b=JSON.stringify({scriptSrc:Nb(),sentinel:a,type:this.C}),c={sandbox:"allow-scripts allow-same-origin",name:b,"data-amp-3p-sentinel":a},d=this.da.document.createElement("iframe"),e;for(e in c)d.setAttribute(e,c[e]);d.sentinel=a;var a={display:"none"},f;for(f in a)Ta(d,f,a[f]);d.src=this.vb;d={frame:d,usageCount:1,queue:new Kb(0,d)};return V[this.C]=d};
  115. function Qb(a){Mb(a.da)&&(Pb[a.C]=new a.da.PerformanceObserver(function(b){b&&b.getEntries().forEach(function(b){b&&"longtask"==b.entryType&&"cross-origin-descendant"==b.name&&b.attribution&&b.attribution.forEach(function(b){a.vb==b.containerSrc&&0==++a.hc%5&&v().error("amp-analytics.IframeTransport",'Long Task: Vendor: "'+a.C+'"')})})}),Pb[a.C].observe({entryTypes:["longtask"]}))}g.sendRequest=function(a){V[this.C].queue.enqueue({creativeId:this.ub,message:a})};g.getCreativeId=function(){return this.ub};
  116. g.getType=function(){return this.C};var V={},Rb=0,Pb={};function Sb(a,b){var c=new Image;c.src=a;c.width=1;c.height=1;Za(c).then(function(){}).catch(function(){b||v().warn("amp-analytics.Transport","Response unparseable or failed to send image request",a)})}function Tb(a,b){if(!a.XMLHttpRequest)return!1;var c=new a.XMLHttpRequest;if(!("withCredentials"in c))return!1;c.open("POST",b,!0);c.withCredentials=!0;c.setRequestHeader("Content-Type","text/plain");c.onreadystatechange=function(){};c.send("");return!0}
  117. function Ub(a,b){ta(b,"amp-analytics request");var c=a.document.createElement("iframe");Ta(c,"display","none");c.onload=c.onerror=function(){C(a,"timer").delay(function(){c.parentElement&&c.parentElement.removeChild(c)},5E3)};v().assert(B(b).origin!=B(a.location.href).origin,"Origin of iframe request must not be equal to the document origin. See https://github.com/ampproject/ amphtml/blob/master/spec/amp-iframe-origin-policy.md for details.");c.setAttribute("amp-analytics","");c.setAttribute("sandbox",
  118. "allow-scripts allow-same-origin");c.src=b;a.document.body.appendChild(c)};var Vb=/^(?:([^\s]*)(\([^)]*\))|[^]+)$/;function Wb(a,b,c){this.vars=a;this.iterations=void 0===b?2:b;this.noEncode=!!c;this.freezeVars={}}Wb.prototype.freezeVar=function(a){this.freezeVars[a]=!0};function Xb(a,b,c){b=Number(b);var d=a.length;v().assert(u(b),"Start index "+b+"in substr macro should be a number");c&&(d=Number(c),v().assert(u(d),"Length "+d+" in substr macro should be a number"));return a.substr(b,d)}function Yb(a,b){return a&&a.length?a:v().assertString(b)}
  119. function Zb(a,b,c){b||v().warn("Analytics.Variables","REPLACE macro must have two or more arguments");c||(c="");return a.replace(new RegExp(b,"g"),c)}
  120. function $b(a){this.mb=a;this.ia={};this.ia.DEFAULT=Yb;this.ia.SUBSTR=Xb;W(this,"TRIM",function(a){return a.trim()});W(this,"JSON",function(a){return JSON.stringify(a)});W(this,"TOLOWERCASE",function(a){return a.toLowerCase()});W(this,"TOUPPERCASE",function(a){return a.toUpperCase()});W(this,"NOT",function(a){return String(!a)});W(this,"BASE64",function(a){return btoa(a)});W(this,"HASH",this.ec.bind(this));W(this,"IF",function(a,c,d){return a?c:d});this.ia.REPLACE=Zb}
  121. $b.prototype.getMacros=function(){var a;if(a=this.mb){var b=this.mb;if(b.__AMP__EXPERIMENT_TOGGLES)a=b.__AMP__EXPERIMENT_TOGGLES;else{b.__AMP__EXPERIMENT_TOGGLES=Object.create(null);a=b.__AMP__EXPERIMENT_TOGGLES;if(b.AMP_CONFIG)for(var c in b.AMP_CONFIG){var d=b.AMP_CONFIG[c];"number"===typeof d&&0<=d&&1>=d&&(a[c]=Math.random()<d)}if(b.AMP_CONFIG&&Array.isArray(b.AMP_CONFIG["allow-doc-opt-in"])&&0<b.AMP_CONFIG["allow-doc-opt-in"].length&&(c=b.AMP_CONFIG["allow-doc-opt-in"],d=b.document.head.querySelector('meta[name="amp-experiments-opt-in"]')))for(var d=
  122. d.getAttribute("content").split(","),e=0;e<d.length;e++)-1!=c.indexOf(d[e])&&(a[d[e]]=!0);Object.assign(a,ua(b));if(b.AMP_CONFIG&&Array.isArray(b.AMP_CONFIG["allow-url-opt-in"])&&0<b.AMP_CONFIG["allow-url-opt-in"].length)for(c=b.AMP_CONFIG["allow-url-opt-in"],b=t(b.location.originalHash||b.location.hash),d=0;d<c.length;d++)e=b["e-"+c[d]],"1"==e&&(a[c[d]]=!0),"0"==e&&(a[c[d]]=!1)}a=!!a["url-replacement-v2"]}var f=a;return f?this.ia:{}};function W(a,b,c){a.ia[b]=c}
  123. $b.prototype.expandTemplate=function(a,b){var c=this;if(0>b.iterations)return v().error("Analytics.Variables","Maximum depth reached while expanding variables. Please ensure that the variables are not recursive."),Promise.resolve(a);var d=[],e=a.replace(/\${([^}]*)}/g,function(a,h){if(!h)return Promise.resolve("");h=ac(h);var f=h.name,n=h.argList;if(b.freezeVars[f])return a;var l=null!=b.vars[f]?b.vars[f]:"";h="string"==typeof l?c.expandTemplate(l,new Wb(b.vars,b.iterations-1,!0)):Promise.resolve(l);
  124. h=h.then(function(a){var d=b.noEncode?a:c.encodeVars(f,a);return d?d+n:d}).then(function(b){e=e.replace(a,b)});d.push(h);return a});return Promise.all(d).then(function(){return e})};function ac(a){if(!a)return{name:"",argList:""};var b=a.match(Vb);v().assert(b,"Variable with invalid format found: "+a);return{name:b[1]||b[0],argList:b[2]||""}}
  125. $b.prototype.encodeVars=function(a,b){if(null==b)return"";if(Array.isArray(b))return b.map(this.encodeVars.bind(this,a)).join(",");b=ac(String(b));var c=b.argList;return encodeURIComponent(b.name)+c};$b.prototype.ec=function(a){return C(this.mb,"crypto").sha384Base64(a)};function bc(a){return C(a,"amp-analytics-variables")};function cc(a){return new Promise(function(b){setTimeout(function(){return b(a())})})}
  126. function dc(a){return fa(a.resources)?a.encoding&&a.encoding.entry&&a.encoding.delim?2>a.encoding.base||36<a.encoding.base?(v().warn("ANALYTICS","resource timing variables only supports bases between 2 and 36"),!1):null!=a.responseAfter&&"number"!=typeof a.responseAfter?(v().warn("ANALYTICS",'resourceTimingSpec["responseAfter"] must be a number'),!1):!0:(v().warn("ANALYTICS","resourceTimingSpec is missing or has incomplete encoding options"),!1):(v().warn("ANALYTICS",'resourceTimingSpec missing "resources" field'),
  127. !1)}function ec(a,b){var c=B(a.name);for(a=0;a<b.length;++a){var d=b[a],e=d.hostPattern,d=d.resources;if(e.test(c.host)){var f=gb(d,function(a){return a.pathPattern.test(c.pathname)&&a.queryPattern.test(c.search)});if(-1!=f)return d[f].name}}return null}
  128. function fc(a){var b={},c;for(c in a){var d=a[c].host||"",e={name:c,pathPattern:new RegExp(a[c].path||""),queryPattern:new RegExp(a[c].query||"")};b[d]?b[d].resources.push(e):b[d]={hostPattern:new RegExp(d),resources:[e]}}var f=[],h;for(h in b)f.push(b[h]);return f}function gc(a,b){var c=fc(b),d=[];a.forEach(function(a){var b=ec(a,c);b&&d.push({entry:a,name:b})});return d}
  129. function hc(a,b,c){function d(a,b){b=void 0===b?0:b;return Math.round(a-b).toString(f.base||10)}var e=b.resources,f=b.encoding,h=bc(c);a=gc(a,e).map(function(a){var b=a.entry;a={key:a.name,startTime:d(b.startTime),redirectTime:d(b.redirectEnd,b.redirectStart),domainLookupTime:d(b.domainLookupEnd,b.domainLookupStart),tcpConnectTime:d(b.connectEnd,b.connectStart),serverResponseTime:d(b.responseStart,b.requestStart),networkTransferTime:d(b.responseEnd,b.responseStart),transferSize:d(b.transferSize||
  130. 0),encodedBodySize:d(b.encodedBodySize||0),decodedBodySize:d(b.decodedBodySize||0),duration:d(b.duration),initiatorType:b.initiatorType};return new Wb(a,1)}).map(function(a){return h.expandTemplate(f.entry,a)});return Promise.all(a).then(function(a){return a.join(f.delim)})}
  131. function ic(a,b){if(b.done||!a.performance||!a.performance.now||!a.performance.getEntriesByType||!dc(b))return b.done=!0,Promise.resolve("");var c=a.performance.getEntriesByType("resource");150<=c.length&&(b.done=!0);var d=b.responseAfter||0;b.responseAfter=Math.max(d,a.performance.now());c=c.filter(function(a){return a.startTime+a.duration>=d});return c.length?cc(function(){return hc(c,b,a)}):Promise.resolve("")};function jc(a,b){var c=this;this.Ub=b;this.B={visiblePercentageMin:Number(a.visiblePercentageMin)/100||0,visiblePercentageMax:Number(a.visiblePercentageMax)/100||1,totalTimeMin:Number(a.totalTimeMin)||0,totalTimeMax:Number(a.totalTimeMax)||Infinity,continuousTimeMin:Number(a.continuousTimeMin)||0,continuousTimeMax:Number(a.continuousTimeMax)||Infinity};"0"===String(a.visiblePercentageMax).trim()&&(this.B.visiblePercentageMax=0);this.Jb=!0===a.repeat;this.P=new K;a=new va;this.xa=a.promise;this.Y=
  132. a.resolve;this.xa.then(function(){c.P.fire()});this.V=[];this.Xb=Date.now();this.fb=this.Ib=!0;this.A=this.X=null;this.Ua=this.$=!1;this.ha=this.Ga=this.ja=this.bb=this.Fa=this.za=this.Za=this.ya=this.F=this.J=this.I=0;this.lb=!1;this.Ja=null}g=jc.prototype;g.Ia=function(){var a=this,b=new va;this.xa=b.promise;this.Y=b.resolve;this.xa.then(function(){a.P.fire()});this.Ja=null;this.$=this.Ua=!1;this.ha=this.Ga=this.ja=this.Fa=this.Za=this.ya=this.za=this.F=this.J=this.I=0;this.lb=!1};
  133. g.maybeDispose=function(){this.Jb||this.dispose()};g.dispose=function(){this.A&&(clearTimeout(this.A),this.A=null);this.Ja&&(clearTimeout(this.Ja),this.Ja=null);this.V.forEach(function(a){a()});this.V.length=0;this.Y=null;this.P&&(this.P.removeAll(),this.P=null)};g.unsubscribe=function(a){this.V.push(a)};g.onTriggerEvent=function(a){this.P&&this.P.add(a);this.xa&&!this.Y&&a()};g.setReady=function(a){this.Ib=a;this.update()};g.setReportReady=function(a){this.fb=!1;this.X=a};
  134. g.update=function(){kc(this,this.Ib?this.Ub():0)};g.getState=function(a){return{firstSeenTime:lc(this.ya,a),lastSeenTime:lc(this.Za,a),lastVisibleTime:lc(this.Fa,a),firstVisibleTime:lc(this.za,a),maxContinuousVisibleTime:this.J,totalVisibleTime:this.F,loadTimeVisibility:100*this.bb||0,minVisiblePercentage:100*this.ja,maxVisiblePercentage:100*this.Ga}};
  135. function kc(a,b){if(a.lb)mc(a,b)||a.Ia();else if(a.Y){var c=nc(a,b);if(c)if(a.A&&(clearTimeout(a.A),a.A=null),a.fb)a.Y(),a.Y=null,a.Jb&&(a.lb=!0,a.I=0);else{if(a.X){var d=a.X();a.X=null;d.then(function(){a.fb=!0;a.update()})}}else if(a.$&&!a.A){var e=oc(a);0<e&&(a.A=setTimeout(function(){a.A=null;a.update()},e))}else!a.$&&a.A&&(clearTimeout(a.A),a.A=null)}}
  136. function mc(a,b){return 1==a.B.visiblePercentageMin?1==b:0==a.B.visiblePercentageMax?0==b:b>a.B.visiblePercentageMin&&b<=a.B.visiblePercentageMax}
  137. function nc(a,b){var c=Date.now();0<b&&(a.ya=a.ya||c,a.Za=c,!a.bb&&300>c-a.Xb&&(a.bb=b));var d=a.$,e=a.ha?c-a.ha:0;a.$=mc(a,b);a.$?(a.Ua=!0,d?(a.F+=e,a.I+=e,a.J=Math.max(a.J,a.I)):a.za=a.za||c,a.ha=c,a.ja=0<a.ja?Math.min(a.ja,b):b,a.Ga=Math.max(a.Ga,b),a.Fa=c):d&&(a.J=Math.max(a.J,a.I+e),a.ha=0,a.F+=e,a.I=0,a.Fa=c);return a.Ua&&a.F>=a.B.totalTimeMin&&a.F<=a.B.totalTimeMax&&a.J>=a.B.continuousTimeMin&&a.J<=a.B.continuousTimeMax}
  138. function oc(a){var b=Math.max(a.B.continuousTimeMin-a.I,0),c=Math.max(a.B.totalTimeMin-a.F,0),d=Math.max(b,c);return Math.min(d,b||Infinity,c||Infinity)}function lc(a,b){return a>=b?a-b:0};var pc=1;function qc(a){var b=a.__AMP_VIS_ID;b||(b=++pc,a.__AMP_VIS_ID=b);return b}function X(a,b){this.parent=a;this.ampdoc=b;this.mc=G(b,"resources");this.gb=0;this.O=[];this.o=null;this.V=[];this.parent&&(a=this.parent,a.o||(a.o=[]),a.o.push(this))}function rc(a,b){a.o&&(b=a.o.indexOf(b),-1!=b&&a.o.splice(b,1))}g=X.prototype;
  139. g.dispose=function(){this.setRootVisibility(0);for(var a=this.O.length-1;0<=a;a--)this.O[a].dispose();this.V.forEach(function(a){a()});this.V.length=0;this.parent&&rc(this.parent,this);if(this.o)for(a=0;a<this.o.length;a++)this.o[a].dispose()};g.unsubscribe=function(a){this.V.push(a)};g.getStartTime=function(){};g.isBackgrounded=function(){};g.isBackgroundedAtStart=function(){};g.getRootLayoutBox=function(){};
  140. g.getRootVisibility=function(){return this.parent?0<this.parent.getRootVisibility()?this.gb:0:this.gb};g.setRootVisibility=function(a){this.gb=a;sc(this);if(this.o)for(a=0;a<this.o.length;a++)sc(this.o[a])};function sc(a){for(var b=0;b<a.O.length;b++)a.O[b].update()}g.listenRoot=function(a,b,c,d){var e=this.getRootVisibility.bind(this);return tc(this,e,a,b,c,d)};g.listenElement=function(a,b,c,d,e){var f=this.getElementVisibility.bind(this,a);return tc(this,f,b,c,d,e,a)};
  141. function tc(a,b,c,d,e,f,h){if(c.visiblePercentageThresholds&&void 0==c.visiblePercentageMin&&void 0==c.visiblePercentageMax){var k=[],n=c.visiblePercentageThresholds;if(!n||!Array.isArray(n))return v().error("VISIBILITY-MANAGER","invalid visiblePercentageThresholds"),function(){};for(var l=0;l<n.length;l++){var p=n[l];if(Array.isArray(p)&&2==p.length)if(u(p[0])&&u(p[1])){var q=Number(p[0]),r=Number(p[1]);if(0>q||100<r||q>r||q==r&&100!=q&&0!=r)v().error("VISIBILITY-MANAGER","visiblePercentageThresholds entry invalid min/max value");
  142. else{var z=c;z.visiblePercentageMin=q;z.visiblePercentageMax=r;var D=new jc(z,b);k.push(uc(a,D,d,e,f,h))}}else v().error("VISIBILITY-MANAGER","visiblePercentageThresholds entry is not valid number");else v().error("VISIBILITY-MANAGER","visiblePercentageThresholds entry length is not 2")}return function(){k.forEach(function(a){return a()})}}var wc=new jc(c,b);return uc(a,wc,d,e,f,h)}
  143. function uc(a,b,c,d,e,f){c&&(b.setReady(!1),c.then(function(){b.setReady(!0)}));d&&b.setReportReady(d);b.onTriggerEvent(function(){var c=a.getStartTime(),d=b.getState(c);d.backgrounded=a.isBackgrounded()?1:0;d.backgroundedAtStart=a.isBackgroundedAtStart()?1:0;d.totalTime=Date.now()-c;var n;if(f){var l=a.mc.getResourceForElementOptional(f);n=l?l.getLayoutBox():I(a.ampdoc).getLayoutRect(f);var p=a.getElementVisibility(f),c=a.getElementIntersectionRect(f);Object.assign(d,{intersectionRatio:p,intersectionRect:JSON.stringify(c)})}else n=
  144. a.getRootLayoutBox();b.maybeDispose();n&&Object.assign(d,{elementX:n.left,elementY:n.top,elementWidth:n.width,elementHeight:n.height});e(d)});a.O.push(b);b.unsubscribe(function(){var c=a.O.indexOf(b);-1!=c&&a.O.splice(c,1)});f&&b.unsubscribe(a.observe(f,function(){return b.update()}));b.update();return function(){b.dispose()}}g.observe=function(){};g.getElementVisibility=function(){};g.getElementIntersectionRect=function(){};
  145. function vc(a){X.call(this,null,a);var b=this;this.G=H(a);this.m=I(a);this.pb=!this.G.isVisible();this.Oa=this.isBackgrounded();this.T=y();this.N=null;if("inabox"==da(this.ampdoc.win).runtime){a=this.ampdoc.getRootNode();var c=a.documentElement||a.body||a;this.unsubscribe(this.observe(c,this.setRootVisibility.bind(this)))}else this.setRootVisibility(this.G.isVisible()?1:0),this.unsubscribe(this.G.onVisibilityChanged(function(){var a=b.G.isVisible();a||(b.pb=!0);b.setRootVisibility(a?1:0)}))}
  146. m(vc,X);g=vc.prototype;g.dispose=function(){X.prototype.dispose.call(this);this.N&&(this.N.disconnect(),this.N=null)};g.getStartTime=function(){return this.G.getFirstVisibleTime()};g.isBackgrounded=function(){return this.pb};g.isBackgroundedAtStart=function(){return this.Oa};g.getRootLayoutBox=function(){var a=this.ampdoc.getRootNode();return this.m.getLayoutRect(a.documentElement||a.body||a)};
  147. g.observe=function(a,b){var c=this;yc(this,a);var d=qc(a),e=this.T[d];e?0<e.intersectionRatio&&b(e.intersectionRatio):(e={element:a,intersectionRatio:0,intersectionRect:null,listeners:[]},this.T[d]=e);e.listeners.push(b);this.N||(this.N=zc(this));this.N.observe(a);return function(){var e=c.T[d];if(e){var h=e.listeners.indexOf(b);-1!=h&&e.listeners.splice(h,1);0==e.listeners.length&&(c.N.unobserve(a),delete c.T[d])}}};
  148. g.getElementVisibility=function(a){if(0==this.getRootVisibility())return 0;a=qc(a);return(a=this.T[a])&&a.intersectionRatio||0};g.getElementIntersectionRect=function(a){if(0>=this.getElementVisibility(a))return null;a=qc(a);return(a=this.T[a])?a.intersectionRect:null};
  149. function zc(a){function b(){d.tick(a.m.getRect())}var c=a.ampdoc.win;if(rb(c))return new c.IntersectionObserver(a.Gb.bind(a),{threshold:pb});var d=new N(a.Gb.bind(a),{threshold:pb});a.unsubscribe(a.m.onScroll(b));a.unsubscribe(a.m.onChanged(b));setTimeout(b);return d}function yc(a,b){rb(a.ampdoc.win)||"function"==typeof b.getLayoutBox||(b.getLayoutBox=function(){return a.m.getLayoutRect(b)},b.getOwner=function(){return null})}
  150. g.Gb=function(a){var b=this;a.forEach(function(a){var c=a.intersectionRect,c=L(Number(c.left),Number(c.top),Number(c.width),Number(c.height)),e=a.intersectionRatio,e=Math.min(Math.max(e,0),1);a=qc(a.target);if(a=b.T[a])for(a.intersectionRatio=e,a.intersectionRect=c,c=0;c<a.listeners.length;c++)a.listeners[c](e)})};function Ac(a,b){X.call(this,a,a.ampdoc);this.embed=b;this.Oa=this.parent.isBackgrounded();this.unsubscribe(this.parent.observe(b.host,this.setRootVisibility.bind(this)))}m(Ac,X);g=Ac.prototype;
  151. g.getStartTime=function(){return this.embed.getStartTime()};g.isBackgrounded=function(){return this.parent.isBackgrounded()};g.isBackgroundedAtStart=function(){return this.Oa};g.getRootLayoutBox=function(){var a=this.embed.iframe;return I(this.ampdoc).getLayoutRect(a)};g.observe=function(a,b){return this.parent.observe(a,b)};g.getElementVisibility=function(a){return 0==this.getRootVisibility()?0:this.parent.getElementVisibility(a)};
  152. g.getElementIntersectionRect=function(a){return 0==this.getRootVisibility()?null:this.parent.getElementIntersectionRect(a)};function Bc(a,b){this.ampdoc=a;this.parent=b;this.l=y();this.qa=null}g=Bc.prototype;g.dispose=function(){for(var a in this.l)this.l[a].dispose(),delete this.l[a];this.qa&&this.qa.dispose()};g.getType=function(){};g.getRoot=function(){};g.getViewer=function(){return H(this.ampdoc)};g.getRootElement=function(){var a=this.getRoot();return a.documentElement||a.body||a};g.getHostElement=function(){};g.signals=function(){};g.contains=function(a){return this.getRoot().contains(a)};g.getElementById=function(){};
  153. g.getTrackerForWhitelist=function(a,b){var c=b[a];return c?this.getTracker(a,c):null};g.getTracker=function(a,b){var c=this.l[a];c||(c=new b(this),this.l[a]=c);return c};g.getTrackerOptional=function(a){return this.l[a]||null};
  154. g.getElement=function(a,b,c){c=void 0===c?null:c;var d=this;return":root"==b?wa(function(){return d.getRootElement()}):":host"==b?new Promise(function(a){a(v().assertElement(d.getHostElement(),'Element "'+b+'" not found'))}):this.ampdoc.whenReady().then(function(){var e,f=null;try{var h;if("scope"==c){if(null==Ha){var k=a.ownerDocument;try{var n=k.createElement("div"),l=k.createElement("div");n.appendChild(l);Ha=n.querySelector(":scope div")===l}catch(q){Ha=!1}}if(Ha)h=a.querySelector(":scope "+b);
  155. else{a.classList.add("i-amphtml-scoped");var p=a.querySelector(".i-amphtml-scoped "+b);a.classList.remove("i-amphtml-scoped");h=p}}else h="closest"==c?Fa(a,b):d.getRoot().querySelector(b);e=h}catch(q){v().assert(!1,"Invalid query selector "+b)}e&&d.contains(e)&&(f=e);return v().assertElement(f,'Element "'+b+'" not found')})};
  156. g.getAmpElement=function(a,b,c){return this.getElement(a,b,c).then(function(a){v().assert(a.classList.contains("i-amphtml-element"),'Element "%s" is required to be an AMP element',b);return a})};
  157. g.createSelectiveListener=function(a,b,c,d){d=void 0===d?null:d;var e=this;return function(f){if(":host"!=c)for(var h=e.getRootElement(),k="*"==c,n=":root"==c,l=f.target;l&&e.contains(l)&&("scope"!=d||n||b.contains(l));){if("closest"!=d||l.contains(b)){var p;if(!(p=k||n&&l==h)){var q=c;try{p=Ga(l,q)}catch(r){v().error("amp-analytics","Bad query selector.",q,r),p=!1}}if(p){a(l,f);break}}l=l.parentElement}}};g.whenIniLoaded=function(){};
  158. g.getVisibilityManager=function(){this.qa||(this.qa=this.createVisibilityManager());return this.qa};g.createVisibilityManager=function(){};function Cc(a){Bc.call(this,a,null)}m(Cc,Bc);g=Cc.prototype;g.getType=function(){return"ampdoc"};g.getRoot=function(){return this.ampdoc.getRootNode()};g.getHostElement=function(){return null};g.signals=function(){return this.ampdoc.signals()};g.getElementById=function(a){return this.ampdoc.getElementById(a)};
  159. g.whenIniLoaded=function(){var a=I(this.ampdoc);"inabox"==da(this.ampdoc.win).runtime?a=a.getLayoutRect(this.getRootElement()):(a=a.getSize(),a=L(0,0,a.width,a.height));return cb(this.ampdoc,this.ampdoc.win,a)};g.createVisibilityManager=function(){return new vc(this.ampdoc)};function Dc(a,b,c){Bc.call(this,a,c);this.embed=b}m(Dc,Bc);g=Dc.prototype;g.getType=function(){return"embed"};g.getRoot=function(){return this.embed.win.document};g.getHostElement=function(){return this.embed.iframe};
  160. g.signals=function(){return this.embed.signals()};g.getElementById=function(a){return this.embed.win.document.getElementById(a)};g.whenIniLoaded=function(){return this.embed.whenIniLoaded()};g.createVisibilityManager=function(){return new Ac(this.parent.getVisibilityManager(),this.embed)};var Ec=["visible","click","timer","hidden"];function Fc(a){this.ampdoc=a;this.ra=new Cc(this.ampdoc);this.m=I(this.ampdoc);this.Mb=!1;this.Nb=new K}g=Fc.prototype;g.dispose=function(){this.ra.dispose()};g.getAnalyticsRoot=function(a){return Gc(this,a)};g.createAnalyticsGroup=function(a){var b=Gc(this,a);return new Hc(b,a,this)};g.triggerEventForTarget=function(a,b,c){b=new T(a,b,c);Gc(this,a).getTracker("custom",P).trigger(b)};
  161. function Gc(a,b){if(b=za(b,a.ampdoc.win))if(b=b.__AMP_EMBED__){var c=b;return Ic(b,function(){return new Dc(a.ampdoc,c,a.ra)})}return a.ra}function Ic(a,b){var c=a.__AMP_AN_ROOT;c||(c=b(),a.__AMP_AN_ROOT=c);return c}g.Hb=function(a){this.Nb.fire(a)};
  162. function Jc(a,b,c){if(Array.isArray(b.verticalBoundaries)||Array.isArray(b.horizontalBoundaries)){a.Mb||(a.Mb=!0,a.m.onChanged(a.Hb.bind(a)));var d=function(b,d,e){if(d)for(var f in b)if(b.hasOwnProperty(f)){var h=parseInt(f,10);h>d||b[h]||(b[h]=!0,h=Object.create(null),h[e]=f,h=new T(a.ra.getRootElement(),"scroll",h),c(h))}},e=Kc(b.verticalBoundaries),f=Kc(b.horizontalBoundaries);a.Nb.add(function(b){d(e,100*(b.top+b.height)/a.m.getScrollHeight(),"verticalScrollBoundary");d(f,100*(b.left+b.width)/
  163. a.m.getScrollWidth(),"horizontalScrollBoundary")})}else v().error("Analytics.Instrumentation","Boundaries are required for the scroll trigger to work.")}function Kc(a){var b={};if(!a||!Array.isArray(a))return b;for(var c=0;c<a.length;c++){var d=a[c];if("number"!==typeof d||!isFinite(d)){v().error("Analytics.Instrumentation","Scroll trigger boundaries must be finite.");break}d=Math.min(5*Math.round(d/5),100);b[d]=!1}return b}function Hc(a,b,c){this.hb=a;this.ob=b;this.oc=c;this.Db=[]}
  164. Hc.prototype.dispose=function(){this.Db.forEach(function(a){a()})};
  165. Hc.prototype.addTrigger=function(a,b){var c=a.on,d=Gb(c),e=Hb(this.hb.getType());this.isDeprecatedListenerEvent(d)?(c=this.oc,d=a.on,this.ob.ownerDocument.defaultView==c.ampdoc.win||Ec.includes(d))?"scroll"===d&&(a.scrollSpec?(Jc(c,a.scrollSpec,b),a=c.m.getSize(),c.Hb({top:c.m.getScrollTop(),left:c.m.getScrollLeft(),width:a.width,height:a.height,relayoutAll:!1,velocity:0})):v().error("Analytics.Instrumentation","Missing scrollSpec on scroll trigger.")):v().error("Analytics.Instrumentation",'Trigger type "'+
  166. d+'" is not allowed in the embed.'):(d=this.hb.getTrackerForWhitelist(d,e),v().assert(!!d,'Trigger type "%s" is not allowed in the %s',c,this.hb.getType()),a=d.add(this.ob,c,a,b),this.Db.push(a))};Hc.prototype.isDeprecatedListenerEvent=function(a){return"scroll"==a};var Mc={_ping_:Lc};function Lc(){throw Error("batchPlugin _ping_ is for testing only");};var Nc={RANDOM:!0,CANONICAL_URL:!0,CANONICAL_HOST:!0,CANONICAL_HOSTNAME:!0,CANONICAL_PATH:!0,AMPDOC_URL:!0,AMPDOC_HOST:!0,AMPDOC_HOSTNAME:!0,SOURCE_URL:!0,SOURCE_HOST:!0,SOURCE_HOSTNAME:!0,SOURCE_PATH:!0,TIMESTAMP:!0,TIMEZONE:!0,TIMEZONE_CODE:!0,VIEWPORT_HEIGHT:!0,VIEWPORT_WIDTH:!0,SCREEN_WIDTH:!0,SCREEN_HEIGHT:!0,AVAILABLE_SCREEN_HEIGHT:!0,AVAILABLE_SCREEN_WIDTH:!0,SCREEN_COLOR_DEPTH:!0,DOCUMENT_CHARSET:!0,BROWSER_LANGUAGE:!0,AMP_VERSION:!0,BACKGROUND_STATE:!0,USER_AGENT:!0,FIRST_CONTENTFUL_PAINT:!0,
  167. FIRST_VIEWPORT_READY:!0,MAKE_BODY_VISIBLE:!0};function Oc(a,b,c,d,e){this.win=a.getAmpDoc().win;this.baseUrl=b.baseUrl;this.j=b.batchInterval;this.Lb=Number(b.reportWindow)||null;this.Pa=null;this.fa=b.batchPlugin;v().assert(this.fa?this.j:!0,"Invalid request: batchPlugin cannot be set on non-batched request");this.Ra=this.fa?v().assert(Mc[this.fa],"Invalid request: unsupported batch plugin "+this.fa):null;this.W=bc(this.win);this.Pb=Oa(a);this.ta=this.sa=null;this.Va=[];this.Qa=[];this.jc=c;this.dc=d;this.Rb=e?Nc:void 0;this.Ha=this.L=null;
  168. this.Kb=!0;this.$a=null;this.la=0;Pc(this);if(this.j){this.j=Array.isArray(this.j)?this.j:[this.j];for(b=0;b<this.j.length;b++)d=this.j[b],v().assert(u(d),"Invalid batchInterval value: "+this.j+"interval must be a number"),d=1E3*Number(d),v().assert(200<=d,"Invalid batchInterval value: "+this.j+", interval value must be greater than 200ms."),this.j[b]=d;this.Pa=0;Qc(this)}}
  169. Oc.prototype.send=function(a,b,c,d){var e=this,f=b.important,h=!0===b.important||!this.j;if(this.Kb||f){this.la++;this.$a=b;var k=b.extraUrlParams,n=this.W.getMacros(),l=Object.assign({},d,n);this.sa||(c.freezeVar("extraUrlParams"),this.ta=this.W.expandTemplate(this.baseUrl,c),this.sa=this.ta.then(function(a){return e.Pb.expandUrlAsync(a,l,e.Rb)}));var p=Rc(this,a,k,c).then(function(a){var b=a,c=[],d;for(d in b){var f=b[d];null!=f&&(f=e.W.encodeVars(d,f),c.push(encodeURIComponent(d)+"="+f))}var h=
  170. c.join("&");return e.Pb.expandUrlAsync(h,l,e.Rb)});if(this.Ra){var q=A({trigger:b.on,timestamp:this.win.Date.now(),extraUrlParams:null});this.Qa.push(p.then(function(a){q.extraUrlParams=t(a);return q}))}this.Va.push(p);0!=this.la&&h&&Sc(this)}};Oc.prototype.dispose=function(){this.Ia();this.L&&(this.win.clearTimeout(this.L),this.L=null);this.Ha&&(this.win.clearTimeout(this.Ha),this.Ha=null)};
  171. function Sc(a){var b=a.Va,c=a.ta,d=a.sa,e=a.Qa,f=a.$a;a.Ia();c.then(function(c){a.jc.url(c,!0);d.then(function(c){var d;d=a.Ra?Tc(a,c,e):Uc(c,b);d.then(function(b){a.dc(b,f)})})})}function Uc(a,b){return Promise.all(b).then(function(b){fb(b,function(a){return!!a});var c=b.join("&");return 0<=a.indexOf("${extraUrlParams}")?a.replace("${extraUrlParams}",c):ra(a,c)})}
  172. function Tc(a,b,c){return Promise.all(c).then(function(c){try{return a.Ra(b,c)}catch(e){return w().error("AMP-ANALYTICS","Error: batchPlugin function "+a.fa,e),""}})}Oc.prototype.Ia=function(){this.la=0;this.ta=this.sa=null;this.Va=[];this.Qa=[];this.$a=null};
  173. function Rc(a,b,c,d){var e=[],f=y(),h=new Wb(d.vars,d.iterations,!0);if(b||c){Object.assign(f,b,c);b={};for(var k in f)b.k=k,"string"==typeof f[b.k]&&e.push(a.W.expandTemplate(f[b.k],h).then(function(a){return function(b){f[a.k]=b}}(b))),b={k:b.k}}return Promise.all(e).then(function(){return f})}function Pc(a){a.Lb&&(a.Ha=a.win.setTimeout(function(){0!=a.la&&Sc(a);a.Kb=!1;a.L&&(a.win.clearTimeout(a.L),a.L=null)},1E3*a.Lb))}
  174. function Qc(a){var b=a.Pa<a.j.length?a.j[a.Pa++]:a.j[a.j.length-1];a.L=a.win.setTimeout(function(){0!=a.la&&Sc(a);Qc(a)},b)}function Vc(a){if(!a.requests)return a;for(var b in a.requests)if(x.call(a.requests,b)){var c=a.requests,d;d=a.requests[b];d=fa(d)?d:{baseUrl:d};c[b]=d}return a};var Wc=["visible","hidden"];function Xc(a){a=AMP.BaseElement.call(this,a)||this;a.cb=zb;a.tb=Promise.resolve();a.Ta=null;a.Z=!1;a.ma={};a.h={};a.ba={};a.yb=null;a.ea=null;a.W=bc(a.win);a.Yb=C(a.win,"crypto");a.Ca=null;a.M=null;a.Ab="inabox"==da(a.win).runtime;a.fc=Date.now()+6E4;return a}m(Xc,AMP.BaseElement);g=Xc.prototype;g.getLayoutPriority=function(){return this.Ab?0:1};g.isAlwaysFixed=function(){return!0};g.isLayoutSupported=function(){return!0};
  175. g.buildCallback=function(){var a=this;this.Z=this.element.hasAttribute("sandbox");this.element.setAttribute("aria-hidden","true");this.Ta=this.element.getAttribute("data-consent-notification-id");null!=this.Ta&&(this.tb=La(this.element).then(function(b){return b.get(a.Ta)}));"immediate"==this.element.getAttribute("trigger")&&Yc(this)};g.layoutCallback=function(){return Yc(this)};
  176. g.detachedCallback=function(){this.ea&&(this.ea.dispose(),this.ea=null);for(var a=0;a<this.ma.length;a++)this.ma[a].dispose(),delete this.ma[a]};g.resumeCallback=function(){this.h.transport&&this.h.transport.iframe&&Zc(this)};g.unlayoutCallback=function(){if(H(this.getAmpDoc()).isVisible())return!1;this.M&&(this.M.detach(),this.M=null);return AMP.BaseElement.prototype.unlayoutCallback.call(this)};
  177. function Yc(a){if(a.Ca)return a.Ca;Ua(a.element);a.Ca=H(a.getAmpDoc()).whenFirstVisible().then(function(){return C(a.win,"timer").promise(1)}).then(function(){return a.tb}).then(a.Zb.bind(a)).then(function(){var b=a.getAmpDoc();return Ca(ya(b),"amp-analytics-instrumentation")}).then(function(b){a.yb=b}).then(a.kc.bind(a)).then(a.lc.bind(a));return a.Ca}
  178. g.lc=function(){var a=this;if($c(this)){var b=Y(this);return Promise.resolve()}ad(this);if(!this.h.triggers){var c=Y(this);this.user().error(c,"No triggers were found in the config. No analytics data will be sent.");return Promise.resolve()}bd(this,this.h.extraUrlParams,this.h.extraUrlParamsReplaceMap);this.ea=this.yb.createAnalyticsGroup(this.element);this.h.transport&&this.h.transport.iframe&&Zc(this);var c=[],d={},e;for(e in this.h.triggers){if(x.call(this.h.triggers,e)){d.trigger=this.h.triggers[e];
  179. d.expansionOptions=cd(this,{},d.trigger,void 0,!0);var f=Y(this);if(!d.trigger){this.user().error(f,"Trigger should be an object: ",e);continue}if(!d.trigger.on||!d.trigger.request){this.user().error(f,'"on" and "request" attributes are required for data to be collected.');continue}if(this.Z){var h=d.trigger.on;if(ga(h)&&!Wc.includes(h)){this.user().error(f,h+"is not supported for amp-analytics in scope");continue}}bd(this,d.trigger.extraUrlParams,this.h.extraUrlParamsReplaceMap);c.push(dd(this,d.trigger).then(function(b){return function(c){if(c)if(a.Z)a.element.parentElement&&
  180. (b.trigger.selector=a.element.parentElement.tagName,b.trigger.selectionMethod="closest",ed(a,b.trigger));else{if(b.trigger.selector)return a.W.expandTemplate(b.trigger.selector,b.expansionOptions).then(function(c){b.trigger.selector=c;ed(a,b.trigger)});ed(a,b.trigger)}}}(d)))}d={trigger:d.trigger,expansionOptions:d.expansionOptions}}return Promise.all(c)};
  181. function Zc(a){if(!a.M){a.preload(Nb(a.getAmpDoc().win),"script");var b=a.assertAmpAdResourceId();a.M=new Ob(a.Ab?a.win:a.getAmpDoc().win,a.element.getAttribute("type"),a.h.transport,b)}}g.preload=function(a,b){this.preconnect.preload(a,b)};g.assertAmpAdResourceId=function(){return v().assertString($a(this.element,E(this.win)),Y(this)+": No friendly amp-ad ancestor element was found for amp-analytics tag with iframe transport.")};
  182. function ed(a,b){try{a.ea.addTrigger(b,a.bc.bind(a,b))}catch(c){a=Y(a),ja(a,'Failed to process trigger "'+b.on+'"',c)}}function bd(a,b,c){if(b&&c){var d=0,e;for(e in c){if(16<++d){b=Y(a);a.user().error(b,"More than 16 extraUrlParamsReplaceMap rules aren't allowed; Skipping the rest");break}for(var f in b){var h=f.replace(e,c[e]);if(f!=h){var k=b[f];delete b[f];b[h]=k}}}}}
  183. g.kc=function(){var a=this,b=(fd(this).configRewriter||{}).url,c=A({}),d=this.getInlineConfigNoInline();gd(this,d);Z(this,d,c);Z(this,this.ba,c);if(!b||this.Z)return this.h=hd(this,c),Promise.resolve();ta(b,this.element);var e=Y(this),f={method:"POST",body:c,requireAmpResponseSourceOrigin:!1};this.element.hasAttribute("data-credentials")&&(f.credentials=this.element.getAttribute("data-credentials"));var h=this.getAmpDoc();return Oa(this.element).expandUrlAsync(b).then(function(a){return C(h.win,"xhr").fetchJson(a,
  184. f)}).then(function(a){return a.json()}).then(function(b){a.h=hd(a,b)},function(c){a.user().error(e,"Error rewriting configuration: ",b,c)})};
  185. g.Zb=function(){var a=this,b=this.element.getAttribute("config");if(!b||this.Z)return Promise.resolve();ta(b,this.element);var c=Y(this),d={requireAmpResponseSourceOrigin:!1};this.element.hasAttribute("data-credentials")&&(d.credentials=this.element.getAttribute("data-credentials"));var e=this.getAmpDoc();return Oa(this.element).expandUrlAsync(b).then(function(a){b=a;return C(e.win,"xhr").fetchJson(b,d)}).then(function(a){return a.json()}).then(function(b){a.ba=b},function(d){a.user().error(c,"Error loading remote config: ",
  186. b,d)})};function hd(a,b){var c=A({vars:{requestCount:0}}),d=a.cb["default"]||{};Z(a,Vc(d),c);Z(a,Vc(fd(a)),c,!0);Z(a,Vc(b),c);return c}function fd(a){var b=a.element.getAttribute("type");if("googleanalytics-alpha"==b){var c=Y(a);v().warn(c,'"googleanalytics-alpha" configuration is not planned to be supported long-term. Avoid use of this value for amp-analytics config attribute unless you plan to migrate before deprecation')}return a.cb[b]||{}}
  187. function gd(a,b){var c=a.element.getAttribute("type");a.cb[c]&&(b.transport||a.ba.transport)&&(c=Y(a),a.user().error(c,"Inline or remote config should not overwrite vendor transport settings"));b.transport&&b.transport.iframe&&(a.user().error("amp-analytics","Inline configs are not allowed to specify transport iframe"),b.transport.iframe=void 0);a.ba.transport&&a.ba.transport.iframe&&(a.user().error("amp-analytics","Remote configs are not allowed to specify transport iframe"),a.ba.transport.iframe=
  188. void 0)}
  189. g.getInlineConfigNoInline=function(){if(this.element.CONFIG)return this.element.CONFIG;var a={},b=Y(this);try{var c=this.element.children;if(1==c.length){var d=c[0];"SCRIPT"==d.tagName&&"APPLICATION/JSON"==d.getAttribute("type").toUpperCase()?a=JSON.parse(c[0].textContent):this.user().error(b,'The analytics config should be put in a <script> tag with type="application/json"')}else 1<c.length&&this.user().error(b,"The tag should contain only one <script> child.")}catch(e){this.user().error(b,"Analytics config could not be parsed. Is it in a valid JSON format?",
  190. e)}return a};function $c(a){if(!a.h.optout)return!1;var b=a.h.optout.split(".");a=a.win;for(var c=0;c<b.length;c++){if(!a)return!1;a=a[b[c]]}return a()}
  191. function ad(a){if(!a.h||!a.h.requests){var b=Y(a);a.user().error(b,"No request strings defined. Analytics data will not be sent from this page.")}else if(a.h.requests){for(var c in a.h.requests)x.call(a.h.requests,c)&&!a.h.requests[c].baseUrl&&(a.user().error("amp-analytics","request must have a baseUrl"),delete a.h.requests[c]);for(var d in a.h.requests)a.h.requests[d].baseUrl=ma(a.h.requests[d].baseUrl,function(b){var c=a.h.requests[b];return c&&c.baseUrl||"${"+b+"}"});c={};for(b in a.h.requests)x.call(a.h.requests,
  192. b)&&(c[b]=new Oc(a.element,a.h.requests[b],a.preconnect,a.nc.bind(a),a.Z));a.ma=c}}g.bc=function(a,b){for(var c=Array.isArray(a.request)?a.request:[a.request],d=0;d<c.length;d++){var e=c[d];id(this,e,a,b)}};
  193. function id(a,b,c,d){if(!a.element.ownerDocument.defaultView){var e=Y(a);w().warn(e,"request against destroyed embed: ",c.on)}var f=a.ma[b];f?jd(a,c,d).then(function(b){if(b){a.h.vars.requestCount++;var e=cd(a,d,c),h={},l=c.resourceTimingSpec;l&&!l.done&&Date.now()<a.fc&&(h.RESOURCE_TIMING=ic(a.win,l),e.vars.resourceTiming="RESOURCE_TIMING");f.send(a.h.extraUrlParams,c,e,h)}}):(b=Y(a),a.user().error(b,"Ignoring event. Request string not found: ",c.request))}
  194. function dd(a,b){var c=b.sampleSpec,d=Promise.resolve(!0),e=Y(a);if(!c)return d;var f=c.sampleOn;if(!f)return a.user().error(e,"Invalid sampleOn value."),d;var h=parseFloat(c.threshold);if(0<=h&&100>=h)return b=cd(a,{},b),kd(a,f,b).then(function(b){return a.Yb.uniform(b)}).then(function(a){return 100*a<h});v().error(e,"Invalid threshold for sampling.");return d}
  195. function jd(a,b,c){c=cd(a,c,b);var d=ld(a,a.h.enabled,c),e=ld(a,b.enabled,c);return Promise.all([d,e]).then(function(a){return a[0]&&a[1]})}function ld(a,b,c){return void 0===b?Promise.resolve(!0):kd(a,b,c).then(function(a){return""!==a&&"0"!==a&&"false"!==a&&"null"!==a&&"NaN"!==a&&"undefined"!==a})}function kd(a,b,c){return a.W.expandTemplate(b,c).then(function(b){return Oa(a.element).expandUrlAsync(b)})}
  196. g.nc=function(a,b){if(a)if(b.iframePing)v().assert("visible"==b.on,"iframePing is only available on page view requests."),Ub(this.win,a);else if(this.h.transport&&this.h.transport.iframe)v().assert(this.M,"iframe transport was inadvertently deleted"),this.M.sendRequest(a);else{var c=this.win;b=this.h.transport||{};ta(a,"amp-analytics request");var d=B(a),d=t(d.search);v().assert(!("__amp_source_origin"in d),"Source origin is not allowed in %s",a);b.beacon&&c.navigator.sendBeacon&&c.navigator.sendBeacon(a,
  197. "")||b.xhrpost&&Tb(c,a)||((c=b.image)?Sb(a,"object"==typeof c&&c.suppressWarnings):v().warn("amp-analytics.Transport","Failed to send request",a,b))}else a=Y(this),this.user().error(a,"Request not sent. Contents empty.")};function Y(a){return"AmpAnalytics "+(a.element.getAttribute("id")||"<unknown id>")}
  198. function Z(a,b,c,d){if(null===c||void 0===c)c={};v().assert(d||!b||!b.optout||"_gaUserPrefs.ioo"==b.optout,"optout property is only available to vendor config.");for(var e in b)v().assert(d||"iframePing"!=e,"iframePing config is only available to vendor config."),x.call(b,e)&&(Array.isArray(b[e])?(Array.isArray(c[e])||(c[e]=[]),c[e]=Z(a,b[e],c[e],d)):fa(b[e])?(fa(c[e])||(c[e]={}),c[e]=Z(a,b[e],c[e],d)):c[e]=b[e]);return c}
  199. function cd(a,b,c,d,e){var f=y();Z(a,a.h.vars,f);Z(a,c.vars,f);Z(a,b.vars,f);return new Wb(f,d,e)}(function(a){a.registerServiceForDoc("amp-analytics-instrumentation",Fc);a.registerServiceForDoc("activity",wb);var b=a.win,c=b=E(b),d=Ba(c),e=d["amp-analytics-variables"];e||(e=d["amp-analytics-variables"]={obj:null,promise:null,resolve:null,context:null,ctor:null});e.ctor||e.obj||(e.ctor=$b,e.context=b,e.resolve&&F(c,"amp-analytics-variables"));a.registerElement("amp-analytics",Xc)})(self.AMP);
  200. })});
  201. //# sourceMappingURL=amp-analytics-0.1.js.map
Add Comment
Please, Sign In to add comment