; (self.AMP=self.AMP||[]).push({m:1,v:"2601162341000",n:"amp-lightbox-gallery",ev:"0.1",l:!0,f:function(t,i){(()=>{function i(t,i,n){return i in t?Object.defineProperty(t,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[i]=n,t}function n(t,i){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);i&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,s)}return n}function s(t){for(var s=1;si.width/i.height!==n?{width:i.height*t,height:i.height}:{width:i.width,height:i.width/t}}function a(t,i,n=getComputedStyle(t).getPropertyValue("object-fit")){switch(t={width:t.naturalWidth,height:t.naturalHeight},n){case"cover":return o(t,i,!1);case"contain":return o(t,i,!0);case"fill":case"":case null:return i;case"none":return t;case"scale-down":return i=o(t,i,!0),{width:Math.min(t.width,i.width),height:Math.min(t.height,i.height)};default:throw Error(`object-fit: ${n} not supported`)}}function l(t,i){return t=(t.match(new RegExp("-?\\s*\\d+"+i))||["0"])[0].replace(" ",""),parseFloat(t)}function h(t,i,n){var s=t||"50% 50%",e=0===s.lastIndexOf("calc",0)?s.indexOf(")")+1:s.indexOf(" ");t=s.slice(0,e)||"",s=s.slice(e)||"",e=l(t,"px");let r=l(s,"px");return t=l(t,"%")/100,{top:l(s,"%")/100*(i.height-n.height)+r,left:t*(i.width-n.width)+e}}function c(t){return`cubic-bezier(${t.x1},${t.y1},${t.x2},${t.y2})`}function u(t,i,n){let s=n*n,e=s*n;return 3*(n-2*s+e)*t+3*(s-e)*i+e}var m={x1:.42,y1:0,x2:.58,y2:1},p=0;function f(t,i,n){var s=getComputedStyle(t);let e=s.getPropertyValue("object-fit");return{objectFit:e,objectPosition:s=s.getPropertyValue("object-position"),rect:i,c:n,j:t,h:a(t,i,e),s:i.width*i.height}}var d="load-end";function g(t){return t?Array.prototype.slice.call(t):[]}var{isArray:b}=Array;function v(t,i){const n=[];let s=0;for(let e=0;e=i)return t;i-=t.length;let s=n;for(;i>s.length;)s+=n;return s.slice(0,i)+t}var{hasOwnProperty:x,toString:P}=Object.prototype;function w(t){const i=Object.create(null);return t&&Object.assign(i,t),i}var y,M,E="​​​";function T(t){return 1==(null==(i=t)?void 0:i.nodeType)?t.tagName.toLowerCase()+(t.id?`#${t.id}`:""):t;var i}function I(t){return t.indexOf(E)>=0}function R(t,i,n,s,e,r,o,a,l,h,c){return t}function V(t,i,n,s,e,r,o,a,l,h,c){return function(t,i,n="Assertion failed",s){var e,r;if(i)return i;t&&-1==n.indexOf(t)&&(n+=t);let o=3;const a=n.split("%s");let l=a.shift();const h=[l];for(;a.length;){const t=arguments[o++],i=a.shift();l+=T(t)+i,h.push(t,i.trim())}const c=new Error(l);throw c.messageArray=v(h,(t=>""!==t)),null===(e=(r=self).__AMP_REPORT_ERROR)||void 0===e||e.call(r,c),c}(E,t,i,n,s,e,r,o,a,l,h,c)}function k(t){return(t.ownerDocument||t).defaultView}function C(t,i){return t.replace(/^|,/g,`$&${i} `)}function $(t){return CSS.escape(t)}function O(t){R(/^[\w-]+$/.test(t))}function S(t,i){return t.querySelector(C(i,":scope"))}function j(t,i){return t.closest(i)}function F(t,i){return O(i),S(t,`> ${i}`)}function z(t,i){return O(i),t.querySelector(i)}function D(t){const i=t.ownerDocument||t;return y&&y.ownerDocument===i||(y=i.createElement("div")),L}function L(t){return function(t,i){if(R(1===i.length),R(Array.isArray(i)||(n=i,x.call(n,"raw"))),self.trustedTypes&&self.trustedTypes.createPolicy){const n=self.trustedTypes.createPolicy("static-template#createNode",{createHTML:function(t){return i[0]}});t.innerHTML=n.createHTML("ignored")}else t.innerHTML=i[0];var n;const s=t.firstElementChild;return R(s),R(!s.nextElementSibling),t.removeChild(s),s}(y,t)}var B=["Webkit","webkit","Moz","moz","ms","O","o"];function N(t,i,n,s,e){const r=function(t,i,n){if(i.startsWith("--"))return i;M||(M=w());let s=M[i];if(!s||n){if(s=i,void 0===t[i]){const n=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(i),e=function(t,i){for(let n=0;n"-"+t.toLowerCase()));return B.some((t=>i.startsWith(t+"-")))?`-${i}`:i}(r),o)}function G(t,i){for(const n in i)N(t,n,i[n])}function U(t,i){void 0===i&&(i=t.hasAttribute("hidden")),i?t.removeAttribute("hidden"):t.setAttribute("hidden","")}var H=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function X(t,i=""){try{return decodeURIComponent(t)}catch(t){return i}}function Y(t){const i=w();if(!t)return i;let n;for(;n=H.exec(t);){const t=X(n[1],n[1]),s=n[2]?X(n[2].replace(/\+/g," "),n[2]):"";i[t]=s}return i}function J(t){const{location:i}=t||self;return Y(i.originalHash||i.hash)}var Z="";function q(t){var i;return Z||(Z=(null===(i=t.AMP_CONFIG)||void 0===i?void 0:i.v)||"012601162341000"),Z}function W(t,i){const n=i||J(t);return["1","actions","amp","amp4ads","amp4email"].includes(n.development)||!!t.AMP_DEV_MODE}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var K=self.__AMP_LOG;function Q(t){return function(t,i){throw new Error("failed to call initLogConstructor")}()}function tt(t,i,n,s,e,r,o,a,l,h,c){return t}function it(t,i,n,s,e,r,o,a,l,h,c){return(K.user||(K.user=Q()),void K.user.win?K.userForEmbed||(K.userForEmbed=Q()):K.user).assert(t,i,n,s,e,r,o,a,l,h,c)}function nt(t,i){return at(t=function(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}(t),i)}function st(t,i){return at(ot(rt(t)),i)}function et(t,i){return lt(ot(t),i)}function rt(t){return t.nodeType?(i=k(t),nt(i,"ampdoc")).getAmpDoc(t):t;var i}function ot(t){const i=rt(t);return i.isSingleDoc()?i.win:i}function at(t,i){tt(ct(t,i));const n=ht(t)[i];return n.obj||(tt(n.ctor),tt(n.context),n.obj=new n.ctor(n.context),tt(n.obj),n.context=null,n.resolve&&n.resolve(n.obj)),n.obj}function lt(t,i){const n=ht(t)[i];return n?n.promise?n.promise:(at(t,i),n.promise=Promise.resolve(n.obj)):null}function ht(t){let i=t.__AMP_SERVICES;return i||(i=t.__AMP_SERVICES={}),i}function ct(t,i){const n=t.__AMP_SERVICES&&t.__AMP_SERVICES[i];return!(!n||!n.ctor)}var ut="__AMP__EXPERIMENT_TOGGLES";function mt(t,i,n,s){const e=et(t,i);if(e)return e;const r=rt(t);return r.whenExtensionsKnown().then((()=>{const t=r.getExtensionVersion(n);return t?nt(r.win,"extensions").waitForExtension(n,t):null})).then((n=>n?s?et(t,i):function(t,i){return function(t,i){const n=lt(t,i);if(n)return n;const s=ht(t);return s[i]=function(){const t=new class{constructor(){this.promise=new Promise(((t,i)=>{this.resolve=t,this.reject=i}))}},{promise:i,reject:n,resolve:s}=t;return i.catch((()=>{})),{obj:null,promise:i,resolve:s,reject:n,context:null,ctor:null}}(),s[i].promise}(ot(t),i)}(t,i):null))}var pt,ft,dt=t=>function(t,i){const n=ot(rt(t));return ct(n,i)?at(n,i):null}(t,"action"),gt=t=>nt(t,"extensions"),bt=t=>st(t,"owners"),vt=t=>at(t,"timer");function _t(t,i,n={},s=!0){var e;(e=t,mt(e,"amp-analytics-instrumentation","amp-analytics")).then((e=>{e&&e.triggerEventForTarget(t,i,n,s)}))}function At(t,i,n,s){return function(t,i,n,s){let e=t,r=n,o=t=>{try{return r(t)}catch(t){var i,n;throw null===(i=(n=self).__AMP_REPORT_ERROR)||void 0===i||i.call(n,t),t}};const a=function(){if(void 0!==pt)return pt;pt=!1;try{const t={get capture(){return pt=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return pt}(),l=!(null==s||!s.capture);return e.addEventListener(i,o,a?s:l),()=>{null==e||e.removeEventListener(i,o,a?s:l),r=null,e=null,o=null}}(t,i,n,s)}var xt=['
'],Pt="clip",wt="expand",yt=class t{static build(i,n){const s=D(i)(xt);return new t(s,s.querySelector(".i-amphtml-lbg-caption-scroll"),s.querySelector(".amp-lightbox-gallery-caption"),s.querySelector(".i-amphtml-lbg-caption-mask"),n)}constructor(t,i,n,s,e){this.yf=t,this.U0=i,this.Mlt=n,this.Vlt=s,this.$lt=e}getElement(){return this.yf}setContent(t){this.Mlt.innerText=t}setOverflowState(t){this.U0.setAttribute("i-amphtml-lbg-caption-state",t)}getOverflowState(){return this.U0.getAttribute("i-amphtml-lbg-caption-state")}jlt(t,i,n){const s=t==wt;return s||i?(void 0!==n?n:!s)?wt:Pt:"none"}toggleOverflow(t){const{Vlt:i,U0:n}=this;let s;this.$lt((()=>{s=n.scrollHeight-n.clientHeight>=i.clientHeight}),(()=>{const i=this.getOverflowState(),e=this.jlt(i,s,t);this.setOverflowState(e),e!=wt&&(n.scrollTop=0)}))}},Mt=["
"],Et={CLOSE:"close",GALLERY:"gallery",SLIDES:"slides",PREV:"prev",NEXT:"next"},Tt=class t{static build(i,n,s){const e=D(n)(Mt);(t=>nt(t,"input"))(i).isMouseDetected()||(e.querySelector('[data-action="prev"]').classList.add("i-amphtml-screen-reader"),e.querySelector('[data-action="next"]').classList.add("i-amphtml-screen-reader"));const r=Object.values(Et);return tt(g(e.querySelectorAll("[data-action]")).map((t=>t.getAttribute("data-action"))).every((t=>r.includes(t)))),new t(i,e,s)}constructor(t,i,n){this.i=t,this.yf=i,this.$lt=n,this.yf.addEventListener("click",(t=>{this.Ra(t)}))}getElement(){return this.yf}Ra(t){const i=t.target.getAttribute("data-action");i&&(this.yf.dispatchEvent(function(t,i,n,s){const e={detail:n};return Object.assign(e,void 0),new t.CustomEvent("action",e)}(this.i,0,{"action":i})),t.stopPropagation(),t.preventDefault())}},It=/(\S+)(?:\s+(?:(-?\d+(?:\.\d+)?)([a-zA-Z]*)))?\s*(?:,|$)/g;function Rt(t){const i=t.getAttribute("srcset");if(i)return function(t){const i=[];let n;for(;n=It.exec(t);){const t=n[1];let s,e;if(n[2]){const t=n[3].toLowerCase();if("w"==t)s=parseInt(n[2],10);else{if("x"!=t)continue;e=parseFloat(n[2])}}else e=1;i.push({url:t,width:s,dpr:e})}return new kt(i)}(i);const n=t.getAttribute("src");return V(n,'Either non-empty "srcset" or "src" attribute must be specified: %s',t),Vt(n)}function Vt(t){return new kt([{url:t,width:void 0,dpr:1}])}var kt=class{constructor(t){V(t.length>0,"Srcset must have at least one source"),this.bg=t;let i=!1,n=!1;for(let s=0;s1.2))break;n=o,s=l,e=a}return n}wg(t){const i=this.bg;let n=0,s=1/0;for(let e=0;et.url))}stringify(t){const i=[],n=this.bg;for(let s=0;sn.promise(i)))}function Lt(t){const i=Math.floor(t/3600),n=Math.floor(t/60),s=Math.floor(t%60);return A(i.toString(),2,"0")+":"+A(n.toString(),2,"0")+":"+A(s.toString(),2,"0")}var Bt=class{constructor(){this.ut=null}add(t){return this.ut||(this.ut=[]),this.ut.push(t),()=>{this.remove(t)}}remove(t){this.ut&&function(t,i){const n=t.indexOf(i);-1!=n&&t.splice(n,1)}(this.ut,t)}removeAll(){this.ut&&(this.ut.length=0)}fire(t){if(this.ut)for(const i of this.ut.slice())i(t)}getHandlerCount(){var t,i;return null!==(t=null===(i=this.ut)||void 0===i?void 0:i.length)&&void 0!==t?t:0}},Nt="__AMP_Gestures",Gt=class t{static get(i,n=!1,s=!1){let e=i[Nt];return e||(e=new t(i,n,s),i[Nt]=e),e}constructor(t,i=!1,n=!1){this.yf=t,this.GV=[],this.t_=[],this.Pi=[],this.WV=[],this.qV=null;const s=function(t){if(void 0!==ft)return ft;ft=!1;try{const i={get passive(){return ft=!0,!1}};t.addEventListener("test-options",null,i),t.removeEventListener("test-options",null,i)}catch(t){}return ft}(t.ownerDocument.defaultView);this.ZV=i||s,this.XV=n,this.KV=!1,this._n=new class{constructor(t,i,n){this.ln=vt(t),this.cn=i,this.an=n||0,this.dn=-1,this.fn=0,this.pn=!1,this.mn=()=>{this._n()}}isPending(){return-1!=this.dn}schedule(t){let i=t||this.an;this.pn&&i<10&&(i=10);const n=Date.now()+i;return(!this.isPending()||n-this.fn<-10)&&(this.cancel(),this.fn=n,this.dn=this.ln.delay(this.mn,i),!0)}_n(){this.dn=-1,this.fn=0,this.pn=!0,this.cn(),this.pn=!1}cancel(){this.isPending()&&(this.ln.cancel(this.dn),this.dn=-1)}}(k(t),this.Im.bind(this)),this.JV=new Bt,this.QV=Object.create(null),this.pk=this.yp.bind(this),this.mk=this.gp.bind(this),this.fk=this._p.bind(this),this._k=this.h_.bind(this),this.yf.addEventListener("touchstart",this.pk,!!s&&{passive:!0}),this.yf.addEventListener("touchend",this.mk),this.yf.addEventListener("touchmove",this.fk,!!s&&{passive:!0}),this.yf.addEventListener("touchcancel",this._k),this.gk=!1}cleanup(){this.yf.removeEventListener("touchstart",this.pk),this.yf.removeEventListener("touchend",this.mk),this.yf.removeEventListener("touchmove",this.fk),this.yf.removeEventListener("touchcancel",this._k),delete this.yf[Nt],this._n.cancel()}onGesture(t,i){const n=new t(this),s=n.getType();let e=this.QV[s];return e||(this.GV.push(n),e=new Bt,this.QV[s]=e),e.add(i)}removeGesture(t){const i=new t(this).getType(),n=this.QV[i];if(n){n.removeAll();const t=_(this.GV,(t=>t.getType()==i));return!(t<0||(this.GV.splice(t,1),this.Pi.splice(t,1),this.WV.splice(t,1),this.t_.splice(t,1),delete this.QV[i],0))}return!1}onPointerDown(t){return this.JV.add(t)}yp(t){const i=Date.now();this.KV=!1,this.JV.fire(t);for(let n=0;n=t){i=!0;break}}i?(t.stopPropagation(),this.ZV||t.preventDefault()):this.XV&&t.stopPropagation(),this.gk&&(this.gk=!1,this.Im())}Im(){const t=Date.now();let i=-1;for(let n=0;nthis.Pi[i])&&(i=n):this.WV[n]&&this.WV[n]self.AMP.config.urls)();var Zt=(()=>self.AMP.config.urls)(),qt=self.__AMP_ERRORS||[];self.__AMP_ERRORS=qt;var Wt=function(t){return(Wt=function(t){const i=function(t){let i=0;return()=>{let t=Math.pow(1.5,i++);return t+=function(t,i){let n=t*(i=i||.3)*Math.random();return Math.random()>.5&&(n*=-1),n}(t),1e3*t}}();return t=>setTimeout(t,i())}())(t)};function Kt(t,i){try{let n;if(t)if(void 0!==t.message)t=function(t){const i=Object.getOwnPropertyDescriptor(t,"message");if(null!=i&&i.writable)return t;const{message:n,stack:s}=t,e=new Error(n);for(const i in t)e[i]=t[i];return e.stack=s,e}(t),n=!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=_(t.messageArray,(t=>null==t?void 0:t.tagName));i>-1&&(t.associatedElement=t.messageArray[i])}const s=i||t.associatedElement;if(s&&s.classList&&s.classList.add("i-amphtml-error"),self.console&&(I(t.message)||!t.expected)){const i=console.error||console.log;t.messageArray?i.apply(console,t.messageArray):s?i.call(console,t.message,s):i.call(console,t.message)}s&&s.dispatchCustomEventForTesting&&s.dispatchCustomEventForTesting("amp:error",t.message),Qt.call(self,void 0,void 0,void 0,void 0,t)}catch(t){setTimeout((function(){throw t}))}return t}function Qt(t,i,n,s,e){var o;!this||!this.document||e&&e.expected||(tt((o=this.document).defaultView),Ot||(Ot=!0,function(t){G(t.body,{opacity:1,visibility:"visible","animation":"none"})}(o)));let a=!1;try{a=function(t){if(!t.document)return!1;const i=t.document.querySelectorAll("script[src]");for(let t=0;t"string"==typeof t?function(t,i){return Yt||(Yt=self.document.createElement("a")),function(t,i,n){return t.href="",new URL(i,t.href)}(Yt,t)}(t):t)(n).origin))return!0;var n;return!1}(self)}catch(t){}if(a&&Math.random()<.99)return;const l=function(t,i,n,s,e,r){t=function(t,i){return i&&(t=i.message?i.message:String(i)),t||(t="Unknown error"),t}(t,e);let o=!(!e||!e.expected);if(/_reported_/.test(t))return;if("CANCELLED"==t)return;const a=!(self&&self.window),l=Math.random();if((function(t){return-1!=t.indexOf("Failed to load:")}(t)||"Script error."==t||a)&&(o=!0,l<.9999))return;const h=I(t);if(h&&l<.99)return;const c=Object.create(null);c.v=function(t){const i=t||self;return i.__AMP_MODE?i.__AMP_MODE:i.__AMP_MODE=function(t){return{localDev:!1,development:W(t,J(t)),esm:!0,test:!1,rtvVersion:q(t),ssrReady:!1}}(i)}().rtvVersion,c.noAmp=r?"1":"0",c.m=t.replace(E,""),c.a=h?"1":"0",c.ex=o?"1":"0",c.dw=a?"1":"0";let u="1p";var m,p;if(u="esm",c.esm="1",c.rt="esm",c.cdn=Zt.cdn,c.ca=null!==(p=self.AMP_CONFIG)&&void 0!==p&&p.canary?"1":"0",c.bt=(null===(m=self.AMP_CONFIG)||void 0===m?void 0:m.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)}const f=[],d=self[ut]||null;var g,b,v;for(const t in d){const i=d[t];f.push(`${t}=${i?"1":"0"}`)}return c.exps=f.join(","),e?(c.el=(null===(g=e.associatedElement)||void 0===g?void 0:g.tagName)||"u",e.args&&(c.args=JSON.stringify(e.args)),h||e.ignoreStack||!e.stack||(c.s=e.stack),e.message&&(e.message+=" _reported_")):(c.f=i||"",c.l=n||"",c.c=s||""),c.r=self.document?self.document.referrer:"",c.ae=qt.join(","),c.fr=self.location.originalHash||self.location.hash,"production"===c.bt&&(c.pt="1"),v=t,(b=qt).length>=25&&b.splice(0,b.length-25+1),b.push(v),c}(t,i,n,s,e,a);l&&Wt((()=>{try{return function(t,i){return i.pt&&Math.random()<.9?r():function(t,i){const n=(t=>nt(t,"ampdoc"))(t);if(!n.isSingleDoc())return Promise.resolve(!1);const s=n.getSingleDoc();if(!s.getRootNode().documentElement.hasAttribute("report-errors-to-viewer"))return Promise.resolve(!1);const e=st(s,"viewer");return e.hasCapability("errorReporter")?e.isTrustedViewer().then((t=>{return!!t&&(e.sendMessage("error",{"m":(n=i).m,"a":n.a,"s":n.s,"el":n.el,"ex":n.ex,"v":n.v,"pt":n.pt}),!0);var n})):Promise.resolve(!1)}(t,i).then((t=>{if(!t){const t=new XMLHttpRequest;t.open("POST",Math.random()<.1?Zt.betaErrorReporting:Zt.errorReporting,!0),t.send(JSON.stringify(i))}}))}(this,l).catch((()=>{}))}catch(t){}}))}var ti=["
"],ii=["
"],ni=[""],si=[""],ei=[""],ri=[""],oi=["
"],ai="amp-lightbox-gallery",li="amp-carousel",hi=".i-amphtml-slide-item, .i-amphtml-carousel-slotted",ci={x1:.8,y1:0,x2:.2,y2:1},ui=class extends t.BaseElement{constructor(t){super(t),this._f=this.win.document,this.Flt=!1,this.kB=-1,this.zlt=-1,this.Ro=this.Io.bind(this),this.Dlt=this.Blt.bind(this),this.q_=null,this.rr=null,this.$c=null,this.Glt={default:[]},this.v_=null,this.Ult=null,this.Hlt=null,this.pQ=null,this.Xlt=null,this.W0=null,this.Ylt=null,this.Jlt=null,this.Zlt=null,this.qlt=null,this.Wlt=1,this.Klt=null,this.Qlt="default",this.tht=!1,this.iht=this.measureMutateElement.bind(this),this.cQ=new class{constructor(t,i,n,s){this.i=t,this.yf=i,this.kE=n,this.uQ=s,this.mQ=null,this.nht=null,this.pQ=null,this.Hlt=null,this.sht=null,this.eht=!1}startSwipe(t){const{hiddenElement:i,mask:n,overlay:s,swipeElement:e}=t;this.mQ=e,this.nht=i,this.pQ=n,this.Hlt=s,this.eht=!0,this.kE((()=>{this.rht()}))}vQ(t,i,n,s){const e=1*s;return G(this.mQ,{transform:`scale(${t}) translate(${i}px, ${n}px)`,transition:`${e}ms transform cubic-bezier(0.15, .55, .3, 0.95)`}),Dt(this.i,e)}gQ(t){const i=5*t;return this.kE((()=>{G(this.mQ,{transform:"",transition:`${i}ms transform ease-out`}),G(this.pQ,{opacity:"",transition:`${i}ms opacity ease-out`}),G(this.Hlt,{opacity:"",transition:`${i}ms opacity ease-out`})})).then((()=>Dt(this.i,i)))}MQ(t="",i="",n=""){G(this.mQ,{transform:t,transition:""}),G(this.pQ,{opacity:i,transition:""}),G(this.Hlt,{opacity:n,transition:""})}wQ(t,i,n,s,e){const r=Ht(0,0,i,n),o=22.5*i+s,a=22.5*n+e,l=Ht(0,0,o,a);return this.vQ(t,o,a,r).then((()=>l<50&&r<.65?this.gQ(l):this.uQ()))}rht(){this.nht.classList.add("i-amphtml-ghost"),this.sht=At(this.mQ,"scroll",(t=>{t.stopPropagation()}),{capture:!0}),this.yf.setAttribute("i-amphtml-scale-animation",""),N(this.Hlt,"animationFillMode","none")}oht(){this.nht.classList.remove("i-amphtml-ghost"),this.sht(),this.yf.removeAttribute("i-amphtml-scale-animation"),N(this.Hlt,"animationFillMode","")}swipeMove(t){const{deltaX:i,deltaY:n,last:s,velocityX:e,velocityY:r}=t,o=this.eht;s&&(this.eht=!1);const a=Ht(0,0,i,n),l=Math.min(a/200,1),h=Math.min(a/50,1),c=Xt(1,.85,l),u=Xt(1,.2,l),m=Xt(1,0,h);this.kE((()=>{t.last&&o?this.wQ(c,e,r,i,n).then((()=>{this.MQ(),this.oht()})):this.eht&&this.MQ(`scale(${c}) translate(${i}px, ${n}px)`,u,m)}))}}(this.win,this.element,(t=>this.mutateElement(t)),(()=>this.uS()))}renderOutsideViewport(){return!0}buildCallback(){return(t=this.element,function(t,i,n,s){return mt(t,i,n,void 0).then((t=>function(t,i,n){return it(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.","amp-lightbox-manager",n,n,n)}(t,0,n)))}(t,"amp-lightbox-manager","amp-lightbox-gallery")).then((t=>(this.q_=t,this.rr=st(this.getAmpDoc(),"history"),this.$c=dt(this.element),this.getAmpDoc().whenFirstVisible()))).then((()=>{this.v_=D(this._f)(ti),this.pQ=this.v_.querySelector(".i-amphtml-lbg-mask"),this.element.appendChild(this.v_),this.q_.maybeInit(),this.registerDefaultAction((t=>this.aht(t)),"open")}));var t}layoutCallback(){return r()}lht(){this.Hlt=D(this._f)(ii);const t=this.hht(),i=this.cht();this.mutateElement((()=>{this.Hlt.appendChild(t),this.Hlt.appendChild(i),this.v_.appendChild(this.Hlt)}))}uht(t){return this.Ult||(this.Ult=this._f.createElement("div"),this.v_.appendChild(this.Ult)),this.Hlt||this.lht(),this.mht(t)}pht(t){if(t.classList.contains("amp-notsupported")){const i=t.getFallback();i&&(t=i)}const i=!t.classList.contains("i-amphtml-element"),n=t.cloneNode(i);return n.removeAttribute("on"),n.removeAttribute("id"),n.removeAttribute("i-amphtml-layout"),n.removeAttribute("fallback"),n}fht(t){let i=0;this.Glt[this.Qlt]=[],t.forEach((t=>{t.lightboxItemId=i++;const n=this.pht(t),s={descriptionText:this.q_.getDescription(t),tagName:n.tagName,sourceElement:t,element:n};let e=n;if(jt.has(n.tagName)){const t=this._f.createElement("div"),i=D(this._f)(ni);for(const i in n.dataset)t.dataset[i]=n.dataset[i];n.removeAttribute("class"),i.appendChild(n),t.appendChild(i),e=t,s.imageViewer=i}this.W0.appendChild(e),this.Glt[this.Qlt].push(s)}))}mht(t){tt(this.v_);const i=this.element.querySelector(`amp-carousel[amp-lightbox-group=${$(t)}]`);return i?(this.W0=i,this.dht(t)):this.ght(t)}dht(t){return this.mutateElement((()=>{const{length:i}=this.Glt[t];this.bht(i),bt(this.element).scheduleUnlayout(this.element,this.W0),U(this.W0,!0)}))}ght(t){const i=this.getAmpDoc().getExtensionVersion(li),n=function(t,i){const n=function(t){var i,n,e,r,o;if(t[ut])return t[ut];t[ut]=w();const a=t[ut];R(a);const l=s(s({},null!==(i=t.AMP_CONFIG)&&void 0!==i?i:{}),null!==(n=t.AMP_EXP)&&void 0!==n?n:(h=(null===(e=t.__AMP_EXP)||void 0===e?void 0:e.textContent)||"{}",JSON.parse(h)));var h;for(const t in l){const i=l[t];"number"==typeof i&&i>=0&&i<=1&&(a[t]=Math.random()this.q_.getElementsForLightboxGroup(t))).then((i=>(this.W0=D(this._f)(si),this.W0.setAttribute("amp-lightbox-group",t),this.fht(i),this.mutateElement((()=>{this.Ult.appendChild(this.W0),this.bht(i.length)})))))}bht(t){!function(t,i,n){const s=t.hasAttribute(i),e=void 0!==n?n:!s;e!==s&&(e?t.setAttribute(i,""):t.removeAttribute(i))}(this.element,"i-amphtml-lbg-single-item",t<=1)}Blt(t){const i=function(t){return t.data}(t).index;i!=this.zlt&&(this.zlt=i,this.vht())}hht(){this.Ylt=yt.build(this._f,this.iht);const t=this.Ylt.getElement();return t.addEventListener("click",(t=>{_t(this.element,"descriptionOverflowToggled"),this.Ylt.toggleOverflow(),t.stopPropagation(),t.preventDefault()})),t}cht(){this.Jlt=Tt.build(this.win,this._f,this.iht);const t=this.Jlt.getElement();return t.addEventListener("action",(t=>{switch(function(t){return t.detail}(t).action){case Et.CLOSE:this.uS();break;case Et.GALLERY:this._ht();break;case Et.SLIDES:this.Aht();break;case Et.NEXT:this.xht();break;case Et.PREV:this.Pht()}})),t}vht(t=!1){const i=this.wht().descriptionText;this.mutateElement((()=>{this.Ylt.setContent(i),this.Ylt.setOverflowState(Pt),this.Ylt.toggleOverflow(t)}))}xht(){tt(this.W0).getImpl().then((t=>{t.interactionNext()}))}Pht(){tt(this.W0).getImpl().then((t=>{t.interactionPrev()}))}MH(t){const i=t.target,n=null!==function(t,i,n){let s;for(s=t;s&&s!==n;s=s.parentElement)if(i(s))return s;return null}(i,(t=>"BUTTON"==t.tagName||"A"==t.tagName||"button"==t.getAttribute("role")),this.v_),s=this.$c.hasAction(i,"tap",this.v_);return!(n||s)}yht(t){this.MH(t)&&(0==this.Wlt?this.Mht():this.v_.hasAttribute("gallery-view")||this.Eht()),_t(this.element,"controlsToggled")}Mht(){this.Hlt.setAttribute("i-amphtml-lbg-fade","in"),this.Wlt=1}Eht(){this.Hlt.setAttribute("i-amphtml-lbg-fade","out"),this.Wlt=0}Tht(){tt(this.v_);const t=this.yht.bind(this);this.Klt=At(this.v_,"click",t)}Iht(){this.Klt&&(this.Klt(),this.Klt=null)}HZ(){Gt.get(this.W0).onGesture(class extends class extends class{constructor(t,i){this.lC=t,this.q_=i}getType(){return this.lC}signalReady(t){this.q_.up(this,t)}signalPending(t){this.q_.Pk(this,t)}signalEnd(){this.q_.bk(this)}signalEmit(t,i){this.q_.vk(this,t,i)}acceptStart(){}acceptCancel(){}onTouchStart(t){return!1}onTouchMove(t){return!1}onTouchEnd(t){}}{constructor(t,i,n,s){super(t,i),this.pC=n,this.mC=s,this.qV=!1,this.cC=0,this.uC=0,this.dC=0,this.fC=0,this._C=0,this.gC=0,this.Or=0,this.yC=0,this.AC=0,this.PC=0,this.bC=0}onTouchStart(t){const{touches:i}=t;return!!(this.qV&&i&&i.length>1)||!(!i||1!=i.length)&&(this.Or=Date.now(),this.cC=i[0].clientX,this.uC=i[0].clientY,!0)}onTouchMove(t){const{touches:i}=t;if(i&&i.length>=1){const{clientX:n,clientY:s}=i[0];if(this.dC=n,this.fC=s,this.qV)this.vC(!1,!1,t);else{const t=Math.abs(n-this.cC),i=Math.abs(s-this.uC);if(this.pC&&this.mC)(t>=8||i>=8)&&this.signalReady(-10);else if(this.pC){if(t>=8&&t>i)this.signalReady(-10);else if(i>=8)return!1}else{if(!this.mC)return!1;if(i>=8&&i>t)this.signalReady(-10);else if(t>=8)return!1}}return!0}return!1}onTouchEnd(t){const{touches:i}=t;i&&0==i.length&&this.TC(t)}acceptStart(){this.qV=!0,this._C=this.cC,this.gC=this.uC,this.AC=this.Or,this.cC=this.dC,this.uC=this.fC,this.vC(!0,!1,null)}acceptCancel(){this.qV=!1}vC(t,i,n){this.yC=Date.now();const s=this.yC-this.AC;if(!i&&s>4||i&&s>16){const t=Ut(this.dC-this._C,s,this.PC),n=Ut(this.fC-this.gC,s,this.bC);(!i||s>32||0!=t||0!=n)&&(this.PC=Math.abs(t)>1e-4?t:0,this.bC=Math.abs(n)>1e-4?n:0),this._C=this.dC,this.gC=this.fC,this.AC=this.yC}this.signalEmit({first:t,last:i,time:this.yC,deltaX:this.dC-this.cC,deltaY:this.fC-this.uC,startX:this.cC,startY:this.uC,lastX:this.dC,lastY:this.fC,velocityX:this.PC,velocityY:this.bC},n)}TC(t){this.qV&&(this.qV=!1,this.vC(!1,!0,t),this.signalEnd())}}{constructor(t){super("swipe-y",t,!1,!0)}},(t=>{const{data:i}=t;this.Rht(i)}))}Rht(t){if(t.first){const{sourceElement:t}=this.wht(),i=this.Vht(t);this.cQ.startSwipe({swipeElement:this.W0,hiddenElement:i||t,mask:this.pQ,overlay:this.Hlt})}else this.cQ.swipeMove(t)}kht(){const t=this.Qlt,i=this.Glt[t].map((t=>t.element));bt(this.element).schedulePause(this.element,i)}wht(){const t=this.Qlt;return tt(this.Glt[t][this.zlt])}open(t,i=!1){return this.Cht(t,i).then((()=>this.rr.push(this.uS.bind(this)))).then((t=>{this.kB=t}))}aht(t){const i=t.args||{},n=i.id,s=i.expandDescription,e=n?this.getAmpDoc().getElementById(n):t.caller;it(e,"amp-lightbox-gallery.open: element with id: %s not found",n),this.open(e,s)}Cht(t,i){const n=t.getAttribute("lightbox")||"default";return this.Qlt=n,this.tht=function(t){const{documentElement:i}=t.document;return t.innerWidth-i.clientWidth}(this.win)>0,this.uht(n).then((()=>this.getViewport().enterLightboxMode())).then((()=>this.mutateElement((()=>{U(this.element,!0),N(this.element,"opacity",0),this.Hlt.removeAttribute("i-amphtml-lbg-fade")})))).then((()=>(this.Flt=!0,bt(this.element).scheduleLayout(this.element,this.v_),this._f.documentElement.addEventListener("keydown",this.Ro),this.W0.addEventListener("slideChange",this.Dlt),this.HZ(),this.Tht(),this.W0.signals().whenSignal(d)))).then((()=>this.$ht(t,i))).then((()=>{N(this.element,"opacity",""),this.Mht(),_t(this.element,"lightboxOpened")}))}$ht(t,i){return this.zlt=t.lightboxItemId,tt(this.W0).getImpl().then((t=>t.goToSlide(this.zlt))),this.vht(i),this.Z_()}Oht(t){return!!(t&&(i=t,i.complete||"complete"==i.readyState||function(t){return"AUDIO"===t.tagName||"VIDEO"===t.tagName}(i)&&i.readyState>0||i.document&&"complete"==i.document.readyState))&&!!jt.has(t.tagName)&&!!z(t,"img");var i}Sht(){const t=this.wht().sourceElement;return this.Oht(t)}jht(t,i){return this.wht().imageViewer.getImpl().then((n=>{const{height:s,width:e}=n.getImageBoxWithOffset()||{};if(!e||!s)return this.Fht(i);const r=n.getImage(),o=F(t,"img");return this.zht(i?o:r,i?r:o,i)}))}Dht(t,i){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),e=this.getViewport().getSize().height,r=Math.abs(s.top-n.top);return this.vH(Math.abs(r),e)}zht(t,i,n){const s=this.W0,e=this.v_;let r,o,l;const d=()=>{U(this.element,n),N(e,"animationName",""),N(s,"animationName",""),t.classList.remove("i-amphtml-ghost"),i.classList.remove("i-amphtml-ghost"),l&&l.cleanupAnimation()};return this.measureMutateElement((()=>{const n=j(t,"amp-img")||t,s=j(i,"amp-img")||i;r=this.Dht(t,i),o=.8*r;try{l=function({transitionContainer:t=document.body,styleContainer:i=document.head,srcImg:n,targetImg:s,srcImgRect:e=n.getBoundingClientRect(),srcCropRect:r=e,targetImgRect:o=s.getBoundingClientRect(),targetCropRect:l=o,curve:d=m,styles:g,keyframesNamespace:b="img-transform"}){n=f(n,e,r),o=(s=(l=f(s,o,l)).s>n.s)?n:l,l=s?l:n,n=`${b}-${p+=1}-`;let{J:v,m:_,i:A,v:x,A:P,j:w}=function(t,i=t.getBoundingClientRect(),n=i,s=getComputedStyle(t).getPropertyValue("object-position"),e=a(t,i)){i=h(s,i,e),s=document.createElement("div");let r=document.createElement("div"),o=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div");return(t=t.cloneNode(!0)).className="",t.style.cssText="",c.appendChild(t),l.appendChild(c),o.appendChild(l),r.appendChild(o),s.appendChild(r),Object.assign(r.style,{overflow:"hidden",width:`${n.width}px`,height:`${n.height}px`}),Object.assign(c.style,{transform:`translate(${i.left}px,${i.top}px)`}),Object.assign(t.style,{display:"block",width:`${e.width}px`,height:`${e.height}px`}),{J:s,m:r,i:o,v:l,A:c,j:t}}(l.j,l.rect,l.c,l.objectPosition,l.h);e=function t(i){var{position:n}=getComputedStyle(i);return"static"!=n?i:(n=i.offsetParent||i.parentElement)?t(n):i}(t).getBoundingClientRect(),b=function({m:t,i:i,f:n,g:s,curve:e,styles:r,a:o,b:a}){let l=`${o}-crop`;o=`${o}-counterScale`,s={x:s.width/n.width,y:s.height/n.height};let h={x:1,y:1};return n=a?s:h,a=a?h:s,Object.assign(t.style,r,{willChange:"transform",transformOrigin:"top left",animationName:l,animationTimingFunction:"linear",animationFillMode:"forwards"}),Object.assign(i.style,r,{willChange:"transform",transformOrigin:"top left",animationName:o,animationTimingFunction:"linear",animationFillMode:"forwards"}),function({I:t,w:i,curve:n,F:s,u:e}){let r="",o="";for(let s=0;20>=s;s++){var a=.05*s,l=u(n.y1,n.y2,a);a=100*u(n.x1,n.x2,a);var h=t.x;h+=l*(i.x-h);var c=t.y;r+=`${a}% {transform: scale(${h},${l=c+l*(i.y-c)});}`,o+=`${a}% {transform: scale(${c=1/h},${1/l});}`}return`@keyframes ${s} {${r}}@keyframes ${e} {${o}}`}({I:n,w:a,curve:e,F:l,u:o})}({m:_,i:A,f:l.c,g:o.c,curve:d,styles:g,a:n,b:s}),e=function({element:t,D:i,f:n,g:s,curve:e,styles:r,a:o,b:a}){o=`${o}-translation`;var l=a?s:n;return n=a?n:s,s=l.left-n.left,l=l.top-n.top,Object.assign(t.style,r,{position:"absolute",top:n.top-i.top+"px",left:n.left-i.left+"px",willChange:"transform",animationName:o,animationTimingFunction:c(e),animationFillMode:"forwards"}),`@keyframes ${o} {from {transform: translate(${s}px,${l}px);}to {transform: translate(0,0);}}`}({element:v,D:e,f:l.c,g:o.c,curve:d,styles:g,a:n,b:s}),r=function({element:t,f:i,g:n,l:s,o:e,C:r,H:o,curve:a,styles:l,a:u,b:m}){return a=c(a),u=`${u}-object-position`,i=h(r,i,s),e=h(o,n,e),n=m?e:i,m=m?i:e,Object.assign(t.style,l,{willChange:"transform",animationName:u,animationTimingFunction:a,animationFillMode:"forwards"}),`@keyframes ${u} {from {transform: translate(${n.left}px,${n.top}px);}to {transform: translate(${m.left}px,${m.top}px);}}`}({element:P,f:l.rect,g:o.rect,l:l.h,o:o.h,C:l.objectPosition,H:o.objectPosition,curve:d,styles:g,a:n,b:s});let y=function({element:t,f:i,B:n,g:s,G:e,curve:r,styles:o,a:a,b:l}){return a=`${a}-crop-position`,i={top:i.top-n.top,left:i.left-n.left},e={top:s.top-e.top,left:s.left-e.left},s=l?e:i,l=l?i:e,Object.assign(t.style,o,{willChange:"transform",animationName:a,animationTimingFunction:c(r),animationFillMode:"forwards"}),`@keyframes ${a} {from {transform: translate(${s.left}px,${s.top}px);}to {transform: translate(${l.left}px,${l.top}px);}}`}({element:x,f:l.rect,B:l.c,g:o.rect,G:o.c,curve:d,styles:g,a:n,b:s});d=function({element:t,l:i,o:n,curve:s,styles:e,a:r,b:o}){r=`${r}-scale`;let a={x:1,y:1};return n={x:n.width/i.width,y:n.height/i.height},i=o?n:a,o=o?a:n,Object.assign(t.style,e,{willChange:"transform",transformOrigin:"top left",animationName:r,animationTimingFunction:c(s),animationFillMode:"forwards"}),`@keyframes ${r} {from {transform: scale(${i.x},${i.y});}to {transform: scale(${o.x},${o.y});}}`}({element:w,l:l.h,o:o.h,curve:d,styles:g,a:n,b:s});let M=document.createElement("style");return M.textContent=b+e+r+y+d,{applyAnimation:function(){i.appendChild(M),t.appendChild(v)},cleanupAnimation:function(){t.removeChild(v),i.removeChild(M)}}}({styleContainer:this.getAmpDoc().getHeadNode(),transitionContainer:this.getAmpDoc().getBody(),srcImg:t,srcCropRect:n.getBoundingClientRect(),targetImg:i,targetCropRect:s.getBoundingClientRect(),styles:{"animationDuration":`${o}ms`,"zIndex":2147483642},keyframesNamespace:void 0,curve:ci})}catch(t){Kt(t)}}),(()=>{U(s,n),N(this.element,"opacity",""),G(e,{animationName:n?"fadeIn":"fadeOut",animationTimingFunction:"cubic-bezier(0.8, 0, 0.2, 1)",animationDuration:`${o}ms`,animationFillMode:"forwards"}),G(s,{animationName:"fadeIn",animationDelay:o-.01+"ms",animationDuration:"0.01ms",animationFillMode:"forwards"}),t.classList.add("i-amphtml-ghost"),i.classList.add("i-amphtml-ghost"),l&&l.applyAnimation()})).then((()=>Dt(this.win,r))).then((()=>this.mutateElement(d)))}Lht(t){return this.jht(t,!0)}Bht(t){return this.jht(t,!1)}Fht(t){return this.mutateElement((()=>{t&&(bt(this.element).scheduleUnlayout(this.element,this.W0),U(this.W0,!0),U(this.element,!0)),this.element.setAttribute("i-amphtml-lbg-fade",t?"in":"out")})).then((()=>Dt(this.win,400))).then((()=>{this.element.removeAttribute("i-amphtml-lbg-fade"),t||(U(this.W0,!1),U(this.element,!1))}))}Z_(){const{sourceElement:t}=this.wht();return this.Oht(t)?this.wht().imageViewer.signals().whenSignal(d).then((()=>this.Lht(t))):this.Fht(!0)}K_(){const{sourceElement:t}=this.wht();return this.Sht()?this.Bht(t):this.Fht(!1)}vH(t,i=250,n=500,s=700){return e=Math.abs(t)/i*s,R((r=n)<=(o=s)),Math.min(Math.max(e,r),o);var e,r,o}Vht(t){return j(t,'amp-carousel[type="slides"], amp-base-carousel')}Nht(){const t=this.wht().sourceElement,i=this.Vht(t);if(i){const n=g(i.querySelectorAll(C(".i-amphtml-slide-item, .i-amphtml-carousel-slotted",":scope"))),s=j(t,hi),e=n.indexOf(s);tt(i).getImpl().then((t=>t.goToSlide(e)))}}uS(){return this.Flt?(this.Nht(),this.Flt=!1,this.Iht(),this._f.documentElement.removeEventListener("keydown",this.Ro),this.W0.removeEventListener("slideChange",this.Dlt),Gt.get(this.W0).cleanup(),this.Ylt.toggleOverflow(!1),this.mutateElement((()=>{this.tht||this.getViewport().leaveLightboxMode(),this.v_.removeAttribute("gallery-view"),this.Zlt&&(this.Zlt.classList.add("i-amphtml-ghost"),this.Zlt=null)})).then((()=>this.K_())).then((()=>{this.tht&&this.getViewport().leaveLightboxMode(),bt(this.element).schedulePause(this.element,this.v_),this.kht(),this.W0=null,-1!=this.kB&&this.rr.pop(this.kB)}))):r()}Io(t){if(!this.Flt)return;const{key:i}=t;switch(i){case"Escape":this.uS();break;case"ArrowLeft":this.Ght(-1);break;case"ArrowRight":this.Ght(1)}}Ght(t){this.v_.hasAttribute("gallery-view")||tt(this.W0).getImpl().then((i=>{i.goCallback(t,!0,!1)}))}_ht(){this.Zlt||this.Uht(),this.Ylt.toggleOverflow(!1),this.mutateElement((()=>{this.v_.setAttribute("gallery-view",""),U(this.W0,!1)})),_t(this.element,"thumbnailsViewToggled")}Aht(){return this.mutateElement((()=>{this.v_.removeAttribute("gallery-view"),bt(this.element).scheduleUnlayout(this.element,this.W0),U(this.W0,!0),this.vht()}))}Uht(){const t=this.Qlt;this.Zlt=this.element.querySelector(`.i-amphtml-lbg-gallery[amp-lightbox-group=${$(t)}]`),this.Zlt?(this.Zlt.classList.remove("i-amphtml-ghost"),this.Hht()):(this.Zlt=D(this._f)(ei),this.Zlt.setAttribute("amp-lightbox-group",this.Qlt),this.Xht(),this.mutateElement((()=>{this.v_.appendChild(this.Zlt)})))}Hht(){const t=this.q_.getThumbnails(this.Qlt).map(((t,i)=>s({index:i},t))).filter((t=>Ft[t.element.tagName]));this.mutateElement((()=>{t.forEach((t=>{t.timestampPromise.then((i=>{if(!i||isNaN(i))return;const n=Lt(i),s=F(this.Zlt.childNodes[t.index],"div");s.childNodes.length>1&&s.removeChild(s.childNodes[1]),s.appendChild(this._f.createTextNode(n)),s.classList.add("i-amphtml-lbg-has-timestamp")}))}))}))}Xht(){const t=[];this.q_.getThumbnails(this.Qlt).forEach((i=>{if("AMP-AD"==i.element.tagName)return;const n=this.Yht(i);t.push(n)})),this.mutateElement((()=>t.forEach((t=>this.Zlt.appendChild(t)))))}Jht(t,i){t.stopPropagation(),Promise.all([this.Aht(),tt(this.W0).getImpl()]).then((t=>{this.zlt=i,t[1].goToSlide(this.zlt),this.vht()}))}Yht(t){const i=D(this._f)(ri),n=F(i,"img");if(t.srcset?n.setAttribute("srcset",t.srcset.stringify()):n.setAttribute("src",t.placeholderSrc),i.appendChild(n),Ft[t.element.tagName]){const n=D(this._f)(oi);t.timestampPromise.then((t=>{if(!t||isNaN(t))return;const i=Lt(t);n.appendChild(this._f.createTextNode(i)),n.classList.add("i-amphtml-lbg-has-timestamp")})),i.appendChild(n)}return i.addEventListener("click",(i=>{this.Jht(i,t.element.lightboxItemId)})),i}};t.registerElement(ai,ui,'.i-amphtml-lbg-caption-scroll{position:absolute!important;left:0!important;right:0!important;bottom:0!important;z-index:1;padding-top:40px!important;box-sizing:border-box!important;color:#fff;text-shadow:1px 0 5px rgba(0,0,0,.4)!important;overflow:hidden!important;max-height:calc(80px + 3rem)!important;transition:max-height 0.3s ease-out!important;pointer-events:none!important}.i-amphtml-lbg-caption-text{padding:20px!important;pointer-events:all!important}.i-amphtml-lbg-caption-text:empty{display:none!important}[i-amphtml-lbg-caption-state=clip]{mask-image:linear-gradient(0deg,transparent 0rem,rgba(0,0,0,.2) 1rem,rgba(0,0,0,.55) 2rem,#000 3rem)}[i-amphtml-lbg-caption-state=expand]{overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;max-height:100%!important;transition:max-height 0.7s ease-out!important;mask-image:linear-gradient(transparent,rgba(0,0,0,.2) 20px,rgba(0,0,0,.55) 40px,#000 60px)}.i-amphtml-lbg-caption-mask{min-height:1rem;width:100%!important;position:fixed!important;bottom:0!important;pointer-events:all!important}[i-amphtml-lbg-caption-state=clip]+.i-amphtml-lbg-caption-mask{z-index:1!important;background:transparent!important;transition:background-color 0.5s ease-out!important}[i-amphtml-lbg-caption-state=expand]+.i-amphtml-lbg-caption-mask{background-color:rgba(0,0,0,.4)!important;top:0!important;z-index:0!important;transition:background-color 0.4s ease-in!important}.i-amphtml-lbg[gallery-view] .i-amphtml-lbg-caption{display:none}.i-amphtml-lbg-top-bar{position:absolute!important;left:0!important;right:0!important;top:0!important;height:56px!important;z-index:1!important;background:linear-gradient(rgba(0,0,0,.3),transparent)}@media (min-width:1024px){.i-amphtml-lbg-top-bar{height:80px!important}}.i-amphtml-lbg-button{position:absolute!important;cursor:pointer!important;width:24px;height:24px;padding:16px;box-sizing:content-box}@media (min-width:1024px){.i-amphtml-lbg-button{width:40px;height:40px;padding:20px}}.i-amphtml-lbg-button:after{content:""!important;width:100%!important;height:100%!important;display:block!important;background-repeat:no-repeat!important;background-position:50%!important}.i-amphtml-lbg-button[data-action=close]{top:0!important;right:0!important}.i-amphtml-lbg-button[data-action=close]:after{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.i-amphtml-lbg-button[data-action=gallery]{top:0!important;left:0!important}.i-amphtml-lbg-button[data-action=gallery]:after{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.i-amphtml-lbg-button[data-action=slides]{top:0!important;left:0!important;display:none}.i-amphtml-lbg-button[data-action=slides]:after{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.i-amphtml-lbg-button[data-action=next],.i-amphtml-lbg-button[data-action=prev]{top:0!important;bottom:0!important;margin:auto!important;filter:drop-shadow(0 0 1px black)!important;width:40px;height:40px;padding:20px}.i-amphtml-lbg-button[data-action=next]{right:0!important;left:auto!important}.i-amphtml-lbg-button[data-action=next]:after{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.i-amphtml-lbg-button[data-action=prev]{right:auto!important;left:0!important}.i-amphtml-lbg-button[data-action=prev]:after{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}[i-amphtml-lbg-single-item] .i-amphtml-lbg-button[data-action=gallery],[i-amphtml-lbg-single-item] .i-amphtml-lbg-button[data-action=next],[i-amphtml-lbg-single-item] .i-amphtml-lbg-button[data-action=prev]{visibility:hidden!important}.i-amphtml-lbg[gallery-view] .i-amphtml-lbg-button[data-action=gallery],.i-amphtml-lbg[gallery-view] .i-amphtml-lbg-button[data-action=next],.i-amphtml-lbg[gallery-view] .i-amphtml-lbg-button[data-action=prev]{display:none!important}.i-amphtml-lbg[gallery-view] .i-amphtml-lbg-button[data-action=slides]{display:block!important}[i-amphtml-lbg-fade]{animation-fill-mode:forwards;animation-duration:400ms}[i-amphtml-lbg-fade=in]{animation-name:fadeIn}[i-amphtml-lbg-fade=out]{animation-name:fadeOut}amp-lightbox-gallery[i-amphtml-lbg-fade]{position:relative;z-index:2147483642;animation-timing-function:cubic-bezier(0.8,0,0.2,1)}amp-lightbox-gallery .amp-carousel-button{display:none}amp-lightbox-gallery amp-carousel{background:transparent!important}.i-amphtml-lbg{position:fixed!important;z-index:2147483642}.i-amphtml-lbg,.i-amphtml-lbg-gallery,.i-amphtml-lbg-mask{top:0!important;left:0!important;right:0!important;bottom:0!important}.i-amphtml-lbg-gallery,.i-amphtml-lbg-mask{background-color:#000!important;position:absolute!important}.i-amphtml-lbg-gallery{display:none;top:56px!important;overflow:auto!important}@media (min-width:1024px){.i-amphtml-lbg-gallery{top:80px!important}}.i-amphtml-lbg-overlay:not([i-amphtml-lbg-fade]){opacity:0;visibility:hidden}.i-amphtml-lbg-overlay[i-amphtml-lbg-fade=in]{animation-timing-function:ease-in}.i-amphtml-lbg-overlay[i-amphtml-lbg-fade=out]{animation-timing-function:linear}.i-amphtml-lbg[gallery-view] .i-amphtml-lbg-gallery{display:grid!important;-ms-flex-pack:center!important;justify-content:center!important;grid-gap:5px!important;grid-template-columns:repeat(3,1fr);grid-auto-rows:min-content!important;padding:5px}@media (min-width:1024px){.i-amphtml-lbg[gallery-view] .i-amphtml-lbg-gallery{grid-template-columns:repeat(4,249.75px)}}.i-amphtml-lbg-gallery-thumbnail{position:relative!important;padding-top:100%!important}.i-amphtml-lbg-gallery-thumbnail-img{width:100%!important;height:100%!important;position:absolute!important;top:0!important;-o-object-fit:cover!important;object-fit:cover!important;cursor:pointer!important}.i-amphtml-lbg-thumbnail-timestamp-container{background-color:#292d33;color:#fff;position:absolute;bottom:10px;left:10px;height:20px;border-radius:2px;opacity:0.8;width:20px}.i-amphtml-lbg-thumbnail-timestamp-container.i-amphtml-lbg-has-timestamp{font-size:12px;padding:0 5px 0 18px;line-height:1.3rem;width:auto}.i-amphtml-lbg-thumbnail-play-icon{background-image:url(\'data:image/svg+xml;charset=utf-8,\');height:16px;width:16px;position:absolute;left:2px;bottom:2px}amp-lightbox-gallery .i-amphtml-slide-item>*{height:auto}@keyframes fadeIn{0%{opacity:0}to{opacity:1;visibility:visible}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}\n/*# sourceURL=/extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.css*/'),t.registerServiceForDoc("amp-lightbox-manager",class{constructor(t){this.zi=t,this.sN=null,this.Zht=w({default:[]}),this.PE=0,this.A$=new Set}maybeInit(){if(this.sN)return this.sN;this.sN=this.qht();const t=this.zi.getRootNode();return t.addEventListener("amp:dom-update",(()=>{this.sN=this.qht()})),t.addEventListener("amp-auto-lightbox:newly-set",(t=>{const{target:i}=t;this.Wht(i)})),this.sN}qht(){return this.zi.whenReady().then((()=>{const t=this.zi.getRootNode().querySelectorAll("[lightbox],[data-lightbox]"),i=this.Wht.bind(this);t.forEach(i)}))}Kht(t){return St.has(t.tagName)}Qht(t){const i=t.getAttribute("lightbox")||`carousel${t.getAttribute("id")||this.PE++}`;this.Fct(t).then((t=>{t.forEach((t=>{if(t.hasAttribute("lightbox-exclude")||t.hasAttribute("lightbox")&&t.getAttribute("lightbox")!==i)return;const n=function(t){const i=t.tagName.toUpperCase();if("AMP-IMG"==i||"FIGURE"==i)return t;const n=t.querySelector("figure");if(n)return n;const s=t.querySelectorAll("amp-img");return it(1==s.length,"Found more than one images or none in slide!"),s[0]}(t);this.A$.has(n)||(n.setAttribute("lightbox",i),this.A$.add(n),this.Bct(n,i))}))}))}Wht(t){if(!this.A$.has(t))if(this.A$.add(t),zt.has(t.tagName))this.Qht(t);else{const i=t.getAttribute("lightbox")||"default";this.Bct(t,i)}}Gct(t,i){const n=function(t,i){for(let n=t.firstElementChild;n;n=n.nextElementSibling)if(i(n))return n;return null}(t,(t=>"FIGCAPTION"!==t.tagName)),s=n.classList.contains("i-amphtml-inline-gallery-slide-content-slot"),e=s?s.firstChild:n;return e&&e.setAttribute("lightbox",i),e}Bct(t,i){if("FIGURE"==t.tagName){const n=this.Gct(t,i);if(!n)return;t=n}if(it(this.Kht(t),"The element %s isn't supported in lightbox yet.",t.tagName),this.Zht[i]||(this.Zht[i]=[]),this.Zht[i].push(t),function(t){if("a"==t.tagName.toLowerCase()&&t.hasAttribute("href"))return!0;if(t.querySelector("a[href]"))return!0;const i=dt(t);if(i.hasResolvableAction(t,"tap",t.parentElement))return!0;const n=t.querySelectorAll("[on]");for(let t=0;tg(t.querySelectorAll(".amp-carousel-slide, .i-amphtml-carousel-slotted"))))}getElementsForLightboxGroup(t){return this.maybeInit().then((()=>tt(this.Zht[t])))}getDescription(t){const i=j(t,"figure");if(i){const t=z(i,"figcaption");if(t)return t.innerText}const n=t.getAttribute("aria-describedby");if(n){const t=this.zi.getElementById(n);if(t)return t.innerText}return""}Hct(t){return Ft[t.tagName]?t.getImpl().then((t=>t.getDuration())):r()}getThumbnails(t){return this.Zht[t].map((t=>({srcset:this.Xct(t),placeholderSrc:this.Yct(t),element:t,timestampPromise:this.Hct(t)})))}Yct(t){switch(t.tagName){case"AMP-AD":return'data:image/svg+xml;charset=utf-8,';case"AMP-VIDEO":case"AMP-YOUTUBE":return'data:image/svg+xml;charset=utf-8,';default:return'data:image/svg+xml;charset=utf-8,'}}Xct(t){if(t.hasAttribute("lightbox-thumbnail-id")){const i=t.getAttribute("lightbox-thumbnail-id"),n=this.zi.getElementById(i);if(St.has(null==n?void 0:n.tagName))return Rt(n)}return this.Jct(t)}Jct(t){if(St.has(t.tagName))return Rt(t);if("AMP-VIDEO"==t.tagName)return this.Zct(t);const i=(n=t,O("placeholder"),S(n,"> [placeholder]"));var n;return i?this.Jct(i):null}Zct(t){const i=t.getAttribute("poster");return i?Vt(i):null}}),gt(t.win).addDocFactory((function(t){return t.whenReady().then((()=>t.getBody())).then((i=>{if(!z(t.getRootNode(),ai)){const n=t.win.document.createElement(ai);n.setAttribute("layout","nodisplay"),n.setAttribute("id","amp-lightbox-gallery"),i.appendChild(n)}}))}))})(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-lightbox-gallery-0.1.mjs.map