; (self.AMP=self.AMP||[]).push({m:1,v:"2502032353000",n:"amp-anim",ev:"0.1",l:!0,f:function(t,n){(()=>{var{isArray:n}=Array,{hasOwnProperty:e,toString:i}=Object.prototype;function r(t){return(t.ownerDocument||t).defaultView}function o(t,n,e={}){const{needsRootBounds:i,rootMargin:r,threshold:o}=e,s=function(t){return t.parent&&t.parent!=t}(n)&&(i||r)?n.document:void 0;return new n.IntersectionObserver(t,{threshold:o,root:s,rootMargin:r})}var s,l=new WeakMap,c=new WeakMap;function u(t){const n=new Set;for(let e=t.length-1;e>=0;e--){const i=t[e],{target:r}=i;if(n.has(r))continue;n.add(r);const o=c.get(r);if(o)for(let t=0;t"-"+t.toLowerCase()));return f.some((t=>n.startsWith(t+"-")))?`-${n}`:n}(o),l)}function A(t,n){void 0===n&&(n=t.hasAttribute("hidden")),n?t.removeAttribute("hidden"):t.setAttribute("hidden","")}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var d=["alt","aria-label","aria-describedby","aria-labelledby"],b=["src","srcset"],m="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",p=class extends t.BaseElement{constructor(t){super(t),this.ze=null,this.Ow=null}isLayoutSupported(t){return function(t){return"fixed"==t||"fixed-height"==t||"responsive"==t||"fill"==t||"flex-item"==t||"fluid"==t||"intrinsic"==t}(t)}buildCallback(){var t,n,e;this.ze=new Image,this.ze.setAttribute("decoding","async"),a(d,this.element,this.ze),(t=this.ze).classList.add("i-amphtml-fill-content"),t.classList.add("i-amphtml-replaced-content"),n=this.element,e=this.ze,n.hasAttribute("object-fit")&&h(e,"object-fit",n.getAttribute("object-fit")),n.hasAttribute("object-position")&&h(e,"object-position",n.getAttribute("object-position")),"img"==this.element.getAttribute("role")&&(this.element.removeAttribute("role"),this.user().error("AMP-ANIM","Setting role=img on amp-anim elements breaks screen readers. Please just set alt or ARIA attributes, they will be correctly propagated for the underlying element.")),A(this.ze,!this.getPlaceholder()),this.element.appendChild(this.ze)}isRelayoutNeeded(){return!0}layoutCallback(){const t=this.ze;return a(b,this.element,t,!0),function(t){if(!t.hasAttribute("src")&&"srcset"in t==0){const n=t.getAttribute("srcset")||"",e=/\S+/.exec(n);if(null==e)return;const i=e[0];t.setAttribute("src",i)}}(t),this.loadPromise(t).then((()=>{this.Ow=function(t,n,e){const i=r(t);let s=l.get(i);s||l.set(i,s=o(u,i));let a=c.get(t);return a||(a=[],c.set(t,a)),a.push(n),s.observe(t),()=>{!function(t,n){const e=c.get(t);if(!e)return;if(!function(t,n){const e=t.indexOf(n);return-1!=e&&(t.splice(e,1),!0)}(e,n))return;if(e.length)return;const i=r(t),o=l.get(i);null==o||o.unobserve(t),c.delete(t)}(t,n)}}(this.element,(({isIntersecting:t})=>this.xw(t)))}))}firstLayoutCompleted(){}unlayoutCallback(){var t;return null===(t=this.Ow)||void 0===t||t.call(this),this.Ow=null,this.xw(!1),this.ze.src=m,this.ze.srcset=m,!0}xw(t){this.togglePlaceholder(!t),A(this.ze,t)}};t.registerElement("amp-anim",p)})(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-anim-0.1.mjs.map