1import{_ as q}from"./BWA4c1Hg.js";import{r as d,f as k,S as w,b as f,g as b,o as v,i as s,d as p,F as _,A as C,n as h,t as B,E as x}from"./Cl1E8ht_.js";import{a as M}from"./DFHKiizX.js";import"./DeMPSf6W.js";import"./B3fy5JdC.js";import"./DusMckiN.js";const S={class:"faq-v2-inner"},V={class:"faq-v2-title"},A={class:"faq-v2-items"},R=["onClick"],E={class:"faq-v2-question"},j={__name:"FaqV2",props:{showModule:{type:Boolean,default:!0},fillColor:{type:String,default:"transparent"},title:{type:Array,default:()=>[]},hideInMobile:{type:Boolean,default:!1},items:{type:Array,default:()=>[]}},setup(r){const i=d([]),u=d(0),o=d(null),m=(t,n)=>{let e=0;return t.querySelectorAll(":scope > *").forEach(l=>e+=l.getBoundingClientRect().height),e=Math.ceil(e+40),n&&(t.style.height=`${e}px`),e},g=t=>{const n=i.value.indexOf(t);n>-1?i.value.splice(n,1):i.value.push(t),y(t)},y=t=>{if(!o.value)return;const e=o.value.querySelectorAll(".faq-v2-item-content")[t];if(!e)return;const a=i.value.includes(t);let l=m(e);!a&&e.classList.remove("show"),M(e,{height:()=>a?[0,l]:[l,0],easing:"easeOutCirc",duration:400,onComplete:()=>a&&e.classList.add("show")})};let c=null;return k(()=>{o.value&&(u.value=o.value?.getBoundingClientRect?.().width,c=new ResizeObserver(()=>{if(typeof document>"u")return;const t=o.value?.getBoundingClientRect?.().width;if(t===u.value)return;const n=o.value?.querySelectorAll(".faq-v2-item-content");n.length!==0&&(n.forEach((e,a)=>i.value.includes(a)&&m(e,!0)),u.value=t)}),c.observe(o.value))}),w(()=>{c&&(c.disconnect(),c=null)}),(t,n)=>{const e=q;return r.showModule?(v(),f("div",{key:0,"data-module":"FAQ V2",class:h(["faq-v2",{"hide-in-mobile":r.hideInMobile}]),style:x({backgroundColor:r.fillColor||"transparent"}),ref_key:"faqV2Ref",ref:o},[s("div",S,[s("div",V,[p(e,{simple:!0,blocks:r.title},null,8,["blocks"])]),s("div",A,[(v(!0),f(_,null,C(r.items,(a,l)=>(v(),f("div",{key:a._key||l,class:h(["faq-v2-item",{expanded:i.value.includes(l)}])},[s("button",{class:"faq-v2-item-header",onClick:z=>g(l)},[s("span",E,B(a.question),1),s("div",{class:h(["faq-v2-chevron",{expanded:i.value.includes(l)}])},[...n[0]||(n[0]=[s("svg",{width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("rect",{class:"icon-background",y:"0.697266",width:"32",height:"32",rx:"16"}),s("path",{class:"icon-horizontal",d:"M10.5 16.6973H21.5","stroke-linecap":"round","stroke-linejoin":"round"}),s("path",{class:"icon-vertical",d:"M16 11.1973V22.1973","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],8,R),s("div",{class:"faq-v2-item-content",ref_for:!0,ref:"content"},[p(e,{blocks:a.answer},null,8,["blocks"])],512)],2))),128))])])],6)):b("",!0)}}};export{j 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.