import{b8 as K,b9 as X,j as e,a3 as Pe,aI as rt,x as ce,q as $e,aF as lt,e as oe,d9 as ct,B as W,cV as ot,cc as it,da as dt,s as Ae,db as ut,bD as ve,dc as _t,dd as mt,cd as pt,r as s,T as Fe,w as Ee,de as ft,y as Le,g as ht,bb as gt,X as Me,ab as bt,df as te,c9 as je,dg as ne,dh as R,d4 as De,d0 as ze,a as Ct,af as vt,aB as jt,bA as xt,an as se,h as St,di as wt,b5 as yt,aC as Nt,dj as It,dk as Tt,ae as kt,cb as Bt}from"./index-BbiZcFRx.js";import{A as xe,P as Pt}from"./index-CdgVLRmz.js";import{I as $t}from"./index-C-R34FNl.js";import{I as At}from"./index-m66w0red.js";import{u as Ft}from"./useWindowSize-C66I80Fn.js";import{d as Se}from"./ExpandMore-DzP0_5R5.js";import{C as we}from"./index-Che0OddO.js";import{A as ye,a as Ne,b as Ie,S as Te,c as Et}from"./index-DQIndfFo.js";import{G as Lt}from"./getTrustedformCertURL-D1EGlseA.js";import{p as Mt}from"./googleTag-De5UQA20.js";import"./index-BVq_teg5.js";var ie={},Dt=X;Object.defineProperty(ie,"__esModule",{value:!0});var Re=ie.default=void 0,zt=Dt(K()),Rt=e;Re=ie.default=(0,zt.default)((0,Rt.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var de={},Ot=X;Object.defineProperty(de,"__esModule",{value:!0});var U=de.default=void 0,qt=Ot(K()),Vt=e;U=de.default=(0,qt.default)((0,Vt.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const Gt="_getStartedBanner_g5xi3_88",Ht="_title_g5xi3_101",Wt="_inverseButton_g5xi3_108",Ut="_content_g5xi3_112",Kt="_responsiveImage_g5xi3_135",H={getStartedBanner:Gt,title:Ht,inverseButton:Wt,content:Ut,responsiveImage:Kt},Xt=r=>rt(r),Yt=({buttonLabel:r,className:i="",onClick:u,title:h})=>e.jsx("div",{className:`${H.getStartedBanner} ${i}`,children:e.jsxs("div",{className:H.content,children:[e.jsx(Pe,{className:H.title,text:h}),e.jsx($t,{className:H.inverseButton,label:r,onClick:Xt(u)})]})}),Jt="Learning Center",Qt="Health and life insurance can be stressful! But we have resources available to help you navigate and find the best coverage for you here in our Learning Center.",Zt="Know the Basics",en="Use our simple introductions to help you understand the coverage options available to you.",tn="_bannerBlock_17tje_88",nn="_content_17tje_97",sn="_titleSection_17tje_102",an="_title1_17tje_111",rn="_description1_17tje_115",ln="_box_17tje_119",cn="_medicareContainer_17tje_129",on="_finalExpenseContainer_17tje_133",dn="_backgroundOverlay_17tje_137",un="_button_17tje_146",_n="_tabSection_17tje_159",mn="_bannerContent_17tje_167",m={bannerBlock:tn,content:nn,titleSection:sn,title1:an,description1:rn,box:ln,medicareContainer:cn,finalExpenseContainer:on,backgroundOverlay:dn,button:un,tabSection:_n,bannerContent:mn},pn=({onClick:r})=>e.jsx(e.Fragment,{children:e.jsx("div",{className:`${m.box} ${m.medicareContainer}`,children:e.jsxs("div",{className:m.backgroundOverlay,children:[e.jsx(oe,{text:"Ensure you have the Medicare coverage thats right for you"}),e.jsx(W,{onClick:r,className:m.button,label:"Introduction to Medicare"})]})})}),fn=({onClick:r})=>e.jsx(e.Fragment,{children:e.jsx("div",{className:`${m.box} ${m.finalExpenseContainer}`,children:e.jsxs("div",{className:m.backgroundOverlay,children:[e.jsx(oe,{text:"Secure the future for your loved ones with Final Expense"}),e.jsx(W,{onClick:r,className:m.button,label:"Introduction to Final Expense"})]})})}),hn=()=>{const r=ce(),i=$e(),u=h=>{r(ot(null)),r(it(h)),r(dt(!0)),Ae(ut,h),i.push(ve===h?_t:mt)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:m.bannerBlock,children:e.jsxs("div",{className:m.bannerContent,children:[e.jsx(lt,{className:m.learningCenterTitle,text:Jt}),e.jsx(oe,{className:m.learningCenterDesc,text:Qt})]})}),e.jsxs("div",{className:m.content,children:[e.jsxs("div",{className:m.titleSection,children:[e.jsx(Pe,{className:m.title1,text:Zt}),e.jsx(ct,{className:m.description1,text:en})]}),e.jsxs("div",{className:m.tabSection,children:[e.jsx(pn,{onClick:()=>u(ve)}),e.jsx(fn,{onClick:()=>u(pt)})]})]})]})};var ue={},gn=X;Object.defineProperty(ue,"__esModule",{value:!0});var Oe=ue.default=void 0,bn=gn(K()),Cn=e;Oe=ue.default=(0,bn.default)((0,Cn.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const vn="_tabsContainer_z6fqm_88",jn="_tab_z6fqm_88",xn="_tabSelected_z6fqm_104",Sn="_tabLabel_z6fqm_109",wn="_tabsMobileContainer_z6fqm_123",yn="_icon_z6fqm_128",Nn="_iconActive_z6fqm_134",In="_tabsSelectedView_z6fqm_137",Tn="_topicValueText_z6fqm_148",kn="_heading3_z6fqm_151",Bn="_menuContainer_z6fqm_154",Pn="_dropdown_z6fqm_170",j={tabsContainer:vn,tab:jn,tabSelected:xn,tabLabel:Sn,tabsMobileContainer:wn,icon:yn,iconActive:Nn,tabsSelectedView:In,topicValueText:Tn,heading3:kn,menuContainer:Bn,dropdown:Pn},ae=[{label:"All",value:"all"},{label:"Articles",value:"Articles"},{label:"Videos",value:"Videos"},{label:"Infographics",value:"Infographics"},{label:"Guides",value:"Guides"}],$n=({defaultSelectedTab:r,onSelectTab:i})=>{const[u,h]=s.useState(r),[N,C]=s.useState(!1),{width:x}=Ft(),I=d=>{h(d),i(d)},T=()=>e.jsx("div",{className:j.tabsContainer,children:ae.map((d,p)=>e.jsx("div",{onClick:()=>I(d.value),className:`${j.tab} ${u===d.value?j.tabSelected:""} `,children:e.jsx(Fe,{text:d.label,className:j.tabLabel})},p))}),$=()=>{C(!0)},w=()=>{C(!1)},f=()=>{var d;return e.jsxs("div",{className:j.tabsMobileContainer,children:[e.jsxs("div",{className:j.tabsSelectedView,children:[e.jsx(Ee,{className:j.heading3,text:e.jsxs(e.Fragment,{children:["Topic:"," ",e.jsx("span",{className:j.topicValueText,children:(d=ae.find(p=>p.value===u))==null?void 0:d.label})]})}),e.jsx(Oe,{className:`${j.icon} ${N?j.iconActive:""}`})]}),e.jsx(ft,{displayValue:u,menuProps:{className:j.menuContainer},onOpen:$,onClose:w,onChange:p=>{I(p.target.value)},list:ae,className:j.dropdown})]})};return x<=750?f():T()};var _e={},An=X;Object.defineProperty(_e,"__esModule",{value:!0});var qe=_e.default=void 0,Fn=An(K()),En=e;qe=_e.default=(0,Fn.default)((0,En.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");const Ln="data:image/svg+xml,%3csvg%20id='btn-Filter'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3e%3cdefs%3e%3cclipPath%20id='clip-path'%3e%3crect%20id='Rectangle_84'%20data-name='Rectangle%2084'%20width='25'%20height='20.5'%20fill='none'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20id='Rectangle_85'%20data-name='Rectangle%2085'%20fill='%23fff'%20stroke='%23ccc'%20stroke-width='1'%20opacity='0'%3e%3crect%20width='40'%20height='40'%20rx='4'%20stroke='none'/%3e%3crect%20x='0.5'%20y='0.5'%20width='39'%20height='39'%20rx='3.5'%20fill='none'/%3e%3c/g%3e%3cg%20id='Group_302'%20data-name='Group%20302'%20transform='translate(8%2010)'%3e%3cg%20id='Group_301'%20data-name='Group%20301'%20clip-path='url(%23clip-path)'%3e%3cpath%20id='Path_2606'%20data-name='Path%202606'%20d='M0,0H24'%20transform='translate(0.5%202.75)'%20fill='none'%20stroke='%230052ce'%20stroke-width='1'/%3e%3cline%20id='Line_76'%20data-name='Line%2076'%20x2='24'%20transform='translate(0.5%2010.25)'%20fill='none'%20stroke='%230052ce'%20stroke-linejoin='round'%20stroke-width='1'/%3e%3cline%20id='Line_77'%20data-name='Line%2077'%20x2='24'%20transform='translate(0.5%2017.75)'%20fill='none'%20stroke='%230052ce'%20stroke-linejoin='round'%20stroke-width='1'/%3e%3ccircle%20id='Ellipse_33'%20data-name='Ellipse%2033'%20cx='2.25'%20cy='2.25'%20r='2.25'%20transform='translate(8%2015.5)'%20fill='%23fff'%20stroke='%230052ce'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1'/%3e%3ccircle%20id='Ellipse_32'%20data-name='Ellipse%2032'%20cx='2.25'%20cy='2.25'%20r='2.25'%20transform='translate(17%208)'%20fill='%23fff'%20stroke='%230052ce'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1'/%3e%3ccircle%20id='Ellipse_31'%20data-name='Ellipse%2031'%20cx='2.25'%20cy='2.25'%20r='2.25'%20transform='translate(3.5%200.5)'%20fill='%23fff'%20stroke='%230052ce'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Mn="750px",Dn="_applyFilter_1dcj8_88",zn="_accordion_1dcj8_92",Rn="_accordionDetails_1dcj8_97",On="_accordionSummary_1dcj8_101",qn="_button_1dcj8_116",Vn="_clearButton_1dcj8_124",Gn="_clearButtonDisabled_1dcj8_138",Hn="_filterClose_1dcj8_142",Wn="_filterIcon_1dcj8_150",Un="_filterIconActive_1dcj8_155",Kn="_filterTagsContainer_1dcj8_159",Xn="_filterTag_1dcj8_159",Yn="_filterTagSelected_1dcj8_184",Jn="_filterPopup_1dcj8_189",Qn="_filterPopupVisible_1dcj8_219",Zn="_heading3_1dcj8_224",es="_searchFilterContainer_1dcj8_228",ts="_searchFilterContent_1dcj8_237",ns="_searchInput_1dcj8_241",ss="_searchFilterContainerParamTag_1dcj8_252",as="_searchIcon_1dcj8_256",rs="_searchClearIcon_1dcj8_260",ls="_text_1dcj8_265",cs="_filterBlock_1dcj8_275",os="_filterCount_1dcj8_287",is="_planType_1dcj8_297",ds="_filterSection_1dcj8_303",us="_icon_1dcj8_307",a={applyFilter:Dn,accordion:zn,accordionDetails:Rn,accordionSummary:On,button:qn,clearButton:Vn,clearButtonDisabled:Gn,filterClose:Hn,filterIcon:Wn,filterIconActive:Un,filterTagsContainer:Kn,filterTag:Xn,filterTagSelected:Yn,filterPopup:Jn,"MuiAccordionSummary-content":"_MuiAccordionSummary-content_1dcj8_215","Mui-expanded":"_Mui-expanded_1dcj8_215",filterPopupVisible:Qn,heading3:Zn,searchFilterContainer:es,searchFilterContent:ts,searchInput:ns,searchFilterContainerParamTag:ss,searchIcon:as,searchClearIcon:rs,text:ls,filterBlock:cs,filterCount:os,planType:is,filterSection:ds,icon:us},_s=({searchTerm:r,onSearchTermChange:i,isParamTag:u=!1})=>{const h=ce(),{filterTags:N}=Le(n=>n.learningCenterTags),[C,x]=s.useState(!1),I=s.useMemo(()=>N.map(n=>{const l=te.findIndex(S=>S===n);return l!==-1?l:!1}).filter(n=>typeof n=="boolean"?n:!0),[N]),T=s.useMemo(()=>N.map(n=>{const l=ne.findIndex(S=>S===n);return l!==-1?l:!1}).filter(n=>typeof n=="boolean"?n:!0),[N]),[$,w]=s.useState(!1),[f,d]=s.useState([]),[p,k]=s.useState([]),y=()=>{k([]),d([])},Y=s.useCallback(()=>{w(!1)},[]),L=()=>{const n=f.map(M=>te[M]),l=p.map(M=>ne[M]);let S=[...n,...l];h(R(S)),Y()},O=()=>{y(),h(R([]))},A=n=>{p.includes(n)?k(p.filter(l=>l!==n)):k([...p,n])},q=n=>{f.includes(n)?d(f.filter(l=>l!==n)):d([...f,n])},F=()=>{w(!1),d(I),k(T)},V=()=>{w(!$),d(I),k(T)};s.useEffect(()=>{const n=document.querySelector("#filterContainer"),l=S=>{S.target!==n&&!n.contains(S.target)&&F()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}},[F]);let B=f.length+p.length;const G=s.useMemo(()=>e.jsx(ht,{id:"search",placeholder:"Search",size:"small",isPadding:!1,className:a.searchInput,value:r,onChange:i,InputProps:{startAdornment:e.jsx(gt,{position:"start",children:e.jsx(qe,{className:a.searchIcon})}),endAdornment:(r==null?void 0:r.length)>0&&e.jsx(U,{className:a.searchClearIcon,onClick:()=>i("")})}}),[r,i]);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:`${a.searchFilterContainer} ${u?a.searchFilterContainerParamTag:""}`,id:"filterContainer",children:[e.jsx(Me,{queries:{mobile:{maxWidth:Mn}},onChange:n=>{x(n.mobile)}}),!C&&G,u?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:a.searchFilterContent,children:[C&&e.jsx("div",{className:a.searchBlock,children:G}),e.jsx("div",{className:a.filterSection,children:e.jsxs("div",{"data-content":B,className:`${a.filterBlock} ${N.length>0?a.filterCount:""}`,onClick:V,children:[e.jsx(bt,{alt:"filter icon",className:a.filterIcon,image:Ln}),!C&&e.jsx("span",{children:"Filters"})]})})]}),e.jsxs("div",{className:`${a.filterPopup} ${$?a.filterPopupVisible:""}`,children:[e.jsx(Ee,{className:a.heading3,text:"Filters"}),e.jsx(U,{className:a.filterClose,onClick:V}),e.jsxs(ye,{defaultExpanded:!0,className:a.accordion,children:[e.jsx(Ne,{expandIcon:e.jsx(Se,{className:a.icon}),"aria-controls":"panel1-content",id:"panel1-header",className:a.accordionSummary,children:"Coverage Type"}),e.jsx(Ie,{className:a.accordionDetails,children:e.jsx("div",{className:a.filterTagsContainer,children:te.map((n,l)=>C?e.jsx("div",{onClick:()=>q(l),className:`${a.filterTag} ${f.includes(l)?a.filterTagSelected:""}`,children:n},l):e.jsx(je,{control:e.jsx(we,{onChange:()=>q(l),checked:f.includes(l),id:n}),name:"tags",label:n}))},"planTypes")})]}),e.jsxs(ye,{className:a.accordion,children:[e.jsx(Ne,{expandIcon:e.jsx(Se,{className:a.icon}),"aria-controls":"panel2-content",id:"panel2-header",className:a.accordionSummary,children:"Topics"}),e.jsx(Ie,{className:a.accordionDetails,children:e.jsx("div",{className:a.filterTagsContainer,children:ne.map((n,l)=>e.jsx(e.Fragment,{children:C?e.jsx("div",{onClick:()=>A(l),className:`${a.filterTag} ${p.includes(l)?a.filterTagSelected:""}`,children:n},n):e.jsx(je,{control:e.jsx(we,{onChange:()=>A(l),checked:p.includes(l),id:n}),name:"tags",label:n})}))},"topics")})]}),e.jsxs("div",{className:a.applyFilter,children:[e.jsx(W,{label:"Clear Filters",className:`${a.clearButton} ${B===0?a.clearButtonDisabled:""}`,disabled:B===0,onClick:O}),e.jsx(W,{label:"Apply Filters",className:a.button,disabled:B===0,onClick:L})]})]})]})]})})},ms=(r,i)=>{let u=null;return()=>{clearTimeout(u),u=setTimeout(()=>{r()},i)}},ke="750px",ps="1200px",fs=async(r=0,i=11)=>await ze.fetch([`*[ _type == "articles"][${r}..${i}]{ ..., tags[]->, mainImage{ ..., asset->{ url } }, articleVideo{ ..., asset->{ url } }, articleThumbnail { ..., asset->{ url } } }`]),hs=()=>ze.fetch([`*[ _type == "learningCenter"]{ getStartedBanner-> }`]),Be=async(r=0,i=11)=>await De(async()=>fs(r,i),[])(),gs=De(hs,[]),z={description:"Read our articles to answer you Medicare questions. We are committed to delivering a simpler, more straightforward Medicare experience for everyone.",title:"Learning Center | PlanEnroll"},bs="_articleCards_12vzv_88",Cs="_content_12vzv_93",vs="_getStartedBannerSubscribe_12vzv_101",js="_subscribeBanner_12vzv_107",xs="_subscribeBannerTablet_12vzv_114",Ss="_subscribeBannerMobile_12vzv_118",ws="_showAllPosts_12vzv_124",ys="_linkTextClass_12vzv_131",Ns="_getStartedBanner_12vzv_101",Is="_getStartedBannerTablet_12vzv_144",Ts="_learningCenter_12vzv_148",ks="_pageHeading_12vzv_156",Bs="_italicText_12vzv_160",Ps="_tabFilterSection_12vzv_164",$s="_tagsContainer_12vzv_170",As="_closeIcon_12vzv_180",Fs="_chip_12vzv_184",Es="_articleCard_12vzv_88",Ls="_resultsMeta_12vzv_258",Ms="_videoPlayerContainer_12vzv_277",o={articleCards:bs,content:Cs,getStartedBannerSubscribe:vs,subscribeBanner:js,subscribeBannerTablet:xs,subscribeBannerMobile:Ss,showAllPosts:ws,linkTextClass:ys,getStartedBanner:Ns,getStartedBannerTablet:Is,learningCenter:Ts,pageHeading:ks,italicText:Bs,tabFilterSection:Ps,tagsContainer:$s,closeIcon:As,chip:Fs,articleCard:Es,resultsMeta:Ls,videoPlayerContainer:Ms},re=150,Ds=["articles","videos","infographics","guides"],le={all:"All Items",articles:"Articles",videos:"Videos",infographics:"Infographics",guides:"Guides",posts:"Items"},Ys=r=>{var be;const i=ce(),{isAuthenticated:u}=Ct(),{match:h}=r,C=`${(be=h==null?void 0:h.params)==null?void 0:be.articleName}`.replaceAll("-"," "),{filterTags:x}=Le(t=>t.learningCenterTags),[I,T]=s.useState(!1),[$,w]=s.useState(!1),[f,d]=s.useState([]),[p,k]=s.useState(vt("isPremiumContentEnabled")||u),[y,Y]=s.useState(""),[L,O]=s.useState(0),[A,q]=s.useState(!1),[F,V]=s.useState([]),[B,G]=s.useState(!1),[n,l]=s.useState(null),[S,M]=s.useState(!1),[Ve,Ge]=s.useState({}),{contentId:He}=s.useContext(jt),J=window.location.href.substring(window.location.href.lastIndexOf("#")+1),[We,Q]=s.useState(!1),[g,me]=s.useState(J&&Ds.includes(J)?J:"all"),{purlAgentData:Ue}=s.useContext(xt);s.useEffect(()=>{se()},[]),console.log(St,"API_BASE_URL");const Ke=window.location.href,pe=s.useCallback((t,c,b)=>{let v=[...t];x.length!==0&&(v=t.filter(_=>{var P;return!!((P=_==null?void 0:_.tags)==null?void 0:P.some(E=>x.includes(E==null?void 0:E.title)))})),c&&(v=v.filter(_=>{var E,Ce;const D=((E=_==null?void 0:_.articleName)==null?void 0:E.toLowerCase().indexOf(c==null?void 0:c.toLowerCase()))>-1,P=((Ce=_==null?void 0:_.description)==null?void 0:Ce.toLowerCase().indexOf(c==null?void 0:c.toLowerCase()))>-1;return!!(D||P)})),b!=="all"&&(v=v.filter(_=>{var D,P;return(P=b==null?void 0:b.toLowerCase())==null?void 0:P.includes((D=_==null?void 0:_.articleType)==null?void 0:D.toLowerCase())})),V(v)},[x]);s.useEffect(()=>{pe(f,y,g)},[f,pe,y,g]),s.useEffect(()=>{window.location.href.indexOf("#")===-1&&me(g==null?void 0:g.toLowerCase()),window.history.replaceState(null,null,`#${g==null?void 0:g.toLowerCase()}`)},[Ke,g]);const fe=s.useCallback(async()=>{const t=await Be(L,L+re);t.length===0&&q(!0),d([...f,...t]),O([...f,...t].length)},[L,f]);s.useEffect(()=>{Mt("event-content-load",{pagePath:"/articles-and-resources/"}),(async()=>{const t=await Be(0,re);d(t),Ge((await gs())[0]),O(re+1)})()},[]),s.useEffect(()=>{let t=!1;const c=ms(()=>{!t&&!A&&document.documentElement.scrollTop+window.innerHeight+800>document.documentElement.scrollHeight?(t=!0,fe()):t=!1},200);return A||window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[fe,A]),s.useEffect(()=>{const t=wt.find(c=>(c==null?void 0:c.toLowerCase())===(C==null?void 0:C.toLowerCase()));t?(T(!0),w(t),i(R([t]))):(T(!1),w(""),i(R([])))},[C]);const Z=$e(),{getStartedBanner:Xe={}}=Ve||{},{buttonLabel:Ye,slug:ee,title:Je}=Xe,Qe=ee==null?void 0:ee.current,Ze=()=>{Z.push(Qe),se()},et=t=>{const c=typeof t=="string"?t:t.target.value;Y(c)},tt=()=>`${y?"Search Items for ":x.length>0?"Filtered Items ":""} ${y?`“${y}”`:""}- ${F.length} ${((g==null?void 0:g.toLowerCase())==="all"?le==null?void 0:le.posts:g).toLowerCase()}`,nt=t=>{var c,b,v,_;return(b=(c=t==null?void 0:t.slug)==null?void 0:c.current)!=null&&b.includes("/")?`/learning-center${(v=t==null?void 0:t.slug)==null?void 0:v.current}`:`/learning-center/${(_=t==null?void 0:t.slug)==null?void 0:_.current}`},he=t=>{var b,v;const c=(b=t==null?void 0:t.slug)!=null&&b.current?nt(t):`/learning-center/${(v=t==null?void 0:t.title)==null?void 0:v.replace(" ","-")}`;Z.push(c),se()},st=async t=>{const c=`${window.location.href}/${n==null?void 0:n.current}`;Q(!1),Ae("isPremiumContentEnabled",!0),k(!0);const b=Lt();await Et(t,b,"PremiumContent",c,Ue),Bt("premium_content_email_optin"),Z.push(`/learning-center/${n.current}`)},ge=t=>{Q(!0),l(t)},at=t=>{const c=x.filter(b=>b!==t);i(R([...c]))};return e.jsxs(e.Fragment,{children:[e.jsx(yt,{}),e.jsx(Me,{queries:{mobile:{maxWidth:ke},tablet:{minWidth:parseInt(ke,10)+1,maxWidth:ps}},onChange:t=>{G(t.mobile),M(t.tablet)}}),e.jsx(Nt,{alt:z.alt,description:z.description,image:z.image,largeImage:z.largeImage,title:z.title}),e.jsxs("div",{className:o.learningCenter,id:He,children:[e.jsx(hn,{}),e.jsxs("div",{className:o.content,children:[e.jsxs("div",{className:o.tabFilterSection,children:[e.jsx($n,{defaultSelectedTab:g,onSelectTab:me}),!I&&e.jsx(_s,{searchTerm:y,onSearchTermChange:et,isParamTag:I})]}),e.jsx(It,{direction:"row",spacing:1,className:o.tagsContainer,children:x.map(t=>e.jsx(Tt,{className:o.chip,label:t,onDelete:()=>at(t),deleteIcon:e.jsx(U,{className:o.closeIcon})}))}),e.jsxs("div",{className:o.resultsMeta,children:[$&&e.jsx("div",{className:o.showAllPosts,children:e.jsx(kt,{url:"/learning-center",linkTextClass:o.linkTextClass,text:e.jsxs(e.Fragment,{children:[e.jsx(Re,{})," ",e.jsx(Fe,{text:"Show All Items",className:o.showAllPostsText})]})})}),(y||x.length>0)&&e.jsx(At,{className:o.italicText,text:tt()})]}),e.jsxs(xe,{cardClassName:o.articleCard,className:o.articleCards,"data-gtm":"ar-article-section-wrapper",items:F.slice(0,S?10:9),onClick:he,onPremiumCardClick:ge,hasPremiumAccess:p,children:[e.jsx(Yt,{buttonLabel:Ye,className:o.getStartedBanner,onClick:Ze,title:Je}),B&&e.jsx("div",{className:o.subscribeBannerMobile,children:e.jsx("div",{className:o.getStartedBannerSubscribe,children:e.jsx(Te,{})})})]}),e.jsx(xe,{cardClassName:o.articleCard,className:o.articleCards_subscribe,"data-gtm":"ar-article-section-wrapper",hasPremiumAccess:p,items:F.slice(S?10:9),onClick:he,onPremiumCardClick:ge,children:!B&&e.jsx("div",{className:o.subscribeBanner,children:e.jsx("div",{className:o.getStartedBannerSubscribe,children:e.jsx(Te,{})})})})]})]}),!1,e.jsx(Pt,{isOpen:We,onClose:()=>Q(!1),onSubmitSuccessfully:st})]})};export{Ys as default}; //# sourceMappingURL=index-Bp4lD8mU.js.map