@20minutes/tyr 2.1.5 → 2.1.6
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/js/ads.min.js +1 -0
- package/dist/js/awsRum.min.js +1 -0
- package/dist/js/cmp.min.js +1 -0
- package/dist/js/main.min.js +2 -1
- package/dist/js/piano.min.js +2 -1
- package/dist/js/react-and-react-dom.min.js +1 -0
- package/dist/js/script-helpers.min.js +1 -0
- package/dist/src/components/molecules/HeaderPage/HeaderPage.stories.d.ts +5 -0
- package/package.json +12 -12
package/dist/js/cmp.min.js
CHANGED
|
@@ -4,3 +4,4 @@
|
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
6
|
*/var O,C=(S||(S=1,O=k,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var a in r)e.call(r,a)&&r[a]&&(o=n(o,a));return o}function n(e,t){return t?e?e+" "+t:e+t:e}O.exports?(t.default=t,O.exports=t):window.classNames=t}()),k.exports);const j=x(C);var $="/home/travis/build/20minutes/hela/src/components/atoms/Button/Button.tsx";const I=E((({as:e="button",variant:t="primary",children:r,iconProps:n,counter:o,isCentered:a=!1,isSquare:i=!1,...s},l)=>d.createElement(H,{...s,as:e,ref:l,alignItems:"center",gap:"xxs",inline:"link"===t||"a"===e,radius:i?"0":void 0,className:j("c-btn",{[`c-btn--${t}`]:t,"c-btn--is-centered":a},null==s?void 0:s.className),__self:void 0,__source:{fileName:$,lineNumber:50,columnNumber:5}},n&&d.createElement(T,{...n,__self:void 0,__source:{fileName:$,lineNumber:66,columnNumber:21}}),r,(0===o||o)&&d.createElement(H,{justifyContent:"center",alignItems:"center",color:"grey-900",bg:"white",px:"xxs",radius:"s",className:"c-btn__counter",__self:void 0,__source:{fileName:$,lineNumber:69,columnNumber:9}},o))));I.displayName="Button";var R="/home/travis/build/20minutes/hela/src/components/atoms/Divider/Divider.tsx";E((({text:e,color:t="black",thickness:r="thin",...n},o)=>{const a=d.createElement(G,{bg:t,align:"center",className:j("c-divider__line",{[`c-divider__line--${r}`]:"thin"!==r}),__self:void 0,__source:{fileName:R,lineNumber:15,columnNumber:7}});return d.createElement(H,{...n,ref:o,className:j("c-divider",{"c-divider--has-text":!!e},null==n?void 0:n.className),__self:void 0,__source:{fileName:R,lineNumber:25,columnNumber:7}},e?d.createElement(d.Fragment,null,a,d.createElement(G,{px:"xxs-2",className:"c-divider__text",__self:void 0,__source:{fileName:R,lineNumber:37,columnNumber:13}},d.createElement(ee,{size:"xxs",color:t,textTransform:"uppercase",__self:void 0,__source:{fileName:R,lineNumber:38,columnNumber:15}},e)),a):a)}));E((({color:e="black",thickness:t="thin",...r},n)=>d.createElement(U,{...r,ref:n,bg:e,className:j("c-divider-vertical",{[`c-divider-vertical--${t}`]:"thin"!==t},null==r?void 0:r.className),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/DividerVertical/DividerVertical.tsx",lineNumber:13,columnNumber:5}})));var P="/home/travis/build/20minutes/hela/src/components/atoms/Icon/Icon.tsx";const T=E((({name:e,size:t=28,isRounded:r=!1,border:n,rotation:o,svgTitle:a,...i},s)=>{const l=Array.isArray(t)?null==t?void 0:t[0]:t,c=Array.isArray(t)?null==t?void 0:t[1]:t;return d.createElement(U,{...i,ref:s,className:j("c-icon",{[`c-icon--has-border-${n}`]:n,"c-icon--is-rounded":r,[`c-icon--${o}`]:o},null==i?void 0:i.className),__self:void 0,__source:{fileName:P,lineNumber:23,columnNumber:7}},d.createElement("svg",{width:l,height:c,__self:void 0,__source:{fileName:P,lineNumber:36,columnNumber:9}},a&&d.createElement("title",{__self:void 0,__source:{fileName:P,lineNumber:37,columnNumber:24}},a),"circle"===e?d.createElement("circle",{__self:void 0,__source:{fileName:P,lineNumber:38,columnNumber:32}}):d.createElement("use",{xlinkHref:`#${e}`,__self:void 0,__source:{fileName:P,lineNumber:38,columnNumber:45}})))}));var V="/home/travis/build/20minutes/hela/src/components/atoms/Input/Input.tsx";E((({id:e,className:t,color:r,required:n,label:o,icon:a,positionIcon:i="right",isIconButton:s=!1,iconButtonProps:l,variant:c,msg:u,containerProps:m,isRounded:f,isTransparent:p,..._},b)=>d.createElement(H,{direction:"column",ref:b,className:"c-input",...m,__self:void 0,__source:{fileName:V,lineNumber:42,columnNumber:5}},o&&d.createElement("label",{htmlFor:e,className:"c-input__label",__self:void 0,__source:{fileName:V,lineNumber:44,columnNumber:9}},o,n&&d.createElement("abbr",{className:"c-input__label__abbr",title:"(ce champ est obligatoire)",__self:void 0,__source:{fileName:V,lineNumber:47,columnNumber:13}},"*")),d.createElement(H,{className:"c-input-container",__self:void 0,__source:{fileName:V,lineNumber:53,columnNumber:7}},a&&(s?d.createElement(I,{className:j("c-input-container__icon",`c-input-container__icon--${i}`),iconProps:{name:a,size:18},variant:"ghost",color:r||"black",...l,__self:void 0,__source:{fileName:V,lineNumber:56,columnNumber:13}}):d.createElement(T,{className:j("c-input-container__icon",`c-input-container__icon--${i}`),name:a,size:18,color:r||"black",__self:void 0,__source:{fileName:V,lineNumber:70,columnNumber:13}})),d.createElement("input",{id:e,className:j("c-input-container__input",{[`c-input-container__input--has-icon--${i}`]:a,[`c-input-container__input--${c}`]:c,"c-input-container__input--rounded":f,"c-input-container__input--transparent":p},t),required:n,..._,__self:void 0,__source:{fileName:V,lineNumber:80,columnNumber:9}})),u&&u.length&&d.createElement(H,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",__self:void 0,__source:{fileName:V,lineNumber:97,columnNumber:9}},u.map((({iconProps:e,textProps:t,value:r},n)=>d.createElement(H,{key:null==n?void 0:n.toString(),alignItems:"center",gap:"xxs",__self:void 0,__source:{fileName:V,lineNumber:99,columnNumber:13}},e&&d.createElement(T,{...e,__self:void 0,__source:{fileName:V,lineNumber:100,columnNumber:29}}),d.createElement(ee,{dangerouslySetInnerHTML:{__html:r},role:"alert",...t,__self:void 0,__source:{fileName:V,lineNumber:101,columnNumber:15}}))))))));const D=e=>{if(void 0!==e.propValue){if("boolean"!=typeof e.propValue){const t=(e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase())("number"==typeof e.propValue?e.propValue.toString():e.propValue);return e.className?`${e.className}-${t}@${e.defaultModifier}`:`${t}@${e.defaultModifier}`}if(!e.className)throw new Error('It is necessary to define the argument "className" !');return`${e.className}@${e.defaultModifier}`}},A=e=>{if(e.propValue&&["boolean","string","number"].includes(typeof e.propValue)||!e.propValue){const t=D({className:e.className,defaultModifier:e.defaultModifier||"xs",propValue:e.propValue});return t?[t]:[]}return Object.entries(e.propValue).reduce(((t,[r,n])=>{const o=D({className:e.className,defaultModifier:r,propValue:n});return o&&t.push(o),t}),[])},L=e=>"object"==typeof e.props?Object.keys(e.props).reduce(((t,r)=>(e.systemPropNames.includes(r)||(t[r]=e.props[r]),t)),{}):{},B=e=>j(Object.entries(e).filter((([e])=>Object.keys(y).includes(e))).reduce(((e,[t,r])=>(e.push(...A({className:t,propValue:r})),e)),[])),M=({textAlign:e,weight:t,textTransform:r,textDecoration:n,italic:o,fontFamily:a,whiteSpace:i})=>j(A({className:"text",propValue:e}),A({className:"font-weight",propValue:t}),{[`white-space-${i}`]:!!i,[`text-transform-${r}`]:!!r,[`text-decoration-${n}`]:!!n,"text-italic":!!o,[`font-${a}`]:!!a}),z=e=>j(B(e),(e=>j({[`bg-${e.bg}`]:e.bg,[`color-${e.color}`]:e.color,[`border-color-${e.borderColor}`]:e.borderColor}))(e),(e=>j(Object.entries(e).filter((([e])=>Object.keys(N).includes(e))).reduce(((e,[t,r])=>(e.push(...A({className:t,propValue:r})),e)),[])))(e)),q=({inline:e=!1,direction:t,wrap:r,...n})=>j(...A({propValue:e,className:e?"inline-flex":"flex"}),...A({propValue:t,className:"direction"}),...A({propValue:r}),(e=>j(...A({propValue:e.alignItems,className:"items"}),...A({propValue:e.alignContent,className:"content"}),...A({propValue:e.justifyContent,className:"justify"}),...A({propValue:e.gap,className:"gap"}),...A({propValue:e.gapX,className:"gap-x"}),...A({propValue:e.gapY,className:"gap-y"}),...A({propValue:e.flexGrow,className:"grow"})))(n)),F=({basis:e,shrink:t,grow:r,...n})=>j(...A({propValue:e,className:"basis"}),...A({propValue:t,className:"shrink"}),...A({propValue:r,className:"grow"}),(e=>j(...A({propValue:e.align,className:"self"})))(n));const U=E((({as:e="div",children:t,...r},n)=>d.createElement(e,{...L({props:r,systemPropNames:Object.keys(g)}),ref:n,className:j(z(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Layout/Box/Box.tsx",lineNumber:13,columnNumber:3}},t)));U.displayName="Box";const H=E((({as:e="div",children:t,...r},n)=>d.createElement(U,{...L({props:r,systemPropNames:Object.keys(v)}),as:e,ref:n,className:j(q(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Layout/Flex/Flex.tsx",lineNumber:12,columnNumber:3}},t)));const G=E((({as:e="div",children:t,...r},n)=>d.createElement(U,{...L({props:r,systemPropNames:Object.keys(b)}),as:e,ref:n,className:j(F(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Layout/Flex/FlexItem/FlexItem.tsx",lineNumber:13,columnNumber:5}},t)));E((({as:e="a",children:t,color:r,size:n,variant:o,weight:a,whiteSpace:i,tabIsSelected:s,tabVariant:l,tabColor:c,...u},m)=>{if(o&&r)throw new Error("You can't use color and variant props together");const f=l||c?j("c-tab",{[`c-tab--${l}`]:l,[`c-tab--${c}`]:c,"c-tab--selected":s,"c-tab--unselected":!s},M({weight:a,whiteSpace:i}),null==u?void 0:u.className):j("c-link",{[`c-btn c-btn--${o}`]:o&&!r},M({weight:a,whiteSpace:i}),A({className:"text",propValue:n}),null==u?void 0:u.className);return d.createElement(U,{...u,as:e,ref:m,...!l&&!c&&{color:o?void 0:r||"ultramarine"},className:f,__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Link/Link.tsx",lineNumber:73,columnNumber:7}},t)}));var X="/home/travis/build/20minutes/hela/src/components/atoms/ScrollProgressBar/ScrollProgressBar.tsx";E((({variant:e,progressColor:t="ultramarine"},r)=>d.createElement(U,{ref:r,bg:"grey-100",className:j("c-progress",{[`c-progress--${e}`]:e}),__self:void 0,__source:{fileName:X,lineNumber:14,columnNumber:5}},d.createElement(U,{className:"c-progress__bar",bg:t,style:{width:"0%"},__self:void 0,__source:{fileName:X,lineNumber:19,columnNumber:7}}))));var Y="/home/travis/build/20minutes/hela/src/components/atoms/Select/Select.tsx";E((({id:e,className:t,required:r,label:n,defaultValue:o,options:a,placeholder:i,containerProps:s,variant:l="default",icon:c,...u},m)=>{var f,p;return d.createElement(H,{...s,ref:m,direction:"column",className:"c-select",__self:void 0,__source:{fileName:Y,lineNumber:42,columnNumber:5}},n&&d.createElement("label",{htmlFor:e,className:"c-select__label",__self:void 0,__source:{fileName:Y,lineNumber:44,columnNumber:9}},n,r&&d.createElement("abbr",{className:"c-select__abbr",title:"(ce champ est obligatoire)",__self:void 0,__source:{fileName:Y,lineNumber:47,columnNumber:13}},"*")),d.createElement("div",{className:"c-select__container",__self:void 0,__source:{fileName:Y,lineNumber:53,columnNumber:7}},c&&d.createElement(T,{className:"c-select__icon",name:c,size:18,__self:void 0,__source:{fileName:Y,lineNumber:54,columnNumber:18}}),d.createElement(T,{className:`c-select__caret c-select__caret--${l}`,name:"arrow",size:12,__self:void 0,__source:{fileName:Y,lineNumber:55,columnNumber:9}}),d.createElement("select",{id:e,className:j("c-select__select",`c-select__select--${l}`,{"c-select__select--has-icon":!!c},B(u),t),required:r,defaultValue:o||(null==(p=null==(f=a.filter((e=>e.isSelected)))?void 0:f.pop())?void 0:p.value)||"",...L({props:u,systemPropNames:Object.keys(h)}),__self:void 0,__source:{fileName:Y,lineNumber:56,columnNumber:9}},i&&d.createElement("option",{value:"",disabled:!0,hidden:!0,__self:void 0,__source:{fileName:Y,lineNumber:75,columnNumber:13}},i),a.map((e=>d.createElement("option",{key:e.value,value:e.value,__self:void 0,__source:{fileName:Y,lineNumber:80,columnNumber:13}},e.title))))))}));var Z="/home/travis/build/20minutes/hela/src/components/atoms/Slider/Slider.tsx";const J=e=>{switch(e){case"primary":return"grey-50";case"secondary":return"grey-100";default:return}};E((({layout:e,children:t,itemsGap:r,buttonsBackground:n,buttonsVariant:o,colorVariant:a,sliderVariant:i="default",auto:s=!1,delay:l=3e3,...c},u)=>d.createElement(U,{...c,ref:u,className:j("c-slider js-navigation-container",null==c?void 0:c.className),"data-slider-variant":i,"data-slider-auto":s,"data-slider-delay":l,__self:void 0,__source:{fileName:Z,lineNumber:56,columnNumber:5}},d.createElement(U,{className:"c-slider__viewport js-navigation-container__list",__self:void 0,__source:{fileName:Z,lineNumber:64,columnNumber:7}},d.createElement(H,{className:"c-slider__list",alignItems:"center",gap:r,__self:void 0,__source:{fileName:Z,lineNumber:65,columnNumber:9}},t)),e===f.DESKTOP&&d.createElement(U,{className:"c-slider__buttons-container",__self:void 0,__source:{fileName:Z,lineNumber:70,columnNumber:9}},Array.from(["previous","next"],(e=>d.createElement(U,{key:e,bg:n&&J(n),pr:n&&"previous"===e?"l":void 0,pl:n&&"next"===e?"l":void 0,className:j(`c-slider__button-container c-slider__button-container--${e} o-nav-button o-nav-button--${e}-button`,{"c-slider__button-container--has-background":n},{[`c-slider__button-container--${i}`]:i}),__self:void 0,__source:{fileName:Z,lineNumber:72,columnNumber:13}},d.createElement(I,{variant:o||"round",color:a,..."videos"===i&&{p:"m"},iconProps:{name:"chevron",size:"videos"===i?14:12,rotation:"previous"===e?"half":void 0,svgTitle:"previous"===e?"Précédent":"Suivant"},__self:void 0,__source:{fileName:Z,lineNumber:85,columnNumber:15}}))))))));E((({as:e="a",id:t,variant:r="primary",children:n,...o},a)=>d.createElement(U,{...o,as:"span"===r?"span":e,href:"span"===r||null==o?void 0:o.href,ref:a,className:j("c-tags",`c-tags--${r}`,null==o?void 0:o.className),"data-id":t,__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Tag/Tag.tsx",lineNumber:14,columnNumber:5}},n)));var W="/home/travis/build/20minutes/hela/src/components/atoms/Textarea/Textarea.tsx";E((({id:e,required:t,label:r,variant:n,msg:o,rows:a=5,containerProps:i,...s},l)=>d.createElement(H,{direction:"column",ref:l,...i,className:j("c-textarea",null==i?void 0:i.className),__self:void 0,__source:{fileName:W,lineNumber:19,columnNumber:5}},r&&d.createElement("label",{htmlFor:e,className:"c-textarea__label",__self:void 0,__source:{fileName:W,lineNumber:26,columnNumber:9}},r,t&&d.createElement("abbr",{className:"c-textarea__label__abbr",title:"(ce champ est obligatoire)",__self:void 0,__source:{fileName:W,lineNumber:29,columnNumber:13}},"*")),d.createElement(H,{className:"c-textarea-container",__self:void 0,__source:{fileName:W,lineNumber:35,columnNumber:7}},d.createElement("textarea",{rows:a,placeholder:"Votre message...",required:t,...s,id:e,name:e,className:j("c-textarea-container__input",{[`c-textarea-container__input--${n}`]:n},null==s?void 0:s.className),__self:void 0,__source:{fileName:W,lineNumber:36,columnNumber:9}})),o&&o.length&&d.createElement(H,{wrap:"wrap",gapY:"s",gapX:"xxs-2",mt:"xxs-2",__self:void 0,__source:{fileName:W,lineNumber:53,columnNumber:9}},o.map((({iconProps:e,textProps:t,value:r},n)=>d.createElement(H,{key:null==n?void 0:n.toString(),alignItems:"center",gap:"xxs",__self:void 0,__source:{fileName:W,lineNumber:55,columnNumber:13}},e&&d.createElement(T,{...e,__self:void 0,__source:{fileName:W,lineNumber:56,columnNumber:29}}),d.createElement(ee,{dangerouslySetInnerHTML:{__html:r},role:"alert",...t,__self:void 0,__source:{fileName:W,lineNumber:57,columnNumber:15}}))))))));const K=E((({as:e="p",children:t,...r},n)=>t&&t.toString().length||null!=r&&r.dangerouslySetInnerHTML?d.createElement(U,{...L({props:r,systemPropNames:Object.keys(w)}),as:e,ref:n,className:j(M(r),null==r?void 0:r.className),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Typography/Typography.tsx",lineNumber:14,columnNumber:7}},t):null));const Q=E((({as:e="h1",size:t,children:r,...n},o)=>d.createElement(K,{...n,as:e,ref:o,className:j(A({className:"heading",propValue:t}),null==n?void 0:n.className),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Typography/Heading/Heading.tsx",lineNumber:15,columnNumber:5}},r)));const ee=E((({as:e="p",size:t,highlighted:r,children:n,...o},a)=>d.createElement(K,{as:r?"span":e,bg:r?"sponsoring":o.bg,p:r?"xxs":o.p,color:r?"grey-800":o.color,...o,ref:a,className:j(A({className:"text",propValue:t}),{"text-highlighted":r},null==o?void 0:o.className),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/atoms/Typography/Text/Text.tsx",lineNumber:16,columnNumber:5}},n)));E((({as:e="div",children:t,className:r,clickable:n=!1,...o},a)=>d.createElement(H,{...o,as:e,ref:a,justifyContent:(null==o?void 0:o.justifyContent)||"between",className:j("c-card-container",{"c-card-container--clickable":n},r),__self:void 0,__source:{fileName:"/home/travis/build/20minutes/hela/src/components/molecules/Card/CardContainer/CardContainer.tsx",lineNumber:14,columnNumber:5}},t)));var te="/home/travis/build/20minutes/hela/src/components/molecules/Collapse/Collapse.tsx";E((({titleProps:e,titleIconProps:t,index:r,isOpen:n,contentWithBorder:o=!0,contentProps:a,iconProps:i,btnProps:s,children:l,isDropdown:c,...u},m)=>d.createElement(U,{...u,className:j("c-collapse js-collapse",{"c-collapse--dropdown":c}),ref:m,__self:void 0,__source:{fileName:te,lineNumber:45,columnNumber:5}},d.createElement(U,{...s,as:"button",type:"button",id:`c-collapse__button-${r}`,pl:(null==s?void 0:s.pl)||"l",py:(null==s?void 0:s.py)||"xxs",className:j("c-collapse__button js-collapse__button",null==s?void 0:s.className),"aria-controls":`c-collapse__content-${r}`,"aria-expanded":n||"false",__self:void 0,__source:{fileName:te,lineNumber:50,columnNumber:7}},t?d.createElement(H,{alignItems:"center",__self:void 0,__source:{fileName:te,lineNumber:62,columnNumber:11}},d.createElement(T,{size:34,mr:"xs",...t,__self:void 0,__source:{fileName:te,lineNumber:63,columnNumber:13}}),e.children):d.createElement(ee,{size:"l",...e,__self:void 0,__source:{fileName:te,lineNumber:67,columnNumber:11}},e.children),d.createElement(T,{...i,name:"chevron",size:16,className:j("c-collapse__icon",null==i?void 0:i.className),__self:void 0,__source:{fileName:te,lineNumber:71,columnNumber:9}})),d.createElement(H,{...a,direction:"column",p:(null==a?void 0:a.p)||"xl",id:`c-collapse__content-${r}`,"aria-hidden":n?!n:"true","aria-labelledby":`c-collapse__button-${r}`,className:j("c-collapse__content",{"c-collapse__content--with-border":o}),role:"tabpanel",__self:void 0,__source:{fileName:te,lineNumber:78,columnNumber:7}},l))));var re="/home/travis/build/20minutes/hela/src/components/molecules/Horoscope/HoroscopeTopicCard/HoroscopeTopicCard.tsx";E((({icon:e,title:t,content:r,...n},o)=>d.createElement(U,{...n,ref:o,className:j("c-horoscope-topic-card",null==n?void 0:n.className),__self:void 0,__source:{fileName:re,lineNumber:16,columnNumber:5}},d.createElement(H,{alignItems:"center",mb:"s",__self:void 0,__source:{fileName:re,lineNumber:17,columnNumber:7}},d.createElement(T,{className:"c-horoscope-topic-card__icon",name:e,size:21,__self:void 0,__source:{fileName:re,lineNumber:18,columnNumber:9}}),d.createElement(Q,{as:"h3",size:"xs",__self:void 0,__source:{fileName:re,lineNumber:19,columnNumber:9}},t)),d.createElement(ee,{size:"m",__self:void 0,__source:{fileName:re,lineNumber:23,columnNumber:7}},r))));var ne,oe={};!function(){if(ne)return oe;ne=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.StickyShareButtons=oe.InlineShareButtons=oe.InlineReactionButtons=oe.InlineFollowButtons=void 0;var e,t=(e=d)&&e.__esModule?e:{default:e};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}}();return function(){var n,o=l(e);if(t){var a=l(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=function(e,t){var r=e.props.config||{enabled:!0};r=JSON.parse(JSON.stringify(r));var n=window.onShareThisLoaded;if(window.onShareThisLoaded=function o(){if(!o.complete){if(!r.id){var a="sharethis-"+Date.now();r.id=a}e.buttons.current&&(e.buttons.current.id=r.id,window.__sharethis__.load(t,r)),n&&n(),o.complete=!0}},document.getElementById("sharethis-js"))window.__sharethis__&&window.onShareThisLoaded();else{var o=document.createElement("script");o.setAttribute("id","sharethis-js");var a={property:r.property||"",product:t,source:"reactjs"},i=Object.keys(a).map((function(e){return e+"="+a[e]})).join("&");o.src="https://platform-api.sharethis.com/js/sharethis.js?"+i,o.async=!0,document.body.appendChild(o)}},u=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-follow-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);oe.InlineFollowButtons=u;var m=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-share-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);oe.InlineShareButtons=m;var f=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"inline-reaction-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);oe.InlineReactionButtons=f;var p=function(e){a(i,e);var r=s(i);function i(e){var o;return n(this,i),(o=r.call(this,e)).buttons=t.default.createRef(),o}return o(i,[{key:"componentDidMount",value:function(){c(this,"sticky-share-buttons")}},{key:"render",value:function(){return t.default.createElement("div",{ref:this.buttons})}}]),i}(t.default.Component);oe.StickyShareButtons=p}();const ae=["20mnToken","20mnUserDataLayer","20mnTutorial","20mnUserInfo","20mnUserSession","_vfa","_vfb","_vfz","atauthority","atid","atidvisitor","atidx","atuserid","didomi_token","euconsent-v2","osano_consentmanager","osano_consentmanager_expdate","osano_consentmanager_uuid","SESSIDSF","SESSIDSFRM","TCPID","TSTD","ei_client_id","_biz_pendingA","_biz_flagsA","_biz_uid","_biz_nA","ajs_group_id","ajs_user_id","ajs_anonymous_id","TSNGUID","_mkto_trk","JSESSIONID","staging-login_idle_session_timeout","login_service_login_newrelic_com_tokens","login_idle_session_timeout","lang","auth_expiration_timestamp","sticky-scorecast-business-chat","__utna","__utnv","auth_token","PHPSESSID","sticky-scorecast-business-app","sticky-scorecast-prod-app","realm"],ie=["_vf_sid","consent_validity_date","20mn-articlesSaved","20mn-font","closedInfo","20mn-known-user","20mn-block-links","20mnBreakingNewsBanner","20mnBreakingNews","20mnAppBanner","20mn-visits-content","20minutes-font"],se=["vfThirdpartyCookiesEnabled","com.batch.sessionId","loadIntrasticial"],le=()=>{window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:()=>{window.pa&&"optout"!==window.pa.privacy.getMode()&&(window.pa.privacy.setMode("exempt"),window.Didomi.getCurrentUserStatus().purposes["mesureda-6qyqaZXC"].enabled&&window.pa.privacy.setMode("optin"))}})},ce=()=>{window.cmpVariables={consentEventsCount:0},window.didomiEventListeners.push({event:"consent.changed",listener:()=>{(()=>{const e=window?.mics?.vid;!window.Didomi.getCurrentUserStatus().purposes["publicite-Nfb9aWMW"].enabled&&e&&fetch("https://splash.20minutes.fr/consent",{headers:{"Content-Type":"application/json"},referrerPolicy:"strict-origin-when-cross-origin",method:"POST",body:JSON.stringify({account_id:`mum:${e}`})})})();const e=(e=>{const t=document.cookie.split(";").filter((t=>-1!==t.indexOf(e)))[0];return t?t.split("=")[1]:"{}"})("euconsent-v2"),t=window.cmpVariables.consentEventsCount>0||!!e,r=!window.Didomi.getCurrentUserStatus().purposes.cookies.enabled,i=window.sessionStorage.getItem("cmpModal");t&&!i&&(r&&(n(ae),a(ie),o(se)),setTimeout((()=>{document.location.href=document.location.href}),window.layout===f.DESKTOP?300:400)),i&&window.sessionStorage.removeItem("cmpModal"),window.cmpVariables.consentEventsCount+=1}})},ue=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>{if(e.getCurrentUserStatus().purposes["activation-gGierZpp"].enabled){Array.from(document.getElementsByClassName("cmp-placeholder")).forEach((e=>{e.classList.add("u-hidden")}));Array.from(document.getElementsByClassName("embed-wrapper")).forEach((e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach((e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))}))}))}else{Array.from(document.getElementsByClassName("cmp-placeholder")).forEach((e=>{e.classList.remove("u-hidden")}))}}))},me=()=>{document.querySelectorAll(".embed-placeholder").forEach((e=>{e.addEventListener("click",(e=>{const t=e.target;if(!(t instanceof HTMLElement&&t.closest(".cmp-button")))return;e.preventDefault(),window.didomiOnReady.push((()=>{(()=>{const e=window.Didomi.openCurrentUserStatusTransaction();e.enablePurpose("activation-gGierZpp"),window.sessionStorage.setItem("cmpModal","accepted"),e.commit(),ue()})()}));const r=t.closest("div.embed-placeholder");r&&r.focus()}))}))};window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3);const r=e.toISOString().split("T")[0],i=localStorage.getItem("consent_validity_date");i&&r>i&&(window.Didomi.reset(),localStorage.removeItem("consent_validity_date"),window.disapproveDidomiGTMEvents=!0,n(ae),a(ie),o(se),window.Didomi.notice.show())})),le(),ce(),window.didomiOnReady=window.didomiOnReady||[],ue(),window.didomiEventListeners.push({event:"consent.changed",listener(){ue()}}),me(),window.didomiOnReady=window.didomiOnReady||[],e(),window.didomiEventListeners.push({event:"consent.changed",listener(){e()}}),t(),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((()=>{const e=document.getElementById("choice-consent");e&&window?.Didomi?.preferences?.show&&e.addEventListener("click",(()=>{window.Didomi.preferences.show()}))})),setTimeout((()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>{e.getCurrentUserStatus().purposes.cookies.enabled||n(ae)}))}),3e4)}();
|
|
7
|
+
//# sourceMappingURL=cmp.min.js.map
|
package/dist/js/main.min.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/*!
|
|
7
7
|
* PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
|
|
8
8
|
* (c) 2024 Dmytro Semenov
|
|
9
|
-
*/function Fe(e,t,r){const n=document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n}function Re(e,t,r){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof r?`${r}px`:r}const Be="idle",ze="loading",je="loaded",He="error";function Ve(e,t,r=document){let n=[];if(e instanceof Element)n=[e];else if(e instanceof NodeList||Array.isArray(e))n=Array.from(e);else{const i="string"==typeof e?e:t;i&&(n=Array.from(r.querySelectorAll(i)))}return n}function Ue(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Ke{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class $e{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,r=100){var n,i,o;this._filters[e]||(this._filters[e]=[]),null===(n=this._filters[e])||void 0===n||n.push({fn:t,priority:r}),null===(i=this._filters[e])||void 0===i||i.sort(((e,t)=>e.priority-t.priority)),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,r)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter((e=>e.fn!==t))),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var r;return null===(r=this._filters[e])||void 0===r||r.forEach((e=>{t[0]=e.fn.apply(this,t)})),t[0]}on(e,t){var r,n;this._listeners[e]||(this._listeners[e]=[]),null===(r=this._listeners[e])||void 0===r||r.push(t),null===(n=this.pswp)||void 0===n||n.on(e,t)}off(e,t){var r;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((e=>t!==e))),null===(r=this.pswp)||void 0===r||r.off(e,t)}dispatch(e,t){var r;if(this.pswp)return this.pswp.dispatch(e,t);const n=new Ke(e,t);return null===(r=this._listeners[e])||void 0===r||r.forEach((e=>{e.call(this,n)})),n}}class Ge{constructor(e,t){if(this.element=Fe("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Re(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,r){let n=`translate3d(${e}px,0px,0)`;return void 0!==r&&(n+=` scale3d(${r},${r},1)`),n}(0,0,e/250)):Re(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}}class We{constructor(e,t,r){this.instance=t,this.data=e,this.index=r,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=Be,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(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Ge(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=Fe("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=Fe("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,r;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(t=this.data.src)&&void 0!==t?t:"",n.alt=null!==(r=this.data.alt)&&void 0!==r?r:"",this.state=ze,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=je,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===je||this.state===He)&&this.removePlaceholder())}onError(){this.state=He,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===ze,this)}isError(){return this.state===He}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Re(this.element,e,t),this.isImageContent()&&!this.isError()))){const r=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,r?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==He,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}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 e,t;let r=Fe("pswp__error-msg","div");r.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",r=this.instance.applyFilters("contentErrorElement",r,this),this.element=Fe("pswp__content pswp__error-msg-container","div"),this.element.appendChild(r),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===He)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||Ue())?(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&&!Ue()?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===je||this.state===He)&&this.removePlaceholder()))}}function Ze(e,t,r,n,i){let o=0;if(t.paddingFn)o=t.paddingFn(r,n,i)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}class Qe{constructor(e,t,r,n){this.pswp=n,this.options=e,this.itemData=t,this.index=r,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(e,t,r){const n={x:e,y:t};this.elementSize=n,this.panAreaSize=r;const i=r.x/n.x,o=r.y/n.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),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(e){const t=e+"ZoomLevel",r=this.options[t];if(r)return"function"==typeof r?r(this):"fill"===r?this.fill:"fit"===r?this.fit:Number(r)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function Je(e,t,r){const n=t.createContentFromData(e,r);let i;const{options:o}=t;if(o){let a;i=new Qe(o,e,-1),a=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const r=e.getViewportSizeFn(e,t);if(r)return r}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,t);const s=function(e,t,r,n){return{x:t.x-Ze("left",e,t,r,n)-Ze("right",e,t,r,n),y:t.y-Ze("top",e,t,r,n)-Ze("bottom",e,t,r,n)}}(o,a,e,r);i.update(n.width,n.height,s)}return n.lazyLoad(),i&&n.setDisplayedSize(Math.ceil(n.width*i.initial),Math.ceil(n.height*i.initial)),n}class Ye extends $e{getNumItems(){var e;let t=0;const r=null===(e=this.options)||void 0===e?void 0:e.dataSource;r&&"length"in r?t=r.length:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(t=r.items.length));const n=this.dispatch("numItems",{dataSource:r,numItems:t});return this.applyFilters("numItems",n.numItems,r)}createContentFromData(e,t){return new We(e,this,t)}getItemData(e){var t;const r=null===(t=this.options)||void 0===t?void 0:t.dataSource;let n={};Array.isArray(r)?n=r[e]:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),n=r.items[e]);let i=n;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,r;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(r=this.options)&&void 0!==r&&r.childSelector?Ve(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},r="A"===e.tagName?e:e.querySelector("a");if(r){t.src=r.dataset.pswpSrc||r.href,r.dataset.pswpSrcset&&(t.srcset=r.dataset.pswpSrcset),t.width=r.dataset.pswpWidth?parseInt(r.dataset.pswpWidth,10):0,t.height=r.dataset.pswpHeight?parseInt(r.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,r.dataset.pswpType&&(t.type=r.dataset.pswpType);const i=e.querySelector("img");var n;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(n=i.getAttribute("alt"))&&void 0!==n?n:"";(r.dataset.pswpCropped||r.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,r)}lazyLoadData(e,t){return Je(e,this,t)}}class Xe extends Ye{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ve(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(e){if("button"in(t=e)&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||window.pswp)return;var t;let r={x:e.clientX,y:e.clientY};!r.x&&!r.y&&(r=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);const i={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,i,r))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,r=Ve(this.options.children,this.options.childSelector,e.currentTarget).findIndex((e=>e===t||e.contains(t)));return-1!==r?r:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,r){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Ve(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=r,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:r}=this;t&&(r.dataSource=t);const n=[],i=typeof r.pswpModule;if("function"==typeof(o=r.pswpModule)&&o.prototype&&o.prototype.goTo)n.push(Promise.resolve(r.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");n.push(r.pswpModule())}var o;"function"==typeof r.openPromise&&n.push(r.openPromise()),!1!==r.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const r=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:r}).defaultPrevented)return Je(r,t,e)}(e,this));const a=++this._uid;Promise.all(n).then((e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,a)}}))}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const r="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=r,window.pswp=r,Object.keys(this._listeners).forEach((e=>{var t;null===(t=this._listeners[e])||void 0===t||t.forEach((t=>{r.on(e,t)}))})),Object.keys(this._filters).forEach((e=>{var t;null===(t=this._filters[e])||void 0===t||t.forEach((t=>{r.addFilter(e,t.fn,t.priority)}))})),this._preloadedContent&&(r.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),r.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),r.init()}destroy(){var e;null===(e=this.pswp)||void 0===e||e.destroy(),this.shouldOpen=!1,this._listeners={},Ve(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)}))}}const et=()=>{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 i=r.scrollTop;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const o=Math.round(i/n*100);t.style.width=`${o}%`,o>=100&&(t.style.width="100%")},tt="#page-content",rt="#text-tooltip",nt="c-text-tooltip--show",it=["#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"],ot=(e,t)=>e instanceof Element&&t.some((t=>e.matches(t))),at=()=>{const e=document.querySelector(`${rt}`);e&&e.classList.remove(nt)},st=({type:e})=>{const t=window.getSelection();if("selectionchange"===e)return void at();if(!t||!t.rangeCount)return;const r=t.getRangeAt(0),n=t.toString().trim();if(n.length){const e=((e,t)=>{const r=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentElement,n=e.endContainer.nodeType===Node.ELEMENT_NODE?e.endContainer:e.endContainer.parentElement;return!!r&&ot(r,t)||!!n&&ot(n,t)})(r,it),i=(e=>{var t;if(!e.focusNode)return null;const r=null==(t=e.anchorNode)?void 0:t.compareDocumentPosition(e.focusNode);return r?(4&r)>0:e.anchorOffset<e.focusOffset})(t)||!1;e&&((e,t,r)=>{const n=document.querySelector(`${tt} ${rt}`),i=document.querySelector(`${tt}`),o=document.querySelectorAll(`${tt} ${rt} .tooltip-btn`);if(!n||!i)return void console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");Array.from(o).forEach((e=>e.setAttribute("data-selected-text",r)));const a=e.getClientRects(),s=a[t?a.length-1:0];n.style.top=s.top-i.getBoundingClientRect().top-(n.offsetHeight+10)+"px",s.width<n.offsetWidth?n.style.left=s.left-i.getBoundingClientRect().left+s.width/2-n.offsetWidth/2+"px":n.style.left=t?s.left-i.getBoundingClientRect().left+s.width-n.offsetWidth+"px":s.left-i.getBoundingClientRect().left+"px",n.classList.add(nt)})(r,i,n)}else at()},lt=(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)}))},ct=e=>"ArrowLeft"===e.code||39===e.keyCode,ut=e=>"ArrowRight"===e.code||37===e.keyCode,dt=(e=document.querySelectorAll(".js-tabs"))=>{e.length>0&&e.forEach((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"]'),i=e.querySelectorAll('[role="tabpanel"]'),o=r.getAttribute("aria-controls"),a=Object.values(i).find((e=>e.id===o));n.forEach((e=>{e.setAttribute("aria-selected","false")})),i.forEach((e=>{e.setAttribute("aria-hidden","true")})),r.setAttribute("aria-selected","true"),a&&a.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&&(ct(r)||ut(r))&&(t[e].setAttribute("tabindex","-1"),ct(r)?(e+=1,e>=t.length&&(e=0)):ut(r)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())}))}}))},pt="c-social-bar-item__container--is-highlighted",ft=()=>{const e=document.querySelector(".c-toolbar");if(e){const t=window.location.origin+window.location.pathname,r=Array.from(e.querySelectorAll(".c-social-bar-item__container"));(e=>{const t=e.find((e=>e.classList.contains(pt)));null==t||t.classList.remove(pt)})(r);const n=r.find((e=>{var r;return(null==(r=e.querySelector("a"))?void 0:r.getAttribute("href"))===t}));null==n||n.classList.add(pt)}},ht=()=>{((e=document.querySelector(".js-expand-button"))=>{e&&document.querySelectorAll(".js-expand-button").forEach((e=>e.addEventListener("click",d)))})(),dt(),s(),((e=document.querySelector(".js-ellipsis-button"))=>{e&&document.querySelectorAll(".js-ellipsis-button").forEach((e=>{const t="true"===e.getAttribute("data-multiple");e.addEventListener("click",(e=>u(e,t)))}))})(),document.querySelector(".c-progress")&&window.addEventListener("scroll",et),(()=>{let e=null;e=new Xe({gallery:"#photoswipe-gallery",children:"a",pswpModule:Me,zoom:!1,imageClickAction:"next",tapAction:"next"}),e.on("uiRegister",(()=>{var t,r;null==(r=null==(t=null==e?void 0:e.pswp)?void 0:t.ui)||r.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{var r;null==(r=null==e?void 0:e.pswp)||r.on("change",(()=>{var r,n;const i=null==(n=null==(r=null==e?void 0:e.pswp)?void 0:r.currSlide)?void 0:n.data.element;if(i){const e=i.querySelector(".caption-content");t.innerHTML=(null==e?void 0:e.innerHTML)||""}}))}})})),e.init()})(),document.querySelectorAll(".js-modal").forEach((e=>{if(!(e instanceof HTMLElement))return;const t=new k(e);if("dialog-menu"===e.id){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),r=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&r.length>0&&(t.on("show",(()=>{e.forEach((e=>e.classList.add("u-hidden"))),r.forEach((e=>e.classList.remove("u-hidden")))})),t.on("hide",(()=>{e.forEach((e=>e.classList.remove("u-hidden"))),r.forEach((e=>e.classList.add("u-hidden")))})))}t.on("show",(()=>{document.body.classList.add("noscroll")})).on("hide",(()=>{document.body.classList.remove("noscroll")}))})),lt(),((e,t)=>{const r=document.querySelector(`#${t}`);if(r){const t=r.querySelector(".js-countdown-days"),n=r.querySelector(".js-countdown-hours"),i=r.querySelector(".js-countdown-minutes"),o=r.querySelector(".js-countdown-seconds");if(!(t&&n&&i&&o))return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const a=window.counters[e],s=new Date(a).getTime(),l=setInterval((()=>{const e=(new Date).getTime(),r=s-e;if(r<=0)clearInterval(l);else{const e=Math.floor(r/864e5),a=Math.floor(r%864e5/36e5),s=Math.floor(r%36e5/6e4),l=Math.floor(r%6e4/1e3);t.innerHTML=e.toString(),n.innerHTML=a.toString(),i.innerHTML=s.toString(),o.innerHTML=l.toString()}}),1e3)}})("paralympicsGames","countdown-paralympics-games"),null!=window&&window.getSelection?(document.addEventListener("mouseup",st),document.addEventListener("selectionchange",st),document.addEventListener("touchend",st),document.addEventListener("touchcancel",st)):console.warn("Selection API isn't supported"),(()=>{const e=document.querySelector("header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),r=document.querySelector(".js-close-article-btn"),n=document.querySelector(".c-header-mobile"),i=n instanceof HTMLElement?n.offsetHeight:0;if(e&&t&&r){const n=new IntersectionObserver((()=>{const n=r.classList,o=n.contains("u-hidden"),a=e.getBoundingClientRect().bottom-i,s=t.getBoundingClientRect().bottom-i;o&&a<=0&&s>=0&&n.remove("u-hidden"),!o&&(a>=0||s<=0)&&n.add("u-hidden")}),{root:document,rootMargin:`-${i}px 0px 0px 0px`});n.observe(e),n.observe(t)}})(),(()=>{const e=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(e)){const e=t.querySelector(".c-half-donut"),r=t.querySelector(".c-legend");if(!e||!r)return;r.querySelectorAll("[data-color]").forEach((t=>{const n=t.getAttribute("data-color"),i=e.querySelector(`.c-half-donut__zone--${n}`);null==i||i.addEventListener("mouseenter",(()=>{t.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),r.classList.add("c-legend--is-hovered")})),null==i||i.addEventListener("mouseleave",(()=>{t.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),r.classList.remove("c-legend--is-hovered")})),t.addEventListener("mouseenter",(()=>{null==i||i.classList.add("c-half-donut__zone--is-hovered"),r.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")})),t.addEventListener("mouseleave",(()=>{null==i||i.classList.remove("c-half-donut__zone--is-hovered"),r.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")}))}))}})(),c(),(()=>{const e=document.querySelector("form#actual-search-form");e instanceof HTMLFormElement&&e.addEventListener("submit",i)})(),a("jobs-input","https://www.groupeactual.eu/autocomplete/profession-simple?code&prefix&limit=75","&term=","id","title","items"),a("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),l(),ft(),(()=>{const e=document.querySelector("#js-election-selector");e&&e.addEventListener("change",(e=>{window.location.replace(e.target.value)}))})(),(()=>{const e=document.querySelector(".c-search-banner");if(e){const t=document.querySelector("#js-search-banner-to-hide"),r=e.querySelector("#js-search-banner-dropdown-btn");null==r||r.addEventListener("click",(()=>{const e=r.querySelector("svg"),n=null==e?void 0:e.querySelector("use");switch(null==n?void 0:n.getAttribute("xlink:href")){case"#chevron-up":null==n||n.setAttribute("xlink:href","#chevron-down"),null==t||t.classList.add("u-hidden");break;case"#chevron-down":null==n||n.setAttribute("xlink:href","#chevron-up"),null==t||t.classList.remove("u-hidden")}}))}})(),(()=>{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,i=n?parseInt(n,10):3e3,o=t.closest(".js-overview-bar-container"),a=null==o?void 0:o.querySelector(".c-stepper"),s=null==a?void 0:a.querySelectorAll(".c-stepper__item");if(t){const n=t.querySelector(".js-navigation-container__list"),o=t.querySelector(".o-nav-button--next-button"),l=t.querySelector(".o-nav-button--previous-button");if(n&&n.clientWidth<n.scrollWidth&&(null==o||o.classList.add("o-nav-button--visible")),n&&o&&l&&(null==o||o.addEventListener("click",T.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e})),null==l||l.addEventListener("click",A.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e,delay:i}))),"true"===r&&o){const e=a?a.querySelector(".c-stepper__item--loading"):null;s&&(s.forEach((e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)})),e||s[0].classList.add("c-stepper__item--loading")),setInterval((()=>{o.classList.contains("o-nav-button--visible")?o.click():n&&l&&(n.scrollLeft=0,s&&(s.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 ${i/1e3}s linear`)}),0)})),setTimeout((()=>{s[0].classList.add("c-stepper__item--loading")}),0)),l.click())}),i)}}}})(),(()=>{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",D.bind(!1,{navigatedList:e,nextBtn:r,prevBtn:n}))}})(),(()=>{const e=document.querySelector(".js-game-alert");p&&e&&e.classList.remove("u-hidden")})()};function mt(){if(this?.id)try{const e=document.getElementById(this.id);if(e){const t=e.getAttribute("value");if(t){const e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}}}catch(e){console.error("Oops, unable to copy",e)}}const gt=e=>{const t=e.currentTarget;if(e.preventDefault(),t instanceof HTMLButtonElement){const e=t.parentNode?.querySelectorAll(".js-toggle-target");"true"===t.getAttribute("aria-expanded")?((e,t)=>{t?.forEach((e=>e.setAttribute("aria-hidden","true"))),e.setAttribute("aria-expanded","false"),e.innerHTML="Voir tous les résultats"})(t,e):((e,t)=>{e.setAttribute("aria-expanded","true"),e.innerHTML="Masquer tous les résultats",t?.forEach((e=>e.setAttribute("aria-hidden","false")))})(t,e)}};var vt=()=>{(()=>{const e=document.getElementById("goto-distribution"),t=document.getElementById("goto-european-map"),r=document.getElementById("goto-map"),n=document.getElementById("goto-statistics"),i=document.getElementById("goto-results");e&&e.addEventListener("click",mt),t&&t.addEventListener("click",mt),r&&r.addEventListener("click",mt),n&&n.addEventListener("click",mt),i&&i.addEventListener("click",mt)})(),((e=document.querySelector(".js-toggle-button"))=>{e&&document.querySelectorAll(".js-toggle-button").forEach((e=>e.addEventListener("click",gt)))})(),(()=>{const e=document.getElementById("elections-form-container"),t=document.querySelector(".c-header-mini"),r=document.querySelector('body[data-layout="mobile"]');e&&t&&new MutationObserver((t=>{const r=t[0],n=r.target;n instanceof HTMLElement&&"attributes"===r.type&&"class"===r.attributeName&&(n.className.includes("c-header-mini--is-hidden")?(e.classList.remove("u-sticky"),e.classList.remove("u-sticky--under-header-mini")):(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header-mini")))})).observe(t,{attributes:!0});r&&e&&(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header"))})()};const bt=e=>{const t=document.cookie.split(";").filter((t=>-1!==t.indexOf(e)))[0];return t?t.split("=")[1]:"{}"},yt=function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},_t=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),wt=(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,"").replace(/-*$/g,"")},Et=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,St=e=>{const t=Math.floor(e/60),r=e%60;return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`},xt=e=>{const t={click:wt(e.name),click_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,click_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,click_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3},r=`click.${e?.type??"navigation"}`;window.pa?(e.customProps&&Object.keys(e.customProps).length>0&&window.pa.setProperties(e.customProps,{persistent:!1,events:[r]}),window.pa.sendEvent(r,t)):window._paq&&(e.customProps&&Object.keys(e.customProps).length>0&&window._paq.push(["setProperties",e.customProps,{persistent:!1,events:[r]}]),window._paq.push(["sendEvent",r,t]))},Nt=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}])};var kt=()=>{(()=>{const e=document.querySelector('.c-header a[href="https://qlic.it/1517191"]');e&&e.addEventListener("click",(()=>{xt({name:"advent-calendar",type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:"https://campagne.20minutes.fr/20/65DD90D9-08AB-4B19-9D2F-394E44E1FC39/s223/v1.cfm?id=65DD90D9-08AB-4B19-9D2F-394E44E1FC39",cta_engagement:2}})}));const t=document.querySelector('.c-menu a[href="https://qlic.it/1517191"]');t&&t.addEventListener("click",(()=>{xt({name:"advent-calendar",type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:"https://campagne.20minutes.fr/20/65DD90D9-08AB-4B19-9D2F-394E44E1FC39/s223/v1.cfm?id=65DD90D9-08AB-4B19-9D2F-394E44E1FC39",cta_engagement:2}})}))})(),"guide-achat"===window.datalayerInfo?.subType&&document.querySelectorAll(".c-content a.c-btn").forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault(),xt({name:"affiliation",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)}))})),(()=>{let e=document.querySelector("div.c-card-large a");"mobile"===window.layout&&(e=document.querySelector("div.c-card-extra-large a")),e&&e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof HTMLElement&&(t=e.target.closest("a")?.href||""),xt({name:"headline_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t}))})(),[{name:"games",id:"#entertainment-item-game"},{name:"horoscope",id:"#entertainment-item-horoscope"}].forEach((e=>{const t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener("click",(r=>{r.stopPropagation(),r.preventDefault(),xt({name:e.name,type:"action",customProps:{cta_context:"widget_entertainment",cta_type:"link_with_icon",cta_destination:t.href,cta_engagement:2}}),window.location.href=t.href}))})),(()=>{const e=(e,t,r)=>{let n="";r.target instanceof HTMLAnchorElement?n=r.target.href:r.target instanceof HTMLElement&&(n=r.target.closest("a")?.href||""),n&&(r.stopPropagation(),r.preventDefault(),xt({name:t,type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:n,cta_engagement:1}}),"_blank"===e.target?window.open(n,"_blank")?.focus():window.location.href=n)};document.querySelectorAll(".c-header__container a.c-media-link").forEach((t=>{switch(t.title){case"Consulter la page 20 Minutes TV":t.addEventListener("click",(r=>{e(t,"20mn_tv",r)}));break;case"Consulter la page Vidéos 20 Minutes":t.addEventListener("click",(r=>{e(t,"videos",r)}));break;case"Consulter la page Podcasts 20 Minutes":t.addEventListener("click",(r=>{e(t,"podcasts",r)}));break;case"Consulter la page Diaporama 20 Minutes":t.addEventListener("click",(r=>{e(t,"images",r)}))}}))})(),document.querySelectorAll(".c-overview-bar__article a").forEach((e=>{e.addEventListener("click",(e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),xt({name:"summary_banner",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)}))})),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault(),xt({name:"recrutement",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)}))})(),(()=>{const e=document.querySelector('.c-social-bar a[href="#mbrs-comments-container"]');e&&e.addEventListener("click",(()=>{xt({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}));const t=document.querySelector('.c-social-bar div[data-a11y-dialog-show="dialog-comment"]');t&&t.addEventListener("click",(()=>{xt({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}))})(),(()=>{const e=document.querySelector(".c-social-bar div.mbrs-social-report-container");e&&e.addEventListener("click",(()=>{xt({name:"content_correction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}))})(),(()=>{const e=document.querySelector('.c-social-bar div[data-event-name="mbrs-social-save-content"]');e&&e.addEventListener("click",(()=>{xt({name:"save_content",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}))})(),document.querySelectorAll("div.c-sub-menu__right a").forEach((e=>{e.addEventListener("click",(e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),xt({name:"content",type:"action",customProps:{cta_context:"sub_nav",cta_type:"link",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)}))})),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),xt({name:e,type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:"home"===e?window.location.href:r,cta_engagement:1}}),window.location.href=r)};document.querySelectorAll(".c-toolbar a").forEach((t=>{const r=t.nextSibling;if(r instanceof HTMLParagraphElement)switch(r.innerText){case"À la Une":t.addEventListener("click",(t=>{e("home",t)}));break;case"Le Direct":t.addEventListener("click",(t=>{e("live_feed",t)}));break;case"Jeux":t.addEventListener("click",(t=>{e("games",t)}))}}));const t=document.querySelector(".c-toolbar div.dtk-videofeed");t&&t.addEventListener("click",(()=>{xt({name:"video_feed",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:window.location.href,cta_engagement:1}})}))})(),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),xt({name:e,type:"action",customProps:{cta_context:"menu",cta_destination:r,cta_engagement:1,cta_type:"button"}}),window.location.href=r)};document.querySelectorAll("a.c-menu__tiles-items").forEach((t=>{switch(t.innerText){case"Jeux":t.addEventListener("click",(t=>{e("games",t)}));break;case"Horoscope":t.addEventListener("click",(t=>{e("horoscope",t)}))}}))})(),window.vfQ=window.vfQ||[],window.vfQ.push((()=>{window.vf?.$subscribe("vf-tray-trigger","clicked",(()=>{xt({name:"viafoura-bell",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_engagement:1,cta_destination:window.location.href}})}))}))},Ct=(e=>(e.ARTICLE="article",e.LIVE="live",e.STORY="story",e.TAG="tag",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.HOROSCOPE_HOME="horoscopehome",e.HOROSCOPE="horoscope",e.TRAFFIC="traffic",e.WEATHER="weather",e.ELECTIONSHOME="electionshome",e.ELECTIONS="elections",e.GAME="game",e.GAMEHOME="gamehome",e.MOVIES="movies",e.SITEMAP="sitemap",e.NEWS="news",e.JOURNALIST="journalist",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.SPORT="sport",e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.CONTACT="contact",e.DIRECT="direct",e.HOME="home",e.LA21E="la21e",e.MOBILE_APPS="mobileapps",e.MOST_VIEWED="mostviewed",e.PARTNER="partner",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.PROGRAM="program",e.VIDEOS="videos",e.VIDEO="video",e))(Ct||{}),Tt=(e=>(e.POOOL_ACCESS="poool-access",e.POOOL_ENGAGE="poool-engage",e.AUDION="audion",e.GOOGLE_SEARCH="google-search",e.DIGITEKA_VISIBLE_PLAYER="digiteka-visible-player",e.DIGITEKA_VIDEO_FEED="digiteka-video-feed",e.VIAFOURA="viafoura",e.IDALGO="idalgo",e.NONLI="nonli",e.OWNPAGE="ownpage-sdk",e.TABOOLA="taboola-sdk",e))(Tt||{});const At=()=>{const e=document.getElementById("article-list-bottom-container");if(e){const t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(Nt(),t.unobserve(e.target))}))})),r=e.querySelector(".card-item-1");r&&t.observe(r);const n=e.querySelector(".card-item-8");n&&t.observe(n);const i=e.querySelector(".card-item-16");i&&t.observe(i)}};var Dt=()=>{(()=>{const e=document.getElementById("dialog-menu");e&&"mobile"===window.layout&&e.addEventListener("show",(()=>{Nt({name:"menu",chapter1:"menu",chapter2:""})}))})(),(()=>{const e=document.getElementById("dialog-comment");if(e&&"mobile"===window.layout){const{datalayerInfo:t={}}=window;e.addEventListener("show",(()=>{Nt({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:"commentaires"})}))}})(),(()=>{if(window.datalayerInfo?.pageName===Ct.STORY&&window.history){const e=[],t=new IntersectionObserver((t=>{t.forEach((t=>{if(!t.isIntersecting)return;const r=t.target.getAttribute("id");r&&t.intersectionRatio>=0&&(e.includes(r)||(e.push(r),Nt({name:`${window.PianoPageInfo?.name}-${e.length}`})),window.history.pushState({},"",`#${r}`))}))}),{rootMargin:"-70px 0px -25% 0px"});document.querySelectorAll(".u-story-container").forEach((e=>{t.observe(e)}))}})()};const Lt=e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,((e,t)=>r(t))),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach((([e,r])=>{t.setAttribute(`data-${_t(e)}`,r)})),document.body?.appendChild(t)},Ot=(e,t)=>{const r=window.thirdPartiesConfig?.conditional?.find((t=>wt(t.name)===e));if(!r)throw new Error(`Script with name ${e} not found`);(e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,((e,t)=>r(t))),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach((([e,r])=>{t.setAttribute(`data-${_t(e)}`,r)})),document.body?.appendChild(t)})({...r,...t})},Pt=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>window.__tcfapi("addEventListener",2,(e=>(t,r)=>{if(!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus)console.error("Issue with ownpage callback");else{if(e.getCurrentUserStatus().vendors.ownpage?.enabled&&e.getCurrentUserStatus().purposes.cookies.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads.enabled){try{Ot(Tt.OWNPAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=document.querySelector('[src="https://script.ownpage.fr/v1/ownpage.js"]');e?.addEventListener("load",(()=>{window.Ownpage?.trackPage("9932310c1c44463b")}))}window.__tcfapi("removeEventListener",2,null,t.listenerId)}})(e))))},It=()=>{if(/Android/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-android"),document.body.appendChild(e)}else if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-ios"),document.body.appendChild(e)}},qt=e=>(t,r)=>{!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus?console.error("Issue with poool callback"):(e.getCurrentUserStatus().purposes.select_personalized_ads.enabled||"article"!==window.datalayerInfo.pageName||["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo.subType||"")||(e=>{try{Ot(Tt.POOOL_ACCESS)}catch(e){e instanceof Error&&console.error(e.message)}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);const n=window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config("locale","fr",!0).config({cookies_enabled:e.getCurrentUserStatus().purposes.select_personalized_ads.enabled,debug:!0,context:"cookie-wall",default_widget:"gift",app_name:"Poool"}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0);n.on("consent",(()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3),localStorage.setItem("consent_validity_date",e.toISOString().split("T")[0]),window.Didomi.setUserAgreeToAll()}));let i=!1;const o=document.querySelector("#cookie-banner");window.didomiEventListeners.push({event:"notice.hidden",listener(){window.didomiOnReady.push((e=>{i||(i=!0,n.config("cookies_enabled",e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled),o&&o.setAttribute("style","position: fixed; z-index: 1; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))}))}}),window.didomiOnReady.push((e=>{const t=e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled;t&&(n.config("cookies_enabled",!0),o&&o.setAttribute("style","position: fixed; z-index: 1; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))})),o&&o.setAttribute("style","position: fixed; z-index: 1; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"})}))})(e),(()=>{try{Ot(Tt.POOOL_ENGAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=bt("20mnUserInfo");It();const t=document.querySelector('[src="https://assets.poool.fr/engage.min.js"]');t?.addEventListener("load",(()=>{const t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init("C7B0O-ENPDW-DIJOO-VJO1M").autoCreate({filters:["{}"!==e?"connected":"disconnected"]})}))})(),window.__tcfapi("removeEventListener",2,null,t.listenerId))},Mt=()=>{document.querySelectorAll(".taboola").length>0&&(()=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{if(!t||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus)console.error("Issue with taboola callback");else{window._taboola=window._taboola||[],"article"===window.datalayerInfo.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"});try{Ot(Tt.TABOOLA,{dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}})}catch(e){e instanceof Error&&console.error(e.message)}document.querySelectorAll(".taboola").forEach((e=>{const t=e.getAttribute("data-mode"),r=e.getAttribute("id"),n=e.getAttribute("data-placement"),i=e.getAttribute("data-target-type");t&&r&&n&&i?window._taboola.push({mode:t,container:r,placement:n,target_type:i}):console.log("Issue with taboola placement")})),window._taboola.push({flush:!0}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)}};window.didomiOnReady.push((()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)}))})()};var Ft=()=>{(()=>{const e=document.querySelector(".js-close-article-btn");e&&window?.location&&window?.envVariables?.pageEndpoint&&e.addEventListener("click",(()=>{xt({name:"close_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:"home",cta_engagement:1}}),window.location.replace(window.envVariables.pageEndpoint)}))})()};const Rt=async({url:e,options:t})=>{const r=t||{};r.headers=r.headers||new Headers,r.headers.append("Content-Type","application/json");const n=await fetch(e,r).then((e=>{if(e.ok)return e;throw new Error(`Fetch error: ${e.statusText}`)})).then((e=>e.json()));return Object.keys(n).includes("data")?n.data:n};var Bt=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(Bt||{}),zt=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(zt||{});const jt={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"}},theme:{conso:{value:"#ff8689"},default:{value:"#4742ff"},entertainment:{value:"#9d61ff"},hightech:{value:"#8f98a9"},media:{value:"#4742ff"},"partenaires-externes":{value:"#4742ff"},partner:{value:"#fd8000"},planet:{value:"#00b482"},production:{value:"#c5be00"},publicommunique:{value:"#c5be00"},publishing:{value:"#c5be00"},sport:{value:"#6398ab"},tempo:{value:"#ecb200"},"vie-pro":{value:"#b49b56"},infolocale:{value:"#4742ff"}}},Ht={base:{value:"Arial"},obviously:{value:"'Obviously', sans-serif"},"source-serif-pro":{value:"'Source Serif Pro', serif"}};Object.keys(jt.primary),Object.keys(jt.secondary),Object.keys(jt.greyscale),Object.keys(jt.status),Object.keys(jt.theme);const Vt={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},Ut={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"]},Kt={radius:["border-radius"]},$t={p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},Gt={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],...$t},Wt={...Gt,borderColor:["border-color"],bg:["background-color"],color:["color"],...Kt},Zt={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]};Object.keys(Ht).filter((e=>!["base"].includes(e)));const Qt=Object.keys(jt.theme);function Jt(t){return e.forwardRef(t)}const Yt=(e,t="fr-FR")=>Intl.NumberFormat(t).format(e);function Xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er,tr={exports:{}};
|
|
9
|
+
*/function Fe(e,t,r){const n=document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n}function Re(e,t,r){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof r?`${r}px`:r}const Be="idle",ze="loading",je="loaded",He="error";function Ve(e,t,r=document){let n=[];if(e instanceof Element)n=[e];else if(e instanceof NodeList||Array.isArray(e))n=Array.from(e);else{const i="string"==typeof e?e:t;i&&(n=Array.from(r.querySelectorAll(i)))}return n}function Ue(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Ke{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class $e{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,r=100){var n,i,o;this._filters[e]||(this._filters[e]=[]),null===(n=this._filters[e])||void 0===n||n.push({fn:t,priority:r}),null===(i=this._filters[e])||void 0===i||i.sort(((e,t)=>e.priority-t.priority)),null===(o=this.pswp)||void 0===o||o.addFilter(e,t,r)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter((e=>e.fn!==t))),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var r;return null===(r=this._filters[e])||void 0===r||r.forEach((e=>{t[0]=e.fn.apply(this,t)})),t[0]}on(e,t){var r,n;this._listeners[e]||(this._listeners[e]=[]),null===(r=this._listeners[e])||void 0===r||r.push(t),null===(n=this.pswp)||void 0===n||n.on(e,t)}off(e,t){var r;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((e=>t!==e))),null===(r=this.pswp)||void 0===r||r.off(e,t)}dispatch(e,t){var r;if(this.pswp)return this.pswp.dispatch(e,t);const n=new Ke(e,t);return null===(r=this._listeners[e])||void 0===r||r.forEach((e=>{e.call(this,n)})),n}}class Ge{constructor(e,t){if(this.element=Fe("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Re(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,r){let n=`translate3d(${e}px,0px,0)`;return void 0!==r&&(n+=` scale3d(${r},${r},1)`),n}(0,0,e/250)):Re(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}}class We{constructor(e,t,r){this.instance=t,this.data=e,this.index=r,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=Be,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(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Ge(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=Fe("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=Fe("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,r;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(t=this.data.src)&&void 0!==t?t:"",n.alt=null!==(r=this.data.alt)&&void 0!==r?r:"",this.state=ze,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=je,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===je||this.state===He)&&this.removePlaceholder())}onError(){this.state=He,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===ze,this)}isError(){return this.state===He}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Re(this.element,e,t),this.isImageContent()&&!this.isError()))){const r=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,r?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==He,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}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 e,t;let r=Fe("pswp__error-msg","div");r.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",r=this.instance.applyFilters("contentErrorElement",r,this),this.element=Fe("pswp__content pswp__error-msg-container","div"),this.element.appendChild(r),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===He)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||Ue())?(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&&!Ue()?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===je||this.state===He)&&this.removePlaceholder()))}}function Ze(e,t,r,n,i){let o=0;if(t.paddingFn)o=t.paddingFn(r,n,i)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}class Qe{constructor(e,t,r,n){this.pswp=n,this.options=e,this.itemData=t,this.index=r,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(e,t,r){const n={x:e,y:t};this.elementSize=n,this.panAreaSize=r;const i=r.x/n.x,o=r.y/n.y;this.fit=Math.min(1,i<o?i:o),this.fill=Math.min(1,i>o?i:o),this.vFill=Math.min(1,o),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(e){const t=e+"ZoomLevel",r=this.options[t];if(r)return"function"==typeof r?r(this):"fill"===r?this.fill:"fit"===r?this.fit:Number(r)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function Je(e,t,r){const n=t.createContentFromData(e,r);let i;const{options:o}=t;if(o){let a;i=new Qe(o,e,-1),a=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const r=e.getViewportSizeFn(e,t);if(r)return r}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,t);const s=function(e,t,r,n){return{x:t.x-Ze("left",e,t,r,n)-Ze("right",e,t,r,n),y:t.y-Ze("top",e,t,r,n)-Ze("bottom",e,t,r,n)}}(o,a,e,r);i.update(n.width,n.height,s)}return n.lazyLoad(),i&&n.setDisplayedSize(Math.ceil(n.width*i.initial),Math.ceil(n.height*i.initial)),n}class Ye extends $e{getNumItems(){var e;let t=0;const r=null===(e=this.options)||void 0===e?void 0:e.dataSource;r&&"length"in r?t=r.length:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(t=r.items.length));const n=this.dispatch("numItems",{dataSource:r,numItems:t});return this.applyFilters("numItems",n.numItems,r)}createContentFromData(e,t){return new We(e,this,t)}getItemData(e){var t;const r=null===(t=this.options)||void 0===t?void 0:t.dataSource;let n={};Array.isArray(r)?n=r[e]:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),n=r.items[e]);let i=n;i instanceof Element&&(i=this._domElementToItemData(i));const o=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var t,r;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(r=this.options)&&void 0!==r&&r.childSelector?Ve(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},r="A"===e.tagName?e:e.querySelector("a");if(r){t.src=r.dataset.pswpSrc||r.href,r.dataset.pswpSrcset&&(t.srcset=r.dataset.pswpSrcset),t.width=r.dataset.pswpWidth?parseInt(r.dataset.pswpWidth,10):0,t.height=r.dataset.pswpHeight?parseInt(r.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,r.dataset.pswpType&&(t.type=r.dataset.pswpType);const i=e.querySelector("img");var n;if(i)t.msrc=i.currentSrc||i.src,t.alt=null!==(n=i.getAttribute("alt"))&&void 0!==n?n:"";(r.dataset.pswpCropped||r.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,r)}lazyLoadData(e,t){return Je(e,this,t)}}class Xe extends Ye{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Ve(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(e){if("button"in(t=e)&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||window.pswp)return;var t;let r={x:e.clientX,y:e.clientY};!r.x&&!r.y&&(r=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);const i={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,i,r))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,r=Ve(this.options.children,this.options.childSelector,e.currentTarget).findIndex((e=>e===t||e.contains(t)));return-1!==r?r:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,r){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Ve(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=r,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:r}=this;t&&(r.dataSource=t);const n=[],i=typeof r.pswpModule;if("function"==typeof(o=r.pswpModule)&&o.prototype&&o.prototype.goTo)n.push(Promise.resolve(r.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");n.push(r.pswpModule())}var o;"function"==typeof r.openPromise&&n.push(r.openPromise()),!1!==r.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const r=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:r}).defaultPrevented)return Je(r,t,e)}(e,this));const a=++this._uid;Promise.all(n).then((e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,a)}}))}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const r="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=r,window.pswp=r,Object.keys(this._listeners).forEach((e=>{var t;null===(t=this._listeners[e])||void 0===t||t.forEach((t=>{r.on(e,t)}))})),Object.keys(this._filters).forEach((e=>{var t;null===(t=this._filters[e])||void 0===t||t.forEach((t=>{r.addFilter(e,t.fn,t.priority)}))})),this._preloadedContent&&(r.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),r.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),r.init()}destroy(){var e;null===(e=this.pswp)||void 0===e||e.destroy(),this.shouldOpen=!1,this._listeners={},Ve(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)}))}}const et=()=>{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 i=r.scrollTop;e&&(n=e.scrollHeight-r.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const o=Math.round(i/n*100);t.style.width=`${o}%`,o>=100&&(t.style.width="100%")},tt="#page-content",rt="#text-tooltip",nt="c-text-tooltip--show",it=["#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"],ot=(e,t)=>e instanceof Element&&t.some((t=>e.matches(t))),at=()=>{const e=document.querySelector(`${rt}`);e&&e.classList.remove(nt)},st=({type:e})=>{const t=window.getSelection();if("selectionchange"===e)return void at();if(!t||!t.rangeCount)return;const r=t.getRangeAt(0),n=t.toString().trim();if(n.length){const e=((e,t)=>{const r=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentElement,n=e.endContainer.nodeType===Node.ELEMENT_NODE?e.endContainer:e.endContainer.parentElement;return!!r&&ot(r,t)||!!n&&ot(n,t)})(r,it),i=(e=>{var t;if(!e.focusNode)return null;const r=null==(t=e.anchorNode)?void 0:t.compareDocumentPosition(e.focusNode);return r?(4&r)>0:e.anchorOffset<e.focusOffset})(t)||!1;e&&((e,t,r)=>{const n=document.querySelector(`${tt} ${rt}`),i=document.querySelector(`${tt}`),o=document.querySelectorAll(`${tt} ${rt} .tooltip-btn`);if(!n||!i)return void console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");Array.from(o).forEach((e=>e.setAttribute("data-selected-text",r)));const a=e.getClientRects(),s=a[t?a.length-1:0];n.style.top=s.top-i.getBoundingClientRect().top-(n.offsetHeight+10)+"px",s.width<n.offsetWidth?n.style.left=s.left-i.getBoundingClientRect().left+s.width/2-n.offsetWidth/2+"px":n.style.left=t?s.left-i.getBoundingClientRect().left+s.width-n.offsetWidth+"px":s.left-i.getBoundingClientRect().left+"px",n.classList.add(nt)})(r,i,n)}else at()},lt=(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)}))},ct=e=>"ArrowLeft"===e.code||39===e.keyCode,ut=e=>"ArrowRight"===e.code||37===e.keyCode,dt=(e=document.querySelectorAll(".js-tabs"))=>{e.length>0&&e.forEach((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"]'),i=e.querySelectorAll('[role="tabpanel"]'),o=r.getAttribute("aria-controls"),a=Object.values(i).find((e=>e.id===o));n.forEach((e=>{e.setAttribute("aria-selected","false")})),i.forEach((e=>{e.setAttribute("aria-hidden","true")})),r.setAttribute("aria-selected","true"),a&&a.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&&(ct(r)||ut(r))&&(t[e].setAttribute("tabindex","-1"),ct(r)?(e+=1,e>=t.length&&(e=0)):ut(r)&&(e-=1,e<0&&(e=t.length-1)),t[e].setAttribute("tabindex","0"),t[e].focus())}))}}))},pt="c-social-bar-item__container--is-highlighted",ft=()=>{const e=document.querySelector(".c-toolbar");if(e){const t=window.location.origin+window.location.pathname,r=Array.from(e.querySelectorAll(".c-social-bar-item__container"));(e=>{const t=e.find((e=>e.classList.contains(pt)));null==t||t.classList.remove(pt)})(r);const n=r.find((e=>{var r;return(null==(r=e.querySelector("a"))?void 0:r.getAttribute("href"))===t}));null==n||n.classList.add(pt)}},ht=()=>{((e=document.querySelector(".js-expand-button"))=>{e&&document.querySelectorAll(".js-expand-button").forEach((e=>e.addEventListener("click",d)))})(),dt(),s(),((e=document.querySelector(".js-ellipsis-button"))=>{e&&document.querySelectorAll(".js-ellipsis-button").forEach((e=>{const t="true"===e.getAttribute("data-multiple");e.addEventListener("click",(e=>u(e,t)))}))})(),document.querySelector(".c-progress")&&window.addEventListener("scroll",et),(()=>{let e=null;e=new Xe({gallery:"#photoswipe-gallery",children:"a",pswpModule:Me,zoom:!1,imageClickAction:"next",tapAction:"next"}),e.on("uiRegister",(()=>{var t,r;null==(r=null==(t=null==e?void 0:e.pswp)?void 0:t.ui)||r.registerElement({name:"custom-caption",appendTo:"root",onInit:t=>{var r;null==(r=null==e?void 0:e.pswp)||r.on("change",(()=>{var r,n;const i=null==(n=null==(r=null==e?void 0:e.pswp)?void 0:r.currSlide)?void 0:n.data.element;if(i){const e=i.querySelector(".caption-content");t.innerHTML=(null==e?void 0:e.innerHTML)||""}}))}})})),e.init()})(),document.querySelectorAll(".js-modal").forEach((e=>{if(!(e instanceof HTMLElement))return;const t=new k(e);if("dialog-menu"===e.id){const e=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),r=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");e.length>0&&r.length>0&&(t.on("show",(()=>{e.forEach((e=>e.classList.add("u-hidden"))),r.forEach((e=>e.classList.remove("u-hidden")))})),t.on("hide",(()=>{e.forEach((e=>e.classList.remove("u-hidden"))),r.forEach((e=>e.classList.add("u-hidden")))})))}t.on("show",(()=>{document.body.classList.add("noscroll")})).on("hide",(()=>{document.body.classList.remove("noscroll")}))})),lt(),((e,t)=>{const r=document.querySelector(`#${t}`);if(r){const t=r.querySelector(".js-countdown-days"),n=r.querySelector(".js-countdown-hours"),i=r.querySelector(".js-countdown-minutes"),o=r.querySelector(".js-countdown-seconds");if(!(t&&n&&i&&o))return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const a=window.counters[e],s=new Date(a).getTime(),l=setInterval((()=>{const e=(new Date).getTime(),r=s-e;if(r<=0)clearInterval(l);else{const e=Math.floor(r/864e5),a=Math.floor(r%864e5/36e5),s=Math.floor(r%36e5/6e4),l=Math.floor(r%6e4/1e3);t.innerHTML=e.toString(),n.innerHTML=a.toString(),i.innerHTML=s.toString(),o.innerHTML=l.toString()}}),1e3)}})("paralympicsGames","countdown-paralympics-games"),null!=window&&window.getSelection?(document.addEventListener("mouseup",st),document.addEventListener("selectionchange",st),document.addEventListener("touchend",st),document.addEventListener("touchcancel",st)):console.warn("Selection API isn't supported"),(()=>{const e=document.querySelector("header"),t=document.querySelector(".js-limit-scroll-close-article-btn"),r=document.querySelector(".js-close-article-btn"),n=document.querySelector(".c-header-mobile"),i=n instanceof HTMLElement?n.offsetHeight:0;if(e&&t&&r){const n=new IntersectionObserver((()=>{const n=r.classList,o=n.contains("u-hidden"),a=e.getBoundingClientRect().bottom-i,s=t.getBoundingClientRect().bottom-i;o&&a<=0&&s>=0&&n.remove("u-hidden"),!o&&(a>=0||s<=0)&&n.add("u-hidden")}),{root:document,rootMargin:`-${i}px 0px 0px 0px`});n.observe(e),n.observe(t)}})(),(()=>{const e=document.querySelectorAll(".js-half-donut-result");for(const t of Array.from(e)){const e=t.querySelector(".c-half-donut"),r=t.querySelector(".c-legend");if(!e||!r)return;r.querySelectorAll("[data-color]").forEach((t=>{const n=t.getAttribute("data-color"),i=e.querySelector(`.c-half-donut__zone--${n}`);null==i||i.addEventListener("mouseenter",(()=>{t.classList.add("c-legend__item--is-hovered"),e.classList.add("c-half-donut--is-hovered"),r.classList.add("c-legend--is-hovered")})),null==i||i.addEventListener("mouseleave",(()=>{t.classList.remove("c-legend__item--is-hovered"),e.classList.remove("c-half-donut--is-hovered"),r.classList.remove("c-legend--is-hovered")})),t.addEventListener("mouseenter",(()=>{null==i||i.classList.add("c-half-donut__zone--is-hovered"),r.classList.add("c-legend--is-hovered"),e.classList.add("c-half-donut--is-hovered")})),t.addEventListener("mouseleave",(()=>{null==i||i.classList.remove("c-half-donut__zone--is-hovered"),r.classList.remove("c-legend--is-hovered"),e.classList.remove("c-half-donut--is-hovered")}))}))}})(),c(),(()=>{const e=document.querySelector("form#actual-search-form");e instanceof HTMLFormElement&&e.addEventListener("submit",i)})(),a("jobs-input","https://www.groupeactual.eu/autocomplete/profession-simple?code&prefix&limit=75","&term=","id","title","items"),a("localisation-input","https://www.20minutes.fr/elections/resultats/recherche","?searchValue=","text","text"),l(),ft(),(()=>{const e=document.querySelector("#js-election-selector");e&&e.addEventListener("change",(e=>{window.location.replace(e.target.value)}))})(),(()=>{const e=document.querySelector(".c-search-banner");if(e){const t=document.querySelector("#js-search-banner-to-hide"),r=e.querySelector("#js-search-banner-dropdown-btn");null==r||r.addEventListener("click",(()=>{const e=r.querySelector("svg"),n=null==e?void 0:e.querySelector("use");switch(null==n?void 0:n.getAttribute("xlink:href")){case"#chevron-up":null==n||n.setAttribute("xlink:href","#chevron-down"),null==t||t.classList.add("u-hidden");break;case"#chevron-down":null==n||n.setAttribute("xlink:href","#chevron-up"),null==t||t.classList.remove("u-hidden")}}))}})(),(()=>{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,i=n?parseInt(n,10):3e3,o=t.closest(".js-overview-bar-container"),a=null==o?void 0:o.querySelector(".c-stepper"),s=null==a?void 0:a.querySelectorAll(".c-stepper__item");if(t){const n=t.querySelector(".js-navigation-container__list"),o=t.querySelector(".o-nav-button--next-button"),l=t.querySelector(".o-nav-button--previous-button");if(n&&n.clientWidth<n.scrollWidth&&(null==o||o.classList.add("o-nav-button--visible")),n&&o&&l&&(null==o||o.addEventListener("click",T.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e})),null==l||l.addEventListener("click",A.bind(!1,{navigatedList:n,nextBtn:o,prevBtn:l,sliderVariant:e,delay:i}))),"true"===r&&o){const e=a?a.querySelector(".c-stepper__item--loading"):null;s&&(s.forEach((e=>{const t=e.querySelector(".c-stepper__loader");t&&t instanceof HTMLElement&&(t.style.transition=`width ${i/1e3}s linear`)})),e||s[0].classList.add("c-stepper__item--loading")),setInterval((()=>{o.classList.contains("o-nav-button--visible")?o.click():n&&l&&(n.scrollLeft=0,s&&(s.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 ${i/1e3}s linear`)}),0)})),setTimeout((()=>{s[0].classList.add("c-stepper__item--loading")}),0)),l.click())}),i)}}}})(),(()=>{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",D.bind(!1,{navigatedList:e,nextBtn:r,prevBtn:n}))}})(),(()=>{const e=document.querySelector(".js-game-alert");p&&e&&e.classList.remove("u-hidden")})()};function mt(){if(this?.id)try{const e=document.getElementById(this.id);if(e){const t=e.getAttribute("value");if(t){const e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}}}catch(e){console.error("Oops, unable to copy",e)}}const gt=e=>{const t=e.currentTarget;if(e.preventDefault(),t instanceof HTMLButtonElement){const e=t.parentNode?.querySelectorAll(".js-toggle-target");"true"===t.getAttribute("aria-expanded")?((e,t)=>{t?.forEach((e=>e.setAttribute("aria-hidden","true"))),e.setAttribute("aria-expanded","false"),e.innerHTML="Voir tous les résultats"})(t,e):((e,t)=>{e.setAttribute("aria-expanded","true"),e.innerHTML="Masquer tous les résultats",t?.forEach((e=>e.setAttribute("aria-hidden","false")))})(t,e)}};var vt=()=>{(()=>{const e=document.getElementById("goto-distribution"),t=document.getElementById("goto-european-map"),r=document.getElementById("goto-map"),n=document.getElementById("goto-statistics"),i=document.getElementById("goto-results");e&&e.addEventListener("click",mt),t&&t.addEventListener("click",mt),r&&r.addEventListener("click",mt),n&&n.addEventListener("click",mt),i&&i.addEventListener("click",mt)})(),((e=document.querySelector(".js-toggle-button"))=>{e&&document.querySelectorAll(".js-toggle-button").forEach((e=>e.addEventListener("click",gt)))})(),(()=>{const e=document.getElementById("elections-form-container"),t=document.querySelector(".c-header-mini"),r=document.querySelector('body[data-layout="mobile"]');e&&t&&new MutationObserver((t=>{const r=t[0],n=r.target;n instanceof HTMLElement&&"attributes"===r.type&&"class"===r.attributeName&&(n.className.includes("c-header-mini--is-hidden")?(e.classList.remove("u-sticky"),e.classList.remove("u-sticky--under-header-mini")):(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header-mini")))})).observe(t,{attributes:!0});r&&e&&(e.classList.add("u-sticky"),e.classList.add("u-sticky--under-header"))})()};const bt=e=>{const t=document.cookie.split(";").filter((t=>-1!==t.indexOf(e)))[0];return t?t.split("=")[1]:"{}"},yt=function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):void 0},_t=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),wt=(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,"").replace(/-*$/g,"")},Et=(e,t=75)=>e.length>75?`${e.substring(0,t)}…`:e,St=e=>{const t=Math.floor(e/60),r=e%60;return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`},xt=e=>{const t={click:wt(e.name),click_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,click_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,click_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3},r=`click.${e?.type??"navigation"}`;window.pa?(e.customProps&&Object.keys(e.customProps).length>0&&window.pa.setProperties(e.customProps,{persistent:!1,events:[r]}),window.pa.sendEvent(r,t)):window._paq&&(e.customProps&&Object.keys(e.customProps).length>0&&window._paq.push(["setProperties",e.customProps,{persistent:!1,events:[r]}]),window._paq.push(["sendEvent",r,t]))},Nt=e=>{window._paq&&window._paq.push(["sendEvent","page.display",{page:e?.name??window.PianoPageInfo?.name,page_chapter1:e?.chapter1??window.PianoPageInfo?.chapter1,page_chapter2:e?.chapter2??window.PianoPageInfo?.chapter2,page_chapter3:e?.chapter3??window.PianoPageInfo?.chapter3,page_chapter4:e?.chapter4??window.PianoPageInfo?.chapter4}])};var kt=()=>{(()=>{const e=document.querySelector('.c-header a[href="https://qlic.it/1517191"]');e&&e.addEventListener("click",(()=>{xt({name:"advent-calendar",type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:"https://campagne.20minutes.fr/20/65DD90D9-08AB-4B19-9D2F-394E44E1FC39/s223/v1.cfm?id=65DD90D9-08AB-4B19-9D2F-394E44E1FC39",cta_engagement:2}})}));const t=document.querySelector('.c-menu a[href="https://qlic.it/1517191"]');t&&t.addEventListener("click",(()=>{xt({name:"advent-calendar",type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:"https://campagne.20minutes.fr/20/65DD90D9-08AB-4B19-9D2F-394E44E1FC39/s223/v1.cfm?id=65DD90D9-08AB-4B19-9D2F-394E44E1FC39",cta_engagement:2}})}))})(),"guide-achat"===window.datalayerInfo?.subType&&document.querySelectorAll(".c-content a.c-btn").forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault(),xt({name:"affiliation",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)}))})),(()=>{let e=document.querySelector("div.c-card-large a");"mobile"===window.layout&&(e=document.querySelector("div.c-card-extra-large a")),e&&e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault();let t="";e.target instanceof HTMLAnchorElement?t=e.target.href:e.target instanceof HTMLElement&&(t=e.target.closest("a")?.href||""),xt({name:"headline_content",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:t,cta_engagement:1}}),window.location.href=t}))})(),[{name:"games",id:"#entertainment-item-game"},{name:"horoscope",id:"#entertainment-item-horoscope"}].forEach((e=>{const t=document.querySelector(e.id);t&&t instanceof HTMLAnchorElement&&t.addEventListener("click",(r=>{r.stopPropagation(),r.preventDefault(),xt({name:e.name,type:"action",customProps:{cta_context:"widget_entertainment",cta_type:"link_with_icon",cta_destination:t.href,cta_engagement:2}}),window.location.href=t.href}))})),(()=>{const e=(e,t,r)=>{let n="";r.target instanceof HTMLAnchorElement?n=r.target.href:r.target instanceof HTMLElement&&(n=r.target.closest("a")?.href||""),n&&(r.stopPropagation(),r.preventDefault(),xt({name:t,type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:n,cta_engagement:1}}),"_blank"===e.target?window.open(n,"_blank")?.focus():window.location.href=n)};document.querySelectorAll(".c-header__container a.c-media-link").forEach((t=>{switch(t.title){case"Consulter la page 20 Minutes TV":t.addEventListener("click",(r=>{e(t,"20mn_tv",r)}));break;case"Consulter la page Vidéos 20 Minutes":t.addEventListener("click",(r=>{e(t,"videos",r)}));break;case"Consulter la page Podcasts 20 Minutes":t.addEventListener("click",(r=>{e(t,"podcasts",r)}));break;case"Consulter la page Diaporama 20 Minutes":t.addEventListener("click",(r=>{e(t,"images",r)}))}}))})(),document.querySelectorAll('button[data-a11y-dialog-show="dialog-menu"]').forEach((e=>{e.addEventListener("click",(()=>{xt({name:"menu",type:"action",customProps:{cta_context:"header",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}})}))})),document.querySelectorAll(".c-overview-bar__article a").forEach((e=>{e.addEventListener("click",(e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),xt({name:"summary_banner",type:"action",customProps:{cta_context:"home",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)}))})),(()=>{const e=document.getElementById("footer-recrutement-link");e&&e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault(),xt({name:"recrutement",type:"action"}),e.target instanceof HTMLAnchorElement&&(window.location.href=e.target.href)}))})(),(()=>{const e=document.querySelector('.c-social-bar a[href="#mbrs-comments-container"]');e&&e.addEventListener("click",(()=>{xt({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}));const t=document.querySelector('.c-social-bar div[data-a11y-dialog-show="dialog-comment"]');t&&t.addEventListener("click",(()=>{xt({name:"content_comments",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}))})(),(()=>{const e=document.querySelector(".c-social-bar div.mbrs-social-report-container");e&&e.addEventListener("click",(()=>{xt({name:"content_correction",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}))})(),(()=>{const e=document.querySelector('.c-social-bar div[data-event-name="mbrs-social-save-content"]');e&&e.addEventListener("click",(()=>{xt({name:"save_content",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_engagement:3}})}))})(),document.querySelectorAll("div.c-sub-menu__right a").forEach((e=>{e.addEventListener("click",(e=>{e.target instanceof HTMLAnchorElement&&(e.stopPropagation(),e.preventDefault(),xt({name:"content",type:"action",customProps:{cta_context:"sub_nav",cta_type:"card",cta_destination:e.target.href,cta_engagement:1}}),window.location.href=e.target.href)}))})),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),xt({name:e,type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:"home"===e?window.location.href:r,cta_engagement:1}}),window.location.href=r)};document.querySelectorAll(".c-toolbar a").forEach((t=>{const r=t.nextSibling;if(r instanceof HTMLParagraphElement)switch(r.innerText){case"À la Une":t.addEventListener("click",(t=>{e("home",t)}));break;case"Le Direct":t.addEventListener("click",(t=>{e("live_feed",t)}));break;case"Jeux":t.addEventListener("click",(t=>{e("games",t)}))}}));const t=document.querySelector(".c-toolbar div.dtk-videofeed");t&&t.addEventListener("click",(()=>{xt({name:"video_feed",type:"action",customProps:{cta_context:"toolbar",cta_type:"icon",cta_destination:window.location.href,cta_engagement:1}})}))})(),(()=>{const e=(e,t)=>{let r="";t.target instanceof HTMLAnchorElement?r=t.target.href:t.target instanceof HTMLElement&&t.target.closest("a")instanceof HTMLAnchorElement&&(r=t.target.closest("a")?.href||""),r&&(t.stopPropagation(),t.preventDefault(),xt({name:e,type:"action",customProps:{cta_context:"menu",cta_destination:r,cta_engagement:1,cta_type:"button"}}),window.location.href=r)};document.querySelectorAll("a.c-menu__tiles-items").forEach((t=>{switch(t.innerText){case"Jeux":t.addEventListener("click",(t=>{e("games",t)}));break;case"Horoscope":t.addEventListener("click",(t=>{e("horoscope",t)}))}}))})(),window.vfQ=window.vfQ||[],window.vfQ.push((()=>{window.vf?.$subscribe("vf-tray-trigger","clicked",(()=>{xt({name:"viafoura-bell",type:"action",customProps:{cta_context:"header",cta_type:"icon",cta_engagement:1,cta_destination:window.location.href}})}))}))},Ct=(e=>(e.ARTICLE="article",e.LIVE="live",e.STORY="story",e.TAG="tag",e.JOB_DETAILS="jobdetails",e.JOBS="jobs",e.HOROSCOPE_HOME="horoscopehome",e.HOROSCOPE="horoscope",e.TRAFFIC="traffic",e.WEATHER="weather",e.ELECTIONSHOME="electionshome",e.ELECTIONS="elections",e.GAME="game",e.GAMEHOME="gamehome",e.MOVIES="movies",e.SITEMAP="sitemap",e.NEWS="news",e.JOURNALIST="journalist",e.LEGAL="legal",e.LEGALNOTICE="legalnotice",e.LEGALNOTICEHOME="legalnoticehome",e.LEGALNOTICEDEPARTMENT="legalnoticedepartment",e.SPORT="sport",e.ARCHIVE_BY_DAY="archivebyday",e.ARCHIVE_BY_YEAR="archivebyyear",e.CONTACT="contact",e.DIRECT="direct",e.HOME="home",e.LA21E="la21e",e.MOBILE_APPS="mobileapps",e.MOST_VIEWED="mostviewed",e.PARTNER="partner",e.SEARCH="search",e.SECTION="section",e.SERVICE="service",e.PROGRAM="program",e.VIDEOS="videos",e.VIDEO="video",e))(Ct||{}),Tt=(e=>(e.POOOL_ACCESS="poool-access",e.POOOL_ENGAGE="poool-engage",e.AUDION="audion",e.GOOGLE_SEARCH="google-search",e.DIGITEKA_VISIBLE_PLAYER="digiteka-visible-player",e.DIGITEKA_VIDEO_FEED="digiteka-video-feed",e.VIAFOURA="viafoura",e.IDALGO="idalgo",e.NONLI="nonli",e.OWNPAGE="ownpage-sdk",e.TABOOLA="taboola-sdk",e))(Tt||{});const At=()=>{const e=document.getElementById("article-list-bottom-container");if(e){const t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(Nt(),t.unobserve(e.target))}))})),r=e.querySelector(".card-item-1");r&&t.observe(r);const n=e.querySelector(".card-item-8");n&&t.observe(n);const i=e.querySelector(".card-item-16");i&&t.observe(i)}};var Dt=()=>{(()=>{const e=document.getElementById("dialog-menu");e&&"mobile"===window.layout&&e.addEventListener("show",(()=>{Nt({name:"menu",chapter1:"menu",chapter2:""})}))})(),(()=>{const e=document.getElementById("dialog-comment");if(e&&"mobile"===window.layout){const{datalayerInfo:t={}}=window;e.addEventListener("show",(()=>{Nt({name:`${t?.contentId}_${t?.contentTitle}`,chapter1:"commentaires"})}))}})(),(()=>{if(window.datalayerInfo?.pageName===Ct.STORY&&window.history){const e=[],t=new IntersectionObserver((t=>{t.forEach((t=>{if(!t.isIntersecting)return;const r=t.target.getAttribute("id");r&&t.intersectionRatio>=0&&(e.includes(r)||(e.push(r),Nt({name:`${window.PianoPageInfo?.name}-${e.length}`})),window.history.pushState({},"",`#${r}`))}))}),{rootMargin:"-70px 0px -25% 0px"});document.querySelectorAll(".u-story-container").forEach((e=>{t.observe(e)}))}})()};const Lt=e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,((e,t)=>r(t))),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach((([e,r])=>{t.setAttribute(`data-${_t(e)}`,r)})),document.body?.appendChild(t)},Ot=(e,t)=>{const r=window.thirdPartiesConfig?.conditional?.find((t=>wt(t.name)===e));if(!r)throw new Error(`Script with name ${e} not found`);(e=>{const t=document.createElement("script");if(t.type="text/javascript","async"===e.load?t.async=!0:"defer"===e.load&&(t.defer=!0),"src"in e&&e.src){const r=eval;t.src=e.src?.replace(/%(.*?)%/,((e,t)=>r(t))),e.name&&(performance.mark(`20mn:${e.name}:Start`),t.onload=()=>{performance.mark(`20mn:${e.name}:End`)})}"text"in e&&e.text&&(t.innerHTML=e.text),e.name&&performance.mark(`20mn:${e.name}:Enable`),e.id&&(t.id=e.id),e.dataAttributes&&Object.entries(e.dataAttributes).forEach((([e,r])=>{t.setAttribute(`data-${_t(e)}`,r)})),document.body?.appendChild(t)})({...r,...t})},Pt=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>window.__tcfapi("addEventListener",2,(e=>(t,r)=>{if(!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus)console.error("Issue with ownpage callback");else{if(e.getCurrentUserStatus().vendors.ownpage?.enabled&&e.getCurrentUserStatus().purposes.cookies.enabled&&e.getCurrentUserStatus().purposes.select_personalized_ads.enabled){try{Ot(Tt.OWNPAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=document.querySelector('[src="https://script.ownpage.fr/v1/ownpage.js"]');e?.addEventListener("load",(()=>{window.Ownpage?.trackPage("9932310c1c44463b")}))}window.__tcfapi("removeEventListener",2,null,t.listenerId)}})(e))))},It=()=>{if(/Android/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-android"),document.body.appendChild(e)}else if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){const e=document.createElement("div");e.setAttribute("id","bandeau-app-ios"),document.body.appendChild(e)}},qt=e=>(t,r)=>{!r||"tcloaded"!==t.eventStatus&&"useractioncomplete"!==t.eventStatus?console.error("Issue with poool callback"):(e.getCurrentUserStatus().purposes.select_personalized_ads.enabled||"article"!==window.datalayerInfo.pageName||["production","publicommunique","magazine","guide-achat"].includes(window.datalayerInfo.subType||"")||(e=>{try{Ot(Tt.POOOL_ACCESS)}catch(e){e instanceof Error&&console.error(e.message)}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);const n=window.Access.init("C7B0O-ENPDW-DIJOO-VJO1M").config("locale","fr",!0).config({cookies_enabled:e.getCurrentUserStatus().purposes.select_personalized_ads.enabled,debug:!0,context:"cookie-wall",default_widget:"gift",app_name:"Poool"}).config("ati_auto_tracking_enabled",!0).config("ati_tracking_method","events").config("auto_tracking_spec_v2",!0);n.on("consent",(()=>{let e=new Date;const t=e.getTimezoneOffset();e=new Date(e.getTime()-60*t*1e3),localStorage.setItem("consent_validity_date",e.toISOString().split("T")[0]),window.Didomi.setUserAgreeToAll()}));let i=!1;const o=document.querySelector("#cookie-banner");window.didomiEventListeners.push({event:"notice.hidden",listener(){window.didomiOnReady.push((e=>{i||(i=!0,n.config("cookies_enabled",e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled),o&&o.setAttribute("style","position: fixed; z-index: 1; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))}))}}),window.didomiOnReady.push((e=>{const t=e.getCurrentUserStatus().vendors["c:poool-VyhCit7N"]?.enabled;t&&(n.config("cookies_enabled",!0),o&&o.setAttribute("style","position: fixed; z-index: 1; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"}))})),o&&o.setAttribute("style","position: fixed; z-index: 1; left: 0; right: 0; bottom: 0;"),n.createPaywall({target:"#cookie-banner",pageType:"premium"})}))})(e),(()=>{try{Ot(Tt.POOOL_ENGAGE)}catch(e){e instanceof Error&&console.error(e.message)}const e=bt("20mnUserInfo");It();const t=document.querySelector('[src="https://assets.poool.fr/engage.min.js"]');t?.addEventListener("load",(()=>{const t=window.Engage.noConflict();window.Engage=t||window.Engage,window.Engage.init("C7B0O-ENPDW-DIJOO-VJO1M").autoCreate({filters:["{}"!==e?"connected":"disconnected"]})}))})(),window.__tcfapi("removeEventListener",2,null,t.listenerId))},Mt=()=>{document.querySelectorAll(".taboola").length>0&&(()=>{window.didomiOnReady=window.didomiOnReady||[];const e=(e,t)=>{if(!t||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus)console.error("Issue with taboola callback");else{window._taboola=window._taboola||[],"article"===window.datalayerInfo.pageName?window._taboola.push({article:"auto"}):window._taboola.push({other:"auto"});try{Ot(Tt.TABOOLA,{dataAttributes:{darkMode:"dark"===document.documentElement.getAttribute("data-theme")?.toString()?"true":"false"}})}catch(e){e instanceof Error&&console.error(e.message)}document.querySelectorAll(".taboola").forEach((e=>{const t=e.getAttribute("data-mode"),r=e.getAttribute("id"),n=e.getAttribute("data-placement"),i=e.getAttribute("data-target-type");t&&r&&n&&i?window._taboola.push({mode:t,container:r,placement:n,target_type:i}):console.log("Issue with taboola placement")})),window._taboola.push({flush:!0}),window.__tcfapi&&window.__tcfapi("removeEventListener",2,null,e.listenerId)}};window.didomiOnReady.push((()=>{void 0!==e&&window.__tcfapi("addEventListener",2,e)}))})()};var Ft=()=>{(()=>{const e=document.querySelector(".js-close-article-btn");e&&window?.location&&window?.envVariables?.pageEndpoint&&e.addEventListener("click",(()=>{xt({name:"close_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:"home",cta_engagement:1}}),window.location.replace(window.envVariables.pageEndpoint)}))})()};const Rt=async({url:e,options:t})=>{const r=t||{};r.headers=r.headers||new Headers,r.headers.append("Content-Type","application/json");const n=await fetch(e,r).then((e=>{if(e.ok)return e;throw new Error(`Fetch error: ${e.statusText}`)})).then((e=>e.json()));return Object.keys(n).includes("data")?n.data:n};var Bt=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(Bt||{}),zt=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(zt||{});const jt={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"}},theme:{conso:{value:"#ff8689"},default:{value:"#4742ff"},entertainment:{value:"#9d61ff"},hightech:{value:"#8f98a9"},media:{value:"#4742ff"},"partenaires-externes":{value:"#4742ff"},partner:{value:"#fd8000"},planet:{value:"#00b482"},production:{value:"#c5be00"},publicommunique:{value:"#c5be00"},publishing:{value:"#c5be00"},sport:{value:"#6398ab"},tempo:{value:"#ecb200"},"vie-pro":{value:"#b49b56"},infolocale:{value:"#4742ff"}}},Ht={base:{value:"Arial"},obviously:{value:"'Obviously', sans-serif"},"source-serif-pro":{value:"'Source Serif Pro', serif"}};Object.keys(jt.primary),Object.keys(jt.secondary),Object.keys(jt.greyscale),Object.keys(jt.status),Object.keys(jt.theme);const Vt={align:["align-self"],basis:["flex-basis"],shrink:["flex-shrink"],grow:["flex-grow"]},Ut={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"]},Kt={radius:["border-radius"]},$t={p:["padding"],pt:["padding-top"],pr:["padding-right"],pl:["padding-left"],pb:["padding-bottom"],px:["padding-left","padding-right"],py:["padding-top","padding-bottom"]},Gt={m:["margin"],mt:["margin-top"],mr:["margin-right"],ml:["margin-left"],mb:["margin-bottom"],mx:["margin-left","margin-right"],my:["margin-top","margin-bottom"],...$t},Wt={...Gt,borderColor:["border-color"],bg:["background-color"],color:["color"],...Kt},Zt={textAlign:["text-align"],weight:["font-weight"],italic:["font-style"],textDecoration:["text-decoration"],textTransform:["text-transform"],fontFamily:["font-family"],whiteSpace:["white-space"]};Object.keys(Ht).filter((e=>!["base"].includes(e)));const Qt=Object.keys(jt.theme);function Jt(t){return e.forwardRef(t)}const Yt=(e,t="fr-FR")=>Intl.NumberFormat(t).format(e);function Xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er,tr={exports:{}};
|
|
10
10
|
/*!
|
|
11
11
|
Copyright (c) 2018 Jed Watson.
|
|
12
12
|
Licensed under the MIT License (MIT), see
|
|
@@ -40,3 +40,4 @@
|
|
|
40
40
|
Licensed under the MIT License (MIT), see
|
|
41
41
|
http://jedwatson.github.io/classnames
|
|
42
42
|
*/var Eb,Sb=(_b||(_b=1,Eb=wb,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=n(e,r(i)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var o in r)e.call(r,o)&&r[o]&&(i=n(i,o));return i}function n(e,t){return t?e?e+" "+t:e+t:e}Eb.exports?(t.default=t,Eb.exports=t):window.classNames=t}()),wb.exports),xb=Ii(Sb);const Nb=({articles:t,seeMoreButton:r,layout:n,...i})=>{const{variablesForQuery:o,...a}=i;return e.createElement(Dr,{...a},t.map(((r,i)=>{const o=`lastArticleKey${i}`,a=i===t.length-1;return e.createElement(e.Fragment,{key:o},e.createElement(Bn,{...r,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:n===Bt.MOBILE?void 0:3,...r.cardTitleProps}}),!a&&e.createElement(cr,{color:"grey-200",my:"s"}),10===i&&n===Bt.MOBILE&&e.createElement(or,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),20===i&&n===Bt.MOBILE&&e.createElement(or,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(10===i||20===i)&&n===Bt.MOBILE&&e.createElement(cr,{color:"grey-200",my:"s"}))})),r&&e.createElement(sr,{...r,variant:"secondary",mx:"auto",mt:"s"}))},kb=({legalNotices:t,seeMoreLegalNotices:r,...n})=>0===t.length?null:e.createElement(Dr,{...n},t.map((t=>e.createElement(e.Fragment,null,e.createElement(Fn,{key:t.link,...t,linkProps:{children:"Lire l’annonce"}}),e.createElement(cr,{my:"l",color:"grey-200"})))),r&&e.createElement(sr,{variant:"secondary",mx:"auto",mt:"xl",...r})),Cb=e=>{const t=e=>`${e}`.padStart(2,"0");return`${t(Math.floor(e/60))}:${t(e-60*Math.floor(e/60))}`},Tb=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),Ab=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),Db=e=>{const t=(new Date).getTime(),r=new Date(e).getTime(),n=(r-t)/6e4;let i=Tb.format(Math.round(n),"minutes");return n<=-60&&(i=Tb.format(Math.ceil(n/60),"hours"),n<=-1440&&(i=Ab.format(r))),"cette minute-ci"===i?"à l'instant":i};function Lb(e,t=!0){const r=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0");let i=e.getFullYear();return t||(i=Number(e.getFullYear().toString().slice(2))),`${r}/${n}/${i}`}function Ob(e){const[t,r,n]=e.split("-");return`${n}/${r}/${t.slice(-2)}`}const Pb=({updatedAt:t,...r})=>e.createElement(ei,{...r,...t&&{updatedAt:Db(t)}}),Ib=({draftContent:t,pageEndpoint:r,withCmp:n=!0})=>{const i=e.useRef(null);return e.useEffect((()=>{const e=gb({rawDraftContent:t,pageEndpoint:r,withCmp:n}),o=document.createRange().createContextualFragment(e);i.current&&(i.current.innerHTML="",i.current.appendChild(o))}),[t]),e.createElement(Dr,{ref:i,mt:"s",className:"c-content"},vb({rawDraftContent:t,pageEndpoint:r,withCmp:n}))},qb=".c-search-form__autocomplete",Mb=({isSSR:t=!0,layout:r,searchFormProps:n,breadcrumbProps:i,selectProps:o})=>{const[a,s]=e.useState([]),l=e.useCallback((()=>{const e=document.querySelector(qb);a&&a.length>0&&e&&e.classList.remove("u-hidden")}),[a]),c=e.useCallback((()=>{const e=document.querySelector(qb);a&&a.length>0&&e&&e.classList.remove("u-hidden")}),[a]),u=e.useCallback((e=>{e.relatedTarget||document.querySelector(qb)?.classList?.add("u-hidden")}),[]),d=e.useCallback((async e=>{if(e.target instanceof HTMLInputElement){const{target:t}=e;if(t.value.length<3)s([]);else try{const e=await Rt({url:`${t.closest("form")?.action??"#"}?searchValue=${t.value}`});s(e.map((e=>{const{_source:t}=e;return{value:t.output,url:t.url}})))}catch(e){console.error("20mn> Error while searching:",e)}}}),[s]);return e.useEffect((()=>{ht()}),[]),e.useEffect((()=>{const e=document.querySelector(qb);a&&e&&(a.length>0?e.classList.remove("u-hidden"):e.classList.add("u-hidden"))}),[a]),e.createElement(e.Fragment,null,e.createElement(pi,{layout:r,breadcrumbProps:i,selectProps:o,searchFormProps:{...n,autocompleteResults:a,onSubmit:e=>{e.preventDefault()},inputProps:{placeholder:"Rechercher les résultats d'une ville, d'une circonscription, d'un département ou d'une région",name:"elections-search",onClick:l,onFocus:c,onBlur:u,onKeyUp:d,autoComplete:"off"}}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsSearchBannerContainer:{layout:r,searchFormProps:n,breadcrumbProps:i,selectProps:o}})} };`}}))},Fb=t=>{const{variablesForQuery:r,...n}=t;return e.createElement(jn,{...n,headingProps:{...n.headingProps,as:"h2"},mb:"xxl"})},Rb=e=>e?e.rightSubheader&&Boolean(new Date(e.rightSubheader?.text).getTime())?{...e,rightSubheader:{...e.rightSubheader,text:Db(e.rightSubheader.text)}}:{...e}:e,Bb=({articles:t,layout:r,columnsNumber:n=2,hideFirstDivider:i=!1,dividerProps:o,seeMoreButton:a,seeMoreLink:s,tagTotalArticles:l,currentPagePath:c,currentPage:u="1",articlesLimit:d,hasCardLarge:p=!1,hasMarginOnCard:f=!0,heading:h,...m})=>{if(0===t.length)return null;const g=t=>e.createElement(wn,{...t,cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:Rb(t.cardHeaderProps),mx:f?"m":void 0});let v=null;v=r===Bt.DESKTOP?e.createElement(Lr,{colsNumber:n,gap:"xl"},t.slice(0,d).map(((t,r)=>{const{layout:n,...i}=t;return e.createElement(Nn,{key:t.title,...i,className:`card-item-${r+1}`,cardTitleProps:{as:"h2",...t.cardTitleProps},cardHeaderProps:Rb(t.cardHeaderProps)})}))):e.createElement(e.Fragment,null,t.slice(0,d).map(((t,n)=>e.createElement(Dr,{key:t.title,className:`card-item-${n+1}`},p?e.createElement(e.Fragment,null,0===n&&e.createElement(Sn,{...t,layout:r}),n>0&&e.createElement(e.Fragment,null,e.createElement(cr,{color:"grey-200",my:"s",...o}),g({...t,layout:r}))):e.createElement(e.Fragment,null,e.createElement(cr,{color:"grey-200",my:"s",...o,className:xb({"u-hidden":0===n&&i},o?.className)}),g({...t,layout:r}))))));const b=e.createElement(e.Fragment,null,h&&e.createElement(Jr,{size:"m",mb:"xl",mx:{xs:"m",md:"0"},...h}),v,(s||a)&&e.createElement(Or,{justifyContent:"center",mt:"l"},a&&e.createElement(sr,{variant:"secondary",...a}),s&&e.createElement(Ir,{variant:"secondary",...s}),l&&c&&e.createElement("noscript",null,e.createElement(ui,{totalArticles:l,currentPage:u,pagePath:c,archivesUrl:"https://www.20minutes.fr/archives"}))));return 0===Object.keys(m).length?b:e.createElement(Dr,{...m},b)},zb=({layout:t,title:r,editions:n,selectorsLabel:i,editionSelector:o,monthSelector:a,variant:s="archivesByYear",enabled:l=!0})=>l?e.createElement(e.Fragment,null,e.createElement(cr,{my:{xs:"xl",md:"xxl-2"},color:"ultramarine"}),e.createElement(Jr,{size:"xs",mb:"xxl"},r),e.createElement(Or,{alignItems:{xs:"start",md:"center"},gap:{xs:"xs",md:"l"},direction:{xs:"column",md:"row"}},e.createElement(Yr,{size:"s",weight:"bold",...i}),e.createElement(Hr,{...o,id:"archivePdfListEditionSelector",containerProps:{style:{width:t===Bt.MOBILE?"100%":"163px"}},py:"m",px:"s"}),"archivesByYear"===s&&a&&e.createElement(Hr,{...a,id:"archivePdfListMonthSelector",containerProps:{style:{width:t===Bt.MOBILE?"100%":"193px"}},py:"m",px:"s"})),n&&n.length>0&&e.createElement(Or,{direction:"column",gap:"l",mt:"l"},n.slice(0,20).map((t=>e.createElement(Or,{key:t.name,alignItems:"baseline"},e.createElement(fr,{name:"diode",color:"ultramarine",size:11,mr:"xxs"}),e.createElement(Ir,{color:"ultramarine",href:t.href},t.name)))),n.length>20&&e.createElement(Yr,{as:"span"},"Vous ne trouvez pas le journal numérique recherché ? Sélectionnez une édition et un mois pour une recherche plus précise."))):null,jb=({header:{subtitle:t,...r},sectionId:n,liveIndicator:i,children:o,...a})=>{const s=t&&"string"!=typeof t?vb({rawDraftContent:t}):t;return e.createElement(Dr,{...a,id:n,className:xb({"u-anchor-link":Boolean(n)})},i&&e.createElement(Pb,{...i,variant:"elections",mx:{xs:"m",md:"0"},mb:"xs"}),r?.heading?.children&&e.createElement(Gn,{...r,subtitle:s,mb:{xs:"m",sm:"xl"}}),o)},Hb=({articles:t,selectProps:r,seeMoreLink:n,layout:i,...o})=>{const{variablesForQuery:a,...s}=o,l=e.createElement(e.Fragment,null,e.createElement(Zn,{as:"h2",size:{xs:"s",md:"m"},isCentered:i===Bt.MOBILE,mb:{xs:"l",md:"0"},iconProps:{name:"rubric-news",size:40}},"Actualité locale"),e.createElement(Hr,{...r})),c=t=>e.createElement(Nn,{key:t.title,...t,cardTitleProps:{as:"h3",size:"xs",weight:"semi-bold",fontFamily:"source-serif-pro",maxRows:4,...t.cardTitleProps},socialBarProps:void 0});return e.createElement(Dr,{...s,id:"local-news-container"},e.createElement(dr,{mb:"l"}),i===Bt.DESKTOP?e.createElement(Or,{justifyContent:"between",mb:"xl",alignItems:"center"},l):e.createElement(Dr,{mx:"m",mb:"l"},l),i===Bt.DESKTOP?e.createElement(Lr,{colsNumber:4,gap:"xl",mx:i===Bt.DESKTOP?"0":"m"},t.map((e=>c(e)))):e.createElement(Or,{direction:"column",mx:"m"},t.map(((r,n)=>e.createElement(e.Fragment,{key:r.title},c(r),n<t.length-1&&e.createElement(cr,{color:"grey-200",my:"s"}))))),e.createElement(Or,{justifyContent:"center",mt:"xxl"},e.createElement(Ir,{variant:"secondary",...n},"Voir plus d'articles")))},Vb=({post:t,postIndex:r,postsCount:n,pageEndpoint:i,layout:o,disableAds:a=!1})=>e.createElement("div",{className:"js-post",key:t.id},e.createElement(ii,{...t.title}),t.content&&e.createElement(Ib,{draftContent:t.content,pageEndpoint:i}),t.talk&&e.createElement(ri,{...t.talk,mt:"s"}),e.createElement(cr,{color:"grey-200",my:"l"}),!a&&n>=4&&r%6==3&&e.createElement(or,{adUnitCompletePath:o===Bt.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isfullscreenMobile:!0}),!a&&n>=8&&r%6==0&&e.createElement(or,{adUnitCompletePath:o===Bt.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isfullscreenMobile:!0})),Ub=({post:t,postIndex:r,postsCount:n,pageEndpoint:i,layout:o,disableAds:a=!1})=>e.createElement("div",{className:"js-post",key:t.id},e.createElement(ii,{...t.title}),t.content&&e.createElement(Ib,{draftContent:t.content,pageEndpoint:i}),t.talk&&e.createElement(ri,{...t.talk,mt:"s"}),e.createElement(cr,{color:"grey-200",my:"l"}),!a&&n>=4&&r%6==3&&e.createElement(or,{adUnitCompletePath:o===Bt.MOBILE?"/49926454/20minutes_webmobile/live/inread":"/49926454/20minutes_desktop/live/inread",variant:"INREAD",mb:"s",isfullscreenMobile:!0}),!a&&n>=8&&r%6==0&&e.createElement(or,{adUnitCompletePath:o===Bt.MOBILE?"/49926454/20minutes_webmobile/live/article_mtf":"/49926454/20minutes_desktop/live/pave_article",variant:"ARTICLE",mb:"s",isfullscreenMobile:!0})),Kb=({posts:t,layout:r,pageEndpoint:n,seeMoreLink:i,disableAds:o,...a})=>{const{variablesForQuery:s,refreshButton:l,...c}=a;return 0===t.length?null:e.createElement(e.Fragment,null,e.createElement(Dr,{...c,"data-state":l?.state,"data-latest-post-id":l?.latestPostId,"data-brand-id":s?.brandId,"data-live-id":s?.liveId},t.map(((i,a)=>e.createElement(Ub,{key:i.id,post:i,postIndex:a,postsCount:t.length,layout:r,pageEndpoint:n,disableAds:o})))),i&&e.createElement(Or,{justifyContent:"center",my:"l"},e.createElement(sr,{variant:"secondary",...i})))},$b=({...t})=>{const{variablesForQuery:r,...n}=t;return e.createElement(Ci,{...n})},Gb=({items:t,layout:r,seeMoreButton:n,...i})=>t.length<=0?null:e.createElement(e.Fragment,null,e.createElement(Or,{direction:"column",gap:"xxl-2",...i},t.map(((t,n)=>e.createElement(e.Fragment,null,5===n&&r===Bt.MOBILE&&e.createElement(or,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),e.createElement(An,{key:t.link,...t,layout:r,containerSpacing:{px:{xs:"m",lg:"0"}}}))))),n&&e.createElement(Or,{justifyContent:"center",mt:"xl"},e.createElement(sr,{variant:"secondary",...n})),r===Bt.DESKTOP&&e.createElement(or,{adUnitCompletePath:"/49926454/20minutes_desktop/divers/ban_btf",variant:"BAN"}),r===Bt.MOBILE&&e.createElement(or,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"BAN",mt:"xl"})),Wb=({articles:t,layout:r,seeMoreLink:n,...i})=>{const o=e.createElement(or,{adUnitCompletePath:r===Bt.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_1":"/49926454/20minutes_desktop/divers/ban_mtf",variant:"BAN",mt:"s"});return t.length<=9?e.createElement(e.Fragment,null,e.createElement(Bb,{...i,articles:t,layout:r,seeMoreLink:n,seeMoreButton:void 0,columnsNumber:r===Bt.MOBILE?2:3,hideFirstDivider:!0}),r===Bt.MOBILE&&e.createElement(cr,{color:"grey-200",my:"s"}),o):e.createElement(e.Fragment,null,e.createElement(Bb,{...i,articles:t.slice(0,9),layout:r,seeMoreLink:void 0,seeMoreButton:void 0,columnsNumber:r===Bt.MOBILE?2:3,hideFirstDivider:!0}),r===Bt.MOBILE&&e.createElement(cr,{color:"grey-200",my:"s"}),o,e.createElement(Bb,{...i,articles:t.slice(9),layout:r,seeMoreLink:n,columnsNumber:r===Bt.MOBILE?2:3,hideFirstDivider:!1}))},Zb=e=>{switch(e){case"FRA":return"Nationale";case"BOR":return"Bordeaux";case"LIL":return"Lille";case"MAR":return"Marseille";case"MON":return"Montpellier";case"NAN":return"Nantes";case"NIC":return"Nice";case"PAR":return"Paris";case"REN":return"Rennes";case"STR":return"Strasbourg";case"TOU":return"Toulouse";default:return""}},Qb=e=>{const t=e.slice(0,4),r=e.slice(4,6),n=e.slice(6,8),i=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"][parseInt(r,10)-1];return`${parseInt(n,10)} ${i} ${t}`},Jb="archivePdfListEditionSelector",Yb="archivePdfListMonthSelector",Xb=({isSSR:t=!0,variablesForQuery:r,layout:n,title:i,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,enabled:c})=>{const[u,d]=e.useState(l),p=e.useCallback((async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const n=document.getElementById(Jb),i=document.getElementById(Yb),o=[{url:`${e}/?id=getPdfsByEditionSlug&variables=${encodeURIComponent(JSON.stringify({brandId:r?.brandId,slug:n?.value,first:100,sort:"ASC",year:r?.year,month:i?.value}))}`,options:{headers:t}}];try{const e=(({data:e})=>{const t=[];return Array.isArray(e)||e?.brand?.node?.edition?.node?.pdfs?.edges?.forEach((e=>{e?.node?.url&&e?.node?.publication_date&&t.push({href:e?.node?.url,name:`Lire le journal du ${Qb(e?.node?.publication_date)} - édition ${Zb(e.node.url.match(/[0-9]{8}_([A-Z]{3})\.pdf/)?.[1]??"")}`})})),t})({data:await Rt(...o)});d(e)}catch(e){console.error("20mn> Error while searching:",e)}}),[d]);return e.createElement(e.Fragment,null,e.createElement(zb,{title:i,selectorsLabel:o,editionSelector:{...a,onChange:p},monthSelector:s&&{...s,onChange:p},editions:u,layout:n,enabled:c}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({archivePdfListContainer:{title:i,layout:n,selectorsLabel:o,editionSelector:a,monthSelector:s,editions:l,variablesForQuery:r,enabled:c}})} };`}}))},ey=()=>{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 ty=(e=>(e.Article="Article",e.ExternalContent="ExternalContent",e.Live="Live",e.Page="Page",e.Story="Story",e))(ty||{}),ry=(e=>(e.bold="bold",e.community="community",e.default="default",e.faq="faq",e.important="important",e.very_important="very_important",e))(ry||{}),ny=(e=>(e.closed="closed",e.open="open",e))(ny||{}),iy=(e=>(e.embed="embed",e.photo="photo",e.podcast="podcast",e.video="video",e))(iy||{}),oy=(e=>(e.CREATED_AT="CREATED_AT",e.EXPECTATION_LEVEL="EXPECTATION_LEVEL",e.RELEASE_DATE="RELEASE_DATE",e.TITLE_FR="TITLE_FR",e))(oy||{}),ay=(e=>(e.ASC="ASC",e.DESC="DESC",e))(ay||{});const sy=({medias:e,imgEndpoint:t})=>{const r=e?.find((e=>e&&!0===e.illustration&&e.type===iy.photo&&e.photo?.node?.id));if(!r?.photo?.node?.id)return"";const n=r.photo?.node?.slug?`%format_${r.photo.node.slug}`:"%format";return`${t}/${pb(r.photo.node.id)}/${n}`},ly=({medias:e,picto:t,editorialModel:r})=>{if(r===ty.Story)return{caption:{iconName:"diaporama"}};let n;if(t)switch(t){case"video":if(r!==ty.Page){const t=e?.find((e=>e&&!0===e?.illustration&&e?.type===iy.video&&e[iy.video]?.duration))?.video?.duration;return{caption:{iconName:"video",text:t?Cb(Number(t)):""}}}break;case"podcast":return{caption:{iconName:"podcast"}};default:return n}else e?.forEach((e=>{if("podcast"===e?.type&&(n={caption:{iconName:"podcast"}}),"video"===e?.type&&r!==ty.Page){const t=e?.video?.duration?Number(e?.video?.duration):null;n={caption:{iconName:"video",text:t?Cb(t):""}}}}));return n},cy=e=>e?Qt.find((t=>e.includes(t))):void 0,uy=e=>null!=e,dy=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const l=[{url:`${e}/?id=getTagArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Rt(...l),t=(({pageEndpoint:e,imgEndpoint:t,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce(((r,n)=>{if(!n?.node?.title||!n?.node?.label||!n?.node?.url||!n?.node?.medias&&!n?.node?.photo?.node)return r;const i=n?.node?.editorial_model===ty.Story;let o=n.node.medias?n.node.medias.filter(uy):[];return i&&n?.node?.photo?.node&&(o=[{type:iy.photo,illustration:!0,photo:n.node.photo,legend:n.node.photo.node?.caption}]),r.push({link:new URL(n.node.url,e).href,title:n.node.short_title||n.node.title,cardImageProps:{cover:sy({medias:o,imgEndpoint:t}),...ly({medias:o,picto:n?.node?.picto,editorialModel:n?.node.editorial_model})},cardHeaderProps:{headline:{text:n.node.label,color:cy(n?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:n.node.published_at||""}},cardTitleProps:{cartridge:"Live"===n?.node?.editorial_model?"live":void 0},socialBarProps:{disableComment:!i&&!n.node.enable_comments,variant:"card",contentLink:new URL(n.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:n.node.comments_count??0,shareCount:n.node.facebook_count??0,contentId:n.node?.legacy_id?.toString()}}),r}),[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e}),r={articles:[...a,...t],endCursor:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null,hasNextPage:e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1};s((e=>[...e,...t])),n(r.endCursor),o(r.hasNextPage),window?.localStorage.setItem("aticles-container-data",JSON.stringify(r)),Nt()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect((()=>{l&&d()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useEffect((()=>{At();const e=window?.performance?.getEntriesByType("navigation").map((e=>e.type)).includes("back_forward");if(e){const e=yt("aticles-container-data");e&&Object.hasOwn(e,"articles")&&Object.hasOwn(e,"endCursor")&&Object.hasOwn(e,"hasNextPage")&&(s(e.articles),n(e.endCursor),o(e.hasNextPage),Nt())}else window?.localStorage.removeItem("aticles-container-data")}),[]),e.useMemo((()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u})),[a,l,i,u])},py=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l})=>{const{isLoading:c,articles:u,hasNextPage:d,onLoadMore:p}=dy({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect((()=>{c||ey()}),[c]);const f=u.map((e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}})));return e.createElement(e.Fragment,null,e.createElement(Bb,{layout:r,articles:f,seeMoreButton:d?{...o,disabled:c,onClick:p}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({articleListBottomContainer:{layout:r,articles:f,variablesForQuery:i,seeMoreButton:o}})} };`}}))},fy="20mnBreakingNews",hy=18e4,my=()=>{const[t,r]=e.useState(!1),[n,i]=e.useState(yt(fy));e.useEffect((()=>{n&&localStorage.setItem(fy,JSON.stringify(n))}),[n]),e.useEffect((()=>{if(Object.keys(n??{}).includes("opened")&&i((e=>({open:e?.opened??!1,time:e?.time,data:e?.data}))),n?.time&&n.time+hy>(new Date).getTime())return void(n.open&&r(!0));const{apiHost:e,imgHost:t}=document.body.dataset,o=new Headers;window.envVariables?.apiAuthKey&&o.append("auth-key",window.envVariables.apiAuthKey);Rt(...[{url:`${e}/?id=getBreakingNews&variables=%7B%22brandId%22%3A%22QnJhbmQ6MjBtaW51dGVz%22%7D`,options:{headers:o}}]).then((e=>{const o=e?.brand?.node?.home?.node?.homeBreakingNews?.node,a=o?.content?.editorial_model?.toLowerCase(),s=o?.content?.[a]?.node;if(!s?.title||!s?.url_current)return void r(!1);const l=o.custom_title??s.title;let c;if(o?.with_photo&&s?.medias?.[0]?.photo?.node?.id){const e=atob(s.medias[0].photo.node.id).replace("Photo:","");c=`${t}/${e}/147x96_${s?.medias?.photo?.node?.slug??"media"}`}const u=!n||n.data?.description!==l||n.open;i({open:u,time:(new Date).getTime(),data:{description:l,url:s.url_current,imageUrl:c}}),r(u)})).catch((e=>{console.error("20mn> Error while loading the breaking news:",e)}))}),[]);return t&&n?.data?e.createElement(en,{title:"ALERTE INFO",description:n.data.description,cover:n.data.imageUrl,link:n?.data?.url?{href:n.data.url}:void 0,closeButton:{onClick:()=>{i((e=>({...e||{},open:!1}))),r(!1)}}}):null},gy=({mapConstituenciesProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerDistrict.length||0===Object.keys(t.mapDistrictsData||{}).length?null:e.createElement(jb,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(ai,{...t,mx:{xs:"m",md:"0"}})),vy=t=>{const[r,n]=e.useState(t.defaultMapConstituenciesProps);return e.useEffect((()=>{(async()=>{const e=[{url:"https://static.20mn.fr/elections/map-districts.json"}];try{const t=await Rt(...e);n({...r,mapDistrictsData:t})}catch(e){console.error("20mn> Error while loading map data:",e)}})(),ht(),vt()}),[]),e.useMemo((()=>({mapConstituenciesProps:r})),[r])},by=({isSSR:t=!0,mapConstituenciesProps:r,...n})=>{const{mapConstituenciesProps:i}=vy({defaultMapConstituenciesProps:r});return e.createElement(e.Fragment,null,e.createElement(gy,{mapConstituenciesProps:t?{electionName:"",electionYear:"",resultsPerDistrict:[],mapDistrictsData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsConstituenciesMapContainer:{mapConstituenciesProps:r,...n}})} };`}}))},yy=({mapEuropeProps:t,...r})=>""===t.electionName&&""===t.electionYear&&0===t.resultsPerCountry.length||0===Object.keys(t.mapEuCountriesData||{}).length||0===Object.keys(t.mapNonEuCountriesData||{}).length?null:e.createElement(jb,{...r,header:{...r.header,heading:{...r.header.heading,as:"h2",fontFamily:"source-serif-pro",weight:"semi-bold",size:{xs:"m",md:"l"}}}},e.createElement(li,{...t,mx:{xs:"m",md:"0"}})),_y=t=>{const[r,n]=e.useState(t.defaultMapEuropeProps);return e.useEffect((()=>{(async()=>{try{const e=await Promise.all([Rt({url:"https://static.20mn.fr/elections/map-eu-countries.json"}),Rt({url:"https://static.20mn.fr/elections/map-non-eu-countries.json"})]);n({...r,mapEuCountriesData:e[0],mapNonEuCountriesData:e[1]})}catch(e){console.error("20mn> Error while loading map data:",e)}})()}),[]),e.useMemo((()=>({mapEuropeProps:r})),[r])},wy=({isSSR:t=!0,mapEuropeProps:r,...n})=>{const{mapEuropeProps:i}=_y({defaultMapEuropeProps:r});return e.createElement(e.Fragment,null,e.createElement(yy,{mapEuropeProps:t?{electionName:"",electionYear:"",resultsPerCountry:[],mapEuCountriesData:{},mapNonEuCountriesData:{}}:i,...n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({electionsEuropeanMapContainer:{mapEuropeProps:r,...n}})} };`}}))},Ey=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getUserBackArticlesWithCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,userBackId:t.defaultVariablesForQuery.userBackId,first:10,after:r}))}`,options:{headers:i}}];try{const e=await Rt(...a),t=(({pageEndpoint:e,imgEndpoint:t,data:r})=>Array.isArray(r)?[]:(r?.brand?.node?.publishableContents?.edges||[])?.reduce(((r,n)=>{if(!n?.node?.title||!n?.node?.label||!n?.node?.url||!n?.node?.medias&&!n?.node?.photo?.node)return r;const i=n?.node?.editorial_model===ty.Story;let o=n.node.medias?n.node.medias.filter(uy):[];return i&&n?.node?.photo?.node&&(o=[{type:iy.photo,illustration:!0,photo:n.node.photo,legend:n.node.photo.node?.caption}]),r.push({link:new URL(n.node.url,e).href,title:n.node.short_title||n.node.title,cardImageProps:{cover:sy({medias:o,imgEndpoint:t}),...ly({medias:o,picto:n?.node?.picto,editorialModel:n?.node.editorial_model})},cardHeaderProps:{headline:{text:n.node.label,color:cy(n?.node?.rubric?.node?.themeColor?.node?.slug)},rightSubheader:{text:n.node.published_at||""}},cardTitleProps:{cartridge:"Live"===n?.node?.editorial_model?"live":void 0},socialBarProps:{disableComment:!i&&!n.node.enable_comments,variant:"card",contentLink:new URL(n.node.url,e).href,commentAnchor:"mbrs-comments-container",commentCount:n.node.comments_count??0,shareCount:n.node.facebook_count??0,contentId:n.node?.legacy_id?.toString()}}),r}),[]))({pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s((e=>[...e,...t])),n(e?.brand?.node?.publishableContents?.pageInfo?.endCursor||null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage||!1),Nt()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect((()=>{l&&d()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useMemo((()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u})),[a,l,i,u])},Sy=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o,currentPagePath:a,tagTotalArticles:s,columnsNumber:l})=>{if(0===n.length)return null;const{isLoading:c,articles:u,hasNextPage:d,onLoadMore:p}=Ey({defaultArticles:n,defaultVariablesForQuery:i});e.useEffect((()=>{c||ey()}),[c]);const f=u.map((e=>({...e,...e.cardImageProps&&{cardImageProps:{...e.cardImageProps,sizes:"(min-width: 1660px) 384px, (min-width: 1440px) calc(18vw + 89px), (min-width: 1080px) 320px, (min-width: 780px) calc(44.29vw - 149px), calc(50vw - 16px)"}}})));return e.createElement(e.Fragment,null,e.createElement(Bb,{layout:r,articles:f,seeMoreButton:d?{...o,disabled:c,onClick:p}:void 0,currentPagePath:a,tagTotalArticles:s,columnsNumber:l}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({journalistArticleListContainer:{layout:r,articles:f,variablesForQuery:i,seeMoreButton:o}})} };`}}))},xy=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"}),Ny=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,sourceExcluded:t.defaultVariablesForQuery.sourceExcluded,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Rt(...a),t=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce(((n,i)=>{if(!(i?.node?.title&&i?.node?.label&&i?.node?.url&&i?.node?.published_at&&(i?.node?.medias||i?.node?.photo?.node)))return n;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=[{type:iy.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),n.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:sy({medias:o,imgEndpoint:r}),...ly({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model})},socialBarProps:{commentCount:i.node.comments_count??0,shareCount:(i.node.facebook_count??0)+(i.node.pinterest_count??0),contentId:i.node?.legacy_id?.toString(),contentLink:new URL(i.node.url,t).href,commentAnchor:"mbrs-comments-container"},cardHeaderProps:{headline:{text:i.node.label,color:cy(i?.node?.rubric?.node?.themeColor?.node?.slug)},liveTime:xy.format(new Date(i.node.published_at).getTime()).replace(":","H")},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},summaryProps:{children:i?.node?.lead??""},layout:e}),n}),[]))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e});s((e=>[...e,...t])),n(e?.brand?.node?.publishableContents?.pageInfo?.endCursor??null),o(e?.brand?.node?.publishableContents?.pageInfo?.hasNextPage??!1),Nt()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect((()=>{l&&d()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useEffect((()=>{(()=>{const e=document.getElementById("latest-articles-container");if(e){const t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(Nt(),t.unobserve(e.target))}))})),r=e.querySelectorAll(".c-card-container")[10];r&&t.observe(r);const n=e.querySelectorAll(".c-card-container")[20];n&&t.observe(n)}})()}),[]),e.useMemo((()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u})),[a,l,i,u])},ky=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,articles:s,hasNextPage:l,onLoadMore:c}=Ny({defaultArticles:n,defaultVariablesForQuery:i});return e.useEffect((()=>{a||ey()}),[a]),e.createElement(e.Fragment,null,e.createElement(Nb,{layout:r,articles:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestArticlesContainer:{layout:r,articles:s,variablesForQuery:i,seeMoreButton:o}})} };`}}))},Cy=t=>{const[r,n]=e.useState(t.defaultArticles),i=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLatestContentsCursor&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,first:t.variablesForQuery.first}))}`,options:{headers:r}}];try{const e=await Rt(...i),t=(({layout:e,pageEndpoint:t,imgEndpoint:r,data:n})=>Array.isArray(n)?[]:(n?.brand?.node?.publishableContents?.edges||[])?.reduce(((n,i)=>{if(!(i?.node?.title&&i?.node?.url&&i?.node?.medias&&i?.node?.rubric?.node?.label))return n;if(!i?.node?.medias.length&&!i?.node?.photo?.node)return n;let o=i.node.medias??[];return"Story"===i?.node?.editorial_model&&i?.node?.photo?.node&&(o=[{type:iy.photo,illustration:!0,photo:i.node.photo,legend:i.node.photo.node?.caption}]),n.push({link:new URL(i.node.url,t).href,title:i.node.short_title||i.node.title,cardImageProps:{cover:sy({medias:o,imgEndpoint:r}),...ly({medias:o,picto:i?.node?.picto,editorialModel:i?.node.editorial_model}),lazyLoad:!0},cardHeaderProps:{headline:{text:i?.node?.label||i.node.rubric.node.label,color:cy(i?.node?.rubric?.node?.themeColor?.node?.slug)}},cardTitleProps:{cartridge:"Live"===i?.node?.editorial_model?"live":void 0},layout:e}),n}),[]))({layout:window.layout,data:e,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint});n(t)}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect((()=>{i()}),[]),e.useMemo((()=>({articles:r})),[r])},Ty=({isSSR:t=!0,articles:r,variablesForQuery:n,...i})=>{const{articles:o}=Cy({defaultArticles:r,variablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(Fb,{...i,articles:o,variablesForQuery:n}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({latestContentsCarouselContainer:{articles:r,variablesForQuery:n,...i}})} };`}}))},Ay=e=>{const t=[];return e.legalNotices.forEach((r=>{const n=r?.node;t.push({link:n?.external_id?new URL(`/al/${n?.external_id}`,e.legalNoticeEndpoint).href:"",title:n?.title??void 0,location:n?.legalNoticeDepartment?.node?.name||"",summaryProps:{children:n?.publishing_date?`Publié le ${Lb(new Date(n.publishing_date),!1)}`:Ob(new Date(Date.now()).toLocaleString())}})})),t},Dy=e=>null!=e,Ly=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[c]);return e.useEffect((()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLegalNoticesFromDept&variables=${encodeURIComponent(JSON.stringify({slug:t.defaultVariablesForQuery.slug,first:10,after:r}))}`,options:{headers:i}}];try{const e=await Rt(...a),t=e?.legalNotices?.edges?.filter(Dy)??[],r=Ay({legalNotices:t,legalNoticeEndpoint:window.location.origin});s((e=>[...e,...r])),n(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),Nt()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}})()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useMemo((()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u})),[a,l,i,u])},Oy=({isSSR:t=!0,variablesForQuery:r,legalNotices:n})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=Ly({legalNotices:n,defaultVariablesForQuery:r});return e.useEffect((()=>{i||ey()}),[i]),e.createElement(e.Fragment,null,e.createElement(kb,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeDepartmentContainer:{legalNotices:o,variablesForQuery:r}})} };`}}))},Py=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.legalNotices),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[c]);return e.useEffect((()=>{l&&(async()=>{const{apiHost:e}=document.body.dataset,t=new Headers;window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLegalNotices&variables=${encodeURIComponent(JSON.stringify({first:10,after:r}))}`,options:{headers:t}}];try{const e=await Rt(...i),t=e?.legalNotices?.edges?.filter(Dy)??[],r=Ay({legalNotices:t,legalNoticeEndpoint:window.location.origin});s((e=>[...e,...r])),n(e?.legalNotices?.pageInfo?.endCursor||null),o(e?.legalNotices?.pageInfo?.hasNextPage||!1),Nt()}catch(e){console.error("20mn> Error while loading annnouncements:",e)}})()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useMemo((()=>({isLoading:l,legalNotices:a,hasNextPage:i,onLoadMore:u})),[a,l,i,u])},Iy=({isSSR:t=!0,variablesForQuery:r,legalNotices:n})=>{const{isLoading:i,legalNotices:o,hasNextPage:a,onLoadMore:s}=Py({legalNotices:n,defaultVariablesForQuery:r});return e.useEffect((()=>{i||ey()}),[i]),e.createElement(e.Fragment,null,e.createElement(kb,{legalNotices:o,seeMoreLegalNotices:a?{disabled:i,onClick:s,children:"Voir plus d’annonces légales"}:void 0,mx:{xs:"m",md:"0"}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({legalNoticeHomeContainer:{legalNotices:o,variablesForQuery:r}})} };`}}))},qy=e=>{const t=new Intl.DateTimeFormat("fr",{timeStyle:"short",timeZone:"Europe/Paris"});return{name:e.name,title:e.title,tabColor:e.tabColor,body:e.articleEdges.reduce(((r,n)=>{if(n?.node?.title&&n?.node?.url&&n?.node?.rubric?.node?.slug&&n?.node?.rubric?.node?.label){const i={themeColor:n.node.rubric.node.themeColor?.node?.lightmode_color||void 0,rubricName:n?.node?.label||n.node.rubric.node.label,title:n?.node?.short_title||n.node.title,url:new URL(n.node.url,e.pageEndpoint).href,cartridge:n.node?.editorial_model===ty.Live&&n.node?.state===ny.open?"live":void 0};"le-direct"===e.name&&n?.node?.published_at&&(i.liveTime=t.format(new Date(n.node.published_at).getTime()).replace(":","H")),r.push(i)}return r}),[]).slice(0,e.limit)}},My=t=>{const[r,n]=e.useState(t.defaultTabItems),i=async()=>{if(t.variablesForQuery.liveLimit&&t.variablesForQuery.mostReadLimit){const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getLiveAndMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit}))}`,options:{headers:r}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:r,liveLimit:n,mostReadLimit:i})=>{if(Array.isArray(e))return[];const o=e?.brand?.node,a=o?.mostReadArticles?.edges,s=o?.liveArticles?.edges,l=[];if(s?.length){const e=qy({name:"le-direct",title:"Le direct",pageEndpoint:t,articleEdges:s,limit:n,tabColor:"direct"});l.push(e)}if(a?.length){const e=qy({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:a,limit:i});l.push(e)}return l})({data:await Rt(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,liveLimit:t.variablesForQuery.liveLimit,mostReadLimit:t.variablesForQuery.mostReadLimit});n(e),ht()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}};return e.useEffect((()=>{i()}),[]),e.useMemo((()=>({tabItems:r})),[r])},Fy=({isSSR:t=!0,layout:r,tabItems:n,variablesForQuery:i,...o})=>{const{tabItems:a}=My({defaultTabItems:n,variablesForQuery:i});return e.createElement(e.Fragment,null,e.createElement($b,{...o,layout:r,tabItems:a,variablesForQuery:i,hasButton:!0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({liveAndMostReadContainer:{layout:r,tabItems:n,variablesForQuery:i}})} };`}}))},Ry=()=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>{if(e.getCurrentUserStatus().purposes["activation-gGierZpp"].enabled){Array.from(document.getElementsByClassName("cmp-placeholder")).forEach((e=>{e.classList.add("u-hidden")}));Array.from(document.getElementsByClassName("embed-wrapper")).forEach((e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach((e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))}))}))}else{Array.from(document.getElementsByClassName("cmp-placeholder")).forEach((e=>{e.classList.remove("u-hidden")}))}}))},By=["nfb_1","nfb_2","article_btf","pave_com","pave_home","inread","pave_article","article_mtf","native_web"],zy=()=>{By.forEach((e=>{const t=document?.querySelectorAll(`[id*=dfp_${e}]`)||[],r=document?.querySelectorAll(`[id=dfp_${e}]`)||[];let n=t.length-r.length;r.forEach((t=>{t.setAttribute("id",`dfp_${e}_${n}`),n+=1}))}))},jy=()=>{document.querySelectorAll(".embed-placeholder").forEach((e=>{e.addEventListener("click",(e=>{const t=e.target;if(!(t instanceof HTMLElement&&t.closest(".cmp-button")))return;e.preventDefault(),window.didomiOnReady.push((()=>{(()=>{const e=window.Didomi.openCurrentUserStatusTransaction();e.enablePurpose("activation-gGierZpp"),window.sessionStorage.setItem("cmpModal","accepted"),e.commit(),Ry()})()}));const r=t.closest("div.embed-placeholder");r&&r.focus()}))}))},Hy=e=>{switch(e){case ry.default:case ry.important:case ry.community:case ry.faq:case ry.bold:return e;case ry.very_important:return"crucial";default:return"default"}},Vy=(e,t)=>Array.isArray(e)?[]:(e?.brand?.node?.live?.node?.livePosts?.edges||[])?.reduce(((e,r)=>{if(!r)return e;let n,i=r?.node?.content_md?.blocks;if(i){const e=[...i],t=e?.slice(-1);""===t?.[0]?.text&&"unstyled"===t?.[0]?.type&&(e.pop(),i=e)}return r?.node?.comment?.node&&(n={question:r.node.comment.node.content||"",author:r.node.comment.node.userFront?.node?.username||"",response:i?.[0]?.text}),e.push({id:r.node.legacy_id,title:{status:Hy(r?.node?.type),header:r?.node?.printed_hour||"",title:r?.node?.title||"",img:r?.node?.livePostLabel?.node&&t?{name:r.node.livePostLabel.node.slug||"",src:r.node.livePostLabel.node.logo?`${t}/${r.node.livePostLabel.node.logo}`:""}:void 0},content:n?void 0:{entityMap:{},...r?.node?.content_md,blocks:i??[]},talk:n}),e}),[]),Uy=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultPosts),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,liveId:t.defaultVariablesForQuery.liveId,first:t.defaultVariablesForQuery.first,after:r,filter:t.defaultVariablesForQuery.filter}))}`,options:{headers:i}}];try{const e=await Rt(...a),{staticHost:t}=document.body.dataset,r=Vy(e,t);s((e=>[...e,...r])),n(e?.brand?.node?.live?.node?.livePosts?.pageInfo?.endCursor??null),o(e?.brand?.node?.live?.node?.livePosts?.pageInfo?.hasNextPage??!1),(e=>{const t=e.filter((({content:e})=>Object.values(e?.entityMap||{}).some((({type:e,data:t})=>"iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)))));t.length&&t.forEach((({content:e})=>{Object.values(e?.entityMap||{}).forEach((({type:e,data:t})=>{if("iframely"===e&&(t?.embedProps?.js||t?.embedProps?.css)){const{js:e=[],css:r=[]}=t?.embedProps||{};e.length&&e.forEach(((e,t)=>Lt({name:`embed_live-posts-${t}`,src:e,load:"async"}))),r.length&&r.forEach((e=>{const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,document.head.appendChild(t)}))}}))}))})(r),Nt()}catch(e){console.error("20mn> Error while loading posts:",e)}};return e.useEffect((()=>{l&&d(),(e=>{const t=e.some((({content:e})=>Object.values(e?.entityMap||{}).some((({type:e,data:t})=>"iframely"===e&&"idalgo"===t?.embedProps?.meta?.site&&"widget"===t?.embedProps?.meta?.type))));t&&(window?.iDalgoLoader?window.iDalgoLoader.init():Lt({name:"widget_live-posts",src:"https://20minutes.idalgo-hosting.com/partners/i/cache/datasport/cache/page/r_js_jlu_url.php",load:"async"}))})(a),zy()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useEffect((()=>{Ry(),jy(),zy()}),[a,r,l,i]),e.useMemo((()=>({isLoading:l,posts:a,hasNextPage:i,onLoadMore:u})),[l,a,i,u])},Ky=({isSSR:t=!0,posts:r,variablesForQuery:n,seeMoreLink:i,staticHydrationDataName:o="livePostsContainer",disableAds:a,...s})=>{const{isLoading:l,posts:c,hasNextPage:u,onLoadMore:d}=Uy({defaultPosts:r,defaultVariablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(Kb,{...s,posts:c,variablesForQuery:n,disableAds:a,seeMoreLink:u?{...i,disabled:l,onClick:d}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({[o]:{posts:bb(c),variablesForQuery:n,seeMoreLink:i,disableAds:a,...s}})} };`}}))},$y=()=>{const[t,r]=e.useState(null),[n,i]=e.useState(0),o=document.getElementById("tabpanel-le-direct"),a=document.getElementById("tabpanel-temps-forts");let s=o?.querySelector("div[data-state]")?.dataset?.latestPostId;const{state:l,brandId:c,liveId:u}=o?.querySelector("div[data-state]")?.dataset??{},d=()=>{const{apiHost:e}=document.body.dataset,t=new Headers;return window.envVariables?.apiAuthKey&&t.append("auth-key",window.envVariables.apiAuthKey),[{url:`${e}/?id=getLivePosts&variables=${encodeURIComponent(JSON.stringify({brandId:c,liveId:u,first:20}))}`,options:{headers:t}}]},p=async()=>{const e=d();try{const t=await Rt(...e);let r=0;t?.brand?.node?.live?.node?.livePosts?.edges?.every((e=>e?.node?.legacy_id!==Number(s)&&(r+=1,!0))),i(r)}catch(e){console.error("20mn> Error while refreshing refresh button counter:",e)}},f=()=>{const e=document.querySelector('[data-tabs-name="live-tabs"]'),t=document.getElementById("tab-le-direct"),r=document.getElementById("tabpanel-le-direct");if(e){const n=e.querySelectorAll(".c-tab"),i=e.querySelectorAll(".c-tabpanel");n.forEach((e=>{e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")})),i.forEach((e=>{e.setAttribute("aria-hidden","true")})),t&&(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),r&&r.setAttribute("aria-hidden","false")}};e.useEffect((()=>{l===ny.open&&c&&s&&u?setInterval(p,6e4):console.info("Do not check for new post, live is either closed or miss information.")}),[]),e.useEffect((()=>{if(r(n>0?`Actualiser (${n})`:"Actualiser"),window.layout!==Bt.MOBILE){const e=document.title.replace(/^\(\+?[0-9]+\) /,"");document.title=n>9?`(+${n}) ${e}`:n>0?`(${n}) ${e}`:e}}),[n]);const h=e.useCallback((()=>{xt({name:"refresh_content",type:"action",customProps:{cta_context:"content",cta_type:"button",cta_destination:window.location.href,cta_engagement:1}}),(async()=>{f();const t=d();try{const r=[],n=[],i=await Rt(...t);let l=Vy(i,document.querySelector("body")?.dataset.staticHost),c=0;if(l?.every((e=>e.id.toString()!==s&&(c+=1,!0))),0===c)return void window.location.reload();f();const u=document.getElementById("tabpanel-le-direct")?.querySelectorAll(".js-post").length||0,d=u+c;l=l.slice(0,c),l.reverse(),l?.every(((t,i)=>{const o=i+u,a=Pa.renderToStaticMarkup(e.createElement(Vb,{key:t.id,post:t,postIndex:o,postsCount:d,layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint}));return r.push(a),"crucial"===t.title.status&&n.push(a),!0}));const p=a?.firstChild;if(p instanceof HTMLElement&&p.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=n.reverse().join("");e.lastChild;)p.prepend(e.lastChild)}const h=o?.firstChild;if(h instanceof HTMLElement&&h.firstChild instanceof HTMLElement){const e=document.createElement("div");for(e.innerHTML=r.reverse().join("");e.lastChild;)h.prepend(e.lastChild);const t=l.reverse()[0];if(t){const e=t.id.toString();s=e,o?.querySelector("div[data-state]")?.setAttribute("data-latest-post-id",e)}zy(),Nt()}}catch(e){console.error("20mn> Error while loading more live posts:",e)}})().then((()=>{i(0);const e=document.getElementById("live-posts-container")?.getBoundingClientRect();e&&window.scrollBy(0,e.top-100)}))}),[]);return t?e.createElement(Or,{justifyContent:"center",mb:"xxl"},e.createElement(sr,{variant:"secondary",iconProps:{name:"refresh",size:22},onClick:h},t)):null},Gy=e=>{let t;return e?.forEach((e=>{const r=[{title:"Ain",value:"ain"},{title:"Aisne",value:"aisne"},{title:"Allier",value:"allier"},{title:"Alpes-de-Haute-Provence",value:"alpes_de_haute_provence"},{title:"Alpes-Maritimes",value:"alpes-maritimes"},{title:"Ardèche",value:"ardeche"},{title:"Ardennes",value:"ardennes"},{title:"Ariège",value:"ariege"},{title:"Aube",value:"aube"},{title:"Aude",value:"aude"},{title:"Aveyron",value:"aveyron"},{title:"Bas-Rhin",value:"bas_rhin"},{title:"Bouches-du-Rhône",value:"bouches-rhone"},{title:"Calvados",value:"calvados"},{title:"Cantal",value:"cantal"},{title:"Charente",value:"charente"},{title:"Charente-Maritime",value:"charente-maritime"},{title:"Cher",value:"cher"},{title:"Correze",value:"correze"},{title:"Corse-du-Sud",value:"corse-sud"},{title:"Côte-d'Or",value:"cote_d_or"},{title:"Côtes-d'Armor",value:"cotes_d_armor"},{title:"Creuse",value:"creuse"},{title:"Deux-Sèvres",value:"deux-sevres"},{title:"Dordogne",value:"dordogne"},{title:"Doubs",value:"doubs"},{title:"Drôme",value:"drome"},{title:"Essonne",value:"essonne"},{title:"Eure",value:"eure"},{title:"Eure-et-Loir",value:"eure_et_loire"},{title:"Finistère",value:"finistere"},{title:"Gard",value:"gard"},{title:"Gers",value:"gers"},{title:"Gironde",value:"gironde"},{title:"Guadeloupe",value:"guadeloupe"},{title:"Guyane",value:"guyane"},{title:"Haut-Rhin",value:"haut-rhin"},{title:"Haute-Corse",value:"haute-corse"},{title:"Haute-Garonne",value:"haute-garonne"},{title:"Haute-Loire",value:"haute-loire"},{title:"Haute-Marne",value:"haute-marne"},{title:"Haute-Saône",value:"haute-saone"},{title:"Haute-Vienne",value:"haute-vienne"},{title:"Hautes-Alpes",value:"hautes-alpes"},{title:"Hautes-Pyrénées",value:"hautes_pyrenees"},{title:"Hauts-de-Seine",value:"hauts-de-seine"},{title:"Hérault",value:"herault"},{title:"Ille-et-Vilaine",value:"ille_et_vilaine"},{title:"Indre",value:"indre"},{title:"Indre-et-Loire",value:"indre-loire"},{title:"Isère",value:"isere"},{title:"Jura",value:"jura"},{title:"Landes",value:"landes"},{title:"Loir-et-Cher",value:"loir-cher"},{title:"Loire",value:"loire"},{title:"Loire-Atlantique",value:"loire-atlantique"},{title:"Loiret",value:"loiret"},{title:"Lot",value:"lot"},{title:"Lot-et-Garonne",value:"lot_et_garonne"},{title:"Lozère",value:"lozere"},{title:"Maine-et-Loire",value:"maine-et-loire"},{title:"Manche",value:"manche"},{title:"Marne",value:"marne"},{title:"Martinique",value:"martinique"},{title:"Mayenne",value:"mayenne"},{title:"Mayotte",value:"mayotte"},{title:"Meurthe-et-Moselle",value:"meurthe-et-moselle"},{title:"Meuse",value:"meuse"},{title:"Morbihan",value:"morbihan"},{title:"Moselle",value:"moselle"},{title:"Nièvre",value:"nievre"},{title:"Nord",value:"nord"},{title:"Oise",value:"oise"},{title:"Orne",value:"orne"},{title:"Paris",value:"paris"},{title:"Pas-de-Calais",value:"pas-de-calais"},{title:"Puy de Dôme",value:"puy-dome"},{title:"Pyrénées-Atlantiques",value:"pyrenees-atlantiques"},{title:"Pyrénées-Orientales",value:"pyrenees_orientales"},{title:"Rhône",value:"rhone"},{title:"Saône-et-Loire",value:"saone_et_loire"},{title:"Sarthe",value:"sarthe"},{title:"Savoie",value:"savoie"},{title:"Seine-et-Marne",value:"seine-et-marne"},{title:"Seine-Maritime",value:"seine_maritime-1"},{title:"Seine-Saint-Denis",value:"seine-saint-denis"},{title:"Somme",value:"somme"},{title:"Tarn",value:"tarn"},{title:"Tarn-et-Garonne",value:"tarn_et_garonne"},{title:"Territoire de Belfort",value:"territoire-belfort"},{title:"Val-d'Oise",value:"val_d_oise"},{title:"Val-de-Marne",value:"val-de-marne"},{title:"Var",value:"var"},{title:"Vaucluse",value:"vaucluse"},{title:"Vendée",value:"vendee"},{title:"Vienne",value:"vienne-france"},{title:"Vosges",value:"vosges"},{title:"Yonne",value:"yonne"},{title:"Yvelines",value:"yvelines"}].find((t=>t.value===e?.node?.slug));r&&(t=r)})),t?t.title:""},Wy=t=>{const[r,n]=e.useState(t.defaultArticles),[i,o]=e.useState(!1),[a,s]=e.useState("locales"),[l,c]=e.useState(t.defaultSeeMoreLink.href),u=e.useCallback((e=>{s(e.target.value),o(!0)}),[s,o]),d=async()=>{const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getHomeLocalNews&variables=${encodeURIComponent(JSON.stringify({...t.variablesForQuery,slug:a}))}`,options:{headers:r}}];try{const e=await Rt(...i),t=(({data:e,pageEndpoint:t})=>(e?.brand?.node?.tag?.node?.publishableContents?.edges||[])?.reduce(((e,r)=>{if(r?.node?.rubric?.node?.label&&r?.node?.title&&r?.node?.url&&r?.node?.tags?.edges){const n=r.node.tags.edges.filter(uy);e.push({link:new URL(r.node.url,t).href,title:Et(r?.node?.short_title||r.node.title),cardHeaderProps:{headline:{text:r?.node?.label||r.node.rubric.node.label},location:Gy(n)},socialBarProps:{commentCount:r.node?.comments_count??0,shareCount:(r.node?.facebook_count??0)+(r.node?.pinterest_count??0),contentId:r.node?.legacy_id?.toString()}})}return e}),[]))({data:e,pageEndpoint:window.envVariables.pageEndpoint});c(new URL(e?.brand?.node?.tag?.node?.url_current??"",window.envVariables.pageEndpoint).href),n(t)}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect((()=>{i&&d()}),[i]),e.useEffect((()=>{i&&o(!1)}),[r]),e.useMemo((()=>({isLoading:i,articles:r,tagUrl:l,onDepartmentChange:u})),[r,i,l,u])},Zy=({isSSR:t=!0,articles:r,variablesForQuery:n,seeMoreLink:i,selectProps:o,...a})=>{const{isLoading:s,articles:l,tagUrl:c,onDepartmentChange:u}=Wy({defaultArticles:r,defaultSeeMoreLink:i,variablesForQuery:n});return e.createElement(e.Fragment,null,e.createElement(Hb,{...a,articles:l,variablesForQuery:n,seeMoreLink:{href:c},selectProps:{...o,disabled:s,onChange:u}}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({localNewsContainer:{articles:l,variablesForQuery:n,selectProps:o,seeMoreLink:i,...a}})} };`}}))},Qy=t=>{const[r,n]=e.useState(t.defaultTabItems),i=async()=>{if(t.variablesForQuery.rubric){const{apiHost:e}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const i=[{url:`${e}/?id=getMostRead&variables=${encodeURIComponent(JSON.stringify({brandId:t.variablesForQuery.brandId,sourceExcluded:t.variablesForQuery.sourceExcluded,rubricId:t.variablesForQuery.rubric.id}))}`,options:{headers:r}}];try{const e=(({data:e,pageEndpoint:t,imgEndpoint:r,rubricSlug:n,rubricLabel:i})=>{if(Array.isArray(e))return[];const o=[],a=e?.brand?.node,s=a?.commonArticles?.edges,l=a?.rubricArticles?.edges;if(s?.length){const e=qy({name:"plus-lus",title:"Les + lus",pageEndpoint:t,articleEdges:s,limit:3});o.push(e)}if(l?.length){const e=qy({name:`plus-lus-${n}`,title:`Les + lus ${i}`,pageEndpoint:t,articleEdges:l,limit:3});o.push(e)}return o})({data:await Rt(...i),pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,rubricSlug:t.variablesForQuery.rubric.slug,rubricLabel:t.variablesForQuery.rubric.label});n(e),ht()}catch(e){console.error("20mn> Error while loading tabItems:",e)}}};return e.useEffect((()=>{i()}),[]),e.useMemo((()=>({tabItems:r})),[r])},Jy=({isSSR:t=!0,layout:r,tabItems:n,variablesForQuery:i,...o})=>{const{tabItems:a}=Qy({defaultTabItems:n,variablesForQuery:i});return e.createElement(e.Fragment,null,e.createElement($b,{layout:r,tabItems:a,variablesForQuery:i,...o}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({mostReadContainer:{layout:r,tabItems:n,variablesForQuery:i,...o}})} };`}}))},Yy=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultMovies),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getMoviesData&variables=${encodeURIComponent(JSON.stringify({status:t.defaultVariablesForQuery.status,cursor:r,orderField:oy.EXPECTATION_LEVEL,orderDirection:ay.DESC}))}`,options:{headers:i}}];try{const e=await Rt(...a),{staticHost:t}=document.body.dataset,r=((e,t)=>Array.isArray(e)?[]:e?.movies?.edges?.map((e=>{const r=e?.node,n=r?.movieCastings?.edges?.find((e=>"Réalisateur"===e?.node?.position));return{link:r?.article_url||"#",title:r?.title_fr||"",cardImageProps:{cover:(r?.movieMedias?.edges?.length??0)>0?`${t}/movies/posters/${r?.movieMedias?.edges?.[0]?.node?.src?.replace("-%format","")??""}`:""},summary:r?.summary_short||"",castings:r?.movieCastings?.edges?.filter((e=>"cast"===e?.node?.type)).map((e=>`${e?.node?.firstname} ${e?.node?.lastname}`))??[],genres:r?.genres?.filter((e=>null!==e))||[],directedBy:n?`${n?.node?.firstname} ${n?.node?.lastname}`:void 0,releaseDate:r?.release_date?Lb(new Date(r.release_date)):"",seeMoreLink:{children:"Voir la fiche du film",href:r?.article_url||"#"}}}))||[])(e,t);s((e=>[...e,...r||[]])),n(e?.movies?.pageInfo?.endCursor??null),o(e?.movies?.pageInfo?.hasNextPage??!1),Nt()}catch(e){console.error("20mn> Error while loading posts:",e)}};return e.useEffect((()=>{l&&d()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useMemo((()=>({isLoading:l,items:a,hasNextPage:i,onLoadMore:u})),[l,a,i,u])},Xy=({isSSR:t=!0,layout:r,items:n,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,items:s,hasNextPage:l,onLoadMore:c}=Yy({defaultMovies:n,defaultVariablesForQuery:i});return e.useEffect((()=>{a||ey()}),[a]),e.createElement(e.Fragment,null,e.createElement(Gb,{layout:r,items:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({moviesListContainer:{layout:r,items:s,variablesForQuery:i,seeMoreButton:o}})} };`}}))},e_=t=>{const[r,n]=e.useState(t.defaultVariablesForQuery.endCursor),[i,o]=e.useState(t.defaultVariablesForQuery.hasNextPage),[a,s]=e.useState(t.defaultArticles),[l,c]=e.useState(!1),u=e.useCallback((()=>{c(!0)}),[c]),d=async()=>{const{apiHost:e}=document.body.dataset,i=new Headers;window.envVariables?.apiAuthKey&&i.append("auth-key",window.envVariables.apiAuthKey);const a=[{url:`${e}/?id=getProgramVideos&variables=${encodeURIComponent(JSON.stringify({brandId:t.defaultVariablesForQuery.brandId,slug:t.defaultVariablesForQuery.slug,first:t.defaultVariablesForQuery.first,after:r}))}`,options:{headers:i}}];try{const e=await Rt(...a),t=(({pageEndpoint:e,imgEndpoint:t,layout:r,data:n})=>n?.map((n=>({title:n?.title||"",cardHeaderProps:void 0,cardImageProps:{cover:sy({medias:n?.medias||[],imgEndpoint:t}),caption:{size:"big",iconName:"video",text:St(Number(n?.video?.node?.duration))},lazyLoad:!0},link:new URL(n?.url_current||"",e).href,reverseCard:r===Bt.MOBILE||void 0}))))({layout:window.layout,pageEndpoint:window.envVariables.pageEndpoint,imgEndpoint:window.envVariables.imgEndpoint,data:e?.brand?.node?.tag?.node?.publishableContents?.edges?.map((e=>e?.node)).filter((e=>void 0!==e))??[]});s((e=>[...e,...t])),n(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.endCursor??null),o(e?.brand?.node?.tag?.node?.publishableContents?.pageInfo?.hasNextPage??!1),Nt()}catch(e){console.error("20mn> Error while loading articles:",e)}};return e.useEffect((()=>{l&&d()}),[l]),e.useEffect((()=>{l&&c(!1)}),[a]),e.useEffect((()=>{At()}),[]),e.useMemo((()=>({isLoading:l,articles:a,hasNextPage:i,onLoadMore:u})),[a,l,i,u])},t_=({isSSR:t=!0,layout:r,articles:n,variablesForQuery:i,seeMoreButton:o})=>{const{isLoading:a,articles:s,hasNextPage:l,onLoadMore:c}=e_({defaultArticles:n,defaultVariablesForQuery:i});return e.useEffect((()=>{a||ey()}),[a]),e.createElement(e.Fragment,null,e.createElement(Wb,{layout:r,articles:s,seeMoreButton:l?{...o,disabled:a,onClick:c}:void 0}),t&&e.createElement("script",{dangerouslySetInnerHTML:{__html:`window.__staticHydrationData = { ...(window.__staticHydrationData || {}), ...${JSON.stringify({videoListContainer:{layout:r,articles:s,variablesForQuery:i,seeMoreButton:o}})} };`}}))},r_=(r,n)=>{const i=document.getElementById(r),o=n?window?.__staticHydrationData?.liveImportantPostsContainer:window?.__staticHydrationData?.livePostsContainer,a=n?"liveImportantPostsContainer":"livePostsContainer";if(i&&o){const r=t.createRoot(i);r&&r.render(e.createElement(Ky,{isSSR:!1,staticHydrationDataName:a,...o,posts:yb(o?.posts),variablesForQuery:o.variablesForQuery}))}},n_=(e,t,r,n)=>{r&&n?e.setAttribute(t,n):e.removeAttribute(t)};var i_=()=>{(()=>{const e=document.querySelector("form#contact-form");if(!e)return;const t=e.querySelector("select#service"),r=e.querySelector("select#subservice"),n=r?.parentElement?.parentElement,i=e.querySelector("select#common-object"),o=i?.parentElement?.parentElement,a=e.querySelector("select#tech-object"),s=a?.parentElement?.parentElement,l=e.querySelector("textarea#message"),c=e.querySelector("select#source"),u=c?.parentElement?.parentElement,d=e.querySelector("select#games-object"),p=d?.parentElement?.parentElement,f={"probleme-ordinateur":"Votre message. Veuillez préciser votre navigateur.","probleme-mobile":"Votre message. Veuillez préciser votre navigateur et l’appareil que vous utilisez.","probleme-app":"Votre message. Veuillez préciser l’appareil que vous utilisez."},h={"suppression-anonymisation":"Dans votre message, merci d'indiquer votre objet, nom / prénom, adresse mail et adresse URL vers l'article concerné si besoin.",jeux:"Ecrivez votre message en précisant votre appareil, le navigateur utilisé ainsi que les jeux concernés.",newsletter:"Ecrivez votre message en précisant la date et/ou le nom de la newsletter concernée."},m=t?.selectedOptions?.[0]?.hidden,g=t?.selectedOptions?.[0]?.value;n&&n_(n,"style",m||"redaction"!==g,"display: none"),o&&n_(o,"style",m||"redaction"!==g,"display: none"),s&&n_(s,"style",m||"service-technique"!==g,"display: none"),p&&n_(p,"style",m||"jeux"!==g,"display: none"),u&&n_(u,"style",m||"jeux"!==g,"display: none"),t?.addEventListener("change",(e=>{const{target:t}=e;if(!(t instanceof HTMLSelectElement))return;const{value:f}=t,h="service-technique"===f,m="jeux"===f,g="redaction"===f;r&&n_(r,"required",g),i&&n_(i,"required",g),a&&n_(a,"required",h),d&&n_(d,"required",m),c&&n_(c,"required",m),n&&n_(n,"style",!g,"display: none"),o&&n_(o,"style",!g,"display: none"),s&&n_(s,"style",!h,"display: none"),p&&n_(p,"style",!m,"display: none"),u&&n_(u,"style",!m,"display: none"),l?.setAttribute("placeholder","Votre message.")})),a?.addEventListener("change",(e=>{const{target:t}=e;if(!(t instanceof HTMLSelectElement))return;const{value:r}=t;l?.setAttribute("placeholder",f[r]??"Votre message.")})),t?.addEventListener("change",(e=>{const{target:t}=e;if(!(t instanceof HTMLSelectElement))return;const{value:r}=t;l?.setAttribute("placeholder",h[r]??"Votre message.")}))})(),(()=>{const e=document.querySelector("form#contact-form");e&&e.addEventListener("submit",(t=>{t.preventDefault();const r=new FormData(e),n=r.get("message")?.toString().trim(),i=r.get("email")?.toString().trim(),o=r.get("service")?.toString().trim(),a=r.get("subservice")?.toString().trim(),s=r.get("common-object")?.toString().trim(),l=r.get("tech-object")?.toString().trim(),c=r.get("games-object")?.toString().trim(),u=r.get("source")?.toString().trim();if(!(i&&o&&n&&("redaction"!==o||a&&s))||"service-technique"===o&&!l||"jeux"===o&&!c&&!u)return void alert("Tous les champs obligatoires doivent être remplis.");let d,p=null;switch(o){case"redaction":{d=s;const e=document.querySelector(`option[value=${d}]`);e&&(p=e.text);break}case"jeux":{d=c;const e=document.querySelector(`option[value=${d}]`);e&&(p=u?`${e.text} (source: ${u})`:e.text);break}case"service-technique":{d=l;const e=document.querySelector(`option[value=${d}]`);e&&(p=e.text);break}}const f=document.querySelector("#li-antibot-token");if(!(f&&f instanceof HTMLInputElement))return void alert("Vous devez valider le captcha.");const h={antibotToken:f.value,service:o,email:i,message:n,object:p,objectId:d||null,accessSource:u?.includes("app-")?"apps":"site"},m=document.body.getAttribute("data-http-taskrunner-api-host");fetch(`${m}/contact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)}).then((e=>e.json())).then((e=>{e.success?(alert("Votre email a bien été envoyé à nos services."),window.location.reload()):alert("Merci de valider le captcha afin d'envoyer votre message.")})).catch((e=>{console.error("Error:",e)}))}))})()};const o_=()=>document.querySelector('iframe[src*="www.ultimedia.com"], iframe[data-src*="www.ultimedia.com"]'),a_=()=>{if(window.layout===Bt.MOBILE){try{Ot(Tt.DIGITEKA_VIDEO_FEED)}catch(e){e instanceof Error&&console.error(e.message)}const e=document.createElement("script");e.type="text/javascript",e.innerHTML='MDTK_videofeed = "01100132";',document.querySelector('div[class*="c-content"] iframe[data-src*="www.ultimedia.com"], div[class*="c-content"] iframe[src*="www.ultimedia.com"]')&&(e.innerHTML+="CARROUSEL_videofeed=true;"),document.body.appendChild(e)}};var s_=()=>{(()=>{const e=o_(),t=window.datalayerInfo;if(e&&t){const t=`category=${Di("category")}&sub_category=${Di("subcategory")}&tags=${Di("tags")}&content_id=${Di("content_id")}&brand_safety=${Di("brand_safety")}&page_type=${Di("page_type")}&pos=instream`;e.setAttribute("src",`${e.getAttribute("src")}?tagparam=${encodeURIComponent(t)}`)}})(),a_(),(()=>{const e=document.getElementById("videos-top-block"),t=o_();t&&window.datalayerInfo?.pageName===Ti.VIDEOS&&e&&window.addEventListener("message",(async r=>{if("string"==typeof r?.data&&r.data.startsWith("video_id_")){const n=r.data.replace("video_id_","");if(!t.src?.includes(n)){const{apiHost:t}=document.body.dataset,r=new Headers;window.envVariables?.apiAuthKey&&r.append("auth-key",window.envVariables.apiAuthKey);const n=[{url:`${t}/?id=getPageByExternalId&variables=${encodeURIComponent(JSON.stringify({brandId:fb("Brand","20minutes"),externalId:"qkvu8qz"}))}`,options:{headers:r}}],i=await Rt(...n),o=i?.brand?.node?.video?.node?.page?.node,a=e.querySelector("h2 a"),s=e.querySelector("p");o?.title&&o?.url_current&&o?.content_blocks&&a&&s&&(a.setAttribute("href",o.url_current),a.text=o.title,s.innerHTML=gb({rawDraftContent:o.content_blocks,withCmp:!1}))}}}),!1)})()};const l_=()=>{const e=Array.from(document.querySelectorAll('[data-script-loading="lazy"]'));e.length>0&&(e.forEach((e=>{const t=document.createElement("script");t.type="text/javascript",t.innerHTML=e.innerHTML.replace(/"|&/g,(e=>"""===e?'"':"&")),t.innerHTML=t.innerHTML.replace(/'/g,"'"),e.after(t),e.remove()})),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>{e.getCurrentUserStatus().purposes["activation-gGierZpp"].enabled?(Array.from(document.getElementsByClassName("cmp-placeholder")).forEach((e=>{e.classList.add("u-hidden")})),Array.from(document.getElementsByClassName("embed-wrapper")).forEach((e=>{e.classList.remove("u-hidden"),e.querySelectorAll("[data-src]").forEach((e=>{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.removeAttribute("data-src"))}))}))):Array.from(document.getElementsByClassName("cmp-placeholder")).forEach((e=>{e.classList.remove("u-hidden")}))})))};var c_=()=>{(()=>{if(document.querySelector(".gcse-search")&&window.envVariables?.googleSearchCode)try{Ot(Tt.GOOGLE_SEARCH)}catch(e){e instanceof Error&&console.error(e.message)}})()};let u_,d_;const p_=e=>{u_&&("show"===e?(u_.classList.remove("c-header-mini--is-hidden"),d_?.classList?.add("c-menu--with-header-mini")):(u_.classList.add("c-header-mini--is-hidden"),d_?.classList?.remove("c-menu--with-header-mini")))},f_=e=>{const t=e[0];u_&&(t.isIntersecting?p_("hidden"):p_("show"))};let h_;let m_=0;const g_=e=>{if(!h_)return;const t=document.querySelector("button.c-btn--close:not(.u-hidden)"),r=document.getElementById("live-refresh-button");if("show"===e)return h_.classList.remove("c-header-mobile--is-hidden"),t&&t.classList.add("c-btn--close-is-below-header"),void(r&&(r.classList.remove("u-sticky--spaced-top-screen"),r.classList.add("u-sticky--spaced-header-mobile")));h_.classList.add("c-header-mobile--is-hidden"),t&&t.classList.remove("c-btn--close-is-below-header"),r&&(r.classList.add("u-sticky--spaced-top-screen"),r.classList.remove("u-sticky--spaced-header-mobile"))},v_=()=>{h_=document.querySelector(".c-header-mobile"),h_&&window.addEventListener("scroll",(()=>{window.scrollY<780?g_("show"):(()=>{const e=window.scrollY;g_(e>m_?"hidden":"show"),m_=e})()}))},b_=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)},y_=(e,t)=>{e.forEach((e=>{if(e.isIntersecting&&e.target instanceof HTMLElement){const{target:r}=e,n=r.id,i=r.dataset?.eventName;(n||i)&&(r.dataset.lazyLoaded="true",t.unobserve(r),i?(document.dispatchEvent(new CustomEvent(i,{detail:{target:r}})),console.log(`20minLazyCall: element event name %c${i}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")):n&&(r.dispatchEvent(new Event(n)),console.log(`20minLazyCall: element with id %c${n}%c has been lazy loaded`,"color: #0777;font-weight:bold;","color: black")))}}))},__=()=>{window.lazyObservers={},window.lazyObservers.defaultObserver=new IntersectionObserver(y_,{rootMargin:"700px",threshold:0}),window.lazyObservers.instantObserver=new IntersectionObserver(y_,{rootMargin:"0px",threshold:0});[].forEach((e=>{b_(e)})),document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name]):not([data-lazy-loaded="true"])').forEach((e=>{b_(e)}))};let w_,E_=0;const S_=()=>{const e=document.querySelector("div.c-read-also-banner"),t=document.querySelector("button.c-btn--close");if(e){if(e.classList.remove("u-hidden"),(()=>{const e=[],t=document.querySelectorAll('div[id^="taboola-below-article"]');return!!t&&(t.forEach(((t,r)=>{const{top:n}=t.getBoundingClientRect();e[r]=n<=180})),!!e.find((e=>!0===e)))})())return void e.classList.add("c-read-also-banner--is-hidden");w_="down",document.body.getBoundingClientRect().top>E_&&(w_="up"),E_=document.body.getBoundingClientRect().top;const r=e.dataset.bannerLimitTop||"0";"up"===w_&&-document.body.getBoundingClientRect().top>=parseInt(r,10)&&(e.classList.remove("c-read-also-banner--is-hidden"),t&&(t.style.top="211px")),("down"===w_||-document.body.getBoundingClientRect().top<=parseInt(r,10))&&(e.classList.add("c-read-also-banner--is-hidden"),t&&(window.scrollY>780?t.style.top="20px":t.style.top=""))}},x_=()=>{const{refreshInterval:e}=document.body.dataset;Number(e)>0&&((e,t)=>{let r;const n=1e3*t,i=()=>{clearTimeout(r),r=setTimeout(e,n)};document.addEventListener("click",i),document.addEventListener("keypress",i),document.addEventListener("scroll",i),i()})((()=>{window.location.reload()}),Number(e))};ht(),Ft(),__(),l_(),(()=>{const e=document.querySelector("div#dfp_header_ad"),t=document.querySelector("div#taboola-below-article-thumbnails");e&&t&&new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting?e.style.visibility="hidden":e.style.visibility="visible"}))})).observe(t)})(),kt(),Dt(),vt(),(()=>{const r=document.getElementById("c-alert-info");if(r){const n=t.createRoot(r);n&&n.render(e.createElement(my,null))}})(),(()=>{if(u_=document.querySelector(".c-header-mini"),u_){const e=document.documentElement.scrollTop,t=document.querySelector(".c-header");d_=document.querySelector(".c-menu"),t&&(e>t.offsetHeight?p_("show"):p_("hidden"),new IntersectionObserver(f_,{threshold:[0],rootMargin:"0px 0px -100%"}).observe(t))}})(),(()=>{const r=document.getElementById("tabpanel-le-direct"),n=document.getElementById("live-refresh-button");if(r&&n){const r=t.createRoot(n);r&&r.render(e.createElement($y,null))}})(),x_(),c_(),s_(),navigator.serviceWorker.getRegistrations().then((e=>{e.forEach((e=>{e.active?.scriptURL?.endsWith("/sw.js")&&e.unregister()}))})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({user_status:"{}"!==bt("20mnUserInfo")?"Connecte":"Pas connecte",an:document.referrer,referrer:document.referrer,darkmode:"dark"===document.documentElement.getAttribute("data-theme"),page_uri:window.datalayerInfo?.pageUri}),v_(),((e=document.querySelector("div.c-read-also-banner"))=>{e&&(e.classList.add("c-read-also-banner--is-hidden"),e.classList.add("u-hidden"),window.addEventListener("scroll",(()=>{S_()})))})(),(()=>{const r=document.getElementById("archive-pdf-list-container"),n=window?.__staticHydrationData?.archivePdfListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Xb,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("article-list-bottom-container"),n=window?.__staticHydrationData?.articleListBottomContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(py,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("journalist-article-list-container"),n=window?.__staticHydrationData?.journalistArticleListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Sy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("home-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeHomeContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Iy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("department-legal-notice-list-container"),n=window?.__staticHydrationData?.legalNoticeDepartmentContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Oy,{isSSR:!1,...n}))}})(),r_("tabpanel-le-direct"),r_("tabpanel-temps-forts",!0),(()=>{const r=document.getElementById("local-news-container"),n=window?.__staticHydrationData?.localNewsContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Zy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("latest-articles-container"),n=window?.__staticHydrationData?.latestArticlesContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(ky,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("live-and-most-read-container"),n=window?.__staticHydrationData?.liveAndMostReadContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Fy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("most-read-container"),n=window?.__staticHydrationData?.mostReadContainer;if(r&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<(new Date).getTime()){const i=t.createRoot(r);i&&i.render(e.createElement(Jy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("latest-contents-carousel-container"),n=window?.__staticHydrationData?.latestContentsCarouselContainer;if(r&&n&&n.variablesForQuery?.builtAt&&n.variablesForQuery.builtAt+36e5<(new Date).getTime()){const i=t.createRoot(r);i&&i.render(e.createElement(Ty,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-form-container"),n=window?.__staticHydrationData?.electionsSearchBannerContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Mb,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-european-map-container"),n=window?.__staticHydrationData?.electionsEuropeanMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(wy,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("elections-constituencies-map-container"),n=window?.__staticHydrationData?.electionsConstituenciesMapContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(by,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("video-list-container"),n=window?.__staticHydrationData?.videoListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(t_,{isSSR:!1,...n}))}})(),(()=>{const r=document.getElementById("movies-container"),n=window?.__staticHydrationData?.moviesListContainer;if(r&&n){const i=t.createRoot(r);i&&i.render(e.createElement(Xy,{...n,isSSR:!1}))}})(),(()=>{if(!document.querySelector("#contact-form"))return;const e=document.body.getAttribute("data-http-taskrunner-api-host"),t=window.sessionStorage.getItem("antibotId")||"";e?fetch(`${e}/captcha`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({antibotId:t})}).then((e=>e.json())).then((e=>{if(!e)return;const{captchaServerAntibotId:t,requestId:r}=e.body||{};t&&r&&(window.LI_ANTIBOT.loadAntibot(["IMAGE","QUESTION","FR","abuUFfA+tOvM","https://captcha.liveidentity.com/captcha",null,"https://static.20mn.fr/apps/20minutes/styles/captcha-override.css",t,r,!0]),window.sessionStorage.setItem("antibotId",t))})).catch((e=>{console.error("Error:",e)})):console.error("Error: goomUri is not defined")})(),i_(),window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((e=>window.__tcfapi("addEventListener",2,qt(e)))),Pt(),Mt()}(React,ReactDOMClient);
|
|
43
|
+
//# sourceMappingURL=main.min.js.map
|