1import{C as N,I as p,Nt as c,X as h,b as v,et as q,f as _,ft as f,g as l,h as g,i as y,it as L,m as k,p as B,q as i,rn as A,tn as H,x as F,y as P}from"./runtime-core.esm-bundler-htIEpODY.js";import{t as C}from"./isLegacyUrl-Dj6GGKyH.js";import{t as I}from"./TextLink-C9BqyMFI.js";import{F as w,Z as Q}from"#entry";import{t as S}from"./TextParagraph-DOY9v5So.js";import{t as $}from"./Accordion-By4V8d-s.js";import{t as z}from"./TextHeading-B752OV4a.js";var V={class:"text-left"},j=N({__name:"MagnoliaAccordion",props:{heading:{},headingTag:{},itemHeadingTag:{},items:{},isInverted:{type:Boolean,default:!1},hasFaqMicrodata:{type:Boolean}},setup(E){const o=E;L();const x=_(()=>{if(!o.items?.["@nodes"]?.length)return null;const e=o.items["@nodes"].map(s=>{const a=o.items?.[s];if(!a?.heading)return null;const t=M(a);return{"@type":"Question",name:a.heading,acceptedAnswer:{"@type":"Answer",text:t}}}).filter(Boolean);return e.length?JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:e},null,2):null}),T=_(()=>{if(!o.items?.["@nodes"])return{headings:[],content:[],links:[]};const e=[],s=[];return o.items["@nodes"].forEach(a=>{const t=o.items?.[a];if(t?.heading){e.push({title:t.heading});const u=[];
1t.content?.["@nodes"]&&t.content["@nodes"].forEach(d=>{const n=t.content[d];n?.text&&u.push({heading:n.heading,text:n.text})});const r=[];t.links?.["@nodes"]&&t.links["@nodes"].forEach(d=>{const n=t.links[d];n?.linkText&&n?.url&&r.push({linkText:n.linkText,url:n.url,noFollow:n.noFollow||!1})}),s.push({heading:t.heading,contentItems:u,links:r})}}),{headings:e,content:s}});function m(e){return e.replaceAll(/<[^>]*>/g,"")}function M(e){const s=[];return e.content?.["@nodes"]&&e.content["@nodes"].forEach(a=>{const t=e.content[a];t?.text&&(t.heading&&s.push(m(t.heading)),s.push(m(t.text)))}),e.links?.["@nodes"]?.length&&e.links["@nodes"].forEach(a=>{const t=e.links[a];t?.linkText&&t?.url&&s.push(`${m(t.linkText)}: ${t.url}`)}),s.join(" ")}return Q(()=>x.value?{script:[{type:"application/ld+json",innerHTML:x.value,key:"faq-schema-ld"}]}:{}),(e,s)=>{const a=z,t=S,u=I;return i(),l(y,null,[e.heading&&e.headingTag?(i(),k(a,{key:0,title:e.heading,tag:e.headingTag,inverted:e.isInverted,bold:!0,class:"ml:text-h-md pb-8 lg:pb-10"},null,8,["title","tag","inverted"])):g("",!0),F($,p({"header-items":c(T).headings,tag:e.headingTag,"is-inverted":e.isInverted},e.hasFaqMicrodata?{itemscope:!0,itemprop:"mainEntity",itemtype:"https://schema.org/Question"}:{}),P({_:2},[h(c(T).content,(r,d)=>({name:`content-${d}`,fn:f(()=>[(i(!0),l(y,null,h(r.contentItems,(n,b)=>(i(),l("div",{key:`${n.heading||"heading"}-${b}`,class:"pb-6 lg:pb-8"},[n.heading?(i(),k(q(e.itemHeadingTag),p({key:0,ref_for:!0},e.hasFaqMicrodata?{itemscope:!0,itemprop:"mainEntity",itemtype:"https://schema.org/Question"}:{},{class:"text-left pb-2 text-t-sm ml:text-t-md font-medium"}),{default:f(()=>[v(A(n.heading),1)]),_:2},1040)):g("",!0),n.text?(i(),k(t,p({key:1,text:n.text,inverted:e.isInverted,"is-paragraph":!1,ref_for:!0},e.hasFaqMicrodata?{itemscope:!0,itemprop:"mainEntity",itemtype:"https://schema.org/Answer"}:{}),null,16,["text","inverted"])):g("",!0)]))),128)),r.links.length?(i(),l("div",H(p({key:0},e.hasFaqMicrodata?{itemscope:!0,itemtype:"https://schema.org/FAQPage"}:{})),[B("ul",V,[(i(!0),l(y,null,h(r.links,n=>(i(),l("li",{key:n.url},[F(u,{to:n.url,icon:{name:"arrow-right",position:"right"},rel:n.noFollow?"nofollow":void 0,external:("isLegacyUrl"in e?e.isLegacyUrl:c(C))(n.url),"color-mode":"heavy",sizes:{xs:c(w).MD,ml:c(w).LG},"in-list":!0,class:"pb-2"},{default:f(()=>[v(A(n.linkText),1)]),_:2},1032,["to","rel","external","sizes"])]))),128))])],16)):g("",!0)])}))]),1040,["header-items","tag","is-inverted"])],64)}}}),K=Object.assign(j,{__name:"MagnoliaAccordion"});export{K 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.