1import{aC as I,o as F,a2 as se,r as h,ab as ce,a4 as ue,dE as de,w as pe,dF as ve,C as m,D as k,E as d,G as Q,H as Z,aa as N,N as O,F as S,K as ee,I as te,u as D,ao as fe,a1 as H,J as P,aA as he,O as oe,ap as ge,ag as ne,dG as be,j as we,n as X,z as me}from"./index-CkNvE7Rx.js";import{A as ye}from"./a11y-DA8WzNVw.js";import{A as _e}from"./ArticleHtmlRenderer-CD5Yuw6R.js";import"./classes-to-selector-Cf4VisjH.js";import"./legacy-style-scoping-DLBkiVNm.js";import"./useListAdSlots-D0tFd45P.js";const Te=5;function Ce(l){const c=h(!1),n=h(!1),g=h(!1),p=h(0),b=h(0);I(l,"pointerdown",u=>{var s;u.button===0&&(c.value=!0,p.value=u.clientX,b.value=((s=l.value)==null?void 0:s.scrollLeft)??0,n.value=!1)}),I(l,"pointermove",u=>{const s=l.value;if(!s||!c.value)return;const v=u.clientX-p.value;!n.value&&Math.abs(v)<Te||(n.value=!0,s.scrollLeft=b.value-v)}),I(l,"pointerup",()=>{n.value&&(g.value=!0),c.value=!1,n.value=!1}),I(l,"pointercancel",()=>{c.value=!1,n.value=!1});const y=()=>{c.value=!1,n.value=!1};F(()=>window.addEventListener("pointerup",y)),se(()=>window.removeEventListener("pointerup",y)),I(l,"click",u=>{g.value&&(u.stopPropagation(),u.preventDefault(),g.value=!1)},{capture:!0})}const Ee=5,ke=12,Y=1,Se=l=>{const{overflowX:c}=window.getComputedStyle(l);return c!=="auto"&&c!=="scroll"?!1:l.scrollWidth>l.clientWidth+Y},He=(l,c)=>{let n=l instanceof HTMLElement?l:null;for(;n&&n!==c;){if(Se(n))return n;n=n.parentElement}return null},Le=(l,c)=>{const n=l.scrollWidth-l.clientWidth;return c<0?l.scrollLeft<n-Y:l.scrollLeft>Y};function xe(l,c){let n=null,g=0,p=0,b=!1,y=!1,u=null;const s=()=>{const r=c.value;y&&r&&(r.allowTouchMove=!0),y=!1,n=null,b=!1,u=null};I(l,"pointerdown",r=>{const T=l.value,C=c.value;y&&r.isPrimary===!1||(s(),!(!T||!C||r.pointerType==="mouse")&&(n=He(r.target,T),n&&(g=r.clientX,p=r.clientY,b=!1,y=!0,u=r.pointerId,C.allowTouchMove=!1)))},{capture:!0});const v=r=>{if(!n||b||u!==null&&r.pointerId!==u)return;const T=r.clientX-g,C=r.clientY-p;if(Math.abs(T)<Ee){Math.abs(C)>=ke&&(b=!0);return}Math.abs(C)>Math.abs(T)||(b=!0,Le(n,T)||s())},f=r=>{u!==null&&r.pointerId!==u||s()};F(()=>{document.addEventListener("pointermove",v,{capture:!0}),document.addEventListener("pointerup",f,{capture:!0})}),se(()=>{document.removeEventListener("pointermove",v,{capture:!0}),document.removeEventListener("pointerup",f,{capture:!0})})}const De={class:"slide-tabs pt-8"},Ie=["aria-label"],$e=["aria-selected","tabindex","onClick","onKeydown"],Ae={class:"carousel-container"},Me={class:"carousel-grid"},ze={class:"info-header mb-4"},Be={key:0,class:"overlay"},Ne={key:0,class:"toggle-container"},Oe=["onClick"],Pe={key:0,class:"nav-controls"},Re=["aria-label"],Ue=["aria-label"],Xe=["disabled","aria-label"],Ye=["disabled","aria-label"],M=384,Fe=ce({__name:"InfoCarousel",props:{siteSection:{}},setup(l){var J;const n=h((((J=l.siteSection.config)==null?void 0:J.slides)??[]).filter(e=>!e.deleted&&e.published).map(e=>({...e,showToggle:!1}))),g=h(null),p=be(),b=ue("headerOffset",0),y=de("(pointer: coarse)"),u=we(()=>y.value?"":".info-details, .info-header"),s=h(!1),v=h(null),f=h(0);xe(g,v);const r=e=>{v.value=e,f.value=e.realIndex},T=e=>{const t=f.value;f.value=e.realIndex;const i=g.value,o=p.value[t],a=p.value[e.realIndex];if(!i||!o||!a)return;const w=a.offsetHeight-o.offsetHeight;if(w>=0)return;const $=40,A=i.getBoundingClientRect().bottom+w;if(A>=window.innerHeight-$)return;const L=window.scrollY,z=Math.max(0,L+A-(window.innerHeight-$)),U=350,_=performance.now(),E=B=>{const x=Math.min((B-_)/U,1),re=x<.5?2*x*x:-1+(4-2*x)*x;window.scrollTo(0,L+(z-L)*re),x<1&&requestAnimationFrame(E)};requestAnimationFrame(E)},C=e=>{var t;return(t=v.value)==null?void 0:t.slideToLoop(e)},G=()=>{var e;return(e=v.value)==null?void 0:e.slideNext()},W=()=>{var e;return(e=v.value)==null?void 0:e.slidePrev()},R=h(null),V=[],ae=(e,t)=>{e&&(V[t]=e)};Ce(R),pe(f,async e=>{await X();const t=R.value,i=t==null?void 0:t.children[e];if(!t||!i)return;const{top:o,bottom:a}=t.getBoundingClientRect();a<0||o>window.innerHeight||t.scrollTo({left:i.offsetLeft-t.clientWidth/2+i.offsetWidth/2,behavior:"smooth"})});const le=(e,t)=>
1{var a;const i=n.value.length-1;let o=t;switch(e.key){case"ArrowRight":o=t<i?t+1:0,e.preventDefault();break;case"ArrowLeft":o=t>0?t-1:i,e.preventDefault();break;case"Home":o=0,e.preventDefault();break;case"End":o=i,e.preventDefault();break;default:return}(a=V[o])==null||a.focus(),C(o)},ie=e=>{var t;return((t=e.icon)==null?void 0:t.value)??"information"},q=h(!1),K=e=>{const t=p.value[e],i=v.value,o=!s.value;if(p.value.forEach(_=>{if(_===t)return;const E=_;E.style.transition="none",E.style.height=o?`${M}px`:"",E.getBoundingClientRect(),E.style.transition=""}),!t||!i){s.value=o;return}const a=g.value;if(!a){s.value=o;return}const w=t.style.height;t.style.height="";const $=t.scrollHeight;t.style.height=w;const A=o?$:M,L=o?M:$,z=a.offsetHeight,U=z+(L-A);a.style.transition="none",a.style.height=`${z}px`,t.style.transition="none",t.style.height=`${A}px`,o||(i.wrapperEl.style.height="auto"),t.getBoundingClientRect(),requestAnimationFrame(()=>{const _="height 0.35s ease";if(a.style.transition=_,a.style.height=`${U}px`,t.style.transition=_,t.style.height=`${L}px`,o){const B=t.getBoundingClientRect().top+window.scrollY+M-window.innerHeight+120;B<window.scrollY&&window.scrollTo({top:Math.max(0,B),behavior:"smooth"})}}),t.addEventListener("transitionend",_=>{_.target===t&&(s.value=o,X(()=>{o||(t.style.height=""),t.style.transition="",a.style.height="",a.style.transition="",i.updateAutoHeight(0)}))},{once:!0})},j=e=>{const t=p.value.indexOf(e);t!==-1&&(e.scrollHeight>window.innerHeight-80&&(q.value=!0),!n.value[t].showToggle&&e.scrollHeight>M&&(s.value=!0,n.value[t].showToggle=!0,X(()=>{var i;return(i=v.value)==null?void 0:i.updateAutoHeight(0)})))};return ve(p,e=>{e.forEach(t=>j(t.target))}),F(()=>{p.value.forEach(e=>{e.querySelectorAll("img, iframe").forEach(t=>{t.addEventListener("load",()=>j(e),{once:!0})})})}),(e,t)=>{var i;return m(),k("div",{class:"information-container",style:ne(D(b)>0?{paddingTop:D(b)+"px"}:{})},[d("div",De,[d("ul",{ref_key:"pillsEl",ref:R,class:"pills-scroller",role:"tablist","aria-label":e.$t("info_carousel.tabs_label")},[(m(!0),k(Q,null,Z(n.value,(o,a)=>(m(),k("li",{key:o.id,role:"presentation"},[d("button",{ref_for:!0,ref:w=>ae(w,a),type:"button",class:N(["pill",{active:f.value===a}]),role:"tab","aria-selected":f.value===a,tabindex:f.value===a?0:-1,onClick:w=>C(a),onKeydown:w=>le(w,a)},O(o.heading),43,$e)]))),128))],8,Ie)]),d("div",Ae,[d("div",Me,[d("div",{ref_key:"swiperClipEl",ref:g,class:"swiper-clip"},[S(D(ge),{modules:[D(ye)],"auto-height":!0,"allow-touch-move":!0,loop:!0,a11y:{enabled:!0},"no-swiping-selector":u.value,class:N(["carousel-swiper",{"has-oversized-slide":q.value&&!s.value}]),onSwiper:r,onSlideChange:T},{default:ee(()=>[(m(!0),k(Q,null,Z(n.value,(o,a)=>(m(),te(D(fe),{key:o.id,class:"carousel-slide pt-10 pb-10"},{default:ee(()=>[d("div",ze,[S(H,{class:"text-primary-base mr-2 flex-shrink-0 block",icon:ie(o),size:30},null,8,["icon"]),d("span",null,O(o.heading),1)]),d("div",{ref_for:!0,ref:D(p).set,class:N(["info-details",{"collapsed-content":o.showToggle&&s.value}])},[o.showToggle&&s.value?(m(),k("div",Be)):P("",!0),S(_e,{id:`slide-${o.id}`,body:o.body,variant:"section"},null,8,["id","body"])],2),o.showToggle||!s.value?(m(),k("div",Ne,[d("button",{type:"button",class:"toggle-button",onClick:he(w=>K(a),["stop"])},[(m(),te(H,{key:s.value?"arrowDown":"arrowUp",icon:s.value?"arrowDown":"arrowUp",size:15},null,8,["icon"])),oe(" "+O(s.value?e.$t("site.show_more"):e.$t("site.show_less")),1)],8,Oe)])):P("",!0)]),_:2},1024))),128))]),_:1},8,["modules","no-swiping-selector","class"])],512),n.value.length>1?(m(),k("div",Pe,[d("button",{class:"nav-btn nav-btn--prev",type:"button","aria-label":e.$t("info_carousel.previous_tab"),onClick:W},[S(H,{icon:"caretUpThin",class:"nav-icon nav-icon--prev",size:32})],8,Re),d("button",{class:"nav-btn nav-btn--next",type:"button","aria-label":e.$t("info_carousel.next_tab"),onClick:G},[S(H,{icon:"caretUpThin",class:"nav-icon nav-icon--next",size:32})],8,Ue)])):P("",!0)]),d("div",{class:N(["mobile-toolbar",{"is-sticky":!s.value}])},[d("button",{class:"toolbar-btn",type:"button",disabled:n.value.length<=1,"aria-label":e.$t("info_carousel.previous_tab"),onClick:W},[S(H,{icon:"caretUpThin",class:"nav-icon nav-icon--prev",size:16})],8,Xe),(i=n.value[f.value])!=null&&i.showToggle||!s.value?(m(),k("button",{key:0,class:"toolbar-btn toolbar-btn--toggle",type:"button",onClick:t[0]||(t[0]=o=>K(f.value))},[S(H,{icon:"caretUpThin",size:12,style:ne({transform:s.value?"rotate(180deg)":"none"})},null,8,["style"]),oe(" "+O(s.value?e.$t("site.show_more"):e.$t("site.show_less")),1)])):P("",!0),d("button",{class:"toolbar-btn",type:"button",disabled:n.value.length<=1,"aria-label":e.$t("info_carousel.next_tab"),onClick:G},[S(H,{icon:"caretUpThin",class:"nav-icon nav-icon--next",size:16})],8,Ye)],2)])],4)}}}),Je=me(Fe,[["__scopeId","data-v-95b3a3c6"]]);export{Je as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.