; (self.AMP=self.AMP||[]).push({m:0,v:"2305252018001",n:"amp-accordion",ev:"0.1",l:!0,f:function(n,t){!function(){function t(n,r){return(t=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,r)}function r(n){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}function i(n){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function e(n,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n)}function o(n){return"string"==typeof n}function a(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,i=new Array(t);r=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Array.isArray;var c=Object.prototype;function f(n,t,r,i,e,o,a,u,c,f,s){return n}c.hasOwnProperty,c.toString;var s="ArrowUp";function d(n,t,r,i){return function(e){return h.solveYValueFromXValue(e,0,0,n,t,r,i,1,1)}}var h=function(){function n(){}return n.solveYValueFromXValue=function(t,r,i,e,o,a,u,c,f){return n.la(n.va(t,r,e,a,c),i,o,u,f)},n.va=function(t,r,i,e,o){var a=1e-6,u=(t-r)/(o-r);if(u<=0)return 0;if(u>=1)return 1;for(var c=0,f=1,s=0,d=0;d<8;d++){s=n.da(u,r,i,e,o);var h=(n.da(u+a,r,i,e,o)-s)/a;if(Math.abs(s-t)a&&l<8;l++)s1?t-1:0),i=1;i1&&this.ga.sort((function(n,t){return n.delay+n.duration-(t.delay+t.duration)}));try{if(t>0)for(var r=0;r=0;i--)this.ga[i].func(0,!1)}catch(t){D().error(W,"completion failed: "+t,t),n=!1}}n?this.Qt():this.Aa()}},t.Ea=function(n){if(this.Rr){for(var t=Date.now(),r=Math.min((t-this.ih)/this.ya,1),i=0;i=e.delay&&(e.started=!0)}for(var o=0;o0){if(i=r=Math.min((t-n.delay)/n.duration,1),n.curve&&1!=i)try{i=n.curve(r)}catch(n){return D().error(W,"step curve failed: "+n,n),void this.Oa(!1,0)}}else r=1,i=1;1==r&&(n.completed=!0);try{n.func(i,n.completed)}catch(n){return D().error(W,"step mutate failed: "+n,n),void this.Oa(!1,0)}},n}();new Set(["c","v","a","ad"]);var G="amp-accordion",H=d(.47,0,.745,.715),K=d(.39,.575,.565,1),Q=function(n){!function(n,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),r&&t(n,r)}(c,n);var i,a,u=(i=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}(),function(){var n,t=r(i);if(a){var o=r(this).constructor;n=Reflect.construct(t,arguments,o)}else n=t.apply(this,arguments);return e(this,n)});function c(n){var t;return(t=u.call(this,n)).ann=[],t.cnn=null,t.fnn=null,t.dnn=!1,t.qS=null,t.Gr=null,t.xH=n.id?n.id:Math.floor(100*Math.random()),t}c.prerenderAllowed=function(){return!0};var d=c.prototype;return d.isLayoutSupported=function(n){return"container"==n},d.buildCallback=function(){var n,t,r,i,e,a=this;this.Gr=(n=this.element,t="action",r=B(n),Y(e=(i=B(r)).isSingleDoc()?i.win:i,t)?J(e,t):null),this.dnn=this.element.hasAttribute("disable-session-states"),this.cnn=this.hnn(),this.fnn=this.lnn(),this.qS=function(n,t){for(var r=[],i=n.firstElementChild;i;i=i.nextElementSibling)u=void 0,c=void 0,o(a=e=i)?u=a:1==(null==(c=a)?void 0:c.nodeType)&&(u=a.tagName),!(u&&u.toLowerCase().startsWith("i-")||e.nodeType===Node.ELEMENT_NODE&&(e.hasAttribute("placeholder")||e.hasAttribute("fallback")||e.hasAttribute("overflow")))&&r.push(i);var e,a,u,c;return r}(this.element),this.qS.forEach((function(n,t){U("section"==n.tagName.toLowerCase(),"Sections should be enclosed in a
tag, See https://github.com/ampproject/amphtml/blob/main/extensions/amp-accordion/amp-accordion.md. Found in: %s",a.element);var r=n.children;U(2==r.length,"Each section must have exactly two children. See https://github.com/ampproject/amphtml/blob/main/extensions/amp-accordion/amp-accordion.md. Found in: %s",a.element);var i=r[0],e=r[1];e.classList.add("i-amphtml-accordion-content");var o=e.getAttribute("id");o||(o=a.xH+"_AMP_content_"+t,e.setAttribute("id",o));var u=i.getAttribute("id");u||(u=a.xH+"_AMP_header_"+t,i.setAttribute("id",u)),a.registerAction("toggle",(function(n){return a.i7(n)})),a.registerAction("expand",(function(n){return a.i7(n)})),a.registerAction("collapse",(function(n){return a.i7(n)})),a.Gr.addToAllowlist(G,["toggle","expand","collapse"],["email"]),new a.win.MutationObserver((function(n){a.vnn(n,2)})).observe(n,{attributes:!0,attributeFilter:["data-expand"]}),a.fnn[o]?n.setAttribute("expanded",""):!1===a.fnn[o]&&n.removeAttribute("expanded"),a.mutateElement((function(){})),U(!n.hasAttribute("[expanded]")&&!n.hasAttribute("data-amp-bind-expanded"),'The "expanded" attribute cannot be used with amp-bind in version 0.1 of amp-accordion. Please bind to [data-expand] instead. Found in: %s',a.element);var c=n.hasAttribute("expanded");i.classList.add("i-amphtml-accordion-header"),i.hasAttribute("role")||i.setAttribute("role","button"),i.setAttribute("aria-controls",o),i.setAttribute("aria-expanded",String(c)),i.hasAttribute("tabindex")||i.setAttribute("tabindex",0),a.ann.push(i),e.setAttribute("aria-labelledby",u),e.hasAttribute("role")||e.setAttribute("role","region"),U(0==a.Gr.hasAction(i,"tap",n),"amp-accordion headings should not have tap actions registered."),i.addEventListener("click",a.NB.bind(a)),i.addEventListener("keydown",a.QB.bind(a))}))},d.i7=function(n){var t=n.args,r=n.method,i=n.trust,e=void 0;if("expand"===r?e=!0:"collapse"===r&&(e=!1),t){var o=t.section,a=this.getAmpDoc().getElementById(o);U(a=P().assertElement(a),"No element found with id: %s",o),this.TF(a,i,e)}else for(var u=0;u2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,e=Math.abs(n)/t*i;return k(e,r,i)},d.xnn=function(n){n.preventDefault();var t=n.currentTarget.parentElement;this.TF(t,3)},d.NB=function(n){this.PH(n)&&this.xnn(n)},d.PH=function(n){var t=n.target,r=n.currentTarget,i=!!function(n,t,r){var i;for(i=n;i&&i!==r;i=i.parentElement)if("A"==i.tagName)return i;return null}(t,0,r),e=this.Gr.hasAction(t,"tap",r);return!i&&!e},d.QB=function(n){if(!n.defaultPrevented)switch(n.key){case s:case"ArrowDown":return void this.pH(n);case"Enter":case" ":return void(n.target==n.currentTarget&&this.xnn(n))}},d.pH=function(n){var t=n.currentTarget,r=this.ann.indexOf(t);if(-1!==r){n.preventDefault();var i=(r+(n.key==s?-1:1))%this.ann.length;i<0&&(i+=this.ann.length),function(n){try{n.focus()}catch(n){}}(this.ann[i])}},d.vnn=function(n,t){var r=this;n.forEach((function(n){var i=n.target,e=i.hasAttribute("data-expand");i.hasAttribute("expanded")!==e&&r.TF(i,t,e)}))},d.getActionServiceForTesting=function(){return this.Gr},c}(n.BaseElement);n.registerElement(G,Q,"amp-accordion>section>:last-child{display:none!important}amp-accordion>section[expanded]>:last-child{display:block!important}.i-amphtml-accordion-content,.i-amphtml-accordion-header{margin:0}.i-amphtml-accordion-header{cursor:pointer;background-color:#efefef;padding-right:20px;border:1px solid #dfdfdf}amp-accordion>section:not([expanded]) .i-amphtml-media-component,amp-accordion>section:not([expanded]) .i-amphtml-media-component *{display:none!important;visibility:hidden!important}\n/*# sourceURL=/extensions/amp-accordion/0.1/amp-accordion.css*/")}(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-accordion-0.1.js.map