; (self.AMP=self.AMP||[]).push({m:0,v:"2410292120000",n:"amp-carousel",ev:"0.1",l:!0,f:function(t,i){!function(){function i(t,n){return(i=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,n)}function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&i(t,n)}function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,i){if(i&&("object"===e(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return o(t)}function a(t){var i=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(t){return!1}}();return function(){var n,e=r(t);if(i){var o=r(this).constructor;n=Reflect.construct(e,arguments,o)}else n=e.apply(this,arguments);return s(this,n)}}function u(t,i,n){return i in t?Object.defineProperty(t,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[i]=n,t}function h(t,i){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);i&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var i=1;it.length)&&(i=t.length);for(var n=0,r=new Array(i);n=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var m=Object.prototype;function d(t){var i=Object.create(null);return t&&Object.assign(i,t),i}function b(t){return"number"==typeof t&&isFinite(t)}function g(t,i,n,r,e,o,s,a,u,h,l){return t}function x(t){return(t.ownerDocument||t).defaultView}m.hasOwnProperty,m.toString;var y=/(\0)|^(-)$|([\x01-\x1f\x7f]|^-?[0-9])|([\x80-\uffff0-9a-zA-Z_-]+)|[^]/g;function w(t,i,n,r,e){return e||(i?"�":r?t.slice(0,-1)+"\\"+t.slice(-1).charCodeAt(0).toString(16)+" ":"\\"+t)}function S(t){return String(t).replace(y,w)}function k(t){return function(t,i){for(var n=[],r=t.firstElementChild;r;r=r.nextElementSibling)void 0,s=void 0,a=void 0,f(o=e=r)?s=o:1==(null==(a=o)?void 0:a.nodeType)&&(s=o.tagName),!(s&&s.toLowerCase().startsWith("i-")||e.nodeType===Node.ELEMENT_NODE&&(e.hasAttribute("placeholder")||e.hasAttribute("fallback")||e.hasAttribute("overflow")))&&n.push(r);var e,o,s,a;return n}(t)}var j={bubbles:!0,cancelable:!0};function E(t){return t.parent&&t.parent!=t}function O(t,i,n){var r=t.hasAttribute(i),e=void 0!==n?n:!r;return e!==r&&(e?t.setAttribute(i,""):t.removeAttribute(i)),e}function M(t,i,n,r){var e=n||{};g(t.ownerDocument);var o=r||j,s=o.bubbles,a=o.cancelable,u=new MessageEvent(i,{data:e,bubbles:s,cancelable:a});t.dispatchEvent(u)}function A(t){return t.hasAttribute("i-amphtml-ssr")}var z,I="amp-carousel-button-prev",T="amp-carousel-button-next",N="i-amphtml-carousel-has-controls",R="amp-carousel-slide",P="i-amphtml-slide-item",_="i-amphtml-slides-container",B="i-amphtml-slidescroll-no-snap",C="i-amphtml-slide-item-show",L="i-amphtml-scrollable-carousel-container";function W(){for(var t=0;t1?2:e?0:1;return{prevButton:F(t,{className:I,title:G(t,{index:String(e?i:0),total:String(i)}),enabled:t.hasAttribute("loop")}),nextButton:F(t,{className:T,title:H(t,{index:String(o),total:String(i)}),enabled:i>1})}}(t,i)),n)}function H(t,i){var n=t.getAttribute("data-next-button-aria-label")||"Next item in carousel";return X(t,{prefix:n,index:i.index,total:i.total})}function G(t,i){var n=t.getAttribute("data-prev-button-aria-label")||"Previous item in carousel";return X(t,{prefix:n,index:i.index,total:i.total})}function X(t,i){var n=i.index,r=i.prefix,e=i.total;if(Z(t))return r;var o=(t.getAttribute("data-button-count-format")||"(%s of %s)").replace("%s",n).replace("%s",e);return"".concat(r," ").concat(o)}function Z(t){return"slides"!==t.getAttribute("type")}function $(){return z||(z=Promise.resolve(void 0))}var J=function(){var t=this;this.promise=new Promise((function(i,n){t.resolve=i,t.reject=n}))},V="ArrowLeft",Y="ArrowRight",q="fixed",K="fixed-height";function Q(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.needsRootBounds,e=n.rootMargin,o=n.threshold,s=E(i)&&(r||e)?i.document:void 0;return new i.IntersectionObserver(t,{threshold:o,root:s,rootMargin:e})}var tt,it=new WeakMap,nt=new WeakMap;function rt(t,i,n){var r=x(t);if(n){var e=Q((function(t){i(t[t.length-1])}),r,n);return e.observe(t),function(){e.unobserve(t)}}var o=it.get(r);o||it.set(r,o=Q(et,r));var s=nt.get(t);return s||(s=[],nt.set(t,s)),s.push(i),o.observe(t),function(){!function(t,i){var n,r,e,o=nt.get(t);if(o&&(r=i,-1!=(e=(n=o).indexOf(r))&&(n.splice(e,1),1)&&!o.length)){var s=x(t),a=it.get(s);null==a||a.unobserve(t),nt.delete(t)}}(t,i)}}function et(t){for(var i=new Set,n=t.length-1;n>=0;n--){var r=t[n],e=r.target;if(!i.has(e)){i.add(e);var o=nt.get(e);if(o)for(var s=0;s1?i-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return i}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var gt=self.__AMP_LOG;function xt(t,i){throw new Error("failed to call initLogConstructor")}function yt(t){return gt.user||(gt.user=wt()),function(t,i){return i&&i.ownerDocument.defaultView!=t}(gt.user.win,t)?gt.userForEmbed||(gt.userForEmbed=wt()):gt.user}function wt(t){return xt()}function St(){return gt.dev||(gt.dev=xt())}function kt(t,i,n,r,e,o,s,a,u,h,l){return t}function jt(t,i){return zt(t=function(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}(t),i)}function Et(t,i){return zt(At(Mt(t)),i)}function Ot(t,i){return It(At(t),i)}function Mt(t){return t.nodeType?(i=x(t),jt(i,"ampdoc")).getAmpDoc(t):t;var i}function At(t){var i=Mt(t);return i.isSingleDoc()?i.win:i}function zt(t,i){kt(Nt(t,i));var n=Tt(t)[i];return n.obj||(kt(n.ctor),kt(n.context),n.obj=new n.ctor(n.context),kt(n.obj),n.context=null,n.resolve&&n.resolve(n.obj)),n.obj}function It(t,i){var n=Tt(t)[i];return n?n.promise?n.promise:(zt(t,i),n.promise=Promise.resolve(n.obj)):null}function Tt(t){var i=t.__AMP_SERVICES;return i||(i=t.__AMP_SERVICES={}),i}function Nt(t,i){var n=t.__AMP_SERVICES&&t.__AMP_SERVICES[i];return!(!n||!n.ctor)}var Rt=function(t){return i="action",Nt(n=At(Mt(t)),i)?zt(n,i):null;var i,n},Pt=function(t){return function(t,i,n,r){var e=Ot(t,i);if(e)return e;var o=Mt(t);return o.whenExtensionsKnown().then((function(){var t=o.getExtensionVersion(n);return t?jt(o.win,"extensions").waitForExtension(n,t):null})).then((function(n){return n?function(t,i){return function(t,i){var n=It(t,i);if(n)return n;var r,e,o,s,a=Tt(t);return a[i]=(e=(r=new J).promise,o=r.reject,s=r.resolve,e.catch((function(){})),{obj:null,promise:e,resolve:s,reject:o,context:null,ctor:null}),a[i].promise}(At(t),i)}(t,i):null}))}(t,"amp-analytics-instrumentation","amp-analytics")},_t=function(t){return Et(t,"owners")},Bt=function(t){return jt(t,"platform")},Ct=function(t){return zt(t,"timer")},Lt=function(t){return jt(t,"vsync")};function Wt(t,i,n,r){return function(e){return Ft.solveYValueFromXValue(e,0,0,t,i,n,r,1,1)}}var Ft=function(){function t(){}return t.solveYValueFromXValue=function(i,n,r,e,o,s,a,u,h){return t.Qd(t.Zd(i,n,e,s,u),r,o,a,h)},t.Zd=function(i,n,r,e,o){var s=1e-6,a=(i-n)/(o-n);if(a<=0)return 0;if(a>=1)return 1;for(var u=0,h=1,l=0,c=0;c<8;c++){l=t.tm(a,n,r,e,o);var f=(t.tm(a+s,n,r,e,o)-l)/s;if(Math.abs(l-i)s&&v<8;v++)l1&&this.sm.sort((function(t,i){return t.delay+t.duration-(i.delay+i.duration)}));try{if(i>0)for(var n=0;n=0;r--)this.sm[r].func(0,!1)}catch(i){St().error(Xt,"completion failed: "+i,i),t=!1}}t?this.Fe():this.hm()}},i.fm=function(t){if(this.es){for(var i=Date.now(),n=Math.min((i-this.ka)/this.om,1),r=0;r=e.delay&&(e.started=!0)}for(var o=0;o0){if(r=n=Math.min((i-t.delay)/t.duration,1),t.curve&&1!=r)try{r=t.curve(n)}catch(t){return St().error(Xt,"step curve failed: "+t,t),void this.lm(!1,0)}}else n=1,r=1;1==n&&(t.completed=!0);try{t.func(r,t.completed)}catch(t){return St().error(Xt,"step mutate failed: "+t,t),void this.lm(!1,0)}},t}();function Vt(t,i,n,r){var e={detail:n};if(Object.assign(e,r),"function"==typeof t.CustomEvent)return new t.CustomEvent(i,e);var o=t.document.createEvent("CustomEvent");return o.initCustomEvent(i,!!e.bubbles,!!e.cancelable,n),o}function Yt(t,i,n,r){return function(t,i,n,r){var e=t,o=n,s=function(t){try{return o(t)}catch(t){var i,n;throw null===(i=(n=self).__AMP_REPORT_ERROR)||void 0===i||i.call(n,t),t}},a=function(){if(void 0!==Gt)return Gt;Gt=!1;try{var t={get capture(){return Gt=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return Gt}(),u=!(null==r||!r.capture);return e.addEventListener(i,s,a?r:u),function(){null==e||e.removeEventListener(i,s,a?r:u),o=null,e=null,s=null}}(t,i,n,r)}var qt=function(){function t(t){var i=t.element,n=t.go,r=t.nextButton,e=t.prevButton;this.ri=i,this.Met=n,this.t=x(i),this.Ui=e,this.zi=r,this.U9=!1,this.Wet()}var i=t.prototype;return i.Wet=function(){var t,i=this;this.setupButtonInteraction(this.Ui,(function(){return i.handlePrev()})),this.setupButtonInteraction(this.zi,(function(){return i.handleNext()})),this.ri.hasAttribute("controls")?this.U9=!0:(t=this.t,jt(t,"input")).onMouseDetected((function(t){t&&(i.U9=!0,O(i.ri,"i-amphtml-carousel-hide-buttons",!i.U9),i.ri.classList.add(N))}),!0)},i.setupButtonInteraction=function(t,i){t.addEventListener("click",i),t.addEventListener("keydown",(function(t){t.defaultPrevented||"Enter"!=t.key&&" "!=t.key||(t.preventDefault(),i())}))},i.setControlsState=function(t){var i=t.next,n=t.prev;U(this.Ui,n),U(this.zi,i)},i.hintControls=function(){var t=this;this.U9||Lt(this.t).mutate((function(){var i="i-amphtml-carousel-button-start-hint";t.ri.classList.add(i),Ct(t.t).delay((function(){var n;(n=t.ri,Et(n,"mutator")).measureMutateElement(t.ri,null,(function(){t.ri.classList.remove(i),O(t.ri,"i-amphtml-carousel-hide-buttons",!t.U9)}))}),4e3)}))},i.updateButtonTitles=function(t,i){this.Ui.title=t,this.zi.title=i},i.handlePrev=function(){!this.Ui.classList.contains("amp-disabled")&&this.Met(-1,!0,!1)},i.handleNext=function(){!this.zi.classList.contains("amp-disabled")&&this.Met(1,!0,!1)},t}(),Kt="amp-scrollable-carousel",Qt=function(t){n(r,t);var i=a(r);function r(t){var n;return(n=i.call(this,t)).H5=0,n.Fet=0,n.Uet=null,n.pg=null,n.U5=null,n.uR=null,n.yp=null,n}var e=r.prototype;return e.isLayoutSupported=function(t){return function(t){return t==q||t==K}(t)},e.isRelayoutNeeded=function(){return!0},e.Det=function(){var t=this;this.Het(),this.pg.addEventListener("scroll",this.fi.bind(this)),this.pg.addEventListener("keydown",this.e3.bind(this)),this.Uet.forEach((function(i){_t(t.element).setOwner(i,t.element)})),this.registerAction("goToSlide",(function(i){var n=i.args;if(n){var r=parseInt(n.index,10);t.goToSlide(r)}}),1),Rt(this.element).addToAllowlist("amp-carousel","goToSlide",["email"])},e.buildCallback=function(){var t=D(this.element),i=t.cells,n=t.container,r=t.nextButton,e=t.prevButton;this.pg=n,this.Uet=i,this.yp=new qt({element:this.element,prevButton:e,nextButton:r,go:this.go.bind(this)}),this.Det()},e.layoutCallback=function(){var t=this;return this.uR=rt(this.element,(function(i){var n=i.isIntersecting;return t.viewportCallback(n)})),this.Get(this.H5),this.Xet(this.H5,1),this.yp.setControlsState({prev:this.Zet(),next:this.$et()}),$()},e.unlayoutCallback=function(){var t;return null===(t=this.uR)||void 0===t||t.call(this),this.uR=null,!0},e.viewportCallback=function(t){this.Jet(this.H5,this.H5),t&&this.yp.hintControls()},e.go=function(t,i){var n=this,r=this.Vet(this.H5,t),e=this.H5;if(r!=e)if(i){var o=mt(e,r);$t.animate(this.element,(function(t){n.pg.scrollLeft=o(t)}),200,"ease-in-out").thenAlways((function(){n.Yet(r)}))}else this.Yet(r),this.pg.scrollLeft=r},e.goToSlide=function(t){var i=this,n=this.Uet.length;if(!isFinite(t)||t<0||t>=n)return this.user().error(Kt,"Invalid [slide] value: %s",t),$();var r=this.H5,e=r;this.measureMutateElement((function(){e=i.qet(t)}),(function(){if(e!=r){var t=mt(r,e);$t.animate(i.element,(function(n){i.pg.scrollLeft=t(n)}),200,"ease-in-out").thenAlways((function(){i.Yet(e)}))}}))},e.qet=function(t){var i=this.element.offsetWidth;return this.Uet[t].offsetLeft-(i-this.Uet[t].offsetWidth)/2},e.fi=function(){var t=this.pg.scrollLeft;this.H5=t,null===this.U5&&this.R6(t)},e.e3=function(t){var i=t.key;i!=V&&i!=Y||t.stopPropagation()},e.R6=function(t){var i=this;this.U5=Ct(this.win).delay((function(){Math.abs(t-i.H5)<30?(St().fine(Kt,"slow scrolling: %s - %s",t,i.H5),i.U5=null,i.Yet(i.H5)):(St().fine(Kt,"fast scrolling: %s - %s",t,i.H5),i.R6(i.H5))}),100)},e.Yet=function(t){this.Jet(t,this.Fet),this.Get(t),this.Xet(t,Math.sign(t-this.Fet)),this.Fet=t,this.H5=t,this.yp.setControlsState({prev:this.Zet(),next:this.$et()})},e.Vet=function(t,i){var n=this.element.offsetWidth,r=this.pg.scrollWidth,e=t+i*n;return e<0?0:r>=n&&e>r-n?r-n:e},e.Ket=function(t,i){for(var n=this.element.offsetWidth,r=0;r=t&&e.offsetLeft<=t+n&&i(e)}},e.Get=function(t){var i=this;this.Ket(t,(function(t){_t(i.element).scheduleLayout(i.element,t)}))},e.Xet=function(t,i){var n=this,r=this.Vet(t,i);r!=t&&this.Ket(r,(function(t){_t(n.element).schedulePreload(n.element,t)}))},e.Jet=function(t,i){var n=this,r=[];this.Ket(t,(function(t){r.push(t)})),i!=t&&this.Ket(i,(function(t){r.includes(t)||_t(n.element).schedulePause(n.element,t)}))},e.Zet=function(){return 0!=this.H5},e.$et=function(){var t=this.element.offsetWidth,i=this.pg.scrollWidth,n=Math.max(i-t,0);return this.H5!=n},e.interactionNext=function(){this.yp.handleNext()},e.interactionPrev=function(){this.yp.handlePrev()},e.goCallback=function(t,i){this.go(t,i)},e.Het=function(){Yt(this.element,"touchmove",(function(t){return t.stopPropagation()}),{passive:!0})},r}(t.BaseElement),ti=/vertical/,ii=new WeakMap,ni=new WeakMap,ri=new WeakMap;function ei(t){var i=ii.get(t);return i||(i=new t.ResizeObserver(oi),ii.set(t,i)),i}function oi(t){for(var i=new Set,n=t.length-1;n>=0;n--){var r=t[n],e=r.target;if(!i.has(e)){i.add(e);var o=ni.get(e);if(o){ri.set(e,r);for(var s=0;s0?s[0]:{inlineSize:0,blockSize:0};else{var a,u,h=n.target,l=x(h),c=ti.test(function(t,i){return t.getComputedStyle(i)||ct}(l,h).writingMode),f=h,v=f.offsetHeight,p=f.offsetWidth;c?(u=p,a=v):(a=p,u=v),o={inlineSize:a,blockSize:u}}ht(i,o)}}var ai="__AMP__EXPERIMENT_TOGGLES",ui="AMP-CAROUSEL",hi=function(t){n(r,t);var i=a(r);function r(t){var n;(n=i.call(this,t)).Gc=null,n.Qet=!1,n.b4=[],n.tot=0,n.kit=null,n.iot=[],n.not=!1,n.rot=null,n.eot=!1,n.oot=null,n.sot=!1,n.aot=!1,n.Fq=!1,n.uot=5e3,n.hot=null,n.lot=0,n.cot=!1,n.fot=!1,n.vot=0,n.pot=null,n.mot=0,n.dot=0,n.bot=0,n.got=[];var r,e=Bt(n.win);return n.c$=e.isIos(),n.yC=e.isSafari(),n.Es=null,n.xot=!!Bt(n.win).getIosVersionString().startsWith("10.3")||!n.c$&&("amp-carousel-chrome-scroll-snap",r=function(t){var i,n,r,e,o;if(t[ai])return t[ai];t[ai]=d();var s=t[ai];g(s);var a,u=l(l({},null!==(i=t.AMP_CONFIG)&&void 0!==i?i:{}),null!==(n=t.AMP_EXP)&&void 0!==n?n:(a=(null===(r=t.__AMP_EXP)||void 0===r?void 0:r.textContent)||"{}",JSON.parse(a)));for(var h in u){var f=u[h];"number"==typeof f&&f>=0&&f<=1&&(s[h]=Math.random()1},e.mutatedAttributesCallback=function(t){var i=t.slide;void 0!==i&&this.goToSlide(i,3)},e.kot=function(){this.Eot(),this.eot=!0},e.viewportCallback=function(t){var i;t?(this.SR(),null===(i=this.yp)||void 0===i||i.hintControls()):this.Eot()},e.interactionNext=function(){this.yp.handleNext()},e.interactionPrev=function(){this.yp.handlePrev()},e.goCallback=function(t,i,n){this.go(t,i,n)},e.go=function(t,i,n){var r=n?1:3;this.moveSlide(t,i,r),n?this.SR():this.Eot()},e.Oot=function(t){var i=this;this.rot&&Ct(this.win).cancel(this.rot),this.rot=Ct(this.win).delay((function(){if(i.rot=null,!i.not&&!i.eot){var t=i.kit.scrollLeft;i.Qet?i.Mot(t,1):i.Aot(t,void 0,3)}}),t)},e.jot=function(){var t=this.xot?45:100;this.eot=!1,this.Oot(t)},e.Rb=function(t){this.dot=t.width,this.yot=!0},e.buildCallback=function(){var t=D(this.element),i=t.nextButton,n=t.prevButton,r=t.slideWrappers,e=t.slides,o=t.slidesContainer;this.b4=e,this.kit=o,this.iot=r,this.tot=this.b4.length,this.sot=this.element.hasAttribute("loop"),this.Fq=this.element.hasAttribute("autoplay"),this.cot=this.sot&&this.isLoopingEligible(),this.fot=this.Fq&&this.isLoopingEligible(),this.yp=new qt({element:this.element,go:this.go.bind(this),nextButton:i,prevButton:n}),this.yp.updateButtonTitles(this.getPrevButtonTitle(),this.getNextButtonTitle()),this.Det(),this.Sot()},e.layoutCallback=function(){var t,i=this;if(this.uR=rt(this.element,(function(t){var n=t.isIntersecting;return i.viewportCallback(n)})),"[i-amphtml-scale-animation]",(t=this.element).closest?t.closest("[i-amphtml-scale-animation]"):function(t,i,n){var r;for(r=t;r&&void 0!==r;r=r.parentElement)if(i(r))return r;return null}(t,(function(t){return function(t,i){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return!!n&&n.call(t,"[i-amphtml-scale-animation]")}(t)})))return $();if(this.yot||(this.dot=this.kit.clientWidth),null===this.pot)this.zot(this.mot);else{var n=yt().assertNumber(this.pot,"E#19457 this.slideIndex_"),r=this.Iot(n);_t(this.element).scheduleLayout(this.element,this.b4[n]),this.kit.scrollLeft=r,this.bot=r}return $()},e.unlayoutCallback=function(){var t;return null===(t=this.uR)||void 0===t||t.call(this),this.uR=null,this.pot=null,!0},e.Zet=function(){return this.cot||this.pot>0},e.$et=function(){return this.cot||this.pot=this.tot&&(o=0),i){var s=1!=t||e?this.dot:0;this.Aot(s,t,n)}else this.Tot(o,n)}}},e.fi=function(t){var i=this.kit.scrollLeft;this.c$||this.yC||this.Not(i);var n=this.Qet?200:this.c$?45:100;this.Oot(n),this.bot=i},e.e3=function(t){var i=t.key;i!=V&&i!=Y||t.stopPropagation()},e.Not=function(t){var i=this,n=this.kit.scrollWidth;-1==this.vot&&t>=this.bot||1==this.vot&&t<=this.bot?this.Aot(t).then((function(){i.vot=0})):t<0?this.vot=-1:t+this.dot>n?this.vot=1:this.vot=0},e.Aot=function(t,i,n){var r=this;this.not=!0;var e=this.Rot(t)-this.pot,o=this.Zet(),s=o?this.dot:0;return 0!=e||1!=i&&-1!=i||(e=i),1==e||-1!=e&&e==-1*(this.tot-1)?s=o?2*this.dot:this.dot:-1!=e&&e!=this.tot-1||(s=0),this.Pot(t,s).then((function(){r.Mot(s,n)}))},e.Rot=function(t){if(!t&&!this.dot)return 0;var i=Math.round(t/this.dot),n=0,r=this.Zet(),e=this.$et();r&&e?n=i-1:e?n=i:r&&(n=i-1);var o=this.pot+n;return this.cot?o<0?this.tot-1:o>=this.tot?0:o:o<0?0:o>=this.tot?this.tot-1:o},e.getPrevButtonTitle=function(){var t=this.Q9(this.pot),i=(null==t?0:t)+1;return G(this.element,{index:String(i),total:String(this.tot)})},e.getNextButtonTitle=function(){var t=this.Y9(this.pot),i=(null==t?this.tot-1:t)+1;return H(this.element,{index:String(i),total:String(this.tot)})},e.Mot=function(t,i){var n=this;if(b(t)&&null!==this.pot){this.not=!0;var r=this.Rot(t);this.Gc.mutate((function(){n.Tot(r,i),n.Gc.mutate((function(){n.not=!1}))}))}},e.goToSlide=function(t,i){var n=parseInt(t,10);!isFinite(n)||n<0||n>=this.tot?this.user().error(ui,"Invalid [slide] value: ",t):null!==this.pot?this.Tot(n,i):this.mot=n},e.Q9=function(t){return t-1>=0?t-1:this.cot?this.tot-1:null},e.Y9=function(t){return t+1=e||this.pot==t)return!1;var o=this.Q9(t),s=this.Y9(t),a=[];return null!=o&&a.push(o),a.push(t),null!=s&&s!==o&&a.push(s),void 0===this.b4[t]?(St().error(ui,"Attempting to access a non-existant slide %s / %s",t,e),!1):(a.forEach((function(i,n){r.cot&&vt(r.iot[i],"order",n+1),r.iot[i].classList.add(C);var e=_t(r.element);i==t?(e.scheduleLayout(r.element,r.b4[i]),e.scheduleResume(r.element,r.b4[i]),r.b4[i].setAttribute("aria-hidden","false")):(e.schedulePreload(r.element,r.b4[i]),r.b4[i].setAttribute("aria-hidden","true"))})),this.kit.scrollLeft=this.Iot(t),this.v5(t),this.pot=t,this.hot&&this.pot===this.tot-1&&(this.lot++,this.lot==this.hot&&this._ot()),this.Bot(a),null===(i=this.yp)||void 0===i||i.setControlsState({prev:this.Zet(),next:this.$et()}),null===(n=this.yp)||void 0===n||n.updateButtonTitles(this.getPrevButtonTitle(),this.getNextButtonTitle()),!0)},e.Tot=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.zot(t);if(n){var r="slideChange",e=Vt(this.win,"slidescroll.".concat(r),{"index":t});this.Es.trigger(this.element,r,e,i),M(this.element,r,{index:t,actionTrust:i})}},e.Iot=function(t){var i=this.dot;return(!this.cot&&0==t||this.b4.length<=1)&&(i=0),i},e.Bot=function(t){for(var i=this.tot,n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Pt(t).then((function(e){e&&e.triggerEventForTarget(t,i,n,r)}))}(this.element,t,i)},e.wot=function(){var t=Number(this.element.getAttribute("delay"));t>0&&(this.uot=Math.max(1e3,t)),this.sot||(this.element.setAttribute("loop",""),this.aot=!0,this.sot=!0,this.cot=!0)},e.SR=function(){this.fot&&0!=this.hot&&(this.Eot(),this.oot=Ct(this.win).delay(this.go.bind(this,1,!0,!0),this.uot))},e.V9=function(t){if(t!=this.fot){var i=this.fot;this.Fq=t,this.fot=this.Fq&&this.isLoopingEligible(),!i&&this.fot&&this.wot(),this.fot?this.SR():this.Eot()}},e.Eot=function(){null!==this.oot&&(Ct(this.win).cancel(this.oot),this.oot=null)},e._ot=function(){this.Eot(),this.aot&&(this.element.removeAttribute("loop"),this.aot=!1,this.sot=!1,this.cot=!1),this.Fq=!1,this.fot=this.Fq&&this.isLoopingEligible()},r}(t.BaseElement),li=function(t){n(r,t);var i=a(r);function r(){return i.apply(this,arguments)}return r.prototype.upgradeCallback=function(){return Z(this.element)?new Qt(this.element):new hi(this.element)},r}(t.BaseElement);t.registerElement("amp-carousel",li,'.amp-carousel-slide>.i-amphtml-replaced-content{-o-object-fit:contain;object-fit:contain}.amp-carousel-button{position:absolute;box-sizing:border-box;top:50%;height:34px;width:34px;border-radius:2px;opacity:0;pointer-events:all;background-color:rgba(0,0,0,.5);background-position:50% 50%;background-repeat:no-repeat;transform:translateY(-50%);visibility:hidden;z-index:10}.amp-carousel-button:focus{border:1px solid #000;outline:1px solid #fff}.amp-mode-mouse .amp-carousel-button,amp-carousel.i-amphtml-carousel-has-controls .amp-carousel-button,amp-carousel[controls] .amp-carousel-button{opacity:1;visibility:visible}.amp-carousel-button-prev{left:16px;background-image:url(\'data:image/svg+xml;charset=utf-8,\');background-size:18px 18px}.amp-carousel-button-next{right:16px;background-image:url(\'data:image/svg+xml;charset=utf-8,\');background-size:18px 18px}.i-amphtml-carousel-button-start-hint .amp-carousel-button:not(.amp-disabled){animation:i-amphtml-carousel-hint 1s ease-in 3s 1 normal both}.amp-mode-mouse .i-amphtml-carousel-button-start-hint .amp-carousel-button:not(.amp-disabled){animation:none}@keyframes i-amphtml-carousel-hint{0%{opacity:1;visibility:visible}to{opacity:0;visibility:hidden}}amp-carousel .amp-carousel-button.amp-disabled{animation:none;clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}amp-carousel[i-amphtml-carousel-hide-buttons] .amp-carousel-button-next,amp-carousel[i-amphtml-carousel-hide-buttons] .amp-carousel-button-prev{opacity:0;pointer-events:none;visibility:visible!important}.i-amphtml-slides-container{display:-ms-flexbox!important;display:flex!important;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:100%!important;left:0;overflow-x:auto!important;overflow-y:hidden!important;position:absolute!important;top:0;width:100%!important;scroll-snap-type:x mandatory!important;scrollbar-width:none;padding-bottom:20px!important;box-sizing:content-box!important;-webkit-overflow-scrolling:touch!important}.i-amphtml-slides-container::-webkit-scrollbar{display:none!important}.i-amphtml-slides-container.i-amphtml-no-scroll{overflow-x:hidden!important}.i-amphtml-slide-item{-ms-flex-align:center!important;align-items:center!important;display:none!important;-ms-flex:0 0 100%!important;flex:0 0 100%!important;height:100%!important;-ms-flex-pack:center!important;justify-content:center!important;position:relative!important;scroll-snap-align:start!important;width:100%!important}.i-amphtml-slide-item>*{height:100%;width:100%;overflow:hidden!important}.i-amphtml-slide-item-show{display:-ms-flexbox!important;display:flex!important}.i-amphtml-carousel-end-marker,.i-amphtml-carousel-start-marker{background-color:transparent!important;display:block!important;-ms-flex:0 0 1px!important;flex:0 0 1px!important;height:100%!important;position:relative!important;scroll-snap-align:start!important;width:1px!important}.i-amphtml-carousel-start-marker{-ms-flex-order:-1!important;order:-1!important;margin-left:-1px!important}.i-amphtml-carousel-end-marker{-ms-flex-order:100000000!important;order:100000000!important;margin-right:-1px!important}.i-amphtml-slidescroll-no-snap.i-amphtml-slides-container{scroll-snap-type:none!important}.i-amphtml-slidescroll-no-snap .i-amphtml-slide-item{scroll-snap-align:none!important}.i-amphtml-slidescroll-no-snap.i-amphtml-slides-container.i-amphtml-no-scroll{-webkit-overflow-scrolling:auto!important}.amp-scrollable-carousel-slide{display:inline-block!important;margin-left:8px}.amp-scrollable-carousel-slide:first-child{margin-left:0px}.i-amphtml-scrollable-carousel-container{white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important}\n/*# sourceURL=/extensions/amp-carousel/0.1/amp-carousel.css*/')}(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-carousel-0.1.js.map