1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[160],{10160:(t,e,i)=>{i.r(e),i.d(e,{default:()=>s}),i(8380),i(23057);class s{constructor(t){t&&("true"===t?.dataset?.cmsInited||(t?.dataset?t.dataset.cmsInited="true":t.setAttribute("data-cms-inited","true"),this.slideshow=t,this.arrowNav=this.slideshow?.querySelector?.(".ds-card__media__slideshow__arrow-nav")||null,this.prev=this.arrowNav?this.arrowNav.querySelector(".ds-card__media__slideshow__arrow-nav--prev"):null,this.next=this.arrowNav?this.arrowNav.querySelector(".ds-card__media__slideshow__arrow-nav--next"):null,this.dotNav=this.slideshow?.querySelector?.(".ds-dot-nav")||null,this.dotNavDots=this.dotNav?this.dotNav.querySelectorAll(".ds-dot-nav__dot"):[],this.activeSlideIndicator=this.slideshow?.querySelector?.(".ds-card__media__slideshow__active-slide-indicator .active")||null,this.activeSlideIndicatorSr=this.slideshow?.querySelector?.(".ds-card__media__slideshow__active-slide-indicator .sr-only")||null,this.list=this.slideshow?.querySelector?.(".ds-card__media__slideshow__list")||null,this.figcaptions=this.slideshow?.querySelectorAll?.(".ds-card__media__slideshow__figcaption")||[],this.touchStartX=0,this.touchEndX=0,this.touchStartY=0,this.touchEndY=0,this.init()))}init(){this.slideshow&&(this.arrowNav&&this.arrowEvents(),this.touchEvents(),this.figcaptionToggle(),this.updateControlsOffset(),this.updateTranslateToActive())}arrowEvents(){this.disableArrowNav(),this.prev?.addEventListener("click",(()=>{this.arrowNavAction("prev")})),this.next?.addEventListener("click",(()=>{this.arrowNavAction("next")}))}touchEvents(){this.list?.addEventListener("touchstart",(t=>{const e=t.touches&&t.touches[0];this.touchStartX=e?e.screenX??e.clientX??0:t.screenX??0,this.touchStartY=e?e.screenY??e.clientY??0:t.screenY??0}),{passive:!0}),this.list?.addEventListener("touchend",(t=>{const e=t.changedTouches&&t.changedTouches[0];this.touchEndX=e?e.screenX??e.clientX??0:t.screenX??0,this.touchEndY=e?e.screenY??e.clientY??0:t.screenY??0,this.handleSwipe()}),{passive:!0})}disableArrowNav(){const t=this.slideshow?.querySelector?.('.ds-card__media__slideshow__item[data-active="true"]');t&&("true"===t.getAttribute("data-first")?(this.prev?.setAttribute("disabled","true"),this.prev?.setAttribute("aria-hidden","true")):(this.prev?.removeAttribute("disabled"),this.prev?.removeAttribute("aria-hidden")),"true"===t.getAttribute("data-last")?(this.next?.setAttribute("disabled","true"),this.next?.setAttribute("aria-hidden","true")):(this.next?.removeAttribute("disabled"),this.next?.removeAttribute("aria-hidden")))}arrowNavAction(t){this.slideAction(t),this.disableArrowNav()}setActiveSlideIndicator(t){this.activeSlideIndicator&&null!=t&&(this.activeSlideIndicator.innerHTML=t,this.activeSlideIndicatorSr.innerHTML=`image active ${t}/${this.slideshow.querySelectorAll(".ds-card__media__slideshow__item").length}`)}setActiveDotNav(t){this.dotNavDots?.forEach((t=>{t?.setAttribute?.("data-active","false")})),this.dotNav?.querySelector?.('.ds-dot-nav__dot[data-index="'+t+'"]')?.setAttribute("data-active","true"),this.dotNav&&t&&this.updateDotWindow(parseInt(t,10))}handleSwipe(){const t=Math.abs(this.touchEndX-this.touchStartX);t<=Math.abs(this.touchEndY-this.touchStartY)||t<30||(this.touchEndX<this.touchStartX&&this.slideAction("right"),this.touchEndX>this.touchStartX&&this.slideAction("left"))}slideAction(t){const e=this.slideshow?.querySelector?.('.ds-card__media__slideshow__item[data-active="true"]');let i;if(!e)return;if("left"===t||"prev"===t?i=e.previousElementSibling:"right"!==t&&"next"!==t||(i=e.nextElementSibling),!i)return;this.collapseFigcaption(e),e?.setAttribute?.("data-active","false"),i?.setAttribute("data-active","true");const s=i?.getAttribute?.("data-index");this.setActiveSlideIndicator(s),this.dotNav&&this.setActiveDotNav(s),this.updateFigcaptionTogglesForSlide(i),this.updateControlsOffset(),this.updateTranslateToActive()}updateTranslateToActive(){if(!this.list)return;const t=this.slideshow?.querySelector?.('.ds-card__media__slideshow__item[data-active="true"]');if(!t)return;const e=t.getAttribute?.("data-index"),i=parseInt(e,10);if(!Number.isFinite(i))return;const s=-100*(i-1);this.list.style.transform=`translateX(${s}%)`}updateDotWindow(t){if(!this.dotNavDots||0===this.dotNavDots.length)return;const e=this.dotNavDots.length,i=parseInt(t,10);if(Number.isNaN(i))return;
1if(e<=5)return void this.dotNavDots.forEach((t=>{t?.setAttribute?.("data-show","true"),t?.setAttribute?.("data-reduced","false")}));const s=Math.max(1,e-5+1);let a=i-Math.floor(2.5);a<1&&(a=1),a>s&&(a=s);const r=a+5-1,o=a>1,d=r<e;this.dotNavDots.forEach((t=>{const e=parseInt(t?.getAttribute?.("data-index"),10);if(Number.isNaN(e))return;const i=o&&e===a-1,s=d&&e===r+1;e>=a&&e<=r?(t?.setAttribute?.("data-show","true"),t?.setAttribute?.("data-reduced","false")):i||s?(t?.setAttribute?.("data-show","true"),t?.setAttribute?.("data-reduced","true")):(t?.setAttribute?.("data-show","false"),t?.setAttribute?.("data-reduced","false"))}))}figcaptionToggle(){const t="Voir plus";this.computeFigcaptionToggleState=e=>{if(!e)return;const i=e?.querySelector?.(".ds-card__media__slideshow__figcaption__text"),s=e?.querySelector?.(".ds-card__media__slideshow__figcaption__toggle");if(!i||!s)return;const a=(i.scrollHeight??0)>(i.clientHeight??0),r=(i.scrollWidth??0)>(i.clientWidth??0);a||r?(s.style.display="",s.setAttribute?.("aria-hidden","false"),"true"!==e?.getAttribute?.("data-active")&&"string"==typeof s.textContent&&(s.textContent=t)):(s.style.display="none",s.setAttribute?.("aria-hidden","true"),e?.setAttribute?.("data-active","false"),"string"==typeof s.textContent&&(s.textContent=t))};const e=()=>{this.figcaptions.forEach((t=>{this.computeFigcaptionToggleState(t)})),this.scheduleUpdateControlsOffset()};this.figcaptions.forEach((e=>{const i=e?.querySelector?.(".ds-card__media__slideshow__figcaption__toggle");i&&i.addEventListener?.("click",(s=>{s?.preventDefault?.(),i.textContent===t?("string"==typeof i.textContent&&(i.textContent="Voir moins"),e?.setAttribute?.("data-active","true"),i.setAttribute?.("aria-expanded","true")):("string"==typeof i.textContent&&(i.textContent=t),e?.setAttribute?.("data-active","false"),i.setAttribute?.("aria-expanded","false")),this.scheduleUpdateControlsOffset()}))})),"undefined"!=typeof window?(e(),window.addEventListener("resize",(()=>{e(),this.scheduleUpdateControlsOffset()}),{passive:!0})):e()}collapseFigcaption(t){if(!t)return;const e=t.querySelector?.(".ds-card__media__slideshow__figcaption");if(!e)return;e.setAttribute?.("data-active","false");const i=e.querySelector?.(".ds-card__media__slideshow__figcaption__toggle");i?.setAttribute?.("aria-expanded","false"),i&&"string"==typeof i.textContent&&(i.textContent="Voir plus")}updateFigcaptionTogglesForSlide(t){if(!t)return;const e=t.querySelector?.(".ds-card__media__slideshow__figcaption");e&&"function"==typeof this.computeFigcaptionToggleState&&this.computeFigcaptionToggleState(e)}updateControlsOffset(){const t=this.slideshow?.querySelector?.('.ds-card__media__slideshow__item[data-active="true"]'),e=t?.querySelector?.(".ds-card__media__slideshow__figcaption");let i=e?.clientHeight||0;i||(i=23),this.slideshow?.style?.setProperty("--ds-slideshow-figcaption-h",`${i}px`)}scheduleUpdateControlsOffset(){"undefined"!=typeof window&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame((()=>this.updateControlsOffset())):this.updateControlsOffset()}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.