PageSourceSearch

https://www.aisanomat.fi/assets/PostCardActions-5jWCuIw2.js

js aisanomat.fi collected 2026-09-24 20:18:09 UTC 25,671 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]="24d88f95-b751-57d7-85d3-dd7615d12c2f")}catch(e){}}();
3import{s as e,t}from"./jsx-runtime-D4ePz0Hl.js";import{t as n}from"./react-BXH-GOAS.js";import{L as r,N as i,d as a,f as o,l as s,n as c}from"./components-CDo3yjgw.js";import{t as l}from"./useTranslation-xRzBcOIb.js";import{t as u}from"./classnames-B9Sa-P4w.js";import{n as d}from"./CsrfContext-ByWWfcRz.js";import{n as f,z as p}from"./QueryClientProvider-Cdu2unP4.js";import{t as m}from"./LockClosedIcon-EgqD9Np-.js";import{a as h,i as g,n as _}from"./useCommunityMembership-DRaMPU7W.js";import{t as v}from"./MemberProfileLink-DTH-ashB.js";import{t as ee}from"./useMutation-sej49wS6.js";import{t as y}from"./useShortRelativeDate-Cpl-GDDn.js";import{i as b}from"./nectarPageBlock-Dhr05eLZ.js";import{n as te,t as ne}from"./transition-B4qu-R77.js";import{t as x}from"./menu-D3zdtnSb.js";import{a as re,d as S,i as C,l as w,n as ie,t as ae,u as oe}from"./useProfilePinFetcher-Dwa8f0os.js";import{t as se}from"./ChatBubbleOvalLeftEllipsisIcon-IS3uzuZX.js";import{B as T,ft as E,i as ce,l as le,r as D,t as O,u as k}from"./constants-D1RUU1Rv.js";import{t as ue}from"./ActionMenu-BlbvXKr9.js";import{t as de}from"./EyeSlashIcon-dTvsU9MP.js";import{a as fe,i as pe,n as me,r as he,s as ge,t as _e}from"./useReportToBeehiiv-CK1g7hM7.js";import{t as A}from"./MapPinIcon-DJzEi_Ln.js";import{n as ve}from"./getActionErrorMessage-vCmyCy3N.js";import{t as j}from"./XMarkIcon-DmEhIDFO.js";import{C as M,T as N,_ as ye,h as be,l as P,n as F,x as I}from"./CommentSection-Bz1tx8cx.js";import{_ as L,b as R,g as z,p as B,s as V}from"./floating-ui.react-SnMdqaDc.js";import{n as xe,t as H}from"./useToast-CorSxc9g.js";import{n as U,t as Se}from"./BottomSheetDialog-DcPGSOIu.js";import{t as W}from"./Avatar-BIBwmBTY.js";import{t as Ce}from"./PillLink-BBFBbnTp.js";import{t as we}from"./ConfirmDialog-qJ2hzKOi.js";import{n as Te}from"./CommunityMemberActionsProvider-RbKU5frW.js";import{d as Ee,n as G}from"./community-Dn-kSyk_.js";import{t as De}from"./useBlockMemberMutation-DDCpl7S2.js";import{t as K}from"./MemberBadge-CEtxB9l1.js";import{t as Oe}from"./useCopyToClipboard-CzU2Dqkj.js";import{t as q}from"./ShareIcon-BvyW8yVV.js";import{t as ke}from"./IconButton-BSrwKSSD.js";import{r as J}from"./useSpacePurchasableTiers-DQV8swkU.js";import{n as Ae,t as je}from"./useSpaceMembershipFetcher-qeMIMj9v.js";import{t as Me}from"./fromInsideApp-qnJ_K_Il.js";import{n as Ne,r as Pe,t as Fe}from"./TwitterIcon-BuYTCB7f.js";var Y=e(n());function Ie({title:e,titleId:t,...n},r){return Y.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?Y.createElement(`title`,{id:t},e):null,Y.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25`}))}var Le=Y.forwardRef(Ie);function Re({title:e,titleId:t,...n},r){return Y.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?Y.createElement(`title`,{id:t},e):null,Y.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M22 10.5h-6m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM4 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 10.374 21c-2.331 0-4.512-.645-6.374-1.766Z`}))}var ze=Y.forwardRef(Re);function Be({title:e,titleId:t,...n},r){return Y.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?Y.createElement(`title`,{id:t},e):null,Y.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z`}))}var Ve=Y.forwardRef(Be),X=()=>{let e=(0,Y.useContext)(re);if(!e)throw Error(`usePostComposer must be used within a PostComposerContext.Provider`);return e},Z=e(t(),1),He=`/pin_community_post`,Ue=`pin-community-post`,We=[`community-posts`],Ge=()=>{let{fetcher:e}=C(Ue,{queryKey:We});return{fetcher:e}},Ke=()=>{let e=o(`routes/community`),t=(0,Y.useMemo)(()=>new Set(e?.joinedSpaces??[]),[e?.joinedSpaces]);return{joinedSpaces:t,isJoined:e=>t.has(e)}},qe=()=>{let{t:e}=l(),t=d(),n=a(),{slug:i}
3=r(),s=o(`routes/community`),{isMember:c,openJoinModal:u}=_(),{isJoined:f}=Ke(),{fetcher:p}=Ae();if(!n.some(e=>Ee(e.id))||!i)return null;let m=s?.spaces?.find(e=>e.slug===i);if(!m)return null;let h=f(i),g=p.state!==`idle`;return{id:m.id,slug:i,name:m.name??e(`community.space_name_fallback`),description:m.description,read_only:m.read_only,tier_gated:m.tier_gated,joined:h,isPending:g,onToggle:()=>{if(!c){u(b.CommunitySidebarChannel);return}p.submit({space_slug:i,action_type:h?`leave`:`join`,csrf:t},{method:`POST`,action:je})}}},Je=function(e){return e.CommunityPost=`community_post`,e.CommunitySpace=`community_space`,e}({}),Ye=({attachable:e})=>{let{t}=l(),n=o(`routes/community`);return e.is_premium&&!e.audio_url?(0,Z.jsxs)(`div`,{className:`relative overflow-hidden rounded-2xl border border-black/10`,children:[(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`select-none pointer-events-none blur-[6px]`,children:(0,Z.jsx)(N,{audioUrl:``,audioType:e.audio_type??void 0,thumbnailUrl:e.thumbnail_url,title:e.title,duration:e.duration??void 0,isPlaybackLocked:!0,options:{showThumbnail:!0,showTitle:!0,playerMode:`classic`,playButtonSize:28,progressBarHeight:4}})}),(0,Z.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,Z.jsxs)(Ce,{to:P(n?.community?.first_premium_offer_id),variant:`primary`,className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(m,{"aria-hidden":`true`,className:`size-4`}),t(`community.paid_gate.unlock`)]})})]}):(0,Z.jsx)(N,{audioUrl:e.audio_url??``,audioType:e.audio_type??void 0,thumbnailUrl:e.thumbnail_url,title:e.title,duration:e.duration??void 0,options:{showThumbnail:!0,showTitle:!0,playerMode:`classic`,playButtonSize:28,progressBarHeight:4}})},Xe=()=>{let e=i();return(0,Y.useCallback)((t,n)=>{e(n?.hash?`${G.post(t)}#${n.hash}`:G.post(t),{state:{fromInsideApp:!0}})},[e])},Ze=e=>{let{currentMember:t,permissions:n}=_();return(0,Y.useMemo)(()=>{let r=t?.id===e.author.id,i=e.author.computed?.banned===!0,{isRestricted:a,isMember:o,canInteract:s,canPinAnyPost:c,canMoveAnyPost:l,canRemoveAnyPost:u,canHideAnyComments:d,canCloseAnyComments:f,canBanMember:p,isManager:m}=n,_=g(m,e.author.roles),v=h(m,e.author.roles);return{isAuthor:r,canEdit:r&&s,canDelete:(r||u)&&s,canPin:c,canMove:l,canPinToProfile:r&&s,canReport:o&&!r&&s,canFollowAuthor:o&&!r&&!a,canGoToPost:!0,canShare:!a,canHideComments:d,canCloseComments:f,canBanAuthor:p&&!r&&!i&&!_,canUnbanAuthor:p&&!r&&i&&!v}},[t,n,e.author])},Qe=e=>typeof e!=`object`||!e?!1:`toast`in e,$e=()=>{let e=d();return ee({mutationFn:async t=>{let n=new URLSearchParams({post_id:t.post_id,reason:t.reason}),r=await(await fetch(`/report_community_post`,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded;charset=UTF-8`,"X-CSRF-Token":e},body:n})).json();if(!Qe(r))throw Error(`report_post_invalid_response`);return r}})},et=`/community_post_comments_state`,tt=e=>`set-community-post-comments-state-${e}`,nt=(e,{onSubmissionComplete:t}={})=>{let{fetcher:n}=C(tt(e),{queryKey:[`community-posts`],onSubmissionComplete:t});return{fetcher:n,isSubmitting:n.state!==`idle`&&n.formAction===`/community_post_comments_state`}},rt=({post:e,triggerVariant:t,className:n,backTo:r,alignmentOffset:i=0})=>{let{t:a}=l(),o=d(),c=Xe(),u=s({key:Ue}),p=s({key:ae}),m=Te(),h=le(),g=$e(),{mutate:_}=De(),v=he(),ee=f(),{fetcher:y,isSubmitting:te}=nt(e.id,{onSubmissionComplete:()=>{I(null),R(``)}}),{openComposer:ne}=X(),x=qe(),re=e.synced_with_website,S=Ze(e),[C,w]=(0,Y.useState)(``),[T,E]=(0,Y.useState)(null),[D,O]=(0,Y.useState)(``),[k,j]=(0,Y.useState)(!1),[M,N]=(0,Y.useState)(!1),ye=_e(),[be,P]=(0,Y.useState)();xe(be);let[F,I]=(0,Y.useState)(null),[L,R]=(0,Y.useState)(``),z=e.author.computed?.blocking===!0,{menuItems:B}=me({memberId:e.author.id,memberName:e.author.name??``,canBanAuthor:S.canBanAuthor,canUnbanAuthor:S.canUnbanAuthor,canBlockAuthor:S.canFollowAuthor&&!z,canUnblockAuthor:S.canFollowAuthor&&z}),V=!!x,U=e.author.computed?.following??!1,{isAuthor:Se}=S,W=S.canDelete&&!Se,Ce=W?`comments.removing.remove`:`community.action_menu.delete_post`,Ee=(()=>{let t=[[...r?[]:[{key:`go_to_post`,labelKey:`community.action_menu.go_to_post`,icon:Le,requiredPerm:`canGoToPost`,onSelect:()=>c(e.id)}],{key:`follow-unfollow`,labelKey:U?`community.action_menu.unfollow_author`:`community.action_menu.follow_author`,icon:U?ze:Ve,requiredPerm:`canFollowAuthor`,onSelect:()=>m.toggleFollow({id:e.author.id,name:e.author.name??``},U,{pageBlock:b.CommunityPostFollowAuthorButton})},{key:`report`,labelKey:`community.action_menu.report_post`,icon:ge,requiredPerm:`canReport`,onSelect:()=>{E(e.id),w(`report`)}}
3],[...V&&!e.is_pinned?[{key:`pin`,labelKey:`community.action_menu.pin_post`,icon:A,requiredPerm:`canPin`,onSelect:()=>{u.submit({post_id:e.id,action_type:`pin`,csrf:o},{method:`POST`,action:He})}}]:[],...V&&e.is_pinned?[{key:`unpin`,labelKey:`community.action_menu.unpin_post`,icon:A,requiredPerm:`canPin`,onSelect:()=>{u.submit({post_id:e.id,action_type:`unpin`,csrf:o},{method:`POST`,action:He})}}]:[],{key:e.is_profile_pinned?`unpin_from_profile`:`pin_to_profile`,labelKey:e.is_profile_pinned?`community.action_menu.unpin_from_profile`:`community.action_menu.pin_to_profile`,icon:A,requiredPerm:`canPinToProfile`,onSelect:()=>{p.submit({post_id:e.id,action_type:e.is_profile_pinned?`unpin`:`pin`,csrf:o},{method:`POST`,action:ie})}},{key:`move`,labelKey:`community.action_menu.move_post`,icon:oe,requiredPerm:`canMove`,onSelect:()=>h.openMoveDialog({postId:e.id,currentSpaceSlug:e.space.slug,isPinned:e.is_pinned})},{key:`edit`,labelKey:`community.action_menu.edit_post`,icon:ve,requiredPerm:`canEdit`,onSelect:()=>ne({editPost:e,defaultSpaceSlug:e.space.slug})},{key:`delete`,labelKey:Ce,icon:fe,requiredPerm:`canDelete`,destructive:!0,onSelect:()=>h.openDeleteDialog({postId:e.id,isModeratorRemoval:W,isSyncedWithWebsite:re,backTo:r})}],[{key:`hide_comments`,labelKey:e.comments_state===`hidden`?`community.action_menu.unhide_comments`:`community.action_menu.hide_comments`,icon:de,requiredPerm:`canHideComments`,onSelect:()=>K(e.comments_state===`hidden`?`open`:`hidden`)},{key:`close_comments`,labelKey:e.comments_state===`closed`?`community.action_menu.reopen_comments`:`community.action_menu.close_comments`,icon:se,requiredPerm:`canCloseComments`,onSelect:()=>K(e.comments_state===`closed`?`open`:`closed`)}]].map(e=>e.filter(e=>S[e.requiredPerm])).filter(e=>e.length>0).flatMap((e,t)=>{let n=e.map(e=>({key:e.key,label:a(e.labelKey),icon:e.icon,onClick:e.onSelect,variant:e.destructive?`danger`:`default`}));return t===0?n:[{type:`divider`,key:`divider-${t}`},...n]});if(B.length>0){let e=t.findIndex(e=>e.key===`delete`);e===-1?t.push(...B):t.splice(e,0,...B)}return t})(),K=t=>{if(t===`open`){y.submit({post_id:e.id,state:t,csrf:o},{method:`PATCH`,action:et});return}I({target:t})},Oe=()=>{if(!F)return;let t=L.trim();y.submit({post_id:e.id,state:F.target,csrf:o,...t.length>0?{reason:t}:{}},{method:`PATCH`,action:et})},q=()=>{I(null),R(``)},ke=()=>{if(!T)return;let t=D.trim();g.mutate({post_id:T,reason:t},{onSuccess:t=>{P(t.toast),M&&_({memberId:e.author.id,block:!0}),w(``),E(null),O(``),j(!1),N(!1),ee.invalidateQueries({queryKey:ce.all})},onError:()=>{P({status:H.ERROR,message:a(`community.action_menu.report_post_error`)})}})},J=()=>{w(``),E(null),O(``),j(!1),N(!1)};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ue,{items:Ee,triggerVariant:t,className:n,alignmentOffset:i}),(0,Z.jsx)(we,{isOpen:F!==null,title:F?.target===`hidden`?a(`community.action_menu.hide_comments_confirm_title`):a(`community.action_menu.close_comments_confirm_title`),description:F?.target===`hidden`?a(`community.action_menu.hide_comments_confirm_description`):a(`community.action_menu.close_comments_confirm_description`),confirmLabel:F?.target===`hidden`?a(`community.action_menu.hide_comments_confirm_button`):a(`community.action_menu.close_comments_confirm_button`),onConfirm:Oe,onCancel:q,isLoading:te,body:(0,Z.jsxs)(`div`,{className:`mt-4`,children:[(0,Z.jsx)(`label`,{htmlFor:`comments-state-reason-${e.id}`,className:`block text-sm font-medium text-black`,children:a(`community.action_menu.comments_state_reason_label`)}),(0,Z.jsx)(`textarea`,{id:`comments-state-reason-${e.id}`,rows:3,value:L,onChange:e=>R(e.target.value),placeholder:a(`community.action_menu.comments_state_reason_placeholder`),className:`mt-2 w-full rounded-2xl border border-black/10 px-3 py-2 text-sm text-black placeholder:text-black/40 focus:outline-none focus:ring-2 focus:ring-black/10`})]})}),(0,Z.jsx)(we,{isOpen:C===`report`,title:a(`community.action_menu.report_post_confirm_title`),description:a(`community.action_menu.report_post_confirm_description`),confirmLabel:k?a(`community.report.escalate_link`,`Report to beehiiv`):a(`community.action_menu.report_post_confirm_button`),onConfirm:k?()=>{ye(D,G.post(e.id)),M&&_({memberId:e.author.id,block:!0}),J()}:ke,onCancel:J,confirmDisabled:D.trim().length===0,isLoading:g.isPending,body:(0,Z.jsx)(pe,{id:`report-post-reason-${e.id}`,label:a(`community.action_menu.report_post_reason_label`),placeholder:a(`community.action_menu.report_post_reason_placeholder`),value:D,onChange:O,reportToBeehiiv:k,onReportToBeehiivChange:j,showActions:v&&!z,blockUser:M,onBlockUserChange:N})})]})},it=({postId:e,hash:t,children:n,...r})=>(0,Z.jsx)(c,{to:t?`${G.post(e)}#${t}`:G.post(e),state:Me,...r,children:n}),Q=e(u(),1),at=({author:e,createdAt:t,editedAt:n,space:r,hideSpace
3:i=!1,isPinned:a=!1,size:o=`default`})=>{let{t:s}=l(),u=y(),d=e.name||s(`community.join.former_member`),f=w(r?.slug),p=o===`compact`?`text-black/60`:`text-black/50`;return(0,Z.jsxs)(`div`,{className:`flex flex-1 items-center gap-4 min-w-0`,children:[(0,Z.jsx)(v,{memberId:e.id,"aria-label":d,className:`no-underline`,children:(0,Z.jsx)(W,{src:e.avatar_url,alt:d,className:o===`compact`?`size-8`:`size-10`})}),(0,Z.jsxs)(`div`,{className:`flex flex-col md:flex-row md:flex-wrap md:items-center gap-x-[6px] gap-y-1 min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-[6px] flex-wrap min-w-0`,children:[(0,Z.jsx)(v,{memberId:e.id,className:`font-semibold text-[15px] leading-5 tracking-[-0.15px] text-black whitespace-nowrap`,children:d}),(0,Z.jsx)(K,{roles:e.roles,isBanned:e.computed?.banned===!0,blockedYou:e.computed?.blocked_you===!0,badges:e.badges}),(0,Z.jsx)(`span`,{className:(0,Q.default)(`text-[15px]`,p),children:`•`}),(0,Z.jsx)(`span`,{className:(0,Q.default)(`text-[15px] leading-5 tracking-[-0.15px]`,p,`whitespace-nowrap`),children:u(t)}),n&&(0,Z.jsx)(`span`,{className:`text-[13px] leading-4 text-black/30 italic shrink-0`,title:u(n,{withAgo:!0}),children:s(`community.comments.edited_label`)})]}),(!i&&r||a)&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-[6px] min-w-0 shrink-0`,children:[!i&&r&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:(0,Q.default)(`hidden md:inline text-[15px]`,p),children:`•`}),(0,Z.jsx)(f,{className:(0,Q.default)(`size-4`,p,`shrink-0`)}),(0,Z.jsx)(c,{to:G.spaces(r.slug),onClick:e=>e.stopPropagation(),className:(0,Q.default)(`text-[15px] leading-5 tracking-[-0.15px]`,p,`whitespace-nowrap`),children:r.name})]}),a&&(0,Z.jsxs)(Z.Fragment,{children:[!i&&r?(0,Z.jsx)(`span`,{className:(0,Q.default)(`text-[15px]`,p),children:`•`}):(0,Z.jsx)(`span`,{className:(0,Q.default)(`hidden md:inline text-[15px]`,p),children:`•`}),(0,Z.jsx)(`span`,{className:(0,Q.default)(`inline-flex size-5 items-center justify-center shrink-0`,p),children:(0,Z.jsx)(k,{className:`size-3.5`})}),(0,Z.jsx)(`span`,{className:`sr-only`,children:s(`community.profile.pinned`)})]})]})]})]})},ot=(e,t)=>typeof e==`function`?e(t):e,st=({require:e,children:t,fallback:n=null})=>{let r=_();return ot((typeof e==`function`?e(r.permissions):r.permissions[e])?t:n,r)},ct=({post:e})=>{let{t}=l(),n=d(),r=e.attachable_type===`CommunityPost`,{openComposer:i}=X(),{canPostIn:a,canPostAnywhere:o}=J(),c=s();return xe((0,Y.useMemo)(()=>{if(!(c.state!==`idle`||!c.data?.toast))return{...c.data.toast,status:c.data.toast.status===`success`?H.SUCCESS:H.ERROR}},[c.state,c.data])),r?(0,Z.jsx)(ke,{"aria-label":t(`community.repost.repost`,`Repost`),disabled:!0,className:`opacity-40 cursor-not-allowed hover:bg-transparent`,children:(0,Z.jsx)(S,{className:O})}):(0,Z.jsx)(ue,{triggerIcon:S,triggerIconClassName:O,triggerLabel:t(`community.repost.repost`,`Repost`),menuTitle:t(`community.repost.actions`,`Repost actions`),items:[{key:`repost`,label:t(`community.repost.repost`,`Repost`),icon:S,onClick:()=>{c.submit(p({space_slug:e.space.slug,attachable_type:`CommunityPost`,attachable_id:e.id,composer_mode:`repost`,csrf:n},b.CommunityPostForm),{method:`POST`,action:`/community_post`})},disabled:!a(e.space)},{key:`quote_post`,label:t(`community.repost.quote_post`,`Quote post`),icon:ve,onClick:()=>{i({defaultSpaceSlug:a(e.space)?e.space.slug:void 0,quotedPost:e})},disabled:!o}]})},lt=({className:e,fill:t})=>(0,Z.jsxs)(`svg`,{className:(0,Q.default)(e),viewBox:`0 0 20 20`,fill:t??`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,Z.jsx)(`path`,{d:`M13.125 13.125H16.25V3.75H6.875V6.875`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M13.125 6.875H3.75V16.25H13.125V6.875Z`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})]}),ut=[{key:`x`,labelKey:`community.share.share_to_x`,fallback:`Share to X`,Icon:Fe,Button:I},{key:`facebook`,labelKey:`community.share.share_to_facebook`,fallback:`Share to Facebook`,Icon:Pe,Button:be},{key:`whatsapp`,labelKey:`community.share.share_to_whatsapp`,fallback:`Share to WhatsApp`,Icon:({className:e,fill:t})=>(0,Z.jsx)(`svg`,{className:(0,Q.default)(e),viewBox:`0 0 17 17`,fill:t??`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,Z.jsx)(`path`,{d:`M10.0453 9.46776L11.8422 10.3646C11.757 10.7902 11.5268 11.1731 11.
31909 11.4479C10.8549 11.7227 10.434 11.8725 10 11.8717C8.50866 11.87 7.07889 11.2768 6.02435 10.2223C4.96982 9.16778 4.37665 7.738 4.375 6.24667C4.37488 5.81317 4.52497 5.39302 4.79974 5.05772C5.0745 4.72241 5.45696 4.49268 5.88203 4.4076L6.77891 6.20448L6.01562 7.34042C5.95859 7.42598 5.92354 7.52429 5.91359 7.62663C5.90364 7.72898 5.9191 7.83219 5.95859 7.92714C6.40577 8.98994 7.25126 9.83543 8.31406 10.2826C8.40929 10.3239 8.51329 10.3407 8.61668 10.3317C8.72007 10.3227 8.81958 10.2881 8.90625 10.231L10.0453 9.46776ZM16.25 8.12167C16.2503 9.52443 15.8874 10.9034 15.1967 12.1243C14.506 13.3452 13.5109 14.3665 12.3084 15.0887C11.1058 15.811 9.73678 16.2096 8.33448 16.2457C6.93219 16.2819 5.54442 15.9544 4.30625 15.2951L1.64609 16.1818C1.42585 16.2553 1.1895 16.2659 0.963537 16.2126C0.737574 16.1593 0.530927 16.0441 0.366759 15.8799C0.20259 15.7157 0.0873863 15.5091 0.0340605 15.2831C-0.0192653 15.0572 -0.00860599 14.8208 0.0648435 14.6006L0.951562 11.9404C0.371991 10.8508 0.048279 9.64337 0.00499792 8.40993C-0.0382831 7.17648 0.200004 5.94938 0.701773 4.82177C1.20354 3.69417 1.9556 2.69569 2.90087 1.90213C3.84614 1.10857 4.95978 0.54079 6.15724 0.241882C7.35471 -0.0570254 8.60453 -0.0792028 9.81185 0.177033C11.0192 0.433269 12.1522 0.961184 13.1251 1.72071C14.0979 2.48023 14.8849 3.4514 15.4264 4.56049C15.9678 5.66959 16.2495 6.88746 16.25 8.12167ZM13.125 9.99667C13.1251 9.88056 13.0928 9.76672 13.0318 9.66791C12.9708 9.56911 12.8835 9.48925 12.7797 9.43729L10.2797 8.18729C10.1813 8.13825 10.0717 8.11604 9.96194 8.1229C9.85221 8.12976 9.74622 8.16544 9.65469 8.22635L8.50703 8.99198C7.9802 8.70236 7.54665 8.26881 7.25703 7.74198L8.02266 6.59432C8.08357 6.50279 8.11925 6.3968 8.12611 6.28707C8.13297 6.17733 8.11076 6.06773 8.06172 5.96932L6.81172 3.46932C6.75991 3.36469 6.67982 3.27666 6.58054 3.21522C6.48126 3.15377 6.36676 3.12136 6.25 3.12167C5.4212 3.12167 4.62634 3.45091 4.04029 4.03696C3.45424 4.62301 3.125 5.41787 3.125 6.24667C3.12707 8.0694 3.85206 9.81688 5.14092 11.1057C6.42979 12.3946 8.17727 13.1196 10 13.1217C10.4104 13.1217 10.8167 13.0408 11.1959 12.8838C11.575 12.7267 11.9195 12.4966 12.2097 12.2064C12.4999 11.9162 12.7301 11.5717 12.8871 11.1926C13.0442 10.8134 13.125 10.407 13.125 9.99667Z`,fill:`currentColor`})}),Button:M},{key:`linkedin`,labelKey:`community.share.share_to_linkedin`,fallback:`Share to LinkedIn`,Icon:Ne,Button:ye}],dt=`flex items-center w-full gap-4 h-16 px-5 text-base font-normal leading-6 text-black whitespace-nowrap`,ft=`flex w-full items-center gap-2 h-10 px-4 text-left text-sm font-medium leading-[14px] tracking-[-0.14px] whitespace-nowrap text-black`,$=`flex items-center justify-center size-4 shrink-0`,pt=`flex items-center justify-center size-8 rounded-full hover:bg-black/5 transition-colors`,mt=({url:e,title:t})=>{let{t:n}=l(),r=U(),[i,a]=(0,Y.useState)(!1),o=Oe(),{refs:s,floatingStyles:c}=V({placement:`bottom-end`,middleware:[z(8),B(),L({padding:8})],whileElementsMounted:R}),u=()=>{o(e)};return r?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`button`,{type:`button`,className:pt,"aria-label":`Share`,onClick:()=>a(!0),children:(0,Z.jsx)(q,{className:O,fill:`none`})}),(0,Z.jsxs)(Se,{isOpen:i,onClose:()=>a(!1),children:[(0,Z.jsxs)(`div`,{className:`relative flex items-center justify-center px-5 pt-5 pb-2`,children:[(0,Z.jsx)(te.Title,{className:`text-base font-semibold text-black`,children:n(`community.share.share_post`,`Share post`)}),(0,Z.jsx)(`button`,{type:`button`,className:`absolute right-5 flex items-center justify-center size-8 rounded-full hover:bg-black/5`,onClick:()=>a(!1),"aria-label":`Close`,children:(0,Z.jsx)(j,{className:`size-5 text-black/50`})})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col pb-2`,children:[(0,Z.jsxs)(`button`,{type:`button`,className:(0,Q.default)(dt,`border-b border-black/10 hover:bg-black/5 transition-colors`),onClick:()=>{u(),a(!1)},children:[(0,Z.jsx)(`span`,{className:$,children:(0,Z.jsx)(lt,{className:`size-4`})}),(0,Z.jsx)(`span`,{children:n(`community.share.copy_link`,`Copy link`)})]}),ut.map(({key:r,labelKey:i,fallback:o,Icon:s,Button:c})=>(0,Z.jsx)(c,{url:e,title:t,className:`!w-full`,onClick:()=>a(!1),children:(0,Z.jsxs)(`div`,{className:(0,Q.default)(dt,`hover:bg-black/5 transition-colors`),children:[(0,Z.jsx)(`span`,{className:$,children:(0,Z.jsx)(s,{className:`size-4`})}),(0,Z.jsx)(`span`,{children:n(i,o)})]})},r))]})]})]}):(0,Z.jsxs)(x,{as:`div`,className:`relative`,children:[(0,Z.jsx)(x.Button,{ref:s.setReference,className:pt,"aria-label":`Share`,children:(0,Z.jsx)(q,{className:O,fill:`none`})}),(0,Z.jsx)(ne,{as:Y.Fragment,enter:`transition-opacity ease-out duration-100`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`transition-opacity ease-in duration-75`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,Z.jsxs)(x.Items,{ref:s.setFloating,style:c,className:`z-50 min-w-0 overflow-hidden rounded-3xl border border-black/5 bg-white py-1 shadow-[0_4px_6px_rgba(0,0,0,0.08)] focus:outline-none`,children:[(0,Z.jsx)(`div`,{className:`px-4 pb-1 pt-2 text-[11px] leading-none text-black/50`,"aria-hidden":`true`,children:n(`community.share.share_post`,`Share post`)}),(0,Z.jsx)(x.Item,{children:({active:e})=>(0,Z.jsxs)(`button`,{type:`button`,className:(0,Q.default)(ft,`transition-colors`,{"bg-black/5":e}),onClick:u,children:[(0,Z.jsx)(`span`,{className:$,children:(0,Z.jsx)(lt,{className:`size-4`})}),(0,Z.jsx)(`span`,{children:n(`community.share.copy_link`,`Copy link`)})]})}),ut.map(({key:r,labelKey:i,fallback:a,Icon:o,Button:s})=>(0,Z.jsx)(x.Item,{children:({active:r})=>(0,Z.jsx)(s,{url:e,title:t,className:`!w-full`,children:(0,Z.jsxs)(`div`,{className:(0,Q.default)(ft,`transition-colors`,{"bg-black/5":r}),children:[(0,Z.jsx)(`span`,{className:$,children:(0,Z.jsx)(o,{className:`size-4`})}),(0,Z.jsx)(`span`,{children:n(i,a)})]})})},r))]})})]})},ht=({post:e,commentsCount:t=e.comments_count,isCommentsExpanded:n=!1,onToggleComments:r})=>{let{t:i}=l(),a=typeof window<`u`?`${window.location.origin}${G.post(e.id)}`:``,o=e.comments_state===`hidden`;return(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-2 pb-4`,children:[(0,Z.jsx)(F,{reactableType:`CommunityPost`,reactableId:e.id,reactionsCount:e.reactions_count,memberReactions:e.current_member_reactions??[]},e.id),(0,Z.jsxs)(`button`,{type:`button`,onClick:r,"aria-label":i(n?`community.comments.aria_hide`:`community.comments.aria_show`),"aria-expanded":n,className:(0,Q.default)(D,`gap-1`,{"bg-black/5":n}),children:[(0,Z.jsx)(E,{className:O}),!o&&!!t&&(0,Z.jsx)(`span`,{className:`text-[15px] text-black/50 tracking-[-0.15px]`,children:T(t)})]}),(0,Z.jsx)(st,{require:`canCreatePost`,children:(0,Z.jsx)(ct,{post:e})}),(0,Z.jsx)(mt,{url:a,title:e.title})]})};export{Ye as a,Ge as c,rt as i,X as l,at as n,Je as o,it as r,qe as s,ht as t};
4//# sourceMappingURL=PostCardActions-5jWCuIw2.js.map
5//# debugId=24d88f95-b751-57d7-85d3-dd7615d12c2f

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.