(()=>{"use strict";var e={2:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(412),i=s(663),r=s(222),n=s(902),l=s(774);function o(e){let{swiper:t,extendParams:s,on:o}=e;s({flipEffect:{slideShadows:!0,limitRotation:!0}});const d=(e,s)=>{let i=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),r=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");i||(i=(0,a.c)("flip",e,t.isHorizontal()?"left":"top")),r||(r=(0,a.c)("flip",e,t.isHorizontal()?"right":"bottom")),i&&(i.style.opacity=Math.max(-s,0)),r&&(r.style.opacity=Math.max(s,0))};(0,i.e)({effect:"flip",swiper:t,on:o,setTranslate:()=>{const{slides:e,rtlTranslate:s}=t,a=t.params.flipEffect,i=(0,l.p)(t);for(let n=0;n{const s=t.slides.map(e=>(0,l.g)(e));s.forEach(t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(t=>{t.style.transitionDuration=`${e}ms`})}),(0,n.e)({swiper:t,duration:e,transformElements:s})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach(e=>{let s=e.progress;t.params.flipEffect.limitRotation&&(s=Math.max(Math.min(e.progress,1),-1)),d(e,s)})},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}},49:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(645),i=s(541),r=s(774);function n(e){let{swiper:t,extendParams:s,on:n}=e;s({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0}}),t.a11y={clicked:!1};let l,o,d=null,c=(new Date).getTime();function p(e){const t=d;0!==t.length&&(0,r.s)(t,e)}function u(e){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("tabIndex","0")})}function m(e){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("tabIndex","-1")})}function h(e,t){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("role",t)})}function f(e,t){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("aria-roledescription",t)})}function g(e,t){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("aria-label",t)})}function v(e){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("aria-disabled",!0)})}function w(e){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("aria-disabled",!1)})}function b(e){if(13!==e.keyCode&&32!==e.keyCode)return;const s=t.params.a11y,a=e.target;if(!t.pagination||!t.pagination.el||a!==t.pagination.el&&!t.pagination.el.contains(e.target)||e.target.matches((0,i.c)(t.params.pagination.bulletClass))){if(t.navigation&&t.navigation.prevEl&&t.navigation.nextEl){const e=(0,r.m)(t.navigation.prevEl);(0,r.m)(t.navigation.nextEl).includes(a)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?p(s.lastSlideMessage):p(s.nextSlideMessage)),e.includes(a)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?p(s.firstSlideMessage):p(s.prevSlideMessage))}t.pagination&&a.matches((0,i.c)(t.params.pagination.bulletClass))&&a.click()}}function y(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function E(){return y()&&t.params.pagination.clickable}const x=(e,t,s)=>{u(e),"BUTTON"!==e.tagName&&(h(e,"button"),e.addEventListener("keydown",b)),g(e,s),function(e,t){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("aria-controls",t)})}(e,t)},S=e=>{o&&o!==e.target&&!o.contains(e.target)&&(l=!0),t.a11y.clicked=!0},T=()=>{l=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.destroyed||(t.a11y.clicked=!1)})})},M=e=>{c=(new Date).getTime()},C=e=>{if(t.a11y.clicked||!t.params.a11y.scrollOnFocus)return;if((new Date).getTime()-c<100)return;const s=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!s||!t.slides.includes(s))return;o=s;const a=t.slides.indexOf(s)===t.activeIndex,i=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(s);a||i||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,requestAnimationFrame(()=>{l||(t.params.loop?t.slideToLoop(t.getSlideIndexWhenGrid(parseInt(s.getAttribute("data-swiper-slide-index"))),0):t.slideTo(t.getSlideIndexWhenGrid(t.slides.indexOf(s)),0),l=!1)}))},P=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&f(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&h(t.slides,e.slideRole);const s=t.slides.length;e.slideLabelMessage&&t.slides.forEach((a,i)=>{const r=t.params.loop?parseInt(a.getAttribute("data-swiper-slide-index"),10):i;g(a,e.slideLabelMessage.replace(/\{\{index\}\}/,r+1).replace(/\{\{slidesLength\}\}/,s))})},L=()=>{const e=t.params.a11y;t.el.append(d);const s=t.el;e.containerRoleDescriptionMessage&&f(s,e.containerRoleDescriptionMessage),e.containerMessage&&g(s,e.containerMessage),e.containerRole&&h(s,e.containerRole);const i=t.wrapperEl,n=e.id||i.getAttribute("id")||`swiper-wrapper-${l=16,void 0===l&&(l=16),"x".repeat(l).replace(/x/g,()=>Math.round(16*Math.random()).toString(16))}`;var l;const o=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var c,p;c=i,p=n,(c=(0,r.m)(c)).forEach(e=>{e.setAttribute("id",p)}),function(e,t){(e=(0,r.m)(e)).forEach(e=>{e.setAttribute("aria-live",t)})}(i,o),P();let{nextEl:u,prevEl:m}=t.navigation?t.navigation:{};if(u=(0,r.m)(u),m=(0,r.m)(m),u&&u.forEach(t=>x(t,n,e.nextSlideMessage)),m&&m.forEach(t=>x(t,n,e.prevSlideMessage)),E()){(0,r.m)(t.pagination.el).forEach(e=>{e.addEventListener("keydown",b)})}(0,a.g)().addEventListener("visibilitychange",M),t.el.addEventListener("focus",C,!0),t.el.addEventListener("focus",C,!0),t.el.addEventListener("pointerdown",S,!0),t.el.addEventListener("pointerup",T,!0)};n("beforeInit",()=>{d=(0,r.c)("span",t.params.a11y.notificationClass),d.setAttribute("aria-live","assertive"),d.setAttribute("aria-atomic","true")}),n("afterInit",()=>{t.params.a11y.enabled&&L()}),n("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{t.params.a11y.enabled&&P()}),n("fromEdge toEdge afterInit lock unlock",()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:s}=t.navigation;s&&(t.isBeginning?(v(s),m(s)):(w(s),u(s))),e&&(t.isEnd?(v(e),m(e)):(w(e),u(e)))}()}),n("paginationUpdate",()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;y()&&t.pagination.bullets.forEach(s=>{t.params.pagination.clickable&&(u(s),t.params.pagination.renderBullet||(h(s,"button"),g(s,e.paginationBulletMessage.replace(/\{\{index\}\}/,(0,r.i)(s)+1)))),s.matches((0,i.c)(t.params.pagination.bulletActiveClass))?s.setAttribute("aria-current","true"):s.removeAttribute("aria-current")})}()}),n("destroy",()=>{t.params.a11y.enabled&&function(){d&&d.remove();let{nextEl:e,prevEl:s}=t.navigation?t.navigation:{};e=(0,r.m)(e),s=(0,r.m)(s),e&&e.forEach(e=>e.removeEventListener("keydown",b)),s&&s.forEach(e=>e.removeEventListener("keydown",b)),E()&&(0,r.m)(t.pagination.el).forEach(e=>{e.removeEventListener("keydown",b)});(0,a.g)().removeEventListener("visibilitychange",M),t.el&&"string"!=typeof t.el&&(t.el.removeEventListener("focus",C,!0),t.el.removeEventListener("pointerdown",S,!0),t.el.removeEventListener("pointerup",T,!0))}()})}},141:(e,t,s)=>{s.d(t,{S:()=>X});var a=s(645),i=s(774);let r,n,l;function o(){return r||(r=function(){const e=(0,a.a)(),t=(0,a.g)();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),r}function d(e){return void 0===e&&(e={}),n||(n=function(e){let{userAgent:t}=void 0===e?{}:e;const s=o(),i=(0,a.a)(),r=i.navigator.platform,n=t||i.navigator.userAgent,l={ios:!1,android:!1},d=i.screen.width,c=i.screen.height,p=n.match(/(Android);?[\s\/]+([\d.]+)?/);let u=n.match(/(iPad).*OS\s([\d_]+)/);const m=n.match(/(iPod)(.*OS\s([\d_]+))?/),h=!u&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f="Win32"===r;let g="MacIntel"===r;return!u&&g&&s.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${d}x${c}`)>=0&&(u=n.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),g=!1),p&&!f&&(l.os="android",l.android=!0),(u||h||m)&&(l.os="ios",l.ios=!0),l}(e)),n}function c(){return l||(l=function(){const e=(0,a.a)(),t=d();let s=!1;function i(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,a]=t.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e));s=e<16||16===e&&a<2}}const r=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),n=i();return{isSafari:s||n,needPerspectiveFix:s,need3dFix:n||r&&t.ios,isWebView:r}}()),l}var p={on(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;const i=s?"unshift":"push";return e.split(" ").forEach(e=>{a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][i](t)}),a},once(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;function i(){a.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var s=arguments.length,r=new Array(s),n=0;n=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&s.eventsListeners[e].splice(i,1)})}),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,a;for(var i=arguments.length,r=new Array(i),n=0;n{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(a,[t,...s])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(e=>{e.apply(a,s)})}),e}};const u=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};const m=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};const h=(e,t)=>{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(s.shadowRoot?t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{s.shadowRoot&&(t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())})),t&&t.remove()}},f=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},g=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const a="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,r=[s-t];return r.push(...Array.from({length:t}).map((e,t)=>s+a+t)),void e.slides.forEach((t,s)=>{r.includes(t.column)&&f(e,s)})}const r=i+a-1;if(e.params.rewind||e.params.loop)for(let a=i-t;a<=r+t;a+=1){const t=(a%s+s)%s;(tr)&&f(e,t)}else for(let a=Math.max(i-t,0);a<=Math.min(r+t,s-1);a+=1)a!==i&&(a>r||a=0?y=parseFloat(y.replace("%",""))/100*n:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,p.forEach(e=>{l?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),s.centeredSlides&&s.cssMode&&((0,i.a)(a,"--swiper-centered-offset-before",""),(0,i.a)(a,"--swiper-centered-offset-after",""));const T=s.grid&&s.grid.rows>1&&e.grid;let M;T?e.grid.initSlides(p):e.grid&&e.grid.unsetSlides();const C="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter(e=>void 0!==s.breakpoints[e].slidesPerView).length>0;for(let a=0;a1&&m.push(e.virtualSize-n)}if(d&&s.loop){const t=f[0]+y;if(s.slidesPerGroup>1){const a=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/s.slidesPerGroup),i=t*s.slidesPerGroup;for(let e=0;e!(s.cssMode&&!s.loop)||t!==p.length-1).forEach(e=>{e.style[t]=`${y}px`})}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;f.forEach(t=>{e+=t+(y||0)}),e-=y;const t=e>n?e-n:0;m=m.map(e=>e<=0?-g:e>t?t+v:e)}if(s.centerInsufficientSlides){let e=0;f.forEach(t=>{e+=t+(y||0)}),e-=y;const t=(s.slidesOffsetBefore||0)+(s.slidesOffsetAfter||0);if(e+t{m[t]=e-s}),h.forEach((e,t)=>{h[t]=e+s})}}if(Object.assign(e,{slides:p,snapGrid:m,slidesGrid:h,slidesSizesGrid:f}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){(0,i.a)(a,"--swiper-centered-offset-before",-m[0]+"px"),(0,i.a)(a,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+s)}if(u!==c&&e.emit("slidesLengthChange"),m.length!==w&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(d||s.cssMode||"slide"!==s.effect&&"fade"!==s.effect)){const t=`${s.containerModifierClass}backface-hidden`,a=e.el.classList.contains(t);u<=s.maxBackfaceHiddenSlides?a||e.el.classList.add(t):a&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],a=t.virtual&&t.params.virtual.enabled;let i,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const n=e=>a?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{s.push(e)});else for(i=0;it.slides.length&&!a)break;s.push(n(e))}else s.push(n(t.activeIndex));for(i=0;ir?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let a=0;a=0?l=parseFloat(l.replace("%",""))/100*t.size:"string"==typeof l&&(l=parseFloat(l));for(let e=0;e=0&&m<=t.size-t.slidesSizesGrid[e],g=m>=0&&m1&&h<=t.size||m<=0&&h>=t.size;g&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(e)),u(o,g,s.slideVisibleClass),u(o,f,s.slideFullyVisibleClass),o.progress=i?-c:c,o.originalProgress=i?-p:p}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,a=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:r,isEnd:n,progressLoop:l}=t;const o=r,d=n;if(0===a)i=0,r=!0,n=!0;else{i=(e-t.minTranslate())/a;const s=Math.abs(e-t.minTranslate())<1,l=Math.abs(e-t.maxTranslate())<1;r=s||i<=0,n=l||i>=1,s&&(i=0),l&&(i=1)}if(s.loop){const s=t.getSlideIndexByData(0),a=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[s],r=t.slidesGrid[a],n=t.slidesGrid[t.slidesGrid.length-1],o=Math.abs(e);l=o>=i?(o-i)/n:(o+n-r)/n,l>1&&(l-=1)}Object.assign(t,{progress:i,progressLoop:l,isBeginning:r,isEnd:n}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!d&&t.emit("reachEnd toEdge"),(o&&!r||d&&!n)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:a,activeIndex:r}=e,n=e.virtual&&s.virtual.enabled,l=e.grid&&s.grid&&s.grid.rows>1,o=e=>(0,i.e)(a,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let d,c,p;if(n)if(s.loop){let t=r-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),d=o(`[data-swiper-slide-index="${t}"]`)}else d=o(`[data-swiper-slide-index="${r}"]`);else l?(d=t.find(e=>e.column===r),p=t.find(e=>e.column===r+1),c=t.find(e=>e.column===r-1)):d=t[r];d&&(l||(p=(0,i.r)(d,`.${s.slideClass}, swiper-slide`)[0],s.loop&&!p&&(p=t[0]),c=(0,i.t)(d,`.${s.slideClass}, swiper-slide`)[0],s.loop&&0===!c&&(c=t[t.length-1]))),t.forEach(e=>{m(e,e===d,s.slideActiveClass),m(e,e===p,s.slideNextClass),m(e,e===c,s.slidePrevClass)}),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:a,params:i,activeIndex:r,realIndex:n,snapIndex:l}=t;let o,d=e;const c=e=>{let s=e-t.virtual.slidesBefore;return s<0&&(s=t.virtual.slides.length+s),s>=t.virtual.slides.length&&(s-=t.virtual.slides.length),s};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:s}=e,a=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e=t[e]&&a=t[e]&&a=t[e]&&(i=e);return s.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(t)),a.indexOf(s)>=0)o=a.indexOf(s);else{const e=Math.min(i.slidesPerGroupSkip,d);o=e+Math.floor((d-e)/i.slidesPerGroup)}if(o>=a.length&&(o=a.length-1),d===r&&!t.params.loop)return void(o!==l&&(t.snapIndex=o,t.emit("snapIndexChange")));if(d===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=c(d));const p=t.grid&&i.grid&&i.grid.rows>1;let u;if(t.virtual&&i.virtual.enabled&&i.loop)u=c(d);else if(p){const e=t.slides.find(e=>e.column===d);let s=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(s)&&(s=Math.max(t.slides.indexOf(e),0)),u=Math.floor(s/i.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");u=e?parseInt(e,10):d}else u=d;Object.assign(t,{previousSnapIndex:l,snapIndex:o,previousRealIndex:n,realIndex:u,previousIndex:r,activeIndex:d}),t.initialized&&g(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(n!==u&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const s=this,a=s.params;let i=e.closest(`.${a.slideClass}, swiper-slide`);!i&&s.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!i&&e.matches&&e.matches(`.${a.slideClass}, swiper-slide`)&&(i=e)});let r,n=!1;if(i)for(let e=0;ed?d:a&&en?"next":r=d.length&&(w=d.length-1);const b=-d[w];if(o.normalizeSlideIndex)for(let e=0;e=s&&t=s&&t=s&&(l=e)}if(n.initialized&&l!==m){if(!n.allowSlideNext&&(h?b>n.translate&&b>n.minTranslate():bn.translate&&b>n.maxTranslate()&&(m||0)!==l)return!1}let y;l!==(u||0)&&s&&n.emit("beforeSlideChangeStart"),n.updateProgress(b),y=l>m?"next":l0?(n._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{f[e?"scrollLeft":"scrollTop"]=s})):f[e?"scrollLeft":"scrollTop"]=s,E&&requestAnimationFrame(()=>{n.wrapperEl.style.scrollSnapType="",n._immediateVirtual=!1});else{if(!n.support.smoothScroll)return(0,i.u)({swiper:n,targetPosition:s,side:e?"left":"top"}),!0;f.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}const x=c().isSafari;return E&&!r&&x&&n.isElement&&n.virtual.update(!1,!1,l),n.setTransition(t),n.setTranslate(b),n.updateActiveIndex(l),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,a),n.transitionStart(s,y),0===t?n.transitionEnd(s,y):n.animating||(n.animating=!0,n.onSlideToWrapperTransitionEnd||(n.onSlideToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.wrapperEl.removeEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.onSlideToWrapperTransitionEnd=null,delete n.onSlideToWrapperTransitionEnd,n.transitionEnd(s,y))}),n.wrapperEl.addEventListener("transitionend",n.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,a){if(void 0===e&&(e=0),void 0===s&&(s=!0),"string"==typeof e){e=parseInt(e,10)}const i=this;if(i.destroyed)return;void 0===t&&(t=i.params.speed);const r=i.grid&&i.params.grid&&i.params.grid.rows>1;let n=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)n+=i.virtual.slidesBefore;else{let e;if(r){const t=n*i.params.grid.rows;e=i.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===t).column}else e=i.getSlideIndexByData(n);const t=r?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:s}=i.params;let l=i.params.slidesPerView;"auto"===l?l=i.slidesPerViewDynamic():(l=Math.ceil(parseFloat(i.params.slidesPerView,10)),s&&l%2==0&&(l+=1));let o=t-e1*t.getAttribute("data-swiper-slide-index")===e).column}else n=i.getSlideIndexByData(n)}return requestAnimationFrame(()=>{i.slideTo(n,t,s,a)}),i},slideNext:function(e,t,s){void 0===t&&(t=!0);const a=this,{enabled:i,params:r,animating:n}=a;if(!i||a.destroyed)return a;void 0===e&&(e=a.params.speed);let l=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(l=Math.max(a.slidesPerViewDynamic("current",!0),1));const o=a.activeIndex{a.slideTo(a.activeIndex+o,e,t,s)}),!0}return r.rewind&&a.isEnd?a.slideTo(0,e,t,s):a.slideTo(a.activeIndex+o,e,t,s)},slidePrev:function(e,t,s){void 0===t&&(t=!0);const a=this,{params:i,snapGrid:r,slidesGrid:n,rtlTranslate:l,enabled:o,animating:d}=a;if(!o||a.destroyed)return a;void 0===e&&(e=a.params.speed);const c=a.virtual&&i.virtual.enabled;if(i.loop){if(d&&!c&&i.loopPreventsSliding)return!1;a.loopFix({direction:"prev"}),a._clientLeft=a.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const u=p(l?a.translate:-a.translate),m=r.map(e=>p(e)),h=i.freeMode&&i.freeMode.enabled;let f=r[m.indexOf(u)-1];if(void 0===f&&(i.cssMode||h)){let e;r.forEach((t,s)=>{u>=t&&(e=s)}),void 0!==e&&(f=h?r[e]:r[e>0?e-1:e])}let g=0;if(void 0!==f&&(g=n.indexOf(f),g<0&&(g=a.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(g=g-a.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),i.rewind&&a.isBeginning){const i=a.params.virtual&&a.params.virtual.enabled&&a.virtual?a.virtual.slides.length-1:a.slides.length-1;return a.slideTo(i,e,t,s)}return i.loop&&0===a.activeIndex&&i.cssMode?(requestAnimationFrame(()=>{a.slideTo(g,e,t,s)}),!0):a.slideTo(g,e,t,s)},slideReset:function(e,t,s){void 0===t&&(t=!0);const a=this;if(!a.destroyed)return void 0===e&&(e=a.params.speed),a.slideTo(a.activeIndex,e,t,s)},slideToClosest:function(e,t,s,a){void 0===t&&(t=!0),void 0===a&&(a=.5);const i=this;if(i.destroyed)return;void 0===e&&(e=i.params.speed);let r=i.activeIndex;const n=Math.min(i.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/i.params.slidesPerGroup),o=i.rtlTranslate?i.translate:-i.translate;if(o>=i.snapGrid[l]){const e=i.snapGrid[l];o-e>(i.snapGrid[l+1]-e)*a&&(r+=i.params.slidesPerGroup)}else{const e=i.snapGrid[l-1];o-e<=(i.snapGrid[l]-e)*a&&(r-=i.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,i.slidesGrid.length-1),i.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:s}=e,a="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let r,n=e.getSlideIndexWhenGrid(e.clickedIndex);const l=e.isElement?"swiper-slide":`.${t.slideClass}`,o=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;r=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(r):n>(o?(e.slides.length-a)/2-(e.params.grid.rows-1):e.slides.length-a)?(e.loopFix(),n=e.getSlideIndex((0,i.e)(s,`${l}[data-swiper-slide-index="${r}"]`)[0]),(0,i.n)(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}};var E={loopCreate:function(e,t){const s=this,{params:a,slidesEl:r}=s;if(!a.loop||s.virtual&&s.params.virtual.enabled)return;const n=()=>{(0,i.e)(r,`.${a.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},l=s.grid&&a.grid&&a.grid.rows>1;a.loopAddBlankSlides&&(a.slidesPerGroup>1||l)&&(()=>{const e=(0,i.e)(r,`.${a.slideBlankClass}`);e.forEach(e=>{e.remove()}),e.length>0&&(s.recalcSlides(),s.updateSlides())})();const o=a.slidesPerGroup*(l?a.grid.rows:1),d=s.slides.length%o!==0,c=l&&s.slides.length%a.grid.rows!==0,p=e=>{for(let t=0;t1;p.lengthe.classList.contains(f.slideActiveClass))):C=n;const P="next"===a||!a,L="prev"===a||!a;let A=0,I=0;const z=(E?p[n].column:n)+(g&&void 0===r?-w/2+.5:0);if(z=0;t-=1)p[t].column===e&&x.push(t)}else x.push(T-t-1)}}else if(z+w>T-y){I=Math.max(z-(T-2*y),b),M&&(I=Math.max(I,w-T+v+1));for(let e=0;e{e.column===t&&S.push(s)}):S.push(t)}}if(c.__preventObserver__=!0,requestAnimationFrame(()=>{c.__preventObserver__=!1}),"cards"===c.params.effect&&p.length{p[e].swiperLoopMoveDOM=!0,h.prepend(p[e]),p[e].swiperLoopMoveDOM=!1}),P&&S.forEach(e=>{p[e].swiperLoopMoveDOM=!0,h.append(p[e]),p[e].swiperLoopMoveDOM=!1}),c.recalcSlides(),"auto"===f.slidesPerView?c.updateSlides():E&&(x.length>0&&L||S.length>0&&P)&&c.slides.forEach((e,t)=>{c.grid.updateSlide(t,e,c.slides)}),f.watchSlidesProgress&&c.updateSlidesOffset(),s)if(x.length>0&&L){if(void 0===t){const e=c.slidesGrid[C],t=c.slidesGrid[C+A]-e;d?c.setTranslate(c.translate-t):(c.slideTo(C+Math.ceil(A),0,!1,!0),r&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else if(r){const e=E?x.length/f.grid.rows:x.length;c.slideTo(c.activeIndex+e,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(S.length>0&&P)if(void 0===t){const e=c.slidesGrid[C],t=c.slidesGrid[C-I]-e;d?c.setTranslate(c.translate-t):(c.slideTo(C-I,0,!1,!0),r&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else{const e=E?S.length/f.grid.rows:S.length;c.slideTo(c.activeIndex-e,0,!1,!0)}if(c.allowSlidePrev=u,c.allowSlideNext=m,c.controller&&c.controller.control&&!o){const e={slideRealIndex:t,direction:a,setTranslate:r,activeSlideIndex:n,byController:!0};Array.isArray(c.controller.control)?c.controller.control.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&s})}):c.controller.control instanceof c.constructor&&c.controller.control.params.loop&&c.controller.control.loopFix({...e,slideTo:c.controller.control.params.slidesPerView===f.slidesPerView&&s})}c.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||!s||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const a=[];e.slides.forEach(e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;a[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),a.forEach(e=>{s.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function x(e,t,s){const i=(0,a.a)(),{params:r}=e,n=r.edgeSwipeDetection,l=r.edgeSwipeThreshold;return!n||!(s<=l||s>=i.innerWidth-l)||"prevent"===n&&(t.preventDefault(),!0)}function S(e){const t=this,s=(0,a.g)();let r=e;r.originalEvent&&(r=r.originalEvent);const n=t.touchEventsData;if("pointerdown"===r.type){if(null!==n.pointerId&&n.pointerId!==r.pointerId)return;n.pointerId=r.pointerId}else"touchstart"===r.type&&1===r.targetTouches.length&&(n.touchId=r.targetTouches[0].identifier);if("touchstart"===r.type)return void x(t,r,r.targetTouches[0].pageX);const{params:l,touches:o,enabled:d}=t;if(!d)return;if(!l.simulateTouch&&"mouse"===r.pointerType)return;if(t.animating&&l.preventInteractionOnTransition)return;!t.animating&&l.cssMode&&l.loop&&t.loopFix();let c=r.target;if("wrapper"===l.touchEventsTarget&&!(0,i.w)(c,t.wrapperEl))return;if("which"in r&&3===r.which)return;if("button"in r&&r.button>0)return;if(n.isTouched&&n.isMoved)return;const p=!!l.noSwipingClass&&""!==l.noSwipingClass,u=r.composedPath?r.composedPath():r.path;p&&r.target&&r.target.shadowRoot&&u&&(c=u[0]);const m=l.noSwipingSelector?l.noSwipingSelector:`.${l.noSwipingClass}`,h=!(!r.target||!r.target.shadowRoot);if(l.noSwiping&&(h?function(e,t){return void 0===t&&(t=this),function t(s){if(!s||s===(0,a.g)()||s===(0,a.a)())return null;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(e);return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(m,c):c.closest(m)))return void(t.allowClick=!0);if(l.swipeHandler&&!c.closest(l.swipeHandler))return;o.currentX=r.pageX,o.currentY=r.pageY;const f=o.currentX,g=o.currentY;if(!x(t,r,f))return;Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=f,o.startY=g,n.touchStartTime=(0,i.f)(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,l.threshold>0&&(n.allowThresholdMove=!1);let v=!0;c.matches(n.focusableElements)&&(v=!1,"SELECT"===c.nodeName&&(n.isTouched=!1)),s.activeElement&&s.activeElement.matches(n.focusableElements)&&s.activeElement!==c&&("mouse"===r.pointerType||"mouse"!==r.pointerType&&!c.matches(n.focusableElements))&&s.activeElement.blur();const w=v&&t.allowTouchMove&&l.touchStartPreventDefault;!l.touchStartForcePreventDefault&&!w||c.isContentEditable||r.preventDefault(),l.freeMode&&l.freeMode.enabled&&t.freeMode&&t.animating&&!l.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function T(e){const t=(0,a.g)(),s=this,r=s.touchEventsData,{params:n,touches:l,rtlTranslate:o,enabled:d}=s;if(!d)return;if(!n.simulateTouch&&"mouse"===e.pointerType)return;let c,p=e;if(p.originalEvent&&(p=p.originalEvent),"pointermove"===p.type){if(null!==r.touchId)return;if(p.pointerId!==r.pointerId)return}if("touchmove"===p.type){if(c=[...p.changedTouches].find(e=>e.identifier===r.touchId),!c||c.identifier!==r.touchId)return}else c=p;if(!r.isTouched)return void(r.startMoving&&r.isScrolling&&s.emit("touchMoveOpposite",p));const u=c.pageX,m=c.pageY;if(p.preventedByNestedSwiper)return l.startX=u,void(l.startY=m);if(!s.allowTouchMove)return p.target.matches(r.focusableElements)||(s.allowClick=!1),void(r.isTouched&&(Object.assign(l,{startX:u,startY:m,currentX:u,currentY:m}),r.touchStartTime=(0,i.f)()));if(n.touchReleaseOnEdges&&!n.loop)if(s.isVertical()){if(ml.startY&&s.translate>=s.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else{if(o&&(u>l.startX&&-s.translate<=s.maxTranslate()||u=s.minTranslate()))return;if(!o&&(ul.startX&&s.translate>=s.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==p.target&&"mouse"!==p.pointerType&&t.activeElement.blur(),t.activeElement&&p.target===t.activeElement&&p.target.matches(r.focusableElements))return r.isMoved=!0,void(s.allowClick=!1);r.allowTouchCallbacks&&s.emit("touchMove",p),l.previousX=l.currentX,l.previousY=l.currentY,l.currentX=u,l.currentY=m;const h=l.currentX-l.startX,f=l.currentY-l.startY;if(s.params.threshold&&Math.sqrt(h**2+f**2)=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(h))/Math.PI,r.isScrolling=s.isHorizontal()?e>n.touchAngle:90-e>n.touchAngle)}if(r.isScrolling&&s.emit("touchMoveOpposite",p),void 0===r.startMoving&&(l.currentX===l.startX&&l.currentY===l.startY||(r.startMoving=!0)),r.isScrolling||"touchmove"===p.type&&r.preventTouchMoveFromPointerMove)return void(r.isTouched=!1);if(!r.startMoving)return;s.allowClick=!1,!n.cssMode&&p.cancelable&&p.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&p.stopPropagation();let g=s.isHorizontal()?h:f,v=s.isHorizontal()?l.currentX-l.previousX:l.currentY-l.previousY;n.oneWayMovement&&(g=Math.abs(g)*(o?1:-1),v=Math.abs(v)*(o?1:-1)),l.diff=g,g*=n.touchRatio,o&&(g=-g,v=-v);const w=s.touchesDirection;s.swipeDirection=g>0?"prev":"next",s.touchesDirection=v>0?"prev":"next";const b=s.params.loop&&!n.cssMode,y="next"===s.touchesDirection&&s.allowSlideNext||"prev"===s.touchesDirection&&s.allowSlidePrev;if(!r.isMoved){if(b&&y&&s.loopFix({direction:s.swipeDirection}),r.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});s.wrapperEl.dispatchEvent(e)}r.allowMomentumBounce=!1,!n.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",p)}if((new Date).getTime(),!1!==n._loopSwapReset&&r.isMoved&&r.allowThresholdMove&&w!==s.touchesDirection&&b&&y&&Math.abs(g)>=1)return Object.assign(l,{startX:u,startY:m,currentX:u,currentY:m,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,void(r.startTranslate=r.currentTranslate);s.emit("sliderMove",p),r.isMoved=!0,r.currentTranslate=g+r.startTranslate;let E=!0,x=n.resistanceRatio;if(n.touchReleaseOnEdges&&(x=0),g>0?(b&&y&&r.allowThresholdMove&&r.currentTranslate>(n.centeredSlides?s.minTranslate()-s.slidesSizesGrid[s.activeIndex+1]-("auto"!==n.slidesPerView&&s.slides.length-n.slidesPerView>=2?s.slidesSizesGrid[s.activeIndex+1]+s.params.spaceBetween:0)-s.params.spaceBetween:s.minTranslate())&&s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>s.minTranslate()&&(E=!1,n.resistance&&(r.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+r.startTranslate+g)**x))):g<0&&(b&&y&&r.allowThresholdMove&&r.currentTranslate<(n.centeredSlides?s.maxTranslate()+s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween+("auto"!==n.slidesPerView&&s.slides.length-n.slidesPerView>=2?s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween:0):s.maxTranslate())&&s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===n.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(n.slidesPerView,10)))}),r.currentTranslater.startTranslate&&(r.currentTranslate=r.startTranslate),s.allowSlidePrev||s.allowSlideNext||(r.currentTranslate=r.startTranslate),n.threshold>0){if(!(Math.abs(g)>n.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,l.startX=l.currentX,l.startY=l.currentY,r.currentTranslate=r.startTranslate,void(l.diff=s.isHorizontal()?l.currentX-l.startX:l.currentY-l.startY)}n.followFinger&&!n.cssMode&&((n.freeMode&&n.freeMode.enabled&&s.freeMode||n.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(r.currentTranslate),s.setTranslate(r.currentTranslate))}function M(e){const t=this,s=t.touchEventsData;let a,r=e;r.originalEvent&&(r=r.originalEvent);if("touchend"===r.type||"touchcancel"===r.type){if(a=[...r.changedTouches].find(e=>e.identifier===s.touchId),!a||a.identifier!==s.touchId)return}else{if(null!==s.touchId)return;if(r.pointerId!==s.pointerId)return;a=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)){if(!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return}s.pointerId=null,s.touchId=null;const{params:n,touches:l,rtlTranslate:o,slidesGrid:d,enabled:c}=t;if(!c)return;if(!n.simulateTouch&&"mouse"===r.pointerType)return;if(s.allowTouchCallbacks&&t.emit("touchEnd",r),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&n.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);n.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const p=(0,i.f)(),u=p-s.touchStartTime;if(t.allowClick){const e=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(e&&e[0]||r.target,e),t.emit("tap click",r),u<300&&p-s.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(s.lastClickTime=(0,i.f)(),(0,i.n)(()=>{t.destroyed||(t.allowClick=!0)}),!s.isTouched||!s.isMoved||!t.swipeDirection||0===l.diff&&!s.loopSwapReset||s.currentTranslate===s.startTranslate&&!s.loopSwapReset)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let m;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,m=n.followFinger?o?t.translate:-t.translate:-s.currentTranslate,n.cssMode)return;if(n.freeMode&&n.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:m});const h=m>=-t.maxTranslate()&&!t.params.loop;let f=0,g=t.slidesSizesGrid[0];for(let e=0;e=d[e]&&m=d[e])&&(f=e,g=d[d.length-1]-d[d.length-2])}let v=null,w=null;n.rewind&&(t.isBeginning?w=n.virtual&&n.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(v=0));const b=(m-d[f])/g,y=fn.longSwipesMs){if(!n.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(b>=n.longSwipesRatio?t.slideTo(n.rewind&&t.isEnd?v:f+y):t.slideTo(f)),"prev"===t.swipeDirection&&(b>1-n.longSwipesRatio?t.slideTo(f+y):null!==w&&b<0&&Math.abs(b)>n.longSwipesRatio?t.slideTo(w):t.slideTo(f))}else{if(!n.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(f+y):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==v?v:f+y),"prev"===t.swipeDirection&&t.slideTo(null!==w?w:f))}}function C(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:a,allowSlidePrev:i,snapGrid:r}=e,n=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=n&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l?e.params.loop&&!n?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=a,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function P(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function L(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:a}=e;if(!a)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();i=0===r?0:(e.translate-e.minTranslate())/r,i!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function A(e){const t=this;h(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function I(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const z=(e,t)=>{const s=(0,a.g)(),{params:i,el:r,wrapperEl:n,device:l}=e,o=!!i.nested,d="on"===t?"addEventListener":"removeEventListener",c=t;r&&"string"!=typeof r&&(s[d]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:o}),r[d]("touchstart",e.onTouchStart,{passive:!1}),r[d]("pointerdown",e.onTouchStart,{passive:!1}),s[d]("touchmove",e.onTouchMove,{passive:!1,capture:o}),s[d]("pointermove",e.onTouchMove,{passive:!1,capture:o}),s[d]("touchend",e.onTouchEnd,{passive:!0}),s[d]("pointerup",e.onTouchEnd,{passive:!0}),s[d]("pointercancel",e.onTouchEnd,{passive:!0}),s[d]("touchcancel",e.onTouchEnd,{passive:!0}),s[d]("pointerout",e.onTouchEnd,{passive:!0}),s[d]("pointerleave",e.onTouchEnd,{passive:!0}),s[d]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&r[d]("click",e.onClick,!0),i.cssMode&&n[d]("scroll",e.onScroll),i.updateOnWindowResize?e[c](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",C,!0):e[c]("observerUpdate",C,!0),r[d]("load",e.onLoad,{capture:!0}))};const k=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var $={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function O(e,t){return function(s){void 0===s&&(s={});const a=Object.keys(s)[0],r=s[a];"object"==typeof r&&null!==r?(!0===e[a]&&(e[a]={enabled:!0}),"navigation"===a&&e[a]&&e[a].enabled&&!e[a].prevEl&&!e[a].nextEl&&(e[a].auto=!0),["pagination","scrollbar"].indexOf(a)>=0&&e[a]&&e[a].enabled&&!e[a].el&&(e[a].auto=!0),a in e&&"enabled"in r?("object"!=typeof e[a]||"enabled"in e[a]||(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),(0,i.x)(t,s)):(0,i.x)(t,s)):(0,i.x)(t,s)}}const D={eventsEmitter:p,update:v,translate:w,transition:{setTransition:function(e,t){const s=this;s.params.cssMode||(s.wrapperEl.style.transitionDuration=`${e}ms`,s.wrapperEl.style.transitionDelay=0===e?"0ms":""),s.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;a.cssMode||(a.autoHeight&&s.updateAutoHeight(),b({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;s.animating=!1,a.cssMode||(s.setTransition(0),b({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:y,loop:E,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),s.style.cursor="move",s.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=S.bind(e),e.onTouchMove=T.bind(e),e.onTouchEnd=M.bind(e),e.onDocumentTouchStart=I.bind(e),t.cssMode&&(e.onScroll=L.bind(e)),e.onClick=P.bind(e),e.onLoad=A.bind(e),z(e,"on")},detachEvents:function(){z(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:r,el:n}=e,l=r.breakpoints;if(!l||l&&0===Object.keys(l).length)return;const o=(0,a.g)(),d="window"!==r.breakpointsBase&&r.breakpointsBase?"container":r.breakpointsBase,c=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:o.querySelector(r.breakpointsBase),p=e.getBreakpoint(l,d,c);if(!p||e.currentBreakpoint===p)return;const u=(p in l?l[p]:void 0)||e.originalParams,m=k(e,r),h=k(e,u),f=e.params.grabCursor,g=u.grabCursor,v=r.enabled;m&&!h?(n.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!m&&h&&(n.classList.add(`${r.containerModifierClass}grid`),(u.grid.fill&&"column"===u.grid.fill||!u.grid.fill&&"column"===r.grid.fill)&&n.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),f&&!g?e.unsetGrabCursor():!f&&g&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0===u[t])return;const s=r[t]&&r[t].enabled,a=u[t]&&u[t].enabled;s&&!a&&e[t].disable(),!s&&a&&e[t].enable()});const w=u.direction&&u.direction!==r.direction,b=r.loop&&(u.slidesPerView!==r.slidesPerView||w),y=r.loop;w&&s&&e.changeDirection(),(0,i.x)(e.params,u);const E=e.params.enabled,x=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),v&&!E?e.disable():!v&&E&&e.enable(),e.currentBreakpoint=p,e.emit("_beforeBreakpoint",u),s&&(b?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&x?(e.loopCreate(t),e.updateSlides()):y&&!x&&e.loopDestroy()),e.emit("breakpoint",u)},getBreakpoint:function(e,t,s){if(void 0===t&&(t="window"),!e||"container"===t&&!s)return;let i=!1;const r=(0,a.a)(),n="window"===t?r.innerHeight:s.clientHeight,l=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:n*t,point:e}}return{value:e,point:e}});l.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let e=0;es}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:s,rtl:a,el:i,device:r}=e,n=function(e,t){const s=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(a=>{e[a]&&s.push(t+a)}):"string"==typeof e&&s.push(t+e)}),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:a},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...n),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},G={};class X{constructor(){let e,t;for(var s=arguments.length,r=new Array(s),n=0;n1){const e=[];return l.querySelectorAll(t.el).forEach(s=>{const a=(0,i.x)({},t,{el:s});e.push(new X(a))}),e}const p=this;p.__swiper__=!0,p.support=o(),p.device=d({userAgent:t.userAgent}),p.browser=c(),p.eventsListeners={},p.eventsAnyListeners=[],p.modules=[...p.__modules__],t.modules&&Array.isArray(t.modules)&&p.modules.push(...t.modules);const u={};p.modules.forEach(e=>{e({params:t,swiper:p,extendParams:O(t,u),on:p.on.bind(p),once:p.once.bind(p),off:p.off.bind(p),emit:p.emit.bind(p)})});const m=(0,i.x)({},$,u);return p.params=(0,i.x)({},m,G,t),p.originalParams=(0,i.x)({},p.params),p.passedParams=(0,i.x)({},t),p.params&&p.params.on&&Object.keys(p.params.on).forEach(e=>{p.on(e,p.params.on[e])}),p.params&&p.params.onAny&&p.onAny(p.params.onAny),Object.assign(p,{enabled:p.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===p.params.direction,isVertical:()=>"vertical"===p.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:p.params.allowSlideNext,allowSlidePrev:p.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:p.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:p.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),p.emit("_swiper"),p.params.init&&p.init(),p}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:s}=this,a=(0,i.e)(t,`.${s.slideClass}, swiper-slide`),r=(0,i.i)(a[0]);return(0,i.i)(e)-r}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=(0,i.e)(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const a=s.minTranslate(),i=(s.maxTranslate()-a)*e+a;s.translateTo(i,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(s=>{const a=e.getSlideClasses(s);t.push({slideEl:s,classNames:a}),e.emit("_slideClass",s,a)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:a,slidesGrid:i,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if("number"==typeof s.slidesPerView)return s.slidesPerView;if(s.centeredSlides){let e,t=a[l]?Math.ceil(a[l].swiperSlideSize):0;for(let s=l+1;sn&&(e=!0));for(let s=l-1;s>=0;s-=1)a[s]&&!e&&(t+=a[s].swiperSlideSize,o+=1,t>n&&(e=!0))}else if("current"===e)for(let e=l+1;e=0;e-=1){i[l]-i[e]{t.complete&&h(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),s.freeMode&&s.freeMode.enabled&&!s.cssMode)a(),s.autoHeight&&e.updateAutoHeight();else{if(("auto"===s.slidesPerView||s.slidesPerView>1)&&e.isEnd&&!s.centeredSlides){const t=e.virtual&&s.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||a()}s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const s=this,a=s.params.direction;return e||(e="horizontal"===a?"vertical":"horizontal"),e===a||"horizontal"!==e&&"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${a}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),s.emit("changeDirection"),t&&s.update()),s}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let s=e||t.params.el;if("string"==typeof s&&(s=document.querySelector(s)),!s)return!1;s.swiper=t,s.parentNode&&s.parentNode.host&&s.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const a=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let r=(()=>{if(s&&s.shadowRoot&&s.shadowRoot.querySelector){return s.shadowRoot.querySelector(a())}return(0,i.e)(s,a())[0]})();return!r&&t.params.createElements&&(r=(0,i.c)("div",t.params.wrapperClass),s.append(r),(0,i.e)(s,`.${t.params.slideClass}`).forEach(e=>{r.append(e)})),Object.assign(t,{el:s,wrapperEl:r,slidesEl:t.isElement&&!s.parentNode.host.slideSlots?s.parentNode.host:r,hostEl:t.isElement?s.parentNode.host:s,mounted:!0,rtl:"rtl"===s.dir.toLowerCase()||"rtl"===(0,i.q)(s,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===s.dir.toLowerCase()||"rtl"===(0,i.q)(s,"direction")),wrongRTL:"-webkit-box"===(0,i.q)(r,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach(e=>{e.complete?h(t,e):e.addEventListener("load",e=>{h(t,e.target)})}),g(t),t.initialized=!0,g(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const s=this,{params:a,el:r,wrapperEl:n,slides:l}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&&s.loopDestroy(),t&&(s.removeClasses(),r&&"string"!=typeof r&&r.removeAttribute("style"),n&&n.removeAttribute("style"),l&&l.length&&l.forEach(e=>{e.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),s.emit("destroy"),Object.keys(s.eventsListeners).forEach(e=>{s.off(e)}),!1!==e&&(s.el&&"string"!=typeof s.el&&(s.el.swiper=null),(0,i.y)(s)),s.destroyed=!0),null}static extendDefaults(e){(0,i.x)(G,e)}static get extendedDefaults(){return G}static get defaults(){return $}static installModule(e){X.prototype.__modules__||(X.prototype.__modules__=[]);const t=X.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>X.installModule(e)),X):(X.installModule(e),X)}}Object.keys(D).forEach(e=>{Object.keys(D[e]).forEach(t=>{X.prototype[t]=D[e][t]})}),X.use([function(e){let{swiper:t,on:s,emit:i}=e;const r=(0,a.a)();let n=null,l=null;const o=()=>{t&&!t.destroyed&&t.initialized&&(i("beforeResize"),i("resize"))},d=()=>{t&&!t.destroyed&&t.initialized&&i("orientationchange")};s("init",()=>{t.params.resizeObserver&&void 0!==r.ResizeObserver?t&&!t.destroyed&&t.initialized&&(n=new ResizeObserver(e=>{l=r.requestAnimationFrame(()=>{const{width:s,height:a}=t;let i=s,r=a;e.forEach(e=>{let{contentBoxSize:s,contentRect:a,target:n}=e;n&&n!==t.el||(i=a?a.width:(s[0]||s).inlineSize,r=a?a.height:(s[0]||s).blockSize)}),i===s&&r===a||o()})}),n.observe(t.el)):(r.addEventListener("resize",o),r.addEventListener("orientationchange",d))}),s("destroy",()=>{l&&r.cancelAnimationFrame(l),n&&n.unobserve&&t.el&&(n.unobserve(t.el),n=null),r.removeEventListener("resize",o),r.removeEventListener("orientationchange",d)})},function(e){let{swiper:t,extendParams:s,on:r,emit:n}=e;const l=[],o=(0,a.a)(),d=function(e,s){void 0===s&&(s={});const a=new(o.MutationObserver||o.WebkitMutationObserver)(e=>{if(t.__preventObserver__)return;if(1===e.length)return void n("observerUpdate",e[0]);const s=function(){n("observerUpdate",e[0])};o.requestAnimationFrame?o.requestAnimationFrame(s):o.setTimeout(s,0)});a.observe(e,{attributes:void 0===s.attributes||s.attributes,childList:t.isElement||(void 0===s.childList||s).childList,characterData:void 0===s.characterData||s.characterData}),l.push(a)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=(0,i.b)(t.hostEl);for(let t=0;t{l.forEach(e=>{e.disconnect()}),l.splice(0,l.length)})}])},148:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(412),i=s(663),r=s(222),n=s(902),l=s(774);function o(e){let{swiper:t,extendParams:s,on:o}=e;s({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}});(0,i.e)({effect:"cards",swiper:t,on:o,setTranslate:()=>{const{slides:e,activeIndex:s,rtlTranslate:i}=t,n=t.params.cardsEffect,{startTranslate:l,isTouched:o}=t.touchEventsData,d=i?-t.translate:t.translate;for(let c=0;c0&&m<1&&(o||t.params.cssMode)&&d-1&&(o||t.params.cssMode)&&d>l;if(x||S){const e=(1-Math.abs((Math.abs(m)-.5)/.5))**.5;b+=-28*m*e,w+=-.5*e,y+=96*e,g=-25*e*Math.abs(m)+"%"}if(f=m<0?`calc(${f}px ${i?"-":"+"} (${y*Math.abs(m)}%))`:m>0?`calc(${f}px ${i?"-":"+"} (-${y*Math.abs(m)}%))`:`${f}px`,!t.isHorizontal()){const e=g;g=f,f=e}const T=m<0?""+(1+(1-w)*m):""+(1-(1-w)*m),M=`\n translate3d(${f}, ${g}, ${v}px)\n rotateZ(${n.rotate?i?-b:b:0}deg)\n scale(${T})\n `;if(n.slideShadows){let e=p.querySelector(".swiper-slide-shadow");e||(e=(0,a.c)("cards",p)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(m)-.5)/.5,0),1))}p.style.zIndex=-Math.abs(Math.round(u))+e.length;(0,r.e)(n,p).style.transform=M}},setTransition:e=>{const s=t.slides.map(e=>(0,l.g)(e));s.forEach(t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach(t=>{t.style.transitionDuration=`${e}ms`})}),(0,n.e)({swiper:t,duration:e,transformElements:s})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:t.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!t.params.cssMode})})}},169:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(541),i=s(296),r=s(774);function n(e){let{swiper:t,extendParams:s,on:n,emit:l}=e;const o="swiper-pagination";let d;s({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${o}-bullet`,bulletActiveClass:`${o}-bullet-active`,modifierClass:`${o}-`,currentClass:`${o}-current`,totalClass:`${o}-total`,hiddenClass:`${o}-hidden`,progressbarFillClass:`${o}-progressbar-fill`,progressbarOppositeClass:`${o}-progressbar-opposite`,clickableClass:`${o}-clickable`,lockClass:`${o}-lock`,horizontalClass:`${o}-horizontal`,verticalClass:`${o}-vertical`,paginationDisabledClass:`${o}-disabled`}}),t.pagination={el:null,bullets:[]};let c=0;function p(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function u(e,s){const{bulletActiveClass:a}=t.params.pagination;e&&(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${a}-${s}`),(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&e.classList.add(`${a}-${s}-${s}`))}function m(e){const s=e.target.closest((0,a.c)(t.params.pagination.bulletClass));if(!s)return;e.preventDefault();const i=(0,r.i)(s)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===i)return;const e=(n=t.realIndex,l=i,o=t.slides.length,(l%=o)===1+(n%=o)?"next":l===n-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(i)}else t.slideTo(i);var n,l,o}function h(){const e=t.rtl,s=t.params.pagination;if(p())return;let i,n,o=t.pagination.el;o=(0,r.m)(o);const m=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,h=t.params.loop?Math.ceil(m/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(n=t.previousRealIndex||0,i=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(i=t.snapIndex,n=t.previousSnapIndex):(n=t.previousIndex||0,i=t.activeIndex||0),"bullets"===s.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let l,p,m;if(s.dynamicBullets&&(d=(0,r.h)(a[0],t.isHorizontal()?"width":"height",!0),o.forEach(e=>{e.style[t.isHorizontal()?"width":"height"]=d*(s.dynamicMainBullets+4)+"px"}),s.dynamicMainBullets>1&&void 0!==n&&(c+=i-(n||0),c>s.dynamicMainBullets-1?c=s.dynamicMainBullets-1:c<0&&(c=0)),l=Math.max(i-c,0),p=l+(Math.min(a.length,s.dynamicMainBullets)-1),m=(p+l)/2),a.forEach(e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${s.bulletActiveClass}${e}`)].map(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e).flat();e.classList.remove(...t)}),o.length>1)a.forEach(e=>{const a=(0,r.i)(e);a===i?e.classList.add(...s.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),s.dynamicBullets&&(a>=l&&a<=p&&e.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),a===l&&u(e,"prev"),a===p&&u(e,"next"))});else{const e=a[i];if(e&&e.classList.add(...s.bulletActiveClass.split(" ")),t.isElement&&a.forEach((e,t)=>{e.setAttribute("part",t===i?"bullet-active":"bullet")}),s.dynamicBullets){const e=a[l],t=a[p];for(let e=l;e<=p;e+=1)a[e]&&a[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));u(e,"prev"),u(t,"next")}}if(s.dynamicBullets){const i=Math.min(a.length,s.dynamicMainBullets+4),r=(d*i-d)/2-m*d,n=e?"right":"left";a.forEach(e=>{e.style[t.isHorizontal()?n:"top"]=`${r}px`})}}o.forEach((e,n)=>{if("fraction"===s.type&&(e.querySelectorAll((0,a.c)(s.currentClass)).forEach(e=>{e.textContent=s.formatFractionCurrent(i+1)}),e.querySelectorAll((0,a.c)(s.totalClass)).forEach(e=>{e.textContent=s.formatFractionTotal(h)})),"progressbar"===s.type){let r;r=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const n=(i+1)/h;let l=1,o=1;"horizontal"===r?l=n:o=n,e.querySelectorAll((0,a.c)(s.progressbarFillClass)).forEach(e=>{e.style.transform=`translate3d(0,0,0) scaleX(${l}) scaleY(${o})`,e.style.transitionDuration=`${t.params.speed}ms`})}"custom"===s.type&&s.renderCustom?((0,r.s)(e,s.renderCustom(t,i+1,h)),0===n&&l("paginationRender",e)):(0===n&&l("paginationRender",e),l("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass)})}function f(){const e=t.params.pagination;if(p())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let i=t.pagination.el;i=(0,r.m)(i);let n="";if("bullets"===e.type){let a=t.params.loop?Math.ceil(s/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&a>s&&(a=s);for(let s=0;s`}"fraction"===e.type&&(n=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):` / `),"progressbar"===e.type&&(n=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):``),t.pagination.bullets=[],i.forEach(s=>{"custom"!==e.type&&(0,r.s)(s,n||""),"bullets"===e.type&&t.pagination.bullets.push(...s.querySelectorAll((0,a.c)(e.bulletClass)))}),"custom"!==e.type&&l("paginationRender",i[0])}function g(){t.params.pagination=(0,i.c)(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s;"string"==typeof e.el&&t.isElement&&(s=t.el.querySelector(e.el)),s||"string"!=typeof e.el||(s=[...document.querySelectorAll(e.el)]),s||(s=e.el),s&&0!==s.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(s)&&s.length>1&&(s=[...t.el.querySelectorAll(e.el)],s.length>1&&(s=s.find(e=>(0,r.b)(e,".swiper")[0]===t.el))),Array.isArray(s)&&1===s.length&&(s=s[0]),Object.assign(t.pagination,{el:s}),s=(0,r.m)(s),s.forEach(s=>{"bullets"===e.type&&e.clickable&&s.classList.add(...(e.clickableClass||"").split(" ")),s.classList.add(e.modifierClass+e.type),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(s.classList.add(`${e.modifierClass}${e.type}-dynamic`),c=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&s.classList.add(e.progressbarOppositeClass),e.clickable&&s.addEventListener("click",m),t.enabled||s.classList.add(e.lockClass)}))}function v(){const e=t.params.pagination;if(p())return;let s=t.pagination.el;s&&(s=(0,r.m)(s),s.forEach(s=>{s.classList.remove(e.hiddenClass),s.classList.remove(e.modifierClass+e.type),s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(s.classList.remove(...(e.clickableClass||"").split(" ")),s.removeEventListener("click",m))})),t.pagination.bullets&&t.pagination.bullets.forEach(t=>t.classList.remove(...e.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:s}=t.pagination;s=(0,r.m)(s),s.forEach(s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)})}),n("init",()=>{!1===t.params.pagination.enabled?w():(g(),f(),h())}),n("activeIndexChange",()=>{void 0===t.snapIndex&&h()}),n("snapIndexChange",()=>{h()}),n("snapGridLengthChange",()=>{f(),h()}),n("destroy",()=>{v()}),n("enable disable",()=>{let{el:e}=t.pagination;e&&(e=(0,r.m)(e),e.forEach(e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass)))}),n("lock unlock",()=>{h()}),n("click",(e,s)=>{const a=s.target,i=(0,r.m)(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&i&&i.length>0&&!a.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&a===t.navigation.nextEl||t.navigation.prevEl&&a===t.navigation.prevEl))return;const e=i[0].classList.contains(t.params.pagination.hiddenClass);l(!0===e?"paginationShow":"paginationHide"),i.forEach(e=>e.classList.toggle(t.params.pagination.hiddenClass))}});const w=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=(0,r.m)(e),e.forEach(e=>e.classList.add(t.params.pagination.paginationDisabledClass))),v()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=(0,r.m)(e),e.forEach(e=>e.classList.remove(t.params.pagination.paginationDisabledClass))),g(),f(),h()},disable:w,render:f,update:h,init:g,destroy:v})}},198:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(645),i=s(774);function r(e){let t,{swiper:s,extendParams:r,on:n,emit:l}=e;r({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const o=(0,a.g)();s.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const d=o.createElement("div");function c(e,t){const a=s.params.virtual;if(a.cache&&s.virtual.cache[t])return s.virtual.cache[t];let r;return a.renderSlide?(r=a.renderSlide.call(s,e,t),"string"==typeof r&&((0,i.s)(d,r),r=d.children[0])):r=s.isElement?(0,i.c)("swiper-slide"):(0,i.c)("div",s.params.slideClass),r.setAttribute("data-swiper-slide-index",t),a.renderSlide||(0,i.s)(r,e),a.cache&&(s.virtual.cache[t]=r),r}function p(e,t,a){const{slidesPerView:r,slidesPerGroup:n,centeredSlides:o,loop:d,initialSlide:p}=s.params;if(t&&!d&&p>0)return;const{addSlidesBefore:u,addSlidesAfter:m}=s.params.virtual,{from:h,to:f,slides:g,slidesGrid:v,offset:w}=s.virtual;s.params.cssMode||s.updateActiveIndex();const b=void 0===a?s.activeIndex||0:a;let y,E,x;y=s.rtlTranslate?"right":s.isHorizontal()?"left":"top",o?(E=Math.floor(r/2)+n+m,x=Math.floor(r/2)+n+u):(E=r+(n-1)+m,x=(d?r:n)+u);let S=b-x,T=b+E;d||(S=Math.max(S,0),T=Math.min(T,g.length-1));let M=(s.slidesGrid[S]||0)-(s.slidesGrid[0]||0);function C(){s.updateSlides(),s.updateProgress(),s.updateSlidesClasses(),l("virtualUpdate")}if(d&&b>=x?(S-=x,o||(M+=s.slidesGrid[0])):d&&b{e.style[y]=M-Math.abs(s.cssOverflowAdjustment())+"px"}),s.updateProgress(),void l("virtualUpdate");if(s.params.virtual.renderExternal)return s.params.virtual.renderExternal.call(s,{offset:M,from:S,to:T,slides:function(){const e=[];for(let t=S;t<=T;t+=1)e.push(g[t]);return e}()}),void(s.params.virtual.renderExternalUpdate?C():l("virtualUpdate"));const P=[],L=[],A=e=>{let t=e;return e<0?t=g.length+e:t>=g.length&&(t-=g.length),t};if(e)s.slides.filter(e=>e.matches(`.${s.params.slideClass}, swiper-slide`)).forEach(e=>{e.remove()});else for(let e=h;e<=f;e+=1)if(eT){const t=A(e);s.slides.filter(e=>e.matches(`.${s.params.slideClass}[data-swiper-slide-index="${t}"], swiper-slide[data-swiper-slide-index="${t}"]`)).forEach(e=>{e.remove()})}const I=d?-g.length:0,z=d?2*g.length:g.length;for(let t=I;t=S&&t<=T){const s=A(t);void 0===f||e?L.push(s):(t>f&&L.push(s),t{s.slidesEl.append(c(g[e],e))}),d)for(let e=P.length-1;e>=0;e-=1){const t=P[e];s.slidesEl.prepend(c(g[t],t))}else P.sort((e,t)=>t-e),P.forEach(e=>{s.slidesEl.prepend(c(g[e],e))});(0,i.e)(s.slidesEl,".swiper-slide, swiper-slide").forEach(e=>{e.style[y]=M-Math.abs(s.cssOverflowAdjustment())+"px"}),C()}n("beforeInit",()=>{if(!s.params.virtual.enabled)return;let e;if(void 0===s.passedParams.virtual.slides){const t=[...s.slidesEl.children].filter(e=>e.matches(`.${s.params.slideClass}, swiper-slide`));t&&t.length&&(s.virtual.slides=[...t],e=!0,t.forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t),s.virtual.cache[t]=e,e.remove()}))}e||(s.virtual.slides=s.params.virtual.slides),s.classNames.push(`${s.params.containerModifierClass}virtual`),s.params.watchSlidesProgress=!0,s.originalParams.watchSlidesProgress=!0,p(!1,!0)}),n("setTranslate",()=>{s.params.virtual.enabled&&(s.params.cssMode&&!s._immediateVirtual?(clearTimeout(t),t=setTimeout(()=>{p()},100)):p())}),n("init update resize",()=>{s.params.virtual.enabled&&s.params.cssMode&&(0,i.a)(s.wrapperEl,"--swiper-virtual-size",`${s.virtualSize}px`)}),Object.assign(s.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let t=0;t{const a=e[s],r=a.getAttribute("data-swiper-slide-index");r&&a.setAttribute("data-swiper-slide-index",parseInt(r,10)+i),t[parseInt(s,10)+i]=a}),s.virtual.cache=t}p(!0),s.slideTo(a,0)},removeSlide:function(e){if(null==e)return;let t=s.activeIndex;if(Array.isArray(e))for(let a=e.length-1;a>=0;a-=1)s.params.virtual.cache&&(delete s.virtual.cache[e[a]],Object.keys(s.virtual.cache).forEach(t=>{t>e&&(s.virtual.cache[t-1]=s.virtual.cache[t],s.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete s.virtual.cache[t])})),s.virtual.slides.splice(e[a],1),e[a]{t>e&&(s.virtual.cache[t-1]=s.virtual.cache[t],s.virtual.cache[t-1].setAttribute("data-swiper-slide-index",t-1),delete s.virtual.cache[t])})),s.virtual.slides.splice(e,1),e{s.d(t,{e:()=>i});var a=s(774);function i(e,t){const s=(0,a.g)(t);return s!==t&&(s.style.backfaceVisibility="hidden",s.style["-webkit-backface-visibility"]="hidden"),s}},227:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(645),i=s(774);function r(e){let{swiper:t,extendParams:s,on:r,emit:n}=e;const l=(0,a.a)();let o;s({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let d,c=(0,i.f)();const p=[];function u(){t.enabled&&(t.mouseEntered=!0)}function m(){t.enabled&&(t.mouseEntered=!1)}function h(e){return!(t.params.mousewheel.thresholdDelta&&e.delta=6&&(0,i.f)()-c<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),n("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),n("scroll",e.raw)),c=(new l.Date).getTime(),!1)))}function f(e){let s=e,a=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const r=t.params.mousewheel;t.params.cssMode&&s.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const c=l&&l.contains(s.target);if(!t.mouseEntered&&!c&&!r.releaseOnEdges)return!0;s.originalEvent&&(s=s.originalEvent);let u=0;const m=t.rtlTranslate?-1:1,f=function(e){let t=0,s=0,a=0,i=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),a=10*t,i=10*s,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(a=e.deltaX),e.shiftKey&&!a&&(a=i,i=0),(a||i)&&e.deltaMode&&(1===e.deltaMode?(a*=40,i*=40):(a*=800,i*=800)),a&&!t&&(t=a<1?-1:1),i&&!s&&(s=i<1?-1:1),{spinX:t,spinY:s,pixelX:a,pixelY:i}}(s);if(r.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(f.pixelX)>Math.abs(f.pixelY)))return!0;u=-f.pixelX*m}else{if(!(Math.abs(f.pixelY)>Math.abs(f.pixelX)))return!0;u=-f.pixelY}else u=Math.abs(f.pixelX)>Math.abs(f.pixelY)?-f.pixelX*m:-f.pixelY;if(0===u)return!0;r.invert&&(u=-u);let g=t.getTranslate()+u*r.sensitivity;if(g>=t.minTranslate()&&(g=t.minTranslate()),g<=t.maxTranslate()&&(g=t.maxTranslate()),a=!!t.params.loop||!(g===t.minTranslate()||g===t.maxTranslate()),a&&t.params.nested&&s.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:(0,i.f)(),delta:Math.abs(u),direction:Math.sign(u)},a=d&&e.time=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!c&&t.isBeginning||!m&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(o),o=void 0,p.length>=15&&p.shift();const s=p.length?p[p.length-1]:void 0,a=p[0];if(p.push(e),s&&(e.delta>s.delta||e.direction!==s.direction))p.splice(0);else if(p.length>=15&&e.time-a.time<500&&a.delta-e.delta>=1&&e.delta<=6){const s=u>0?.8:.2;d=e,p.splice(0),o=(0,i.n)(()=>{!t.destroyed&&t.params&&t.slideToClosest(t.params.speed,!0,void 0,s)},0)}o||(o=(0,i.n)(()=>{if(t.destroyed||!t.params)return;d=e,p.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)},500))}if(a||n("scroll",s),t.params.autoplay&&t.params.autoplay.disableOnInteraction&&t.autoplay.stop(),r.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const s={time:(0,i.f)(),delta:Math.abs(u),direction:Math.sign(u),raw:e};p.length>=2&&p.shift();const a=p.length?p[p.length-1]:void 0;if(p.push(s),a?(s.direction!==a.direction||s.delta>a.delta||s.time>a.time+150)&&h(s):h(s),function(e){const s=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&s.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&s.releaseOnEdges)return!0;return!1}(s))return!0}return s.preventDefault?s.preventDefault():s.returnValue=!1,!1}function g(e){let s=t.el;"container"!==t.params.mousewheel.eventsTarget&&(s=document.querySelector(t.params.mousewheel.eventsTarget)),s[e]("mouseenter",u),s[e]("mouseleave",m),s[e]("wheel",f)}function v(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",f),!0):!t.mousewheel.enabled&&(g("addEventListener"),t.mousewheel.enabled=!0,!0)}function w(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,f),!0):!!t.mousewheel.enabled&&(g("removeEventListener"),t.mousewheel.enabled=!1,!0)}r("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&w(),t.params.mousewheel.enabled&&v()}),r("destroy",()=>{t.params.cssMode&&v(),t.mousewheel.enabled&&w()}),Object.assign(t.mousewheel,{enable:v,disable:w})}},250:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(645);function i(e){let t,s,{swiper:i,extendParams:r,on:n,emit:l,params:o}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},r({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let d,c,p,u,m,h,f,g,v=o&&o.autoplay?o.autoplay.delay:3e3,w=o&&o.autoplay?o.autoplay.delay:3e3,b=(new Date).getTime();function y(e){i&&!i.destroyed&&i.wrapperEl&&e.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",y),g||e.detail&&e.detail.bySwiperTouchMove||C())}const E=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?c=!0:c&&(w=d,c=!1);const e=i.autoplay.paused?d:b+w-(new Date).getTime();i.autoplay.timeLeft=e,l("autoplayTimeLeft",e,e/v),s=requestAnimationFrame(()=>{E()})},x=e=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(s),E();let a=void 0===e?i.params.autoplay.delay:e;v=i.params.autoplay.delay,w=i.params.autoplay.delay;const r=(()=>{let e;if(e=i.virtual&&i.params.virtual.enabled?i.slides.find(e=>e.classList.contains("swiper-slide-active")):i.slides[i.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&&r>0&&void 0===e&&(a=r,v=r,w=r),d=a;const n=i.params.speed,o=()=>{i&&!i.destroyed&&(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,n,!0,!0),l("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,n,!0,!0),l("autoplay")),i.params.cssMode&&(b=(new Date).getTime(),requestAnimationFrame(()=>{x()})))};return a>0?(clearTimeout(t),t=setTimeout(()=>{o()},a)):requestAnimationFrame(()=>{o()}),a},S=()=>{b=(new Date).getTime(),i.autoplay.running=!0,x(),l("autoplayStart")},T=()=>{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(s),l("autoplayStop")},M=(e,s)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(f=!0);const a=()=>{l("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",y):C()};if(i.autoplay.paused=!0,s)return h&&(d=i.params.autoplay.delay),h=!1,void a();const r=d||i.params.autoplay.delay;d=r-((new Date).getTime()-b),i.isEnd&&d<0&&!i.params.loop||(d<0&&(d=0),a())},C=()=>{i.isEnd&&d<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(b=(new Date).getTime(),f?(f=!1,x(d)):x(),i.autoplay.paused=!1,l("autoplayResume"))},P=()=>{if(i.destroyed||!i.autoplay.running)return;const e=(0,a.g)();"hidden"===e.visibilityState&&(f=!0,M(!0)),"visible"===e.visibilityState&&C()},L=e=>{"mouse"===e.pointerType&&(f=!0,g=!0,i.animating||i.autoplay.paused||M(!0))},A=e=>{"mouse"===e.pointerType&&(g=!1,i.autoplay.paused&&C())};n("init",()=>{i.params.autoplay.enabled&&(i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",L),i.el.addEventListener("pointerleave",A)),(0,a.g)().addEventListener("visibilitychange",P),S())}),n("destroy",()=>{i.el&&"string"!=typeof i.el&&(i.el.removeEventListener("pointerenter",L),i.el.removeEventListener("pointerleave",A)),(0,a.g)().removeEventListener("visibilitychange",P),i.autoplay.running&&T()}),n("_freeModeStaticRelease",()=>{(u||f)&&C()}),n("_freeModeNoMomentumRelease",()=>{i.params.autoplay.disableOnInteraction?T():M(!0,!0)}),n("beforeTransitionStart",(e,t,s)=>{!i.destroyed&&i.autoplay.running&&(s||!i.params.autoplay.disableOnInteraction?M(!0,!0):T())}),n("sliderFirstMove",()=>{!i.destroyed&&i.autoplay.running&&(i.params.autoplay.disableOnInteraction?T():(p=!0,u=!1,f=!1,m=setTimeout(()=>{f=!0,u=!0,M(!0)},200)))}),n("touchEnd",()=>{if(!i.destroyed&&i.autoplay.running&&p){if(clearTimeout(m),clearTimeout(t),i.params.autoplay.disableOnInteraction)return u=!1,void(p=!1);u&&i.params.cssMode&&C(),u=!1,p=!1}}),n("slideChange",()=>{!i.destroyed&&i.autoplay.running&&(h=!0)}),Object.assign(i.autoplay,{start:S,stop:T,pause:M,resume:C})}},257:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(774);function i(e){let{swiper:t,extendParams:s,emit:i,once:r}=e;s({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){if(t.params.cssMode)return;const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){if(t.params.cssMode)return;const{touchEventsData:e,touches:s}=t;0===e.velocities.length&&e.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:(0,a.f)()})},onTouchEnd:function(e){let{currentPos:s}=e;if(t.params.cssMode)return;const{params:n,wrapperEl:l,rtlTranslate:o,snapGrid:d,touchEventsData:c}=t,p=(0,a.f)()-c.touchStartTime;if(s<-t.minTranslate())t.slideTo(t.activeIndex);else if(s>-t.maxTranslate())t.slides.length1){const e=c.velocities.pop(),s=c.velocities.pop(),i=e.position-s.position,r=e.time-s.time;t.velocity=i/r,t.velocity/=2,Math.abs(t.velocity)150||(0,a.f)()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=n.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*n.freeMode.momentumRatio;const s=t.velocity*e;let p=t.translate+s;o&&(p=-p);let u,m=!1;const h=20*Math.abs(t.velocity)*n.freeMode.momentumBounceRatio;let f;if(pt.minTranslate())n.freeMode.momentumBounce?(p-t.minTranslate()>h&&(p=t.minTranslate()+h),u=t.minTranslate(),m=!0,c.allowMomentumBounce=!0):p=t.minTranslate(),n.loop&&n.centeredSlides&&(f=!0);else if(n.freeMode.sticky){let e;for(let t=0;t-p){e=t;break}p=Math.abs(d[e]-p){t.loopFix()}),0!==t.velocity){if(e=o?Math.abs((-p-t.translate)/t.velocity):Math.abs((p-t.translate)/t.velocity),n.freeMode.sticky){const s=Math.abs((o?-p:p)-t.translate),a=t.slidesSizesGrid[t.activeIndex];e=s{t&&!t.destroyed&&c.allowMomentumBounce&&(i("momentumBounce"),t.setTransition(n.speed),setTimeout(()=>{t.setTranslate(u),(0,a.l)(l,()=>{t&&!t.destroyed&&t.transitionEnd()})},0))})):t.velocity?(i("_freeModeNoMomentumRelease"),t.updateProgress(p),t.setTransition(e),t.setTranslate(p),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,(0,a.l)(l,()=>{t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(p),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(n.freeMode.sticky)return void t.slideToClosest();n.freeMode&&i("_freeModeNoMomentumRelease")}(!n.freeMode.momentum||p>=n.longSwipesMs)&&(i("_freeModeStaticRelease"),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})}},275:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(296),i=s(774);function r(e){let{swiper:t,extendParams:s,on:r,emit:n}=e;function l(e){let s;return e&&"string"==typeof e&&t.isElement&&(s=t.el.querySelector(e)||t.hostEl.querySelector(e),s)?s:(e&&("string"==typeof e&&(s=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&s&&s.length>1&&1===t.el.querySelectorAll(e).length?s=t.el.querySelector(e):s&&1===s.length&&(s=s[0])),e&&!s?e:s)}function o(e,s){const a=t.params.navigation;(e=(0,i.m)(e)).forEach(e=>{e&&(e.classList[s?"add":"remove"](...a.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=s),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](a.lockClass))})}function d(){const{nextEl:e,prevEl:s}=t.navigation;if(t.params.loop)return o(s,!1),void o(e,!1);o(s,t.isBeginning&&!t.params.rewind),o(e,t.isEnd&&!t.params.rewind)}function c(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),n("navigationPrev"))}function p(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),n("navigationNext"))}function u(){const e=t.params.navigation;if(t.params.navigation=(0,a.c)(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let s=l(e.nextEl),r=l(e.prevEl);Object.assign(t.navigation,{nextEl:s,prevEl:r}),s=(0,i.m)(s),r=(0,i.m)(r);const n=(s,a)=>{s&&s.addEventListener("click","next"===a?p:c),!t.enabled&&s&&s.classList.add(...e.lockClass.split(" "))};s.forEach(e=>n(e,"next")),r.forEach(e=>n(e,"prev"))}function m(){let{nextEl:e,prevEl:s}=t.navigation;e=(0,i.m)(e),s=(0,i.m)(s);const a=(e,s)=>{e.removeEventListener("click","next"===s?p:c),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach(e=>a(e,"next")),s.forEach(e=>a(e,"prev"))}s({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},r("init",()=>{!1===t.params.navigation.enabled?h():(u(),d())}),r("toEdge fromEdge lock unlock",()=>{d()}),r("destroy",()=>{m()}),r("enable disable",()=>{let{nextEl:e,prevEl:s}=t.navigation;e=(0,i.m)(e),s=(0,i.m)(s),t.enabled?d():[...e,...s].filter(e=>!!e).forEach(e=>e.classList.add(t.params.navigation.lockClass))}),r("click",(e,s)=>{let{nextEl:a,prevEl:r}=t.navigation;a=(0,i.m)(a),r=(0,i.m)(r);const l=s.target;let o=r.includes(l)||a.includes(l);if(t.isElement&&!o){const e=s.path||s.composedPath&&s.composedPath();e&&(o=e.find(e=>a.includes(e)||r.includes(e)))}if(t.params.navigation.hideOnClick&&!o){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===l||t.pagination.el.contains(l)))return;let e;a.length?e=a[0].classList.contains(t.params.navigation.hiddenClass):r.length&&(e=r[0].classList.contains(t.params.navigation.hiddenClass)),n(!0===e?"navigationShow":"navigationHide"),[...a,...r].filter(e=>!!e).forEach(e=>e.classList.toggle(t.params.navigation.hiddenClass))}});const h=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),m()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),u(),d()},disable:h,update:d,init:u,destroy:m})}},296:(e,t,s)=>{s.d(t,{c:()=>i});var a=s(774);function i(e,t,s,i){return e.params.createElements&&Object.keys(i).forEach(r=>{if(!s[r]&&!0===s.auto){let n=(0,a.e)(e.el,`.${i[r]}`)[0];n||(n=(0,a.c)("div",i[r]),n.className=i[r],e.el.append(n)),s[r]=n,t[r]=n}}),s}},309:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(663),i=s(222),r=s(902),n=s(774);function l(e){let{swiper:t,extendParams:s,on:l}=e;s({fadeEffect:{crossFade:!1}});(0,a.e)({effect:"fade",swiper:t,on:l,setTranslate:()=>{const{slides:e}=t,s=t.params.fadeEffect;for(let a=0;a{const s=t.slides.map(e=>(0,n.g)(e));s.forEach(t=>{t.style.transitionDuration=`${e}ms`}),(0,r.e)({swiper:t,duration:e,transformElements:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}},412:(e,t,s)=>{s.d(t,{c:()=>i});var a=s(774);function i(e,t,s){const i=`swiper-slide-shadow${s?`-${s}`:""}${e?` swiper-slide-shadow-${e}`:""}`,r=(0,a.g)(t);let n=r.querySelector(`.${i.split(" ").join(".")}`);return n||(n=(0,a.c)("div",i.split(" ")),r.append(n)),n}},433:(e,t,s)=>{function a(e){let t,s,a,i,{swiper:r,extendParams:n,on:l}=e;n({grid:{rows:1,fill:"column"}});const o=()=>{let e=r.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*r.size:"string"==typeof e&&(e=parseFloat(e)),e};l("init",()=>{i=r.params.grid&&r.params.grid.rows>1}),l("update",()=>{const{params:e,el:t}=r,s=e.grid&&e.grid.rows>1;i&&!s?(t.classList.remove(`${e.containerModifierClass}grid`,`${e.containerModifierClass}grid-column`),a=1,r.emitContainerClasses()):!i&&s&&(t.classList.add(`${e.containerModifierClass}grid`),"column"===e.grid.fill&&t.classList.add(`${e.containerModifierClass}grid-column`),r.emitContainerClasses()),i=s}),r.grid={initSlides:e=>{const{slidesPerView:i}=r.params,{rows:n,fill:l}=r.params.grid,o=r.virtual&&r.params.virtual.enabled?r.virtual.slides.length:e.length;a=Math.floor(o/n),t=Math.floor(o/n)===o/n?o:Math.ceil(o/n)*n,"auto"!==i&&"row"===l&&(t=Math.max(t,i*n)),s=t/n},unsetSlides:()=>{r.slides&&r.slides.forEach(e=>{e.swiperSlideGridSet&&(e.style.height="",e.style[r.getDirectionLabel("margin-top")]="")})},updateSlide:(e,i,n)=>{const{slidesPerGroup:l}=r.params,d=o(),{rows:c,fill:p}=r.params.grid,u=r.virtual&&r.params.virtual.enabled?r.virtual.slides.length:n.length;let m,h,f;if("row"===p&&l>1){const s=Math.floor(e/(l*c)),a=e-c*l*s,r=0===s?l:Math.min(Math.ceil((u-s*c*l)/c),l);f=Math.floor(a/r),h=a-f*r+s*l,m=h+f*t/c,i.style.order=m}else"column"===p?(h=Math.floor(e/c),f=e-h*c,(h>a||h===a&&f===c-1)&&(f+=1,f>=c&&(f=0,h+=1))):(f=Math.floor(e/s),h=e-f*s);i.row=f,i.column=h,i.style.height=`calc((100% - ${(c-1)*d}px) / ${c})`,i.style[r.getDirectionLabel("margin-top")]=0!==f?d&&`${d}px`:"",i.swiperSlideGridSet=!0},updateWrapperSize:(e,s)=>{const{centeredSlides:a,roundLengths:i}=r.params,n=o(),{rows:l}=r.params.grid;if(r.virtualSize=(e+n)*t,r.virtualSize=Math.ceil(r.virtualSize/l)-n,r.params.cssMode||(r.wrapperEl.style[r.getDirectionLabel("width")]=`${r.virtualSize+n}px`),a){const e=[];for(let t=0;ta})},476:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(645),i=s(774);function r(e){let{swiper:t,extendParams:s,on:r,emit:n}=e;const l=(0,a.a)();s({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,panOnMouseMove:!1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let o=1,d=!1,c=!1,p={x:0,y:0};let u,m;const h=[],f={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},g={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},v={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let w,b=1;function y(){if(h.length<2)return 1;const e=h[0].pageX,t=h[0].pageY,s=h[1].pageX,a=h[1].pageY;return Math.sqrt((s-e)**2+(a-t)**2)}function E(){const e=t.params.zoom,s=f.imageWrapEl.getAttribute("data-swiper-zoom")||e.maxRatio;if(e.limitToOriginalSize&&f.imageEl&&f.imageEl.naturalWidth){const e=f.imageEl.naturalWidth/f.imageEl.offsetWidth;return Math.min(e,s)}return s}function x(e){const s=t.isElement?"swiper-slide":`.${t.params.slideClass}`;return!!e.target.matches(s)||t.slides.filter(t=>t.contains(e.target)).length>0}function S(e){const s=`.${t.params.zoom.containerClass}`;return!!e.target.matches(s)||[...t.hostEl.querySelectorAll(s)].filter(t=>t.contains(e.target)).length>0}function T(e){if("mouse"===e.pointerType&&h.splice(0,h.length),!x(e))return;const s=t.params.zoom;if(u=!1,m=!1,h.push(e),!(h.length<2)){if(u=!0,f.scaleStart=y(),!f.slideEl){f.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`),f.slideEl||(f.slideEl=t.slides[t.activeIndex]);let a=f.slideEl.querySelector(`.${s.containerClass}`);if(a&&(a=a.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),f.imageEl=a,f.imageWrapEl=a?(0,i.b)(f.imageEl,`.${s.containerClass}`)[0]:void 0,!f.imageWrapEl)return void(f.imageEl=void 0);f.maxRatio=E()}if(f.imageEl){const[e,t]=function(){if(h.length<2)return{x:null,y:null};const e=f.imageEl.getBoundingClientRect();return[(h[0].pageX+(h[1].pageX-h[0].pageX)/2-e.x-l.scrollX)/o,(h[0].pageY+(h[1].pageY-h[0].pageY)/2-e.y-l.scrollY)/o]}();f.originX=e,f.originY=t,f.imageEl.style.transitionDuration="0ms"}d=!0}}function M(e){if(!x(e))return;const s=t.params.zoom,a=t.zoom,i=h.findIndex(t=>t.pointerId===e.pointerId);i>=0&&(h[i]=e),h.length<2||(m=!0,f.scaleMove=y(),f.imageEl&&(a.scale=f.scaleMove/f.scaleStart*o,a.scale>f.maxRatio&&(a.scale=f.maxRatio-1+(a.scale-f.maxRatio+1)**.5),a.scalet.pointerId===e.pointerId);i>=0&&h.splice(i,1),u&&m&&(u=!1,m=!1,f.imageEl&&(a.scale=Math.max(Math.min(a.scale,f.maxRatio),s.minRatio),f.imageEl.style.transitionDuration=`${t.params.speed}ms`,f.imageEl.style.transform=`translate3d(0,0,0) scale(${a.scale})`,o=a.scale,d=!1,a.scale>1&&f.slideEl?f.slideEl.classList.add(`${s.zoomedSlideClass}`):a.scale<=1&&f.slideEl&&f.slideEl.classList.remove(`${s.zoomedSlideClass}`),1===a.scale&&(f.originX=0,f.originY=0,f.slideEl=void 0)))}function P(){t.touchEventsData.preventTouchMoveFromPointerMove=!1}function L(e){const s="mouse"===e.pointerType&&t.params.zoom.panOnMouseMove;if(!x(e)||!S(e))return;const a=t.zoom;if(!f.imageEl)return;if(!g.isTouched||!f.slideEl)return void(s&&I(e));if(s)return void I(e);g.isMoved||(g.width=f.imageEl.offsetWidth||f.imageEl.clientWidth,g.height=f.imageEl.offsetHeight||f.imageEl.clientHeight,g.startX=(0,i.k)(f.imageWrapEl,"x")||0,g.startY=(0,i.k)(f.imageWrapEl,"y")||0,f.slideWidth=f.slideEl.offsetWidth,f.slideHeight=f.slideEl.offsetHeight,f.imageWrapEl.style.transitionDuration="0ms");const r=g.width*a.scale,n=g.height*a.scale;g.minX=Math.min(f.slideWidth/2-r/2,0),g.maxX=-g.minX,g.minY=Math.min(f.slideHeight/2-n/2,0),g.maxY=-g.minY,g.touchesCurrent.x=h.length>0?h[0].pageX:e.pageX,g.touchesCurrent.y=h.length>0?h[0].pageY:e.pageY;if(Math.max(Math.abs(g.touchesCurrent.x-g.touchesStart.x),Math.abs(g.touchesCurrent.y-g.touchesStart.y))>5&&(t.allowClick=!1),!g.isMoved&&!d){if(t.isHorizontal()&&(Math.floor(g.minX)===Math.floor(g.startX)&&g.touchesCurrent.xg.touchesStart.x))return g.isTouched=!1,void P();if(!t.isHorizontal()&&(Math.floor(g.minY)===Math.floor(g.startY)&&g.touchesCurrent.yg.touchesStart.y))return g.isTouched=!1,void P()}e.cancelable&&e.preventDefault(),e.stopPropagation(),clearTimeout(w),t.touchEventsData.preventTouchMoveFromPointerMove=!0,w=setTimeout(()=>{t.destroyed||P()}),g.isMoved=!0;const l=(a.scale-o)/(f.maxRatio-t.params.zoom.minRatio),{originX:c,originY:p}=f;g.currentX=g.touchesCurrent.x-g.touchesStart.x+g.startX+l*(g.width-2*c),g.currentY=g.touchesCurrent.y-g.touchesStart.y+g.startY+l*(g.height-2*p),g.currentXg.maxX&&(g.currentX=g.maxX-1+(g.currentX-g.maxX+1)**.8),g.currentYg.maxY&&(g.currentY=g.maxY-1+(g.currentY-g.maxY+1)**.8),v.prevPositionX||(v.prevPositionX=g.touchesCurrent.x),v.prevPositionY||(v.prevPositionY=g.touchesCurrent.y),v.prevTime||(v.prevTime=Date.now()),v.x=(g.touchesCurrent.x-v.prevPositionX)/(Date.now()-v.prevTime)/2,v.y=(g.touchesCurrent.y-v.prevPositionY)/(Date.now()-v.prevTime)/2,Math.abs(g.touchesCurrent.x-v.prevPositionX)<2&&(v.x=0),Math.abs(g.touchesCurrent.y-v.prevPositionY)<2&&(v.y=0),v.prevPositionX=g.touchesCurrent.x,v.prevPositionY=g.touchesCurrent.y,v.prevTime=Date.now(),f.imageWrapEl.style.transform=`translate3d(${g.currentX}px, ${g.currentY}px,0)`}function A(){const e=t.zoom;f.slideEl&&t.activeIndex!==t.slides.indexOf(f.slideEl)&&(f.imageEl&&(f.imageEl.style.transform="translate3d(0,0,0) scale(1)"),f.imageWrapEl&&(f.imageWrapEl.style.transform="translate3d(0,0,0)"),f.slideEl.classList.remove(`${t.params.zoom.zoomedSlideClass}`),e.scale=1,o=1,f.slideEl=void 0,f.imageEl=void 0,f.imageWrapEl=void 0,f.originX=0,f.originY=0)}function I(e){if(o<=1||!f.imageWrapEl)return;if(!x(e)||!S(e))return;const t=l.getComputedStyle(f.imageWrapEl).transform,s=new l.DOMMatrix(t);if(!c)return c=!0,p.x=e.clientX,p.y=e.clientY,g.startX=s.e,g.startY=s.f,g.width=f.imageEl.offsetWidth||f.imageEl.clientWidth,g.height=f.imageEl.offsetHeight||f.imageEl.clientHeight,f.slideWidth=f.slideEl.offsetWidth,void(f.slideHeight=f.slideEl.offsetHeight);const a=-3*(e.clientX-p.x),i=-3*(e.clientY-p.y),r=g.width*o,n=g.height*o,d=f.slideWidth,u=f.slideHeight,m=Math.min(d/2-r/2,0),h=-m,v=Math.min(u/2-n/2,0),w=-v,b=Math.max(Math.min(g.startX+a,h),m),y=Math.max(Math.min(g.startY+i,w),v);f.imageWrapEl.style.transitionDuration="0ms",f.imageWrapEl.style.transform=`translate3d(${b}px, ${y}px, 0)`,p.x=e.clientX,p.y=e.clientY,g.startX=b,g.startY=y,g.currentX=b,g.currentY=y}function z(e){const s=t.zoom,a=t.params.zoom;if(!f.slideEl){e&&e.target&&(f.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`)),f.slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?f.slideEl=(0,i.e)(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:f.slideEl=t.slides[t.activeIndex]);let s=f.slideEl.querySelector(`.${a.containerClass}`);s&&(s=s.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),f.imageEl=s,f.imageWrapEl=s?(0,i.b)(f.imageEl,`.${a.containerClass}`)[0]:void 0}if(!f.imageEl||!f.imageWrapEl)return;let r,n,d,c,p,u,m,h,v,w,b,y,x,S,T,M,C,P;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),f.slideEl.classList.add(`${a.zoomedSlideClass}`),void 0===g.touchesStart.x&&e?(r=e.pageX,n=e.pageY):(r=g.touchesStart.x,n=g.touchesStart.y);const L=o,A="number"==typeof e?e:null;1===o&&A&&(r=void 0,n=void 0,g.touchesStart.x=void 0,g.touchesStart.y=void 0);const I=E();s.scale=A||I,o=A||I,!e||1===o&&A?(m=0,h=0):(C=f.slideEl.offsetWidth,P=f.slideEl.offsetHeight,d=(0,i.d)(f.slideEl).left+l.scrollX,c=(0,i.d)(f.slideEl).top+l.scrollY,p=d+C/2-r,u=c+P/2-n,v=f.imageEl.offsetWidth||f.imageEl.clientWidth,w=f.imageEl.offsetHeight||f.imageEl.clientHeight,b=v*s.scale,y=w*s.scale,x=Math.min(C/2-b/2,0),S=Math.min(P/2-y/2,0),T=-x,M=-S,L>0&&A&&"number"==typeof g.currentX&&"number"==typeof g.currentY?(m=g.currentX*s.scale/L,h=g.currentY*s.scale/L):(m=p*s.scale,h=u*s.scale),mT&&(m=T),hM&&(h=M)),A&&1===s.scale&&(f.originX=0,f.originY=0),g.currentX=m,g.currentY=h,f.imageWrapEl.style.transitionDuration="300ms",f.imageWrapEl.style.transform=`translate3d(${m}px, ${h}px,0)`,f.imageEl.style.transitionDuration="300ms",f.imageEl.style.transform=`translate3d(0,0,0) scale(${s.scale})`}function k(){const e=t.zoom,s=t.params.zoom;if(!f.slideEl){t.params.virtual&&t.params.virtual.enabled&&t.virtual?f.slideEl=(0,i.e)(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:f.slideEl=t.slides[t.activeIndex];let e=f.slideEl.querySelector(`.${s.containerClass}`);e&&(e=e.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),f.imageEl=e,f.imageWrapEl=e?(0,i.b)(f.imageEl,`.${s.containerClass}`)[0]:void 0}f.imageEl&&f.imageWrapEl&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,o=1,g.currentX=void 0,g.currentY=void 0,g.touchesStart.x=void 0,g.touchesStart.y=void 0,f.imageWrapEl.style.transitionDuration="300ms",f.imageWrapEl.style.transform="translate3d(0,0,0)",f.imageEl.style.transitionDuration="300ms",f.imageEl.style.transform="translate3d(0,0,0) scale(1)",f.slideEl.classList.remove(`${s.zoomedSlideClass}`),f.slideEl=void 0,f.originX=0,f.originY=0,t.params.zoom.panOnMouseMove&&(p={x:0,y:0},c&&(c=!1,g.startX=0,g.startY=0)))}function $(e){const s=t.zoom;s.scale&&1!==s.scale?k():z(e)}function O(){return{passiveListener:!!t.params.passiveListeners&&{passive:!0,capture:!1},activeListenerWithCapture:!t.params.passiveListeners||{passive:!1,capture:!0}}}function D(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const{passiveListener:s,activeListenerWithCapture:a}=O();t.wrapperEl.addEventListener("pointerdown",T,s),t.wrapperEl.addEventListener("pointermove",M,a),["pointerup","pointercancel","pointerout"].forEach(e=>{t.wrapperEl.addEventListener(e,C,s)}),t.wrapperEl.addEventListener("pointermove",L,a)}function G(){const e=t.zoom;if(!e.enabled)return;e.enabled=!1;const{passiveListener:s,activeListenerWithCapture:a}=O();t.wrapperEl.removeEventListener("pointerdown",T,s),t.wrapperEl.removeEventListener("pointermove",M,a),["pointerup","pointercancel","pointerout"].forEach(e=>{t.wrapperEl.removeEventListener(e,C,s)}),t.wrapperEl.removeEventListener("pointermove",L,a)}Object.defineProperty(t.zoom,"scale",{get:()=>b,set(e){if(b!==e){const t=f.imageEl,s=f.slideEl;n("zoomChange",e,t,s)}b=e}}),r("init",()=>{t.params.zoom.enabled&&D()}),r("destroy",()=>{G()}),r("touchStart",(e,s)=>{t.zoom.enabled&&function(e){const s=t.device;if(!f.imageEl)return;if(g.isTouched)return;s.android&&e.cancelable&&e.preventDefault(),g.isTouched=!0;const a=h.length>0?h[0]:e;g.touchesStart.x=a.pageX,g.touchesStart.y=a.pageY}(s)}),r("touchEnd",(e,s)=>{t.zoom.enabled&&function(){const e=t.zoom;if(h.length=0,!f.imageEl)return;if(!g.isTouched||!g.isMoved)return g.isTouched=!1,void(g.isMoved=!1);g.isTouched=!1,g.isMoved=!1;let s=300,a=300;const i=v.x*s,r=g.currentX+i,n=v.y*a,l=g.currentY+n;0!==v.x&&(s=Math.abs((r-g.currentX)/v.x)),0!==v.y&&(a=Math.abs((l-g.currentY)/v.y));const o=Math.max(s,a);g.currentX=r,g.currentY=l;const d=g.width*e.scale,c=g.height*e.scale;g.minX=Math.min(f.slideWidth/2-d/2,0),g.maxX=-g.minX,g.minY=Math.min(f.slideHeight/2-c/2,0),g.maxY=-g.minY,g.currentX=Math.max(Math.min(g.currentX,g.maxX),g.minX),g.currentY=Math.max(Math.min(g.currentY,g.maxY),g.minY),f.imageWrapEl.style.transitionDuration=`${o}ms`,f.imageWrapEl.style.transform=`translate3d(${g.currentX}px, ${g.currentY}px,0)`}()}),r("doubleTap",(e,s)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&$(s)}),r("transitionEnd",()=>{t.zoom.enabled&&t.params.zoom.enabled&&A()}),r("slideChange",()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&A()}),Object.assign(t.zoom,{enable:D,disable:G,in:z,out:k,toggle:$})}},506:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(645),i=s(774);function r(e){let{swiper:t,extendParams:s,on:r}=e;s({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let n=!1,l=!1;function o(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const s=e.clickedIndex,a=e.clickedSlide;if(a&&a.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let i;i=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):s,t.params.loop?t.slideToLoop(i):t.slideTo(i)}function d(){const{thumbs:e}=t.params;if(n)return!1;n=!0;const s=t.constructor;if(e.swiper instanceof s){if(e.swiper.destroyed)return n=!1,!1;t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update()}else if((0,i.o)(e.swiper)){const a=Object.assign({},e.swiper);Object.assign(a,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new s(a),l=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",o),!0}function c(e){const s=t.thumbs.swiper;if(!s||s.destroyed)return;const a="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView;let r=1;const n=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(r=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(r=1),r=Math.floor(r),s.slides.forEach(e=>e.classList.remove(n)),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let e=0;e{e.classList.add(n)});else for(let e=0;ee.getAttribute("data-swiper-slide-index")===`${t.realIndex}`);r=s.slides.indexOf(e),n=t.activeIndex>t.previousIndex?"next":"prev"}else r=t.realIndex,n=r>t.previousIndex?"next":"prev";o&&(r+="next"===n?l:-1*l),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(r)<0&&(s.params.centeredSlides?r=r>i?r-Math.floor(a/2)+1:r+Math.floor(a/2)-1:r>i&&s.params.slidesPerGroup,s.slideTo(r,e?0:void 0))}}t.thumbs={swiper:null},r("beforeInit",()=>{const{thumbs:e}=t.params;if(e&&e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const s=(0,a.g)(),i=()=>{const a="string"==typeof e.swiper?s.querySelector(e.swiper):e.swiper;if(a&&a.swiper)e.swiper=a.swiper,d(),c(!0);else if(a){const s=`${t.params.eventsPrefix}init`,i=r=>{e.swiper=r.detail[0],a.removeEventListener(s,i),d(),c(!0),e.swiper.update(),t.update()};a.addEventListener(s,i)}return a},r=()=>{if(t.destroyed)return;i()||requestAnimationFrame(r)};requestAnimationFrame(r)}else d(),c(!0)}),r("slideChange update resize observerUpdate",()=>{c()}),r("setTransition",(e,s)=>{const a=t.thumbs.swiper;a&&!a.destroyed&&a.setTransition(s)}),r("beforeDestroy",()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&l&&e.destroy()}),Object.assign(t.thumbs,{init:d,update:c})}},541:(e,t,s)=>{function a(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}s.d(t,{c:()=>a})},577:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(645),i=s(774),r=s(296),n=s(541);function l(e){let{swiper:t,extendParams:s,on:l,emit:o}=e;const d=(0,a.g)();let c,p,u,m,h=!1,f=null,g=null;function v(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:s}=t,{dragEl:a,el:i}=e,r=t.params.scrollbar,n=t.params.loop?t.progressLoop:t.progress;let l=p,o=(u-p)*n;s?(o=-o,o>0?(l=p-o,o=0):-o+p>u&&(l=u+o)):o<0?(l=p+o,o=0):o+p>u&&(l=u-o),t.isHorizontal()?(a.style.transform=`translate3d(${o}px, 0, 0)`,a.style.width=`${l}px`):(a.style.transform=`translate3d(0px, ${o}px, 0)`,a.style.height=`${l}px`),r.hide&&(clearTimeout(f),i.style.opacity=1,f=setTimeout(()=>{i.style.opacity=0,i.style.transitionDuration="400ms"},1e3))}function w(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:s,el:a}=e;s.style.width="",s.style.height="",u=t.isHorizontal()?a.offsetWidth:a.offsetHeight,m=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),p="auto"===t.params.scrollbar.dragSize?u*m:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?s.style.width=`${p}px`:s.style.height=`${p}px`,a.style.display=m>=1?"none":"",t.params.scrollbar.hide&&(a.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function b(e){return t.isHorizontal()?e.clientX:e.clientY}function y(e){const{scrollbar:s,rtlTranslate:a}=t,{el:r}=s;let n;n=(b(e)-(0,i.d)(r)[t.isHorizontal()?"left":"top"]-(null!==c?c:p/2))/(u-p),n=Math.max(Math.min(n,1),0),a&&(n=1-n);const l=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*n;t.updateProgress(l),t.setTranslate(l),t.updateActiveIndex(),t.updateSlidesClasses()}function E(e){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:i}=t,{el:r,dragEl:n}=a;h=!0,c=e.target===n?b(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.style.transitionDuration="100ms",n.style.transitionDuration="100ms",y(e),clearTimeout(g),r.style.transitionDuration="0ms",s.hide&&(r.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),o("scrollbarDragStart",e)}function x(e){const{scrollbar:s,wrapperEl:a}=t,{el:i,dragEl:r}=s;h&&(e.preventDefault&&e.cancelable?e.preventDefault():e.returnValue=!1,y(e),a.style.transitionDuration="0ms",i.style.transitionDuration="0ms",r.style.transitionDuration="0ms",o("scrollbarDragMove",e))}function S(e){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:r}=t,{el:n}=a;h&&(h=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",r.style.transitionDuration=""),s.hide&&(clearTimeout(g),g=(0,i.n)(()=>{n.style.opacity=0,n.style.transitionDuration="400ms"},1e3)),o("scrollbarDragEnd",e),s.snapOnRelease&&t.slideToClosest())}function T(e){const{scrollbar:s,params:a}=t,i=s.el;if(!i)return;const r=i,n=!!a.passiveListeners&&{passive:!1,capture:!1},l=!!a.passiveListeners&&{passive:!0,capture:!1};if(!r)return;const o="on"===e?"addEventListener":"removeEventListener";r[o]("pointerdown",E,n),d[o]("pointermove",x,n),d[o]("pointerup",S,l)}function M(){const{scrollbar:e,el:s}=t;t.params.scrollbar=(0,r.c)(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const a=t.params.scrollbar;if(!a.el)return;let l,o;if("string"==typeof a.el&&t.isElement&&(l=t.el.querySelector(a.el)),l||"string"!=typeof a.el)l||(l=a.el);else if(l=d.querySelectorAll(a.el),!l.length)return;t.params.uniqueNavElements&&"string"==typeof a.el&&l.length>1&&1===s.querySelectorAll(a.el).length&&(l=s.querySelector(a.el)),l.length>0&&(l=l[0]),l.classList.add(t.isHorizontal()?a.horizontalClass:a.verticalClass),l&&(o=l.querySelector((0,n.c)(t.params.scrollbar.dragClass)),o||(o=(0,i.c)("div",t.params.scrollbar.dragClass),l.append(o))),Object.assign(e,{el:l,dragEl:o}),a.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&T("on"),l&&l.classList[t.enabled?"remove":"add"](...(0,i.j)(t.params.scrollbar.lockClass))}function C(){const e=t.params.scrollbar,s=t.scrollbar.el;s&&s.classList.remove(...(0,i.j)(t.isHorizontal()?e.horizontalClass:e.verticalClass)),t.params.scrollbar.el&&t.scrollbar.el&&T("off")}s({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},l("changeDirection",()=>{if(!t.scrollbar||!t.scrollbar.el)return;const e=t.params.scrollbar;let{el:s}=t.scrollbar;s=(0,i.m)(s),s.forEach(s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)})}),l("init",()=>{!1===t.params.scrollbar.enabled?P():(M(),w(),v())}),l("update resize observerUpdate lock unlock changeDirection",()=>{w()}),l("setTranslate",()=>{v()}),l("setTransition",(e,s)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(s)}),l("enable disable",()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](...(0,i.j)(t.params.scrollbar.lockClass))}),l("destroy",()=>{C()});const P=()=>{t.el.classList.add(...(0,i.j)(t.params.scrollbar.scrollbarDisabledClass)),t.scrollbar.el&&t.scrollbar.el.classList.add(...(0,i.j)(t.params.scrollbar.scrollbarDisabledClass)),C()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(...(0,i.j)(t.params.scrollbar.scrollbarDisabledClass)),t.scrollbar.el&&t.scrollbar.el.classList.remove(...(0,i.j)(t.params.scrollbar.scrollbarDisabledClass)),M(),w(),v()},disable:P,updateSize:w,setTranslate:v,init:M,destroy:C})}},591:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(412),i=s(663),r=s(222),n=s(902),l=s(774);function o(e){let{swiper:t,extendParams:s,on:o}=e;s({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const d=e=>"string"==typeof e?e:`${e}px`;(0,i.e)({effect:"creative",swiper:t,on:o,setTranslate:()=>{const{slides:e,wrapperEl:s,slidesSizesGrid:i}=t,n=t.params.creativeEffect,{progressMultiplier:o}=n,c=t.params.centeredSlides,p=(0,l.p)(t);if(c){const e=i[0]/2-t.params.slidesOffsetBefore||0;s.style.transform=`translateX(calc(50% - ${e}px))`}for(let s=0;s0&&(w=n.prev,v=!0),f.forEach((e,t)=>{f[t]=`calc(${e}px + (${d(w.translate[t])} * ${Math.abs(u*o)}))`}),g.forEach((e,t)=>{let s=w.rotate[t]*Math.abs(u*o);g[t]=s}),i.style.zIndex=-Math.abs(Math.round(l))+e.length;const b=f.join(", "),y=`rotateX(${p(g[0])}deg) rotateY(${p(g[1])}deg) rotateZ(${p(g[2])}deg)`,E=m<0?`scale(${1+(1-w.scale)*m*o})`:`scale(${1-(1-w.scale)*m*o})`,x=m<0?1+(1-w.opacity)*m*o:1-(1-w.opacity)*m*o,S=`translate3d(${b}) ${y} ${E}`;if(v&&w.shadow||!v){let e=i.querySelector(".swiper-slide-shadow");if(!e&&w.shadow&&(e=(0,a.c)("creative",i)),e){const t=n.shadowPerProgress?u*(1/n.limitProgress):u;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const T=(0,r.e)(n,i);T.style.transform=S,T.style.opacity=x,w.origin&&(T.style.transformOrigin=w.origin)}},setTransition:e=>{const s=t.slides.map(e=>(0,l.g)(e));s.forEach(t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach(t=>{t.style.transitionDuration=`${e}ms`})}),(0,n.e)({swiper:t,duration:e,transformElements:s,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}},606:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(645),i=s(774);function r(e){let{swiper:t,extendParams:s,on:r,emit:n}=e;const l=(0,a.g)(),o=(0,a.a)();function d(e){if(!t.enabled)return;const{rtlTranslate:s}=t;let a=e;a.originalEvent&&(a=a.originalEvent);const r=a.keyCode||a.charCode,d=t.params.keyboard.pageUpDown,c=d&&33===r,p=d&&34===r,u=37===r,m=39===r,h=38===r,f=40===r;if(!t.allowSlideNext&&(t.isHorizontal()&&m||t.isVertical()&&f||p))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&u||t.isVertical()&&h||c))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||l.activeElement&&(l.activeElement.isContentEditable||l.activeElement.nodeName&&("input"===l.activeElement.nodeName.toLowerCase()||"textarea"===l.activeElement.nodeName.toLowerCase())))){if(t.params.keyboard.onlyInViewport&&(c||p||u||m||h||f)){let e=!1;if((0,i.b)(t.el,`.${t.params.slideClass}, swiper-slide`).length>0&&0===(0,i.b)(t.el,`.${t.params.slideActiveClass}`).length)return;const a=t.el,r=a.clientWidth,n=a.clientHeight,l=o.innerWidth,d=o.innerHeight,c=(0,i.d)(a);s&&(c.left-=a.scrollLeft);const p=[[c.left,c.top],[c.left+r,c.top],[c.left,c.top+n],[c.left+r,c.top+n]];for(let t=0;t=0&&s[0]<=l&&s[1]>=0&&s[1]<=d){if(0===s[0]&&0===s[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((c||p||u||m)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),((p||m)&&!s||(c||u)&&s)&&t.slideNext(),((c||u)&&!s||(p||m)&&s)&&t.slidePrev()):((c||p||h||f)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),(p||f)&&t.slideNext(),(c||h)&&t.slidePrev()),n("keyPress",r)}}function c(){t.keyboard.enabled||(l.addEventListener("keydown",d),t.keyboard.enabled=!0)}function p(){t.keyboard.enabled&&(l.removeEventListener("keydown",d),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},s({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),r("init",()=>{t.params.keyboard.enabled&&c()}),r("destroy",()=>{t.keyboard.enabled&&p()}),Object.assign(t.keyboard,{enable:c,disable:p})}},630:(e,t,s)=>{s.d(t,{A:()=>d});var a=s(774);function i(e){const t=this,{params:s,slidesEl:i}=t;s.loop&&t.loopDestroy();const r=e=>{if("string"==typeof e){const t=document.createElement("div");(0,a.s)(t,e),i.append(t.children[0]),(0,a.s)(t,"")}else i.append(e)};if("object"==typeof e&&"length"in e)for(let t=0;t{if("string"==typeof e){const t=document.createElement("div");(0,a.s)(t,e),r.prepend(t.children[0]),(0,a.s)(t,"")}else r.prepend(e)};if("object"==typeof e&&"length"in e){for(let t=0;t=l)return void s.appendSlide(t);let o=n>e?n+1:n;const d=[];for(let t=l-1;t>=e;t-=1){const e=s.slides[t];e.remove(),d.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;ee?n+t.length:n}else r.append(t);for(let e=0;e{s.d(t,{A:()=>i});var a=s(645);function i(e){let{swiper:t,extendParams:s,on:i}=e;s({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let r=!1,n={};const l=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=e=>{const t=(0,a.a)();let s;s=e?new URL(e):t.location;const i=s.pathname.slice(1).split("/").filter(e=>""!==e),r=i.length;return{key:i[r-2],value:i[r-1]}},d=(e,s)=>{const i=(0,a.a)();if(!r||!t.params.history.enabled)return;let n;n=t.params.url?new URL(t.params.url):i.location;const o=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${s}"]`):t.slides[s];let d=l(o.getAttribute("data-history"));if(t.params.history.root.length>0){let s=t.params.history.root;"/"===s[s.length-1]&&(s=s.slice(0,s.length-1)),d=`${s}/${e?`${e}/`:""}${d}`}else n.pathname.includes(e)||(d=`${e?`${e}/`:""}${d}`);t.params.history.keepQuery&&(d+=n.search);const c=i.history.state;c&&c.value===d||(t.params.history.replaceState?i.history.replaceState({value:d},null,d):i.history.pushState({value:d},null,d))},c=(e,s,a)=>{if(s)for(let i=0,r=t.slides.length;i{n=o(t.params.url),c(t.params.speed,n.value,!1)};i("init",()=>{t.params.history.enabled&&(()=>{const e=(0,a.a)();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);r=!0,n=o(t.params.url),n.key||n.value?(c(0,n.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",p)):t.params.history.replaceState||e.addEventListener("popstate",p)}})()}),i("destroy",()=>{t.params.history.enabled&&(()=>{const e=(0,a.a)();t.params.history.replaceState||e.removeEventListener("popstate",p)})()}),i("transitionEnd _freeModeNoMomentumRelease",()=>{r&&d(t.params.history.key,t.activeIndex)}),i("slideChange",()=>{r&&t.params.cssMode&&d(t.params.history.key,t.activeIndex)})}},645:(e,t,s)=>{function a(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e,t){void 0===e&&(e={}),void 0===t&&(t={});const s=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>s.indexOf(e)<0).forEach(s=>{void 0===e[s]?e[s]=t[s]:a(t[s])&&a(e[s])&&Object.keys(t[s]).length>0&&i(e[s],t[s])})}s.d(t,{a:()=>o,g:()=>n});const r={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function n(){const e="undefined"!=typeof document?document:{};return i(e,r),e}const l={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function o(){const e="undefined"!=typeof window?window:{};return i(e,l),e}},663:(e,t,s)=>{function a(e){const{effect:t,swiper:s,on:a,setTranslate:i,setTransition:r,overwriteParams:n,perspective:l,recreateShadows:o,getEffectParams:d}=e;let c;a("beforeInit",()=>{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&&l()&&s.classNames.push(`${s.params.containerModifierClass}3d`);const e=n?n():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)}),a("setTranslate _virtualUpdated",()=>{s.params.effect===t&&i()}),a("setTransition",(e,a)=>{s.params.effect===t&&r(a)}),a("transitionEnd",()=>{if(s.params.effect===t&&o){if(!d||!d().slideShadows)return;s.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),o()}}),a("virtualUpdate",()=>{s.params.effect===t&&(s.slides.length||(c=!0),requestAnimationFrame(()=>{c&&s.slides&&s.slides.length&&(i(),c=!1)}))})}s.d(t,{e:()=>a})},760:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(645),i=s(774);function r(e){let{swiper:t,extendParams:s,emit:r,on:n}=e,l=!1;const o=(0,a.g)(),d=(0,a.a)();s({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(e,s){if(t.virtual&&t.params.virtual.enabled){const e=t.slides.find(e=>e.getAttribute("data-hash")===s);if(!e)return 0;return parseInt(e.getAttribute("data-swiper-slide-index"),10)}return t.getSlideIndex((0,i.e)(t.slidesEl,`.${t.params.slideClass}[data-hash="${s}"], swiper-slide[data-hash="${s}"]`)[0])}}});const c=()=>{r("hashChange");const e=o.location.hash.replace("#",""),s=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex];if(e!==(s?s.getAttribute("data-hash"):"")){const s=t.params.hashNavigation.getSlideIndex(t,e);if(void 0===s||Number.isNaN(s))return;t.slideTo(s)}},p=()=>{if(!l||!t.params.hashNavigation.enabled)return;const e=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex],s=e?e.getAttribute("data-hash")||e.getAttribute("data-history"):"";t.params.hashNavigation.replaceState&&d.history&&d.history.replaceState?(d.history.replaceState(null,null,`#${s}`||""),r("hashSet")):(o.location.hash=s||"",r("hashSet"))};n("init",()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;l=!0;const e=o.location.hash.replace("#","");if(e){const s=0,a=t.params.hashNavigation.getSlideIndex(t,e);t.slideTo(a||0,s,t.params.runCallbacksOnInit,!0)}t.params.hashNavigation.watchState&&d.addEventListener("hashchange",c)})()}),n("destroy",()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&d.removeEventListener("hashchange",c)}),n("transitionEnd _freeModeNoMomentumRelease",()=>{l&&p()}),n("slideChange",()=>{l&&t.params.cssMode&&p()})}},774:(e,t,s)=>{s.d(t,{a:()=>u,b:()=>T,c:()=>w,d:()=>b,e:()=>f,f:()=>l,g:()=>h,h:()=>C,i:()=>S,j:()=>i,k:()=>o,l:()=>M,m:()=>P,n:()=>n,o:()=>d,p:()=>L,q:()=>x,r:()=>E,s:()=>A,t:()=>y,u:()=>m,v:()=>v,w:()=>g,x:()=>p,y:()=>r});var a=s(645);function i(e){return void 0===e&&(e=""),e.trim().split(" ").filter(e=>!!e.trim())}function r(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}function n(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function l(){return Date.now()}function o(e,t){void 0===t&&(t="x");const s=(0,a.a)();let i,r,n;const l=function(e){const t=(0,a.a)();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(r=l.transform||l.webkitTransform,r.split(",").length>6&&(r=r.split(", ").map(e=>e.replace(",",".")).join(", ")),n=new s.WebKitCSSMatrix("none"===r?"":r)):(n=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=n.toString().split(",")),"x"===t&&(r=s.WebKitCSSMatrix?n.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(r=s.WebKitCSSMatrix?n.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),r||0}function d(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function c(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function p(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let s=1;st.indexOf(e)<0);for(let t=0,i=s.length;tn?"next":"prev",p=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{l=(new Date).getTime(),null===o&&(o=l);const e=Math.max(Math.min((l-o)/d,1),0),a=.5-Math.cos(e*Math.PI)/2;let c=n+a*(s-n);if(p(c,s)&&(c=s),t.wrapperEl.scrollTo({[i]:c}),p(c,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[i]:c})}),void r.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=r.requestAnimationFrame(u)};u()}function h(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function f(e,t){void 0===t&&(t="");const s=(0,a.a)(),i=[...e.children];return s.HTMLSlotElement&&e instanceof HTMLSlotElement&&i.push(...e.assignedElements()),t?i.filter(e=>e.matches(t)):i}function g(e,t){const s=(0,a.a)();let i=t.contains(e);if(!i&&s.HTMLSlotElement&&t instanceof HTMLSlotElement){i=[...t.assignedElements()].includes(e),i||(i=function(e,t){const s=[t];for(;s.length>0;){const t=s.shift();if(e===t)return!0;s.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t))}return i}function v(e){try{return void console.warn(e)}catch(e){}}function w(e,t){void 0===t&&(t=[]);const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:i(t)),s}function b(e){const t=(0,a.a)(),s=(0,a.g)(),i=e.getBoundingClientRect(),r=s.body,n=e.clientTop||r.clientTop||0,l=e.clientLeft||r.clientLeft||0,o=e===t?t.scrollY:e.scrollTop,d=e===t?t.scrollX:e.scrollLeft;return{top:i.top+o-n,left:i.left+d-l}}function y(e,t){const s=[];for(;e.previousElementSibling;){const a=e.previousElementSibling;t?a.matches(t)&&s.push(a):s.push(a),e=a}return s}function E(e,t){const s=[];for(;e.nextElementSibling;){const a=e.nextElementSibling;t?a.matches(t)&&s.push(a):s.push(a),e=a}return s}function x(e,t){return(0,a.a)().getComputedStyle(e,null).getPropertyValue(t)}function S(e){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&&(t+=1);return t}}function T(e,t){const s=[];let a=e.parentElement;for(;a;)t?a.matches(t)&&s.push(a):s.push(a),a=a.parentElement;return s}function M(e,t){t&&e.addEventListener("transitionend",function s(a){a.target===e&&(t.call(e,a),e.removeEventListener("transitionend",s))})}function C(e,t,s){const i=(0,a.a)();return s?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function P(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function L(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}function A(e,t){void 0===t&&(t=""),"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}},777:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(774);function i(e){let{swiper:t,extendParams:s,on:i}=e;function r(e,t){const s=function(){let e,t,s;return(a,i)=>{for(t=-1,e=a.length;e-t>1;)s=e+t>>1,a[s]<=i?t=s:e=s;return e}}();let a,i;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(i=s(this.x,e),a=i-1,(e-this.x[a])*(this.y[i]-this.y[a])/(this.x[i]-this.x[a])+this.y[a]):0},this}function n(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}s({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},i("beforeInit",()=>{if("undefined"!=typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){return void("string"==typeof t.params.controller.control?[...document.querySelectorAll(t.params.controller.control)]:[t.params.controller.control]).forEach(e=>{if(t.controller.control||(t.controller.control=[]),e&&e.swiper)t.controller.control.push(e.swiper);else if(e){const s=`${t.params.eventsPrefix}init`,a=i=>{t.controller.control.push(i.detail[0]),t.update(),e.removeEventListener(s,a)};e.addEventListener(s,a)}})}t.controller.control=t.params.controller.control}),i("update",()=>{n()}),i("resize",()=>{n()}),i("observerUpdate",()=>{n()}),i("setTranslate",(e,s,a)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(s,a)}),i("setTransition",(e,s,a)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(s,a)}),Object.assign(t.controller,{setTranslate:function(e,s){const a=t.controller.control;let i,n;const l=t.constructor;function o(e){if(e.destroyed)return;const s=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){t.controller.spline=t.params.loop?new r(t.slidesGrid,e.slidesGrid):new r(t.snapGrid,e.snapGrid)}(e),n=-t.controller.spline.interpolate(-s)),n&&"container"!==t.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),!Number.isNaN(i)&&Number.isFinite(i)||(i=1),n=(s-t.minTranslate())*i+e.minTranslate()),t.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(a))for(let e=0;e{s.updateAutoHeight()}),(0,a.l)(s.wrapperEl,()=>{r&&s.transitionEnd()})))}if(Array.isArray(r))for(n=0;n{s.d(t,{A:()=>l});var a=s(412),i=s(663),r=s(222),n=s(774);function l(e){let{swiper:t,extendParams:s,on:l}=e;s({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});(0,i.e)({effect:"coverflow",swiper:t,on:l,setTranslate:()=>{const{width:e,height:s,slides:i,slidesSizesGrid:l}=t,o=t.params.coverflowEffect,d=t.isHorizontal(),c=t.translate,p=d?e/2-c:s/2-c,u=d?o.rotate:-o.rotate,m=o.depth,h=(0,n.p)(t);for(let e=0,t=i.length;e0?c:0),s&&(s.style.opacity=-c>0?-c:0)}}},setTransition:e=>{t.slides.map(e=>(0,n.g)(e)).forEach(t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(t=>{t.style.transitionDuration=`${e}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}},864:(e,t,s)=>{s.d(t,{A:()=>a.S});var a=s(141),i=s(198),r=s(606),n=s(227),l=s(275),o=s(169),d=s(577),c=s(972),p=s(476),u=s(777),m=s(49),h=s(631),f=s(760),g=s(250),v=s(506),w=s(257),b=s(433),y=s(630),E=s(309),x=s(928),S=s(2),T=s(792),M=s(591),C=s(148);const P=[i.A,r.A,n.A,l.A,o.A,d.A,c.A,p.A,u.A,m.A,h.A,f.A,g.A,v.A,w.A,b.A,y.A,E.A,x.A,S.A,T.A,M.A,C.A];a.S.use(P)},902:(e,t,s)=>{s.d(t,{e:()=>i});var a=s(774);function i(e){let{swiper:t,duration:s,transformElements:i,allSlides:r}=e;const{activeIndex:n}=t;if(t.params.virtualTranslate&&0!==s){let e,s=!1;e=r?i:i.filter(e=>{const s=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.find(t=>t.shadowRoot&&t.shadowRoot===e.parentNode);return e.parentElement})(e):e;return t.getSlideIndex(s)===n}),e.forEach(e=>{(0,a.l)(e,()=>{if(s)return;if(!t||t.destroyed)return;s=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)})})}}},928:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(663),i=s(774);function r(e){let{swiper:t,extendParams:s,on:r}=e;s({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const n=(e,t,s)=>{let a=s?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),r=s?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");a||(a=(0,i.c)("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"left":"top")).split(" ")),e.append(a)),r||(r=(0,i.c)("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"right":"bottom")).split(" ")),e.append(r)),a&&(a.style.opacity=Math.max(-t,0)),r&&(r.style.opacity=Math.max(t,0))};(0,a.e)({effect:"cube",swiper:t,on:r,setTranslate:()=>{const{el:e,wrapperEl:s,slides:a,width:r,height:l,rtlTranslate:o,size:d,browser:c}=t,p=(0,i.p)(t),u=t.params.cubeEffect,m=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled;let f,g=0;u.shadow&&(m?(f=t.wrapperEl.querySelector(".swiper-cube-shadow"),f||(f=(0,i.c)("div","swiper-cube-shadow"),t.wrapperEl.append(f)),f.style.height=`${r}px`):(f=e.querySelector(".swiper-cube-shadow"),f||(f=(0,i.c)("div","swiper-cube-shadow"),e.append(f))));for(let e=0;e-1&&(g=90*s+90*l,o&&(g=90*-s-90*l)),t.style.transform=w,u.slideShadows&&n(t,l,m)}if(s.style.transformOrigin=`50% 50% -${d/2}px`,s.style["-webkit-transform-origin"]=`50% 50% -${d/2}px`,u.shadow)if(m)f.style.transform=`translate3d(0px, ${r/2+u.shadowOffset}px, ${-r/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${u.shadowScale})`;else{const e=Math.abs(g)-90*Math.floor(Math.abs(g)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=u.shadowScale,a=u.shadowScale/t,i=u.shadowOffset;f.style.transform=`scale3d(${s}, 1, ${a}) translate3d(0px, ${l/2+i}px, ${-l/2/a}px) rotateX(-89.99deg)`}const v=(c.isSafari||c.isWebView)&&c.needPerspectiveFix?-d/2:0;s.style.transform=`translate3d(0px,0,${v}px) rotateX(${p(t.isHorizontal()?0:g)}deg) rotateY(${p(t.isHorizontal()?-g:0)}deg)`,s.style.setProperty("--swiper-cube-translate-z",`${v}px`)},setTransition:e=>{const{el:s,slides:a}=t;if(a.forEach(t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(t=>{t.style.transitionDuration=`${e}ms`})}),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=s.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach(t=>{const s=Math.max(Math.min(t.progress,1),-1);n(t,s,e)})},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}},972:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(774);function i(e){let{swiper:t,extendParams:s,on:i}=e;s({parallax:{enabled:!1}});const r="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",n=(e,s)=>{const{rtl:a}=t,i=a?-1:1,r=e.getAttribute("data-swiper-parallax")||"0";let n=e.getAttribute("data-swiper-parallax-x"),l=e.getAttribute("data-swiper-parallax-y");const o=e.getAttribute("data-swiper-parallax-scale"),d=e.getAttribute("data-swiper-parallax-opacity"),c=e.getAttribute("data-swiper-parallax-rotate");if(n||l?(n=n||"0",l=l||"0"):t.isHorizontal()?(n=r,l="0"):(l=r,n="0"),n=n.indexOf("%")>=0?parseInt(n,10)*s*i+"%":n*s*i+"px",l=l.indexOf("%")>=0?parseInt(l,10)*s+"%":l*s+"px",null!=d){const t=d-(d-1)*(1-Math.abs(s));e.style.opacity=t}let p=`translate3d(${n}, ${l}, 0px)`;if(null!=o){p+=` scale(${o-(o-1)*(1-Math.abs(s))})`}if(c&&null!=c){p+=` rotate(${c*s*-1}deg)`}e.style.transform=p},l=()=>{const{el:e,slides:s,progress:i,snapGrid:l,isElement:o}=t,d=(0,a.e)(e,r);t.isElement&&d.push(...(0,a.e)(t.hostEl,r)),d.forEach(e=>{n(e,i)}),s.forEach((e,s)=>{let a=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(a+=Math.ceil(s/2)-i*(l.length-1)),a=Math.min(Math.max(a,-1),1),e.querySelectorAll(`${r}, [data-swiper-parallax-rotate]`).forEach(e=>{n(e,a)})})};i("beforeInit",()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)}),i("init",()=>{t.params.parallax.enabled&&l()}),i("setTranslate",()=>{t.params.parallax.enabled&&l()}),i("setTransition",(e,s)=>{t.params.parallax.enabled&&function(e){void 0===e&&(e=t.params.speed);const{el:s,hostEl:a}=t,i=[...s.querySelectorAll(r)];t.isElement&&i.push(...a.querySelectorAll(r)),i.forEach(t=>{let s=parseInt(t.getAttribute("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),t.style.transitionDuration=`${s}ms`})}(s)})}}},t={};function s(a){var i=t[a];if(void 0!==i)return i.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,s),r.exports}s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a=s(864);window.JetpackSwiper=a.A})();; !function(){"use strict";var e,t={noop:function(){},texturize:function(e){return(e=(e=(e=(e+="").replace(/'/g,"’").replace(/'/g,"’")).replace(/"/g,"”").replace(/"/g,"”").replace(/"/g,"”").replace(/[\u201D]/g,"”")).replace(/([\w]+)=&#[\d]+;(.+?)&#[\d]+;/g,'$1="$2"')).trim()},applyReplacements:function(e,t){if(e)return t?e.replace(/{(\d+)}/g,function(e,r){return void 0!==t[r]?t[r]:e}):e},getBackgroundImage:function(e){var t=document.createElement("canvas"),r=t.getContext&&t.getContext("2d");if(e){r.filter="blur(20px) ",r.drawImage(e,0,0);var o=t.toDataURL("image/png");return t=null,o}}},r=function(){function e(e,t){return Element.prototype.matches?e.matches(t):Element.prototype.msMatchesSelector?e.msMatchesSelector(t):void 0}function r(e,t,r,o){if(!e)return o();e.style.removeProperty("display"),e.style.opacity=t,e.style.pointerEvents="none";var a=function(i,n){var l=(performance.now()-i)/n;l<1?(e.style.opacity=t+(r-t)*l,requestAnimationFrame(()=>a(i,n))):(e.style.opacity=r,e.style.removeProperty("pointer-events"),o())};requestAnimationFrame(function(){requestAnimationFrame(function(){a(performance.now(),200)})})}return{closest:function(t,r){if(t.closest)return t.closest(r);var o=t;do{if(e(o,r))return o;o=o.parentElement||o.parentNode}while(null!==o&&1===o.nodeType);return null},matches:e,hide:function(e){e&&(e.style.display="none")},show:function(e){e&&(e.style.display="block")},fadeIn:function(e,o){r(e,0,1,o=o||t.noop)},fadeOut:function(e,o){o=o||t.noop,r(e,1,0,function(){e&&(e.style.display="none"),o()})},scrollToElement:function(e,t,r){if(!e||!t)return r?r():void 0;var o=t.querySelector(".jp-carousel-info-extra");o&&(o.style.minHeight=window.innerHeight-64+"px");var a=!0,i=Date.now(),n=t.scrollTop,l=Math.max(0,e.offsetTop-Math.max(0,window.innerHeight-function(e){var t=e.querySelector(".jp-carousel-info-footer"),r=e.querySelector(".jp-carousel-info-extra"),o=e.querySelector(".jp-carousel-info-content-wrapper");if(t&&r&&o){var a=window.getComputedStyle(r),i=parseInt(a.paddingTop,10)+parseInt(a.paddingBottom,10);return i=isNaN(i)?0:i,o.offsetHeight+t.offsetHeight+i}return 0}(t)))-t.scrollTop;function s(){a=!1}l=Math.min(l,t.scrollHeight-window.innerHeight),t.addEventListener("wheel",s),function e(){var c,u=Date.now(),d=(c=(u-i)/300)<.5?2*c*c:1-Math.pow(-2*c+2,2)/2,p=(d=d>1?1:d)*l;if(t.scrollTop=n+p,u<=i+300&&a)return requestAnimationFrame(e);r&&r(),o&&(o.style.minHeight=""),a=!1,t.removeEventListener("wheel",s)}()},getJSONAttribute:function(e,t){if(e&&e.hasAttribute(t))try{return JSON.parse(e.getAttribute(t))}catch{return}},convertToPlainText:function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML},stripHTML:function(e){return e.replace(/<[^>]*>?/gm,"")},emitEvent:function(e,t,r){var o;try{o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r||null})}catch{(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,r||null)}e.dispatchEvent(o)},isTouch:function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}}}();function o(){var o,a,i,n,l="",s=!1,c="div.gallery, div.tiled-gallery, ul.wp-block-gallery, ul.blocks-gallery-grid, figure.wp-block-gallery.has-nested-images, div.wp-block-jetpack-tiled-gallery, a.single-image-gallery",u=".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item",d=u+", .wp-block-image",p={},m="undefined"!=typeof wpcom&&wpcom.carousel&&wpcom.carousel.stat?wpcom.carousel.stat:t.noop,g="undefined"!=typeof wpcom&&wpcom.carousel&&wpcom.carousel.pageview?wpcom.carousel.pageview:t.noop;function h(t){if(!s)switch(t.which){case 38:t.preventDefault(),p.overlay.scrollTop-=100;break;case 40:t.preventDefault(),p.overlay.scrollTop+=100;break;case 39:t.preventDefault(),e.slideNext();break;case 37:case 8:t.preventDefault(),e.slidePrev();break;case 27:t.preventDefault(),k()}}function f(){s=!0}function v(){s=!1}function y(e){e.role="button",e.tabIndex=0,e.ariaLabel=jetpackCarouselStrings.image_label}function w(){p.overlay||(p.overlay=document.querySelector(".jp-carousel-overlay"),p.container=p.overlay.querySelector(".jp-carousel-wrap"),p.gallery=p.container.querySelector(".jp-carousel"),p.info=p.overlay.querySelector(".jp-carousel-info"),p.caption=p.info.querySelector(".jp-carousel-caption"),p.commentField=p.overlay.querySelector("#jp-carousel-comment-form-comment-field"),p.emailField=p.overlay.querySelector("#jp-carousel-comment-form-email-field"),p.authorField=p.overlay.querySelector("#jp-carousel-comment-form-author-field"),p.urlField=p.overlay.querySelector("#jp-carousel-comment-form-url-field"),window.innerWidth<=760&&Math.round(window.innerWidth/760*110)<40&&r.isTouch(),[p.commentField,p.emailField,p.authorField,p.urlField].forEach(function(e){e&&(e.addEventListener("focus",f),e.addEventListener("blur",v))}),p.overlay.addEventListener("click",function(e){var t,o,a=e.target,i=!!r.closest(a,".jp-carousel-close-hint"),n=!!window.matchMedia("(max-device-width: 760px)").matches;a===p.overlay?n||k():i?k():a.classList.contains("jp-carousel-image-download")?m("download_original_click"):a.classList.contains("jp-carousel-comment-login")?(t=p.currentSlide,o=t?t.attrs.attachmentId:"0",window.location.href=jetpackCarouselStrings.login_url+"%23jp-carousel-"+o):r.closest(a,"#jp-carousel-comment-form-container")?function(e){var t=e.target,o=r.getJSONAttribute(p.container,"data-carousel-extra")||{},a=p.currentSlide.attrs.attachmentId,i=document.querySelector("#jp-carousel-comment-form-submit-and-info-wrapper"),n=document.querySelector("#jp-carousel-comment-form-spinner"),l=document.querySelector("#jp-carousel-comment-form-button-submit"),s=document.querySelector("#jp-carousel-comment-form");if(p.commentField&&p.commentField.getAttribute("id")===t.getAttribute("id"))f(),r.show(i);else if(r.matches(t,'input[type="submit"]')){e.preventDefault(),e.stopPropagation(),r.show(n),s.classList.add("jp-carousel-is-disabled");var c={action:"post_attachment_comment",nonce:jetpackCarouselStrings.nonce,blog_id:o.blog_id,id:a,comment:p.commentField.value};if(!c.comment.length)return void j(jetpackCarouselStrings.no_comment_text,!1);if(1!==Number(jetpackCarouselStrings.is_logged_in)&&(c.email=p.emailField.value,c.author=p.authorField.value,c.url=p.urlField.value,1===Number(jetpackCarouselStrings.require_name_email))){if(!c.email.length||!c.email.match("@"))return void j(jetpackCarouselStrings.no_comment_email,!1);if(!c.author.length)return void j(jetpackCarouselStrings.no_comment_author,!1)}var u=new XMLHttpRequest;u.open("POST",jetpackCarouselStrings.ajaxurl,!0),u.setRequestHeader("X-Requested-With","XMLHttpRequest"),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.onreadystatechange=function(){if(this.readyState===XMLHttpRequest.DONE&&this.status>=200&&this.status<300){var e;try{e=JSON.parse(this.response)}catch{return void j(jetpackCarouselStrings.comment_post_error,!1)}"approved"===e.comment_status?j(jetpackCarouselStrings.comment_approved,!0):"unapproved"===e.comment_status?j(jetpackCarouselStrings.comment_unapproved,!0):j(jetpackCarouselStrings.comment_post_error,!1),I(),_(a),l.value=jetpackCarouselStrings.post_comment,r.hide(n),s.classList.remove("jp-carousel-is-disabled")}else j(jetpackCarouselStrings.comment_post_error,!1)};var d=[];for(var m in c)if(m){var g=encodeURIComponent(m)+"="+encodeURIComponent(c[m]);d.push(g.replace(/%20/g,"+"))}var h=d.join("&");u.send(h)}}(e):(r.closest(a,".jp-carousel-photo-icons-container")||a.classList.contains("jp-carousel-photo-title"))&&function(e){e.preventDefault();var t=e.target,o=p.info.querySelector(".jp-carousel-info-extra"),a=p.info.querySelector(".jp-carousel-image-meta"),i=p.info.querySelector(".jp-carousel-comments-wrapper"),n=p.info.querySelector(".jp-carousel-icon-info"),l=p.info.querySelector(".jp-carousel-icon-comments");function s(){l&&l.classList.remove("jp-carousel-selected"),n.classList.toggle("jp-carousel-selected"),i&&i.classList.remove("jp-carousel-show"),a&&(a.classList.toggle("jp-carousel-show"),a.classList.contains("jp-carousel-show")?o.classList.add("jp-carousel-show"):o.classList.remove("jp-carousel-show"))}function c(){n&&n.classList.remove("jp-carousel-selected"),l.classList.toggle("jp-carousel-selected"),a&&a.classList.remove("jp-carousel-show"),i&&(i.classList.toggle("jp-carousel-show"),i.classList.contains("jp-carousel-show")?o.classList.add("jp-carousel-show"):o.classList.remove("jp-carousel-show"))}(r.closest(t,".jp-carousel-icon-info")||t.classList.contains("jp-carousel-photo-title"))&&(a&&a.classList.contains("jp-carousel-show")?r.scrollToElement(p.overlay,p.overlay,s):(s(),r.scrollToElement(p.info,p.overlay))),r.closest(t,".jp-carousel-icon-comments")&&(i&&i.classList.contains("jp-carousel-show")?r.scrollToElement(p.overlay,p.overlay,c):(c(),r.scrollToElement(p.info,p.overlay)))}(e)}),window.addEventListener("keydown",h),p.overlay.addEventListener("jp_carousel.afterOpen",function(){v(),p.slides.length<=1||(p.slides.length<=5?r.show(p.info.querySelector(".jp-swiper-pagination")):r.show(p.info.querySelector(".jp-carousel-pagination")))}),p.overlay.addEventListener("jp_carousel.beforeClose",function(){f(),document.documentElement.style.removeProperty("height"),e&&e.enable(),r.hide(p.info.querySelector(".jp-swiper-pagination")),r.hide(p.info.querySelector(".jp-carousel-pagination"))}),p.overlay.addEventListener("jp_carousel.afterClose",function(){window.history.pushState?history.pushState("",document.title,window.location.pathname+window.location.search):window.location.href="",l="",p.isOpen=!1}),p.overlay.addEventListener("touchstart",function(e){e.touches.length>1&&e.preventDefault()}))}function j(e,t){var o=p.overlay.querySelector("#jp-carousel-comment-post-results"),a="jp-carousel-comment-post-"+(t?"success":"error");o.innerHTML=''+e+"",r.hide(p.overlay.querySelector("#jp-carousel-comment-form-spinner")),p.overlay.querySelector("#jp-carousel-comment-form").classList.remove("jp-carousel-is-disabled"),r.show(o)}function b(){var e=document.querySelectorAll("a img[data-attachment-id]");Array.prototype.forEach.call(e,function(e){var t=e.parentElement,o=t.parentElement;if(!o.classList.contains("gallery-icon")&&!r.closest(o,u)&&t.hasAttribute("href")){var a=!1;t.getAttribute("href").split("?")[0]===e.getAttribute("data-orig-file").split("?")[0]&&1===Number(jetpackCarouselStrings.single_image_gallery_media_file)&&(a=!0),t.getAttribute("href")===e.getAttribute("data-permalink")&&(a=!0),a&&(y(e),t.classList.add("single-image-gallery"),t.setAttribute("data-carousel-extra",JSON.stringify({blog_id:Number(jetpackCarouselStrings.blog_id)})))}})}function S(t,r){p.isOpen?(L(r),e.slideTo(r+1)):F(t,{startIndex:r})}function L(e){(!e||e<0||e>p.slides.length)&&(e=0),p.currentSlide=p.slides[e];var o,a,i=p.currentSlide,n=i.attrs.attachmentId;H(p.slides[e]),function(e){var t=[],r=p.slides.length;if(r>1){var o=e>0?e-1:r-1;t.push(o);var a=e
"+jetpackCarouselStrings[o]+"
"+a+""}}t.innerHTML=r,t.style.removeProperty("display")}(p.slides[e].attrs.imageMeta),function(e){if(!e)return!1;var r,o=[e.attrs.origWidth,e.attrs.origHeight],a=document.createElement("a");a.href=e.attrs.src.replace(/\?.+$/,""),r=null!==a.hostname.match(/^i[\d]{1}\.wp\.com$/i)?a.href:e.attrs.origFile.replace(/\?.+$/,"");var i=p.info.querySelector(".jp-carousel-download-text"),n=p.info.querySelector(".jp-carousel-image-download");i.innerHTML=t.applyReplacements(jetpackCarouselStrings.download_original,o),n.setAttribute("href",r),n.style.removeProperty("display")}(i),1===Number(jetpackCarouselStrings.display_comments)&&(o=p.slides[e].attrs.commentsOpened,a=p.info.querySelector("#jp-carousel-comment-form-container"),1===parseInt(o,10)?r.fadeIn(a):r.fadeOut(a),_(n),r.hide(p.info.querySelector("#jp-carousel-comment-post-results")));var s=p.info.querySelector(".jp-carousel-pagination");if(s&&p.slides.length>5){var c=e+1;s.innerHTML=""+c+" / "+p.slides.length+""}jetpackCarouselStrings.stats&&p.isOpen&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+jetpackCarouselStrings.stats+"&post="+encodeURIComponent(n)+"&rand="+Math.random()),p.isOpen&&g(n),l="#jp-carousel-"+n,window.location.hash=l}function k(){document.body.style.overflow=a,document.documentElement.style.overflow=i,I(),f(),r.emitEvent(p.overlay,"jp_carousel.beforeClose"),window.scrollTo(window.scrollX||window.pageXOffset||0,n||0),p.isOpen=!1,e.destroy(),p.slides=[],p.currentSlide=void 0,p.gallery.innerHTML="",r.fadeOut(p.overlay,function(){r.emitEvent(p.overlay,"jp_carousel.afterClose")})}function x(e){if("object"!=typeof e&&(e={}),void 0===e.origFile)return"";if(void 0===e.origWidth||void 0===e.maxWidth)return e.origFile;if(void 0===e.mediumFile||void 0===e.largeFile)return e.origFile;var t=document.createElement("a");t.href=e.largeFile;var r=/^i[0-2]\.wp\.com$/i.test(t.hostname),o=q(e.largeFile,e.origWidth,r),a=parseInt(o[0],10),i=parseInt(o[1],10);if(e.origMaxWidth=e.maxWidth,e.origMaxHeight=e.maxHeight,void 0!==window.devicePixelRatio&&window.devicePixelRatio>1&&(e.maxWidth=e.maxWidth*window.devicePixelRatio,e.maxHeight=e.maxHeight*window.devicePixelRatio),a>=e.maxWidth||i>=e.maxHeight)return e.largeFile;var n=q(e.mediumFile,e.origWidth,r),l=parseInt(n[0],10),s=parseInt(n[1],10);if(l>=e.maxWidth||s>=e.maxHeight)return e.mediumFile;if(r){if(-1===e.largeFile.lastIndexOf("?"))return e.largeFile;var c=function(e){var t;try{t=new URL(e)}catch(t){return e}var r=["quality","ssl","filter","brightness","contrast","colorize","smooth"],o=Array.from(t.searchParams.entries());return t.search="",o.forEach(([e,o])=>{r.includes(e)&&t.searchParams.append(e,o)}),t}(e.largeFile);return(e.origWidth>e.maxWidth||e.origHeight>e.maxHeight)&&(e.origMaxWidth=2*e.maxWidth,e.origMaxHeight=2*e.maxHeight,c.searchParams.set("fit",e.origMaxWidth+","+e.origMaxHeight)),c.toString()}return e.origFile}function q(e,t,r){var o,a=r?e.replace(/.*=([\d]+%2C[\d]+).*$/,"$1"):e.replace(/.*-([\d]+x[\d]+)\..+$/,"$1");return"9999"===(o=a!==e?r?a.split("%2C"):a.split("x"):[t,0])[0]&&(o[0]="0"),"9999"===o[1]&&(o[1]="0"),o}function A(e){return e>=1?Math.round(10*e)/10+"s":"1/"+Math.round(1/e)+"s"}function E(e){return!e.match(" ")&&e.match("_")?"":e}function _(e,t){var a=void 0===t,i=p.info.querySelector(".jp-carousel-icon-comments .jp-carousel-has-comments-indicator");if(i.classList.remove("jp-carousel-show"),clearInterval(o),e){(!t||t<1)&&(t=0);var n=p.info.querySelector(".jp-carousel-comments"),l=p.info.querySelector("#jp-carousel-comments-loading");r.show(l),a&&(r.hide(n),n.innerHTML="");var s=new XMLHttpRequest,c=jetpackCarouselStrings.ajaxurl+"?action=get_attachment_comments&nonce="+jetpackCarouselStrings.nonce+"&id="+e+"&offset="+t;s.open("GET",c),s.setRequestHeader("X-Requested-With","XMLHttpRequest");var u=function(){r.fadeIn(n),r.fadeOut(l)};s.onload=function(){if(p.currentSlide&&p.currentSlide.attrs.attachmentId===e){var c,d=s.status>=200&&s.status<300;try{c=JSON.parse(s.responseText)}catch{}if(!d||!c||!Array.isArray(c))return u();a&&(n.innerHTML="");for(var m=0;m'+g.gravatar_markup+'
'+g.author_markup+'
'+g.date_gmt+"
"+g.content+"
",n.appendChild(h),clearInterval(o),o=setInterval(function(){p.container.scrollTop+150>window.innerHeight&&(_(e,t+10),clearInterval(o))},300)}c.length>0&&(r.show(n),i.innerText=c.length,i.classList.add("jp-carousel-show")),r.hide(l)}},s.onerror=u,s.send()}}function H(e){var t=e.el,r=e.attrs,o=t.querySelector("img");if(!o.hasAttribute("data-loaded")){var a=!!r.previewImage,i=r.thumbSize;!a||i&&t.offsetWidth>i.width?o.src=r.src:o.src=r.previewImage,o.setAttribute("itemprop","image"),o.setAttribute("data-loaded",1)}}function T(t){var r=t.el;e&&e.slides&&(r=e.slides[e.activeIndex]);var o=t.attrs.originalElement;o.complete&&0!==o.naturalHeight?C(t,r,o):o.onload=function(){C(t,r,o)}}function C(e,r,o){var a=t.getBackgroundImage(o);e.backgroundImage=a,r.style.backgroundImage="url("+a+")",r.style.backgroundSize="cover"}function I(){p.commentField&&(p.commentField.value="")}function M(e,o){p.slides=[];var a={width:window.innerWidth,height:window.innerHeight-64};0!==o&&null!==e[o].getAttribute("data-gallery-src")&&((new Image).src=e[o].getAttribute("data-gallery-src"));var i=!!r.closest(e[0],".tiled-gallery.type-rectangular");Array.prototype.forEach.call(e,function(e,o){var n=r.closest(e,"a"),l=e.getAttribute("data-orig-file")||e.getAttribute("src-orig"),s=e.getAttribute("data-attachment-id")||e.getAttribute("data-id")||"0",c=document.querySelector('img[data-attachment-id="'+s+'"] + figcaption');c=c?c.innerHTML:e.getAttribute("data-image-caption");var u={originalElement:e,attachmentId:s,commentsOpened:e.getAttribute("data-comments-opened")||"0",imageMeta:r.getJSONAttribute(e,"data-image-meta")||{},title:e.getAttribute("data-image-title")||"",desc:e.getAttribute("data-image-description")||"",mediumFile:e.getAttribute("data-medium-file")||"",largeFile:e.getAttribute("data-large-file")||"",origFile:l||"",thumbSize:{width:e.naturalWidth,height:e.naturalHeight},caption:c||"",permalink:n&&n.getAttribute("href"),src:l||e.getAttribute("src")||""},d=r.closest(e,".tiled-gallery-item"),m=d&&d.querySelector(".tiled-gallery-caption"),g=m&&m.innerHTML;g&&(u.caption=g);var h=function(e){var t=e.getAttribute("data-orig-size")||"";if(t){var r=t.split(",");return{width:parseInt(r[0],10),height:parseInt(r[1],10)}}return{width:e.getAttribute("data-original-width")||e.getAttribute("width")||void 0,height:e.getAttribute("data-original-height")||e.getAttribute("height")||void 0}}(e);if(u.origWidth=h.width||u.thumbSize.width,u.origHeight=h.height||u.thumbSize.height,"undefined"!=typeof wpcom&&wpcom.carousel&&wpcom.carousel.generateImgSrc?u.src=wpcom.carousel.generateImgSrc(e,a):u.src=x({origFile:u.src,origWidth:u.origWidth,origHeight:u.origHeight,maxWidth:a.width,maxHeight:a.height,mediumFile:u.mediumFile,largeFile:u.largeFile}),e.setAttribute("data-gallery-src",u.src),"0"!==u.attachmentId){u.title=t.texturize(u.title),u.desc=t.texturize(u.desc),u.caption=t.texturize(u.caption);var f=new Image,v=document.createElement("div");v.classList.add("swiper-slide"),v.setAttribute("itemprop","associatedMedia"),v.setAttribute("itemscope",""),v.setAttribute("itemtype","https://schema.org/ImageObject");var y=document.createElement("div");y.classList.add("swiper-zoom-container"),p.gallery.appendChild(v),v.appendChild(y),y.appendChild(f),v.setAttribute("data-attachment-id",u.attachmentId),v.setAttribute("data-permalink",u.permalink),v.setAttribute("data-orig-file",u.origFile),i&&(u.previewImage=u.src);var w={el:v,attrs:u,index:o};p.slides.push(w)}})}function F(e,t){if(!window.JetpackSwiper){var o=document.querySelector("#jp-carousel-loading-overlay");r.show(o);var a=document.createElement("script");return a.id="jetpack-carousel-swiper-js",a.src=window.jetpackSwiperLibraryPath.url,a.async=!0,a.onload=function(){r.hide(o),O(e,t)},a.onerror=function(){r.hide(o)},void document.head.appendChild(a)}O(e,t)}function O(t,o){var l,s={imgSelector:".gallery-item [data-attachment-id], .tiled-gallery-item [data-attachment-id], img[data-attachment-id], img[data-id]",startIndex:0},c=r.getJSONAttribute(t,"data-carousel-extra");if(!c)return;const u=t.querySelectorAll(s.imgSelector);if(u.length&&(w(),!p.isOpen)){for(var d in p.isOpen=!0,a=getComputedStyle(document.body).overflow,document.body.style.overflow="hidden",i=getComputedStyle(document.documentElement).overflow,document.documentElement.style.overflow="hidden",n=window.scrollY||window.pageYOffset||0,p.container.setAttribute("data-carousel-extra",JSON.stringify(c)),m(["open","view_image"]),o||{})s[d]=o[d];-1===s.startIndex&&(s.startIndex=0),r.emitEvent(p.overlay,"jp_carousel.beforeOpen"),p.gallery.innerHTML="",p.overlay.style.opacity=1,p.overlay.style.display="block",M(u,s.startIndex),(e=new window.JetpackSwiper(".jp-carousel-swiper-container",{centeredSlides:!0,zoom:!0,loop:p.slides.length>1,enabled:p.slides.length>1,pagination:{el:".jp-swiper-pagination",clickable:!0},navigation:{nextEl:".jp-swiper-button-next",prevEl:".jp-swiper-button-prev"},initialSlide:s.startIndex,on:{init:function(){L(s.startIndex)}},preventClicks:!1,preventClicksPropagation:!1,preventInteractionOnTransition:!r.isTouch(),threshold:5})).on("slideChange",function(e){p.isOpen&&(L(e.realIndex),p.overlay.classList.remove("jp-carousel-hide-controls"))}),e.on("zoomChange",function(e,t){t>1&&p.overlay.classList.add("jp-carousel-hide-controls"),1===t&&p.overlay.classList.remove("jp-carousel-hide-controls")}),e.on("doubleTap",function(e){if(clearTimeout(l),1===e.zoom.scale)var t=setTimeout(function(){p.overlay.classList.remove("jp-carousel-hide-controls"),clearTimeout(t)},150)}),e.on("tap",function(){e.zoom.scale>1&&(l=setTimeout(function(){p.overlay.classList.toggle("jp-carousel-hide-controls")},150))}),r.fadeIn(p.overlay,function(){r.emitEvent(p.overlay,"jp_carousel.afterOpen")})}}function W(e){if("click"!==e.type){if("keydown"===e.type){const t=document.activeElement.parentElement,r=t&&t.classList.contains("tiled-gallery__item");" "!==e.key&&"Enter"!==e.key||!r||R(e)}}else R(e)}function N(e){var t=e.parentElement,o=t.parentElement,a=null;return o&&o.classList.contains("wp-block-image")?a=t.getAttribute("href"):t&&t.classList.contains("wp-block-image")&&t.querySelector(":scope > a")&&(a=t.querySelector(":scope > a").getAttribute("href")),!(a&&a.split("?")[0]!==e.getAttribute("data-orig-file").split("?")[0]&&a!==e.getAttribute("data-permalink")||t.classList.contains("gallery-caption")||r.matches(t,"figcaption"))}function R(e){if(window.CSS&&window.CSS.supports&&window.CSS.supports("display","grid")){var t,o=e.target,a=r.closest(o,c);if(a){if(!(t=a)||!t.getAttribute("data-carousel-extra"))return;if(!N(o))return;document.documentElement.style.height="auto",e.preventDefault(),e.stopPropagation();var i=r.closest(o,d),n=Array.prototype.indexOf.call(a.querySelectorAll(d),i);F(a,{startIndex:n})}}}document.body.addEventListener("click",W),document.body.addEventListener("keydown",W),document.querySelectorAll(u+"img").forEach(function(e){N(e)&&y(e)}),1===Number(jetpackCarouselStrings.single_image_gallery)&&(b(),document.body.addEventListener("is.post-load",function(){b()})),window.addEventListener("hashchange",function(){var e=/jp-carousel-(\d+)/;if(window.location.hash&&e.test(window.location.hash)){if(window.location.hash!==l||!p.isOpen)if(window.location.hash&&p.gallery&&!p.isOpen&&history.back)history.back();else{l=window.location.hash;for(var t=window.location.hash.match(e),r=parseInt(t[1],10),o=document.querySelectorAll(c),a=0;a { if (window.Swipe) { resolve(window.Swipe); } else { const swipeScript = document.createElement('script'); swipeScript.src = comment_like_text.swipeUrl; swipeScript.async = true; document.body.appendChild(swipeScript); swipeScript.addEventListener('load', () => resolve(window.Swipe)); swipeScript.addEventListener('error', error => reject(error)); } }); } return swipeLibPromise; } /** * Parse the comment ID from a comment like link. */ function getCommentId(link) { const commentId = link && link.getAttribute('href') && link.getAttribute('href').split('like_comment='); return commentId[1].split('&_wpnonce=')[0]; } /** * Handle an ajax action on the comment like link. */ function handleLinkAction(link, action, commentId, callback) { const nonce = link && link.getAttribute('href') && link.getAttribute('href').split('_wpnonce=')[1]; fetch('/wp-admin/admin-ajax.php', { method: 'POST', body: new URLSearchParams({ action: action, _wpnonce: nonce, like_comment: commentId, blog_id: Number(link.dataset.blog), }), headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With': 'XMLHttpRequest', Accept: 'application/json', 'cache-control': 'no-cache', pragma: 'no-cache', }, }) .then(response => response.json()) .then(callback); } function startPolling() { // Append cookie polling login iframe to this window to wait for user to finish logging in (or cancel) const loginIframe = document.createElement('iframe'); loginIframe.id = 'wp-login-polling-iframe'; loginIframe.src = 'https://wordpress.com/public.api/connect/?iframe=true'; document.body.appendChild(loginIframe); loginIframe.style.display = 'none'; } function stopPolling() { const iframe = document.querySelector('#wp-login-polling-iframe'); if (iframe) { iframe.remove(); } } function hide(el) { if (el && el.style) { el.style.display = 'none'; } } function show(el) { if (el && el.style) { el.style.removeProperty('display'); } } // Overlay used for displaying comment like info. class Overlay { constructor() { // Overlay element. this.el = document.createElement('div'); this.el.classList.add('comment-likes-overlay'); document.body.appendChild(this.el); hide(this.el); this.el.addEventListener('mouseenter', () => { // Don't hide the overlay if the user is mousing over it. overlay.cancelHide(); }); this.el.addEventListener('mouseleave', () => overlay.requestHide()); // Inner contents of overlay. this.innerEl = null; // Instance of the Swipe library. this.swipe = null; // Timeout used for hiding the overlay. this.hideTimeout = null; } // Initialise the overlay for use, removing any old content. clear() { // Unload any previous instance of Swipe (to avoid leaking a global // event handler). This is done before clearing the contents of the // overlay because Swipe expects the slides to still be present. if (this.swipe) { this.swipe.kill(); this.swipe = null; } this.el.innerHTML = ''; this.innerEl = document.createElement('div'); this.innerEl.classList.add('inner'); this.el.appendChild(this.innerEl); } /** * Construct a list (
    ) of user (gravatar, name) details. * * @param data liker data returned from the server * @param klass CSS class to apply to the
      element * @param start index of user to start at * @param length number of users to include in the list * * @return A container element with the list */ getUserBits(data, klass, start, length) { start = start || 0; let last = start + (length || data.length); last = last > data.length ? data.length : last; const container = document.createElement('div'); container.classList.add('liker-list'); let html = `'; container.innerHTML = html; return container; } /** * Render the display of who has liked this comment. The type of * display depends on how many people have liked the comment. * If more than 10 people have liked the comment, this function * renders navigation controls and sets up the Swipe library for * changing between pages. * * @param link the element over which the user is hovering * @param data the results retrieved from the server */ showLikes(link, data) { this.clear(); link.dataset.likeCount = data.length; if (data.length === 0) { // No likers after all. hide(this.el); return; } this.innerEl.style.padding = '12px'; if (data.length < 6) { // Only one column needed. this.innerEl.style.maxWidth = '200px'; this.innerEl.innerHTML = ''; this.innerEl.appendChild(this.getUserBits(data, 'single')); this.setPosition(link); } else if (data.length < 11) { // Two columns, but only one page. this.innerEl.innerHTML = ''; this.innerEl.appendChild(this.getUserBits(data, 'double')); this.setPosition(link); } else { // Multiple pages. this.renderLikesWithPagination(data, link); } } /** * Render multiple pages of likes with pagination controls. * This function is intended to be called by `showLikes` above. * * @param data the results retrieved from the server */ renderLikesWithPagination(data, link) { swipeLibLoader().then(() => { const page_count = Math.ceil(data.length / 10); // Swipe requires two nested containers. const swipe = document.createElement('div'); swipe.classList.add('swipe'); this.innerEl.appendChild(swipe); const wrap = document.createElement('div'); wrap.classList.add('swipe-wrap'); swipe.appendChild(wrap); for (let i = 0; i < page_count; ++i) { wrap.appendChild(this.getUserBits(data, 'double', i * 10, 10)); } /** * Navigation controls. * This is based on the Newdash controls found in * reader/recommendations-templates.php */ const nav = document.createElement('nav'); nav.classList.add('slider-nav'); let navContents = ` `; for (let i = 0; i < page_count; ++i) { navContents += ``; } navContents += ` `; this.innerEl.appendChild(nav); nav.innerHTML = navContents; /** Set up Swipe. **/ // Swipe cannot be set up successfully unless its container // is visible, so we show it now. show(this.el); this.setPosition(link); this.swipe = new Swipe(swipe, { callback: function (pos) { // Update the pagination indicators. // // If there are exactly two pages, Swipe has a weird // special case where it duplicates both pages and // can return index 2 and 3 even though those aren't // real pages (see swipe.js, line 47). To deal with // this, we use the expression `pos % page_count`. pos = pos % page_count; nav.querySelectorAll('em').forEach(em => { const page = Number(em.dataset.page); em.setAttribute('class', pos === page ? 'on' : ''); }); }, }); nav.querySelectorAll('em').forEach(em => { em.addEventListener('click', e => { // Go to the page corresponding to the indicator clicked. this.swipe.slide(Number(em.dataset.page)); e.preventDefault(); }); }); // Previous and next buttons. nav.querySelector('.prev').addEventListener('click', e => { this.swipe.prev(); e.preventDefault(); }); nav.querySelector('.next').addEventListener('click', e => { this.swipe.next(); e.preventDefault(); }); }); } /** * Open the overlay and show a loading message. */ showLoadingMessage(link) { this.clear(); this.innerEl.textContent = comment_like_text.loading; this.setPosition(link); } /** * Position the overlay near the current comment. * * @param link element near which to position the overlay */ setPosition(link) { // Prepare a down arrow icon for the bottom of the overlay. const icon = document.createElement('span'); this.el.appendChild(icon); icon.classList.add('icon', 'noticon', 'noticon-downarrow'); icon.style.textShadow = '0px 1px 1px rgb(223, 223, 223)'; const rect = link.getBoundingClientRect(); const win = document.defaultView; const offset = { top: rect.top + win.scrollY, left: rect.left + win.scrollX, }; // Take measurements with the element fully visible. show(this.el); let left = offset.left - (this.el.offsetWidth - link.offsetWidth) / 2; left = left < 5 ? 5 : left; let top = offset.top - this.el.offsetHeight + 5; hide(this.el); const adminBar = document.querySelector('#wpadminbar'); // Check if the overlay would appear off the screen. if (top < win.scrollY + ((adminBar && adminBar.offsetHeight) || 0)) { // We'll display the overlay beneath the link instead. top = offset.top + link.offsetHeight; // Instead of using the down arrow icon, use an up arrow. icon.remove(); this.el.prepend(icon); icon.classList.remove('noticon-downarrow'); icon.classList.add('noticon-uparrow'); icon.style.textShadow = '0px -1px 1px rgb(223, 223, 223)'; icon.style.verticalAlign = 'bottom'; } this.el.style.left = `${left}px`; this.el.style.top = `${top}px`; show(this.el); // The height of the arrow icon differs slightly between browsers, // so we compute the margin here to make sure it isn't disjointed // from the overlay. icon.style.marginTop = `${icon.scrollHeight - 26}px`; icon.style.marginBottom = `${20 - icon.scrollHeight}px`; // Position the arrow to be horizontally centred on the link. icon.style.paddingLeft = `${ offset.left - left + (link.offsetWidth - icon.scrollWidth) / 2 }px`; } /** * Return whether the overlay is visible. */ isVisible() { return this.el.style.getPropertyValue('display') !== 'none'; } /** * Request that the overlay be hidden after a short delay. */ requestHide() { if (this.hideTimeout !== null) { return; } this.hideTimeout = setTimeout(() => { hide(this.el); this.clear(); }, 300); } /** * Cancel a request to hide the overlay. */ cancelHide() { if (this.hideTimeout !== null) { clearTimeout(this.hideTimeout); this.hideTimeout = null; } } } // Overlay used for displaying comment like info. const overlay = new Overlay(); // The most recent comment for which the user has requested to see // who liked it. var relevantComment; // Precache after this timeout. var precacheTimeout = null; /** * Fetch the like data for a particular comment. */ function fetchLikeData(link, commentId) { commentLikeCache[commentId] = null; const container = link && link.parentElement && link.parentElement.parentElement; const star = container.querySelector('a.comment-like-link'); star && handleLinkAction(star, 'view_comment_likes', commentId, data => { // Populate the cache. commentLikeCache[commentId] = data; // Only show the overlay if the user is interested. if (overlay.isVisible() && relevantComment === commentId) { overlay.showLikes(link, data); } }); } function readCookie(c) { const nameEQ = c + '='; const cookieStrings = document.cookie.split(';'); for (let i = 0; i < cookieStrings.length; i++) { let cookieString = cookieStrings[i]; while (cookieString.charAt(0) === ' ') { cookieString = cookieString.substring(1, cookieString.length); } if (cookieString.indexOf(nameEQ) === 0) { const chunk = cookieString.substring(nameEQ.length, cookieString.length); const pairs = chunk.split('&'); const cookieData = {}; for (let num = pairs.length - 1; num >= 0; num--) { const pair = pairs[num].split('='); cookieData[pair[0]] = decodeURIComponent(pair[1]); } return cookieData; } } return null; } function getServiceData() { const data = readCookie('wpc_wpc'); if (data === null || typeof data.access_token === 'undefined' || !data.access_token) { return false; } return data; } function readMessage(msg) { const event = msg.data; if (typeof event.event === 'undefined') { return; } if (event.event === 'login' && event.success) { extWinCheck = setInterval(function () { if (!extWin || extWin.closed) { clearInterval(extWinCheck); if (getServiceData()) { // Load page in an iframe to get the current comment nonce const nonceIframe = document.createElement('iframe'); nonceIframe.id = 'wp-login-comment-nonce-iframe'; nonceIframe.style.display = 'none'; nonceIframe.src = commentLikeEvent + ''; document.body.appendChild(nonceIframe); const commentLikeId = (commentLikeEvent + '') .split('like_comment=')[1] .split('&_wpnonce=')[0]; let c; // Set a 5 second timeout to redirect to the comment page without doing the Like as a fallback const commentLikeTimeout = setTimeout(() => { window.location = commentLikeEvent; }, 5000); // Check for a new nonced redirect and use that if available before timing out const commentLikeCheck = setInterval(() => { const iframe = document.querySelector('#wp-login-comment-nonce-iframe'); if (iframe) { c = iframe.querySelector(`#comment-like-${commentLikeId} .comment-like-link`); } if (c && typeof c.href !== 'undefined') { clearTimeout(commentLikeTimeout); clearInterval(commentLikeCheck); window.location = c.href; } }, 100); } } }, 100); if (extWin) { if (!extWin.closed) { extWin.close(); } extWin = false; } stopPolling(); } } if (typeof window.postMessage !== 'undefined') { window.addEventListener('message', e => { let message = e && e.data; if (typeof message === 'string') { try { message = JSON.parse(message); } catch (err) { return; } } const type = message && message.type; if (type === 'loginMessage') { readMessage(message); } }); } document.body.addEventListener('click', e => { let target = e.target; // Don't do anything when clicking on the "X people" link. if (target.matches('p.comment-likes a.view-likers')) { e.preventDefault(); return; } // Retrieve the surrounding paragraph to the star, if it hasn't been liked. const notLikedPar = target.closest('p.comment-not-liked'); // Return if not clicking on star or surrounding paragraph. if (!target.matches('a.comment-like-link') && !notLikedPar) { return; } // When a comment hasn't been liked, make the text clickable, too. if (notLikedPar) { target = notLikedPar.querySelector('a.comment-like-link'); if (!target) { return; } } if (target.classList.contains('needs-login')) { e.preventDefault(); commentLikeEvent = target; if (extWin) { if (!extWin.closed) { extWin.close(); } extWin = false; } stopPolling(); const url = 'https://wordpress.com/public.api/connect/?action=request&service=wordpress'; extWin = window.open( url, 'likeconn', 'status=0,toolbar=0,location=1,menubar=0,directories=0,resizable=1,scrollbars=1,height=560,width=500' ); startPolling(); return false; } // Record that the user likes or does not like this comment. const commentId = getCommentId(target); target.classList.add('loading'); let commentEl = document.querySelector(`p#comment-like-${commentId}`); // Determine whether to like or unlike based on whether the comment is // currently liked. const action = commentEl && commentEl.dataset.liked === 'comment-liked' ? 'unlike_comment' : 'like_comment'; handleLinkAction(target, action, commentId, data => { // Invalidate the like cache for this comment. delete commentLikeCache[commentId]; const countEl = document.querySelector(`#comment-like-count-${data.context}`); if (countEl) { countEl.innerHTML = data.display; } commentEl = document.querySelector(`p#comment-like-${data.context}`); if (action === 'like_comment') { commentEl.classList.remove('comment-not-liked'); commentEl.classList.add('comment-liked'); commentEl.dataset.liked = 'comment-liked'; } else { commentEl.classList.remove('comment-liked'); commentEl.classList.add('comment-not-liked'); commentEl.dataset.liked = 'comment-not-liked'; } // Prefetch new data for this comment (if there are likers left). const parent = target.closest('.comment-likes'); const link = parent && parent.querySelector('a.view-likers'); if (link) { fetchLikeData(link, commentId); } target.classList.remove('loading'); }); e.preventDefault(); e.stopPropagation(); }); document.body.addEventListener( 'mouseenter', function (e) { if (!e.target.matches('p.comment-likes a.view-likers')) { return; } // Show the user a list of who has liked this comment. const link = e.target; if (Number(link.dataset.likeCount || 0) === 0) { // No one has liked this comment. return; } // Don't hide the overlay. overlay.cancelHide(); // Get the comment ID. const container = link.parentElement && link.parentElement.parentElement; const star = container && container.querySelector('a.comment-like-link'); const commentId = star && getCommentId(star); relevantComment = commentId; // Check if the list of likes for this comment is already in // the cache. if (commentId in commentLikeCache) { const entry = commentLikeCache[commentId]; // Only display the likes if the ajax request is // actually done. if (entry !== null) { overlay.showLikes(link, entry); } else { // Make sure the overlay is visible (in case // the user moved the mouse away while loading // but then came back before it finished // loading). overlay.showLoadingMessage(link); } return; } // Position the "Loading..." overlay. overlay.showLoadingMessage(link); // Fetch the data. fetchLikeData(link, commentId); }, true ); document.body.addEventListener( 'mouseleave', e => { if (!e.target.matches('p.comment-likes a.view-likers')) { return; } // User has moved cursor away - hide the overlay. overlay.requestHide(); }, true ); document.body.addEventListener( 'mouseenter', e => { if (!e.target.matches('.comment') || !e.target.querySelector('a.comment-like-link')) { return; } // User is moving over a comment - precache the comment like data. if (precacheTimeout !== null) { clearTimeout(precacheTimeout); precacheTimeout = null; } const star = e.target.querySelector('a.comment-like-link'); const parent = star.closest('.comment-likes'); const link = parent && parent.querySelector('a.view-likers'); if (!link || Number(link.dataset.likeCount || 0) === 0) { // No likes. return; } const commentId = getCommentId(star); if (commentId in commentLikeCache) { // Already in cache. return; } precacheTimeout = setTimeout(() => { precacheTimeout = null; if (commentId in commentLikeCache) { // Was cached in the interim. return; } fetchLikeData(link, commentId); }, 1000); }, true ); } if (document.readyState !== 'loading') { init(); } else { document.addEventListener('DOMContentLoaded', init); } })(); ; ( function () { 'use strict'; if ( typeof window.wpcom === 'undefined' ) { window.wpcom = {}; } if ( window.wpcom.carousel ) { return; } var prebuilt_widths = jetpackCarouselStrings.widths; var pageviews_stats_args = jetpackCarouselStrings.stats_query_args; var findFirstLargeEnoughWidth = function ( original_w, original_h, dest_w, dest_h ) { var inverse_ratio = original_h / original_w; for ( var i = 0; i < prebuilt_widths.length; ++i ) { if ( prebuilt_widths[ i ] >= dest_w || prebuilt_widths[ i ] * inverse_ratio >= dest_h ) { return prebuilt_widths[ i ]; } } return original_w; }; var removeResizeFromImageURL = function ( url ) { return removeArgFromURL( url, 'resize' ); }; var removeArgFromURL = function ( url, arg ) { var re = new RegExp( '[\\?&]' + arg + '(=[^?&]+)?' ); if ( url.match( re ) ) { return url.replace( re, '' ); } return url; }; var addWidthToImageURL = function ( url, width ) { width = parseInt( width, 10 ); // Give devices with a higher devicePixelRatio higher-res images (Retina display = 2, Android phones = 1.5, etc) if ( 'undefined' !== typeof window.devicePixelRatio && window.devicePixelRatio > 1 ) { width = Math.round( width * window.devicePixelRatio ); } url = addArgToURL( url, 'w', width ); url = addArgToURL( url, 'h', '' ); return url; }; var addArgToURL = function ( url, arg, value ) { var re = new RegExp( arg + '=[^?&]+' ); if ( url.match( re ) ) { return url.replace( re, arg + '=' + value ); } else { var divider = url.indexOf( '?' ) !== -1 ? '&' : '?'; return url + divider + arg + '=' + value; } }; var stat = function ( names ) { if ( typeof names !== 'string' ) { names = names.join( ',' ); } new Image().src = window.location.protocol + '//pixel.wp.com/g.gif?v=wpcom-no-pv' + '&x_carousel=' + names + '&baba=' + Math.random(); }; var lastTrackedPostId = null; var pageview = function ( post_id ) { // Prevent duplicate tracking of the same post during slide transitions if ( post_id === lastTrackedPostId ) { return; } lastTrackedPostId = post_id; new Image().src = window.location.protocol + '//pixel.wp.com/g.gif?host=' + encodeURIComponent( window.location.host ) + '&ref=' + encodeURIComponent( document.referrer ) + '&rand=' + Math.random() + '&' + pageviews_stats_args + '&post=' + encodeURIComponent( post_id ); }; var generateImgSrc = function ( srcItem, max ) { var origSize = srcItem.getAttribute( 'data-orig-size' ) || ''; var src = srcItem.getAttribute( 'src' ) || srcItem.getAttribute( 'original' ) || srcItem.getAttribute( 'data-original' ) || srcItem.getAttribute( 'data-lazy-src' ); if ( src.indexOf( 'imgpress' ) !== -1 ) { src = srcItem.getAttribute( 'data-orig-file' ); } // Square/Circle galleries use a resize param that needs to be removed. src = removeResizeFromImageURL( src ); src = addWidthToImageURL( src, findFirstLargeEnoughWidth( origSize.width, origSize.height, max.width, max.height ) ); return src; }; window.wpcom.carousel = { findFirstLargeEnoughWidth: findFirstLargeEnoughWidth, removeResizeFromImageURL: removeResizeFromImageURL, addWidthToImageURL: addWidthToImageURL, stat: stat, pageview: pageview, generateImgSrc: generateImgSrc }; } )(); ;