1import{q as t,j as o,b as e,I as l,r as n,d as s}from"./index-DHmRXmSA.js";import{a as i,r,C as a}from"./vendor-DF2uEoBV.js";import"./main-C-8GvMo4.js";import{l as d}from"./link-parser-style-_MPCd2ZU.js";const u=o2=>{const{contentModel:e2,modelInternalName:l2,blog_data:n2,headingTextColor:s2}=i.propsParser(o2),[d2,u2]=r.useState([]),[c2,m]=r.useState(!1),v={color:t(s2)},h=()=>{let t2="";return n2!=null&&n2.category_ids.length?t2=`categories_exp_rel:("${n2==null?void 0:n2.category_ids.split(",").join('" OR "')}")`:n2!=null&&n2.author_ids.length?t2=`author_exp_rel:("${n2==null?void 0:n2.author_ids.split(",").join('" OR "')}")`:n2!=null&&n2.posts.length&&(t2=`content_model_data_id:("${n2==null?void 0:n2.posts.split(",").join('","')}")`),t2},g=async()=>{var t2;try{const o3=await a.searchContentModelRecordsByFieldKeyValueGET((()=>{var t3,o4,e3;let l3={modelInternalName:"posts",fieldsToQuery:"*",relationField:"categories_exp_rel,author_exp_rel",relationFieldDataToQuery:"page_slug,page_slug_esi,title",sortBy:"modified_at",orderBy:"asc",contentDataSortBy:"modified_at",skip:"0",limit:n2!=null&&n2.limit?n2==null?void 0:n2.limit:4};return l3=n2!=null&&n2.show_featured_blogs?{...l3,fieldKey:"set_as_a_featured_ebi",fieldValue:"true"}:{...l3,fieldKey:"id",fieldValue:"*"},((t3=n2==null?void 0:n2.author_ids)!=null&&t3.length||(o4=n2==null?void 0:n2.category_ids)!=null&&o4.length||(e3=n2==null?void 0:n2.posts)!=null&&e3.length)&&(l3={...l3,filter:`${h()}`}),l3})());(o3==null?void 0:o3.Status)==="success"&&u2((t2=o3==null?void 0:o3.Data)==null?void 0:t2.items)}catch(o3){console.error(o3)}m(!1)};return r.useEffect((()=>{n2!=null&&n2.limit&&(u2([]),m(!0),g())}),[n2==null?void 0:n2.limit,n2==null?void 0:n2.author_ids,n2==null?void 0:n2.category_ids,n2==null?void 0:n2.posts,n2==null?void 0:n2.show_featured_blogs]),{postData:d2,isLoading:c2,contentModel:e2,modelInternalName:l2,title:n2==null?void 0:n2.title,heading_style:v}},c=t2=>{const{id:r2,buttonText:a2,buttonLink:c2,buttonColor:m,buttonHoverColor:v,buttonTextColor:h,buttonTextHoverColor:g,headingSize:b,headingTag:x,marginBottom:p,headingFontWeight:_,scrollableDiv:j,scrollableId:y}=i.propsParser(t2),{postData:f,isLoading:C,title:N,heading_style:T}=u(t2),{WIDGET_CHECK_TRUE:$}=s,w=`${x}`;return o.jsxs(o.Fragment,{children:[!C&&!(f!=null&&f.length)&&o.jsx("div",{className:"py-10",children:o.jsx("h4",{className:"text-3xl font-secondary text-center",children:"Please select a record"})}),C&&!(f!=null&&f.length)&&o.jsx(o.Fragment,{}),!C&&(f!=null&&f.length)?o.jsxs(o.Fragment,{children:[o.jsx("style",{children:`#${r2} .button.hover_button:hover { 2 background-color: var(--button-hover-bg-color) !important; 3 color: var(--button-hover-color) !important; 4 } 5 #${r2} .button:hover svg{ 6 stroke: var(--button-hover-color) !important; 7 } 8 #${r2} .button.hover_button { 9 background-color: var(--button-bg-color) !important; 10 color: var(--button-color) !important; 11 } 12 #${r2} .button svg{ 13 stroke: var(--button-color) !important; 14 } 15 `}),o.jsx("section",{id:y,className:`${j===$?"scrollable-div":""} pt-12 md:pt-24 3xl:pt-section-gap insights-main mb-12 md:mb-24 3xl:${p}`,children:o.jsxs("div",{className:"container",children:[o.jsxs("div",{className:"flex items-center justify-between section-head mb-8 last:mb-0",children:[N&&o.jsx(w,{className:`text-3.5xl lg:text-4.5xl 3xl:${b} ${_}`,style:T,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:N}}),a2&&c2&&window.matchMedia("(min-width:768px)").matches&&o.jsx("div",{className:"basis-full lg:basis-6/12 first:basis-full flex justify-end",children:o.jsxs(e,{to:c2,style:d({buttonHoverColor:v,buttonTextHoverColor:g,buttonColor:m,buttonTextColor:h}),className:"button-secondary button hover_button",children:[a2,o.jsx("i",{className:"icon ml-2",children:o.jsx(l,{})})]})})]}),o.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 lg:gap-16 items-center",children:f==null?void 0:f.map(((t3,e2)=>o.jsx(n,{blogItemData:t3},e2)))}),window.matchMedia("(max-width:767px)").matches&&o.jsx("div",{className:"mt-8",children:a2&&c2&&o.jsxs(e,{to:c2,style:d({buttonHoverColor:v,buttonTextHoverColor:g,buttonColor:m,buttonTextColor:h}),className:"button-secondary button hover_button",children:[a2,o.jsx("i",{className:"icon ml-2",children:o.jsx(l,{})})]})})]})})]}):o.jsx(o.Fragment,{})]})};export{c 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.