1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="67decc2a-1287-5aa9-8fba-f63531e0f56f")}catch(e){}}(); 3import{a as e,t}from"./jsx-runtime-CMgEUHpv.js";import{V as n}from"./dist-CAHjj65Z.js";import{t as r}from"./useTranslation-BymTnaHx.js";import{O as i,l as a,n as o}from"./components-B8bHjdou.js";import{r as s}from"./types-BpAlB3Az.js";import{t as c}from"./classnames-PxzWHlFm.js";import{t as l}from"./Fallback-XSo-r-93.js";import{n as u,t as d}from"./Typography-DJfjxaJy.js";import{r as f,t as p}from"./useWebThemeContext-BJu9VsBR.js";import{n as m,r as h,t as g}from"./TestimonialsSection-Bw-j5R53.js";import{t as _}from"./MarkDownRender-D4I8PP9R.js";import{t as v}from"./PostCardv3-C5or4sKe.js";import{r as y}from"./local_storage-CooKze2L.js";import{n as b,t as x}from"./useBoostAffiliate-BpQKdrbe.js";import{t as S}from"./CreateAction-A4WIAi98.js";import{t as C}from"./Image-B1Otrzxn.js";import{t as w}from"./dialog-DQRLOcH9.js";import{t as T}from"./transition-zOPc9j2i.js";import{t as E}from"./useTypedLoaderData-p1j97aJ6.js";import{t as D}from"./useWebBuilderCommunicator-YvR86u0w.js";import{n as O,t as k}from"./getMergedMetaData-BX84vd1a.js";import{t as A}from"./RecommendationsForm-_vVlMQ6b.js";var j=e(n());function M({title:e,titleId:t,...n},r){return j.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?j.createElement(`title`,{id:t},e):null,j.createElement(`path`,{fillRule:`evenodd`,d:`M12.97 3.97a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 1 1-1.06-1.06l6.22-6.22H3a.75.75 0 0 1 0-1.5h16.19l-6.22-6.22a.75.75 0 0 1 0-1.06Z`,clipRule:`evenodd`}))}var N=j.forwardRef(M),P=(e,t=`-`)=>e?e.toLowerCase().replace(/[^a-z0-9\-_]+/gi,t):``,F=t(),I=({utmSource:e,beehiivBranding:t=!1,color:n})=>{let i=P(e,`_`),{t:a}=r();return t?(0,F.jsx)(`div`,{style:{color:n},className:`wt-text-on-subscribe-background-color absolute bottom-2 left-1/2 z-10 -translate-x-1/2 transform text-center sm:bottom-4 sm:left-4 sm:translate-x-0`,children:(0,F.jsx)(`div`,{className:`flex flex-col sm:flex-row sm:space-x-4`,children:(0,F.jsx)(`p`,{className:`whitespace-nowrap text-xs leading-tight sm:text-sm`,children:(0,F.jsxs)(`small`,{children:[`${a(`footer.article`)} `,(0,F.jsx)(`a`,{target:`_blank`,rel:`noopener noreferrer`,href:`https://beehiiv.com?utm_source=${i}&utm_medium=subscribe_page`,className:`underline`,children:`beehiiv`}),` ${a(`footer.newsletter`)}`]})})})}):null},L=()=>{let e=a(),t=e.state===`loading`,[n,r]=(0,j.useState)([]),[i,o]=(0,j.useState)([]);return(0,j.useEffect)(()=>{e.load(`/recommendations?index&page=1`)},[]),(0,j.useEffect)(()=>{if(e.data){let{recommendations:t,boostedRecommendations:n}=e.data;r(t),o(n)}},[e.data]),{isLoading:t,boostedRecommendations:i,recommendations:n}},R=({isOpen:e,onClose:t,children:n})=>{let{isLoading:r,recommendations:i,boostedRecommendations:a}=L(),o=i.length>0||a.length>0;return(0,F.jsx)(T,{appear:!0,show:!!(e&&!r&&o),as:j.Fragment,children:(0,F.jsxs)(w,{as:`div`,className:`relative`,onClose:t,children:[(0,F.jsx)(T.Child,{as:j.Fragment,enter:`ease-out duration-300`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-200`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,F.jsx)(`div`,{className:`fixed inset-0 z-20 bg-black/60`})}),(0,F.jsx)(T.Child,{as:j.Fragment,enter:`ease-out duration-300`,enterFrom:`opacity-0 translate-y-full sm:translate-y-0 sm:scale-95`,enterTo:`opacity-100 translate-y-0 sm:scale-100`,leave:`ease-in duration-200`,leaveFrom:`opacity-100 translate-y-0 sm:scale-100`,leaveTo:`opacity-0 translate-y-full sm:translate-y-0 sm:scale-95`,children:(0,F.jsx)(`div`,{className:`fixed inset-0 z-20 flex items-end justify-center p-0 pt-16 sm:inset-4 sm:items-center sm:p-4`,children:(0,F.jsx)(`div`,{className:`h-auto max-h-full w-full overflow-auto rounded-t-2xl bg-white shadow-xl sm:h-auto sm:max-h-[90vh] sm:max-w-2xl sm:rounded-md`,children:(0,F.jsx)(w.Panel,{className:`h-auto w-full`,children:(0,F.jsx)(A,{isLoading:r,re
3commendations:i,boostedRecommendations:a})})})})})]})})},z=()=>{let[e]=i();return{isModalOpen:e.get(`recommendations`)===`true`}},B=e(c(),1),V=({post:e,screenSize:t,fontFamily:n,headlineColor:r})=>(0,F.jsx)(o,{to:`/p/${e.slug}`,children:(0,F.jsxs)(`div`,{className:`w-full space-y-1`,children:[(0,F.jsx)(d,{as:`h4`,size:`md`,weight:`semibold`,fontFamily:n,color:r,className:(0,B.default)({"w-full":!0}),children:e?.web_title}),(0,F.jsx)(d,{as:`p`,size:`xs`,weight:`regular`,fontFamily:n,color:r,className:(0,B.default)({"w-full opacity-70":!0}),children:e?.web_subtitle})]})}),H=({post:e,fontFamily:t,headlineColor:n})=>(0,F.jsxs)(o,{to:`/p/${e.slug}`,prefetch:`none`,className:`w-full max-w-xl rounded bg-transparent shadow-md`,children:[(0,F.jsx)(`div`,{className:`z-10 col-span-1 mb-2 w-full overflow-hidden rounded-wt`,children:(0,F.jsx)(C,{src:e.image_url,alt:e.web_title,maxWidth:800,loading:`lazy`,aspectRatio:`social`})}),(0,F.jsxs)(`div`,{className:`w-full space-y-1 p-4`,children:[(0,F.jsx)(d,{as:`h4`,size:`xl`,weight:`semibold`,fontFamily:t,color:n,className:(0,B.default)({"w-full":!0}),children:e?.web_title}),(0,F.jsx)(d,{as:`p`,size:`md`,weight:`regular`,fontFamily:t,color:n,className:(0,B.default)({"w-full opacity-70":!0}),children:e?.web_subtitle})]})]}),U=({text:e,fontFamily:t,fontSize:n,overlineColor:r})=>(0,F.jsx)(o,{to:`/`,className:`mt-4 flex items-center justify-between space-x-2 hover:underline`,children:(0,F.jsx)(d,{as:`span`,size:n,weight:`semibold`,className:``,fontFamily:t,color:r,children:e})}),W=({landingPage:e,featuredPosts:t})=>{let{cardStyles:n}=E(),{isEnabled:r}=p(),{featured_posts_section:i}=e,a=i.headline_font_family,o=i.headline_color;return(0,F.jsx)(`div`,{style:{backgroundColor:i.bg_color},className:`flex flex-col p-16 px-4 pb-24`,children:(0,F.jsxs)(`div`,{className:`mx-auto w-full max-w-5xl`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex w-full flex-col items-center space-y-2`,children:[i.overline&&(0,F.jsx)(d,{as:`span`,size:i.overline_font_size,weight:`bold`,fontFamily:i.overline_font_family,color:i.overline_color,className:(0,B.default)({"w-full":!0,"text-center":i.text_align===`center`,"text-left":i.text_align===`left`,"text-right":i.text_align===`right`}),children:i.overline}),(0,F.jsx)(d,{as:`h4`,size:i.headline_font_size,weight:`bold`,fontFamily:i.headline_font_family,color:i.headline_color,className:(0,B.default)({"w-full":!0,"text-center":i.text_align===`center`,"text-left":i.text_align===`left`,"text-right":i.text_align===`right`}),children:i.headline})]}),i.enable_all_post_images?t.length>0?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:(0,B.default)({"mx-auto mt-16 grid w-full gap-6 sm:grid-cols-2 md:grid-cols-3":!0,"justify-center":i.text_align===`center`,"justify-start":i.text_align===`left`,"justify-end":i.text_align===`right`}),children:t.map(e=>r?(0,F.jsx)(v,{post:e,cardStyles:n},e.id):(0,F.jsx)(H,{post:e,fontFamily:a,color:o},e.id))}),(0,F.jsx)(`div`,{className:(0,B.default)({"mx-auto mt-8 flex w-full flex-col gap-8 sm:flex-row":!0,"justify-center":i.text_align===`center`,"justify-start":i.text_align===`left`,"justify-end":i.text_align===`right`}),children:(0,F.jsx)(U,{text:i.read_more_cta,size:i.read_more_cta_font_size,fontFamily:i.read_more_cta_font_family,overlineColor:i.overline_color})})]}):null:t.length>0?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:(0,B.default)({"mx-auto mt-16 flex w-full flex-col gap-8 sm:flex-row":!0,"justify-center":i.text_align===`center`,"justify-start":i.text_align===`left`,"justify-end":i.text_align===`right`}),children:[r?(0,F.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,F.jsx)(v,{post:t[0],cardStyles:n})}):(0,F.jsx)(H,{post:t[0],fontFamily:a,color:o}),t.length!==1&&(0,F.jsxs)(`div`,{className:`flex w-3/5 flex-col justify-between`,children:[(0,F.jsx)(`div`,{className:`flex flex-col space-y-4`,children:t?.slice(1).map(e=>(0,F.jsx)(`div`,{children:(0,F.jsx)(V,{post:e,fontFamily:a,headlineColor:o})},e.id))}),(0,F.jsx)(U,{text:i.read_more_cta,size:i.read_more_cta_font_size,fontFamily:i.read_more_cta_font_family,overlineColor:i.overline_color})]})]}),t.length===1&&(0,F.jsx)(`div`,{className:(0,B.default)({"mx-auto mt-6 flex w-full":!0,"justify-center":i.text_align===`center`,"justify-start":i.text_align===`left`,"justify-end":i.text_align===`right`}),children:(0,F.jsx)(U,{text:i.read_more_cta,size:i.read_more_cta_font_size,fontFamily:i.read_more_cta_font_family})})]}):null]})})},G=({ctaText:e,fontFamily:t,fontSize:n})=>{let{t:i}=r();return(0,F.jsx)(`div`,{className:`pt-4`,children:(0,F.jsxs)(o,{to:`/`,prefetch:`intent`,className:`duration:300 text-md group inline-flex cursor-pointer items-center no-underline transition`,children:[(0,F.jsx)(d,{as:`span`,size:n,weight:`regular`,fontFamily:t,className:(0,B.default)({"mr-1.5 opacity-75 transition duration-200 group-hover:opacity-100":!0}),children:e||i(`subscribe.read`)}),(0,F.jsx)(N,{className:`mt-0.5 h-4 w-4 w-auto opacity-75 transition duration-200 group-hover:opacity-100`})]})})},K=({hasPosts:e,publication:t,landingPage:n,signupWidgetConfigs:r})=>{let{isEnabled:i}=p(),{main_section:a,main_image_url:o,main_bg_image_url:c}=n,l=f[a.bg_gloss_opacity||`0`],h=a?.logo_enabled,g=typeof h==`boolean`&&h===!1;return(0,F.jsxs)(`div`,{style:{backgroundImage:c&&`url(${c})`,backgroundColor:a.bg_color},className:(0,B.default)(`relative`,c&&`bg-cover bg-center bg-no-repeat`),children:[c&&(0,F.jsx)(`div`,{className:(0,B.default)(`absolute left-0 top-0 h-full w-full`,l),style:{backgroundColor:a.bg_color}}),(0,F.jsx)(`div`,{className:(0,B.default)({"relative z-10 flex items-center px-4 sm:px-8":!0,"min-h-screen pb-8 pt-16 sm:pb-0 sm:pt-0":!a.disable_full_height,"pb-16 pt-28":a.disable_full_height}),children:(0,F.jsxs)(`div`,{className:(0,B.default)(`mx-auto -mt-10 flex w-full max-w-5xl space-x-0 sm:space-x-8`),children:[(0,F.jsx)(`div`,{className:`w-full`,children:(0,F.jsxs)(`div`,{className:(0,B.default)({"flex flex-col items-center sm:items-start":!0,"sm:items-center":!o}),children:[!g&&(0,F.jsx)(`div`,{className:`mb-8`,children:(0,F.jsx)(m,{publication:t,className:`h-24 w-24`})}),(0,F.jsxs)(`div`,{className:`mb-6 w-full`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex w-full flex-col items-center`,children:[a.overline&&(0,F.jsx)(`div`,{className:(0,B.default)({"flex w-full justify-center sm:justify-start":!0,"justify-center":!o}),children:(0,F.jsx)(d,{as:`span`,size:a.overline_font_size,weight:`bold`,fontFamily:a.overline_font_family,fontFamilyv2:i?a.overline_font_family:void 0,color:a.overline_color,className:(0,B.default)(`w-full`,o?`text-center sm:text-left`:`text-center`),children:(0,F.jsx)(_,{children:a.overline})})}),a.headline&&(0,F.jsx)(d,{as:`h1`,size:a.headline_font_size,weight:`bold`,fontFamily:a.headline_font_family,fontFamilyv2:i?a.headline_font_family:void 0,color:a.headline_color,className:(0,B.default)({"w-full break-words text-center sm:break-normal sm:text-left":!0,"max-w-3xl sm:text-center":!o}),children:(0,F.jsx)(_,{children:a.headline})})]}),a.description&&(0,F.jsx)(d,{as:`span`,size:a.description_font_size,weight:`regular`,fontFamily:a.description_font_family,fontFamilyv2:i?a.description_font_family:void 0,color:a.description_color,className:(0,B.default)({"w-full":!0,"text-center sm:text-left":o,"mx-auto max-w-3xl text-center":!o}),children:(0,F.jsx)(_,{children:a.description})})]}),(0,F.jsxs)(`div`,{className:(0,B.default)({"mb-10 flex w-full flex-col":!0,"items-center":!o}),children:[(0,F.jsx)(`div`,{className:`w-full max-w-lg`,children:i&&r?(0,F.jsx)(s,{signupStyles:r}):(0,F.jsx)(S,{publication:t,autoFocus:!0,backgroundColor:a.signup_bg_color,textColor:a.signup_text_color,placeholderText:a.signup_placeholder_text,cta:a.signup_cta_text,fontFamily:u(a.signup_cta_font_family)})}),a.underline&&(0,F.jsx)(d,{as:`span`,size:a.underline_font_size,weight:`regular`,fontFamily:a.underline_font_family,fontFamilyv2:i?a.underline_font_family:void 0,color:a.underline_color,className:(0,B.default)({"w-full pt-4 text-center sm:text-left":!0,"sm:text-center":!o}),children:(0,F.jsx)(_,{children:a.underline})})]}),e&&a.read_more_cta_enabled&&(0,F.jsx)(`div`,{style:{color:a.read_more_cta_color},className:(0,B.default)({"w-full text-center sm:text-left":!0,"sm:text-center":!o}),children:(0,F.jsx)(G,{ctaText:a.read_more_cta,fontSize:a.read_more_cta_font_size,fontFamily:a.read_more_cta_font_family})})]})}),o&&(0,F.jsx)(`div`,{className:`flex items-center`,children:(0,F.jsx)(`div`,{className:`hidden w-64 sm:block`,children:(0,F.jsx)(`img`,{src:o||``,alt:`Main depiction of the publication on the landing page`})})})]})})]})},q=({data:e,matches:t})=>{let n=e?.publication,r=e?.metaTitle,i=e?.metaDescription||n?.description,a=e?.landingPage?.renderable_fonts||[],o=[];return a?.length>
30&&a.forEach(e=>{o.push({rel:`stylesheet`,href:e,tagName:`link`})}),e?.landingPage?.main_bg_image_url&&o.push({rel:`preload`,href:e?.landingPage?.main_bg_image_url,as:`image`}),e?.landingPage?.main_image_url&&o.push({rel:`preload`,href:e?.landingPage?.main_image_url,as:`image`}),k({canonicalUrl:O(e?.requestUrl),matches:t,returnEarlyCheck:!r,overrides:{title:r,description:i},links:o})},J=()=>{let{hasPosts:e,publication:t,recommendingPublication:n,recommendingPublicationIdInUrl:r,recommendingPublicationIdInCookie:i,landingPage:a,featuredPosts:o,isInitialLoadFromSwarm:s,hasWebThemesEnabled:c,signupWidgetConfigs:u}=E(),{setCookie:d,removeCookie:f}=y();if(!t)throw Error(`RefreshPageError`);D({isInitialLoadFromSwarm:s,publicationId:t.id});let p=()=>a?.faq_section?.enabled?a.faq_section.headline_color:a?.featured_posts_section.enabled?a.featured_posts_section.headline_color:a?.testimonials_section.enabled?a.testimonials_section.headline_color:a.main_section.headline_color,{isModalOpen:m}=z();return(0,j.useEffect)(()=>{n&&(n.can_signup===!0&&r&&!i?d({name:b,value:r,days:x}):n.can_signup===!1&&i===n.id&&f(b))},[r,i,n,d,f]),n&&n.can_signup===!1?(0,F.jsx)(l,{isFullWidth:!0,customTitle:`Uh oh, it looks like this link is expired.`,customDescription:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`strong`,{children:n.name}),` needs to update a few things on their end to resume. In the meantime, you can choose to signup to `,n.name,` `,(0,F.jsx)(`strong`,{children:(0,F.jsx)(`a`,{href:`${n.url}subscribe`,children:`here`})}),`.`]}),errorCode:`404`,publicationPresent:!1}):c?(0,F.jsxs)(`div`,{children:[(0,F.jsx)(K,{hasPosts:e,publication:t,landingPage:a,signupWidgetConfigs:u}),a?.testimonials_section.enabled&&(0,F.jsx)(g,{testimonialsSection:a.testimonials_section,testimonials:a.landing_page_testimonials}),a?.featured_posts_section.enabled&&(0,F.jsx)(W,{featuredPosts:o,landingPage:a}),a?.faq_section?.enabled&&(0,F.jsx)(h,{faq_section:a.faq_section,isFirstQuestionOpen:s}),(0,F.jsx)(`div`,{className:`relative`,children:(0,F.jsx)(I,{utmSource:t.name,beehiivBranding:t.beehiiv_branding,color:p()})}),m&&(0,F.jsx)(R,{isOpen:m,onClose:()=>{}})]}):(0,F.jsxs)(`div`,{children:[(0,F.jsx)(K,{hasPosts:e,publication:t,landingPage:a}),a?.testimonials_section.enabled&&(0,F.jsx)(g,{testimonialsSection:a.testimonials_section,testimonials:a.landing_page_testimonials}),a?.featured_posts_section.enabled&&(0,F.jsx)(W,{featuredPosts:o,landingPage:a}),a?.faq_section?.enabled&&(0,F.jsx)(h,{faq_section:a.faq_section,isFirstQuestionOpen:s}),(0,F.jsx)(`div`,{className:`relative`,children:(0,F.jsx)(I,{utmSource:t.name,beehiivBranding:t.beehiiv_branding,color:p()})}),m&&(0,F.jsx)(R,{isOpen:m,onClose:()=>{}})]})};export{J as default,q as meta}; 4//# sourceMappingURL=index-TaKfvwAe.js.map 5//# debugId=67decc2a-1287-5aa9-8fba-f63531e0f56f
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.