(self.AMP=self.AMP||[]).push({n:"amp-analytics",v:"2010010034001",f:(function(AMP,_){
'use strict';var h,aa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b};function ba(a){for(var b=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global],c=0;c<b.length;++c){var d=b[c];if(d&&d.Math==Math)return d}return function(){throw Error("Cannot find global object");}()}var ca=ba(this);"function"===typeof Symbol&&Symbol("x");var da;
if("function"==typeof Object.setPrototypeOf)da=Object.setPrototypeOf;else{var ea;a:{var fa={a:!0},ha={};try{ha.__proto__=fa;ea=ha.a;break a}catch(a){}ea=!1}da=ea?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ia=da;
function m(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(ia)ia(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.wd=b.prototype}var ka;function q(){return ka?ka:ka=Promise.resolve(void 0)};function t(){var a,b;this.promise=new Promise(function(c,d){a=c;b=d});this.resolve=a;this.reject=b}function la(a){return new Promise(function(b){b(a())})};function ma(a,b){var c=b=void 0===b?"":b;try{return decodeURIComponent(a)}catch(d){return c}};var na=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function u(a){var b=Object.create(null);if(!a)return b;for(var c;c=na.exec(a);){var d=ma(c[1],c[1]),e=c[2]?ma(c[2].replace(/\+/g," "),c[2]):"";b[d]=e}return b};var oa="";
function v(a){var b=a||self;if(b.__AMP_MODE)var c=b.__AMP_MODE;else{c=u(b.location.originalHash||b.location.hash);var d=u(b.location.search);oa||(oa=b.AMP_CONFIG&&b.AMP_CONFIG.v?b.AMP_CONFIG.v:"012010010034001");c={localDev:!1,development:!!(0<=["1","actions","amp","amp4ads","amp4email"].indexOf(c.development)||b.AMP_DEV_MODE),examiner:"2"==c.development,esm:!1,geoOverride:c["amp-geo"],minified:!0,lite:void 0!=d.amp_lite,test:!1,log:c.log,version:"2010010034001",rtvVersion:oa};c=b.__AMP_MODE=c}return c}
;var pa=Object.prototype.toString;function w(a){return Array.isArray(a)}function y(a){return"[object Object]"===pa.call(a)}function qa(a){return"number"===typeof a&&isFinite(a)}function ra(a){var b=sa,c;for(c in b)if(b[c]===a)return!0;return!1};var z=self.AMP_CONFIG||{},ta=("string"==typeof z.cdnProxyRegex?new RegExp(z.cdnProxyRegex):z.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function ua(a){if(!self.document||!self.document.head||self.location&&ta.test(self.location.origin))return null;var b=self.document.head.querySelector('meta[name="'+a+'"]');return b&&b.getAttribute("content")||null}
var va={thirdParty:z.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:z.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:("string"==typeof z.thirdPartyFrameRegex?new RegExp(z.thirdPartyFrameRegex):z.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdn:z.cdnUrl||ua("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:ta,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:z.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:z.betaErrorReportingUrl||
"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:z.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:z.geoApiUrl||ua("amp-geo-api")};function wa(a){for(var b=null,c="",d=0;d<arguments.length;d++){var e=arguments[d];if(e instanceof Error&&!b){b=void 0;var f=Object.getOwnPropertyDescriptor(e,"message");if(f&&f.writable)b=e;else{f=e.stack;var g=Error(e.message);for(b in e)g[b]=e[b];g.stack=f;b=g}}else c&&(c+=" "),c+=e}b?c&&(b.message=c+": "+b.message):b=Error(c);return b}function xa(a){var b=wa.apply(null,arguments);setTimeout(function(){self.__AMP_REPORT_ERROR(b);throw b;})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};
var ya=self.__AMP_LOG;function A(){if(!ya.user)throw Error("failed to call initLogConstructor");return ya.user}function B(){if(ya.dev)return ya.dev;throw Error("failed to call initLogConstructor");}function D(a,b,c,d,e,f){return A().assert(a,b,c,d,e,f,void 0,void 0,void 0,void 0,void 0)};var za=Object.prototype.hasOwnProperty;function E(a){return a||{}}function F(a,b){return za.call(a,b)}
function Aa(a,b,c){var d=void 0===c?10:c,e=[],f=[];f.push({t:a,s:b,d:0});for(a={};0<f.length;){b=f.shift();a.$=b.t;a.S=b.s;a.La=b.d;if(e.includes(a.S))throw Error("Source object has a circular reference.");e.push(a.S);a.$!==a.S&&(a.La>d?Object.assign(a.$,a.S):Object.keys(a.S).forEach(function(a){return function(b){var c=a.S[b];if(F(a.$,b)){var d=a.$[b];if(y(c)&&y(d)){f.push({t:d,s:c,d:a.La+1});return}}a.$[b]=c}}(a)));a={S:a.S,$:a.$,La:a.La}}};function Ba(){this.Mc=100;this.sb=this.Mb=0;this.Pa=Object.create(null)}Ba.prototype.has=function(a){return!!this.Pa[a]};Ba.prototype.get=function(a){var b=this.Pa[a];if(b)return b.access=++this.sb,b.payload};Ba.prototype.put=function(a,b){this.has(a)||this.Mb++;this.Pa[a]={payload:b,access:this.sb};if(!(this.Mb<=this.Mc)){B().warn("lru-cache","Trimming LRU cache");a=this.Pa;var c=this.sb+1,d;for(d in a){var e=a[d].access;if(e<c){c=e;var f=d}}void 0!==f&&(delete a[f],this.Mb--)}};function Ca(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}function G(a,b){return b.length>a.length?!1:0==a.lastIndexOf(b,0)}function Da(a,b){for(var c={},d=0;5>d&&(c.Ma=0,a=a.replace(/\${([^}]*)}/g,function(a){return function(c,d){a.Ma++;return b(d)}}(c)),c.Ma);c={Ma:c.Ma},d++);return a}
function Ea(a,b){var c=/\${([^}]*)}/g;if("string"===typeof b)return Promise.resolve(a.replace(c,b));var d=[],e=0;a.replace(c,function(c){var f=arguments[arguments.length-2];d.push(a.slice(e,f));e=f+c.length;var k=b.apply(null,arguments);d.push(k)});d.push(a.slice(e));return Promise.all(d).then(function(a){return a.join("")})};var Fa=E({c:!0,v:!0,a:!0,ad:!0}),Ga,Ha,Ia=/[?&]amp_js[^&]*/,Ja=/[?&]amp_gsa[^&]*/,Ka=/[?&]amp_r[^&]*/,La=/[?&]amp_kit[^&]*/,Ma=/[?&]usqp[^&]*/;
function H(a){Ga||(Ga=self.document.createElement("a"),Ha=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new Ba));var b=Ha,c=Ga;if(b&&b.has(a))a=b.get(a);else{c.href=a;c.protocol||(c.href=c.href);var d={href:c.href,protocol:c.protocol,host:c.host,hostname:c.hostname,port:"0"==c.port?"":c.port,pathname:c.pathname,search:c.search,hash:c.hash,origin:null};"/"!==d.pathname[0]&&(d.pathname="/"+d.pathname);if("http:"==d.protocol&&80==d.port||"https:"==d.protocol&&443==d.port)d.port="",d.host=d.hostname;d.origin=
c.origin&&"null"!=c.origin?c.origin:"data:"!=d.protocol&&d.host?d.protocol+"//"+d.host:d.href;b&&b.put(a,d);a=d}return a}function Na(a,b,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 Oa(a){var b=[],c;for(c in a){var d=a[c];if(null!=d)if(w(d))for(var e=0;e<d.length;e++){var f=d[e];b.push(encodeURIComponent(c)+"="+encodeURIComponent(f))}else e=d,b.push(encodeURIComponent(c)+"="+encodeURIComponent(e))}return b.join("&")}
function Pa(a,b){var c=void 0===c?"source":c;D(null!=a,"%s %s must be available",b,c);var d=a;"string"==typeof d&&(d=H(d));d="https:"==d.protocol||"localhost"==d.hostname||"127.0.0.1"==d.hostname||Ca(d.hostname,".localhost");D(d||/^(\/\/)/.test(a),'%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s',b,c,a)}function Qa(a){"string"==typeof a&&(a=H(a));return va.cdnProxyRegex.test(a.origin)};function Ra(a){if(a.__AMP__EXPERIMENT_TOGGLES)return a.__AMP__EXPERIMENT_TOGGLES;a.__AMP__EXPERIMENT_TOGGLES=Object.create(null);var b=a.__AMP__EXPERIMENT_TOGGLES;if(a.AMP_CONFIG)for(var c in a.AMP_CONFIG){var d=a.AMP_CONFIG[c];"number"===typeof d&&0<=d&&1>=d&&(b[c]=Math.random()<d)}if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-doc-opt-in"])&&0<a.AMP_CONFIG["allow-doc-opt-in"].length){var e=a.AMP_CONFIG["allow-doc-opt-in"],f=a.document.head.querySelector('meta[name="amp-experiments-opt-in"]');
if(f){var g=f.getAttribute("content").split(",");for(c=0;c<g.length;c++)-1!=e.indexOf(g[c])&&(b[g[c]]=!0)}}Object.assign(b,Sa(a));if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-url-opt-in"])&&0<a.AMP_CONFIG["allow-url-opt-in"].length){c=a.AMP_CONFIG["allow-url-opt-in"];a=u(a.location.originalHash||a.location.hash);for(var k=0;k<c.length;k++){var l=a["e-"+c[k]];"1"==l&&(b[c[k]]=!0);"0"==l&&(b[c[k]]=!1)}}return b}
function Sa(a){var b="";try{"localStorage"in a&&(b=a.localStorage.getItem("amp-experiment-toggles"))}catch(e){B().warn("EXPERIMENTS","Failed to retrieve experiments from localStorage.")}var c=b?b.split(/\s*,\s*/g):[];a=Object.create(null);for(var d=0;d<c.length;d++)0!=c[d].length&&("-"==c[d][0]?a[c[d].substr(1)]=!1:a[c[d]]=!0);return a}function Ta(a){var b=I(a);b.__AMP_EXPERIMENT_BRANCHES||(b.__AMP_EXPERIMENT_BRANCHES={});return Object.assign({},b.__AMP_EXPERIMENT_BRANCHES)};function Ya(a,b){var c=a.ownerDocument.defaultView,d=I(c),e=c!=d,f=!!Ra(d)["ampdoc-fie"];e&&!f?b=Za(c,b)?$a(c,b):null:(a=J(a),a=K(a),b=Za(a,b)?$a(a,b):null);return b}function L(a,b){a=I(a);return $a(a,b)}function M(a,b){var c=J(a);c=K(c);return $a(c,b)}function ab(a,b){return bb(K(a),b)}function I(a){return a.__AMP_TOP||(a.__AMP_TOP=a)}function cb(a,b){var c=(a.ownerDocument||a).defaultView;a=b||I(c);if(c&&c!=a&&I(c)==a)try{return c.frameElement}catch(d){}return null}
function J(a){return a.nodeType?L((a.ownerDocument||a).defaultView,"ampdoc").getAmpDoc(a):a}function K(a){a=J(a);return a.isSingleDoc()?a.win:a}function $a(a,b){Za(a,b);a=db(a)[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 eb(a,b,c,d){var e=db(a),f=e[c];f||(f=e[c]={obj:null,promise:null,resolve:null,reject:null,context:null,ctor:null});f.ctor||f.obj||(f.ctor=d,f.context=b,f.resolve&&$a(a,c))}
function fb(a,b){var c=bb(a,b);if(c)return c;a=db(a);a[b]=gb();return a[b].promise}function bb(a,b){var c=db(a)[b];if(c){if(c.promise)return c.promise;$a(a,b);return c.promise=Promise.resolve(c.obj)}return null}function db(a){var b=a.__AMP_SERVICES;b||(b=a.__AMP_SERVICES={});return b}function Za(a,b){a=a.__AMP_SERVICES&&a.__AMP_SERVICES[b];return!(!a||!a.ctor&&!a.obj)}
function gb(){var a=new t,b=a.promise,c=a.resolve;a=a.reject;b.catch(function(){});return{obj:null,promise:b,resolve:c,reject:a,context:null,ctor:null}};/*
 https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
var hb;function ib(a){try{var b=a.ownerDocument,c=b.createElement("div"),d=b.createElement("div");c.appendChild(d);return c.querySelector(":scope div")===d}catch(e){return!1}};function jb(a,b,c){a=a.createElement(b);for(var d in c)a.setAttribute(d,c[d]);return a}function kb(a,b){for(;a&&void 0!==a;a=a.parentElement)if(b(a))return a;return null}function lb(a,b){return a.closest?a.closest(b):kb(a,function(a){return mb(a,b)})}function nb(a,b){for(a=a.lastElementChild;a;a=a.previousElementSibling)if(b(a))return a;return null}function mb(a,b){var c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector;return c?c.call(a,b):!1}
function ob(a,b){a.classList.add("i-amphtml-scoped");var c=b.replace(/^|,/g,"$&.i-amphtml-scoped "),d=a.querySelectorAll(c);a.classList.remove("i-amphtml-scoped");return d}function pb(a,b){function c(a){return a}var d=a.dataset;a={};var e=b?b:/^param(.+)/,f;for(f in d){var g=f.match(e);if(g){var k=g[1][0].toLowerCase()+g[1].substr(1);a[c(k)]=d[f]}}return a};function qb(a){return rb(a,"userNotificationManager","amp-user-notification",void 0).then(function(a){return D(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")})}
function rb(a,b,c,d){var e=ab(a,b);if(e)return e;var f=J(a);return f.waitForBodyOpen().then(function(){var a=f.win;var b=f.win.document.head;if(b){var d={};b=b.querySelectorAll("script[custom-element],script[custom-template]");for(var e=0;e<b.length;e++){var p=b[e];p=p.getAttribute("custom-element")||p.getAttribute("custom-template");d[p]=!0}d=Object.keys(d)}else d=[];return d.includes(c)?L(a,"extensions").waitForExtension(a,c):q()}).then(function(){if(d)var e=ab(a,b);else e=f.win,e=e.__AMP_EXTENDED_ELEMENTS&&
e.__AMP_EXTENDED_ELEMENTS[c]?fb(K(a),b):null;return e})};function sb(a){return L(a,"performance")}function N(a){return Ya(a,"url-replace")}function O(a){return M(a,"viewport")};var tb;function ub(a,b,c,d){var e=a,f=c;var g=function(a){try{return f(a)}catch(p){throw self.__AMP_REPORT_ERROR(p),p;}};var k=vb(),l=!1;d&&(l=d.capture);e.addEventListener(b,g,k?d:l);return function(){e&&e.removeEventListener(b,g,k?d:l);g=e=f=null}}function vb(){if(void 0!==tb)return tb;tb=!1;try{var a={get capture(){tb=!0}};self.addEventListener("test-options",null,a);self.removeEventListener("test-options",null,a)}catch(b){}return tb};function wb(a,b,c,d){var e=c,f=ub(a,b,function(a){try{e(a)}finally{e=null,f()}},d);return f}function xb(a){return!!(a.complete||"complete"==a.readyState||yb(a)&&0<a.readyState||a.document&&"complete"==a.document.readyState)}
function zb(a){var b,c;if(xb(a))return Promise.resolve(a);var d=yb(a);return d&&a.__AMP_MEDIA_LOAD_FAILURE_SRC===a.currentSrc?Promise.reject(a):(new Promise(function(e,f){b=d?wb(a,"loadedmetadata",e,{capture:!0}):wb(a,"load",e);if(a.tagName){var g=a;if(d&&!a.hasAttribute("src")&&(g=nb(a,function(a){return"SOURCE"===a.tagName}),!g))return f(Error("Media has no source."));c=wb(g,"error",f)}})).then(function(){c&&c();return a},function(){b&&b();yb(a)&&(a.__AMP_MEDIA_LOAD_FAILURE_SRC=a.currentSrc||!0);
var c=a;c&&c.src&&(c=c.src);throw A().createError("Failed to load:",c);})}function yb(a){return"AUDIO"===a.tagName||"VIDEO"===a.tagName};function Ab(a,b){var c=0;"active"===a.type&&(c=5);return Math.min(b-a.time,c)}function Bb(){this.Nb=0;this.oa=void 0}Bb.prototype.push=function(a){this.oa&&this.oa.time<a.time&&(this.Nb+=Ab(this.oa,a.time));this.oa=a};Bb.prototype.getTotalEngagedTime=function(a){var b=0;void 0!==this.oa&&(b=this.Nb+Ab(this.oa,a));return b};var Cb=["mousedown","mouseup","mousemove","keydown","keyup"],Db=["mouseleave"];
function Eb(a){this.ampdoc=a;this.Jc=this.qd.bind(this);this.Vb=this.Ab.bind(this);this.Hc=this.ec.bind(this);this.Ic=this.Yc.bind(this);this.Ia={};this.sa=[];this.ab=this.$a=!1;this.Rb=new Bb;this.R=O(this.ampdoc);this.ampdoc.whenFirstVisible().then(this.pd.bind(this))}h=Eb.prototype;
h.pd=function(){this.X=Date.now();this.Ab();for(var a=this.ampdoc.getRootNode(),b=this.Vb,c=0;c<Cb.length;c++)this.sa.push(ub(a,Cb[c],b,void 0));a=this.ampdoc.getRootNode();b=this.Hc;for(c=0;c<Db.length;c++)this.sa.push(ub(a,Db[c],b,void 0));this.sa.push(this.ampdoc.onVisibilityChanged(this.Ic));this.R.onScroll(this.Vb)};function Fb(a){var b=Date.now()-a.X;return 0<b?b:0}h.qd=function(){this.ab=this.$a=!1};h.Ab=function(){this.$a||(this.$a=!0,this.ab=!1,Gb(this,"active"))};
h.ec=function(){this.ab||(this.ab=!0,this.$a=!1,Gb(this,"inactive"))};function Gb(a,b){var c=Fb(a),d=Math.floor(c/1E3);setTimeout(a.Jc,1E3-c%1E3);a.Rb.push({type:b,time:d})}h.Yc=function(){this.ampdoc.isVisible()?this.Ab():this.ec()};h.Pb=function(){for(var a=0;a<this.sa.length;a++){var b=this.sa[a];"function"===typeof b&&b()}this.sa=[]};h.vd=function(){this.Pb()};h.getTotalEngagedTime=function(){var a=Math.floor(Fb(this)/1E3);return this.Rb.getTotalEngagedTime(a)};
h.getIncrementalEngagedTime=function(a,b){var c=void 0===b?!0:b;if(!F(this.Ia,a))return c&&(this.Ia[a]=this.getTotalEngagedTime()),this.getTotalEngagedTime();var d=this.Ia[a];if(!1===c)return this.getTotalEngagedTime()-d;this.Ia[a]=this.getTotalEngagedTime();return this.Ia[a]-d};function Hb(a,b){try{return JSON.parse(a)}catch(c){return b&&b(c),null}};var Ib=JSON.parse('{"transport":{"beacon":true,"xhrpost":true,"image":true},"vars":{"accessReaderId":"ACCESS_READER_ID","ampdocHost":"AMPDOC_HOST","ampdocHostname":"AMPDOC_HOSTNAME","ampdocUrl":"AMPDOC_URL","ampGeo":"AMP_GEO","ampState":"AMP_STATE","ampVersion":"AMP_VERSION","authdata":"AUTHDATA","availableScreenHeight":"AVAILABLE_SCREEN_HEIGHT","availableScreenWidth":"AVAILABLE_SCREEN_WIDTH","backgroundState":"BACKGROUND_STATE","browserLanguage":"BROWSER_LANGUAGE","canonicalHost":"CANONICAL_HOST","canonicalHostname":"CANONICAL_HOSTNAME","canonicalPath":"CANONICAL_PATH","canonicalUrl":"CANONICAL_URL","clientId":"CLIENT_ID","consentState":"CONSENT_STATE","contentLoadTime":"CONTENT_LOAD_TIME","cookie":"COOKIE","counter":"COUNTER","cumulativeLayoutShift":"CUMULATIVE_LAYOUT_SHIFT","documentCharset":"DOCUMENT_CHARSET","documentReferrer":"DOCUMENT_REFERRER","domainLookupTime":"DOMAIN_LOOKUP_TIME","domInteractiveTime":"DOM_INTERACTIVE_TIME","experimentBranches":"EXPERIMENT_BRANCHES","externalReferrer":"EXTERNAL_REFERRER","firstContentfulPaint":"FIRST_CONTENTFUL_PAINT","firstInputDelay":"FIRST_INPUT_DELAY","firstViewportReady":"FIRST_VIEWPORT_READY","fragmentParam":"FRAGMENT_PARAM","largestContentfulPaint":"LARGEST_CONTENTFUL_PAINT","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","resourceTiming":"RESOURCE_TIMING","screenColorDepth":"SCREEN_COLOR_DEPTH","screenHeight":"SCREEN_HEIGHT","screenWidth":"SCREEN_WIDTH","scrollHeight":"SCROLL_HEIGHT","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"}}');function Jb(a){return"undefined"!==typeof TextEncoder?(new TextEncoder("utf-8")).encode(a):Kb(unescape(encodeURIComponent(a)))}function Kb(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;c++){var d=a.charCodeAt(c);b[c]=d}return b}function Lb(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};var Mb={"-":"+",_:"/",".":"="},Nb={"+":"-","/":"_","=":"."};function Ob(a){var b=atob(a.replace(/[-_.]/g,function(a){return Mb[a]}));return Kb(b)}function Pb(a){a=Lb(a);return btoa(a).replace(/[+/=]/g,function(a){return Nb[a]})}function Qb(a){a=Jb(a);return Pb(a)};function Rb(a,b){var c=Sb(a);if(!c)return null;var d=c.split(";");for(a=0;a<d.length;a++){var e=d[a].trim(),f=e.indexOf("="),g;if(g=-1!=f)g=e.substring(0,f).trim(),g=ma(g,void 0)==b;if(g)return b=e.substring(f+1).trim(),ma(b,b)}return null}function Sb(a){try{return a.document.cookie}catch(b){return""}}
function Tb(a){var b=a.document.head&&a.document.head.querySelector("meta[name='amp-cookie-scope']");if(b){var c=b.getAttribute("content")||"";a=a.location.href;"string"==typeof a&&(a=H(a));if(Qa(a)){var d=a.pathname.split("/");D(Fa[d[1]],"Unknown path prefix in url %s",a.href);var e=d[2],f="s"==e?"https://"+decodeURIComponent(d[3]):"http://"+decodeURIComponent(e);D(0<f.indexOf("."),"Expected a . in origin %s",f);d.splice(1,"s"==e?3:2);d=f+d.join("/");e=(e=a.search)&&"?"!=e?(e=e.replace(Ia,"").replace(Ja,
"").replace(Ka,"").replace(La,"").replace(Ma,"").replace(/^[?&]/,""))?"?"+e:"":"";a=d+e+(a.hash||"")}else a=a.href;a=H(a).origin;return Ca(a,"."+c)?c:a.split("://")[1]}if(!Qa(a.location.href)){d=a.location.hostname.split(".");e=d[d.length-1];for(f="-test-amp-cookie-tmp";Rb(a,f);)f="-test-amp-cookie-tmp0";for(var g=d.length-2;0<=g;g--)if(e=d[g]+"."+e,Ub(a,f,"delete",Date.now()+1E3,e),"delete"==Rb(a,f))return Ub(a,f,"delete",Date.now()-1E3,e),e}return null}
function Ub(a,b,c,d,e,f,g){"ampproject.org"==e&&(c="delete",d=0);b=encodeURIComponent(b)+"="+encodeURIComponent(c)+"; path=/"+(e?"; domain="+e:"")+"; expires="+(new Date(d)).toUTCString()+(f?"; SameSite="+f:"")+(g?"; Secure":"");try{a.document.cookie=b}catch(k){}};function Vb(a){if(!Wb(a))return null;var b=a.indexOf("{");try{return JSON.parse(a.substr(b))}catch(c){return B().error("MESSAGING","Failed to parse message: "+a,c),null}}function Wb(a){return"string"==typeof a&&0==a.indexOf("amp-")&&-1!=a.indexOf("{")};function Xb(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];b(f,e,a)?c.push(f):(d<e&&(a[d]=f),d++)}d<a.length&&(a.length=d)}function Yb(a,b){for(var c=0;c<a.length;c++)if(b(a[c],c,a))return c;return-1};var Zb,$b="Webkit webkit Moz moz ms O o".split(" ");function ac(a){var b=!1;void 0===b&&(b=a.hasAttribute("hidden"));b?a.removeAttribute("hidden"):a.setAttribute("hidden","")};function bc(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 cc(a,b,c){var d=c?b.getAttribute("data-amp-3p-sentinel"):"amp";a=bc(a,d,!0);for(d=0;d<a.length;d++){var e=a[d];if(e.frame===b){var f=e;break}}f||(f={frame:b,events:Object.create(null)},a.push(f));return f.events}
function dc(a){for(var b=E({sentinel:"unlisten"}),c=a.length-1;0<=c;c--){var d=a[c];if(!d.frame.contentWindow){a.splice(c,1);d=d.events;for(var e in d)d[e].splice(0,Infinity).forEach(function(a){a(b)})}}}
function ec(a){a.listeningFors||a.addEventListener("message",function(b){if(b.data){var c=fc(b.data);if(c&&c.sentinel){var d=b.source;var e=bc(a,c.sentinel);if(e){for(var f,g=0;g<e.length;g++){var k=e[g],l=k.frame.contentWindow;if(l){var n;if(!(n=d==l))b:{for(n=d;n&&n!=n.parent;n=n.parent)if(n==l){n=!0;break b}n=!1}if(n){f=k;break}}else setTimeout(dc,0,e)}d=f?f.events:null}else d=e;var p=d;if(p){var r=p[c.type];if(r)for(r=r.slice(),d=0;d<r.length;d++)(0,r[d])(c,b.source,b.origin,b)}}}})}
function gc(a,b,c,d){function e(c,e,f,k){if("amp"==c.sentinel){if(e!=a.contentWindow)return;var n="null"==f&&void 0;if(g!=f&&!n)return}if(d||e==a.contentWindow)"unlisten"==c.sentinel?l():b(c,e,f,k)}var f=a.ownerDocument.defaultView;ec(f);c=cc(f,a,c);var g=H(a.src).origin,k=c["send-iframe-transport-events"]||(c["send-iframe-transport-events"]=[]),l;k.push(e);return l=function(){if(e){var a=k.indexOf(e);-1<a&&k.splice(a,1);b=k=e=null}}}
function hc(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 fc(a){"string"==typeof a&&(a="{"==a.charAt(0)?Hb(a,function(a){B().warn("IFRAME-HELPER","Postmessage could not be parsed. Is it in a valid JSON format?",a)})||null:Wb(a)?Vb(a):null);return a}
function ic(a,b){var c=this;this.hc=a;this.Cb=!0;this.xa=[];this.Pb=gc(this.hc,function(a,e,f){c.xa.some(function(a){return a.win==e})||c.xa.push({win:e,origin:f});b(a,e,f)},this.Cb,this.Cb)}ic.prototype.send=function(a,b){Xb(this.xa,function(a){return!a.win.parent});hc(this.hc,this.xa,a,b,this.Cb)};ic.prototype.destroy=function(){this.Pb();this.xa.length=0};function jc(a){return a.classList.contains("i-amphtml-fie")||!!lb(a,".i-amphtml-fie")};function kc(a,b){return!jc(b)&&!Qa(a.location)&&"inabox"!=v(a).runtime};function lc(a){var b=void 0===b?"default":b;return rb(a,"consentPolicyManager","amp-consent").then(function(a){return a?a.whenPolicyResolved(b):null})};var mc=null;var nc=/^[a-zA-Z0-9\-_.]+$/;function oc(a){var b=pc(a);return""===b?"":["1",qc(b),b].join("*")}
function qc(a,b){var c=(new Date).getTimezoneOffset();var d=window;c=[window.navigator.userAgent,c,d.navigator.userLanguage||d.navigator.language].join("*");d=b||0;var e=Math.floor(Date.now()/6E4)-d;a=[c,e,a].join("*");if(!mc){c=Array(256);for(d=0;256>d;d++){for(var f=d,g=0;8>g;g++)f=f&1?f>>>1^3988292384:f>>>1;c[d]=f}mc=c}a=Jb(a);c=4294967295;for(d=0;d<a.length;d++)c=c>>>8^mc[(c^a[d])&255];return((c^-1)>>>0).toString(36)}
function pc(a){return a?Object.keys(a).filter(function(a){var b=nc.test(a);b||A().error("amp-analytics/linker","Invalid linker key: "+a);return b}).map(function(b){return b+"*"+Qb(String(a[b]))}).join("*"):""};function rc(a){this.l=a;this.Aa={}}
rc.prototype.get=function(a,b){if(!a||!b)return A().error("amp-analytics/linker-reader","LINKER_PARAM requires two params, name and id"),null;if(!F(this.Aa,a)){var c=this.Aa;var d=u(this.l.location.search);if(F(d,a)){d=d[a];var e=this.l.location;if(this.l.history.replaceState){var f;f=(f=e.search)&&"?"!=f?(f=f.replace(new RegExp("[?&]"+a+"=[^&]*","g"),"").replace(/^[?&]/,""))?"?"+f:"":"";this.l.history.replaceState(null,"",e.origin+e.pathname+f+(e.hash||""))}e=d.split("*");f=0==e.length%2;4>e.length||
!f?(A().error("amp-analytics/linker","Invalid linker_param value "+d),d=null):(d=Number(e.shift()),1!==d?(A().error("amp-analytics/linker","Invalid version number "+d),d=null):(d=e.shift(),e=e.join("*"),d={checksum:d,serializedIds:e}));if(d){e=d.serializedIds;c:{d=d.checksum;for(f=0;1>=f;f++)if(qc(e,f)==d){d=!0;break c}d=!1}if(d)for(d={},e=e.split("*"),f=0;f<e.length;f+=2){var g=e[f];if(nc.test(g)){var k=Ob(String(e[f+1]));"undefined"!==typeof TextDecoder?k=(new TextDecoder("utf-8")).decode(k):(k=
Lb(new Uint8Array(k.buffer||k)),k=decodeURIComponent(escape(k)));d[g]=k}else A().error("amp-analytics/linker","Invalid linker key "+g+", value ignored")}else A().error("amp-analytics/linker","LINKER_PARAM value checksum not valid"),d=null}else d=null}else d=null;c[a]=d}return this.Aa[a]&&this.Aa[a][b]?this.Aa[a][b]:null};var sc=/^(?:([^\s]*)(\([^)]*\))|[^]+)$/,tc={1:"sufficient",2:"insufficient",3:"not_required",4:"unknown"};function P(a,b,c){this.vars=a;this.iterations=void 0===b?2:b;this.noEncode=!!c;this.freezeVars={}}P.prototype.freezeVar=function(a){this.freezeVars[a]=!0};P.prototype.getVar=function(a){a=this.vars[a];null==a&&(a="");return a};
function uc(a,b,c){b=Number(b);var d=a.length;D(qa(b),"Start index "+b+"in substr macro should be a number");c&&(d=Number(c),D(qa(d),"Length "+d+" in substr macro should be a number"));return a.substr(b,d)}function vc(a,b){return a&&a.length?a:b}function wc(a,b,c){b||A().warn("amp-analytics/variables","REPLACE macro must have two or more arguments");c||(c="");return a.replace(new RegExp(b,"g"),c)}
function xc(a,b,c){b||A().warn("amp-analytics/variables","MATCH macro must have two or more arguments");var d=0;c&&(d=parseInt(c,10),0!=d&&!d||0>d)&&(A().error("amp-analytics/variables","Third argument in MATCH macro must be a number >= 0"),d=0);return(a=a.match(new RegExp(b)))&&a[d]?a[d]:""}function yc(a,b){if(b)return(a.__AMP_EXPERIMENT_BRANCHES?a.__AMP_EXPERIMENT_BRANCHES[b]:null)||"";var c=Ta(a);return Object.keys(c).map(function(a){return a+":"+c[a]}).join(",")}
function zc(a){var b=this;this.m=a;this.ma=E({});this.cd=L(this.m.win,"amp-analytics-linker-reader");this.ma.$DEFAULT=vc;this.ma.$SUBSTR=uc;Q(this,"$TRIM",function(a){return a.trim()});Q(this,"$TOLOWERCASE",function(a){return a.toLowerCase()});Q(this,"$TOUPPERCASE",function(a){return a.toUpperCase()});Q(this,"$NOT",function(a){return String(!a)});Q(this,"$BASE64",function(a){return Qb(a)});Q(this,"$HASH",this.Zc.bind(this));Q(this,"$IF",function(a,b,e){return Ac(a)?b:e});this.ma.$REPLACE=wc;this.ma.$MATCH=
xc;Q(this,"$EQUALS",function(a,b){return a===b});Q(this,"LINKER_PARAM",function(a,d){return b.cd.get(a,d)});Q(this,"TIMEZONE_CODE",function(){var a="";"Intl"in b.m.win&&"DateTimeFormat"in b.m.win.Intl&&(a=(new b.m.win.Intl.DateTimeFormat).resolvedOptions().timeZone);return a});Q(this,"SCROLL_TOP",function(){return Math.round(O(b.m).getScrollTop())});Q(this,"SCROLL_LEFT",function(){return Math.round(O(b.m).getScrollLeft())});Q(this,"EXPERIMENT_BRANCHES",function(a){return yc(b.m.win,a)})}
zc.prototype.getMacros=function(a){var b=this,c={COOKIE:function(c){var d=b.m.win;return kc(d,a)?Rb(d,c):null},CONSENT_STATE:Bc(a)},d=jc(a)?{}:{FIRST_CONTENTFUL_PAINT:function(){return sb(b.m.win).getMetric("fcpv")},FIRST_VIEWPORT_READY:function(){return sb(b.m.win).getMetric("pc")},MAKE_BODY_VISIBLE:function(){return sb(b.m.win).getMetric("mbv")},LARGEST_CONTENTFUL_PAINT:function(){return sb(b.m.win).getMetric("lcpv")},FIRST_INPUT_DELAY:function(){return sb(b.m.win).getMetric("fid")},CUMULATIVE_LAYOUT_SHIFT:function(){return sb(b.m.win).getMetric("cls")}};
return Object.assign({},this.ma,c,d)};function Q(a,b,c){a.ma[b]=c}
zc.prototype.expandTemplate=function(a,b,c,d,e){var f=this;return Ea(a,function(a,k){if(0>b.iterations)return A().error("amp-analytics/variables","Maximum depth reached while expanding variables. Please ensure that the variables are not recursive."),a;if(!k)return"";var g=Cc(k);k=g.name;g=g.argList;if(b.freezeVars[k])return a;a=b.getVar(k);var n=N(c);if("string"==typeof a)a=Dc(f,a,b,c,n,d,e,g);else if(w(a)){for(k=0;k<a.length;k++)a[k]="string"==typeof a[k]?Dc(f,a[k],b,c,n,d,e):a[k];a=Promise.all(a)}return Promise.resolve(a).then(function(a){return b.noEncode?
a:Ec(a)})})};function Dc(a,b,c,d,e,f,g,k){return a.expandTemplate(b,new P(c.vars,c.iterations-1,!0),d,f,g).then(function(b){return e.expandStringAsync(k?b+k:b,f||a.getMacros(d),g)})}zc.prototype.Zc=function(a){return L(this.m.win,"crypto").sha384Base64(a)};function Ec(a){if(null==a)return"";if(w(a))return a.map(Ec).join(",");var b=Cc(String(a)),c=b.argList;return encodeURIComponent(b.name)+c}
function Cc(a){if(!a)return{name:"",argList:""};var b=a.match(sc);D(b,"Variable with invalid format found: "+a);return{name:b[1]||b[0],argList:b[2]||""}}function R(a){return M(a,"amp-analytics-variables")}function Bc(a){return lc(a).then(function(a){return a?tc[a]:null})}function Ac(a){return"false"!==a&&""!==a&&"0"!==a&&"null"!==a&&"NaN"!==a&&"undefined"!==a};function Fc(a){this.j=a;this.l=null;this.Sc=Ib||{};this.pb={};this.h={};this.pa={};this.V=!1;this.D=R(a)}h=Fc.prototype;h.loadConfig=function(){var a=this;this.l=this.j.ownerDocument.defaultView;this.V=this.j.hasAttribute("sandbox");return Promise.all([Gc(this),Hc(this)]).then(this.md.bind(this)).then(this.Nc.bind(this)).then(function(){return a.h})};
function Ic(a){var b=va.cdn;var c;if(c="bg"===a)c=self,c=!(!c.AMP_CONFIG||!c.AMP_CONFIG.canary);var d=c?".canary":"";return b+"/rtv/"+v().rtvVersion+"/v0/analytics-vendors/"+a+d+".json"}
function Hc(a){var b=a.j.getAttribute("type");if(!b)return q();var c=Ic(b),d=a.w();B().fine(d,"Fetching vendor config",c);return L(a.l,"xhr").fetchJson(c,{ampCors:!1}).then(function(a){return a.json()}).then(function(c){a.pb=c||{};B().fine(d,"Vendor config loaded for "+b,c)},function(a){A().error(d,"Error loading vendor config: ",c,a)})}
function Gc(a){var b=a.j.getAttribute("config");if(!b||a.V)return q();Pa(b,a.j);var c=a.w();B().fine(c,"Fetching remote config",b);var d={};a.j.hasAttribute("data-credentials")&&(d.credentials=a.j.getAttribute("data-credentials"));return N(a.j).expandUrlAsync(b,a.D.getMacros(a.j)).then(function(c){b=c;return L(a.l,"xhr").fetchJson(b,d)}).then(function(a){return a.json()}).then(function(d){a.pa=d;B().fine(c,"Remote config loaded",b)},function(a){A().error(c,"Error loading remote config: ",b,a)})}
h.md=function(){var a=(this.pb.configRewriter||{}).url,b=E({});if(this.j.CONFIG)var c=this.j.CONFIG;else{c={};var d=this.w();try{var e=this.j.children;if(1==e.length){var f=this.j;/^[\w-]+$/.test("script");var g=(void 0!==hb?hb:hb=ib(f))?f.querySelectorAll("> script".replace(/^|,/g,"$&:scope ")):ob(f,"> script");if(1!==g.length)throw Error("Found "+g.length+" <script> children. Expected 1.");var k=g[0];if("SCRIPT"!=k.tagName||!k.hasAttribute("type")||"APPLICATION/JSON"!=k.getAttribute("type").toUpperCase())throw Error('<script> child must have type="application/json"');
try{c=JSON.parse(k.textContent)}catch(n){throw Error("Failed to parse <script> contents. Is it valid JSON?");}}else 1<e.length&&A().error(d,"The tag should contain only one <script> child.")}catch(n){A().error(d,n.message)}}var l=c;this.j.getAttribute("type")&&(l.transport||this.pa.transport)&&(c=this.w(),A().error(c,"Inline or remote config should not overwrite vendor transport settings"));l.transport&&l.transport.iframe&&(A().error("amp-analytics/config","Inline configs are not allowed to specify transport iframe"),
l.transport.iframe=void 0);this.pa.transport&&this.pa.transport.iframe&&(A().error("amp-analytics/config","Remote configs are not allowed to specify transport iframe"),this.pa.transport.iframe=void 0);S(l,b);S(this.pa,b);return!a||this.V?(this.h=Jc(this,b),q()):Kc(this,b,a)};
function Kc(a,b,c){Pa(c,a.j);var d=a.w();B().fine(d,"Rewriting config",c);return Lc(a,b).then(function(){var e={method:"POST",body:b};a.j.hasAttribute("data-credentials")&&(e.credentials=a.j.getAttribute("data-credentials"));return N(a.j).expandUrlAsync(c).then(function(b){return L(a.l,"xhr").fetchJson(b,e)}).then(function(a){return a.json()}).then(function(b){a.h=Jc(a,b);B().fine(d,"Configuration re-written",c)},function(a){A().error(d,"Error rewriting configuration: ",c,a)})})}
h.Nc=function(){if(this.h.warningMessage){var a=this.w(),b=this.j.getAttribute("type"),c=this.j.getAttribute("config");A().warn(a,"Warning from analytics vendor%s%s: %s",b?" "+b:"",c?" with remote config url "+c:"",String(this.h.warningMessage));delete this.h.warningMessage}};
function Lc(a,b){var c=b.configRewriter,d=c&&c.varGroups,e=(a.pb.configRewriter||{}).varGroups;if(!d&&!e)return q();if(d&&!e){var f=a.w();A().warn(f,"This analytics provider does not currently support varGroups");return q()}b.configRewriter=b.configRewriter||{};var g=b.configRewriter;g.vars=E({});var k=[],l=d||{};Aa(l,e);Object.keys(l).forEach(function(b){var c=l[b];if(c.enabled){var d=a.shallowExpandObject(a.j,c).then(function(a){delete a.enabled;Object.assign(g.vars,a)});k.push(d)}});return Promise.all(k).then(function(){if(!Object.keys(g.vars).length)return delete b.configRewriter;
d&&delete g.varGroups})}function Jc(a,b){var c=E({vars:{requestCount:0}});S(Mc(a.Sc),c);S(Mc(a.pb),c,!0);S(Mc(b),c,!0);return c}h.w=function(){return"AmpAnalytics "+(this.j.getAttribute("id")||"<unknown id>")};h.shallowExpandObject=function(a,b){var c={},d=[],e=[],f=N(a),g=R(a).getMacros(a);Object.keys(b).forEach(function(a){d.push(a);var c=f.expandStringAsync(b[a],g);e.push(c)});return Promise.all(e).then(function(a){d.forEach(function(b,d){return c[b]=a[d]});return c})};
function S(a,b,c){if(null===b||void 0===b)b={};D(c||!a||!a.optout||"_gaUserPrefs.ioo"==a.optout||"__gaOptOutExtension"==a.optoutElementId,"optout property is only available to vendor config.");for(var d in a)D(c||"iframePing"!=d,"iframePing config is only available to vendor config."),F(a,d)&&(w(a[d])?(w(b[d])||(b[d]=[]),b[d]=S(a[d],b[d],c)):y(a[d])?(y(b[d])||(b[d]={}),b[d]=S(a[d],b[d],c)):b[d]=a[d]);return b}
function Mc(a){if(!a.requests)return a;for(var b in a.requests)if(F(a.requests,b)){var c=a.requests;var d=a.requests[b];d=y(d)?d:{baseUrl:d};c[b]=d}if(F(a,"requests")&&F(a,"requestOrigin")){b=a.requestOrigin;for(var e in a.requests)F(a.requests[e],"origin")||(a.requests[e].origin=b)}return a};function U(){this.H=null}h=U.prototype;h.add=function(a){var b=this;this.H||(this.H=[]);this.H.push(a);return function(){b.remove(a)}};h.remove=function(a){this.H&&(a=this.H.indexOf(a),-1<a&&this.H.splice(a,1))};h.removeAll=function(){this.H&&(this.H.length=0)};h.fire=function(a){if(this.H)for(var b=this.H,c=0;c<b.length;c++)(0,b[c])(a)};h.getHandlerCount=function(){return this.H?this.H.length:0};var Nc={ENDED:"video-ended",PAUSE:"video-pause",PLAY:"video-play",SESSION:"video-session",SESSION_VISIBLE:"video-session-visible",SECONDS_PLAYED:"video-seconds-played",CUSTOM:"video-hosted-custom",PERCENTAGE_PLAYED:"video-percentage-played",AD_START:"video-ad-start",AD_END:"video-ad-end"};var Oc=/^vars(.+)/;function Pc(){}
var sa={CLICK:"click",CUSTOM:"custom",HIDDEN:"hidden",INI_LOAD:"ini-load",RENDER_START:"render-start",SCROLL:"scroll",STORY:"story",TIMER:"timer",VIDEO:"video",VISIBLE:"visible"},V=["ampdoc","embed"],W={},Yc=Object.freeze((W.click={name:"click",allowedFor:V.concat(["timer"]),klass:function(a){return new Qc(a)}},W.custom={name:"custom",allowedFor:V.concat(["timer"]),klass:function(a){return new X(a)}},W.hidden={name:"visible",allowedFor:V.concat(["timer"]),klass:function(a){return new Rc(a)}},W["ini-load"]=
{name:"ini-load",allowedFor:V.concat(["timer","visible"]),klass:function(a){return new Sc(a)}},W["render-start"]={name:"render-start",allowedFor:V.concat(["timer","visible"]),klass:function(a){return new Tc(a)}},W.scroll={name:"scroll",allowedFor:V.concat(["timer"]),klass:function(a){return new Uc(a)}},W.story={name:"story",allowedFor:V,klass:function(a){return new Vc(a)}},W.timer={name:"timer",allowedFor:V,klass:function(a){return new Wc(a)}},W.video={name:"video",allowedFor:V.concat(["timer"]),
klass:function(a){return new Xc(a)}},W.visible={name:"visible",allowedFor:V.concat(["timer"]),klass:function(a){return new Rc(a)}},W));function Zc(a){return G(a,"video")?"video":G(a,"story")?"story":ra(a)?F(Yc,a)?Yc[a].name:a:"custom"}function $c(a){var b={};Object.keys(Yc).forEach(function(c){F(Yc,c)&&-1!=Yc[c].allowedFor.indexOf(a)&&(b[c]=Yc[c].klass)});return b}
function Y(a,b,c,d){c=void 0===c?{}:c;d=void 0===d?!0:d;var e=c,f=d;this.target=a;this.type=b;f?(a=pb(a,Oc),Aa(a,e,0)):a=e;this.vars=a}function Z(a){this.root=a}Z.prototype.dispose=function(){};Z.prototype.add=function(){};function X(a){this.root=a;var b=this;this.N={};this.C={};this.fa={};setTimeout(function(){b.C=void 0},1E4)}m(X,Z);X.prototype.dispose=function(){this.fa=this.C=void 0;for(var a in this.N)this.N[a].removeAll()};
X.prototype.add=function(a,b,c,d){var e=this,f=c.selector;f||(f=":root");var g=this.root.getElement(a,f,c.selectionMethod||null),k=G(b,"sandbox-"),l=k?this.fa&&this.fa[b]:this.C&&this.C[b];if(l){var n=l.length;g.then(function(a){setTimeout(function(){for(var c=0;c<n;c++){var f=l[c];a.contains(f.target)&&d(f)}k&&(e.fa[b]=void 0)},1)})}var p=this.N[b];p||(p=new U,this.N[b]=p);return this.N[b].add(function(a){g.then(function(b){b.contains(a.target)&&d(a)})})};
X.prototype.trigger=function(a){var b=a.type,c=G(b,"sandbox-"),d=this.N[b];if(d&&(d.fire(a),c))return;c?(this.fa[b]=this.fa[b]||[],this.fa[b].push(a)):this.C&&(this.C[b]=this.C[b]||[],this.C[b].push(a))};function Vc(a){X.call(this,a)}m(Vc,X);Vc.prototype.add=function(a,b,c,d){var e=this.root.getRootElement();if(a=this.C&&this.C[b])for(var f=a.length,g=0;g<f;g++)ad(a[g],e,c,d);a=this.N[b];a||(a=new U,this.N[b]=a);return this.N[b].add(function(a){ad(a,e,c,d)})};
function ad(a,b,c,d){var e=a.type;a=a.vars;var f=c.storySpec||{},g=void 0===f.repeat?!0:f.repeat,k=a.eventDetails;(c=c.tagName)&&k.tagName&&c.toLowerCase()!==k.tagName||!1===g&&k.repeated||d(new Y(b,e,a))}Vc.prototype.trigger=function(a){var b=a.type,c=this.N[b];c&&c.fire(a);this.C&&(this.C[b]=this.C[b]||[],this.C[b].push(a))};function Qc(a){this.root=a;this.Qa=new U;this.Wb=this.Qa.fire.bind(this.Qa);this.root.getRoot().addEventListener("click",this.Wb)}m(Qc,Z);
Qc.prototype.dispose=function(){this.root.getRoot().removeEventListener("click",this.Wb);this.Qa.removeAll()};Qc.prototype.add=function(a,b,c,d){b=D(c.selector,"Missing required selector on click trigger");c=c.selectionMethod||null;return this.Qa.add(this.root.createSelectiveListener(this.Vc.bind(this,d),a.parentElement||a,b,c))};Qc.prototype.Vc=function(a,b){a(new Y(b,"click"))};function Uc(a){this.F=this.root=a;this.wa=null}m(Uc,Z);
Uc.prototype.dispose=function(){null!==this.wa&&(this.F.getScrollManager().removeScrollHandler(this.wa),this.wa=null)};
Uc.prototype.add=function(a,b,c,d){if(!c.scrollSpec)return A().error("amp-analytics/events","Missing scrollSpec on scroll trigger."),Pc;if(!Array.isArray(c.scrollSpec.verticalBoundaries)&&!Array.isArray(c.scrollSpec.horizontalBoundaries))return A().error("amp-analytics/events","Boundaries are required for the scroll trigger to work."),Pc;var e=bd(c.scrollSpec.verticalBoundaries),f=bd(c.scrollSpec.horizontalBoundaries);this.wa=this.od.bind(this,f,e,!!c.scrollSpec.useInitialPageSize,d);return this.F.getScrollManager().addScrollHandler(this.wa)};
Uc.prototype.od=function(a,b,c,d,e){c=c?e.initialSize:e;var f=c.scrollWidth;cd(this,b,100*(e.top+e.height)/c.scrollHeight,"verticalScrollBoundary",d);cd(this,a,100*(e.left+e.width)/f,"horizontalScrollBoundary",d)};function bd(a){var b=E({});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)){A().error("amp-analytics/events","Scroll trigger boundaries must be finite.");break}d=Math.min(5*Math.round(d/5),100);b[d]=!1}return b}
function cd(a,b,c,d,e){if(c)for(var f in b)if(F(b,f)){var g=parseInt(f,10);g>c||b[g]||(b[g]=!0,g={},g[d]=f,e(new Y(a.F.getRootElement(),"scroll",g,!1)))}}function Tc(a){this.root=a}m(Tc,Z);Tc.prototype.dispose=function(){};
Tc.prototype.add=function(a,b,c,d){var e=this,f=c.selector||":root";if(":root"==f||":host"==f){var g=this.root.getRootElement();var k=this.getRootSignal(b)}else k=this.root.getAmpElement(a.parentElement||a,f,c.selectionMethod).then(function(a){g=a;return e.getElementSignal(b,g)});k.then(function(){d(new Y(g,b))});return Pc};Tc.prototype.getRootSignal=function(a){return this.root.signals().whenSignal(a)};Tc.prototype.getElementSignal=function(a,b){return"function"!=typeof b.signals?q():b.signals().whenSignal(a)};
function Sc(a){this.root=a}m(Sc,Z);Sc.prototype.dispose=function(){};Sc.prototype.add=function(a,b,c,d){var e=this,f=c.selector||":root";if(":root"==f||":host"==f){var g=this.root.getRootElement();a=this.getRootSignal()}else a=this.root.getAmpElement(a.parentElement||a,f,c.selectionMethod).then(function(a){g=a;return e.getElementSignal("ini-load",g)});a.then(function(){d(new Y(g,b))});return Pc};Sc.prototype.getRootSignal=function(){return this.root.whenIniLoaded()};
Sc.prototype.getElementSignal=function(a,b){if("function"!=typeof b.signals)return q();var c=b.signals();return Promise.race([c.whenSignal("ini-load"),c.whenSignal("load-end")])};
function dd(a,b,c){this.cb=void 0;D("interval"in a,"Timer interval specification required");this.mc=Number(a.interval)||0;D(.5<=this.mc,"Bad timer interval specification");this.pc="maxTimerLength"in a?Number(a.maxTimerLength):7200;D(0<this.pc,"Bad maxTimerLength specification");this.ed="maxTimerLength"in a;this.Lc="immediate"in a?!!a.immediate:!0;this.ga=this.Z=this.Bb=null;this.Ha=b||null;this.nb=c||null;this.fb=this.X=void 0}h=dd.prototype;
h.init=function(a){this.Ha?this.Ha&&(this.Z=this.Ha()):a()};h.dispose=function(){this.ga&&(this.ga(),this.ga=null);this.Z&&(this.Z(),this.Z=null)};h.isRunning=function(){return!!this.cb};
h.startIntervalInWindow=function(a,b,c){if(!this.isRunning()&&(this.X=Date.now(),this.fb=void 0,this.Bb=b,this.cb=a.setInterval(function(){b()},1E3*this.mc),(!this.nb||this.nb&&this.ed)&&a.setTimeout(function(){c()},1E3*this.pc),this.Z&&(this.Z(),this.Z=null),this.Lc&&b(),this.nb))try{this.ga=this.nb()}catch(d){throw this.dispose(),d;}};h.ob=function(a){this.isRunning()&&(this.Bb(),this.Bb=null,a.clearInterval(this.cb),this.fb=this.cb=void 0,this.ga&&(this.ga(),this.ga=null),this.Ha&&(this.Z=this.Ha()))};
h.getTimerVars=function(){var a=0;this.isRunning()&&(a=this.X?Date.now()-(this.fb||this.X):0,this.fb=Date.now());return E({timerDuration:a,timerStart:this.X||0})};function Wc(a){this.root=a;this.B={};this.sd=1}m(Wc,Z);h=Wc.prototype;h.getTrackedTimerKeys=function(){return Object.keys(this.B)};h.dispose=function(){var a=this;this.getTrackedTimerKeys().forEach(function(b){a.Ib(b)})};
h.add=function(a,b,c,d){var e=this;c=c.timerSpec;D(c&&"object"==typeof c,"Bad timer specification");var f="startSpec"in c?c.startSpec:null;D(!f||"object"==typeof f,"Bad timer start specification");var g="stopSpec"in c?c.stopSpec:null;D(!f&&!g||"object"==typeof g,"Bad timer stop specification");var k=++this.sd;if(f){var l=ed(this,f);D(l,"Cannot track timer start");var n=l.add.bind(l,a,f.on,f,this.fc.bind(this,k,b,d))}if(g){var p=ed(this,g);D(p,"Cannot track timer stop");var r=p.add.bind(p,a,g.on,g,
this.fc.bind(this,k,b,d))}var x=new dd(c,n,r);this.B[k]=x;x.init(this.Ac.bind(this,k,b,d));return function(){e.Ib(k)}};function ed(a,b){b=A().assertString(b.on);var c=Zc(b);return a.root.getTrackerForAllowlist(c,$c("timer"))}h.fc=function(a,b,c){var d=this.B[a];d&&(d.isRunning()?this.ob(a):this.Ac(a,b,c))};h.Ac=function(a,b,c){var d=this;this.B[a].startIntervalInWindow(this.root.ampdoc.win,function(){var e=new Y(d.root.getRootElement(),b,d.B[a].getTimerVars(),!1);c(e)},this.Ib.bind(this,a))};
h.ob=function(a){this.B[a].ob(this.root.ampdoc.win)};h.Ib=function(a){this.B[a]&&(this.ob(a),this.B[a].dispose(),delete this.B[a])};function Xc(a){this.root=a;var b=this;this.mb=new U;this.wb=this.mb.fire.bind(this.mb);Object.keys(Nc).forEach(function(a){b.root.getRoot().addEventListener(Nc[a],b.wb)})}m(Xc,Z);Xc.prototype.dispose=function(){var a=this,b=this.root.getRoot();Object.keys(Nc).forEach(function(c){b.removeEventListener(Nc[c],a.wb)});this.mb=this.wb=null};
Xc.prototype.add=function(a,b,c,d){var e=c.videoSpec||{},f=this.root.getElement(a,c.selector||e.selector,c.selectionMethod||null),g=e["end-session-when-invisible"],k=e["exclude-autoplay"],l=e.interval,n=e.percentages,p=c.on,r=0,x=0;return this.mb.add(function(a){var b=a.type,c=a.data,e="video-session-visible"==b?"video-session":"video-hosted-custom"==b?c["__amp:eventType"]:b;if(e===p)if("video-seconds-played"!==e||l){if("video-seconds-played"===e&&(r++,0!==r%l))return;if("video-percentage-played"===
e){if(!n){A().error("amp-analytics/events","video-percentage-played requires percentages spec.");return}for(var C=0;C<n.length;C++){var Wa=n[C];if(0>=Wa||0!=Wa%5){A().error("amp-analytics/events","Percentages must be set in increments of %s with non-zero values",5);return}}var Xa=parseInt(c.normalizedPercentage,10);qa(Xa);if(x==Xa||0>n.indexOf(Xa))return;x=Xa}if("video-session-visible"!==b||g)if(!k||"playing_auto"!==c.state){var le=a.target;f.then(function(a){if(a.contains(le)){if(c){var b=Object.assign({},
c);delete b["__amp:eventType"]}else b={};d(new Y(a,e,b))}})}}else A().error("amp-analytics/events","video-seconds-played requires interval spec with non-zero value")})};function Rc(a){this.root=a;this.Ec={}}m(Rc,Z);h=Rc.prototype;h.dispose=function(){};
h.add=function(a,b,c,d){var e=this,f=c.visibilitySpec||{},g=c.selector||f.selector,k=f.waitFor,l=f.reportWhen,n=null;l&&D(!f.repeat,"reportWhen and repeat are mutually exclusive.");"hidden"===b&&(l&&A().error("amp-analytics/events",'ReportWhen should not be defined when eventType is "hidden"'),l="documentHidden");var p=this.root.getVisibilityManager();"documentHidden"==l?n=this.Pc.bind(this):"documentExit"==l?n=this.Oc.bind(this):D(!l,'reportWhen value "%s" not supported.',l);if(!g||":root"==g||":host"==
g)return p.listenRoot(f,this.getReadyPromise(k||(g?"ini-load":"none")),n,this.qc.bind(this,b,d,this.root.getRootElement()));c=c.selectionMethod||f.selectionMethod;fd(g);var r=this.root.getElements(a.parentElement||a,g,c).then(function(a){for(var c=[],g=0;g<a.length;g++)c.push(p.listenElement(a[g],f,e.getReadyPromise(k,a[g]),n,e.qc.bind(e,b,d,a[g])));return c});return function(){r.then(function(a){for(var b=0;b<a.length;b++)a[b]()})}};
function fd(a){if(w(a))for(var b={},c=0;c<a.length;c++)D(!b[a[c]],"Cannot have duplicate selectors in selectors list: %s",a),b[a[c]]=a[c]}h.Pc=function(){var a=this.root.ampdoc;return a.isVisible()?new Promise(function(b){a.onVisibilityChanged(function(){a.isVisible()||b()})}):q()};
h.Oc=function(){var a=new t,b=this.root.ampdoc.win,c,d;"onpagehide"in this.root.ampdoc.win||b.addEventListener("unload",c=function(){b.removeEventListener("unload",c);a.resolve()});b.addEventListener("pagehide",d=function(){b.removeEventListener("pagehide",d);a.resolve()});return a.promise};
h.getReadyPromise=function(a,b){if(b){var c=b.tagName;G(c,"AMP-")&&"AMP-STICKY-AD-TOP-PADDING"!=c&&"AMP-BODY"!=c?a=a||"ini-load":D(!a||"none"==a,"waitFor for non-AMP elements must be none or null. Found %s",a)}if(!a||"none"==a)return null;var d=$c("visible");D(void 0!==d[a],"waitFor value %s not supported",a);var e=this.Ec[a]||this.root.getTrackerForAllowlist(a,d);if(e)this.Ec[a]=e;else return null;return b?e.getElementSignal(a,b):e.getRootSignal(a)};
h.qc=function(a,b,c,d){var e=pb(c,Oc),f;for(f in e)d[f]=e[f];b(new Y(c,a,d,!1))};var gd=!1;function hd(){this.I=[]}hd.prototype.peek=function(){var a=this.I.length;return a?this.I[a-1].item:null};hd.prototype.enqueue=function(a,b){if(isNaN(b))throw Error("Priority must not be NaN.");for(var c=-1,d=0,e=this.I.length;d<=e;){c=Math.floor((d+e)/2);if(c===this.I.length)break;if(this.I[c].priority<b)d=c+1;else if(0<c&&this.I[c-1].priority>=b)e=c-1;else break}this.I.splice(c,0,{item:a,priority:b})};hd.prototype.forEach=function(a){for(var b=this.I.length;b--;)a(this.I[b].item)};
hd.prototype.dequeue=function(){return this.I.length?this.I.pop().item:null};ca.Object.defineProperties(hd.prototype,{length:{configurable:!0,enumerable:!0,get:function(){return this.I.length}}});var id=/nochunking=1/.test(self.location.hash),jd=q();function kd(a,b,c){if(id)jd.then(b);else{var d=ld,e=J(a),f=K(e);eb(f,e,"chunk",d);M(a,"chunk").run(b,c)}}function md(a){this.state="not_run";this.zb=a}function nd(a,b){if("run"!=a.state){a.state="run";try{a.zb(b)}catch(c){throw a.rc(),c;}}}md.prototype.w=function(){return this.zb.displayName||this.zb.name};md.prototype.rc=function(){};md.prototype.ic=function(){return!1};md.prototype.Cc=function(){return!1};
function od(a,b,c){md.call(this,a);this.Zb=c}m(od,md);
od.prototype.rc=function(){var a=self.document;if(!gd){gd=!0;a=a.body;var b={opacity:1,visibility:"visible",animation:"none"},c;for(c in b){var d=a,e=b[c];var f=d.style;var g=c;if(G(g,"--"))f=g;else{Zb||(Zb=Object.create(null));var k=Zb[g];if(!k){k=g;if(void 0===f[g]){var l=g;l=l.charAt(0).toUpperCase()+l.slice(1);b:{for(var n=0;n<$b.length;n++){var p=$b[n]+l;if(void 0!==f[p]){l=p;break b}}l=""}void 0!==f[l]&&(k=l)}Zb[g]=k}f=k}f&&(G(f,"--")?d.style.setProperty(f,e):d.style[f]=e)}}};
od.prototype.ic=function(){return this.Zb.ampdoc.isVisible()};od.prototype.Cc=function(){return this.Zb.ac};
function ld(a){var b=this;this.ampdoc=a;this.l=a.win;this.ra=new hd;this.Ub=this.cc.bind(this);this.ka=0;this.rd=!(!this.l.navigator.scheduling||!this.l.navigator.scheduling.isInputPending);this.lb=!1;this.Gc=this.l.document.documentElement.hasAttribute("i-amphtml-no-boilerplate");this.l.addEventListener("message",function(a){"amp-macro-task"==a.data&&b.cc(null)});this.ac=!1;fb(K(a),"viewer").then(function(){b.ac=!0});a.onVisibilityChanged(function(){a.isVisible()&&pd(b)})}
ld.prototype.run=function(a,b){var c=new md(a);this.ra.enqueue(c,b);pd(this)};ld.prototype.runForStartup=function(a){a=new od(a,this.l,this);this.ra.enqueue(a,Number.POSITIVE_INFINITY);pd(this)};function qd(a,b){for(var c=a.ra.peek();c&&"not_run"!==c.state;)a.ra.dequeue(),c=a.ra.peek();c&&b&&a.ra.dequeue();return c}
ld.prototype.cc=function(a){var b=this,c=qd(this,!0);if(!c)return this.lb=!1,this.ka=0,!1;try{var d=Date.now();nd(c,a)}finally{jd.then().then().then().then().then().then().then().then().then(function(){b.lb=!1;b.ka+=Date.now()-d;B().fine("CHUNK",c.w(),"Chunk duration",Date.now()-d,b.ka);pd(b)})}return!0};function rd(a){a.Gc&&(a.rd?a.l.navigator.scheduling.isInputPending():5<a.ka)?(a.ka=0,sd(a)):jd.then(function(){a.Ub(null)})}
function pd(a){if(!a.lb){var b=qd(a);b&&(b.ic()?(a.lb=!0,rd(a)):b.Cc()&&a.l.requestIdleCallback?td(a.l,a.Ub):sd(a))}}function sd(a){a.l.postMessage("amp-macro-task","*")}
function td(a,b){function c(e){if(15>e.timeRemaining()){var f=2E3-(Date.now()-d);0>=f||e.didTimeout?(B().fine("CHUNK","Timed out",2E3,e.didTimeout),b(e)):(B().fine("CHUNK","Rescheduling with",f,e.timeRemaining()),a.requestIdleCallback(c,{timeout:f}))}else B().fine("CHUNK","Running idle callback with ",15),b(e)}var d=Date.now();a.requestIdleCallback(c,{timeout:2E3})};function ud(a,b){this.F=a;this.Sb=b;this.oc=[];this.Ob=0;this.l=b.ownerDocument.defaultView}ud.prototype.dispose=function(){this.oc.forEach(function(a){a()})};ud.prototype.addTrigger=function(a,b){function c(){l=k.add(d.Sb,e,a,b);d.oc.push(l);n.resolve()}var d=this,e=a.on,f=Zc(e),g=$c(this.F.getType()),k=this.F.getTrackerForAllowlist(f,g);D(!!k,'Trigger type "%s" is not allowed in the %s',e,this.F.getType());var l,n=new t;1>this.Ob||!vd(this.l)?c():kd(this.Sb,c,3>this.Ob?20:10);this.Ob++;return n.promise};
function vd(a){return"inabox"==v(a).runtime?!!Ra(a)["analytics-chunks-inabox"]:!!Ra(a)["analytics-chunks"]};var wd={referrerDomains:!0,enabled:!0,cookiePath:!0,cookieMaxAge:!0,cookieSecure:!0,cookieDomain:!0};function xd(a,b,c){this.l=a;this.j=b;this.Ja=N(b);this.qb=null;this.h=c;this.Fc=R(b).getMacros(b)}xd.prototype.write=function(){var a=this;if(!this.qb){this.qb=new t;var b=function(){a.qb.resolve(yd(a))};vd(this.l)?kd(this.j,b,10):b()}return this.qb.promise};
function yd(a){if(!kc(a.l,a.j)||!F(a.h,"cookies"))return q();if(!y(a.h.cookies))return A().error("amp-analytics/cookie-writer","cookies config must be an object"),q();var b=a.h.cookies;if(!1===b.enabled)return q();var c;F(b,"cookieMaxAge")?(c=Number(b.cookieMaxAge))||0===c?(0>=c&&A().warn("amp-analytics/cookie-writer","cookieMaxAge %s less than or equal to 0, cookie will immediately expire",b.cookieMaxAge),c*=1E3):(A().error("amp-analytics/cookie-writer","invalid cookieMaxAge %s, falling back to default value (1 year)",
b.cookieMaxAge),c=31536E6):c=31536E6;var d=c;c=Object.keys(b);for(var e=[],f=0;f<c.length;f++){var g=c[f],k=b[g];var l=k;wd[g]?l=!1:y(l)?F(l,"value")?l=!0:(A().error("amp-analytics/cookie-writer","value is required in the cookieValue object"),l=!1):(A().error("amp-analytics/cookie-writer","cookieValue must be configured in an object"),l=!1);l&&e.push(zd(a,g,k.value,d))}return Promise.all(e)}
function zd(a,b,c,d){return a.Ja.expandStringAsync(c,a.Fc).then(function(c){if(c){var e=Date.now()+d,g=a.l,k={highestAvailableDomain:!0};k=void 0===k?{}:k;if(k.allowOnProxyOrigin)D(!k.highestAvailableDomain,"Could not support highestAvailable Domain on proxy origin, specify domain explicitly");else{D(!Qa(g.location.href),"Should never attempt to set cookie on proxy origin: "+b);var l=H(g.location.href).hostname.toLowerCase(),n=H(va.cdn).hostname.toLowerCase();D(!(l==n||Ca(l,"."+n)),"Should never attempt to set cookie on proxy origin. (in depth check): "+
b)}l=void 0;k.domain?l=k.domain:k.highestAvailableDomain&&(l=Tb(g));Ub(g,b,c,e,l,k.sameSite,k.secure)}}).catch(function(a){A().error("amp-analytics/cookie-writer","Error expanding cookie string",a)})};function Ad(a){this.R=O(a.ampdoc);this.fd=M(a.ampdoc,"mutator");this.ia=null;this.qa=new U;this.F=a.getRootElement();this.bb=null}Ad.prototype.dispose=function(){this.qa.removeAll();this.ia&&(this.ia(),this.ia=null)};Ad.prototype.removeScrollHandler=function(a){this.qa.remove(a);0>=this.qa.getHandlerCount()&&this.ia&&(this.ia(),this.ia=null)};
Ad.prototype.addScrollHandler=function(a){var b=this,c=this.R.getSize();(this.bb||Bd(this)).then(function(d){var e=d.top,f=d.left,g=d.width,k=d.height,l={top:b.R.getScrollTop()-e,left:b.R.getScrollLeft()-f,width:c.width,height:c.height,scrollHeight:k,scrollWidth:g,initialSize:{scrollHeight:k,scrollWidth:g}};a(l)});0===this.qa.getHandlerCount()&&(this.ia=this.R.onChanged(this.jd.bind(this)));return this.qa.add(a)};
Ad.prototype.jd=function(a){var b=this;return Promise.all([this.bb||Bd(this),Bd(this)]).then(function(c){var d=c[0],e=c[1];b.qa.fire({top:a.top-e.top,left:a.left-e.left,width:a.width,height:a.height,scrollWidth:e.width,scrollHeight:e.height,initialSize:{scrollHeight:d.height,scrollWidth:d.width}})})};function Bd(a){var b=a.fd.measureElement(function(){return a.R.getLayoutRect(a.F)});a.bb=a.bb||b;return b};function Cd(a,b,c,d){return{left:a,top:b,width:c,height:d,bottom:b+d,right:a+c,x:a,y:b}}function Dd(a,b,c){c={top:c,bottom:c+b.getHeight(),left:0,right:b.getWidth()};c=Cd(Number(c.left),Number(c.top),Number(c.width),Number(c.height));return a.top<=c.bottom&&c.top<=a.bottom&&a.left<=c.right&&c.left<=a.right?"inside":a.top<c.top?"top":a.bottom>c.bottom?"bottom":"inside"};function Ed(){}Ed.prototype.generateRequest=function(a,b,c){return(c=void 0===c?!1:c)?{url:a.replace("${extraUrlParams}",""),payload:JSON.stringify(b.extraUrlParams)}:{url:Fd(a,[b])}};Ed.prototype.generateBatchRequest=function(a,b,c){return(void 0===c?0:c)?{url:a.replace("${extraUrlParams}",""),payload:JSON.stringify(b.map(function(a){return a.extraUrlParams}))}:{url:Fd(a,b)}};var Gd={"default":new Ed};
function Fd(a,b){var c=b.map(function(a){return Oa(a.extraUrlParams)}).filter(function(a){return!!a}).join("&");return 0<=a.indexOf("${extraUrlParams}")?a.replace("${extraUrlParams}",c):Na(a,c)};var Hd={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,
FIRST_VIEWPORT_READY:!0,MAKE_BODY_VISIBLE:!0};function Id(a){return new Promise(function(b){setTimeout(function(){return b(a())})})}
function Jd(a){return y(a.resources)?a.encoding&&a.encoding.entry&&a.encoding.delim?2>a.encoding.base||36<a.encoding.base?(A().warn("ANALYTICS","resource timing variables only supports bases between 2 and 36"),!1):null!=a.responseAfter&&"number"!=typeof a.responseAfter?(A().warn("ANALYTICS",'resourceTimingSpec["responseAfter"] must be a number'),!1):!0:(A().warn("ANALYTICS","resourceTimingSpec is missing or has incomplete encoding options"),!1):(A().warn("ANALYTICS",'resourceTimingSpec missing "resources" field'),
!1)}function Kd(a,b){var c=a.name;for(a=0;a<b.length;++a){var d=b[a],e=d.resources;if(d.hostPattern.test(c.host)&&(d=Yb(e,function(a){return a.pathPattern.test(c.pathname)&&a.queryPattern.test(c.search)}),-1!=d))return e[d].name}return null}
function Ld(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=[],g;for(g in b)f.push(b[g]);return f}function Md(a,b){var c=Ld(b),d=[];a.forEach(function(a){var b=Kd(a,c);b&&d.push({entry:a,name:b})});return d}
function Nd(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,g=R(c);a=Md(a,e).map(function(a){var b=a.entry;b={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||0),
encodedBodySize:d(b.encodedBodySize||0),decodedBodySize:d(b.decodedBodySize||0),duration:d(b.duration),initiatorType:b.initiatorType};return new P(b,1)}).map(function(a){return g.expandTemplate(f.entry,a,c)});return Promise.all(a).then(function(a){return a.join(f.delim)})}
function Od(a,b){var c=a.getAmpDoc().win;if(b.done||!c.performance||!c.performance.now||!c.performance.getEntriesByType||!Jd(b))return b.done=!0,Promise.resolve("");var d=c.performance.getEntriesByType("resource");150<=d.length&&(b.done=!0);var e=b.responseAfter||0;b.responseAfter=Math.max(e,c.performance.now());d=d.filter(function(a){return a.startTime+a.duration>=e});return d.length?Id(function(){return Nd(d,b,a)}):Promise.resolve("")}
function Pd(a,b,c){return b&&Date.now()<c+6E4?Od(a,b):Promise.resolve("")};function Qd(a,b,c,d,e){this.j=a;this.m=a.getAmpDoc();this.win=this.m.win;this.xc=b.origin;this.baseUrl=b.baseUrl;this.A=b.batchInterval;this.wc=Number(b.reportWindow)||null;this.ub=null;this.D=R(a);this.Ja=N(a);this.ta=Ya(a,"url");this.Kb=this.Oa=this.Na=null;this.vb=[];this.ld=c;this.Y=d;this.ua=e?Hd:void 0;this.hb=this.aa=null;this.vc=!0;this.Fb=null;this.Ea=0;this.X=Date.now();this.Ta=null;Rd(this);if(this.A){this.A=w(this.A)?this.A:[this.A];for(a=0;a<this.A.length;a++)b=this.A[a],D(qa(b),"Invalid batchInterval value: %s",
this.A),b=1E3*Number(b),D(200<=b,"Invalid batchInterval value: %s, interval value must be greater than %s ms.",this.A,200),this.A[a]=b;this.ub=0;Sd(this)}}
Qd.prototype.send=function(a,b,c){var d=this,e=!0===b.important;if(this.vc||e){c.getVar("_avError_")&&(this.Ta=c.getVar("_avError_"),delete c.vars._avError_);this.Ea++;this.Fb=b;var f=this.D.getMacros(this.j);f.RESOURCE_TIMING=Pd(this.j,b.resourceTimingSpec,this.X);this.Na||(c.freezeVar("extraUrlParams"),this.Oa=this.D.expandTemplate(this.baseUrl,c,this.j,f,this.ua),this.Na=this.Oa.then(function(a){return d.Ja.expandUrlAsync(a,f,d.ua)}));if(!this.Kb&&this.xc){var g=new P(c.vars,c.iterations,!0);this.Kb=
this.D.expandTemplate(this.xc,g,this.j,f,this.ua).then(function(a){return d.Ja.expandUrlAsync(a,f,d.ua,!0)})}var k=Object.assign({},a,b.extraUrlParams),l=this.win.Date.now(),n=Td(this.D,this.Ja,k,c,f,this.j,this.ua).then(function(a){return E({trigger:b.on,timestamp:l,extraUrlParams:a})});this.vb.push(n);0==this.Ea||!e&&this.A||Ud(this)}};Qd.prototype.dispose=function(){this.ib();this.aa&&(this.win.clearTimeout(this.aa),this.aa=null);this.hb&&(this.win.clearTimeout(this.hb),this.hb=null)};
function Ud(a){var b=a.Kb,c=a.Oa,d=a.Na,e=a.vb,f=a.Fb;a.ib();(b?b:c).then(function(b){a.ld.url(a.m,b,!0)});Promise.all([d,Promise.all(e),b]).then(function(b){var c=b[0];var d=b[2];c=d?a.ta.parse(d).origin+c:c;b=b[1];if(0!==b.length){if(a.Ta){try{a:{var e=a.Ta;if(y(e)){var g=H(c);if("pagead2.googlesyndication.com"==g.hostname){var r=u(g.search);if("ampim"==r.id){var x=r.d&&r.d.split(","),C=r.bs&&r.bs.split(",");if(w(x)){var T=Number(x[0]),ja=Number(x[1]);if(0==T||0==ja){if(.1<Math.random())break a;
B().expectedError("active-view-debug","Debugging: Activeview request with zero element size",T,ja,c,JSON.stringify(e))}}if(w(C)){var Ua=Number(C[0]),Va=Number(C[1]);0!=Ua&&0!=Va||.1<Math.random()||B().expectedError("active-view-debug","Debugging: Activeview request with zero viewport size",Ua,Va,c,JSON.stringify(e))}}}}}}catch(Wa){B().error("active-view-debug",Wa)}a.Ta=null}f.iframePing?(D("visible"==f.on,"iframePing is only available on page view requests."),a.Y.sendRequestUsingIframe(c,b[0])):a.Y.sendRequest(c,
b,!!a.A)}})}Qd.prototype.ib=function(){this.Ea=0;this.Oa=this.Na=null;this.vb=[];this.Fb=null};function Rd(a){a.wc&&(a.hb=a.win.setTimeout(function(){0!=a.Ea&&Ud(a);a.vc=!1;a.aa&&(a.win.clearTimeout(a.aa),a.aa=null)},1E3*a.wc))}function Sd(a){var b=a.ub<a.A.length?a.A[a.ub++]:a.A[a.A.length-1];a.aa=a.win.setTimeout(function(){0!=a.Ea&&Ud(a);Sd(a)},b)}
function Vd(a,b,c,d,e,f){var g=R(a),k=N(f),l=g.getMacros(f);e.freezeVar("extraUrlParams");var n=g.expandTemplate(b,e,f).then(function(a){return k.expandStringAsync(a,l)});return 0>b.indexOf("${extraUrlParams}")?n:n.then(function(a){var b=Object.assign({},c,d.extraUrlParams);return Td(g,k,b,e,l,f).then(function(b){return Fd(a,[E({extraUrlParams:b})])})})}
function Td(a,b,c,d,e,f,g){function k(c,d,l){c=c[d];if("string"===typeof c)l[d]=void 0,c=a.expandTemplate(c,p,f).then(function(a){return b.expandStringAsync(a,e,g)}).then(function(a){l[d]=a}),n.push(c);else if(w(c)){l[d]=[];for(var r=0;r<c.length;r++)k(c,r,l[d])}else if(y(c)&&null!==c){l[d]={};var x=Object.keys(c);for(r=0;r<x.length;r++)k(c,x[r],l[d])}else l[d]=c}var l={},n=[],p=new P(d.vars,d.iterations,!0),r=Object.keys(c);for(d=0;d<r.length;d++)k(c,r[d],l);return Promise.all(n).then(function(){return l})}
;function Wd(a,b,c,d,e){var f=this;c=void 0===c?null:c;d=void 0===d?null:d;e=void 0===e?null:e;var g=c,k=d,l=e;this.Kc=b;this.Yb=g;this.Xb=k;this.Dc=l;this.Sa=E({});this.M=E({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.M.visiblePercentageMax=0);this.$c=void 0!==a.reportWhen;this.uc=!0===a.repeat;this.ea=new U;a=new t;this.Ua=a.promise;this.la=a.resolve;this.Ua.then(function(){f.ea.fire()});this.ha=[];this.Qc=Date.now();this.Jb=this.sc=!0;this.J=this.Ra=null;this.yb=this.na=!1;this.kc=this.ya=this.Ba=this.Ca=this.Gb=this.gb=this.Xa=this.Eb=this.Wa=this.O=this.W=this.T=0;this.Qb=this.jc=!1;this.kb=null}h=Wd.prototype;
h.ib=function(){var a=this,b=new t;this.Ua=b.promise;this.la=b.resolve;this.Ua.then(function(){a.ea.fire()});this.kb=null;this.na=this.yb=!1;this.ya=this.Ba=this.Ca=this.gb=this.Eb=this.Wa=this.Xa=this.O=this.W=this.T=0;this.Qb=!1};h.maybeDispose=function(){this.uc||this.dispose()};h.dispose=function(){this.J&&(clearTimeout(this.J),this.J=null);this.kb&&(clearTimeout(this.kb),this.kb=null);this.ha.forEach(function(a){a()});this.ha.length=0;this.la=null;this.ea&&(this.ea.removeAll(),this.ea=null)};
h.unsubscribe=function(a){this.ha.push(a)};h.onTriggerEvent=function(a){this.ea&&this.ea.add(a);this.Ua&&!this.la&&a()};h.setReady=function(a){this.sc=a;this.update()};h.setReportReady=function(a){this.Jb=!1;this.Ra=a};h.update=function(){Xd(this,this.sc?this.Kc():0)};
h.getState=function(a){return E({firstSeenTime:Yd(this.Wa,a),lastSeenTime:Yd(this.Eb,a),lastVisibleTime:Yd(this.gb,a),firstVisibleTime:Yd(this.Xa,a),maxContinuousVisibleTime:this.W,totalVisibleTime:this.O,loadTimeVisibility:100*this.Gb||0,minVisiblePercentage:100*this.Ca,maxVisiblePercentage:100*this.Ba})};h.getErrorInfoTemp=function(){return this.Sa};
function Xd(a,b){if(a.Qb)Zd(a,b)||a.ib();else if(a.la)if($d(a,b)||a.$c)if(a.J&&(clearTimeout(a.J),a.J=null),a.Jb)a.la(),a.la=null,a.uc&&(a.Qb=!0,a.T=0);else{if(a.Ra){var c=a.Ra();a.Ra=null;c.then(function(){a.Jb=!0;a.update()})}}else if(a.na&&!a.J){var d=ae(a);0<d&&(a.J=setTimeout(function(){a.J=null;a.update()},d))}else!a.na&&a.J&&(clearTimeout(a.J),a.J=null)}
function Zd(a,b){return 1==a.M.visiblePercentageMin?1==b:0==a.M.visiblePercentageMax?0==b:b>a.M.visiblePercentageMin&&b<=a.M.visiblePercentageMax}
function $d(a,b){var c=Date.now();0<b&&(a.Wa=a.Wa||c,a.Eb=c,!a.Gb&&300>c-a.Qc&&(a.Gb=b));var d=a.na,e=a.ya?c-a.ya:0;a.na=Zd(a,b);if(a.na){a.yb=!0;d?(a.O+=e,a.T+=e,a.W=Math.max(a.W,a.T)):a.Xa=a.Xa||c;a.ya=c;a.Ca=0<a.Ca?Math.min(a.Ca,b):b;if(b>a.Ba)try{a.Yb&&(a.Sa.layoutBoxAtMaxRatio=a.Yb()),a.Xb&&(a.Sa.boundingClientRectAtMaxRatio=a.Xb()),a.Dc&&(a.Sa.viewportSizeAtMaxRatio=a.Dc.getSize())}catch(f){B().error("active-view-debug",f)}a.Ba=Math.max(a.Ba,b);a.gb=c}else d&&(a.W=Math.max(a.W,a.T+e),a.ya=0,
a.O+=e,a.T=0,a.gb=c);return a.yb&&a.O>=a.M.totalTimeMin&&a.O<=a.M.totalTimeMax&&a.W>=a.M.continuousTimeMin&&a.W<=a.M.continuousTimeMax}h.maybeSetInitialScrollDepth=function(a){this.jc||(this.kc=a,this.jc=!0)};h.getInitialScrollDepth=function(){return this.kc};function ae(a){var b=Math.max(a.M.continuousTimeMin-a.T,0),c=Math.max(a.M.totalTimeMin-a.O,0);return Math.min(Math.max(b,c),b||Infinity,c||Infinity)}function Yd(a,b){return a>=b?a-b:0};function be(a){var b=a.parentElement,c=[];if(b){var d=b;c.push(d);for(var e=0;50>e;e++)if((b=d.parentNode||d.parentElement)&&1==b.nodeType)d=b,c.push(d);else if(b&&9==b.nodeType)if((b=d.ownerDocument.defaultView.frameElement)&&1==b.nodeType)d=b,c.push(d);else break;else break}c.push(a);var f=1;for(a=0;a<c.length;a++){if(b=c[a])if(b=window.getComputedStyle(b)||Object.create(null),d=b.opacity,"hidden"===b.visibility)var g=0;else b=""===d?1:parseFloat(d),g=isNaN(b)?1:b;else g=1;g<f&&(f=g);if(0===f)break}return f}
;var ce=[0,.05,.1,.15,.2,.25,.3,.35,.4,.45,.5,.55,.6,.65,.7,.75,.8,.85,.9,.95,1],de=1;function ee(a){var b=a.__AMP_VIS_ID;b||(b=++de,a.__AMP_VIS_ID=b);return b}
function fe(a){if(!a.__AMP_VIS){var b=J(a);var c=cb(a),d=c&&c.__AMP_EMBED__,e;if(e=c)if(Node.prototype.getRootNode)e=c.getRootNode()||c;else{for(;c.parentNode&&(!c||"I-AMPHTML-SHADOW-ROOT"!=c.tagName&&(11!=c.nodeType||"[object ShadowRoot]"!==Object.prototype.toString.call(c)));c=c.parentNode);e=c}c=e;b=d&&c?new ge(fe(c),d):new he(b);a.__AMP_VIS=b}return a.__AMP_VIS}
function ie(a,b){var c=this;this.parent=a;this.ampdoc=b;this.yc=M(b,"resources");this.Lb=0;this.da=[];this.G=null;this.ha=[];this.Hb=0;this.parent&&je(this.parent,this);var d=O(this.ampdoc);d.onChanged(function(){c.maybeUpdateMaxScrollDepth(d.getScrollTop())})}function je(a,b){a.G||(a.G=[]);a.G.push(b)}function ke(a,b){a.G&&(b=a.G.indexOf(b),-1!=b&&a.G.splice(b,1))}h=ie.prototype;
h.dispose=function(){this.setRootVisibility(0);for(var a=this.da.length-1;0<=a;a--)this.da[a].dispose();this.ha.forEach(function(a){a()});this.ha.length=0;this.parent&&ke(this.parent,this);if(this.G)for(a=0;a<this.G.length;a++)this.G[a].dispose()};h.unsubscribe=function(a){this.ha.push(a)};h.getStartTime=function(){};h.isBackgrounded=function(){};h.isBackgroundedAtStart=function(){};h.getRootMinOpacity=function(){};h.getRootLayoutBox=function(){};h.getRootElementTemp=function(){};
h.getBoundingClientRectTemp=function(){};h.getElementLayoutBoxTemp=function(a){var b=this.yc.getResourceForElementOptional(a);return b?b.getLayoutBox():O(this.ampdoc).getLayoutRect(a)};h.getRootVisibility=function(){return this.parent?0<this.parent.getRootVisibility()?this.Lb:0:this.Lb};h.setRootVisibility=function(a){this.Lb=a;me(this);if(this.G)for(a=0;a<this.G.length;a++)me(this.G[a])};h.maybeUpdateMaxScrollDepth=function(a){a>this.Hb&&(this.Hb=a)};h.getMaxScrollDepth=function(){return this.Hb};
function me(a){for(var b=0;b<a.da.length;b++)a.da[b].update()}h.listenRoot=function(a,b,c,d){var e=this.getRootVisibility.bind(this),f=this.getRootLayoutBox.bind(this),g;this.getRootElementTemp()&&(g=this.getBoundingClientRectTemp.bind(this,this.getRootElementTemp()));return ne(this,e,f,g||null,a,b,c,d)};
h.listenElement=function(a,b,c,d,e){var f=this.getElementVisibility.bind(this,a),g=this.getElementLayoutBoxTemp.bind(this,a),k=this.getBoundingClientRectTemp.bind(this,a);return ne(this,f,g,k,b,c,d,e,a)};
function ne(a,b,c,d,e,f,g,k,l){if(e.visiblePercentageThresholds&&void 0==e.visiblePercentageMin&&void 0==e.visiblePercentageMax){var n=[],p=e.visiblePercentageThresholds;if(!p||!w(p))return A().error("amp-analytics/visibility-manager","invalid visiblePercentageThresholds"),function(){};for(var r=0;r<p.length;r++){var x=p[r];if(w(x)&&2==x.length)if(qa(x[0])&&qa(x[1])){var C=Number(x[0]),T=Number(x[1]);if(0>C||100<T||C>T||C==T&&100!=C&&0!=T)A().error("amp-analytics/visibility-manager","visiblePercentageThresholds entry invalid min/max value");
else{var ja=e;ja.visiblePercentageMin=C;ja.visiblePercentageMax=T;var Ua=new Wd(ja,b,c,d,O(a.ampdoc));n.push(oe(a,Ua,f,g,k,l))}}else A().error("amp-analytics/visibility-manager","visiblePercentageThresholds entry is not valid number");else A().error("amp-analytics/visibility-manager","visiblePercentageThresholds entry length is not 2")}return function(){n.forEach(function(a){return a()})}}var Va=new Wd(e,b,c,d,O(a.ampdoc));return oe(a,Va,f,g,k,l)}
function oe(a,b,c,d,e,f){d&&b.setReportReady(d);var g=O(a.ampdoc),k=g.getScrollTop();a.maybeUpdateMaxScrollDepth(k);c?(b.setReady(!1),c.then(function(){b.setReady(!0);b.maybeSetInitialScrollDepth(k)})):b.maybeSetInitialScrollDepth(k);b.onTriggerEvent(function(){var c=a.getStartTime(),d=b.getState(c);d._avError_=b.getErrorInfoTemp();d.backgrounded=a.isBackgrounded()?1:0;d.backgroundedAtStart=a.isBackgroundedAtStart()?1:0;d.totalTime=Date.now()-c;if(f){d.elementId=f.id;d.opacity=be(f);c=(c=a.yc.getResourceForElementOptional(f))?
c.getLayoutBox():g.getLayoutRect(f);var k=a.getElementVisibility(f),r=a.getElementIntersectionRect(f);Object.assign(d,E({intersectionRatio:k,intersectionRect:JSON.stringify(r)}))}else d.opacity=a.getRootMinOpacity(),d.intersectionRatio=a.getRootVisibility(),c=a.getRootLayoutBox();b.maybeDispose();c&&(Object.assign(d,E({elementX:c.left,elementY:c.top,elementWidth:c.width,elementHeight:c.height})),d.initialScrollDepth=Dd(c,g,b.getInitialScrollDepth()),d.maxScrollDepth=Dd(c,g,a.getMaxScrollDepth()));
e(d)});a.da.push(b);b.unsubscribe(function(){var c=a.da.indexOf(b);-1!=c&&a.da.splice(c,1)});f&&b.unsubscribe(a.observe(f,function(){return b.update()}));b.update();return function(){b.dispose()}}h.observe=function(){};h.getElementVisibility=function(){};h.getElementIntersectionRect=function(){};
function he(a){ie.call(this,null,a);var b=this;this.R=O(a);this.Tb=!a.isVisible();this.tb=this.isBackgrounded();this.P=Object.create(null);this.ca=this.zc=null;if("inabox"==v(this.ampdoc.win).runtime){a=this.ampdoc.getRootNode();var c=a.documentElement||a.body||a;this.zc=c;this.unsubscribe(this.observe(c,this.setRootVisibility.bind(this)));var d=function(){var a=ee(c),d=b.P[a];d&&(d.isVisible=1>b.ampdoc.win.innerHeight||1>b.ampdoc.win.innerWidth?!1:!0,b.setRootVisibility(d.isVisible?d.intersectionRatio:
0))};this.ampdoc.win.addEventListener("resize",d);this.unsubscribe(function(){b.ampdoc.win.removeEventListener("resize",d)})}else this.setRootVisibility(this.ampdoc.isVisible()?1:0),this.unsubscribe(this.ampdoc.onVisibilityChanged(function(){var a=b.ampdoc.isVisible();a||(b.Tb=!0);b.setRootVisibility(a?1:0)}))}m(he,ie);h=he.prototype;h.dispose=function(){ie.prototype.dispose.call(this);this.ca&&(this.ca.disconnect(),this.ca=null)};h.getStartTime=function(){return this.ampdoc.getFirstVisibleTime()};
h.isBackgrounded=function(){return this.Tb};h.isBackgroundedAtStart=function(){return this.tb};h.getRootMinOpacity=function(){var a=this.ampdoc.getRootNode();return be(a.documentElement||a.body||a)};h.getRootElementTemp=function(){return this.zc};h.getRootLayoutBox=function(){var a=this.ampdoc.getRootNode();return this.R.getLayoutRect(a.documentElement||a.body||a)};
h.observe=function(a,b){var c=this,d=ee(a),e=this.P[d];e?0<e.intersectionRatio&&e.isVisible&&b(e.intersectionRatio):(e={element:a,intersectionRatio:0,intersectionRect:null,isVisible:!1,boundingClientRect:null,listeners:[]},this.P[d]=e);e.listeners.push(b);this.ca||(this.ca=new this.ampdoc.win.IntersectionObserver(this.hd.bind(this),{threshold:ce}));this.ca.observe(a);return function(){var e=c.P[d];if(e){var g=e.listeners.indexOf(b);-1!=g&&e.listeners.splice(g,1);0==e.listeners.length&&(c.ca.unobserve(a),
delete c.P[d])}}};h.getElementVisibility=function(a){if(0==this.getRootVisibility())return 0;a=ee(a);return(a=this.P[a])&&a.isVisible&&a.intersectionRatio||0};h.getBoundingClientRectTemp=function(a){if(!a)return null;a=ee(a);return(a=this.P[a])&&a.boundingClientRect};h.getElementIntersectionRect=function(a){if(0>=this.getElementVisibility(a))return null;a=ee(a);return(a=this.P[a])?a.intersectionRect:null};
h.hd=function(a){var b=this;a.forEach(function(a){var c=a.intersectionRect;c=Cd(Number(c.left),Number(c.top),Number(c.width),Number(c.height));var e=a.boundingClientRect;e=e&&Cd(Number(e.left),Number(e.top),Number(e.width),Number(e.height));var f=a.intersectionRatio,g=c,k=e;f=Math.min(Math.max(f,0),1);a=ee(a.target);a=b.P[a];var l=!0;if(1>k.width||1>k.height)l=!1;if(a)for(a.isVisible=l,a.intersectionRatio=f,a.intersectionRect=g,a.boundingClientRect=k,g=0;g<a.listeners.length;g++)a.listeners[g](a.isVisible?
f:0)})};function ge(a,b){ie.call(this,a,a.ampdoc);this.embed=b;this.tb=this.parent.isBackgrounded();this.unsubscribe(this.parent.observe(b.host,this.setRootVisibility.bind(this)))}m(ge,ie);h=ge.prototype;h.getStartTime=function(){return this.embed.getStartTime()};h.isBackgrounded=function(){return this.parent.isBackgrounded()};h.isBackgroundedAtStart=function(){return this.tb};h.getRootMinOpacity=function(){return be(this.embed.iframe)};h.getRootElementTemp=function(){return null};
h.getBoundingClientRectTemp=function(){return null};h.getRootLayoutBox=function(){var a=this.embed.iframe;return O(this.ampdoc).getLayoutRect(a)};h.observe=function(a,b){return this.parent.observe(a,b)};h.getElementVisibility=function(a){return 0==this.getRootVisibility()?0:this.parent.getElementVisibility(a)};h.getElementIntersectionRect=function(a){return 0==this.getRootVisibility()?null:this.parent.getElementIntersectionRect(a)};var pe=["AMP-AD","AMP-ANALYTICS","AMP-PIXEL","AMP-AD-EXIT"];function qe(a,b,c){a=J(a);return re(a,b,function(a){return a.isDisplayed()&&(a.overlaps(c)||a.isFixed())?!0:!1}).then(function(a){var b=[];a.forEach(function(a){pe.includes(a.element.tagName)||b.push(a.loadedOnce())});return Promise.all(b)})}
function re(a,b,c){return a.signals().whenSignal("ready-scan").then(function(){var c=[];M(a,"resources").get().forEach(function(a){a.hasBeenMeasured()||a.hostWin!=b||a.hasOwner()||c.push(a.getPageLayoutBoxAsync())});return Promise.all(c)}).then(function(){return M(a,"resources").get().filter(function(a){return a.hostWin==b&&!a.hasOwner()&&a.hasBeenMeasured()&&c(a)})})};var se=/^vars(.+)/;function te(a){this.ampdoc=a;this.B=Object.create(null);this.Ga=this.Ka=null}h=te.prototype;h.dispose=function(){for(var a in this.B)this.B[a].dispose(),delete this.B[a];this.Ka&&this.Ka.dispose();this.Ga&&this.Ga.dispose()};h.getType=function(){};h.getRoot=function(){};h.getViewer=function(){return M(this.ampdoc,"viewer")};h.getRootElement=function(){var a=this.getRoot();return a.host||a.documentElement||a.body||a};h.getHostElement=function(){};h.signals=function(){};
h.contains=function(a){return this.getRoot().contains(a)};h.getElementById=function(){};h.getTrackerForAllowlist=function(a,b){var c=b[a];return c?this.getTracker(a,c):null};h.getTracker=function(a,b){var c=this.B[a];c||(c=new b(this),this.B[a]=c);return c};h.getTrackerOptional=function(a){return this.B[a]||null};
h.getElement=function(a,b,c){var d=this,e=void 0===c?null:c;return":root"==b?la(function(){return d.getRootElement()}):":host"==b?new Promise(function(a){a(A().assertElement(d.getHostElement(),'Element "'+b+'" not found'))}):this.ampdoc.whenReady().then(function(){var c=null;try{if("scope"==e)if(void 0!==hb?hb:hb=ib(a))var g=a.querySelector(b.replace(/^|,/g,"$&:scope "));else{var k=ob(a,b);g=void 0===k[0]?null:k[0]}else g="closest"==e?lb(a,b):d.getRoot().querySelector(b);var l=g}catch(n){D(!1,"Invalid query selector "+
b)}l&&d.contains(l)&&(c=l);return A().assertElement(c,'Element "'+b+'" not found')})};function ue(a,b){return a.ampdoc.whenReady().then(function(){for(var c=[],d=0;d<b.length;d++){var e=void 0,f=[],g=b[d];try{e=a.getRoot().querySelectorAll(g)}catch(l){D(!1,"Invalid query selector "+g)}for(var k=0;k<e.length;k++)a.contains(e[k])&&f.push(e[k]);f=ve(f,g);D(f.length,'Element "'+g+'" not found');c=c.concat(f)}return c.filter(function(a,b){return c.indexOf(a)===b})})}
function ve(a,b){for(var c=0,d=[],e=0;e<a.length;e++)Object.keys(pb(a[e],se)).length?d.push(a[e]):c++;c&&A().warn("amp-analytics/analytics-root",'%s element(s) ommited from selector "%s" because no data-vars-* attribute was found.',c,b);return d}h.getAmpElement=function(a,b,c){return this.getElement(a,b,c).then(function(a){for(var c=[a],d=0;d<c.length;d++)D(c[d].classList.contains("i-amphtml-element"),'Element "%s" is required to be an AMP element',b);return a})};
h.getElements=function(a,b,c){return Ra(this.ampdoc.win)["visibility-trigger-improvements"]&&w(b)?(D(!c,"Cannot have selectionMethod %s defined with an array selector.",c),ue(this,b)):this.getElement(a,b,c).then(function(a){return[a]})};
h.createSelectiveListener=function(a,b,c,d){var e=this,f=void 0===d?null:d;return function(d){if(":host"!=c)for(var g=e.getRootElement(),l="*"==c,n=":root"==c,p=d.target;p&&e.contains(p)&&("scope"!=f||n||b.contains(p));){if("closest"!=f||p.contains(b))if(l||n&&p==g||we(p,c)){a(p,d);break}p=p.parentElement}}};h.whenIniLoaded=function(){};h.getVisibilityManager=function(){this.Ka||(this.Ka=fe(this.getRoot()));return this.Ka};h.getScrollManager=function(){this.Ga||(this.Ga=new Ad(this));return this.Ga};
function xe(a){te.call(this,a)}m(xe,te);h=xe.prototype;h.getType=function(){return"ampdoc"};h.getRoot=function(){return this.ampdoc.getRootNode()};h.getHostElement=function(){return null};h.signals=function(){return this.ampdoc.signals()};h.getElementById=function(a){return this.ampdoc.getElementById(a)};
h.whenIniLoaded=function(){var a=O(this.ampdoc);"inabox"==v(this.ampdoc.win).runtime?a=a.getLayoutRect(this.getRootElement()):(a=a.getSize(),a=Cd(0,0,a.width,a.height));return qe(this.ampdoc,this.ampdoc.win,a)};function ye(a,b){te.call(this,a);this.embed=b}m(ye,te);h=ye.prototype;h.getType=function(){return"embed"};h.getRoot=function(){return this.embed.win.document};h.getHostElement=function(){return this.embed.iframe};h.signals=function(){return this.embed.signals()};h.getElementById=function(a){return this.embed.win.document.getElementById(a)};
h.whenIniLoaded=function(){return this.embed.whenIniLoaded()};function we(a,b){try{return mb(a,b)}catch(c){return A().error("amp-analytics/analytics-root","Bad query selector.",b,c),!1}};function ze(a){this.ampdoc=a;this.F=Ae(this,a.getRootNode())}ze.prototype.dispose=function(){this.F.dispose()};ze.prototype.getAnalyticsRoot=function(a){return Ae(this,a)};ze.prototype.createAnalyticsGroup=function(a){var b=Ae(this,a);return new ud(b,a)};function Be(a){switch(a){case "story":return Vc;default:return X}}ze.prototype.triggerEventForTarget=function(a,b,c,d){c=void 0===c?{}:c;c=new Y(a,b,c,void 0===d?!0:d);a=Ae(this,a);b=Zc(b);a.getTracker(b,Be(b)).trigger(c)};
function Ae(a,b){var c=J(b),d=(b=cb(b))&&b.__AMP_EMBED__;return c==a.ampdoc&&!d&&a.F?a.F:Ce(d||c,function(){return d?new ye(c,d):new xe(c)})}function Ce(a,b){var c=a.__AMP_AN_ROOT;c||(c=b(),a.__AMP_AN_ROOT=c);return c};function De(a,b,c,d){this.m=a;this.h=b.linkers;this.ud=b.vars||{};this.K=c;this.j=d;this.jb={};this.ta=Ya(this.j,"url");this.Tc=fb(K(a),"form-submit-service");this.Ya=null;this.D=R(this.m);this.Za=null}
De.prototype.init=function(){var a=this;if(!y(this.h))return q();this.Za=Tb(this.m.win);this.h=Ee(this,this.h);var b=Object.keys(this.h).map(function(b){var c=a.h[b].ids,d=Object.keys(c),g=d.map(function(b){var d=new P(a.ud,void 0,!0);return a.Va(c[b],d)});return Promise.all(g).then(function(c){var e={};c.forEach(function(a,b){a&&(e[d[b]]=a)});return a.jb[b]=e})});if(b.length){var c=M(this.m,"navigation");c.registerAnchorMutator(function(b,c){b.href&&"click"===c.type&&(b.href=Fe(a,b.href))},2);c.registerNavigateToMutator(function(b){return Fe(a,
b)},2)}Ge(this);return Promise.all(b)};De.prototype.dispose=function(){this.Ya&&this.Ya()};
function Ee(a,b){var c={},d={enabled:He(a)&&Ie(a)},e=Object.keys(b).filter(function(a){var c=b[a],e=y(c);e||(d[a]=c);return e}),f=a.ta.isProxyOrigin(a.m.win.location);e.forEach(function(a){var e=Object.assign({},d,b[a]);if(!0!==e.enabled)A().info("amp-analytics/linker-manager","linker config for %s is not enabled and will be ignored.",a);else if(f||!1===e.proxyOnly)e.ids?c[a]=e:A().error("amp-analytics/linker-manager",'"ids" is a required field for use of "linkers".')});return c}
De.prototype.Va=function(a,b){var c=this,d=this.D.getMacros(this.j);return this.D.expandTemplate(a,b,this.j).then(function(a){return N(c.j).expandUrlAsync(a,d)})};function He(a){return"googleanalytics"!==a.K||"googleanalytics"!==a.m.getMetaByName("amp-google-client-id-api")?!1:a.m.registerSingleton(2)}function Ie(a){a=L(a.m.win,"platform");return a.isSafari()&&12<=a.getMajorVersion()}
function Fe(a,b){var c=a.h,d;for(d in c)if(a.jb[d]){var e=a,f=d;if(Je(e,b,f,c[d].destinationDomains)){var g=oc(e.jb[f]);if(g){e={};e[f]=g;f=e;e=H(b);e=u(e.search);g=E({});for(var k=Object.keys(f),l=0;l<k.length;l++)F(e,k[l])||(g[k[l]]=f[k[l]]);b=Na(b,Oa(g))}}}return b}
function Je(a,b,c,d){var e=a.ta.parse(b).hostname;if(d&&!Array.isArray(d))return A().warn("amp-analytics/linker-manager","%s destinationDomains must be an array.",c),!1;if(d)return Ke(d,e);if(a.m.win.location.hostname===e)return!1;b=M(a.m,"documentInfo").get();c=b.sourceUrl;var f=a.ta.parse(b.canonicalUrl).hostname,g=Le(f)===Le(e);if(a.Za)return Ke([a.Za,"*"+a.Za],e)||g;a=a.ta.parse(c).hostname;return Le(a)===Le(e)||g}
function Ke(a,b){for(var c=0;c<a.length;c++){var d=a[c],e;!(e=d===b)&&(e=-1!==d.indexOf("*"))&&(e=b,d=d.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),e=(new RegExp("^"+d+"$")).test(e));if(e)return!0}return!1}function Ge(a){a.Ya||a.Tc.then(function(b){a.Ya=b.beforeSubmit(a.Xc.bind(a))})}
De.prototype.Xc=function(a){var b=a.form,c=a.actionXhrMutator,d;for(d in this.h){a=this.h[d].destinationDomains;var e=b.getAttribute("action-xhr")||b.getAttribute("action");if(Je(this,e,d,a)&&(a=d,e=this.jb[a])){var f=oc(e);(e=b.getAttribute("action-xhr"))?(a=encodeURIComponent(a)+"="+encodeURIComponent(f),a=Na(e,a,void 0),c(a)):(a=E({type:"hidden",name:a,value:f}),a=jb(b.ownerDocument,"input",a),b.appendChild(a))}}};function Le(a){return a.replace(/^(?:www\.|m\.|amp\.)+/,"")};function Me(a){var b=this;this.Uc=a;this.nc=!1;this.Da=[];this.kd=new ic(this.Uc,function(){b.setIsReady()})}Me.prototype.isReady=function(){return this.nc};Me.prototype.setIsReady=function(){this.nc=!0;Ne(this)};Me.prototype.queueSize=function(){return this.Da.length};Me.prototype.enqueue=function(a){this.Da.push(a);100<=this.queueSize()&&(B().warn("amp-analytics/iframe-transport-message-queue","Exceeded maximum size of queue for: "+a.creativeId),this.Da.shift());Ne(this)};
function Ne(a){a.isReady()&&a.queueSize()&&(a.kd.send("iframe-transport-events",{events:a.Da}),a.Da=[])};function Oe(a){return!!a.PerformanceObserver&&!!a.TaskAttributionTiming&&"containerName"in a.TaskAttributionTiming.prototype};function Pe(a,b,c,d){this.va=a;this.K=b;this.bc=d;this.dc=c.iframe;this.gd=0;this.processCrossDomainIframe()}h=Pe.prototype;h.detach=function(){var a=this.va.document,b=this.K,c=Qe[b];--c.usageCount||(a.body.removeChild(c.frame),delete Qe[b],Re[b]&&(Re[b].disconnect(),Re[b]=null))};h.processCrossDomainIframe=function(){if(F(Qe,this.K)){var a=Qe[this.K];++a.usageCount}else a=this.createCrossDomainIframe(),this.va.document.body.appendChild(a.frame),Se(this)};
h.createCrossDomainIframe=function(){var a=String(++Te),b=JSON.stringify({scriptSrc:va.thirdParty+"/2010010034001/iframe-transport-client-v0.js",sentinel:a,type:this.K}),c=jb(this.va.document,"iframe",{sandbox:"allow-scripts allow-same-origin",name:b,"data-amp-3p-sentinel":a});c.sentinel=a;ac(c);c.src=this.dc;a={frame:c,usageCount:1,queue:new Me(c)};return Qe[this.K]=a};
function Se(a){Oe(a.va)&&(Re[a.K]=new a.va.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.dc==b.containerSrc&&0==++a.gd%5&&A().error("amp-analytics/iframe-transport",'Long Task: Vendor: "'+a.K+'"')})})}),Re[a.K].observe({entryTypes:["longtask"]}))}h.sendRequest=function(a){Qe[this.K].queue.enqueue({creativeId:this.bc,message:a})};h.getCreativeId=function(){return this.bc};
h.getType=function(){return this.K};var Qe={},Te=0,Re={};function Ue(a,b,c){c&&"no-referrer"!==c&&A().error("pixel","Unsupported referrerPolicy: %s",c);return"no-referrer"===c?Ve(a,b):We(a,b)}function Ve(a,b){if("referrerPolicy"in Image.prototype)return We(a,b,!0);var c=jb(a.document,"iframe",E({src:"about:blank",style:"display:none"}));c.onload=function(){We(c.contentWindow,b)};a.document.body.appendChild(c);return c}function We(a,b,c){var d=c=void 0===c?!1:c;a=new a.Image;d&&(a.referrerPolicy="no-referrer");a.src=b;return a};function Xe(a,b){try{var c=cb(a,b).parentElement;if("AMP-AD"==c.nodeName)return String(c.getResourceId())}catch(d){}return null};function Ye(a,b){b=void 0===b?{}:b;this.l=a;this.L=b;this.tc=this.L.referrerPolicy;"no-referrer"===this.tc&&(this.L.beacon=!1,this.L.xhrpost=!1);this.Bc=!!this.L.useBody;this.ba=null;this.eb="inabox"==v(a).runtime}
Ye.prototype.sendRequest=function(a,b,c){if(a&&0!==b.length){var d=Gd["default"],e=Ze(function(e){e=c?d.generateBatchRequest(a,b,e):d.generateRequest(a,b[0],e);Pa(e.url,"amp-analytics request");var f=e.url,g=H(f);g=u(g.search);D(!("__amp_source_origin"in g),"Source origin is not allowed in %s",f);return e});if(this.L.iframe)this.ba?this.ba.sendRequest(e(!1).url):B().error("amp-analytics/transport","iframe transport was inadvertently deleted");else if(!this.L.beacon||!$e(this.l,e(this.Bc)))if(!this.L.xhrpost||
!af(this.l,e(this.Bc))){var f=this.L.image;if(f){var g="object"==typeof f&&f.suppressWarnings;bf(this.l,e(!1),g,this.tc)}else A().warn("amp-analytics/transport","Failed to send request",a,this.L)}}else B().info("amp-analytics/transport","Empty request not sent: ",a)};
Ye.prototype.maybeInitIframeTransport=function(a){if(this.L.iframe&&!this.ba){var b=I(a.ownerDocument.defaultView),c=a.getAttribute("type"),d=this.eb?"1":A().assertString(Xe(a,b),"No friendly amp-ad ancestor element was found for amp-analytics tag with iframe transport.");this.ba=new Pe(b,c,this.L,d)}};Ye.prototype.deleteIframeTransport=function(){this.ba&&(this.ba.detach(),this.ba=null)};
Ye.prototype.sendRequestUsingIframe=function(a,b){var c=this;if(a=Fd(a,[b])){Pa(a,"amp-analytics request");D(H(a).origin!=H(this.l.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.");var d=this.l.document.createElement("iframe");ac(d);d.onload=d.onerror=function(){L(c.l,"timer").delay(function(){d.parentElement&&d.parentElement.removeChild(d)},5E3)};d.setAttribute("amp-analytics",
"");d.setAttribute("sandbox","allow-scripts allow-same-origin");d.src=a;this.l.document.body.appendChild(d)}else A().error("amp-analytics/transport","Request not sent. Contents empty.")};function bf(a,b,c,d){a&&(a=Ue(a,b.url,d),zb(a).then(function(){B().fine("amp-analytics/transport","Sent image request",b.url)}).catch(function(){c||A().warn("amp-analytics/transport","Response unparseable or failed to send image request",b.url)}))}
function $e(a,b){a=a.navigator.sendBeacon?a.navigator.sendBeacon.bind(a.navigator):void 0;if(!a)return!1;(a=a(b.url,b.payload||""))&&B().fine("amp-analytics/transport","Sent beacon request",b);return a}
function af(a,b){a=a.XMLHttpRequest;if(!a)return!1;var c=new a;if(!("withCredentials"in c))return!1;c.open("POST",b.url,!0);c.withCredentials=!0;c.setRequestHeader("Content-Type","text/plain");c.onreadystatechange=function(){4==c.readyState&&B().fine("amp-analytics/transport","Sent XHR request",b.url)};c.send(b.payload||"");return!0}function Ze(a){var b={};return function(c){var d=String(c);void 0===b[d]&&(b[d]=a(c));return b[d]}};var cf=["visible","hidden","ini-load","render-start"];function df(a){a=AMP.BaseElement.call(this,a)||this;a.$b=q();a.xb=null;a.V=!1;a.Fa={};a.h={};a.lc=null;a.ja=null;a.D=null;a.Rc=L(a.win,"crypto");a.U=null;a.Y=null;a.eb="inabox"==v(a.win).runtime;a.za=null;a.Db=null;return a}m(df,AMP.BaseElement);h=df.prototype;h.getLayoutPriority=function(){return this.eb?0:1};h.isAlwaysFixed=function(){return!jc(this.element)};h.isLayoutSupported=function(){return!0};
h.buildCallback=function(){var a=this;this.V=this.element.hasAttribute("sandbox");this.element.setAttribute("aria-hidden","true");this.xb=this.element.getAttribute("data-consent-notification-id");null!=this.xb&&(this.$b=qb(this.element).then(function(b){return b.get(a.xb)}));"immediate"==this.element.getAttribute("trigger")&&ef(this)};h.layoutCallback=function(){return ef(this)};
h.detachedCallback=function(){this.ja&&(this.ja.dispose(),this.ja=null);this.za&&(this.za.dispose(),this.za=null);for(var a in this.Fa)this.Fa[a].dispose(),delete this.Fa[a]};h.resumeCallback=function(){var a=this;this.U&&this.U.then(function(){a.Y.maybeInitIframeTransport(a.element)})};h.unlayoutCallback=function(){var a=this;if(this.getAmpDoc().isVisible())return!1;this.U&&this.U.then(function(){a.Y.deleteIframeTransport()});return AMP.BaseElement.prototype.unlayoutCallback.call(this)};
function ef(a){if(a.U)return a.U;ac(a.element);a.U=a.getAmpDoc().whenFirstVisible().then(function(){return L(a.win,"timer").promise(1)}).then(function(){return a.$b}).then(function(){return L(a.win,"ampdoc")}).then(function(b){return b.getAmpDoc(a.element)}).then(function(a){return Promise.all([fb(K(a),"amp-analytics-instrumentation"),fb(K(a),"amp-analytics-variables")])}).then(function(b){function c(){var b=(new Fc(a.element)).loadConfig();d.resolve(b)}a.lc=b[0];a.D=b[1];var d=new t;vd(a.win)?kd(a.element,
c,20):c();return d.promise}).then(function(b){a.h=b;return(new xd(a.win,a.element,a.h)).write()}).then(function(){a.Y=new Ye(a.win,a.h.transport||{})}).then(a.nd.bind(a)).then(a.bd.bind(a));return a.U}function ff(a){if(a.eb)return!0;null==a.Db&&(a.Db=jc(a.element));return a.Db}
h.nd=function(){var a=this;if(gf(this)){var b=this.w();A().fine(b,"User has opted out. No hits will be sent.");return q()}hf(this);if(!this.h.triggers)return b=this.w(),this.user().warn(b,"No triggers were found in the config. No analytics data will be sent."),q();jf(this,this.h.extraUrlParams,this.h.extraUrlParamsReplaceMap);this.ja=this.lc.createAnalyticsGroup(this.element);this.Y.maybeInitIframeTransport(this.element);b=[];var c={},d;for(d in this.h.triggers){a:if(F(this.h.triggers,d)){c.o=this.h.triggers[d];
c.rb=kf(this,E({}),c.o,void 0,!0);var e=this.w();if(c.o){var f=c.o.request||c.o.parentPostMessage&&ff(this);if(c.o.on&&f){if(this.V){var g=c.o.on;if(ra(g)&&!cf.includes(g)){this.user().error(e,g+" is not supported for amp-analytics in scope");break a}}jf(this,c.o.extraUrlParams,this.h.extraUrlParamsReplaceMap);b.push(lf(this,c.o).then(function(b){return function(c){if(c)if(a.V){if(a.element.parentElement)return b.o.selector=a.element.parentElement.tagName,b.o.selectionMethod="closest",mf(a,b.o)}else return b.o.selector&&
!w(b.o.selector)?a.D.expandTemplate(b.o.selector,b.rb,a.element).then(function(c){b.o.selector=c;return mf(a,b.o)}):mf(a,b.o)}}(c)))}else{var k=ff(this)?'/"parentPostMessage"':"";this.user().error(e,'"on" and "request"'+k+" attributes are required for data to be collected.")}}else this.user().error(e,"Trigger should be an object: ",d)}c={o:c.o,rb:c.rb}}return Promise.all(b)};h.preload=function(a,b){L(this.win,"preconnect").preload(this.getAmpDoc(),a,b)};
function mf(a,b){if(!a.ja)return q();try{return a.ja.addTrigger(b,a.Wc.bind(a,b))}catch(c){return a=a.w(),xa(a,'Failed to process trigger "'+b.on+'"',c),q()}}function jf(a,b,c){if(b&&c){var d=0,e;for(e in c){if(16<++d){b=a.w();a.user().error(b,"More than 16 extraUrlParamsReplaceMap rules aren't allowed; Skipping the rest");break}for(var f in b){var g=f.replace(e,c[e]);if(f!=g){var k=b[f];delete b[f];b[g]=k}}}}}
function gf(a){var b=a.h.optoutElementId;if(b&&a.win.document.getElementById(b))return!0;if(!a.h.optout)return!1;var c=a.h.optout.split(".");a=a.win;for(var d=0;d<c.length;d++){if(!a)return!1;a=a[c[d]]}return a()}
function hf(a){if(!a.h.requests){if(!ff(a)){var b=a.w();a.user().warn(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)F(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=Da(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)F(a.h.requests,
b)&&(c[b]=new Qd(a.element,a.h.requests[b],L(a.win,"preconnect"),a.Y,a.V));a.Fa=c}}h.bd=function(){function a(){b.za.init()}var b=this,c=this.element.getAttribute("type");this.za=new De(this.getAmpDoc(),this.h,c,this.element);vd(this.win)?kd(this.element,a,10):a()};h.Wc=function(a,b){for(var c=w(a.request)?a.request:[a.request],d=0;d<c.length;d++)nf(this,c[d],a,b)};
function nf(a,b,c,d){if(!a.element.ownerDocument.defaultView){var e=a.w();B().warn(e,"request against destroyed embed: ",c.on)}var f=a.Fa[b],g=ff(a)&&c.parentPostMessage;if(void 0!=b&&!f&&(b=a.w(),a.user().error(b,"Ignoring request for event. Request string not found: ",c.request),!g))return;of(a,c,d).then(function(b){var e=a.element.ownerDocument&&a.element.ownerDocument.defaultView;b&&e&&(f&&(a.h.vars.requestCount++,b=kf(a,d,c),f.send(a.h.extraUrlParams,c,b)),pf(a,c,d))})}
function pf(a,b,c){var d=b.parentPostMessage;d&&ff(a)&&(c=kf(a,c,b),Vd(a.getAmpDoc(),d,a.h.extraUrlParams,b,c,a.element).then(function(b){var c=a.win;c.parent&&c.parent!=c&&a.win.parent.postMessage(b,"*")}))}
function lf(a,b){var c=b.sampleSpec,d=a.w();if(!c)return Promise.resolve(!0);var e=c.sampleOn;if(!e)return a.user().error(d,"Invalid sampleOn value."),Promise.resolve(!0);var f=parseFloat(c.threshold);if(0<=f&&100>=f){var g=new t,k=function(){var c=kf(a,E({}),b),d=a.Va(e,c).then(function(b){return a.Rc.uniform(b)}).then(function(a){return 100*a<f});g.resolve(d)};vd(a.win)?kd(a.element,k,10):k();return g.promise}A().error(d,"Invalid threshold for sampling.");return Promise.resolve(!0)}
function of(a,b,c){c=kf(a,c,b);var d=qf(a,a.h.enabled,c),e=qf(a,b.enabled,c);return Promise.all([d,e]).then(function(a){return a[0]&&a[1]})}function qf(a,b,c){return void 0===b?Promise.resolve(!0):"boolean"===typeof b?Promise.resolve(b):a.Va(b,c).then(function(a){return Ac(a)})}h.Va=function(a,b){var c=this;return this.D.expandTemplate(a,b,this.element).then(function(a){return N(c.element).expandUrlAsync(a,c.D.getMacros(c.element))})};
h.w=function(){return"AmpAnalytics "+(this.element.getAttribute("id")||"<unknown id>")};function kf(a,b,c,d,e){var f={};S(a.h.vars,f);S(c.vars,f);S(b.vars,f);return new P(f,d,e)}(function(a){a.registerServiceForDoc("amp-analytics-instrumentation",ze);a.registerServiceForDoc("activity",Eb);var b=a.win;b=I(b);eb(b,b,"amp-analytics-linker-reader",rc);a.registerServiceForDoc("amp-analytics-variables",zc);a.registerElement("amp-analytics",df)})(self.AMP);
})});

//# sourceMappingURL=amp-analytics-0.1.js.map
