@20minutes/tyr 2.3.0 → 2.3.1
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 +12 -24
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -55222,25 +55222,13 @@ const q0 = /* @__PURE__ */ $_(PG), ah = ({
|
|
|
55222
55222
|
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.`
|
|
55223
55223
|
}
|
|
55224
55224
|
))), UG = ({ id: r, name: a, type: i, src: o, keesingType: l, keesingGame: m }, ...d) => {
|
|
55225
|
-
const v = [
|
|
55226
|
-
"anagrammes",
|
|
55227
|
-
"takuzu",
|
|
55228
|
-
"mots-codes",
|
|
55229
|
-
"mots-croises",
|
|
55230
|
-
"fubuki",
|
|
55231
|
-
"kakuro",
|
|
55232
|
-
"matoku",
|
|
55233
|
-
"sudoku",
|
|
55234
|
-
"mots-melanges",
|
|
55235
|
-
"kemaru",
|
|
55236
|
-
"mots-fleches"
|
|
55237
|
-
], h = {
|
|
55225
|
+
const v = ["puzzle", "421", "buzz", "mots-coupes", "ifleches", "ironde"], h = {
|
|
55238
55226
|
player: "https://web.keesing.com/pub/player/v2.25.2/dist/",
|
|
55239
55227
|
portal: "https://web.keesing.com/pub/portal/v2.25.2/dist/",
|
|
55240
55228
|
js: "https://web.keesing.com/pub/bundle-loader/bundle-loader.js",
|
|
55241
55229
|
css: "https://web.keesing.com/pub/config/20minutes/css/custom_client.css"
|
|
55242
55230
|
};
|
|
55243
|
-
return o &&
|
|
55231
|
+
return o && v.includes(r) ? /* @__PURE__ */ t.createElement(s9, null, /* @__PURE__ */ t.createElement("div", { id: "loginwall" }, /* @__PURE__ */ t.createElement(
|
|
55244
55232
|
CU,
|
|
55245
55233
|
{
|
|
55246
55234
|
title: a,
|
|
@@ -55249,7 +55237,7 @@ const q0 = /* @__PURE__ */ $_(PG), ah = ({
|
|
|
55249
55237
|
className: `c-game c-game--${r}`,
|
|
55250
55238
|
...d
|
|
55251
55239
|
}
|
|
55252
|
-
))) : i === "Arcade" &&
|
|
55240
|
+
))) : i === "Arcade" && v.includes(r) ? /* @__PURE__ */ t.createElement(s9, null, /* @__PURE__ */ t.createElement("div", { id: "loginwall" }, /* @__PURE__ */ t.createElement("link", { rel: "stylesheet", href: h.css }), /* @__PURE__ */ t.createElement(
|
|
55253
55241
|
"div",
|
|
55254
55242
|
{
|
|
55255
55243
|
id: "puzzle-portal",
|
|
@@ -55267,14 +55255,6 @@ const q0 = /* @__PURE__ */ $_(PG), ah = ({
|
|
|
55267
55255
|
"data-wlpp-bundle": l ?? "portal"
|
|
55268
55256
|
}
|
|
55269
55257
|
))) : !l || !m ? null : /* @__PURE__ */ t.createElement(s9, null, /* @__PURE__ */ t.createElement("div", { id: "loginwall" }, /* @__PURE__ */ t.createElement("link", { rel: "stylesheet", href: h.css }), v.includes(r) ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
55270
|
-
"div",
|
|
55271
|
-
{
|
|
55272
|
-
id: "puzzle-portal",
|
|
55273
|
-
"data-customerid": "20minutes",
|
|
55274
|
-
"data-gametype": l === "portal" ? m : `CG_${m}`,
|
|
55275
|
-
"data-puzzleid": l === "portal" ? `${m}_today` : `CG_${m}`
|
|
55276
|
-
}
|
|
55277
|
-
), /* @__PURE__ */ t.createElement("script", { type: "text/javascript", "data-wlpp-bundle": "player", src: h.js })) : /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
55278
55258
|
"div",
|
|
55279
55259
|
{
|
|
55280
55260
|
id: "puzzle-portal",
|
|
@@ -55289,7 +55269,15 @@ const q0 = /* @__PURE__ */ $_(PG), ah = ({
|
|
|
55289
55269
|
src: h.js,
|
|
55290
55270
|
"data-wlpp-bundle": l ?? "portal"
|
|
55291
55271
|
}
|
|
55292
|
-
))
|
|
55272
|
+
)) : /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
55273
|
+
"div",
|
|
55274
|
+
{
|
|
55275
|
+
id: "puzzle-portal",
|
|
55276
|
+
"data-customerid": "20minutes",
|
|
55277
|
+
"data-gametype": l === "portal" ? m : `CG_${m}`,
|
|
55278
|
+
"data-puzzleid": l === "portal" ? `${m}_today` : `CG_${m}`
|
|
55279
|
+
}
|
|
55280
|
+
), /* @__PURE__ */ t.createElement("script", { type: "text/javascript", "data-wlpp-bundle": "player", src: h.js }))));
|
|
55293
55281
|
}, c9 = ({ games: r, ...a }) => /* @__PURE__ */ t.createElement(Ee, { direction: "column", gap: "m", ...a }, /* @__PURE__ */ t.createElement(G, { size: { xs: "l", md: "xl" }, weight: "bold" }, r[0].category), r.map((i) => /* @__PURE__ */ t.createElement(
|
|
55294
55282
|
ca,
|
|
55295
55283
|
{
|
package/dist/index.umd.js
CHANGED
|
@@ -319,7 +319,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
319
319
|
Copyright (c) 2018 Jed Watson.
|
|
320
320
|
Licensed under the MIT License (MIT), see
|
|
321
321
|
http://jedwatson.github.io/classnames
|
|
322
|
-
*/var nO;function QH(){return nO||(nO=1,function(r){(function(){var i={}.hasOwnProperty;function a(){for(var m="",d=0;d<arguments.length;d++){var v=arguments[d];v&&(m=l(m,o(v)))}return m}function o(m){if(typeof m=="string"||typeof m=="number")return m;if(typeof m!="object")return"";if(Array.isArray(m))return a.apply(null,m);if(m.toString!==Object.prototype.toString&&!m.toString.toString().includes("[native code]"))return m.toString();var d="";for(var v in m)i.call(m,v)&&m[v]&&(d=l(d,v));return d}function l(m,d){return d?m?m+" "+d:m+d:m}r.exports?(a.default=a,r.exports=a):window.classNames=a})()}(Z5)),Z5.exports}var XH=QH();const s0=g3(XH),$f=({content:r,pageEndpoint:i,colorScheme:a="ultramarine",disableLettering:o=!1,...l})=>{var m;return t.createElement(ee,{...l,className:s0("c-content",{[`c-content--theme-${a}`]:!!a,"c-content--text-with-lettering":!o&&((m=r.blocks[0])==null?void 0:m.text.length)>50})},s1({rawDraftContent:r,pageEndpoint:i}))},iO=({items:r=[]})=>r!=null&&r.length?t.createElement("div",null,r==null?void 0:r.map((i,a)=>t.createElement(Cs,{key:`bulleted-list-${a}`,...i}))):null,aO=({name:r,description:i,link:a,icon:o,layout:l,...m})=>t.createElement(ui,{as:"a",href:a,...m},l===Ie.MOBILE&&r,t.createElement(Ee,{alignItems:{xs:"start",md:"center"},justifyContent:{xs:"center",md:"start"},className:"opacity-hover"},t.createElement(_r,{bg:"white",isRounded:!0,name:o.name,size:o.size||l===Ie.DESKTOP&&20||30,color:"grey-900",p:"xs",mr:{xs:"0",md:"xxs"},mb:{xs:"xs",md:"0"}}),l===Ie.DESKTOP&&i),l===Ie.MOBILE&&i),Y5=({iconSize:r,layout:i,...a})=>t.createElement(Ee,{...a,bg:"ultramarine",p:{xs:"xxs",md:"xs"},justifyContent:{xs:"evenly",md:"start"}},t.createElement(aO,{basis:{xs:50,md:"auto"},icon:{name:"game",size:r},name:t.createElement(G,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Jeux"),description:t.createElement(G,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir les",i===Ie.DESKTOP?t.createElement("br",null):" ","31 jeux"),link:"https://www.20minutes.fr/services/jeux",layout:i,id:"entertainment-item-game"}),t.createElement(ui,{mx:"m",py:"xs"},t.createElement(CE,{color:"white"})),t.createElement(aO,{basis:{xs:50,md:"auto"},icon:{name:"horoscope",size:r},name:t.createElement(G,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Horoscope"),description:t.createElement(G,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir mon",i===Ie.DESKTOP?t.createElement("br",null):" ","horoscope"),link:"https://www.20minutes.fr/horoscope/",layout:i,id:"entertainment-item-horoscope"})),J5=({faqData:r,pageEndpoint:i})=>t.createElement(t.Fragment,null,r.map(a=>t.createElement(qp,{key:a.index,index:a.index,titleProps:{size:"xl",my:"xs",as:(a==null?void 0:a.tag)||"h2",children:a.title},contentWithBorder:!1,bg:"grey-100",btnProps:{py:"xxs-3"},iconProps:{color:"ultramarine"},mb:"l"},t.createElement($f,{content:a.children,pageEndpoint:i,disableLettering:!0})))),oO=({colorVariant:r="ultramarine",cookieLink:i="/gestion-cookies"})=>t.createElement(ee,{className:"cmp-placeholder u-hidden",borderColor:"grey-200",radius:"l",p:"xxl"},t.createElement(zt,{size:"s",color:r,mb:"xxl",fontFamily:"source-serif-pro",weight:"semi-bold"},"L'accès aux jeux a été bloqué afin de respecter votre consentement"),t.createElement(G,{size:"l",mb:"m"},"En cliquant sur",t.createElement(G,{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."),t.createElement(G,{size:"s",mb:"xl"},"Plus d’informations sur la page",t.createElement(G,{color:r,as:"a",href:i,mx:"xxs"},"Politique de gestion des cookies")),t.createElement(hn,{className:"cmp-game-button",mx:"auto"},"J'accepte")),Q5=({children:r})=>t.createElement("div",{className:"game-placeholder"},t.createElement("div",{className:"game-wrapper u-hidden"},r),t.createElement(oO,null),t.createElement(ee,{my:"m",className:"js-game-alert u-hidden"},t.createElement(HP,{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.`}))),uO=({id:r,name:i,type:a,src:o,keesingType:l,keesingGame:m},...d)=>{const v=["anagrammes","takuzu","mots-codes","mots-croises","fubuki","kakuro","matoku","sudoku","mots-melanges","kemaru","mots-fleches"],h={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(r)?t.createElement(Q5,null,t.createElement("div",{id:"loginwall"},t.createElement(GP,{title:i,htmlIframeProps:{src:o},mb:"l",className:`c-game c-game--${r}`,...d}))):a==="Arcade"&&!v.includes(r)?t.createElement(Q5,null,t.createElement("div",{id:"loginwall"},t.createElement("link",{rel:"stylesheet",href:h.css}),t.createElement("div",{id:"puzzle-portal",className:`game game-${i}`,"data-customerid":"20minutes","data-gametype":`CG_${m}`,"data-puzzleid":`CG_${m}`,"data-publicpath":l==="player"?h.player:h.portal}),t.createElement("script",{type:"text/javascript",src:h.js,"data-wlpp-bundle":l??"portal"}))):!l||!m?null:t.createElement(Q5,null,t.createElement("div",{id:"loginwall"},t.createElement("link",{rel:"stylesheet",href:h.css}),v.includes(r)?t.createElement(t.Fragment,null,t.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-gametype":l==="portal"?m:`CG_${m}`,"data-puzzleid":l==="portal"?`${m}_today`:`CG_${m}`}),t.createElement("script",{type:"text/javascript","data-wlpp-bundle":"player",src:h.js})):t.createElement(t.Fragment,null,t.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-portalview":m??"","data-publicpath":l==="player"?h.player:h.portal}),t.createElement("script",{type:"text/javascript",src:h.js,"data-wlpp-bundle":l??"portal"}))))},X5=({games:r,...i})=>t.createElement(Ee,{direction:"column",gap:"m",...i},t.createElement(G,{size:{xs:"l",md:"xl"},weight:"bold"},r[0].category),r.map(a=>t.createElement(ui,{key:a.url,as:Me,href:a.url,color:"black",size:{xs:"s",md:"m"},align:"start"},a.name))),e8=({games:r,colsNumber:i,...a})=>{const o=l=>r.filter(m=>m.category===l).sort((m,d)=>m.name.localeCompare(d.name));return t.createElement(qp,{index:0,titleProps:{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},t.createElement(ka,{colsNumber:i??{xs:1,md:3},gap:"m"},t.createElement(X5,{games:o("Jeux de lettres"),mb:{xs:"xs",md:"0"}}),t.createElement(X5,{games:o("Jeux de chiffres"),mb:{xs:"xs",md:"0"}}),t.createElement(X5,{games:o("Jeux inclassables")})))},eV=r=>r.replace(/(<([^>]+)>)/gi,"").length,Uu=({subtitle:r,isExpandable:i,...a})=>{if(r&&typeof r!="string"){const o=s1({rawDraftContent:r});return t.createElement(gc,{...a,isExpandable:eV(md(o))>200,subtitle:o})}return t.createElement(gc,{...a,isExpandable:i===void 0?!!(r&&r.length>200):i,subtitle:r})},lO=({signsContent:r,layout:i=Ie.MOBILE})=>t.createElement(t.Fragment,null,r.map((a,o)=>t.createElement(t.Fragment,{key:a.heading.title},t.createElement(bx,{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((l,m)=>t.createElement(t.Fragment,{key:l.title},t.createElement(Ex,{icon:l.icon,title:l.title,content:l.content,mx:{xs:"m",md:"0"}}),m!==a.topics.length-1&&t.createElement(ar,{color:"grey-200",my:{xs:"0",md:"l"},mx:{xs:"m",md:"0"}}))),t.createElement(Ee,{justifyContent:"center",my:{xs:"xs",md:"l"}},t.createElement(Me,{variant:"secondary",href:a.link.href},a.link.children)),o===2&&t.createElement(cv,null),o===2&&t.createElement(qe,{adUnitCompletePath:i===Ie.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_1":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===5&&t.createElement(qe,{adUnitCompletePath:i===Ie.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_2":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===8&&t.createElement(qe,{adUnitCompletePath:i===Ie.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_3":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===11&&i===Ie.MOBILE&&t.createElement(qe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_4",variant:"ARTICLE"}),o!==r.length-1&&t.createElement(ar,{mx:{xs:"m",md:"0"},color:"ultramarine",mb:"l"})))),t8=({description:r,...i})=>r&&typeof r!="string"?t.createElement(a3,{...i,description:s1({rawDraftContent:r})}):r?t.createElement(a3,{...i,description:r}):null,sO=({enableAccordion:r,items:i,contentProps:a,heading:o={as:"h2"},...l})=>!i||(i==null?void 0:i.length)===0?null:r?t.createElement(J3,{...l,items:i,contentProps:a}):t.createElement(Ee,{direction:"column",gapX:"m",mx:{xs:"m",md:"0"}},i.map(m=>t.createElement(Ee,{...l,key:m.title,direction:"column",gapX:"s"},t.createElement(zt,{size:"xs",color:"black",weight:"semi-bold",...o},m.title),t.createElement(Ax,{...a,content:m.content})))),cO=({infosContent:r,layout:i=Ie.MOBILE})=>{const a=t.createElement(t.Fragment,null,r.map(o=>t.createElement(Ee,{gap:"xxs",alignItems:"center",mb:{xs:"xl",md:"0"},key:o.title},t.createElement(_r,{mr:"xxs",size:30,...o.iconOptions}),t.createElement(G,{size:"l",as:"span",weight:"bold"},o.title,!o.rating&&t.createElement(G,{as:"span",color:"ultramarine",size:"m",weight:"regular"}," ",o.information)),o.rating&&t.createElement(nx,{rating:o.rating}))));return i===Ie.DESKTOP?t.createElement(ka,{colsNumber:{xs:void 0,sm:2},gap:"xl",my:"l"},a):a},dO=({articles:r,seeMoreButton:i,layout:a,...o})=>{const{variablesForQuery:l,...m}=o;return t.createElement(ee,{...m},r.map((d,v)=>{const h=`lastArticleKey${v}`,f=v===r.length-1;return t.createElement(t.Fragment,{key:h},t.createElement(kF,{...d,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:a===Ie.MOBILE?void 0:3,...d.cardTitleProps}}),!f&&t.createElement(ar,{color:"grey-200",my:"s"}),v===10&&a===Ie.MOBILE&&t.createElement(qe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),v===20&&a===Ie.MOBILE&&t.createElement(qe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(v===10||v===20)&&a===Ie.MOBILE&&t.createElement(ar,{color:"grey-200",my:"s"}))}),i&&t.createElement(hn,{...i,variant:"secondary",mx:"auto",mt:"s"}))},r8=({legalNotices:r,seeMoreLegalNotices:i,...a})=>r.length===0?null:t.createElement(ee,{...a},r.map(o=>t.createElement(t.Fragment,null,t.createElement(OF,{key:o.link,...o,linkProps:{children:"Lire l’annonce"}}),t.createElement(ar,{my:"l",color:"grey-200"}))),i&&t.createElement(hn,{variant:"secondary",mx:"auto",mt:"xl",...i})),tV=r=>{const i=new Intl.DateTimeFormat("fr",{dateStyle:"short",timeStyle:"short",timeZone:"Europe/Paris"}),a=new Date(r).getTime();return i.format(a).replace(" "," à ").replace(":","h")},n8=r=>{const i=a=>`${a}`.padStart(2,"0");return`${i(Math.floor(r/60))}:${i(r-Math.floor(r/60)*60)}`},mO=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),rV=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),i8=r=>{const i=new Date().getTime(),a=new Date(r).getTime(),o=(a-i)/6e4;let l=mO.format(Math.round(o),"minutes");return o<=-60&&(l=mO.format(Math.ceil(o/60),"hours"),o<=-60*24&&(l=rV.format(a))),l==="cette minute-ci"?"à l'instant":l},a8=new Date(2024,8,5,18,20),nV=r=>new Date().setMinutes(a8.getMinutes()-r),iV=r=>new Date().setHours(a8.getHours()-r),aV=r=>new Date().setDate(a8.getDate()-r);function o8(r,i=!0){const a=String(r.getDate()).padStart(2,"0"),o=String(r.getMonth()+1).padStart(2,"0");let l=r.getFullYear();return i||(l=Number(r.getFullYear().toString().slice(2))),`${a}/${o}/${l}`}function u8(r){const[i,a,o]=r.split("-"),l=i.slice(-2);return`${o}/${a}/${l}`}const fO=({location:r,header:i,surtitle:a,title:o,date:l,linkLogo:m,description:d,linkPDF:v,linkNotice:h,signature:f,..._})=>t.createElement(ee,{..._,as:"section"},t.createElement(ee,{mb:"s"},t.createElement(Ee,{color:"ultramarine"},t.createElement(_r,{name:"local",size:13,mr:"xxs-2",mb:"xxs-2"}),t.createElement(G,{size:"xxs",weight:"bold",textTransform:"uppercase"},r)),t.createElement(zt,{size:"xs"},i),t.createElement(zt,{size:"xs"},a),t.createElement(zt,{size:"xs"},o),t.createElement(G,{as:"time",size:"s",color:"grey-400",dateTime:l},"Publié le ",u8(l))),m&&t.createElement(ee,{as:"img",src:m,mb:"s",style:{maxWidth:"100px",maxHeight:"100px"}}),d&&t.createElement(G,{size:"m",mb:"xxl",dangerouslySetInnerHTML:{__html:d}}),f&&t.createElement(G,{italic:!0,mb:"xxl"},f),v&&t.createElement(Me,{variant:"primary",href:v,target:"_blank",mr:"m",mb:"m"},"Télécharger le justificatif en PDF"),h&&t.createElement(Me,{variant:"secondary",href:h,target:"_blank"},"Télécharger la notice")),l8=({updatedAt:r,...i})=>t.createElement(Sx,{...i,...r&&{updatedAt:i8(r)}}),pO=({cardOverviewProps:r,...i})=>{if(r.length<=0)return null;const a=t.createElement(t.Fragment,null,r.map((o,l)=>t.createElement(qE,{...o,key:o.title,mb:l!==r.length-1?"m":"0",size:"big"})));return Object.keys(i).length===0?a:t.createElement(ee,{...i},a)},hO=({draftContent:r,pageEndpoint:i,withCmp:a=!0})=>{const o=t.useRef(null);return t.useEffect(()=>{const l=sv({rawDraftContent:r,pageEndpoint:i,withCmp:a}),m=document.createRange().createContextualFragment(l);o.current&&(o.current.innerHTML="",o.current.appendChild(m))},[r]),t.createElement(ee,{ref:o,mt:"s",className:"c-content"},s1({rawDraftContent:r,pageEndpoint:i,withCmp:a}))},vO=({currentTab:r})=>t.createElement(Ee,{className:"c-tablist",mb:"l",gap:"l",px:{xs:"m",md:"0"}},t.createElement(Me,{whiteSpace:"nowrap",href:"/arts-stars/cinema/film-au-cinema-en-ce-moment",tabVariant:"default",tabColor:"entertainment",tabIsSelected:r==="in_theaters"},"A l'affiche"),t.createElement(Me,{whiteSpace:"nowrap",href:"/arts-stars/cinema/sortie-cinema-de-la-semaine",tabVariant:"default",tabColor:"entertainment",tabIsSelected:r==="last_releases"},"Sorties de la semaine"),t.createElement(Me,{whiteSpace:"nowrap",href:"/arts-stars/cinema/prochaine-sortie-cinema",tabVariant:"default",tabColor:"entertainment",tabIsSelected:r==="soon"},"Prochainement")),Q3=({buttonLabel:r,title:i,url:a,...o})=>t.createElement(Ee,{alignItems:"center",justifyContent:"between",gap:{xs:"xs",md:"m"},py:"s",px:"xxl",direction:{xs:"column",md:"row"},bg:"ultramarine",...o},t.createElement(G,{as:"h2",color:"white",size:"xl",weight:"bold",textAlign:{xs:"center",md:"left"}},i),t.createElement(Me,{variant:"secondary",href:a,target:"_blank"},r));var oV=Object.defineProperty,uV=(r,i,a)=>i in r?oV(r,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[i]=a,X3=(r,i,a)=>uV(r,typeof i!="symbol"?i+"":i,a);const lV=()=>{const r=document.querySelector("#js-election-selector");r&&r.addEventListener("change",i=>{window.location.replace(i.target.value)})},sV=()=>{const r=document.querySelector(".c-search-banner");if(r){const i=document.querySelector("#js-search-banner-to-hide"),a=r.querySelector("#js-search-banner-dropdown-btn");a==null||a.addEventListener("click",()=>{const o=a.querySelector("svg"),l=o==null?void 0:o.querySelector("use");switch(l==null?void 0:l.getAttribute("xlink:href")){case"#chevron-up":l==null||l.setAttribute("xlink:href","#chevron-down"),i==null||i.classList.add("u-hidden");break;case"#chevron-down":l==null||l.setAttribute("xlink:href","#chevron-up"),i==null||i.classList.remove("u-hidden");break}})}};function cV(r){var i,a,o;if(!(r.target instanceof HTMLFormElement))return;r.preventDefault();const l=r.target,m=new FormData(l),d={},v=(i=m.get("job"))==null?void 0:i.toString();v&&(d["tags[]"]=v);const h=(a=m.get("adresse"))==null?void 0:a.toString();h&&(d.adresse=h);const f=(o=m.get("distance"))==null?void 0:o.toString();f&&(d.distance=f);const _="https://offres-emploi.20minutes.fr/offre-emploi",N=new URLSearchParams(d).toString(),S=`${_}?${N}&&utm_source=20minutes&utm_medium=referral&utm_campaign=job_offer&utm_term=actual&utm_content=search_bar`;window.open(S,"_blank")}const dV=()=>{const r=document.querySelector("form#actual-search-form");r instanceof HTMLFormElement&&r.addEventListener("submit",cV)},mV=[{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"}}],gO=(r,i,a,o,l,m)=>{const d=document.getElementById(r);if(!d)return;const v=d.dataset.storybook,h=d.querySelector(`#${r}-search`),f=h==null?void 0:h.getAttribute("data-api-url"),_=d.querySelector(".c-autocomplete__menu");if(!h||!_||!f)return;const N=d.querySelector(".c-autocomplete__input-spinner"),S=h.getAttribute("data-trigger-message"),C=async I=>{try{let P;return v&&i.includes("20minutes.fr")?P=mV:P=await(await fetch(`${f}${a}${encodeURIComponent(I)}`)).json(),m?P[m]:P}catch(P){return console.error("Error fetching autocomplete results:",P),[]}},w=(I,P)=>{const q=document.createElement("li");q.id=`/${I}`,q.textContent=P,q.addEventListener("click",()=>{h instanceof HTMLInputElement&&(h.value=P,_.classList.add("u-hidden"))}),_.appendChild(q)},k=()=>{N==null||N.classList.toggle("u-hidden")},A=()=>{const I=document.createElement("li");I.textContent=S,_.appendChild(I)},L=async I=>{k(),_.classList.remove("u-hidden");const P=await C(I);_.innerHTML="",P.length===0&&_.classList.add("u-hidden"),P.forEach(q=>{w(q[o],q[l])}),k()},B=I=>{if(!(I.target instanceof HTMLInputElement))return;const P=I.target.value;_.classList.remove("u-hidden"),P.length>=3?L(P):(_.innerHTML="",A())};h.addEventListener("input",B),h.addEventListener("focusout",()=>{setTimeout(()=>_.classList.add("u-hidden"),300)}),h.addEventListener("focusin",()=>{_.childElementCount>0&&_.classList.remove("u-hidden")})},fV=()=>{const r=document.querySelector("header"),i=document.querySelector(".js-limit-scroll-close-article-btn"),a=document.querySelector(".js-close-article-btn"),o=document.querySelector(".c-header-mobile"),l=o instanceof HTMLElement?o.offsetHeight:0;if(r&&i&&a){const m=new IntersectionObserver(()=>{const d=a.classList,v=d.contains("u-hidden"),h=r.getBoundingClientRect().bottom-l,f=i.getBoundingClientRect().bottom-l;v&&h<=0&&f>=0&&d.remove("u-hidden"),!v&&(h>=0||f<=0)&&d.add("u-hidden")},{root:document,rootMargin:`-${l}px 0px 0px 0px`});m.observe(r),m.observe(i)}},pV=r=>{r.stopImmediatePropagation(),r.preventDefault();const i=r.currentTarget;if(i instanceof HTMLButtonElement){const a=i.parentElement,o=a==null?void 0:a.querySelector(`#${i.getAttribute("aria-controls")}`);i.getAttribute("aria-expanded")==="true"?(i.setAttribute("aria-expanded","false"),o==null||o.setAttribute("aria-hidden","true")):(i.setAttribute("aria-expanded","true"),o==null||o.setAttribute("aria-hidden","false"))}},hV=(r=document.querySelector(".js-collapse__button"))=>{r&&document.querySelectorAll(".c-collapse__button").forEach(i=>{i.addEventListener("click",a=>{pV(a)})})},vV=(r,i)=>{const a=document.querySelector(`#${i}`);if(a){const o=a.querySelector(".js-countdown-days"),l=a.querySelector(".js-countdown-hours"),m=a.querySelector(".js-countdown-minutes"),d=a.querySelector(".js-countdown-seconds");if(!o||!l||!m||!d)return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const v=window.counters[r],h=new Date(v).getTime(),f=setInterval(()=>{const _=new Date().getTime(),N=h-_;if(N<=0)clearInterval(f);else{const S=Math.floor(N/864e5),C=Math.floor(N%(1e3*60*60*24)/(1e3*60*60)),w=Math.floor(N%(1e3*60*60)/(1e3*60)),k=Math.floor(N%(1e3*60)/1e3);o.innerHTML=S.toString(),l.innerHTML=C.toString(),m.innerHTML=w.toString(),d.innerHTML=k.toString()}},1e3)}},gV=r=>{const i=r.getBBox(),a=i.width/20;return[i.x-a,i.y-a,i.width+a*2,i.height+a*2].join(" ")},bV=()=>{const r=document.querySelector(".c-map-districts-container"),i=document.querySelector(".c-map-districts");if(!r||!i)return;const a=document.querySelector(".c-map-districts-container__description"),o=document.querySelector(".c-map-districts-container__department"),l=document.querySelector(".c-map-districts-container__unzoom-button");let m=i;const d=i.getAttribute("viewBox"),v=(C,w)=>{var k;return(k=C.matches)==null?void 0:k.call(C,w)},h=(C,w,k=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!C)return;let A,L=C.parentElement;for(;L instanceof SVGGraphicsElement&&L!==w;)v(L,k)&&(A=L),L=L.parentElement;return A},f=(C,w,k)=>{if(!C)return;let A=C.parentElement;for(;A instanceof SVGGraphicsElement&&A!==k;){if(w===A)return!0;A=A.parentElement}return k===w},_=(C,w)=>{if(w&&l&&a){r.classList.remove("c-map-districts-container--department-view"),a.classList.remove("u-hidden"),o==null||o.classList.add("u-hidden"),l.classList.add("u-hidden"),w!==d&&(a.classList.add("u-hidden"),l.classList.remove("u-hidden")),m.classList.remove("js-selected-area"),m=C;const k=m.getAttribute("data-info");o&&k&&(r.classList.add("c-map-districts-container--department-view"),o.classList.remove("u-hidden"),o.innerHTML=k),m.classList.add("js-selected-area"),i.setAttribute("viewBox",w)}},N=C=>{C.stopPropagation();const w=C.currentTarget;if(m&&i&&w instanceof SVGGraphicsElement){if(w===m)return;if(C.preventDefault(),m!==i&&!f(w,m,i)){_(i,d);return}const k=h(w,m);_(k||w,gV(k||w))}},S=()=>{i&&m!==i&&_(i,d)};i.addEventListener("click",S),l&&l.addEventListener("click",S),document.querySelectorAll(".c-map-districts__zoomable").forEach(C=>{C.addEventListener("click",w=>N(w))})},_V=()=>{const r=document.getElementById("elections-form-search"),i=document.querySelector(".c-search-form__autocomplete");if(!r||!i)return;const a=m=>{i.classList.remove("u-hidden");const d=i.querySelectorAll("li"),v=[];return d.forEach(h=>{const f=h.querySelector("a");f&&f.innerHTML.toLowerCase().includes(m.toLowerCase())&&v.push(h.innerHTML)}),v},o=m=>{i.innerHTML+=`<li>${m}</li>`},l=({target:m})=>{if(!(m instanceof HTMLInputElement))return;const d=m.value;if(i.classList.add("u-hidden"),d.length>=3){const v=a(d);i.innerHTML="",v.length===0&&i.classList.add("u-hidden"),v.forEach(h=>{o(h)})}};r.addEventListener("input",l),r.addEventListener("focusout",()=>{setTimeout(()=>i.classList.add("u-hidden"),300)}),r.addEventListener("focusin",()=>{i.childElementCount>0&&i.classList.remove("u-hidden")})},EV=(r,i)=>{var a;r.setAttribute("aria-expanded","true");const o=(a=r.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(m=>m.classList.remove(i));const l=r.querySelector(".js-ellipsis-button__label");l instanceof HTMLSpanElement&&(l.innerHTML="Voir moins")},yV=(r,i)=>{var a;const o=(a=r.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(m=>m.classList.add(i)),r.setAttribute("aria-expanded","false");const l=r.querySelector(".js-ellipsis-button__label");l instanceof HTMLSpanElement&&(l.innerHTML="Voir plus")},NV=(r,i)=>{const a=r.currentTarget;if(r.preventDefault(),a instanceof HTMLButtonElement){const o=i?"u-ellipsis-multiline":"u-ellipsis";return a.getAttribute("aria-expanded")==="true"?yV(a,o):EV(a,o)}return null},xV=(r=document.querySelector(".js-ellipsis-button"))=>{r&&document.querySelectorAll(".js-ellipsis-button").forEach(i=>{const a=i.getAttribute("data-multiple")==="true";i.addEventListener("click",o=>NV(o,a))})},SV=r=>{var i;r.setAttribute("aria-expanded","true");const a=(i=r.parentNode)==null?void 0:i.querySelectorAll(".js-expand-target");a==null||a.forEach(l=>l.setAttribute("aria-hidden","false"));const o=r.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir moins")},wV=r=>{var i;const a=(i=r.parentNode)==null?void 0:i.querySelectorAll(".js-expand-target");a==null||a.forEach(l=>l.setAttribute("aria-hidden","true")),r.setAttribute("aria-expanded","false");const o=r.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir plus")},CV=r=>{const i=r.currentTarget;return r.preventDefault(),i instanceof HTMLButtonElement?i.getAttribute("aria-expanded")==="true"?wV(i):SV(i):null},AV=(r=document.querySelector(".js-expand-button"))=>{r&&document.querySelectorAll(".js-expand-button").forEach(i=>i.addEventListener("click",CV))},DV=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),TV=()=>{const r=document.querySelector(".js-game-alert");DV&&r&&r.classList.remove("u-hidden")},OV=()=>{const r=document.querySelectorAll(".js-half-donut-result");for(const i of Array.from(r)){const a=i.querySelector(".c-half-donut"),o=i.querySelector(".c-legend");if(!a||!o)return;o.querySelectorAll("[data-color]").forEach(l=>{const m=l.getAttribute("data-color"),d=a.querySelector(`.c-half-donut__zone--${m}`);d==null||d.addEventListener("mouseenter",()=>{l.classList.add("c-legend__item--is-hovered"),a.classList.add("c-half-donut--is-hovered"),o.classList.add("c-legend--is-hovered")}),d==null||d.addEventListener("mouseleave",()=>{l.classList.remove("c-legend__item--is-hovered"),a.classList.remove("c-half-donut--is-hovered"),o.classList.remove("c-legend--is-hovered")}),l.addEventListener("mouseenter",()=>{d==null||d.classList.add("c-half-donut__zone--is-hovered"),o.classList.add("c-legend--is-hovered"),a.classList.add("c-half-donut--is-hovered")}),l.addEventListener("mouseleave",()=>{d==null||d.classList.remove("c-half-donut__zone--is-hovered"),o.classList.remove("c-legend--is-hovered"),a.classList.remove("c-half-donut--is-hovered")})})}},ci={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var kV=[`a[href]${ci.inert}${ci.negTabIndex}`,`area[href]${ci.inert}${ci.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${ci.inert}${ci.negTabIndex}${ci.disabled}`,`input[type="radio"]${ci.inert}${ci.negTabIndex}${ci.disabled}`,`select${ci.inert}${ci.negTabIndex}${ci.disabled}`,`textarea${ci.inert}${ci.negTabIndex}${ci.disabled}`,`button${ci.inert}${ci.negTabIndex}${ci.disabled}`,`details${ci.inert} > summary:first-of-type${ci.negTabIndex}`,`iframe${ci.inert}${ci.negTabIndex}`,`audio[controls]${ci.inert}${ci.negTabIndex}`,`video[controls]${ci.inert}${ci.negTabIndex}`,`[contenteditable]${ci.inert}${ci.negTabIndex}`,`[tabindex]${ci.inert}${ci.negTabIndex}`];function bO(r){(r.querySelector("[autofocus]")||r).focus()}function LV(r){const i=dv(r,!0),a=i?dv(r,!1)||i:null;return[i,a]}function dv(r,i){if(i&&yO(r))return r;if(IV(r))if(r.shadowRoot){let a=_O(r.shadowRoot,i);for(;a;){const o=dv(a,i);if(o)return o;a=EO(a,i)}}else if(r.localName==="slot"){const a=r.assignedElements({flatten:!0});i||a.reverse();for(const o of a){const l=dv(o,i);if(l)return l}}else{let a=_O(r,i);for(;a;){const o=dv(a,i);if(o)return o;a=EO(a,i)}}return!i&&yO(r)?r:null}function _O(r,i){return i?r.firstElementChild:r.lastElementChild}function EO(r,i){return i?r.nextElementSibling:r.previousElementSibling}const MV=r=>r.matches("details:not([open]) *")&&!r.matches("details>summary:first-of-type")?!0:!(r.offsetWidth||r.offsetHeight||r.getClientRects().length),yO=r=>{var i;return(i=r.shadowRoot)!=null&&i.delegatesFocus?!1:r.matches(kV.join(","))&&!MV(r)};function IV(r){return r.shadowRoot&&r.getAttribute("tabindex")==="-1"?!1:!r.matches(":disabled,[hidden],[inert]")}function eb(r=document){const i=r.activeElement;return i?i.shadowRoot?eb(i.shadowRoot)||document.activeElement:i:null}function BV(r,i){const[a,o]=LV(r);if(!a)return i.preventDefault();const l=eb();i.shiftKey&&l===a?(o.focus(),i.preventDefault()):!i.shiftKey&&l===o&&(a.focus(),i.preventDefault())}function mv(r,i){function a(o){return!o||o===document||o===window?null:(o.assignedSlot&&(o=o.assignedSlot),o.closest(r)||a(o.getRootNode().host))}return a(i)}const fv="data-a11y-dialog";class NO{constructor(i){X3(this,"$el"),X3(this,"id"),X3(this,"previouslyFocused"),X3(this,"shown"),this.$el=i,this.id=this.$el.getAttribute(fv)||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(i){var a;return this.shown?this:this.fire("show",i).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=eb(),((a=this.previouslyFocused)==null?void 0:a.tagName)==="BODY"&&i!=null&&i.target&&(this.previouslyFocused=i.target),(i==null?void 0:i.type)==="focus"?this.maintainFocus(i):bO(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(i){var a,o;return this.shown?this.fire("hide",i).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(i,a,o){return this.$el.addEventListener(i,a,o),this}off(i,a,o){return this.$el.removeEventListener(i,a,o),this}fire(i,a){const o=new CustomEvent(i,{detail:a,cancelable:!0});return this.$el.dispatchEvent(o),o}handleTriggerClicks(i){const a=i.composedPath()[0],o=mv(`[${fv}-show="${this.id}"]`,a),l=mv(`[${fv}-hide="${this.id}"]`,a),m=mv(`[${fv}-hide]`,a)&&mv('[aria-modal="true"]',a)===this.$el;o&&this.show(i),(l||m)&&this.hide(i)}bindKeypress(i){if(mv('[aria-modal="true"]',eb())!==this.$el)return;let a=!1;try{a=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}i.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!a&&(i.preventDefault(),this.hide(i)),i.key==="Tab"&&BV(this.$el,i)}maintainFocus(i){i.target.closest(`[aria-modal="true"], [${fv}-ignore-focus-trap]`)||bO(this.$el)}}function xO(){for(const r of document.querySelectorAll("[data-a11y-dialog]"))new NO(r)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",xO):xO());const PV=()=>document.querySelectorAll(".js-modal").forEach(r=>{if(!(r instanceof HTMLElement))return;const i=new NO(r);if(r.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&&(i.on("show",()=>{a.forEach(l=>l.classList.add("u-hidden")),o.forEach(l=>l.classList.remove("u-hidden"))}),i.on("hide",()=>{a.forEach(l=>l.classList.remove("u-hidden")),o.forEach(l=>l.classList.add("u-hidden"))}))}i.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),FV=({navigatedList:r,nextBtn:i,prevBtn:a})=>{var o,l,m,d,v,h,f,_;const N=r.scrollLeft>0,S=r.scrollLeft+r.clientWidth<r.scrollWidth;N&&S?((o=i.classList)==null||o.add("o-nav-button--visible"),(l=a.classList)==null||l.add("o-nav-button--visible")):N?((m=i.classList)==null||m.remove("o-nav-button--visible"),(d=a.classList)==null||d.add("o-nav-button--visible")):S?((v=i.classList)==null||v.add("o-nav-button--visible"),(h=a.classList)==null||h.remove("o-nav-button--visible")):((f=i.classList)==null||f.remove("o-nav-button--visible"),(_=a.classList)==null||_.remove("o-nav-button--visible"))},qV=({navigatedList:r,nextBtn:i,prevBtn:a,sliderVariant:o})=>{if(r){const l=r.closest(".js-overview-bar-container"),m=l==null?void 0:l.querySelector(".c-stepper"),d=m==null?void 0:m.querySelectorAll(".c-stepper__item");if(d){const v=Array.from(d).findIndex(h=>h.classList.contains("c-stepper__item--loading"));if(v<0)d[0].classList.add("c-stepper__item--loading");else{d[v].classList.remove("c-stepper__item--loading"),d[v].classList.add("c-stepper__item--loaded");const h=d[v].querySelector(".c-stepper__loader");h&&h instanceof HTMLElement&&(h.style.transition="width 0s linear"),v+1<d.length&&d[v+1].classList.add("c-stepper__item--loading")}}if(r.scrollWidth-r.clientWidth>r.clientWidth){let v=r.scrollLeft;switch(o){case"three-columns-articles":v+=r.clientWidth+32;break;case"rubrics":v+=r.clientWidth-36;break;default:v+=Math.ceil(r.clientWidth*.6);break}r.scrollTo({left:v,behavior:"smooth"}),a.classList.add("o-nav-button--visible"),v+r.clientWidth>=r.scrollWidth&&i.classList.remove("o-nav-button--visible")}else{const v=r.scrollWidth-r.clientWidth;r.scrollTo({left:v,behavior:"smooth"}),i.classList.remove("o-nav-button--visible"),a.classList.add("o-nav-button--visible")}}},UV=({navigatedList:r,nextBtn:i,prevBtn:a,sliderVariant:o,delay:l})=>{if(r){const m=r.closest(".js-overview-bar-container"),d=m==null?void 0:m.querySelector(".c-stepper"),v=d==null?void 0:d.querySelectorAll(".c-stepper__item");if(v){const h=Array.from(v).findIndex(f=>f.classList.contains("c-stepper__item--loading"));h<0?v[0].classList.add("c-stepper__item--loading"):(v[h].classList.remove("c-stepper__item--loading"),v[h].classList.remove("c-stepper__item--loaded"),h-1>0&&(v[h-1].classList.remove("c-stepper__item--loading"),v[h-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const f=v[h-1].querySelector(".c-stepper__loader");v[h-1].classList.add("c-stepper__item--loading"),f&&f instanceof HTMLElement&&(f.style.transition=`width ${l/1e3}s linear`)},0)))}if(r.clientWidth<r.scrollLeft){let h=r.scrollLeft;switch(o){case"three-columns-articles":h-=r.clientWidth+32;break;case"rubrics":h-=r.clientWidth-36;break;default:h-=Math.ceil(r.clientWidth*.6);break}r.scrollTo({left:h,behavior:"smooth"}),i.classList.add("o-nav-button--visible"),h===0&&a.classList.remove("o-nav-button--visible")}else r.scrollTo({left:0,behavior:"smooth"}),a.classList.remove("o-nav-button--visible"),r.clientWidth<r.scrollWidth&&i.classList.add("o-nav-button--visible")}},zV=({navigatedList:r,nextBtn:i,prevBtn:a})=>{FV({navigatedList:r,nextBtn:i,prevBtn:a})},HV=()=>{const r=document.querySelectorAll(".js-navigation-container");for(const i of Array.from(r)){const{sliderVariant:a}=i.dataset,{sliderAuto:o}=i.dataset,{sliderDelay:l}=i.dataset,m=l?parseInt(l,10):3e3,d=i.closest(".js-overview-bar-container"),v=d==null?void 0:d.querySelector(".c-stepper"),h=v==null?void 0:v.querySelectorAll(".c-stepper__item");if(i){const f=i.querySelector(".js-navigation-container__list"),_=i.querySelector(".o-nav-button--next-button"),N=i.querySelector(".o-nav-button--previous-button");if(f&&f.clientWidth<f.scrollWidth&&(_==null||_.classList.add("o-nav-button--visible")),f&&_&&N&&(_==null||_.addEventListener("click",qV.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a})),N==null||N.addEventListener("click",UV.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a,delay:m}))),o==="true"&&_){const S=v?v.querySelector(".c-stepper__item--loading"):null;h&&(h.forEach(C=>{const w=C.querySelector(".c-stepper__loader");w&&w instanceof HTMLElement&&(w.style.transition=`width ${m/1e3}s linear`)}),S||h[0].classList.add("c-stepper__item--loading")),setInterval(()=>{_.classList.contains("o-nav-button--visible")?_.click():f&&N&&(f.scrollLeft=0,h&&(h.forEach(C=>{const w=C.querySelector(".c-stepper__loader");w&&w instanceof HTMLElement&&(w.style.transition="width 0s linear"),C.classList.remove("c-stepper__item--loading"),C.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{w&&w instanceof HTMLElement&&(w.style.transition=`width ${m/1e3}s linear`)},0)}),setTimeout(()=>{h[0].classList.add("c-stepper__item--loading")},0)),N.click())},m)}}}},VV=()=>{const r=document.querySelectorAll(".js-navigation-container");for(const i of Array.from(r))if(i){const a=i.querySelector(".js-navigation-container__list"),o=i.querySelector(".o-nav-button--next-button"),l=i.querySelector(".o-nav-button--previous-button");a&&o&&l&&window.addEventListener("resize",zV.bind(!1,{navigatedList:a,nextBtn:o,prevBtn:l}))}};/*!
|
|
322
|
+
*/var nO;function QH(){return nO||(nO=1,function(r){(function(){var i={}.hasOwnProperty;function a(){for(var m="",d=0;d<arguments.length;d++){var v=arguments[d];v&&(m=l(m,o(v)))}return m}function o(m){if(typeof m=="string"||typeof m=="number")return m;if(typeof m!="object")return"";if(Array.isArray(m))return a.apply(null,m);if(m.toString!==Object.prototype.toString&&!m.toString.toString().includes("[native code]"))return m.toString();var d="";for(var v in m)i.call(m,v)&&m[v]&&(d=l(d,v));return d}function l(m,d){return d?m?m+" "+d:m+d:m}r.exports?(a.default=a,r.exports=a):window.classNames=a})()}(Z5)),Z5.exports}var XH=QH();const s0=g3(XH),$f=({content:r,pageEndpoint:i,colorScheme:a="ultramarine",disableLettering:o=!1,...l})=>{var m;return t.createElement(ee,{...l,className:s0("c-content",{[`c-content--theme-${a}`]:!!a,"c-content--text-with-lettering":!o&&((m=r.blocks[0])==null?void 0:m.text.length)>50})},s1({rawDraftContent:r,pageEndpoint:i}))},iO=({items:r=[]})=>r!=null&&r.length?t.createElement("div",null,r==null?void 0:r.map((i,a)=>t.createElement(Cs,{key:`bulleted-list-${a}`,...i}))):null,aO=({name:r,description:i,link:a,icon:o,layout:l,...m})=>t.createElement(ui,{as:"a",href:a,...m},l===Ie.MOBILE&&r,t.createElement(Ee,{alignItems:{xs:"start",md:"center"},justifyContent:{xs:"center",md:"start"},className:"opacity-hover"},t.createElement(_r,{bg:"white",isRounded:!0,name:o.name,size:o.size||l===Ie.DESKTOP&&20||30,color:"grey-900",p:"xs",mr:{xs:"0",md:"xxs"},mb:{xs:"xs",md:"0"}}),l===Ie.DESKTOP&&i),l===Ie.MOBILE&&i),Y5=({iconSize:r,layout:i,...a})=>t.createElement(Ee,{...a,bg:"ultramarine",p:{xs:"xxs",md:"xs"},justifyContent:{xs:"evenly",md:"start"}},t.createElement(aO,{basis:{xs:50,md:"auto"},icon:{name:"game",size:r},name:t.createElement(G,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Jeux"),description:t.createElement(G,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir les",i===Ie.DESKTOP?t.createElement("br",null):" ","31 jeux"),link:"https://www.20minutes.fr/services/jeux",layout:i,id:"entertainment-item-game"}),t.createElement(ui,{mx:"m",py:"xs"},t.createElement(CE,{color:"white"})),t.createElement(aO,{basis:{xs:50,md:"auto"},icon:{name:"horoscope",size:r},name:t.createElement(G,{size:{xs:"s",md:"m"},weight:"bold",color:"white",mb:"xs",textAlign:"center"},"Horoscope"),description:t.createElement(G,{size:"xs",color:"white",fontFamily:"source-serif-pro",textAlign:{xs:"center",md:"left"}},"Voir mon",i===Ie.DESKTOP?t.createElement("br",null):" ","horoscope"),link:"https://www.20minutes.fr/horoscope/",layout:i,id:"entertainment-item-horoscope"})),J5=({faqData:r,pageEndpoint:i})=>t.createElement(t.Fragment,null,r.map(a=>t.createElement(qp,{key:a.index,index:a.index,titleProps:{size:"xl",my:"xs",as:(a==null?void 0:a.tag)||"h2",children:a.title},contentWithBorder:!1,bg:"grey-100",btnProps:{py:"xxs-3"},iconProps:{color:"ultramarine"},mb:"l"},t.createElement($f,{content:a.children,pageEndpoint:i,disableLettering:!0})))),oO=({colorVariant:r="ultramarine",cookieLink:i="/gestion-cookies"})=>t.createElement(ee,{className:"cmp-placeholder u-hidden",borderColor:"grey-200",radius:"l",p:"xxl"},t.createElement(zt,{size:"s",color:r,mb:"xxl",fontFamily:"source-serif-pro",weight:"semi-bold"},"L'accès aux jeux a été bloqué afin de respecter votre consentement"),t.createElement(G,{size:"l",mb:"m"},"En cliquant sur",t.createElement(G,{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."),t.createElement(G,{size:"s",mb:"xl"},"Plus d’informations sur la page",t.createElement(G,{color:r,as:"a",href:i,mx:"xxs"},"Politique de gestion des cookies")),t.createElement(hn,{className:"cmp-game-button",mx:"auto"},"J'accepte")),Q5=({children:r})=>t.createElement("div",{className:"game-placeholder"},t.createElement("div",{className:"game-wrapper u-hidden"},r),t.createElement(oO,null),t.createElement(ee,{my:"m",className:"js-game-alert u-hidden"},t.createElement(HP,{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.`}))),uO=({id:r,name:i,type:a,src:o,keesingType:l,keesingGame:m},...d)=>{const v=["puzzle","421","buzz","mots-coupes","ifleches","ironde"],h={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(r)?t.createElement(Q5,null,t.createElement("div",{id:"loginwall"},t.createElement(GP,{title:i,htmlIframeProps:{src:o},mb:"l",className:`c-game c-game--${r}`,...d}))):a==="Arcade"&&v.includes(r)?t.createElement(Q5,null,t.createElement("div",{id:"loginwall"},t.createElement("link",{rel:"stylesheet",href:h.css}),t.createElement("div",{id:"puzzle-portal",className:`game game-${i}`,"data-customerid":"20minutes","data-gametype":`CG_${m}`,"data-puzzleid":`CG_${m}`,"data-publicpath":l==="player"?h.player:h.portal}),t.createElement("script",{type:"text/javascript",src:h.js,"data-wlpp-bundle":l??"portal"}))):!l||!m?null:t.createElement(Q5,null,t.createElement("div",{id:"loginwall"},t.createElement("link",{rel:"stylesheet",href:h.css}),v.includes(r)?t.createElement(t.Fragment,null,t.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-portalview":m??"","data-publicpath":l==="player"?h.player:h.portal}),t.createElement("script",{type:"text/javascript",src:h.js,"data-wlpp-bundle":l??"portal"})):t.createElement(t.Fragment,null,t.createElement("div",{id:"puzzle-portal","data-customerid":"20minutes","data-gametype":l==="portal"?m:`CG_${m}`,"data-puzzleid":l==="portal"?`${m}_today`:`CG_${m}`}),t.createElement("script",{type:"text/javascript","data-wlpp-bundle":"player",src:h.js}))))},X5=({games:r,...i})=>t.createElement(Ee,{direction:"column",gap:"m",...i},t.createElement(G,{size:{xs:"l",md:"xl"},weight:"bold"},r[0].category),r.map(a=>t.createElement(ui,{key:a.url,as:Me,href:a.url,color:"black",size:{xs:"s",md:"m"},align:"start"},a.name))),e8=({games:r,colsNumber:i,...a})=>{const o=l=>r.filter(m=>m.category===l).sort((m,d)=>m.name.localeCompare(d.name));return t.createElement(qp,{index:0,titleProps:{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},t.createElement(ka,{colsNumber:i??{xs:1,md:3},gap:"m"},t.createElement(X5,{games:o("Jeux de lettres"),mb:{xs:"xs",md:"0"}}),t.createElement(X5,{games:o("Jeux de chiffres"),mb:{xs:"xs",md:"0"}}),t.createElement(X5,{games:o("Jeux inclassables")})))},eV=r=>r.replace(/(<([^>]+)>)/gi,"").length,Uu=({subtitle:r,isExpandable:i,...a})=>{if(r&&typeof r!="string"){const o=s1({rawDraftContent:r});return t.createElement(gc,{...a,isExpandable:eV(md(o))>200,subtitle:o})}return t.createElement(gc,{...a,isExpandable:i===void 0?!!(r&&r.length>200):i,subtitle:r})},lO=({signsContent:r,layout:i=Ie.MOBILE})=>t.createElement(t.Fragment,null,r.map((a,o)=>t.createElement(t.Fragment,{key:a.heading.title},t.createElement(bx,{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((l,m)=>t.createElement(t.Fragment,{key:l.title},t.createElement(Ex,{icon:l.icon,title:l.title,content:l.content,mx:{xs:"m",md:"0"}}),m!==a.topics.length-1&&t.createElement(ar,{color:"grey-200",my:{xs:"0",md:"l"},mx:{xs:"m",md:"0"}}))),t.createElement(Ee,{justifyContent:"center",my:{xs:"xs",md:"l"}},t.createElement(Me,{variant:"secondary",href:a.link.href},a.link.children)),o===2&&t.createElement(cv,null),o===2&&t.createElement(qe,{adUnitCompletePath:i===Ie.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_1":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===5&&t.createElement(qe,{adUnitCompletePath:i===Ie.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_2":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===8&&t.createElement(qe,{adUnitCompletePath:i===Ie.MOBILE?"/49926454/20minutes_webmobile/divers/nfb_3":"/49926454/20minutes_desktop/divers/pave_home",variant:"ARTICLE"}),o===11&&i===Ie.MOBILE&&t.createElement(qe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_4",variant:"ARTICLE"}),o!==r.length-1&&t.createElement(ar,{mx:{xs:"m",md:"0"},color:"ultramarine",mb:"l"})))),t8=({description:r,...i})=>r&&typeof r!="string"?t.createElement(a3,{...i,description:s1({rawDraftContent:r})}):r?t.createElement(a3,{...i,description:r}):null,sO=({enableAccordion:r,items:i,contentProps:a,heading:o={as:"h2"},...l})=>!i||(i==null?void 0:i.length)===0?null:r?t.createElement(J3,{...l,items:i,contentProps:a}):t.createElement(Ee,{direction:"column",gapX:"m",mx:{xs:"m",md:"0"}},i.map(m=>t.createElement(Ee,{...l,key:m.title,direction:"column",gapX:"s"},t.createElement(zt,{size:"xs",color:"black",weight:"semi-bold",...o},m.title),t.createElement(Ax,{...a,content:m.content})))),cO=({infosContent:r,layout:i=Ie.MOBILE})=>{const a=t.createElement(t.Fragment,null,r.map(o=>t.createElement(Ee,{gap:"xxs",alignItems:"center",mb:{xs:"xl",md:"0"},key:o.title},t.createElement(_r,{mr:"xxs",size:30,...o.iconOptions}),t.createElement(G,{size:"l",as:"span",weight:"bold"},o.title,!o.rating&&t.createElement(G,{as:"span",color:"ultramarine",size:"m",weight:"regular"}," ",o.information)),o.rating&&t.createElement(nx,{rating:o.rating}))));return i===Ie.DESKTOP?t.createElement(ka,{colsNumber:{xs:void 0,sm:2},gap:"xl",my:"l"},a):a},dO=({articles:r,seeMoreButton:i,layout:a,...o})=>{const{variablesForQuery:l,...m}=o;return t.createElement(ee,{...m},r.map((d,v)=>{const h=`lastArticleKey${v}`,f=v===r.length-1;return t.createElement(t.Fragment,{key:h},t.createElement(kF,{...d,px:{xs:"m",md:"0"},cardTitleProps:{weight:"semi-bold",maxRows:a===Ie.MOBILE?void 0:3,...d.cardTitleProps}}),!f&&t.createElement(ar,{color:"grey-200",my:"s"}),v===10&&a===Ie.MOBILE&&t.createElement(qe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_1",variant:"ARTICLE"}),v===20&&a===Ie.MOBILE&&t.createElement(qe,{adUnitCompletePath:"/49926454/20minutes_webmobile/divers/nfb_2",variant:"ARTICLE"}),(v===10||v===20)&&a===Ie.MOBILE&&t.createElement(ar,{color:"grey-200",my:"s"}))}),i&&t.createElement(hn,{...i,variant:"secondary",mx:"auto",mt:"s"}))},r8=({legalNotices:r,seeMoreLegalNotices:i,...a})=>r.length===0?null:t.createElement(ee,{...a},r.map(o=>t.createElement(t.Fragment,null,t.createElement(OF,{key:o.link,...o,linkProps:{children:"Lire l’annonce"}}),t.createElement(ar,{my:"l",color:"grey-200"}))),i&&t.createElement(hn,{variant:"secondary",mx:"auto",mt:"xl",...i})),tV=r=>{const i=new Intl.DateTimeFormat("fr",{dateStyle:"short",timeStyle:"short",timeZone:"Europe/Paris"}),a=new Date(r).getTime();return i.format(a).replace(" "," à ").replace(":","h")},n8=r=>{const i=a=>`${a}`.padStart(2,"0");return`${i(Math.floor(r/60))}:${i(r-Math.floor(r/60)*60)}`},mO=new Intl.RelativeTimeFormat("fr",{numeric:"auto"}),rV=new Intl.DateTimeFormat("fr",{year:"numeric",month:"short",day:"numeric",timeZone:"Europe/Paris"}),i8=r=>{const i=new Date().getTime(),a=new Date(r).getTime(),o=(a-i)/6e4;let l=mO.format(Math.round(o),"minutes");return o<=-60&&(l=mO.format(Math.ceil(o/60),"hours"),o<=-60*24&&(l=rV.format(a))),l==="cette minute-ci"?"à l'instant":l},a8=new Date(2024,8,5,18,20),nV=r=>new Date().setMinutes(a8.getMinutes()-r),iV=r=>new Date().setHours(a8.getHours()-r),aV=r=>new Date().setDate(a8.getDate()-r);function o8(r,i=!0){const a=String(r.getDate()).padStart(2,"0"),o=String(r.getMonth()+1).padStart(2,"0");let l=r.getFullYear();return i||(l=Number(r.getFullYear().toString().slice(2))),`${a}/${o}/${l}`}function u8(r){const[i,a,o]=r.split("-"),l=i.slice(-2);return`${o}/${a}/${l}`}const fO=({location:r,header:i,surtitle:a,title:o,date:l,linkLogo:m,description:d,linkPDF:v,linkNotice:h,signature:f,..._})=>t.createElement(ee,{..._,as:"section"},t.createElement(ee,{mb:"s"},t.createElement(Ee,{color:"ultramarine"},t.createElement(_r,{name:"local",size:13,mr:"xxs-2",mb:"xxs-2"}),t.createElement(G,{size:"xxs",weight:"bold",textTransform:"uppercase"},r)),t.createElement(zt,{size:"xs"},i),t.createElement(zt,{size:"xs"},a),t.createElement(zt,{size:"xs"},o),t.createElement(G,{as:"time",size:"s",color:"grey-400",dateTime:l},"Publié le ",u8(l))),m&&t.createElement(ee,{as:"img",src:m,mb:"s",style:{maxWidth:"100px",maxHeight:"100px"}}),d&&t.createElement(G,{size:"m",mb:"xxl",dangerouslySetInnerHTML:{__html:d}}),f&&t.createElement(G,{italic:!0,mb:"xxl"},f),v&&t.createElement(Me,{variant:"primary",href:v,target:"_blank",mr:"m",mb:"m"},"Télécharger le justificatif en PDF"),h&&t.createElement(Me,{variant:"secondary",href:h,target:"_blank"},"Télécharger la notice")),l8=({updatedAt:r,...i})=>t.createElement(Sx,{...i,...r&&{updatedAt:i8(r)}}),pO=({cardOverviewProps:r,...i})=>{if(r.length<=0)return null;const a=t.createElement(t.Fragment,null,r.map((o,l)=>t.createElement(qE,{...o,key:o.title,mb:l!==r.length-1?"m":"0",size:"big"})));return Object.keys(i).length===0?a:t.createElement(ee,{...i},a)},hO=({draftContent:r,pageEndpoint:i,withCmp:a=!0})=>{const o=t.useRef(null);return t.useEffect(()=>{const l=sv({rawDraftContent:r,pageEndpoint:i,withCmp:a}),m=document.createRange().createContextualFragment(l);o.current&&(o.current.innerHTML="",o.current.appendChild(m))},[r]),t.createElement(ee,{ref:o,mt:"s",className:"c-content"},s1({rawDraftContent:r,pageEndpoint:i,withCmp:a}))},vO=({currentTab:r})=>t.createElement(Ee,{className:"c-tablist",mb:"l",gap:"l",px:{xs:"m",md:"0"}},t.createElement(Me,{whiteSpace:"nowrap",href:"/arts-stars/cinema/film-au-cinema-en-ce-moment",tabVariant:"default",tabColor:"entertainment",tabIsSelected:r==="in_theaters"},"A l'affiche"),t.createElement(Me,{whiteSpace:"nowrap",href:"/arts-stars/cinema/sortie-cinema-de-la-semaine",tabVariant:"default",tabColor:"entertainment",tabIsSelected:r==="last_releases"},"Sorties de la semaine"),t.createElement(Me,{whiteSpace:"nowrap",href:"/arts-stars/cinema/prochaine-sortie-cinema",tabVariant:"default",tabColor:"entertainment",tabIsSelected:r==="soon"},"Prochainement")),Q3=({buttonLabel:r,title:i,url:a,...o})=>t.createElement(Ee,{alignItems:"center",justifyContent:"between",gap:{xs:"xs",md:"m"},py:"s",px:"xxl",direction:{xs:"column",md:"row"},bg:"ultramarine",...o},t.createElement(G,{as:"h2",color:"white",size:"xl",weight:"bold",textAlign:{xs:"center",md:"left"}},i),t.createElement(Me,{variant:"secondary",href:a,target:"_blank"},r));var oV=Object.defineProperty,uV=(r,i,a)=>i in r?oV(r,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[i]=a,X3=(r,i,a)=>uV(r,typeof i!="symbol"?i+"":i,a);const lV=()=>{const r=document.querySelector("#js-election-selector");r&&r.addEventListener("change",i=>{window.location.replace(i.target.value)})},sV=()=>{const r=document.querySelector(".c-search-banner");if(r){const i=document.querySelector("#js-search-banner-to-hide"),a=r.querySelector("#js-search-banner-dropdown-btn");a==null||a.addEventListener("click",()=>{const o=a.querySelector("svg"),l=o==null?void 0:o.querySelector("use");switch(l==null?void 0:l.getAttribute("xlink:href")){case"#chevron-up":l==null||l.setAttribute("xlink:href","#chevron-down"),i==null||i.classList.add("u-hidden");break;case"#chevron-down":l==null||l.setAttribute("xlink:href","#chevron-up"),i==null||i.classList.remove("u-hidden");break}})}};function cV(r){var i,a,o;if(!(r.target instanceof HTMLFormElement))return;r.preventDefault();const l=r.target,m=new FormData(l),d={},v=(i=m.get("job"))==null?void 0:i.toString();v&&(d["tags[]"]=v);const h=(a=m.get("adresse"))==null?void 0:a.toString();h&&(d.adresse=h);const f=(o=m.get("distance"))==null?void 0:o.toString();f&&(d.distance=f);const _="https://offres-emploi.20minutes.fr/offre-emploi",N=new URLSearchParams(d).toString(),S=`${_}?${N}&&utm_source=20minutes&utm_medium=referral&utm_campaign=job_offer&utm_term=actual&utm_content=search_bar`;window.open(S,"_blank")}const dV=()=>{const r=document.querySelector("form#actual-search-form");r instanceof HTMLFormElement&&r.addEventListener("submit",cV)},mV=[{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"}}],gO=(r,i,a,o,l,m)=>{const d=document.getElementById(r);if(!d)return;const v=d.dataset.storybook,h=d.querySelector(`#${r}-search`),f=h==null?void 0:h.getAttribute("data-api-url"),_=d.querySelector(".c-autocomplete__menu");if(!h||!_||!f)return;const N=d.querySelector(".c-autocomplete__input-spinner"),S=h.getAttribute("data-trigger-message"),C=async I=>{try{let P;return v&&i.includes("20minutes.fr")?P=mV:P=await(await fetch(`${f}${a}${encodeURIComponent(I)}`)).json(),m?P[m]:P}catch(P){return console.error("Error fetching autocomplete results:",P),[]}},w=(I,P)=>{const q=document.createElement("li");q.id=`/${I}`,q.textContent=P,q.addEventListener("click",()=>{h instanceof HTMLInputElement&&(h.value=P,_.classList.add("u-hidden"))}),_.appendChild(q)},k=()=>{N==null||N.classList.toggle("u-hidden")},A=()=>{const I=document.createElement("li");I.textContent=S,_.appendChild(I)},L=async I=>{k(),_.classList.remove("u-hidden");const P=await C(I);_.innerHTML="",P.length===0&&_.classList.add("u-hidden"),P.forEach(q=>{w(q[o],q[l])}),k()},B=I=>{if(!(I.target instanceof HTMLInputElement))return;const P=I.target.value;_.classList.remove("u-hidden"),P.length>=3?L(P):(_.innerHTML="",A())};h.addEventListener("input",B),h.addEventListener("focusout",()=>{setTimeout(()=>_.classList.add("u-hidden"),300)}),h.addEventListener("focusin",()=>{_.childElementCount>0&&_.classList.remove("u-hidden")})},fV=()=>{const r=document.querySelector("header"),i=document.querySelector(".js-limit-scroll-close-article-btn"),a=document.querySelector(".js-close-article-btn"),o=document.querySelector(".c-header-mobile"),l=o instanceof HTMLElement?o.offsetHeight:0;if(r&&i&&a){const m=new IntersectionObserver(()=>{const d=a.classList,v=d.contains("u-hidden"),h=r.getBoundingClientRect().bottom-l,f=i.getBoundingClientRect().bottom-l;v&&h<=0&&f>=0&&d.remove("u-hidden"),!v&&(h>=0||f<=0)&&d.add("u-hidden")},{root:document,rootMargin:`-${l}px 0px 0px 0px`});m.observe(r),m.observe(i)}},pV=r=>{r.stopImmediatePropagation(),r.preventDefault();const i=r.currentTarget;if(i instanceof HTMLButtonElement){const a=i.parentElement,o=a==null?void 0:a.querySelector(`#${i.getAttribute("aria-controls")}`);i.getAttribute("aria-expanded")==="true"?(i.setAttribute("aria-expanded","false"),o==null||o.setAttribute("aria-hidden","true")):(i.setAttribute("aria-expanded","true"),o==null||o.setAttribute("aria-hidden","false"))}},hV=(r=document.querySelector(".js-collapse__button"))=>{r&&document.querySelectorAll(".c-collapse__button").forEach(i=>{i.addEventListener("click",a=>{pV(a)})})},vV=(r,i)=>{const a=document.querySelector(`#${i}`);if(a){const o=a.querySelector(".js-countdown-days"),l=a.querySelector(".js-countdown-hours"),m=a.querySelector(".js-countdown-minutes"),d=a.querySelector(".js-countdown-seconds");if(!o||!l||!m||!d)return;window.counters={paralympicsGames:"2024-08-28 20:00:00"};const v=window.counters[r],h=new Date(v).getTime(),f=setInterval(()=>{const _=new Date().getTime(),N=h-_;if(N<=0)clearInterval(f);else{const S=Math.floor(N/864e5),C=Math.floor(N%(1e3*60*60*24)/(1e3*60*60)),w=Math.floor(N%(1e3*60*60)/(1e3*60)),k=Math.floor(N%(1e3*60)/1e3);o.innerHTML=S.toString(),l.innerHTML=C.toString(),m.innerHTML=w.toString(),d.innerHTML=k.toString()}},1e3)}},gV=r=>{const i=r.getBBox(),a=i.width/20;return[i.x-a,i.y-a,i.width+a*2,i.height+a*2].join(" ")},bV=()=>{const r=document.querySelector(".c-map-districts-container"),i=document.querySelector(".c-map-districts");if(!r||!i)return;const a=document.querySelector(".c-map-districts-container__description"),o=document.querySelector(".c-map-districts-container__department"),l=document.querySelector(".c-map-districts-container__unzoom-button");let m=i;const d=i.getAttribute("viewBox"),v=(C,w)=>{var k;return(k=C.matches)==null?void 0:k.call(C,w)},h=(C,w,k=".c-map-districts__zoomable:not(.js-selected-area)")=>{if(!C)return;let A,L=C.parentElement;for(;L instanceof SVGGraphicsElement&&L!==w;)v(L,k)&&(A=L),L=L.parentElement;return A},f=(C,w,k)=>{if(!C)return;let A=C.parentElement;for(;A instanceof SVGGraphicsElement&&A!==k;){if(w===A)return!0;A=A.parentElement}return k===w},_=(C,w)=>{if(w&&l&&a){r.classList.remove("c-map-districts-container--department-view"),a.classList.remove("u-hidden"),o==null||o.classList.add("u-hidden"),l.classList.add("u-hidden"),w!==d&&(a.classList.add("u-hidden"),l.classList.remove("u-hidden")),m.classList.remove("js-selected-area"),m=C;const k=m.getAttribute("data-info");o&&k&&(r.classList.add("c-map-districts-container--department-view"),o.classList.remove("u-hidden"),o.innerHTML=k),m.classList.add("js-selected-area"),i.setAttribute("viewBox",w)}},N=C=>{C.stopPropagation();const w=C.currentTarget;if(m&&i&&w instanceof SVGGraphicsElement){if(w===m)return;if(C.preventDefault(),m!==i&&!f(w,m,i)){_(i,d);return}const k=h(w,m);_(k||w,gV(k||w))}},S=()=>{i&&m!==i&&_(i,d)};i.addEventListener("click",S),l&&l.addEventListener("click",S),document.querySelectorAll(".c-map-districts__zoomable").forEach(C=>{C.addEventListener("click",w=>N(w))})},_V=()=>{const r=document.getElementById("elections-form-search"),i=document.querySelector(".c-search-form__autocomplete");if(!r||!i)return;const a=m=>{i.classList.remove("u-hidden");const d=i.querySelectorAll("li"),v=[];return d.forEach(h=>{const f=h.querySelector("a");f&&f.innerHTML.toLowerCase().includes(m.toLowerCase())&&v.push(h.innerHTML)}),v},o=m=>{i.innerHTML+=`<li>${m}</li>`},l=({target:m})=>{if(!(m instanceof HTMLInputElement))return;const d=m.value;if(i.classList.add("u-hidden"),d.length>=3){const v=a(d);i.innerHTML="",v.length===0&&i.classList.add("u-hidden"),v.forEach(h=>{o(h)})}};r.addEventListener("input",l),r.addEventListener("focusout",()=>{setTimeout(()=>i.classList.add("u-hidden"),300)}),r.addEventListener("focusin",()=>{i.childElementCount>0&&i.classList.remove("u-hidden")})},EV=(r,i)=>{var a;r.setAttribute("aria-expanded","true");const o=(a=r.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(m=>m.classList.remove(i));const l=r.querySelector(".js-ellipsis-button__label");l instanceof HTMLSpanElement&&(l.innerHTML="Voir moins")},yV=(r,i)=>{var a;const o=(a=r.parentNode)==null?void 0:a.querySelectorAll(".js-ellipsis-target");o==null||o.forEach(m=>m.classList.add(i)),r.setAttribute("aria-expanded","false");const l=r.querySelector(".js-ellipsis-button__label");l instanceof HTMLSpanElement&&(l.innerHTML="Voir plus")},NV=(r,i)=>{const a=r.currentTarget;if(r.preventDefault(),a instanceof HTMLButtonElement){const o=i?"u-ellipsis-multiline":"u-ellipsis";return a.getAttribute("aria-expanded")==="true"?yV(a,o):EV(a,o)}return null},xV=(r=document.querySelector(".js-ellipsis-button"))=>{r&&document.querySelectorAll(".js-ellipsis-button").forEach(i=>{const a=i.getAttribute("data-multiple")==="true";i.addEventListener("click",o=>NV(o,a))})},SV=r=>{var i;r.setAttribute("aria-expanded","true");const a=(i=r.parentNode)==null?void 0:i.querySelectorAll(".js-expand-target");a==null||a.forEach(l=>l.setAttribute("aria-hidden","false"));const o=r.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir moins")},wV=r=>{var i;const a=(i=r.parentNode)==null?void 0:i.querySelectorAll(".js-expand-target");a==null||a.forEach(l=>l.setAttribute("aria-hidden","true")),r.setAttribute("aria-expanded","false");const o=r.querySelector(".js-expand-button__label");o instanceof HTMLSpanElement&&(o.innerHTML="Voir plus")},CV=r=>{const i=r.currentTarget;return r.preventDefault(),i instanceof HTMLButtonElement?i.getAttribute("aria-expanded")==="true"?wV(i):SV(i):null},AV=(r=document.querySelector(".js-expand-button"))=>{r&&document.querySelectorAll(".js-expand-button").forEach(i=>i.addEventListener("click",CV))},DV=typeof window<"u"&&navigator.userAgent.toLowerCase().includes("firefox"),TV=()=>{const r=document.querySelector(".js-game-alert");DV&&r&&r.classList.remove("u-hidden")},OV=()=>{const r=document.querySelectorAll(".js-half-donut-result");for(const i of Array.from(r)){const a=i.querySelector(".c-half-donut"),o=i.querySelector(".c-legend");if(!a||!o)return;o.querySelectorAll("[data-color]").forEach(l=>{const m=l.getAttribute("data-color"),d=a.querySelector(`.c-half-donut__zone--${m}`);d==null||d.addEventListener("mouseenter",()=>{l.classList.add("c-legend__item--is-hovered"),a.classList.add("c-half-donut--is-hovered"),o.classList.add("c-legend--is-hovered")}),d==null||d.addEventListener("mouseleave",()=>{l.classList.remove("c-legend__item--is-hovered"),a.classList.remove("c-half-donut--is-hovered"),o.classList.remove("c-legend--is-hovered")}),l.addEventListener("mouseenter",()=>{d==null||d.classList.add("c-half-donut__zone--is-hovered"),o.classList.add("c-legend--is-hovered"),a.classList.add("c-half-donut--is-hovered")}),l.addEventListener("mouseleave",()=>{d==null||d.classList.remove("c-half-donut__zone--is-hovered"),o.classList.remove("c-legend--is-hovered"),a.classList.remove("c-half-donut--is-hovered")})})}},ci={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var kV=[`a[href]${ci.inert}${ci.negTabIndex}`,`area[href]${ci.inert}${ci.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${ci.inert}${ci.negTabIndex}${ci.disabled}`,`input[type="radio"]${ci.inert}${ci.negTabIndex}${ci.disabled}`,`select${ci.inert}${ci.negTabIndex}${ci.disabled}`,`textarea${ci.inert}${ci.negTabIndex}${ci.disabled}`,`button${ci.inert}${ci.negTabIndex}${ci.disabled}`,`details${ci.inert} > summary:first-of-type${ci.negTabIndex}`,`iframe${ci.inert}${ci.negTabIndex}`,`audio[controls]${ci.inert}${ci.negTabIndex}`,`video[controls]${ci.inert}${ci.negTabIndex}`,`[contenteditable]${ci.inert}${ci.negTabIndex}`,`[tabindex]${ci.inert}${ci.negTabIndex}`];function bO(r){(r.querySelector("[autofocus]")||r).focus()}function LV(r){const i=dv(r,!0),a=i?dv(r,!1)||i:null;return[i,a]}function dv(r,i){if(i&&yO(r))return r;if(IV(r))if(r.shadowRoot){let a=_O(r.shadowRoot,i);for(;a;){const o=dv(a,i);if(o)return o;a=EO(a,i)}}else if(r.localName==="slot"){const a=r.assignedElements({flatten:!0});i||a.reverse();for(const o of a){const l=dv(o,i);if(l)return l}}else{let a=_O(r,i);for(;a;){const o=dv(a,i);if(o)return o;a=EO(a,i)}}return!i&&yO(r)?r:null}function _O(r,i){return i?r.firstElementChild:r.lastElementChild}function EO(r,i){return i?r.nextElementSibling:r.previousElementSibling}const MV=r=>r.matches("details:not([open]) *")&&!r.matches("details>summary:first-of-type")?!0:!(r.offsetWidth||r.offsetHeight||r.getClientRects().length),yO=r=>{var i;return(i=r.shadowRoot)!=null&&i.delegatesFocus?!1:r.matches(kV.join(","))&&!MV(r)};function IV(r){return r.shadowRoot&&r.getAttribute("tabindex")==="-1"?!1:!r.matches(":disabled,[hidden],[inert]")}function eb(r=document){const i=r.activeElement;return i?i.shadowRoot?eb(i.shadowRoot)||document.activeElement:i:null}function BV(r,i){const[a,o]=LV(r);if(!a)return i.preventDefault();const l=eb();i.shiftKey&&l===a?(o.focus(),i.preventDefault()):!i.shiftKey&&l===o&&(a.focus(),i.preventDefault())}function mv(r,i){function a(o){return!o||o===document||o===window?null:(o.assignedSlot&&(o=o.assignedSlot),o.closest(r)||a(o.getRootNode().host))}return a(i)}const fv="data-a11y-dialog";class NO{constructor(i){X3(this,"$el"),X3(this,"id"),X3(this,"previouslyFocused"),X3(this,"shown"),this.$el=i,this.id=this.$el.getAttribute(fv)||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(i){var a;return this.shown?this:this.fire("show",i).defaultPrevented?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=eb(),((a=this.previouslyFocused)==null?void 0:a.tagName)==="BODY"&&i!=null&&i.target&&(this.previouslyFocused=i.target),(i==null?void 0:i.type)==="focus"?this.maintainFocus(i):bO(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this)}hide(i){var a,o;return this.shown?this.fire("hide",i).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(i,a,o){return this.$el.addEventListener(i,a,o),this}off(i,a,o){return this.$el.removeEventListener(i,a,o),this}fire(i,a){const o=new CustomEvent(i,{detail:a,cancelable:!0});return this.$el.dispatchEvent(o),o}handleTriggerClicks(i){const a=i.composedPath()[0],o=mv(`[${fv}-show="${this.id}"]`,a),l=mv(`[${fv}-hide="${this.id}"]`,a),m=mv(`[${fv}-hide]`,a)&&mv('[aria-modal="true"]',a)===this.$el;o&&this.show(i),(l||m)&&this.hide(i)}bindKeypress(i){if(mv('[aria-modal="true"]',eb())!==this.$el)return;let a=!1;try{a=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}i.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&!a&&(i.preventDefault(),this.hide(i)),i.key==="Tab"&&BV(this.$el,i)}maintainFocus(i){i.target.closest(`[aria-modal="true"], [${fv}-ignore-focus-trap]`)||bO(this.$el)}}function xO(){for(const r of document.querySelectorAll("[data-a11y-dialog]"))new NO(r)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",xO):xO());const PV=()=>document.querySelectorAll(".js-modal").forEach(r=>{if(!(r instanceof HTMLElement))return;const i=new NO(r);if(r.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&&(i.on("show",()=>{a.forEach(l=>l.classList.add("u-hidden")),o.forEach(l=>l.classList.remove("u-hidden"))}),i.on("hide",()=>{a.forEach(l=>l.classList.remove("u-hidden")),o.forEach(l=>l.classList.add("u-hidden"))}))}i.on("show",()=>{document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll")})}),FV=({navigatedList:r,nextBtn:i,prevBtn:a})=>{var o,l,m,d,v,h,f,_;const N=r.scrollLeft>0,S=r.scrollLeft+r.clientWidth<r.scrollWidth;N&&S?((o=i.classList)==null||o.add("o-nav-button--visible"),(l=a.classList)==null||l.add("o-nav-button--visible")):N?((m=i.classList)==null||m.remove("o-nav-button--visible"),(d=a.classList)==null||d.add("o-nav-button--visible")):S?((v=i.classList)==null||v.add("o-nav-button--visible"),(h=a.classList)==null||h.remove("o-nav-button--visible")):((f=i.classList)==null||f.remove("o-nav-button--visible"),(_=a.classList)==null||_.remove("o-nav-button--visible"))},qV=({navigatedList:r,nextBtn:i,prevBtn:a,sliderVariant:o})=>{if(r){const l=r.closest(".js-overview-bar-container"),m=l==null?void 0:l.querySelector(".c-stepper"),d=m==null?void 0:m.querySelectorAll(".c-stepper__item");if(d){const v=Array.from(d).findIndex(h=>h.classList.contains("c-stepper__item--loading"));if(v<0)d[0].classList.add("c-stepper__item--loading");else{d[v].classList.remove("c-stepper__item--loading"),d[v].classList.add("c-stepper__item--loaded");const h=d[v].querySelector(".c-stepper__loader");h&&h instanceof HTMLElement&&(h.style.transition="width 0s linear"),v+1<d.length&&d[v+1].classList.add("c-stepper__item--loading")}}if(r.scrollWidth-r.clientWidth>r.clientWidth){let v=r.scrollLeft;switch(o){case"three-columns-articles":v+=r.clientWidth+32;break;case"rubrics":v+=r.clientWidth-36;break;default:v+=Math.ceil(r.clientWidth*.6);break}r.scrollTo({left:v,behavior:"smooth"}),a.classList.add("o-nav-button--visible"),v+r.clientWidth>=r.scrollWidth&&i.classList.remove("o-nav-button--visible")}else{const v=r.scrollWidth-r.clientWidth;r.scrollTo({left:v,behavior:"smooth"}),i.classList.remove("o-nav-button--visible"),a.classList.add("o-nav-button--visible")}}},UV=({navigatedList:r,nextBtn:i,prevBtn:a,sliderVariant:o,delay:l})=>{if(r){const m=r.closest(".js-overview-bar-container"),d=m==null?void 0:m.querySelector(".c-stepper"),v=d==null?void 0:d.querySelectorAll(".c-stepper__item");if(v){const h=Array.from(v).findIndex(f=>f.classList.contains("c-stepper__item--loading"));h<0?v[0].classList.add("c-stepper__item--loading"):(v[h].classList.remove("c-stepper__item--loading"),v[h].classList.remove("c-stepper__item--loaded"),h-1>0&&(v[h-1].classList.remove("c-stepper__item--loading"),v[h-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const f=v[h-1].querySelector(".c-stepper__loader");v[h-1].classList.add("c-stepper__item--loading"),f&&f instanceof HTMLElement&&(f.style.transition=`width ${l/1e3}s linear`)},0)))}if(r.clientWidth<r.scrollLeft){let h=r.scrollLeft;switch(o){case"three-columns-articles":h-=r.clientWidth+32;break;case"rubrics":h-=r.clientWidth-36;break;default:h-=Math.ceil(r.clientWidth*.6);break}r.scrollTo({left:h,behavior:"smooth"}),i.classList.add("o-nav-button--visible"),h===0&&a.classList.remove("o-nav-button--visible")}else r.scrollTo({left:0,behavior:"smooth"}),a.classList.remove("o-nav-button--visible"),r.clientWidth<r.scrollWidth&&i.classList.add("o-nav-button--visible")}},zV=({navigatedList:r,nextBtn:i,prevBtn:a})=>{FV({navigatedList:r,nextBtn:i,prevBtn:a})},HV=()=>{const r=document.querySelectorAll(".js-navigation-container");for(const i of Array.from(r)){const{sliderVariant:a}=i.dataset,{sliderAuto:o}=i.dataset,{sliderDelay:l}=i.dataset,m=l?parseInt(l,10):3e3,d=i.closest(".js-overview-bar-container"),v=d==null?void 0:d.querySelector(".c-stepper"),h=v==null?void 0:v.querySelectorAll(".c-stepper__item");if(i){const f=i.querySelector(".js-navigation-container__list"),_=i.querySelector(".o-nav-button--next-button"),N=i.querySelector(".o-nav-button--previous-button");if(f&&f.clientWidth<f.scrollWidth&&(_==null||_.classList.add("o-nav-button--visible")),f&&_&&N&&(_==null||_.addEventListener("click",qV.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a})),N==null||N.addEventListener("click",UV.bind(!1,{navigatedList:f,nextBtn:_,prevBtn:N,sliderVariant:a,delay:m}))),o==="true"&&_){const S=v?v.querySelector(".c-stepper__item--loading"):null;h&&(h.forEach(C=>{const w=C.querySelector(".c-stepper__loader");w&&w instanceof HTMLElement&&(w.style.transition=`width ${m/1e3}s linear`)}),S||h[0].classList.add("c-stepper__item--loading")),setInterval(()=>{_.classList.contains("o-nav-button--visible")?_.click():f&&N&&(f.scrollLeft=0,h&&(h.forEach(C=>{const w=C.querySelector(".c-stepper__loader");w&&w instanceof HTMLElement&&(w.style.transition="width 0s linear"),C.classList.remove("c-stepper__item--loading"),C.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{w&&w instanceof HTMLElement&&(w.style.transition=`width ${m/1e3}s linear`)},0)}),setTimeout(()=>{h[0].classList.add("c-stepper__item--loading")},0)),N.click())},m)}}}},VV=()=>{const r=document.querySelectorAll(".js-navigation-container");for(const i of Array.from(r))if(i){const a=i.querySelector(".js-navigation-container__list"),o=i.querySelector(".o-nav-button--next-button"),l=i.querySelector(".o-nav-button--previous-button");a&&o&&l&&window.addEventListener("resize",zV.bind(!1,{navigatedList:a,nextBtn:o,prevBtn:l}))}};/*!
|
|
323
323
|
* PhotoSwipe 5.4.4 - https://photoswipe.com
|
|
324
324
|
* (c) 2024 Dmytro Semenov
|
|
325
325
|
*/function yc(r,i,a){const o=document.createElement(i);return r&&(o.className=r),a&&a.appendChild(o),o}function To(r,i){return r.x=i.x,r.y=i.y,i.id!==void 0&&(r.id=i.id),r}function SO(r){r.x=Math.round(r.x),r.y=Math.round(r.y)}function s8(r,i){const a=Math.abs(r.x-i.x),o=Math.abs(r.y-i.y);return Math.sqrt(a*a+o*o)}function pv(r,i){return r.x===i.x&&r.y===i.y}function hv(r,i,a){return Math.min(Math.max(r,i),a)}function vv(r,i,a){let o=`translate3d(${r}px,${i||0}px,0)`;return a!==void 0&&(o+=` scale3d(${a},${a},1)`),o}function c1(r,i,a,o){r.style.transform=vv(i,a,o)}const jV="cubic-bezier(.4,0,.22,1)";function wO(r,i,a,o){r.style.transition=i?`${i} ${a}ms ${o||jV}`:"none"}function c8(r,i,a){r.style.width=typeof i=="number"?`${i}px`:i,r.style.height=typeof a=="number"?`${a}px`:a}function RV(r){wO(r)}function GV(r){return"decode"in r?r.decode().catch(()=>{}):r.complete?Promise.resolve(r):new Promise((i,a)=>{r.onload=()=>i(r),r.onerror=a})}const fd={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function KV(r){return"button"in r&&r.button===1||r.ctrlKey||r.metaKey||r.altKey||r.shiftKey}function $V(r,i,a=document){let o=[];if(r instanceof Element)o=[r];else if(r instanceof NodeList||Array.isArray(r))o=Array.from(r);else{const l=typeof r=="string"?r:i;l&&(o=Array.from(a.querySelectorAll(l)))}return o}function CO(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let AO=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{AO=!0}}))}catch{}class WV{constructor(){this._pool=[]}add(i,a,o,l){this._toggleListener(i,a,o,l)}remove(i,a,o,l){this._toggleListener(i,a,o,l,!0)}removeAll(){this._pool.forEach(i=>{this._toggleListener(i.target,i.type,i.listener,i.passive,!0,!0)}),this._pool=[]}_toggleListener(i,a,o,l,m,d){if(!i)return;const v=m?"removeEventListener":"addEventListener";a.split(" ").forEach(h=>{if(h){d||(m?this._pool=this._pool.filter(_=>_.type!==h||_.listener!==o||_.target!==i):this._pool.push({target:i,type:h,listener:o,passive:l}));const f=AO?{passive:l||!1}:!1;i[v](h,o,f)}})}}function DO(r,i){if(r.getViewportSizeFn){const a=r.getViewportSizeFn(r,i);if(a)return a}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function gv(r,i,a,o,l){let m=0;if(i.paddingFn)m=i.paddingFn(a,o,l)[r];else if(i.padding)m=i.padding[r];else{const d="padding"+r[0].toUpperCase()+r.slice(1);i[d]&&(m=i[d])}return Number(m)||0}function TO(r,i,a,o){return{x:i.x-gv("left",r,i,a,o)-gv("right",r,i,a,o),y:i.y-gv("top",r,i,a,o)-gv("bottom",r,i,a,o)}}class ZV{constructor(i){this.slide=i,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(i){this.currZoomLevel=i,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(i){const{pswp:a}=this.slide,o=this.slide[i==="x"?"width":"height"]*this.currZoomLevel,l=gv(i==="x"?"left":"top",a.options,a.viewportSize,this.slide.data,this.slide.index),m=this.slide.panAreaSize[i];this.center[i]=Math.round((m-o)/2)+l,this.max[i]=o>m?Math.round(m-o)+l:this.center[i],this.min[i]=o>m?l:this.center[i]}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(i,a){return hv(a,this.max[i],this.min[i])}}const OO=4e3;let kO=class{constructor(r,i,a,o){this.pswp=o,this.options=r,this.itemData=i,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(r,i,a){const o={x:r,y:i};this.elementSize=o,this.panAreaSize=a;const l=a.x/o.x,m=a.y/o.y;this.fit=Math.min(1,l<m?l:m),this.fill=Math.min(1,l>m?l:m),this.vFill=Math.min(1,m),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(r){const i=r+"ZoomLevel",a=this.options[i];if(a)return typeof a=="function"?a(this):a==="fill"?this.fill:a==="fit"?this.fit:Number(a)}_getSecondary(){let r=this._parseZoomLevelOption("secondary");return r||(r=Math.min(1,this.fit*3),this.elementSize&&r*this.elementSize.x>OO&&(r=OO/this.elementSize.x),r)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};class YV{constructor(i,a,o){this.data=i,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 kO(o.options,i,a,o),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:a}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=yc("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 ZV(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(i){i&&!this.isActive?this.activate():!i&&this.isActive&&this.deactivate()}append(i){this.holderElement=i,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:i}=this;this.heavyAppended||!i.opener.isOpen||i.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(i){const a=this.currentResolution||this.zoomLevels.initial;if(!a)return;const o=Math.round(this.width*a)||this.pswp.viewportSize.x,l=Math.round(this.height*a)||this.pswp.viewportSize.y;!this.sizeChanged(o,l)&&!i||this.content.setDisplayedSize(o,l)}sizeChanged(i,a){return i!==this.prevDisplayedWidth||a!==this.prevDisplayedHeight?(this.prevDisplayedWidth=i,this.prevDisplayedHeight=a,!0):!1}getPlaceholderElement(){var i;return(i=this.content.placeholder)===null||i===void 0?void 0:i.element}zoomTo(i,a,o,l){const{pswp:m}=this;if(!this.isZoomable()||m.mainScroll.isShifted())return;m.dispatch("beforeZoomTo",{destZoomLevel:i,centerPoint:a,transitionDuration:o}),m.animations.stopAllPan();const d=this.currZoomLevel;l||(i=hv(i,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(i),this.pan.x=this.calculateZoomToPanOffset("x",a,d),this.pan.y=this.calculateZoomToPanOffset("y",a,d),SO(this.pan);const v=()=>{this._setResolution(i),this.applyCurrentZoomPan()};o?m.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:v,duration:o,easing:m.options.easing}):v()}toggleZoom(i){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,i,this.pswp.options.zoomAnimationDuration)}setZoomLevel(i){this.currZoomLevel=i,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(i,a,o){if(this.bounds.max[i]-this.bounds.min[i]===0)return this.bounds.center[i];a||(a=this.pswp.getViewportCenterPoint()),o||(o=this.zoomLevels.initial);const l=this.currZoomLevel/o;return this.bounds.correctPan(i,(this.pan[i]-a[i])*l+a[i])}panTo(i,a){this.pan.x=this.bounds.correctPan("x",i),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),To(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(i,a,o){o/=this.currentResolution||this.zoomLevels.initial,c1(this.container,i,a,o)}calculateSize(){const{pswp:i}=this;To(this.panAreaSize,TO(i.options,i.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),i.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const i=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return vv(this.pan.x,this.pan.y,i)}_setResolution(i){i!==this.currentResolution&&(this.currentResolution=i,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const JV=.35,QV=.6,XV=.4,ej=.5;function tj(r,i){return r*i/(1-i)}class rj{constructor(i){this.gestures=i,this.pswp=i.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&To(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:i,prevP1:a,dragAxis:o}=this.gestures,{currSlide:l}=this.pswp;if(o==="y"&&this.pswp.options.closeOnVerticalDrag&&l&&l.currZoomLevel<=l.zoomLevels.fit&&!this.gestures.isMultitouch){const m=l.pan.y+(i.y-a.y);if(!this.pswp.dispatch("verticalDrag",{panY:m}).defaultPrevented){this._setPanWithFriction("y",m,QV);const d=1-Math.abs(this._getVerticalDragRatio(l.pan.y));this.pswp.applyBgOpacity(d),l.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),l&&(SO(l.pan),l.applyCurrentZoomPan()))}end(){const{velocity:i}=this.gestures,{mainScroll:a,currSlide:o}=this.pswp;let l=0;if(this.pswp.animations.stopAll(),a.isShifted()){const m=(a.x-a.getCurrSlideX())/this.pswp.viewportSize.x;i.x<-.5&&m<0||i.x<.1&&m<-.5?(l=1,i.x=Math.min(i.x,0)):(i.x>ej&&m>0||i.x>-.1&&m>.5)&&(l=-1,i.x=Math.max(i.x,0)),a.moveIndexBy(l,!0,i.x)}o&&o.currZoomLevel>o.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(i){const{velocity:a}=this.gestures,{currSlide:o}=this.pswp;if(!o)return;const{pan:l,bounds:m}=o,d=l[i],v=this.pswp.bgOpacity<1&&i==="y",h=d+tj(a[i],.995);if(v){const C=this._getVerticalDragRatio(d),w=this._getVerticalDragRatio(h);if(C<0&&w<-.4||C>0&&w>XV){this.pswp.close();return}}const f=m.correctPan(i,h);if(d===f)return;const _=f===h?1:.82,N=this.pswp.bgOpacity,S=f-d;this.pswp.animations.startSpring({name:"panGesture"+i,isPan:!0,start:d,end:f,velocity:a[i],dampingRatio:_,onUpdate:C=>{if(v&&this.pswp.bgOpacity<1){const w=1-(f-C)/S;this.pswp.applyBgOpacity(hv(N+(1-N)*w,0,1))}l[i]=Math.floor(C),o.applyCurrentZoomPan()}})}_panOrMoveMainScroll(i){const{p1:a,dragAxis:o,prevP1:l,isMultitouch:m}=this.gestures,{currSlide:d,mainScroll:v}=this.pswp,h=a[i]-l[i],f=v.x+h;if(!h||!d)return!1;if(i==="x"&&!d.isPannable()&&!m)return v.moveTo(f,!0),!0;const{bounds:_}=d,N=d.pan[i]+h;if(this.pswp.options.allowPanToNext&&o==="x"&&i==="x"&&!m){const S=v.getCurrSlideX(),C=v.x-S,w=h>0,k=!w;if(N>_.min[i]&&w){if(_.min[i]<=this.startPan[i])return v.moveTo(f,!0),!0;this._setPanWithFriction(i,N)}else if(N<_.max[i]&&k){if(this.startPan[i]<=_.max[i])return v.moveTo(f,!0),!0;this._setPanWithFriction(i,N)}else if(C!==0){if(C>0)return v.moveTo(Math.max(f,S),!0),!0;if(C<0)return v.moveTo(Math.min(f,S),!0),!0}else this._setPanWithFriction(i,N)}else i==="y"?!v.isShifted()&&_.min.y!==_.max.y&&this._setPanWithFriction(i,N):this._setPanWithFriction(i,N);return!1}_getVerticalDragRatio(i){var a,o;return(i-((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(i,a,o){const{currSlide:l}=this.pswp;if(!l)return;const{pan:m,bounds:d}=l;if(d.correctPan(i,a)!==a||o){const v=Math.round(a-m[i]);m[i]+=v*(o||JV)}else m[i]=a}}const nj=.05,ij=.15;function LO(r,i,a){return r.x=(i.x+a.x)/2,r.y=(i.y+a.y)/2,r}class aj{constructor(i){this.gestures=i,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:i}=this.gestures.pswp;i&&(this._startZoomLevel=i.currZoomLevel,To(this._startPan,i.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:i,startP1:a,p2:o,startP2:l,pswp:m}=this.gestures,{currSlide:d}=m;if(!d)return;const v=d.zoomLevels.min,h=d.zoomLevels.max;if(!d.isZoomable()||m.mainScroll.isShifted())return;LO(this._startZoomPoint,a,l),LO(this._zoomPoint,i,o);let f=1/s8(a,l)*s8(i,o)*this._startZoomLevel;if(f>d.zoomLevels.initial+d.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),f<v)if(m.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=d.zoomLevels.initial){const _=1-(v-f)/(v/1.2);m.dispatch("pinchClose",{bgOpacity:_}).defaultPrevented||m.applyBgOpacity(_)}else f=v-(v-f)*ij;else f>h&&(f=h+(f-h)*nj);d.pan.x=this._calculatePanForZoomLevel("x",f),d.pan.y=this._calculatePanForZoomLevel("y",f),d.setZoomLevel(f),d.applyCurrentZoomPan()}end(){const{pswp:i}=this.gestures,{currSlide:a}=i;(!a||a.currZoomLevel<a.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&i.options.pinchToClose?i.close():this.correctZoomPan()}_calculatePanForZoomLevel(i,a){const o=a/this._startZoomLevel;return this._zoomPoint[i]-(this._startZoomPoint[i]-this._startPan[i])*o}correctZoomPan(i){const{pswp:a}=this.gestures,{currSlide:o}=a;if(!(o!=null&&o.isZoomable()))return;this._zoomPoint.x===0&&(i=!0);const l=o.currZoomLevel;let m,d=!0;l<o.zoomLevels.initial?m=o.zoomLevels.initial:l>o.zoomLevels.max?m=o.zoomLevels.max:(d=!1,m=l);const v=a.bgOpacity,h=a.bgOpacity<1,f=To({x:0,y:0},o.pan);let _=To({x:0,y:0},f);i&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=l,To(this._startPan,f)),d&&(_={x:this._calculatePanForZoomLevel("x",m),y:this._calculatePanForZoomLevel("y",m)}),o.setZoomLevel(m),_={x:o.bounds.correctPan("x",_.x),y:o.bounds.correctPan("y",_.y)},o.setZoomLevel(l);const N=!pv(_,f);if(!N&&!d&&!h){o._setResolution(m),o.applyCurrentZoomPan();return}a.animations.stopAllPan(),a.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:S=>{if(S/=1e3,N||d){if(N&&(o.pan.x=f.x+(_.x-f.x)*S,o.pan.y=f.y+(_.y-f.y)*S),d){const C=l+(m-l)*S;o.setZoomLevel(C)}o.applyCurrentZoomPan()}h&&a.bgOpacity<1&&a.applyBgOpacity(hv(v+(1-v)*S,0,1))},onComplete:()=>{o._setResolution(m),o.applyCurrentZoomPan()}})}}function MO(r){return!!r.target.closest(".pswp__container")}class oj{constructor(i){this.gestures=i}click(i,a){const o=a.target.classList,l=o.contains("pswp__img"),m=o.contains("pswp__item")||o.contains("pswp__zoom-wrap");l?this._doClickOrTapAction("imageClick",i,a):m&&this._doClickOrTapAction("bgClick",i,a)}tap(i,a){MO(a)&&this._doClickOrTapAction("tap",i,a)}doubleTap(i,a){MO(a)&&this._doClickOrTapAction("doubleTap",i,a)}_doClickOrTapAction(i,a,o){var l;const{pswp:m}=this.gestures,{currSlide:d}=m,v=i+"Action",h=m.options[v];if(!m.dispatch(v,{point:a,originalEvent:o}).defaultPrevented){if(typeof h=="function"){h.call(m,a,o);return}switch(h){case"close":case"next":m[h]();break;case"zoom":d==null||d.toggleZoom(a);break;case"zoom-or-close":d!=null&&d.isZoomable()&&d.zoomLevels.secondary!==d.zoomLevels.initial?d.toggleZoom(a):m.options.clickToCloseNonZoomable&&m.close();break;case"toggle-controls":(l=this.gestures.pswp.element)===null||l===void 0||l.classList.toggle("pswp--ui-visible");break}}}}const uj=10,lj=300,sj=25;class cj{constructor(i){this.pswp=i,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||(i.options.allowPanToNext=!1),this.drag=new rj(this),this.zoomLevels=new aj(this),this.tapHandler=new oj(this),i.on("bindEvents",()=>{i.events.add(i.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),i.scrollWrap&&(i.scrollWrap.ontouchmove=()=>{},i.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(i,a,o,l){const{pswp:m}=this,{events:d}=m,v=l?i+l:"";d.add(m.scrollWrap,i+a,this.onPointerDown.bind(this)),d.add(window,i+"move",this.onPointerMove.bind(this)),d.add(window,i+o,this.onPointerUp.bind(this)),v&&d.add(m.scrollWrap,v,this.onPointerUp.bind(this))}onPointerDown(i){const a=i.type==="mousedown"||i.pointerType==="mouse";if(a&&i.button>0)return;const{pswp:o}=this;if(!o.opener.isOpen){i.preventDefault();return}o.dispatch("pointerDown",{originalEvent:i}).defaultPrevented||(a&&(o.mouseDetected(),this._preventPointerEventBehaviour(i,"down")),o.animations.stopAll(),this._updatePoints(i,"down"),this._numActivePoints===1&&(this.dragAxis=null,To(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(i){this._preventPointerEventBehaviour(i,"move"),this._numActivePoints&&(this._updatePoints(i,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:i}).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,To(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(i){this._numActivePoints&&(this._updatePoints(i,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:i}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(i)),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?pv(this.p1,this.prevP1)||this.drag.change():(!pv(this.p1,this.prevP1)||!pv(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(i){const a=Date.now(),o=a-this._intervalTime;o<50&&!i||(this.velocity.x=this._getVelocity("x",o),this.velocity.y=this._getVelocity("y",o),this._intervalTime=a,To(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(i){const{mainScroll:a}=this.pswp;if(a.isShifted()){a.moveIndexBy(0,!0);return}if(i.type.indexOf("cancel")>0)return;if(i.type==="mouseup"||i.pointerType==="mouse"){this.tapHandler.click(this.startP1,i);return}const o=this.pswp.options.doubleTapAction?lj:0;this._tapTimer?(this._clearTapTimer(),s8(this._lastStartP1,this.startP1)<sj&&this.tapHandler.doubleTap(this.startP1,i)):(To(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,i),this._clearTapTimer()},o))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(i,a){const o=this.p1[i]-this._intervalP1[i];return Math.abs(o)>1&&a>5?o/a:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(i,a){this.pswp.applyFilters("preventPointerEvent",!0,i,a)&&i.preventDefault()}_updatePoints(i,a){if(this._pointerEventEnabled){const o=i,l=this._ongoingPointers.findIndex(m=>m.id===o.pointerId);a==="up"&&l>-1?this._ongoingPointers.splice(l,1):a==="down"&&l===-1?this._ongoingPointers.push(this._convertEventPosToPoint(o,{x:0,y:0})):l>-1&&this._convertEventPosToPoint(o,this._ongoingPointers[l]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&To(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&To(this.p2,this._ongoingPointers[1])}else{const o=i;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(i,this.p1),a==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){To(this.prevP1,this.p1),To(this.prevP2,this.p2)}_updateStartPoints(){To(this.startP1,this.p1),To(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const i=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(i!==0){const a=i>0?"x":"y";Math.abs(this.p1[a]-this.startP1[a])>=uj&&(this.dragAxis=a)}}}_convertEventPosToPoint(i,a){return a.x=i.pageX-this.pswp.offset.x,a.y=i.pageY-this.pswp.offset.y,"pointerId"in i?a.id=i.pointerId:i.identifier!==void 0&&(a.id=i.identifier),a}_onClick(i){this.pswp.mainScroll.isShifted()&&(i.preventDefault(),i.stopPropagation())}}const dj=.35;class mj{constructor(i){this.pswp=i,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(i){const{pswp:a}=this,o=Math.round(a.viewportSize.x+a.viewportSize.x*a.options.spacing),l=o!==this.slideWidth;l&&(this.slideWidth=o,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((m,d)=>{l&&c1(m.el,(d+this._containerShiftIndex)*this.slideWidth),i&&m.slide&&m.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let i=0;i<3;i++){const a=yc("pswp__item","div",this.pswp.container);a.setAttribute("role","group"),a.setAttribute("aria-roledescription","slide"),a.setAttribute("aria-hidden","true"),a.style.display=i===1?"block":"none",this.itemHolders.push({el:a})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(i,a,o){const{pswp:l}=this;let m=l.potentialIndex+i;const d=l.getNumItems();if(l.canLoop()){m=l.getLoopedIndex(m);const h=(i+d)%d;h<=d/2?i=h:i=h-d}else m<0?m=0:m>=d&&(m=d-1),i=m-l.potentialIndex;l.potentialIndex=m,this._currPositionIndex-=i,l.animations.stopMainScroll();const v=this.getCurrSlideX();if(!a)this.moveTo(v),this.updateCurrItem();else{l.animations.startSpring({isMainScroll:!0,start:this.x,end:v,velocity:o||0,naturalFrequency:30,dampingRatio:1,onUpdate:f=>{this.moveTo(f)},onComplete:()=>{this.updateCurrItem(),l.appendHeavy()}});let h=l.potentialIndex-l.currIndex;if(l.canLoop()){const f=(h+d)%d;f<=d/2?h=f:h=f-d}Math.abs(h)>1&&this.updateCurrItem()}return!!i}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var i;const{pswp:a}=this,o=this._prevPositionIndex-this._currPositionIndex;if(!o)return;this._prevPositionIndex=this._currPositionIndex,a.currIndex=a.potentialIndex;let l=Math.abs(o),m;l>=3&&(this._containerShiftIndex+=o+(o>0?-3:3),l=3,this.itemHolders.forEach(d=>{var v;(v=d.slide)===null||v===void 0||v.destroy(),d.slide=void 0}));for(let d=0;d<l;d++)o>0?(m=this.itemHolders.shift(),m&&(this.itemHolders[2]=m,this._containerShiftIndex++,c1(m.el,(this._containerShiftIndex+2)*this.slideWidth),a.setContent(m,a.currIndex-l+d+2))):(m=this.itemHolders.pop(),m&&(this.itemHolders.unshift(m),this._containerShiftIndex--,c1(m.el,this._containerShiftIndex*this.slideWidth),a.setContent(m,a.currIndex+l-d-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),a.animations.stopAllPan(),this.itemHolders.forEach((d,v)=>{d.slide&&d.slide.setIsActive(v===1)}),a.currSlide=(i=this.itemHolders[1])===null||i===void 0?void 0:i.slide,a.contentLoader.updateLazy(o),a.currSlide&&a.currSlide.applyCurrentZoomPan(),a.dispatch("change")}moveTo(i,a){if(!this.pswp.canLoop()&&a){let o=(this.slideWidth*this._currPositionIndex-i)/this.slideWidth;o+=this.pswp.currIndex;const l=Math.round(i-this.x);(o<0&&l>0||o>=this.pswp.getNumItems()-1&&l<0)&&(i=this.x+l*dj)}this.x=i,this.pswp.container&&c1(this.pswp.container,i),this.pswp.dispatch("moveMainScroll",{x:i,dragging:a??!1})}}const fj={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},d1=(r,i)=>i?r:fj[r];class pj{constructor(i){this.pswp=i,this._wasFocused=!1,i.on("bindEvents",()=>{i.options.trapFocus&&(i.options.initialPointerPos||this._focusRoot(),i.events.add(document,"focusin",this._onFocusIn.bind(this))),i.events.add(document,"keydown",this._onKeyDown.bind(this))});const a=document.activeElement;i.on("destroy",()=>{i.options.returnFocus&&a&&this._wasFocused&&a.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(i){const{pswp:a}=this;if(a.dispatch("keydown",{originalEvent:i}).defaultPrevented||KV(i))return;let o,l,m=!1;const d="key"in i;switch(d?i.key:i.keyCode){case d1("Escape",d):a.options.escKey&&(o="close");break;case d1("z",d):o="toggleZoom";break;case d1("ArrowLeft",d):l="x";break;case d1("ArrowUp",d):l="y";break;case d1("ArrowRight",d):l="x",m=!0;break;case d1("ArrowDown",d):m=!0,l="y";break;case d1("Tab",d):this._focusRoot();break}if(l){i.preventDefault();const{currSlide:v}=a;a.options.arrowKeys&&l==="x"&&a.getNumItems()>1?o=m?"next":"prev":v&&v.currZoomLevel>v.zoomLevels.fit&&(v.pan[l]+=m?-80:80,v.panTo(v.pan.x,v.pan.y))}o&&(i.preventDefault(),a[o]())}_onFocusIn(i){const{template:a}=this.pswp;a&&document!==i.target&&a!==i.target&&!a.contains(i.target)&&a.focus()}}const hj="cubic-bezier(.4,0,.22,1)";class vj{constructor(i){var a;this.props=i;const{target:o,onComplete:l,transform:m,onFinish:d=()=>{},duration:v=333,easing:h=hj}=i;this.onFinish=d;const f=m?"transform":"opacity",_=(a=i[f])!==null&&a!==void 0?a:"";this._target=o,this._onComplete=l,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{wO(o,f,v,h),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(i){i.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),RV(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const gj=12,bj=.75;class _j{constructor(i,a,o){this.velocity=i*1e3,this._dampingRatio=a||bj,this._naturalFrequency=o||gj,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(i,a){let o=0,l;a/=1e3;const m=Math.E**(-this._dampingRatio*this._naturalFrequency*a);if(this._dampingRatio===1)l=this.velocity+this._naturalFrequency*i,o=(i+l*a)*m,this.velocity=o*-this._naturalFrequency+l*m;else if(this._dampingRatio<1){l=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*i+this.velocity);const d=Math.cos(this._dampedFrequency*a),v=Math.sin(this._dampedFrequency*a);o=m*(i*d+l*v),this.velocity=o*-this._naturalFrequency*this._dampingRatio+m*(-this._dampedFrequency*i*v+this._dampedFrequency*l*d)}return o}}class Ej{constructor(i){this.props=i,this._raf=0;const{start:a,end:o,velocity:l,onUpdate:m,onComplete:d,onFinish:v=()=>{},dampingRatio:h,naturalFrequency:f}=i;this.onFinish=v;const _=new _j(l,h,f);let N=Date.now(),S=a-o;const C=()=>{this._raf&&(S=_.easeFrame(S,Date.now()-N),Math.abs(S)<1&&Math.abs(_.velocity)<50?(m(o),d&&d(),this.onFinish()):(N=Date.now(),m(S+o),this._raf=requestAnimationFrame(C)))};this._raf=requestAnimationFrame(C)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class yj{constructor(){this.activeAnimations=[]}startSpring(i){this._start(i,!0)}startTransition(i){this._start(i)}_start(i,a){const o=a?new Ej(i):new vj(i);return this.activeAnimations.push(o),o.onFinish=()=>this.stop(o),o}stop(i){i.destroy();const a=this.activeAnimations.indexOf(i);a>-1&&this.activeAnimations.splice(a,1)}stopAll(){this.activeAnimations.forEach(i=>{i.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(i=>i.props.isPan?(i.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(i=>i.props.isMainScroll?(i.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(i=>i.props.isPan)}}class Nj{constructor(i){this.pswp=i,i.events.add(i.element,"wheel",this._onWheel.bind(this))}_onWheel(i){i.preventDefault();const{currSlide:a}=this.pswp;let{deltaX:o,deltaY:l}=i;if(a&&!this.pswp.dispatch("wheel",{originalEvent:i}).defaultPrevented)if(i.ctrlKey||this.pswp.options.wheelToZoom){if(a.isZoomable()){let m=-l;i.deltaMode===1?m*=.05:m*=i.deltaMode?1:.002,m=2**m;const d=a.currZoomLevel*m;a.zoomTo(d,{x:i.clientX,y:i.clientY})}}else a.isPannable()&&(i.deltaMode===1&&(o*=18,l*=18),a.panTo(a.pan.x-o,a.pan.y-l))}}function xj(r){if(typeof r=="string")return r;if(!r||!r.isCustomSVG)return"";const i=r;let a='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return a=a.split("%d").join(i.size||32),i.outlineID&&(a+='<use class="pswp__icn-shadow" xlink:href="#'+i.outlineID+'"/>'),a+=i.inner,a+="</svg>",a}class Sj{constructor(i,a){var o;const l=a.name||a.className;let m=a.html;if(i.options[l]===!1)return;typeof i.options[l+"SVG"]=="string"&&(m=i.options[l+"SVG"]),i.dispatch("uiElementCreate",{data:a});let d="";a.isButton?(d+="pswp__button ",d+=a.className||`pswp__button--${a.name}`):d+=a.className||`pswp__${a.name}`;let v=a.isButton?a.tagName||"button":a.tagName||"div";v=v.toLowerCase();const h=yc(d,v);if(a.isButton){v==="button"&&(h.type="button");let{title:N}=a;const{ariaLabel:S}=a;typeof i.options[l+"Title"]=="string"&&(N=i.options[l+"Title"]),N&&(h.title=N);const C=S||N;C&&h.setAttribute("aria-label",C)}h.innerHTML=xj(m),a.onInit&&a.onInit(h,i),a.onClick&&(h.onclick=N=>{typeof a.onClick=="string"?i[a.onClick]():typeof a.onClick=="function"&&a.onClick(N,h,i)});const f=a.appendTo||"bar";let _=i.element;f==="bar"?(i.topBar||(i.topBar=yc("pswp__top-bar pswp__hide-on-close","div",i.scrollWrap)),_=i.topBar):(h.classList.add("pswp__hide-on-close"),f==="wrapper"&&(_=i.scrollWrap)),(o=_)===null||o===void 0||o.appendChild(i.applyFilters("uiElement",h,a))}}function IO(r,i,a){r.classList.add("pswp__button--arrow"),r.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(a?r.disabled=!(i.currIndex<i.getNumItems()-1):r.disabled=!(i.currIndex>0))})}const wj={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:IO},Cj={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:(r,i)=>{IO(r,i,!0)}},Aj={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"},Dj={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"},Tj={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:(r,i)=>{let a,o=null;const l=(v,h)=>{r.classList.toggle("pswp__preloader--"+v,h)},m=v=>{a!==v&&(a=v,l("active",v))},d=()=>{var v;if(!((v=i.currSlide)!==null&&v!==void 0&&v.content.isLoading())){m(!1),o&&(clearTimeout(o),o=null);return}o||(o=setTimeout(()=>{var h;m(!!(!((h=i.currSlide)===null||h===void 0)&&h.content.isLoading())),o=null},i.options.preloaderDelay))};i.on("change",d),i.on("loadComplete",v=>{i.currSlide===v.slide&&d()}),i.ui&&(i.ui.updatePreloaderVisibility=d)}},Oj={name:"counter",order:5,onInit:(r,i)=>{i.on("change",()=>{r.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}};function BO(r,i){r.classList.toggle("pswp--zoomed-in",i)}class kj{constructor(i){this.pswp=i,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:i}=this;this.isRegistered=!1,this.uiElementsData=[Aj,wj,Cj,Dj,Tj,Oj],i.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)}),i.on("change",()=>{var a;(a=i.element)===null||a===void 0||a.classList.toggle("pswp--one-slide",i.getNumItems()===1)}),i.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(i){this.isRegistered?this.items.push(new Sj(this.pswp,i)):this.uiElementsData.push(i)}_onZoomPanUpdate(){const{template:i,currSlide:a,options:o}=this.pswp;if(this.pswp.opener.isClosing||!i||!a)return;let{currZoomLevel:l}=a;if(this.pswp.opener.isOpen||(l=a.zoomLevels.initial),l===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=l;const m=a.zoomLevels.initial-a.zoomLevels.secondary;if(Math.abs(m)<.01||!a.isZoomable()){BO(i,!1),i.classList.remove("pswp--zoom-allowed");return}i.classList.add("pswp--zoom-allowed");const d=l===a.zoomLevels.initial?a.zoomLevels.secondary:a.zoomLevels.initial;BO(i,d<=l),(o.imageClickAction==="zoom"||o.imageClickAction==="zoom-or-close")&&i.classList.add("pswp--click-to-zoom")}}function Lj(r){const i=r.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}function Mj(r,i,a){const o=r.getBoundingClientRect(),l=o.width/i,m=o.height/a,d=l>m?l:m,v=(o.width-i*d)/2,h=(o.height-a*d)/2,f={x:o.left+v,y:o.top+h,w:i*d};return f.innerRect={w:o.width,h:o.height,x:v,y:h},f}function Ij(r,i,a){const o=a.dispatch("thumbBounds",{index:r,itemData:i,instance:a});if(o.thumbBounds)return o.thumbBounds;const{element:l}=i;let m,d;if(l&&a.options.thumbSelector!==!1){const v=a.options.thumbSelector||"img";d=l.matches(v)?l:l.querySelector(v)}return d=a.applyFilters("thumbEl",d,i,r),d&&(i.thumbCropped?m=Mj(d,i.width||i.w||0,i.height||i.h||0):m=Lj(d)),a.applyFilters("thumbBounds",m,i,r)}let Bj=class{constructor(r,i){this.type=r,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}},Pj=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(r,i,a=100){var o,l,m;this._filters[r]||(this._filters[r]=[]),(o=this._filters[r])===null||o===void 0||o.push({fn:i,priority:a}),(l=this._filters[r])===null||l===void 0||l.sort((d,v)=>d.priority-v.priority),(m=this.pswp)===null||m===void 0||m.addFilter(r,i,a)}removeFilter(r,i){this._filters[r]&&(this._filters[r]=this._filters[r].filter(a=>a.fn!==i)),this.pswp&&this.pswp.removeFilter(r,i)}applyFilters(r,...i){var a;return(a=this._filters[r])===null||a===void 0||a.forEach(o=>{i[0]=o.fn.apply(this,i)}),i[0]}on(r,i){var a,o;this._listeners[r]||(this._listeners[r]=[]),(a=this._listeners[r])===null||a===void 0||a.push(i),(o=this.pswp)===null||o===void 0||o.on(r,i)}off(r,i){var a;this._listeners[r]&&(this._listeners[r]=this._listeners[r].filter(o=>i!==o)),(a=this.pswp)===null||a===void 0||a.off(r,i)}dispatch(r,i){var a;if(this.pswp)return this.pswp.dispatch(r,i);const o=new Bj(r,i);return(a=this._listeners[r])===null||a===void 0||a.forEach(l=>{l.call(this,o)}),o}},Fj=class{constructor(r,i){if(this.element=yc("pswp__img pswp__img--placeholder",r?"img":"div",i),r){const a=this.element;a.decoding="async",a.alt="",a.src=r,a.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(r,i){this.element&&(this.element.tagName==="IMG"?(c8(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=vv(0,0,r/250)):c8(this.element,r,i))}destroy(){var r;(r=this.element)!==null&&r!==void 0&&r.parentNode&&this.element.remove(),this.element=null}},qj=class{constructor(r,i,a){this.instance=i,this.data=r,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=fd.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(r,i){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 Fj(a,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:r}).defaultPrevented||(this.isImageContent()?(this.element=yc("pswp__img","img"),this.displayedImageWidth&&this.loadImage(r)):(this.element=yc("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(r){var i,a;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:r}).defaultPrevented)return;const o=this.element;this.updateSrcsetSizes(),this.data.srcset&&(o.srcset=this.data.srcset),o.src=(i=this.data.src)!==null&&i!==void 0?i:"",o.alt=(a=this.data.alt)!==null&&a!==void 0?a:"",this.state=fd.LOADING,o.complete?this.onLoaded():(o.onload=()=>{this.onLoaded()},o.onerror=()=>{this.onError()})}setSlide(r){this.slide=r,this.hasSlide=!0,this.instance=r.pswp}onLoaded(){this.state=fd.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===fd.LOADED||this.state===fd.ERROR)&&this.removePlaceholder())}onError(){this.state=fd.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===fd.LOADING,this)}isError(){return this.state===fd.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(r,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(r,i),!this.instance.dispatch("contentResize",{content:this,width:r,height:i}).defaultPrevented&&(c8(this.element,r,i),this.isImageContent()&&!this.isError()))){const a=!this.displayedImageWidth&&r;this.displayedImageWidth=r,this.displayedImageHeight=i,a?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:r,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==fd.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const r=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!r.dataset.largestUsedSize||i>parseInt(r.dataset.largestUsedSize,10))&&(r.sizes=i+"px",r.dataset.largestUsedSize=String(i))}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 r,i;let a=yc("pswp__error-msg","div");a.innerText=(r=(i=this.instance.options)===null||i===void 0?void 0:i.errorMsg)!==null&&r!==void 0?r:"",a=this.instance.applyFilters("contentErrorElement",a,this),this.element=yc("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===fd.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const r="decode"in this.element;this.isImageContent()?r&&this.slide&&(!this.slide.isActive||CO())?(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&&!CO()?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===fd.LOADED||this.state===fd.ERROR)&&this.removePlaceholder()))}};const Uj=5;function PO(r,i,a){const o=i.createContentFromData(r,a);let l;const{options:m}=i;if(m){l=new kO(m,r,-1);let d;i.pswp?d=i.pswp.viewportSize:d=DO(m,i);const v=TO(m,d,r,a);l.update(o.width,o.height,v)}return o.lazyLoad(),l&&o.setDisplayedSize(Math.ceil(o.width*l.initial),Math.ceil(o.height*l.initial)),o}function zj(r,i){const a=i.getItemData(r);if(!i.dispatch("lazyLoadSlide",{index:r,itemData:a}).defaultPrevented)return PO(a,i,r)}class Hj{constructor(i){this.pswp=i,this.limit=Math.max(i.options.preload[0]+i.options.preload[1]+1,Uj),this._cachedItems=[]}updateLazy(i){const{pswp:a}=this;if(a.dispatch("lazyLoad").defaultPrevented)return;const{preload:o}=a.options,l=i===void 0?!0:i>=0;let m;for(m=0;m<=o[1];m++)this.loadSlideByIndex(a.currIndex+(l?m:-m));for(m=1;m<=o[0];m++)this.loadSlideByIndex(a.currIndex+(l?-m:m))}loadSlideByIndex(i){const a=this.pswp.getLoopedIndex(i);let o=this.getContentByIndex(a);o||(o=zj(a,this.pswp),o&&this.addToCache(o))}getContentBySlide(i){let a=this.getContentByIndex(i.index);return a||(a=this.pswp.createContentFromData(i.data,i.index),this.addToCache(a)),a.setSlide(i),a}addToCache(i){if(this.removeByIndex(i.index),this._cachedItems.push(i),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(i){const a=this._cachedItems.findIndex(o=>o.index===i);a!==-1&&this._cachedItems.splice(a,1)}getContentByIndex(i){return this._cachedItems.find(a=>a.index===i)}destroy(){this._cachedItems.forEach(i=>i.destroy()),this._cachedItems=[]}}let Vj=class extends Pj{getNumItems(){var r;let i=0;const a=(r=this.options)===null||r===void 0?void 0:r.dataSource;a&&"length"in a?i=a.length:a&&"gallery"in a&&(a.items||(a.items=this._getGalleryDOMElements(a.gallery)),a.items&&(i=a.items.length));const o=this.dispatch("numItems",{dataSource:a,numItems:i});return this.applyFilters("numItems",o.numItems,a)}createContentFromData(r,i){return new qj(r,this,i)}getItemData(r){var i;const a=(i=this.options)===null||i===void 0?void 0:i.dataSource;let o={};Array.isArray(a)?o=a[r]:a&&"gallery"in a&&(a.items||(a.items=this._getGalleryDOMElements(a.gallery)),o=a.items[r]);let l=o;l instanceof Element&&(l=this._domElementToItemData(l));const m=this.dispatch("itemData",{itemData:l||{},index:r});return this.applyFilters("itemData",m.itemData,r)}_getGalleryDOMElements(r){var i,a;return(i=this.options)!==null&&i!==void 0&&i.children||(a=this.options)!==null&&a!==void 0&&a.childSelector?$V(this.options.children,this.options.childSelector,r)||[]:[r]}_domElementToItemData(r){const i={element:r},a=r.tagName==="A"?r:r.querySelector("a");if(a){i.src=a.dataset.pswpSrc||a.href,a.dataset.pswpSrcset&&(i.srcset=a.dataset.pswpSrcset),i.width=a.dataset.pswpWidth?parseInt(a.dataset.pswpWidth,10):0,i.height=a.dataset.pswpHeight?parseInt(a.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,a.dataset.pswpType&&(i.type=a.dataset.pswpType);const l=r.querySelector("img");if(l){var o;i.msrc=l.currentSrc||l.src,i.alt=(o=l.getAttribute("alt"))!==null&&o!==void 0?o:""}(a.dataset.pswpCropped||a.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,r,a)}lazyLoadData(r,i){return PO(r,this,i)}};const bv=.003;class jj{constructor(i){this.pswp=i,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),i.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const i=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,i&&i.currZoomLevel*i.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 i=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,i&&i.zoomLevels.initial*i.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:i}=this,a=this.pswp.currSlide,{options:o}=i;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&&i._initialThumbBounds?this._thumbBounds=i._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=a==null?void 0:a.getPlaceholderElement(),i.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&(a==null?void 0:a.content.usePlaceholder())&&(!this.isClosing||!i.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&a&&(a.zoomAndPanToInitial(),a.applyCurrentZoomPan());else{var l;this._animateRootOpacity=(l=o.showHideOpacity)!==null&&l!==void 0?l:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>bv,this._opacityElement=this._animateRootOpacity?i.element:i.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(i.element&&(i.element.style.opacity=String(bv)),i.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var m;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(m=this.pswp.currSlide)===null||m===void 0?void 0:m.holderElement,i.container&&(i.container.style.overflow="hidden",i.container.style.width=i.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(i.element&&(i.element.style.opacity=String(bv)),i.applyBgOpacity(1)):(this._animateBgOpacity&&i.bg&&(i.bg.style.opacity=String(bv)),i.element&&(i.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(bv)))):this.isClosing&&(i.mainScroll.itemHolders[0]&&(i.mainScroll.itemHolders[0].el.style.display="none"),i.mainScroll.itemHolders[2]&&(i.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&i.mainScroll.x!==0&&(i.mainScroll.resetPosition(),i.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(i=>{let a=!1,o=!0;GV(this._placeholder).finally(()=>{a=!0,o||i(!0)}),setTimeout(()=>{o=!1,a&&i(!0)},50),setTimeout(i,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var i,a;(i=this.pswp.element)===null||i===void 0||i.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:i}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,i.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),i.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)i.destroy();else if(this.isOpen){var a;this._animateZoom&&i.container&&(i.container.style.overflow="visible",i.container.style.width="100%"),(a=i.currSlide)===null||a===void 0||a.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:i}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),i.currSlide&&(i.currSlide.zoomAndPanToInitial(),this._animateTo(i.currSlide.container,"transform",i.currSlide.getCurrentTransform()))),this._animateBgOpacity&&i.bg&&this._animateTo(i.bg,"opacity",String(i.options.bgOpacity)),this._animateRootOpacity&&i.element&&this._animateTo(i.element,"opacity","1")}_animateToClosedState(){const{pswp:i}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&i.bgOpacity>.01&&i.bg&&this._animateTo(i.bg,"opacity","0"),this._animateRootOpacity&&i.element&&this._animateTo(i.element,"opacity","0")}_setClosedStateZoomPan(i){if(!this._thumbBounds)return;const{pswp:a}=this,{innerRect:o}=this._thumbBounds,{currSlide:l,viewportSize:m}=a;if(this._croppedZoom&&o&&this._cropContainer1&&this._cropContainer2){const d=-m.x+(this._thumbBounds.x-o.x)+o.w,v=-m.y+(this._thumbBounds.y-o.y)+o.h,h=m.x-o.w,f=m.y-o.h;i?(this._animateTo(this._cropContainer1,"transform",vv(d,v)),this._animateTo(this._cropContainer2,"transform",vv(h,f))):(c1(this._cropContainer1,d,v),c1(this._cropContainer2,h,f))}l&&(To(l.pan,o||this._thumbBounds),l.currZoomLevel=this._thumbBounds.w/l.width,i?this._animateTo(l.container,"transform",l.getCurrentTransform()):l.applyCurrentZoomPan())}_animateTo(i,a,o){if(!this._duration){i.style[a]=o;return}const{animations:l}=this.pswp,m={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{l.activeAnimations.length||this._onAnimationComplete()},target:i};m[a]=o,l.startTransition(m)}}const Rj={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 Gj extends Vj{constructor(i){super(),this.options=this._prepareOptions(i||{}),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 WV,this.animations=new yj,this.mainScroll=new mj(this),this.gestures=new cj(this),this.opener=new jj(this),this.keyboard=new pj(this),this.contentLoader=new Hj(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let i="pswp--open";return this.gestures.supportsTouch&&(i+=" pswp--touch"),this.options.mainClass&&(i+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+i),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Nj(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(i){const a=this.getNumItems();return this.options.loop&&(i>a-1&&(i-=a),i<0&&(i+=a)),hv(i,0,a-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(i=>{var a;(a=i.slide)===null||a===void 0||a.appendHeavy()})}goTo(i){this.mainScroll.moveIndexBy(this.getLoopedIndex(i)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...i){var a;(a=this.currSlide)===null||a===void 0||a.zoomTo(...i)}toggleZoom(){var i;(i=this.currSlide)===null||i===void 0||i.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var i;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),(i=this.element)===null||i===void 0||i.remove(),this.mainScroll.itemHolders.forEach(a=>{var o;(o=a.slide)===null||o===void 0||o.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(i){this.contentLoader.removeByIndex(i),this.mainScroll.itemHolders.forEach((a,o)=>{var l,m;let d=((l=(m=this.currSlide)===null||m===void 0?void 0:m.index)!==null&&l!==void 0?l:0)-1+o;if(this.canLoop()&&(d=this.getLoopedIndex(d)),d===i&&(this.setContent(a,i,!0),o===1)){var v;this.currSlide=a.slide,(v=a.slide)===null||v===void 0||v.setIsActive(!0)}}),this.dispatch("change")}setContent(i,a,o){if(this.canLoop()&&(a=this.getLoopedIndex(a)),i.slide){if(i.slide.index===a&&!o)return;i.slide.destroy(),i.slide=void 0}if(!this.canLoop()&&(a<0||a>=this.getNumItems()))return;const l=this.getItemData(a);i.slide=new YV(l,a,this),a===this.currIndex&&(this.currSlide=i.slide),i.slide.append(i.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(i){if(this.isDestroying)return;const a=DO(this.options,this);!i&&pv(a,this._prevViewportSize)||(To(this._prevViewportSize,a),this.dispatch("beforeResize"),To(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(i){this.bgOpacity=Math.max(i,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var i;this.hasMouse=!0,(i=this.element)===null||i===void 0||i.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(i,a){this.offset.x=i,this.offset.y=a,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=yc("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=yc("pswp__bg","div",this.element),this.scrollWrap=yc("pswp__scroll-wrap","section",this.element),this.container=yc("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 kj(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return Ij(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(i){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(i.showHideAnimationType="none",i.zoomAnimationDuration=0),{...Rj,...i}}}/*!
|