PageSourceSearch

https://www.theunwindai.com/assets/index-DviRqGwj.js

js theunwindai.com collected 2026-10-02 07:45:36 UTC 66,154 bytes, 5 lines download raw bytes

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]="0c7a0548-1005-5c1f-8403-8e40692adb68")}catch(e){}}();
3import{a as e,t}from"./jsx-runtime-CMgEUHpv.js";import{V as n,g as r,m as i}from"./dist-CAHjj65Z.js";import{t as a}from"./useTranslation-BymTnaHx.js";import{O as o,l as s,n as c,u as l}from"./components-B8bHjdou.js";import{n as u}from"./i18next-BaeBzRnv.js";import{n as d,r as f}from"./types-BpAlB3Az.js";import{t as p}from"./classnames-PxzWHlFm.js";import{t as m}from"./Text-B4PqLHDw.js";import{t as h}from"./BreakpointsContainer-B1e5IlOp.js";import{n as g,t as _}from"./Typography-DJfjxaJy.js";import{a as v,i as y,r as ee,s as b}from"./useWebThemeContext-BJu9VsBR.js";import{t as x}from"./ArrowLeftIcon-vKsIwqZN.js";import{t as S}from"./ChevronRightIcon-CBCJUmns.js";import{t as C}from"./MarkDownRender-D4I8PP9R.js";import{a as w,c as T,i as E,n as D,o as O,r as te,s as k,t as ne}from"./PostCardv3-C5or4sKe.js";import{a as re,c as A,i as ie,n as ae,o as oe,r as se,s as j,t as ce}from"./ArchiveSection-Dv6FQzqW.js";import{a as le,i as ue,n as de,o as fe,r as M,t as pe}from"./popover-CeauQKpN.js";import{a as me,i as he,n as ge,o as _e,r as ve,t as ye}from"./YoutubeIcon-C4prtiyt.js";import{t as be}from"./useIsLoggedIn-hXilkn2W.js";import{t as N}from"./CreateAction-A4WIAi98.js";import{t as P}from"./Image-B1Otrzxn.js";import{t as xe}from"./transition-zOPc9j2i.js";import{t as Se}from"./getNormalizedCategory-BviP1vmp.js";import{t as Ce}from"./Page-DaQHFy5R.js";import{t as F}from"./useTypedLoaderData-p1j97aJ6.js";import{t as we}from"./useWebBuilderCommunicator-YvR86u0w.js";import{t as Te}from"./shouldRevalidateLoaderData-cxDIbqj1.js";import{n as Ee,t as De}from"./getMergedMetaData-BX84vd1a.js";import{t as Oe}from"./FreeGatedContent-BUY3IKki.js";var I=e(n());function ke({title:e,titleId:t,...n},r){return I.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?I.createElement(`title`,{id:t},e):null,I.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3`}))}var Ae=I.forwardRef(ke),L=e(p(),1),je=({category:e})=>{let t=s();return(0,I.useEffect)(()=>{t.load(`/t/${Se(e)}`)},[]),{isLoading:!t?.data,posts:t?.data?.paginatedPosts.posts}},R=t(),Me=()=>(0,R.jsxs)(`div`,{className:`grid w-full animate-pulse grid-cols-3 gap-6`,children:[(0,R.jsx)(`div`,{className:`h-60 w-full rounded bg-gray-200`}),(0,R.jsx)(`div`,{className:`h-60 w-full rounded bg-gray-200`}),(0,R.jsx)(`div`,{className:`h-60 w-full rounded bg-gray-200`})]}),z=({isLoading:e,posts:t,card:n,title:r,description:i,ctaPath:o=``,fontFamily:s,isNewWebBuilder:u=!1})=>{let{t:d}=a(),{homePage:f,cardStyles:p}=l(),m=f?.general_section?.theme?.accent_color,h=f?.general_section?.theme?.text_color,{postsWithInsights:g}=se({incomingPosts:t});return!t||t.length===0?null:(0,R.jsxs)(`div`,{className:`space-y-6 py-8`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(ae,{title:r,description:i,fontFamily:s,accentColor:m,textColor:h,isNewWebBuilder:u}),o&&(0,R.jsx)(c,{prefetch:`intent`,to:o,className:`flex items-center space-x-0.5 opacity-70 hover:opacity-100`,children:(0,R.jsxs)(_,{as:`span`,size:`md`,fontFamily:s,fontFamilyv2:u?s:void 0,color:m,className:`flex items-center`,children:[d(`shared.cta.view_more`),(0,R.jsx)(S,{className:`ml-2 mt-0.5 h-4 w-4`})]})})]}),e?(0,R.jsx)(Me,{}):(0,R.jsx)(`div`,{className:`grid grid-cols-3 gap-6`,children:g?.map(e=>(0,R.jsx)(`div`,{className:`col-span-3 md:col-span-1`,children:u?(0,R.jsx)(ne,{post:e,cardStyles:p},e.id):(0,R.jsx)(ie,{post:e,card:n},e.id)},e.id))})]})},Ne=({category:e,card:t,fontFamily:n,isNewWebBuilder:r=!1})=>{let{posts:i,isLoading:a}=je({category:e}),o=i?.slice(0,3);return(0,R.jsx)(z,{title:e,posts:o,card:t,fontFamily:n,isLoading:a,ctaPath:`/t/${Se(e)}`,isNewWebBuilder:r})},Pe=({isNewWebBuilder:e=!1,isExampleWebSite:t=!1,postsSection:n,generalSection:r})=>{let{featuredPosts:i,paginatedPosts:a}=l();return(0,R.jsxs)(`div`,{className:`mb-0 lg:mb-16`,children:[r?.theme.header_type==="default"&&(0,R.jsx)(z,{title:n.featured_sections.featured_posts_label,description:n.featured_sections?.featured_posts_description,posts:i,card:n?.card,fontFamily:n.featured_sections.font,isLoading:!1,isNewWebBuilder:e}),n.featured_sections.latest_posts_enabled&&(0,R.jsx)(z,{title:n.featured_sections.latest_posts_label,description:n.featured_sections?.latest_posts_description,posts:a.posts.slice(0,3),card:n?.card,fontFamily:n.featured_sections.font,isLoading:!1,isNewWebBuilder:e}),!t&&n.featured_sections.category_posts.map(t=>(0,R.jsx)(Ne,{category:t,fontFamily:n.featured_sections.font,card:n?.card,isNewWebBuilder:e},t))]})},B=({children:e,bgColor:t,className:n,bgImage:r})=>(0,R.jsx)(`section`,{style:{...r&&{backgroundImage:`url(${r})`},...t&&{backgroundColor:t}},className:(0,L.default)(n),children:e}),Fe=({authors:e,children:t,isMoreThanTwoAuthors:n,bgColor:r,textColor:i})=>{let[a,o]=(0,I.useState)(!1);return(0,R.jsx)(`div`,{className:`relative flex items-center`,children:n?(0,R.jsxs)(pe,{className:`relative cursor-pointer`,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[t,(0,R.jsx)(xe,{show:a,enter:`transition duration-100 ease-out`,enterFrom:`transform scale-95 opacity-0`,enterTo:`transform scale-100 opacity-100`,leave:`transition duration-75 ease-out`,leaveFrom:`transform scale-100 opacity-100`,leaveTo:`transform scale-95 opacity-0`,children:(0,R.jsx)(pe.Panel,{style:{...r&&{backgroundColor:r,borderColor:r}},className:`absolute left-0 top-2 flex w-60 flex-col space-y-2 rounded-sm border border-gray-100 px-2 py-4 shadow-sm focus:outline-none`,children:e.map(e=>(0,R.jsxs)(`div`,{className:`flex items-center space-x-2 rounded px-2 py-1`,children:[(0,R.jsx)(`div`,{className:`h-5 w-5 overflow-hidden rounded-full`,children:(0,R.jsx)(`img`,{className:`w-full`,src:e.profile_picture.thumb.url,loading:`lazy`,alt:`Profile thumb for author ${e.name}`},e.id)}),(0,R.jsx)(`span`,{style:{...i&&{color:i}},className:`-mb-0.5 whitespace-nowrap text-xs text-gray-700`,children:e.name})]},e.id))})})]}):(0,R.jsx)(`div`,{children:t})})},V=({publication:e,authors:t,homePage:n})=>{let{t:r}=a(),i=t.length===0,o=t.length===1,s=t.length===2,c=t.length>2,l=n.main_section.authors_widget.label||r(`author.byline`),u=n.main_section.authors_widget.text||``,d=n.main_section.authors_widget.text,f=e.email_sender_name;return(0,R.jsxs)(`div`,{className:`z-20`,children:[(0,R.jsx)(Fe,{bgColor:n.main_section.authors_widget.dropdown_bg_color,textColor:n.main_section.authors_widget.dropdown_text_color,authors:t,isMoreThanTwoAuthors:c,children:(0,R.jsxs)(`div`,{className:(0,L.default)(c?`flex flex-col space-y-2`:`flex space-x-2`),children:[(0,R.jsxs)(`div`,{children:[o&&(0,R.jsx)(`div`,{className:`flex -sp
3ace-x-1 overflow-hidden`,children:t.map(e=>(0,R.jsx)(`div`,{className:`h-5 w-5 overflow-hidden rounded-full`,children:(0,R.jsx)(P,{loading:`eager`,src:e.profile_picture.thumb.url,alt:`Profile thumb for author ${e.name}`,maxWidth:100,aspectRatio:`square`})},e.id))}),s&&(0,R.jsx)(`div`,{className:`flex -space-x-1 overflow-hidden`,children:t.map(e=>(0,R.jsx)(`img`,{className:`inline-block h-5 w-5 rounded-full`,loading:`eager`,src:e.profile_picture.thumb.url,alt:`Profile thumb for author ${e.name}`},e.id))}),c&&(0,R.jsxs)(`div`,{className:`flex -space-x-1 overflow-hidden`,children:[t.map((e,t)=>t<3?(0,R.jsx)(`img`,{className:`inline-block h-5 w-5 rounded-full`,src:e.profile_picture.thumb.url,loading:`eager`,alt:`Profile thumb for author ${e.name}`},e.id):null),t.length>3&&(0,R.jsx)(`div`,{className:`inline-block h-5 w-5 items-center justify-center rounded-full bg-gray-300`,children:(0,R.jsx)(`span`,{className:`text-xs font-semibold text-white`,children:`+`})})]})]}),(0,R.jsxs)(`div`,{className:`flex flex-col`,children:[!i&&(0,R.jsx)(_,{as:`span`,fontFamily:n.general_section.theme.font,color:n.main_section.authors_widget.text_color,className:`mb-0.5 whitespace-nowrap text-xs font-semibold`,children:l}),(0,R.jsxs)(`div`,{className:`flex`,children:[o&&(0,R.jsx)(_,{as:`span`,size:`xs`,weight:`light`,fontFamily:n.general_section.theme.font,color:n.main_section.authors_widget.text_color,className:`mr-0.5 line-clamp-1 opacity-75`,children:u||f||d||t[0].name}),s&&(0,R.jsx)(_,{as:`span`,size:`xs`,weight:`light`,fontFamily:n.general_section.theme.font,color:n.main_section.authors_widget.text_color,className:`mr-0.5 line-clamp-1 opacity-75`,children:u||f||d||`${t[0].name} & ${t[1].name}`}),c&&(0,R.jsx)(_,{as:`span`,size:`xs`,weight:`light`,fontFamily:n.general_section.theme.font,color:n.main_section.authors_widget.text_color,className:`mr-0.5 line-clamp-1 opacity-75`,children:u||f||d||e.name})]})]})]})}),i&&(0,R.jsxs)(`div`,{className:`flex flex-col`,children:[(0,R.jsx)(_,{as:`span`,fontFamily:n.general_section.theme.font,color:n.main_section.authors_widget.text_color,className:`mb-0.5 whitespace-nowrap text-xs font-semibold`,children:l}),(0,R.jsx)(_,{as:`span`,size:`xs`,fontFamily:n.general_section.theme.font,color:n.main_section.authors_widget.text_color,weight:`light`,className:`mr-0.5 line-clamp-1 opacity-75`,children:u||f||e.name})]})]})},Ie=({publication:e,size:t})=>(0,R.jsxs)(`div`,{className:`flex items-end space-x-2`,children:[e.twitter_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.twitter_url),"aria-label":`X`,children:(0,R.jsxs)(`svg`,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``),xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,children:[(0,R.jsx)(`title`,{children:`X`}),(0,R.jsx)(`g`,{children:(0,R.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})})]})}),e.linkedin_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.linkedin_url),"aria-label":`LinkedIn`,children:(0,R.jsxs)(`svg`,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``),xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,children:[(0,R.jsx)(`title`,{children:`LinkedIn`}),(0,R.jsx)(`path`,{d:`M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z`})]})}),e.youtube_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.youtube_url),"aria-label":`Youtube`,children:(0,R.jsxs)(`svg`,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``),xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:[(0,R.jsx)(`title`,{children:`YouTube`}),(0,R.jsx)(`path`,{d:`M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z`})]})}),e.tiktok_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.tiktok_url),"aria-label":`Tiktok`,children:(0,R.jsxs)(`svg`,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`
3sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``),xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 2859 3333`,shapeRendering:`geometricPrecision`,textRendering:`geometricPrecision`,imageRendering:`optimizeQuality`,fillRule:`evenodd`,clipRule:`evenodd`,children:[(0,R.jsx)(`title`,{children:`Tiktok`}),(0,R.jsx)(`path`,{d:`M2081 0c55 473 319 755 778 785v532c-266 26-499-61-770-225v995c0 1264-1378 1659-1932 753-356-583-138-1606 1004-1647v561c-87 14-180 36-265 65-254 86-398 247-358 531 77 544 1075 705 992-358V1h551z`})]})}),e.facebook_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.facebook_url),"aria-label":`Facebook`,children:(0,R.jsxs)(`svg`,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``),xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,children:[(0,R.jsx)(`title`,{children:`Facebook`}),(0,R.jsx)(`path`,{d:`M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z`})]})}),e.instagram_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.instagram_url),"aria-label":`Instagram`,children:(0,R.jsxs)(`svg`,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``),xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,children:[(0,R.jsx)(`title`,{children:`Instagram`}),(0,R.jsx)(`path`,{d:`M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z`})]})}),e.threads_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.threads_url),"aria-label":`Threads`,children:(0,R.jsx)(ue,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``)})}),e.discord_url&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(e.discord_url),"aria-label":`Discord`,children:(0,R.jsx)(le,{className:(0,L.default)(`fill-current opacity-40 hover:opacity-100`,t===`sm`?`h-4 w-4`:``,t===`md`?`h-6 w-6`:``)})})]}),Le=()=>{let e=s();return(0,I.useEffect)(()=>{e.load(`/authors?index`)},[]),{isLoading:!e?.data,authors:e?.data?.authors?.authors}},Re=(e,t)=>b[t][e],ze=e=>{let t=e.tiktok_url,n=e.twitter_url,r=e.youtube_url,i=e.facebook_url,a=e.instagram_url,o=e.linkedin_url,s=e.discord_url,c=e.threads_url;return t||n||r||i||a||o||s||c},Be=()=>{let{t:e}=a(),{isLoading:t,authors:n}=Le(),{homePage:r,publication:i}=F(),{general:o,content_container:s,headline:c,description:l,logo:u,signup_widget:d}=r.main_section,f=ee[o.bg_gloss_opacity||`0`],p=y[s.border_radius||`rounded-none`],m=Re(s.border_width,s.border_sides),h=v[s.padding||`p-0`],b=ze(i),{web_template:x}=i,S=be();return(0,R.jsxs)(B,{bgColor:o.bg_color,bgImage:r?.main_bg_image_url,className:`relative bg-cover bg-center bg-no-repeat px-4 pb-4 pt-16`,children:[(0,R.jsx)(`div`,{className:(0,L.default)(`absolute left-0 top-0 h-full w-full`,f),style:{backgroundColor:o.bg_color}}),(0,R.jsxs)(`div`,{className:`relative mx-auto max-w-6xl`,children:[(0,R.jsxs)(`div`,{className:(0,L.default)(`mx-auto mb-10 w-full`,s.padding===`none`?`max-w-xl`:`max-w-2xl`,h,p,m),style:{borderColor:s.border_color,backgroundColor:s.bg_color},children:[(0,R.jsxs)(`div`,{className:`flex-start flex flex-col items-center py-2`,children:[u.enabled&&(0,R.jsx)(`div`,{className:(0,L.default)({"mb-4 overflow-hidden rounded":!0,"h-16 w-16":u.size===`sm`,"h-20 w-20":u.size===`md`,"h-24 w-24":u.size===`lg`,"shadow-sm":u.shadow===`sm`,"shadow-md":u.shadow===`md`,"shadow-lg":u.shadow===`lg`,"shadow-xl":u.shadow===`xl`}),children:(0,R.jsx)(P,{maxWidth:128,aspectRatio:`square`,src:i.logo.url,alt:i.name})}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(_,{as:`h1`,size:c.size,weight:`bold`,fontFamily:c.font,color:c.color,className:`w-full text-center`,children:(0,R.jsx)(C,{children:c.text})}),(0,R.jsx)(_,{as:`div`,size:l.size,weight:`regular`,fontFamily:l.font,color:l.color,className:`w-full text-center`,children:(0,R.jsx)(C,{children:l.text})})]})]}),(0,R.jsx)(`div`,{className:`mx-auto mt-4 max-w-xl`,children:S&&x.logged_subscribe_form?(0,R.jsx)(R.Fragment,{}):(0,R.jsx)(N,{publication:i,fontFamily:g(d.font),placeholderText:d.placeholder_text,cta:d.cta_text,textColor:d.text_color,backgroundColor:d.bg_color})})]}),(0,R.jsxs)(`div`,{className:`flex items-end justify-between`,children:[!t&&i.render_authors_widget&&(0,R.jsx)(V,{authors:n,publication:i,homePage:r}),r.main_section.social_widget.enabled&&b&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(_,{as:`p`,fontFamily:r.general_section.theme.font,color:r.main_section.social_widget.text_color,className:`mb-1 whitespace-nowrap text-xs font-semibold`,children:r.main_section.social_widget.label||e(`shared.cta.connect`)}),(0,R.jsx)(_,{as:`span`,fontFamily:r.general_section.theme.font,color:r.main_section.social_widget.text_color,className:`mb-0.5 whitespace-nowrap text-xs font-semibold`,children:(0,R.jsx)(Ie,{publication:i,size:`sm`})})]})]})]})]})},H=(e,t)=>{let n,r=[];t.forEach((e,t)=>{t===0?n=e:r.push(e)});let i=r.length;
3return e.forEach(e=>{if(!n){n=e;return}i>=4||(r.push(e),i++)}),{headliner:n,rightPanelPosts:r}},Ve=()=>{let{t:e}=a(),{homePage:t,publication:n,featuredPosts:r,paginatedPosts:i}=F(),{headliner:o,rightPanelPosts:s}=H(i.posts,r),c=t?.general_section?.header?.width;return(0,R.jsx)(`div`,{className:`px-4`,children:(0,R.jsx)(`div`,{className:(0,L.default)(`mx-auto mb-12 pr-4 pt-8`,c===`full`?`w-full`:`w-full max-w-6xl`),children:(0,R.jsxs)(`div`,{className:`flex flex-col gap-0 md:flex-row md:gap-8`,children:[(0,R.jsxs)(`div`,{className:`w-full md:w-2/3`,children:[o&&(0,R.jsxs)(j,{slug:o?.slug,className:(0,L.default)(`group relative flex w-full flex-col overflow-hidden rounded shadow-xl`),children:[(0,R.jsx)(A,{alt:o?.web_title,src:o?.image_url,radiusClass:`rounded-xs`}),(0,R.jsx)(`div`,{className:`absolute left-6 top-6`,children:(0,R.jsx)(`div`,{style:{backgroundColor:t?.general_section?.theme?.accent_color},className:`px-2 py-1`,children:(0,R.jsx)(`span`,{className:`font-semibold capitalize text-white`,children:o?.content_tags?.[0]?.name||e(`posts.featured`)})})}),(0,R.jsx)(`div`,{className:`absolute bottom-0 flex h-full w-full flex-col justify-end space-y-1 bg-black bg-opacity-20 p-4 transition-all group-hover:bg-opacity-0`,children:(0,R.jsx)(_,{as:`h2`,size:`6xl`,fontFamily:t?.general_section?.theme?.font,weight:`bold`,color:`#ffffff`,children:o?.web_title})})]}),(0,R.jsx)(`div`,{className:`pt-6`,children:(0,R.jsx)(N,{publication:n,fontFamily:g(t.main_section.signup_widget.font),placeholderText:t.main_section.signup_widget.placeholder_text,cta:t.main_section.signup_widget.cta_text,textColor:t.main_section.signup_widget.text_color,backgroundColor:t.main_section.signup_widget.bg_color})})]}),(0,R.jsx)(`div`,{className:`w-full md:w-1/3`,children:s.map((e,n)=>(0,R.jsx)(`div`,{className:`border-b`,style:{borderColor:t?.general_section?.theme?.border_color},children:(0,R.jsx)(j,{slug:e?.slug,className:(0,L.default)(`group relative flex w-full flex-col space-y-2 py-5 transition-all`),children:(0,R.jsxs)(`div`,{className:`flex items-center justify-between space-x-4`,children:[(0,R.jsxs)(`div`,{className:``,children:[(0,R.jsx)(_,{as:`span`,size:`sm`,fontFamily:t?.general_section?.theme?.font,weight:`bold`,color:t?.general_section?.theme?.accent_color,className:`capitalize`,children:e?.content_tags?.[0]?.name}),(0,R.jsx)(re,{title:e.web_title,subtitle:e?.web_subtitle,textClassName:`group-hover:underline`,fontFamily:t?.general_section?.theme?.font,titleSize:`lg`,subtitleSize:`xs`,titleColor:t?.general_section?.theme?.text_color,subtitleColor:t?.general_section?.theme?.text_color})]}),(0,R.jsx)(`div`,{style:{color:t?.general_section?.theme?.text_color,borderColor:t?.general_section?.theme?.text_color}
3,className:`h-fit rounded-full border p-2`,children:(0,R.jsx)(S,{className:`h-6 w-6`})})]})})},e.id))})]})})})},He=(e,t)=>{let n,r=[],i=[];t.forEach((e,t)=>{t===0?n=e:r.length<2?r.push(e):i.push(e)});let a=i.length,o=r.length;return e.forEach(e=>{if(!n){n=e;return}if(o<2){r.push(e),o++;return}a>=4||(i.push(e),a++)}),{headliner:n,leftPanelPosts:r,rightPanelPosts:i}},Ue=()=>{let{homePage:e,publication:t,paginatedPosts:n,featuredPosts:r}=F(),i=n.posts,{headliner:a,leftPanelPosts:o,rightPanelPosts:s}=He(i,r),c=e?.general_section?.header?.width;return(0,R.jsx)(`div`,{className:`w-full px-4 py-12 pt-8`,children:(0,R.jsxs)(`div`,{style:c===`full`?{maxWidth:`1600px`}:{},className:(0,L.default)(`mx-auto grid grid-cols-12 gap-0 transition-all md:gap-6`,c===`full`?`w-full`:`max-w-6xl`),children:[(0,R.jsx)(`div`,{className:`col-span-12 w-full md:col-span-3 md:block`,children:(0,R.jsx)(`div`,{className:`space-y-2`,children:o.map((t,n)=>{let r=t.audience===`premium`;return(0,R.jsxs)(j,{slug:t?.slug,className:(0,L.default)(`group flex w-full flex-col transition-all`),children:[(0,R.jsx)(A,{alt:t.web_title,src:t.image_url}),(0,R.jsx)(`div`,{className:(0,L.default)(`flex flex-col justify-between space-y-6 py-4`),children:(0,R.jsxs)(`div`,{className:`space-y-1`,children:[r&&(0,R.jsx)(oe,{fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.accent_color}),(0,R.jsx)(re,{title:t.web_title,subtitle:t?.web_subtitle,fontFamily:e?.general_section?.theme?.font,titleSize:`xl`,subtitleSize:`md`,titleColor:e?.general_section?.theme?.text_color,subtitleColor:e?.general_section?.theme?.text_color,textClassName:`group-hover:underline`})]})})]},t.id)})})}),(0,R.jsxs)(`div`,{className:`col-span-12 w-full space-y-4 md:col-span-9 lg:col-span-6`,children:[a?(0,R.jsxs)(j,{slug:a?.slug,className:(0,L.default)(`group flex w-full flex-col transition-all`),children:[(0,R.jsx)(A,{alt:a?.web_title,src:a?.image_url}),(0,R.jsx)(`div`,{className:(0,L.default)(`flex flex-col justify-between space-y-6 py-4`),children:(0,R.jsxs)(`div`,{className:`space-y-3`,children:[a?.audience===`premium`&&(0,R.jsx)(oe,{fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.accent_color}),(0,R.jsx)(re,{title:a?.web_title,subtitle:a?.web_subtitle,fontFamily:e?.general_section?.theme?.font,titleSize:`2xl`,subtitleSize:`lg`,titleColor:e?.general_section?.theme?.text_color,subtitleColor:e?.general_section?.theme?.text_color,textClassName:`group-hover:underline`})]})})]}):null,(0,R.jsx)(N,{publication:t,fontFamily:g(e.main_section.signup_widget.font),placeholderText:e.main_section.signup_widget.placeholder_text,cta:e.main_section.signup_widget.cta_text,textColor:e.main_section.signup_widget.text_color,backgroundColor:e.main_section.signup_widget.bg_color})]}),(0,R.jsx)(`div`,{className:`col-span-12 w-full lg:col-span-3 lg:block`,children:(0,R.jsx)(`div`,{className:`flex flex-col space-y-2`,children:s.map((t,n)=>{let r=t.audience===`premium`;return(0,R.jsx)(`div`,{className:`border-b`,style:{borderColor:e?.general_section?.theme?.border_color},children:(0,R.jsx)(j,{slug:t?.slug,className:(0,L.default)(`group relative flex w-full flex-col space-y-2 py-4 pb-4 transition-all`),children:(0,R.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,R.jsxs)(`div`,{className:``,children:[r&&(0,R.jsx)(oe,{fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.accent_color}),(0,R.jsx)(re,{title:t.web_title,subtitle:t?.web_subtitle,textClassName:`group-hover:underline`,fontFamily:e?.general_section?.theme?.font,titleSize:`md`,subtitleSize:`xs`,titleColor:e?.general_section?.theme?.text_color,subtitleColor:e?.general_section?.theme?.text_color})]})})})},t.id)})})})]})})},We=()=>{let{homePage:e}=F();switch(e.general_section.theme.header_type){case`headliner`:return(0,R.jsx)(Ve,{});case`news`:return(0,R.jsx)(Ue,{});default:return(0,R.jsx)(Be,{})}},Ge=({path:e})=>{let{t}=a(),n=t(`errors.404.title`),s=t(`errors.404.description`),l=t(`errors.404.description2`),{homePage:u}=F(),{general:d,headline:f,description:p}=u.main_section,m=r(),{pathname:h}=i(),[g]=o();return(0,I.useEffect)(()=>{g.has(`404`)||m(`/?${new URLSearchParams({404:h})}`)},[`404`,h,g,m]),(0,R.jsx)(`div`,{className:(0,L.default)(`mx-auto flex w-full items-center justify-center px-4 py-24`),style:{backgroundColor:d.bg_color},children:(0,R.jsx)(`div`,{className:(0,L.default)(`mx-auto max-w-max`),children:(0,R.jsxs)(`main`,{className:`sm:flex`,children:[(0,R.jsx)(`p`,{className:`text-4xl font-extrabold sm:text-5xl`,style:{color:f.color},children:`404`}),(0,R.jsx)(`div`,{className:`sm:ml-6`,children:(0,R.jsxs)(`div`,{className:(0,L.default)(`sm:border-l sm:border-gray-200 sm:pl-6`),children:[(0,R.jsx)(`h1`,{className:`text-4xl font-extrabold tracking-tight sm:text-5xl`,style:{color:f.color},children:n}),(0,R.jsxs)(`p`,{className:`mb-2 mt-2 text-base`,style:{color:p.color},children:[s,`:`,` `,(0,R.jsx)(c,{to:e,className:`font-mono underline`,children:e})]}),(0,R.jsx)(`p`,{className:`mb-2 mt-2 text-base`,style:{color:p.color},children:l})]})})]})})})},Ke=()=>(0,R.jsx)(h,{className:`mx-auto w-full max-w-6xl`,children:(0,R.jsx)(`div`,{id:`header-ad-placement`})}),U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},U.apply(this,arguments)};function W(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function G(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function qe(e,t,n){if(n||arguments.length===2)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||=Array.prototype.slice.call(t,0,i),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var Je=(0,I.memo)(function(e){var t=e.responsiveProps,n=t===void 0?[]:t,r=W(e,[`responsiveProps`]),i=G((0,I.useState)(0),2),a=i[0],o=i[1],s=G((0,I.useState)(r.activeSlideIndex),2),c=s[0],l=s[1],u=(0,I.useRef)(null),d=(0,I.useRef)(null),f=(0,I.useRef)(null),p=(0,I.useRef)(!1),m=(0,I.useRef)(0),h=(0,I.useRef)(!1),g=(0,I.useRef)(``),_=(0,I.useRef)(null),v=(0,I.useRef)(null),y=(0,I.useRef)(0),ee=(0,I.useRef)(c),b=n.reduce(function(e,t){t===void 0&&(t={});var n=t.minWidth,r=n===void 0?0:n,i=t.maxWidth,o=i===void 0?null:i,s=W(t,[`minWidth`,`maxWidth`]);return a>r&&(!o||a<=o)?U(U({},e),s):e},r),x=I.Children.toArray(b.children),S=a?U(U({},b),{activeSlideIndex:Math.max(0,Math.min(b.activeSlideIndex,x.length-1)),itemsToShow:Math.min(x.length,b.itemsToShow||0),itemsToScroll:Math.min(x.length,b.itemsToScroll||1)}):r,C=S.containerProps,w=C===void 0?{}:C,T=w.style,E=T===void 0?{}:T,D=W(w,[`style`]),O=S.innerProps,te=O===void 0?{}:O,k=te.style,ne=k===void 0?{}:k,re=W(te,[`style`]),A=S.itemsListProps,ie=A===void 0?{}:A,ae=ie.style,oe=ae===void 0?{}:ae,se=ie.onTransitionEnd,j=se===void 0?void 0:se,ce=W(ie,[`style`,`onTransitionEnd`]),le=S.backwardBtnProps,ue=le===void 0?{}:le,de=ue.children,fe=de===void 0?null:de,M=ue.show,pe=M===void 0||M,me=W(ue,[`children`,`show`]),he=S.forwardBtnProps,ge=he===void 0?{}:he,_e=ge.children,ve=_e===void 0?null:_e,ye=ge.show,be=ye===void 0||ye,N=W(ge,[`children`,`show`]),P=S.activeSlideProps,xe=P===void 0?{}:P,Se=xe.className,Ce=Se===void 0?``:Se,F=xe.style,we=F===void 0?{}:F,Te=W(xe,[`className`,`style`]),Ee=S.visibleSlideProps,De=Ee===void 0?{}:Ee,Oe=De.className,ke=Oe===void 0?``:Oe,Ae=De.style,L=Ae===void 0?{}:Ae,je=W(De,[`className`,`style`]),R=S.updateOnItemClick,Me=R!==void 0&&R,z=S.activeSlideIndex,Ne=S.onRequestChange,Pe=S.speed,B=Pe===void 0?0:Pe,Fe=S.delay,V=Fe===void 0?0:Fe,Ie=S.easing,Le=Ie===void 0?`linear`:Ie,Re=S.itemsToShow,ze=Re===void 0?0:Re,Be=S.itemsToScroll,H=Be===void 0?1:Be,Ve=S.children,He=S.onAfterChange,Ue=S.autoplay,We=Ue!==void 0&&Ue,Ge=S.autoplayDirection,Ke=Ge===void 0?`forward`:Ge,Je=S.disableNavIfAllVisible,Ye=Je===void 0||Je,Xe=S.hideNavIfAllVisible,Ze=Xe===void 0||Xe,Qe=S.centerMode,$e=Qe!==void 0&&Qe,et=S.infinite,K=et===void 0||et,tt=S.disableNavIfEdgeVisible,nt=tt===void 0||tt,rt=S.disableNavIfEdgeActive,it=rt===void 0||rt,at=S.dotsNav,ot=at===void 0?{}:at,st=S.persistentChangeCallbacks,ct=st!==void 0&&st,lt=S.autoplayDelay,ut=lt===void 0?0:lt,dt=S.preventScrollOnSwipe,ft=dt!==void 0&&dt,pt=S.disableSwipeByMouse,mt=pt!==void 0&&pt,ht=S.disableSwipeByTouch,gt=ht!==void 0&&ht,_t=S.touchSwipeTreshold,q=S.mouseSwipeTreshold,vt=S.swipeTreshold,yt=S.touchSwipeRatio,bt=S.mouseSwipeRatio,xt=S.swipeRatio,St=xt===void 0?1:xt,Ct=S.dirRTL,wt=Ct!==void 0&&Ct,Tt=ot||{},Et=Tt.show,Dt=Et!==void 0&&Et,Ot=Tt.containerProps,kt=Ot===void 0?{}:Ot,At=Tt.itemBtnProps,jt=At===void 0?{}:At,Mt=Tt.activeItemBtnProps,Nt=Mt===void 0?{}:Mt,J=I.Children.count(Ve)-1,Pt=!!a&&d.current?.offsetWidth>=f.current?.offsetWidth,Ft=Ze&&Pt,Y=Ye&&Pt,It=z-c===0||!B&&!V?`none`:`transform ${B}ms ${Le} ${V}ms`,Lt=(0,I.useCallback)(function(e){var t=e.correctionSlideIndex,n=e.prevCorrectionSlideIndex,r=e.curActiveSlideIndex,i=f.current.offsetWidth,a=f.current.children,o=a.length,s=K?qe([],G(a),!1).slice(o/3-n,o/3-n+o/3):qe([],G(a),!1),c=s[r]?.offsetWidth,l=ze?s.reduce(function(e,t,n){return n>=r&&n<r+ze||n<r&&n<r+ze-s.length?e+t.offsetWidth:e},0):d.current.offsetWidth,u=Math.min(l,d.current.offsetWidth),p=i-u,m=$e&&K?-(u-c)/2:0,h=K?i/3:0,_=t-r===0?0:g.current===`forward`&&r<t?h:g.current===`backward`&&r>t?-h:0,v=r-t!==0,y=function(e){var t=s.reduce(function(t,n,r){return r>=e?t:t+(n.offsetWidth||0)},0);return K?t:Math.min(p,t)},ee=v&&K?y(t):0,b=v||!K?y(r):0,x=Y?0:b-ee+m+_+h,S=`translateX(${wt?``:`-`}${x}px)`,C=K?h+m:Math.min(p,s.reduce(function(e,t,n){return n<r?e+t.offsetWidth:e},0)),w=C+u,T=s.map(function(e,t){return{slideIndex:t,htmlElement:e}}),E=(K?qe(qe(qe(qe([],G(s.slice(r).map(function(e,t){return{slideIndex:t+r,htmlElement:e}})),!1),G(T),!1),G(T),!1),G(s.slice(0,r).map(function(e,t){return{slideIndex:t,htmlElement:e}})),!1):T).reduce(function(e,t){var n=t.slideIndex,r=t.htmlElement.offsetWidth;return(e.summ>=C&&e.summ<w||e.summ+r>C&&e.summ+r<=w)&&e.items.push({slideIndex:n,isFullyVisible:e.summ+r<=w&&e.summ>=C}),e.summ+=r,e},{summ:0,items:[]}),D=!!E.items.find(function(e){return e.slideIndex===0}),O=!!E.items.find(function(e){return e.slideIndex===s.length-1});return{slidesHTMLElements:s,innerMaxWidth:l,itemsListMaxTranslateX:p,activeSlideWidth:c,offsetCorrectionForCenterMode:m,offsetCorrectionForInfiniteMode:h,itemsListTranslateX:x,itemsListTransform:S,visibleSlides:E.items,isFirstSlideVisible:D,isLastSlideVisible:O}},[$e,Y,K,ze,wt]),X=a?Lt({prevCorrectionSlideIndex:ee.current,curActiveSlideIndex:z,correctionSlideIndex:c}):{},Rt=X.innerMaxWidth,zt=Rt===void 0?0:Rt,Bt=X.itemsListMaxTranslateX,Vt=Bt===void 0?0:Bt,Ht=X.activeSlideWidth,Ut=Ht===void 0?0:Ht,Wt=X.offsetCorrectionForCenterMode,Gt=Wt===void 0?0:Wt,Kt=X.offsetCorrectionForInfiniteMode,qt=Kt===void 0?0:Kt,Jt=X.itemsListTranslateX,Z=Jt===void 0?0:Jt,Yt=X.itemsListTransform,Xt=Yt===void 0?`none`:Yt,Zt=X.visibleSlides,Qt=Zt===void 0?[]:Zt,Q=(0,I.useCallback)(function(e){var t;return e===`forward`?(t=z+H)>J?K?t-J-1:J:t:e===`backward`?(t=z-H)<0?K?J+1+t:0:t:z},[z,H,J,K]),$=(0,I.useCallback)(function(e,t){if(g.current=t,f.current.style.transition=B||V?`transform ${B}ms ${Le} ${V}ms`:`none`,e!==z||ct){clearTimeout(_.current);var n=Lt({correctionSlideIndex:c,prevCorrectionSlideIndex:c,curActiveSlideIndex:e}),r=n.visibleSlides,i=n.isFirstSlideVisible,a=n.isLastSlideVisible,o=n.itemsListTransform;e!==z&&f.current?.style.transform===o&&(p.current=!0),f.current.style.transform=o,Ne(e,{visibleSlides:r,isFirstSlideVisible:i,isLastSlideVisible:a})}else f.current.style.transform=`translateX(${wt?``:`-`}${Gt+qt+(K?0:Z)}
3px)`},[ct,z,Gt,V,Le,B,Ne,qt,K,Z,c,Lt,wt]),$t=(0,I.useCallback)(function(){We&&(clearTimeout(_.current),_.current=setTimeout(function(){$(Q(Ke),Ke)},ut||V))},[We,Ke,ut,$,Q,V]),en=(0,I.useCallback)(function(){$(Q(`backward`),`backward`)},[$,Q]),tn=(0,I.useCallback)(function(e){l(z),j&&j(e)},[z,j]),nn=(0,I.useCallback)(function(){$(Q(`forward`),`forward`)},[$,Q]),rn=function(e,t,n){return e.map(function(e,r){var i=e.props,a=i===void 0?{}:i,o=a.className,s=o===void 0?``:o,c=a.onClick,l=c===void 0?null:c,u=a.style,d=u===void 0?{}:u,f=W(a,[`className`,`onClick`,`style`]),p=W(e,[`props`]),m=K?y.current>=x.length?`forward`:`backward`:r>=z?`forward`:`backward`,h=r+t===z,g=Qt.find(function(e){return e.slideIndex===r+t}),_=`${s} ${h?Ce:``} ${g?ke:``}`.trim()||void 0,v=U(U(U(U({},d),g?L:{}),h?we:{}),{boxSizing:`border-box`,margin:0}),ee=!n&&Me?function(e){var t=e.direction,n=e.index,r=e.onClick;return function(e){$(n,t||(z<n?`forward`:``)||(z>n?`backward`:``)),r&&r(e)}}({direction:m,index:r+t,onClick:l}):l,b=U(U(U({role:`tabpanel`,className:_,style:v,onClick:ee},f),g?je:{}),h?Te:{});return y.current+=1,U({props:b},p)})};return(0,I.useEffect)(function(){var e=f.current,t={capture:!0,once:!0};function n(e){e.preventDefault(),e.stopPropagation()}function r(e){var t=!!e.touches?.[0],n=t?e.touches?.[0].clientX:e.clientX,r=m.current-n;if(h.current||!(Math.abs(r)<=5)){h.current=!0;var i=r*((t?yt:bt)||St)+Gt+qt+(K?0:Z),a=f.current.offsetWidth,o=Math.max(-i,-a);f.current.style.transition=`none`,f.current.style.transform=`translateX(${(wt?-1:1)*o}px)`}}function i(a){if(document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.removeEventListener(`touchmove`,r),document.removeEventListener(`touchend`,i),h.current){var o=!!a.changedTouches?.[0],s=o?a.changedTouches[a.changedTouches.length-1].clientX:a.clientX,c=(m.current-s)*((o?yt:bt)||St);Math.abs(m.current-s)>5&&(e?.removeEventListener(`click`,n,t),e?.addEventListener(`click`,n,t));var l=(o?_t:q)||vt||Ut/2,u=c>l?{index:Q(`forward`),direction:`forward`}:c<-l?{index:Q(`backward`),direction:`backward`}:{index:z,direction:`forward`};$(u.index,u.direction)}m.current=0,h.current=!1}function a(e){clearTimeout(_.current);var t=!!e.touches?.[0];h.current=!1,m.current=t?e.touches?.[0].clientX:e.clientX,t?(document.addEventListener(`touchmove`,r),document.addEventListener(`touchend`,i)):(document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i))}return Y||(mt||e==null||e.addEventListener(`mousedown`,a),gt||e==null||e.addEventListener(`touchstart`,a,{passive:!0}),mt&&gt||e==null||e.addEventListener(`dragstart`,i)),function(){h.current=!1,m.current=0,e?.removeEventListener(`click`,n,t),e?.removeEventListener(`mousedown`,a),e?.removeEventListener(`touchstart`,a),e?.removeEventListener(`dragstart`,i),document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.removeEventListener(`touchmove`,r),document.removeEventListener(`touchend`,i)}},[K,Z,Xt,Gt,qt,z,Ut,Q,$,Y,mt,gt,_t,q,vt,yt,bt,St,wt]),(0,I.useEffect)(function(){return z===c?(He&&He(z,c),(K||Ke===`forward`&&z!==J||Ke===`backward`&&z!==0)&&$t()):(!B&&!V||p.current)&&(p.current=!1,l(z)),function(){clearTimeout(_.current)}},[c,z,He,B,V,$t,K,J,Ke]),(0,I.useEffect)(function(){return a&&$t(),function(){clearTimeout(_.current)}},[a]),(0,I.useEffect)(function(){function e(){clearTimeout(v.current),clearTimeout(_.current),v.current=setTimeout(function(){a!==window.innerWidth&&o(0)},400)}return a!==window.innerWidth&&o(window.innerWidth),window.addEventListener(`resize`,e),function(){clearTimeout(v.current),window.removeEventListener(`resize`,e)}},[a]),y.current=0,ee.current=c,I.createElement(`div`,U({style:U({display:`flex`,flexFlow:`row wrap`,boxSizing:`border-box`,justifyContent:`center`,width:`100%`},E)},D,{ref:u}),pe&&!Ft&&I.createElement(`button`,U({},me,{type:`button`,onClick:(Z===0&&nt||z===0&&it)&&!K?void 0:en,disabled:typeof me.disabled==`boolean`?me.disabled:!(!(Z===0&&nt||z===0&&it)||K)}),fe),I.createElement(`div`,U({},re,{style:U(U({width:`100%`},ne),{display:`flex`,boxSizing:`border-box`,flexFlow:`row wrap`,padding:`0`,overflow:`hidden`,maxWidth:zt?`${zt}px`:void 0,flex:zt?void 0:`1 0 auto`}),ref:d}),I.createElement(`div`,U({},ce,{style:U(U({},oe),{display:`flex`,boxSizing:`border-box`,outline:`none`,transition:It,transform:Xt,touchAction:ft?`none`:`auto`}),onTransitionEnd:B||V?tn:j,tabIndex:-1,role:`presentation`,ref:f}),K&&rn(x.slice(c),c,Y),rn(x,0,Y),K&&rn(x,0,Y),K&&rn(x.slice(0,c),0,Y))),be&&!Ft&&I.createElement(`button`,U({},N,{type:`button`,onClick:(Z===Vt&&nt||z===J&&it)&&!K?void 0:nn,disabled:typeof N.disabled==`boolean`?N.disabled:!(!(Z===Vt&&nt||z===J&&it)||K)}
3),ve),!!Dt&&I.createElement(`div`,U({style:{width:`100%`,display:`flex`,justifyContent:`center`}},kt),Array.from({length:Math.ceil(x.length/H)}).map(function(e,t){return I.createElement(`button`,U({type:`button`,key:t,title:`${t}`},jt,z>=t*H&&z<Math.min(H*(t+1),J+1)?Nt:{},{onClick:function(){$(Math.min(t*H,x.length-1),Math.min(t*H,x.length-1)>z?`forward`:`backward`)}}))})))}),Ye=()=>{let{cardStyles:e,featuredPosts:t}=F(),[n,r]=(0,I.useState)(0);return(0,R.jsx)(`div`,{className:`relative`,children:(0,R.jsx)(Je,{activeSlideIndex:n,onRequestChange:r,itemsToShow:1,itemsToScroll:1,infinite:!0,forwardBtnProps:{className:`absolute text-white bottom-5 left-36 rounded-full z-10`,show:!0,children:(0,R.jsx)(Ae,{className:`h-4 w-4 text-white`})},backwardBtnProps:{className:`absolute text-white bottom-5 left-8 rounded-full z-10`,show:!0,children:(0,R.jsx)(x,{className:`h-4 w-4 text-white`})},dotsNav:{show:!0,containerProps:{className:`absolute left-14 bottom-4 w-full space-x-1`,style:{bottom:`18px`,justifyContent:`left`}},itemBtnProps:{className:`text-white h-2.5 w-2.5 rounded-full border border-white bg-transparent border-white`},activeItemBtnProps:{className:`text-white h-2.5 w-2.5 rounded-full border bg-white border-white`}},responsiveProps:[{itemsToShow:1,itemsToScroll:1}],speed:300,easing:`linear`,children:t.map(t=>(0,R.jsxs)(`div`,{className:`relative h-full w-screen border`,children:[(0,R.jsx)(O,{alt:t.web_title,radiusClass:``,hasRadiusApplied:!1,src:t.image_url}),(0,R.jsx)(`div`,{className:`absolute bottom-0 w-full p-8 pb-12`,children:(0,R.jsxs)(`div`,{className:`flex justify-between`,children:[(0,R.jsxs)(`div`,{className:`max-w-md space-y-4`,children:[e?.tags_enabled&&(0,R.jsx)(te,{className:`relative`,tags:t.content_tags,cardStyles:e}),(0,R.jsx)(D,{title:{text:t.web_title,fontFamily:e.heading_font_family,color:`#ffffff`},subtitle:{text:t?.web_subtitle||``,fontFamily:e.description_font_family,color:`#ffffff`}})]}),(0,R.jsxs)(`div`,{className:`flex flex-col items-end justify-end space-y-2`,children:[(0,R.jsx)(E,{fontFamily:e.font,bgColor:e.premium_bg_color,color:e.premium_text_color}),(0,R.jsx)(T,{authors:t.authors,color:`#ffffff`,bgColor:e.bg_color,font:e.font}),e.timefields_enabled&&(0,R.jsx)(k,{fontFamily:e.font,color:`#ffffff`,timestamp:t.override_scheduled_at})]})]})})]},t.id))})})},Xe=`https://media.beehiiv.com/static_assets/site_builder/authors/oliver_buchanan.png`,Ze={id:`author123`,name:`Oliver Buchannon`,profile_picture:{thumb:Xe,url:Xe,landscape:Xe}},Qe=`https://media.beehiiv.com/static_assets/site_builder/authors/kyra_singh.png`,$e={name:`Kyra Singh`,profile_picture:{thumb:Qe,url:Qe,landscape:Qe},id:`author2`},et=`https://media.beehiiv.com/static_assets/site_builder/authors/natalia_mirescu.png`,K={name:`Natalia Mirescu`,profile_picture:{thumb:et,url:et,landscape:et},id:`author3`},tt=`https://media.beehiiv.com/static_assets/site_builder/authors/liam_mckenzie.png`,nt={name:`Liam McKenzie`,profile_picture:{thumb:tt,url:tt,landscape:tt},id:`author4`},rt=`https://media.beehiiv.com/static_assets/site_builder/authors/catalina_vidal.png`,it={name:`Catlina Vidal`,profile_picture:{thumb:rt,url:rt,landscape:rt},id:`author5`},at=`https://media.beehiiv.com/static_assets/site_builder/authors/allessandro_rossi.png`,ot={name:`Alessandro Rossi`,profile_picture:{thumb:at,url:at,landscape:at},id:`author6`},st=({isExampleSite:e,authors:t})=>e?[Ze,nt,$e,ot,it,K]:t,ct=(e,t)=>b[t][e],lt=(e,t,n)=>{switch(e){case`auto`:return{backgroundSize:`cover`};case`custom`:return{backgroundSize:`${t}px ${n}px`};case`auto-height`:return{backgroundSize:`${t}px auto`};case`auto-width`:return{backgroundSize:`auto ${n}px`}}},ut=e=>{let t=e.tiktok_url,n=e.twitter_url,r=e.youtube_url,i=e.facebook_url,a=e.instagram_url,o=e.linkedin_url,s=e.discord_url,c=e.threads_url,l=e.bluesky_url;return t||n||r||i||a||o||s||c||l},dt=()=>{let{t:e}=a(),{isLoading:t,authors:n}=Le(),{homePage:r,publication:i,signupWidgetConfigs:o,showExampleSite:s}=F(),c=st({isExampleSite:s,authors:n}),{general:l,content_container:u,headline:d,description:p,logo:m}=r.main_section,g=ee[l.bg_gloss_opacity||`0`],b=u.bg_color===`transparent`,x=u.border_color===`transparent`,S=b&&x,w=y[u.border_radius||`rounded-none`],E=ct(u.border_width,u.border_sides),D=S?`p-0`:v[u.padding||`p-0`],O=ut(i),{web_template:te}=i,k=be(),ne=r.main_section.authors_widget.label||e(`author.byline`),re=r.main_section.authors_widget.text||``,A=r?.main_bg_image_url;return(0,R.jsxs)(`div`,{className:`relative py-8`,style:{backgroundColor:l.bg_color,...A&&{backgroundImage:`url(${A})`},backgroundPosition:`center`,backgroundRepeat:`no-repeat`,...lt(r?.main_section.general.bg_size,r?.main_section.general.bg_width,r?.main_section.general.bg_height)},children:[A&&(0,R.jsx)(`div`,{className:(0,L.default)(`absolute left-0 top-0 h-full w-full`,g),style:{backgroundColor:l.bg_color}}),(0,R.jsx)(`div`,{className:`relative left-0 top-0 h-full w-full`,children:(0,R.jsxs)(h,{children:[(0,R.jsxs)(`div`,{className:(0,L.default)(`mx-auto mb-10 w-full`,(u.padding,`max-w-2xl`),D,w,E),style:{borderColor:u.border_color,backgroundColor:u.bg_color},children:[(0,R.jsxs)(`div`,{className:`flex-start flex flex-col items-center py-2`,children:[m.enabled&&(0,R.jsx)(`div`,{className:(0,L.default)({"mb-4 overflow-hidden rounded":!0,"h-16 w-16":m.size===`sm`,"h-20 w-20":m.size===`md`,"h-24 w-24":m.size===`lg`,"shadow-sm":m.shadow===`sm`,"shadow-md":m.shadow===`md`,"shadow-lg":m.shadow===`lg`,"shadow-xl":m.shadow===`xl`}),children:(0,R.jsx)(P,{maxWidth:128,aspectRatio:`square`,src:i.logo.url,alt:i.name})}),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(`div`,{className:`mx-auto w-full max-w-xl`,children:(0,R.jsx)(_,{as:`h1`,size:d.size,weight:`bold`,fontFamilyv2:d.font,color:d.color,className:`w-full text-center`,children:(0,R.jsx)(C,{children:d.text})})}
3),(0,R.jsx)(_,{as:`div`,weight:`regular`,size:p.size,fontFamilyv2:p.font,color:p.color,className:`w-full text-center`,children:(0,R.jsx)(C,{children:p.text})})]})]}),(0,R.jsx)(`div`,{className:`mx-auto mt-4 max-w-sm sm:max-w-lg`,children:k&&te.logged_subscribe_form?(0,R.jsx)(R.Fragment,{}):(0,R.jsx)(f,{signupStyles:o})})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4`,children:[!t&&r?.main_section?.authors_widget?.enabled&&(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(_,{as:`span`,fontFamily:r.general_section.theme.font,fontFamilyv2:r.general_section.theme.font,color:r.main_section.authors_widget.text_color,className:`whitespace-nowrap text-xs font-semibold`,children:ne}),(0,R.jsx)(T,{authors:c,color:r.main_section.authors_widget.text_color,bgColor:`#FFFFFF`,font:r.general_section.theme.font,fallbackName:re||i.email_sender_name||i.name})]}),r.main_section.social_widget.enabled&&O&&(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(_,{as:`p`,fontFamily:r.general_section.theme.font,fontFamilyv2:r.general_section.theme.font,color:r.main_section.social_widget.text_color,className:`whitespace-nowrap text-xs font-semibold`,children:r.main_section.social_widget.label||e(`shared.cta.connect`)}),(0,R.jsx)(de,{publication:i,bgColor:r.main_section.social_widget.icons_bg_color,fillColor:r.main_section.social_widget.icons_text_color})]})]})]})})]})},ft=(e,t)=>{let n,r=[];t.forEach((e,t)=>{t===0?n=e:r.push(e)});let i=r.length;return e.forEach(e=>{if(!n){n=e;return}i>=4||(r.push(e),i++)}),{headliner:n,rightPanelPosts:r}},pt=()=>{let{homePage:e,featuredPosts:t,paginatedPosts:n,cardStyles:r,signupWidgetConfigs:i}=F(),{headliner:a,rightPanelPosts:o}=ft(n.posts,t);return(0,R.jsx)(h,{className:(0,L.default)(`mx-auto py-4`),children:(0,R.jsxs)(`div`,{className:`flex flex-col gap-0 md:flex-row md:gap-8`,children:[(0,R.jsx)(`div`,{className:`w-full md:w-3/5`,children:(0,R.jsxs)(`div`,{className:`flex flex-col`,children:[a&&(0,R.jsx)(`div`,{className:`relative`,children:(0,R.jsxs)(w,{slug:a?.slug,className:(0,L.default)(`group relative flex w-full flex-col overflow-hidden rounded shadow-xl`),children:[(0,R.jsx)(O,{alt:a.web_title,radiusClass:``,hasRadiusApplied:!0,src:a.image_url}),(0,R.jsx)(`div`,{className:`absolute bottom-0 flex h-full w-full flex-col justify-end space-y-1 bg-black bg-opacity-10 p-4 group-hover:bg-opacity-0`,children:(0,R.jsxs)(`div`,{className:`max-w-md space-y-4`,children:[r?.tags_enabled&&(0,R.jsx)(te,{className:`relative`,tags:a.content_tags,cardStyles:r}),(0,R.jsx)(D,{title:{text:a.web_title,fontFamily:r.heading_font_family,color:`#ffffff`},subtitle:{text:a?.web_subtitle||``,fontFamily:r.description_font_family,color:`#ffffff`}})]})})]})}),(0,R.jsx)(`div`,{className:`py-4`,children:(0,R.jsx)(f,{signupStyles:i})})]})}),(0,R.jsx)(`div`,{className:`flex w-full flex-col space-y-4 md:w-2/5`,children:o.map((t,n)=>(0,R.jsxs)(`div`,{className:`flex flex-col space-y-2`,children:[t.audience===`premium`&&(0,R.jsx)(E,{fontFamily:r.font,bgColor:r.premium_bg_color,color:r.premium_text_color}),(0,R.jsx)(w,{slug:t?.slug,className:(0,L.default)(`group relative flex w-full flex-col space-y-2 transition-all`),children:(0,R.jsx)(D,{title:{text:t.web_title,fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.text_color,size:`xl`},subtitle:{text:t?.web_subtitle||``,fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.text_color,size:`sm`}})},t.id),(0,R.jsx)(`div`,{className:`flex flex-wrap-reverse items-center justify-between`,children:r.timefields_enabled&&(0,R.jsx)(k,{fontFamily:r.font,color:r.timestamp_text_color,timestamp:t.override_scheduled_at})})]},t.id))})]})})},mt=(e,t)=>{let n,r=[],i=[];t.forEach((e,t)=>{t===0?n=e:r.length<2?r.push(e):i.push(e)});let a=i.length,o=r.length;return e.forEach(e=>{if(!n){n=e;return}if(o<2){r.push(e),o++;return}a>=3||(i.push(e),a++)}),{headliner:n,leftPanelPosts:r,rightPanelPosts:i}},ht=()=>{let{homePage:e,paginatedPosts:t,featuredPosts:n,signupWidgetConfigs:r,cardStyles:i}=F(),a=t.posts,{headliner:o,leftPanelPosts:s,rightPanelPosts:c}=mt(a,n);return(0,R.jsx)(h,{className:`w-full py-4`,children:(0,R.jsxs)(`div`,{className:(0,L.default)(`mx-auto grid grid-cols-12 gap-0 transition-all md:gap-6`),children:[(0,R.jsx)(`div`,{className:`col-span-12 w-full md:col-span-3 md:block`,children:(0,R.jsx)(`div`,{className:`space-y-2`,children:s.map((t,n)=>
3{let r=t.audience===`premium`;return(0,R.jsxs)(w,{slug:t?.slug,className:(0,L.default)(`group flex w-full flex-col transition-all`),children:[(0,R.jsx)(O,{alt:t.web_title,radiusClass:`rounded-lg`,hasRadiusApplied:!0,src:t.image_url}),(0,R.jsx)(`div`,{className:(0,L.default)(`flex flex-col justify-between space-y-6 py-4`),children:(0,R.jsxs)(`div`,{className:`space-y-1`,children:[r&&(0,R.jsx)(E,{fontFamily:i.font,bgColor:i.premium_bg_color,color:i.premium_text_color}),(0,R.jsx)(D,{title:{text:t.web_title,fontFamily:e?.general_section?.theme?.font,color:i.heading_font_color,size:`xl`},subtitle:{text:t?.web_subtitle||``,fontFamily:e?.general_section?.theme?.font,color:i.description_font_color,size:`sm`}}),i.timefields_enabled&&(0,R.jsx)(k,{fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.text_color,timestamp:t.override_scheduled_at})]})})]},t.id)})})}),(0,R.jsxs)(`div`,{className:`col-span-12 w-full space-y-4 md:col-span-9 lg:col-span-6`,children:[o?(0,R.jsxs)(w,{slug:o?.slug,className:(0,L.default)(`group flex w-full flex-col transition-all`),children:[(0,R.jsx)(O,{alt:o.web_title,radiusClass:`rounded-lg`,hasRadiusApplied:!0,src:o.image_url}),(0,R.jsx)(`div`,{className:(0,L.default)(`flex flex-col justify-between space-y-6 py-4`),children:(0,R.jsxs)(`div`,{className:`space-y-3`,children:[o?.audience===`premium`&&(0,R.jsx)(E,{fontFamily:i.font,bgColor:i.premium_bg_color,color:i.premium_text_color}),(0,R.jsx)(D,{title:{text:o.web_title,fontFamily:e?.general_section?.theme?.font,color:i.heading_font_color,size:`3xl`},subtitle:{text:o?.web_subtitle||``,fontFamily:e?.general_section?.theme?.font,color:i.description_font_color,size:`lg`}}),(0,R.jsx)(k,{fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.text_color,timestamp:o?.override_scheduled_at})]})})]}):null,(0,R.jsx)(`div`,{className:`pb-4`,children:(0,R.jsx)(f,{signupStyles:r})})]}),(0,R.jsx)(`div`,{className:`col-span-12 w-full lg:col-span-3 lg:block`,children:(0,R.jsx)(`div`,{className:`flex flex-col space-y-6`,children:c.map((t,n)=>{let r=t.audience===`premium`;return(0,R.jsx)(w,{slug:t?.slug,className:(0,L.default)(`group relative flex w-full flex-col space-y-2 transition-all`),children:(0,R.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,R.jsxs)(`div`,{className:`space-y-1`,children:[r&&(0,R.jsx)(E,{fontFamily:i.font,bgColor:i.premium_bg_color,color:i.premium_text_color}),(0,R.jsx)(D,{title:{text:t.web_title,fontFamily:e?.general_section?.theme?.font,color:i.heading_font_color,size:`2xl`},subtitle:{text:t?.web_subtitle||``,fontFamily:e?.general_section?.theme?.font,color:i.description_font_color,size:`md`}}),(0,R.jsx)(k,{fontFamily:e?.general_section?.theme?.font,color:e?.general_section?.theme?.text_color,timestamp:t.override_scheduled_at})]})})},t.id)})})})]})})},gt=()=>{let{homePage:e}=F();switch(e.general_section.theme.header_type){case`carousel`:return(0,R.jsx)(Ye,{});case`headliner`:return(0,R.jsx)(pt,{});case`news`:return(0,R.jsx)(ht,{});default:return(0,R.jsx)(dt,{})}},_t=({text:e,viewMoreLink:t,isNewWebBuilder:n,accentColor:r,font:i})=>(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,R.jsx)(_,{as:`h6`,size:`sm`,className:`font-semibold`,color:r,fontFamily:i,children:e}),t&&!n&&(0,R.jsx)(c,{to:t,prefetch:`intent`,children:(0,R.jsx)(`div`,{className:`flex items-center opacity-70 hover:opacity-100`,children:(0,R.jsx)(S,{style:{color:r},className:`h-4 w-4 text-gray-400`})})})]})}),q=({text:e,children:t,viewMoreLink:n,isNewWebBuilder:r})=>{let{homePage:i}=F(),a=i?.general_section?.theme?.accent_color,o=i?.general_section?.theme?.font;return(0,R.jsxs)(`div`,{style:{borderColor:i.general_section?.theme?.border_color},className:`mb-6 space-y-3 border-b pb-6`,children:[(0,R.jsx)(_t,{text:e,viewMoreLink:n,isNewWebBuilder:!1,accentColor:a,font:o}),(0,R.jsx)(`div`,{children:t})]})},vt=()=>(0,R.jsx)(`div`,{className:`pr-4`,children:(0,R.jsx)(`div`,{className:`flex w-full animate-pulse flex-col space-y-6`,children:(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(`div`,{className:`h-6 w-full rounded bg-gray-200`}),(0,R.jsx)(`div`,{className:`h-6 w-full rounded bg-gray-200`})]})})}),yt=({textColor:e,fontFamily:t,isNewWebBuilder:n=!1})=>{let{authors:r}=Le();
3return(0,R.jsx)(q,{text:`Authors`,viewMoreLink:`/authors`,textColor:e,fontFamily:t,isNewWebBuilder:n,children:r?(0,R.jsx)(`div`,{className:`space-y-2`,children:r?.map(r=>(0,R.jsx)(`div`,{className:`relative`,children:(0,R.jsxs)(c,{to:`/authors/${r.id}`,className:`relative flex items-center space-x-2`,prefetch:`intent`,children:[(0,R.jsx)(`div`,{className:`h-7 w-7 overflow-hidden rounded-full`,children:(0,R.jsx)(P,{src:r.profile_picture.url,alt:r.name,maxWidth:800,loading:`lazy`,aspectRatio:`social`})}),(0,R.jsx)(_,{as:`p`,size:`sm`,color:e,fontFamily:t,fontFamilyv2:n?t:void 0,children:r.name})]})},r.id))}):(0,R.jsx)(vt,{})})},bt=({publication:e,textColor:t,fontFamily:n,isNewWebBuilder:r=!1})=>(0,R.jsx)(q,{text:`Categories`,viewMoreLink:`/t/${Se(e.content_tags?.[0]?.display)}`,textColor:t,fontFamily:n,isNewWebBuilder:r,children:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.content_tags?.map(e=>(0,R.jsx)(c,{to:`/t/${e.display}`,style:{borderColor:t},className:`font-regular mb-2 ml-0 cursor-pointer rounded-full border px-4 py-2 text-xs`,children:(0,R.jsx)(_,{as:`span`,color:t,fontFamily:n,fontFamilyv2:r?n:void 0,size:`sm`,className:`truncate font-medium`,children:e.display})},e.id))})}),xt=()=>{let e=s();return(0,I.useEffect)(()=>{e.load(`/publications`)},[]),{newsletters:e?.data?.publications}},St=({textColor:e,fontFamily:t,isNewWebBuilder:n=!1})=>{let{newsletters:r}=xt();return(0,R.jsx)(q,{text:`Newsletters`,viewMoreLink:`/publications`,textColor:e,fontFamily:t,isNewWebBuilder:n,children:r?(0,R.jsx)(`div`,{className:`space-y-2 pr-4`,children:r.map(r=>(0,R.jsxs)(`div`,{className:`flex items-center space-x-2 truncate`,children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(`div`,{className:`h-6 w-6 overflow-hidden rounded border border-gray-300 bg-white`,children:(0,R.jsx)(P,{maxWidth:128,aspectRatio:`square`,src:r.logo.url,alt:r.name})})}),(0,R.jsx)(_,{as:`span`,color:e,fontFamily:t,fontFamilyv2:n?t:void 0,size:`sm`,className:`truncate font-medium`,children:r.name})]},r.id))}):(0,R.jsx)(vt,{})})},Ct=()=>{let e=s();return(0,I.useEffect)(()=>{e.load(`/recommendations?index`)},[]),{recommendations:e?.data}},wt=({textColor:e,fontFamily:t,isNewWebBuilder:n=!1})=>{let{recommendations:r}=Ct();return(0,R.jsx)(q,{text:`Recommendations`,viewMoreLink:`/recommendations`,textColor:e,fontFamily:t,isNewWebBuilder:n,children:r?(0,R.jsx)(`div`,{className:`space-y-2 pr-4`,children:r.recommendations.map(n=>(0,R.jsxs)(`div`,{className:`flex items-center space-x-2 truncate`,children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(`div`,{className:`h-6 w-6 overflow-hidden rounded border border-gray-300 bg-white`,children:(0,R.jsx)(P,{maxWidth:128,aspectRatio:`square`,src:n.publication.thumbnail_image_url,alt:n.publication.name})})}),(0,R.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,R.jsx)(_,{as:`span`,color:e,fontFamily:t,size:`sm`,className:`truncate font-medium`,children:n.publication.name}),n.publication.publisher_name&&(0,R.jsxs)(_,{as:`span`,color:e,fontFamily:t,size:`xs`,className:`truncate opacity-60`,children:[`by `,n.publication.publisher_name]})]})]},n.id))}):(0,R.jsx)(vt,{})})},Tt=({publication:e,bgColor:t,textColor:n,fontFamily:r,placeholderText:i,ctaText:a,isNewWebBuilder:o=!1})=>{let{signupWidgetConfigs:s}=F();return(0,R.jsx)(q,{text:`Signup`,isNewWebBuilder:o,children:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:o?(0,R.jsx)(f,{signupStyles:s}):(0,R.jsx)(N,{publication:e,fontFamily:g(r),placeholderText:i,cta:a,textColor:n,backgroundColor:t})})})},Et=({publication:e,textColor:t,isNewWebBuilder:n=!1})=>{let r=e.tiktok_url,i=e.twitter_url,a=e.youtube_url,o=e.facebook_url,s=e.instagram_url,c=e.linkedin_url,l=e.threads_url,u=e.discord_url,d=e.bluesky_url;return(0,R.jsx)(q,{text:`Social`,isNewWebBuilder:n,children:(0,R.jsxs)(`div`,{className:`flex space-x-2 transition-all`,style:{color:t},children:[i&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(i),"aria-label":`X`,children:(0,R.jsx)(ge,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})}),c&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(c),"aria-label":`LinkedIn`,children:(0,R.jsx)(he,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})}),a&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(a),"aria-label":`Youtube`,children:(0,R.jsx)(ye,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})}),r&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(r),"aria-label":`Tiktok`,children:(0,R.jsx)(ve,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})}),o&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(o),"aria-label":`Facebook`,children:(0,R.jsx)(_e,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})}),s&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(s),"aria-label":`Instagram`,children:(0,R.jsx)(me,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})}),l&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(l),"aria-label":`Threads`,children:(0,R.jsx)(ue,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})}),u&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(u),"aria-label":`Discord`,children:(0,R.jsx)(le,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})}),d&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(d),"aria-label":`Bluesky`,children:(0,R.jsx)(fe,{className:`h-4 w-4 fill-current opacity-70 hover:opacity-100`})})]})})},Dt=({isNewWebBuilder:e})=>{let{homePage:t,publication:n}=F(),r=t?.general_section.theme.text_color,i=t?.general_section.theme.font,a=t?.widgets_section.widgets_enabled,o=t?.main_section.signup_widget.bg_color,s=t?.main_section.signup_widget.text_color,c={social:(0,R.jsx)(Et,{publication:n,textColor:r,isNewWebBuilder:e}),signup:(0,R.jsx)(Tt,{publication:n,bgColor:o,textColor:s,fontFamily:i,placeholderText:t?.main_section.signup_widget.placeholder_text,ctaText:t?.main_section.signup_widget.cta_text,isNewWebBuilder:e}),recommendations:(0,R.jsx)(wt,{textColor:r,fontFamily:i,isNewWebBuilder:e}),newsletters:(0,R.jsx)(St,{textColor:r,fontFamily:i,isNewWebBuilder:e}),categories:(0,R.jsx)(bt,{publication:n,textColor:r,fontFamily:i,isNewWebBuilder:e}),authors:(0,R.jsx)(yt,{textColor:r,fontFamily:i,isNewWebBuilder:e})};return(0,R.jsx)(`div`,{className:`space-y-4`,children:a.map(e=>(0,R.jsx)(`div`,{children:c[e]},e))})},Ot=({homePage:e,showExampleSite:t})=>{let n=e?.widgets_section?.widgets_enabled?.length>0,r=e?.posts_section?.archive.layout,[i]=o(),a=i.get(`404`);return(0,R.jsxs)(Ce,{bgColor:e.general_section.theme.bg_color,children:[a?(0,R.jsx)(Ge,{path:a}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(gt,{}),(0,R.jsx)(Ke,{})]}),(0,R.jsx)(h,{children:(0,R.jsx)(Pe,{isNewWebBuilder:!0,isExampleWebSite:t,postsSection:e.posts_section,generalSection:e.general_section})}),(0,R.jsx)(h,{className:`pt-0`,children:(0,R.jsxs)(`div`,{className:`grid w-full grid-cols-12`,children:[(0,R.jsx)(`div`,{className:(0,L.default)({"order-last col-span-12 pb-4 pt-2 lg:order-first":!0,"pr-0 lg:col-span-8 lg:pr-2":n,"mb-8":!n}),children:(0,R.jsx)(ce,{isNewWebBuilder:!0,gridCols:n?`2`:`3`,cardOrientation:r===`list`?`horizontal`:`vertical`})}),n&&(0,R.jsxs)(`div`,{className:`col-span-12 pl-0 pr-0 pt-4 lg:col-span-4 lg:pl-8 lg:pt-8`,children:[(0,R.jsx)(Dt,{isNewWebBuilder:!0}),(0,R.jsx)(`div`,{id:`side-panel-ad-placement`})]})]})})]})},kt=({theme:e=`subscribe`,publication:t})=>{let n=t?.web_theme?.logo_shadow,r=`shadow-md`;return n===`md`?r=`shadow-md`:n===`none`?r=`shadow-none`:n===`sm`?r=`shadow-sm`:n===`lg`&&(r=`shadow-lg`),(0,R.jsxs)(`div`,{className:`flex w-full flex-col items-center`,children:[(0,R.jsx)(`div`,{className:`mb-4 h-24 w-24 overflow-hidden rounded sm:mb-8 ${r}`,children:t.logo.thumb.url&&(0,R.jsx)(P,{src:t.logo.thumb.url,alt:t.name,maxWidth:200,aspectRatio:`square`})}),(0,R.jsxs)(`div`,{className:`mb-6 flex flex-col items-center space-y-2.5 sm:space-y-3`,children:[t.name&&(0,R.jsx)(m,{as:`h1`,type:`title`,size:`5xl`,theme:e,className:`w-full break-words text-center leading-tight tracking-normal`,children:t.name}),t.description&&(0,R.jsx)(m,{as:`p`,type:`body`,theme:e,className:`text-md text-center tracking-wide opacity-75 sm:text-lg`,children:t.description})]})]})},At=({publication:e})=>{let{t}=a(),n=e.web_theme.content_theme===`light`,r=e.web_theme.content_theme===`dark`,i=e.web_theme.content_theme===`secondary`,o=(0,L.default)(`w-full pt-8 bg-wt-background mb-8`,n?`before:block before:w-full before:overflow-hidden-x before:absolute before:inset-0 before:bg-slate-100/50 relative inline-block`:``,r?`before:block before:w-full before:overflow-hidden-x before:absolute before:inset-0 before:bg-white/5 relative inline-block`:``,i?`before:block before:w-full before:overflow-hidden-x before:absolute before:inset-0 before:bg-white/20 relative inline-block`:``),s=e.tiktok_url,c=e.twitter_url,l=e.youtube_url,u=e.facebook_url,d=e.instagram_url,f=e.linkedin_url,p=e.discord_url,h=e.threads_url,g=e.bluesky_url,_=s||c||l||u||d||f||p||h||g;return(0,R.jsx)(`div`,{className:o,children:(0,R.jsx)(`div`,{className:`px-4`,children:(0,R.jsx)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col pb-8 sm:pb-0`,children:(0,R.jsxs)(`div`,{className:`flex-start flex flex-col items-center py-2`,children:[(0,R.jsx)(`div`,{className:`z-10 mx-auto w-full max-w-2xl`,children:(0,R.jsx)(kt,{theme:`content`,publication:e})}),(0,R.jsx)(`div`,{className:`hidden w-full items-end justify-between py-4 pt-8 sm:flex`,children:(0,R.jsx)(`div`,{className:`text-xs font-light text-wt-text-on-background opacity-80`,children:(0,R.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[_?(0,R.jsx)(m,{as:`span`,theme:`content`,className:`whitespace-nowrap text-xs font-semibold`,children:t(`shared.cta.connect`)}):(0,R.jsx)(`div`,{}),(0,R.jsx)(`div`,{className:`flex space-x-2 transition-all`,children:(0,R.jsxs)(`div`,{className:`flex items-end space-x-2`,children:[c&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(c),"aria-label":`X`,children:(0,R.jsx)(ge,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})}),f&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(f),"aria-label":`LinkedIn`,children:(0,R.jsx)(he,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})}),l&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(l),"aria-label":`Youtube`,children:(0,R.jsx)(ye,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})}),s&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(s),"aria-label":`Tiktok`,children:(0,R.jsx)(ve,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})}),u&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(u),"aria-label":`Facebook`,children:(0,R.jsx)(_e,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})}),d&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(d),"aria-label":`Instagram`,children:(0,R.jsx)(me,{className:`h-4 w-4 fill-current opacity-40 hover:opacity-100`})}),h&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(h),"aria-label":`Threads`,children:(0,R.jsx)(ue,{className:`-4 h-4 fill-current opacity-40 hover:opacity-100`})}),p&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(p),"aria-label":`Discord`,children:(0,R.jsx)(le,{className:`-4 h-4 fill-current opacity-40 hover:opacity-100`})}),g&&(0,R.jsx)(`a`,{target:`_blank`,rel:`noreferrer`,href:M(g),"aria-label":`Bluesky`,children:(0,R.jsx)(fe,{className:`-4 h-4 fill-current opacity-40 hover:opacity-100`})})]})})]})})})]})})})})},jt=({publication:e})=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(At,{publication:e}),e.private&&(0,R.jsx)(Oe,{title:u(`gated.private_newsletter.title`),message:u(`gated.private_newsletter.message`),cta:e.cta_text,publication:e}),!e.private&&e.require_subscriber_approval&&(0,R.jsx)(Oe,{title:u(`gated.require_approval.title`),message:u(`gated.require_approval.message`),cta:e.cta_text,publication:e,createActionType:d.NONE})]}),Mt=({matches:e,data:t,location:n})=>{let r=t?.metaTitle,i=t?.metaDescription,a=[],o=t?.requestUrl,s=Ee(o),c=t?.homePage?.renderable_fonts||[];return c.length>
30&&c.forEach(e=>{a.push({rel:`stylesheet`,href:e,tagName:`link`})}),t?.homePage?.main_bg_image_url&&a.push({rel:`preload`,href:t?.homePage?.main_bg_image_url,as:`image`}),De({canonicalUrl:Ee(o),matches:e,overrides:{title:r,description:i},links:a,structuredData:{url:s,"@context":`https://schema.org`,"@type":`WebSite`,potentialAction:{"@type":`SearchAction`,target:{"@type":`EntryPoint`,urlTemplate:`${s}?q={search_term_string}`},"query-input":`required name=search_term_string`}}})},Nt=()=>{let{homePage:e,publication:t,isInitialLoadFromSwarm:n,showExampleSite:r,hasWebThemesEnabled:i,isDraft:a}=F();if(!t)throw Error(`RefreshPageError`);we({isInitialLoadFromSwarm:n,publicationId:t.id});let o=i,s=e?.widgets_section?.widgets_enabled?.length>0,c=e?.posts_section?.archive.layout,l=be(),u=(t.private||t.require_subscriber_approval)&&!l;return!a&&u?(0,R.jsx)(jt,{publication:t}):o?(0,R.jsx)(Ot,{homePage:e,showExampleSite:r}):(0,R.jsxs)(Ce,{bgColor:e.general_section.theme.bg_color,className:`pb-8`,children:[(0,R.jsx)(We,{}),(0,R.jsx)(`div`,{className:`w-full max-w-6xl mx-auto`,children:(0,R.jsx)(`div`,{id:`header-ad-placement`})}),(0,R.jsx)(`div`,{className:`px-4`,children:(0,R.jsx)(`div`,{className:`w-full max-w-6xl mx-auto`,children:(0,R.jsx)(Pe,{postsSection:e.posts_section,generalSection:e.general_section})})}),(0,R.jsx)(`div`,{className:`px-4`,children:(0,R.jsx)(`div`,{className:`w-full max-w-6xl mx-auto`,children:(0,R.jsxs)(`div`,{className:`grid w-full grid-cols-12`,children:[(0,R.jsx)(`div`,{className:(0,L.default)({"order-last col-span-12 py-2 lg:order-first":!0,"pr-0 lg:col-span-8 lg:pr-12":s,"mb-8":!s}),children:(0,R.jsx)(ce,{gridCols:s?`2`:`3`,cardOrientation:c===`list`?`horizontal`:`vertical`})}),s&&(0,R.jsxs)(`div`,{className:`col-span-12 pt-4 pl-0 pr-0 lg:col-span-4 lg:pl-8 lg:pt-8`,children:[(0,R.jsx)(Dt,{}),(0,R.jsx)(`div`,{id:`side-panel-ad-placement`})]})]})})})]})},J=Te;export{Nt as default,Mt as meta,J as shouldRevalidate};
4//# sourceMappingURL=index-DviRqGwj.js.map
5//# debugId=0c7a0548-1005-5c1f-8403-8e40692adb68

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.