!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]="567a94ea-3c12-5c96-ad5b-28811a9683b8")}catch(e){}}(); import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{c as m}from"./index-Bc72ctNv.js";import{u as w,B as N}from"./useWebThemeContext-CQEkZKXw.js";import{T as n}from"./index-DTm5MY_I.js";import{L as u}from"./components-DhFN5rxT.js";import{d as v}from"./dayjs.min-CGCW5pOI.js";import{I as y}from"./Image-DpT3Wxag.js";import{a as C,F}from"./LockClosedIcon-D3cYqiNg.js";import{r as d}from"./index-DwaoyV61.js";import{u as z}from"./useTranslation-CqXWvxCZ.js";import{g as h}from"./index-DcpNk-OI.js";function P({title:s,titleId:e,...a},o){return d.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:o,"aria-labelledby":e},a),s?d.createElement("title",{id:e},s):null,d.createElement("path",{fillRule:"evenodd",d:"M4.848 2.771A49.144 49.144 0 0 1 12 2.25c2.43 0 4.817.178 7.152.52 1.978.292 3.348 2.024 3.348 3.97v6.02c0 1.946-1.37 3.678-3.348 3.97-1.94.284-3.916.455-5.922.505a.39.39 0 0 0-.266.112L8.78 21.53A.75.75 0 0 1 7.5 21v-3.955a48.842 48.842 0 0 1-2.652-.316c-1.978-.29-3.348-2.024-3.348-3.97V6.741c0-1.946 1.37-3.68 3.348-3.97Z",clipRule:"evenodd"}))}const T=d.forwardRef(P),k=({alt:s,url:e,bgColor:a})=>{const o=a||"#ffffff";return t.jsx("div",{className:"h-7 w-7 rounded-full",children:t.jsx("img",{className:"inline-block h-7 w-7 rounded-full",src:e,alt:s,style:{border:`1px solid ${o}`}})})},R=({authors:s,font:e,color:a,bgColor:o,fallbackName:r,showAuthorImage:l})=>{if(!s||!Array.isArray(s))return null;const i=s.length,c=i>1;return t.jsxs(u,{to:"/authors",prefetch:"intent",className:"group flex flex-col items-start space-x-0 space-y-1 sm:flex-row sm:items-center sm:space-x-2 sm:space-y-0",children:[l&&t.jsx("div",{className:"flex -space-x-1.5 overflow-hidden",children:s.map(x=>t.jsx(k,{alt:x.name,url:x.profile_picture.url,bgColor:o},x.id))}),i>0?t.jsx("div",{className:"flex items-center",children:t.jsx(n,{as:"span",size:"xs",weight:"semibold",color:a,className:"group-hover:underline",fontFamily:e,fontFamilyv2:e,children:c?`${s[0].name}, +${s.length-1}`:s[0].name})}):t.jsx(n,{as:"span",size:"xs",weight:"semibold",color:a,fontFamily:e,fontFamilyv2:e,children:r})]})},$=s=>{const a=v().diff(s,"hour"),o=a<24;return a<=1?`${a||1} hour ago`:o?`${a} hours ago`:s.locale("en").format("MMM DD, YYYY")},A=({timestamp:s,readTime:e,fontFamily:a,color:o})=>{const r=v(s),l=$(r);return t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx(n,{as:"span",size:"xs",weight:"light",className:"!text-xs text-gray-600",fontFamily:a,fontFamilyv2:a,color:o,children:t.jsx("time",{dateTime:s,children:l})}),e&&t.jsxs(t.Fragment,{children:[t.jsx("div",{children:t.jsx("div",{className:"h-1 w-1 rounded-full",style:{backgroundColor:o}})}),t.jsx(n,{as:"span",size:"xs",weight:"light",className:"!text-xs text-gray-600",fontFamily:a,fontFamilyv2:a,color:o,children:e})]})]})},L=({alt:s,radiusClass:e,src:a,hasRadiusApplied:o})=>t.jsx("div",{className:m("w-full",o&&`${e} overflow-hidden`),children:t.jsx(y,{src:a,alt:s,maxWidth:800,loading:"eager",aspectRatio:"social"})}),p=({count:s,children:e,className:a,color:o,fontFamily:r})=>t.jsxs(n,{size:"sm",as:"span",fontFamily:r,fontFamilyv2:r,className:m(a,"flex items-center space-x-0.5"),color:o,weight:"regular",children:[e,s>0?t.jsx("span",{className:"text-xs font-bold",children:s}):null]}),I=({post:s,color:e})=>{const a=s?.likes?.length||0,o=s?.comment_count||0;return t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(p,{count:a,color:e,children:t.jsx(C,{className:"h-4 w-4"})}),s.comments_enabled&&t.jsx(p,{count:o,color:e,children:t.jsx(T,{className:"h-4 w-4"})})]})},g=({slug:s,children:e,className:a})=>t.jsx(u,{to:`/p/${s}`,prefetch:"intent",className:m(a),children:e}),M=({color:s,fontFamily:e,bgColor:a})=>{const{t:o}=z(),{classes:r}=w();return t.jsxs("div",{className:m(r.radius,"flex w-fit items-center space-x-1 rounded px-2 py-1"),style:{backgroundColor:a},children:[t.jsx(F,{style:{color:s},className:"h-3 w-3"}),t.jsx(n,{as:"span",size:"sm",fontFamily:e,fontFamilyv2:e,weight:"light",color:s,children:o("posts.premium")})]})},j=({tag:s,bgColor:e,font:a,textColor:o,to:r,text:l,radiusClass:i})=>t.jsxs("div",{className:"relative",children:[t.jsx(u,{to:r,style:{backgroundColor:e,opacity:.8},className:m(i,"w-fit cursor-pointer px-4 py-2 text-xs text-white transition-all hover:bg-sky-950"),children:t.jsx(n,{as:"span",size:"xs",fontFamily:a,fontFamilyv2:a,className:"whitespace-nowrap text-xs font-medium text-gray-50 opacity-0",color:o,children:t.jsx("span",{className:"whitespace-nowrap pb-1 text-xs font-medium",children:l})})}),t.jsx(n,{as:"span",size:"xs",fontFamily:a,fontFamilyv2:a,className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform pt-[1px] text-xs font-medium text-gray-50 sm:pt-0",color:o,children:t.jsx("span",{className:"whitespace-nowrap pb-1 text-xs font-medium",children:l})})]}),E=({tags:s,cardStyles:e,className:a})=>{const{classes:o}=w(),r=s.length,l=r>1,{font:i,tags_bg_color:c,tags_text_color:x}=e,_=r-1,b=d.useMemo(()=>l?s.slice(0,1):s,[l,s]);return t.jsxs("div",{className:m("flex items-center gap-1",a),children:[b.map(f=>t.jsx(j,{to:`/t/${h(f.display)}`,bgColor:c,font:i,textColor:x,text:f.display,radiusClass:o.radius},f.id)),l&&t.jsx(j,{to:`/t/${h(s[1].display)}`,bgColor:c,font:i,textColor:x,text:`+${_}`,radiusClass:o.radius})]})},B=({title:s,subtitle:e})=>t.jsxs("div",{className:"cursor-pointer space-y-1",children:[t.jsx(n,{as:"h2",size:s?.size||"2xl",weight:"semibold",className:"line-clamp-2 hover:underline sm:line-clamp-3",fontFamily:s.fontFamily,fontFamilyv2:s.fontFamily,color:s.color,children:s.text}),e.text&&t.jsx(n,{as:"p",size:e?.size||"md",weight:"light",className:"line-clamp-2 sm:line-clamp-3",fontFamily:e.fontFamily,fontFamilyv2:e.fontFamily,color:e.color,children:e.text})]}),K=({post:s,cardStyles:e,orientation:a="vertical"})=>{const o=s.audience==="premium",r=N[e?.border_radius||"none"],l=a==="vertical",i="flex flex-col",c=a==="horizontal";return t.jsxs("div",{suppressHydrationWarning:!0,className:m("transparent h-full cursor-pointer overflow-hidden",r,c&&"flex flex-col md:flex-row md:items-center items-start max-w-4xl",l&&i,e?.border_color&&"border"),style:{backgroundColor:e?.bg_color,borderColor:e?.border_color},children:[t.jsxs("div",{className:m("relative w-full",c&&"max-w-sm"),children:[e?.tags_enabled&&t.jsx(E,{tags:s.content_tags,cardStyles:e,className:"absolute left-4 top-4 z-10"}),t.jsx(g,{slug:s.slug,children:t.jsx(L,{alt:s.web_title,radiusClass:r,hasRadiusApplied:e?.is_image_radius_applied,src:s.image_url})})]}),t.jsx("div",{className:"w-full p-3",children:t.jsxs("div",{className:"space-y-3",children:[t.jsx(g,{slug:s.slug,children:t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex flex-wrap-reverse items-center justify-between",children:[e.timefields_enabled&&t.jsx(A,{fontFamily:e.font,color:e.timestamp_text_color,timestamp:s.override_scheduled_at}),e.likes_comments_enabled&&t.jsx(I,{post:s,color:e.likes_comments_color})]}),o&&t.jsx(M,{fontFamily:e.font,bgColor:e.premium_bg_color,color:e.premium_text_color}),t.jsx(B,{title:{size:c?"lg":"xl",text:s.web_title,fontFamily:e.heading_font_family,color:e.heading_font_color},subtitle:{size:c?"sm":"md",text:s?.web_subtitle||"",fontFamily:e.description_font_family,color:e.description_font_color}})]})}),t.jsx(R,{authors:s.authors,color:e.authors_text_color,bgColor:e.bg_color,font:e.font,showAuthorImage:e.show_author_image})]})})]})};export{K as P,L as a,E as b,B as c,M as d,R as e,A as f,g}; //# sourceMappingURL=index-PWANuuqO.js.map //# debugId=567a94ea-3c12-5c96-ad5b-28811a9683b8