(self.AMP=self.AMP||[]).push({n:"amp-ad",v:"1493855940942",f:(function(AMP){var l;function n(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}function aa(a,b){return b.toUpperCase()};var ba=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function t(a){var b=Object.create(null);if(!a)return b;for(var c;c=ba.exec(a);){var d=decodeURIComponent(c[1]).trim(),e=c[2]?decodeURIComponent(c[2]).trim():"";b[d]=e}return b};var ca="";function w(){var a=void 0,b=a||self,c;if(b.AMP_MODE)c=b.AMP_MODE;else{c=b;if(c.context&&c.context.mode)c=c.context.mode;else{var d=t(c.location.originalHash||c.location.hash),e=t(c.location.search);ca||(ca=c.AMP_CONFIG&&c.AMP_CONFIG.v?c.AMP_CONFIG.v:"011493855940942");c={localDev:!1,development:!("1"!=d.development&&!c.AMP_DEV_MODE),filter:d.filter,minified:!0,lite:void 0!=e.amp_lite,test:!1,log:d.log,version:"1493855940942",rtvVersion:ca}}c=b.AMP_MODE=c}return c};Date.now();self.log=self.log||{user:null,dev:null};var x=self.log;function y(){if(x.user)return x.user;throw Error("failed to call initLogConstructor");}function z(){if(x.dev)return x.dev;throw Error("failed to call initLogConstructor");};var da=Object.prototype.hasOwnProperty;function ea(a){var b=Object.create(null);a&&Object.assign(b,a);return b};var A=self.AMP_CONFIG||{},fa=A.thirdPartyUrl||"https://3p.ampproject.net",ga=A.thirdPartyFrameHost||"ampproject.net",ha=A.cdnUrl||"https://cdn.ampproject.org",ia=("string"==typeof A.cdnProxyRegex?new RegExp(A.cdnProxyRegex):A.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org/;var ja,ka;
function B(a){var b;ja||(ja=self.document.createElement("a"),ka=self.UrlCache||(self.UrlCache=Object.create(null)));var c=ka[a];if(c)return c;var d=ja;d.href=a;d.protocol||(d.href=d.href);var e={href:d.href,protocol:d.protocol,host:d.host,hostname:d.hostname,port:"0"==d.port?"":d.port,pathname:d.pathname,search:d.search,hash:d.hash,origin:null};"/"!==e.pathname[0]&&(e.pathname="/"+e.pathname);if("http:"==e.protocol&&80==e.port||"https:"==e.protocol&&443==e.port)e.port="",e.host=e.hostname;e.origin=
d.origin&&"null"!=d.origin?d.origin:"data:"!=e.protocol&&e.host?e.protocol+"//"+e.host:e.href;var f=e,g=f;return b?g:ka[a]=g}function la(a){"string"==typeof a&&(a=B(a));var b;(b="https:"==a.protocol||"localhost"==a.hostname)||(a=a.hostname,b=a.length-10,b=0<=b&&a.indexOf(".localhost",b)==b);return b}function ma(a){"string"==typeof a&&(a=B(a));return ia.test(a.origin)};var D=null;function E(a,b){var c=na(a);return!!c[b]}
function na(a){if(D)return D;D=Object.create(null);if(a.AMP_CONFIG)for(var b in a.AMP_CONFIG){var c=a.AMP_CONFIG[b];"number"===typeof c&&0<=c&&1>=c&&(D[b]=Math.random()<c)}if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-doc-opt-in"])&&0<a.AMP_CONFIG["allow-doc-opt-in"].length){var d=a.AMP_CONFIG["allow-doc-opt-in"],e=a.document.head.querySelector('meta[name="amp-experiments-opt-in"]');if(e){var f=e.getAttribute("content").split(",");for(b=0;b<f.length;b++)-1!=d.indexOf(f[b])&&(D[f[b]]=!0)}}Object.assign(D,
oa(a));if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-url-opt-in"])&&0<a.AMP_CONFIG["allow-url-opt-in"].length){b=a.AMP_CONFIG["allow-url-opt-in"];var g=a.location.originalHash||a.location.hash;a=t(g);for(var h=0;h<b.length;h++){var k=a["e-"+b[h]];"1"==k&&(D[b[h]]=!0);"0"==k&&(D[b[h]]=!1)}}return D}
function oa(a){a:{var b;b:{try{b=a.document.cookie;break b}catch(g){}b=void 0}if(a=b)for(a=a.split(";"),b=0;b<a.length;b++){var c=a[b].trim(),d=c.indexOf("=");if(-1!=d&&"AMP_EXP"==decodeURIComponent(c.substring(0,d).trim())){a=decodeURIComponent(c.substring(d+1).trim());break a}}a=null}var e=a,f=e?e.split(/\s*,\s*/g):[];a=Object.create(null);for(b=0;b<f.length;b++)0!=f[b].length&&("-"==f[b][0]?a[f[b].substr(1)]=!1:a[f[b]]=!0);return a}
function pa(a,b){a.experimentBranches=a.experimentBranches||{};for(var c in b)if(b.hasOwnProperty(c)&&!a.experimentBranches.hasOwnProperty(c))if(!b[c].isTrafficEligible||!b[c].isTrafficEligible(a))a.experimentBranches[c]=null;else if(!a.experimentBranches[c]&&E(a,c)){var d=b[c].branches,e=d;a.experimentBranches[c]=e[Math.floor(Math.random()*e.length)]||null}};function qa(a){a=a.__AMP_TOP||a;return H(a,"performance")?I(a,"performance"):null}function ra(a){if(a.nodeType){var b=(a.ownerDocument||a).defaultView;if(b=b!=(b.__AMP_TOP||b)&&H(b,"url-replace")?I(b,"url-replace"):null)return b}return J(a,"url-replace")}function K(a,b){var c;a=a.__AMP_TOP||a;if(!H(a,b)){var d=a,d=d.__AMP_TOP||d;sa(d,d,b,c);I(d,b)}return I(a,b)}function J(a,b){var c=L(a);a=M(c);if(!H(a,b)){var c=L(c),d=M(c);sa(d,c,b,void 0);I(d,b)}return I(a,b)}
function ta(a,b){return ua(M(a),b)}function va(a,b){return wa(M(a),b)}function L(a){return a.nodeType?K((a.ownerDocument||a).defaultView,"ampdoc").getAmpDoc(a):a}function M(a){a=L(a);return a.isSingleDoc()?a.win:a}function I(a,b){H(a,b);var c=N(a);a=c[b];a.obj||(a.obj=a.build(),a.resolve&&a.resolve(a.obj),a.build=null);return a.obj}
function sa(a,b,c,d){var e=void 0,f=N(a),g=f[c];g||(g=f[c]={obj:null,promise:null,resolve:null,build:null});g.build||g.obj||(g.build=function(){return e?new e(b):d(b)},g.resolve&&I(a,c))}function ua(a,b){var c=wa(a,b);if(c)return c;var d,e=new Promise(function(a){d=a});N(a)[b]={obj:null,promise:e,resolve:d,build:null};return e}function wa(a,b){var c=N(a)[b];if(c){if(c.promise)return c.promise;I(a,b);return c.promise=Promise.resolve(c.obj)}return null}
function N(a){var b=a.services;b||(b=a.services={});return b}function H(a,b){a=a.services&&a.services[b];return!(!a||!a.build&&!a.obj)};function xa(a,b,c){if(b(a))c();else{var d=a.ownerDocument.defaultView;if(d.MutationObserver){var e=new d.MutationObserver(function(){b(a)&&(e.disconnect(),c())});e.observe(a,{childList:!0})}else var f=d.setInterval(function(){b(a)&&(d.clearInterval(f),c())},5)}}function ya(a,b){xa(a.documentElement,function(){return!!a.body},b)}function za(a){return new Promise(function(b){ya(a,b)})}function Aa(a,b){for(var c,d=a;d&&d!==c;d=d.parentElement)if(b(d))return d;return null}
function Ba(a){var b="amp-ad";if(a.closest)return a.closest(b);b=b.toUpperCase();return Aa(a,function(a){return a.tagName==b})}function Ca(a,b){for(var c=[],d=a.parentElement;d;d=d.parentElement)b(d)&&c.push(d);return c}function Da(a){var b="BODY",b=b.toUpperCase();return Ca(a,function(a){return a.tagName==b})};function Ea(a){var b="amp-user-notification";return Fa(a,b).then(function(a){return y().assert(a,"Service %s was requested to be provided through %s, but %s is not loaded in the current page. To fix this problem load the JavaScript file for %s in this page.","userNotificationManager",b,b,b)})}
function Fa(a,b){var c=wa(a,"userNotificationManager");return c?c:Promise.resolve().then(function(){return O(a,b)?ua(a,"userNotificationManager"):za(a.document).then(function(){return O(a,b)?ua(a,"userNotificationManager"):null})})}function O(a,b){return a.ampExtendedElements?!!a.ampExtendedElements[b]:!1}
function Ga(a){return Ha(a,"amp-analytics-instrumentation").then(function(a){return y().assert(a,"Service %s was requested to be provided through %s, but %s is not loaded in the current page. To fix this problem load the JavaScript file for %s in this page.","amp-analytics-instrumentation","amp-analytics","amp-analytics","amp-analytics")})}
function Ha(a,b){var c=L(a),d=va(a,b);return d?d:Promise.resolve().then(function(){return O(c.win,"amp-analytics")?ta(a,b):c.whenBodyAvailable().then(function(){return O(c.win,"amp-analytics")?ta(a,b):null})})};function P(a){return J(a,"viewer")};var Ia={_ping_:{renderStartImplemented:!0},a8:{prefetch:"https://statics.a8.net/amp/ad.js",renderStartImplemented:!0},a9:{prefetch:"https://c.amazon-adsystem.com/aax2/assoc.js"},accesstrade:{prefetch:"https://h.accesstrade.net/js/amp/amp.js"},adblade:{prefetch:"https://web.adblade.com/js/ads/async/show.js",preconnect:["https://staticd.cdn.adblade.com","https://static.adblade.com"],renderStartImplemented:!0},adbutler:{prefetch:"https://servedbyadbutler.com/app.js"},adform:{},adgeneration:{prefetch:"https://i.socdm.com/sdk/js/adg-script-loader.js"},
adhese:{renderStartImplemented:!0},adition:{},adman:{},adreactor:{},adsense:{prefetch:"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",preconnect:"https://googleads.g.doubleclick.net",clientIdScope:"AMP_ECID_GOOGLE"},adsnative:{prefetch:"https://static.adsnative.com/static/js/render.v1.js",preconnect:"https://api.adsnative.com"},adspeed:{preconnect:"https://g.adspeed.net",renderStartImplemented:!0},adspirit:{},adstir:{prefetch:"https://js.ad-stir.com/js/adstir_async.js",preconnect:"https://ad.ad-stir.com"},
adtech:{prefetch:"https://s.aolcdn.com/os/ads/adsWrapper3.js",preconnect:["https://mads.at.atwola.com","https://aka-cdn.adtechus.com"]},adthrive:{prefetch:["https://www.googletagservices.com/tag/js/gpt.js"],preconnect:["https://partner.googleadservices.com","https://securepubads.g.doubleclick.net","https://tpc.googlesyndication.com"],renderStartImplemented:!0},aduptech:{prefetch:"https://s.d.adup-tech.com/jsapi",preconnect:["https://d.adup-tech.com","https://m.adup-tech.com"],renderStartImplemented:!0},
adverline:{prefetch:"https://ads.adverline.com/richmedias/amp.js",preconnect:["https://adnext.fr"],renderStartImplemented:!0},adverticum:{},advertserve:{renderStartImplemented:!0},affiliateb:{prefetch:"https://track.affiliate-b.com/amp/a.js",renderStartImplemented:!0},amoad:{prefetch:["https://j.amoad.com/js/a.js","https://j.amoad.com/js/n.js"],preconnect:["https://d.amoad.com","https://i.amoad.com","https://m.amoad.com","https://v.amoad.com"]},appnexus:{prefetch:"https://acdn.adnxs.com/ast/ast.js",
preconnect:"https://ib.adnxs.com"},atomx:{prefetch:"https://s.ato.mx/p.js"},brainy:{},caajainfeed:{prefetch:["https://cdn.amanad.adtdp.com/sdk/ajaamp-v1.0.js"],preconnect:["https://ad.amanad.adtdp.com"]},capirs:{renderStartImplemented:!0},caprofitx:{prefetch:["https://cdn.caprofitx.com/pfx.min.js","https://cdn.caprofitx.com/tags/amp/profitx_amp.js"],preconnect:"https://ad.caprofitx.adtdp.com"},chargeads:{},colombia:{prefetch:"https://static.clmbtech.com/ad/commons/js/colombia-amp.js"},contentad:{},
criteo:{prefetch:"https://static.criteo.net/js/ld/publishertag.js",preconnect:"https://cas.criteo.com"},csa:{prefetch:"https://www.google.com/adsense/search/ads.js"},distroscale:{preconnect:["https://c.jsrdn.com","https://s.jsrdn.com","https://i.jsrdn.com"],renderStartImplemented:!0},dotandads:{prefetch:"https://amp.ad.dotandad.com/dotandadsAmp.js",preconnect:"https://bal.ad.dotandad.com"},doubleclick:{prefetch:["https://www.googletagservices.com/tag/js/gpt.js","https://securepubads.g.doubleclick.net/static/glade.js"],
preconnect:["https://partner.googleadservices.com","https://tpc.googlesyndication.com"],clientIdScope:"AMP_ECID_GOOGLE",renderStartImplemented:!0},eas:{prefetch:"https://amp.emediate.eu/amp.v0.js",renderStartImplemented:!0},eplanning:{prefetch:"https://us.img.e-planning.net/layers/epl-amp.js"},ezoic:{prefetch:["https://www.googletagservices.com/tag/js/gpt.js","https://g.ezoic.net/ezoic/ampad.js"],clientIdScope:"AMP_ECID_EZOIC"},f1e:{prefetch:"https://img.ak.impact-ad.jp/util/f1e_amp.min.js"},fake:{},
felmat:{prefetch:"https://t.felmat.net/js/fmamp.js",renderStartImplemented:!0},flite:{},fusion:{prefetch:"https://assets.adtomafusion.net/fusion/latest/fusion-amp.min.js"},genieessp:{prefetch:"https://js.gsspcln.jp/l/amp.js"},gmossp:{prefetch:"https://cdn.gmossp-sp.jp/ads/amp.js"},holder:{prefetch:"https://i.holder.com.ua/js2/holder/ajax/ampv1.js",preconnect:"https://h.holder.com.ua",renderStartImplemented:!0},ibillboard:{},imobile:{prefetch:"https://spamp.i-mobile.co.jp/script/amp.js",preconnect:"https://spad.i-mobile.co.jp"},
improvedigital:{},industrybrains:{prefetch:"https://web.industrybrains.com/js/ads/async/show.js",preconnect:["https://staticd.cdn.industrybrains.com","https://static.industrybrains.com"],renderStartImplemented:!0},inmobi:{prefetch:"https://cf.cdn.inmobi.com/ad/inmobi.secure.js",renderStartImplemented:!0},ix:{prefetch:["https://js-sec.indexww.com/indexJTag.js","https://js-sec.indexww.com/apl/apl6.js"],preconnect:"https://as-sec.casalemedia.com"},kargo:{},kiosked:{renderStartImplemented:!0},kixer:{prefetch:"https://cdn.kixer.com/ad/load.js",
renderStartImplemented:!0},ligatus:{prefetch:"https://ssl.ligatus.com/render/ligrend.js",renderStartImplemented:!0},loka:{prefetch:"https://loka-cdn.akamaized.net/scene/amp.js",preconnect:["https://scene-front.lokaplatform.com","https://loka-materials.akamaized.net"],renderStartImplemented:!0},mads:{prefetch:"https://eu2.madsone.com/js/tags.js"},"mantis-display":{prefetch:"https://assets.mantisadnetwork.com/mantodea.min.js",preconnect:["https://mantodea.mantisadnetwork.com","https://res.cloudinary.com",
"https://resize.mantisadnetwork.com"]},"mantis-recommend":{prefetch:"https://assets.mantisadnetwork.com/recommend.min.js",preconnect:["https://mantodea.mantisadnetwork.com","https://resize.mantisadnetwork.com"]},mediaimpact:{prefetch:"https://ec-ns.sascdn.com/diff/251/pages/amp_default.js",preconnect:["https://ww251.smartadserver.com","https://static.sascdn.com/"],renderStartImplemented:!0},medianet:{preconnect:"https://contextual.media.net",renderStartImplemented:!0},mediavine:{prefetch:"https://www.googletagservices.com/tag/js/gpt.js",
preconnect:["https://partner.googleadservices.com","https://securepubads.g.doubleclick.net","https://tpc.googlesyndication.com"],renderStartImplemented:!0},meg:{renderStartImplemented:!0},microad:{prefetch:"https://j.microad.net/js/camp.js",preconnect:["https://s-rtb.send.microad.jp","https://s-rtb.send.microadinc.com","https://cache.send.microad.jp","https://cache.send.microadinc.com","https://deb.send.microad.jp"]},mixpo:{prefetch:"https://cdn.mixpo.com/js/loader.js",preconnect:["https://player1.mixpo.com",
"https://player2.mixpo.com"]},mywidget:{preconnect:"https://likemore-fe.go.mail.ru",prefetch:"https://likemore-go.imgsmail.ru/widget.amp.js",renderStartImplemented:!0},nativo:{prefetch:"https://s.ntv.io/serve/load.js"},nend:{prefetch:"https://js1.nend.net/js/amp.js",preconnect:["https://output.nend.net","https://img1.nend.net"]},nokta:{prefetch:"https://static.virgul.com/theme/mockups/noktaamp/ampjs.js",renderStartImplemented:!0},openadstream:{},openx:{prefetch:"https://www.googletagservices.com/tag/js/gpt.js",
preconnect:["https://partner.googleadservices.com","https://securepubads.g.doubleclick.net","https://tpc.googlesyndication.com"],renderStartImplemented:!0},outbrain:{renderStartImplemented:!0,prefetch:"https://widgets.outbrain.com/widgetAMP/outbrainAMP.min.js",preconnect:["https://odb.outbrain.com"]},plista:{},popin:{renderStartImplemented:!0},pubmatic:{prefetch:"https://ads.pubmatic.com/AdServer/js/amp.js"},pubmine:{prefetch:["https://s.pubmine.com/head.js","https://s.pubmine.com/showad.js"],preconnect:"https://delivery.g.switchadhub.com",
renderStartImplemented:!0},pulsepoint:{prefetch:"https://ads.contextweb.com/TagPublish/getjs.static.js",preconnect:"https://tag.contextweb.com"},purch:{prefetch:"https://ramp.purch.com/serve/creative_amp.js",renderStartImplemented:!0},relap:{renderStartImplemented:!0},revcontent:{prefetch:"https://labs-cdn.revcontent.com/build/amphtml/revcontent.amp.min.js",preconnect:["https://trends.revcontent.com","https://cdn.revcontent.com","https://img.revcontent.com"],renderStartImplemented:!0},rubicon:{},
sharethrough:{renderStartImplemented:!0},sklik:{prefetch:"https://c.imedia.cz/js/amp.js"},slimcutmedia:{preconnect:["https://sb.freeskreen.com","https://static.freeskreen.com","https://video.freeskreen.com"],renderStartImplemented:!0},smartadserver:{prefetch:"https://ec-ns.sascdn.com/diff/js/amp.v0.js",preconnect:"https://static.sascdn.com",renderStartImplemented:!0},smartclip:{prefetch:"https://cdn.smartclip.net/amp/amp.v0.js",preconnect:"https://des.smartclip.net",renderStartImplemented:!0},sortable:{prefetch:"https://www.googletagservices.com/tag/js/gpt.js",
preconnect:["https://tags-cdn.deployads.com","https://partner.googleadservices.com","https://securepubads.g.doubleclick.net","https://tpc.googlesyndication.com"],renderStartImplemented:!0},sovrn:{prefetch:"https://ap.lijit.com/www/sovrn_amp/sovrn_ads.js"},sunmedia:{prefetch:"https://vod.addevweb.com/sunmedia/amp/ads/sunmedia.js",preconnect:"https://static.addevweb.com",renderStartImplemented:!0},swoop:{prefetch:"https://www.swoop-amp.com/amp.js",preconnect:["https://www.swpsvc.com","https://client.swpcld.com"],
renderStartImplemented:!0},taboola:{},teads:{prefetch:"https://cdn.teads.tv/media/format/v3/teads-format.min.js",preconnect:["https://cdn2.teads.tv","https://a.teads.tv","https://t.teads.tv"]},triplelift:{},valuecommerce:{prefetch:"https://amp.valuecommerce.com/amp_bridge.js",preconnect:["https://ad.jp.ap.valuecommerce.com"],renderStartImplemented:!0},webediads:{prefetch:"https://eu1.wbdds.com/amp.min.js",preconnect:["https://goutee.top","https://mediaathay.org.uk"],renderStartImplemented:!0},"weborama-display":{prefetch:["https://cstatic.weborama.fr/js/advertiserv2/adperf_launch_1.0.0_scrambled.js",
"https://cstatic.weborama.fr/js/advertiserv2/adperf_core_1.0.0_scrambled.js"]},widespace:{},xlift:{prefetch:"https://cdn.x-lift.jp/resources/common/xlift_amp.js",renderStartImplemented:!0},yahoo:{prefetch:"https://s.yimg.com/os/ampad/display.js",preconnect:"https://us.adserver.yahoo.com"},yahoojp:{prefetch:["https://s.yimg.jp/images/listing/tool/yads/ydn/amp/amp.js","https://yads.c.yimg.jp/js/yads.js"],preconnect:"https://yads.yahoo.co.jp"},yieldbot:{prefetch:["https://cdn.yldbt.com/js/yieldbot.intent.amp.js",
"https://msg.yldbt.com/js/ybmsg.html"],preconnect:"https://i.yldbt.com"},yieldmo:{prefetch:"https://static.yieldmo.com/ym.amp1.js",preconnect:["https://s.yieldmo.com","https://ads.yieldmo.com"],renderStartImplemented:!0},yieldone:{prefetch:"https://img.ak.impact-ad.jp/ic/pone/commonjs/yone-amp.js"},zedo:{prefetch:"https://ss3.zedo.com/gecko/tag/Gecko.amp.min.js",renderStartImplemented:!0},zergnet:{},zucks:{preconnect:["https://j.zucks.net.zimg.jp","https://sh.zucks.net","https://k.zucks.net","https://static.zucks.net.zimg.jp"]}};function Ja(a){var b=Ia[a.element.getAttribute("type")],c=b?b.clientIdScope:null;if(!c)return Promise.resolve();var d=Ha(a.getAmpDoc(),"cid").then(function(a){if(a)return a.get(c,Promise.resolve(void 0)).catch(function(a){z().error("AD-CID",a)})});return K(a.win,"timer").timeoutPromise(1E3,d,"cid timeout").catch(function(a){z().warn("AD-CID",a)})};function Ka(a){for(var b=a.nodeName,c=0,d=0,e=a.previousElementSibling;e&&25>d&&100>c;)e.nodeName==b&&d++,c++,e=e.previousElementSibling;return 25>d&&100>c?"."+d:""};function La(a){var b=a.crypto&&(a.crypto.subtle||a.crypto.webkitSubtle);return b&&(ma(a.location)||!1||!1)}function Ma(a){var b;if(!a.ampAdPageCorrelator){var c;c=b;var d=J(a.document,"documentInfo").get().pageViewId,d=Number(d||0);c=c?d+c.replace(/\D/g,"")%1E6*1E6:Math.floor(4503599627370496*Math.random());a.ampAdPageCorrelator=c}return a.ampAdPageCorrelator};function Na(a,b,c,d,e){if(!La(a))return!1;var f=Oa(a,b,c,d.control,d.experiment,d.controlMeasureOnRender),g={},h=[e.control,e.experiment];e.controlMeasureOnRender&&h.push(e.controlMeasureOnRender);g[c]={isTrafficEligible:function(){return!0},branches:h};pa(a,g);if(E(a,c)){var k=a.experimentBranches[c];if(k){Pa(k,b);var m=qa(a);m&&m.addEnabledExperiment(c+"-"+k)}f?Pa("2088461",b):Pa("2088462",b);var p=k==e.experiment||k==d.experiment||"117152632"==k;return p==!Qa(a,b)}return Qa(a,b)}
function Oa(a,b,c,d,e,f){var g="117152632",h=P(b).getParam("exp")||t(a.location.search).exp;if(!h)return!1;var k=(b=/(^|,)(a4a:[^,]*)/.exec(h))&&b[2];if(!k)return!1;b=k.split(":",2)[1];var m={"-1":g,0:null,1:d,2:e,3:f};if(m.hasOwnProperty(b)){b=m[b];a.experimentBranches=a.experimentBranches||{};var p=!!b,r=E(a,c),p=!(void 0!==p?!p:r);p!=r&&(na(a)[c]=p);a.experimentBranches[c]=b;return!0}z().warn("A4A-CONFIG","Unknown a4a URL parameter: ",k," expected one of -1 (manual), 0 (not in experiment), 1 (control branch), or 2 (a4a experiment branch)");
return!1}function Ra(a){return a?a.split(","):[]}function Sa(a){return Ra(a.getAttribute("data-experiment-id")).some(function(a){return"117152632"===a})}function Qa(a,b){switch(b.getAttribute("type")){case "adsense":return E(a,"a4aFastFetchAdSenseLaunched");case "doubleclick":return E(a,"a4aFastFetchDoubleclickLaunched");default:return!1}}function Ta(a){return a.every(function(a){return!isNaN(parseInt(a,10))})}function Ua(a,b){return a&&!isNaN(parseInt(a,10))?b?b+","+a:a:b||""}
function Pa(a,b){var c=b.getAttribute("data-experiment-id");c&&Ta(Ra(c))?b.setAttribute("data-experiment-id",Ua(a,c)):b.setAttribute("data-experiment-id",a)};var Va={control:"117152652",experiment:"117152653",controlMeasureOnRender:"2093326"},Wa={control:"117152670",experiment:"117152671"};var Xa={control:"117152662",experiment:"117152663",controlMeasureOnRender:"2093327"},Ya={control:"2092619",experiment:"2092620",controlMeasureOnRender:"2093327"},Za={control:"117152680",experiment:"117152681"},$a={control:"2092613",experiment:"2092614"};var ab=ea({adsense:function(a,b){return!!b.getAttribute("data-ad-client")&&Na(a,b,"expAdsenseA4A",Va,Wa)},doubleclick:function(a,b){if(b.hasAttribute("useSameDomainRenderingUntilDeprecated"))return!1;var c=b.hasAttribute("data-use-beta-a4a-implementation"),d,e;E(a,"a4aFastFetchDoubleclickLaunched")?(d=Ya,e=$a):(d=Xa,e=Za);var f=Na(a,b,"expDoubleclickA4A",d,e)||c&&(ma(a.location)||!1||!1);f&&c&&!Sa(b)&&b.setAttribute("data-experiment-id","2077831");return f},triplelift:function(a,b){var c;return!!b.getAttribute("data-use-a4a")&&
!!(c=b.getAttribute("src"))&&0==c.indexOf("https://ib.3lift.com/")},cloudflare:function(){return!0}});var Q,bb="Webkit webkit Moz moz ms O o".split(" ");function cb(a,b,c){var d,e=a.style;Q||(Q=ea());var f=Q[b];if(!f){f=b;if(void 0===e[b]){var g=b.charAt(0).toUpperCase()+b.slice(1);a:{for(var h=0;h<bb.length;h++){var k=bb[h]+g;if(void 0!==e[k]){g=k;break a}}g=""}void 0!==e[g]&&(f=g)}Q[b]=f}(b=f)&&(a.style[b]=d?c+d:c)};function db(a,b,c){function d(a){try{return g(a)}catch(m){throw self.reportError(m),m;}}var e=void 0,f=a,g=c,h=e||!1;f.addEventListener(b,d,h);return function(){f&&f.removeEventListener(b,d,h);d=f=g=null}};function eb(a,b,c){var d=c,e=db(a,b,function(a){try{d(a)}finally{d=null,e()}});return e}function fb(a){var b,c;if(a.complete||"complete"==a.readyState||a.document&&"complete"==a.document.readyState)return Promise.resolve(a);var d=new Promise(function(d,f){var e=a.tagName;b="AUDIO"===e||"VIDEO"===e?eb(a,"loadstart",d):eb(a,"load",d);e&&(c=eb(a,"error",f))});return d.then(function(){c&&c();return a},function(){b&&b();var c=a;c&&c.src&&(c=c.src);throw y().createError("Failed to load:",c);})};self.AMPErrors=self.AMPErrors||[];function gb(a){return"fixed"==a||"fixed-height"==a||"responsive"==a||"fill"==a||"flex-item"==a}function hb(a){a=parseFloat(a);return"number"===typeof a&&isFinite(a)?a:void 0};var ib={"AMP-FX-FLYING-CARPET":!0,"AMP-LIGHTBOX":!0,"AMP-STICKY-AD":!0};function jb(a){if(void 0===a.__AMP__AD_CONTAINER){var b=a;do if(b=b.parentElement,ib[b.tagName])return a.__AMP__AD_CONTAINER=b.tagName;while(b&&"BODY"!=b.tagName);a.__AMP__AD_CONTAINER=null}return a.__AMP__AD_CONTAINER};function R(a){this.a=a;this.b=a.element;this.K=a.win.document;this.state=0;this.Z=!!a.getFallback()}R.prototype.init=function(){this.Z||kb(this,"fallback")};R.prototype.setDisplayState=function(a){if(0!=this.state||1==a)switch(a){case 1:this.state=1;this.a.togglePlaceholder(!0);break;case 2:this.state=2;this.a.togglePlaceholder(!1);break;case 3:lb(this);break;case 0:mb(this);break;default:z().error("AmpAdUIHandler","state is not supported")}};
R.prototype.createPlaceholderCallback=function(){return kb(this,"placeholder")};function lb(a){"AMP-STICKY-AD"==jb(a.b)?(a.a.collapse(),a.state=3):a.a.attemptCollapse().then(function(){a.state=3},function(){a.a.deferMutate(function(){0!=a.state&&(a.a.togglePlaceholder(!1),a.a.toggleFallback(!0),a.state=3)})})}function mb(a){a.state=0;a.a.deferMutate(function(){0==a.state&&(a.a.togglePlaceholder(!0),a.a.toggleFallback(!1))})}
function kb(a,b){if("AMP-EMBED"==a.b.tagName)return null;var c=a.K.createElement("div");c.setAttribute(b,"");var d=a.K.createElement("div");d.classList.add("i-amphtml-ad-default-holder");E(a.a.win,"ad-loader-v1")&&d.setAttribute("experiment1","");E(a.a.win,"ad-loader-v2")&&d.setAttribute("experiment2","");c.appendChild(d);a.a.element.appendChild(c);return c}
R.prototype.updateSize=function(a,b,c,d){var e,f;a=parseInt(a,10);isNaN(a)||(e=Math.max(this.b.offsetHeight+a-c,a));b=parseInt(b,10);isNaN(b)||(f=Math.max(this.b.offsetWidth+b-d,b));var g={success:!0,newWidth:f,newHeight:e};return e||f?"AMP-STICKY-AD"==jb(this.b)?(g.success=!1,Promise.resolve(g)):this.a.attemptChangeSize(e,f).then(function(){return g},function(){g.success=!1;return g}):Promise.reject(Error("undefined width and height"))};AMP.AmpAdUIHandler=R;function nb(a){var b=a.performance&&a.performance.timing;if(b&&0!=b.navigationStart&&(a=b.navigationStart,"number"===typeof a&&isFinite(a)))return 0>a?"":a};function ob(a){void 0===a["3pla"]&&(a["3pla"]=0);a["3pla"]++;K(a,"timer").delay(function(){a["3pla"]--},1E3)};function pb(a,b,c){if(!(0==b&&0==c||0==a.width&&0==a.height)){b=a.left+b;c=a.top+c;var d=a.width;a=a.height;a={left:b,top:c,width:d,height:a,bottom:c+a,right:b+d}}return a};function qb(a,b){try{return JSON.parse(a)}catch(c){b&&b(c)}};var S={};
function rb(a,b,c){var d=b.getAttribute("type");y().assert(d,"Attribute type required for <amp-ad>: %s",b);for(var e=0,f=a;f&&f!=f.parent;f=f.parent)e++;for(var e=String(e)+"-"+sb(a),g=f={},h=0;h<b.attributes.length;h++){var k=b.attributes[h];0==k.name.indexOf("data-")&&(g[k.name.substr(5).replace(/-([a-z])/g,aa)]=k.value)}if(h=b.getAttribute("json")){h=qb(h);if(void 0===h)throw y().createError("Error parsing JSON in json attribute in element %s",b);for(var m in h)g[m]=h[m]}m=f;f=Date.now();g=b.getAttribute("width");
h=b.getAttribute("height");m=m?m:{};m.width=hb(g);m.height=hb(h);var p=a.location.href;"about:srcdoc"==p&&(p=a.parent.location.href);for(var r=J(b,"documentInfo").get(),q=P(b),g=q.getUnconfirmedReferrerUrl(),v=b.getPageLayoutBox?b.getPageLayoutBox():b.getLayoutBox(),h=m,k=r.sourceUrl,C=r.canonicalUrl,r=r.pageViewId,p={href:p},Ib=b.tagName,Jb={localDev:!1,development:w().development,filter:w().filter,minified:!0,lite:w().lite,test:!1,log:w().log,version:w().version,rtvVersion:w().rtvVersion},Kb=!(!a.AMP_CONFIG||
!a.AMP_CONFIG.canary),q=!q.isVisible(),v=v?{left:v.left,top:v.top,width:v.width,height:v.height}:null,Lb=b.getIntersectionChangeEntry(),u=b,X=[],F=0;u&&1==u.nodeType&&25>F;){var G="";u.id&&(G="/"+u.id);var Mb=u.nodeName.toLowerCase();X.push(""+Mb+G+Ka(u));F++;u=u.parentElement}u=X.join();X=u.length;F=5381;for(G=0;G<X;G++)F=33*F^u.charCodeAt(G);h._context={ampcontextVersion:"1493855940942",ampcontextFilepath:ha+"/1493855940942/ampcontext-v0.js",sourceUrl:k,referrer:g,canonicalUrl:C,
pageViewId:r,location:p,startTime:f,tagName:Ib,mode:Jb,canary:Kb,hidden:q,initialLayoutRect:v,initialIntersection:Lb,domFingerprint:String(F>>>0),experimentToggles:na(a)};m._context.sentinel=e;if(a=b.getAttribute("src"))m.src=a;f=m;f.type=d;Object.assign(f._context,c);return f}
function tb(a,b,c){c=rb(a,b,c);var d=a.document.createElement("iframe");S[c.type]||(S[c.type]=0);S[c.type]+=1;a=ub(a);var e=B(a).hostname,f=JSON.stringify({host:e,type:c.type,count:S[c.type],attributes:c});d.src=a;d.ampLocation=B(a);d.name=f;c.width&&(d.width=c.width);c.height&&(d.height=c.height);d.setAttribute("scrolling","no");cb(d,"border","none");d.onload=function(){this.readyState="complete"};d.setAttribute("data-amp-3p-sentinel",c._context.sentinel);return d}
function vb(a,b){a=ub(a);b.preload(a,"document");var c=fa+"/1493855940942/f.js";b.preload(c,"script")}
function ub(a){var b,c=a.bootstrapBaseUrl;if(c)a=c;else{var d;d=b;var e=a.document.querySelector('meta[name="amp-3p-iframe-src"]');if(e){var f=e.getAttribute("content"),g;g=void 0===g?"source":g;y().assert(null!=f,"%s %s must be available",e,g);y().assert(la(f)||/^(\/\/)/.test(f),'%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s',e,g,f);y().assert(-1==f.indexOf("?"),"3p iframe url must not include query string %s in element %s.",
f,e);g=B(f);y().assert("localhost"==g.hostname&&!d||g.origin!=B(a.location.href).origin,"3p iframe url must not be on the same origin as the current document %s (%s) in element %s. See https://github.com/ampproject/amphtml/blob/master/spec/amp-iframe-origin-policy.md for details.",f,g.origin,e);d=f+"?1493855940942"}else d=null;d||(d="https://d-"+sb(a)+("."+ga+"/1493855940942/")+"frame.html");a=a.bootstrapBaseUrl=d}return a}
function sb(a){var b;if(a.crypto&&a.crypto.getRandomValues){var c=new Uint32Array(2);a.crypto.getRandomValues(c);b=String(c[0])+c[1]}else b=String(a.Math.random()).substr(2)+"0";return b};var wb={adSlotCleared:"-1",urlBuilt:"1",adRequestStart:"2",adRequestEnd:"3",extractCreativeAndSignature:"4",adResponseValidateStart:"5",renderFriendlyStart:"6",renderCrossDomainStart:"7",renderFriendlyEnd:"8",renderCrossDomainEnd:"9",preAdThrottle:"10",renderSafeFrameStart:"11",throttled3p:"12",adResponseValidateEnd:"13",xDomIframeLoaded:"14",friendlyIframeLoaded:"15",adSlotCollapsed:"16",adSlotUnhidden:"17",layoutAdPromiseDelay:"18",signatureVerifySuccess:"19",networkError:"20",friendlyIframeIniLoad:"21",
visHalf:"22",visHalfIniLoad:"23",firstVisible:"24",visLoadAndOneSec:"25",iniLoad:"26"};function xb(a){var b=!0;if(b=void 0===b?!1:b){var c=L(a);K(c.win,"extensions").loadExtension("amp-analytics")}return Ga(a)};function yb(){this.A=Object(null)}l=yb.prototype;l.addPingsForVisibility=function(){};l.sendPing=function(){};l.setPingParameter=function(a,b){null!=a&&""!==a&&null!==b&&void 0!==b&&""!==b&&(this.A[a]=String(b))};l.setPingParameters=function(a){for(var b in a)a.hasOwnProperty(b)&&this.setPingParameter(b,a[b])};l.reset=function(){this.A=Object(null)};l.getInitTime=function(){};l.getDeltaTime=function(){};
function T(a,b,c,d){var e=this;this.A=Object(null);this.da=a;this.b=b;this.N=c;this.S=d;this.X=Ma(a);this.ca=this.N+"."+this.S;var f,g=nb(a)||Date.now();this.C=f="number"==typeof g?g:Number(g);this.getDeltaTime=a.performance&&a.performance.now.bind(a.performance)||function(){return Date.now()-e.C};this.O="https://csi.gstatic.com/csi";this.ba=ra(b);this.m=P(b)}n(T,yb);T.prototype.setPingAddress=function(a){this.O=a};
T.prototype.sendPing=function(a){var b=wb[a]||9999,c=Math.round(this.getDeltaTime()),d;d=this.A;var e=[],f;for(f in d){var g=d[f];if(null!=g)if(Array.isArray(g))for(var h=0;h<g.length;h++){var k=g[h];e.push(encodeURIComponent(f)+"="+encodeURIComponent(k))}else e.push(encodeURIComponent(f)+"="+encodeURIComponent(g))}d=e.join("&");""!=d&&(d=this.ba.expandStringSync(d,{AD_SLOT_NAMESPACE:this.N,AD_SLOT_ID:this.S,AD_SLOT_TIME_TO_EVENT:c,AD_SLOT_EVENT_NAME:a,AD_SLOT_EVENT_ID:b,AD_PAGE_CORRELATOR:this.X,
AD_PAGE_VISIBLE:this.m.isVisible()?1:0,AD_PAGE_FIRST_VISIBLE_TIME:Math.round(this.m.getFirstVisibleTime()-this.C),AD_PAGE_LAST_VISIBLE_TIME:Math.round(this.m.getLastVisibleTime()-this.C)}));if(a=d?this.O+"?"+d:"")b=this.b.ownerDocument.createElement("img"),b.setAttribute("src",a),b.setAttribute("style","position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden"),b.setAttribute("aria-hidden","true"),this.b.parentNode.insertBefore(b,
this.b),z().info("PING",a)};T.prototype.getInitTime=function(){return this.C};
T.prototype.addPingsForVisibility=function(a){var b=this;xb(a).then(function(c){var d=a.signals(),e=Promise.race([d.whenSignal("ini-load"),d.whenSignal("load-end")]),f=c.getAnalyticsRoot(a).getVisibilityManager();f.listenElement(a,{visiblePercentageMin:50},null,null,function(){b.sendPing("visHalf")});f.listenElement(a,{visiblePercentageMin:50},e,null,function(){b.sendPing("visHalfIniLoad")});f.listenElement(a,{visiblePercentageMin:1},null,null,function(){b.sendPing("firstVisible")});f.listenElement(a,
{waitFor:"ini-load"},e,null,function(){b.sendPing("iniLoad")});f.listenElement(a,{visiblePercentageMin:1,waitFor:"ini-load",totalTimeMin:1E3},e,null,function(){b.sendPing("visLoadAndOneSec")})})};var zb={a4aProfilingRate:{isTrafficEligible:function(){return!0},branches:["unused","unused"]}};function Ab(a){var b=Ra(a.element.getAttribute("data-experiment-id")),c={},d=(c[Va.experiment]=1,c[Wa.experiment]=1,c[Xa.experiment]=1,c[Za.experiment]=1,c[Ya.experiment]=1,c[$a.experiment]=1,c),c={},e=(c[Va.control]=1,c[Wa.control]=1,c[Xa.control]=1,c[Za.control]=1,c[Ya.control]=1,c[$a.control]=1,c);return b.some(function(a){return a in e})};function Bb(a){if(!Cb(a))return null;var b=a.indexOf("{");try{return JSON.parse(a.substr(b))}catch(c){return z().error("MESSAGING","Failed to parse message: "+a,c),null}}function Cb(a){return"string"==typeof a&&0==a.indexOf("amp-")&&-1!=a.indexOf("{")};function Db(a,b){var c=b.data;if("string"==typeof c&&0==c.indexOf("a2a;")){var d=b.origin,c=JSON.parse(c.substr(4));b=b.source;var e=a.document.activeElement;y().assert("IFRAME"==e.tagName,"A2A request with invalid active element %s %s %s",e,c.url,d);for(var f=!1,g=b,h=e.contentWindow;g!=a.top;){if(g==h){f=!0;break}g=g.parent}y().assert(f,"A2A request from invalid source win %s %s",c.url,d);y().assert(Ba(e),"A2A request from non-ad frame %s %s",c.url,d);y().assert(ma(c.url),"Invalid ad A2A URL %s %s",
c.url,d);P(a.document).navigateTo(c.url,"ad-"+d)}};var Eb=["script","style"],Fb="amp-accordion amp-app-banner amp-carousel amp-fit-text amp-form amp-selector amp-sidebar".split(" "),Gb="action alt class disabled height href id name placeholder readonly src tabindex title type value width".split(" ");
function Hb(a,b,c){for(var d=[a],e=b.filter(function(a){return Gb.includes(a)});0<d.length;)if(a=d.pop(),"string"===typeof a)c.push(a);else if(a.nodeType===Node.TEXT_NODE)c.push(a.textContent);else if(a.nodeType===Node.ELEMENT_NODE&&Nb(a))for(Ob(a,e,c),d.push("</"+a.tagName.toLowerCase()+">"),a=a.lastChild;a;a=a.previousSibling)d.push(a)}
function Nb(a){var b=a.tagName.toLowerCase();return(4>b.length?0:0==b.lastIndexOf("amp-",0))?!(!Fb.includes(b)||!a.textContent):!(Eb.includes(b)||!a.textContent)}function Ob(a,b,c){c.push("<"+a.tagName.toLowerCase());b.forEach(function(b){a.hasAttribute(b)&&c.push(" "+b+'="'+a.getAttribute(b)+'"')});c.push(">")};function Pb(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d];b(e,d,a)||(c.push(e),a.splice(d,1),d--)}};function Qb(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 Rb(a,b,c){var d=B(b.src).origin,e=c?b.getAttribute("data-amp-3p-sentinel"):"amp";a=Qb(a,e,!0);for(var f,e=0;e<a.length;e++){var g=a[e];if(g.frame===b){f=g;break}}f||(f={frame:b,origin:d,events:Object.create(null)},a.push(f));return f.events}
function Sb(a){for(var b={sentinel:"unlisten"},c=a.length-1;0<=c;c--){var d=a[c];if(!d.frame.contentWindow){a.splice(c,1);var e=d.events,f;for(f in e)e[f].splice(0,Infinity).forEach(function(a){a(b)})}}}
function Tb(a){if(!a.listeningFors){var b=function(b){if(b.data){var c=Ub(b.data);if(c&&c.sentinel){var e;e=c.sentinel;var f=b.origin,g=b.source,h=Qb(a,e);if(h){for(var k,m=0;m<h.length;m++){var p=h[m],r=p.frame.contentWindow;if(r)if("amp"===e){if(p.origin===f&&r==g){k=p;break}}else{var q;if(!(q=g==r))b:{for(q=g;q&&q!=q.parent;q=q.parent)if(q==r){q=!0;break b}q=!1}if(q){k=p;break}}else setTimeout(Sb,0,h)}e=k?k.events:null}else e=h;var v=e;if(v){var C=v[c.type];if(C)for(C=C.slice(),e=0;e<C.length;e++)(0,C[e])(c,
b.source,b.origin)}}}};a.addEventListener("message",b)}}function U(a,b,c,d,e){function f(b,d,f){if(e||d==a.contentWindow)"unlisten"==b.sentinel?k():c(b,d,f)}var g=a.ownerDocument.defaultView;Tb(g);d=Rb(g,a,d);var h=d[b]||(d[b]=[]),k;h.push(f);return k=function(){if(f){var a=h.indexOf(f);-1<a&&h.splice(a,1);c=h=f=null}}}
function V(a,b){var c=[];"string"==typeof b&&(b=[b]);return new Promise(function(d){for(var e=0;e<b.length;e++){var f=U(a,b[e],function(a,b,e){for(var f=0;f<c.length;f++)c[f]();d({data:a,source:b,origin:e})},!0);c.push(f)}})}function Vb(a,b,c,d,e){if(a.contentWindow){d.type=c;d.sentinel=e?a.getAttribute("data-amp-3p-sentinel"):"amp";var f=d;e&&(f="amp-"+JSON.stringify(d));for(a=0;a<b.length;a++)c=b[a],c.win.postMessage(f,c.origin)}}
function Ub(a){"string"==typeof a&&(a="{"==a.charAt(0)?qb(a,function(a){z().warn("IFRAME-HELPER","Postmessage could not be parsed. Is it in a valid JSON format?",a)})||null:Cb(a)?Bb(a):null);return a}function W(a,b,c,d){var e=this;this.H=a;this.I=c;this.u=[];this.aa=U(this.H,b,function(a,b,c){e.u.some(function(a){return a.win==b})||e.u.push({win:b,origin:c});d(a,b,c)},this.I,this.I)}W.prototype.send=function(a,b){Pb(this.u,function(a){return!!a.win.parent});Vb(this.H,this.u,a,b,this.I)};
W.prototype.destroy=function(){this.aa();this.u.length=0};function Y(a,b,c){var d=this;this.o=a;this.T=K(a.win,"timer");this.inViewport_=this.R=!1;this.i=[];this.B=0;this.V=this.L.bind(this);this.P=new W(b,"send-intersections",c||!1,function(){return Wb(d)});this.h=null}Y.prototype.fire=function(){if(this.R){var a=this.o.element.getIntersectionChangeEntry();0<this.i.length&&this.i[this.i.length-1].time==a.time||(this.i.push(a),this.B||(this.L(),this.B=this.T.delay(this.V,100)))}};
function Wb(a){a.R=!0;a.o.getVsync().measure(function(){if(a.o.isInViewport())a.onViewportCallback(!0);a.fire()})}Y.prototype.onViewportCallback=function(a){if(this.inViewport_!=a)if(this.inViewport_=a,this.fire(),a){var b=this.fire.bind(this),c=this.o.getViewport().onScroll(b),d=this.o.getViewport().onChanged(b);this.h=function(){c();d()}}else this.h&&(this.h(),this.h=null)};Y.prototype.L=function(){this.B=0;this.i.length&&(this.P.send("intersection",{changes:this.i}),this.i.length=0)};
Y.prototype.destroy=function(){this.T.cancel(this.B);this.h&&(this.h(),this.h=null);this.P.destroy()};function Xb(a){this.a=a;this.b=a.element;this.J=a.uiHandler;this.l=this.g=this.iframe=null;this.w=[];this.m=P(this.a.getAmpDoc())}l=Xb.prototype;
l.init=function(a,b){var c=this;this.iframe=a;this.iframe.setAttribute("scrolling","no");this.a.applyFillContent(this.iframe);var d=K(this.a.win,"timer");this.g=new Y(this.a,this.iframe,!0);this.l=new W(this.iframe,"send-embed-state",!0,function(){return Yb(c,c.a.isInViewport())});V(this.iframe,"entity-id").then(function(a){c.b.creativeId=a.data.id});this.w.push(U(this.iframe,"get-html",function(a,b,d){if(c.iframe){var e=a.selector,f=a.attributes,g=a.messageId;a="";c.b.hasAttribute("data-html-access-allowed")&&
(e=c.a.win.document.querySelector(e),a=[],e&&Hb(e,f,a),a=a.join("").replace(/\s{2,}/g," "));Vb(c.iframe,[{win:b,origin:d}],"get-html-result",{content:a,messageId:g},!0)}},!0,!1));this.w.push(U(this.iframe,"embed-size",function(a,b,d){Zb(c,a.height,a.width,b,d)},!0,!0));this.w.push(this.m.onVisibilityChanged(function(){Yb(c,c.a.isInViewport())}));var e=fb(this.iframe).then(function(){c.iframe&&(c.iframe.readyState="complete");return d.promise(10)});this.a.emitLifecycleEvent&&e.then(function(){c.a.emitLifecycleEvent("xDomIframeLoaded")});
var f,g=new Promise(function(a){f=a}),h,k=new Promise(function(a){h=a});this.a.config&&this.a.config.renderStartImplemented?V(this.iframe,["render-start","no-content"]).then(function(a){"render-start"==a.data.type?($b(c,a),f()):(ac(c),h())}):(V(this.iframe,"bootstrap-loaded").then(function(){$b(c);f()}),V(this.iframe,"no-content").then(function(){ac(c);h()}));V(this.iframe,"ini-load").then(function(){c.a.signals().signal("ini-load")});if(b)return this.b.appendChild(this.iframe),e;cb(this.iframe,"visibility",
"hidden");this.b.appendChild(this.iframe);Promise.race([g,e,d.promise(1E4)]).then(function(){c.iframe&&(cb(c.iframe,"visibility",""),c.a.emitLifecycleEvent&&c.a.emitLifecycleEvent("adSlotUnhidden"))});this.a.lifecycleReporter.addPingsForVisibility(this.b);return Promise.race([e,k])};function $b(a,b){a.J.setDisplayState(2);a.a.renderStarted();if(b){var c=b.data;Zb(a,c.height,c.width,b.source,b.origin);a.a.emitLifecycleEvent&&a.a.emitLifecycleEvent("renderCrossDomainStart")}}
l.freeXOriginIframe=function(a){this.W();if(!a&&this.iframe){var b=this.iframe;b.parentElement&&b.parentElement.removeChild(b);this.iframe=null}};function ac(a){a.iframe&&(a.freeXOriginIframe(0<=a.iframe.name.indexOf("_master")),a.J.setDisplayState(3))}l.W=function(){this.w.forEach(function(a){return a()});this.w.length=0;this.l&&(this.l.destroy(),this.l=null);this.g&&(this.g.destroy(),this.g=null)};
function Zb(a,b,c,d,e){a.a.getVsync().mutate(function(){a.iframe&&a.J.updateSize(b,c,a.iframe.offsetHeight,a.iframe.offsetWidth).then(function(b){a.iframe&&Vb(a.iframe,[{win:d,origin:e}],b.success?"embed-size-changed":"embed-size-denied",{requestedWidth:b.newWidth,requestedHeight:b.newHeight},!0)},function(){})})}function Yb(a,b){a.l&&a.l.send("embed-state",{inViewport:b,pageHidden:!a.m.isVisible()})}l.viewportCallback=function(a){if(this.g)this.g.onViewportCallback(a);Yb(this,a)};
l.onLayoutMeasure=function(){this.g&&this.g.fire()};AMP.AmpAdXOriginIframeHandler=Xb;function bc(a){AMP.BaseElement.call(this,a);this.Y=this.$=this.f=this.uiHandler=this.config=this.H=null;this.M=!1;this.g=this.h=this.G=null;this.F=void 0;this.D=null;a=this.element.getAttribute("data-amp-slot-index");var b=this.element.getAttribute("type"),c=this.win;pa(c,zb);a=("doubleclick"==b||"adsense"==b)&&Ab(this)&&E(c,"a4aProfilingRate")?new T(c,this.element,"amp",Number(a)):new yb;a.setPingParameters({s:"AD_SLOT_NAMESPACE",dt:"NAV_TIMING(navigationStart)",v:"2",c:"AD_PAGE_CORRELATOR",rls:"AMP_VERSION",
v_h:"VIEWPORT_HEIGHT",s_t:"SCROLL_TOP",slotId:"AD_SLOT_ID",stageName:"AD_SLOT_EVENT_NAME",stageIdx:"AD_SLOT_EVENT_ID","met.AD_SLOT_NAMESPACE.AD_SLOT_ID":"AD_SLOT_EVENT_NAME.AD_SLOT_TIME_TO_EVENT","e.AD_SLOT_ID":this.element.getAttribute("data-experiment-id"),"adt.AD_SLOT_ID":this.element.getAttribute("type"),"met.AD_SLOT_NAMESPACE":"firstVisibleTime.AD_PAGE_FIRST_VISIBLE_TIME,lastVisibleTime.AD_PAGE_LAST_VISIBLE_TIME"});this.lifecycleReporter=a}n(bc,AMP.BaseElement);l=bc.prototype;l.getPriority=function(){return 2};
l.renderOutsideViewport=function(){if(this.win["3pla"])return!1;var a="prefer-viewability-over-views"==this.element.getAttribute("data-loading-strategy")?1.25:null;return null!==a?a:AMP.BaseElement.prototype.renderOutsideViewport.call(this)};l.isLayoutSupported=function(a){return gb(a)};
l.buildCallback=function(){this.$=this.getPlaceholder();this.Y=this.getFallback();var a=this.element.getAttribute("type");this.config=Ia[a];y().assert(this.config,'Type "'+a+'" is not supported in amp-ad');this.uiHandler=new R(this);this.uiHandler.init();a=this.win;a.a2alistener||(a.a2alistener=!0,E(a,"alp")&&a.addEventListener("message",Db.bind(null,a)))};
l.preconnectCallback=function(a){var b=this;vb(this.win,this.preconnect);"string"==typeof this.config.prefetch?this.preconnect.preload(this.config.prefetch,"script"):this.config.prefetch&&this.config.prefetch.forEach(function(a){b.preconnect.preload(a,"script")});"string"==typeof this.config.preconnect?this.preconnect.url(this.config.preconnect,a):this.config.preconnect&&this.config.preconnect.forEach(function(c){b.preconnect.url(c,a)});var c=this.element.getAttribute("src");c&&this.preconnect.url(c)};
l.onLayoutMeasure=function(){var a=this.win,b=!1,c=0,d=this.element;do{if(ib[d.tagName])c++,b=!1;else{var e=(a.getComputedStyle(d)||ea()).position;"fixed"!=e&&"sticky"!=e||(b=!0)}d=d.parentElement}while(d&&"BODY"!=d.tagName);this.M=!(!b&&1>=c);void 0===this.F&&(this.F=jb(this.element));cc(this);if(this.f)this.f.onLayoutMeasure()};function cc(a){if(a.f&&a.f.iframe){var b=a.getViewport().getLayoutRect(a.f.iframe),c=a.getLayoutBox();a.G=pb(b,-c.left,-c.top)}}
l.getIntersectionElementLayoutBox=function(){if(!this.f||!this.f.iframe)return AMP.BaseElement.prototype.getIntersectionElementLayoutBox.call(this);var a=this.getLayoutBox();this.G||cc(this);return pb(this.G,a.left,a.top)};
l.layoutCallback=function(){var a=this;if(this.D)return this.D;this.emitLifecycleEvent("preAdThrottle");y().assert(!this.M,"<amp-ad> is not allowed to be placed in elements with position:fixed: %s",this.element);ob(this.win);return this.D=Ja(this).then(function(b){a.uiHandler.setDisplayState(1);b={clientId:b||null,container:a.F};a.emitLifecycleEvent("adRequestStart");b=tb(a.element.ownerDocument.defaultView,a.element,b);a.f=new Xb(a);return a.f.init(b)})};l.viewportCallback=function(a){this.f&&this.f.viewportCallback(a)};
l.unlayoutCallback=function(){this.D=null;this.uiHandler.setDisplayState(0);this.f&&(this.f.freeXOriginIframe(),this.f=null);this.emitLifecycleEvent("adSlotCleared");return!0};l.createPlaceholderCallback=function(){return this.uiHandler.createPlaceholderCallback()};l.emitLifecycleEvent=function(a,b){b&&this.lifecycleReporter.setPingParameters(b);this.lifecycleReporter.sendPing(a)};var dc={},ec=null;function fc(a){AMP.BaseElement.call(this,a);this.U=a.getAttribute("data-url");this.j=a.getAttribute("data-slot");this.uiHandler=null}n(fc,AMP.BaseElement);l=fc.prototype;l.getPriority=function(){return 2};l.isLayoutSupported=function(a){return gb(a)};
l.buildCallback=function(){var a=this.element.querySelectorAll("template");y().assert(0<a.length,"Missing template in custom ad");y().assert(null===this.j||this.j.match(/^[0-9a-z]+$/),"custom ad slot should be alphanumeric: "+this.j);this.uiHandler=new R(this);this.uiHandler.init()};
l.layoutCallback=function(){var a=this,b=gc(this);b in dc||(dc[b]=K(this.win,"xhr").fetchJson(b));return dc[b].then(function(b){a.uiHandler.setDisplayState(1);var c=a.element,e=b;null!==a.j&&(e=b.hasOwnProperty(a.j)?b[a.j]:null);null!==e&&"object"==typeof e?(a.uiHandler.setDisplayState(2),K(a.win,"templates").findAndRenderTemplate(c,e).then(function(a){for(;c.firstChild;)c.removeChild(c.firstChild);c.appendChild(a)})):a.uiHandler.setDisplayState(3)})};
l.unlayoutCallback=function(){this.uiHandler.setDisplayState(0);return!0};
function gc(a){if(null===a.j)return a.U;if(null===ec){ec={};for(var b={},c=Da(a.element)[0].querySelectorAll("amp-ad[type=custom]"),d=0;d<c.length;d++){var e=c[d],f=e.getAttribute("data-url"),e=e.getAttribute("data-slot");null!==e&&(f in b||(b[f]=[]),b[f].push(encodeURIComponent(e)))}for(var g in b)c=ec,f=g,d=b[g].join(","),(d=encodeURIComponent("ampslots")+"="+encodeURIComponent(d))?(f=f.split("#",2),e=f[0].split("?",2),d=e[0]+(e[1]?"?"+e[1]+"&"+d:"?"+d),d+=f[1]?"#"+f[1]:""):d=f,c[g]=d}return ec[a.U]}
;function Z(a){AMP.BaseElement.apply(this,arguments)}n(Z,AMP.BaseElement);Z.prototype.isLayoutSupported=function(){return!0};
Z.prototype.upgradeCallback=function(){var a=this,b=this.element.getAttribute("data-consent-notification-id");return(b?Ea(this.win).then(function(a){return a.get(b)}):Promise.resolve()).then(function(){var b=a.element.getAttribute("type"),d="custom"===b&&E(a.win,"ad-type-custom");y().assert(d||da.call(Ia,b)||da.call(ab,b),'Unknown ad type "'+b+'"');if(d)return new fc(a.element);window.ampAdSlotIdCounter=window.ampAdSlotIdCounter||0;var e=window.ampAdSlotIdCounter++;a.element.setAttribute("data-amp-slot-index",
e);if(!ab[b]||a.win.document.querySelector("meta[name=amp-3p-iframe-src]")||!ab[b](a.win,a.element))return new bc(a.element);var f="amp-ad-network-"+b+"-impl";a.element.setAttribute("data-a4a-upgrade-type",f);return K(a.win,"extensions").loadElementClass(f).then(function(b){return new b(a.element)}).catch(function(c){var d=a.element.tagName;y().error(d,"Unable to load ad implementation for type ",b,", falling back to 3p, error: ",c);return new bc(a.element)})})};AMP.registerElement("amp-ad",Z,'amp-ad iframe,amp-embed iframe{border:0!important;margin:0!important;padding:0!important}.i-amphtml-ad-default-holder{position:absolute;left:0;right:0;top:0;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background-color:hsla(0,0%,78%,.5)}.i-amphtml-ad-default-holder[experiment1]{background-color:rgba(0,0,0,.01)}.i-amphtml-ad-default-holder[experiment2]{background-color:hsla(0,0%,78%,.05)}.i-amphtml-ad-default-holder:after{content:"Ad";background-color:rgba(0,0,0,.5);border-radius:2px;color:#fff;font-size:16px;line-height:1;font-family:Arial,sans-serif;padding:2px 4px}.i-amphtml-ad-default-holder[experiment1]:after,.i-amphtml-ad-default-holder[experiment2]:after{font-size:10px;color:#696969;background-color:transparent;border:1px solid #696969;padding:3px 4px 1px}amp-ad[data-a4a-upgrade-type=amp-ad-network-doubleclick-impl]>iframe,amp-ad[type=adsense]>iframe{top:50%!important;left:50%!important;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}amp-ad[data-a4a-upgrade-type=amp-ad-network-adsense-impl]>iframe,amp-ad[data-a4a-upgrade-type=amp-ad-network-doubleclick-impl]>iframe{min-height:0;min-width:0}\n/*# sourceURL=/extensions/amp-ad/0.1/amp-ad.css*/');
AMP.registerElement("amp-embed",Z);
})});
//# sourceMappingURL=amp-ad-0.1.js.map

