1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6510],{13404:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/postDetails/[...slug]",function(){return l(44121)}])},25035:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var n=l(37876);l(14232);var o=l(96145);let s=e=>{let{onBack:t,text:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center ml-7 space-x-2 mb-6",children:[(0,n.jsx)(o.In,{onClick:t,id:"arrow-left-icn",className:"w-5 h-5 align-middle inline-block cursor-pointer"}),(0,n.jsx)(o.DZ,{type:"h2",text:l,className:"text-14 text-black"})]}),(0,n.jsx)("hr",{className:"my-2 pl-0 border-dividerGrey"})]})}},44121:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>b,default:()=>_});var n=l(37876),o=l(77328),s=l.n(o),i=l(14232),r=l(25035),a=l(89099),d=l(53973),c=l(96145),u=l(71256),m=l(86007),p=l(10553),v=l(87704);let x=e=>{var t;let{type:l="",handleCommentPost:o=()=>{},selectedPost:s={},addCommentonPost:r=!1}=e,a="comment"===l,{data:d}=(0,p.useSession)(),u=null==d||null==(t=d.user)?void 0:t.userData,[m,x]=(0,i.useState)(!1),h=()=>{x(!m)};return(0,i.useEffect)(()=>{if(m){let e=window.scrollY;document.body.style.position="fixed",document.body.style.top="-".concat(e,"px"),document.body.style.left="0",document.body.style.right="0",document.body.style.overflow="hidden",document.body.style.width="100%"}else{let e=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.overflow="",document.body.style.width="",window.scrollTo(0,-1*parseInt(e||"0"))}return()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.overflow="",document.body.style.width=""}},[m]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.$n,{onClick:a?o:h,className:"bg-white w-full rounded-[5px] ".concat(a?"py-6":" p-6 shadow-sm"," flex space-x-4 items-center"),children:[(0,n.jsx)(c.Zc,{src:(null==u?void 0:u.profile_pic)||"/image/profile-image.jpg",alt:null==u?void 0:u.first_name,className:"h-10 w-10 rounded-full object-cover"}),(0,n.jsx)("span",{className:"justify-start text-black ".concat(a?"text-12":"text-14"," outline-none"),children:a?"Post your reply":"What's on your mind?"})]}),(0,n.jsx)(v.A,{isOpen:m,onClose:h,selectedPost:s,addCommentonPost:r})]})};var h=l(81220),y=l(97920);let f=e=>{var t,l,o,s;let{postDetails:v}=e,{data:f}=(0,p.useSession)(),g=null==f||null==(t=f.user)?void 0:t.userData,b=null==v?void 0:v.comments_count,[_,j]=(0,i.useState)(v),[w,k]=(0,i.useState)(b),[C,N]=(0,i.useState)({}),[P,A]=(0,i.useState)(!1),[S]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),B=null==v?void 0:v.user,L="".concat(null==B?void 0:B.first_name," ").concat(null==B?void 0:B.last_name),O=null==B?void 0:B.username,T=null!=(s=null!=(o=null==_?void 0:_.likes_count)?o:null==_?void 0:_.like_count)?s:0,U=null==_?void 0:_.reshare_count,F=null==_?void 0:_.updated_at,W=null==_?void 0:_.content,I=(null==_?void 0:_.comments)||[],R=(null==_||null==(l=_.media)?void 0:l.length)>0?null==_?void 0:_.media:[],[Z,H]=(0,i.useState)(!1),[M,V]=(0,i.useState)(!1),$=(0,a.useRouter)();(0,i.useEffect)(()=>{k(null==_?void 0:_.comments_count)},[_]);let X=async(e,t)=>{e.stopPropagation();let l=null==t?void 0:t.id,n=await (0,h.Ci)(l);if(!n.error){let e=null==n?void 0:n.content;j({...t,likes_count:null==e?void 0:e.like_count,is_like_by_user:null==e?void 0:e.is_liked_by_user})}},z=async(e,t)=>{e.stopPropagation();let l=null==t?void 0:t.id;(await (0,h.NK)(l)).error||K(!0)},G=(e,t,l)=>{e.stopPropagation();let n={content:null==t?void 0:t.comment,comments:null==t?void 0:t.replies,id:null==t?void 0:t.id,media:null==t?void 0:t.media,user:null==t?void 0:t.user,parentId:null==_?void 0:_.id,isCommentOnPost:!l,...t};N(t?n:_),D(!0),H(l)},K=(0,i.useCallback)(async e=>{e||A(!0);try{var t;let e=new FormData;e.append("post_id",null==v?void 0:v.id);let l=await (0,h.hA)(e),n=null==l||null==(t=l.content)?void 0:t.post;j(n)}finally{A(!1)}},[null==v?void 0:v.id]);(0,i.useEffect)(()=>{K(!0)},[K]);let Y=e=>{let t=!1;return(null==e?void 0:e.some(e=>e.user_id===(null==g?void 0:g.id)))&&(t=!0),t},q=async e=>{e.stopPropagation();let t=null==_?void 0:_.id,l=new FormData;l.append("title",(null==_?void 0:_.title)||""),null==l||l.append("content",null==_?void 0:_.content),(await (0,h.Vu)(l,t)).error||j({..._,reshare_count:parseInt(null==_?void 0:_.reshare_count,10)+1,is_reshared_by_user:!0})},J=async e=>{e.stopPropagation();let t=null==_?void 0:_.id;(await (0,h.E0)(t)).error||j({..._,isPostSavedByUser:!0})},Q=async e=>{e.stopPropagation(),V(!0)};return(0,n.jsxs)("div",{className:"w-full mt-6 mb-[30px] md:mb-0 rounded-md",children:[(0,n.jsx)("div",{children:(0,n.jsx)(r.A,{onBack:()=>{$.push("/")},text:"Back"})}),P?(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(c.aH,{className:"text-primary"})}):(0,n.jsx)("div",{className:"mt-4 p-4",children:(0,n.jsxs)("div",{className:"cursor-pointer items-start space-x-4 bg-white rounded-[5px] p-5",children:[(0,n.jsxs)("div",{className:"flex gap-5",children:[(0,n.jsx)(c.Zc,{src:(null==B?void 0:B.profile_pic)||"/images/profile-image.jpg",alt:null==B?void 0:B.first_name,className:"w-10 h-10 rounded-full object-cover"}),(0,n.jsx)(d.A,{content:W,postedByUserName:L,postedByUserHandle:O,updatedTime:F,post:v,redirectToDetail
1s:!1,images:R})]}),(0,n.jsxs)("div",{className:"pl-5",children:[(0,n.jsx)(u.A,{post:_,postActions:((e,t,l)=>{let n=[{id:(null==_?void 0:_.is_like_by_user)?"heart-icn-fill":"heart-icn",label:"Like",count:T,stroke:(null==_?void 0:_.is_like_by_user)?"text-red":"currentColor",onActionClick:X},{id:"comment-icn",label:"Comment",count:w,onActionClick:G},{id:(null==_?void 0:_.is_reshared_by_user)?"repost-icn-highligted":"repost-icn",label:"Share",count:U,stroke:(null==_?void 0:_.is_reshared_by_user)?"text-red":"currentColor",className:(null==_?void 0:_.is_reshared_by_user)?"text-green":"",onActionClick:q},{id:"share-icn",label:"Share Link",onActionClick:Q,suffix:S},{id:(null==_?void 0:_.isPostSavedByUser)?"saved-icn-fill":"save-icn",label:"Bookmark",count:null,stroke:(null==_?void 0:_.isPostSavedByUser)?"text-red":"currentColor",onActionClick:J}],o=[{id:Y(void 0)?"heart-icn-fill":"heart-icn",label:"Like",count:void 0,stroke:Y(null==t?void 0:t.likes)?"text-red":"currentColor",onActionClick:z},{id:"comment-icn",label:"Comment",count:(e=>{var t,l,n,o;let s=null==_||null==(n=_.comments)||null==(l=n.filter)||null==(t=l.call(n,t=>(null==t?void 0:t.id)===(null==e?void 0:e.id)))?void 0:t[0];return null==s||null==(o=s.replies)?void 0:o.length})(t,void 0),onActionClick:G,commentAction:!0},{id:"repost-icn",label:"Share",count:U}];return"comment"===e?o:n})("post")}),S&&(0,n.jsx)("span",{className:"text-xs w-full flex justify-center bg-black text-center text-white rounded-[5px] px-3 py-1 mt-3",children:"Post link copied to clipboard"})]}),(0,n.jsx)(x,{type:"comment",handleCommentPost:G,selectedPost:{..._,isCommentOnPost:!0},addCommentonPost:!0}),(0,n.jsx)("hr",{}),(null==I?void 0:I.length)>0&&(null==I?void 0:I.map((e,t)=>{var l,o,s,i,r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{class:"max-w-xl mt-3 rounded-[5px] flex space-x-4",children:[(0,n.jsx)(c.Zc,{src:(null==e||null==(l=e.user)?void 0:l.profile_pic)||"/images/profile-image.jpg",alt:null==e||null==(o=e.user)?void 0:o.first_name,className:"w-10 h-10 rounded-full object-cover"}),(0,n.jsx)(d.A,{content:null==e?void 0:e.comment,postedByUserName:"".concat(null==e||null==(s=e.user)?void 0:s.first_name," ").concat(null==e||null==(i=e.user)?void 0:i.last_name),postedByUserHandle:"".concat(null==e||null==(r=e.user)?void 0:r.username),updatedTime:null==e?void 0:e.updated_at,redirectToDetails:!1,images:null==e?void 0:e.media,isComment:!0,comment:e})]},"comments-key-".concat(t)),(0,n.jsx)("hr",{className:"mt-5"})]})}))]})}
1),(0,n.jsx)(m.A,{showCommentModal:E,onCloseCommentModal:()=>{N({}),D(!1),K()},selectedPost:C,commentOn:Z?"comment":"post"}),M&&(0,n.jsx)(y.A,{isOpen:M,onClose:()=>{V(!1)},postUrl:"".concat("https://velaflow.com","/postDetails/").concat(null==_?void 0:_.slug),postContent:(null==_?void 0:_.content)||""})]})};var g=l(23555),b=!0;function _(e){var t,l,o;let{userDetails:i,postDetails:r,suggestionList:a,tagsList:d}=e,c=null==r?void 0:r.user,u="".concat((null==c?void 0:c.first_name)||""," ").concat((null==c?void 0:c.last_name)||"").trim()||"User",m=(null==r?void 0:r.title)||"".concat(u,"'s post"),p=(null==r||null==(t=r.content)?void 0:t.replace(/<\/?[^>]+(>|$)/g,"").slice(0,150))||"Check out this post on VelaFlow!",v=(null==r||null==(o=r.media)||null==(l=o[0])?void 0:l.url)||(null==c?void 0:c.profile_pic),x="".concat("https://velaflow.com","/postDetails/").concat(null==r?void 0:r.slug);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s(),{children:[(0,n.jsx)("title",{children:m}),(0,n.jsx)("meta",{name:"title",content:m}),(0,n.jsx)("meta",{name:"description",content:p}),(0,n.jsx)("meta",{property:"og:type",content:"article"}),(0,n.jsx)("meta",{property:"og:url",content:x}),(0,n.jsx)("meta",{property:"og:title",content:m}),(0,n.jsx)("meta",{property:"og:description",content:p}),(0,n.jsx)("meta",{property:"og:image",content:v}),(0,n.jsx)("meta",{property:"og:site_name",content:"VelaFlow"}),(0,n.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,n.jsx)("meta",{name:"twitter:title",content:m}),(0,n.jsx)("meta",{name:"twitter:description",content:p}),(0,n.jsx)("meta",{name:"twitter:image",content:v})]}),(0,n.jsx)(g.A,{userDetails:i,tagsList:d,suggestionList:a,children:(0,n.jsx)(f,{postDetails:r})})]})}},53917:e=>{e.exports=function(e,t,l){var n,o,s,i,r,a,d,c,u,m=["img","br"],p=[],v=0,x="",h='([\\w|-]+\\s*(=\\s*"[^"]*")?\\s*)*',y="\\s*\\/?\\s*",f=RegExp("<\\/?\\w+\\s*"+h+"\\s*\\/\\s*>"),g=RegExp("<\\/?\\w+\\s*"+h+y+">"),b=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w\-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3})/g,_=RegExp("<img\\s*"+h+y+">"),j=RegExp("\\W+","g"),w=!0;function k(e,n){var o,s,i=t-v,r=i,a=i<l.slop,d=a?i:l.slop-1,c=a?0:i-l.slop,u=n||i+l.slop;if(!l.truncateLastWord){if(o=e.slice(c,u),n&&o.length<=n)r=o.length;else for(;null!==(s=j.exec(o));)if(s.index<d){if(r=i-(d-s.index),0===s.index&&i<=1)break}else if(s.index===d){r=i;break}else{r=i+(s.index-d);break}e.charAt(r-1).match(/\s$/)&&r--}return r}for((l=l||{}).ellipsis=void 0!==l.ellipsis?l.ellipsis:"...",l.truncateLastWord=void 0===l.truncateLastWord||l.truncateLastWord,l.slop=void 0!==l.slop?l.slop:10>t?t:10;w;){if(!(w=g.exec(e))){if(v>=t)break;if(!(w=b.exec(e))||w.index>=t){x+=e.substring(0,k(e));break}for(;w;)a=w[0],d=w.index,x+=e.substring(0,d+a.length-v),e=e.substring(d+a.length),w=b.exec(e);break}if(a=w[0],d=w.index,v+d>t){x+=e.substring(0,k(e,d));break}v+=d,x+=e.substring(0,d),"/"===a[1]?(p.pop(),u=null):(u=f.exec(a))||(c=function(e){var t=e.indexOf(" ");if(-1===t&&-1===(t=e.indexOf(">")))throw Error("HTML tag is not well-formed : "+e);return e.substring(1,t)}(a),p.push(c)),u?x+=u[0]:x+=a,e=e.substring(d+a.length)}return e.length>t-v&&l.ellipsis&&(x+=l.ellipsis),x+=(n="",p.reverse().forEach(function(e,t){-1===m.indexOf(e)&&(n+="</"+e+">")}),n),l.keepImageTag||(o=x,x=(r=_.exec(o))?(s=r.index,i=r[0].length,o.substring(0,s)+o.substring(s+i)):o),x}}},e=>{e.O(0,[3716,9634,3555,3433,636,6593,8792],()=>e(e.s=13404)),_N_E=e.O()}]);
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.