@20minutes/tyr 2.24.3 → 2.24.4

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/index.es.js CHANGED
@@ -56148,7 +56148,7 @@ const pu = /* @__PURE__ */ cE(gK), ib = ({
56148
56148
  "script",
56149
56149
  {
56150
56150
  type: "text/javascript",
56151
- src: p.js,
56151
+ "data-src": p.js,
56152
56152
  "data-wlpp-bundle": u ?? "portal"
56153
56153
  }
56154
56154
  ))) : !u || !d ? null : /* @__PURE__ */ e.createElement(D7, null, /* @__PURE__ */ e.createElement("div", { id: "loginwall" }, /* @__PURE__ */ e.createElement("link", { rel: "stylesheet", href: p.css }), v.includes(r) ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
@@ -56163,7 +56163,7 @@ const pu = /* @__PURE__ */ cE(gK), ib = ({
56163
56163
  "script",
56164
56164
  {
56165
56165
  type: "text/javascript",
56166
- src: p.js,
56166
+ "data-src": p.js,
56167
56167
  "data-wlpp-bundle": u ?? "portal"
56168
56168
  }
56169
56169
  )) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
@@ -56174,7 +56174,14 @@ const pu = /* @__PURE__ */ cE(gK), ib = ({
56174
56174
  "data-gametype": u === "portal" ? d : `CG_${d}`,
56175
56175
  "data-puzzleid": u === "portal" ? `${d}_today` : `CG_${d}`
56176
56176
  }
56177
- ), /* @__PURE__ */ e.createElement("script", { type: "text/javascript", "data-wlpp-bundle": "player", src: p.js }))));
56177
+ ), /* @__PURE__ */ e.createElement(
56178
+ "script",
56179
+ {
56180
+ type: "text/javascript",
56181
+ "data-wlpp-bundle": "player",
56182
+ "data-src": p.js
56183
+ }
56184
+ ))));
56178
56185
  }, O7 = ({ games: r, ...n }) => /* @__PURE__ */ e.createElement(pe, { direction: "column", gap: "m", ...n }, /* @__PURE__ */ e.createElement(U, { size: { xs: "l", md: "xl" }, weight: "bold" }, r[0].category), r.map((i) => /* @__PURE__ */ e.createElement(
56179
56186
  Qn,
56180
56187
  {
package/dist/index.umd.js CHANGED
@@ -318,7 +318,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
318
318
  Copyright (c) 2018 Jed Watson.
319
319
  Licensed under the MIT License (MIT), see
320
320
  http://jedwatson.github.io/classnames
321
- */var kO;function RV(){return kO||(kO=1,function(t){(function(){var n={}.hasOwnProperty;function a(){for(var d="",c=0;c<arguments.length;c++){var v=arguments[c];v&&(d=u(d,o(v)))}return d}function o(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return a.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var c="";for(var v in d)n.call(d,v)&&d[v]&&(c=u(c,v));return c}function u(d,c){return c?d?d+" "+c:d+c:d}t.exports?(a.default=a,t.exports=a):window.classNames=a})()}(_8)),_8.exports}var ZV=RV();const jl=qb(ZV),Zh=({content:t,pageEndpoint:n,imgEndpoint:a,colorScheme:o="ultramarine",disableLettering:u=!1,subType:d,...c})=>{var v;return e.createElement(q,{...c,className:jl("c-content",{[`c-content--theme-${o}`]:!!o,"c-content--text-with-lettering":!u&&((v=t.blocks[0])==null?void 0:v.text.length)>50})},Ef({rawDraftContent:t,pageEndpoint:n,imgEndpoint:a,subType:d}))},MO=({items:t=[]})=>t!=null&&t.length?e.createElement("div",null,t==null?void 0:t.map((n,a)=>e.createElement(Ls,{key:`bulleted-list-${a}`,...n}))):null,LO=({name:t,description:n,link:a,icon:o,layout:u,...d})=>e.createElement(Rn,{as:"a",href:a,...d},u===Te.MOBILE&&t,e.createElement(pe,{alignItems:{xs:"start",md:"center"},justifyContent:{xs:"center",md:"start"},className:"opacity-hover"},e.createElement(sr,{bg:"white",isRounded:!0,name:o.name,size:o.size||u===Te.DESKTOP&&20||30,color:"grey-900",p:"xs",mr:{xs:"0",md:"xxs"},mb:{xs:"xs",md:"0"}}),u===Te.DESKTOP&&n),u===Te.MOBILE&&n),E8=({iconSize:t,layout:n,...a})=>e.createElement(pe,{...a,bg:"ultramarine",p:{xs:"xxs",md:"xs"},justifyContent:{xs:"evenly",md:"start"}},e.createElement(LO,{basis:{xs:50,md:"auto"},icon:{name:"game",size:t},name:e.createElement(H,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Jeux"),description:e.createElement(H,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir les",n===Te.DESKTOP?e.createElement("br",null):" ","35 jeux"),link:"https://www.20minutes.fr/services/jeux",layout:n,id:"entertainment-item-game"}),e.createElement(Rn,{mx:"m",py:"xs"},e.createElement(Eb,{color:"white"})),e.createElement(LO,{basis:{xs:50,md:"auto"},icon:{name:"horoscope",size:t},name:e.createElement(H,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Horoscope"),description:e.createElement(H,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir mon",n===Te.DESKTOP?e.createElement("br",null):" ","horoscope"),link:"https://www.20minutes.fr/horoscope/",layout:n,id:"entertainment-item-horoscope"})),y8=({faqData:t,pageEndpoint:n})=>e.createElement(e.Fragment,null,t.map(a=>e.createElement(lf,{key:a.index,index:a.index,...a.tag?{textTitleProps:{as:a.tag,size:"xl",my:"xs",children:a.title}}:{headingTitleProps:{as:"h2",size:"xs",my:"xs",children:a.title}},contentWithBorder:!1,bg:"grey-100",btnProps:{py:"xxs-3"},iconProps:{color:"ultramarine"},mb:"l"},e.createElement(Zh,{content:a.children,pageEndpoint:n,disableLettering:!0})))),IO=({enableAccordion:t,items:n,contentProps:a,heading:o={as:"h2"},...u})=>!n||(n==null?void 0:n.length)===0?null:t?e.createElement(Fb,{...u,items:n,contentProps:a}):e.createElement(pe,{direction:"column",gapX:"m",mx:{xs:"m",md:"0"}},n.map(d=>e.createElement(pe,{...u,key:d.title,direction:"column",gapX:"s"},e.createElement(Ye,{size:"xs",color:"black",weight:"semi-bold",...o},d.title),e.createElement(tw,{...a,content:d.content})))),PO=({colorVariant:t="ultramarine",cookieLink:n="/gestion-cookies"})=>e.createElement(q,{className:"cmp-placeholder u-hidden",borderColor:"grey-200",radius:"l",p:"xxl"},e.createElement(Ye,{size:"s",color:t,mb:"xxl",fontFamily:"source-serif-pro",weight:"semi-bold"},"L'accès aux jeux a été bloqué afin de respecter votre consentement"),e.createElement(H,{size:"l",mb:"m"},"En cliquant sur",e.createElement(H,{weight:"bold",as:"span",ml:"xxs"},"« J’accepte »"),", vous acceptez le dépôt de cookies de mesure d'audience, et pourrez ainsi accéder au jeux proposés sur le site de 20 Minutes."),e.createElement(H,{size:"s",mb:"xl"},"Plus d’informations sur la page",e.createElement(H,{color:t,as:"a",href:n,mx:"xxs"},"Politique de gestion des cookies")),e.createElement(an,{className:"cmp-game-button",mx:"auto"},"J'accepte")),N8=({children:t})=>e.createElement("div",{className:"game-placeholder"},e.createElement("div",{className:"game-wrapper u-hidden"},t),e.createElement(PO,null),e.createElement(q,{my:"m",className:"js-game-alert u-hidden"},e.createElement(MF,{variant:"warning",fill:!0,iconProps:{name:"info",size:20},title:"Les jeux ne se chargent pas sur Firefox ?",description:`Vérifiez que la "Protection renforcée contre le pistage" est bien désactivée sur la page, accessible depuis l'icône bouclier, à gauche de l'URL.`}))),x8=({id:t,name:n,type:a,src:o,keesingType:u,keesingGame:d},...c)=>{const v=["puzzle","421","buzz","mots-coupes","ifleches","ironde-des-mots","garam","quiz"],p={player:"https://web.keesing.com/pub/player/v2.25.2/dist/",portal:"https://web.keesing.com/pub/portal/v2.25.2/dist/",js:"https://web.keesing.com/pub/bundle-loader/bundle-loader.js",css:"https://web.keesing.com/pub/config/20minutes/css/custom_client.css"};return o&&v.includes(t)?e.createElement(N8,null,e.createElement("div",{id:"loginwall"},e.createElement(BF,{title:n,htmlIframeProps:{src:o},mb:"l",className:`c-game c-game--${t}`,...c}))):a==="Arcade"&&v.includes(t)?e.createElement(N8,null,e.createElement("div",{id:"loginwall"},e.createElement("link",{rel:"stylesheet",href:p.css}),e.createElement("div",{id:"puzzle-portal",className:`game game-${n}`,"data-customerid":"20minutes","data-gametype":`CG_${d}`,"data-puzzleid":`CG_${d}`,"data-publicpath":u==="player"?p.player:p.portal}),e.createElement("script",{type:"text/javascript",src:p.js,"data-wlpp-bundle":u??"portal"}))):!u||!d?null:e.createElement(N8,null,e.createElement("div",{id:"loginwall"},e.createElement("link",{rel:"stylesheet",href:p.css}),v.includes(t)?e.createElement(e.Fragment,null,e.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-portalview":d??"","data-publicpath":u==="player"?p.player:p.portal}),e.createElement("script",{type:"text/javascript",src:p.js,"data-wlpp-bundle":u??"portal"})):e.createElement(e.Fragment,null,e.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-gametype":u==="portal"?d:`CG_${d}`,"data-puzzleid":u==="portal"?`${d}_today`:`CG_${d}`}),e.createElement("script",{type:"text/javascript","data-wlpp-bundle":"player",src:p.js}))))},w8=({games:t,...n})=>e.createElement(pe,{direction:"column",gap:"m",...n},e.createElement(H,{size:{xs:"l",md:"xl"},weight:"bold"},t[0].category),t.map(a=>e.createElement(Rn,{key:a.url,as:ye,href:a.url,color:"black",size:{xs:"s",md:"m"},align:"start"},a.name))),S8=({games:t,colsNumber:n,...a})=>{const o=u=>t.filter(d=>d.category===u).sort((d,c)=>d.name.localeCompare(c.name));return e.createElement(lf,{index:0,headingTitleProps:{as:"h2",children:"Voir tous les jeux",whiteSpace:"nowrap",pr:"xxl-2"},contentWithBorder:!1,bg:"grey-100",btnProps:{pl:"xl",py:"xxs-3"},iconProps:{color:"ultramarine"},contentProps:{py:"l",bg:"grey-100"},isDropdown:!0,...a},e.createElement(ea,{colsNumber:n??{xs:1,md:3},gap:"m"},e.createElement(w8,{games:o("Jeux de lettres"),mb:{xs:"xs",md:"0"}}),e.createElement(w8,{games:o("Jeux de chiffres"),mb:{xs:"xs",md:"0"}}),e.createElement(w8,{games:o("Jeux inclassables")})))},YV=t=>t.replace(/(<([^>]+)>)/gi,"").length,b3=({label:t,items:n,...a})=>e.createElement(lf,{index:0,headingTitleProps:{as:"h2",children:t,whiteSpace:"nowrap",pr:"xxl-2"},contentWithBorder:!1,bg:"grey-100",btnProps:{pl:"xl",py:"xxs-3"},iconProps:{color:"ultramarine"},contentProps:{py:"l",bg:"grey-100"},isDropdown:!0,...a},e.createElement(ea,{colsNumber:1,gap:"m"},e.createElement(pe,{direction:"column",gap:"m"},n.map(o=>e.createElement(Rn,{key:o.url,as:ye,href:o.url,color:"black",size:{xs:"s",md:"m"},align:"start"},o.title))))),Gl=({subtitle:t,isExpandable:n,dropdown:a,...o})=>{if(t&&typeof t!="string"){const u=Ef({rawDraftContent:t}),d=YV(Nu(u));return e.createElement(e.Fragment,null,e.createElement(pd,{...o,isExpandable:d>200,subtitle:d>0?u:null,rightAsideElement:a&&o.layout===Te.DESKTOP?e.createElement(b3,{...a}):void 0}),a&&o.layout===Te.MOBILE&&e.createElement(b3,{mb:"l",...a}))}return e.createElement(e.Fragment,null,e.createElement(pd,{...o,isExpandable:n===void 0?!!(t&&t.length>200):n,subtitle:t,rightAsideElement:a&&o.layout===Te.DESKTOP?e.createElement(b3,{...a}):void 0}),a&&o.layout===Te.MOBILE&&e.createElement(b3,{mb:"l",...a}))},BO=({signsContent:t,layout:n=Te.MOBILE})=>e.createElement(e.Fragment,null,t.map((a,o)=>e.createElement(e.Fragment,{key:a.heading.title},e.createElement(Kx,{key:a.heading.title,title:a.heading.title,subtitle:a.heading.subtitle,icon:a.heading.icon,bg:"grey-50",color:"black",mx:{xs:"m",md:"0"},mb:{xs:"0",md:"l"},p:"0"}),a.topics.map((u,d)=>e.createElement(e.Fragment,{key:u.title},e.createElement(Wx,{icon:u.icon,title:u.title,content:u.content,mx:{xs:"m",md:"0"}}),d!==a.topics.length-1&&e.createElement(yt,{color:"grey-200",my:{xs:"0",md:"l"},mx:{xs:"m",md:"0"}}))),e.createElement(pe,{justifyContent:"center",my:{xs:"xs",md:"l"}},e.createElement(ye,{variant:"secondary",href:a.link.href},a.link.children)),o===2&&e.createElement(vy,null),o===2&&e.createElement(Fe,{adUnitCompletePath:n===Te.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_1":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===5&&e.createElement(Fe,{adUnitCompletePath:n===Te.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_2":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===8&&e.createElement(Fe,{adUnitCompletePath:n===Te.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_3":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===11&&n===Te.MOBILE&&e.createElement(Fe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_4",variant:"ARTICLE"}),o!==t.length-1&&e.createElement(yt,{mx:{xs:"m",md:"0"},color:"ultramarine",mb:"l"})))),FO=({images:t,...n})=>!t||(t==null?void 0:t.length)===0?null:e.createElement(ea,{as:"section",colsNumber:{xs:4,md:5},gap:{xs:"xxs",md:"xl"},...n},t.map(a=>e.createElement("a",{key:a.cover,href:a.link},e.createElement(np,{src:a.cover,alt:a.title})))),C8=({description:t,...n})=>t&&typeof t!="string"?e.createElement(Cb,{...n,description:Ef({rawDraftContent:t})}):t?e.createElement(Cb,{...n,description:t}):null,qO=({infosContent:t,layout:n=Te.MOBILE})=>{const a=e.createElement(e.Fragment,null,t.map(o=>e.createElement(pe,{gap:"xxs",alignItems:"center",mb:{xs:"xl",md:"0"},key:o.title},e.createElement(sr,{mr:"xxs",size:30,...o.iconOptions}),e.createElement(H,{size:"l",as:"span",weight:"bold"},o.title,!o.rating&&e.createElement(H,{as:"span",color:"ultramarine",size:"m",weight:"regular"}," ",o.information)),o.rating&&e.createElement(Dx,{rating:o.rating}))));return n===Te.DESKTOP?e.createElement(ea,{colsNumber:{xs:void 0,sm:2},gap:"xl",my:"l"},a):a},_3=({articles:t,seeMoreButton:n,layout:a,...o})=>{const{variablesForQuery:u,...d}=o;return e.createElement(q,{...d},t.map((c,v)=>{const p=`lastArticleKey${v}`,f=v===t.length-1;return e.createElement(e.Fragment,{key:p},e.createElement(Hx,{...c,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:a===Te.MOBILE?void 0:3,...c.cardTitleProps}}),!f&&e.createElement(yt,{color:"grey-200",my:"s"}),v===10&&a===Te.MOBILE&&e.createElement(Fe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),v===20&&a===Te.MOBILE&&e.createElement(Fe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(v===10||v===20)&&a===Te.MOBILE&&e.createElement(yt,{color:"grey-200",my:"s"}))}),n&&e.createElement(an,{...n,variant:"secondary",mx:"auto",mt:"s"}))},E3=({legalNotices:t,seeMoreLegalNotices:n,...a})=>t.length===0?null:e.createElement(q,{...a},t.map(o=>e.createElement(e.Fragment,null,e.createElement(yq,{key:o.link,...o,linkProps:{children:"Lire l’annonce"}}),e.createElement(yt,{my:"l",color:"grey-200"}))),n&&e.createElement(an,{variant:"secondary",mx:"auto",mt:"xl",...n})),JV=t=>{const n=new Intl.DateTimeFormat("fr",{dateStyle:"short",timeStyle:"short",timeZone:"Europe/Paris"}),a=new Date(t).getTime();return n.format(a).replace(" "," à ").replace(":","h")},y3=t=>{const n=a=>`${a}`.padStart(2,"0");return`${n(Math.floor(t/60))}:${n(t-Math.floor(t/60)*60)}`},zO=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),QV=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),A8=t=>{const n=new Date().getTime(),a=new Date(t).getTime(),o=(a-n)/6e4;let u=zO.format(Math.round(o),"minutes");return o<=-60&&(u=zO.format(Math.ceil(o/60),"hours"),o<=-60*24&&(u=QV.format(a))),u==="cette minute-ci"?"à l'instant":u},T8=new Date(2024,8,5,18,20),XV=t=>new Date().setMinutes(T8.getMinutes()-t),ej=t=>new Date().setHours(T8.getHours()-t),tj=t=>new Date().setDate(T8.getDate()-t);function D8(t,n=!0){const a=String(t.getDate()).padStart(2,"0"),o=String(t.getMonth()+1).padStart(2,"0");let u=t.getFullYear();return n||(u=Number(t.getFullYear().toString().slice(2))),`${a}/${o}/${u}`}function O8(t){const[n,a,o]=t.split("-"),u=n.slice(-2);return`${o}/${a}/${u}`}const UO=({location:t,header:n,surtitle:a,title:o,date:u,linkLogo:d,description:c,linkPDF:v,linkNotice:p,signature:f,..._})=>e.createElement(q,{..._,as:"section"},e.createElement(q,{mb:"s"},e.createElement(pe,{color:"ultramarine"},e.createElement(sr,{name:"local",size:13,mr:"xxs-2",mb:"xxs-2"}),e.createElement(H,{size:"xxs",weight:"bold",textTransform:"uppercase"},t)),e.createElement(Ye,{size:"xs"},n),e.createElement(Ye,{size:"xs"},a),e.createElement(Ye,{size:"xs"},o),e.createElement(H,{as:"time",size:"s",color:"grey-400",dateTime:u},"Publié le ",O8(u))),d&&e.createElement(q,{as:"img",src:d,mb:"s",style:{maxWidth:"100px",maxHeight:"100px"}}),c&&e.createElement(H,{size:"m",mb:"xxl",dangerouslySetInnerHTML:{__html:c}}),f&&e.createElement(H,{italic:!0,mb:"xxl"},f),v&&e.createElement(ye,{variant:"primary",href:v,target:"_blank",mr:"m",mb:"m"},"Télécharger le justificatif en PDF"),p&&e.createElement(ye,{variant:"secondary",href:p,target:"_blank"},"Télécharger la notice")),k8=({updatedAt:t,...n})=>e.createElement(Jx,{...n,...t&&{updatedAt:A8(t)}}),Av=({cardOverviewProps:t,...n})=>{if(t.length<=0)return null;const a=e.createElement(e.Fragment,null,t.map((o,u)=>e.createElement(ry,{...o,key:o.title,mb:u!==t.length-1?"m":"0",variant:"big",cardHeaderProps:{headline:{text:"Live",bg:"red"},hasDot:!0}})));return Object.keys(n).length===0?a:e.createElement(q,{...n},a)},HO=({draftContent:t,pageEndpoint:n,imgEndpoint:a,withCmp:o=!0})=>{const u=e.useRef(null);return e.useEffect(()=>{const d=Cv({rawDraftContent:t,pageEndpoint:n,imgEndpoint:a,withCmp:o}),c=document.createRange().createContextualFragment(d);u.current&&(u.current.innerHTML="",u.current.appendChild(c))},[t]),e.createElement(q,{ref:u,mt:"s",className:"c-content"},Ef({rawDraftContent:t,pageEndpoint:n,imgEndpoint:a,withCmp:o}))},VO=({currentTab:t})=>e.createElement(pe,{className:"c-tablist",mb:"l",gap:"l",px:{xs:"m",md:"0"}},e.createElement(ye,{whiteSpace:"nowrap",href:"/arts-stars/cinema/film-au-cinema-en-ce-moment",tabVariant:"primary",tabColor:"entertainment",tabIsSelected:t==="in_theaters"},"A l'affiche"),e.createElement(ye,{whiteSpace:"nowrap",href:"/arts-stars/cinema/sortie-cinema-de-la-semaine",tabVariant:"primary",tabColor:"entertainment",tabIsSelected:t==="last_releases"},"Sorties de la semaine"),e.createElement(ye,{whiteSpace:"nowrap",href:"/arts-stars/cinema/prochaine-sortie-cinema",tabVariant:"primary",tabColor:"entertainment",tabIsSelected:t==="soon"},"Prochainement")),N3=({buttonLabel:t,title:n,url:a,...o})=>e.createElement(pe,{alignItems:"center",justifyContent:"between",gap:{xs:"xs",md:"m"},py:"s",px:"xxl",direction:{xs:"column",md:"row"},bg:"ultramarine",...o},e.createElement(H,{as:"h2",color:"white",size:"xl",weight:"bold",textAlign:{xs:"center",md:"left"}},n),e.createElement(ye,{variant:"secondary",href:a,target:"_blank"},t));var rj=Object.defineProperty,nj=(t,n,a)=>n in t?rj(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a,x3=(t,n,a)=>nj(t,typeof n!="symbol"?n+"":n,a);const ij=()=>/Android/i.test(navigator.userAgent),aj=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),oj=()=>{const t=document.getElementById("js-download-band");t&&ij()&&t.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},lj=()=>{const t=document.querySelector("#js-election-selector");t&&t.addEventListener("change",n=>{window.location.replace(n.target.value)})},uj=()=>{const t=document.querySelector(".c-search-banner");if(t){const n=document.querySelector("#js-search-banner-to-hide"),a=t.querySelector("#js-search-banner-dropdown-btn");a==null||a.addEventListener("click",()=>{const o=a.querySelector("svg"),u=o==null?void 0:o.querySelector("use");switch(u==null?void 0:u.getAttribute("xlink:href")){case"#chevron-up":u==null||u.setAttribute("xlink:href","#chevron-down"),n==null||n.classList.add("u-hidden");break;case"#chevron-down":u==null||u.setAttribute("xlink:href","#chevron-up"),n==null||n.classList.remove("u-hidden");break}})}},sj=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],cj=(t,n,a,o,u,d)=>{const c=document.getElementById(t);if(!c)return;const v=c.dataset.storybook,p=c.querySelector(`#${t}-search`),f=p==null?void 0:p.getAttribute("data-api-url"),_=c.querySelector(".c-autocomplete__menu");if(!p||!_||!f)return;const N=c.querySelector(".c-autocomplete__input-spinner"),w=p.getAttribute("data-trigger-message"),S=async I=>{try{let F;return v&&n.includes("20minutes.fr")?F=sj:F=await(await fetch(`${f}${a}${encodeURIComponent(I)}`)).json(),d?F[d]:F}catch(F){return console.error("Error fetching autocomplete results:",F),[]}},C=(I,F)=>{const U=document.createElement("li");U.id=`/${I}`,U.textContent=F,U.addEventListener("click",()=>{p instanceof HTMLInputElement&&(p.value=F,_.classList.add("u-hidden"))}),_.appendChild(U)},T=()=>{N==null||N.classList.toggle("u-hidden")},A=()=>{const I=document.createElement("li");I.textContent=w,_.appendChild(I)},M=async I=>{T(),_.classList.remove("u-hidden");const F=await S(I);_.innerHTML="",F.length===0&&_.classList.add("u-hidden"),F.forEach(U=>{C(U[o],U[u])}),T()},P=I=>{if(!(I.target instanceof HTMLInputElement))return;const F=I.target.value;_.classList.remove("u-hidden"),F.length>=3?M(F):(_.innerHTML="",A())};p.addEventListener("input",P),p.addEventListener("focusout",()=>{setTimeout(()=>_.classList.add("u-hidden"),300)}),p.addEventListener("focusin",()=>{_.childElementCount>0&&_.classList.remove("u-hidden")})},dj=()=>{const t=document.querySelector("header"),n=document.querySelector(".js-limit-scroll-close-article-btn"),a=document.querySelector(".js-close-article-btn"),o=document.querySelector(".c-header-mobile"),u=o instanceof HTMLElement?o.offsetHeight:0;if(t&&n&&a){const d=new IntersectionObserver(()=>{const c=a.classList,v=c.contains("u-hidden"),p=t.getBoundingClientRect().bottom-u,f=n.getBoundingClientRect().bottom-u;v&&p<=0&&f>=0&&c.remove("u-hidden"),!v&&(p>=0||f<=0)&&c.add("u-hidden")},{root:document,rootMargin:`-${u}px 0px 0px 0px`});d.observe(t),d.observe(n)}},mj=t=>{t.stopImmediatePropagation(),t.preventDefault();const n=t.currentTarget;if(n instanceof HTMLButtonElement){const a=n.parentElement,o=a==null?void 0:a.querySelector(`#${n.getAttribute("aria-controls")}`);n.getAttribute("aria-expanded")==="true"?(n.setAttribute("aria-expanded","false"),o==null||o.setAttribute("aria-hidden","true")):(n.setAttribute("aria-expanded","true"),o==null||o.setAttribute("aria-hidden","false"))}},fj=(t=document.querySelector(".js-collapse__button"))=>{t&&document.querySelectorAll(".c-collapse__button").forEach(n=>{n.addEventListener("click",a=>{mj(a)})})},pj=(t,n)=>{const a=document.querySelector(`#${n}`);if(a){const o=a.querySelector(".js-countdown-days"),u=a.querySelector(".js-countdown-hours"),d=a.querySelector(".js-countdown-minutes"),c=a.querySelector(".js-countdown-seconds");if(!o||!u||!d||!c)return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const v=window.counters[t],p=new Date(v).getTime(),f=setInterval(()=>{const _=new Date().getTime(),N=p-_;if(N<=0)clearInterval(f);else{const w=Math.floor(N/864e5),S=Math.floor(N%(1e3*60*60*24)/(1e3*60*60)),C=Math.floor(N%(1e3*60*60)/(1e3*60)),T=Math.floor(N%(1e3*60)/1e3);o.innerHTML=w.toString(),u.innerHTML=S.toString(),d.innerHTML=C.toString(),c.innerHTML=T.toString()}},1e3)}},hj=t=>{const n=t.getBBox(),a=n.width/20;return[n.x-a,n.y-a,n.width+a*2,n.height+a*2].join(" ")},vj=()=>{const t=document.querySelector(".c-map-districts-container"),n=document.querySelector(".c-map-districts");if(!t||!n)return;const a=document.querySelector(".c-map-districts-container__description"),o=document.querySelector(".c-map-districts-container__department"),u=document.querySelector(".c-map-districts-container__unzoom-button");let d=n;const c=n.getAttribute("viewBox"),v=(S,C)=>{var T;return(T=S.matches)==null?void 0:T.call(S,C)},p=(S,C,T=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!S)return;let A,M=S.parentElement;for(;M instanceof SVGGraphicsElement&&M!==C;)v(M,T)&&(A=M),M=M.parentElement;return A},f=(S,C,T)=>{if(!S)return;let A=S.parentElement;for(;A instanceof SVGGraphicsElement&&A!==T;){if(C===A)return!0;A=A.parentElement}return T===C},_=(S,C)=>{if(C&&u&&a){t.classList.remove("c-map-districts-container--department-view"),a.classList.remove("u-hidden"),o==null||o.classList.add("u-hidden"),u.classList.add("u-hidden"),C!==c&&(a.classList.add("u-hidden"),u.classList.remove("u-hidden")),d.classList.remove("js-selected-area"),d=S;const T=d.getAttribute("data-info");o&&T&&(t.classList.add("c-map-districts-container--department-view"),o.classList.remove("u-hidden"),o.innerHTML=T),d.classList.add("js-selected-area"),n.setAttribute("viewBox",C)}},N=S=>{S.stopPropagation();const C=S.currentTarget;if(d&&n&&C instanceof SVGGraphicsElement){if(C===d)return;if(S.preventDefault(),d!==n&&!f(C,d,n)){_(n,c);return}const T=p(C,d);_(T||C,hj(T||C))}},w=()=>{n&&d!==n&&_(n,c)};n.addEventListener("click",w),u&&u.addEventListener("click",w),document.querySelectorAll(".c-map-districts__zoomable").forEach(S=>{S.addEventListener("click",C=>N(C))})},gj=()=>{const t=document.getElementById("elections-form-search"),n=document.querySelector(".c-search-form__autocomplete");if(!t||!n)return;const a=d=>{n.classList.remove("u-hidden");const c=n.querySelectorAll("li"),v=[];return c.forEach(p=>{const f=p.querySelector("a");f&&f.innerHTML.toLowerCase().includes(d.toLowerCase())&&v.push(p.innerHTML)}),v},o=d=>{n.innerHTML+=`<li>${d}</li>`},u=({target:d})=>{if(!(d instanceof HTMLInputElement))return;const c=d.value;if(n.classList.add("u-hidden"),c.length>=3){const v=a(c);n.innerHTML="",v.length===0&&n.classList.add("u-hidden"),v.forEach(p=>{o(p)})}};t.addEventListener("input",u),t.addEventListener("focusout",()=>{setTimeout(()=>n.classList.add("u-hidden"),300)}),t.addEventListener("focusin",()=>{n.childElementCount>0&&n.classList.remove("u-hidden")})},bj=(t,n)=>{var a;t.setAttribute("aria-expanded","true");const o=(a=t.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(d=>d.classList.remove(n));const u=t.querySelector(".js-ellipsis-button__label");u instanceof HTMLSpanElement&&(u.innerHTML="Voir moins")},_j=(t,n)=>{var a;const o=(a=t.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(d=>d.classList.add(n)),t.setAttribute("aria-expanded","false");const u=t.querySelector(".js-ellipsis-button__label");u instanceof HTMLSpanElement&&(u.innerHTML="Voir plus")},Ej=(t,n)=>{const a=t.currentTarget;if(t.preventDefault(),a instanceof HTMLButtonElement){const o=n?"u-ellipsis-multiline":"u-ellipsis";return a.getAttribute("aria-expanded")==="true"?_j(a,o):bj(a,o)}return null},yj=(t=document.querySelector(".js-ellipsis-button"))=>{t&&document.querySelectorAll(".js-ellipsis-button").forEach(n=>{const a=n.getAttribute("data-multiple")==="true";n.addEventListener("click",o=>Ej(o,a))})},Nj=t=>{var n;t.setAttribute("aria-expanded","true");const a=(n=t.parentNode)==null?void 0:n.querySelectorAll(".js-expand-target");a==null||a.forEach(u=>u.setAttribute("aria-hidden","false"));const o=t.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir moins")},xj=t=>{var n;const a=(n=t.parentNode)==null?void 0:n.querySelectorAll(".js-expand-target");a==null||a.forEach(u=>u.setAttribute("aria-hidden","true")),t.setAttribute("aria-expanded","false");const o=t.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir plus")},wj=t=>{const n=t.currentTarget;return t.preventDefault(),n instanceof HTMLButtonElement?n.getAttribute("aria-expanded")==="true"?xj(n):Nj(n):null},Sj=(t=document.querySelector(".js-expand-button"))=>{t&&document.querySelectorAll(".js-expand-button").forEach(n=>n.addEventListener("click",wj))},Cj=()=>{const t=document.querySelector(".js-game-alert");aj&&t&&t.classList.remove("u-hidden")},Aj=()=>{const t=document.querySelectorAll(".js-half-donut-result");for(const n of Array.from(t)){const a=n.querySelector(".c-half-donut"),o=n.querySelector(".c-legend");if(!a||!o)return;o.querySelectorAll("[data-color]").forEach(u=>{const d=u.getAttribute("data-color"),c=a.querySelector(`.c-half-donut__zone--${d}`);c==null||c.addEventListener("mouseenter",()=>{u.classList.add("c-legend__item--is-hovered"),a.classList.add("c-half-donut--is-hovered"),o.classList.add("c-legend--is-hovered")}),c==null||c.addEventListener("mouseleave",()=>{u.classList.remove("c-legend__item--is-hovered"),a.classList.remove("c-half-donut--is-hovered"),o.classList.remove("c-legend--is-hovered")}),u.addEventListener("mouseenter",()=>{c==null||c.classList.add("c-half-donut__zone--is-hovered"),o.classList.add("c-legend--is-hovered"),a.classList.add("c-half-donut--is-hovered")}),u.addEventListener("mouseleave",()=>{c==null||c.classList.remove("c-half-donut__zone--is-hovered"),o.classList.remove("c-legend--is-hovered"),a.classList.remove("c-half-donut--is-hovered")})})}},Tj=()=>{const t=document.querySelector(".c-image-slider__container");if(!t)return;const n=document.querySelectorAll(".c-image-slider__slide"),a=document.querySelector(".c-image-slider__button-container--previous"),o=document.querySelector(".c-image-slider__button-container--next"),u=document.querySelectorAll(".c-image-slider__indicator");let d=0;const c=()=>{u.forEach((f,_)=>{f.classList.toggle("c-image-slider__indicator--is-active",_===d)})},v=()=>{if(!(t instanceof HTMLElement))return;const f=-d*100;t.style.transform=`translateX(${f}%)`,c()},p=f=>{d=f,v()};a==null||a.addEventListener("click",()=>{const f=(d-1+n.length)%n.length;p(f)}),o==null||o.addEventListener("click",()=>{const f=(d+1)%n.length;p(f)}),u.forEach((f,_)=>{f.addEventListener("click",()=>{p(_)})}),v()},fi={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var Dj=[`a[href]${fi.inert}${fi.negTabIndex}`,`area[href]${fi.inert}${fi.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${fi.inert}${fi.negTabIndex}${fi.disabled}`,`input[type="radio"]${fi.inert}${fi.negTabIndex}${fi.disabled}`,`select${fi.inert}${fi.negTabIndex}${fi.disabled}`,`textarea${fi.inert}${fi.negTabIndex}${fi.disabled}`,`button${fi.inert}${fi.negTabIndex}${fi.disabled}`,`details${fi.inert} > summary:first-of-type${fi.negTabIndex}`,`iframe${fi.inert}${fi.negTabIndex}`,`audio[controls]${fi.inert}${fi.negTabIndex}`,`video[controls]${fi.inert}${fi.negTabIndex}`,`[contenteditable]${fi.inert}${fi.negTabIndex}`,`[tabindex]${fi.inert}${fi.negTabIndex}`];function jO(t){(t.querySelector("[autofocus]")||t).focus()}function Oj(t){const n=Tv(t,!0),a=n?Tv(t,!1)||n:null;return[n,a]}function Tv(t,n){if(n&&$O(t))return t;if(Mj(t))if(t.shadowRoot){let a=GO(t.shadowRoot,n);for(;a;){const o=Tv(a,n);if(o)return o;a=KO(a,n)}}else if(t.localName==="slot"){const a=t.assignedElements({flatten:!0});n||a.reverse();for(const o of a){const u=Tv(o,n);if(u)return u}}else{let a=GO(t,n);for(;a;){const o=Tv(a,n);if(o)return o;a=KO(a,n)}}return!n&&$O(t)?t:null}function GO(t,n){return n?t.firstElementChild:t.lastElementChild}function KO(t,n){return n?t.nextElementSibling:t.previousElementSibling}const kj=t=>t.matches("details:not([open]) *")&&!t.matches("details>summary:first-of-type")?!0:!(t.offsetWidth||t.offsetHeight||t.getClientRects().length),$O=t=>{var n;return(n=t.shadowRoot)!=null&&n.delegatesFocus?!1:t.matches(Dj.join(","))&&!kj(t)};function Mj(t){return t.shadowRoot&&t.getAttribute("tabindex")==="-1"?!1:!t.matches(":disabled,[hidden],[inert]")}function Dv(t=document){const n=t.activeElement;return n?n.shadowRoot?Dv(n.shadowRoot)||document.activeElement:n:null}function Lj(t,n){const[a,o]=Oj(t);if(!a)return n.preventDefault();const u=Dv();n.shiftKey&&u===a?(o.focus(),n.preventDefault()):!n.shiftKey&&u===o&&(a.focus(),n.preventDefault())}function Yh(t,n){function a(o){if(!o||o===document||o===window)return null;const u=WO(o);return u&&(o=u),o.closest(t)||a(o.getRootNode().host)}return a(n)}function WO(t){return t.assignedSlot||(t.parentNode?WO(t.parentNode):null)}const Ov="data-a11y-dialog";class RO{constructor(n){x3(this,"$el"),x3(this,"id"),x3(this,"previouslyFocused"),x3(this,"shown"),this.$el=n,this.id=this.$el.getAttribute(Ov)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented?this:(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this)}show(n){var a;return this.shown?this:this.fire("show",n).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=Dv(),((a=this.previouslyFocused)==null?void 0:a.tagName)==="BODY"&&n!=null&&n.target&&(this.previouslyFocused=n.target),(n==null?void 0:n.type)==="focus"?this.maintainFocus():jO(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(n){var a,o;return this.shown?this.fire("hide",n).defaultPrevented?this:(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),(o=(a=this.previouslyFocused)==null?void 0:a.focus)==null||o.call(a),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this):this}on(n,a,o){return this.$el.addEventListener(n,a,o),this}off(n,a,o){return this.$el.removeEventListener(n,a,o),this}fire(n,a){const o=new CustomEvent(n,{detail:a,cancelable:!0});return this.$el.dispatchEvent(o),o}handleTriggerClicks(n){const a=n.composedPath()[0],o=Yh(`[${Ov}-show="${this.id}"]`,a),u=Yh(`[${Ov}-hide="${this.id}"]`,a),d=Yh(`[${Ov}-hide]`,a)&&Yh('[aria-modal="true"]',a)===this.$el;o&&this.show(n),(u||d)&&this.hide(n)}bindKeypress(n){if(Yh('[aria-modal="true"]',Dv())!==this.$el)return;let a=!1;try{a=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}n.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!a&&(n.preventDefault(),this.hide(n)),n.key==="Tab"&&Lj(this.$el,n)}maintainFocus(){const n=Dv();Yh(`[aria-modal="true"], [${Ov}-ignore-focus-trap]`,n)||jO(this.$el)}}function ZO(){for(const t of document.querySelectorAll("[data-a11y-dialog]"))new RO(t)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ZO):ZO());const Ij=()=>document.querySelectorAll(".js-modal").forEach(t=>{if(!(t instanceof HTMLElement))return;const n=new RO(t);if(t.id==="dialog-menu"){const a=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),o=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");a.length>0&&o.length>0&&(n.on("show",()=>{a.forEach(u=>u.classList.add("u-hidden")),o.forEach(u=>u.classList.remove("u-hidden"))}),n.on("hide",()=>{a.forEach(u=>u.classList.remove("u-hidden")),o.forEach(u=>u.classList.add("u-hidden"))}))}n.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),kv="68px",M8=({navigatedList:t,nextBtn:n,prevBtn:a})=>{n.classList.contains("o-nav-button--visible")&&!a.classList.contains("o-nav-button--visible")&&(t.style.width=`calc(100% - ${kv})`,t.style.position="",t.style.right=""),a.classList.contains("o-nav-button--visible")&&(t.style.position="absolute",n.classList.contains("o-nav-button--visible")&&(t.style.width=`calc(100% - ${kv} * 2)`,t.style.right=kv),n.classList.contains("o-nav-button--visible")||(t.style.width=`calc(100% - ${kv})`,t.style.right="0")),!n.classList.contains("o-nav-button--visible")&&!a.classList.contains("o-nav-button--visible")&&(t.style.width="",t.style.position="",t.style.right="")},Pj=({navigatedList:t,nextBtn:n,prevBtn:a})=>{var o,u,d,c,v,p,f,_;const N=t.scrollLeft>0,w=t.scrollLeft+t.clientWidth<t.scrollWidth;N&&w?((o=n.classList)==null||o.add("o-nav-button--visible"),(u=a.classList)==null||u.add("o-nav-button--visible")):N?((d=n.classList)==null||d.remove("o-nav-button--visible"),(c=a.classList)==null||c.add("o-nav-button--visible")):w?((v=n.classList)==null||v.add("o-nav-button--visible"),(p=a.classList)==null||p.remove("o-nav-button--visible")):((f=n.classList)==null||f.remove("o-nav-button--visible"),(_=a.classList)==null||_.remove("o-nav-button--visible")),n.classList.contains("c-slider__button-container--has-background-transparent")&&a.classList.contains("c-slider__button-container--has-background-transparent")&&M8({navigatedList:t,nextBtn:n,prevBtn:a})},Bj=({navigatedList:t,nextBtn:n,prevBtn:a,sliderVariant:o})=>{if(t){const u=t.closest(".js-overview-bar-container"),d=u==null?void 0:u.querySelector(".c-stepper"),c=d==null?void 0:d.querySelectorAll(".c-stepper__item");if(c){const v=Array.from(c).findIndex(p=>p.classList.contains("c-stepper__item--loading"));if(v<0)c[0].classList.add("c-stepper__item--loading");else{c[v].classList.remove("c-stepper__item--loading"),c[v].classList.add("c-stepper__item--loaded");const p=c[v].querySelector(".c-stepper__loader");p&&p instanceof HTMLElement&&(p.style.transition="width 0s linear"),v+1<c.length&&c[v+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let v=t.scrollLeft;switch(o){case"three-columns-articles":v+=t.clientWidth+32;break;case"rubrics":v+=t.clientWidth-36;break;default:v+=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:v,behavior:"smooth"}),a.classList.add("o-nav-button--visible"),v+t.clientWidth>=t.scrollWidth&&n.classList.remove("o-nav-button--visible")}else{const v=t.scrollWidth-t.clientWidth;t.scrollTo({left:v,behavior:"smooth"}),n.classList.remove("o-nav-button--visible"),a.classList.add("o-nav-button--visible")}n.classList.contains("c-slider__button-container--has-background-transparent")&&a.classList.contains("c-slider__button-container--has-background-transparent")&&M8({navigatedList:t,nextBtn:n,prevBtn:a})}},Fj=({navigatedList:t,nextBtn:n,prevBtn:a,sliderVariant:o,delay:u})=>{if(t){const d=t.closest(".js-overview-bar-container"),c=d==null?void 0:d.querySelector(".c-stepper"),v=c==null?void 0:c.querySelectorAll(".c-stepper__item");if(v){const p=Array.from(v).findIndex(f=>f.classList.contains("c-stepper__item--loading"));p<0?v[0].classList.add("c-stepper__item--loading"):(v[p].classList.remove("c-stepper__item--loading"),v[p].classList.remove("c-stepper__item--loaded"),p-1>0&&(v[p-1].classList.remove("c-stepper__item--loading"),v[p-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const f=v[p-1].querySelector(".c-stepper__loader");v[p-1].classList.add("c-stepper__item--loading"),f&&f instanceof HTMLElement&&(f.style.transition=`width ${u/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let p=t.scrollLeft;switch(o){case"three-columns-articles":p-=t.clientWidth+32;break;case"rubrics":p-=t.clientWidth-36;break;default:p-=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:p,behavior:"smooth"}),n.classList.add("o-nav-button--visible"),p===0&&a.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),a.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&n.classList.add("o-nav-button--visible");n.classList.contains("c-slider__button-container--has-background-transparent")&&a.classList.contains("c-slider__button-container--has-background-transparent")&&M8({navigatedList:t,nextBtn:n,prevBtn:a})}},qj=({navigatedList:t,nextBtn:n,prevBtn:a})=>{Pj({navigatedList:t,nextBtn:n,prevBtn:a})},zj=()=>{const t=document.querySelectorAll(".js-navigation-container");for(const n of Array.from(t)){const{sliderVariant:a}=n.dataset,{sliderAuto:o}=n.dataset,{sliderDelay:u}=n.dataset,d=u?parseInt(u,10):3e3,c=n.closest(".js-overview-bar-container"),v=c==null?void 0:c.querySelector(".c-stepper"),p=v==null?void 0:v.querySelectorAll(".c-stepper__item");if(n){const f=n.querySelector(".js-navigation-container__list"),_=n.querySelector(".o-nav-button--next-button"),N=n.querySelector(".o-nav-button--previous-button");if(f&&f.clientWidth<f.scrollWidth&&(_==null||_.classList.add("o-nav-button--visible"),_!=null&&_.classList.contains("c-slider__button-container--has-background-transparent")&&(f.style.width=`calc(100% - ${kv})`)),f&&_&&N&&(_==null||_.addEventListener("click",Bj.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a})),N==null||N.addEventListener("click",Fj.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a,delay:d}))),o==="true"&&_){const w=v?v.querySelector(".c-stepper__item--loading"):null;p&&(p.forEach(S=>{const C=S.querySelector(".c-stepper__loader");C&&C instanceof HTMLElement&&(C.style.transition=`width ${d/1e3}s linear`)}),w||p[0].classList.add("c-stepper__item--loading")),setInterval(()=>{_.classList.contains("o-nav-button--visible")?_.click():f&&N&&(f.scrollLeft=0,p&&(p.forEach(S=>{const C=S.querySelector(".c-stepper__loader");C&&C instanceof HTMLElement&&(C.style.transition="width 0s linear"),S.classList.remove("c-stepper__item--loading"),S.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{C&&C instanceof HTMLElement&&(C.style.transition=`width ${d/1e3}s linear`)},0)}),setTimeout(()=>{p[0].classList.add("c-stepper__item--loading")},0)),N.click())},d)}}}},Uj=()=>{const t=document.querySelectorAll(".js-navigation-container");for(const n of Array.from(t))if(n){const a=n.querySelector(".js-navigation-container__list"),o=n.querySelector(".o-nav-button--next-button"),u=n.querySelector(".o-nav-button--previous-button");a&&o&&u&&window.addEventListener("resize",qj.bind(!1,{navigatedList:a,nextBtn:o,prevBtn:u}))}};/*!
321
+ */var kO;function RV(){return kO||(kO=1,function(t){(function(){var n={}.hasOwnProperty;function a(){for(var d="",c=0;c<arguments.length;c++){var v=arguments[c];v&&(d=u(d,o(v)))}return d}function o(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return a.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var c="";for(var v in d)n.call(d,v)&&d[v]&&(c=u(c,v));return c}function u(d,c){return c?d?d+" "+c:d+c:d}t.exports?(a.default=a,t.exports=a):window.classNames=a})()}(_8)),_8.exports}var ZV=RV();const jl=qb(ZV),Zh=({content:t,pageEndpoint:n,imgEndpoint:a,colorScheme:o="ultramarine",disableLettering:u=!1,subType:d,...c})=>{var v;return e.createElement(q,{...c,className:jl("c-content",{[`c-content--theme-${o}`]:!!o,"c-content--text-with-lettering":!u&&((v=t.blocks[0])==null?void 0:v.text.length)>50})},Ef({rawDraftContent:t,pageEndpoint:n,imgEndpoint:a,subType:d}))},MO=({items:t=[]})=>t!=null&&t.length?e.createElement("div",null,t==null?void 0:t.map((n,a)=>e.createElement(Ls,{key:`bulleted-list-${a}`,...n}))):null,LO=({name:t,description:n,link:a,icon:o,layout:u,...d})=>e.createElement(Rn,{as:"a",href:a,...d},u===Te.MOBILE&&t,e.createElement(pe,{alignItems:{xs:"start",md:"center"},justifyContent:{xs:"center",md:"start"},className:"opacity-hover"},e.createElement(sr,{bg:"white",isRounded:!0,name:o.name,size:o.size||u===Te.DESKTOP&&20||30,color:"grey-900",p:"xs",mr:{xs:"0",md:"xxs"},mb:{xs:"xs",md:"0"}}),u===Te.DESKTOP&&n),u===Te.MOBILE&&n),E8=({iconSize:t,layout:n,...a})=>e.createElement(pe,{...a,bg:"ultramarine",p:{xs:"xxs",md:"xs"},justifyContent:{xs:"evenly",md:"start"}},e.createElement(LO,{basis:{xs:50,md:"auto"},icon:{name:"game",size:t},name:e.createElement(H,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Jeux"),description:e.createElement(H,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir les",n===Te.DESKTOP?e.createElement("br",null):" ","35 jeux"),link:"https://www.20minutes.fr/services/jeux",layout:n,id:"entertainment-item-game"}),e.createElement(Rn,{mx:"m",py:"xs"},e.createElement(Eb,{color:"white"})),e.createElement(LO,{basis:{xs:50,md:"auto"},icon:{name:"horoscope",size:t},name:e.createElement(H,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Horoscope"),description:e.createElement(H,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir mon",n===Te.DESKTOP?e.createElement("br",null):" ","horoscope"),link:"https://www.20minutes.fr/horoscope/",layout:n,id:"entertainment-item-horoscope"})),y8=({faqData:t,pageEndpoint:n})=>e.createElement(e.Fragment,null,t.map(a=>e.createElement(lf,{key:a.index,index:a.index,...a.tag?{textTitleProps:{as:a.tag,size:"xl",my:"xs",children:a.title}}:{headingTitleProps:{as:"h2",size:"xs",my:"xs",children:a.title}},contentWithBorder:!1,bg:"grey-100",btnProps:{py:"xxs-3"},iconProps:{color:"ultramarine"},mb:"l"},e.createElement(Zh,{content:a.children,pageEndpoint:n,disableLettering:!0})))),IO=({enableAccordion:t,items:n,contentProps:a,heading:o={as:"h2"},...u})=>!n||(n==null?void 0:n.length)===0?null:t?e.createElement(Fb,{...u,items:n,contentProps:a}):e.createElement(pe,{direction:"column",gapX:"m",mx:{xs:"m",md:"0"}},n.map(d=>e.createElement(pe,{...u,key:d.title,direction:"column",gapX:"s"},e.createElement(Ye,{size:"xs",color:"black",weight:"semi-bold",...o},d.title),e.createElement(tw,{...a,content:d.content})))),PO=({colorVariant:t="ultramarine",cookieLink:n="/gestion-cookies"})=>e.createElement(q,{className:"cmp-placeholder u-hidden",borderColor:"grey-200",radius:"l",p:"xxl"},e.createElement(Ye,{size:"s",color:t,mb:"xxl",fontFamily:"source-serif-pro",weight:"semi-bold"},"L'accès aux jeux a été bloqué afin de respecter votre consentement"),e.createElement(H,{size:"l",mb:"m"},"En cliquant sur",e.createElement(H,{weight:"bold",as:"span",ml:"xxs"},"« J’accepte »"),", vous acceptez le dépôt de cookies de mesure d'audience, et pourrez ainsi accéder au jeux proposés sur le site de 20 Minutes."),e.createElement(H,{size:"s",mb:"xl"},"Plus d’informations sur la page",e.createElement(H,{color:t,as:"a",href:n,mx:"xxs"},"Politique de gestion des cookies")),e.createElement(an,{className:"cmp-game-button",mx:"auto"},"J'accepte")),N8=({children:t})=>e.createElement("div",{className:"game-placeholder"},e.createElement("div",{className:"game-wrapper u-hidden"},t),e.createElement(PO,null),e.createElement(q,{my:"m",className:"js-game-alert u-hidden"},e.createElement(MF,{variant:"warning",fill:!0,iconProps:{name:"info",size:20},title:"Les jeux ne se chargent pas sur Firefox ?",description:`Vérifiez que la "Protection renforcée contre le pistage" est bien désactivée sur la page, accessible depuis l'icône bouclier, à gauche de l'URL.`}))),x8=({id:t,name:n,type:a,src:o,keesingType:u,keesingGame:d},...c)=>{const v=["puzzle","421","buzz","mots-coupes","ifleches","ironde-des-mots","garam","quiz"],p={player:"https://web.keesing.com/pub/player/v2.25.2/dist/",portal:"https://web.keesing.com/pub/portal/v2.25.2/dist/",js:"https://web.keesing.com/pub/bundle-loader/bundle-loader.js",css:"https://web.keesing.com/pub/config/20minutes/css/custom_client.css"};return o&&v.includes(t)?e.createElement(N8,null,e.createElement("div",{id:"loginwall"},e.createElement(BF,{title:n,htmlIframeProps:{src:o},mb:"l",className:`c-game c-game--${t}`,...c}))):a==="Arcade"&&v.includes(t)?e.createElement(N8,null,e.createElement("div",{id:"loginwall"},e.createElement("link",{rel:"stylesheet",href:p.css}),e.createElement("div",{id:"puzzle-portal",className:`game game-${n}`,"data-customerid":"20minutes","data-gametype":`CG_${d}`,"data-puzzleid":`CG_${d}`,"data-publicpath":u==="player"?p.player:p.portal}),e.createElement("script",{type:"text/javascript","data-src":p.js,"data-wlpp-bundle":u??"portal"}))):!u||!d?null:e.createElement(N8,null,e.createElement("div",{id:"loginwall"},e.createElement("link",{rel:"stylesheet",href:p.css}),v.includes(t)?e.createElement(e.Fragment,null,e.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-portalview":d??"","data-publicpath":u==="player"?p.player:p.portal}),e.createElement("script",{type:"text/javascript","data-src":p.js,"data-wlpp-bundle":u??"portal"})):e.createElement(e.Fragment,null,e.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-gametype":u==="portal"?d:`CG_${d}`,"data-puzzleid":u==="portal"?`${d}_today`:`CG_${d}`}),e.createElement("script",{type:"text/javascript","data-wlpp-bundle":"player","data-src":p.js}))))},w8=({games:t,...n})=>e.createElement(pe,{direction:"column",gap:"m",...n},e.createElement(H,{size:{xs:"l",md:"xl"},weight:"bold"},t[0].category),t.map(a=>e.createElement(Rn,{key:a.url,as:ye,href:a.url,color:"black",size:{xs:"s",md:"m"},align:"start"},a.name))),S8=({games:t,colsNumber:n,...a})=>{const o=u=>t.filter(d=>d.category===u).sort((d,c)=>d.name.localeCompare(c.name));return e.createElement(lf,{index:0,headingTitleProps:{as:"h2",children:"Voir tous les jeux",whiteSpace:"nowrap",pr:"xxl-2"},contentWithBorder:!1,bg:"grey-100",btnProps:{pl:"xl",py:"xxs-3"},iconProps:{color:"ultramarine"},contentProps:{py:"l",bg:"grey-100"},isDropdown:!0,...a},e.createElement(ea,{colsNumber:n??{xs:1,md:3},gap:"m"},e.createElement(w8,{games:o("Jeux de lettres"),mb:{xs:"xs",md:"0"}}),e.createElement(w8,{games:o("Jeux de chiffres"),mb:{xs:"xs",md:"0"}}),e.createElement(w8,{games:o("Jeux inclassables")})))},YV=t=>t.replace(/(<([^>]+)>)/gi,"").length,b3=({label:t,items:n,...a})=>e.createElement(lf,{index:0,headingTitleProps:{as:"h2",children:t,whiteSpace:"nowrap",pr:"xxl-2"},contentWithBorder:!1,bg:"grey-100",btnProps:{pl:"xl",py:"xxs-3"},iconProps:{color:"ultramarine"},contentProps:{py:"l",bg:"grey-100"},isDropdown:!0,...a},e.createElement(ea,{colsNumber:1,gap:"m"},e.createElement(pe,{direction:"column",gap:"m"},n.map(o=>e.createElement(Rn,{key:o.url,as:ye,href:o.url,color:"black",size:{xs:"s",md:"m"},align:"start"},o.title))))),Gl=({subtitle:t,isExpandable:n,dropdown:a,...o})=>{if(t&&typeof t!="string"){const u=Ef({rawDraftContent:t}),d=YV(Nu(u));return e.createElement(e.Fragment,null,e.createElement(pd,{...o,isExpandable:d>200,subtitle:d>0?u:null,rightAsideElement:a&&o.layout===Te.DESKTOP?e.createElement(b3,{...a}):void 0}),a&&o.layout===Te.MOBILE&&e.createElement(b3,{mb:"l",...a}))}return e.createElement(e.Fragment,null,e.createElement(pd,{...o,isExpandable:n===void 0?!!(t&&t.length>200):n,subtitle:t,rightAsideElement:a&&o.layout===Te.DESKTOP?e.createElement(b3,{...a}):void 0}),a&&o.layout===Te.MOBILE&&e.createElement(b3,{mb:"l",...a}))},BO=({signsContent:t,layout:n=Te.MOBILE})=>e.createElement(e.Fragment,null,t.map((a,o)=>e.createElement(e.Fragment,{key:a.heading.title},e.createElement(Kx,{key:a.heading.title,title:a.heading.title,subtitle:a.heading.subtitle,icon:a.heading.icon,bg:"grey-50",color:"black",mx:{xs:"m",md:"0"},mb:{xs:"0",md:"l"},p:"0"}),a.topics.map((u,d)=>e.createElement(e.Fragment,{key:u.title},e.createElement(Wx,{icon:u.icon,title:u.title,content:u.content,mx:{xs:"m",md:"0"}}),d!==a.topics.length-1&&e.createElement(yt,{color:"grey-200",my:{xs:"0",md:"l"},mx:{xs:"m",md:"0"}}))),e.createElement(pe,{justifyContent:"center",my:{xs:"xs",md:"l"}},e.createElement(ye,{variant:"secondary",href:a.link.href},a.link.children)),o===2&&e.createElement(vy,null),o===2&&e.createElement(Fe,{adUnitCompletePath:n===Te.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_1":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===5&&e.createElement(Fe,{adUnitCompletePath:n===Te.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_2":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===8&&e.createElement(Fe,{adUnitCompletePath:n===Te.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_3":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===11&&n===Te.MOBILE&&e.createElement(Fe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_4",variant:"ARTICLE"}),o!==t.length-1&&e.createElement(yt,{mx:{xs:"m",md:"0"},color:"ultramarine",mb:"l"})))),FO=({images:t,...n})=>!t||(t==null?void 0:t.length)===0?null:e.createElement(ea,{as:"section",colsNumber:{xs:4,md:5},gap:{xs:"xxs",md:"xl"},...n},t.map(a=>e.createElement("a",{key:a.cover,href:a.link},e.createElement(np,{src:a.cover,alt:a.title})))),C8=({description:t,...n})=>t&&typeof t!="string"?e.createElement(Cb,{...n,description:Ef({rawDraftContent:t})}):t?e.createElement(Cb,{...n,description:t}):null,qO=({infosContent:t,layout:n=Te.MOBILE})=>{const a=e.createElement(e.Fragment,null,t.map(o=>e.createElement(pe,{gap:"xxs",alignItems:"center",mb:{xs:"xl",md:"0"},key:o.title},e.createElement(sr,{mr:"xxs",size:30,...o.iconOptions}),e.createElement(H,{size:"l",as:"span",weight:"bold"},o.title,!o.rating&&e.createElement(H,{as:"span",color:"ultramarine",size:"m",weight:"regular"}," ",o.information)),o.rating&&e.createElement(Dx,{rating:o.rating}))));return n===Te.DESKTOP?e.createElement(ea,{colsNumber:{xs:void 0,sm:2},gap:"xl",my:"l"},a):a},_3=({articles:t,seeMoreButton:n,layout:a,...o})=>{const{variablesForQuery:u,...d}=o;return e.createElement(q,{...d},t.map((c,v)=>{const p=`lastArticleKey${v}`,f=v===t.length-1;return e.createElement(e.Fragment,{key:p},e.createElement(Hx,{...c,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:a===Te.MOBILE?void 0:3,...c.cardTitleProps}}),!f&&e.createElement(yt,{color:"grey-200",my:"s"}),v===10&&a===Te.MOBILE&&e.createElement(Fe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),v===20&&a===Te.MOBILE&&e.createElement(Fe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(v===10||v===20)&&a===Te.MOBILE&&e.createElement(yt,{color:"grey-200",my:"s"}))}),n&&e.createElement(an,{...n,variant:"secondary",mx:"auto",mt:"s"}))},E3=({legalNotices:t,seeMoreLegalNotices:n,...a})=>t.length===0?null:e.createElement(q,{...a},t.map(o=>e.createElement(e.Fragment,null,e.createElement(yq,{key:o.link,...o,linkProps:{children:"Lire l’annonce"}}),e.createElement(yt,{my:"l",color:"grey-200"}))),n&&e.createElement(an,{variant:"secondary",mx:"auto",mt:"xl",...n})),JV=t=>{const n=new Intl.DateTimeFormat("fr",{dateStyle:"short",timeStyle:"short",timeZone:"Europe/Paris"}),a=new Date(t).getTime();return n.format(a).replace(" "," à ").replace(":","h")},y3=t=>{const n=a=>`${a}`.padStart(2,"0");return`${n(Math.floor(t/60))}:${n(t-Math.floor(t/60)*60)}`},zO=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),QV=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),A8=t=>{const n=new Date().getTime(),a=new Date(t).getTime(),o=(a-n)/6e4;let u=zO.format(Math.round(o),"minutes");return o<=-60&&(u=zO.format(Math.ceil(o/60),"hours"),o<=-60*24&&(u=QV.format(a))),u==="cette minute-ci"?"à l'instant":u},T8=new Date(2024,8,5,18,20),XV=t=>new Date().setMinutes(T8.getMinutes()-t),ej=t=>new Date().setHours(T8.getHours()-t),tj=t=>new Date().setDate(T8.getDate()-t);function D8(t,n=!0){const a=String(t.getDate()).padStart(2,"0"),o=String(t.getMonth()+1).padStart(2,"0");let u=t.getFullYear();return n||(u=Number(t.getFullYear().toString().slice(2))),`${a}/${o}/${u}`}function O8(t){const[n,a,o]=t.split("-"),u=n.slice(-2);return`${o}/${a}/${u}`}const UO=({location:t,header:n,surtitle:a,title:o,date:u,linkLogo:d,description:c,linkPDF:v,linkNotice:p,signature:f,..._})=>e.createElement(q,{..._,as:"section"},e.createElement(q,{mb:"s"},e.createElement(pe,{color:"ultramarine"},e.createElement(sr,{name:"local",size:13,mr:"xxs-2",mb:"xxs-2"}),e.createElement(H,{size:"xxs",weight:"bold",textTransform:"uppercase"},t)),e.createElement(Ye,{size:"xs"},n),e.createElement(Ye,{size:"xs"},a),e.createElement(Ye,{size:"xs"},o),e.createElement(H,{as:"time",size:"s",color:"grey-400",dateTime:u},"Publié le ",O8(u))),d&&e.createElement(q,{as:"img",src:d,mb:"s",style:{maxWidth:"100px",maxHeight:"100px"}}),c&&e.createElement(H,{size:"m",mb:"xxl",dangerouslySetInnerHTML:{__html:c}}),f&&e.createElement(H,{italic:!0,mb:"xxl"},f),v&&e.createElement(ye,{variant:"primary",href:v,target:"_blank",mr:"m",mb:"m"},"Télécharger le justificatif en PDF"),p&&e.createElement(ye,{variant:"secondary",href:p,target:"_blank"},"Télécharger la notice")),k8=({updatedAt:t,...n})=>e.createElement(Jx,{...n,...t&&{updatedAt:A8(t)}}),Av=({cardOverviewProps:t,...n})=>{if(t.length<=0)return null;const a=e.createElement(e.Fragment,null,t.map((o,u)=>e.createElement(ry,{...o,key:o.title,mb:u!==t.length-1?"m":"0",variant:"big",cardHeaderProps:{headline:{text:"Live",bg:"red"},hasDot:!0}})));return Object.keys(n).length===0?a:e.createElement(q,{...n},a)},HO=({draftContent:t,pageEndpoint:n,imgEndpoint:a,withCmp:o=!0})=>{const u=e.useRef(null);return e.useEffect(()=>{const d=Cv({rawDraftContent:t,pageEndpoint:n,imgEndpoint:a,withCmp:o}),c=document.createRange().createContextualFragment(d);u.current&&(u.current.innerHTML="",u.current.appendChild(c))},[t]),e.createElement(q,{ref:u,mt:"s",className:"c-content"},Ef({rawDraftContent:t,pageEndpoint:n,imgEndpoint:a,withCmp:o}))},VO=({currentTab:t})=>e.createElement(pe,{className:"c-tablist",mb:"l",gap:"l",px:{xs:"m",md:"0"}},e.createElement(ye,{whiteSpace:"nowrap",href:"/arts-stars/cinema/film-au-cinema-en-ce-moment",tabVariant:"primary",tabColor:"entertainment",tabIsSelected:t==="in_theaters"},"A l'affiche"),e.createElement(ye,{whiteSpace:"nowrap",href:"/arts-stars/cinema/sortie-cinema-de-la-semaine",tabVariant:"primary",tabColor:"entertainment",tabIsSelected:t==="last_releases"},"Sorties de la semaine"),e.createElement(ye,{whiteSpace:"nowrap",href:"/arts-stars/cinema/prochaine-sortie-cinema",tabVariant:"primary",tabColor:"entertainment",tabIsSelected:t==="soon"},"Prochainement")),N3=({buttonLabel:t,title:n,url:a,...o})=>e.createElement(pe,{alignItems:"center",justifyContent:"between",gap:{xs:"xs",md:"m"},py:"s",px:"xxl",direction:{xs:"column",md:"row"},bg:"ultramarine",...o},e.createElement(H,{as:"h2",color:"white",size:"xl",weight:"bold",textAlign:{xs:"center",md:"left"}},n),e.createElement(ye,{variant:"secondary",href:a,target:"_blank"},t));var rj=Object.defineProperty,nj=(t,n,a)=>n in t?rj(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a,x3=(t,n,a)=>nj(t,typeof n!="symbol"?n+"":n,a);const ij=()=>/Android/i.test(navigator.userAgent),aj=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),oj=()=>{const t=document.getElementById("js-download-band");t&&ij()&&t.setAttribute("href","https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome")},lj=()=>{const t=document.querySelector("#js-election-selector");t&&t.addEventListener("change",n=>{window.location.replace(n.target.value)})},uj=()=>{const t=document.querySelector(".c-search-banner");if(t){const n=document.querySelector("#js-search-banner-to-hide"),a=t.querySelector("#js-search-banner-dropdown-btn");a==null||a.addEventListener("click",()=>{const o=a.querySelector("svg"),u=o==null?void 0:o.querySelector("use");switch(u==null?void 0:u.getAttribute("xlink:href")){case"#chevron-up":u==null||u.setAttribute("xlink:href","#chevron-down"),n==null||n.classList.add("u-hidden");break;case"#chevron-down":u==null||u.setAttribute("xlink:href","#chevron-up"),n==null||n.classList.remove("u-hidden");break}})}},sj=[{text:"Paris",_index:"town_1717424751904",_id:"75056",_score:1,_source:{output:"Paris (75000)",url:"/elections/resultats/paris/paris-75000"}},{text:"Paris 10ème Arrondissement",_index:"town_1717424751904",_id:"75056AR10",_score:1,_source:{output:"Paris 10ème Arrondissement (75010)",url:"/elections/resultats/paris/paris-75010"}},{text:"Paris 11ème Arrondissement",_index:"town_1717424751904",_id:"75056AR11",_score:1,_source:{output:"Paris 11ème Arrondissement (75011)",url:"/elections/resultats/paris/paris-75011"}}],cj=(t,n,a,o,u,d)=>{const c=document.getElementById(t);if(!c)return;const v=c.dataset.storybook,p=c.querySelector(`#${t}-search`),f=p==null?void 0:p.getAttribute("data-api-url"),_=c.querySelector(".c-autocomplete__menu");if(!p||!_||!f)return;const N=c.querySelector(".c-autocomplete__input-spinner"),w=p.getAttribute("data-trigger-message"),S=async I=>{try{let F;return v&&n.includes("20minutes.fr")?F=sj:F=await(await fetch(`${f}${a}${encodeURIComponent(I)}`)).json(),d?F[d]:F}catch(F){return console.error("Error fetching autocomplete results:",F),[]}},C=(I,F)=>{const U=document.createElement("li");U.id=`/${I}`,U.textContent=F,U.addEventListener("click",()=>{p instanceof HTMLInputElement&&(p.value=F,_.classList.add("u-hidden"))}),_.appendChild(U)},T=()=>{N==null||N.classList.toggle("u-hidden")},A=()=>{const I=document.createElement("li");I.textContent=w,_.appendChild(I)},M=async I=>{T(),_.classList.remove("u-hidden");const F=await S(I);_.innerHTML="",F.length===0&&_.classList.add("u-hidden"),F.forEach(U=>{C(U[o],U[u])}),T()},P=I=>{if(!(I.target instanceof HTMLInputElement))return;const F=I.target.value;_.classList.remove("u-hidden"),F.length>=3?M(F):(_.innerHTML="",A())};p.addEventListener("input",P),p.addEventListener("focusout",()=>{setTimeout(()=>_.classList.add("u-hidden"),300)}),p.addEventListener("focusin",()=>{_.childElementCount>0&&_.classList.remove("u-hidden")})},dj=()=>{const t=document.querySelector("header"),n=document.querySelector(".js-limit-scroll-close-article-btn"),a=document.querySelector(".js-close-article-btn"),o=document.querySelector(".c-header-mobile"),u=o instanceof HTMLElement?o.offsetHeight:0;if(t&&n&&a){const d=new IntersectionObserver(()=>{const c=a.classList,v=c.contains("u-hidden"),p=t.getBoundingClientRect().bottom-u,f=n.getBoundingClientRect().bottom-u;v&&p<=0&&f>=0&&c.remove("u-hidden"),!v&&(p>=0||f<=0)&&c.add("u-hidden")},{root:document,rootMargin:`-${u}px 0px 0px 0px`});d.observe(t),d.observe(n)}},mj=t=>{t.stopImmediatePropagation(),t.preventDefault();const n=t.currentTarget;if(n instanceof HTMLButtonElement){const a=n.parentElement,o=a==null?void 0:a.querySelector(`#${n.getAttribute("aria-controls")}`);n.getAttribute("aria-expanded")==="true"?(n.setAttribute("aria-expanded","false"),o==null||o.setAttribute("aria-hidden","true")):(n.setAttribute("aria-expanded","true"),o==null||o.setAttribute("aria-hidden","false"))}},fj=(t=document.querySelector(".js-collapse__button"))=>{t&&document.querySelectorAll(".c-collapse__button").forEach(n=>{n.addEventListener("click",a=>{mj(a)})})},pj=(t,n)=>{const a=document.querySelector(`#${n}`);if(a){const o=a.querySelector(".js-countdown-days"),u=a.querySelector(".js-countdown-hours"),d=a.querySelector(".js-countdown-minutes"),c=a.querySelector(".js-countdown-seconds");if(!o||!u||!d||!c)return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const v=window.counters[t],p=new Date(v).getTime(),f=setInterval(()=>{const _=new Date().getTime(),N=p-_;if(N<=0)clearInterval(f);else{const w=Math.floor(N/864e5),S=Math.floor(N%(1e3*60*60*24)/(1e3*60*60)),C=Math.floor(N%(1e3*60*60)/(1e3*60)),T=Math.floor(N%(1e3*60)/1e3);o.innerHTML=w.toString(),u.innerHTML=S.toString(),d.innerHTML=C.toString(),c.innerHTML=T.toString()}},1e3)}},hj=t=>{const n=t.getBBox(),a=n.width/20;return[n.x-a,n.y-a,n.width+a*2,n.height+a*2].join(" ")},vj=()=>{const t=document.querySelector(".c-map-districts-container"),n=document.querySelector(".c-map-districts");if(!t||!n)return;const a=document.querySelector(".c-map-districts-container__description"),o=document.querySelector(".c-map-districts-container__department"),u=document.querySelector(".c-map-districts-container__unzoom-button");let d=n;const c=n.getAttribute("viewBox"),v=(S,C)=>{var T;return(T=S.matches)==null?void 0:T.call(S,C)},p=(S,C,T=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!S)return;let A,M=S.parentElement;for(;M instanceof SVGGraphicsElement&&M!==C;)v(M,T)&&(A=M),M=M.parentElement;return A},f=(S,C,T)=>{if(!S)return;let A=S.parentElement;for(;A instanceof SVGGraphicsElement&&A!==T;){if(C===A)return!0;A=A.parentElement}return T===C},_=(S,C)=>{if(C&&u&&a){t.classList.remove("c-map-districts-container--department-view"),a.classList.remove("u-hidden"),o==null||o.classList.add("u-hidden"),u.classList.add("u-hidden"),C!==c&&(a.classList.add("u-hidden"),u.classList.remove("u-hidden")),d.classList.remove("js-selected-area"),d=S;const T=d.getAttribute("data-info");o&&T&&(t.classList.add("c-map-districts-container--department-view"),o.classList.remove("u-hidden"),o.innerHTML=T),d.classList.add("js-selected-area"),n.setAttribute("viewBox",C)}},N=S=>{S.stopPropagation();const C=S.currentTarget;if(d&&n&&C instanceof SVGGraphicsElement){if(C===d)return;if(S.preventDefault(),d!==n&&!f(C,d,n)){_(n,c);return}const T=p(C,d);_(T||C,hj(T||C))}},w=()=>{n&&d!==n&&_(n,c)};n.addEventListener("click",w),u&&u.addEventListener("click",w),document.querySelectorAll(".c-map-districts__zoomable").forEach(S=>{S.addEventListener("click",C=>N(C))})},gj=()=>{const t=document.getElementById("elections-form-search"),n=document.querySelector(".c-search-form__autocomplete");if(!t||!n)return;const a=d=>{n.classList.remove("u-hidden");const c=n.querySelectorAll("li"),v=[];return c.forEach(p=>{const f=p.querySelector("a");f&&f.innerHTML.toLowerCase().includes(d.toLowerCase())&&v.push(p.innerHTML)}),v},o=d=>{n.innerHTML+=`<li>${d}</li>`},u=({target:d})=>{if(!(d instanceof HTMLInputElement))return;const c=d.value;if(n.classList.add("u-hidden"),c.length>=3){const v=a(c);n.innerHTML="",v.length===0&&n.classList.add("u-hidden"),v.forEach(p=>{o(p)})}};t.addEventListener("input",u),t.addEventListener("focusout",()=>{setTimeout(()=>n.classList.add("u-hidden"),300)}),t.addEventListener("focusin",()=>{n.childElementCount>0&&n.classList.remove("u-hidden")})},bj=(t,n)=>{var a;t.setAttribute("aria-expanded","true");const o=(a=t.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(d=>d.classList.remove(n));const u=t.querySelector(".js-ellipsis-button__label");u instanceof HTMLSpanElement&&(u.innerHTML="Voir moins")},_j=(t,n)=>{var a;const o=(a=t.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(d=>d.classList.add(n)),t.setAttribute("aria-expanded","false");const u=t.querySelector(".js-ellipsis-button__label");u instanceof HTMLSpanElement&&(u.innerHTML="Voir plus")},Ej=(t,n)=>{const a=t.currentTarget;if(t.preventDefault(),a instanceof HTMLButtonElement){const o=n?"u-ellipsis-multiline":"u-ellipsis";return a.getAttribute("aria-expanded")==="true"?_j(a,o):bj(a,o)}return null},yj=(t=document.querySelector(".js-ellipsis-button"))=>{t&&document.querySelectorAll(".js-ellipsis-button").forEach(n=>{const a=n.getAttribute("data-multiple")==="true";n.addEventListener("click",o=>Ej(o,a))})},Nj=t=>{var n;t.setAttribute("aria-expanded","true");const a=(n=t.parentNode)==null?void 0:n.querySelectorAll(".js-expand-target");a==null||a.forEach(u=>u.setAttribute("aria-hidden","false"));const o=t.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir moins")},xj=t=>{var n;const a=(n=t.parentNode)==null?void 0:n.querySelectorAll(".js-expand-target");a==null||a.forEach(u=>u.setAttribute("aria-hidden","true")),t.setAttribute("aria-expanded","false");const o=t.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir plus")},wj=t=>{const n=t.currentTarget;return t.preventDefault(),n instanceof HTMLButtonElement?n.getAttribute("aria-expanded")==="true"?xj(n):Nj(n):null},Sj=(t=document.querySelector(".js-expand-button"))=>{t&&document.querySelectorAll(".js-expand-button").forEach(n=>n.addEventListener("click",wj))},Cj=()=>{const t=document.querySelector(".js-game-alert");aj&&t&&t.classList.remove("u-hidden")},Aj=()=>{const t=document.querySelectorAll(".js-half-donut-result");for(const n of Array.from(t)){const a=n.querySelector(".c-half-donut"),o=n.querySelector(".c-legend");if(!a||!o)return;o.querySelectorAll("[data-color]").forEach(u=>{const d=u.getAttribute("data-color"),c=a.querySelector(`.c-half-donut__zone--${d}`);c==null||c.addEventListener("mouseenter",()=>{u.classList.add("c-legend__item--is-hovered"),a.classList.add("c-half-donut--is-hovered"),o.classList.add("c-legend--is-hovered")}),c==null||c.addEventListener("mouseleave",()=>{u.classList.remove("c-legend__item--is-hovered"),a.classList.remove("c-half-donut--is-hovered"),o.classList.remove("c-legend--is-hovered")}),u.addEventListener("mouseenter",()=>{c==null||c.classList.add("c-half-donut__zone--is-hovered"),o.classList.add("c-legend--is-hovered"),a.classList.add("c-half-donut--is-hovered")}),u.addEventListener("mouseleave",()=>{c==null||c.classList.remove("c-half-donut__zone--is-hovered"),o.classList.remove("c-legend--is-hovered"),a.classList.remove("c-half-donut--is-hovered")})})}},Tj=()=>{const t=document.querySelector(".c-image-slider__container");if(!t)return;const n=document.querySelectorAll(".c-image-slider__slide"),a=document.querySelector(".c-image-slider__button-container--previous"),o=document.querySelector(".c-image-slider__button-container--next"),u=document.querySelectorAll(".c-image-slider__indicator");let d=0;const c=()=>{u.forEach((f,_)=>{f.classList.toggle("c-image-slider__indicator--is-active",_===d)})},v=()=>{if(!(t instanceof HTMLElement))return;const f=-d*100;t.style.transform=`translateX(${f}%)`,c()},p=f=>{d=f,v()};a==null||a.addEventListener("click",()=>{const f=(d-1+n.length)%n.length;p(f)}),o==null||o.addEventListener("click",()=>{const f=(d+1)%n.length;p(f)}),u.forEach((f,_)=>{f.addEventListener("click",()=>{p(_)})}),v()},fi={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var Dj=[`a[href]${fi.inert}${fi.negTabIndex}`,`area[href]${fi.inert}${fi.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${fi.inert}${fi.negTabIndex}${fi.disabled}`,`input[type="radio"]${fi.inert}${fi.negTabIndex}${fi.disabled}`,`select${fi.inert}${fi.negTabIndex}${fi.disabled}`,`textarea${fi.inert}${fi.negTabIndex}${fi.disabled}`,`button${fi.inert}${fi.negTabIndex}${fi.disabled}`,`details${fi.inert} > summary:first-of-type${fi.negTabIndex}`,`iframe${fi.inert}${fi.negTabIndex}`,`audio[controls]${fi.inert}${fi.negTabIndex}`,`video[controls]${fi.inert}${fi.negTabIndex}`,`[contenteditable]${fi.inert}${fi.negTabIndex}`,`[tabindex]${fi.inert}${fi.negTabIndex}`];function jO(t){(t.querySelector("[autofocus]")||t).focus()}function Oj(t){const n=Tv(t,!0),a=n?Tv(t,!1)||n:null;return[n,a]}function Tv(t,n){if(n&&$O(t))return t;if(Mj(t))if(t.shadowRoot){let a=GO(t.shadowRoot,n);for(;a;){const o=Tv(a,n);if(o)return o;a=KO(a,n)}}else if(t.localName==="slot"){const a=t.assignedElements({flatten:!0});n||a.reverse();for(const o of a){const u=Tv(o,n);if(u)return u}}else{let a=GO(t,n);for(;a;){const o=Tv(a,n);if(o)return o;a=KO(a,n)}}return!n&&$O(t)?t:null}function GO(t,n){return n?t.firstElementChild:t.lastElementChild}function KO(t,n){return n?t.nextElementSibling:t.previousElementSibling}const kj=t=>t.matches("details:not([open]) *")&&!t.matches("details>summary:first-of-type")?!0:!(t.offsetWidth||t.offsetHeight||t.getClientRects().length),$O=t=>{var n;return(n=t.shadowRoot)!=null&&n.delegatesFocus?!1:t.matches(Dj.join(","))&&!kj(t)};function Mj(t){return t.shadowRoot&&t.getAttribute("tabindex")==="-1"?!1:!t.matches(":disabled,[hidden],[inert]")}function Dv(t=document){const n=t.activeElement;return n?n.shadowRoot?Dv(n.shadowRoot)||document.activeElement:n:null}function Lj(t,n){const[a,o]=Oj(t);if(!a)return n.preventDefault();const u=Dv();n.shiftKey&&u===a?(o.focus(),n.preventDefault()):!n.shiftKey&&u===o&&(a.focus(),n.preventDefault())}function Yh(t,n){function a(o){if(!o||o===document||o===window)return null;const u=WO(o);return u&&(o=u),o.closest(t)||a(o.getRootNode().host)}return a(n)}function WO(t){return t.assignedSlot||(t.parentNode?WO(t.parentNode):null)}const Ov="data-a11y-dialog";class RO{constructor(n){x3(this,"$el"),x3(this,"id"),x3(this,"previouslyFocused"),x3(this,"shown"),this.$el=n,this.id=this.$el.getAttribute(Ov)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented?this:(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this)}show(n){var a;return this.shown?this:this.fire("show",n).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=Dv(),((a=this.previouslyFocused)==null?void 0:a.tagName)==="BODY"&&n!=null&&n.target&&(this.previouslyFocused=n.target),(n==null?void 0:n.type)==="focus"?this.maintainFocus():jO(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(n){var a,o;return this.shown?this.fire("hide",n).defaultPrevented?this:(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),(o=(a=this.previouslyFocused)==null?void 0:a.focus)==null||o.call(a),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this):this}on(n,a,o){return this.$el.addEventListener(n,a,o),this}off(n,a,o){return this.$el.removeEventListener(n,a,o),this}fire(n,a){const o=new CustomEvent(n,{detail:a,cancelable:!0});return this.$el.dispatchEvent(o),o}handleTriggerClicks(n){const a=n.composedPath()[0],o=Yh(`[${Ov}-show="${this.id}"]`,a),u=Yh(`[${Ov}-hide="${this.id}"]`,a),d=Yh(`[${Ov}-hide]`,a)&&Yh('[aria-modal="true"]',a)===this.$el;o&&this.show(n),(u||d)&&this.hide(n)}bindKeypress(n){if(Yh('[aria-modal="true"]',Dv())!==this.$el)return;let a=!1;try{a=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}n.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!a&&(n.preventDefault(),this.hide(n)),n.key==="Tab"&&Lj(this.$el,n)}maintainFocus(){const n=Dv();Yh(`[aria-modal="true"], [${Ov}-ignore-focus-trap]`,n)||jO(this.$el)}}function ZO(){for(const t of document.querySelectorAll("[data-a11y-dialog]"))new RO(t)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ZO):ZO());const Ij=()=>document.querySelectorAll(".js-modal").forEach(t=>{if(!(t instanceof HTMLElement))return;const n=new RO(t);if(t.id==="dialog-menu"){const a=document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"),o=document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");a.length>0&&o.length>0&&(n.on("show",()=>{a.forEach(u=>u.classList.add("u-hidden")),o.forEach(u=>u.classList.remove("u-hidden"))}),n.on("hide",()=>{a.forEach(u=>u.classList.remove("u-hidden")),o.forEach(u=>u.classList.add("u-hidden"))}))}n.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),kv="68px",M8=({navigatedList:t,nextBtn:n,prevBtn:a})=>{n.classList.contains("o-nav-button--visible")&&!a.classList.contains("o-nav-button--visible")&&(t.style.width=`calc(100% - ${kv})`,t.style.position="",t.style.right=""),a.classList.contains("o-nav-button--visible")&&(t.style.position="absolute",n.classList.contains("o-nav-button--visible")&&(t.style.width=`calc(100% - ${kv} * 2)`,t.style.right=kv),n.classList.contains("o-nav-button--visible")||(t.style.width=`calc(100% - ${kv})`,t.style.right="0")),!n.classList.contains("o-nav-button--visible")&&!a.classList.contains("o-nav-button--visible")&&(t.style.width="",t.style.position="",t.style.right="")},Pj=({navigatedList:t,nextBtn:n,prevBtn:a})=>{var o,u,d,c,v,p,f,_;const N=t.scrollLeft>0,w=t.scrollLeft+t.clientWidth<t.scrollWidth;N&&w?((o=n.classList)==null||o.add("o-nav-button--visible"),(u=a.classList)==null||u.add("o-nav-button--visible")):N?((d=n.classList)==null||d.remove("o-nav-button--visible"),(c=a.classList)==null||c.add("o-nav-button--visible")):w?((v=n.classList)==null||v.add("o-nav-button--visible"),(p=a.classList)==null||p.remove("o-nav-button--visible")):((f=n.classList)==null||f.remove("o-nav-button--visible"),(_=a.classList)==null||_.remove("o-nav-button--visible")),n.classList.contains("c-slider__button-container--has-background-transparent")&&a.classList.contains("c-slider__button-container--has-background-transparent")&&M8({navigatedList:t,nextBtn:n,prevBtn:a})},Bj=({navigatedList:t,nextBtn:n,prevBtn:a,sliderVariant:o})=>{if(t){const u=t.closest(".js-overview-bar-container"),d=u==null?void 0:u.querySelector(".c-stepper"),c=d==null?void 0:d.querySelectorAll(".c-stepper__item");if(c){const v=Array.from(c).findIndex(p=>p.classList.contains("c-stepper__item--loading"));if(v<0)c[0].classList.add("c-stepper__item--loading");else{c[v].classList.remove("c-stepper__item--loading"),c[v].classList.add("c-stepper__item--loaded");const p=c[v].querySelector(".c-stepper__loader");p&&p instanceof HTMLElement&&(p.style.transition="width 0s linear"),v+1<c.length&&c[v+1].classList.add("c-stepper__item--loading")}}if(t.scrollWidth-t.clientWidth>t.clientWidth){let v=t.scrollLeft;switch(o){case"three-columns-articles":v+=t.clientWidth+32;break;case"rubrics":v+=t.clientWidth-36;break;default:v+=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:v,behavior:"smooth"}),a.classList.add("o-nav-button--visible"),v+t.clientWidth>=t.scrollWidth&&n.classList.remove("o-nav-button--visible")}else{const v=t.scrollWidth-t.clientWidth;t.scrollTo({left:v,behavior:"smooth"}),n.classList.remove("o-nav-button--visible"),a.classList.add("o-nav-button--visible")}n.classList.contains("c-slider__button-container--has-background-transparent")&&a.classList.contains("c-slider__button-container--has-background-transparent")&&M8({navigatedList:t,nextBtn:n,prevBtn:a})}},Fj=({navigatedList:t,nextBtn:n,prevBtn:a,sliderVariant:o,delay:u})=>{if(t){const d=t.closest(".js-overview-bar-container"),c=d==null?void 0:d.querySelector(".c-stepper"),v=c==null?void 0:c.querySelectorAll(".c-stepper__item");if(v){const p=Array.from(v).findIndex(f=>f.classList.contains("c-stepper__item--loading"));p<0?v[0].classList.add("c-stepper__item--loading"):(v[p].classList.remove("c-stepper__item--loading"),v[p].classList.remove("c-stepper__item--loaded"),p-1>0&&(v[p-1].classList.remove("c-stepper__item--loading"),v[p-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const f=v[p-1].querySelector(".c-stepper__loader");v[p-1].classList.add("c-stepper__item--loading"),f&&f instanceof HTMLElement&&(f.style.transition=`width ${u/1e3}s linear`)},0)))}if(t.clientWidth<t.scrollLeft){let p=t.scrollLeft;switch(o){case"three-columns-articles":p-=t.clientWidth+32;break;case"rubrics":p-=t.clientWidth-36;break;default:p-=Math.ceil(t.clientWidth*.6);break}t.scrollTo({left:p,behavior:"smooth"}),n.classList.add("o-nav-button--visible"),p===0&&a.classList.remove("o-nav-button--visible")}else t.scrollTo({left:0,behavior:"smooth"}),a.classList.remove("o-nav-button--visible"),t.clientWidth<t.scrollWidth&&n.classList.add("o-nav-button--visible");n.classList.contains("c-slider__button-container--has-background-transparent")&&a.classList.contains("c-slider__button-container--has-background-transparent")&&M8({navigatedList:t,nextBtn:n,prevBtn:a})}},qj=({navigatedList:t,nextBtn:n,prevBtn:a})=>{Pj({navigatedList:t,nextBtn:n,prevBtn:a})},zj=()=>{const t=document.querySelectorAll(".js-navigation-container");for(const n of Array.from(t)){const{sliderVariant:a}=n.dataset,{sliderAuto:o}=n.dataset,{sliderDelay:u}=n.dataset,d=u?parseInt(u,10):3e3,c=n.closest(".js-overview-bar-container"),v=c==null?void 0:c.querySelector(".c-stepper"),p=v==null?void 0:v.querySelectorAll(".c-stepper__item");if(n){const f=n.querySelector(".js-navigation-container__list"),_=n.querySelector(".o-nav-button--next-button"),N=n.querySelector(".o-nav-button--previous-button");if(f&&f.clientWidth<f.scrollWidth&&(_==null||_.classList.add("o-nav-button--visible"),_!=null&&_.classList.contains("c-slider__button-container--has-background-transparent")&&(f.style.width=`calc(100% - ${kv})`)),f&&_&&N&&(_==null||_.addEventListener("click",Bj.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a})),N==null||N.addEventListener("click",Fj.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a,delay:d}))),o==="true"&&_){const w=v?v.querySelector(".c-stepper__item--loading"):null;p&&(p.forEach(S=>{const C=S.querySelector(".c-stepper__loader");C&&C instanceof HTMLElement&&(C.style.transition=`width ${d/1e3}s linear`)}),w||p[0].classList.add("c-stepper__item--loading")),setInterval(()=>{_.classList.contains("o-nav-button--visible")?_.click():f&&N&&(f.scrollLeft=0,p&&(p.forEach(S=>{const C=S.querySelector(".c-stepper__loader");C&&C instanceof HTMLElement&&(C.style.transition="width 0s linear"),S.classList.remove("c-stepper__item--loading"),S.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{C&&C instanceof HTMLElement&&(C.style.transition=`width ${d/1e3}s linear`)},0)}),setTimeout(()=>{p[0].classList.add("c-stepper__item--loading")},0)),N.click())},d)}}}},Uj=()=>{const t=document.querySelectorAll(".js-navigation-container");for(const n of Array.from(t))if(n){const a=n.querySelector(".js-navigation-container__list"),o=n.querySelector(".o-nav-button--next-button"),u=n.querySelector(".o-nav-button--previous-button");a&&o&&u&&window.addEventListener("resize",qj.bind(!1,{navigatedList:a,nextBtn:o,prevBtn:u}))}};/*!
322
322
  * PhotoSwipe 5.4.4 - https://photoswipe.com
323
323
  * (c) 2024 Dmytro Semenov
324
324
  */function wc(t,n,a){const o=document.createElement(n);return t&&(o.className=t),a&&a.appendChild(o),o}function Io(t,n){return t.x=n.x,t.y=n.y,n.id!==void 0&&(t.id=n.id),t}function YO(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function L8(t,n){const a=Math.abs(t.x-n.x),o=Math.abs(t.y-n.y);return Math.sqrt(a*a+o*o)}function Mv(t,n){return t.x===n.x&&t.y===n.y}function Lv(t,n,a){return Math.min(Math.max(t,n),a)}function Iv(t,n,a){let o=`translate3d(${t}px,${n||0}px,0)`;return a!==void 0&&(o+=` scale3d(${a},${a},1)`),o}function w1(t,n,a,o){t.style.transform=Iv(n,a,o)}const Hj="cubic-bezier(.4,0,.22,1)";function JO(t,n,a,o){t.style.transition=n?`${n} ${a}ms ${o||Hj}`:"none"}function I8(t,n,a){t.style.width=typeof n=="number"?`${n}px`:n,t.style.height=typeof a=="number"?`${a}px`:a}function Vj(t){JO(t)}function jj(t){return"decode"in t?t.decode().catch(()=>{}):t.complete?Promise.resolve(t):new Promise((n,a)=>{t.onload=()=>n(t),t.onerror=a})}const _d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Gj(t){return"button"in t&&t.button===1||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function Kj(t,n,a=document){let o=[];if(t instanceof Element)o=[t];else if(t instanceof NodeList||Array.isArray(t))o=Array.from(t);else{const u=typeof t=="string"?t:n;u&&(o=Array.from(a.querySelectorAll(u)))}return o}function QO(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let XO=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{XO=!0}}))}catch{}class $j{constructor(){this._pool=[]}add(n,a,o,u){this._toggleListener(n,a,o,u)}remove(n,a,o,u){this._toggleListener(n,a,o,u,!0)}removeAll(){this._pool.forEach(n=>{this._toggleListener(n.target,n.type,n.listener,n.passive,!0,!0)}),this._pool=[]}_toggleListener(n,a,o,u,d,c){if(!n)return;const v=d?"removeEventListener":"addEventListener";a.split(" ").forEach(p=>{if(p){c||(d?this._pool=this._pool.filter(_=>_.type!==p||_.listener!==o||_.target!==n):this._pool.push({target:n,type:p,listener:o,passive:u}));const f=XO?{passive:u||!1}:!1;n[v](p,o,f)}})}}function ek(t,n){if(t.getViewportSizeFn){const a=t.getViewportSizeFn(t,n);if(a)return a}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Pv(t,n,a,o,u){let d=0;if(n.paddingFn)d=n.paddingFn(a,o,u)[t];else if(n.padding)d=n.padding[t];else{const c="padding"+t[0].toUpperCase()+t.slice(1);n[c]&&(d=n[c])}return Number(d)||0}function tk(t,n,a,o){return{x:n.x-Pv("left",t,n,a,o)-Pv("right",t,n,a,o),y:n.y-Pv("top",t,n,a,o)-Pv("bottom",t,n,a,o)}}class Wj{constructor(n){this.slide=n,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(n){this.currZoomLevel=n,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(n){const{pswp:a}=this.slide,o=this.slide[n==="x"?"width":"height"]*this.currZoomLevel,u=Pv(n==="x"?"left":"top",a.options,a.viewportSize,this.slide.data,this.slide.index),d=this.slide.panAreaSize[n];this.center[n]=Math.round((d-o)/2)+u,this.max[n]=o>d?Math.round(d-o)+u:this.center[n],this.min[n]=o>d?u:this.center[n]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(n,a){return Lv(a,this.max[n],this.min[n])}}const rk=4e3;let nk=class{constructor(t,n,a,o){this.pswp=o,this.options=t,this.itemData=n,this.index=a,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,n,a){const o={x:t,y:n};this.elementSize=o,this.panAreaSize=a;const u=a.x/o.x,d=a.y/o.y;this.fit=Math.min(1,u<d?u:d),this.fill=Math.min(1,u>d?u:d),this.vFill=Math.min(1,d),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const n=t+"ZoomLevel",a=this.options[n];if(a)return typeof a=="function"?a(this):a==="fill"?this.fill:a==="fit"?this.fit:Number(a)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>rk&&(t=rk/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};class Rj{constructor(n,a,o){this.data=n,this.index=a,this.pswp=o,this.isActive=a===o.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!o.opener.isOpen,this.zoomLevels=new nk(o.options,n,a,o),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:a}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=wc("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new Wj(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(n){n&&!this.isActive?this.activate():!n&&this.isActive&&this.deactivate()}append(n){this.holderElement=n,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:n}=this;this.heavyAppended||!n.opener.isOpen||n.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(n){const a=this.currentResolution||this.zoomLevels.initial;if(!a)return;const o=Math.round(this.width*a)||this.pswp.viewportSize.x,u=Math.round(this.height*a)||this.pswp.viewportSize.y;!this.sizeChanged(o,u)&&!n||this.content.setDisplayedSize(o,u)}sizeChanged(n,a){return n!==this.prevDisplayedWidth||a!==this.prevDisplayedHeight?(this.prevDisplayedWidth=n,this.prevDisplayedHeight=a,!0):!1}getPlaceholderElement(){var n;return(n=this.content.placeholder)===null||n===void 0?void 0:n.element}zoomTo(n,a,o,u){const{pswp:d}=this;if(!this.isZoomable()||d.mainScroll.isShifted())return;d.dispatch("beforeZoomTo",{destZoomLevel:n,centerPoint:a,transitionDuration:o}),d.animations.stopAllPan();const c=this.currZoomLevel;u||(n=Lv(n,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(n),this.pan.x=this.calculateZoomToPanOffset("x",a,c),this.pan.y=this.calculateZoomToPanOffset("y",a,c),YO(this.pan);const v=()=>{this._setResolution(n),this.applyCurrentZoomPan()};o?d.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:v,duration:o,easing:d.options.easing}):v()}toggleZoom(n){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,n,this.pswp.options.zoomAnimationDuration)}setZoomLevel(n){this.currZoomLevel=n,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(n,a,o){if(this.bounds.max[n]-this.bounds.min[n]===0)return this.bounds.center[n];a||(a=this.pswp.getViewportCenterPoint()),o||(o=this.zoomLevels.initial);const u=this.currZoomLevel/o;return this.bounds.correctPan(n,(this.pan[n]-a[n])*u+a[n])}panTo(n,a){this.pan.x=this.bounds.correctPan("x",n),this.pan.y=this.bounds.correctPan("y",a),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),Io(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(n,a,o){o/=this.currentResolution||this.zoomLevels.initial,w1(this.container,n,a,o)}calculateSize(){const{pswp:n}=this;Io(this.panAreaSize,tk(n.options,n.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),n.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const n=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return Iv(this.pan.x,this.pan.y,n)}_setResolution(n){n!==this.currentResolution&&(this.currentResolution=n,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const Zj=.35,Yj=.6,Jj=.4,Qj=.5;function Xj(t,n){return t*n/(1-n)}class eG{constructor(n){this.gestures=n,this.pswp=n.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&Io(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:n,prevP1:a,dragAxis:o}=this.gestures,{currSlide:u}=this.pswp;if(o==="y"&&this.pswp.options.closeOnVerticalDrag&&u&&u.currZoomLevel<=u.zoomLevels.fit&&!this.gestures.isMultitouch){const d=u.pan.y+(n.y-a.y);if(!this.pswp.dispatch("verticalDrag",{panY:d}).defaultPrevented){this._setPanWithFriction("y",d,Yj);const c=1-Math.abs(this._getVerticalDragRatio(u.pan.y));this.pswp.applyBgOpacity(c),u.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),u&&(YO(u.pan),u.applyCurrentZoomPan()))}end(){const{velocity:n}=this.gestures,{mainScroll:a,currSlide:o}=this.pswp;let u=0;if(this.pswp.animations.stopAll(),a.isShifted()){const d=(a.x-a.getCurrSlideX())/this.pswp.viewportSize.x;n.x<-.5&&d<0||n.x<.1&&d<-.5?(u=1,n.x=Math.min(n.x,0)):(n.x>Qj&&d>0||n.x>-.1&&d>.5)&&(u=-1,n.x=Math.max(n.x,0)),a.moveIndexBy(u,!0,n.x)}o&&o.currZoomLevel>o.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(n){const{velocity:a}=this.gestures,{currSlide:o}=this.pswp;if(!o)return;const{pan:u,bounds:d}=o,c=u[n],v=this.pswp.bgOpacity<1&&n==="y",p=c+Xj(a[n],.995);if(v){const S=this._getVerticalDragRatio(c),C=this._getVerticalDragRatio(p);if(S<0&&C<-.4||S>0&&C>Jj){this.pswp.close();return}}const f=d.correctPan(n,p);if(c===f)return;const _=f===p?1:.82,N=this.pswp.bgOpacity,w=f-c;this.pswp.animations.startSpring({name:"panGesture"+n,isPan:!0,start:c,end:f,velocity:a[n],dampingRatio:_,onUpdate:S=>{if(v&&this.pswp.bgOpacity<1){const C=1-(f-S)/w;this.pswp.applyBgOpacity(Lv(N+(1-N)*C,0,1))}u[n]=Math.floor(S),o.applyCurrentZoomPan()}})}_panOrMoveMainScroll(n){const{p1:a,dragAxis:o,prevP1:u,isMultitouch:d}=this.gestures,{currSlide:c,mainScroll:v}=this.pswp,p=a[n]-u[n],f=v.x+p;if(!p||!c)return!1;if(n==="x"&&!c.isPannable()&&!d)return v.moveTo(f,!0),!0;const{bounds:_}=c,N=c.pan[n]+p;if(this.pswp.options.allowPanToNext&&o==="x"&&n==="x"&&!d){const w=v.getCurrSlideX(),S=v.x-w,C=p>0,T=!C;if(N>_.min[n]&&C){if(_.min[n]<=this.startPan[n])return v.moveTo(f,!0),!0;this._setPanWithFriction(n,N)}else if(N<_.max[n]&&T){if(this.startPan[n]<=_.max[n])return v.moveTo(f,!0),!0;this._setPanWithFriction(n,N)}else if(S!==0){if(S>0)return v.moveTo(Math.max(f,w),!0),!0;if(S<0)return v.moveTo(Math.min(f,w),!0),!0}else this._setPanWithFriction(n,N)}else n==="y"?!v.isShifted()&&_.min.y!==_.max.y&&this._setPanWithFriction(n,N):this._setPanWithFriction(n,N);return!1}_getVerticalDragRatio(n){var a,o;return(n-((a=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.bounds.center.y)!==null&&a!==void 0?a:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(n,a,o){const{currSlide:u}=this.pswp;if(!u)return;const{pan:d,bounds:c}=u;if(c.correctPan(n,a)!==a||o){const v=Math.round(a-d[n]);d[n]+=v*(o||Zj)}else d[n]=a}}const tG=.05,rG=.15;function ik(t,n,a){return t.x=(n.x+a.x)/2,t.y=(n.y+a.y)/2,t}class nG{constructor(n){this.gestures=n,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:n}=this.gestures.pswp;n&&(this._startZoomLevel=n.currZoomLevel,Io(this._startPan,n.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:n,startP1:a,p2:o,startP2:u,pswp:d}=this.gestures,{currSlide:c}=d;if(!c)return;const v=c.zoomLevels.min,p=c.zoomLevels.max;if(!c.isZoomable()||d.mainScroll.isShifted())return;ik(this._startZoomPoint,a,u),ik(this._zoomPoint,n,o);let f=1/L8(a,u)*L8(n,o)*this._startZoomLevel;if(f>c.zoomLevels.initial+c.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),f<v)if(d.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=c.zoomLevels.initial){const _=1-(v-f)/(v/1.2);d.dispatch("pinchClose",{bgOpacity:_}).defaultPrevented||d.applyBgOpacity(_)}else f=v-(v-f)*rG;else f>p&&(f=p+(f-p)*tG);c.pan.x=this._calculatePanForZoomLevel("x",f),c.pan.y=this._calculatePanForZoomLevel("y",f),c.setZoomLevel(f),c.applyCurrentZoomPan()}end(){const{pswp:n}=this.gestures,{currSlide:a}=n;(!a||a.currZoomLevel<a.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&n.options.pinchToClose?n.close():this.correctZoomPan()}_calculatePanForZoomLevel(n,a){const o=a/this._startZoomLevel;return this._zoomPoint[n]-(this._startZoomPoint[n]-this._startPan[n])*o}correctZoomPan(n){const{pswp:a}=this.gestures,{currSlide:o}=a;if(!(o!=null&&o.isZoomable()))return;this._zoomPoint.x===0&&(n=!0);const u=o.currZoomLevel;let d,c=!0;u<o.zoomLevels.initial?d=o.zoomLevels.initial:u>o.zoomLevels.max?d=o.zoomLevels.max:(c=!1,d=u);const v=a.bgOpacity,p=a.bgOpacity<1,f=Io({x:0,y:0},o.pan);let _=Io({x:0,y:0},f);n&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=u,Io(this._startPan,f)),c&&(_={x:this._calculatePanForZoomLevel("x",d),y:this._calculatePanForZoomLevel("y",d)}),o.setZoomLevel(d),_={x:o.bounds.correctPan("x",_.x),y:o.bounds.correctPan("y",_.y)},o.setZoomLevel(u);const N=!Mv(_,f);if(!N&&!c&&!p){o._setResolution(d),o.applyCurrentZoomPan();return}a.animations.stopAllPan(),a.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:w=>{if(w/=1e3,N||c){if(N&&(o.pan.x=f.x+(_.x-f.x)*w,o.pan.y=f.y+(_.y-f.y)*w),c){const S=u+(d-u)*w;o.setZoomLevel(S)}o.applyCurrentZoomPan()}p&&a.bgOpacity<1&&a.applyBgOpacity(Lv(v+(1-v)*w,0,1))},onComplete:()=>{o._setResolution(d),o.applyCurrentZoomPan()}})}}function ak(t){return!!t.target.closest(".pswp__container")}class iG{constructor(n){this.gestures=n}click(n,a){const o=a.target.classList,u=o.contains("pswp__img"),d=o.contains("pswp__item")||o.contains("pswp__zoom-wrap");u?this._doClickOrTapAction("imageClick",n,a):d&&this._doClickOrTapAction("bgClick",n,a)}tap(n,a){ak(a)&&this._doClickOrTapAction("tap",n,a)}doubleTap(n,a){ak(a)&&this._doClickOrTapAction("doubleTap",n,a)}_doClickOrTapAction(n,a,o){var u;const{pswp:d}=this.gestures,{currSlide:c}=d,v=n+"Action",p=d.options[v];if(!d.dispatch(v,{point:a,originalEvent:o}).defaultPrevented){if(typeof p=="function"){p.call(d,a,o);return}switch(p){case"close":case"next":d[p]();break;case"zoom":c==null||c.toggleZoom(a);break;case"zoom-or-close":c!=null&&c.isZoomable()&&c.zoomLevels.secondary!==c.zoomLevels.initial?c.toggleZoom(a):d.options.clickToCloseNonZoomable&&d.close();break;case"toggle-controls":(u=this.gestures.pswp.element)===null||u===void 0||u.classList.toggle("pswp--ui-visible");break}}}}const aG=10,oG=300,lG=25;class uG{constructor(n){this.pswp=n,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(n.options.allowPanToNext=!1),this.drag=new eG(this),this.zoomLevels=new nG(this),this.tapHandler=new iG(this),n.on("bindEvents",()=>{n.events.add(n.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),n.scrollWrap&&(n.scrollWrap.ontouchmove=()=>{},n.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(n,a,o,u){const{pswp:d}=this,{events:c}=d,v=u?n+u:"";c.add(d.scrollWrap,n+a,this.onPointerDown.bind(this)),c.add(window,n+"move",this.onPointerMove.bind(this)),c.add(window,n+o,this.onPointerUp.bind(this)),v&&c.add(d.scrollWrap,v,this.onPointerUp.bind(this))}onPointerDown(n){const a=n.type==="mousedown"||n.pointerType==="mouse";if(a&&n.button>0)return;const{pswp:o}=this;if(!o.opener.isOpen){n.preventDefault();return}o.dispatch("pointerDown",{originalEvent:n}).defaultPrevented||(a&&(o.mouseDetected(),this._preventPointerEventBehaviour(n,"down")),o.animations.stopAll(),this._updatePoints(n,"down"),this._numActivePoints===1&&(this.dragAxis=null,Io(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(n){this._preventPointerEventBehaviour(n,"move"),this._numActivePoints&&(this._updatePoints(n,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:n}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,Io(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(n){this._numActivePoints&&(this._updatePoints(n,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:n}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(n)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?Mv(this.p1,this.prevP1)||this.drag.change():(!Mv(this.p1,this.prevP1)||!Mv(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(n){const a=Date.now(),o=a-this._intervalTime;o<50&&!n||(this.velocity.x=this._getVelocity("x",o),this.velocity.y=this._getVelocity("y",o),this._intervalTime=a,Io(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(n){const{mainScroll:a}=this.pswp;if(a.isShifted()){a.moveIndexBy(0,!0);return}if(n.type.indexOf("cancel")>0)return;if(n.type==="mouseup"||n.pointerType==="mouse"){this.tapHandler.click(this.startP1,n);return}const o=this.pswp.options.doubleTapAction?oG:0;this._tapTimer?(this._clearTapTimer(),L8(this._lastStartP1,this.startP1)<lG&&this.tapHandler.doubleTap(this.startP1,n)):(Io(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,n),this._clearTapTimer()},o))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(n,a){const o=this.p1[n]-this._intervalP1[n];return Math.abs(o)>1&&a>5?o/a:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(n,a){this.pswp.applyFilters("preventPointerEvent",!0,n,a)&&n.preventDefault()}_updatePoints(n,a){if(this._pointerEventEnabled){const o=n,u=this._ongoingPointers.findIndex(d=>d.id===o.pointerId);a==="up"&&u>-1?this._ongoingPointers.splice(u,1):a==="down"&&u===-1?this._ongoingPointers.push(this._convertEventPosToPoint(o,{x:0,y:0})):u>-1&&this._convertEventPosToPoint(o,this._ongoingPointers[u]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&Io(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&Io(this.p2,this._ongoingPointers[1])}else{const o=n;this._numActivePoints=0,o.type.indexOf("touch")>-1?o.touches&&o.touches.length>0&&(this._convertEventPosToPoint(o.touches[0],this.p1),this._numActivePoints++,o.touches.length>1&&(this._convertEventPosToPoint(o.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(n,this.p1),a==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){Io(this.prevP1,this.p1),Io(this.prevP2,this.p2)}_updateStartPoints(){Io(this.startP1,this.p1),Io(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const n=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(n!==0){const a=n>0?"x":"y";Math.abs(this.p1[a]-this.startP1[a])>=aG&&(this.dragAxis=a)}}}_convertEventPosToPoint(n,a){return a.x=n.pageX-this.pswp.offset.x,a.y=n.pageY-this.pswp.offset.y,"pointerId"in n?a.id=n.pointerId:n.identifier!==void 0&&(a.id=n.identifier),a}_onClick(n){this.pswp.mainScroll.isShifted()&&(n.preventDefault(),n.stopPropagation())}}const sG=.35;class cG{constructor(n){this.pswp=n,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(n){const{pswp:a}=this,o=Math.round(a.viewportSize.x+a.viewportSize.x*a.options.spacing),u=o!==this.slideWidth;u&&(this.slideWidth=o,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((d,c)=>{u&&w1(d.el,(c+this._containerShiftIndex)*this.slideWidth),n&&d.slide&&d.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let n=0;n<3;n++){const a=wc("pswp__item","div",this.pswp.container);a.setAttribute("role","group"),a.setAttribute("aria-roledescription","slide"),a.setAttribute("aria-hidden","true"),a.style.display=n===1?"block":"none",this.itemHolders.push({el:a})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(n,a,o){const{pswp:u}=this;let d=u.potentialIndex+n;const c=u.getNumItems();if(u.canLoop()){d=u.getLoopedIndex(d);const p=(n+c)%c;p<=c/2?n=p:n=p-c}else d<0?d=0:d>=c&&(d=c-1),n=d-u.potentialIndex;u.potentialIndex=d,this._currPositionIndex-=n,u.animations.stopMainScroll();const v=this.getCurrSlideX();if(!a)this.moveTo(v),this.updateCurrItem();else{u.animations.startSpring({isMainScroll:!0,start:this.x,end:v,velocity:o||0,naturalFrequency:30,dampingRatio:1,onUpdate:f=>{this.moveTo(f)},onComplete:()=>{this.updateCurrItem(),u.appendHeavy()}});let p=u.potentialIndex-u.currIndex;if(u.canLoop()){const f=(p+c)%c;f<=c/2?p=f:p=f-c}Math.abs(p)>1&&this.updateCurrItem()}return!!n}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var n;const{pswp:a}=this,o=this._prevPositionIndex-this._currPositionIndex;if(!o)return;this._prevPositionIndex=this._currPositionIndex,a.currIndex=a.potentialIndex;let u=Math.abs(o),d;u>=3&&(this._containerShiftIndex+=o+(o>0?-3:3),u=3,this.itemHolders.forEach(c=>{var v;(v=c.slide)===null||v===void 0||v.destroy(),c.slide=void 0}));for(let c=0;c<u;c++)o>0?(d=this.itemHolders.shift(),d&&(this.itemHolders[2]=d,this._containerShiftIndex++,w1(d.el,(this._containerShiftIndex+2)*this.slideWidth),a.setContent(d,a.currIndex-u+c+2))):(d=this.itemHolders.pop(),d&&(this.itemHolders.unshift(d),this._containerShiftIndex--,w1(d.el,this._containerShiftIndex*this.slideWidth),a.setContent(d,a.currIndex+u-c-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),a.animations.stopAllPan(),this.itemHolders.forEach((c,v)=>{c.slide&&c.slide.setIsActive(v===1)}),a.currSlide=(n=this.itemHolders[1])===null||n===void 0?void 0:n.slide,a.contentLoader.updateLazy(o),a.currSlide&&a.currSlide.applyCurrentZoomPan(),a.dispatch("change")}moveTo(n,a){if(!this.pswp.canLoop()&&a){let o=(this.slideWidth*this._currPositionIndex-n)/this.slideWidth;o+=this.pswp.currIndex;const u=Math.round(n-this.x);(o<0&&u>0||o>=this.pswp.getNumItems()-1&&u<0)&&(n=this.x+u*sG)}this.x=n,this.pswp.container&&w1(this.pswp.container,n),this.pswp.dispatch("moveMainScroll",{x:n,dragging:a??!1})}}const dG={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},S1=(t,n)=>n?t:dG[t];class mG{constructor(n){this.pswp=n,this._wasFocused=!1,n.on("bindEvents",()=>{n.options.trapFocus&&(n.options.initialPointerPos||this._focusRoot(),n.events.add(document,"focusin",this._onFocusIn.bind(this))),n.events.add(document,"keydown",this._onKeyDown.bind(this))});const a=document.activeElement;n.on("destroy",()=>{n.options.returnFocus&&a&&this._wasFocused&&a.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(n){const{pswp:a}=this;if(a.dispatch("keydown",{originalEvent:n}).defaultPrevented||Gj(n))return;let o,u,d=!1;const c="key"in n;switch(c?n.key:n.keyCode){case S1("Escape",c):a.options.escKey&&(o="close");break;case S1("z",c):o="toggleZoom";break;case S1("ArrowLeft",c):u="x";break;case S1("ArrowUp",c):u="y";break;case S1("ArrowRight",c):u="x",d=!0;break;case S1("ArrowDown",c):d=!0,u="y";break;case S1("Tab",c):this._focusRoot();break}if(u){n.preventDefault();const{currSlide:v}=a;a.options.arrowKeys&&u==="x"&&a.getNumItems()>1?o=d?"next":"prev":v&&v.currZoomLevel>v.zoomLevels.fit&&(v.pan[u]+=d?-80:80,v.panTo(v.pan.x,v.pan.y))}o&&(n.preventDefault(),a[o]())}_onFocusIn(n){const{template:a}=this.pswp;a&&document!==n.target&&a!==n.target&&!a.contains(n.target)&&a.focus()}}const fG="cubic-bezier(.4,0,.22,1)";class pG{constructor(n){var a;this.props=n;const{target:o,onComplete:u,transform:d,onFinish:c=()=>{},duration:v=333,easing:p=fG}=n;this.onFinish=c;const f=d?"transform":"opacity",_=(a=n[f])!==null&&a!==void 0?a:"";this._target=o,this._onComplete=u,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{JO(o,f,v,p),this._helperTimeout=setTimeout(()=>{o.addEventListener("transitionend",this._onTransitionEnd,!1),o.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},v+500),o.style[f]=_},30)},0)}_onTransitionEnd(n){n.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),Vj(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const hG=12,vG=.75;class gG{constructor(n,a,o){this.velocity=n*1e3,this._dampingRatio=a||vG,this._naturalFrequency=o||hG,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(n,a){let o=0,u;a/=1e3;const d=Math.E**(-this._dampingRatio*this._naturalFrequency*a);if(this._dampingRatio===1)u=this.velocity+this._naturalFrequency*n,o=(n+u*a)*d,this.velocity=o*-this._naturalFrequency+u*d;else if(this._dampingRatio<1){u=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*n+this.velocity);const c=Math.cos(this._dampedFrequency*a),v=Math.sin(this._dampedFrequency*a);o=d*(n*c+u*v),this.velocity=o*-this._naturalFrequency*this._dampingRatio+d*(-this._dampedFrequency*n*v+this._dampedFrequency*u*c)}return o}}class bG{constructor(n){this.props=n,this._raf=0;const{start:a,end:o,velocity:u,onUpdate:d,onComplete:c,onFinish:v=()=>{},dampingRatio:p,naturalFrequency:f}=n;this.onFinish=v;const _=new gG(u,p,f);let N=Date.now(),w=a-o;const S=()=>{this._raf&&(w=_.easeFrame(w,Date.now()-N),Math.abs(w)<1&&Math.abs(_.velocity)<50?(d(o),c&&c(),this.onFinish()):(N=Date.now(),d(w+o),this._raf=requestAnimationFrame(S)))};this._raf=requestAnimationFrame(S)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class _G{constructor(){this.activeAnimations=[]}startSpring(n){this._start(n,!0)}startTransition(n){this._start(n)}_start(n,a){const o=a?new bG(n):new pG(n);return this.activeAnimations.push(o),o.onFinish=()=>this.stop(o),o}stop(n){n.destroy();const a=this.activeAnimations.indexOf(n);a>-1&&this.activeAnimations.splice(a,1)}stopAll(){this.activeAnimations.forEach(n=>{n.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(n=>n.props.isPan?(n.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(n=>n.props.isMainScroll?(n.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(n=>n.props.isPan)}}class EG{constructor(n){this.pswp=n,n.events.add(n.element,"wheel",this._onWheel.bind(this))}_onWheel(n){n.preventDefault();const{currSlide:a}=this.pswp;let{deltaX:o,deltaY:u}=n;if(a&&!this.pswp.dispatch("wheel",{originalEvent:n}).defaultPrevented)if(n.ctrlKey||this.pswp.options.wheelToZoom){if(a.isZoomable()){let d=-u;n.deltaMode===1?d*=.05:d*=n.deltaMode?1:.002,d=2**d;const c=a.currZoomLevel*d;a.zoomTo(c,{x:n.clientX,y:n.clientY})}}else a.isPannable()&&(n.deltaMode===1&&(o*=18,u*=18),a.panTo(a.pan.x-o,a.pan.y-u))}}function yG(t){if(typeof t=="string")return t;if(!t||!t.isCustomSVG)return"";const n=t;let a='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return a=a.split("%d").join(n.size||32),n.outlineID&&(a+='<use class="pswp__icn-shadow" xlink:href="#'+n.outlineID+'"/>'),a+=n.inner,a+="</svg>",a}class NG{constructor(n,a){var o;const u=a.name||a.className;let d=a.html;if(n.options[u]===!1)return;typeof n.options[u+"SVG"]=="string"&&(d=n.options[u+"SVG"]),n.dispatch("uiElementCreate",{data:a});let c="";a.isButton?(c+="pswp__button ",c+=a.className||`pswp__button--${a.name}`):c+=a.className||`pswp__${a.name}`;let v=a.isButton?a.tagName||"button":a.tagName||"div";v=v.toLowerCase();const p=wc(c,v);if(a.isButton){v==="button"&&(p.type="button");let{title:N}=a;const{ariaLabel:w}=a;typeof n.options[u+"Title"]=="string"&&(N=n.options[u+"Title"]),N&&(p.title=N);const S=w||N;S&&p.setAttribute("aria-label",S)}p.innerHTML=yG(d),a.onInit&&a.onInit(p,n),a.onClick&&(p.onclick=N=>{typeof a.onClick=="string"?n[a.onClick]():typeof a.onClick=="function"&&a.onClick(N,p,n)});const f=a.appendTo||"bar";let _=n.element;f==="bar"?(n.topBar||(n.topBar=wc("pswp__top-bar pswp__hide-on-close","div",n.scrollWrap)),_=n.topBar):(p.classList.add("pswp__hide-on-close"),f==="wrapper"&&(_=n.scrollWrap)),(o=_)===null||o===void 0||o.appendChild(n.applyFilters("uiElement",p,a))}}function ok(t,n,a){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),n.on("change",()=>{n.options.loop||(a?t.disabled=!(n.currIndex<n.getNumItems()-1):t.disabled=!(n.currIndex>0))})}const xG={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:ok},wG={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,n)=>{ok(t,n,!0)}},SG={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},CG={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},AG={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,n)=>{let a,o=null;const u=(v,p)=>{t.classList.toggle("pswp__preloader--"+v,p)},d=v=>{a!==v&&(a=v,u("active",v))},c=()=>{var v;if(!((v=n.currSlide)!==null&&v!==void 0&&v.content.isLoading())){d(!1),o&&(clearTimeout(o),o=null);return}o||(o=setTimeout(()=>{var p;d(!!(!((p=n.currSlide)===null||p===void 0)&&p.content.isLoading())),o=null},n.options.preloaderDelay))};n.on("change",c),n.on("loadComplete",v=>{n.currSlide===v.slide&&c()}),n.ui&&(n.ui.updatePreloaderVisibility=c)}},TG={name:"counter",order:5,onInit:(t,n)=>{n.on("change",()=>{t.innerText=n.currIndex+1+n.options.indexIndicatorSep+n.getNumItems()})}};function lk(t,n){t.classList.toggle("pswp--zoomed-in",n)}class DG{constructor(n){this.pswp=n,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:n}=this;this.isRegistered=!1,this.uiElementsData=[SG,xG,wG,CG,AG,TG],n.dispatch("uiRegister"),this.uiElementsData.sort((a,o)=>(a.order||0)-(o.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(a=>{this.registerElement(a)}),n.on("change",()=>{var a;(a=n.element)===null||a===void 0||a.classList.toggle("pswp--one-slide",n.getNumItems()===1)}),n.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(n){this.isRegistered?this.items.push(new NG(this.pswp,n)):this.uiElementsData.push(n)}_onZoomPanUpdate(){const{template:n,currSlide:a,options:o}=this.pswp;if(this.pswp.opener.isClosing||!n||!a)return;let{currZoomLevel:u}=a;if(this.pswp.opener.isOpen||(u=a.zoomLevels.initial),u===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=u;const d=a.zoomLevels.initial-a.zoomLevels.secondary;if(Math.abs(d)<.01||!a.isZoomable()){lk(n,!1),n.classList.remove("pswp--zoom-allowed");return}n.classList.add("pswp--zoom-allowed");const c=u===a.zoomLevels.initial?a.zoomLevels.secondary:a.zoomLevels.initial;lk(n,c<=u),(o.imageClickAction==="zoom"||o.imageClickAction==="zoom-or-close")&&n.classList.add("pswp--click-to-zoom")}}function OG(t){const n=t.getBoundingClientRect();return{x:n.left,y:n.top,w:n.width}}function kG(t,n,a){const o=t.getBoundingClientRect(),u=o.width/n,d=o.height/a,c=u>d?u:d,v=(o.width-n*c)/2,p=(o.height-a*c)/2,f={x:o.left+v,y:o.top+p,w:n*c};return f.innerRect={w:o.width,h:o.height,x:v,y:p},f}function MG(t,n,a){const o=a.dispatch("thumbBounds",{index:t,itemData:n,instance:a});if(o.thumbBounds)return o.thumbBounds;const{element:u}=n;let d,c;if(u&&a.options.thumbSelector!==!1){const v=a.options.thumbSelector||"img";c=u.matches(v)?u:u.querySelector(v)}return c=a.applyFilters("thumbEl",c,n,t),c&&(n.thumbCropped?d=kG(c,n.width||n.w||0,n.height||n.h||0):d=OG(c)),a.applyFilters("thumbBounds",d,n,t)}let LG=class{constructor(t,n){this.type=t,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}},IG=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,n,a=100){var o,u,d;this._filters[t]||(this._filters[t]=[]),(o=this._filters[t])===null||o===void 0||o.push({fn:n,priority:a}),(u=this._filters[t])===null||u===void 0||u.sort((c,v)=>c.priority-v.priority),(d=this.pswp)===null||d===void 0||d.addFilter(t,n,a)}removeFilter(t,n){this._filters[t]&&(this._filters[t]=this._filters[t].filter(a=>a.fn!==n)),this.pswp&&this.pswp.removeFilter(t,n)}applyFilters(t,...n){var a;return(a=this._filters[t])===null||a===void 0||a.forEach(o=>{n[0]=o.fn.apply(this,n)}),n[0]}on(t,n){var a,o;this._listeners[t]||(this._listeners[t]=[]),(a=this._listeners[t])===null||a===void 0||a.push(n),(o=this.pswp)===null||o===void 0||o.on(t,n)}off(t,n){var a;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(o=>n!==o)),(a=this.pswp)===null||a===void 0||a.off(t,n)}dispatch(t,n){var a;if(this.pswp)return this.pswp.dispatch(t,n);const o=new LG(t,n);return(a=this._listeners[t])===null||a===void 0||a.forEach(u=>{u.call(this,o)}),o}},PG=class{constructor(t,n){if(this.element=wc("pswp__img pswp__img--placeholder",t?"img":"div",n),t){const a=this.element;a.decoding="async",a.alt="",a.src=t,a.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,n){this.element&&(this.element.tagName==="IMG"?(I8(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Iv(0,0,t/250)):I8(this.element,t,n))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},BG=class{constructor(t,n,a){this.instance=n,this.data=t,this.index=a,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=_d.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,n){if(this.slide&&this.usePlaceholder())if(this.placeholder){const a=this.placeholder.element;a&&!a.parentElement&&this.slide.container.prepend(a)}else{const a=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new PG(a,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=wc("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=wc("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var n,a;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const o=this.element;this.updateSrcsetSizes(),this.data.srcset&&(o.srcset=this.data.srcset),o.src=(n=this.data.src)!==null&&n!==void 0?n:"",o.alt=(a=this.data.alt)!==null&&a!==void 0?a:"",this.state=_d.LOADING,o.complete?this.onLoaded():(o.onload=()=>{this.onLoaded()},o.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=_d.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===_d.LOADED||this.state===_d.ERROR)&&this.removePlaceholder())}onError(){this.state=_d.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===_d.LOADING,this)}isError(){return this.state===_d.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,n){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,n),!this.instance.dispatch("contentResize",{content:this,width:t,height:n}).defaultPrevented&&(I8(this.element,t,n),this.isImageContent()&&!this.isError()))){const a=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=n,a?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:n,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==_d.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,n=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||n>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=n+"px",t.dataset.largestUsedSize=String(n))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,n;let a=wc("pswp__error-msg","div");a.innerText=(t=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&t!==void 0?t:"",a=this.instance.applyFilters("contentErrorElement",a,this),this.element=wc("pswp__content pswp__error-msg-container","div"),this.element.appendChild(a),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===_d.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||QO())?(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&&!QO()?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===_d.LOADED||this.state===_d.ERROR)&&this.removePlaceholder()))}};const FG=5;function uk(t,n,a){const o=n.createContentFromData(t,a);let u;const{options:d}=n;if(d){u=new nk(d,t,-1);let c;n.pswp?c=n.pswp.viewportSize:c=ek(d,n);const v=tk(d,c,t,a);u.update(o.width,o.height,v)}return o.lazyLoad(),u&&o.setDisplayedSize(Math.ceil(o.width*u.initial),Math.ceil(o.height*u.initial)),o}function qG(t,n){const a=n.getItemData(t);if(!n.dispatch("lazyLoadSlide",{index:t,itemData:a}).defaultPrevented)return uk(a,n,t)}class zG{constructor(n){this.pswp=n,this.limit=Math.max(n.options.preload[0]+n.options.preload[1]+1,FG),this._cachedItems=[]}updateLazy(n){const{pswp:a}=this;if(a.dispatch("lazyLoad").defaultPrevented)return;const{preload:o}=a.options,u=n===void 0?!0:n>=0;let d;for(d=0;d<=o[1];d++)this.loadSlideByIndex(a.currIndex+(u?d:-d));for(d=1;d<=o[0];d++)this.loadSlideByIndex(a.currIndex+(u?-d:d))}loadSlideByIndex(n){const a=this.pswp.getLoopedIndex(n);let o=this.getContentByIndex(a);o||(o=qG(a,this.pswp),o&&this.addToCache(o))}getContentBySlide(n){let a=this.getContentByIndex(n.index);return a||(a=this.pswp.createContentFromData(n.data,n.index),this.addToCache(a)),a.setSlide(n),a}addToCache(n){if(this.removeByIndex(n.index),this._cachedItems.push(n),this._cachedItems.length>this.limit){const a=this._cachedItems.findIndex(o=>!o.isAttached&&!o.hasSlide);a!==-1&&this._cachedItems.splice(a,1)[0].destroy()}}removeByIndex(n){const a=this._cachedItems.findIndex(o=>o.index===n);a!==-1&&this._cachedItems.splice(a,1)}getContentByIndex(n){return this._cachedItems.find(a=>a.index===n)}destroy(){this._cachedItems.forEach(n=>n.destroy()),this._cachedItems=[]}}let UG=class extends IG{getNumItems(){var t;let n=0;const a=(t=this.options)===null||t===void 0?void 0:t.dataSource;a&&"length"in a?n=a.length:a&&"gallery"in a&&(a.items||(a.items=this._getGalleryDOMElements(a.gallery)),a.items&&(n=a.items.length));const o=this.dispatch("numItems",{dataSource:a,numItems:n});return this.applyFilters("numItems",o.numItems,a)}createContentFromData(t,n){return new BG(t,this,n)}getItemData(t){var n;const a=(n=this.options)===null||n===void 0?void 0:n.dataSource;let o={};Array.isArray(a)?o=a[t]:a&&"gallery"in a&&(a.items||(a.items=this._getGalleryDOMElements(a.gallery)),o=a.items[t]);let u=o;u instanceof Element&&(u=this._domElementToItemData(u));const d=this.dispatch("itemData",{itemData:u||{},index:t});return this.applyFilters("itemData",d.itemData,t)}_getGalleryDOMElements(t){var n,a;return(n=this.options)!==null&&n!==void 0&&n.children||(a=this.options)!==null&&a!==void 0&&a.childSelector?Kj(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const n={element:t},a=t.tagName==="A"?t:t.querySelector("a");if(a){n.src=a.dataset.pswpSrc||a.href,a.dataset.pswpSrcset&&(n.srcset=a.dataset.pswpSrcset),n.width=a.dataset.pswpWidth?parseInt(a.dataset.pswpWidth,10):0,n.height=a.dataset.pswpHeight?parseInt(a.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,a.dataset.pswpType&&(n.type=a.dataset.pswpType);const u=t.querySelector("img");if(u){var o;n.msrc=u.currentSrc||u.src,n.alt=(o=u.getAttribute("alt"))!==null&&o!==void 0?o:""}(a.dataset.pswpCropped||a.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,t,a)}lazyLoadData(t,n){return uk(t,this,n)}};const Bv=.003;class HG{constructor(n){this.pswp=n,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),n.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const n=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,n&&n.currZoomLevel*n.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const n=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,n&&n.zoomLevels.initial*n.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:n}=this,a=this.pswp.currSlide,{options:o}=n;if(o.showHideAnimationType==="fade"?(o.showHideOpacity=!0,this._thumbBounds=void 0):o.showHideAnimationType==="none"?(o.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&n._initialThumbBounds?this._thumbBounds=n._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=a==null?void 0:a.getPlaceholderElement(),n.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&(a==null?void 0:a.content.usePlaceholder())&&(!this.isClosing||!n.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&a&&(a.zoomAndPanToInitial(),a.applyCurrentZoomPan());else{var u;this._animateRootOpacity=(u=o.showHideOpacity)!==null&&u!==void 0?u:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Bv,this._opacityElement=this._animateRootOpacity?n.element:n.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(n.element&&(n.element.style.opacity=String(Bv)),n.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var d;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(d=this.pswp.currSlide)===null||d===void 0?void 0:d.holderElement,n.container&&(n.container.style.overflow="hidden",n.container.style.width=n.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(n.element&&(n.element.style.opacity=String(Bv)),n.applyBgOpacity(1)):(this._animateBgOpacity&&n.bg&&(n.bg.style.opacity=String(Bv)),n.element&&(n.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Bv)))):this.isClosing&&(n.mainScroll.itemHolders[0]&&(n.mainScroll.itemHolders[0].el.style.display="none"),n.mainScroll.itemHolders[2]&&(n.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&n.mainScroll.x!==0&&(n.mainScroll.resetPosition(),n.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(n=>{let a=!1,o=!0;jj(this._placeholder).finally(()=>{a=!0,o||n(!0)}),setTimeout(()=>{o=!1,a&&n(!0)},50),setTimeout(n,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var n,a;(n=this.pswp.element)===null||n===void 0||n.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(a=this.pswp.element)===null||a===void 0||a.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:n}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,n.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),n.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)n.destroy();else if(this.isOpen){var a;this._animateZoom&&n.container&&(n.container.style.overflow="visible",n.container.style.width="100%"),(a=n.currSlide)===null||a===void 0||a.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:n}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),n.currSlide&&(n.currSlide.zoomAndPanToInitial(),this._animateTo(n.currSlide.container,"transform",n.currSlide.getCurrentTransform()))),this._animateBgOpacity&&n.bg&&this._animateTo(n.bg,"opacity",String(n.options.bgOpacity)),this._animateRootOpacity&&n.element&&this._animateTo(n.element,"opacity","1")}_animateToClosedState(){const{pswp:n}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&n.bgOpacity>.01&&n.bg&&this._animateTo(n.bg,"opacity","0"),this._animateRootOpacity&&n.element&&this._animateTo(n.element,"opacity","0")}_setClosedStateZoomPan(n){if(!this._thumbBounds)return;const{pswp:a}=this,{innerRect:o}=this._thumbBounds,{currSlide:u,viewportSize:d}=a;if(this._croppedZoom&&o&&this._cropContainer1&&this._cropContainer2){const c=-d.x+(this._thumbBounds.x-o.x)+o.w,v=-d.y+(this._thumbBounds.y-o.y)+o.h,p=d.x-o.w,f=d.y-o.h;n?(this._animateTo(this._cropContainer1,"transform",Iv(c,v)),this._animateTo(this._cropContainer2,"transform",Iv(p,f))):(w1(this._cropContainer1,c,v),w1(this._cropContainer2,p,f))}u&&(Io(u.pan,o||this._thumbBounds),u.currZoomLevel=this._thumbBounds.w/u.width,n?this._animateTo(u.container,"transform",u.getCurrentTransform()):u.applyCurrentZoomPan())}_animateTo(n,a,o){if(!this._duration){n.style[a]=o;return}const{animations:u}=this.pswp,d={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{u.activeAnimations.length||this._onAnimationComplete()},target:n};d[a]=o,u.startTransition(d)}}const VG={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class jG extends UG{constructor(n){super(),this.options=this._prepareOptions(n||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new $j,this.animations=new _G,this.mainScroll=new cG(this),this.gestures=new uG(this),this.opener=new HG(this),this.keyboard=new mG(this),this.contentLoader=new zG(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let n="pswp--open";return this.gestures.supportsTouch&&(n+=" pswp--touch"),this.options.mainClass&&(n+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+n),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new EG(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:a}=this.mainScroll;a[0]&&(a[0].el.style.display="block",this.setContent(a[0],this.currIndex-1)),a[2]&&(a[2].el.style.display="block",this.setContent(a[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(n){const a=this.getNumItems();return this.options.loop&&(n>a-1&&(n-=a),n<0&&(n+=a)),Lv(n,0,a-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(n=>{var a;(a=n.slide)===null||a===void 0||a.appendHeavy()})}goTo(n){this.mainScroll.moveIndexBy(this.getLoopedIndex(n)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...n){var a;(a=this.currSlide)===null||a===void 0||a.zoomTo(...n)}toggleZoom(){var n;(n=this.currSlide)===null||n===void 0||n.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var n;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(n=this.element)===null||n===void 0||n.remove(),this.mainScroll.itemHolders.forEach(a=>{var o;(o=a.slide)===null||o===void 0||o.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(n){this.contentLoader.removeByIndex(n),this.mainScroll.itemHolders.forEach((a,o)=>{var u,d;let c=((u=(d=this.currSlide)===null||d===void 0?void 0:d.index)!==null&&u!==void 0?u:0)-1+o;if(this.canLoop()&&(c=this.getLoopedIndex(c)),c===n&&(this.setContent(a,n,!0),o===1)){var v;this.currSlide=a.slide,(v=a.slide)===null||v===void 0||v.setIsActive(!0)}}),this.dispatch("change")}setContent(n,a,o){if(this.canLoop()&&(a=this.getLoopedIndex(a)),n.slide){if(n.slide.index===a&&!o)return;n.slide.destroy(),n.slide=void 0}if(!this.canLoop()&&(a<0||a>=this.getNumItems()))return;const u=this.getItemData(a);n.slide=new Rj(u,a,this),a===this.currIndex&&(this.currSlide=n.slide),n.slide.append(n.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(n){if(this.isDestroying)return;const a=ek(this.options,this);!n&&Mv(a,this._prevViewportSize)||(Io(this._prevViewportSize,a),this.dispatch("beforeResize"),Io(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(n){this.bgOpacity=Math.max(n,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var n;this.hasMouse=!0,(n=this.element)===null||n===void 0||n.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(n,a){this.offset.x=n,this.offset.y=a,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=wc("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=wc("pswp__bg","div",this.element),this.scrollWrap=wc("pswp__scroll-wrap","section",this.element),this.container=wc("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new DG(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return MG(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(n){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(n.showHideAnimationType="none",n.zoomAnimationDuration=0),{...VG,...n}}}/*!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@20minutes/tyr",
3
- "version": "2.24.3",
3
+ "version": "2.24.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/20minutes/tyr.git"