(function(){var h;function m(a,b){b=void 0===b?"":b;try{return decodeURIComponent(a)}catch(c){return b}};var aa=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function q(a){var b=Object.create(null);if(!a)return b;for(var c;c=aa.exec(a);){var d=m(c[1],c[1]),e=c[2]?m(c[2].replace(/\+/g," "),c[2]):"";b[d]=e}return b};var t=""; function w(a){var b=a||self;if(b.__AMP_MODE)var c=b.__AMP_MODE;else{c=b;var d=self.AMP_CONFIG||{},e=!!d.test||!1,f=q(c.location.originalHash||c.location.hash);d=d.spt;var g=q(c.location.search);t||(t=c.AMP_CONFIG&&c.AMP_CONFIG.v?c.AMP_CONFIG.v:"011911070201440");c={localDev:!1,development:!!(0<=["1","actions","amp","amp4ads","amp4email"].indexOf(f.development)||c.AMP_DEV_MODE),examiner:"2"==f.development,geoOverride:f["amp-geo"],userLocationOverride:f["amp-user-location"],minified:!0,lite:void 0!=g.amp_lite, test:e,log:f.log,version:"1911070201440",rtvVersion:t,singlePassType:d};c=b.__AMP_MODE=c}return c};function ba(a){var b=!1,c=null,d=a;return function(a){for(var e=[],g=0;ga.length?!1:0==a.lastIndexOf(b,0)};function M(a,b,c){c=void 0===c?{}:c;var d=void 0===d?null:d;c.type=a;c.sentinel=b;return"amp-"+(d||"")+JSON.stringify(c)};function N(){var a=100;this.S=a;this.K=this.O=0;this.A=Object.create(null)}N.prototype.has=function(a){return!!this.A[a]};N.prototype.get=function(a){var b=this.A[a];if(b)return b.access=++this.K,b.payload};N.prototype.put=function(a,b){this.has(a)||this.O++;this.A[a]={payload:b,access:this.K};if(!(this.O<=this.S)){J().warn("lru-cache","Trimming LRU cache");a=this.A;var c=this.K+1,d;for(d in a){var e=a[d].access;if(ec&&d!=this.o&&d!=this.o.top;c++,d=d.parent){var e=S(d.frameElement.getBoundingClientRect());a=b;var f=e.left,g=e.top;b=0==f&&0==g||0==a.width&&0==a.height?a:R(a.left+f,a.top+g,a.width,a.height)}return b};var xa=["send-positions"];function W(){this.M={}}W.prototype.listen=function(a,b){this.M[a]=b};W.prototype.fire=function(a,b,c){return a in this.M?this.M[a].apply(b,c):!1}; function ya(a,b){this.C=b;this.j=Object.create(null);a.ampInaboxPositionObserver=a.ampInaboxPositionObserver||new V(a);this.N=a.ampInaboxPositionObserver;this.F=new W;a.ampInaboxFrameOverlayManager=a.ampInaboxFrameOverlayManager||new U(a);this.R=a.ampInaboxFrameOverlayManager;this.F.listen("send-positions",this.X);this.F.listen("full-overlay-frame",this.W);this.F.listen("cancel-full-overlay-frame",this.V)}h=ya.prototype; h.processMessage=function(a){var b=a.data;if("string"==typeof b&&0==b.indexOf("amp-")&&-1!=b.indexOf("{")){var c=b.indexOf("{");try{var d=JSON.parse(b.substr(c))}catch(p){J().error("MESSAGING","Failed to parse message: "+b,p),d=null}}else d=null;if(!d||!d.sentinel)return!1;a:if(b=d.sentinel,this.j[b])b=this.j[b];else{if(c=this.getMeasureableFrame(a.source))for(var e=c.contentWindow,f=0;fl;l++,k=k.parent){if(g.contentWindow==k){this.j[b]={iframe:g, measurableFrame:c};b=this.j[b];break a}if(k==window.top)break}b=null}var r=b;if(!r)return J().info("InaboxMessagingHost","Ignored message from untrusted iframe:",a),!1;var n=r.iframe.dataset.ampAllowed,u=n?n.split(/\s*,\s*/):xa;return-1===u.indexOf(d.type)?(J().info("InaboxMessagingHost","Ignored non-whitelisted message type:",a),!1):this.F.fire(d.type,this,[r.measurableFrame,d,a.source,a.origin])?!0:(J().warn("InaboxMessagingHost","Unprocessed AMP message:",a),!1)}; h.X=function(a,b,c,d){var e=this.N.getViewportRect(),f=this.N.getTargetRect(a);za(b,c,d,K({viewportRect:e,targetRect:f}));this.j[b.sentinel].observeUnregisterFn=this.j[b.sentinel].observeUnregisterFn||this.N.observe(a,function(a){return za(b,c,d,a)});return!0};function za(a,b,c,d){b.postMessage(M("position",a.sentinel,d),c)}h.W=function(a,b,c,d){this.R.expandFrame(a,function(a){c.postMessage(M("full-overlay-frame-response",b.sentinel,K({success:!0,boxRect:a})),d)});return!0}; h.V=function(a,b,c,d){this.R.collapseFrame(a,function(a){c.postMessage(M("cancel-full-overlay-frame-response",b.sentinel,K({success:!0,boxRect:a})),d)});return!0};h.getMeasureableFrame=function(a){if(!a)return null;for(var b,c=0,d=a;10>c&&d!=d.top&&!na(d);c++,b=d,d=d.parent);if(b){c=b.parent.document.querySelectorAll("iframe");d=0;for(var e=c[d];d