PageSourceSearch

https://melissawoodhealth.com/static/js/6897.b7ec05d7.chunk.js

js melissawoodhealth.com collected 2026-10-02 10:50:59 UTC 64,827 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunkmwh_website=self.webpackChunkmwh_website||[]).push([[6897],{6569:(e,t,i)=>{i.d(t,{h:()=>a});var n,l,s=i(9950);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(null,arguments)}function r(e,t){let{title:i,titleId:r,...a}=e;return s.createElement("svg",o({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},a),i?s.createElement("title",{id:r},i):null,n||(n=s.createElement("path",{d:"M20.6667 7.33203L7.33333 20.6654",stroke:"#2F2F2F",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),l||(l=s.createElement("path",{d:"M7.33333 7.33203L20.6667 20.6654",stroke:"#2F2F2F",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))}const a=s.forwardRef(r);i.p},14966:(e,t,i)=>{i.d(t,{h:()=>c});var n,l,s,o,r=i(9950);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},a.apply(null,arguments)}function d(e,t){let{title:i,titleId:d,...c}=e;return r.createElement("svg",a({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":d},c),i?r.createElement("title",{id:d},i):null,n||(n=r.createElement("path",{d:"M2.5 5H4.16667H17.5",stroke:"#C00000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),l||(l=r.createElement("path",{d:"M6.66602 4.99935V3.33268C6.66602 2.89065 6.84161 2.46673 7.15417 2.15417C7.46673 1.84161 7.89065 1.66602 8.33268 1.66602H11.666C12.108 1.66602 12.532 1.84161 12.8445 2.15417C13.1571 2.46673 13.3327 2.89065 13.3327 3.33268V4.99935M15.8327 4.99935V16.666C15.8327 17.108 15.6571 17.532 15.3445 17.8445C15.032 18.1571 14.608 18.3327 14.166 18.3327H5.83268C5.39065 18.3327 4.96673 18.1571 4.65417 17.8445C4.34161 17.532 4.16602 17.108 4.16602 16.666V4.99935H15.8327Z",stroke:"#C00000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),s||(s=r.createElement("path",{d:"M8.33398 9.16602V14.166",stroke:"#C00000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),o||(o=r.createElement("path",{d:"M11.666 9.16602V14.166",stroke:"#C00000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))}const c=r.forwardRef(d);i.p},34791:(e,t,i)=>{i.d(t,{h:()=>d});var n,l,s,o=i(9950);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}function a(e,t){let{title:i,titleId:a,...d}=e;return o.createElement("svg",r({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":a},d),i?o.createElement("title",{id:a},i):null,n||(n=o.createElement("rect",{x:.900391,y:.898438,width:18.2,height:18.2,rx:.5,stroke:"#2F2F2F"})),l||(l=o.createElement("path",{d:"M12.3541 7.57487C12.5451 7.34654 12.8921 7.33468 13.0983 7.54944L18.9591 13.6545C19.0485 13.7476 19.0984 13.8717 19.0984 14.0007V18.5768C19.0984 18.8571 18.868 19.0827 18.5877 19.0767L15.2216 19.0046L8.66705 11.9819L12.3541 7.57487Z",stroke:"#2F2F2F"})),s||(s=o.createElement("path",{d:"M6.62886 10.5437C6.82756 10.3269 7.16952 10.3276 7.36736 10.5452L11.2682 14.8348L15.1454 19.0984H1.40039C1.12425 19.0984 0.900391 18.8746 0.900391 18.5984V16.7929L6.62886 10.5437Z",stroke:"#2F2F2F"})))}const d=o.forwardRef(a);i.p},69258:(e,t,i)=>{i.d(t,{A:()=>c});i(9950);var n=i(63464),l=i(28170),s=i(79739),o=i(10226),r=(i(92551),i(63137)),a=i(86353),d=i(44414);const c=e=>{let{open:t,title:i,text:c,confirmBtnText:u="Confirm",declineBtnText:p="Not Now",isBothButtonVisible:h=!0,confirmFunction:m,declineFunction:v,renderTextAsHTML:g=!1,className:f="",confirmBtnClass:w="tertiary-btn",declineBtnClass:x="secondary-btn"}=e;return(0,d.jsx)("div",{children:(0,d.jsxs)(n.A,{open:t,onClose:v,className:"dialog-box wrapper-box",children:[(0,d.jsxs)(l.A,{className:f,children:[(0,d.jsx)(a.h,{className:"close-icon",onClick:v,width:32,height:32}),(0,d.jsx)("h3",{className:"primary-black-text light",children:i}),g?(0,d.jsx)(r.A,{data:c}
1):(0,d.jsx)("p",{className:"small-copy dark-gray-text",children:c})]}),(0,d.jsxs)(s.A,{className:"decision-btns",children:[h&&(0,d.jsx)(o.A,{variant:"contained",className:x,onClick:v,disableRipple:!0,children:p}),(0,d.jsx)(o.A,{variant:"contained",className:w,onClick:m,disableRipple:!0,autoFocus:!0,children:u})]})]})})}},22227:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Mt});var n=i(9950),l=i(60899),s=i(10226),o=i(88307),r=i(28429),a=i(46589),d=i(75208),c=i(63464),u=i(60213),p=i(84645),h=i(38612),m=i(34834),v=i(82861),g=i(96086),f=i(14053);const w=(e,t,i)=>{var n;const l=(0,f.S4)(e.media),s=new Date(e.createdAt),r=(new Date).getTimezoneOffset(),a=new Date(s.getTime()-6e4*r),d=(0,o.GP)(a,"hh:mm a"),c=j(),u=null===c||void 0===c?void 0:c.find((t=>t.postId===e.id)),p=u&&(null===u||void 0===u?void 0:u.likeCount)!==e.likes?null===u||void 0===u?void 0:u.likeCount:e.likes;if(u&&(null===u||void 0===u?void 0:u.likeCount)===e.likes){const t=null===c||void 0===c?void 0:c.filter((t=>t.postId!==e.id));b(t)}return{type:(0,f.Br)(e.author.username),ownPost:e.author.username===t.disqusUserId,id:e.id,author:e.author.name,postDate:(0,o.GP)(new Date(e.createdAt),"dd-MMM-yyyy"),createdAt:e.createdAt,profilePic:e.author.url,message:e.raw_message,content:(0,f.xv)(e.message,e.media.length>0),link:e.author.profileUrl,likes:p,timestamp:d,image:null!==(n=null===l||void 0===l?void 0:l.thumbnailURL)&&void 0!==n?n:"",parent:e.parent,media:l?{title:l.title,description:l.description,thumbnail:l.thumbnailURL,resolvedUrl:l.resolvedUrl}:void 0}},x=(e,t,i)=>{e[t]||(e[t]=[]),e[t].some((e=>e.id===i.id))||e[t].push(i)},y=()=>{const e=localStorage.getItem(m.JU.LOCAL_STORAGE_POSTS_LIST);return e?JSON.parse(e):[]},C=(e,t)=>{const i=y();if("add"===t)i.includes(e)||i.push(e);else if("remove"===t){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}localStorage.setItem(m.JU.LOCAL_STORAGE_POSTS_LIST,JSON.stringify(i))},j=()=>{const e=localStorage.getItem(m.JU.LOCAL_STORAGE_TOTAL_LIKE_POSTS_LIST);return e?JSON.parse(e):[]},b=e=>{localStorage.setItem(m.JU.LOCAL_STORAGE_TOTAL_LIKE_POSTS_LIST,JSON.stringify(e))},k=(e,t)=>{const i=j(),n=i.findIndex((t=>t.postId===e));-1!==n?i[n].likeCount=t:i.push({postId:e,likeCount:t}),localStorage.setItem(m.JU.LOCAL_STORAGE_TOTAL_LIKE_POSTS_LIST,JSON.stringify(i))};var E,N,L,A=i(87619);function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},T.apply(null,arguments)}function M(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,E||(E=n.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",fill:"#2F2F2F",stroke:"#2F2F2F",strokeLinecap:"round",strokeLinejoin:"round"})),N||(N=n.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",fill:"#2F2F2F",stroke:"#2F2F2F",strokeLinecap:"round",strokeLinejoin:"round"})),L||(L=n.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",fill:"#2F2F2F",stroke:"#2F2F2F",strokeLinecap:"round",strokeLinejoin:"round"})))}const S=n.forwardRef(M);i.p;var O;function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},I.apply(null,arguments)}function D(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",I({width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,O||(O=n.createElement("path",{d:"M9.9974 16.5C9.9974 16.5 1.66406 13.2833 1.66406 6.08333C1.66406 4.86776 2.14689 3.70201 3.00643 2.84247C3.86597 1.98293 5.03182 1.5 6.2474 1.5C6.98406 1.49975 7.70968 1.67769 8.36267 2.0187C9.01566 2.3597 9.57663 2.85363 9.9974 3.45831C10.4187 2.85414 10.9794 2.36066 11.6323 2.01971C12.2852 1.67877 13.0109 1.50045 13.7474 1.5C14.963 1.5 16.1286 1.98293 16.9882 2.84247C17.8477 3.70201 18.3307 4.86776 18.3307 6.08333C18.3307 13.2833 9.9974 16.5 9.9974 16.5Z",stroke:"#2F2F2F",strokeWidth:1.5,strokeLinejoin:"round"})))}const P=n.forwardRef(D);i.p;var R;function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},F.apply(null,arguments)}function U(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",F({xmlns:"http://www.w3.org/2000/svg",width:20,height:18,viewBox:"0 0 20 18",fill:"none",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,R||(R=n.createElement("path",{d:"M9.9974 16.5C9.9974 16.5 1.66406 13.2833 1.66406 6.08333C1.66406 4.86776 2.14689 3.70201 3.00643 2.84247C3.86597 1.98293 5.03182 1.5 6.2474 1.5C6.98406 1.49975 7.70968 1.67769 8.36267 2.0187C9.01566 2.3597 9.57663 2.85363 9.9974 3.45831C10.4187 2.85414 10.9794 2.36066 11.6323 2.01971C12.2852 1.67877 13.0109 1.50045 13.7474 1.5C14.963 1.5 16.1286 1.98293 16.9882 2.84247C17.8477 3.70201 18.3307 4.86776 18.3307 6.08333C18.3307 13.2833 9.9974 16.5 9.9974 16.5Z",fill:"#2F2F2F",stroke:"#2F2F2F",strokeWidth:1.5,strokeLinejoin:"round"})))}const _=n.forwardRef(U);i.p;var V;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},B.apply(null,arguments)}function J(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",B({width:19,height:17,viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,V||(V=n.createElement("path",{d:"M1 15.5827C1 11.416 6.44167 10.5827 10.1667 10.5827V14.7493L17.3582 8.73271C17.4556 8.65462 17.5342 8.5556 17.5881 8.4431C17.6421 8.33059 17.6701 8.20746 17.6701 8.08268C17.6701 7.9579 17.6421 7.83467 17.5881 7.72217C17.5342 7.60967 17.4556 7.51074 17.3582 7.43266L10.1667 1.41602V5.58268C3.5 5.58268 1 10.2827 1 15.5827Z",stroke:"#2F2F2F",strokeWidth:1.5,strokeLinejoin:"round"})))}const G=n.forwardRef(J);i.p;var H,q,W,Y,Z=i(41748),K=i(14966);function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},$.apply(null,arguments)}function z(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",$({xmlns:"http://www.w3.org/2000/svg",width:21,height:20,viewBox:"0 0 21 20",fill:"none",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,H||(H=n.createElement("path",{d:"M3 5H4.66667H18",stroke:"#FF3B30",strokeLinecap:"round",strokeLinejoin:"round"})),q||(q=n.createElement("path",{d:"M7.16797 4.99935V3.33268C7.16797 2.89065 7.34356 2.46673 7.65612 2.15417C7.96868 1.84161 8.39261 1.66602 8.83464 1.66602H12.168C12.61 1.66602 13.0339 1.84161 13.3465 2.15417C13.659 2.46673 13.8346 2.89065 13.8346 3.33268V4.99935M16.3346 4.99935V16.666C16.3346 17.108 16.159 17.532 15.8465 17.8445C15.5339 18.1571 15.11 18.3327 14.668 18.3327H6.33464C5.89261 18.3327 5.46868 18.1571 5.15612 17.8445C4.84356 17.532 4.66797 17.108 4.66797 16.666V4.99935H16.3346Z",stroke:"#FF3B30",strokeLinecap:"round",strokeLinejoin:"round"})),W||(W=n.createElement("path",{d:"M8.83203 9.16602V14.166",stroke:"#FF3B30",strokeLinecap:"round",strokeLinejoin:"round"})),Y||(Y=n.createElement("path",{d:"M12.168 9.16602V14.166",stroke:"#FF3B30",strokeLinecap:"round",strokeLinejoin:"round"})))}const X=n.forwardRef(z);i.p;var Q=i(44414);const ee=e=>{var t,i,l;let{postDetails:s,isThreadVisible:o,onPostReplyClick:r,setIsHoverMessage:d,setSnackbarVisible:c,onMWebModalClose:f,onRefetchPost:w,onLikeThreadClick:x}=e;const C=(0,a.A)("(max-width:1024px)"),[j,b]=n.useState(null),k=Boolean(j),{disqusSSOAuth:E}=(0,n.useContext)(g.V),N=()=>{b(null),d(!1),f&&f()},L=()=>
1{if(s.message.length>0){const e=s.media?s.message.replace(A.CU,""):s.message;navigator.clipboard.writeText(e).catch((e=>console.log("error",e)))}N(),f&&f(),c({type:"success",message:"Text Copied"}),setTimeout((()=>{c({type:"info",message:""})}),3e3)},T=async()=>{try{await(0,v.B7)(s.id,E.authToken),w(m.JU.DELETE_POST),f&&f(),N()}catch(e){console.error(e)}},M=()=>{N(),x()},O=C&&(null===(t=s.media)||void 0===t?void 0:t.resolvedUrl)||!C;return(0,Q.jsxs)("div",{className:"message-menu",children:[O&&(0,Q.jsxs)("div",{children:[(0,Q.jsx)(S,{height:16,width:16,className:"cursor-pointer",id:"menu-positioned-button","aria-controls":k?"action-menu":void 0,"aria-haspopup":"true","aria-expanded":k?"true":void 0,onClick:e=>{b(e.currentTarget)}}),(0,Q.jsxs)(p.A,{id:"action-menu","aria-labelledby":"menu-positioned-button",anchorEl:j,open:k,onClose:N,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},autoFocus:!1,className:(0,u.fr)(Boolean(C&&(null===s||void 0===s||null===(i=s.media)||void 0===i?void 0:i.resolvedUrl)),"mobile-menu","","action-menu-item"),children:[(0,Q.jsxs)(h.A,{onClick:M,disableRipple:!0,children:[y().includes(s.id)?(0,Q.jsx)(_,{height:20,width:20}):(0,Q.jsx)(P,{height:20,width:20}),(0,Q.jsx)("p",{className:"small-copy",children:(0,u.fr)(y().includes(s.id),"Unlike","Like")})]}),o&&(0,Q.jsxs)(h.A,{onClick:()=>{N(),r(s.id)},disableRipple:!0,children:[(0,Q.jsx)(G,{height:20,width:20}),(0,Q.jsx)("p",{className:"small-copy",children:"Reply"})]}),s.content&&(0,Q.jsxs)(h.A,{onClick:L,disableRipple:!0,children:[(0,Q.jsx)(Z.h,{height:20,width:20}),(0,Q.jsx)("p",{className:"small-copy",children:"Copy Text"})]}),s.ownPost&&(0,Q.jsxs)(h.A,{onClick:T,disableRipple:!0,children:[(0,Q.jsx)(K.h,{height:20,width:20}),(0,Q.jsx)("p",{className:"small-copy delete-text",children:"Delete For Everyone"})]})]})]}),C&&!(null!==(l=s.media)&&void 0!==l&&l.resolvedUrl)&&(0,Q.jsxs)("div",{className:"mobile-action-menu",children:[(0,Q.jsxs)("div",{className:(0,u.fr)(!s.ownPost,"rounded-menu","","mweb-action-background"),children:[(0,Q.jsxs)(h.A,{onClick:M,className:"content-alignment",disableRipple:!0,children:[(0,Q.jsx)("p",{className:"small-copy",children:(0,u.fr)(y().includes(s.id),"Unlike","Like")}),y().includes(s.id)?(0,Q.jsx)(_,{height:20,width:20}):(0,Q.jsx)(P,{height:20,width:20})]}),o&&(0,Q.jsxs)(h.A,{onClick:()=>{N(),r(s.id)},disableRipple:!0,className:"content-alignment",children:[(0,Q.jsx)("p",{className:"small-copy",children:"Reply"}),(0,Q.jsx)(G,{height:20,width:20})]}),s.content&&(0,Q.jsxs)(h.A,{onClick:L,disableRipple:!0,className:"content-alignment",children:[(0,Q.jsx)("p",{className:"small-copy",children:"Copy Text"}),(0,Q.jsx)(Z.h,{height:20,width:20})]})]}),s.ownPost&&(0,Q.jsxs)(h.A,{onClick:T,disableRipple:!0,className:"mweb-action-background mweb-delete-menu content-alignment",children:[(0,Q.jsx)("p",{className:"small-copy delete-text",children:"Delete For Everyone"}),(0,Q.jsx)(X,{height:20,width:20})]})]})]})};var te=i(48089),ie=i(16491),ne=i(25333),le=i(38092),se=i.n(le),oe=i(63137),re=i(99515),ae=i(6569);const de=e=>{let{isModalOpen:t,selectedImage:i,setIsModalOpen:n}=e;return(0,Q.jsx)(re.A,{open:t,onClose:()=>n(!1),className:"user-uploaded-image-modal",children:(0,Q.jsxs)(ie.A,{className:"user-uploaded-image-modal-wrapper",children:[(0,Q.jsx)("div",{className:"cancel-btn",children:(0,Q.jsx)(ae.h,{onClick:()=>n(!1),width:32,height:32,className:"cursor-pointer white-stroke hide-mobile"})}),(0,Q.jsxs)("div",{className:"image-header-wrapper hide-desktop",children:[(0,Q.jsx)(ae.h,{onClick:()=>n(!1),width:32,height:32,className:"cursor-pointer white-stroke"}),(0,Q.jsx)("p",{className:"image-header big-copy center-text",children:"Photo"})]}),(0,Q.jsx)("div",{className:"user-uploaded-image",children:(0,Q.jsx)("img",{src:i,alt:"MWH-Community"})})]})})};var ce,ue,pe;function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},he.apply(null,arguments)}function me(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",he({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,ce||(ce=n.createElement("path",{d:"M9.28677 3.46294L9.28759 3.4621L9.28677 3.46294ZM9.28759 3.4621C9.88457 2.85046 10.6905 2.51052 11.5282 2.51173C12.3641 2.51232 13.169 2.85361 13.7653 3.46537C14.3612 4.07763 14.6992 4.91079 14.6998 5.78173C14.7004 6.65305 14.3645 7.48674 13.7694 8.10012L8.85348 13.1501C8.25674 13.6201 7.87746 13.5836 7.14694 13.1518L7.146 13.1508L2.23008 8.10007C1.63501 7.48687 1.29922 6.6532 1.29981 5.78173C1.3004 4.91069 1.63831 4.07774 2.23433 3.46535C2.8305 2.85362 3.63551 2.51232 4.47144 2.51172C5.30888 2.51053 6.11497 2.85103 6.71209 3.46285L6.71284 3.46362L7.64027 4.42329L7.99994 4.79546L9.28759 3.4621Z",fill:"url(#paint0_linear_18576_13595)"})),ue||(ue=n.createElement("path",{d:"M9.28677 3.46294L9.28759 3.4621M9.28759 3.4621C9.88458 2.85046 10.6905 2.51052 11.5282 2.51173C12.3641 2.51232 13.169 2.85361 13.7653 3.46537C14.3612 4.07763 14.6992 4.91079 14.6998 5.78173C14.7004 6.65305 14.3645 7.48674 13.7694 8.10012L8.85348 13.1501C8.25674 13.6201 7.87746 13.5836 7.14694 13.1518L7.146 13.1508L2.23008 8.10007C1.63501 7.48687 1.29922 6.6532 1.29981 5.78173C1.3004 4.91069 1.63831 4.07774 2.23433 3.46535C2.8305 2.85362 3.63551 2.51232 4.47144 2.51172C5.30888 2.51053 6.11497 2.85103 6.71209 3.46285L6.71284 3.46362L7.64027 4.42329L7.99994 4.79546L9.28759 3.4621Z",stroke:"#784017"})),pe||(pe=n.createElement("defs",null,n.createElement("linearGradient",{id:"paint0_linear_18576_13595",x1:8.88056,y1:-.140586,x2:8.56895,y2:7.45206,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:"white"}),n.createElement("stop",{offset:1,stopColor:"#784017"})))))}const ve=n.forwardRef(me);i.p;var ge,fe,we;function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},xe.apply(null,arguments)}function ye(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",xe({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,ge||(ge=n.createElement("rect",{x:1,y:1,width:9,height:9,rx:4.5,fill:"#EDEBE7"})),fe||(fe=n.createElement("g",{clipPath:"url(#clip0_19508_49417)"},n.createElement("path",{d:"M5.6578 3.34806V8.0621",stroke:"#848182",strokeLinecap:"round",strokeLinejoin:"round"}
1),n.createElement("path",{d:"M3.30078 5.70508H8.01483",stroke:"#848182",strokeLinecap:"round",strokeLinejoin:"round"}))),we||(we=n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_19508_49417"},n.createElement("rect",{width:5.33333,height:5.33333,fill:"white",transform:"translate(1.88672 5.70508) rotate(-45)"})))))}const Ce=n.forwardRef(ye),je=(i.p,e=>{var t,i,l;let{postDetail:s,isThreadVisible:o,isHoverMessage:r,onRefetchPost:a}=e;const[d,c]=(0,n.useState)(!1),[p,h]=(0,n.useState)(!1);return(0,Q.jsxs)(te.A,{className:(0,u.fr)(s.type===m.EA.ADMIN||s.type===m.EA.SUPER_ADMIN,"author-background","user-background",(0,u.fr)(!s.image,(0,u.fr)(!o,"thread-without-image-max-width","without-image-max-width"),"with-image-max-width","post-card")),children:[0!==s.likes&&(0,Q.jsx)(ie.A,{className:"like-section",onClick:()=>a(m.JU.LIKE_POST),children:(0,Q.jsxs)(ne.A,{className:(0,u.fr)(y().includes(s.id),"active-like-counter","","like-button"),children:[(0,Q.jsx)(ve,{height:16,width:16}),(0,Q.jsx)("p",{children:s.likes})]})}),(s.defaultLikeSection||r)&&0===s.likes&&(0,Q.jsx)(ie.A,{className:"like-section like-counter",onClick:()=>a(m.JU.LIKE_POST),children:(0,Q.jsxs)(ne.A,{className:"like-button",children:[(0,Q.jsx)(ve,{height:16,width:16}),(0,Q.jsx)(Ce,{height:11,width:11,className:"plus-icon"})]})}),s.media&&(0,Q.jsxs)("div",{className:"post-media-container",children:[s.image&&!s.media.resolvedUrl&&(0,Q.jsx)("img",{src:null===s||void 0===s?void 0:s.image,alt:"posted-yoga",className:(0,u.fr)((null===s||void 0===s||null===(t=s.content)||void 0===t?void 0:t.length)>0,"post-image","post-image-without-content","cursor-pointer"),onClick:()=>c(!0)}),(null===s||void 0===s||null===(i=s.media)||void 0===i?void 0:i.resolvedUrl)&&(0,Q.jsx)(se(),{url:s.media.resolvedUrl,controls:!0,width:"auto",onPlay:()=>h(!0),onPause:()=>h(!1),height:"auto",className:"post-media-video-player"}),!p&&0===s.content.length&&(0,Q.jsx)("p",{className:"timestamp-content",children:s.timestamp})]}),(null===(l=s.content)||void 0===l?void 0:l.length)>0&&(0,Q.jsxs)("div",{className:"message-content",children:[(0,Q.jsx)(oe.A,{_class:"small-copy",data:s.content}),(0,Q.jsx)("p",{className:"message-timestamp",children:s.timestamp})]}),(0,Q.jsx)(de,{isModalOpen:d,selectedImage:s.image,setIsModalOpen:e=>c(e)})]})});var be,ke;function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Ee.apply(null,arguments)}function Ne(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",Ee({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,be||(be=n.createElement("g",{clipPath:"url(#clip0_18309_71594)"},n.createElement("path",{d:"M6 1L7.545 4.13L11 4.635L8.5 7.07L9.09 10.51L6 8.885L2.91 10.51L3.5 7.07L1 4.635L4.455 4.13L6 1Z",stroke:"#AC9379",strokeLinecap:"round",strokeLinejoin:"round"}))),ke||(ke=n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_18309_71594"},n.createElement("rect",{width:12,height:12,fill:"white"})))))}const Le=n.forwardRef(Ne),Ae=(i.p,e=>{var t,i,l,s,o,r,p,h,f,w,x;let{postDetails:j,isThreadVisible:b=!0,isActionModalEnabled:E=!0,onPostReplyClick:N,onRefetchPost:L,setSnackbarVisible:A}=e;const T=(0,a.A)("(max-width:1024px)"),M=(0,n.useRef)(null),S=(0,n.useRef)(null),O=/(iPad|iPhone|iPod)/i.test(navigator.userAgent),{disqusSSOAuth:I}=(0,n.useContext)(g.V),[D,P]=(0,n.useState)(!1),R=(0,n.useRef)(0),F=(0,n.useRef)(!1),[U,_]=(0,n.use
1State)(!1);(0,n.useEffect)((()=>{if(/(iPad|iPhone|iPod)/i.test(navigator.userAgent)){const e=document.querySelector('meta[name="viewport"]');e&&e.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1")}}),[]);const V=e=>{if(T){M.current&&clearTimeout(M.current);Date.now()-R.current>=500&&F.current&&P(!0),F.current=!1}};(0,u.jz)(S,(e=>{e.target instanceof Node&&S.current&&!S.current.contains(null===e||void 0===e?void 0:e.target)&&P(!1)}));const B=async()=>{try{const e=j.id,t=y();t.includes(e)&&0!==(null===j||void 0===j?void 0:j.likes)?(await(0,v.D5)(e,0,null===I||void 0===I?void 0:I.authToken),C(e,"remove"),k(e,(null===j||void 0===j?void 0:j.likes)-1),L(null===j||void 0===j?void 0:j.id,m.JU.UNLIKE_POST)):(await(0,v.D5)(e,1,null===I||void 0===I?void 0:I.authToken),C(e,"add"),k(e,(null===j||void 0===j?void 0:j.likes)+1),L(null===j||void 0===j?void 0:j.id,m.JU.LIKE_POST))}catch(e){console.error(e)}},J=async e=>{e===m.JU.LIKE_POST?await B():L(null===j||void 0===j?void 0:j.id,e)};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)("div",{className:(0,u.fr)(Boolean(T&&(null===(t=j.media)||void 0===t?void 0:t.resolvedUrl)),"p-0","","message-wrapper"),children:[(0,Q.jsx)("div",{className:"user-avatar",children:(0,Q.jsx)(d.A,{alt:null===(i=j.author)||void 0===i?void 0:i.toUpperCase(),src:(null===(l=j.profilePic)||void 0===l?void 0:l.length)>0?j.profilePic:null===(s=j.author)||void 0===s?void 0:s.toUpperCase(),className:"profile-avatar"})}),(0,Q.jsxs)("div",{children:[(0,Q.jsxs)("div",{role:"none",onMouseEnter:()=>_(!O),onMouseLeave:()=>_(!1),ref:S,children:[(0,Q.jsxs)("div",{className:"author-details",children:[j.type===m.EA.SUPER_ADMIN&&(0,Q.jsx)(Le,{width:12,height:12}),(0,Q.jsx)("p",{className:(0,u.fr)(j.type===m.EA.ADMIN||j.type===m.EA.SUPER_ADMIN,"admin-details","user-details",(0,u.fr)(""!==(null===j||void 0===j?void 0:j.message)&&(null===j||void 0===j||null===(o=j.message)||void 0===o?void 0:o.length)<=20,"auhor-name-elipse","")),children:j.author})]}),(0,Q.jsxs)("div",{role:"button",tabIndex:0,onTouchStart:e=>{T&&(e.preventDefault(),e.stopPropagation(),"ontouchstart"in window&&(R.current=Date.now(),window.navigator.vibrate&&!/(iPad|iPhone|iPod)/i.test(navigator.userAgent)&&window.navigator.vibrate(50),M.current=setTimeout((()=>{Date.now()-R.current>=500&&(F.current=!0,P(!0))}),500)))},onTouchEnd:V,onTouchMove:e=>{T&&(e.preventDefault(),e.stopPropagation(),M.current&&(clearTimeout(M.current),F.current=!1))},onTouchCancel:V,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),P(!0))},onContextMenu:e=>e.preventDefault(),className:"post-details","aria-label":"Post actions",children:[(0,Q.jsx)(je,{isThreadVisible:b,postDetail:j,isHoverMessage:U,onRefetchPost:J}),T&&(null===(r=j.media)||void 0===r?void 0:r.resolvedUrl)&&(0,Q.jsx)(ee,{setIsHoverMessage:_,isThreadVisible:b,onPostReplyClick:e=>N&&N(e),postDetails:j,setSnackbarVisible:A,onLikeThreadClick:B,onRefetchPost:J},j.id),U&&E&&!T&&(0,Q.jsx)(ee,{setIsHoverMessage:_,isThreadVisible:b,onPostReplyClick:e=>N&&N(e),postDetails:j,setSnackbarVisible:A,onLikeThreadClick:B,onRefetchPost:J},j.id)]})]}),b&&(0,Q.jsxs)("div",{className:"post-reply",children:[j.replies&&(null===(p=j.replies)||void 0===p?void 0:p.length)>0&&j.replies.slice(0,3).map((e=>{var t,i,n,l,s;return(0,Q.jsx)(d.A,{alt:null===(t=e.author)||void 0===t||null===(i=t.name)||void 0===i?void 0:i.toUpperCase(),src:null!==(n=e.author)&&void 0!==n&&n.url?null===(l=e.author)||void 0===l?void 0:l.url:null===(s=e.author)||void 0===s?void 0:s.name,className:"replies-avatar"},e.id)})),(0,Q.jsx)("p",{role:"none",className:"small-copy cursor-pointer",onClick:()=>N&&N(j.id),children:(0,u.fr)(!!j.replies&&!(null===j||void 0===j||!j.repliesCount),"View All Replies (".concat(null===j||void 0===j?void 0:j.repliesCount,")"),"Reply")})]})]})]}),(0,Q.jsx)(c.A,{onClose:()=>{F.current=!1},open:D,sx:{backdropFilter:"blur(5px)"},disableScrollLock:!0,disableEnforceFocus:!0,hideBackdrop:!0,className:"community-wrapper mobile-action-menu-dialog",children:(0,Q.jsxs)("div",{className:"post-wrapper post-wrapper-padding",children:[(0,Q.jsx)(ee,{setIsHoverMessage:_,isThreadVisible:b,onPostReplyClick:e=>N&&N(e),onMWebModalClose:()=>P(!1),postDetails:j,setSnackbarVisible:A,onLikeThreadClick:B,onRefetchPost:J},j.id),(0,Q.jsxs)("div",{className:"message-wrapper",children:[(0,Q.jsx)("div",{className:"user-avatar",children:(0,Q.jsx)(d.A,{alt:null===(h=j.author)||void 0===h?void 0:h.toUpperCase(),src:(null===j||void 0===j||null===(f=j.profilePic)||void 0===f?void 0:f.length)>0?j.profilePic:null===(w=j.author)||void 0===w?void 0:w.toUpperCase(),className:"profile-avatar"})}),(0,Q.jsx)("div",{className:"post-details",children:(0,Q.jsxs)("div",{children:[(0,Q.jsxs)("div",{className:"author-details",children:[j.type===m.EA.SUPER_ADMIN&&(0,Q.jsx)(Le,{width:12,height:12}),(0,Q.jsx)("p",{className:(0,u.fr)(j.type===m.EA.ADMIN||j.type===m.EA.SUPER_ADMIN,"admin-detail
1s","user-details",(0,u.fr)(""!==(null===j||void 0===j?void 0:j.message)&&(null===j||void 0===j||null===(x=j.message)||void 0===x?void 0:x.length)<=20,"auhor-name-elipse","")),children:j.author})]}),(0,Q.jsx)("div",{children:(0,Q.jsx)(je,{isThreadVisible:b,postDetail:j,isHoverMessage:U,onRefetchPost:J})})]})})]})]})})]})});var Te;function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Me.apply(null,arguments)}function Se(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",Me({width:32,height:33,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,Te||(Te=n.createElement("path",{d:"M18.6665 24.5L10.6665 16.5L18.6665 8.5",stroke:"#2F2F2F",strokeLinecap:"round",strokeLinejoin:"round"})))}const Oe=n.forwardRef(Se);i.p;var Ie=i(22223);const De=e=>{var t,i;let{selectedCommunityList:n,onJoinCommunityClick:l,onCommunityInfoClick:o}=e;const a=(0,r.Zp)();return(0,Q.jsx)("div",{className:"community-page-header",children:(0,Q.jsxs)("div",{className:"wrapper header-details",children:[(0,Q.jsxs)("div",{className:"community-details",children:[(0,Q.jsx)(Oe,{className:"cursor-pointer","data-testid":"click-back-button",onClick:()=>a(m.bw.COMMUNITY)}),(0,Q.jsx)(d.A,{src:null!==(t=null===n||void 0===n||null===(i=n.thumbnailImage)||void 0===i?void 0:i.url)&&void 0!==t?t:"https://c.disquscdn.com/uploads/users/21191/1924/avatar92.jpg?1703011174",className:"community-icon"}),(0,Q.jsxs)("div",{children:[(0,Q.jsx)("h4",{role:"none",onClick:o,className:"cursor-pointer",children:null===n||void 0===n?void 0:n.title}),(0,Q.jsx)("p",{children:null===n||void 0===n?void 0:n.thumbnailTag})]})]}),(0,Q.jsxs)("div",{className:"community-info",children:[!(null!==n&&void 0!==n&&n.isJoined)&&(0,Q.jsx)(s.A,{className:"secondary-btn full-width hide-tablet-mobile",variant:"contained",disableRipple:!0,onClick:l,children:"Join Community"}),(0,Q.jsx)(Ie.h,{className:"cursor-pointer info-icon",onClick:o,height:32,width:32})]})]})})};var Pe,Re,Fe=i(28170),Ue=i(26870);function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},_e.apply(null,arguments)}function Ve(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",_e({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,Pe||(Pe=n.createElement("circle",{cx:12,cy:12,r:12,fill:"#EEE9DE"})),Re||(Re=n.createElement("path",{d:"M15.5545 9.77734L10.6656 14.6662L8.44336 12.444",stroke:"#2F2F2F",strokeLinecap:"round",strokeLinejoin:"round"})))}const Be=n.forwardRef(Ve);i.p;var Je=i(94950),Ge=i(86353);const He=e=>{let{isModalOpen:t,onClose:i,onAcceptGuidelines:n}=e;const l=(0,a.A)("(max-width:1024px)"),o=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(ie.A,{className:"dialog-header",children:[(0,Q.jsx)(Ge.h,{className:"white-stroke close-icon cursor-pointer hide-mobile",height:32,width:32,onClick:i}),(0,Q.jsx)(Je.h,{className:"light-gray-fill",height:15,width:59}),(0,Q.jsx)("h3",{className:"medium",children:"Community Guidelines"})]}),(0,Q.jsxs)(Fe.A,{className:"content-wrapper",children:[f.pe.map((e=>(0,Q.jsxs)(ie.A,{className:"guideline-item",children:[(0,Q.jsx)(Be,{className:"icon"}),(0,Q.jsxs)(ie.A,{className:"guideline-text",children:[(0,Q.jsx)("p",{className:"sub-head",children:e.title}),(0,Q.jsx)("p",{className:"small-copy",children:e.description})]})]},e.title))),(0,Q.jsx)(s.A,{className:"secondary-btn full-width",variant:"contained",onClick:n,children:"Accept Guidelines"})]})]});return(0,Q.jsx)(Q.Fragment,{children:l?(0,Q.jsx)(Ue.A,{anchor:"bottom",open:t,onClose:i,onOpen:()=>{},className:"guidelines-dialog-paper swipeable-guidelines-drawer-paper",variant:"temporary",children:o}):(0,Q.jsx)(c.A,{open:t,onClose:i,classes:{paper:"guidelines-dialog-paper"},children:o})})};var qe,We=i(39694),Ye=i(3927),Ze=i(58920),Ke=i(34791);function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},$e.apply(null,arguments)}function ze(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",$e({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,qe||(qe=n.createElement("g",{id:"Arrow"},n.createElement("path",{id:"Vector",d:"M23 12H1",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{id:"Vector_2",d:"M16 19L23 12L16 5",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}))))}const Xe=n.forwardRef(ze),Qe=(i.p,e=>{let{isPostReplyDrawerOpen:t=!1,dynamicTextFieldWidth:i=!1,uniqueId:l,handleWriteMessage:s,setSnackbarVisible:o}=e;const r=(0,a.A)("(max-width:1024px)"),{disqusSSOAuth:d}
1=(0,n.useContext)(g.V),[c,p]=(0,n.useState)(""),[h,m]=(0,n.useState)(!1),[w,x]=(0,n.useState)(null),[y,C]=(0,n.useState)(),[j,b]=(0,n.useState)(!1),[k,E]=(0,n.useState)(!1),N=async e=>{const t=(0,u.$e)(e);if(t)return o({type:"error",message:t}),void setTimeout((()=>{o({type:"error",message:""})}),3e3);b(!0),C(e),x(URL.createObjectURL(e))},L=()=>{0===(null===c||void 0===c?void 0:c.length)&&b(!1),x(null),C(void 0)},A=async()=>{let e;if(c.trim().length<2&&!y)return o({type:"error",message:f.nl.error.minCharError(2)}),void setTimeout((()=>{o({type:"error",message:""})}),3e3);try{var t,i,n,l,r;if(E(!0),y){const t=await(0,v.Pb)(y,d.authToken);if(!t)return;e="".concat(c," ").concat(t)}else e=c;const o=s(e);p(""),L(),b(!1),await o,await new Promise((e=>setTimeout(e,50)));const a=null!==(t=null===(i=(n=document).getElementById)||void 0===i?void 0:i.call(n,"post-reply-scroll-view"))&&void 0!==t?t:null===(l=(r=document).querySelector)||void 0===l?void 0:l.call(r,"#post-reply-scroll-view");null===a||void 0===a||a.scrollTo({behavior:"instant",top:a.scrollHeight})}catch(a){return o({type:"error",message:f.nl.error.somethingWentWrongWhile("file upload")}),void setTimeout((()=>{o({type:"error",message:""})}),3e3)}finally{E(!1)}};return(0,Q.jsxs)(Q.Fragment,{children:[k&&(0,Q.jsx)(Ze.A,{transparent:!0}),(0,Q.jsx)("div",{role:"none",className:(0,u.fr)(t&&!r,"thread-add-post-section-wrapper","","add-post-section-wrapper"),onDrop:e=>{e.preventDefault();const t=e.dataTransfer.files[0];if(t){if(!t.type.startsWith("image/"))return o({type:"error",message:f.nl.error.onlyImageSupport}),void setTimeout((()=>{o({type:"error",message:""})}),3e3);b(!0),N(t)}},onDragOver:e=>{e.preventDefault()},children:(0,Q.jsxs)("div",{className:"wrapper footer-details",children:[(0,Q.jsx)("div",{className:"selected-image-container",children:w&&(0,Q.jsxs)("div",{className:"image-preview cursor-pointer",children:[(0,Q.jsx)("img",{role:"none",src:w,alt:"Selected",width:64,height:64,onClick:()=>m(!0)}),(0,Q.jsx)(ae.h,{onClick:L,width:16,height:16,className:"user-selected-close-icon white-stroke"})]})}),(0,Q.jsxs)("div",{className:"user-add-post-section",children:[(0,Q.jsxs)("div",{className:"image-gallery-upload",children:[(0,Q.jsx)("label",{htmlFor:l,children:(0,Q.jsx)(Ke.h,{width:24,height:24,className:"cursor-pointer"})}),(0,Q.jsx)("input",{id:l,type:"file",className:"hide-display",accept:"image/*",onChange:e=>{var t;const i=null===(t=e.target.files)||void 0===t?void 0:t[0];i&&N(i),e.target.value=""}})]}),(0,Q.jsx)(Ye.A,{type:"text",placeholder:(0,u.fr)(t,"Reply","Write a message"),name:"user-message",variant:"outlined",value:c,onChange:e=>{const t=e.target.value;p(t),b(""!==t.trim())},sx:{width:i?"calc(100% - 700px)":"100%"},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),A())}}),j&&(0,Q.jsx)("div",{className:"post-send-icon",children:(0,Q.jsx)(Xe,{width:24,height:24,onClick:()=>{A()}})})]}),(0,Q.jsx)(de,{isModalOpen:h,selectedImage:w,setIsModalOpen:e=>m(e)})]})})]})}),et=e=>{const{isOpen:t,selectedCommunityList:i,onUserJoinCommunity:l,isAcceptedGuidelines:o,onAcceptedGuidelines:r,setReplies:a,postId:d,groupRepliesByDate:c,handleLastReplyId:u,votes:p,setSnackbarVisible:h}=e,{disqusSSOAuth:m}=(0,n.useContext)(g.V);return null!==i&&void 0!==i&&i.isJoined?null!==i&&void 0!==i&&i.isMaster&&!o?(0,Q.jsx)("div",{className:"join-community-action-info accept-guidlines",children:(0,Q.jsx)("div",{className:"wrapper",children:(0,Q.jsx)(s.A,{className:"secondary-btn full-width",variant:"contained",onClick:r,disableRipple:!0,children:"Accept Guidelines"})})}):(0,Q.jsx)(Qe,{isPostReplyDrawerOpen:t,dynamicTextFieldWidth:!1,uniqueId:"thread-reply-field",handleWriteMessage:async e=>{const t={threadId:null===i||void 0===i?void 0:i.disqusThreadId,message:null===e||void 0===e?void 0:e.trim(),disqusSSOAuth:m.authToken,parent:d,isReply:!0};try{const e=await(0,v.qF)(t);if(e&&"string"!==typeof e.response){var n;const t=[...p,{[null===(n=e.response)||void 0===n?void 0:n.id]:0}],i=c([e.response],t);a((e=>{const t=[...e];return i.forEach((e=>{const i=t.findIndex((t=>t.date===e.date));-1!==i?t[i].replies=[...t[i].replies,...e.replies]:t.push(e)})),t})),d&&u(d,e.response)}}catch(g){var l,s;let e="";var o,r;if("Missing required argument: 'message'"===(null===g||void 0===g||null===(l=g.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.response))e=f.nl.error.disqusBlankMessage("Reply");else e=null===g||void 0===g||null===(o=g.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.response;return h({type:"error",message:e}),void setTimeout((()=>{h({type:"error",message:""})}),3e3)}},setSnackbarVisible:h}):(0,Q.jsx)("div",{className:"join-community-action-info accept-guidlines",children:(0,Q.jsx)("div",{className:"wrapper",children:(0,Q.jsx)(s.A,{className:"secondary-btn full-width",variant:"contained",onClick:l,disableRipple:!0,children:"Join Community"})})})};var tt=i(40434);const it=e=>{var t,i;let{postReplyDetails:n,replies:l,isMobileDevice:s}=e;const o=l.reduce(((e,t)=>{var i;return e+(null===(i=t.replies)||void 0===i?void 0:i.length)}),0);return null!==n&&void 0!==n&&null!==(t=n[0])&&void 0!==t&&null!==(i=t.replies)&&void 0!==i&&i.length?(0,Q.jsxs)("p",{className:"".concat(s?"small-copy":""),children:[o," ","".concat(1===o?"Reply":"Replies")]}):null};var nt,lt;function st(){return st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},st.apply(null,arguments)}function ot(e,t){let{title:i,titleId:l,...s}=e;
1return n.createElement("svg",st({width:80,height:80,viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,nt||(nt=n.createElement("g",{clipPath:"url(#clip0_18700_39744)"},n.createElement("path",{d:"M40 80C62.0914 80 80 62.0914 80 40C80 17.9086 62.0914 0 40 0C17.9086 0 0 17.9086 0 40C0 62.0914 17.9086 80 40 80Z",fill:"#DBD3C6"}),n.createElement("path",{d:"M38.1179 27.3991C38.4408 27.1142 38.9487 27.3434 38.9487 27.774V50.1734C38.9487 50.604 38.4408 50.8332 38.1179 50.5483L25.4249 39.3486C25.1993 39.1496 25.1993 38.7978 25.4249 38.5988L38.1179 27.3991Z",fill:"#AC9379"}),n.createElement("path",{d:"M38.334 33.332C38.334 33.332 45.8908 34.3207 49.4451 38.0379C52.161 40.8784 53.7065 46.5904 54.4471 50.1732C54.5626 50.7322 53.7479 51.0136 53.4453 50.5296C52.2488 48.6158 50.4733 46.2586 48.5192 45.2928C44.9149 43.5115 38.334 44.5085 38.334 44.5085V33.332Z",fill:"#AC9379"}))),lt||(lt=n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_18700_39744"},n.createElement("rect",{width:80,height:80,fill:"white"})))))}const rt=n.forwardRef(ot),at=(i.p,e=>{var t;let{replies:i,onUpdateThreadDetails:l,isUserJoinedCommunity:s,setSnackbarVisible:o}=e;return 0===(null===i||void 0===i?void 0:i.length)?(0,Q.jsxs)("div",{className:(0,u.fr)(!!s,"post-list-section-margin","","no-post-reply"),children:[(0,Q.jsx)(rt,{height:80,width:80}),(0,Q.jsx)("h5",{children:"No Replies Yet"}),(0,Q.jsx)("p",{children:"Start the conversation."})]}):(0,Q.jsx)(Q.Fragment,{children:(null===i||void 0===i?void 0:i.length)>0&&(null===i||void 0===i||null===(t=i.toSorted(((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())))||void 0===t?void 0:t.map(((e,t)=>{var i,s;return(0,Q.jsxs)(n.Fragment,{children:[(0,Q.jsx)("p",{className:"post-date",children:e.date}),(0,Q.jsx)("div",{children:(null===e||void 0===e||null===(i=e.replies)||void 0===i?void 0:i.length)>0&&(null===(s=e.replies)||void 0===s?void 0:s.toSorted(((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime())).map((e=>(0,Q.jsx)(Ae,{postDetails:e,isThreadVisible:!1,onRefetchPost:(e,t)=>l(e,t,!0),setSnackbarVisible:o},e.id))))})]},"reply-".concat(e.date,"-").concat(t.toString()))})))})});var dt,ct=i(27280);function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},ut.apply(null,arguments)}function pt(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",ut({width:36,height:5,viewBox:"0 0 36 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,dt||(dt=n.createElement("rect",{width:36,height:5,rx:2.5,fill:"#DDD3C5"})))}const ht=n.forwardRef(pt),mt=(i.p,e=>{var t,i,l,s,r,d;let{isOpen:c,onClose:p,postReplyDetails:h,isUserJoinedCommunity:v,selectedCommunityList:f,isAcceptedGuidelines:x,updateRepliesCount:y,onUpdatePostDetails:C,onAcceptedGuidelines:j,onUserJoinCommunity:b,votes:k,setVotes:E,updatedReplyLike:N}=e;const L=(0,a.A)("(max-width:1024px)"),A=null===h||void 0===h||null===(t=h[0])||void 0===t?void 0:t.id,{disqusSSOAuth:T}=(0,n.useContext)(g.V),{isPromotionVisible:M}=(0,n.useContext)(ct.F),[S,O]=(0,n.useState)([]),[I,D]=(0,n.useState)({type:"info",message:""}),P=e=>e.filter(((e,t,i)=>t===i.findIndex((t=>t.id===e.id)))),R=(0,n.useCallback)(((e,t)=>{const i=[];return e.forEach((e=>{if(!e.isDeleted){let n=t.find((t=>Object.keys(t).toString()===e.id));E(t);const l=(0,o.GP)(new Date(e.createdAt),"dd MMM yyyy"),s=w(e,T,null===n||void 0===n||n[e.id]);let r=i.find((e=>e.date===l));r||(r={date:l,replies:[]},i.push(r)),r.replies.push(s)}})),i}),[T]),F=e=>{var t;const i=R(null===h||void 0===h||null===(t=h[0])||void 0===t?void 0:t.replies,k);i&&(O((e=>{const t=((e,t)=>{var i,n;const l=[...e];t.forEach((e=>{const t=l.findIndex((t=>t.date===e.date));-1!==t?l[t].replies=[...l[t].replies,...e.replies]:l.push(e)}));const s=null===l||void 0===l||null===(i=l[0])||void 0===i||null===(n=i.replies)||void 0===n?void 0:n[0];return s&&(s.defaultLikeSection=0===s.likes),l.map((e=>({...e,replies:P(null===e||void 0===e?void 0:e.replies)})))})(e,i);function n(e){e.defaultLikeSection=!1}
1function l(e){e.replies.forEach(n)}!function(e){e.forEach(l)}(t);const s=(e=>{var t;if(!e||0===e.length)return null;const i=e.toSorted(((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())),n=i[i.length-1];return null===n||void 0===n||null===(t=n.replies)||void 0===t?void 0:t.toSorted(((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime())).at(-1)})(t);return s&&(s.defaultLikeSection=0===s.likes),t})),((e,t)=>t.length>0&&e&&e.target.scrollHeight===e.target.scrollTop+e.target.clientHeight)(e,i)&&(0,u.cs)())};(0,n.useEffect)((()=>{var e,t,i;null!==h&&void 0!==h&&null!==(e=h[0])&&void 0!==e&&e.replies&&(null===T||void 0===T||null===(t=T.disqusUserId)||void 0===t?void 0:t.length)>0?(O([]),F()):null!==h&&void 0!==h&&null!==(i=h[0])&&void 0!==i&&i.replies||O([])}),[h,T]);(0,n.useEffect)((()=>{const e=document.getElementById("post-reply-scroll-view");let t=null,i=null;const n=t=>{i&&(clearTimeout(i),i=null),t?(e=>{document.body.style.cssText="\n            overflow: hidden;\n            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n        ",e&&(e.style.cssText="\n                overflow: auto;\n                transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n            ")})(e):(e=>{document.body.style.cssText="\n            overflow: auto;\n        ",e&&(e.style.cssText="\n                overflow: hidden;\n            ")})(e)},l=()=>{t&&(clearTimeout(t),t=null),n(!0)},s=i=>{const l=null===e||void 0===e?void 0:e.getBoundingClientRect();if(!l)return;i.clientX>=l.left-5&&i.clientX<=l.right+5&&i.clientY>=l.top-5&&i.clientY<=l.bottom+5||(t&&clearTimeout(t),t=setTimeout((()=>{n(!1),t=null}),50))};return e&&c&&(n(!0),e.addEventListener("mouseenter",l),e.addEventListener("mouseleave",s)),()=>{t&&clearTimeout(t),i&&clearTimeout(i),e&&(e.removeEventListener("mouseenter",l),e.removeEventListener("mouseleave",s),(e=>{document.body.style.cssText="\n            overflow: auto;\n            padding-right: 0;\n        ",e&&(e.style.cssText="\n                overflow: hidden;\n                margin-right: 0;\n            ")})(e))}}),[c]);const U=(0,n.useCallback)((function(e,t){if(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]){var i;const n=null===(i=S.map((i=>({...i,replies:i.replies.map((i=>(0,u.gg)(i,e,t,D))).filter((e=>null!==e))}))))||void 0===i?void 0:i.filter((e=>{var t;return null===e||void 0===e||null===(t=e.replies)||void 0===t?void 0:t.length}));O(n),t===m.JU.DELETE_POST&&A&&y(A,e,t)}else C(e,t)}),[A,S,y,C]),_=L?Ue.A:We.Ay,V=(0,n.useMemo)((()=>{let e="";return e=M?L||!M?"with-promotion-height-scroll":"with-promotion-height":"without-promotion-height","".concat(e).trim()}),[M,L]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(tt.A,{message:I.message,type:I.type}),(0,Q.jsx)(_,{anchor:L?"bottom":"right",open:c,onClose:p,id:"drawer-scroll",onOpen:()=>{},variant:L?"temporary":"persistent",className:(0,u.fr)(L,"hide-desktop swipeable-post-reply-drawer-wrapper ".concat((0,u.fr)(!!(null!==h&&void 0!==h&&null!==(i=h[0])&&void 0!==i&&i.replies&&(null!==(l=null===h||void 0===h||null===(s=h[0])||void 0===s?void 0:s.repliesCount)&&void 0!==l?l:0)>3),"reply-thread-multiple-comment-height","no-reply-thread-swipeable-drawer-wrapper")),"hide-tablet-mobile","community-wrapper post-reply-drawer-wrapper ".concat(V)),hideBackdrop:!L,children:(0,Q.jsxs)("div",{className:"post-wrapper post-reply-drawer",id:"post-reply-scroll-view",children:[(0,Q.jsxs)("div",{className:"thread-header",children:[(0,Q.jsx)("div",{children:L?(0,Q.jsxs)("div",{className:"center-text mweb-reply-section",children:[(0,Q.jsx)(ht,{height:5,width:36,onClick:p,className:"cursor-pointer"}),h&&(0,Q.jsx)(it,{postReplyDetails:h,replies:S,isMobileDevice:!0})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("h4",{children:"Threads"}),h&&(0,Q.jsx)(it,{postReplyDetails:h,replies:S,isMobileDevice:!1})]})}),(0,Q.jsx)("div",{children:!L&&(0,Q.jsx)(Ge.h,{height:40,width:40,onClick:p,className:"cursor-pointer"})})]}),h&&(0,Q.jsxs)(Q.Fragment,{children:[!L&&(0,Q.jsxs)("div",{children:[(0,Q.jsxs)("div",{className:"thread-details",children:[(0,Q.jsx)("p",{className:"post-date",children:(0,o.GP)(new Date(null===h||void 0===h||null===(r=h[0])||void 0===r?void 0:r.postDate),"dd MMM yyyy")}),h&&(0,Q.jsx)(Ae,{postDetails:null===h||void 0===h?void 0:h[0],isThreadVisible:!1,isActionModalEnabled:!1,onRefetchPost:(e,t)=>
1U(e,t,!1),setSnackbarVisible:D},null===h||void 0===h||null===(d=h[0])||void 0===d?void 0:d.author)]}),(0,Q.jsx)("hr",{className:"thin-divider w-full"})]}),(0,Q.jsx)("div",{className:"thread-details",children:(0,Q.jsx)(at,{replies:S,onUpdateThreadDetails:U,isUserJoinedCommunity:!!v,setSnackbarVisible:D})})]}),(0,Q.jsx)(et,{isOpen:c,selectedCommunityList:f,isAcceptedGuidelines:x,onUserJoinCommunity:b,onAcceptedGuidelines:j,setReplies:e=>{O(e)},handleLastReplyId:y,postId:A,groupRepliesByDate:R,votes:k,setSnackbarVisible:D})]})})]})});var vt,gt,ft;function wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},wt.apply(null,arguments)}function xt(e,t){let{title:i,titleId:l,...s}=e;return n.createElement("svg",wt({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",ref:t,"aria-labelledby":l},s),i?n.createElement("title",{id:l},i):null,vt||(vt=n.createElement("path",{d:"M11.5601 16.3571C11.0401 16.8772 10.4226 17.2897 9.74318 17.5711C9.06375 17.8526 8.33573 17.9974 7.60031 17.9974C6.8649 17.9974 6.13668 17.8526 5.45725 17.5711C4.77783 17.2897 4.16034 16.8772 3.64035 16.3571C3.12031 15.8371 2.70779 15.2198 2.42635 14.5403C2.1449 13.8609 2 13.1327 2 12.3973C2 11.6619 2.1449 10.9336 2.42635 10.2542C2.70779 9.57478 3.12031 8.95749 3.64035 8.4375",stroke:"#AC9379",strokeMiterlimit:10})),gt||(gt=n.createElement("path",{d:"M8.4375 3.64035C8.95749 3.12031 9.57498 2.70779 10.2544 2.42635C10.9338 2.1449 11.662 2 12.3975 2C13.1329 2 13.8609 2.1449 14.5403 2.42635C15.2198 2.70779 15.8372 3.12031 16.3572 3.64035C16.8773 4.16034 17.2898 4.77763 17.5712 5.45706C17.8527 6.13648 17.9976 6.8647 17.9976 7.60012C17.9976 8.33553 17.8527 9.06375 17.5712 9.74318C17.2898 10.4226 16.8773 11.04 16.3572 11.56",stroke:"#AC9379",strokeMiterlimit:10})),ft||(ft=n.createElement("path",{d:"M7.60156 12.4013L12.4013 7.60156",stroke:"#AC9379",strokeMiterlimit:10})))}const yt=n.forwardRef(xt);i.p;var Ct=i(69001),jt=i(97189),bt=i.n(jt);const kt=e=>{var t,i;let{isCommunityInfoDrawerOpen:l,selectedCommunityList:o,isAcceptedGuidelines:r,setIsCommunityInfoDrawerOpen:d,onUserJoinCommunity:c,userLeaveCommunity:p,onAcceptedGuidelines:h}=e;const v=(0,a.A)("(max-width:1024px)"),[g,f]=(0,n.useState)(!1),w=v?Ue.A:We.Ay;return(0,Q.jsxs)(w,{anchor:v?"bottom":"right",onOpen:()=>{},open:l,onClose:()=>d(!1),className:(0,u.fr)(!v,"","community-info-swipable-drawer-wrapper","community-info-drawer-wrapper"),children:[(0,Q.jsxs)("div",{className:"content-wrapper",children:[(0,Q.jsxs)("div",{className:"header-section",children:[v?(0,Q.jsx)(ht,{height:5,width:36,onClick:()=>d(!1),className:"cursor-pointer grabber-icon"}):(0,Q.jsx)(Ge.h,{height:40,width:40,onClick:()=>d(!1),className:"cursor-pointer white-stroke close-icon"}),(0,Q.jsx)("div",{className:"image-container",style:{position:"relative",width:"100%",height:"289px",background:"\n                                    linear-gradient(180deg, rgba(168, 143, 101, 0.60) 0%, rgba(0, 0, 0, 0.60) 100%),\n                                    url(".concat(null===o||void 0===o||null===(t=o.thumbnailImage)||void 0===t?void 0:t.url,") 50% / cover no-repeat,\n                                    linear-gradient(180deg, rgba(198, 100, 43, 0.40) 0%, rgba(85, 82, 94, 0.40) 100%)\n                                "),backdropFilter:"blur(250px)"},children:(0,Q.jsxs)("div",{className:"header-title",children:[(0,Q.jsx)("h3",{className:"medium",children:null===o||void 0===o?void 0:o.title}),(0,Q.jsx)("p",{className:"thumbnail-tag",children:null===o||void 0===o?void 0:o.thumbnailTag})]})})]}),(0,Q.jsxs)("div",{className:"info-section",children:[(0,Q.jsxs)("div",{className:"about-info",children:[(0,Q.jsx)("p",{className:"sub-head",children:"About"}),o&&(0,u.cI)(null===o||void 0===o||null===(i=o.longDescription)||void 0===i?void 0:i.children)]}),(0,Q.jsxs)("div",{children:[(0,Q.jsx)("p",{className:"sub-head",children:"Links"}),null===o||void 0===o?void 0:o.links.map(((e,t)=>{var i;let{href:n,title:l}=e;return(0,Q.jsxs)("div",{className:"links-wrapper",children:[(0,Q.jsx)(yt,{height:20,width:20}),(0,Q.jsx)("a",{href:n,target:n.includes(null!==(i="https://melissawoodhealth.com")?i:"")?"_self":"_blank",rel:"noopener noreferrer",children:l})]},n)}))]}),(0,Q.jsx)(Ct.$Z,{handleShare:()=>{if(A.Fr.test(navigator.userAgent)){if(o){const e={channel:"web",data:{type:"community",title:o.title,imageUrl:o.thumbnailImage.url,id:o.idNumber,url:"/".concat(o.idNumber),$ios_url:"".concat("https://melissawoodhealth.com").concat(m.bw.COMMUNITY,"/").concat(o.idNumber),$desktop_url:"".concat("https://melissawoodhealth.com").concat(m.bw.COMMUNITY,"/").concat(o.idNumber),$$android_url:"".concat("https://melissawoodhealth.com").concat(m.bw.COMMUNITY,"/").concat(o.idNumber)}};bt().link(e,(function(e,t){navigator.share?navigator.share({url:t}).catch((e=>console.log(e))):f(!0)}))}}else f(!0)}}),!(null!==o&&void 0!==o&&o.isMaster)&&(0,Q.jsx)("div",{className:"w-full",children:(null===o||void 0===o?void 0:o.isJoined)&&(0,Q.jsx)("p",{role:"none",className:"leave-community cursor-pointer",onClick:p,children:"Leave Community"})})]}),!(null!==o&&void 0!==o&&o.isJoined)&&(0,Q.jsx)("div",{className:"join-community-action-info beige-background",children:(0,Q.jsx)(s.A,{className:"secondary-btn full-width",variant:"contained",onClick:c,disableRipple:!0,children:"Join Community"})}),(null===o||void 0===o?void 0:o.isMaster)&&!r&&(0,Q.jsx)("div",{className:"beige-background join-community-action-info",children:(0,Q.jsx)(s.A,{className:"secondary-btn full-width",variant:"contained",onClick:h,disableRipple:!0,children:"Accept Guidelines"})})]}),(0,Q.jsx)(Ct.qL,{open:g,contentTitle:null===o||void 0===o?void 0:o.title,setOpen:f,communityData:o,isVDPData:!1,isBlogData:!1,isCommunityData:!0})]})};var Et=i(71616),Nt=i(60529),Lt=i(69258),At=i(296);const Tt=()=>{const e=(0,r.g)(),t=(0,r.Zp)(),{allCommunityList:i,isLoading:a,disqusSSOAuth:d,set
1LoadingState:c,getAllCommunity:p}=(0,n.useContext)(g.V),{user:h,userSubscribedPlan:y,userType:C}=(0,n.useContext)(ct.F),{handleError:j}=(0,At.D)(),{triggerEvent:b}=(0,Nt.s)("COMMUNITY"),[k,E]=(0,n.useState)(!1),[N,L]=(0,n.useState)(),[A,T]=(0,n.useState)(!1),[M,S]=(0,n.useState)(!1),[O,I]=(0,n.useState)(),[D,P]=(0,n.useState)(!1),[R,F]=(0,n.useState)(!1),[U,_]=(0,n.useState)(0),[V,B]=(0,n.useState)({hasMore:!1,nextId:""}),[J,G]=(0,n.useState)([]),[H,q]=(0,n.useState)({type:"info",message:""}),[W,Y]=(0,n.useState)(!1),[Z,K]=(0,n.useState)(!0),[$,z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)([]),te=async(e,t)=>{const i={};for(const a of e){const e=a.post;if(!(null!==(r=e)&&void 0!==r&&r.isDeleted||null!==(null===r||void 0===r?void 0:r.parent))&&e.createdAt){var n,l,s;ee(t);let r=t.find((t=>Object.keys(t).toString()===e.id.toString()));const c=(0,o.GP)(new Date(e.createdAt),"dd-MMM-yyyy"),u=w(e,d,null===r||void 0===r||r[Number(e.id)]),p={repliesCount:null!==(n=null===(l=a.replies)||void 0===l?void 0:l.length)&&void 0!==n?n:0,replies:null!==(s=a.replies)&&void 0!==s?s:null};x(i,c,{...u,...p})}}var r;return(e=>Object.keys(e).sort(((e,t)=>new Date(e).getTime()-new Date(t).getTime())).map((t=>({date:t,posts:[...e[t]].sort(((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime()))}))))(i)},ie=async e=>{var t;if(null===d||void 0===d||!d.authToken)return;const i={hasMoreId:e.length>0?e:void 0,threadId:null!==(t=null===O||void 0===O?void 0:O.disqusThreadId)&&void 0!==t?t:""},n=await(0,v.pl)(i),l=await(0,v.Ti)(null===d||void 0===d?void 0:d.authToken,null===i||void 0===i?void 0:i.threadId,i.hasMoreId),s=(null===l||void 0===l?void 0:l.votes)&&Object.keys(null===l||void 0===l?void 0:l.votes).map((e=>{var t;return{[e]:null===l||void 0===l||null===(t=l.votes)||void 0===t?void 0:t[Number(e)]}})),o=[...X,...null!==s&&void 0!==s?s:[]];if(ee(o),null!==n&&void 0!==n&&n.response){var r,a;const e=await te(null===n||void 0===n?void 0:n.response,o);return B({hasMore:null===n||void 0===n||null===(r=n.cursor)||void 0===r?void 0:r.hasNext,nextId:null===n||void 0===n||null===(a=n.cursor)||void 0===a?void 0:a.next}),e}return null},ne=(0,n.useCallback)((async()=>{if(null!==d&&void 0!==d&&d.authToken)try{Y(!0);const e=document.documentElement.scrollHeight,t=window.scrollY,i=await ie(null===V||void 0===V?void 0:V.nextId);G((e=>{const t=[...e];return null===i||void 0===i||i.forEach((i=>{const n=e.findIndex((e=>e.date===i.date));if(-1!==n){const t=e[n],s=[...i.posts].reverse();l=t,s.forEach((e=>{l.posts.some((t=>t.id===e.id))||l.posts.unshift(e)}))}else t.unshift(i);var l})),t.sort(((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())),t})),requestAnimationFrame((()=>{if($)setTimeout((()=>{const e=document.documentElement.scrollHeight-window.innerHeight;window.scrollTo({top:e,behavior:"auto"}),z(!1)}),300);else{const i=document.documentElement.scrollHeight-e;window.scrollTo({top:t+i,behavior:"auto"})}}))}catch(e){q({type:"error",message:f.nl.error.getPage(O.title)}),setTimeout((()=>{t(m.bw.COMMUNITY),q({type:"info",message:""})}),3e3),j(e,"fetching thread posts","")}finally{Y(!1)}}),[null===V||void 0===V?void 0:V.nextId,J,d,O,$]);(0,n.useEffect)((()=>{(null===J||void 0===J?void 0:J.length)<2&&O&&d.authToken&&!W&&V.hasMore&&(z(!0),ne())}),[J,W,U]);const le=(0,n.useCallback)((async()=>{try{Y(!0);const t=await ie("");if(t){var e,i;const n=[...t],l=null===n||void 0===n||null===(e=n.at(-1))||void 0===e||null===(i=e.posts)||void 0===i?void 0:i.at(-1);l&&(l.defaultLikeSection=0===l.likes),G(n),Z&&setTimeout((()=>{const e=document.documentElement.scrollHeight-window.innerHeight;window.scrollTo({top:e,behavior:"instant"}),setTimeout((()=>{K(!1)}),3e3)}),100)}}catch(n){q({type:"error",message:f.nl.error.getPage(O.title)}),setTimeout((()=>{t(m.bw.COMMUNITY),q({type:"info",message:""})}),3e3),j(n,"fetching thread posts",O.title)}finally{Y(!1)}}),[d,O]),se=e=>{const t=J.flatMap((e=>e.posts)).filter((t=>t.id===e));t.length&&(L(t),T(!0))},oe=(0,n.useCallback)((async e=>{const t=e?f.sK.JOIN_COMMUNITY:f.sK.LEAVE_COMMUNITY;if(null!==(null===h||void 0===h?void 0:h.id)){const e={email:h.id,platform:"web",communityName:O.title};await b(t,{email:h.id,dataFields:e},void 0,!0,!1),c(!1)}}),[h,O,b]),re=async()=>{try{const e={communityId:O.idNumber};c(!0),await(0,Et.lF)(e),await oe(!0),q({type:"success",message:f.nl.success.communityJoined}),setTimeout((()=>{q({type:"info",message:""})}),3e3),E(!1),p()}catch(e){console.error(e)}finally{c(!1)}},ae=()=>{const e=window.scrollY;!Z&&e<=100&&!a&&!W&&V.hasMore&&d.authToken&&ne(),_(e)};(0,n.useEffect)((()=>{d.authToken,O&&le()}),[le,d,O]),(0,n.useEffect)((()=>
1{if(i.length>0&&e){const t=i.find((t=>t.idNumber===e.disqusThreadId));t&&I(t)}}),[i,e]),(0,n.useEffect)((()=>{"true"===localStorage.getItem(m.AX.ACCEPTED_COMMUNITY_GUIDELINES)&&P(!0)}),[]),(0,n.useEffect)((()=>(window.addEventListener("scroll",ae),()=>{window.removeEventListener("scroll",ae)})),[U,a]),(0,n.useEffect)((()=>{_(window.scrollY)}),[J]);const de=(e,t)=>{var i,n,l,s,o;const r=J.map((i=>({...i,posts:i.posts.map((i=>(0,u.gg)(i,e,t,q))).filter((e=>null!==e))}))),a=r.flatMap((e=>e.posts)).filter((t=>t.id===e));a.length&&A&&(null===N||void 0===N||null===(i=N[0])||void 0===i?void 0:i.id)===(null===a||void 0===a||null===(n=a[0])||void 0===n?void 0:n.id)&&L(a),t===m.JU.DELETE_POST&&A&&(null===N||void 0===N||null===(l=N[0])||void 0===l?void 0:l.id)===e&&T(!1);const d=null===r||void 0===r||null===(s=r.at(-1))||void 0===s||null===(o=s.posts)||void 0===o?void 0:o.at(-1);d&&(d.defaultLikeSection=0===d.likes),G(r)};(0,n.useEffect)((()=>{(null===y||void 0===y?void 0:y.status)===m.$g.INACTIVE&&C!==m.ve.VIP&&t(m.bw.COMMUNITY)}),[h,y,C,t]);const ce=(0,n.useCallback)(((e,t,i)=>{const n=i===m.JU.DELETE_POST?-1:1,l=i=>({date:i.date,posts:i.posts.map((i=>{var l;return i.id===(null===e||void 0===e?void 0:e.toString())?{...i,replies:"string"===typeof t?i.replies.filter((e=>e.id!==t)):Array.isArray(i.replies)?[...i.replies,t]:[t],repliesCount:Array.isArray(i.replies)?(null!==(l=i.repliesCount)&&void 0!==l?l:0)+n:1}:i}))});G((t=>{var i,n;const s=t.map(l),o=s.flatMap((e=>e.posts)).filter((t=>t.id===e));L(o);const r=null===s||void 0===s||null===(i=s.at(-1))||void 0===i||null===(n=i.posts)||void 0===n?void 0:n.at(-1);return r&&(r.defaultLikeSection=0===r.likes),s}))}),[]),ue=(0,n.useCallback)(((e,t,i)=>{const n=i===m.JU.UNLIKE_POST?-1:1,l=e=>(null===e||void 0===e?void 0:e.id)===(null===t||void 0===t?void 0:t.toString())?{...e,likes:(null===e||void 0===e?void 0:e.likes)+n}:e,s=e=>{(null===e||void 0===e?void 0:e.id)===(null===t||void 0===t?void 0:t.toString())&&ee((t=>((e,t,i)=>null===e||void 0===e?void 0:e.map((e=>((e,t,i)=>e.hasOwnProperty(t)?{[t]:e[t]+i}:e)(e,t,i))))(t,null===e||void 0===e?void 0:e.id,n)))},o=t=>{var i;return t.id===(null===e||void 0===e?void 0:e.toString())?(null===t||void 0===t||null===(i=t.replies)||void 0===i||i.forEach(s),(e=>{var t;return{...e,replies:null===e||void 0===e||null===(t=e.replies)||void 0===t?void 0:t.map(l)}})(t)):t},r=e=>({date:e.date,posts:e.posts.map(o)});G((t=>{const i=t.map(r),n=i.flatMap((e=>e.posts)).filter((t=>t.id===e));return L(n),i}))}),[]);return(0,Q.jsxs)("div",{className:"page community-wrapper",children:[(a||W)&&(0,Q.jsx)(Ze.A,{transparent:!0}),(0,Q.jsx)(tt.A,{message:H.message,type:H.type}),(0,Q.jsx)(De,{onJoinCommunityClick:()=>{D?re():(S(!1),E(!0))},selectedCommunityList:O,onCommunityInfoClick:()=>S(!0)}),(0,Q.jsx)(He,{isModalOpen:k,onClose:()=>E(!1),onAcceptGuidelines:async()=>{localStorage.setItem(m.AX.ACCEPTED_COMMUNITY_GUIDELINES,"true"),null!==O&&void 0!==O&&O.isMaster?(E(!1),P(!0)):await re()}}),(0,Q.jsx)(l.Ay,{container:!0,className:"post-list-container",children:(0,Q.jsx)(l.Ay,{item:!0,xs:12,md:6,children:(0,Q.jsx)("div",{className:(0,u.fr)((null===O||void 0===O?void 0:O.isJoined)&&!(null!==O&&void 0!==O&&O.isMaster)||(null===O||void 0===O?void 0:O.isMaster)&&D,"post-list-section-margin","joined-post-margin","wrapper post-wrapper main-content-detail"),children:null===J||void 0===J?void 0:J.map((e=>{var t;return(0,Q.jsxs)(n.Fragment,{children:[(0,Q.jsx)("p",{className:"post-date",children:(0,o.GP)(new Date(null===e||void 0===e?void 0:e.date),"dd MMM yyyy")}),null===e||void 0===e||null===(t=e.posts)||void 0===t?void 0:t.map((e=>(0,Q.jsx)(Ae,{postDetails:e,onPostReplyClick:se,onRefetchPost:(e,t)=>de(e,t),setSnackbarVisible:q},"".concat(e.author,"-").concat(e.id))))]},"".concat(null===e||void 0===e?void 0:e.date,"-post-detail"))}))})})}),!(null!==O&&void 0!==O&&O.isJoined)&&(0,Q.jsx)("div",{className:"join-community-info hide-desktop",children:(0,Q.jsx)(s.A,{className:"secondary-btn full-width",variant:"contained",onClick:()=>{D?re():(S(!1),E(!0))},children:"Join Community"})}),A&&(0,Q.jsx)(mt,{isOpen:A,onClose:()=>T(!1),postReplyDetails:N,isUserJoinedCommunity:null===O||void 0===O?void 0:O.isJoined,selectedCommunityList:O,isAcceptedGuidelines:D,onAcceptedGuidelines:()=>E(!0),votes:X,onUserJoinCommunity:()=>{D?re():(S(!1),E(!0))},updateRepliesCount:ce,onUpdatePostDetails:(e,t)=>{de(e,t)},setVotes:ee,updatedReplyLike:ue}),O&&(0,Q.jsx)(kt,{isCommunityInfoDrawerOpen:M,selectedCommunityList:O,setIsCommunityInfoDrawerOpen:()=>S(!1),onUserJoinCommunity:()=>{D?re():(S(!1),E(!0))},userLeaveCommunity:()=>F(!0),onAcceptedGuidelines:()=>E(!0),isAcceptedGuidelines:D}),((null===O||void 0===O?void 0:O.isJoined)&&!(null!==O&&void 0!==O&&O.isMaster)||(null===O||void 0===O?void 0:O.isMaster)&&D&&((0,f.Br)(d.disqusUserId)===m.EA.ADMIN||(0,f.Br)(d.disqusUserId)===m.EA.SUPER_ADMIN))&&(0,Q.jsx)(Qe,{dynamicTextFieldWidth:A,uniqueId:"post-reply-field",handleWriteMessage:async e=>{const t={threadId:null===O||void 0===O?void 0:O.disqusThreadId,message:e.trim(),disqusSSOAuth:d.authToken,parent:null,isReply:!1};try{c(!0);const e=await(0,v.qF)(t);if(0===(null===e||void 0===e?void 0:e.code)&&"string"!==typeof e.response){var i;const t={post:e.response,replies:null},n=[...X,{[null===(i=e.response)||void 0===i?void 0:i.id]:0}],l=await te([t],n);G((e=>{var t,i;const n=[...e];function s(e){e.defaultLikeSection=!1}
1function o(e){e.posts.forEach(s)}l.forEach((t=>{const i=e.findIndex((e=>e.date===t.date));-1!==i?n[i].posts=[...n[i].posts,...t.posts]:n.push(t)})),function(e){e.forEach(o)}(n);const r=null===n||void 0===n||null===(t=n.at(-1))||void 0===t||null===(i=t.posts)||void 0===i?void 0:i.at(-1);return r&&(r.defaultLikeSection=0===r.likes),n}))}}catch(r){var n,l;let e="";var s,o;if("Missing required argument: 'message'"===(null===r||void 0===r||null===(n=r.response)||void 0===n||null===(l=n.data)||void 0===l?void 0:l.response))e=f.nl.error.disqusBlankMessage("Reply");else e=null===r||void 0===r||null===(s=r.response)||void 0===s||null===(o=s.data)||void 0===o?void 0:o.response;return q({type:"error",message:e}),void setTimeout((()=>{q({type:"error",message:""})}),3e3)}finally{c(!1)}},setSnackbarVisible:q}),(0,Q.jsx)(Lt.A,{open:R,declineFunction:()=>F(!1),title:"Do you want to leave this community?",text:"You won't receive any updates from this community. You can join back anytime.",confirmFunction:async()=>{try{c(!0),await(0,Et.F7)(O.idNumber),p(),await oe(!1)}catch(e){console.error(e)}finally{c(!1),F(!1)}},declineBtnText:"Cancel",confirmBtnText:"Leave",declineBtnClass:"tertiary-btn",confirmBtnClass:"secondary-btn"})]})},Mt=()=>(0,Q.jsx)(Tt,{})}}]);
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]="20fa41bc-b9db-50d1-a7e5-a0eafd191769")}catch(e){}}();
3//# debugId=20fa41bc-b9db-50d1-a7e5-a0eafd191769

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.