@20minutes/hela 2.16.6 → 2.16.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(T,z){typeof exports=="object"&&typeof module<"u"?z(exports):typeof define=="function"&&define.amd?define(["exports"],z):(T=typeof globalThis<"u"?globalThis:T||self,z(T.scripts={}))})(this,(function(T){"use strict";const z=()=>/Android/i.test(navigator.userAgent),Ot=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),Dt=()=>{const s=document.getElementById("js-download-band");s&&z()&&s.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},Mt=()=>{const s=document.querySelector("#js-election-selector");s&&s.addEventListener("change",t=>{window.location.replace(t.target.value)})},$t=()=>{const s=document.querySelector(".c-search-banner");if(!s)return;const t=document.getElementById("js-search-banner-expand-button");if(t instanceof HTMLButtonElement){const e=s.querySelector("[aria-expanded]"),i=s.querySelector("[aria-hidden]");if(!e||!i)return;t.addEventListener("click",()=>{e.getAttribute("aria-expanded")==="true"?(e.setAttribute("aria-expanded","false"),i.setAttribute("aria-hidden","true")):(e.setAttribute("aria-expanded","true"),i.setAttribute("aria-hidden","false"))})}},Rt=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],Ft=(s,t,e,i,n,o)=>{const r=document.getElementById(s);if(!r)return;const a=r.dataset.storybook,l=r.querySelector(`#${s}-search`),c=l?.getAttribute("data-api-url"),h=r.querySelector(".c-autocomplete__menu");if(!l||!h||!c)return;const d=r.querySelector(".c-autocomplete__input-spinner"),u=l.getAttribute("data-trigger-message"),p=async g=>{try{let _;return a&&t.includes("20minutes.fr")?_=Rt:_=await(await fetch(`${c}${e}${encodeURIComponent(g)}`)).json(),o?_[o]:_}catch(_){return console.error("Error fetching autocomplete results:",_),[]}},f=(g,_)=>{const A=document.createElement("li");A.id=`/${g}`,A.textContent=_,A.addEventListener("click",()=>{l instanceof HTMLInputElement&&(l.value=_,h.classList.add("u-hidden"))}),h.appendChild(A)},m=()=>{d?.classList.toggle("u-hidden")},w=()=>{const g=document.createElement("li");g.textContent=u,h.appendChild(g)},b=async g=>{m(),h.classList.remove("u-hidden");const _=await p(g);h.innerHTML="",_.length===0&&h.classList.add("u-hidden"),_.forEach(A=>{f(A[i],A[n])}),m()},x=g=>{if(!(g.target instanceof HTMLInputElement))return;const _=g.target.value;h.classList.remove("u-hidden"),_.length>=3?b(_):(h.innerHTML="",w())};l.addEventListener("input",x),l.addEventListener("focusout",()=>{setTimeout(()=>h.classList.add("u-hidden"),300)}),l.addEventListener("focusin",()=>{h.childElementCount>0&&h.classList.remove("u-hidden")})},Zt=()=>{const s=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),e=document.querySelector(".js-close-article-btn"),i=document.querySelector(".c-header-mobile"),n=i instanceof HTMLElement?i.offsetHeight:0;if(s&&t&&e){const o=new IntersectionObserver(()=>{const r=e.classList,a=r.contains("u-hidden"),l=s.getBoundingClientRect().bottom-n,c=t.getBoundingClientRect().bottom-n;a&&l<=0&&c>=0&&r.remove("u-hidden"),!a&&(l>=0||c<=0)&&r.add("u-hidden")},{root:document,rootMargin:`-${n}px 0px 0px 0px`});o.observe(s),o.observe(t)}},kt=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget;if(t instanceof HTMLButtonElement){const i=t.parentElement?.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),i?.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),i?.setAttribute("aria-hidden","false"))}},qt=(s=document.querySelector(".js-collapse__button"))=>{s&&document.querySelectorAll(".c-collapse__button").forEach(e=>{e.addEventListener("click",i=>{kt(i)})})},V=(s,t)=>{const e=document.querySelector(`#${t}`);if(e){const i=e.querySelector(".js-countdown-days"),n=e.querySelector(".js-countdown-hours"),o=e.querySelector(".js-countdown-minutes"),r=e.querySelector(".js-countdown-seconds");if(!i||!n||!o||!r)return;window.counters={paralympicsGames:"2024-08-28 20:00:00",winterOlympicsGames:"2026-02-06 20:00:00",eurovision:"2026-05-16 21:00:00",worldFoot2026:"2026-06-11 15:00:00"};const a=window.counters[s],l=new Date(a).getTime(),c=setInterval(()=>{const h=new Date().getTime(),d=l-h;if(d<=0)clearInterval(c);else{const u=Math.floor(d/864e5),p=Math.floor(d%(1e3*60*60*24)/(1e3*60*60)),f=Math.floor(d%(1e3*60*60)/(1e3*60)),m=Math.floor(d%(1e3*60)/1e3);i.innerHTML=u.toString(),n.innerHTML=p.toString(),o.innerHTML=f.toString(),r.innerHTML=m.toString()}},1e3)}},Bt=s=>{const t=s.getBBox(),e=t.width/20;return[t.x-e,t.y-e,t.width+e*2,t.height+e*2].join(" ")},Ht=()=>{const s=document.querySelector(".c-map-districts-container"),t=document.querySelector(".c-map-districts");if(!s||!t)return;const e=document.querySelector(".c-map-districts-container__description"),i=document.querySelector(".c-map-districts-container__department"),n=document.querySelector(".c-map-districts-container__unzoom-button");let o=t;const r=t.getAttribute("viewBox"),a=(f,m)=>f.matches?.call(f,m),l=(f,m,w=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!f)return;let b,x=f.parentElement;for(;x instanceof SVGGraphicsElement&&x!==m;)a(x,w)&&(b=x),x=x.parentElement;return b},c=(f,m,w)=>{if(!f)return;let b=f.parentElement;for(;b instanceof SVGGraphicsElement&&b!==w;){if(m===b)return!0;b=b.parentElement}return w===m},h=(f,m)=>{if(m&&n&&e){s.classList.remove("c-map-districts-container--department-view"),e.classList.remove("u-hidden"),i?.classList.add("u-hidden"),n.classList.add("u-hidden"),m!==r&&(e.classList.add("u-hidden"),n.classList.remove("u-hidden")),o.classList.remove("js-selected-area"),o=f;const w=o.getAttribute("data-info");i&&w&&(s.classList.add("c-map-districts-container--department-view"),i.classList.remove("u-hidden"),i.innerHTML=w),o.classList.add("js-selected-area"),t.setAttribute("viewBox",m)}},d=f=>{f.stopPropagation();const m=f.currentTarget;if(o&&t&&m instanceof SVGGraphicsElement){if(m===o)return;if(f.preventDefault(),o!==t&&!c(m,o,t)){h(t,r);return}const w=l(m,o);h(w||m,Bt(w||m))}},u=()=>{t&&o!==t&&h(t,r)};t.addEventListener("click",u),n&&n.addEventListener("click",u),document.querySelectorAll(".c-map-districts__zoomable").forEach(f=>{f.addEventListener("click",m=>d(m))})},Nt=()=>{const s=document.getElementById("elections-form-search"),t=document.querySelector(".c-search-form__autocomplete");if(!s||!t)return;const e=o=>{t.classList.remove("u-hidden");const r=t.querySelectorAll("li"),a=[];return r.forEach(l=>{const c=l.querySelector("a");c&&c.innerHTML.toLowerCase().includes(o.toLowerCase())&&a.push(l.innerHTML)}),a},i=o=>{t.innerHTML+=`<li>${o}</li>`},n=({target:o})=>{if(!(o instanceof HTMLInputElement))return;const r=o.value;if(t.classList.add("u-hidden"),r.length>=3){const a=e(r);t.innerHTML="",a.length===0&&t.classList.add("u-hidden"),a.forEach(l=>{i(l)})}};s.addEventListener("input",n),s.addEventListener("focusout",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)}),s.addEventListener("focusin",()=>{t.childElementCount>0&&t.classList.remove("u-hidden")})},Wt=(s,t)=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.remove(t));const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir moins")},Vt=(s,t)=>{s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.add(t)),s.setAttribute("aria-expanded","false");const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir plus")},jt=(s,t)=>{const e=s.currentTarget;if(s.preventDefault(),e instanceof HTMLButtonElement){const i=t?"u-ellipsis-multiline":"u-ellipsis";return e.getAttribute("aria-expanded")==="true"?Vt(e,i):Wt(e,i)}return null},Ut=(s=document.querySelector(".js-ellipsis-button"))=>{s&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const i=e.getAttribute("data-multiple")==="true";e.addEventListener("click",n=>jt(n,i))})},Gt=s=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","false"));const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir moins")},Kt=s=>{s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","true")),s.setAttribute("aria-expanded","false");const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir plus")},Xt=s=>{const t=s.currentTarget;return s.preventDefault(),t instanceof HTMLButtonElement?t.getAttribute("aria-expanded")==="true"?Kt(t):Gt(t):null},Yt=s=>{const t=s.parentNode?.querySelector(".js-expand-target");return t?(t.textContent?.trim().length??0)<120:!1},Qt=(s=document.querySelector(".js-expand-button"))=>{s&&document.querySelectorAll(".js-expand-button").forEach(e=>{Yt(e)?(e.style.display="none",e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(n=>n.setAttribute("aria-hidden","false"))):e.addEventListener("click",Xt)})},Jt=()=>{const s=document.querySelector(".js-game-alert");Ot&&s&&s.classList.remove("u-hidden")},te=()=>{const s=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(s)){const e=t.querySelector(".c-half-donut"),i=t.querySelector(".c-legend");if(!e||!i)return;i.querySelectorAll("[data-color]").forEach(n=>{const o=n.getAttribute("data-color"),r=e.querySelector(`.c-half-donut__zone--${o}`);r?.addEventListener("mouseenter",()=>{n.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),i.classList.add("c-legend--is-hovered")}),r?.addEventListener("mouseleave",()=>{n.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),i.classList.remove("c-legend--is-hovered")}),n.addEventListener("mouseenter",()=>{r?.classList.add("c-half-donut__zone--is-hovered"),i.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),n.addEventListener("mouseleave",()=>{r?.classList.remove("c-half-donut__zone--is-hovered"),i.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}},ee=()=>{const s=document.querySelector(".c-image-slider__container");if(!s)return()=>{};const t=document.querySelectorAll(".c-image-slider__slide"),e=document.querySelector(".c-image-slider__button-container--previous"),i=document.querySelector(".c-image-slider__button-container--next"),n=document.querySelectorAll(".c-image-slider__indicator");let o=0,r=null,a=!1;const l=()=>{n.forEach((g,_)=>{g.classList.toggle("c-image-slider__indicator--is-active",_===o)})},c=(g=!0)=>{if(!(s instanceof HTMLElement))return;s.style.transition=g?"transform 0.3s ease":"none";const _=-o*100;s.style.transform=`translateX(${_}%)`,l()},h=g=>{o=g,c(!0)},d=()=>{r&&clearInterval(r),r=setInterval(()=>{if(!a){const g=(o+1)%t.length;h(g)}},4e3)},u=()=>{r&&(clearInterval(r),r=null)},p=()=>{a=!0,u()},f=()=>{a=!1,d()};e?.addEventListener("click",()=>{p();const g=(o-1+t.length)%t.length;h(g),setTimeout(f,5e3)}),i?.addEventListener("click",()=>{p();const g=(o+1)%t.length;h(g),setTimeout(f,5e3)}),n.forEach((g,_)=>{g.addEventListener("click",()=>{p(),h(_),setTimeout(f,5e3)})});let m=0,w=0,b=!1;return s.addEventListener("touchstart",g=>{s instanceof HTMLElement&&(p(),m=g.touches[0].clientX,w=m,b=!0,s.style.transition="none")}),s.addEventListener("touchmove",g=>{if(!(s instanceof HTMLElement))return;w=g.touches[0].clientX;const _=w-m,A=-o*window.innerWidth+_;s.style.transform=`translateX(${A}px)`}),s.addEventListener("touchend",()=>{if(!b)return;b=!1;const g=w-m;Math.abs(g)>75&&(g<0?o=Math.min(o+1,t.length-1):g>0&&(o=Math.max(o-1,0))),c(!0),setTimeout(f,5e3)}),c(!0),d(),()=>{u()}},ie=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget,e=document.getElementById("info-button-content");!(t instanceof HTMLButtonElement)||!e||(t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false")))},se=()=>{const s=document.querySelector(".js-info-banner__button");s instanceof HTMLButtonElement&&s.addEventListener("click",ie)},v={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var ne=[`a[href]${v.inert}${v.negTabIndex}`,`area[href]${v.inert}${v.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,`input[type="radio"]${v.inert}${v.negTabIndex}${v.disabled}`,`select${v.inert}${v.negTabIndex}${v.disabled}`,`textarea${v.inert}${v.negTabIndex}${v.disabled}`,`button${v.inert}${v.negTabIndex}${v.disabled}`,`details${v.inert} > summary:first-of-type${v.negTabIndex}`,`iframe${v.inert}${v.negTabIndex}`,`audio[controls]${v.inert}${v.negTabIndex}`,`video[controls]${v.inert}${v.negTabIndex}`,`[contenteditable]${v.inert}${v.negTabIndex}`,`[tabindex]${v.inert}${v.negTabIndex}`];function J(s){(s.querySelector("[autofocus]")||s).focus()}function oe(s){const t=O(s,!0),e=t?O(s,!1)||t:null;return[t,e]}function O(s,t){if(t&&it(s))return s;if(ae(s))if(s.shadowRoot){let e=tt(s.shadowRoot,t);for(;e;){const i=O(e,t);if(i)return i;e=et(e,t)}}else if(s.localName==="slot"){const e=s.assignedElements({flatten:!0});t||e.reverse();for(const i of e){const n=O(i,t);if(n)return n}}else{let e=tt(s,t);for(;e;){const i=O(e,t);if(i)return i;e=et(e,t)}}return!t&&it(s)?s:null}function tt(s,t){return t?s.firstElementChild:s.lastElementChild}function et(s,t){return t?s.nextElementSibling:s.previousElementSibling}const re=s=>s.matches("details:not([open]) *")&&!s.matches("details>summary:first-of-type")?!0:!(s.offsetWidth||s.offsetHeight||s.getClientRects().length),it=s=>s.shadowRoot?.delegatesFocus?!1:s.matches(ne.join(","))&&!re(s);function ae(s){return s.shadowRoot&&s.getAttribute("tabindex")==="-1"?!1:!s.matches(":disabled,[hidden],[inert]")}function D(s=document){const t=s.activeElement;return t?t.shadowRoot?D(t.shadowRoot)||document.activeElement:t:null}function le(s,t){const[e,i]=oe(s);if(!e)return t.preventDefault();const n=D();t.shiftKey&&n===e?(i.focus(),t.preventDefault()):!t.shiftKey&&n===i&&(e.focus(),t.preventDefault())}function C(s,t){function e(i){if(!i||i===document||i===window)return null;const n=st(i);return n&&(i=n),i.closest(s)||e(i.getRootNode().host)}return e(t)}function st(s){return s.assignedSlot||(s.parentNode?st(s.parentNode):null)}const M="data-a11y-dialog";class nt{$el;id;previouslyFocused;shown;constructor(t){this.$el=t,this.id=this.$el.getAttribute(M)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented?this:(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this)}show(t){return this.shown?this:this.fire("show",t).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=D(),this.previouslyFocused?.tagName==="BODY"&&t?.target&&(this.previouslyFocused=t.target),t?.type==="focus"?this.maintainFocus():J(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(t){return this.shown?this.fire("hide",t).defaultPrevented?this:(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.(),this):this}on(t,e,i){return this.$el.addEventListener(t,e,i),this}off(t,e,i){return this.$el.removeEventListener(t,e,i),this}fire(t,e){const i=new CustomEvent(t,{detail:e,cancelable:!0});return this.$el.dispatchEvent(i),i}handleTriggerClicks(t){const e=t.composedPath()[0],i=C(`[${M}-show="${this.id}"]`,e),n=C(`[${M}-hide="${this.id}"]`,e),o=C(`[${M}-hide]`,e)&&C('[aria-modal="true"]',e)===this.$el;i&&this.show(t),(n||o)&&this.hide(t)}bindKeypress(t){if(C('[aria-modal="true"]',D())!==this.$el)return;let e=!1;try{e=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}t.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!e&&(t.preventDefault(),this.hide(t)),t.key==="Tab"&&le(this.$el,t)}maintainFocus(){const t=D();C(`[aria-modal="true"], [${M}-ignore-focus-trap]`,t)||J(this.$el)}}function ot(){for(const s of document.querySelectorAll("[data-a11y-dialog]"))new nt(s)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ot):ot());const ce=()=>document.querySelectorAll(".js-modal").forEach(s=>{if(!(s instanceof HTMLElement))return;const t=new nt(s);if(s.id==="dialog-menu"){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),i=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&i.length>0&&(t.on("show",()=>{e.forEach(n=>n.classList.add("u-hidden")),i.forEach(n=>n.classList.remove("u-hidden"))}),t.on("hide",()=>{e.forEach(n=>n.classList.remove("u-hidden")),i.forEach(n=>n.classList.add("u-hidden"))}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),rt="68px",at="50px",j=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=s.classList.contains("c-breadcrumb--is-small")?at:rt;e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n,s.style.paddingLeft=""),i.classList.contains("o-nav-button--visible")&&(s.style.paddingLeft=n,e.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n),e.classList.contains("o-nav-button--visible")||(s.style.paddingRight="")),!e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(t.style.width="",s.style.paddingRight="")},he=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=t.scrollLeft>0,o=t.scrollLeft+(t.clientWidth+.5)<t.scrollWidth;n&&o?(e.classList?.add("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):n?(e.classList?.remove("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):o?(e.classList?.add("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")):(e.classList?.remove("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")),e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&j({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},de=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n})=>{if(t){const a=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(a){const l=Array.from(a).findIndex(c=>c.classList.contains("c-stepper__item--loading"));if(l<0)a[0].classList.add("c-stepper__item--loading");else{a[l].classList.remove("c-stepper__item--loading"),a[l].classList.add("c-stepper__item--loaded");const c=a[l].querySelector(".c-stepper__loader");c&&c instanceof HTMLElement&&(c.style.transition="width 0s linear"),l+1<a.length&&a[l+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let l=t.scrollLeft;switch(n){case"three-columns-articles":l+=t.clientWidth+32;break;case"rubrics":l+=t.clientWidth-36;break;default:l+=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:l,behavior:"smooth"}),i.classList.add("o-nav-button--visible"),l+t.clientWidth>=t.scrollWidth&&e.classList.remove("o-nav-button--visible")}else{const l=t.scrollWidth-t.clientWidth;t.scrollTo({left:l,behavior:"smooth"}),e.classList.remove("o-nav-button--visible"),i.classList.add("o-nav-button--visible")}e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&j({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},ue=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n,delay:o})=>{if(t){const l=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(l){const c=Array.from(l).findIndex(h=>h.classList.contains("c-stepper__item--loading"));c<0?l[0].classList.add("c-stepper__item--loading"):(l[c].classList.remove("c-stepper__item--loading"),l[c].classList.remove("c-stepper__item--loaded"),c-1>0&&(l[c-1].classList.remove("c-stepper__item--loading"),l[c-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const h=l[c-1].querySelector(".c-stepper__loader");l[c-1].classList.add("c-stepper__item--loading"),h&&h instanceof HTMLElement&&(h.style.transition=`width ${o/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let c=t.scrollLeft;switch(n){case"three-columns-articles":c-=t.clientWidth+32;break;case"rubrics":c-=t.clientWidth-36;break;default:c-=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:c,behavior:"smooth"}),e.classList.add("o-nav-button--visible"),c===0&&i.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),i.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&e.classList.add("o-nav-button--visible");e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&j({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},pe=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{he({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},me=s=>{const{sliderVariant:t}=s.dataset,{sliderAuto:e}=s.dataset,{sliderDelay:i}=s.dataset,n=i?parseInt(i,10):3e3,r=s.closest(".js-overview-bar-container")?.querySelector(".c-stepper"),a=r?.querySelectorAll(".c-stepper__item"),l=s.querySelector(".js-navigation-container__list"),c=s.querySelector(".o-nav-button--next-button"),h=s.querySelector(".o-nav-button--previous-button");if(!(!l||!c||!h)){if(l.clientWidth<l.scrollWidth&&(c.classList.add("o-nav-button--visible"),c.classList.contains("c-slider__button-container--has-space-around"))){const d=s.classList.contains("c-breadcrumb--is-small")?at:rt;s.style.paddingRight=d}if(c.addEventListener("click",de.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:h,sliderVariant:t})),h.addEventListener("click",ue.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:h,sliderVariant:t,delay:n})),e==="true"){const d=r?r.querySelector(".c-stepper__item--loading"):null;a&&(a.forEach(u=>{const p=u.querySelector(".c-stepper__loader");p&&p instanceof HTMLElement&&(p.style.transition=`width ${n/1e3}s linear`)}),d||a[0].classList.add("c-stepper__item--loading")),setInterval(()=>{c.classList.contains("o-nav-button--visible")?c.click():l&&h&&(l.scrollLeft=0,a&&(a.forEach(u=>{const p=u.querySelector(".c-stepper__loader");p&&p instanceof HTMLElement&&(p.style.transition="width 0s linear"),u.classList.remove("c-stepper__item--loading"),u.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{p&&p instanceof HTMLElement&&(p.style.transition=`width ${n/1e3}s linear`)},0)}),setTimeout(()=>{a[0].classList.add("c-stepper__item--loading")},0)),h.click())},n)}}},fe=()=>{const s=document.querySelectorAll(".js-navigation-container");Array.from(s).forEach(t=>{const e=t.querySelector(".js-navigation-container__list");if(e){const i=new ResizeObserver(n=>{n.forEach(o=>{const{width:r}=o.contentRect;r>0&&(me(t),i.disconnect())})});i.observe(e)}})},ge=()=>{const s=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(s))if(t){const e=t.querySelector(".js-navigation-container__list"),i=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&i&&n&&window.addEventListener("resize",pe.bind(!1,{navigationContainer:t,navigatedList:e,nextBtn:i,prevBtn:n}))}};function S(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function y(s,t){return s.x=t.x,s.y=t.y,t.id!==void 0&&(s.id=t.id),s}function lt(s){s.x=Math.round(s.x),s.y=Math.round(s.y)}function U(s,t){const e=Math.abs(s.x-t.x),i=Math.abs(s.y-t.y);return Math.sqrt(e*e+i*i)}function $(s,t){return s.x===t.x&&s.y===t.y}function R(s,t,e){return Math.min(Math.max(s,t),e)}function F(s,t,e){let i=`translate3d(${s}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function P(s,t,e,i){s.style.transform=F(t,e,i)}const ve="cubic-bezier(.4,0,.22,1)";function ct(s,t,e,i){s.style.transition=t?`${t} ${e}ms ${i||ve}`:"none"}function G(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}function _e(s){ct(s)}function ye(s){return"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,e)=>{s.onload=()=>t(s),s.onerror=e})}const L={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function we(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function be(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function ht(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let dt=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{dt=!0}}))}catch{}class Se{constructor(){this._pool=[]}add(t,e,i,n){this._toggleListener(t,e,i,n)}remove(t,e,i,n){this._toggleListener(t,e,i,n,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,n,o,r){if(!t)return;const a=o?"removeEventListener":"addEventListener";e.split(" ").forEach(c=>{if(c){r||(o?this._pool=this._pool.filter(d=>d.type!==c||d.listener!==i||d.target!==t):this._pool.push({target:t,type:c,listener:i,passive:n}));const h=dt?{passive:n||!1}:!1;t[a](c,i,h)}})}}function ut(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Z(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function pt(s,t,e,i){return{x:t.x-Z("left",s,t,e,i)-Z("right",s,t,e,i),y:t.y-Z("top",s,t,e,i)-Z("bottom",s,t,e,i)}}class Le{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=Z(t==="x"?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return R(e,this.max[t],this.min[t])}}const mt=4e3;let ft=class{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>mt&&(t=mt/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};class Ee{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new ft(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=S("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new Le(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,n=Math.round(this.height*e)||this.pswp.viewportSize.y;!this.sizeChanged(i,n)&&!t||this.content.setDisplayedSize(i,n)}sizeChanged(t,e){return t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,e,i,n){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;n||(t=R(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,r),this.pan.y=this.calculateZoomToPanOffset("y",e,r),lt(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:o.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*o+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),y(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,P(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;y(this.panAreaSize,pt(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return F(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const Ae=.35,xe=.6,gt=.4,vt=.5;function Pe(s,t){return s*t/(1-t)}class Ie{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&y(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:n}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&n&&n.currZoomLevel<=n.zoomLevels.fit&&!this.gestures.isMultitouch){const o=n.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,xe);const r=1-Math.abs(this._getVerticalDragRatio(n.pan.y));this.pswp.applyBgOpacity(r),n.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),n&&(lt(n.pan),n.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let n=0;if(this.pswp.animations.stopAll(),e.isShifted()){const r=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-vt&&r<0||t.x<.1&&r<-.5?(n=1,t.x=Math.min(t.x,0)):(t.x>vt&&r>0||t.x>-.1&&r>.5)&&(n=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(n,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:n,bounds:o}=i,r=n[t],a=this.pswp.bgOpacity<1&&t==="y",c=r+Pe(e[t],.995);if(a){const f=this._getVerticalDragRatio(r),m=this._getVerticalDragRatio(c);if(f<0&&m<-gt||f>0&&m>gt){this.pswp.close();return}}const h=o.correctPan(t,c);if(r===h)return;const d=h===c?1:.82,u=this.pswp.bgOpacity,p=h-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:h,velocity:e[t],dampingRatio:d,onUpdate:f=>{if(a&&this.pswp.bgOpacity<1){const m=1-(h-f)/p;this.pswp.applyBgOpacity(R(u+(1-u)*m,0,1))}n[t]=Math.floor(f),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:n,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:a}=this.pswp,l=e[t]-n[t],c=a.x+l;if(!l||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return a.moveTo(c,!0),!0;const{bounds:h}=r,d=r.pan[t]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const u=a.getCurrSlideX(),p=a.x-u,f=l>0,m=!f;if(d>h.min[t]&&f){if(h.min[t]<=this.startPan[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,d)}else if(d<h.max[t]&&m){if(this.startPan[t]<=h.max[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,d)}else if(p!==0){if(p>0)return a.moveTo(Math.max(c,u),!0),!0;if(p<0)return a.moveTo(Math.min(c,u),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!a.isShifted()&&h.min.y!==h.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var e,i;return(t-((e=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&e!==void 0?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:n}=this.pswp;if(!n)return;const{pan:o,bounds:r}=n;if(r.correctPan(t,e)!==e||i){const l=Math.round(e-o[t]);o[t]+=l*(i||Ae)}else o[t]=e}}const Te=.05,Ce=.15;function _t(s,t,e){return s.x=(t.x+e.x)/2,s.y=(t.y+e.y)/2,s}class ze{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,y(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:n,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const a=r.zoomLevels.min,l=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;_t(this._startZoomPoint,e,n),_t(this._zoomPoint,t,i);let c=1/U(e,n)*U(t,i)*this._startZoomLevel;if(c>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),c<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const h=1-(a-c)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:h}).defaultPrevented||o.applyBgOpacity(h)}else c=a-(a-c)*Ce;else c>l&&(c=l+(c-l)*Te);r.pan.x=this._calculatePanForZoomLevel("x",c),r.pan.y=this._calculatePanForZoomLevel("y",c),r.setZoomLevel(c),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const n=i.currZoomLevel;let o,r=!0;n<i.zoomLevels.initial?o=i.zoomLevels.initial:n>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=n);const a=e.bgOpacity,l=e.bgOpacity<1,c=y({x:0,y:0},i.pan);let h=y({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=n,y(this._startPan,c)),r&&(h={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),h={x:i.bounds.correctPan("x",h.x),y:i.bounds.correctPan("y",h.y)},i.setZoomLevel(n);const d=!$(h,c);if(!d&&!r&&!l){i._setResolution(o),i.applyCurrentZoomPan();return}e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:u=>{if(u/=1e3,d||r){if(d&&(i.pan.x=c.x+(h.x-c.x)*u,i.pan.y=c.y+(h.y-c.y)*u),r){const p=n+(o-n)*u;i.setZoomLevel(p)}i.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(R(a+(1-a)*u,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function yt(s){return!!s.target.closest(".pswp__container")}class Oe{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,n=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");n?this._doClickOrTapAction("imageClick",t,e):o&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){yt(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){yt(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){var n;const{pswp:o}=this.gestures,{currSlide:r}=o,a=t+"Action",l=o.options[a];if(!o.dispatch(a,{point:e,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(o,e,i);return}switch(l){case"close":case"next":o[l]();break;case"zoom":r?.toggleZoom(e);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(e):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(n=this.gestures.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible");break}}}}const De=10,Me=300,$e=25;class Re{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new Ie(this),this.zoomLevels=new ze(this),this.tapHandler=new Oe(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,n){const{pswp:o}=this,{events:r}=o,a=n?t+n:"";r.add(o.scrollWrap,t+e,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),a&&r.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const e=t.type==="mousedown"||t.pointerType==="mouse";if(e&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,y(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,y(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?$(this.p1,this.prevP1)||this.drag.change():(!$(this.p1,this.prevP1)||!$(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,y(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted()){e.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?Me:0;this._tapTimer?(this._clearTapTimer(),U(this._lastStartP1,this.startP1)<$e&&this.tapHandler.doubleTap(this.startP1,t)):(y(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,n=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);e==="up"&&n>-1?this._ongoingPointers.splice(n,1):e==="down"&&n===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):n>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[n]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&y(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&y(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),e==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){y(this.prevP1,this.p1),y(this.prevP2,this.p2)}_updateStartPoints(){y(this.startP1,this.p1),y(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=De&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:t.identifier!==void 0&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const Fe=.35;class Ze{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),n=i!==this.slideWidth;n&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{n&&P(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=S("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=t===1?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:n}=this;let o=n.potentialIndex+t;const r=n.getNumItems();if(n.canLoop()){o=n.getLoopedIndex(o);const l=(t+r)%r;l<=r/2?t=l:t=l-r}else o<0?o=0:o>=r&&(o=r-1),t=o-n.potentialIndex;n.potentialIndex=o,this._currPositionIndex-=t,n.animations.stopMainScroll();const a=this.getCurrSlideX();if(!e)this.moveTo(a),this.updateCurrItem();else{n.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:c=>{this.moveTo(c)},onComplete:()=>{this.updateCurrItem(),n.appendHeavy()}});let l=n.potentialIndex-n.currIndex;if(n.canLoop()){const c=(l+r)%r;c<=r/2?l=c:l=c-r}Math.abs(l)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let n=Math.abs(i),o;n>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),n=3,this.itemHolders.forEach(r=>{var a;(a=r.slide)===null||a===void 0||a.destroy(),r.slide=void 0}));for(let r=0;r<n;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,P(o.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(o,e.currIndex-n+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,P(o.el,this._containerShiftIndex*this.slideWidth),e.setContent(o,e.currIndex+n-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach((r,a)=>{r.slide&&r.slide.setIsActive(a===1)}),e.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const n=Math.round(t-this.x);(i<0&&n>0||i>=this.pswp.getNumItems()-1&&n<0)&&(t=this.x+n*Fe)}this.x=t,this.pswp.container&&P(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}}const ke={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},I=(s,t)=>t?s:ke[s];class qe{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented||we(t))return;let i,n,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case I("Escape",r):e.options.escKey&&(i="close");break;case I("z",r):i="toggleZoom";break;case I("ArrowLeft",r):n="x";break;case I("ArrowUp",r):n="y";break;case I("ArrowRight",r):n="x",o=!0;break;case I("ArrowDown",r):o=!0,n="y";break;case I("Tab",r):this._focusRoot();break}if(n){t.preventDefault();const{currSlide:a}=e;e.options.arrowKeys&&n==="x"&&e.getNumItems()>1?i=o?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[n]+=o?-80:80,a.panTo(a.pan.x,a.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const Be="cubic-bezier(.4,0,.22,1)";class He{constructor(t){var e;this.props=t;const{target:i,onComplete:n,transform:o,onFinish:r=()=>{},duration:a=333,easing:l=Be}=t;this.onFinish=r;const c=o?"transform":"opacity",h=(e=t[c])!==null&&e!==void 0?e:"";this._target=i,this._onComplete=n,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{ct(i,c,a,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[c]=h},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),_e(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const Ne=12,We=.75;class Ve{constructor(t,e,i){this.velocity=t*1e3,this._dampingRatio=e||We,this._naturalFrequency=i||Ne,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i=0,n;e/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(this._dampingRatio===1)n=this.velocity+this._naturalFrequency*t,i=(t+n*e)*o,this.velocity=i*-this._naturalFrequency+n*o;else if(this._dampingRatio<1){n=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);i=o*(t*r+n*a),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*n*r)}return i}}class je{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:n,onUpdate:o,onComplete:r,onFinish:a=()=>{},dampingRatio:l,naturalFrequency:c}=t;this.onFinish=a;const h=new Ve(n,l,c);let d=Date.now(),u=e-i;const p=()=>{this._raf&&(u=h.easeFrame(u,Date.now()-d),Math.abs(u)<1&&Math.abs(h.velocity)<50?(o(i),r&&r(),this.onFinish()):(d=Date.now(),o(u+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class Ue{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new je(t):new He(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class Ge{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:n}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let o=-n;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=e.currZoomLevel*o;e.zoomTo(r,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(t.deltaMode===1&&(i*=18,n*=18),e.panTo(e.pan.x-i,e.pan.y-n))}}function Ke(s){if(typeof s=="string")return s;if(!s||!s.isCustomSVG)return"";const t=s;let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(t.size||32),t.outlineID&&(e+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),e+=t.inner,e+="</svg>",e}class Xe{constructor(t,e){var i;const n=e.name||e.className;let o=e.html;if(t.options[n]===!1)return;typeof t.options[n+"SVG"]=="string"&&(o=t.options[n+"SVG"]),t.dispatch("uiElementCreate",{data:e});let r="";e.isButton?(r+="pswp__button ",r+=e.className||`pswp__button--${e.name}`):r+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();const l=S(r,a);if(e.isButton){a==="button"&&(l.type="button");let{title:d}=e;const{ariaLabel:u}=e;typeof t.options[n+"Title"]=="string"&&(d=t.options[n+"Title"]),d&&(l.title=d);const p=u||d;p&&l.setAttribute("aria-label",p)}l.innerHTML=Ke(o),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=d=>{typeof e.onClick=="string"?t[e.onClick]():typeof e.onClick=="function"&&e.onClick(d,l,t)});const c=e.appendTo||"bar";let h=t.element;c==="bar"?(t.topBar||(t.topBar=S("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),h=t.topBar):(l.classList.add("pswp__hide-on-close"),c==="wrapper"&&(h=t.scrollWrap)),(i=h)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",l,e))}}function wt(s,t,e){s.classList.add("pswp__button--arrow"),s.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e?s.disabled=!(t.currIndex<t.getNumItems()-1):s.disabled=!(t.currIndex>0))})}const Ye={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:wt},Qe={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(s,t)=>{wt(s,t,!0)}},Je={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},ti={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},ei={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(s,t)=>{let e,i=null;const n=(a,l)=>{s.classList.toggle("pswp__preloader--"+a,l)},o=a=>{e!==a&&(e=a,n("active",a))},r=()=>{var a;if(!((a=t.currSlide)!==null&&a!==void 0&&a.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;o(!!(!((l=t.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",a=>{t.currSlide===a.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},ii={name:"counter",order:5,onInit:(s,t)=>{t.on("change",()=>{s.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function bt(s,t){s.classList.toggle("pswp--zoomed-in",t)}class si{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[Je,Ye,Qe,ti,ei,ii],t.dispatch("uiRegister"),this.uiElementsData.sort((e,i)=>(e.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),t.on("change",()=>{var e;(e=t.element)===null||e===void 0||e.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new Xe(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:n}=e;if(this.pswp.opener.isOpen||(n=e.zoomLevels.initial),n===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=n;const o=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(o)<.01||!e.isZoomable()){bt(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=n===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial;bt(t,r<=n),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function ni(s){const t=s.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function oi(s,t,e){const i=s.getBoundingClientRect(),n=i.width/t,o=i.height/e,r=n>o?n:o,a=(i.width-t*r)/2,l=(i.height-e*r)/2,c={x:i.left+a,y:i.top+l,w:t*r};return c.innerRect={w:i.width,h:i.height,x:a,y:l},c}function ri(s,t,e){const i=e.dispatch("thumbBounds",{index:s,itemData:t,instance:e});if(i.thumbBounds)return i.thumbBounds;const{element:n}=t;let o,r;if(n&&e.options.thumbSelector!==!1){const a=e.options.thumbSelector||"img";r=n.matches(a)?n:n.querySelector(a)}return r=e.applyFilters("thumbEl",r,t,s),r&&(t.thumbCropped?o=oi(r,t.width||t.w||0,t.height||t.h||0):o=ni(r)),e.applyFilters("thumbBounds",o,t,s)}let ai=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},li=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new ai(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}},ci=class{constructor(t,e){if(this.element=S("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(G(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=F(0,0,t/250)):G(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},hi=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=L.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new ci(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=S("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=S("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=L.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=L.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===L.LOADED||this.state===L.ERROR)&&this.removePlaceholder())}onError(){this.state=L.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===L.LOADING,this)}isError(){return this.state===L.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(G(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==L.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=S("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=S("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===L.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||ht())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!ht()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===L.LOADED||this.state===L.ERROR)&&this.removePlaceholder()))}};const di=5;function St(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new ft(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=ut(o,t);const a=pt(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function ui(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return St(e,t,s)}class pi{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,di),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,n=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(e.currIndex+(n?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(e.currIndex+(n?-o:o))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=ui(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);e!==-1&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(i=>i.index===t);e!==-1&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}let mi=class extends li{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new hi(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?be(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return St(t,this,e)}};const k=.003;class fi{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan());else{var n;this._animateRootOpacity=(n=i.showHideOpacity)!==null&&n!==void 0?n:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>k,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(k)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(k)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(k)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(k)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let e=!1,i=!0;ye(this._placeholder).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,e;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(e=this.pswp.element)===null||e===void 0||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(e=t.currSlide)===null||e===void 0||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:n,viewportSize:o}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,a=-o.y+(this._thumbBounds.y-i.y)+i.h,l=o.x-i.w,c=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",F(r,a)),this._animateTo(this._cropContainer2,"transform",F(l,c))):(P(this._cropContainer1,r,a),P(this._cropContainer2,l,c))}n&&(y(n.pan,i||this._thumbBounds),n.currZoomLevel=this._thumbBounds.w/n.width,t?this._animateTo(n.container,"transform",n.getCurrentTransform()):n.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration){t.style[e]=i;return}const{animations:n}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{n.activeAnimations.length||this._onAnimationComplete()},target:t};o[e]=i,n.startTransition(o)}}const gi={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class vi extends mi{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Se,this.animations=new Ue,this.mainScroll=new Ze(this),this.gestures=new Re(this),this.opener=new fi(this),this.keyboard=new qe(this),this.contentLoader=new pi(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Ge(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),R(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var e;(e=t.slide)===null||e===void 0||e.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;(e=this.currSlide)===null||e===void 0||e.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(e=>{var i;(i=e.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{var n,o;let r=((n=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&n!==void 0?n:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(e,t,!0),i===1)){var a;this.currSlide=e.slide,(a=e.slide)===null||a===void 0||a.setIsActive(!0)}}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const n=this.getItemData(e);t.slide=new Ee(n,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=ut(this.options,this);!t&&$(e,this._prevViewportSize)||(y(this._prevViewportSize,e),this.dispatch("beforeResize"),y(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=S("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=S("pswp__bg","div",this.element),this.scrollWrap=S("pswp__scroll-wrap","section",this.element),this.container=S("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new si(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return ri(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...gi,...t}}}function q(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function _i(s,t,e){let i=`translate3d(${s}px,0px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function K(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}const E={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function yi(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function B(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function wi(s){return typeof s=="function"&&s.prototype&&s.prototype.goTo}function Lt(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class bi{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class Si{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new bi(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}}class Li{constructor(t,e){if(this.element=q("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(K(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=_i(0,0,t/250)):K(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class Ei{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=E.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Li(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=q("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=q("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=E.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=E.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder())}onError(){this.state=E.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===E.LOADING,this)}isError(){return this.state===E.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(K(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==E.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=q("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=q("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===E.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||Lt())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Lt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder()))}}function Ai(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function H(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function xi(s,t,e,i){return{x:t.x-H("left",s,t,e,i)-H("right",s,t,e,i),y:t.y-H("top",s,t,e,i)-H("bottom",s,t,e,i)}}const Et=4e3;class Pi{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>Et&&(t=Et/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function At(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new Pi(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=Ai(o,t);const a=xi(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function Ii(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return At(e,t,s)}class Ti extends Si{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new Ei(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?B(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return At(t,this,e)}}class Ci extends Ti{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){B(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(yi(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const n={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,n=B(this.options.children,this.options.childSelector,t.currentTarget).findIndex(o=>o===e||o.contains(e));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const n=B(this.options.gallery);n[0]&&(e={gallery:n[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const n=[],o=typeof i.pswpModule;if(wi(i.pswpModule))n.push(Promise.resolve(i.pswpModule));else{if(o==="string")throw new Error("pswpModule as string is no longer supported");if(o==="function")n.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&n.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=Ii(t,this));const r=++this._uid;Promise.all(n).then(a=>{if(this.shouldOpen){const l=a[0];this._openPhotoswipe(l,r)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(n=>{var o;(o=this._listeners[n])===null||o===void 0||o.forEach(r=>{i.on(n,r)})}),Object.keys(this._filters).forEach(n=>{var o;(o=this._filters[n])===null||o===void 0||o.forEach(r=>{i.addFilter(n,r.fn,r.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},B(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const zi=()=>{let s=null;return s=new Ci({gallery:"#photoswipe-gallery",children:"a",pswpModule:vi,zoom:!1,imageClickAction:"next",tapAction:"next"}),s.on("uiRegister",()=>{s?.pswp?.ui?.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{s?.pswp?.on("change",()=>{const e=s?.pswp?.currSlide?.data.element;if(e){const i=e.querySelector(".caption-content");t.innerHTML=i?.innerHTML||""}})}})}),s.init(),()=>{s&&(s.destroy(),s=null)}},Oi=()=>{const s=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar");if(!t)return;const{documentElement:e}=document;let i=e.scrollHeight-e.clientHeight;if(!i)return;const n=e.scrollTop;s&&(i=s.scrollHeight-e.clientHeight+(window.pageYOffset+s.getBoundingClientRect().top));const o=Math.round(n/i*100);t.style.width=`${o}%`,o>=100&&(t.style.width="100%")},Di=()=>{document.querySelector(".c-progress")&&window.addEventListener("scroll",Oi)},Mi=(s={})=>{const{buttonSelector:t=".c-scroll-to-top"}=s,e=document.querySelector(t),i=e?.querySelector("button");if(!e||!i)return;const n=e.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(e.dataset.triggerOffset||"0",10);e.style.display="none";const r=()=>{const l=document.querySelector(n);let c=!1;if(l){const h=l.getBoundingClientRect().top;c=window.pageYOffset>=h-o}else c=window.pageYOffset>300;e.style.display=c?"block":"none"},a=()=>{window.scrollTo({top:0,behavior:"smooth"})};window.addEventListener("scroll",r),i.addEventListener("click",a),r()},X="#page-content",Y="#text-tooltip",$i=".tooltip-btn",xt="c-text-tooltip--show",Ri=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],Pt=(s,t)=>s instanceof Element?t.some(e=>s.matches(e)):!1,Fi=(s,t)=>{const e=s.startContainer.nodeType===Node.ELEMENT_NODE?s.startContainer:s.startContainer.parentElement,i=s.endContainer.nodeType===Node.ELEMENT_NODE?s.endContainer:s.endContainer.parentElement;return!!e&&Pt(e,t)||!!i&&Pt(i,t)},Zi=s=>{if(!s.focusNode)return null;const t=s.anchorNode?.compareDocumentPosition(s.focusNode);return t?(t&4)>0:s.anchorOffset<s.focusOffset},ki=(s,t,e)=>{const i=document.querySelector(`${X} ${Y}`),n=document.querySelector(`${X}`),o=document.querySelectorAll(`${X} ${Y} ${$i}`);if(!i||!n){console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");return}Array.from(o).forEach(l=>l.setAttribute("data-selected-text",e));const r=s.getClientRects(),a=r[t?r.length-1:0];i.style.top=`${a.top-n.getBoundingClientRect().top-(i.offsetHeight+10)}px`,a.width<i.offsetWidth?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width/2-i.offsetWidth/2}px`:t?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width-i.offsetWidth}px`:i.style.left=`${a.left-n.getBoundingClientRect().left}px`,i.classList.add(xt)},It=()=>{const s=document.querySelector(`${Y}`);s&&s.classList.remove(xt)},N=({type:s})=>{const t=window.getSelection();if(s==="selectionchange"){It();return}if(!t||!t.rangeCount)return;const e=t.getRangeAt(0),i=t.toString().trim();if(i.length){const n=Fi(e,Ri),o=Zi(t)||!1;n&&ki(e,o,i);return}It()},qi=()=>{if(!window?.getSelection){console.warn("Selection API isn't supported");return}document.addEventListener("mouseup",N),document.addEventListener("selectionchange",N),document.addEventListener("touchend",N),document.addEventListener("touchcancel",N)},Bi=s=>{const{target:t}=s;if(t instanceof Element){const e=t.closest(".c-search-form--button");e&&(s.preventDefault(),e.classList.remove("c-search-form--button"))}},Hi=(s=document.querySelector(".c-search-form--button"))=>{s&&s.addEventListener("click",t=>{Bi(t)})},Ni=({tabsContainerElement:s,event:t})=>{t.preventDefault();const e=t.target;if(!(e instanceof HTMLButtonElement))return;const i=s.querySelectorAll('[role="tab"]'),n=s.querySelectorAll('[role="tabpanel"]'),o=e.getAttribute("aria-controls"),r=Object.values(n).find(a=>a.id===o);i.forEach(a=>{a.setAttribute("aria-selected","false")}),n.forEach(a=>{a.setAttribute("aria-hidden","true")}),e.setAttribute("aria-selected","true"),r&&r.removeAttribute("aria-hidden")},Tt=s=>s.code==="ArrowLeft"||s.keyCode===39,Ct=s=>s.code==="ArrowRight"||s.keyCode===37,Wi=(s=document.querySelectorAll(".js-tabs"))=>{s.length>0&&s.forEach(t=>{const e=t.querySelectorAll('[role="tab"]');e.forEach(n=>{n.addEventListener("click",o=>{Ni({tabsContainerElement:t,event:o})})});const i=t.querySelector('[role="tablist"]');if(i&&e.length>0){let n=0;i.addEventListener("keydown",o=>{o instanceof KeyboardEvent&&(Tt(o)||Ct(o))&&(e[n].setAttribute("tabindex","-1"),Tt(o)?(n+=1,n>=e.length&&(n=0)):Ct(o)&&(n-=1,n<0&&(n=e.length-1)),e[n].setAttribute("tabindex","0"),e[n].focus())})}})},W=s=>{const[t,e]=s.split("h").map(Number);return t*60+e},zt=()=>{const s=new Date,t=s.getHours(),e=s.getMinutes();return t*60+e},Vi=(s,t)=>{const e=zt();if(e<s||e>t)return 0;const i=t-s;return(e-s)/i},ji=s=>{const t=zt();let e=null,i=null,n=-1;return Array.from(s).find((o,r,a)=>{if(r===a.length-1)return!1;const l=W(o.textContent),c=W(a[r+1].textContent);return t>=l&&t<c?(e=o.textContent,i=a[r+1].textContent,n=r,!0):!1}),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}},Ui=()=>{const s=document.querySelectorAll(".c-timeline__time");if(!s||s.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}=ji(s);if(!e||!i)return;const o=W(e),r=W(i),a=Vi(o,r);if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&s.length>=5){const l="172px / 2";switch(n){case 0:t.style.width=`calc(${l} + (((${l} + 25% - ${l} / 2) - ${l}) * ${a})`;break;case 1:t.style.width=`calc((${l} + 25% - ${l} / 2) + (((50%) - (${l} + 25% - ${l} / 2)) * ${a})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${l} / 2) - (50%)) * ${a})`;break;case 3:t.style.width=`calc((75% - ${l} / 2) + (((100% - ${l}) - (75% - ${l} / 2)) * ${a}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const l="45px / 2",c="20px";switch(n){case 0:case 1:case 2:case 3:t.style.width=`calc((${c} + ${l}) + (((60% + ${l}) - (${c} + ${l})) * ${a})`;break;default:t.style.width="0%"}if(n===1||n===2||n===3){const h=document.querySelectorAll(".c-timeline__time"),d=document.querySelectorAll(".c-timeline__event");h.length>0&&d.length>0&&(h[0].textContent=e,h[1].textContent=i,d[0].textContent=d[n].textContent,d[1].textContent=d[n+1].textContent)}}}},Q="c-icon-item__container--is-highlighted",Gi=s=>{s.find(e=>e.classList.contains(Q))?.classList.remove(Q)},Ki=()=>{const s=document.querySelector(".c-toolbar");if(s){const t=window.location.origin+window.location.pathname,e=Array.from(s.querySelectorAll(".c-icon-item__container"));Gi(e),e.find(n=>n.querySelector("a")?.getAttribute("href")===t)?.classList.add(Q)}},Xi=()=>{const s=document.querySelectorAll(".js-city-marker");if(!s.length)return;const t=()=>{let e=!0;s.forEach(i=>{if(!i.classList.contains("c-map-towns__city-marker--is-hidden"))return;const n=i.querySelector(".js-city-anchor"),o=i.querySelector(".js-city-text"),r=i.querySelector(".js-city-bg");if(!n||!o||!r)return;const{x:a,y:l,width:c,height:h}=n.getBBox();if(c>0){i.setAttribute("transform",`translate(${a+c/2}, ${l+h/2})`);const d=o.getBBox(),u=d.width+8,p=d.height+4;r.setAttribute("width",`${u}`),r.setAttribute("height",`${p}`),r.setAttribute("x",`${-u/2}`),r.setAttribute("y",`${-p-8}`),o.setAttribute("y",`${-p/2-5}`),i.classList.remove("c-map-towns__city-marker--is-hidden")}else e=!1}),e||requestAnimationFrame(t)};requestAnimationFrame(t)},Yi=()=>{Qt(),Wi(),qt(),se(),Ut(),Di(),zi(),ce(),Hi(),V("winterOlympicsGames","countdown-winter-olympics-games"),V("eurovision","countdown-eurovision"),V("worldFoot2026","countdown-world-foot-2026"),qi(),Zt(),te(),Nt(),Ft("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),Ht(),Xi(),Ki(),Mt(),$t(),ee(),fe(),ge(),Jt(),Dt(),Ui(),Mi()};T.initScripts=Yi,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(T,z){typeof exports=="object"&&typeof module<"u"?z(exports):typeof define=="function"&&define.amd?define(["exports"],z):(T=typeof globalThis<"u"?globalThis:T||self,z(T.scripts={}))})(this,(function(T){"use strict";const z=()=>/Android/i.test(navigator.userAgent),$t=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),Rt=()=>{const s=document.getElementById("js-download-band");s&&z()&&s.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},Zt=()=>{const s=document.querySelector("#js-election-selector");s&&s.addEventListener("change",t=>{window.location.replace(t.target.value)})},Ft=()=>{const s=document.querySelector(".c-search-banner");if(!s)return;const t=document.getElementById("js-search-banner-expand-button");if(t instanceof HTMLButtonElement){const e=s.querySelector("[aria-expanded]"),i=s.querySelector("[aria-hidden]");if(!e||!i)return;t.addEventListener("click",()=>{e.getAttribute("aria-expanded")==="true"?(e.setAttribute("aria-expanded","false"),i.setAttribute("aria-hidden","true")):(e.setAttribute("aria-expanded","true"),i.setAttribute("aria-hidden","false"))})}},qt=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],kt=(s,t,e,i,n,o)=>{const r=document.getElementById(s);if(!r)return;const a=r.dataset.storybook,l=r.querySelector(`#${s}-search`),c=l?.getAttribute("data-api-url"),h=r.querySelector(".c-autocomplete__menu");if(!l||!h||!c)return;const d=r.querySelector(".c-autocomplete__input-spinner"),u=l.getAttribute("data-trigger-message"),m=async g=>{try{let y;return a&&t.includes("20minutes.fr")?y=qt:y=await(await fetch(`${c}${e}${encodeURIComponent(g)}`)).json(),o?y[o]:y}catch(y){return console.error("Error fetching autocomplete results:",y),[]}},f=(g,y)=>{const x=document.createElement("li");x.id=`/${g}`,x.textContent=y,x.addEventListener("click",()=>{l instanceof HTMLInputElement&&(l.value=y,h.classList.add("u-hidden"))}),h.appendChild(x)},p=()=>{d?.classList.toggle("u-hidden")},_=()=>{const g=document.createElement("li");g.textContent=u,h.appendChild(g)},b=async g=>{p(),h.classList.remove("u-hidden");const y=await m(g);h.innerHTML="",y.length===0&&h.classList.add("u-hidden"),y.forEach(x=>{f(x[i],x[n])}),p()},L=g=>{if(!(g.target instanceof HTMLInputElement))return;const y=g.target.value;h.classList.remove("u-hidden"),y.length>=3?b(y):(h.innerHTML="",_())};l.addEventListener("input",L),l.addEventListener("focusout",()=>{setTimeout(()=>h.classList.add("u-hidden"),300)}),l.addEventListener("focusin",()=>{h.childElementCount>0&&h.classList.remove("u-hidden")})},Bt=()=>{const s=document.querySelector(".js-content-header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),e=document.querySelector(".js-close-article-btn"),i=document.querySelector(".c-header-mobile"),n=i instanceof HTMLElement?i.offsetHeight:0;if(s&&t&&e){const o=new IntersectionObserver(()=>{const r=e.classList,a=r.contains("u-hidden"),l=s.getBoundingClientRect().bottom-n,c=t.getBoundingClientRect().bottom-n;a&&l<=0&&c>=0&&r.remove("u-hidden"),!a&&(l>=0||c<=0)&&r.add("u-hidden")},{root:document,rootMargin:`-${n}px 0px 0px 0px`});o.observe(s),o.observe(t)}},Nt=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget;if(t instanceof HTMLButtonElement){const i=t.parentElement?.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),i?.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),i?.setAttribute("aria-hidden","false"))}},Ht=(s=document.querySelector(".js-collapse__button"))=>{s&&document.querySelectorAll(".c-collapse__button").forEach(e=>{e.addEventListener("click",i=>{Nt(i)})})},V=(s,t)=>{const e=document.querySelector(`#${t}`);if(e){const i=e.querySelector(".js-countdown-days"),n=e.querySelector(".js-countdown-hours"),o=e.querySelector(".js-countdown-minutes"),r=e.querySelector(".js-countdown-seconds");if(!i||!n||!o||!r)return;window.counters={paralympicsGames:"2024-08-28 20:00:00",winterOlympicsGames:"2026-02-06 20:00:00",eurovision:"2026-05-16 21:00:00",worldFoot2026:"2026-06-11 15:00:00"};const a=window.counters[s],l=new Date(a).getTime(),c=setInterval(()=>{const h=new Date().getTime(),d=l-h;if(d<=0)clearInterval(c);else{const u=Math.floor(d/864e5),m=Math.floor(d%(1e3*60*60*24)/(1e3*60*60)),f=Math.floor(d%(1e3*60*60)/(1e3*60)),p=Math.floor(d%(1e3*60)/1e3);i.innerHTML=u.toString(),n.innerHTML=m.toString(),o.innerHTML=f.toString(),r.innerHTML=p.toString()}},1e3)}},Wt=s=>{const t=s.getBBox(),e=t.width/20;return[t.x-e,t.y-e,t.width+e*2,t.height+e*2].join(" ")},Vt=()=>{const s=document.querySelector(".c-map-districts-container"),t=document.querySelector(".c-map-districts");if(!s||!t)return;const e=document.querySelector(".c-map-districts-container__description"),i=document.querySelector(".c-map-districts-container__department"),n=document.querySelector(".c-map-districts-container__unzoom-button");let o=t;const r=t.getAttribute("viewBox"),a=(f,p)=>f.matches?.call(f,p),l=(f,p,_=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!f)return;let b,L=f.parentElement;for(;L instanceof SVGGraphicsElement&&L!==p;)a(L,_)&&(b=L),L=L.parentElement;return b},c=(f,p,_)=>{if(!f)return;let b=f.parentElement;for(;b instanceof SVGGraphicsElement&&b!==_;){if(p===b)return!0;b=b.parentElement}return _===p},h=(f,p)=>{if(p&&n&&e){s.classList.remove("c-map-districts-container--department-view"),e.classList.remove("u-hidden"),i?.classList.add("u-hidden"),n.classList.add("u-hidden"),p!==r&&(e.classList.add("u-hidden"),n.classList.remove("u-hidden")),o.classList.remove("js-selected-area"),o=f;const _=o.getAttribute("data-info");i&&_&&(s.classList.add("c-map-districts-container--department-view"),i.classList.remove("u-hidden"),i.innerHTML=_),o.classList.add("js-selected-area"),t.setAttribute("viewBox",p)}},d=f=>{f.stopPropagation();const p=f.currentTarget;if(o&&t&&p instanceof SVGGraphicsElement){if(p===o)return;if(f.preventDefault(),o!==t&&!c(p,o,t)){h(t,r);return}const _=l(p,o);h(_||p,Wt(_||p))}},u=()=>{t&&o!==t&&h(t,r)};t.addEventListener("click",u),n&&n.addEventListener("click",u),document.querySelectorAll(".c-map-districts__zoomable").forEach(f=>{f.addEventListener("click",p=>d(p))})},jt=()=>{const s=document.getElementById("elections-form-search"),t=document.querySelector(".c-search-form__autocomplete");if(!s||!t)return;const e=o=>{t.classList.remove("u-hidden");const r=t.querySelectorAll("li"),a=[];return r.forEach(l=>{const c=l.querySelector("a");c&&c.innerHTML.toLowerCase().includes(o.toLowerCase())&&a.push(l.innerHTML)}),a},i=o=>{t.innerHTML+=`<li>${o}</li>`},n=({target:o})=>{if(!(o instanceof HTMLInputElement))return;const r=o.value;if(t.classList.add("u-hidden"),r.length>=3){const a=e(r);t.innerHTML="",a.length===0&&t.classList.add("u-hidden"),a.forEach(l=>{i(l)})}};s.addEventListener("input",n),s.addEventListener("focusout",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)}),s.addEventListener("focusin",()=>{t.childElementCount>0&&t.classList.remove("u-hidden")})},Gt=(s,t)=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.remove(t));const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir moins")},Ut=(s,t)=>{s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach(n=>n.classList.add(t)),s.setAttribute("aria-expanded","false");const i=s.querySelector(".js-ellipsis-button__label");i instanceof HTMLSpanElement&&(i.innerHTML="Voir plus")},Kt=(s,t)=>{const e=s.currentTarget;if(s.preventDefault(),e instanceof HTMLButtonElement){const i=t?"u-ellipsis-multiline":"u-ellipsis";return e.getAttribute("aria-expanded")==="true"?Ut(e,i):Gt(e,i)}return null},Xt=(s=document.querySelector(".js-ellipsis-button"))=>{s&&document.querySelectorAll(".js-ellipsis-button").forEach(e=>{const i=e.getAttribute("data-multiple")==="true";e.addEventListener("click",n=>Kt(n,i))})},Yt=s=>{s.setAttribute("aria-expanded","true"),s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","false"));const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir moins")},Qt=s=>{s.parentNode?.querySelectorAll(".js-expand-target")?.forEach(i=>i.setAttribute("aria-hidden","true")),s.setAttribute("aria-expanded","false");const e=s.querySelector(".js-expand-button__label");e instanceof HTMLSpanElement&&(e.innerHTML="Voir plus")},Jt=s=>{const t=s.currentTarget;return s.preventDefault(),t instanceof HTMLButtonElement?t.getAttribute("aria-expanded")==="true"?Qt(t):Yt(t):null},te=s=>{const t=s.parentNode?.querySelector(".js-expand-target");return!t||t.classList.contains("c-elections-result__members")?!1:(t.textContent?.trim().length??0)<120},ee=(s=document.querySelector(".js-expand-button"))=>{s&&document.querySelectorAll(".js-expand-button").forEach(e=>{te(e)?(e.style.display="none",e.parentNode?.querySelectorAll(".js-expand-target")?.forEach(n=>n.setAttribute("aria-hidden","false"))):e.addEventListener("click",Jt)})},ie=()=>{const s=document.querySelector(".js-game-alert");$t&&s&&s.classList.remove("u-hidden")},se=()=>{const s=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(s)){const e=t.querySelector(".c-half-donut"),i=t.querySelector(".c-legend");if(!e||!i)return;i.querySelectorAll("[data-color]").forEach(n=>{const o=n.getAttribute("data-color"),r=e.querySelector(`.c-half-donut__zone--${o}`);r?.addEventListener("mouseenter",()=>{n.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),i.classList.add("c-legend--is-hovered")}),r?.addEventListener("mouseleave",()=>{n.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),i.classList.remove("c-legend--is-hovered")}),n.addEventListener("mouseenter",()=>{r?.classList.add("c-half-donut__zone--is-hovered"),i.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")}),n.addEventListener("mouseleave",()=>{r?.classList.remove("c-half-donut__zone--is-hovered"),i.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")})})}},ne=()=>{const s=document.querySelector(".c-image-slider__container");if(!s)return()=>{};const t=document.querySelectorAll(".c-image-slider__slide"),e=document.querySelector(".c-image-slider__button-container--previous"),i=document.querySelector(".c-image-slider__button-container--next"),n=document.querySelectorAll(".c-image-slider__indicator");let o=0,r=null,a=!1;const l=()=>{n.forEach((g,y)=>{g.classList.toggle("c-image-slider__indicator--is-active",y===o)})},c=(g=!0)=>{if(!(s instanceof HTMLElement))return;s.style.transition=g?"transform 0.3s ease":"none";const y=-o*100;s.style.transform=`translateX(${y}%)`,l()},h=g=>{o=g,c(!0)},d=()=>{r&&clearInterval(r),r=setInterval(()=>{if(!a){const g=(o+1)%t.length;h(g)}},4e3)},u=()=>{r&&(clearInterval(r),r=null)},m=()=>{a=!0,u()},f=()=>{a=!1,d()};e?.addEventListener("click",()=>{m();const g=(o-1+t.length)%t.length;h(g),setTimeout(f,5e3)}),i?.addEventListener("click",()=>{m();const g=(o+1)%t.length;h(g),setTimeout(f,5e3)}),n.forEach((g,y)=>{g.addEventListener("click",()=>{m(),h(y),setTimeout(f,5e3)})});let p=0,_=0,b=!1;return s.addEventListener("touchstart",g=>{s instanceof HTMLElement&&(m(),p=g.touches[0].clientX,_=p,b=!0,s.style.transition="none")}),s.addEventListener("touchmove",g=>{if(!(s instanceof HTMLElement))return;_=g.touches[0].clientX;const y=_-p,x=-o*window.innerWidth+y;s.style.transform=`translateX(${x}px)`}),s.addEventListener("touchend",()=>{if(!b)return;b=!1;const g=_-p;Math.abs(g)>75&&(g<0?o=Math.min(o+1,t.length-1):g>0&&(o=Math.max(o-1,0))),c(!0),setTimeout(f,5e3)}),c(!0),d(),()=>{u()}},oe=s=>{s.stopImmediatePropagation(),s.preventDefault();const t=s.currentTarget,e=document.getElementById("info-button-content");!(t instanceof HTMLButtonElement)||!e||(t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false")))},re=()=>{const s=document.querySelector(".js-info-banner__button");s instanceof HTMLButtonElement&&s.addEventListener("click",oe)},v={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var ae=[`a[href]${v.inert}${v.negTabIndex}`,`area[href]${v.inert}${v.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,`input[type="radio"]${v.inert}${v.negTabIndex}${v.disabled}`,`select${v.inert}${v.negTabIndex}${v.disabled}`,`textarea${v.inert}${v.negTabIndex}${v.disabled}`,`button${v.inert}${v.negTabIndex}${v.disabled}`,`details${v.inert} > summary:first-of-type${v.negTabIndex}`,`iframe${v.inert}${v.negTabIndex}`,`audio[controls]${v.inert}${v.negTabIndex}`,`video[controls]${v.inert}${v.negTabIndex}`,`[contenteditable]${v.inert}${v.negTabIndex}`,`[tabindex]${v.inert}${v.negTabIndex}`];function tt(s){(s.querySelector("[autofocus]")||s).focus()}function le(s){const t=O(s,!0),e=t?O(s,!1)||t:null;return[t,e]}function O(s,t){if(t&&st(s))return s;if(he(s))if(s.shadowRoot){let e=et(s.shadowRoot,t);for(;e;){const i=O(e,t);if(i)return i;e=it(e,t)}}else if(s.localName==="slot"){const e=s.assignedElements({flatten:!0});t||e.reverse();for(const i of e){const n=O(i,t);if(n)return n}}else{let e=et(s,t);for(;e;){const i=O(e,t);if(i)return i;e=it(e,t)}}return!t&&st(s)?s:null}function et(s,t){return t?s.firstElementChild:s.lastElementChild}function it(s,t){return t?s.nextElementSibling:s.previousElementSibling}const ce=s=>s.matches("details:not([open]) *")&&!s.matches("details>summary:first-of-type")?!0:!(s.offsetWidth||s.offsetHeight||s.getClientRects().length),st=s=>s.shadowRoot?.delegatesFocus?!1:s.matches(ae.join(","))&&!ce(s);function he(s){return s.shadowRoot&&s.getAttribute("tabindex")==="-1"?!1:!s.matches(":disabled,[hidden],[inert]")}function D(s=document){const t=s.activeElement;return t?t.shadowRoot?D(t.shadowRoot)||document.activeElement:t:null}function de(s,t){const[e,i]=le(s);if(!e)return t.preventDefault();const n=D();t.shiftKey&&n===e?(i.focus(),t.preventDefault()):!t.shiftKey&&n===i&&(e.focus(),t.preventDefault())}function C(s,t){function e(i){if(!i||i===document||i===window)return null;const n=nt(i);return n&&(i=n),i.closest(s)||e(i.getRootNode().host)}return e(t)}function nt(s){return s.assignedSlot||(s.parentNode?nt(s.parentNode):null)}const M="data-a11y-dialog";class ot{$el;id;previouslyFocused;shown;constructor(t){this.$el=t,this.id=this.$el.getAttribute(M)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented?this:(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this)}show(t){return this.shown?this:this.fire("show",t).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=D(),this.previouslyFocused?.tagName==="BODY"&&t?.target&&(this.previouslyFocused=t.target),t?.type==="focus"?this.maintainFocus():tt(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(t){return this.shown?this.fire("hide",t).defaultPrevented?this:(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.(),this):this}on(t,e,i){return this.$el.addEventListener(t,e,i),this}off(t,e,i){return this.$el.removeEventListener(t,e,i),this}fire(t,e){const i=new CustomEvent(t,{detail:e,cancelable:!0});return this.$el.dispatchEvent(i),i}handleTriggerClicks(t){const e=t.composedPath()[0],i=C(`[${M}-show="${this.id}"]`,e),n=C(`[${M}-hide="${this.id}"]`,e),o=C(`[${M}-hide]`,e)&&C('[aria-modal="true"]',e)===this.$el;i&&this.show(t),(n||o)&&this.hide(t)}bindKeypress(t){if(C('[aria-modal="true"]',D())!==this.$el)return;let e=!1;try{e=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}t.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!e&&(t.preventDefault(),this.hide(t)),t.key==="Tab"&&de(this.$el,t)}maintainFocus(){const t=D();C(`[aria-modal="true"], [${M}-ignore-focus-trap]`,t)||tt(this.$el)}}function rt(){for(const s of document.querySelectorAll("[data-a11y-dialog]"))new ot(s)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",rt):rt());const ue=()=>document.querySelectorAll(".js-modal").forEach(s=>{if(!(s instanceof HTMLElement))return;const t=new ot(s);if(s.id==="dialog-menu"){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),i=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&i.length>0&&(t.on("show",()=>{e.forEach(n=>n.classList.add("u-hidden")),i.forEach(n=>n.classList.remove("u-hidden"))}),t.on("hide",()=>{e.forEach(n=>n.classList.remove("u-hidden")),i.forEach(n=>n.classList.add("u-hidden"))}))}t.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),at="68px",lt="50px",j=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=s.classList.contains("c-breadcrumb--is-small")?lt:at;e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n,s.style.paddingLeft=""),i.classList.contains("o-nav-button--visible")&&(s.style.paddingLeft=n,e.classList.contains("o-nav-button--visible")&&(s.style.paddingRight=n),e.classList.contains("o-nav-button--visible")||(s.style.paddingRight="")),!e.classList.contains("o-nav-button--visible")&&!i.classList.contains("o-nav-button--visible")&&(t.style.width="",s.style.paddingRight="")},pe=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{const n=t.scrollLeft>0,o=t.scrollLeft+(t.clientWidth+.5)<t.scrollWidth;n&&o?(e.classList?.add("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):n?(e.classList?.remove("o-nav-button--visible"),i.classList?.add("o-nav-button--visible")):o?(e.classList?.add("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")):(e.classList?.remove("o-nav-button--visible"),i.classList?.remove("o-nav-button--visible")),e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&j({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},me=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n})=>{if(t){const a=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(a){const l=Array.from(a).findIndex(c=>c.classList.contains("c-stepper__item--loading"));if(l<0)a[0].classList.add("c-stepper__item--loading");else{a[l].classList.remove("c-stepper__item--loading"),a[l].classList.add("c-stepper__item--loaded");const c=a[l].querySelector(".c-stepper__loader");c&&c instanceof HTMLElement&&(c.style.transition="width 0s linear"),l+1<a.length&&a[l+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let l=t.scrollLeft;switch(n){case"three-columns-articles":l+=t.clientWidth+32;break;case"rubrics":l+=t.clientWidth-36;break;default:l+=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:l,behavior:"smooth"}),i.classList.add("o-nav-button--visible"),l+t.clientWidth>=t.scrollWidth&&e.classList.remove("o-nav-button--visible")}else{const l=t.scrollWidth-t.clientWidth;t.scrollTo({left:l,behavior:"smooth"}),e.classList.remove("o-nav-button--visible"),i.classList.add("o-nav-button--visible")}e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&j({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},fe=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i,sliderVariant:n,delay:o})=>{if(t){const l=t.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");if(l){const c=Array.from(l).findIndex(h=>h.classList.contains("c-stepper__item--loading"));c<0?l[0].classList.add("c-stepper__item--loading"):(l[c].classList.remove("c-stepper__item--loading"),l[c].classList.remove("c-stepper__item--loaded"),c-1>0&&(l[c-1].classList.remove("c-stepper__item--loading"),l[c-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const h=l[c-1].querySelector(".c-stepper__loader");l[c-1].classList.add("c-stepper__item--loading"),h&&h instanceof HTMLElement&&(h.style.transition=`width ${o/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let c=t.scrollLeft;switch(n){case"three-columns-articles":c-=t.clientWidth+32;break;case"rubrics":c-=t.clientWidth-36;break;default:c-=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:c,behavior:"smooth"}),e.classList.add("o-nav-button--visible"),c===0&&i.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),i.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&e.classList.add("o-nav-button--visible");e.classList.contains("c-slider__button-container--has-space-around")&&i.classList.contains("c-slider__button-container--has-space-around")&&j({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})}},ge=({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})=>{pe({navigationContainer:s,navigatedList:t,nextBtn:e,prevBtn:i})},ve=s=>{const{sliderVariant:t}=s.dataset,{sliderAuto:e}=s.dataset,{sliderDelay:i}=s.dataset,n=i?parseInt(i,10):3e3,r=s.closest(".js-overview-bar-container")?.querySelector(".c-stepper"),a=r?.querySelectorAll(".c-stepper__item"),l=s.querySelector(".js-navigation-container__list"),c=s.querySelector(".o-nav-button--next-button"),h=s.querySelector(".o-nav-button--previous-button");if(!(!l||!c||!h)){if(l.clientWidth<l.scrollWidth&&(c.classList.add("o-nav-button--visible"),c.classList.contains("c-slider__button-container--has-space-around"))){const d=s.classList.contains("c-breadcrumb--is-small")?lt:at;s.style.paddingRight=d}if(c.addEventListener("click",me.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:h,sliderVariant:t})),h.addEventListener("click",fe.bind(!1,{navigationContainer:s,navigatedList:l,nextBtn:c,prevBtn:h,sliderVariant:t,delay:n})),e==="true"){const d=r?r.querySelector(".c-stepper__item--loading"):null;a&&(a.forEach(u=>{const m=u.querySelector(".c-stepper__loader");m&&m instanceof HTMLElement&&(m.style.transition=`width ${n/1e3}s linear`)}),d||a[0].classList.add("c-stepper__item--loading")),setInterval(()=>{c.classList.contains("o-nav-button--visible")?c.click():l&&h&&(l.scrollLeft=0,a&&(a.forEach(u=>{const m=u.querySelector(".c-stepper__loader");m&&m instanceof HTMLElement&&(m.style.transition="width 0s linear"),u.classList.remove("c-stepper__item--loading"),u.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{m&&m instanceof HTMLElement&&(m.style.transition=`width ${n/1e3}s linear`)},0)}),setTimeout(()=>{a[0].classList.add("c-stepper__item--loading")},0)),h.click())},n)}}},_e=()=>{const s=document.querySelectorAll(".js-navigation-container");Array.from(s).forEach(t=>{const e=t.querySelector(".js-navigation-container__list");if(e){const i=new ResizeObserver(n=>{n.forEach(o=>{const{width:r}=o.contentRect;r>0&&(ve(t),i.disconnect())})});i.observe(e)}})},ye=()=>{const s=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(s))if(t){const e=t.querySelector(".js-navigation-container__list"),i=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&i&&n&&window.addEventListener("resize",ge.bind(!1,{navigationContainer:t,navigatedList:e,nextBtn:i,prevBtn:n}))}};function S(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function w(s,t){return s.x=t.x,s.y=t.y,t.id!==void 0&&(s.id=t.id),s}function ct(s){s.x=Math.round(s.x),s.y=Math.round(s.y)}function G(s,t){const e=Math.abs(s.x-t.x),i=Math.abs(s.y-t.y);return Math.sqrt(e*e+i*i)}function $(s,t){return s.x===t.x&&s.y===t.y}function R(s,t,e){return Math.min(Math.max(s,t),e)}function Z(s,t,e){let i=`translate3d(${s}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function P(s,t,e,i){s.style.transform=Z(t,e,i)}const we="cubic-bezier(.4,0,.22,1)";function ht(s,t,e,i){s.style.transition=t?`${t} ${e}ms ${i||we}`:"none"}function U(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}function be(s){ht(s)}function Se(s){return"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,e)=>{s.onload=()=>t(s),s.onerror=e})}const E={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Le(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function Ee(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function dt(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let ut=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{ut=!0}}))}catch{}class Ae{constructor(){this._pool=[]}add(t,e,i,n){this._toggleListener(t,e,i,n)}remove(t,e,i,n){this._toggleListener(t,e,i,n,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,n,o,r){if(!t)return;const a=o?"removeEventListener":"addEventListener";e.split(" ").forEach(c=>{if(c){r||(o?this._pool=this._pool.filter(d=>d.type!==c||d.listener!==i||d.target!==t):this._pool.push({target:t,type:c,listener:i,passive:n}));const h=ut?{passive:n||!1}:!1;t[a](c,i,h)}})}}function pt(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function F(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function mt(s,t,e,i){return{x:t.x-F("left",s,t,e,i)-F("right",s,t,e,i),y:t.y-F("top",s,t,e,i)-F("bottom",s,t,e,i)}}class xe{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=F(t==="x"?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return R(e,this.max[t],this.min[t])}}const ft=4e3;let gt=class{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>ft&&(t=ft/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};class Pe{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new gt(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=S("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new xe(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,n=Math.round(this.height*e)||this.pswp.viewportSize.y;!this.sizeChanged(i,n)&&!t||this.content.setDisplayedSize(i,n)}sizeChanged(t,e){return t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,e,i,n){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;n||(t=R(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,r),this.pan.y=this.calculateZoomToPanOffset("y",e,r),ct(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:o.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*o+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),w(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,P(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;w(this.panAreaSize,mt(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return Z(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const Ie=.35,Te=.6,vt=.4,_t=.5;function Ce(s,t){return s*t/(1-t)}class ze{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&w(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:n}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&n&&n.currZoomLevel<=n.zoomLevels.fit&&!this.gestures.isMultitouch){const o=n.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,Te);const r=1-Math.abs(this._getVerticalDragRatio(n.pan.y));this.pswp.applyBgOpacity(r),n.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),n&&(ct(n.pan),n.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let n=0;if(this.pswp.animations.stopAll(),e.isShifted()){const r=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-_t&&r<0||t.x<.1&&r<-.5?(n=1,t.x=Math.min(t.x,0)):(t.x>_t&&r>0||t.x>-.1&&r>.5)&&(n=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(n,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:n,bounds:o}=i,r=n[t],a=this.pswp.bgOpacity<1&&t==="y",c=r+Ce(e[t],.995);if(a){const f=this._getVerticalDragRatio(r),p=this._getVerticalDragRatio(c);if(f<0&&p<-vt||f>0&&p>vt){this.pswp.close();return}}const h=o.correctPan(t,c);if(r===h)return;const d=h===c?1:.82,u=this.pswp.bgOpacity,m=h-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:h,velocity:e[t],dampingRatio:d,onUpdate:f=>{if(a&&this.pswp.bgOpacity<1){const p=1-(h-f)/m;this.pswp.applyBgOpacity(R(u+(1-u)*p,0,1))}n[t]=Math.floor(f),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:n,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:a}=this.pswp,l=e[t]-n[t],c=a.x+l;if(!l||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return a.moveTo(c,!0),!0;const{bounds:h}=r,d=r.pan[t]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const u=a.getCurrSlideX(),m=a.x-u,f=l>0,p=!f;if(d>h.min[t]&&f){if(h.min[t]<=this.startPan[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,d)}else if(d<h.max[t]&&p){if(this.startPan[t]<=h.max[t])return a.moveTo(c,!0),!0;this._setPanWithFriction(t,d)}else if(m!==0){if(m>0)return a.moveTo(Math.max(c,u),!0),!0;if(m<0)return a.moveTo(Math.min(c,u),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!a.isShifted()&&h.min.y!==h.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var e,i;return(t-((e=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&e!==void 0?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:n}=this.pswp;if(!n)return;const{pan:o,bounds:r}=n;if(r.correctPan(t,e)!==e||i){const l=Math.round(e-o[t]);o[t]+=l*(i||Ie)}else o[t]=e}}const Oe=.05,De=.15;function yt(s,t,e){return s.x=(t.x+e.x)/2,s.y=(t.y+e.y)/2,s}class Me{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,w(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:n,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const a=r.zoomLevels.min,l=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;yt(this._startZoomPoint,e,n),yt(this._zoomPoint,t,i);let c=1/G(e,n)*G(t,i)*this._startZoomLevel;if(c>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),c<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const h=1-(a-c)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:h}).defaultPrevented||o.applyBgOpacity(h)}else c=a-(a-c)*De;else c>l&&(c=l+(c-l)*Oe);r.pan.x=this._calculatePanForZoomLevel("x",c),r.pan.y=this._calculatePanForZoomLevel("y",c),r.setZoomLevel(c),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const n=i.currZoomLevel;let o,r=!0;n<i.zoomLevels.initial?o=i.zoomLevels.initial:n>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=n);const a=e.bgOpacity,l=e.bgOpacity<1,c=w({x:0,y:0},i.pan);let h=w({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=n,w(this._startPan,c)),r&&(h={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),h={x:i.bounds.correctPan("x",h.x),y:i.bounds.correctPan("y",h.y)},i.setZoomLevel(n);const d=!$(h,c);if(!d&&!r&&!l){i._setResolution(o),i.applyCurrentZoomPan();return}e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:u=>{if(u/=1e3,d||r){if(d&&(i.pan.x=c.x+(h.x-c.x)*u,i.pan.y=c.y+(h.y-c.y)*u),r){const m=n+(o-n)*u;i.setZoomLevel(m)}i.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(R(a+(1-a)*u,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function wt(s){return!!s.target.closest(".pswp__container")}class $e{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,n=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");n?this._doClickOrTapAction("imageClick",t,e):o&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){wt(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){wt(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){var n;const{pswp:o}=this.gestures,{currSlide:r}=o,a=t+"Action",l=o.options[a];if(!o.dispatch(a,{point:e,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(o,e,i);return}switch(l){case"close":case"next":o[l]();break;case"zoom":r?.toggleZoom(e);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(e):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(n=this.gestures.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible");break}}}}const Re=10,Ze=300,Fe=25;class qe{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new ze(this),this.zoomLevels=new Me(this),this.tapHandler=new $e(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,n){const{pswp:o}=this,{events:r}=o,a=n?t+n:"";r.add(o.scrollWrap,t+e,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),a&&r.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const e=t.type==="mousedown"||t.pointerType==="mouse";if(e&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,w(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,w(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?$(this.p1,this.prevP1)||this.drag.change():(!$(this.p1,this.prevP1)||!$(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,w(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted()){e.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?Ze:0;this._tapTimer?(this._clearTapTimer(),G(this._lastStartP1,this.startP1)<Fe&&this.tapHandler.doubleTap(this.startP1,t)):(w(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,n=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);e==="up"&&n>-1?this._ongoingPointers.splice(n,1):e==="down"&&n===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):n>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[n]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&w(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&w(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),e==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){w(this.prevP1,this.p1),w(this.prevP2,this.p2)}_updateStartPoints(){w(this.startP1,this.p1),w(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=Re&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:t.identifier!==void 0&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const ke=.35;class Be{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),n=i!==this.slideWidth;n&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{n&&P(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=S("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=t===1?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:n}=this;let o=n.potentialIndex+t;const r=n.getNumItems();if(n.canLoop()){o=n.getLoopedIndex(o);const l=(t+r)%r;l<=r/2?t=l:t=l-r}else o<0?o=0:o>=r&&(o=r-1),t=o-n.potentialIndex;n.potentialIndex=o,this._currPositionIndex-=t,n.animations.stopMainScroll();const a=this.getCurrSlideX();if(!e)this.moveTo(a),this.updateCurrItem();else{n.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:c=>{this.moveTo(c)},onComplete:()=>{this.updateCurrItem(),n.appendHeavy()}});let l=n.potentialIndex-n.currIndex;if(n.canLoop()){const c=(l+r)%r;c<=r/2?l=c:l=c-r}Math.abs(l)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let n=Math.abs(i),o;n>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),n=3,this.itemHolders.forEach(r=>{var a;(a=r.slide)===null||a===void 0||a.destroy(),r.slide=void 0}));for(let r=0;r<n;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,P(o.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(o,e.currIndex-n+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,P(o.el,this._containerShiftIndex*this.slideWidth),e.setContent(o,e.currIndex+n-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach((r,a)=>{r.slide&&r.slide.setIsActive(a===1)}),e.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const n=Math.round(t-this.x);(i<0&&n>0||i>=this.pswp.getNumItems()-1&&n<0)&&(t=this.x+n*ke)}this.x=t,this.pswp.container&&P(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}}const Ne={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},I=(s,t)=>t?s:Ne[s];class He{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented||Le(t))return;let i,n,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case I("Escape",r):e.options.escKey&&(i="close");break;case I("z",r):i="toggleZoom";break;case I("ArrowLeft",r):n="x";break;case I("ArrowUp",r):n="y";break;case I("ArrowRight",r):n="x",o=!0;break;case I("ArrowDown",r):o=!0,n="y";break;case I("Tab",r):this._focusRoot();break}if(n){t.preventDefault();const{currSlide:a}=e;e.options.arrowKeys&&n==="x"&&e.getNumItems()>1?i=o?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[n]+=o?-80:80,a.panTo(a.pan.x,a.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const We="cubic-bezier(.4,0,.22,1)";class Ve{constructor(t){var e;this.props=t;const{target:i,onComplete:n,transform:o,onFinish:r=()=>{},duration:a=333,easing:l=We}=t;this.onFinish=r;const c=o?"transform":"opacity",h=(e=t[c])!==null&&e!==void 0?e:"";this._target=i,this._onComplete=n,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{ht(i,c,a,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[c]=h},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),be(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const je=12,Ge=.75;class Ue{constructor(t,e,i){this.velocity=t*1e3,this._dampingRatio=e||Ge,this._naturalFrequency=i||je,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i=0,n;e/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(this._dampingRatio===1)n=this.velocity+this._naturalFrequency*t,i=(t+n*e)*o,this.velocity=i*-this._naturalFrequency+n*o;else if(this._dampingRatio<1){n=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);i=o*(t*r+n*a),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*n*r)}return i}}class Ke{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:n,onUpdate:o,onComplete:r,onFinish:a=()=>{},dampingRatio:l,naturalFrequency:c}=t;this.onFinish=a;const h=new Ue(n,l,c);let d=Date.now(),u=e-i;const m=()=>{this._raf&&(u=h.easeFrame(u,Date.now()-d),Math.abs(u)<1&&Math.abs(h.velocity)<50?(o(i),r&&r(),this.onFinish()):(d=Date.now(),o(u+i),this._raf=requestAnimationFrame(m)))};this._raf=requestAnimationFrame(m)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class Xe{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new Ke(t):new Ve(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class Ye{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:n}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let o=-n;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=e.currZoomLevel*o;e.zoomTo(r,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(t.deltaMode===1&&(i*=18,n*=18),e.panTo(e.pan.x-i,e.pan.y-n))}}function Qe(s){if(typeof s=="string")return s;if(!s||!s.isCustomSVG)return"";const t=s;let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(t.size||32),t.outlineID&&(e+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),e+=t.inner,e+="</svg>",e}class Je{constructor(t,e){var i;const n=e.name||e.className;let o=e.html;if(t.options[n]===!1)return;typeof t.options[n+"SVG"]=="string"&&(o=t.options[n+"SVG"]),t.dispatch("uiElementCreate",{data:e});let r="";e.isButton?(r+="pswp__button ",r+=e.className||`pswp__button--${e.name}`):r+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();const l=S(r,a);if(e.isButton){a==="button"&&(l.type="button");let{title:d}=e;const{ariaLabel:u}=e;typeof t.options[n+"Title"]=="string"&&(d=t.options[n+"Title"]),d&&(l.title=d);const m=u||d;m&&l.setAttribute("aria-label",m)}l.innerHTML=Qe(o),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=d=>{typeof e.onClick=="string"?t[e.onClick]():typeof e.onClick=="function"&&e.onClick(d,l,t)});const c=e.appendTo||"bar";let h=t.element;c==="bar"?(t.topBar||(t.topBar=S("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),h=t.topBar):(l.classList.add("pswp__hide-on-close"),c==="wrapper"&&(h=t.scrollWrap)),(i=h)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",l,e))}}function bt(s,t,e){s.classList.add("pswp__button--arrow"),s.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e?s.disabled=!(t.currIndex<t.getNumItems()-1):s.disabled=!(t.currIndex>0))})}const ti={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:bt},ei={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(s,t)=>{bt(s,t,!0)}},ii={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},si={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},ni={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(s,t)=>{let e,i=null;const n=(a,l)=>{s.classList.toggle("pswp__preloader--"+a,l)},o=a=>{e!==a&&(e=a,n("active",a))},r=()=>{var a;if(!((a=t.currSlide)!==null&&a!==void 0&&a.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;o(!!(!((l=t.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",a=>{t.currSlide===a.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},oi={name:"counter",order:5,onInit:(s,t)=>{t.on("change",()=>{s.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function St(s,t){s.classList.toggle("pswp--zoomed-in",t)}class ri{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[ii,ti,ei,si,ni,oi],t.dispatch("uiRegister"),this.uiElementsData.sort((e,i)=>(e.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),t.on("change",()=>{var e;(e=t.element)===null||e===void 0||e.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new Je(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:n}=e;if(this.pswp.opener.isOpen||(n=e.zoomLevels.initial),n===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=n;const o=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(o)<.01||!e.isZoomable()){St(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=n===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial;St(t,r<=n),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function ai(s){const t=s.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function li(s,t,e){const i=s.getBoundingClientRect(),n=i.width/t,o=i.height/e,r=n>o?n:o,a=(i.width-t*r)/2,l=(i.height-e*r)/2,c={x:i.left+a,y:i.top+l,w:t*r};return c.innerRect={w:i.width,h:i.height,x:a,y:l},c}function ci(s,t,e){const i=e.dispatch("thumbBounds",{index:s,itemData:t,instance:e});if(i.thumbBounds)return i.thumbBounds;const{element:n}=t;let o,r;if(n&&e.options.thumbSelector!==!1){const a=e.options.thumbSelector||"img";r=n.matches(a)?n:n.querySelector(a)}return r=e.applyFilters("thumbEl",r,t,s),r&&(t.thumbCropped?o=li(r,t.width||t.w||0,t.height||t.h||0):o=ai(r)),e.applyFilters("thumbBounds",o,t,s)}let hi=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},di=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new hi(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}},ui=class{constructor(t,e){if(this.element=S("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(U(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Z(0,0,t/250)):U(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},pi=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=E.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new ui(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=S("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=S("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=E.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=E.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder())}onError(){this.state=E.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===E.LOADING,this)}isError(){return this.state===E.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(U(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==E.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=S("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=S("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===E.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||dt())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!dt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===E.LOADED||this.state===E.ERROR)&&this.removePlaceholder()))}};const mi=5;function Lt(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new gt(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=pt(o,t);const a=mt(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function fi(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return Lt(e,t,s)}class gi{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,mi),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,n=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(e.currIndex+(n?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(e.currIndex+(n?-o:o))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=fi(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);e!==-1&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(i=>i.index===t);e!==-1&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}let vi=class extends di{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new pi(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?Ee(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Lt(t,this,e)}};const q=.003;class _i{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan());else{var n;this._animateRootOpacity=(n=i.showHideOpacity)!==null&&n!==void 0?n:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>q,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(q)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(q)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(q)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(q)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let e=!1,i=!0;Se(this._placeholder).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,e;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(e=this.pswp.element)===null||e===void 0||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(e=t.currSlide)===null||e===void 0||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:n,viewportSize:o}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,a=-o.y+(this._thumbBounds.y-i.y)+i.h,l=o.x-i.w,c=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",Z(r,a)),this._animateTo(this._cropContainer2,"transform",Z(l,c))):(P(this._cropContainer1,r,a),P(this._cropContainer2,l,c))}n&&(w(n.pan,i||this._thumbBounds),n.currZoomLevel=this._thumbBounds.w/n.width,t?this._animateTo(n.container,"transform",n.getCurrentTransform()):n.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration){t.style[e]=i;return}const{animations:n}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{n.activeAnimations.length||this._onAnimationComplete()},target:t};o[e]=i,n.startTransition(o)}}const yi={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class wi extends vi{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Ae,this.animations=new Xe,this.mainScroll=new Be(this),this.gestures=new qe(this),this.opener=new _i(this),this.keyboard=new He(this),this.contentLoader=new gi(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Ye(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),R(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var e;(e=t.slide)===null||e===void 0||e.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;(e=this.currSlide)===null||e===void 0||e.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(e=>{var i;(i=e.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{var n,o;let r=((n=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&n!==void 0?n:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(e,t,!0),i===1)){var a;this.currSlide=e.slide,(a=e.slide)===null||a===void 0||a.setIsActive(!0)}}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const n=this.getItemData(e);t.slide=new Pe(n,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=pt(this.options,this);!t&&$(e,this._prevViewportSize)||(w(this._prevViewportSize,e),this.dispatch("beforeResize"),w(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=S("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=S("pswp__bg","div",this.element),this.scrollWrap=S("pswp__scroll-wrap","section",this.element),this.container=S("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new ri(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return ci(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...yi,...t}}}function k(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function bi(s,t,e){let i=`translate3d(${s}px,0px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function K(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}const A={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Si(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function B(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function Li(s){return typeof s=="function"&&s.prototype&&s.prototype.goTo}function Et(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class Ei{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class Ai{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,o,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:e,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(n=this.pswp)===null||n===void 0||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const n=new Ei(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,n)}),n}}class xi{constructor(t,e){if(this.element=k("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(K(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=bi(0,0,t/250)):K(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class Pi{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=A.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new xi(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=k("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=k("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(e=this.data.src)!==null&&e!==void 0?e:"",n.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=A.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=A.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===A.LOADED||this.state===A.ERROR)&&this.removePlaceholder())}onError(){this.state=A.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===A.LOADING,this)}isError(){return this.state===A.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(K(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==A.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=k("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=k("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===A.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||Et())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Et()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===A.LOADED||this.state===A.ERROR)&&this.removePlaceholder()))}}function Ii(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function N(s,t,e,i,n){let o=0;if(t.paddingFn)o=t.paddingFn(e,i,n)[s];else if(t.padding)o=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function Ti(s,t,e,i){return{x:t.x-N("left",s,t,e,i)-N("right",s,t,e,i),y:t.y-N("top",s,t,e,i)-N("bottom",s,t,e,i)}}const At=4e3;class Ci{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const o=i.x/n.x,r=i.y/n.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>At&&(t=At/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function xt(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:o}=t;if(o){n=new Ci(o,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=Ii(o,t);const a=Ti(o,r,s,e);n.update(i.width,i.height,a)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function zi(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return xt(e,t,s)}class Oi extends Ai{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const n=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",n.numItems,i)}createContentFromData(t,e){return new Pi(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let n={};Array.isArray(i)?n=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),n=i.items[t]);let o=n;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?B(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var n;e.msrc=o.currentSrc||o.src,e.alt=(n=o.getAttribute("alt"))!==null&&n!==void 0?n:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return xt(t,this,e)}}class Di extends Oi{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){B(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Si(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const n={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,n=B(this.options.children,this.options.childSelector,t.currentTarget).findIndex(o=>o===e||o.contains(e));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const n=B(this.options.gallery);n[0]&&(e={gallery:n[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const n=[],o=typeof i.pswpModule;if(Li(i.pswpModule))n.push(Promise.resolve(i.pswpModule));else{if(o==="string")throw new Error("pswpModule as string is no longer supported");if(o==="function")n.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&n.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=zi(t,this));const r=++this._uid;Promise.all(n).then(a=>{if(this.shouldOpen){const l=a[0];this._openPhotoswipe(l,r)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(n=>{var o;(o=this._listeners[n])===null||o===void 0||o.forEach(r=>{i.on(n,r)})}),Object.keys(this._filters).forEach(n=>{var o;(o=this._filters[n])===null||o===void 0||o.forEach(r=>{i.addFilter(n,r.fn,r.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},B(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const Mi=()=>{let s=null;return s=new Di({gallery:"#photoswipe-gallery",children:"a",pswpModule:wi,zoom:!1,imageClickAction:"next",tapAction:"next"}),s.on("uiRegister",()=>{s?.pswp?.ui?.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{s?.pswp?.on("change",()=>{const e=s?.pswp?.currSlide?.data.element;if(e){const i=e.querySelector(".caption-content");t.innerHTML=i?.innerHTML||""}})}})}),s.init(),()=>{s&&(s.destroy(),s=null)}},$i=()=>{const s=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar");if(!t)return;const{documentElement:e}=document;let i=e.scrollHeight-e.clientHeight;if(!i)return;const n=e.scrollTop;s&&(i=s.scrollHeight-e.clientHeight+(window.pageYOffset+s.getBoundingClientRect().top));const o=Math.round(n/i*100);t.style.width=`${o}%`,o>=100&&(t.style.width="100%")},Ri=()=>{document.querySelector(".c-progress")&&window.addEventListener("scroll",$i)},Zi=(s={})=>{const{buttonSelector:t=".c-scroll-to-top"}=s,e=document.querySelector(t),i=e?.querySelector("button");if(!e||!i)return;const n=e.dataset.triggerSelector||"[data-scroll-trigger]",o=parseInt(e.dataset.triggerOffset||"0",10);e.style.display="none";const r=()=>{const l=document.querySelector(n);let c=!1;if(l){const h=l.getBoundingClientRect().top;c=window.pageYOffset>=h-o}else c=window.pageYOffset>300;e.style.display=c?"block":"none"},a=()=>{window.scrollTo({top:0,behavior:"smooth"})};window.addEventListener("scroll",r),i.addEventListener("click",a),r()},X="#page-content",Y="#text-tooltip",Fi=".tooltip-btn",Pt="c-text-tooltip--show",qi=["#page-content .c-content p","#page-content .c-content h2","#page-content .c-content h3","#page-content .c-content h4","#page-content .c-content h5","#page-content .c-content h6","#page-content .c-content li","#page-content .c-content span","#page-content header span","#page-content header h1","#page-content header h2"],It=(s,t)=>s instanceof Element?t.some(e=>s.matches(e)):!1,ki=(s,t)=>{const e=s.startContainer.nodeType===Node.ELEMENT_NODE?s.startContainer:s.startContainer.parentElement,i=s.endContainer.nodeType===Node.ELEMENT_NODE?s.endContainer:s.endContainer.parentElement;return!!e&&It(e,t)||!!i&&It(i,t)},Bi=s=>{if(!s.focusNode)return null;const t=s.anchorNode?.compareDocumentPosition(s.focusNode);return t?(t&4)>0:s.anchorOffset<s.focusOffset},Ni=(s,t,e)=>{const i=document.querySelector(`${X} ${Y}`),n=document.querySelector(`${X}`),o=document.querySelectorAll(`${X} ${Y} ${Fi}`);if(!i||!n){console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");return}Array.from(o).forEach(l=>l.setAttribute("data-selected-text",e));const r=s.getClientRects(),a=r[t?r.length-1:0];i.style.top=`${a.top-n.getBoundingClientRect().top-(i.offsetHeight+10)}px`,a.width<i.offsetWidth?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width/2-i.offsetWidth/2}px`:t?i.style.left=`${a.left-n.getBoundingClientRect().left+a.width-i.offsetWidth}px`:i.style.left=`${a.left-n.getBoundingClientRect().left}px`,i.classList.add(Pt)},Tt=()=>{const s=document.querySelector(`${Y}`);s&&s.classList.remove(Pt)},H=({type:s})=>{const t=window.getSelection();if(s==="selectionchange"){Tt();return}if(!t||!t.rangeCount)return;const e=t.getRangeAt(0),i=t.toString().trim();if(i.length){const n=ki(e,qi),o=Bi(t)||!1;n&&Ni(e,o,i);return}Tt()},Hi=()=>{if(!window?.getSelection){console.warn("Selection API isn't supported");return}document.addEventListener("mouseup",H),document.addEventListener("selectionchange",H),document.addEventListener("touchend",H),document.addEventListener("touchcancel",H)},Wi=s=>{const{target:t}=s;if(t instanceof Element){const e=t.closest(".c-search-form--button");e&&(s.preventDefault(),e.classList.remove("c-search-form--button"))}},Vi=(s=document.querySelector(".c-search-form--button"))=>{s&&s.addEventListener("click",t=>{Wi(t)})},ji=({tabsContainerElement:s,event:t})=>{t.preventDefault();const e=t.target;if(!(e instanceof HTMLButtonElement))return;const i=s.querySelectorAll('[role="tab"]'),n=s.querySelectorAll('[role="tabpanel"]'),o=e.getAttribute("aria-controls"),r=Object.values(n).find(a=>a.id===o);i.forEach(a=>{a.setAttribute("aria-selected","false")}),n.forEach(a=>{a.setAttribute("aria-hidden","true")}),e.setAttribute("aria-selected","true"),r&&r.removeAttribute("aria-hidden")},Ct=s=>s.code==="ArrowLeft"||s.keyCode===39,zt=s=>s.code==="ArrowRight"||s.keyCode===37,Gi=(s=document.querySelectorAll(".js-tabs"))=>{s.length>0&&s.forEach(t=>{const e=t.querySelectorAll('[role="tab"]');e.forEach(n=>{n.addEventListener("click",o=>{ji({tabsContainerElement:t,event:o})})});const i=t.querySelector('[role="tablist"]');if(i&&e.length>0){let n=0;i.addEventListener("keydown",o=>{o instanceof KeyboardEvent&&(Ct(o)||zt(o))&&(e[n].setAttribute("tabindex","-1"),Ct(o)?(n+=1,n>=e.length&&(n=0)):zt(o)&&(n-=1,n<0&&(n=e.length-1)),e[n].setAttribute("tabindex","0"),e[n].focus())})}})},W=s=>{const[t,e]=s.split("h").map(Number);return t*60+e},Ot=()=>{const s=new Date,t=s.getHours(),e=s.getMinutes();return t*60+e},Ui=(s,t)=>{const e=Ot();if(e<s||e>t)return 0;const i=t-s;return(e-s)/i},Ki=s=>{const t=Ot();let e=null,i=null,n=-1;return Array.from(s).find((o,r,a)=>{if(r===a.length-1)return!1;const l=W(o.textContent),c=W(a[r+1].textContent);return t>=l&&t<c?(e=o.textContent,i=a[r+1].textContent,n=r,!0):!1}),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}},Xi=()=>{const s=document.querySelectorAll(".c-timeline__time");if(!s||s.length<2)return;const t=document.querySelector(".c-timeline__progress-bar"),{currentIntervalStartTime:e,currentIntervalEndTime:i,currentIntervalIndex:n}=Ki(s);if(!e||!i)return;const o=W(e),r=W(i),a=Ui(o,r);if(t instanceof HTMLElement){if(t.classList.contains("c-timeline__progress-bar--is-desktop")&&s.length>=5){const l="172px / 2";switch(n){case 0:t.style.width=`calc(${l} + (((${l} + 25% - ${l} / 2) - ${l}) * ${a})`;break;case 1:t.style.width=`calc((${l} + 25% - ${l} / 2) + (((50%) - (${l} + 25% - ${l} / 2)) * ${a})`;break;case 2:t.style.width=`calc((50%) + (((75% - ${l} / 2) - (50%)) * ${a})`;break;case 3:t.style.width=`calc((75% - ${l} / 2) + (((100% - ${l}) - (75% - ${l} / 2)) * ${a}`;break;default:t.style.width="0%"}}if(t.classList.contains("c-timeline__progress-bar--is-mobile")){const l="45px / 2",c="20px";switch(n){case 0:case 1:case 2:case 3:t.style.width=`calc((${c} + ${l}) + (((60% + ${l}) - (${c} + ${l})) * ${a})`;break;default:t.style.width="0%"}if(n===1||n===2||n===3){const h=document.querySelectorAll(".c-timeline__time"),d=document.querySelectorAll(".c-timeline__event");h.length>0&&d.length>0&&(h[0].textContent=e,h[1].textContent=i,d[0].textContent=d[n].textContent,d[1].textContent=d[n+1].textContent)}}}},Q="c-icon-item__container--is-highlighted",Yi=s=>{s.find(e=>e.classList.contains(Q))?.classList.remove(Q)},Qi=()=>{const s=document.querySelector(".c-toolbar");if(s){const t=window.location.origin+window.location.pathname,e=Array.from(s.querySelectorAll(".c-icon-item__container"));Yi(e),e.find(n=>n.querySelector("a")?.getAttribute("href")===t)?.classList.add(Q)}},Dt=()=>{const s=document.querySelector(".c-map-towns");if(!s){new MutationObserver((n,o)=>{document.querySelector(".c-map-towns")&&(o.disconnect(),Dt())}).observe(document.body,{childList:!0,subtree:!0});return}const t=()=>{const i=document.querySelectorAll(".js-city-marker");if(i.length===0)return!1;const n=()=>{let o=!0;i.forEach(r=>{if(!r.classList.contains("c-map-towns__city-marker--is-hidden"))return;const a=r.querySelector(".js-city-anchor"),l=r.querySelector(".js-city-text"),c=r.querySelector(".js-city-bg");if(!(a instanceof SVGGraphicsElement)||!(l instanceof SVGTextElement)||!(c instanceof SVGRectElement))return;const h=a.getBBox();if(h.width>0){const{x:d,y:u,width:m,height:f}=h;r.setAttribute("transform",`translate(${d+m/2}, ${u+f/2})`);const p=l.getBBox(),_=p.width+8,b=p.height+4;c.setAttribute("width",`${_}`),c.setAttribute("height",`${b}`),c.setAttribute("x",`${-_/2}`),c.setAttribute("y",`${-b-8}`),l.setAttribute("y",`${-b/2-5}`),r.classList.remove("c-map-towns__city-marker--is-hidden")}else o=!1}),o||requestAnimationFrame(n)};return requestAnimationFrame(n),!0};if(t())return;new MutationObserver((i,n)=>{t()&&n.disconnect()}).observe(s,{childList:!0,subtree:!0})},Ji=(s,t)=>{if(s.startsWith("97"))return Array.from(document.querySelectorAll(`path[id^="town-${s}"][id$="-drom"]`));const e=`[id^="town-${s}"]`;return t?Array.from(t.querySelectorAll(e)):[]},ts=(s,t,e,i)=>{(i.startsWith("97")?s:document.querySelector(`.c-map-towns__layer-towns [href="#${e}"], .c-map-towns__layer-towns [xlink\\:href="#${e}"]`))?.classList.forEach(o=>{o.includes("--")&&t.classList.add(o)})},es=(s,t)=>{const e=s.getAttribute("id"),i=s.getAttribute("data-url"),n=s.getAttribute("data-name");if(!e||!i)return null;const o=document.createElementNS("http://www.w3.org/2000/svg","a");o.setAttribute("href",i),n&&o.setAttribute("title",n);let r;if(t.startsWith("97")){const a=s.cloneNode(!0);if(!(a instanceof SVGElement))return null;r=a,r.removeAttribute("id")}else r=document.createElementNS("http://www.w3.org/2000/svg","use"),r.setAttribute("href",`#${e}`);return r.classList.add("c-map-towns__path"),ts(s,r,e,t),o.appendChild(r),o},is=(s,t,e)=>{s.innerHTML="",e.forEach(o=>s.appendChild(o));const i=s.getBBox(),n=5;t.setAttribute("viewBox",`${i.x-n} ${i.y-n} ${i.width+n*2} ${i.height+n*2}`)};let Mt=!1;const J=()=>{if(Mt)return;if(!document.querySelector(".c-map-towns")){new MutationObserver((d,u)=>{document.querySelector(".c-map-towns")&&(u.disconnect(),J())}).observe(document.body,{childList:!0,subtree:!0});return}const t=document.getElementById("js-zoom-overlay"),e=document.getElementById("js-zoom-svg"),i=document.getElementById("js-zoom-group"),n=document.getElementById("js-zoom-close");if(!(t instanceof HTMLElement)||!(e instanceof SVGSVGElement)||!(i instanceof SVGGElement)||!(n instanceof HTMLElement)){requestAnimationFrame(J);return}Mt=!0;const o=document.querySelector(".c-map-towns__map"),r=document.querySelector(".c-map-towns__droms"),a=document.getElementById("js-zoom-label"),l=h=>{const{target:d}=h;if(!(d instanceof Element))return;const u=d?.closest(".c-map-towns__dept-trigger");if(!u)return;const m=u.getAttribute("id")?.replace("out-","")||"",f=u.getAttribute("data-name"),p=document.querySelector(".c-map-towns__sprite"),b=Ji(m,p).map(L=>es(L,m)).filter(L=>L!==null);a&&f&&(a.textContent=f),is(i,e,b),t.setAttribute("aria-hidden","false")};o?.addEventListener("click",l),r?.addEventListener("click",l),n.addEventListener("click",()=>{t.setAttribute("aria-hidden","true")}),t.addEventListener("click",h=>{h.target===t&&t.setAttribute("aria-hidden","true")})},ss=()=>{ee(),Gi(),Ht(),re(),Xt(),Ri(),Mi(),ue(),Vi(),V("winterOlympicsGames","countdown-winter-olympics-games"),V("eurovision","countdown-eurovision"),V("worldFoot2026","countdown-world-foot-2026"),Hi(),Bt(),se(),jt(),kt("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),Vt(),Dt(),Qi(),Zt(),Ft(),ne(),J(),_e(),ye(),ie(),Rt(),Xi(),Zi()};T.initScripts=ss,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 24 Feb 2026 16:02:09 GMT
3
+ * Generated on Thu, 26 Feb 2026 17:10:53 GMT
4
4
  */
5
5
 
6
6
  $token-variables: (