self.AMP_CONFIG={"v":"012207281718002","type":"production","allow-doc-opt-in":["amp-next-page"],"allow-url-opt-in":[],"canary":0,"a4aProfilingRate":0.01,"doubleclickSraExp":0.01,"doubleclickSraReportExcludedBlock":0.1,"flexAdSlots":0.05,"flexible-bitrate":0.1,"ios-fixed-no-transfer":0,"story-ad-placements":0.01,"story-disable-animations-first-page":1,"story-load-inactive-outside-viewport":1,"amp-sticky-ad-to-amp-ad-v4":0,"story-video-cache-apply-audio":0,"amp-story-subscriptions":1,"esm":1};/*AMP_CONFIG*/self.AMP_EXP={"flexible-bitrate":0.1,"amp-story-first-page-max-bitrate":0.3,"story-disable-animations-first-page":1,"story-load-first-page-only":1,"story-load-inactive-outside-viewport":1,"story-ad-page-outlink":0.02,"amp-geo-ssr":1,"story-remote-localization":1,"amp-story-subscriptions":1};/*AMP_EXP*/; self,self.AMP=self.AMP||[];try{AMP._=AMP._||{},self.AMP&&!Array.isArray(self.AMP)||(()=>{var t,i=class{constructor(){this.bt=new s}abort(){if(!this.bt.gt&&(this.bt.gt=!0,this.bt.vt)){const t={"type":"abort","bubbles":!1,"cancelable":!1,"target":this.bt,"currentTarget":this.bt};this.bt.vt(t)}}get signal(){return this.bt}},s=class{constructor(){this.gt=!1,this.vt=null}get aborted(){return this.gt}get onabort(){return this.vt}set onabort(t){this.vt=t}};function e(){return t||(t=Promise.resolve(void 0))}var n=class{constructor(){this.promise=new Promise(((t,i)=>{this.resolve=t,this.reject=i}))}};function r(t){return new Promise((i=>{i(t())}))}function h(t){const i=Object.getOwnPropertyDescriptor(t,"message");if(null!=i&&i.writable)return t;const{message:s,stack:e}=t,n=new Error(s);for(const i in t)n[i]=t[i];return n.stack=e,n}function o(t){let i=null,s="";for(const t of arguments)t instanceof Error&&!i?i=h(t):(s&&(s+=" "),s+=t);return i?s&&(i.message=s+": "+i.message):i=new Error(s),i}function u(t){var i,s;null===(i=(s=self).__AMP_REPORT_ERROR)||void 0===i||i.call(s,t)}function l(t){const i=o.apply(null,arguments);setTimeout((()=>{throw u(i),i}))}function c(t){const i=o.apply(null,arguments);return i.expected=!0,i}var{hasOwnProperty:a,toString:d}=Object.prototype;function f(t){return"[object Object]"===d.call(t)}function p(t){const i=Object.create(null);return t&&Object.assign(i,t),i}function m(t,i){return a.call(t,i)}function _(t){const i=p();for(const s in t){if(!m(t,s))continue;const e=t[s];i[s]=f(e)?_(e):e}return i}function A(t,i,s){return i in t?Object.defineProperty(t,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[i]=s,t}function P(t,i){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);i&&(e=e.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),s.push.apply(s,e)}return s}function g(t){for(var i=1;i=0&&t.indexOf(i,s)==s}function y(t){return"string"==typeof t}function b(t){return 1==(null==t?void 0:t.nodeType)}function w(t){return"number"==typeof t&&isFinite(t)}var V="​​​",S="​​​​";function x(t){return b(t)?(t=t).tagName.toLowerCase()+(t.id?`#${t.id}`:""):t}function O(t){return t.indexOf(V)>=0}function C(t){return t.replace(V,"")}function k(t,i,s="Assertion failed",e){var n,r;if(i)return i;t&&-1==s.indexOf(t)&&(s+=t);let h=3;const o=s.split("%s");let u=o.shift();const l=[u];for(;o.length;){const t=arguments[h++],i=o.shift();u+=x(t)+i,l.push(t,i.trim())}const c=new Error(u);throw c.messageArray=T(l,(t=>""!==t)),null===(n=(r=self).__AMP_REPORT_ERROR)||void 0===n||n.call(r,c),c}function N(t,i,s,e,n){return v(n)?t(s,n.concat([i])):t(s,`${n||e}: %s`,i),i}function D(t,i,s,e,n,r,h,o,u,l,c){return t}function L(t,i){return t}function U(t,i){return t}function $(t,i){return t}function F(t,i,s,e,n,r,h,o,u,l,c){return k(V,t,i,s,e,n,r,h,o,u,l,c)}function B(t){return JSON.parse(t)}function H(t){const i=new Uint8Array(t.length);for(let s=0;s0?e=t.setTimeout(h,o):(u=r,r=null,i.apply(null,u))}return function(...i){n=t.Date.now(),r=i,e||(e=t.setTimeout(h,s))}}var q=["javascript:","data:","vbscript:"],W=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function K(t,i=""){try{return decodeURIComponent(t)}catch(t){return i}}function Y(t){const i=p();if(!t)return i;let s;for(;s=W.exec(t);){const t=K(s[1],s[1]),e=s[2]?K(s[2].replace(/\+/g," "),s[2]):"";i[t]=e}return i}function Q(t){const{location:i}=t||self;return Y(i.originalHash||i.hash)}var J=t=>self.AMP_CONFIG?self.AMP_CONFIG[t]:null,X=("string"==typeof J("cdnProxyRegex")?new RegExp(J("cdnProxyRegex")):J("cdnProxyRegex"))||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Z(t){if(!self.document||!self.document.head)return null;if(self.location&&X.test(self.location.origin))return null;const i=self.document.head.querySelector(`meta[name="${t}"]`);return i&&i.getAttribute("content")||null}var tt=J("thirdPartyUrl")||"https://3p.ampproject.net",it=J("thirdPartyFrameHost")||"ampproject.net",st=("string"==typeof J("thirdPartyFrameRegex")?new RegExp(J("thirdPartyFrameRegex")):J("thirdPartyFrameRegex"))||/^d-\d+\.ampproject\.net$/,et=J("cdnUrl")||Z("runtime-host")||"https://cdn.ampproject.org",nt=/^https?:\/\/localhost(:\d+)?$/,rt=J("errorReportingUrl")||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",ht=J("betaErrorReportingUrl")||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",ot=J("localDev")||!1,ut=[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],lt=J("geoApiUrl")||Z("amp-geo-api"),ct="";function at(t){const i=t||self;return i.__AMP_MODE?i.__AMP_MODE:i.__AMP_MODE=function(t){return{localDev:!1,development:ft(t,Q(t)),esm:!0,test:!1,rtvVersion:dt(t),ssrReady:!1}}(i)}function dt(t){var i;return ct||(ct=(null===(i=t.AMP_CONFIG)||void 0===i?void 0:i.v)||"012207281718002"),ct}function ft(t,i){const s=i||Q(t);return["1","actions","amp","amp4ads","amp4email"].includes(s.development)||!!t.AMP_DEV_MODE}var pt=()=>{},mt=void 0;function _t(t){mt=t}var At=(t,i)=>i.reduce(((t,i)=>`${t}&s[]=${Pt(i)}`),`https://log.amp.dev/?v=012207281718002&id=${encodeURIComponent(t)}`),Pt=t=>encodeURIComponent(String(x(t))),gt=t=>parseInt(Q(t).log,10);self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var vt=self.__AMP_LOG,Et=null;function Tt(t,i){if(!Et)throw new Error("failed to call initLogConstructor");return new Et(self,t,i)}function Mt(t){return vt.user||(vt.user=It(V)),function(t,i){return i&&i.ownerDocument.defaultView!=t}(vt.user.win,t)?vt.userForEmbed||(vt.userForEmbed=It(S)):vt.user}function It(t){return Tt(((t,i)=>i||t>=1?4:2),t)}function Rt(){return vt.dev||(vt.dev=Tt((t=>t>=3?4:t>=2?3:0)))}function yt(t,i,s,e,n,r,h,o,u,l,c){return t}function bt(t,i,s,e,n,r,h,o,u,l,c){return Mt().assert(t,i,s,e,n,r,h,o,u,l,c)}function wt(t){return(t.ownerDocument||t).defaultView}function Vt(t,i){return t.replace(/^|,/g,`$&${i} `)}function St(t){return CSS.escape(t)}function xt(t){D(/^[\w-]+$/.test(t))}function Ot(t,i){return t.querySelector(Vt(i,":scope"))}function Ct(t,i){return t.closest(i)}function kt(t,i){for(let s=t.lastElementChild;s;s=s.previousElementSibling)if(i(s))return s;return null}function Nt(t,i){return xt(i),Ot(t,`> [${i}]`)}function Dt(t){return!!function(t){let i;return y(t)?i=t:b(t)&&(i=t.tagName),!!i&&i.toLowerCase().startsWith("i-")}(t)||t.nodeType===Node.ELEMENT_NODE&&(L(t),t.hasAttribute("placeholder")||t.hasAttribute("fallback")||t.hasAttribute("overflow"))}var Lt={bubbles:!0,cancelable:!0};function Ut(t,i,s){if(i(t))s();else{const e=new(wt(t).MutationObserver)((()=>{i(t)&&(e.disconnect(),s())}));e.observe(t,{childList:!0})}}function $t(t,i){Ut(t.documentElement,(()=>!!t.body),i)}function Ft(t){return new Promise((i=>$t(t,i)))}function Bt(t){var i;null===(i=t.parentElement)||void 0===i||i.removeChild(t)}function Ht(t){const i=t.isConnected;if(void 0!==i)return i;let s=t;for(;s=jt(s),s.host;)s=s.host;return s.nodeType===Node.DOCUMENT_NODE}function jt(t){if(Node.prototype.getRootNode)return t.getRootNode();let i;for(i=t;i.parentNode&&(!(s=i)||"I-AMPHTML-SHADOW-ROOT"!=s.tagName&&(11!=s.nodeType||"[object ShadowRoot]"!==Object.prototype.toString.call(s)));i=i.parentNode);var s;return i}function zt(t,i){let s=t;do{if(s.nextSibling)return!0}while((s=s.parentNode)&&s!=i);return!1}function Gt(t){try{t.focus()}catch(t){}}function qt(t){return t.parent&&t.parent!=t}function Wt(t,i,s,e){const n=s||{};D(t.ownerDocument);const r=t.ownerDocument.createEvent("Event");r.data=n;const{bubbles:h,cancelable:o}=e||Lt;r.initEvent(i,h,o),t.dispatchEvent(r)}function Kt(t,i){return i!==t&&t.contains(i)}function Yt(t){return t.hasAttribute("i-amphtml-ssr")}function Qt(t,i){const s=t.head.querySelector("script[nonce]");if(s){const t=s.nonce||s.getAttribute("nonce");i.setAttribute("nonce",null!=t?t:"")}}function Jt(t,i,s,e){return{left:t,top:i,width:s,height:e,bottom:i+e,right:t+s,x:t,y:i}}function Xt(t,i,s){return Jt(t.left-t.width*i,t.top-t.height*s,t.width*(1+2*i),t.height*(1+2*s))}function Zt(t,i,s){return 0==i&&0==s||0==t.width&&0==t.height?t:Jt(t.left+i,t.top+s,t.width,t.height)}function ti(t){return!t.IntersectionObserver||!t.IntersectionObserverEntry||!!t.IntersectionObserver._stub||!function(t){try{return new t.IntersectionObserver((()=>{}),{root:t.document}),!0}catch(t){return!1}}(t)||function(t){return/apple/i.test(t.navigator.vendor)}(t)}var ii=class{constructor(t,i){this.wt=t,this.yt=g({root:null,rootMargin:"0px 0px 0px 0px"},i),this.jt=[],this.At=null,ii._upgraders.push(this.xt.bind(this))}get root(){return this.At?this.At.root:this.yt.root||null}get rootMargin(){return this.At?this.At.rootMargin:this.yt.rootMargin}get thresholds(){return this.At?this.At.thresholds:[].concat(this.yt.threshold||0)}disconnect(){this.At?this.At.disconnect():this.jt.length=0}takeRecords(){return this.At?this.At.takeRecords():[]}observe(t){this.At?this.At.observe(t):-1==this.jt.indexOf(t)&&this.jt.push(t)}unobserve(t){if(this.At)this.At.unobserve(t);else{const i=this.jt.indexOf(t);-1!=i&&this.jt.splice(i,1)}}xt(t){const i=new t(this.wt,this.yt);this.At=i;for(const t of this.jt)i.observe(t);this.jt.length=0}};ii._upgraders=[];var{hasOwnProperty:si}=Object.prototype;function ei(t){return!t.ResizeObserver||!!t.ResizeObserver._stub}var ni,ri=class{constructor(t){this.wt=t,this.jt=[],this.At=null,ri._upgraders.push(this.xt.bind(this))}disconnect(){this.At?this.At.disconnect():this.jt.length=0}observe(t){this.At?this.At.observe(t):-1==this.jt.indexOf(t)&&this.jt.push(t)}unobserve(t){if(this.At)this.At.unobserve(t);else{const i=this.jt.indexOf(t);-1!=i&&this.jt.splice(i,1)}}xt(t){const i=new t(this.wt);this.At=i;for(const t of this.jt)i.observe(t);this.jt.length=0}};ri._upgraders=[],self.document&&(ti(ni=self)&&function(t){if(!t.IntersectionObserver)return t.IntersectionObserver=ii,void(t.IntersectionObserver._stub=ii);const i=t.IntersectionObserver;t.IntersectionObserver=function(t,i){return function(s,e){var n;return 9===(null==e||null===(n=e.root)||void 0===n?void 0:n.nodeType)?new i(s,e):new t(s,e)}}(t.IntersectionObserver,ii),t.IntersectionObserver._stub=ii,t.IntersectionObserver._native=i}(ni),function(t){t.IntersectionObserverEntry&&!("isIntersecting"in t.IntersectionObserverEntry.prototype)&&Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{enumerable:!0,configurable:!0,get(){return this.intersectionRatio>0}})}(ni),function(t){ei(t)&&function(t){t.ResizeObserver||(t.ResizeObserver=ri,t.ResizeObserver._stub=ri)}(t)}(self),function(t){t.AbortController||(Object.defineProperty(t,"AbortController",{configurable:!0,enumerable:!1,writable:!0,value:i}),Object.defineProperty(t,"AbortSignal",{configurable:!0,enumerable:!1,writable:!0,value:s}))}(self));var hi="cls",oi="clstu",ui="cls-1",li="pc",ci="building",ai="mounting",di="loading",fi="complete",pi="error";function mi(t){return t.readyState!=di&&"uninitialized"!=t.readyState}function _i(t){return t.readyState==fi}function Ai(t,i){Pi(t,mi,i)}function Pi(t,i,s){let e=i(t);if(e)s(t);else{const n=()=>{i(t)&&(e||(e=!0,s(t)),t.removeEventListener("readystatechange",n))};t.addEventListener("readystatechange",n)}}function gi(t){return new Promise((i=>{Ai(t,i)}))}function vi(t){return new Promise((i=>{Pi(t,_i,i)}))}var Ei=["amp-mustache"];function Ti(t){if(!t)return null;const i=t.match(/^(.*)\/(.*)-([0-9.]+|latest)(\.max)?\.(?:js|mjs)(?:\?ssr-css=[0|1])?$/i),s=i?i[2]:void 0,e=i?i[3]:void 0;return s&&e?{extensionId:s,extensionVersion:e}:null}function Mi(t,i,s){const e=t.document.createElement("script");e.async=!0,Ri(i)?s="":e.setAttribute(Ei.indexOf(i)>=0?"custom-template":"custom-element",i),e.setAttribute("data-script",i),e.setAttribute("i-amphtml-inserted",""),e.setAttribute("type","module"),Qt(t.document,e),e.setAttribute("crossorigin","anonymous");const n=function(t,i,s,e){return`${et}/rtv/${at().rtvVersion}/v0/${i}${s?"-"+s:""}.mjs`}(t.location,i,s);return e.src=n,e}function Ii(t,i,s,e,n=!0){const r=":not([i-amphtml-loaded-new-version])"+(n?"":":not([i-amphtml-inserted])"),h=t.document.head.querySelectorAll(`script[src*="/${i}-"]${r}`),o=[];for(let t=0;t{})),{obj:null,promise:i,resolve:e,reject:s,context:null,ctor:null}}(),e[i].promise}function Fi(t,i){const s=Bi(t)[i];return s?s.promise?s.promise:(Li(t,i),s.promise=Promise.resolve(s.obj)):null}function Bi(t){let i=t.__AMP_SERVICES;return i||(i=t.__AMP_SERVICES={}),i}function Hi(t){return"function"==typeof t.dispose}function ji(t,i){if(Hi(i))try{(function(t){return yt(Hi(t)),t})(i).dispose()}catch(i){Rt().error("SERVICE","failed to dispose service",t,i)}}function zi(t,i){const s=t.__AMP_SERVICES&&t.__AMP_SERVICES[i];return!(!s||!s.ctor)}function Gi(t,i,s,e){return qi(t,i,s,e).then((t=>function(t,i,s){return bt(t,"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.",i,s,s,s)}(t,i,s)))}function qi(t,i,s,e){const n=Oi(t,i);if(n)return n;const r=Ni(t);return r.whenExtensionsKnown().then((()=>{const t=r.getExtensionVersion(s);return t?wi(r.win,"extensions").waitForExtension(s,t):null})).then((s=>s?e?Oi(t,i):xi(t,i):null))}var Wi,Ki=t=>qi(t,"access","amp-access"),Yi=t=>qi(t,"subscriptions","amp-subscriptions"),Qi=t=>Si(t,"action"),Ji=t=>Gi(t,"activity","amp-analytics"),Xi=t=>Ni(t),Zi=t=>wi(t,"ampdoc"),ts=t=>function(t,i,s){const e=Si(t,i);return e?Promise.resolve(e):qi(t,i,"amp-bind")}(t,"bind"),is=t=>xi(t,"cid"),ss=t=>wi(t,"crypto"),es=t=>Vi(t,"documentInfo").get(),ns=t=>wi(t,"extensions"),rs=t=>Vi(t,"history"),hs=t=>Vi(t,"mutator"),os=t=>wi(t,"performance"),us=t=>wi(t,"platform"),ls=t=>wi(t,"preconnect"),cs=t=>Vi(t,"resources"),as=t=>xi(t,"storage"),ds=t=>function(t,i){return Li(t,"timer")}(t),fs=t=>Si(t,"url-replace"),ps=t=>qi(t,"geo","amp-geo",!0),ms=t=>Si(t,"url"),_s=t=>Vi(t,"viewer"),As=t=>wi(t,"vsync"),Ps=t=>Vi(t,"viewport"),gs=t=>wi(t,"xhr"),vs={PRERENDER:"prerender",PREVIEW:"preview",VISIBLE:"visible",HIDDEN:"hidden",PAUSED:"paused",INACTIVE:"inactive"},Es=class{constructor(){this.hi=null}add(t){return this.hi||(this.hi=[]),this.hi.push(t),()=>{this.remove(t)}}remove(t){this.hi&&I(this.hi,t)}removeAll(){this.hi&&(this.hi.length=0)}fire(t){if(this.hi)for(const i of this.hi.slice())i(t)}getHandlerCount(){var t,i;return null!==(t=null===(i=this.hi)||void 0===i?void 0:i.length)&&void 0!==t?t:0}},Ts=class{constructor(){this.oi=p(),this.ui=null}get(t){const i=this.oi[t];return null==i?null:i}whenSignal(t){var i;let s=null===(i=this.ui)||void 0===i?void 0:i[t];if(!s){const i=this.oi[t];s=null!=i?{promise:"number"==typeof i?Promise.resolve(i):Promise.reject(i)}:new n,this.ui||(this.ui=p()),this.ui[t]=s}return s.promise}signal(t,i){var s;if(null!=this.oi[t])return;const e=null!=i?i:Date.now();this.oi[t]=e;const n=null===(s=this.ui)||void 0===s?void 0:s[t];null!=n&&n.resolve&&(n.resolve(e),n.resolve=void 0,n.reject=void 0)}rejectSignal(t,i){var s;if(null!=this.oi[t])return;this.oi[t]=i;const e=null===(s=this.ui)||void 0===s?void 0:s[t];null!=e&&e.reject&&(e.reject(i),e.promise.catch((()=>{})),e.resolve=void 0,e.reject=void 0)}reset(t){var i;this.oi[t]&&delete this.oi[t];const s=null===(i=this.ui)||void 0===i?void 0:i[t];s&&!s.resolve&&delete this.ui[t]}},Ms=["Webkit","webkit","Moz","moz","ms","O","o"],Is={"getPropertyPriority":()=>"","getPropertyValue":()=>""};function Rs(t){const i=t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()));return Ms.some((t=>i.startsWith(t+"-")))?`-${i}`:i}function ys(t,i,s){if(i.startsWith("--"))return i;Wi||(Wi=p());let e=Wi[i];if(!e||s){if(e=i,void 0===t[i]){const s=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(i),n=function(t,i){for(let s=0;sNs(this.win.document,r))),this.Pi()}dispose(){(function(t){const i=Bi(t);for(const t in i){if(!Object.prototype.hasOwnProperty.call(i,t))continue;const s=i[t];s.sharedInstance||(s.obj?ji(t,s.obj):s.promise&&s.promise.then((i=>ji(t,i))))}})(this),this.gi.forEach((t=>t()))}isSingleDoc(){return yt(null)}getParent(){return this.ci}signals(){return this.ai}getParam(t){const i=this.di[t];return null==i?null:i}getMeta(){return this.fi||(this.fi=p(),this.win.document.head.querySelectorAll("meta[name]").forEach((t=>{const i=t.getAttribute("name"),s=t.getAttribute("content");i&&null!==s&&void 0===this.fi[i]&&(this.fi[i]=s)}))),p(this.fi)}getMetaByName(t){if(!t)return null;const i=this.getMeta()[t];return void 0!==i?i:null}setMetaByName(t,i){yt(null)}declaresExtension(t,i){const s=this.pi[t];return!(!s||i&&s!==i)}declareExtension(t,i){yt(!this.pi[t]||this.pi[t]===i),this.pi[t]=i}getExtensionVersion(t){return this.pi[t]||null}setExtensionsKnown(){this.ai.signal($s)}whenExtensionsKnown(){return this.ai.whenSignal($s)}getRootNode(){return yt(null)}getHeadNode(){}isBodyAvailable(){return yt(!1)}getBody(){return yt(null)}waitForBodyOpen(){return yt(null)}isReady(){return yt(null)}whenReady(){return yt(null)}getUrl(){return yt(null)}getElementById(t){return this.getRootNode().getElementById(t)}contains(t){return this.getRootNode().contains(t)}overrideVisibilityState(t){this.mi!=t&&(this.mi=t,this.Pi())}Pi(){const t=Cs(this.win.document);let i,s=vs.VISIBLE;for(let t=this.ci;t;t=t.getParent())if(t.getVisibilityState()!=vs.VISIBLE){s=t.getVisibilityState();break}const e=this.mi||vs.VISIBLE;if(i=e==vs.VISIBLE&&s==vs.VISIBLE&&t==vs.VISIBLE?vs.VISIBLE:t==vs.HIDDEN&&e==vs.PAUSED?t:e==vs.PAUSED||e==vs.INACTIVE?e:s==vs.PAUSED||s==vs.INACTIVE?s:e==vs.PREVIEW||t==vs.PREVIEW||s==vs.PREVIEW?vs.PREVIEW:e==vs.PRERENDER||t==vs.PRERENDER||s==vs.PRERENDER?vs.PRERENDER:vs.HIDDEN,this.D!=i){if(i==vs.VISIBLE){var n;const{performance:t}=this.win;let i=Math.floor(null!==(n=t.timeOrigin)&&void 0!==n?n:t.timing.navigationStart);null!=this.D&&(i+=Math.floor(t.now())),this.Ai=i,this.ai.signal(Fs,i),this.ai.signal(Bs,i)}else this.ai.reset(Bs);i==vs.PREVIEW&&this.ai.signal(Hs),this.D=i,this._i.fire()}}whenFirstPreviewedOrVisible(){return Promise.race([this.whenFirstPreviewed(),this.whenFirstVisible()])}whenFirstPreviewed(){return this.ai.whenSignal(Hs).then((()=>{}))}whenFirstVisible(){return this.ai.whenSignal(Fs).then((()=>{}))}whenNextVisible(){return this.ai.whenSignal(Bs).then((()=>{}))}getFirstVisibleTime(){return this.ai.get(Fs)}getLastVisibleTime(){return this.Ai}getVisibilityState(){return yt(this.D)}isPreview(){return this.D==vs.PREVIEW}isVisible(){return this.D==vs.VISIBLE}hasBeenVisible(){return null!=this.getLastVisibleTime()}onVisibilityChanged(t){return this._i.add(t)}registerSingleton(t){return!this.li[t]&&(this.li[t]=!0,!0)}},zs=class extends js{constructor(t,i){super(t,null,i),this.vi=this.win.document.body?Promise.resolve(this.win.document.body):Ft(this.win.document).then((()=>this.getBody())),this.Ei=gi(this.win.document)}isSingleDoc(){return!0}getRootNode(){return this.win.document}getUrl(){return Ls.getLocation(this.win).href}getHeadNode(){return this.win.document.head}isBodyAvailable(){return!!this.win.document.body}getBody(){return this.win.document.body}waitForBodyOpen(){return this.vi}isReady(){return mi(this.win.document)}whenReady(){return this.Ei}},Gs=class extends js{constructor(t,i,s,e){super(t,null,e),this.Ti=i,this.Ii=s,this.Ri=null;const r=new n;this.vi=r.promise,this.Mi=r.resolve,this.yi=!1;const h=new n;this.Ei=h.promise,this.wi=h.resolve}isSingleDoc(){return!1}getRootNode(){return this.Ii}getUrl(){return this.Ti}getHeadNode(){return this.Ii}isBodyAvailable(){return!!this.Ri}getBody(){return this.Ri}setBody(t){yt(!this.Ri),this.Ri=t,this.Mi(t),this.Mi=void 0}waitForBodyOpen(){return this.vi}isReady(){return this.yi}setReady(){yt(!this.yi),this.yi=!0,this.wi(),this.wi=void 0}whenReady(){return this.Ei}getMeta(){return p(this.fi)}setMetaByName(t,i){yt(t),this.fi||(this.fi=p()),this.fi[t]=i}},qs=class extends js{constructor(t,i,s,e){super(t,s,e),this.Ti=i,this.vi=this.win.document.body?Promise.resolve(this.win.document.body):Ft(this.win.document).then((()=>this.getBody())),this.yi=!1;const r=new n;this.Ei=r.promise,this.wi=r.resolve}isSingleDoc(){return!1}getRootNode(){return this.win.document}getUrl(){return this.Ti}getHeadNode(){return this.win.document.head}isBodyAvailable(){return!!this.win.document.body}getBody(){return this.win.document.body}waitForBodyOpen(){return this.vi}isReady(){return this.yi}whenReady(){return this.Ei}setReady(){yt(!this.yi),this.yi=!0,this.wi(),this.wi=void 0}};function Ws(t,i){const s=p();return i?Object.assign(s,i):(t.name&&0==t.name.indexOf(Us)&&Object.assign(s,Y(t.name.substring(Us.length))),t.location&&t.location.hash&&Object.assign(s,Y(t.location.hash))),s}var Ks="nodisplay",Ys="fixed",Qs="fixed-height",Js="responsive",Xs="container",Zs="fill",te="flex-item",ie="fluid",se="intrinsic",ee=/^amp\-(video|.+player)|AMP-BRIGHTCOVE|AMP-DAILYMOTION|AMP-YOUTUBE|AMP-VIMEO|AMP-IMA-VIDEO/i;function ne(t){if("nodisplay"===(i=t)||"fixed"===i||"fixed-height"===i||"responsive"===i||"container"===i||"fill"===i||"flex-item"===i||"fluid"===i||"intrinsic"===i)return t;var i}function re(t){return"i-amphtml-layout-"+t}function he(t){return t==Ys||t==Qs||t==Js||t==Zs||t==te||t==ie||t==se}function oe(t){return"number"==typeof t?t+"px":t&&/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)?$/.test(t)?/^\d+(\.\d+)?$/.test(t)?t+"px":t:void 0}function ue(t){!function(t){F(/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)$/.test(null!=t?t:""),"Invalid length value: %s",t)}(t);const i=/[a-z]+/i.exec(null!=t?t:"");return F(i,"Failed to read units from %s",t),i[0]}function le(t){const i=parseFloat(t);return w(i)?i:void 0}function ce(t,i){t.classList.add("i-amphtml-fill-content"),i&&t.classList.add("i-amphtml-replaced-content")}function ae(t,i,s,e){const n=E(t);for(const t of n){const n=i.getAttribute(t);null!==n?s.setAttribute(t,n):e&&s.removeAttribute(t)}}var de,fe="amp:attached",pe="amp:load-start",me="amp:load-end",_e="ready-upgrade",Ae="upgraded",Pe="built",ge="mounted",ve="load-start",Ee="render-start",Te="load-end",Me="unload";function Ie(t,i){return[{query:t.matchMedia(i),value:"1"},{query:null,value:""}]}function Re(t,i){return i.split(",").map((i=>{if(0==(i=i.replace(/\s+/g," ").trim()).length)return;let s,e,n;if(")"==i.charAt(i.length-1)){let t=1;for(n=i.length-2;n>=0;n--){const s=i.charAt(n);if("("==s?t--:")"==s&&t++,0==t)break}const s=n-1;if(n>0)for(n--;n>=0;n--){const t=i.charAt(n);if(!("%"==t||"-"==t||"_"==t||t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"))break}if(n>=s)return null}else for(n=i.length-2;n>=0;n--){const t=i.charAt(n);if(!("%"==t||"."==t||t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"))break}return n>=0?(s=i.substring(0,n+1).trim(),e=i.substring(n+1).trim()):(e=i,s=void 0),e?{query:s?t.matchMedia(s):null,value:e}:null})).filter(Boolean)}function ye(t,i,s){for(let e=0;e'],Se={"AMP-PIXEL":{width:"0px",height:"0px"},"AMP-ANALYTICS":{width:"1px",height:"1px"},"AMP-AUDIO":null,"AMP-SOCIAL-SHARE":{width:"60px",height:"44px"}};function xe(t){const i=t.getAttribute("layout"),s=t.getAttribute("width"),e=t.getAttribute("height"),n=t.getAttribute("sizes"),r=t.getAttribute("heights"),h=i?ne(i):null;F(void 0!==h,'Invalid "layout" value: %s, %s',i,t);const o=s&&"auto"!=s?oe(s):s;F(void 0!==o,'Invalid "width" value: %s, %s',s,t);const u=e&&"fluid"!=e?oe(e):e;let l,c,a;if(F(void 0!==u,'Invalid "height" value: %s, %s',e,t),h&&h!=Ys&&h!=Qs||o&&u||(d=(d=t.tagName).toUpperCase(),void 0===Se[d]))l=o,c=u;else{const i=function(t){const i=t.tagName.toUpperCase();if(D(void 0!==Se[i]),!Se[i]){const s=t.ownerDocument,e=i.replace(/^AMP\-/,""),n=s.createElement(e);n.controls=!0,Vs(n,{position:"absolute",visibility:"hidden"}),s.body.appendChild(n),Se[i]={width:(n.offsetWidth||1)+"px",height:(n.offsetHeight||1)+"px"},s.body.removeChild(n)}return Se[i]}(t);l=o||h==Qs?o:i.width,c=u||i.height}var d;return a=h||(l||c?"fluid"==c?ie:!c||l&&"auto"!=l?c&&l&&(n||r)?Js:Ys:Qs:Xs),a!=Ys&&a!=Qs&&a!=Js&&a!=se||F(c,'The "height" attribute is missing: %s',t),a==Qs&&F(!l||"auto"==l,'The "width" attribute must be missing or "auto": %s',t),a!=Ys&&a!=Js&&a!=se||F(l&&"auto"!=l,'The "width" attribute must be present and not "auto": %s',t),a==Js||a==se?F(ue(l)==ue(c),'Length units should be the same for "width" and "height": %s, %s, %s',s,e,t):F(null===r,'"heights" attribute must be missing: %s',t),{layout:a,width:l,height:c}}var Oe,Ce="amp-experiment-toggles",ke="__AMP__EXPERIMENT_TOGGLES";function Ne(t,i){return!!Le(t)[i]}function De(t,i,s,e){const n=Ne(t,i),r=null!=s?s:!n;if(r!=n&&(Le(t)[i]=r,!e)){const s=Ue(t);s[i]=r,function(t,i){const s=[];for(const t in i)s.push((!1===i[t]?"-":"")+t);try{var e;null===(e=t.localStorage)||void 0===e||e.setItem(Ce,s.join(","))}catch(t){Mt().error("EXPERIMENTS","Failed to save experiments to localStorage.")}}(t,s)}return r}function Le(t){var i,s,e,n,r;if(t[ke])return t[ke];t[ke]=p();const h=t[ke];D(h);const o=g(g({},null!==(i=t.AMP_CONFIG)&&void 0!==i?i:{}),null!==(s=t.AMP_EXP)&&void 0!==s?s:B((null===(e=t.__AMP_EXP)||void 0===e?void 0:e.textContent)||"{}"));for(const t in o){const i=o[t];"number"==typeof i&&i>=0&&i<=1&&(h[t]=Math.random(){try{return r(t)}catch(t){var i,s;throw null===(i=(s=self).__AMP_REPORT_ERROR)||void 0===i||i.call(s,t),t}};const o=function(){if(void 0!==Oe)return Oe;Oe=!1;try{const t={get capture(){return Oe=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return Oe}(),u=!(null==e||!e.capture);return n.addEventListener(i,h,o?e:u),()=>{null==n||n.removeEventListener(i,h,o?e:u),r=null,n=null,h=null}}var Fe="Failed to load:";function Be(t,i,s,e){const n={detail:s};return Object.assign(n,e),new t.CustomEvent(i,n)}function He(t,i,s,e){return $e(t,i,s,e)}function je(t){return t.data}function ze(t,i,s,e){let n=s;const r=$e(t,i,(t=>{try{n(t)}finally{n=null,r()}}),e);return r}function Ge(t){let i,s;if(function(t){return!!(t.complete||"complete"==t.readyState||qe(t)&&t.readyState>0||t.document&&"complete"==t.document.readyState)}(t))return Promise.resolve(t);const e=qe(t);return e&&t.__AMP_MEDIA_LOAD_FAILURE_SRC===t.currentSrc?Promise.reject(t):new Promise(((n,r)=>{if(i=e?ze(t,"loadedmetadata",n,{capture:!0}):ze(t,"load",n),!t.tagName)return;let h=t;if(e&&!t.hasAttribute("src")&&(h=kt(t,(t=>"SOURCE"===t.tagName)),!h))return r(new Error("Media has no source."));s=ze(h,"error",r)})).then((()=>(s&&s(),t)),(()=>{i&&i(),function(t){qe(t)&&(t.__AMP_MEDIA_LOAD_FAILURE_SRC=t.currentSrc||!0);let i=t;throw i&&i.src&&(i=i.src),Mt().createError(Fe,i)}(t)}))}function qe(t){return"AUDIO"===t.tagName||"VIDEO"===t.tagName}var We={"amp-dynamic-css-classes":"[custom-element=amp-dynamic-css-classes]","variant":"amp-experiment"};function Ke(t){const i=t.document;return yt(i.body),Object.keys(We).filter((t=>i.querySelector(We[t])))}function Ye(t,i,s){if(i[s])return i[s];const e=t.querySelector(`style[${s}], link[${s}]`);return e?(i[s]=e,e):null}var Qe=!1;function Je(t){yt(t.defaultView),Qe||(Qe=!0,Xe(t))}function Xe(t){Vs(t.body,{opacity:1,visibility:"visible","animation":"none"})}function Ze(t,i){const s=t.styleSheets;for(let t=0;t"string"==typeof t?rn(t):t;function rn(t,i){return tn||(tn=self.document.createElement("a")),hn(tn,t)}function hn(t,i,s){return t.href="",new URL(i,t.href)}function on(t,i,s){if(!i)return t;const e=t.split("#",2),n=e[0].split("?",2);let r=n[0]+(n[1]?s?`?${i}&${n[1]}`:`?${n[1]}&${i}`:`?${i}`);return r+=e[1]?`#${e[1]}`:"",r}function un(t,i){return`${encodeURIComponent(t)}=${encodeURIComponent(i)}`}function ln(t,i){return on(t,cn(i))}function cn(t){const i=[];for(const s in t){let e=t[s];if(null!=e){e=E(e);for(let t=0;t0,"Expected a . in origin %s",n),i.splice(1,"s"==e?3:2),n+i.join("/")+An(t.search)+(t.hash||"")}function gn(t){return rn(Pn(t)).origin}function vn(t,i){return i=nn(i),new URL(t,i.href).toString()}function En(t,i){return Tn(i),function(t,i,s,e){return on(t,un("__amp_source_origin",s),void 0)}(i,0,gn(t.location.href))}function Tn(t){const i=Y(rn(t).search);bt(!(en in i),"Source origin is not allowed in %s",t)}var Mn="CANCELLED",In="BLOCK_BY_CONSENT",Rn=self.__AMP_ERRORS||[];self.__AMP_ERRORS=Rn;var yn=function(t){return(yn=function(t){const i=function(t){let i=0;return()=>{let t=Math.pow(1.5,i++);return t+=function(t,i){let s=t*(i=i||.3)*Math.random();return Math.random()>.5&&(s*=-1),s}(t),1e3*t}}();return t=>setTimeout(t,i())}())(t)};function bn(t,i){try{let s;if(t)if(void 0!==t.message)t=h(t),s=!0;else{const i=t;(t=new Error(function(t){try{return JSON.stringify(t)}catch(i){return String(t)}}(i))).origError=i}else t=new Error("Unknown error");if(t.reported)return t;if(t.reported=!0,t.messageArray){const i=M(t.messageArray,(t=>null==t?void 0:t.tagName));i>-1&&(t.associatedElement=t.messageArray[i])}const e=i||t.associatedElement;if(e&&e.classList&&e.classList.add("i-amphtml-error"),self.console&&(O(t.message)||!t.expected)){const i=console.error||console.log;t.messageArray?i.apply(console,t.messageArray):e?i.call(console,t.message,e):i.call(console,t.message)}e&&e.dispatchCustomEventForTesting&&e.dispatchCustomEventForTesting("amp:error",t.message),Sn.call(self,void 0,void 0,void 0,void 0,t)}catch(t){setTimeout((function(){throw t}))}return t}function wn(){return new Error(Mn)}function Vn(t){return!!t&&("string"==typeof t?t.startsWith(In):"string"==typeof t.message&&t.message.startsWith(In))}function Sn(t,i,s,n,r){!this||!this.document||r&&r.expected||Je(this.document);let h=!1;try{h=function(t){if(!t.document)return!1;const i=t.document.querySelectorAll("script[src]");for(let t=0;t.01)return;const o=function(t,i,s,e,n,r){t=function(t,i){return i&&(t=i.message?i.message:String(i)),t||(t="Unknown error"),t}(t,n);let h=!(!n||!n.expected);if(/_reported_/.test(t))return;if(t==Mn)return;const o=!(self&&self.window),u=Math.random();if((function(t){return-1!=t.indexOf(Fe)}(t)||"Script error."==t||o)&&(h=!0,u>.001))return;const l=O(t);if(l&&u>.1)return;const c=Object.create(null);c.v=at().rtvVersion,c.noAmp=r?"1":"0",c.m=t.replace(V,""),c.a=l?"1":"0",c.ex=h?"1":"0",c.dw=o?"1":"0";let a="1p";if(a="esm",c.esm="1",c.rt="esm",c.ca=null!==(f=self.AMP_CONFIG)&&void 0!==f&&f.canary?"1":"0",c.bt=(null===(d=self.AMP_CONFIG)||void 0===d?void 0:d.type)||"unknown",self.location.ancestorOrigins&&self.location.ancestorOrigins[0]&&(c.or=self.location.ancestorOrigins[0]),self.viewerState&&(c.vs=self.viewerState),self.parent&&self.parent!=self&&(c.iem="1"),self.AMP&&self.AMP.viewer){const t=self.AMP.viewer.getResolvedViewerUrl(),i=self.AMP.viewer.maybeGetMessagingOrigin();t&&(c.rvu=t),i&&(c.mso=i)}var d,f;const p=[],m=self[ke]||null;for(const t in m){const i=m[t];p.push(`${t}=${i?"1":"0"}`)}var _,A,P;return c.exps=p.join(","),n?(c.el=(null===(_=n.associatedElement)||void 0===_?void 0:_.tagName)||"u",n.args&&(c.args=JSON.stringify(n.args)),l||n.ignoreStack||!n.stack||(c.s=n.stack),n.message&&(n.message+=" _reported_")):(c.f=i||"",c.l=s||"",c.c=e||""),c.r=self.document?self.document.referrer:"",c.ae=Rn.join(","),c.fr=self.location.originalHash||self.location.hash,"production"===c.bt&&(c.pt="1"),P=t,(A=Rn).length>=25&&A.splice(0,A.length-25+1),A.push(P),c}(t,i,s,n,r,h);o&&yn((()=>{try{return function(t,i){return i.pt&&Math.random()<.9?e():function(t,i){const s=Zi(t);if(!s.isSingleDoc())return Promise.resolve(!1);const e=s.getSingleDoc();if(!e.getRootNode().documentElement.hasAttribute("report-errors-to-viewer"))return Promise.resolve(!1);const n=_s(e);return n.hasCapability("errorReporter")?n.isTrustedViewer().then((t=>{return!!t&&(n.sendMessage("error",{"m":(s=i).m,"a":s.a,"s":s.s,"el":s.el,"ex":s.ex,"v":s.v,"pt":s.pt}),!0);var s})):Promise.resolve(!1)}(t,i).then((t=>{if(!t){const t=new XMLHttpRequest;t.open("POST",Math.random()<.1?ht:rt,!0),t.send(JSON.stringify(i))}}))}(this,o).catch((()=>{}))}catch(t){}}))}var xn="Resource",On=class{static forElement(t){return yt(On.forElementOptional(t))}static forElementOptional(t){return t.__AMP__RESOURCE}static setOwner(t,i){yt(i.contains(t)),On.forElementOptional(t)&&On.forElementOptional(t).updateOwner(i),t.__AMP__OWNER=i;const s=t.getElementsByClassName("i-amphtml-element");for(let t=0;t{this.xi=!1,this.Ci=1,this.element.signals().signal("res-built")}),(t=>{throw this.maybeReportErrorOnBuildFailure(t),this.xi=!1,this.element.signals().rejectSignal("res-built",t),t})))}maybeReportErrorOnBuildFailure(t){Vn(t)||Rt().error(xn,"failed to build:",this.debugid,t)}changeSize(t,i,s){this.element.applySize(t,i,s),this.requestMeasure()}overflowCallback(t,i,s,e){t&&(this.zi={height:i,width:s,margins:e}),this.element.overflowCallback(t,i,s,e)}resetPendingChangeSize(){this.zi=void 0}getPendingChangeSize(){return this.zi}getUpgradeDelayMs(){return this.element.getUpgradeDelayMs()}measure(){if(this.Si&&this.element.parentElement&&this.element.parentElement.tagName.startsWith("AMP-")&&!("__AMP__RESOURCE"in this.element.parentElement))return;if(!this.element.ownerDocument||!this.element.ownerDocument.defaultView)return void(this.Ci=1);this.Bi=!1;const t=this.$i;this.Ki();const i=this.$i,s=(n=i,!((e=t).width==n.width&&e.height===n.height));var e,n;(1==this.Ci||t.top!=i.top||s)&&this.element.isUpgraded()&&(1==this.Ci?this.Ci=2:4!=this.Ci&&5!=this.Ci||!this.element.isRelayoutNeeded()||(this.Ci=2)),this.hasBeenMeasured()||(this.Fi=i),this.element.updateLayoutBox(i,s)}ensureMeasured(){return this.hasBeenMeasured()?e():As(this.hostWin).measure((()=>this.measure()))}Ki(){const t=Ps(this.element);this.$i=t.getLayoutRect(this.element);let i=!1;if(t.supportsPositionFixed()&&this.isDisplayed()){const{win:s}=this.Vi.getAmpdoc(),{body:e}=s.document;for(let n=this.element;n&&n!=e;n=n.offsetParent){if(n.isAlwaysFixed&&n.isAlwaysFixed()){i=!0;break}if(t.isDeclaredFixed(n)&&"fixed"==Os(s,n).position){i=!0;break}}}this.Ui=i,i&&(this.$i=Zt(this.$i,-t.getScrollLeft(),-t.getScrollTop()))}completeCollapse(){Ss(this.element,!1),this.$i=Jt(this.$i.left,this.$i.top,0,0),this.Ui=!1,this.element.updateLayoutBox(this.getLayoutBox());const t=this.getOwner();t&&t.collapsedCallback(this.element)}completeExpand(){Ss(this.element,!0),this.requestMeasure()}isMeasureRequested(){return this.Bi}hasBeenMeasured(){return!!this.Fi}requestMeasure(){this.Bi=!0}getLayoutSize(){return function(t){const{height:i,width:s}=t;return{width:s,height:i}}(this.$i)}getLayoutBox(){if(!this.Ui)return this.$i;const t=Ps(this.element);return Zt(this.$i,t.getScrollLeft(),t.getScrollTop())}getInitialLayoutBox(){return this.Fi||this.$i}isDisplayed(){if(!this.element.ownerDocument||!this.element.ownerDocument.defaultView)return!1;const t=this.element.getLayout()==ie,i=this.getLayoutBox(),s=i.height>0&&i.width>0;return t||s}isFixed(){return this.Ui}overlaps(t){return s=t,(i=this.getLayoutBox()).top<=s.bottom&&s.top<=i.bottom&&i.left<=s.right&&s.left<=i.right;var i,s}prerenderAllowed(){return this.element.prerenderAllowed()}previewAllowed(){return this.element.previewAllowed()}isBuildRenderBlocking(){return this.element.isBuildRenderBlocking()}whenWithinViewport(t){if(yt(!1!==t),!this.isLayoutPending()||!0===t)return e();const i=t,s=String(i);return this.Hi&&this.Hi[s]?this.Hi[s].promise:this.isWithinViewportRatio(i)?e():(this.Hi=this.Hi||{},this.Hi[s]=new n,this.Hi[s].promise)}Yi(){if(!this.Hi)return;const t=this.getDistanceViewportRatio();for(const i in this.Hi)this.isWithinViewportRatio(parseFloat(i),t)&&(this.Hi[i].resolve(),delete this.Hi[i])}getDistanceViewportRatio(){const t=Ps(this.element).getRect(),i=this.getLayoutBox(),s=this.Vi.getScrollDirection();let e=1,n=0;if(t.righti.right)return{distance:!1};if(t.bottomi.bottom))return{distance:!0};n=t.top-i.bottom,1==s&&(e=2)}return{distance:n,scrollPenalty:e,viewportHeight:t.height}}isWithinViewportRatio(t,i){if("boolean"==typeof t)return t;const{distance:s,scrollPenalty:e,viewportHeight:n}=i||this.getDistanceViewportRatio();return"boolean"==typeof s?s:s0&&!this.element.isRelayoutNeeded())return this.Ci=4,e();this.Ni++,this.Ci=3,this.Di=new AbortController;const{signal:t}=this.Di,i=new Promise(((i,s)=>{As(this.hostWin).mutate((()=>{let e;try{e=this.element.layoutCallback(t)}catch(t){s(t)}Promise.resolve(e).then(i,s)})),t.onabort=()=>s(wn())})).then((()=>this.Ji(!0,t)),(i=>this.Ji(!1,t,i)));return this.ji=i}Ji(t,i,s){if(this.Di=null,i.aborted){const t=Rt().createError("layoutComplete race");throw t.associatedElement=this.element,Rt().expectedError(xn,t),wn()}if(this.qi&&(this.qi(),this.qi=null),this.ji=null,this.Ci=t?4:5,this.Li=s,!t)return Promise.reject(s)}isLayoutPending(){return 4!=this.Ci&&5!=this.Ci}loadedOnce(){return this.element.R1()?this.element.whenLoaded():this.Gi}isInViewport(){return this.Wi&&this.Yi(),this.Wi}setInViewport(t){this.Wi=t}unlayout(){0!=this.Ci&&1!=this.Ci&&2!=this.Ci&&(this.Di&&(this.Di.abort(),this.Di=null),this.setInViewport(!1),this.element.unlayoutCallback()&&(this.element.togglePlaceholder(!0),this.Ci=1,this.Ni=0,this.ji=null))}getTaskId(t){return this.debugid+"#"+t}pause(){this.element.pause()}pauseOnRemove(){this.element.pause()}resume(){this.element.resume()}unload(){this.element.unmount()}disconnect(){delete this.element.__AMP__RESOURCE,this.element.disconnect(!0)}},Cn="ready-scan",kn="scheduler",Nn="250% 31.25%";function Dn(t){return bi(t,kn,class{constructor(t){this.Qi=t;const{win:i}=t;this.Xi=new i.IntersectionObserver((t=>this.Zi(t)),{root:qt(i)?i.document:null,rootMargin:Nn}),this.ts=new Map,this.ss=new Map,this.es=[],this.ns=!1,t.whenReady().then((()=>this.rs())),this.hs=t.onVisibilityChanged((()=>this.os()))}dispose(){this.Xi.disconnect(),this.ss.clear(),this.hs&&(this.hs(),this.hs=null)}scheduleAsap(t){this.ss.set(t,{asap:!0,isIntersecting:!1}),this.us(t)}schedule(t){this.ss.has(t)||(t.deferredMount()?(this.ss.set(t,{asap:!1,isIntersecting:!1}),this.Xi.observe(t),this.ts.size>0&&this.ts.forEach(((i,s)=>{Kt(s,t)&&i.observe(t)}))):this.ss.set(t,{asap:!1,isIntersecting:!0}),this.us(t))}unschedule(t){this.ss.has(t)&&(this.ss.delete(t),this.Xi.unobserve(t),this.ts.size>0&&this.ts.forEach((i=>{i.unobserve(t)})),this.es&&(I(this.es,t),this.rs()))}setContainer(t,i){if(this.ts.has(t))return;const{win:s}=this.Qi,e=new s.IntersectionObserver((t=>this.Zi(t)),{root:i||t,rootMargin:Nn});this.ts.set(t,e),this.ss.forEach((({asap:i},s)=>{!i&&Kt(t,s)&&e.observe(s)}))}removeContainer(t){const i=this.ts.get(t);i&&(i.disconnect(),this.ts.delete(t))}ls(){if(this.Qi.isReady()&&!this.ns){this.ns=!0;const{win:t}=this.Qi;t.setTimeout((()=>{this.Qi.signals().signal(Cn)}),50)}}os(){const t=this.Qi.getVisibilityState();t!=vs.VISIBLE&&t!=vs.HIDDEN&&t!=vs.PRERENDER&&t!=vs.PREVIEW||this.ss.forEach(((t,i)=>this.cs(i)))}us(t){const i=this.es;i?(i.includes(t)||i.push(t),this.rs()):this.cs(t)}rs(){const t=this.Qi.isReady(),i=this.es;if(i)for(let s=0;st.mountInternal()))}}),Vi(t,kn)}var Ln=class{constructor(){this.ds=[]}peek(){const t=this.length;return t?this.ds[t-1].item:null}enqueue(t,i){if(isNaN(i))throw new Error("Priority must not be NaN.");const s=this.fs(i);this.ds.splice(s,0,{item:t,priority:i})}fs(t){let i=-1,s=0,e=this.length;for(;s<=e&&(i=Math.floor((s+e)/2),i!==this.length);)if(this.ds[i].priority0&&this.ds[i-1].priority>=t))break;e=i-1}return i}forEach(t){let i=this.length;for(;i--;)t(this.ds[i].item)}dequeue(){const t=this.ds.pop();return t?t.item:null}get length(){return this.ds.length}},Un=/nochunking=1/.test(self.location.hash),$n=e();function Fn(t){return bi(t,"chunk",qn),Vi(t,"chunk")}function Bn(t,i,s){if(Un)return void $n.then(i);const e=Fn(t.documentElement||t);e.runForStartup(i),s&&e.runForStartup((()=>{e.ps=!0}))}function Hn(t,i,s){Un?$n.then(i):Fn(t).run(i,s)}var jn="not_run",zn=class{constructor(t){this.state=jn,this._s=t}As(t){if("run"!=this.state){this.state="run";try{this._s(t)}catch(t){throw this.gs(t),t}}}Ps(){return this._s.displayName||this._s.name}gs(t){}vs(){return!1}Es(){return!1}},Gn=class extends zn{constructor(t,i,s){super(t),this.Ts=s}gs(t){Je(self.document)}vs(){return this.Is()}Es(){return this.Ts.Rs}Is(){return this.Ts.ampdoc.isVisible()}},qn=class{constructor(t){var i;this.ampdoc=t,this.i=t.win,this.Ms=new Ln,this.ys=this.ws.bind(this),this.bs=0,this.Vs=!(!this.i.navigator.scheduling||!this.i.navigator.scheduling.isInputPending),this.Ss=!1,this.ps=this.i.document.documentElement.hasAttribute("i-amphtml-no-boilerplate"),this.i.addEventListener("message",(t=>{"amp-macro-task"==je(t)&&this.ws(null)})),this.Rs=!1,(i=t,xi(i,"viewer")).then((()=>{this.Rs=!0})),t.onVisibilityChanged((()=>{t.isVisible()&&this.xs()}))}run(t,i){const s=new zn(t);this.Os(s,i)}runForStartup(t){const i=new Gn(t,this.i,this);this.Os(i,Number.POSITIVE_INFINITY)}Os(t,i){this.Ms.enqueue(t,i),this.xs()}Cs(t){let i=this.Ms.peek();for(;i&&i.state!==jn;)this.Ms.dequeue(),i=this.Ms.peek();return i&&t&&this.Ms.dequeue(),i}ws(t){const i=this.Cs(!0);if(!i)return this.Ss=!1,this.bs=0,!1;let s;try{s=Date.now(),i.As(t)}finally{$n.then().then().then().then().then().then().then().then().then((()=>{this.Ss=!1,this.bs+=Date.now()-s,this.xs()}))}return!0}ks(t){if(this.ps&&(this.Vs?this.i.navigator.scheduling.isInputPending():this.bs>5))return this.bs=0,void this.Ns();$n.then((()=>{this.ys(t)}))}xs(){if(this.Ss)return;const t=this.Cs();return t?t.vs()?(this.Ss=!0,void this.ks(null)):void(t.Es()&&this.i.requestIdleCallback?function(t,i,s,e){const n=Date.now();t.requestIdleCallback((function i(s){if(s.timeRemaining()<15){const r=2e3-(Date.now()-n);r<=0||s.didTimeout?e(s):t.requestIdleCallback(i,{timeout:r})}else e(s)}),{timeout:2e3})}(this.i,0,0,this.ys):this.Ns()):void 0}Ns(){this.i.postMessage("amp-macro-task","*")}},Wn="activate",Kn=class{static R1(){return!1}static deferredMount(t){return!0}static prerenderAllowed(t){return!1}static previewAllowed(t){return this.prerenderAllowed(t)}static usesLoading(t){return!1}static createLoaderLogoCallback(t){return{}}static getBuildPriority(t){return 0}static getPreconnects(t){return null}static requiresShadowDom(){return!1}constructor(t){this.element=t,this.win=wt(t),this.actionMap_=null,this.defaultActionAlias_=null}signals(){return this.element.signals()}getDefaultActionAlias(){return this.defaultActionAlias_}getLayoutPriority(){return 0}updateLayoutPriority(t){this.element.getResources().updateLayoutPriority(this.element,t)}getLayout(){return this.element.getLayout()}getLayoutBox(){return this.element.getLayoutBox()}getLayoutSize(){return this.element.getLayoutSize()}getAmpDoc(){return this.element.getAmpDoc()}getVsync(){return As(this.win)}getConsentPolicy(){let t=null;return this.element.hasAttribute("data-block-on-consent")&&(t=this.element.getAttribute("data-block-on-consent")||"default"),t}isLayoutSupported(t){return t==Ks}isAlwaysFixed(){return!1}upgradeCallback(){return null}buildCallback(){}preconnectCallback(t){}attachedCallback(){}detachedCallback(){}setAsContainer(t){this.element.setAsContainerInternal(t)}removeAsContainer(){this.element.removeAsContainerInternal()}isBuildRenderBlocking(){return!1}createPlaceholderCallback(){return null}renderOutsideViewport(){return"inabox"==at(this.win).runtime||3}idleRenderOutsideViewport(){return!1}ensureLoaded(){}setReadyState(t,i){this.element.setReadyStateInternal(t,i)}mountCallback(t){}unmountCallback(){}isRelayoutNeeded(){return!1}layoutCallback(){return e()}firstLayoutCompleted(){this.togglePlaceholder(!1)}pauseCallback(){}resumeCallback(){}unlayoutCallback(){return!1}unlayoutOnPause(){return!1}reconstructWhenReparented(){return!0}loadPromise(t){return Ge(t)}registerAction(t,i,s=2){Yn(this),this.actionMap_[t]={handler:i,minTrust:s}}registerDefaultAction(t,i="activate",s=2){yt(!this.defaultActionAlias_),this.registerAction(i,t,s),this.defaultActionAlias_=i}executeAction(t,i){let{method:s}=t;s===Wn&&(s=this.defaultActionAlias_||s),Yn(this);const e=this.actionMap_[s],{tagName:n}=this.element;bt(e,`Method not found: ${s} in ${n}`);const{handler:r,minTrust:h}=e;if(t.satisfiesTrust(h))return r(t)}forwardEvents(t,i){const s=(v(t)?t:[t]).map((t=>He(i,t,(i=>{Wt(this.element,t,je(i)||{})}))));return()=>s.forEach((t=>t()))}getPlaceholder(){return this.element.getPlaceholder()}togglePlaceholder(t){this.element.togglePlaceholder(t)}getFallback(){return this.element.getFallback()}toggleFallback(t){this.element.toggleFallback(t)}toggleLoading(t,i=!1){this.element.toggleLoading(t,i)}getOverflowElement(){return this.element.getOverflowElement()}renderStarted(){this.element.renderStarted()}getViewport(){return Ps(this.getAmpDoc())}getIntersectionElementLayoutBox(){return this.getLayoutBox()}collapse(){hs(this.getAmpDoc()).collapseElement(this.element)}attemptCollapse(){return hs(this.getAmpDoc()).attemptCollapse(this.element)}forceChangeHeight(t){hs(this.getAmpDoc()).forceChangeSize(this.element,t,void 0)}attemptChangeHeight(t){return hs(this.getAmpDoc()).requestChangeSize(this.element,t,void 0)}attemptChangeSize(t,i,s){return hs(this.getAmpDoc()).requestChangeSize(this.element,t,i,void 0,s)}measureElement(t){return hs(this.getAmpDoc()).measureElement(t)}mutateElement(t,i){return this.measureMutateElement(null,t,i)}measureMutateElement(t,i,s){return hs(this.getAmpDoc()).measureMutateElement(s||this.element,t,i)}mutateElementSkipRemeasure(t){return hs(this.getAmpDoc()).mutateElement(this.element,t,!0)}collapsedCallback(t){}expand(){hs(this.getAmpDoc()).expandElement(this.element)}mutatedAttributesCallback(t){}onLayoutMeasure(){}user(){return Mt(this.element)}getApi(){return this}};function Yn(t){t.actionMap_||(t.actionMap_=t.win.Object.create(null))}var Qn,Jn=class extends Kn{},Xn=Date.now(),Zn={bubbles:!1},tr=()=>!0,ir=[],sr=new Set;function er(t,i){const s=function(t,i){if(t.__AMP_BASE_CE_CLASS)return t.__AMP_BASE_CE_CLASS;const s=t.HTMLElement;return t.__AMP_BASE_CE_CLASS=class extends s{constructor(){super(),this.createdCallback()}createdCallback(){this.Ds=!1,this.on=!1,this.Ls=null,this.Hn=!1,this.Us=null,this.$s=null,this.Fs="upgrading",this.everAttached=!1,this.Qi=null,this.Vi=null,this.Bs=Ks,this.Ni=0,this.Hs=!1,this.warnOnMissingOverflow=!0,this.sizerElement=void 0,this.js=void 0,this.layoutScheduleTime=void 0;const i=this;let s=t.__AMP_EXTENDED_ELEMENTS&&t.__AMP_EXTENDED_ELEMENTS[this.localName];this.zs=s===Jn?null:s||null,this.zs||ir.push(this),this.Gs=null,this.qs=1,this.Ws=0,this.Ks=void 0,this.Ys=void 0,this.ai=new Ts,this.zs&&this.ai.signal(_e);const e=function(t,i){return zi(t=Ci(t),i)?Li(t,i):null}(t,"performance");this.Js=e&&e.isPerformanceTrackingOn(),this.Xn=null,i.__AMP_UPG_RES&&(i.__AMP_UPG_RES(i),delete i.__AMP_UPG_RES,delete i.__AMP_UPG_PRM)}get readyState(){return this.Fs}signals(){return this.ai}getAmpDoc(){return yt(this.Qi),this.Qi}getResources(){return yt(this.Vi),this.Vi}isUpgraded(){return 2==this.qs}whenUpgraded(){return this.ai.whenSignal(Ae)}upgrade(t){this.Ys||1==this.qs&&(this.zs=t,this.ai.signal(_e),this.everAttached&&this.Qs())}markUnresolved(){this.zs||this.classList.add("amp-unresolved","i-amphtml-unresolved")}getUpgradeDelayMs(){return this.Ws}Xs(i,s){this.Gs=i,this.Ws=t.Date.now()-s,this.qs=2,this.setReadyStateInternal(ci),this.classList.remove("amp-unresolved","i-amphtml-unresolved"),this.Zs(),this.dispatchCustomEventForTesting(fe),this.R1()||this.getResources().upgraded(this),this.ai.signal(Ae)}Zs(){this.Bs!=Ks&&this.Gs&&!this.Gs.isLayoutSupported(this.Bs)&&(bt(this.getAttribute("layout"),"The element did not specify a layout attribute. Check https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/control_layout and the respective element documentation for details."),bt(!1,`Layout not supported: ${this.Bs}`))}getBuildPriority(){return this.zs?this.zs.getBuildPriority(this):3}getLayoutPriority(){return this.Gs?this.Gs.getLayoutPriority():3}getDefaultActionAlias(){return yt(this.isUpgraded()),this.Gs.getDefaultActionAlias()}isBuilding(){return!!this.Ls}isBuilt(){return this.Ds}whenBuilt(){return this.ai.whenSignal(Pe)}buildInternal(){if(rr(this),yt(this.zs),this.Ls)return this.Ls;this.setReadyStateInternal(ci);const t=this.ie();this.se();const i=t.then((()=>{const t=this.he(),i=t?null:this.oe();if(t||i)return(this,qi(this,"consentPolicyManager","amp-consent")).then((s=>!s||(t?s.whenPolicyUnblock(t):s.whenPurposesUnblock(i)))).then((t=>{if(!t)throw new Error(In)}))})).then((()=>yt(this.Gs).buildCallback()));return this.Ls=i.then((()=>{if(this.Ds=!0,this.classList.add("i-amphtml-built"),this.classList.remove("i-amphtml-notbuilt","amp-notbuilt"),this.ai.signal(Pe),this.R1()?this.setReadyStateInternal(this.Fs!=ci?this.Fs:ai):(this.setReadyStateInternal(di),this.preconnect(!1)),this.on&&this.kt(),this.Ks&&ds(wt(this)).delay(this.ue.bind(this),1),!this.getPlaceholder()){const t=this.createPlaceholder();t&&this.appendChild(t)}}),(t=>{throw this.ai.rejectSignal(Pe,t),this.R1()&&this.setReadyStateInternal(pi,t),Vn(t)||bn(t,this),t}))}build(){return this.Ls?this.Ls:this.ai.whenSignal(_e).then((()=>(this.R1()&&Dn(this.getAmpDoc()).scheduleAsap(this),this.whenBuilt())))}mountInternal(){if(this.Us)return this.Us;this.$s=this.$s||new AbortController;const{signal:t}=this.$s;return this.Us=this.buildInternal().then((()=>{if(yt(this.R1()),t.aborted)return;this.setReadyStateInternal(this.Fs!=ai?this.Fs:this.zs.usesLoading(this)?di:ai),this.Hn=!0;const i=this.Gs.mountCallback(t);return!!i&&i.then(tr)})).then((i=>{if(this.$s=null,t.aborted)throw wn();this.ai.signal(ge),this.zs.usesLoading(this)&&!i||this.setReadyStateInternal(fi)})).catch((t=>{var i;throw this.$s=null,(i=t)&&("string"==typeof i?i.startsWith(Mn):"string"==typeof i.message&&i.message.startsWith(Mn))?this.Us=null:(this.ai.rejectSignal(ge,t),this.setReadyStateInternal(pi,t)),t}))}mount(){if(this.Us)return this.Us;this.$s=this.$s||new AbortController;const{signal:t}=this.$s;return this.ai.whenSignal(_e).then((()=>{if(!this.R1())return this.whenBuilt();if(t.aborted)throw wn();return Dn(this.getAmpDoc()).scheduleAsap(this),this.whenMounted()}))}unmount(){this.on&&this.pause(),this.R1()?(this.$s&&(this.$s.abort(),this.$s=null),Dn(this.getAmpDoc()).unschedule(this),this.Hn&&this.Gs.unmountCallback(),this.Hn=!1,this.Us=null,this.le(),this.on&&this.Qs(!0)):this.ce()}whenMounted(){return this.ai.whenSignal(ge)}whenLoaded(){return this.ai.whenSignal(Te)}ensureLoaded(t){return this.mount().then((()=>{if(this.R1())return this.zs.usesLoading(this)&&this.Gs.ensureLoaded(),this.whenLoaded();const i=this.ae();return i.whenBuilt().then((()=>{if(4!=i.getState()&&((3!=i.getState()||i.isMeasureRequested())&&i.measure(),i.isDisplayed()))return this.getResources().scheduleLayoutOrPreload(i,!0,t,!0),this.whenLoaded()}))}))}setAsContainerInternal(t){Dn(this.getAmpDoc()).setContainer(this,t)}removeAsContainerInternal(){Dn(this.getAmpDoc()).removeContainer(this)}setReadyStateInternal(t,i){if(t!==this.Fs&&(this.Fs=t,this.R1()))switch(t){case di:return this.ai.signal(ve),this.ai.reset(Me),this.ai.reset(Te),this.classList.add("i-amphtml-layout"),this.toggleLoading(!0),void this.dispatchCustomEventForTesting(pe);case fi:return this.ai.signal(ve),this.ai.signal(Te),this.ai.reset(Me),this.classList.add("i-amphtml-layout"),this.toggleLoading(!1),Wt(this,"load",null,Zn),void this.dispatchCustomEventForTesting(me);case pi:return this.ai.rejectSignal(Te,i),this.toggleLoading(!1),void Wt(this,"error",i,Zn)}}preconnect(t){yt(this.isUpgraded()),t?this.Gs.preconnectCallback(t):Bn(this.getAmpDoc(),(()=>{this.ownerDocument&&this.ownerDocument.defaultView&&this.Gs.preconnectCallback(t)}))}R1(){return!!this.zs&&this.zs.R1()}deferredMount(){return!!this.zs&&this.zs.deferredMount(this)}isAlwaysFixed(){return!!this.Gs&&this.Gs.isAlwaysFixed()}updateLayoutBox(t,i=!1){this.isBuilt()&&this.onMeasure(i)}onMeasure(){yt(this.isBuilt());try{this.Gs.onLayoutMeasure()}catch(t){bn(t,this)}}se(){var t;return void 0!==this.sizerElement||this.Bs!==Js&&this.Bs!==se||(this.sizerElement=this.querySelector("i-amphtml-sizer"),null===(t=this.sizerElement)||void 0===t||t.setAttribute("slot","i-amphtml-svc")),this.sizerElement||null}de(t){if(this.Bs!==Js)if(this.Bs!==se);else{const i=t.querySelector(".i-amphtml-intrinsic-sizer");if(!i)return;i.setAttribute("src","")}else ws(t,"paddingTop","0")}fe(){const t=this.hasAttribute("media")||this.hasAttribute("sizes")&&!this.hasAttribute("disable-inline-width")||this.hasAttribute("heights"),i=!!this.Xn,s=this.ownerDocument.defaultView;t!=i&&s&&(t?(this.Xn=new class{constructor(t,i){this.i=t,this.wt=i,this.ti={},this.ni=null}start(){this.ni=this.ti,this.ti={}}resolveMatchQuery(t){return"1"===this.ii(t,Ie,"1")}resolveListQuery(t){return this.ii(t,Re,"")}complete(){for(const t in this.ni)t in this.ti||ye(this.ni[t],this.wt,!1);this.ni=null}dispose(){for(const t in this.ti)ye(this.ti[t],this.wt,!1);this.ti={}}ii(t,i,s){if(!t.trim())return s;let e=this.ti[t];return e||(D(this.ni),e=this.ni[t]),e||(e=i(this.i,t),ye(e,this.wt,!0)),this.ti[t]=e,function(t){for(let i=0;ithis.pe())),this.pe()):this.me())}me(){this.Xn&&(this.Xn.dispose(),this.Xn=null)}pe(){const t=this.Xn;if(!t)return;t.start();const i=this.getAttribute("media")||null,s=!i||t.resolveMatchQuery(i);this.classList.toggle("i-amphtml-hidden-by-media-query",!s);const e=this.hasAttribute("disable-inline-width")?null:this.getAttribute("sizes");e&&ws(this,"width",t.resolveListQuery(e));const n=this.Bs===Js?this.getAttribute("heights"):null;if(n){const i=this.se();i&&ws(i,"paddingTop",t.resolveListQuery(n))}t.complete(),this.ae().requestMeasure()}applySize(t,i,s){const e=this.se();e&&(this.sizerElement=null,this.de(e),this._e((()=>{e&&Bt(e)}))),void 0!==t&&ws(this,"height",t,"px"),void 0!==i&&ws(this,"width",i,"px"),s&&(null!=s.top&&ws(this,"marginTop",s.top,"px"),null!=s.right&&ws(this,"marginRight",s.right,"px"),null!=s.bottom&&ws(this,"marginBottom",s.bottom,"px"),null!=s.left&&ws(this,"marginLeft",s.left,"px")),this.Ae()&&this.ge(),Wt(this,"amp:size-changed")}connectedCallback(){if(function(){if(void 0===Qn){const t=self.document.createElement("template");Qn="content"in t}return Qn}()||void 0!==this.Ys||(this.Ys=!!Ct(this,"template")),!this.Ys&&!this.on&&Ht(this)){if(this.on=!0,this.everAttached||this.classList.add("i-amphtml-element","i-amphtml-notbuilt","amp-notbuilt"),!this.Qi){const t=wt(this),s=Zi(t).getAmpDoc(this);this.Qi=s,i(s,this,this.zs)}if(this.Vi||(this.Vi=cs(this.Qi)),this.getResources().add(this),this.everAttached){const t=this.reconstructWhenReparented();t&&this.le(),this.isUpgraded()&&(t&&!this.R1()&&this.getResources().upgraded(this),this.kt(),this.dispatchCustomEventForTesting(fe)),this.zs&&this.R1()&&this.Qs()}else{this.everAttached=!0;try{this.Bs=function(t){const i=t.getAttribute("i-amphtml-layout");if(i){const e=ne(i);var s;return D(e),e!=Js&&e!=se||!t.firstElementChild?e==Ks&&Ss(t,!1):(t.sizerElement=t.querySelector("i-amphtml-sizer")||void 0,null===(s=t.sizerElement)||void 0===s||s.setAttribute("slot","i-amphtml-svc")),e}const{height:e,layout:n,width:r}=xe(t);if(t.classList.add(re(n)),he(n)&&t.classList.add("i-amphtml-layout-size-defined"),n==Ks)Ss(t,!1);else if(n==Ys)Vs(t,{width:U(r),height:U(e)});else if(n==Qs)ws(t,"height",U(e));else if(n==Js){const i=t.ownerDocument.createElement("i-amphtml-sizer");i.setAttribute("slot","i-amphtml-svc");const s=le(e),n=le(r);$(s),$(n),Vs(i,{paddingTop:s/n*100+"%"}),t.insertBefore(i,t.firstChild),t.sizerElement=i}else if(n==se){const i=be(t)(Ve),s=i.firstElementChild;L(s),s.setAttribute("src",`data:image/svg+xml;charset=utf-8,`),t.insertBefore(i,t.firstChild),t.sizerElement=i}else n==Zs||n==Xs||(n==te?(r&&ws(t,"width",r),e&&ws(t,"height",e)):n==ie&&(t.classList.add("i-amphtml-layout-awaiting-size"),r&&ws(t,"width",r),ws(t,"height",0)));return t.setAttribute("i-amphtml-layout",n),n}(this),this.fe()}catch(t){bn(t,this)}this.zs?this.Qs():(sr.has("*")||sr.has(this.tagName.toLowerCase()))&&this.markUnresolved(),this.isUpgraded()||this.dispatchCustomEventForTesting("amp:stubbed")}this.toggleLoading(!0)}}Ae(){return this.classList.contains("i-amphtml-layout-awaiting-size")}ge(){this.classList.remove("i-amphtml-layout-awaiting-size")}Qs(t){if(this.R1()){if(!this.Us)if(Dn(this.getAmpDoc()).schedule(this),this.classList.remove("amp-unresolved","i-amphtml-unresolved"),this.Ls)this.setReadyStateInternal(this.zs&&this.zs.usesLoading(this)?di:ai);else if(this.setReadyStateInternal(ci),!t){const t=this.zs.getPreconnects(this);if(t&&t.length>0){const i=this.getAmpDoc();Bn(i,(()=>{const{win:s}=i;if(!s)return;const e=ls(s);t.forEach((t=>e.url(i,t,!1)))}))}}}else this.Pe()}Pe(){if(this.Ys)return;if(1!=this.qs)return;const i=new(yt(this.zs))(this);this.qs=4;const s=t.Date.now(),e=i.upgradeCallback();if(e){if("function"==typeof e.then)return e.then((t=>{this.Xs(t||i,s)})).catch((t=>{this.qs=3,l(t)}));this.Xs(e,s)}else this.Xs(i,s)}disconnectedCallback(){this.disconnect(!1)}kt(){this.Ds&&this.Gs.attachedCallback()}disconnect(t){!this.Ys&&this.on&&(!t&&Ht(this)||(t&&this.classList.remove("i-amphtml-element"),this.on=!1,this.getResources().remove(this),this.Gs&&this.Gs.detachedCallback(),this.R1()&&this.unmount(),this.toggleLoading(!1),this.me()))}dispatchCustomEventForTesting(t,i){}prerenderAllowed(){return!this.hasAttribute("noprerender")&&!!this.zs&&this.zs.prerenderAllowed(this)}previewAllowed(){return!!this.zs&&this.zs.previewAllowed(this)}isBuildRenderBlocking(){return!!this.Gs&&this.Gs.isBuildRenderBlocking()}createPlaceholder(){return this.Gs?this.Gs.createPlaceholderCallback():null}createLoaderLogo(){return this.zs?this.zs.createLoaderLogoCallback(this):{}}renderOutsideViewport(){return!!this.Gs&&this.Gs.renderOutsideViewport()}idleRenderOutsideViewport(){return!!this.Gs&&this.Gs.idleRenderOutsideViewport()}getLayoutBox(){return this.ae().getLayoutBox()}getLayoutSize(){return this.ae().getLayoutSize()}getOwner(){return this.ae().getOwner()}getIntersectionChangeEntry(){const t=this.Gs?this.Gs.getIntersectionElementLayoutBox():this.getLayoutBox(),i=this.getOwner(),s=Ps(this.getAmpDoc()).getRect();return function(t,i,s){const e=function(t){let i=-1/0,s=1/0,e=-1/0,n=1/0;for(let t=0;tthis.Gs))}ie(){return this.ai.whenSignal(_e).then((()=>(this.Pe(),this.whenUpgraded())))}getApi(){return this.getImpl().then((t=>t.getApi()))}getLayout(){return this.Bs}layoutCallback(t){if(rr(this),yt(this.isBuilt()),t.aborted)return Promise.reject(wn());this.dispatchCustomEventForTesting(pe);const i=0==this.Ni;this.ai.reset(Me),i&&this.ai.signal(ve),this.toggleLoading(!0);const s=r((()=>this.Gs.layoutCallback()));return this.preconnect(!0),this.classList.add("i-amphtml-layout"),s.then((()=>{if(t.aborted)throw wn();i&&this.ai.signal(Te),this.setReadyStateInternal(fi),this.Ni++,this.toggleLoading(!1),this.Hs||(this.Gs.firstLayoutCompleted(),this.Hs=!0,this.dispatchCustomEventForTesting(me))}),(s=>{if(t.aborted)throw wn();throw i&&this.ai.rejectSignal(Te,s),this.setReadyStateInternal(pi,s),this.Ni++,this.toggleLoading(!1),s}))}pause(){this.isBuilt()&&(this.Gs.pauseCallback(),!this.R1()&&this.Gs.unlayoutOnPause()&&this.ce())}resume(){this.isBuilt()&&this.Gs.resumeCallback()}unlayoutCallback(){if(rr(this),!this.isBuilt())return!1;this.ai.signal(Me);const t=this.Gs.unlayoutCallback();return t&&this.le(),this.dispatchCustomEventForTesting("amp:unload"),t}ce(){this.ae().unlayout(),this.on&&this.Vi&&this.Vi.schedulePass()}le(){this.Ni=0,this.Hs=!1,this.ai.reset(ge),this.ai.reset(Ee),this.ai.reset(ve),this.ai.reset(Te),this.ai.reset("ini-load")}reconstructWhenReparented(){return!!this.Gs&&this.Gs.reconstructWhenReparented()}collapse(){this.Gs&&this.Gs.collapse()}collapsedCallback(t){this.Gs&&this.Gs.collapsedCallback(t)}expand(){this.Gs&&this.Gs.expand()}mutatedAttributesCallback(t){this.Gs?this.Gs.mutatedAttributesCallback(t):this.R1()&&Dn(this).scheduleAsap(this)}enqueAction(t){rr(this),this.isBuilt()?this.ve(t,!1):(void 0===this.Ks&&(this.Ks=[]),yt(this.Ks).push(t),this.build())}ue(){if(!this.Ks)return;const t=yt(this.Ks);this.Ks=null,t.forEach((t=>{this.ve(t,!0)}))}ve(t,i){try{this.Gs.executeAction(t,i)}catch(i){l("Action execution failed:",i,t.node.tagName,t.method)}}he(){let t=this.getAttribute("data-block-on-consent");if(null===t){if(!function(t){let i=t.getAmpDoc().getMetaByName("amp-consent-blocking");return!!i&&(i=i.toUpperCase().replace(/\s+/g,""),i.split(",").includes(t.tagName))}(this))return null;t="default",this.setAttribute("data-block-on-consent",t)}return""==t||"default"==t?yt(this.Gs).getConsentPolicy():t}oe(){var t;const i=this.getAttribute("data-block-on-consent-purposes")||null;return null==i||null===(t=i.replace(/\s+/g,""))||void 0===t?void 0:t.split(",")}getPlaceholder(){return kt(this,(t=>t.hasAttribute("placeholder")&&!nr(t)))}togglePlaceholder(t){if(rr(this),t){const t=this.getPlaceholder();t&&t.classList.remove("amp-hidden")}else{const t=(this,xt("placeholder"),"> [placeholder]",this.querySelectorAll(Vt("> [placeholder]",":scope")));for(let i=0;i0||this.ai.get(Ee);return!(this.Bs==Ks||this.hasAttribute("noloading")||i&&!t||!function(t){const i=t.tagName.toUpperCase();return"AMP-AD"===(s=i)||"AMP-ANIM"===s||"AMP-EMBED"===s||"AMP-FACEBOOK"===s||"AMP-FACEBOOK-COMMENTS"===s||"AMP-FACEBOOK-PAGE"===s||"AMP-GOOGLE-DOCUMENT-EMBED"===s||"AMP-IFRAME"===s||"AMP-IMG"===s||"AMP-INSTAGRAM"===s||"AMP-LIST"===s||"AMP-PINTEREST"===s||"AMP-PLAYBUZZ"===s||"AMP-RENDER"===s||"AMP-TIKTOK"===s||"AMP-TWITTER"===s||function(t){return"AMP-VIDEO"!=t&&ee.test(t)}(i);var s}(this)||Dt(this))}toggleLoading(t,i=!1){if(!this.ownerDocument||!this.ownerDocument.defaultView)return;const s=Si(this.getAmpDoc(),"loadingIndicator");s&&((t=t&&this.Ee(i))?s.track(this):s.untrack(this))}getOverflowElement(){return void 0===this.js&&(this.js=Nt(this,"overflow"),this.js&&(this.js.hasAttribute("tabindex")||this.js.setAttribute("tabindex","0"),this.js.hasAttribute("role")||this.js.setAttribute("role","button"))),this.js}overflowCallback(t,i,s){this.getOverflowElement(),this.js?(this.js.classList.toggle("amp-visible",t),this.js.onclick=t?()=>{const t=hs(this.getAmpDoc());t.forceChangeSize(this,i,s),t.mutateElement(this,(()=>{this.overflowCallback(!1,i,s)}))}:null):t&&this.warnOnMissingOverflow}_e(t,i,s=!1){this.Qi?hs(this.getAmpDoc()).mutateElement(i||this,t,s):t()}},t.__AMP_BASE_CE_CLASS}(t,i);class e extends s{adoptedCallback(){Object.getPrototypeOf(this)!==n&&Object.setPrototypeOf(this,n)}}const n=e.prototype;return e}function nr(t){return"placeholder"in t}function rr(t){yt(!t.Ys)}function hr(t){sr.add(t||"*");for(const i of ir)null!=t&&i.tagName.toLowerCase()!==t||i.markUnresolved()}var or=new WeakMap;function ur(t){return t.__AMP_EXTENDED_ELEMENTS||(t.__AMP_EXTENDED_ELEMENTS={}),t.__AMP_EXTENDED_ELEMENTS}function lr(t,i,s){const e=ur(t);if(e[i]){if(e[i]!=s){bt(e[i]==Jn,"%s is already registered. The script tag for %s is likely included twice in the page.",i,i),e[i]=s;for(let e=0;e{t.declareExtension(i,s),e.addEventListener("error",(()=>hr(i))),dr(t.win,i)})),t.isBodyAvailable()&&t.setExtensionsKnown()}function dr(t,i){ur(t)[i]||pr(t,i,Jn)}function fr(t,i,s){pr(i,s,ur(t)[s]||Jn)}function pr(t,i,s){ur(t)[i]=s;const e=er(t,mr);t.customElements.define(i,e)}function mr(t,i,s){or.has(t)||(or.set(t,!0),ar(t));const e=i.localName;s||t.declaresExtension(e)||ns(t.win).installExtensionForDoc(t,e,"0.1")}var _r="amp-img",Ar=["alt","aria-describedby","aria-label","aria-labelledby","crossorigin","referrerpolicy","title","importance","sizes","srcset","src"],Pr=class extends Kn{static R1(){return!1}static prerenderAllowed(){return!0}static usesLoading(){return!0}static getPreconnects(t){const i=t.getAttribute("src");if(i)return[i];const s=t.getAttribute("srcset");if(s){const t=/\S+/.exec(s);if(t)return[t[0]]}return null}constructor(t){super(t),this.Te=!0,this.Ie=null,this.Re=null,this.Me=null,this.ye=0}mutatedAttributesCallback(t){if(this.Ie){const i=Ar.filter((i=>void 0!==t[i]));t.src&&!t.srcset&&this.element.hasAttribute("srcset")&&(this.element.removeAttribute("srcset"),i.push("srcset"),this.user().warn(_r,"Removed [srcset] since [src] was mutated. Recommend adding a [srcset] binding to support responsive images.",this.element)),ae(i,this.element,this.Ie,!0),this.propagateDataset(this.Ie),Pr.R1()&&!this.Ie.complete&&this.setReadyState(di)}}preconnectCallback(t){const i=this.element.getAttribute("src");if(i)ls(this.win).url(this.getAmpDoc(),i,t);else{const i=this.element.getAttribute("srcset");if(!i)return;const s=/\S+/.exec(i);s&&ls(this.win).url(this.getAmpDoc(),s[0],t)}}isLayoutSupported(t){return he(t)}we(){if(this.Ie)return this.Ie;this.Te=!this.element.hasAttribute("fallback");const t=Yt(this.element);var i,s;return t&&(this.Ie=Ot(this.element,"> img:not([placeholder])")),this.Ie=this.Ie||new Image,this.Ie.setAttribute("decoding","async"),this.element.id&&this.Ie.setAttribute("amp-img-id",this.element.id),"img"==this.element.getAttribute("role")&&(this.element.removeAttribute("role"),this.user().error(_r,"Setting role=img on amp-img elements breaks screen readers please just set alt or ARIA attributes, they will be correctly propagated for the underlying element.")),this.be(!0),ae(Ar,this.element,this.Ie),this.propagateDataset(this.Ie),ce(this.Ie,!0),i=this.element,s=this.Ie,i.hasAttribute("object-fit")&&ws(s,"object-fit",i.getAttribute("object-fit")),i.hasAttribute("object-position")&&ws(s,"object-position",i.getAttribute("object-position")),t||this.element.appendChild(this.Ie),this.Ie}be(t){if(!this.Ie)return;if(this.element.hasAttribute("i-amphtml-ssr"))return;if(this.element.hasAttribute("sizes")||this.Ie.hasAttribute("sizes"))return;const i=this.element.getAttribute("srcset");if(!i||/[0-9]+x(?:,|$)/.test(i))return;const{width:s}=this.element.getLayoutSize();if(!this.Ve(s))return;const e=this.getViewport().getWidth(),n=`(max-width: ${e}px) ${s}px, `;let r=s+"px";if(this.getLayout()!==Ys){const t=Math.round(100*s/e);r=Math.max(t,100)+"vw"}const h=n+r;t?this.Ie.setAttribute("sizes",h):this.mutateElement((()=>{this.Ie.setAttribute("sizes",h)})),this.ye=s}Ve(t){return!this.Ie.hasAttribute("sizes")||t>this.ye}reconstructWhenReparented(){return!1}mountCallback(){const t=!!this.Ie,i=this.we();t||(He(i,"load",(()=>{this.setReadyState(fi),this.firstLayoutCompleted(),this.Se()})),He(i,"error",(t=>{this.setReadyState(pi,t),this.xe()}))),i.complete?(this.setReadyState(fi),this.firstLayoutCompleted(),this.Se()):this.setReadyState(di)}unmountCallback(){const t=this.Ie;t&&!t.complete&&(t.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",Bt(t),this.Ie=null)}ensureLoaded(){this.Ie.loading="eager"}layoutCallback(){this.we();const t=this.Ie;this.Re=He(t,"load",(()=>this.Se())),this.Me=He(t,"error",(()=>this.xe()));const{width:i}=this.element.getLayoutSize();return i<=0?e():this.loadPromise(t)}unlayoutCallback(){if(Pr.R1())return;this.Me&&(this.Me(),this.Me=null),this.Re&&(this.Re(),this.Re=null);const t=this.Ie;return t&&!t.complete&&(t.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",Bt(t),this.Ie=null),!0}firstLayoutCompleted(){const t=this.getPlaceholder();t&&t.classList.contains("i-amphtml-blurry-placeholder")?bs(t,{"opacity":0}):this.togglePlaceholder(!1)}Se(){!this.Te&&this.Ie.classList.contains("i-amphtml-ghost")&&(this.Ie.classList.remove("i-amphtml-ghost"),this.toggleFallback(!1))}xe(){this.Te&&(this.Ie.classList.add("i-amphtml-ghost"),this.toggleFallback(!0),this.togglePlaceholder(!1),this.Te=!1)}propagateDataset(t){for(const i in t.dataset)i in this.element.dataset||delete t.dataset[i];for(const i in this.element.dataset)i.startsWith("ampBind")&&"ampBind"!==i||t.dataset[i]!==this.element.dataset[i]&&(t.dataset[i]=this.element.dataset[i])}},gr=class extends Kn{static prerenderAllowed(){return!0}isLayoutSupported(t){return t==Xs||he(t)}buildCallback(){!function(t){if(Yt(t))return;const i=function(t){var i;return ne(null!==(i=t.getAttribute("layout"))&&void 0!==i?i:"")||xe(t).layout}(t);if(i==Xs)return;const s=t.ownerDocument.createElement("div");ce(s),function(t){return function(t,i){const s=[];for(let i=t.firstChild;i;i=i.nextSibling)!Dt(i)&&s.push(i);return s}(t)}(t).forEach((t=>{s.appendChild(t)})),t.appendChild(s)}(this.element)}};function vr(t,i,s=!1){const e=new(Ls.getImage(t));return s&&(e.referrerPolicy="no-referrer"),e.src=i,e}var Er="amp-pixel",Tr=class extends Kn{constructor(t){super(t),this.Oe=null}isLayoutSupported(t){return!0}buildCallback(){this.element.setAttribute("aria-hidden","true"),this.Ce=this.element.getAttribute("referrerpolicy"),this.Ce&&bt("no-referrer"==this.Ce,`${Er}: invalid "referrerpolicy" value "${this.Ce}". Only "no-referrer" is supported`),this.element.hasAttribute("i-amphtml-ssr")&&this.element.querySelector("img")||this.getAmpDoc().whenFirstVisible().then(this.ke.bind(this))}ke(){if(this.Oe)return Rt().error(Er,"duplicate pixel"),this.Oe;this.Oe=ds(this.win).promise(1).then((()=>{const t=this.element.getAttribute("src");if(t)return fs(this.element).expandUrlAsync(this.Ne(t)).then((t=>{if(this.win)return function(t,i,s){return s&&"no-referrer"!==s&&Mt().error("pixel","Unsupported referrerPolicy: %s",s),"no-referrer"===s?function(t,i){if("referrerPolicy"in Image.prototype)return vr(t,i,!0);{const e=(s={"src":"about:blank","style":"display:none"},function(t,i){for(const s in i)t.setAttribute(s,i[s]);return t}(t.document.createElement("iframe"),s));return e.onload=()=>{vr(e.contentWindow,i)},t.document.body.appendChild(e),e}var s}(t,i):vr(t,i)}(this.win,t,this.Ce)}))}))}Ne(t){return bt(/^(https\:\/\/|\/\/)/i.test(t),'The src attribute must start with "https://" or "//". Invalid value: '+t),t}},Mr=class{constructor(t,i,s){this.De=ds(t),this.Le=i,this.Ue=s||0,this.$e=-1,this.Fe=0,this.wn=!1,this.Be=()=>{this.He()}}isPending(){return-1!=this.$e}schedule(t){let i=t||this.Ue;this.wn&&i<10&&(i=10);const s=Date.now()+i;return(!this.isPending()||s-this.Fe<-10)&&(this.cancel(),this.Fe=s,this.$e=this.De.delay(this.Be,i),!0)}He(){this.$e=-1,this.Fe=0,this.wn=!0,this.Le(),this.wn=!1}cancel(){this.isPending()&&(this.De.cancel(this.$e),this.$e=-1)}};function Ir(t,i){const s=i.documentElement;return t.some((t=>s.hasAttribute(t)))}function Rr(t){return Ir(["⚡4email","amp4email"],t)}function yr(t){return Ir(["⚡","amp"],t)}var br="Action",wr="__AMP_ACTION_MAP__"+Math.random(),Vr="__AMP_ACTION_QUEUE__",Sr="__AMP_ACTION_HANDLER__",xr={"form":["submit","clear"]},Or=[{tagOrTarget:"AMP",method:"setState"},{tagOrTarget:"*",method:"focus"},{tagOrTarget:"*",method:"hide"},{tagOrTarget:"*",method:"show"},{tagOrTarget:"*",method:"toggleClass"},{tagOrTarget:"*",method:"toggleChecked"},{tagOrTarget:"*",method:"toggleVisibility"}],Cr={"button":!0,"checkbox":!0,"link":!0,"listbox":!0,"menuitem":!0,"menuitemcheckbox":!0,"menuitemradio":!0,"option":!0,"radio":!0,"scrollbar":!0,"slider":!0,"spinbutton":!0,"switch":!0,"tab":!0,"treeitem":!0},kr=class{constructor(t,i,s,e,n,r,h,o="?",u=null,l=Math.random()){this.node=t,this.method=i,this.args=s,this.source=e,this.caller=n,this.event=r,this.trust=h,this.actionEventType=o,this.tagOrTarget=u||t.tagName,this.sequenceId=l}satisfiesTrust(t){if(!w(this.trust))return Rt().error(br,`Invalid trust for '${this.method}': ${this.trust}`),!1;if(this.trustt.value)).join(".")};r||(r=p()),r[u]=l,n=t.peek(),s(n.type==Hr.SEPARATOR&&(","==n.value||")"==n.value),"Expected either [,] or [)]")}else s(!1,`; unexpected token [${e.value||""}]`)}while(e.type!=Hr.SEPARATOR||")"!=e.value);var h;return r}function Fr(t,i,s,e){return bt(s,"Invalid action definition in %s: [%s] %s",i,t,e||"")}function Br(t,i,s,e,n){return void 0!==n?Fr(t,i,e.includes(s.type)&&s.value==n,`; expected [${n}]`):Fr(t,i,e.includes(s.type)),s}var Hr={INVALID:0,EOF:1,SEPARATOR:2,LITERAL:3,ID:4,OBJECT:5},jr=" \t\n\r\f\v \u2028\u2029",zr=class{constructor(t){this.je=t,this.ze=-1}next(t){const i=this.Ge(t||!1);return this.ze=i.index,i}peek(t){return this.Ge(t||!1)}Ge(t){let i=this.ze+1;if(i>=this.je.length)return{type:Hr.EOF,index:this.ze};let s=this.je.charAt(i);if(-1!=jr.indexOf(s)){for(i++;i=this.je.length)return{type:Hr.EOF,index:i};s=this.je.charAt(i)}if(t&&(Gr(s)||"."==s&&i+1="0"&&t<="9"}function qr(t){return!!t&&"function"==typeof t.getFormData}var Wr=["GET","POST"],Kr=[v,f];function Yr(t,i){const s=g({},i);if(qr(i.body)){const t=i.body;s.headers["Content-Type"]="multipart/form-data;charset=utf-8",s.body=function(t){const i=[];for(let s=t.next();!s.done;s=t.next())i.push(s.value);return i}(t.entries())}return{input:t,init:s}}function Qr(t,i){const s=t||{},e=s.credentials;return D(void 0===e||"include"==e||"omit"==e),s.method=void 0===(n=s.method)?"GET":(n=n.toUpperCase(),D(Wr.includes(n)),n),s.headers=s.headers||{},i&&(s.headers.Accept=i),D(null!==s.body),s;var n}function Jr(t){return new Promise((i=>{if(t.ok)return i(t);const{status:s}=t,e=Mt().createError(`HTTP error ${s}`);throw e.retriable=function(t){return 415==t||t>=500&&t<600}(s),e.response=t,e}))}var Xr=class{constructor(t){this.win=t;const i=Zi(t);this.qe=i.isSingleDoc()?i.getSingleDoc():null}We(t,i){return function(t,i,s,n){if(!i)return e();const r=n.prerenderSafe?e():i.whenFirstVisible(),h=_s(i),o=pn(s),u=h.hasCapability("xhrInterceptor"),l=n.bypassInterceptorForDev&&!1;return o||!u||l?r:i.getRootNode().documentElement.hasAttribute("allow-xhr-interception")?r.then((()=>h.isTrustedViewer())).then((i=>{if(!i&&!Ne(t,"untrusted-xhr-interception"))return;const e={"originalRequest":Yr(s,n)};return h.sendMessageAwaitResponse("xhr",e).then((t=>function(t,i){if(F(f(t),"Object expected: %s",t),"document"!=i)return new Response(t.body,t.init);const s=p(),e={status:200,statusText:"OK",getResponseHeader:t=>s[String(t).toLowerCase()]||null};if(t.init){const i=t.init;v(i.headers)&&i.headers.forEach((t=>{const i=t[0],e=t[1];s[String(i).toLowerCase()]=String(e)})),i.status&&(e.status=parseInt(i.status,10)),i.statusText&&(e.statusText=String(i.statusText))}return new Response(t.body?String(t.body):"",e)}(t,n.responseType)))})):r}(this.win,this.qe,t,i).then((t=>{if(t)return t;if(qr(i.body)){const t=i.body;i.body=t.getFormData()}return this.win.fetch.apply(null,arguments)}))}Ke(t,i={}){return t=function(t,i,s){return D("string"==typeof i),!1!==s.ampCors&&(i=En(t,i)),i}(this.win,t,i),i=function(t,i,s){s=s||{};const e=function(t){return t.origin||rn(t.location.href).origin}(t);return e==rn(i).origin&&(s.headers=s.headers||{},s.headers["AMP-Same-Origin"]="true"),s}(this.win,t,i),this.We(t,i).then((t=>t),(i=>{const s=rn(t).origin;throw Mt().createExpectedError("XHR",`Failed fetching (${s}/...):`,i&&i.message)}))}fetchJson(t,i){return this.fetch(t,function(t){const i=Qr(t,"application/json");if("POST"==i.method&&!qr(i.body)){D(Kr.some((t=>t(i.body)))),i.headers["Content-Type"]=i.headers["Content-Type"]||"text/plain;charset=utf-8";const t=i.headers["Content-Type"];i.body="application/x-www-form-urlencoded"===t?cn(i.body):JSON.stringify(i.body)}return i}(i))}fetchText(t,i){return this.fetch(t,Qr(i,"text/plain"))}xssiJson(t,i){return i?t.text().then((t=>t.startsWith(i)?B(t.slice(i.length)):B(t))):t.json()}fetch(t,i){const s=Qr(i);return this.Ke(t,s).then((t=>Jr(t)))}sendSignal(t,i){return this.Ke(t,i).then((t=>Jr(t)))}getCorsUrl(t,i){return En(t,i)}},Zr=class extends Xr{constructor(t){super(t),this.Ye=p()}fetch(t,i){const s=i&&i.headers&&i.headers.Accept||"",e=!i||!i.method||"GET"===i.method,n=this.Je(t,s),r=!!this.Ye[n];if(e&&r)return this.Ye[n].then((t=>t.clone()));const h=super.fetch(t,i);return e&&(this.Ye[n]=h.then((t=>(delete this.Ye[n],t.clone())),(t=>{throw delete this.Ye[n],t}))),h}Je(t,i){return fn(vn(t,gn(this.win.location)))+i}},th={"+":"-","/":"_","=":"."};function ih(t){const i=function(t){const i=new Array(t.length);for(let s=0;sth[t]))}var sh="AIzaSyDKtqGxnoeIqVM33Uf7hRSa3GJxuzR7mLc",eh="CacheCidApi",nh="-test-amp-cookie-tmp";function rh(t,i){const s=function(t){try{return t.document.cookie}catch(t){return""}}(t);if(!s)return null;const e=s.split(";");for(let t=0;t=0;n--)if(s=i[n]+"."+s,oh(t,e,"delete",Date.now()+1e3,s),"delete"==rh(t,e))return oh(t,e,"delete",Date.now()-1e3,s),s}return null}(t)),oh(t,i,s,e,r,n.sameSite,n.secure)}function oh(t,i,s,e,n,r,h){"ampproject.org"==n&&(s="delete",e=0);const o=encodeURIComponent(i)+"="+encodeURIComponent(s)+"; path=/"+(n?"; domain="+n:"")+"; expires="+new Date(e).toUTCString()+function(t,i){return i?`; SameSite=${i}`:""}(0,r)+(h?"; Secure":"");try{t.document.cookie=o}catch(t){}}var uh="GoogleCidApi",lh="AMP_TOKEN",ch="$RETRIEVING",ah="$OPT_OUT",dh="$NOT_FOUND",fh=3e4,ph=31536e6,mh=31536e6,_h=/^[a-zA-Z0-9-_.]+$/,Ah="amp-cid-optout",Ph={"googleanalytics":"AMP_ECID_GOOGLE"},gh={"googleanalytics":"AIzaSyA65lEHUEizIsNtlbNo-l2K18dT680nsaM"};function vh(t,i,s){hh(t,i,s,Date.now()+mh,{highestAvailableDomain:!0})}function Eh(t,i,s){as(t).then((t=>{if(!t.isViewerStorage()){const e=Th(i);t.setNonBoolean(e,s)}}))}function Th(t){return"amp-cid:"+t}function Mh(t,i,s){const{ampdoc:e}=t,{win:n}=e,{disableBackup:r,scope:h}=i,o=i.cookieName||h;return function(t,i){const{ampdoc:s}=t,{win:e}=s,{disableBackup:n,scope:r}=i,h=i.cookieName||r,o=rh(e,h);return o?Promise.resolve(o):n?Promise.resolve(null):as(s).then((t=>{const i=Th(h);return t.get(i,mh)})).then((t=>t&&"string"==typeof t?t:null))}(t,i).then((u=>{if(!u&&!i.createCookieIfNotPresent)return Promise.resolve(null);if(u)return/^amp-/.test(u)&&(vh(n,o,u),r||Eh(e,o,u)),Promise.resolve(u);if(t.Qe[h])return t.Qe[h];const l=bh(n).then((t=>"amp-"+t));return Promise.all([l,s]).then((t=>{const i=t[0];rh(n,o)||(vh(n,o,i),r||Eh(e,o,i))})),t.Qe[h]=l}))}function Ih(t,i){const s=_s(t);return s.isTrustedViewer().then((t=>{if(t)return Rt().expectedError("CID","Viewer does not provide cap=cid"),s.sendMessageAwaitResponse("cid",i).then((t=>t&&!function(t,i){try{return B(t)}catch(t){return null}}(t)?(Rt().expectedError("CID","invalid cid format"),JSON.stringify({"time":Date.now(),"cid":t})):t))}))}function Rh(t){return JSON.stringify({"time":Date.now(),"cid":t})}function yh(t){return j(t,16)||String(t.location.href+Date.now()+t.Math.random()+t.screen.width+t.screen.height)}function bh(t){const i=yh(t);if("string"==typeof i)return ss(t).sha384Base64(i);{const t=i;return r((()=>ih(t).replace(/\.+$/,"")))}}var wh="Crypto";var Vh=["prefetch","preload","preconnect","dns-prefetch"],Sh={attributes:!0,attributeFilter:["hidden"],subtree:!0};function xh(t){try{return t.state}catch(t){return null}}var Oh="History",Ch="AMP.History";function kh(t){const i=_s(t);let s;return i.isOvertakeHistory()||t.win.__AMP_TEST_IFRAME?s=new class{constructor(t,i){this.win=t,this.Xe=i,this.Ze=0,this.cn=null,this.tr=this.Xe.onMessage("historyPopped",(t=>this.ir(t)))}replaceStateForTarget(t){yt("#"==t[0]),this.win.location.replace(t)}cleanup(){this.tr()}setOnStateUpdated(t){this.cn=t}sr(t,i,s){return this.er(t)?t:i}er(t){return!!t&&void 0!==t.stackIndex}push(t){const i=g({"stackIndex":this.Ze+1},t||{}),s="pushHistory";return this.Xe.sendMessageAwaitResponse(s,i).then((t=>{const e=i,n=this.sr(t,e,s);return this.nr(n),n}))}pop(t){if(t>this.Ze)return this.get();const i={"stackIndex":this.Ze},s="popHistory";return this.Xe.sendMessageAwaitResponse(s,i).then((t=>{const i={"stackIndex":this.Ze-1},e=this.sr(t,i,s);return this.nr(e),e}))}replace(t){if(t&&t.url){if(!this.Xe.hasCapability("fullReplaceHistory")){const t={"stackIndex":this.Ze};return Promise.resolve(t)}const i=t.url.replace(/#.*/,"");t.url=i}const i=g({"stackIndex":this.Ze},t||{}),s="replaceHistory";return this.Xe.sendMessageAwaitResponse(s,i,!0).then((t=>{const e=i,n=this.sr(t,e,s);return this.nr(n),n}))}get(){return Promise.resolve({data:void 0,fragment:"",stackIndex:this.Ze,title:""})}ir(t){void 0!==t.newStackIndex&&(t.stackIndex=t.newStackIndex),this.er(t)&&this.nr(t)}nr(t){const{stackIndex:i}=t;this.Ze!=i&&(this.Ze=i,this.cn&&this.cn(t))}getFragment(){return this.Xe.hasCapability("fragment")?this.Xe.sendMessageAwaitResponse("getFragment",void 0,!0).then((t=>{if(!t)return"";let i=t;return"#"==i[0]&&(i=i.substr(1)),i})):Promise.resolve("")}updateFragment(t){return this.Xe.hasCapability("fragment")?this.Xe.sendMessageAwaitResponse("replaceHistory",{"fragment":t},!0):e()}}(t.win,i):(yi(t.win,"global-history-binding",class{constructor(t){this.win=t,this.De=ds(t);const{history:i}=this.win;this.rr=i.length-1;const s=xh(i);let e,n;s&&void 0!==s[Ch]&&(this.rr=Math.min(s[Ch],this.rr)),this.Ze=this.rr,this.hr,this.cn=null,this.ur="state"in i,this.lr=this.cr(this.Ze),i.pushState&&i.replaceState?(this.ar=i.originalPushState||i.pushState.bind(i),this.dr=i.originalReplaceState||i.replaceState.bind(i),e=(t,i,s)=>{this.lr=t,this.ar(t,i,s||null)},n=(t,i,s)=>{this.lr=t,void 0!==s?this.dr(t,i,s):this.dr(t,i)},i.originalPushState||(i.originalPushState=this.ar),i.originalReplaceState||(i.originalReplaceState=this.dr)):(e=(t,i,s)=>{this.lr=t},n=(t,i,s)=>{this.lr=t}),this.pr=e,this.mr=n;try{this.mr(this.cr(this.Ze,!0))}catch(t){Rt().error(Oh,"Initial replaceState failed: "+t.message)}i.pushState=this._r.bind(this),i.replaceState=this.Ar.bind(this),this.gr=t=>{t.state,this.Pr()},this.win.addEventListener("popstate",this.gr)}cleanup(){this.ar&&(this.win.history.pushState=this.ar),this.dr&&(this.win.history.replaceState=this.dr),this.win.removeEventListener("popstate",this.gr)}cr(t,i){const s=p(i?this.vr():void 0);return s[Ch]=t,s}setOnStateUpdated(t){this.cn=t}push(t){return this.Er((()=>{const i=this.Tr(this.vr(),t||{});return this._r(i,void 0,i.fragment?"#"+i.fragment:void 0),r((()=>this.Tr(i,{stackIndex:this.Ze})))}))}pop(t){return t=Math.max(t,this.rr),this.Er((()=>this.Ir(this.Ze-t+1))).then((t=>this.Tr(this.vr(),{stackIndex:t})))}replace(t={}){return this.Er((()=>{const i=this.Tr(this.vr(),t||{}),s=(i.url||"").replace(/#.*/,""),e=i.fragment?"#"+i.fragment:"";return this.Ar(i,i.title,s||e?s+e:void 0),r((()=>this.Tr(i,{stackIndex:this.Ze})))}))}get(){return r((()=>this.Tr(this.vr(),{stackIndex:this.Ze})))}backTo(t){return t=Math.max(t,this.rr),this.Er((()=>this.Ir(this.Ze-t)))}Pr(){let t=this.vr();const i=t?t[Ch]:void 0;let s=this.Ze;const e=this.hr;this.hr=void 0,s>this.win.history.length-2&&(s=this.win.history.length-2,this.nr(this.Tr(t,{stackIndex:s}))),null==i?s+=1:s=iPromise.resolve(this.Ze)))}_r(t,i,s){this.Rr(),t||(t={});let e=this.Ze+1;t[Ch]=e,this.pr(t,i,s),e!=this.win.history.length-1&&(e=this.win.history.length-1,t[Ch]=e,this.mr(t));const n=this.Tr(t,{stackIndex:e});this.nr(n)}replaceStateForTarget(t){yt("#"==t[0]),this.Er((()=>{this.win.removeEventListener("popstate",this.gr);try{this.win.location.replace(t)}finally{this.win.addEventListener("popstate",this.gr)}return this.Ar(),e()}))}Ar(t,i,s){this.Rr(),t||(t={});const e=Math.min(this.Ze,this.win.history.length-1);t[Ch]=e,this.mr(t,i,s);const n=this.Tr(t,{stackIndex:e});this.nr(n)}nr(t){this.Rr(),t.stackIndex=Math.min(t.stackIndex,this.win.history.length-1),this.Ze!=t.stackIndex&&(this.Ze=t.stackIndex,this.cn&&this.cn(t))}getFragment(){let{hash:t}=this.win.location;return t=t.substr(1),Promise.resolve(t)}updateFragment(t){return this.replace({fragment:t})}Tr(t,i){const s=g(g({},t&&t.data||{}),i.data||{});return g(g(g({},t||{}),i),{},{data:s})}}),s=wi(t.win,"global-history-binding")),new class{constructor(t,i){this.Qi=t,this.De=ds(t.win),this.yr=i,this.Ze=0,this.wr=[],this.ds=[],this.yr.setOnStateUpdated(this.cn.bind(this))}cleanup(){this.yr.cleanup()}push(t,i){return this.br((()=>this.yr.push(i).then((i=>(this.cn(i),t&&(this.wr[i.stackIndex]=t),i.stackIndex)))),"push")}pop(t){return this.br((()=>this.yr.pop(t).then((t=>{this.cn(t)}))),"pop")}replace(t){return this.br((()=>this.yr.replace(t)),"replace")}get(){return this.br((()=>this.yr.get()),"get")}goBack(t){return this.br((()=>this.Ze<=0&&!t?e():this.yr.pop(this.Ze).then((t=>{this.cn(t)}))),"goBack")}replaceStateForTarget(t){yt("#"==t[0]);const i=this.Qi.win.location.hash;return this.push((()=>{this.Qi.win.location.replace(i||"#")})).then((()=>{this.yr.replaceStateForTarget(t)}))}getFragment(){return this.yr.getFragment()}updateFragment(t){return"#"==t[0]&&(t=t.substr(1)),this.yr.updateFragment(t)}cn(t){this.Ze=t.stackIndex,this.Vr(t)}Vr(t){if(this.Ze>=this.wr.length-1)return;const i=[];for(let t=this.wr.length-1;t>this.Ze;t--)this.wr[t]&&(i.push(this.wr[t]),this.wr[t]=void 0);if(this.wr.splice(this.Ze+1),i.length>0)for(let s=0;si[s](t)),1)}br(t,i){const s=new n,{promise:e,reject:r,resolve:h}=s,o=new Error("history trace for "+i+": ");return this.ds.push({callback:t,resolve:h,reject:r,trace:o}),1==this.ds.length&&this.Sr(),e}Sr(){if(0==this.ds.length)return;const t=this.ds[0];let i;try{i=t.callback()}catch(t){i=Promise.reject(t)}i.then((i=>{t.resolve(i)}),(i=>{Rt().error(Oh,"failed to execute a task:",i),t.trace&&(t.trace.message+=i,Rt().error(Oh,t.trace)),t.reject(i)})).then((()=>{this.ds.splice(0,1),this.Sr()}))}}(t,s)}new WeakMap,new WeakMap;var Nh=['
'],Dh=class{constructor(t,i){this.win=t,this.Or=i,this.Cr=[],this.kr=new Es,this.Nr=t=>{b(t.target)&&this.Dr(t.target)},this.Lr=i=>{ds(t).delay((()=>{this.win.document.activeElement&&this.Dr(this.win.document.activeElement)}),500)},this.win.document.addEventListener("focus",this.Nr,!0),this.win.addEventListener("blur",this.Lr)}Mn(){this.win.document.removeEventListener("focus",this.Nr,!0),this.win.removeEventListener("blur",this.Lr)}onFocus(t){return this.kr.add(t)}Dr(t){const i=Date.now();0==this.Cr.length||this.Cr[this.Cr.length-1].el!=t?this.Cr.push({el:t,time:i}):this.Cr[this.Cr.length-1].time=i,this.purgeBefore(i-this.Or),this.kr.fire(t)}getLast(){return 0==this.Cr.length?null:this.Cr[this.Cr.length-1].el}purgeBefore(t){let i=this.Cr.length-1;for(let s=0;s=t){i=s-1;break}-1!=i&&this.Cr.splice(0,i+1)}hasDescendantsOf(t){this.win.document.activeElement&&this.Dr(this.win.document.activeElement);for(let i=0;i(r=e||"").length||-1===r.indexOf("noopener",h))&&(n=t.open(i,"_top")),n}var Hh="navigation",jh="click",zh="contextmenu",Gh=["_top","_blank"],qh="data-a4a-orig-href";function Wh(t,i){const s=Ct(i.target,"A");if(!s||!s.href)return;const e=s.getAttribute(qh)||s.getAttribute("href");if(!e)return;const n={"CLICK_X":()=>i.pageX,"CLICK_Y":()=>i.pageY},r=fs(s).expandUrlSync(e,n,{"CLICK_X":!0,"CLICK_Y":!0});r!=e&&(s.getAttribute(qh)||s.setAttribute(qh,e),s.setAttribute("href",r))}function Kh(t){return`${t.origin}${t.pathname}${t.search}`}function Yh(t){return v(t)?t:[t]}function Qh(t){yi(t,"platform",class{constructor(t){this.bo=t.navigator,this.i=t}isAndroid(){return/Android/i.test(this.bo.userAgent)}isIos(){return/iPhone|iPad|iPod/i.test(this.bo.userAgent)}isSafari(){return/Safari/i.test(this.bo.userAgent)&&!this.isChrome()&&!this.isEdge()&&!this.isFirefox()&&!this.isOpera()}isChrome(){return/Chrome|CriOS/i.test(this.bo.userAgent)&&!this.isEdge()&&!this.isOpera()}isFirefox(){return/Firefox|FxiOS/i.test(this.bo.userAgent)&&!this.isEdge()}isOpera(){return/OPR\/|Opera|OPiOS/i.test(this.bo.userAgent)}isEdge(){return/Edge/i.test(this.bo.userAgent)}isWebKit(){return/WebKit/i.test(this.bo.userAgent)&&!this.isEdge()}isWindows(){return/Windows/i.test(this.bo.userAgent)}isStandalone(){return this.isIos()&&this.bo.standalone||this.isChrome()&&this.i.matchMedia("(display-mode: standalone)").matches}isBot(){return/bot/i.test(this.bo.userAgent)}getMajorVersion(){return this.isSafari()?this.isIos()?this.getIosMajorVersion()||0:this.Vo(/\sVersion\/(\d+)/,1):this.isChrome()?this.Vo(/(Chrome|CriOS)\/(\d+)/,2):this.isFirefox()?this.Vo(/(Firefox|FxiOS)\/(\d+)/,2):this.isOpera()?this.Vo(/(OPR|Opera|OPiOS)\/(\d+)/,2):this.isEdge()?this.Vo(/Edge\/(\d+)/,1):0}Vo(t,i){if(!this.bo.userAgent)return 0;const s=this.bo.userAgent.match(t);return!s||i>=s.length?0:parseInt(s[i],10)}getIosVersionString(){var t,i,s;return this.isIos()&&(null===(t=this.bo.userAgent)||void 0===t||null===(i=t.match(/OS ([0-9]+[_.][0-9]+([_.][0-9]+)?)\b/))||void 0===i||null===(s=i[1])||void 0===s?void 0:s.replace(/_/g,"."))||""}getIosMajorVersion(){const t=this.getIosVersionString();return""==t?null:Number(t.split(".")[0])}})}var Jh=class{constructor(){this.Ms=[],this.Ur={},this.$r=0,this.Fr=0}getSize(){return this.Ms.length}getLastEnqueueTime(){return this.$r}getLastDequeueTime(){return this.Fr}getTaskById(t){return this.Ur[t]||null}enqueue(t){yt(!this.Ur[t.id]),this.Ms.push(t),this.Ur[t.id]=t,this.$r=Date.now()}dequeue(t){const i=this.Ur[t.id];return!!this.removeAtIndex(t,this.Ms.indexOf(i))&&(this.Fr=Date.now(),!0)}peek(t){let i=1e6,s=null;for(let e=0;et.blob))}saveBlob(t,i){return this.Xe.sendMessageAwaitResponse("saveStore",{"origin":t,"blob":i}).catch((t=>{throw Rt().createExpectedError(so,"Failed to save store: ",t)}))}};function no(t){bi(t,"storage",(function(){const i=_s(t),s=parseInt(i.getParam("storage"),10)?new eo(i):new class{constructor(t){if(this.win=t,this.Br=this.Hr(),!this.Br){const t=new Error("localStorage not supported.");Rt().expectedError(so,t)}}Hr(){try{return"localStorage"in this.win&&(this.win.localStorage.getItem("test"),!0)}catch(t){return!1}}jr(t){return`amp-store:${t}`}loadBlob(t){return new Promise((i=>{this.Br?i(this.win.localStorage.getItem(this.jr(t))):i(null)}))}saveBlob(t,i){return new Promise((s=>{this.Br?(this.win.localStorage.setItem(this.jr(t),i),s()):s()}))}}(t.win);return new class{constructor(t,i,s){this.ampdoc=t,this.Xe=i,this.yr=s,this.Gr=s instanceof eo,this.h=gn(this.ampdoc.win.location),this.qr=null}zr(){return this.Wr(),this}get(t,i){return this.Kr().then((s=>s.get(t,i)))}set(t,i,s){return yt("boolean"==typeof i),this.setNonBoolean(t,i,s)}setNonBoolean(t,i,s){return this.Yr((e=>e.set(t,i,s)))}remove(t){return this.Yr((i=>i.remove(t)))}isViewerStorage(){return this.Gr}Kr(){return this.qr||(this.qr=this.yr.loadBlob(this.h).then((t=>t?B(atob(t)):{})).catch((t=>(Rt().expectedError(so,"Failed to load store: ",t),{}))).then((t=>new class{constructor(t,i){this.obj=_(t),this.Jr=i||8,this.Qr=this.obj.vv||Object.create(null),this.obj.vv||(this.obj.vv=this.Qr)}get(t,i){const s=this.Qr[t],e=s?s.t:void 0,n=!i||null==e||e+i>Date.now();return s&&n?s.v:void 0}set(t,i,s){if(yt("__proto__"!=t&&"prototype"!=t),void 0!==this.Qr[t]){const e=this.Qr[t];let n=Date.now();s&&(n=e.t),e.v=i,e.t=n}else this.Qr[t]={"v":i,"t":Date.now()};const e=Object.keys(this.Qr);if(e.length>this.Jr){let t=1/0,i=null;for(let s=0;s{t(i);const s=btoa(JSON.stringify(i.obj));return this.yr.saveBlob(this.h,s)})).then(this.Xr.bind(this))}Wr(){this.Xe.onBroadcast((t=>{"amp-storage-reset"==t.type&&t.origin==this.h&&(this.qr=null)}))}Xr(){this.Xe.broadcast({"type":"amp-storage-reset","origin":this.h})}}(t,i,s).zr()}),!0)}var ro="__AMP_IMPL_",ho=()=>{};function oo(t){yi(t,"timer",class{constructor(t){this.win=t,this.Zr=this.win.Promise.resolve(),this.th=0,this.ih={},this.sh=Date.now()}timeSinceStart(){return Date.now()-this.sh}delay(t,i){if(!i){const i="p"+this.th++;return this.Zr.then((()=>{this.ih[i]?delete this.ih[i]:t()})).catch(bn),i}return this.win.setTimeout((()=>{try{t()}catch(t){throw bn(t),t}}),i)}cancel(t){"string"!=typeof t?this.win.clearTimeout(t):this.ih[t]=!0}promise(t){return new this.win.Promise((i=>{if(-1==this.delay(i,t))throw new Error("Failed to schedule timer.")}))}timeoutPromise(t,i,s){let e;const n=new this.win.Promise(((i,n)=>{if(e=this.delay((()=>{n(Mt().createError(s||"timeout"))}),t),-1==e)throw new Error("Failed to schedule timer.")}));if(!i)return n;const r=()=>{this.cancel(e)};return i.then(r,r),this.win.Promise.race([n,i])}poll(t,i){return new this.win.Promise((s=>{const e=this.win.setInterval((()=>{i()&&(this.win.clearInterval(e),s())}),t)}))}})}var uo="Expander",lo=class{constructor(t,i,s,e,n,r){this.eh=t,this.nh=i,this.rh=s,this.hh=e,this.oh=n,this.uh=!r}expand(t){if(!t.length)return this.hh?t:Promise.resolve(t);const i=this.eh.getExpr(this.nh,this.oh),s=this.lh(t,i);return s.length?this.ah(t,s):this.hh?t:Promise.resolve(t)}getMacroNames(t){const i=this.eh.getExpr(this.nh,this.oh);return t.match(i)||[]}lh(t,i){const s=[];return t.replace(i,((t,i,e)=>{const{length:n}=t,r={start:e,stop:n+e-1,name:i,length:n};s.push(r)})),s}ah(t,i){const s=[];let e=0,n=0,r=i[n],h=0,o=!1;const u=c=>{let a="",d=[];const f=[];for(;et.join(""))).catch((t=>(l(t),"")))};return u(this.uh)}dh(t,i){const{encode:s,name:e}=t;let n;if(null!=t.prioritized?n=t.prioritized:this.hh&&null!=t.sync?n=t.sync:this.hh?(Mt().error(uo,"ignoring async replacement key: ",t.name),n=""):n=t.async||t.sync,this.hh){const t=this.fh(n,e,i);return s?encodeURIComponent(t):t}return this.ph(n,e,i).then((t=>s?encodeURIComponent(t):t))}ph(t,i,s){let e;try{if("function"==typeof t){const i=t;e=s?this.mh(s).then((t=>i.apply(null,t))):r(i)}else e=Promise.resolve(t);return e.then((t=>{let e;return this._h(i,t,s),e=null==t?"":t,e})).catch((t=>(l(t),this._h(i,"",s),Promise.resolve(""))))}catch(t){return l(t),this._h(i,"",s),Promise.resolve("")}}mh(t){return Promise.all(t.map((t=>Promise.all(t).then((t=>t.join(""))))))}fh(t,i,s){try{let e,n=t;return"function"==typeof t&&(n=t.apply(null,this.Ah(s))),n&&"function"==typeof n.then?(Mt().error(uo,"ignoring async macro resolution"),e=""):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?(this._h(i,n,s),e=n.toString()):(this._h(i,"",s),e=""),e}catch(t){return l(t),this._h(i,"",s),""}}Ah(t){return t?t.map((t=>t.join(""))):t}_h(t,i,s){if(!this.rh)return;let e="";s&&(e=`(${s.filter((t=>""!==t)).join(",")})`),this.rh[`${t}${e}`]=i||""}},co={"navigationStart":1,"redirectStart":1,"redirectEnd":1,"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"secureConnectionStart":1,"connectEnd":1,"requestStart":1,"responseStart":1,"responseEnd":1,"domLoading":2,"domInteractive":2,"domContentLoaded":2,"domComplete":2,"loadEventStart":3,"loadEventEnd":4};function ao(t,i,s){const n=co[i]||3,r=s?co[s]||3:n,h=Math.max(n,r);let o;if(1===h)o=e();else if(2===h)o=vi(t.document);else if(3===h)o=Ge(t);else if(4===h){const i=ds(t);o=Ge(t).then((()=>i.promise(1)))}return yt(o),o.then((()=>fo(t,i,s)))}function fo(t,i,s){const e=t.performance&&t.performance.timing;if(!e||0==e.navigationStart)return;const n=void 0===s?e[i]:e[s]-e[i];return!w(n)||n<0?void 0:n}function po(t,i){const s=t.performance&&t.performance.navigation;if(s&&void 0!==s[i])return s[i]}var mo="UrlReplacements";function _o(t){return()=>(new Date)[t]()}function Ao(t,i){return()=>t[i]}function Po(t,i){return i?(bt("ISOCountry"===i,"The value passed to AMP_GEO() is not valid name:"+i),t&&t[i]||"unknown"):(null==t?void 0:t.matchedISOCountryGroups.join(","))||"unknown"}var go="Viewer",vo=/^(https?:\/\/)((www[0-9]*|web|ftp|wap|home|mobile|amp|m)\.)+/i;function Eo(t){let i;return t instanceof Error?((t=h(t)).message="No messaging channel: "+t.message,i=t):i=new Error("No messaging channel: "+t),i.message=C(i.message),i}var To=class{static solveYValueFromXValue(t,i,s,e,n,r,h,o,u){return To.gh(To.Ph(t,i,e,r,o),s,n,h,u)}static Ph(t,i,s,e,n){const r=1e-6;let h=(t-i)/(n-i);if(h<=0)return 0;if(h>=1)return 1;let o=0,u=1,l=0;for(let c=0;c<8;c++){l=To.Eh(h,i,s,e,n);const c=(To.Eh(h+r,i,s,e,n)-l)/r;if(Math.abs(l-t)r&&c<8;c++)lt,EASE:t=>To.solveYValueFromXValue(t,0,0,.25,.1,.25,1,1,1),EASE_IN:t=>To.solveYValueFromXValue(t,0,0,.42,0,1,1,1,1),EASE_OUT:t=>To.solveYValueFromXValue(t,0,0,0,0,.58,1,1,1),EASE_IN_OUT:t=>To.solveYValueFromXValue(t,0,0,.42,0,.58,1,1,1)},Io={"linear":Mo.LINEAR,"ease":Mo.EASE,"ease-in":Mo.EASE_IN,"ease-out":Mo.EASE_OUT,"ease-in-out":Mo.EASE_IN_OUT};function Ro(t){if(!t)return null;if(y(t)){if(-1!=(t=t).indexOf("cubic-bezier")){const r=t.match(/cubic-bezier\((.+)\)/);if(r){const t=r[1].split(",").map(parseFloat);if(4==t.length){for(let i=0;i<4;i++)if(isNaN(t[i]))return null;return i=t[0],s=t[1],e=t[2],n=t[3],t=>To.solveYValueFromXValue(t,0,0,i,s,e,n,1,1)}}return null}return Io[t]}var i,s,e,n;return t}var yo="Animation",bo=function(){},wo=class{static animate(t,i,s,e){return new wo(t).setCurve(e).add(0,i,1).start(s)}constructor(t,i){this.tn=t,this.Ih=i||As(self),this.Rh=null,this.Mh=[]}setCurve(t){return t&&(this.Rh=Ro(t)),this}add(t,i,s,e){return this.Mh.push({delay:t,func:i,duration:s,curve:Ro(e)}),this}start(t){return new Vo(this.Ih,this.tn,this.Mh,this.Rh,t)}},Vo=class{constructor(t,i,s,e,r){this.Ih=t,this.tn=i,this.Mh=[];for(let t=0;t1&&this.Mh.sort(((t,i)=>t.delay+t.duration-(i.delay+i.duration)));try{if(i>0)for(let t=0;t=0;t--)this.Mh[t].func(0,!1)}catch(i){Rt().error(yo,"completion failed: "+i,i),t=!1}}t?this.ii():this.bh()}}Sh(t){if(!this.wn)return;const i=Date.now(),s=Math.min((i-this.sh)/this.yh,1);for(let t=0;t=i.delay&&(i.started=!0)}for(let t=0;t0){if(s=Math.min((i-t.delay)/t.duration,1),e=s,t.curve&&1!=e)try{e=t.curve(s)}catch(t){return Rt().error(yo,"step curve failed: "+t,t),void this.xh(!1,0)}}else s=1,e=1;1==s&&(t.completed=!0);try{t.func(e,t.completed)}catch(t){return Rt().error(yo,"step mutate failed: "+t,t),void this.xh(!1,0)}}};function So(t,i){let s;for(let e=i.lastElementChild;e;e=e.previousElementSibling)if(e.getBoundingClientRect().height>0){const i=Os(t,e);if("static"==i.position||"relative"==i.position){s=i;break}}return s?parseInt(s.marginBottom,10):0}function xo(t,i,s){return function(t,i,s){const e=parseInt(Os(t,i)[s],10);return isNaN(e)?0:e}(t,i===t.document.body?t.document.documentElement:i,s)}function Oo(t,i){return xo(t,i,"scrollPaddingTop")}function Co(t){const i=_s(t),{win:s}=t;let n;return n=t.isSingleDoc()&&function(t,i){return us(t).isIos()&&qt(t)&&i.isEmbedded()&&!i.hasCapability("iframeScroll")?ko.NATURAL_IOS_EMBED:ko.NATURAL}(s,i)==ko.NATURAL_IOS_EMBED?new class{constructor(t){this.win=t,this.Ih=As(t);const i=this.win.document,{documentElement:s}=i,e=s.className;s.classList.add("i-amphtml-ios-embed");const n=i.createElement("html");this.Ch=n,n.id="i-amphtml-wrapper",n.className=e,this.kh=new Es,this.Nh=new Es,this.Dh=this.Lh.bind(this),this.Uh=()=>this.Nh.fire(),this.$h=0,this.Fh=!1,$t(i,this.Bh.bind(this)),gi(i).then((()=>{s.classList.add("i-amphtml-ios-overscroll")}))}ensureReadyForElements(){this.Bh()}Bh(){if(this.Fh)return;this.Fh=!0;const t=this.win.document,i=t.body;t.documentElement.appendChild(this.Ch),this.Ch.appendChild(i),Object.defineProperty(t,"body",{get:()=>i}),this.Lh()}connect(){this.win.addEventListener("resize",this.Uh),this.Ch.addEventListener("scroll",this.Dh)}disconnect(){this.win.removeEventListener("resize",this.Uh),this.Ch.removeEventListener("scroll",this.Dh)}getBorderTop(){return 1}requiresFixedLayerTransfer(){return!Ne(this.win,"ios-fixed-no-transfer")||parseFloat(us(this.win).getIosVersionString())<12.2}overrideGlobalScrollTo(){return!0}supportsPositionFixed(){return!0}onScroll(t){this.kh.add(t)}onResize(t){this.Nh.add(t)}updatePaddingTop(t){this.$h=t,bs(this.Ch,{"padding-top":xs(t)})}hideViewerHeader(t,i){t||this.updatePaddingTop(0)}showViewerHeader(t,i){t||this.updatePaddingTop(i)}disableScroll(){this.Ch.classList.add("i-amphtml-scroll-disabled")}resetScroll(){this.Ch.classList.remove("i-amphtml-scroll-disabled")}updateLightboxMode(t){return e()}getSize(){return{width:this.win.innerWidth,height:this.win.innerHeight}}getScrollTop(){return this.Ch.scrollTop}getScrollLeft(){return 0}getScrollWidth(){return this.Ch.scrollWidth}getScrollHeight(){return this.Ch.scrollHeight}getContentHeight(){const t=this.win.document.body,{height:i}=t.getBoundingClientRect(),s=So(this.win,t),e=Os(this.win,t);return parseInt(e.marginTop,10)+this.$h+i+s+parseInt(e.marginBottom,10)}contentHeightChanged(){}getLayoutRect(t,i,s){const e=t.getBoundingClientRect(),n=null!=s?s:this.getScrollTop(),r=null!=i?i:this.getScrollLeft();return Jt(Math.round(e.left+r),Math.round(e.top+n),Math.round(e.width),Math.round(e.height))}getRootClientRectAsync(){return Promise.resolve(null)}setScrollTop(t){this.Ch.scrollTop=t||1}Lh(t){0==this.Ch.scrollTop&&(this.Ch.scrollTop=1,t&&t.preventDefault()),t&&this.kh.fire()}getScrollingElement(){return this.Ch}getScrollingElementScrollsLikeViewport(){return!1}}(s):new class{constructor(t){this.ampdoc=t,this.win=t.win,this.Hh=us(this.win),this.kh=new Es,this.Nh=new Es,this.Dh=this.jh.bind(this),this.Uh=()=>this.Nh.fire()}jh(){this.kh.fire()}connect(){this.win.addEventListener("scroll",this.Dh),this.win.addEventListener("resize",this.Uh)}disconnect(){this.win.removeEventListener("scroll",this.Dh),this.win.removeEventListener("resize",this.Uh)}ensureReadyForElements(){}getBorderTop(){return 0}requiresFixedLayerTransfer(){return!1}overrideGlobalScrollTo(){return!1}supportsPositionFixed(){return!0}onScroll(t){this.kh.add(t)}onResize(t){this.Nh.add(t)}updatePaddingTop(t){bs(this.win.document.documentElement,{"padding-top":xs(t)})}hideViewerHeader(t,i){t||this.updatePaddingTop(0)}showViewerHeader(t,i){t||this.updatePaddingTop(i)}disableScroll(){this.win.document.documentElement.classList.add("i-amphtml-scroll-disabled")}resetScroll(){this.win.document.documentElement.classList.remove("i-amphtml-scroll-disabled")}updateLightboxMode(t){return e()}getSize(){const t=this.win.innerWidth,i=this.win.innerHeight;if(t&&i)return{width:t,height:i};const s=this.win.document.documentElement;return{width:s.clientWidth,height:s.clientHeight}}getScrollTop(){const t=this.getScrollingElement().scrollTop||this.win.pageYOffset,{host:i}=this.ampdoc.getRootNode();return i?t-i.offsetTop:t}getScrollLeft(){return 0}getScrollWidth(){return this.getScrollingElement().scrollWidth}getScrollHeight(){return this.getScrollingElement().scrollHeight}getContentHeight(){const t=this.getScrollingElement(),i=t.getBoundingClientRect(),s=i.top+this.getScrollTop(),e=us(this.win).isSafari()?So(this.win,t):0,n=Os(this.win,t);return s+parseInt(n.marginTop,10)+i.height+e+parseInt(n.marginBottom,10)}contentHeightChanged(){}getLayoutRect(t,i,s){const e=t.getBoundingClientRect(),n=null!=s?s:this.getScrollTop(),r=null!=i?i:this.getScrollLeft();return Jt(Math.round(e.left+r),Math.round(e.top+n),Math.round(e.width),Math.round(e.height))}getRootClientRectAsync(){return Promise.resolve(null)}setScrollTop(t){this.getScrollingElement().scrollTop=t}getScrollingElement(){const t=this.win.document;return t.scrollingElement?t.scrollingElement:t.body&&this.Hh.isWebKit()?t.body:t.documentElement}getScrollingElementScrollsLikeViewport(){return!0}}(t),new class{constructor(t,i,s){const{win:e}=t;this.ampdoc=t,this.zh=this.ampdoc.win.document,this.yr=i,this.Xe=s,this.Gh=null,this.qh=null,this.Wh=null,this.Kh=!1,this.Yh=null,this.$h=Number(s.getParam("paddingTop")||0),this.Jh=0,this.De=ds(e),this.Ih=As(e),this.Qh=!1,this.Xh=null,this.Zh=0,this.io=new Es,this.kh=new Es,this.Nh=new Es,this.so=void 0,this.eo=void 0,this.no=null,this.Xe.onMessage("viewport",this.ro.bind(this)),this.Xe.onMessage("scroll",this.ho.bind(this)),this.Xe.onMessage("disableScroll",this.oo.bind(this)),this.Xe.isEmbedded()&&this.yr.updatePaddingTop(this.$h),this.yr.onScroll(this.uo.bind(this)),this.yr.onResize(this.lo.bind(this)),this.onScroll(this.co.bind(this)),this.ao=!1,this.ampdoc.onVisibilityChanged(this.do.bind(this)),this.do();const n=this.zh.documentElement;if(t.isSingleDoc()&&n.classList.add("i-amphtml-singledoc"),s.isEmbedded()?n.classList.add("i-amphtml-embedded"):n.classList.add("i-amphtml-standalone"),qt(e)&&n.classList.add("i-amphtml-iframed"),"1"===s.getParam("webview")&&n.classList.add("i-amphtml-webview"),qt(e)&&"scrollRestoration"in e.history&&(e.history.scrollRestoration="manual"),this.yr.overrideGlobalScrollTo())try{Object.defineProperty(e,"scrollTo",{value:(t,i)=>this.setScrollTop(i)}),["pageYOffset","scrollY"].forEach((t=>{Object.defineProperty(e,t,{get:()=>this.getScrollTop()})}))}catch(t){}us(e).isIos()&&qt(e)&&this.ampdoc.isSingleDoc()&&this.ampdoc.whenReady().then((()=>{e.scrollTo(-.1,0)}))}dispose(){this.yr.disconnect()}ensureReadyForElements(){this.yr.ensureReadyForElements()}do(){const t=this.ampdoc.isVisible();t!=this.ao&&(this.ao=t,t?(this.yr.connect(),this.qh&&this.lo(),this.Wh&&(this.Wh=null,this.getScrollTop())):this.yr.disconnect())}getPaddingTop(){return this.$h}getScrollTop(){return null==this.Wh&&(this.Wh=this.yr.getScrollTop()),this.Wh}getScrollLeft(){return null==this.Yh&&(this.Yh=this.yr.getScrollLeft()),this.Yh}setScrollTop(t){this.Wh=null,this.yr.setScrollTop(t)}updatePaddingBottom(t){this.ampdoc.waitForBodyOpen().then((i=>{ws(i,"borderBottom",`${t}px solid transparent`)}))}getSize(){if(this.qh)return this.qh;if(this.qh=this.yr.getSize(),0==this.qh.width||0==this.qh.height){const t=this.ampdoc.getVisibilityState();t!=vs.PRERENDER&&t!=vs.VISIBLE||Math.random()<.01&&Rt().error("Viewport","viewport has zero dimensions")}return this.qh}getHeight(){return this.getSize().height}getWidth(){return this.getSize().width}getScrollWidth(){return this.yr.getScrollWidth()}getScrollHeight(){return this.yr.getScrollHeight()}getContentHeight(){return this.yr.getContentHeight()}contentHeightChanged(){this.yr.contentHeightChanged()}getRect(){if(null==this.Gh){const t=this.getScrollTop(),i=this.getScrollLeft(),s=this.getSize();this.Gh=Jt(i,t,s.width,s.height)}return this.Gh}getLayoutRect(t){const i=this.getScrollLeft(),s=this.getScrollTop(),e=ki(t,this.ampdoc.win);if(e){const n=this.yr.getLayoutRect(t,0,0),r=this.yr.getLayoutRect(e,i,s);return Jt(Math.round(n.left+r.left),Math.round(n.top+r.top),Math.round(n.width),Math.round(n.height))}return this.yr.getLayoutRect(t,i,s)}getClientRectAsync(t){const i=this.Ih.measurePromise((()=>t.getBoundingClientRect()));let s=this.yr.getRootClientRectAsync();const e=ki(t,this.ampdoc.win);return e&&(s=this.Ih.measurePromise((()=>e.getBoundingClientRect()))),Promise.all([i,s]).then((t=>{const i=t[0],s=t[1];return s?Zt(i,s.left,s.top):(e=i,Jt(Number(e.left),Number(e.top),Number(e.width),Number(e.height)));var e}))}supportsPositionFixed(){return this.yr.supportsPositionFixed()}isDeclaredFixed(t){return!!this.no&&this.no.isDeclaredFixed(t)}scrollIntoView(t){return this.fo(t).then((i=>this.po(t,i)))}po(t,i){const s=this.yr.getLayoutRect(t).top,e=Oo(this.ampdoc.win,i);r((()=>Math.max(0,s-this.$h-e))).then((t=>this.mo(i,t)))}animateScrollIntoView(t,i="top",s,e){return yt(!e||void 0!==s),this.fo(t).then((n=>this.animateScrollWithinParent(t,n,i,s,e)))}animateScrollWithinParent(t,i,s,e,n){yt(!n||void 0!==e);const r=this.yr.getLayoutRect(t),{height:h}=this._o(i)?this.getSize():this.getLayoutRect(i),{win:o}=this.ampdoc,u=Oo(o,i),l=function(t,i){return xo(t,i,"scrollPaddingBottom")}(o,i);let c=-u;return"bottom"===s?c=-h+l+r.height:"center"===s&&(c=-(h-u-l)/2+r.height/2),this.Ao(i).then((t=>{const s=r.top-this.$h+c,h=Math.max(0,s);if(h!=t)return this.Po(i,t,h,e,n)}))}Po(t,i,s,e,n="ease-in"){const r=void 0!==e?e:function(t,i,s=500){return Math.floor(function(t,i,s){return D(0<=s),Math.min(Math.max(t,0),s)}(.65*Math.abs(t-i),0,s))}(i,s),h=(o=i,u=s,t=>o+(u-o)*t);var o,u;return wo.animate(t,(i=>{this.mo(t,h(i))}),r,n).thenAlways((()=>{this.mo(t,s)}))}fo(t){return this.Ih.measurePromise((()=>Ct(t,".i-amphtml-scrollable")||this.yr.getScrollingElement()))}mo(t,i){this._o(t)?this.yr.setScrollTop(i):this.Ih.mutate((()=>{t.scrollTop=i}))}Ao(t){return this._o(t)?r((()=>this.getScrollTop())):this.Ih.measurePromise((()=>t.scrollTop))}_o(t){return t==this.yr.getScrollingElement()}getScrollingElement(){return this.Xh?this.Xh:this.Xh=this.yr.getScrollingElement()}onChanged(t){return this.io.add(t)}onScroll(t){return this.kh.add(t)}onResize(t){return this.Nh.add(t)}enterLightboxMode(t,i){return this.Xe.sendMessage("requestFullOverlay",{},!0),this.enterOverlayMode(),this.no&&this.no.enterLightbox(t,i),t&&this.maybeEnterFieLightboxMode(t),this.yr.updateLightboxMode(!0)}leaveLightboxMode(t){return this.Xe.sendMessage("cancelFullOverlay",{},!0),this.no&&this.no.leaveLightbox(),this.leaveOverlayMode(),t&&this.maybeLeaveFieLightboxMode(t),this.yr.updateLightboxMode(!1)}isLightboxExperimentOn(){return Ne(this.ampdoc.win,"amp-lightbox-a4a-proto")}maybeEnterFieLightboxMode(t){const i=this.vo(t);i&&(yt(this.isLightboxExperimentOn()),i.enterFullOverlayMode())}maybeLeaveFieLightboxMode(t){const i=this.vo(t);i&&yt(i).leaveFullOverlayMode()}vo(t){const i=ki(t,this.ampdoc.win);return i&&i.__AMP_EMBED__}enterOverlayMode(){this.disableTouchZoom(),this.disableScroll()}leaveOverlayMode(){this.resetScroll(),this.restoreOriginalTouchZoom()}disableScroll(){const{win:t}=this.ampdoc,{documentElement:i}=t.document;let s;this.Ih.measure((()=>{const e=Os(t,i).marginRight,n=function(t){const{documentElement:i}=t.document;return t.innerWidth-i.clientWidth}(this.ampdoc.win);s=parseInt(e,10)+n})),this.Ih.mutate((()=>{ws(i,"margin-right",s,"px"),this.yr.disableScroll()}))}resetScroll(){const{win:t}=this.ampdoc,{documentElement:i}=t.document;this.Ih.mutate((()=>{ws(i,"margin-right",""),this.yr.resetScroll()}))}resetTouchZoom(){const t=this.ampdoc.win.innerHeight,i=this.zh.documentElement.clientHeight;t&&i&&t===i||this.disableTouchZoom()&&this.De.delay((()=>{this.restoreOriginalTouchZoom()}),50)}disableTouchZoom(){const t=this.Eo();if(!t)return!1;const i=function(t,i){const s=function(t){const i=Object.create(null);if(!t)return i;const s=t.split(/,|;/);for(let t=0;t0&&(i+=","),t[s]?i+=s+"="+t[s]:i+=s;return i}(s):t}(t.content,{"maximum-scale":"1","user-scalable":"no"});return this.To(i)}restoreOriginalTouchZoom(){return void 0!==this.eo&&this.To(this.eo)}updateFixedLayer(){return this.no?this.no.update():e()}addToFixedLayer(t,i){return this.no?this.no.addElement(t,i):e()}removeFromFixedLayer(t){this.no&&this.no.removeElement(t)}createFixedLayer(t){this.no=new t(this.ampdoc,this.Ih,this.yr.getBorderTop(),this.$h,this.yr.requiresFixedLayerTransfer()),this.ampdoc.whenReady().then((()=>this.no.setup()))}To(t){const i=this.Eo();return!(!i||i.content==t||(i.content=t,0))}Eo(){return qt(this.ampdoc.win)?null:(void 0===this.so&&(this.so=this.zh.querySelector("meta[name=viewport]"),this.so&&(this.eo=this.so.content)),this.so)}ho(t){const i=t.scrollTop;this.setScrollTop(i)}ro(t){const i=t.paddingTop,s=t.duration||0,e=t.curve,n=t.transient;if(null!=i&&i!=this.$h&&(this.Jh=this.$h,this.$h=i,this.no)){const t=this.no.animateFixedElements(this.$h,this.Jh,s,e,n);i{this.yr.showViewerHeader(n,i)}))}}oo(t){t?this.disableScroll():this.resetScroll()}Io(t,i){const s=this.getSize(),e=this.getScrollTop(),n=this.getScrollLeft();this.io.fire({relayoutAll:t,top:e,left:n,width:s.width,height:s.height,velocity:i})}uo(){this.Gh=null,this.Zh++,this.Yh=this.yr.getScrollLeft();const t=this.yr.getScrollTop();if(!(t<0)){if(this.Wh=t,!this.Qh){this.Qh=!0;const i=Date.now();this.De.delay((()=>{this.Ih.measure((()=>{this.Ro(i,t)}))}),36)}this.kh.fire()}}Ro(t,i){this.Wh=this.yr.getScrollTop();const s=this.Wh,e=Date.now();let n=0;e!=t&&(n=(s-i)/(e-t)),Math.abs(n)<.03?(this.Io(!1,n),this.Qh=!1):this.De.delay((()=>this.Ih.measure(this.Ro.bind(this,e,s))),20)}co(){this.Kh||(this.Kh=!0,this.Ih.measure((()=>{this.Kh=!1,this.Xe.sendMessage("scroll",{"scrollTop":this.getScrollTop()},!0)})))}lo(){this.Gh=null;const t=this.qh;this.qh=null;const i=this.getSize();this.updateFixedLayer().then((()=>{const s=!t||t.width!=i.width;this.Io(s,0),(s||t.height!=i.height)&&this.Nh.fire({relayoutAll:s,width:i.width,height:i.height})}))}}(t,n,i)}var ko={NATURAL:"natural",NATURAL_IOS_EMBED:"natural-ios-embed"};function No(t,i){yt(t);try{void 0!==t(i)&&Rt().error("VSYNC","callback returned a value but vsync cannot propogate it: %s",t.toString())}catch(t){return l(t),!1}return!0}function Do(t){if(t.defaultPrevented)return;const i=t.target;if(!i||"FORM"!=i.tagName)return;let s;s=i.classList.contains("i-amphtml-form")?!i.hasAttribute("amp-novalidate"):!i.hasAttribute("novalidate"),s&&i.checkValidity&&!i.checkValidity()&&t.preventDefault();const e=i.elements;for(let t=0;t"],Uo=18e4,$o=null;function Fo(t){var i;(function(t){yi(t,"crypto",class{constructor(t){this.i=t;let i=null,s=!1;t.crypto&&(t.crypto.subtle?i=t.crypto.subtle:t.crypto.webkitSubtle&&(i=t.crypto.webkitSubtle,s=!0)),this.pkcsAlgo={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},this.subtle=i,this.Mo=s,this.yo=null}sha384(t){if("string"==typeof t&&(t=H(t)),!this.subtle||this.yo)return(this.yo||this.wo()).then((i=>i(t)));try{return this.subtle.digest({name:"SHA-384"},t).then((t=>new Uint8Array(t)),(i=>(i.message&&i.message.indexOf("secure origin")<0&&Mt().error(wh,"SubtleCrypto failed, fallback to closure lib.",i),this.wo().then((()=>this.sha384(t))))))}catch(i){return Rt().error(wh,"SubtleCrypto failed, fallback to closure lib.",i),this.wo().then((()=>this.sha384(t)))}}sha384Base64(t){return this.sha384(t).then((t=>ih(t)))}uniform(t){return this.sha384(t).then((t=>{let i=0;for(let s=2;s>=0;s--)i=(i+t[s])/256;return i}))}wo(){return this.yo?this.yo:this.yo=ns(this.i).preloadExtension("amp-crypto-polyfill").then((()=>wi(this.i,"crypto-polyfill")))}isPkcsAvailable(){return Boolean(this.subtle)&&!1!==this.i.isSecureContext}importPkcsKey(t){yt(this.isPkcsAvailable());const i=this.Mo?(s=JSON.stringify(t),"undefined"!=typeof TextEncoder?(new TextEncoder).encode(s):H(unescape(encodeURIComponent(s)))):t;var s;return this.subtle.importKey("jwk",i,this.pkcsAlgo,!0,["verify"])}verifyPkcs(t,i,s){return yt(this.isPkcsAvailable()),this.subtle.verify(this.pkcsAlgo,t,i,s)}})})(t),yi(t,"batched-xhr",Zr),Qh(t),oo(t),oo(i=t),yi(i,"vsync",class{constructor(t){this.win=t,this.So=Zi(this.win),this.xo=this.Oo(),this.Ms=[],this.Co=[],this.ko=[],this.No=[],this.$e=!1,this.Do=null,this.Lo=null,this.Uo=this.$o.bind(this),this.Fo=new Mr(this.win,this.Uo,16),this.Bo=new Mr(this.win,this.Uo,40),this.Ho=this.jo.bind(this),this.So.isSingleDoc()?this.So.getSingleDoc().onVisibilityChanged(this.Ho):ks(this.win.document,this.Ho)}dispose(){Ns(this.win.document,this.Ho)}jo(){this.$e&&this.zo()}run(t,i){this.Ms.push(t),this.ko.push(i||void 0),this.xs()}runPromise(t,i){if(this.run(t,i),this.Do)return this.Do;const s=new n;return this.Lo=s.resolve,this.Do=s.promise}createTask(t){return i=>{this.run(t,i)}}mutate(t){this.run({measure:void 0,mutate:t})}mutatePromise(t){return this.runPromise({measure:void 0,mutate:t})}measure(t){this.run({measure:t,mutate:void 0})}measurePromise(t){return new Promise((i=>{this.measure((()=>{i(t())}))}))}canAnimate(t){return this.Go(yt(t))}Go(t){if(Cs(this.win.document)!=vs.VISIBLE)return!1;if(this.So.isSingleDoc())return this.So.getSingleDoc().isVisible();if(t){const i=this.So.getAmpDocIfAvailable(t);return!i||i.isVisible()}return!0}runAnim(t,i,s){return!!this.Go(t)&&(this.run(i,s),!0)}createAnimTask(t,i){return s=>this.runAnim(t,i,s)}runAnimMutateSeries(t,i,s){return this.Go(t)?new Promise(((e,n)=>{const r=Date.now();let h=0;const o=this.createAnimTask(t,{mutate:t=>{const u=Date.now()-r;i(u,u-h,t)?s&&u>s?n(new Error("timeout")):(h=u,o(t)):e()}});o({})})):Promise.reject(wn())}xs(){this.$e||(this.$e=!0,this.zo())}zo(){this.Go()?(this.xo(this.Uo),this.Bo.schedule()):this.Fo.schedule()}$o(){this.Bo.cancel(),this.$e=!1;const{Lo:t,ko:i,Ms:s}=this;this.Lo=null,this.Do=null,this.Ms=this.Co,this.ko=this.No;for(let t=0;t{const s=Date.now(),e=Math.max(0,16-(s-i));i=s+e,this.win.setTimeout(t,e)}}}),function(t){yi(t,"xhr",Xr)}(t),function(t){yi(t,"input",class{constructor(t){this.win=t,this.qo=this.Wo.bind(this),this.Ko=this.Yo.bind(this),this.Jo=null,this.Qo=null,this.Xo=null,this.Zo="ontouchstart"in t||void 0!==t.navigator.maxTouchPoints&&t.navigator.maxTouchPoints>0||void 0!==t.DocumentTouch,this.tu=!1,this.win.document.addEventListener("keydown",this.qo),this.win.document.addEventListener("mousedown",this.Ko),this.iu=!0,this.su=0,this.eu=new Es,this.nu=new Es,this.ru=new Es,this.Zo&&(this.iu=!this.Zo,this.Jo=this.hu.bind(this),ze(t.document,"mousemove",this.Jo))}setupInputModeClasses(t){this.onTouchDetected((i=>{this.ou(t,"amp-mode-touch",i)}),!0),this.onMouseDetected((i=>{this.ou(t,"amp-mode-mouse",i)}),!0),this.onKeyboardStateChanged((i=>{this.ou(t,"amp-mode-keyboard-active",i)}),!0)}isTouchDetected(){return this.Zo}onTouchDetected(t,i){return i&&t(this.isTouchDetected()),this.eu.add(t)}isMouseDetected(){return this.iu}onMouseDetected(t,i){return i&&t(this.isMouseDetected()),this.nu.add(t)}isKeyboardActive(){return this.tu}onKeyboardStateChanged(t,i){return i&&t(this.isKeyboardActive()),this.ru.add(t)}ou(t,i,s){t.waitForBodyOpen().then((t=>{As(this.win).mutate((()=>{t.classList.toggle(i,s)}))}))}Wo(t){if(this.tu)return;if(t.defaultPrevented)return;const{target:i}=t;i&&("INPUT"==i.tagName||"TEXTAREA"==i.tagName||"SELECT"==i.tagName||"OPTION"==i.tagName||i.hasAttribute("contenteditable"))||(this.tu=!0,this.ru.fire(!0))}Yo(){this.tu&&(this.tu=!1,this.ru.fire(!1))}hu(t){if(t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents)return void this.uu();let i;this.Xo||(this.Xo=this.lu.bind(this),this.Qo=this.uu.bind(this));const s=function(t,i,s,e){let n;const r=new Promise((i=>{n=ze(t,"click",i,void 0)}));return r.then(n,n),e&&e(n),r}(this.win.document,0,0,(t=>{i=t}));return ds(this.win).timeoutPromise(300,s).then(this.Qo,(()=>{i&&i(),this.Xo()}))}lu(){this.iu=!0,this.nu.fire(!0)}uu(){this.su++,this.su<=3&&ze(this.win.document,"mousemove",this.Jo)}})}(t),function(t){yi(t,"preconnect",class{constructor(t){this.cu=t.document,this.au=t.document.head,this.du={},this.fu={},this.Hh=us(t),this.du[rn(t.location.href).origin]=!0,this.pu=function(t){if(!$o){const i=t.document.createElement("link"),s=i.relList;if(i.as="invalid-value",!s||!s.supports)return{};$o={preconnect:s.supports("preconnect"),preload:s.supports("preload"),onlyValidAs:"invalid-value"!=i.as}}return $o}(t),this.De=ds(t)}url(t,i,s){t.whenFirstVisible().then((()=>{this.Ti(t,i,s)}))}Ti(t,i,s){if(!this.mu(i))return;const{origin:e}=rn(i),n=Date.now(),r=this.du[e];if(r&&n{o&&o.parentNode&&o.parentNode.removeChild(o),u.parentNode&&u.parentNode.removeChild(u)}),1e4),this._u(t,e)}preload(t,i,s){this.mu(i)&&(this.fu[i]||(this.fu[i]=!0,this.url(t,i,!0),this.pu.preload&&("document"==s&&this.Hh.isSafari()||t.whenFirstVisible().then((()=>{this.Au(i)})))))}Au(t){const i=be(this.cu)(Lo);i.setAttribute("href",t),this.pu.onlyValidAs?i.as="fetch":i.as="",this.au.appendChild(i)}mu(t){return!(!t.startsWith("https:")&&!t.startsWith("http:"))}_u(t,i){if(this.pu.preconnect||!this.Hh.isSafari()&&!this.Hh.isIos())return;const s=Date.now();this.du[i]=s+Uo;const e=i+"/robots.txt?_AMP_safari_preconnect_polyfill_cachebust="+(s-s%Uo),n=new XMLHttpRequest;n.open("HEAD",e,!0),n.withCredentials=!0,n.send()}})}(t)}function Bo(t){yt(!t.getParent()),function(t,i){(function(t){bi(t,"url",class{constructor(t){const i=t.getRootNode(),s=i.ownerDocument||i;this.gu=s.createElement("a"),this.Pu=null}parse(t,i){return hn(this.gu,t)}vu(t){return"string"!=typeof t?t:this.parse(t)}isProtocolValid(t){return mn(t)}getSourceOrigin(t){return gn(this.vu(t))}getSourceUrl(t){return Pn(this.vu(t))}resolveRelativeUrl(t,i){return vn(t,this.vu(i))}assertHttpsUrl(t,i,s="source"){return dn(t,i,s)}assertAbsoluteHttpOrHttpsUrl(t){return function(t){return bt(/^https?\:/i.test(t),'URL must start with "http://" or "https://". Invalid value: %s',t),rn(t).href}(t)}isProxyOrigin(t){return pn(this.vu(t))}isSecure(t){return an(this.vu(t))}getWinOrigin(t){return t.origin||this.vu(t.location.href).origin}getCdnUrlOnOrigin(t){if(pn(t))return t;const{hash:i,host:s,pathname:e,search:n}=this.vu(t),r=encodeURIComponent(s);return`${et}/c/${r}${e}${n}${i}`}},!0)})(t),function(t){bi(t,"templates",class{constructor(t){this.Qi=t,this.Eu={},this.Tu={}}whenReady(t){return this.Iu(t).then(ho)}setHtmlForTemplate(t,i){return this.Iu(t).then((t=>this.Ru(t,i)))}renderTemplate(t,i){return this.Iu(t).then((t=>this.Mu(t,i)))}renderTemplateAsString(t,i){return this.Iu(t).then((t=>t.renderAsString(i)))}getTemplateRenderer(t){return this.Iu(t).then((t=>({renderAsString:i=>t.renderAsString(i)})))}renderTemplateArray(t,i){return 0==i.length?Promise.resolve([]):this.Iu(t).then((t=>i.map((i=>this.Mu(t,i)))))}findAndRenderTemplate(t,i,s){return this.renderTemplate(this.findTemplate(t,s),i)}findAndSetHtmlForTemplate(t,i,s){return this.setHtmlForTemplate(this.findTemplate(t,s),i)}findAndRenderTemplateArray(t,i,s){return this.renderTemplateArray(this.findTemplate(t,s),i)}hasTemplate(t,i){return!!this.maybeFindTemplate(t,i)}findTemplate(t,i){const s=this.maybeFindTemplate(t,i);bt(s,"Template not found for %s",t);const e=s.tagName;return bt("TEMPLATE"==e||"SCRIPT"==e&&"text/plain"===s.getAttribute("type"),'Template must be defined in a