@20minutes/tyr 1.6.2 → 1.7.0
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.
- package/dist/css/articlePage-desktop-no-critical.css +1 -1
- package/dist/css/articlePage-mobile-no-critical.css +1 -1
- package/dist/css/contactPage-desktop-no-critical.css +1 -1
- package/dist/css/contactPage-mobile-no-critical.css +1 -1
- package/dist/css/directPage-desktop-no-critical.css +1 -1
- package/dist/css/directPage-mobile-no-critical.css +1 -1
- package/dist/css/electionsPage-desktop-critical.css +1 -1
- package/dist/css/electionsPage-desktop-no-critical.css +1 -1
- package/dist/css/electionsPage-mobile-critical.css +1 -1
- package/dist/css/electionsPage-mobile-no-critical.css +1 -1
- package/dist/css/errorPage-desktop-no-critical.css +1 -1
- package/dist/css/errorPage-mobile-no-critical.css +1 -1
- package/dist/css/global.css +1 -1
- package/dist/css/homePage-desktop-no-critical.css +1 -1
- package/dist/css/homePage-mobile-no-critical.css +1 -1
- package/dist/css/horoscopePage-desktop-no-critical.css +1 -1
- package/dist/css/horoscopePage-mobile-no-critical.css +1 -1
- package/dist/css/horoscopehomePage-desktop-no-critical.css +1 -1
- package/dist/css/horoscopehomePage-mobile-no-critical.css +1 -1
- package/dist/css/jobdetailsPage-desktop-no-critical.css +1 -1
- package/dist/css/jobdetailsPage-mobile-no-critical.css +1 -1
- package/dist/css/jobsPage-desktop-critical.css +1 -1
- package/dist/css/jobsPage-desktop-no-critical.css +1 -1
- package/dist/css/jobsPage-mobile-critical.css +1 -1
- package/dist/css/jobsPage-mobile-no-critical.css +1 -1
- package/dist/css/livePage-desktop-no-critical.css +1 -1
- package/dist/css/livePage-mobile-no-critical.css +1 -1
- package/dist/css/partnerPage-desktop-no-critical.css +1 -1
- package/dist/css/partnerPage-mobile-no-critical.css +1 -1
- package/dist/css/searchPage-desktop-no-critical.css +1 -1
- package/dist/css/searchPage-mobile-no-critical.css +1 -1
- package/dist/css/tagPage-desktop-no-critical.css +1 -1
- package/dist/css/tagPage-mobile-no-critical.css +1 -1
- package/dist/css/trafficPage-desktop-no-critical.css +1 -1
- package/dist/css/trafficPage-mobile-no-critical.css +1 -1
- package/dist/css/videosPage-desktop-no-critical.css +1 -1
- package/dist/css/videosPage-mobile-no-critical.css +1 -1
- package/dist/css/weatherPage-desktop-no-critical.css +1 -1
- package/dist/css/weatherPage-mobile-no-critical.css +1 -1
- package/dist/index.es.js +8376 -8297
- package/dist/index.umd.js +92 -92
- package/dist/js/main.min.js +1 -1
- package/dist/src/components/molecules/index.d.ts +0 -1
- package/dist/src/pages/ElectionsPage/ElectionsPage.d.ts +1 -0
- package/dist/src/types/ComponentConfig.d.ts +2 -1
- package/package.json +2 -2
- package/dist/src/components/molecules/BusinessSectorsList/BusinessSectorsList.d.ts +0 -9
- package/dist/src/components/molecules/BusinessSectorsList/BusinessSectorsList.stories.d.ts +0 -19
- package/dist/src/components/molecules/BusinessSectorsList/index.d.ts +0 -1
package/dist/js/main.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"use strict";var r=Object.defineProperty,n=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const o=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach((e=>{e.addEventListener("click",(e=>{(e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget;if(t instanceof HTMLButtonElement){const e=t.parentElement,r=null==e?void 0:e.querySelector(`#${t.getAttribute("aria-controls")}`);"true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","false"),null==r||r.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),null==r||r.setAttribute("aria-hidden","false"))}})(e)}))}))},a=e=>{const t=e.currentTarget;return e.preventDefault(),t instanceof HTMLButtonElement?"true"===t.getAttribute("aria-expanded")?(e=>{var t;null==(t=e.previousElementSibling)||t.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");const r=e.querySelector(".js-expandButton__label");r instanceof HTMLButtonElement&&(r.innerHTML="Voir plus")})(t):(e=>{var t;e.setAttribute("aria-expanded","true"),null==(t=e.previousElementSibling)||t.setAttribute("aria-hidden","false");const r=e.querySelector(".js-expandButton__label");r instanceof HTMLButtonElement&&(r.innerHTML="Voir moins")})(t):null},i=":not([inert]):not([inert] *)",l=':not([tabindex^="-"])',s=":not(:disabled)";var u=[`a[href]${i}${l}`,`area[href]${i}${l}`,`input:not([type="hidden"]):not([type="radio"])${i}${l}${s}`,`input[type="radio"]${i}${l}${s}`,`select${i}${l}${s}`,`textarea${i}${l}${s}`,`button${i}${l}${s}`,`details${i} > summary:first-of-type${l}`,`iframe${i}${l}`,`audio[controls]${i}${l}`,`video[controls]${i}${l}`,`[contenteditable]${i}${l}`,`[tabindex]${i}${l}`];function c(e){(e.querySelector("[autofocus]")||e).focus()}function d(e,t){if(t&&h(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let r=f(e.shadowRoot,t);for(;r;){const e=d(r,t);if(e)return e;r=p(r,t)}}else if("slot"===e.localName){const r=e.assignedElements({flatten:!0});t||r.reverse();for(const e of r){const r=d(e,t);if(r)return r}}else{let r=f(e,t);for(;r;){const e=d(r,t);if(e)return e;r=p(r,t)}}return!t&&h(e)?e:null}function f(e,t){return t?e.firstElementChild:e.lastElementChild}function p(e,t){return t?e.nextElementSibling:e.previousElementSibling}const h=e=>{var t;return(null==(t=e.shadowRoot)||!t.delegatesFocus)&&(e.matches(u.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e))};function m(e=document){const t=e.activeElement;return t?t.shadowRoot?m(t.shadowRoot)||document.activeElement:t:null}function g(e,t){const[r,n]=function(e){const t=d(e,!0);return[t,t?d(e,!1)||t:null]}(e);if(!r)return t.preventDefault();const o=m();t.shiftKey&&o===r?(n.focus(),t.preventDefault()):!t.shiftKey&&o===n&&(r.focus(),t.preventDefault())}let v=class{constructor(e){n(this,"$el"),n(this,"id"),n(this,"previouslyFocused"),n(this,"shown"),this.$el=e,this.id=this.$el.getAttribute("data-a11y-dialog")||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.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this.fire("destroy"),this}show(e){var t;return this.shown||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=m(),"BODY"===(null==(t=this.previouslyFocused)?void 0:t.tagName)&&null!=e&&e.target&&(this.previouslyFocused=e.target),"focus"===(null==e?void 0:e.type)?this.maintainFocus(e):c(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this.fire("show",e)),this}hide(e){var t,r;return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),null==(r=null==(t=this.previouslyFocused)?void 0:t.focus)||r.call(t),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.fire("hide",e),this):this}on(e,t,r){return this.$el.addEventListener(e,t,r),this}off(e,t,r){return this.$el.removeEventListener(e,t,r),this}fire(e,t){this.$el.dispatchEvent(new CustomEvent(e,{detail:t,cancelable:!0}))}handleTriggerClicks(e){const t=e.target;t.closest(`[data-a11y-dialog-show="${this.id}"]`)&&this.show(e),(t.closest(`[data-a11y-dialog-hide="${this.id}"]`)||t.closest("[data-a11y-dialog-hide]")&&t.closest('[aria-modal="true"]')===this.$el)&&this.hide(e)}bindKeypress(e){var t;if((null==(t=document.activeElement)?void 0:t.closest('[aria-modal="true"]'))!==this.$el)return;let r=!1;try{r=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"===e.key&&"alertdialog"!==this.$el.getAttribute("role")&&!r&&(e.preventDefault(),this.hide(e)),"Tab"===e.key&&g(this.$el,e)}maintainFocus(e){e.target.closest('[aria-modal="true"], [data-a11y-dialog-ignore-focus-trap]')||c(this.$el)}};function b(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new v(e)}typeof document<"u"&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",b):b());const y=({navigatedList:e,nextBtn:t,prevBtn:r,sliderVariant:n})=>{if(e){const o=e.closest(".js-overview-bar-container"),a=null==o?void 0:o.querySelector(".c-stepper"),i=null==a?void 0:a.querySelectorAll(".c-stepper__item");if(i){const e=Array.from(i).findIndex((e=>e.classList.contains("c-stepper__item--loading")));if(e<0)i[0].classList.add("c-stepper__item--loading");else{i[e].classList.remove("c-stepper__item--loading"),i[e].classList.add("c-stepper__item--loaded");const t=i[e].querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e+1<i.length&&i[e+1].classList.add("c-stepper__item--loading")}}if(e.scrollWidth-e.clientWidth>e.clientWidth){let o=e.scrollLeft;switch(n){case"three-columns-articles":o+=e.clientWidth+32;break;case"rubrics":o+=e.clientWidth-36;break;default:o+=Math.ceil(.6*e.clientWidth)}e.scrollTo({left:o,behavior:"smooth"}),r.classList.add("o-nav-button--visible"),o+e.clientWidth>=e.scrollWidth&&t.classList.remove("o-nav-button--visible")}else{const n=e.scrollWidth-e.clientWidth;e.scrollTo({left:n,behavior:"smooth"}),t.classList.remove("o-nav-button--visible"),r.classList.add("o-nav-button--visible")}}},w=({navigatedList:e,nextBtn:t,prevBtn:r,sliderVariant:n,delay:o})=>{if(e){const a=e.closest(".js-overview-bar-container"),i=null==a?void 0:a.querySelector(".c-stepper"),l=null==i?void 0:i.querySelectorAll(".c-stepper__item");if(l){const e=Array.from(l).findIndex((e=>e.classList.contains("c-stepper__item--loading")));e<0?l[0].classList.add("c-stepper__item--loading"):(l[e].classList.remove("c-stepper__item--loading"),l[e].classList.remove("c-stepper__item--loaded"),e-1>0&&(l[e-1].classList.remove("c-stepper__item--loading"),l[e-1].classList.remove("c-stepper__item--loaded"),setTimeout((()=>{const t=l[e-1].querySelector(".c-stepper__loader");l[e-1].classList.add("c-stepper__item--loading"),t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)}),0)))}if(e.clientWidth<e.scrollLeft){let o=e.scrollLeft;switch(n){case"three-columns-articles":o-=e.clientWidth+32;break;case"rubrics":o-=e.clientWidth-36;break;default:o-=Math.ceil(.6*e.clientWidth)}e.scrollTo({left:o,behavior:"smooth"}),t.classList.add("o-nav-button--visible"),0===o&&r.classList.remove("o-nav-button--visible")}else e.scrollTo({left:0,behavior:"smooth"}),r.classList.remove("o-nav-button--visible"),e.clientWidth<e.scrollWidth&&t.classList.add("o-nav-button--visible")}},_=({navigatedList:e,nextBtn:t,prevBtn:r})=>{(({navigatedList:e,nextBtn:t,prevBtn:r})=>{var n,o,a,i,l,s,u,c;const d=e.scrollLeft>0,f=e.scrollLeft+e.clientWidth<e.scrollWidth;d&&f?(null==(n=t.classList)||n.add("o-nav-button--visible"),null==(o=r.classList)||o.add("o-nav-button--visible")):d?(null==(a=t.classList)||a.remove("o-nav-button--visible"),null==(i=r.classList)||i.add("o-nav-button--visible")):f?(null==(l=t.classList)||l.add("o-nav-button--visible"),null==(s=r.classList)||s.remove("o-nav-button--visible")):(null==(u=t.classList)||u.remove("o-nav-button--visible"),null==(c=r.classList)||c.remove("o-nav-button--visible"))})({navigatedList:e,nextBtn:t,prevBtn:r})},S=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar");if(!t)return;const{documentElement:r}=document;let n=r.scrollHeight-r.clientHeight;if(!n)return;const o=r.scrollTop;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const a=Math.round(o/n*100);t.style.width=`${a}%`,a>=100&&(t.style.width="100%")};let x,E=0;const k=()=>{x=null,document.body.getBoundingClientRect().top>E+2&&(x="up"),document.body.getBoundingClientRect().top<E-2&&(x="down"),E=document.body.getBoundingClientRect().top;const e=document.querySelector(".c-read-also-banner");if(e){const t=e.dataset.bannerLimitTop||"0";"up"===x&&-document.body.getBoundingClientRect().top>=parseInt(t,10)&&(e.classList.remove("c-read-also-banner__scrolldirection--down"),e.style.paddingTop="0.75em",e.style.paddingBottom="0.75em",e.style.borderWidth="1px",e.classList.contains("c-read-also-banner__scrolldirection--up")||e.classList.add("c-read-also-banner__scrolldirection--up")),("down"===x||-document.body.getBoundingClientRect().top<=parseInt(t,10))&&(e.classList.remove("c-read-also-banner__scrolldirection--up"),e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderWidth="0",e.classList.contains("c-read-also-banner__scrolldirection--down")||e.classList.add("c-read-also-banner__scrolldirection--down"))}},N=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",(e=>{(e=>{const{target:t}=e;if(t instanceof Element){const r=t.closest(".c-search-form--button");r&&(e.preventDefault(),r.classList.remove("c-search-form--button"))}})(e)}))},C=e=>"ArrowLeft"===e.code||39===e.keyCode,T=e=>"ArrowRight"===e.code||37===e.keyCode,A=(e=document.querySelector(".js-tabs"))=>{if(e){const t=e.querySelectorAll('[role="tab"]');t.forEach((t=>{t.addEventListener("click",(t=>{(({tabsContainerElement:e,event:t})=>{t.preventDefault();const r=t.target;if(!(r instanceof HTMLButtonElement))return;const n=e.querySelectorAll('[role="tab"]'),o=e.querySelectorAll('[role="tabpanel"]'),a=r.getAttribute("aria-controls"),i=Object.values(o).find((e=>e.id===a));n.forEach((e=>{e.setAttribute("aria-selected","false")})),o.forEach((e=>{e.setAttribute("aria-hidden","true")})),r.setAttribute("aria-selected","true"),i&&i.removeAttribute("aria-hidden")})({tabsContainerElement:e,event:t})}))}));const r=e.querySelector('[role="tablist"]');if(r&&t.length>0){let e=0;r.addEventListener("keydown",(r=>{r instanceof KeyboardEvent&&(C(r)||T(r))&&(t[e].setAttribute("tabindex","-1"),C(r)?(e+=1,e>=t.length&&(e=0)):T(r)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())}))}}},D=()=>{((e=document.querySelector(".js-expandButton"))=>{e&&document.querySelectorAll(".js-expandButton").forEach((e=>e.addEventListener("click",a)))})(),A(),o(),document.querySelector(".c-progress")&&window.addEventListener("scroll",S),document.querySelectorAll(".js-modal").forEach((e=>{if(!(e instanceof HTMLElement))return;const t=new v(e),r={x:0,y:0};t.on("show",(()=>{r.x=window.scrollX,r.y=window.scrollY,document.body.classList.add("noscroll"),document.body.style.top=`-${r.y}px`})).on("hide",(()=>{document.body.classList.remove("noscroll"),document.body.style.top="",(window.scrollY!==r.y||window.scrollX!==r.x)&&window.scroll(r.x,r.y)}))})),((e=document.querySelector(".c-read-also-banner"))=>{if(e){let e;window.addEventListener("scroll",(()=>{clearTimeout(e),e=setTimeout(k,100)}))}})(),N(),((e,t)=>{const r=document.querySelector(`#${t}`);if(r){const t=r.querySelector(".js-countdown-days"),n=r.querySelector(".js-countdown-hours"),o=r.querySelector(".js-countdown-minutes"),a=r.querySelector(".js-countdown-seconds");if(!(t&&n&&o&&a))return;window.counters={olympicsGames:"2024-07-26 20:00:00"};const i=window.counters[e],l=new Date(i).getTime(),s=setInterval((()=>{const e=(new Date).getTime(),r=l-e;if(r<=0)clearInterval(s);else{const e=Math.floor(r/864e5),i=Math.floor(r%864e5/36e5),l=Math.floor(r%36e5/6e4),s=Math.floor(r%6e4/1e3);t.innerHTML=e.toString(),n.innerHTML=i.toString(),o.innerHTML=l.toString(),a.innerHTML=s.toString()}}),1e3)}})("olympicsGames","countdown-olympics-games"),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:e}=t.dataset,{sliderAuto:r}=t.dataset,{sliderDelay:n}=t.dataset,o=n?parseInt(n,10):3e3,a=t.closest(".js-overview-bar-container"),i=null==a?void 0:a.querySelector(".c-stepper"),l=null==i?void 0:i.querySelectorAll(".c-stepper__item");if(t){const n=t.querySelector(".js-navigation-container__list"),a=t.querySelector(".o-nav-button--next-button"),s=t.querySelector(".o-nav-button--previous-button");if(n&&n.clientWidth<n.scrollWidth&&(null==a||a.classList.add("o-nav-button--visible")),n&&a&&s&&(null==a||a.addEventListener("click",y.bind(!1,{navigatedList:n,nextBtn:a,prevBtn:s,sliderVariant:e})),null==s||s.addEventListener("click",w.bind(!1,{navigatedList:n,nextBtn:a,prevBtn:s,sliderVariant:e,delay:o}))),"true"===r&&a){const e=i?i.querySelector(".c-stepper__item--loading"):null;l&&(l.forEach((e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)})),e||l[0].classList.add("c-stepper__item--loading")),setInterval((()=>{a.classList.contains("o-nav-button--visible")?a.click():n&&s&&(n.scrollLeft=0,l&&(l.forEach((e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e.classList.remove("c-stepper__item--loading"),e.classList.remove("c-stepper__item--loaded"),setTimeout((()=>{t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)}),0)})),setTimeout((()=>{l[0].classList.add("c-stepper__item--loading")}),0)),s.click())}),o)}}}})(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e))if(t){const e=t.querySelector(".js-navigation-container__list"),r=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&r&&n&&window.addEventListener("resize",_.bind(!1,{navigatedList:e,nextBtn:r,prevBtn:n}))}})()},L=function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},O=(e,t)=>{let r=e.toLowerCase().replace(/[\s-]+/g,t??"-");return r=(e=>{let t=e;const r="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)t=t.replace(new RegExp(r.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return t})(r),r.replace(/[^\w-]+/g,"")},q=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,P=({elem:e,name:t,type:r,chapter1:n="",chapter3:o="",chapter2:a=""})=>{if(!window.ATTag)return;const i={elem:e,name:O(t),type:r,chapter1:n,chapter2:a,chapter3:o};Object.keys(i).forEach((e=>{""===i[e]&&delete i[e]})),window.ATTag.click.send(i)},I=()=>{window.ATTag&&(window.ATTag.page.set({name:window.ATPageInfo?.name,chapter1:window.ATPageInfo?.chapter1,chapter2:window.ATPageInfo?.chapter2,customObject:{device:"desktop"===(window.layout||"")?"desktop":"smartphone"}}),window.ATTag.dispatch())},M=()=>{(()=>{if("guide-achat"!==window.datalayerInfo?.subType)return;const e=document.querySelectorAll(".c-content a.c-btn");0!==e.length&&e.forEach((e=>{e.addEventListener("click",(()=>{P({elem:e,name:"affiliation",type:"action"})}))}))})(),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",(()=>{P({elem:e,name:"recrutement",type:"action"})}))})()},R=()=>{if(e="20min_user_token",null!==localStorage.getItem(e)){const e=localStorage.getItem("20min_user_token");fetch(`https://securepubads.g.doubleclick.net/user_data_deletion?ppid=${e}&iu=49926454`,{referrerPolicy:"strict-origin-when-cross-origin"}).then((e=>{e.ok&&alert("La demande de suppression a bien été prise en compte")})),localStorage.removeItem("20min_user_token")}var e},F=e=>{const t=document.createElement("script");t.type="text/javascript",e.src&&(t.src=e.src,e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.async&&(t.async=e.async),e.defer&&(t.defer=e.defer),e.text&&(t.innerHTML=e.text),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach((([e,r])=>{var n;t.setAttribute(`data-${n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`,r)})),document.body.appendChild(t)},B=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>window.__tcfapi("addEventListener",2,(e=>(t,r)=>{if(r){if("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus){window._sf_async_config=window._sf_async_config||{};const{_sf_async_config:r}=window;r.uid=34533,r.domain=window._sf_async_config.domain,r.flickerControl=!1,r.useCanonical=!0,r.useCanonicalDomain=!0,r.authors=window.datalayerInfo?.signature??"",r.pingServer="pong.chartbeat.net";const n=[];window.datalayerInfo?.sectionLabel&&n.push(window.datalayerInfo.sectionLabel),window.datalayerInfo?.breadcrumb?.includes("Sport")&&n.push("Sport"),r.sections=n.join(","),r.noCookies=void 0===e.getUserConsentStatusForPurpose("cookies")||!e.getUserConsentStatusForPurpose("cookies")||!e.getUserConsentStatusForPurpose("mesureda-6qyqaZXC")||!e.getUserConsentStatusForVendor("c:chartbeat"),F({name:"Chartbeat",async:!0,src:"https://static.chartbeat.com/js/chartbeat.js"}),F({name:"ChartbeatMab",async:!0,src:"https://static.chartbeat.com/js/chartbeat_mab.js"}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,t.listenerId)}}else console.error("Issue with chartbeat callback")})(e))))},z=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>window.__tcfapi("addEventListener",2,(e=>t=>{if("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus){if(e.getUserConsentStatusForVendor("c:ownpage")&&e.getUserConsentStatusForPurpose("cookies")&&e.getUserConsentStatusForPurpose("select_personalized_ads")){F({name:"ownpage",async:!0,defer:!0,src:"https://script.ownpage.fr/v1/ownpage.js"});const e=document.querySelector('[src="https://script.ownpage.fr/v1/ownpage.js"]');e?.addEventListener("load",(()=>{window.Ownpage?.trackPage("9932310c1c44463b")}))}window.__tcfapi("removeEventListener",2,(()=>{}),t.listenerId)}else console.log("Issue with ownpage callback")})(e))))},j=e=>t=>{if("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus){const r="{}"!==(e=>{const t=document.cookie.split(";").filter((t=>-1!==t.indexOf(e)))[0];return t?t.split("=")[1]:"{}"})("20mnUserInfo");if(e.getUserConsentStatusForPurpose("mesureda-6qyqaZXC")&&!r&&"article"===window.datalayerInfo.pageName&&!["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo.subType||"")){F({name:"poool",async:!0,src:"https://static.20mn.fr/apps/poool/access.min.js"});const t=document.querySelector('[src="https://static.20mn.fr/apps/poool/access.min.js"]');t?.addEventListener("load",(()=>{const t=document.querySelector(".c-content"),r=document.createElement("div");r.setAttribute("id","paywall"),t?.parentNode?.insertBefore(r,t.nextSibling),window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config({cookies_enabled:e.getUserConsentStatusForPurpose("mesureda-6qyqaZXC"),default_widget:"invisible",debug:!0,disable_content_height_calculation:!0}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0).createPaywall({content:".c-content",target:"#paywall",mode:"hide",percent:80,pageType:"free"})}))}window.__tcfapi("removeEventListener",2,(()=>{}),t.listenerId)}else console.log("Issue with poool callback")},U=()=>{document.querySelectorAll(".taboola").length>0&&(()=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{t?"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus||(window._taboola=window._taboola||[],"article"===window.datalayerInfo.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"}),F({name:"Taboola SDK",async:!0,src:"//cdn.taboola.com/libtrc/20minutesfrance-web/loader.js",id:"tb_loader_script",dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}}),document.querySelectorAll(".taboola").forEach((e=>{const t=e.getAttribute("data-mode"),r=e.getAttribute("id"),n=e.getAttribute("data-placement"),o=e.getAttribute("data-target-type");t&&r&&n&&o?window._taboola.push({mode:t,container:r,placement:n,target_type:o}):console.log("Issue with taboola placement")})),window._taboola.push({flush:!0}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)):console.log("Issue with taboola callback")};window.didomiOnReady.push((()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)}))})()},V=()=>{document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach((e=>{(e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)})(e)}))};var H=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(H||{}),K=(e=>(e.photo="photo",e.podcast="podcast",e.video="video",e))(K||{});const $={primary:{ultramarine:{value:"#4742ff"},"ultramarine-light":{value:"#6b72fb"}},secondary:{orange:{value:"#fa9917"},yellow:{value:"#f2e500"},green:{value:"#6a9f4f"},purple:{value:"#ae6ba2"},red:{value:"#dc0e19"},scarlet:{value:"#ff3f3f"},blue:{value:"#0000ff"},pink:{value:"#ef2a82"},sponsoring:{value:"#fff5f1"}},greyscale:{black:{value:"#000000"},white:{value:"#ffffff"},"grey-50":{value:"#fffffe"},"grey-100":{value:"#f7f7f7"},"grey-200":{value:"#dddddd"},"grey-300":{value:"#898a8c"},"grey-400":{value:"#6a6a6a"},"grey-500":{value:"#484848"},"grey-600":{value:"#2f3134"},"grey-700":{value:"#181a1e"},"grey-800":{value:"#0f1116"},"grey-900":{value:"#0f1115"}},status:{warning:{value:"#fa9917"},error:{value:"#dc0e19"},success:{value:"#6a9f4f"}},rubric:{direct:{value:"#dc0e19"},sport:{value:"#3c9ba1"},entertainment:{value:"#92317e"},planet:{value:"#71a11b"},magazine:{value:"#008f8c"},"vie-pro":{value:"#008f8c"},production:{value:"#c5be00"},publicommunique:{value:"#6a6a6a"},c2c:{value:"#f7562a"},tempo:{value:"#cc0f53"}},diode:{"diode-direct":{value:"#f9454f"},"diode-sport":{value:"#70cdd2"},"diode-entertainment":{value:"#b97bad"},"diode-planet":{value:"#a5d059"},"diode-magazine":{value:"#19bebb"},"diode-vie-pro":{value:"#19bebb"},"diode-production":{value:"#e1d907"},"diode-c2c":{value:"#ff8260"},"diode-tempo":{value:"#e86d99"}}},G={base:{value:"Arial"},oswald:{value:"'Oswald', sans-serif"},"source-serif-pro":{value:"'Source Serif Pro', serif"}};Object.keys($.primary),Object.keys($.secondary),Object.keys($.greyscale),Object.keys($.status),Object.keys($.rubric);const W={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},Q={alignItems:["align-items"],alignContent:["align-content"],justifyContent:["justify-content"],gap:["gap"],gapX:["row-gap"],gapY:["col-gap"],inline:["inline"],direction:["direction"],wrap:["wrap"],flexGrow:["flex-grow"]},J={radius:["border-radius"]},Y={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},Z={...Y,borderColor:["border-color"],bg:["background-color"],color:["color"],...J},X={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]};Object.keys(G).filter((e=>!["base"].includes(e)));const ee=Object.keys($.diode),te=Object.keys($.rubric);function re(t){return e.forwardRef(t)}function ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe={exports:{}};
|
|
1
|
+
!function(e,t){"use strict";var r=Object.defineProperty,n=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const o=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach((e=>{e.addEventListener("click",(e=>{(e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget;if(t instanceof HTMLButtonElement){const e=t.parentElement,r=null==e?void 0:e.querySelector(`#${t.getAttribute("aria-controls")}`);"true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","false"),null==r||r.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),null==r||r.setAttribute("aria-hidden","false"))}})(e)}))}))},a=e=>{const t=e.currentTarget;return e.preventDefault(),t instanceof HTMLButtonElement?"true"===t.getAttribute("aria-expanded")?(e=>{var t;const r=null==(t=e.parentNode)?void 0:t.querySelectorAll(".js-expand-target");null==r||r.forEach((e=>e.setAttribute("aria-hidden","true"))),e.setAttribute("aria-expanded","false");const n=e.querySelector(".js-expand-button__label");n instanceof HTMLSpanElement&&(n.innerHTML="Voir plus")})(t):(e=>{var t;e.setAttribute("aria-expanded","true");const r=null==(t=e.parentNode)?void 0:t.querySelectorAll(".js-expand-target");null==r||r.forEach((e=>e.setAttribute("aria-hidden","false")));const n=e.querySelector(".js-expand-button__label");n instanceof HTMLSpanElement&&(n.innerHTML="Voir moins")})(t):null},i=":not([inert]):not([inert] *)",l=':not([tabindex^="-"])',s=":not(:disabled)";var u=[`a[href]${i}${l}`,`area[href]${i}${l}`,`input:not([type="hidden"]):not([type="radio"])${i}${l}${s}`,`input[type="radio"]${i}${l}${s}`,`select${i}${l}${s}`,`textarea${i}${l}${s}`,`button${i}${l}${s}`,`details${i} > summary:first-of-type${l}`,`iframe${i}${l}`,`audio[controls]${i}${l}`,`video[controls]${i}${l}`,`[contenteditable]${i}${l}`,`[tabindex]${i}${l}`];function c(e){(e.querySelector("[autofocus]")||e).focus()}function d(e,t){if(t&&h(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let r=f(e.shadowRoot,t);for(;r;){const e=d(r,t);if(e)return e;r=p(r,t)}}else if("slot"===e.localName){const r=e.assignedElements({flatten:!0});t||r.reverse();for(const e of r){const r=d(e,t);if(r)return r}}else{let r=f(e,t);for(;r;){const e=d(r,t);if(e)return e;r=p(r,t)}}return!t&&h(e)?e:null}function f(e,t){return t?e.firstElementChild:e.lastElementChild}function p(e,t){return t?e.nextElementSibling:e.previousElementSibling}const h=e=>{var t;return(null==(t=e.shadowRoot)||!t.delegatesFocus)&&(e.matches(u.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e))};function m(e=document){const t=e.activeElement;return t?t.shadowRoot?m(t.shadowRoot)||document.activeElement:t:null}function g(e,t){const[r,n]=function(e){const t=d(e,!0);return[t,t?d(e,!1)||t:null]}(e);if(!r)return t.preventDefault();const o=m();t.shiftKey&&o===r?(n.focus(),t.preventDefault()):!t.shiftKey&&o===n&&(r.focus(),t.preventDefault())}let v=class{constructor(e){n(this,"$el"),n(this,"id"),n(this,"previouslyFocused"),n(this,"shown"),this.$el=e,this.id=this.$el.getAttribute("data-a11y-dialog")||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.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this.fire("destroy"),this}show(e){var t;return this.shown||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=m(),"BODY"===(null==(t=this.previouslyFocused)?void 0:t.tagName)&&null!=e&&e.target&&(this.previouslyFocused=e.target),"focus"===(null==e?void 0:e.type)?this.maintainFocus(e):c(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this.fire("show",e)),this}hide(e){var t,r;return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),null==(r=null==(t=this.previouslyFocused)?void 0:t.focus)||r.call(t),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.fire("hide",e),this):this}on(e,t,r){return this.$el.addEventListener(e,t,r),this}off(e,t,r){return this.$el.removeEventListener(e,t,r),this}fire(e,t){this.$el.dispatchEvent(new CustomEvent(e,{detail:t,cancelable:!0}))}handleTriggerClicks(e){const t=e.target;t.closest(`[data-a11y-dialog-show="${this.id}"]`)&&this.show(e),(t.closest(`[data-a11y-dialog-hide="${this.id}"]`)||t.closest("[data-a11y-dialog-hide]")&&t.closest('[aria-modal="true"]')===this.$el)&&this.hide(e)}bindKeypress(e){var t;if((null==(t=document.activeElement)?void 0:t.closest('[aria-modal="true"]'))!==this.$el)return;let r=!1;try{r=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"===e.key&&"alertdialog"!==this.$el.getAttribute("role")&&!r&&(e.preventDefault(),this.hide(e)),"Tab"===e.key&&g(this.$el,e)}maintainFocus(e){e.target.closest('[aria-modal="true"], [data-a11y-dialog-ignore-focus-trap]')||c(this.$el)}};function b(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new v(e)}typeof document<"u"&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",b):b());const y=({navigatedList:e,nextBtn:t,prevBtn:r,sliderVariant:n})=>{if(e){const o=e.closest(".js-overview-bar-container"),a=null==o?void 0:o.querySelector(".c-stepper"),i=null==a?void 0:a.querySelectorAll(".c-stepper__item");if(i){const e=Array.from(i).findIndex((e=>e.classList.contains("c-stepper__item--loading")));if(e<0)i[0].classList.add("c-stepper__item--loading");else{i[e].classList.remove("c-stepper__item--loading"),i[e].classList.add("c-stepper__item--loaded");const t=i[e].querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e+1<i.length&&i[e+1].classList.add("c-stepper__item--loading")}}if(e.scrollWidth-e.clientWidth>e.clientWidth){let o=e.scrollLeft;switch(n){case"three-columns-articles":o+=e.clientWidth+32;break;case"rubrics":o+=e.clientWidth-36;break;default:o+=Math.ceil(.6*e.clientWidth)}e.scrollTo({left:o,behavior:"smooth"}),r.classList.add("o-nav-button--visible"),o+e.clientWidth>=e.scrollWidth&&t.classList.remove("o-nav-button--visible")}else{const n=e.scrollWidth-e.clientWidth;e.scrollTo({left:n,behavior:"smooth"}),t.classList.remove("o-nav-button--visible"),r.classList.add("o-nav-button--visible")}}},w=({navigatedList:e,nextBtn:t,prevBtn:r,sliderVariant:n,delay:o})=>{if(e){const a=e.closest(".js-overview-bar-container"),i=null==a?void 0:a.querySelector(".c-stepper"),l=null==i?void 0:i.querySelectorAll(".c-stepper__item");if(l){const e=Array.from(l).findIndex((e=>e.classList.contains("c-stepper__item--loading")));e<0?l[0].classList.add("c-stepper__item--loading"):(l[e].classList.remove("c-stepper__item--loading"),l[e].classList.remove("c-stepper__item--loaded"),e-1>0&&(l[e-1].classList.remove("c-stepper__item--loading"),l[e-1].classList.remove("c-stepper__item--loaded"),setTimeout((()=>{const t=l[e-1].querySelector(".c-stepper__loader");l[e-1].classList.add("c-stepper__item--loading"),t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)}),0)))}if(e.clientWidth<e.scrollLeft){let o=e.scrollLeft;switch(n){case"three-columns-articles":o-=e.clientWidth+32;break;case"rubrics":o-=e.clientWidth-36;break;default:o-=Math.ceil(.6*e.clientWidth)}e.scrollTo({left:o,behavior:"smooth"}),t.classList.add("o-nav-button--visible"),0===o&&r.classList.remove("o-nav-button--visible")}else e.scrollTo({left:0,behavior:"smooth"}),r.classList.remove("o-nav-button--visible"),e.clientWidth<e.scrollWidth&&t.classList.add("o-nav-button--visible")}},_=({navigatedList:e,nextBtn:t,prevBtn:r})=>{(({navigatedList:e,nextBtn:t,prevBtn:r})=>{var n,o,a,i,l,s,u,c;const d=e.scrollLeft>0,f=e.scrollLeft+e.clientWidth<e.scrollWidth;d&&f?(null==(n=t.classList)||n.add("o-nav-button--visible"),null==(o=r.classList)||o.add("o-nav-button--visible")):d?(null==(a=t.classList)||a.remove("o-nav-button--visible"),null==(i=r.classList)||i.add("o-nav-button--visible")):f?(null==(l=t.classList)||l.add("o-nav-button--visible"),null==(s=r.classList)||s.remove("o-nav-button--visible")):(null==(u=t.classList)||u.remove("o-nav-button--visible"),null==(c=r.classList)||c.remove("o-nav-button--visible"))})({navigatedList:e,nextBtn:t,prevBtn:r})},S=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar");if(!t)return;const{documentElement:r}=document;let n=r.scrollHeight-r.clientHeight;if(!n)return;const o=r.scrollTop;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const a=Math.round(o/n*100);t.style.width=`${a}%`,a>=100&&(t.style.width="100%")};let x,E=0;const k=()=>{x=null,document.body.getBoundingClientRect().top>E+2&&(x="up"),document.body.getBoundingClientRect().top<E-2&&(x="down"),E=document.body.getBoundingClientRect().top;const e=document.querySelector(".c-read-also-banner");if(e){const t=e.dataset.bannerLimitTop||"0";"up"===x&&-document.body.getBoundingClientRect().top>=parseInt(t,10)&&(e.classList.remove("c-read-also-banner__scrolldirection--down"),e.style.paddingTop="0.75em",e.style.paddingBottom="0.75em",e.style.borderWidth="1px",e.classList.contains("c-read-also-banner__scrolldirection--up")||e.classList.add("c-read-also-banner__scrolldirection--up")),("down"===x||-document.body.getBoundingClientRect().top<=parseInt(t,10))&&(e.classList.remove("c-read-also-banner__scrolldirection--up"),e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderWidth="0",e.classList.contains("c-read-also-banner__scrolldirection--down")||e.classList.add("c-read-also-banner__scrolldirection--down"))}},N=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",(e=>{(e=>{const{target:t}=e;if(t instanceof Element){const r=t.closest(".c-search-form--button");r&&(e.preventDefault(),r.classList.remove("c-search-form--button"))}})(e)}))},C=e=>"ArrowLeft"===e.code||39===e.keyCode,T=e=>"ArrowRight"===e.code||37===e.keyCode,A=(e=document.querySelector(".js-tabs"))=>{if(e){const t=e.querySelectorAll('[role="tab"]');t.forEach((t=>{t.addEventListener("click",(t=>{(({tabsContainerElement:e,event:t})=>{t.preventDefault();const r=t.target;if(!(r instanceof HTMLButtonElement))return;const n=e.querySelectorAll('[role="tab"]'),o=e.querySelectorAll('[role="tabpanel"]'),a=r.getAttribute("aria-controls"),i=Object.values(o).find((e=>e.id===a));n.forEach((e=>{e.setAttribute("aria-selected","false")})),o.forEach((e=>{e.setAttribute("aria-hidden","true")})),r.setAttribute("aria-selected","true"),i&&i.removeAttribute("aria-hidden")})({tabsContainerElement:e,event:t})}))}));const r=e.querySelector('[role="tablist"]');if(r&&t.length>0){let e=0;r.addEventListener("keydown",(r=>{r instanceof KeyboardEvent&&(C(r)||T(r))&&(t[e].setAttribute("tabindex","-1"),C(r)?(e+=1,e>=t.length&&(e=0)):T(r)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())}))}}},D=()=>{((e=document.querySelector(".js-expand-button"))=>{e&&document.querySelectorAll(".js-expand-button").forEach((e=>e.addEventListener("click",a)))})(),A(),o(),document.querySelector(".c-progress")&&window.addEventListener("scroll",S),document.querySelectorAll(".js-modal").forEach((e=>{if(!(e instanceof HTMLElement))return;const t=new v(e),r={x:0,y:0};t.on("show",(()=>{r.x=window.scrollX,r.y=window.scrollY,document.body.classList.add("noscroll"),document.body.style.top=`-${r.y}px`})).on("hide",(()=>{document.body.classList.remove("noscroll"),document.body.style.top="",(window.scrollY!==r.y||window.scrollX!==r.x)&&window.scroll(r.x,r.y)}))})),((e=document.querySelector(".c-read-also-banner"))=>{if(e){let e;window.addEventListener("scroll",(()=>{clearTimeout(e),e=setTimeout(k,100)}))}})(),N(),((e,t)=>{const r=document.querySelector(`#${t}`);if(r){const t=r.querySelector(".js-countdown-days"),n=r.querySelector(".js-countdown-hours"),o=r.querySelector(".js-countdown-minutes"),a=r.querySelector(".js-countdown-seconds");if(!(t&&n&&o&&a))return;window.counters={olympicsGames:"2024-07-26 20:00:00"};const i=window.counters[e],l=new Date(i).getTime(),s=setInterval((()=>{const e=(new Date).getTime(),r=l-e;if(r<=0)clearInterval(s);else{const e=Math.floor(r/864e5),i=Math.floor(r%864e5/36e5),l=Math.floor(r%36e5/6e4),s=Math.floor(r%6e4/1e3);t.innerHTML=e.toString(),n.innerHTML=i.toString(),o.innerHTML=l.toString(),a.innerHTML=s.toString()}}),1e3)}})("olympicsGames","countdown-olympics-games"),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:e}=t.dataset,{sliderAuto:r}=t.dataset,{sliderDelay:n}=t.dataset,o=n?parseInt(n,10):3e3,a=t.closest(".js-overview-bar-container"),i=null==a?void 0:a.querySelector(".c-stepper"),l=null==i?void 0:i.querySelectorAll(".c-stepper__item");if(t){const n=t.querySelector(".js-navigation-container__list"),a=t.querySelector(".o-nav-button--next-button"),s=t.querySelector(".o-nav-button--previous-button");if(n&&n.clientWidth<n.scrollWidth&&(null==a||a.classList.add("o-nav-button--visible")),n&&a&&s&&(null==a||a.addEventListener("click",y.bind(!1,{navigatedList:n,nextBtn:a,prevBtn:s,sliderVariant:e})),null==s||s.addEventListener("click",w.bind(!1,{navigatedList:n,nextBtn:a,prevBtn:s,sliderVariant:e,delay:o}))),"true"===r&&a){const e=i?i.querySelector(".c-stepper__item--loading"):null;l&&(l.forEach((e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)})),e||l[0].classList.add("c-stepper__item--loading")),setInterval((()=>{a.classList.contains("o-nav-button--visible")?a.click():n&&s&&(n.scrollLeft=0,l&&(l.forEach((e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition="width 0s linear"),e.classList.remove("c-stepper__item--loading"),e.classList.remove("c-stepper__item--loaded"),setTimeout((()=>{t&&t instanceof HTMLElement&&(t.style.transition=`width ${o/1e3}s linear`)}),0)})),setTimeout((()=>{l[0].classList.add("c-stepper__item--loading")}),0)),s.click())}),o)}}}})(),(()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e))if(t){const e=t.querySelector(".js-navigation-container__list"),r=t.querySelector(".o-nav-button--next-button"),n=t.querySelector(".o-nav-button--previous-button");e&&r&&n&&window.addEventListener("resize",_.bind(!1,{navigatedList:e,nextBtn:r,prevBtn:n}))}})()},L=function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},O=(e,t)=>{let r=e.toLowerCase().replace(/[\s-]+/g,t??"-");return r=(e=>{let t=e;const r="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;";for(let e=0;e<30;e+=1)t=t.replace(new RegExp(r.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc-----".charAt(e));return t})(r),r.replace(/[^\w-]+/g,"")},q=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,P=({elem:e,name:t,type:r,chapter1:n="",chapter3:o="",chapter2:a=""})=>{if(!window.ATTag)return;const i={elem:e,name:O(t),type:r,chapter1:n,chapter2:a,chapter3:o};Object.keys(i).forEach((e=>{""===i[e]&&delete i[e]})),window.ATTag.click.send(i)},I=()=>{window.ATTag&&(window.ATTag.page.set({name:window.ATPageInfo?.name,chapter1:window.ATPageInfo?.chapter1,chapter2:window.ATPageInfo?.chapter2,customObject:{device:"desktop"===(window.layout||"")?"desktop":"smartphone"}}),window.ATTag.dispatch())},M=()=>{(()=>{if("guide-achat"!==window.datalayerInfo?.subType)return;const e=document.querySelectorAll(".c-content a.c-btn");0!==e.length&&e.forEach((e=>{e.addEventListener("click",(()=>{P({elem:e,name:"affiliation",type:"action"})}))}))})(),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",(()=>{P({elem:e,name:"recrutement",type:"action"})}))})()},R=()=>{if(e="20min_user_token",null!==localStorage.getItem(e)){const e=localStorage.getItem("20min_user_token");fetch(`https://securepubads.g.doubleclick.net/user_data_deletion?ppid=${e}&iu=49926454`,{referrerPolicy:"strict-origin-when-cross-origin"}).then((e=>{e.ok&&alert("La demande de suppression a bien été prise en compte")})),localStorage.removeItem("20min_user_token")}var e},F=e=>{const t=document.createElement("script");t.type="text/javascript",e.src&&(t.src=e.src,e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.async&&(t.async=e.async),e.defer&&(t.defer=e.defer),e.text&&(t.innerHTML=e.text),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach((([e,r])=>{var n;t.setAttribute(`data-${n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`,r)})),document.body.appendChild(t)},B=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>window.__tcfapi("addEventListener",2,(e=>(t,r)=>{if(r){if("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus){window._sf_async_config=window._sf_async_config||{};const{_sf_async_config:r}=window;r.uid=34533,r.domain=window._sf_async_config.domain,r.flickerControl=!1,r.useCanonical=!0,r.useCanonicalDomain=!0,r.authors=window.datalayerInfo?.signature??"",r.pingServer="pong.chartbeat.net";const n=[];window.datalayerInfo?.sectionLabel&&n.push(window.datalayerInfo.sectionLabel),window.datalayerInfo?.breadcrumb?.includes("Sport")&&n.push("Sport"),r.sections=n.join(","),r.noCookies=void 0===e.getUserConsentStatusForPurpose("cookies")||!e.getUserConsentStatusForPurpose("cookies")||!e.getUserConsentStatusForPurpose("mesureda-6qyqaZXC")||!e.getUserConsentStatusForVendor("c:chartbeat"),F({name:"Chartbeat",async:!0,src:"https://static.chartbeat.com/js/chartbeat.js"}),F({name:"ChartbeatMab",async:!0,src:"https://static.chartbeat.com/js/chartbeat_mab.js"}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,t.listenerId)}}else console.error("Issue with chartbeat callback")})(e))))},z=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>window.__tcfapi("addEventListener",2,(e=>t=>{if("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus){if(e.getUserConsentStatusForVendor("c:ownpage")&&e.getUserConsentStatusForPurpose("cookies")&&e.getUserConsentStatusForPurpose("select_personalized_ads")){F({name:"ownpage",async:!0,defer:!0,src:"https://script.ownpage.fr/v1/ownpage.js"});const e=document.querySelector('[src="https://script.ownpage.fr/v1/ownpage.js"]');e?.addEventListener("load",(()=>{window.Ownpage?.trackPage("9932310c1c44463b")}))}window.__tcfapi("removeEventListener",2,(()=>{}),t.listenerId)}else console.log("Issue with ownpage callback")})(e))))},j=e=>t=>{if("tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus){const r="{}"!==(e=>{const t=document.cookie.split(";").filter((t=>-1!==t.indexOf(e)))[0];return t?t.split("=")[1]:"{}"})("20mnUserInfo");if(e.getUserConsentStatusForPurpose("mesureda-6qyqaZXC")&&!r&&"article"===window.datalayerInfo.pageName&&!["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo.subType||"")){F({name:"poool",async:!0,src:"https://static.20mn.fr/apps/poool/access.min.js"});const t=document.querySelector('[src="https://static.20mn.fr/apps/poool/access.min.js"]');t?.addEventListener("load",(()=>{const t=document.querySelector(".c-content"),r=document.createElement("div");r.setAttribute("id","paywall"),t?.parentNode?.insertBefore(r,t.nextSibling),window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config({cookies_enabled:e.getUserConsentStatusForPurpose("mesureda-6qyqaZXC"),default_widget:"invisible",debug:!0,disable_content_height_calculation:!0}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0).createPaywall({content:".c-content",target:"#paywall",mode:"hide",percent:80,pageType:"free"})}))}window.__tcfapi("removeEventListener",2,(()=>{}),t.listenerId)}else console.log("Issue with poool callback")},U=()=>{document.querySelectorAll(".taboola").length>0&&(()=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{t?"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus||(window._taboola=window._taboola||[],"article"===window.datalayerInfo.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"}),F({name:"Taboola SDK",async:!0,src:"//cdn.taboola.com/libtrc/20minutesfrance-web/loader.js",id:"tb_loader_script",dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}}),document.querySelectorAll(".taboola").forEach((e=>{const t=e.getAttribute("data-mode"),r=e.getAttribute("id"),n=e.getAttribute("data-placement"),o=e.getAttribute("data-target-type");t&&r&&n&&o?window._taboola.push({mode:t,container:r,placement:n,target_type:o}):console.log("Issue with taboola placement")})),window._taboola.push({flush:!0}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)):console.log("Issue with taboola callback")};window.didomiOnReady.push((()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)}))})()},V=()=>{document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach((e=>{(e=>{if(!window.lazyObservers?.defaultObserver&&!window.lazyObservers?.instantObserver)return window.lazyElementsToObserve=window.lazyElementsToObserve||[],void window.lazyElementsToObserve.push(e);const t=e.dataset?.distanceVisible;"700"===t?window.lazyObservers?.defaultObserver?.observe(e):"0"===t&&window.lazyObservers?.instantObserver?.observe(e)})(e)}))};var H=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(H||{}),K=(e=>(e.photo="photo",e.podcast="podcast",e.video="video",e))(K||{});const $={primary:{ultramarine:{value:"#4742ff"},"ultramarine-light":{value:"#6b72fb"}},secondary:{orange:{value:"#fa9917"},yellow:{value:"#f2e500"},green:{value:"#6a9f4f"},purple:{value:"#ae6ba2"},red:{value:"#dc0e19"},scarlet:{value:"#ff3f3f"},blue:{value:"#0000ff"},pink:{value:"#ef2a82"},sponsoring:{value:"#fff5f1"}},greyscale:{black:{value:"#000000"},white:{value:"#ffffff"},"grey-50":{value:"#fffffe"},"grey-100":{value:"#f7f7f7"},"grey-200":{value:"#dddddd"},"grey-300":{value:"#898a8c"},"grey-400":{value:"#6a6a6a"},"grey-500":{value:"#484848"},"grey-600":{value:"#2f3134"},"grey-700":{value:"#181a1e"},"grey-800":{value:"#0f1116"},"grey-900":{value:"#0f1115"}},status:{warning:{value:"#fa9917"},error:{value:"#dc0e19"},success:{value:"#6a9f4f"}},rubric:{direct:{value:"#dc0e19"},sport:{value:"#3c9ba1"},entertainment:{value:"#92317e"},planet:{value:"#71a11b"},magazine:{value:"#008f8c"},"vie-pro":{value:"#008f8c"},production:{value:"#c5be00"},publicommunique:{value:"#6a6a6a"},c2c:{value:"#f7562a"},tempo:{value:"#cc0f53"}},diode:{"diode-direct":{value:"#f9454f"},"diode-sport":{value:"#70cdd2"},"diode-entertainment":{value:"#b97bad"},"diode-planet":{value:"#a5d059"},"diode-magazine":{value:"#19bebb"},"diode-vie-pro":{value:"#19bebb"},"diode-production":{value:"#e1d907"},"diode-c2c":{value:"#ff8260"},"diode-tempo":{value:"#e86d99"}}},G={base:{value:"Arial"},oswald:{value:"'Oswald', sans-serif"},"source-serif-pro":{value:"'Source Serif Pro', serif"}};Object.keys($.primary),Object.keys($.secondary),Object.keys($.greyscale),Object.keys($.status),Object.keys($.rubric);const W={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},Q={alignItems:["align-items"],alignContent:["align-content"],justifyContent:["justify-content"],gap:["gap"],gapX:["row-gap"],gapY:["col-gap"],inline:["inline"],direction:["direction"],wrap:["wrap"],flexGrow:["flex-grow"]},J={radius:["border-radius"]},Y={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},Z={...Y,borderColor:["border-color"],bg:["background-color"],color:["color"],...J},X={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]};Object.keys(G).filter((e=>!["base"].includes(e)));const ee=Object.keys($.diode),te=Object.keys($.rubric);function re(t){return e.forwardRef(t)}function ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
@@ -3,5 +3,6 @@ import { type PageTemplateProps } from '../../templates';
|
|
|
3
3
|
export interface ElectionsPageProps extends PageTemplateProps {
|
|
4
4
|
breadcrumb: React.ReactNode;
|
|
5
5
|
headerPage: React.ReactNode;
|
|
6
|
+
neighboringCities: React.ReactNode;
|
|
6
7
|
}
|
|
7
8
|
export declare const ElectionsPage: React.FC<ElectionsPageProps>;
|
|
@@ -41,7 +41,8 @@ export declare const enum ComponentNameElections {
|
|
|
41
41
|
ELECTIONS_JSON_LD_BREADCRUMB = "elections/json-ld-breadcrumb",
|
|
42
42
|
ELECTIONS_META = "elections/meta",
|
|
43
43
|
ELECTIONS_BREADCRUMB = "elections/breadcrumb",
|
|
44
|
-
ELECTIONS_HEADER_PAGE = "elections/header-page"
|
|
44
|
+
ELECTIONS_HEADER_PAGE = "elections/header-page",
|
|
45
|
+
ELECTIONS_NEIGHBORING_CITIES = "elections/neighboring-cities"
|
|
45
46
|
}
|
|
46
47
|
export declare const enum ComponentNameDirect {
|
|
47
48
|
DIRECT_BREADCRUMB = "direct/breadcrumb",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@20minutes/tyr",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"repository": "git@github.com:20minutes/tyr.git",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "20 Minutes",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"node": ">=20"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@20minutes/hela": "^1.
|
|
58
|
+
"@20minutes/hela": "^1.4.0",
|
|
59
59
|
"aws-rum-web": "^1.17.1",
|
|
60
60
|
"classnames": "^2.5.1",
|
|
61
61
|
"draft-convert": "^2.1.13",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type BoxProps } from '@20minutes/hela';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface BusinessSectorsListProps extends BoxProps {
|
|
4
|
-
sectors: {
|
|
5
|
-
name: string;
|
|
6
|
-
href: string;
|
|
7
|
-
}[];
|
|
8
|
-
}
|
|
9
|
-
export declare const BusinessSectorsList: React.FC<BusinessSectorsListProps>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.FC<import("./BusinessSectorsList").BusinessSectorsListProps>;
|
|
5
|
-
args: {
|
|
6
|
-
sectors: {
|
|
7
|
-
name: string;
|
|
8
|
-
href: string;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
parameters: {
|
|
12
|
-
controls: {
|
|
13
|
-
exclude: string[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default _default;
|
|
18
|
-
export declare const Mobile: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./BusinessSectorsList").BusinessSectorsListProps>;
|
|
19
|
-
export declare const Desktop: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./BusinessSectorsList").BusinessSectorsListProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BusinessSectorsList';
|