PageSourceSearch

https://canonizer.com/_next/static/chunks/pages/topic/[...camp]-a39880950f59e3dd.js

js canonizer.com collected 2026-10-02 17:01:46 UTC 169,957 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4575],{93450:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/topic/[...camp]",function(){return i(15417)}])},24544:function(e,t,i){"use strict";var n=i(85893),o=(i(67294),i(25675)),l=i.n(o),r=i(41664),a=i.n(r),d=i(11163),s=i(32016),u=i.n(s),c=i(80284).Z.Link;t.Z=function(e){var t=e.name,i=e.backURL,o=e.message,r=void 0===o?"":o,s=e.goBack,v=void 0!==s&&s,p=JSON.parse(localStorage.getItem("router_history"))||[],_=(0,d.useRouter)();return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:u().errorPageContentWrap,children:[(0,n.jsx)("div",{className:u().errorPageImg,children:(0,n.jsx)(l(),{src:"/images/topic-not-found.png",alt:"404 page",width:487,height:552,layout:"fixed"})}),(0,n.jsxs)("div",{className:u().errorPageContent,children:[(0,n.jsx)("h3",{children:r||t+"  Not Found"}),(0,n.jsx)("p",{children:"We're sorry, the page you requested could not be found."}),v?(0,n.jsx)(c,{onClick:function(){(null===p||void 0===p?void 0:p.length)>1?null===_||void 0===_||_.back():_.push("/")},children:(0,n.jsx)("a",{className:u().btnGoBack,children:"Go Back"})}):(0,n.jsx)(a(),{href:{pathname:i},children:(0,n.jsx)("a",{className:u().btnGoBack,children:"Go Back"})})]})]})})}},25881:function(e,t,i){"use strict";i.d(t,{Z:function(){return c}});var n=i(85893),o=i(55241),l=i(20550),r=i(45697),a=i.n(r),d={fill:a().string,className:a().string},s=function(e){var t=e.fill,i=void 0===t?"#fff":t,o=e.className,l=void 0===o?"mr-1":o;return(0,n.jsx)("svg",{width:"10",height:"13",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l,id:"hand-icon",children:(0,n.jsx)("path",{d:"M10.1522 5.2133C9.8674 5.21302 9.58615 5.27647 9.32905 5.39899V3.01823C9.32915 2.68533 9.24269 2.35812 9.07816 2.06872C8.91364 1.77931 8.6767 1.53765 8.39059 1.36746C8.10448 1.19726 7.77905 1.10437 7.44621 1.09791C7.11337 1.09144 6.78457 1.17162 6.49207 1.33058C6.35149 0.895086 6.06003 0.524102 5.67019 0.284444C5.28035 0.0447849 4.81774 -0.047797 4.36569 0.023373C3.91365 0.094543 3.50186 0.324787 3.20452 0.672636C2.90717 1.02048 2.7438 1.46308 2.74384 1.92069V2.38077C2.45113 2.24174 2.12799 2.17905 1.80452 2.19856C1.48106 2.21806 1.16779 2.31911 0.893901 2.49229C0.620011 2.66548 0.394408 2.90517 0.238109 3.18904C0.0818086 3.4729 -0.000104252 3.79171 9.95772e-08 4.11576V9.87782C9.95772e-08 11.4788 0.635981 13.0142 1.76803 14.1462C2.90009 15.2783 4.43548 15.9143 6.03645 15.9143C7.63741 15.9143 9.1728 15.2783 10.3049 14.1462C11.4369 13.0142 12.0729 11.4788 12.0729 9.87782V7.13399C12.0723 6.62476 11.8698 6.13656 11.5097 5.77649C11.1496 5.41641 10.6614 5.21387 10.1522 5.2133ZM10.9754 9.87782C10.9754 11.1877 10.455 12.4439 9.52878 13.3702C8.60256 14.2964 7.34633 14.8167 6.03645 14.8167C4.72656 14.8167 3.47033 14.2964 2.54411 13.3702C1.61788 12.4439 1.09754 11.1877 1.09754 9.87782V4.11576C1.09754 3.89745 1.18426 3.68808 1.33863 3.53371C1.493 3.37934 1.70237 3.29261 1.92069 3.29261C2.139 3.29261 2.34837 3.37934 2.50274 3.53371C2.65711 3.68808 2.74384 3.89745 2.74384 4.11576V7.13399C2.74384 7.27953 2.80166 7.41911 2.90457 7.52202C3.00748 7.62494 3.14706 7.68275 3.29261 7.68275C3.43815 7.68275 3.57773 7.62494 3.68064 7.52202C3.78356 7.41911 3.84137 7.27953 3.84137 7.13399V1.92069C3.84137 1.70238 3.9281 1.49301 4.08247 1.33864C4.23684 1.18427 4.44621 1.09754 4.66453 1.09754C4.88284 1.09754 5.09221 1.18427 5.24658 1.33864C5.40095 1.49301 5.48768 1.70238 5.48768 1.92069V6.58522C5.48768 6.73076 5.54549 6.87034 5.64841 6.97326C5.75132 7.07617 5.8909 7.13399 6.03645 7.13399C6.18199 7.13399 6.32157 7.07617 6.42448 6.97326C6.5274 6.87034 6.58521 6.73076 6.58521 6.58522V3.01823C6.58521 2.79992 6.67194 2.59054 6.82631 2.43617C6.98068 2.2818 7.19005 2.19508 7.40836 2.19508C7.62668 2.19508 7.83605 2.2818 7.99042 2.43617C8.14479 2.59054 8.23152 2.79992 8.23152 3.01823V8.00286C7.4647 8.13356 6.76877 8.53111 6.26668 9.12525C5.76459 9.71938 5.48867 10.4719 5.48768 11.2497C5.48768 11.3953 5.54549 11.5349 5.64841 11.6378C5.75132 11.7407 5.8909 11.7985 6.03645 11.7985C6.18199 11.7985 6.32157 11.7407 6.42448 11.6378C6.5274 11.5349 6.58521 11.3953 6.58521 11.2497C6.58587 10.66
178 6.81735 10.1098 7.22886 9.69832C7.64038 9.28681 8.19832 9.05533 8.78028 9.05467C8.92583 9.05467 9.06541 8.99685 9.16832 8.89394C9.27123 8.79103 9.32905 8.65145 9.32905 8.50591V7.13399C9.32905 6.91567 9.41578 6.7063 9.57015 6.55193C9.72452 6.39756 9.93389 6.31083 10.1522 6.31083C10.3705 6.31083 10.5799 6.39756 10.7343 6.55193C10.8886 6.7063 10.9754 6.91567 10.9754 7.13399V9.87782Z",fill:i})})};s.propTypes=d;var u=s,c=function(e){var t=e.topic_score,i=e.hideRank,r=void 0!==i&&i,a=e.isPercentage,d=void 0!==a&&a,s="number"===typeof t&&!isNaN(t),c=s?t.toFixed(2):"0.00";return!s||r?(0,n.jsx)(o.Z,{placement:"topLeft",content:function(){return(0,n.jsx)("p",{children:"To view the support on this topic, you need to add your direct support or delegate support to another user first."})},overlayStyle:{width:"20%"},children:(0,n.jsxs)(l.Z,{id:"score-tag",className:"bg-canOrange text-white border-0 rounded-md ml-1 inline-flex py-[2px] flex items-center text-[10px] scoreTag",children:[(0,n.jsx)(u,{}),(0,n.jsx)("span",{children:c})]})}):(0,n.jsxs)(l.Z,{id:"score-tag",className:"bg-canOrange text-white border-0 rounded-md ml-1 inline-flex py-[2px] flex items-center text-[10px] scoreTag",children:[(0,n.jsx)(u,{}),c," ",d?"%":""]})}},36722:function(e,t,i){"use strict";var n=i(85893),o=i(21818),l=i(13013),r=i(78206),a=(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",className:"text-canBlack text-xl font-bold",children:(0,n.jsx)("path",{d:"M16 3.42857C16 5.32143 14.4643 6.85714 12.5714 6.85714C11.5393 6.85714 10.6143 6.4 9.98571 5.67857L6.78214 7.28214C6.83214 7.51429 6.85714 7.75357 6.85714 8C6.85714 8.24643 6.83214 8.48571 6.78214 8.71786L9.98571 10.3214C10.6143 9.6 11.5393 9.14286 12.5714 9.14286C14.4643 9.14286 16 10.6786 16 12.5714C16 14.4643 14.4643 16 12.5714 16C10.6786 16 9.14286 14.4643 9.14286 12.5714C9.14286 12.325 9.16786 12.0857 9.21786 11.8536L6.01429 10.25C5.38571 10.9714 4.46071 11.4286 3.42857 11.4286C1.53571 11.4286 0 9.89286 0 8C0 6.10714 1.53571 4.57143 3.42857 4.57143C4.46071 4.57143 5.38571 5.02857 6.01429 5.75L9.21786 4.14643C9.16786 3.91429 9.14286 3.675 9.14286 3.42857C9.14286 1.53571 10.6786 0 12.5714 0C14.4643 0 16 1.53571 16 3.42857ZM3.42857 9.71429C3.88323 9.71429 4.31926 9.53367 4.64075 9.21218C4.96225 8.89069 5.14286 8.45466 5.14286 8C5.14286 7.54534 4.96225 7.10931 4.64075 6.78782C4.31926 6.46633 3.88323 6.28571 3.42857 6.28571C2.97391 6.28571 2.53788 6.46633 2.21639 6.78782C1.8949 7.10931 1.71429 7.54534 1.71429 8C1.71429 8.45466 1.8949 8.89069 2.21639 9.21218C2.53788 9.53367 2.97391 9.71429 3.42857 9.71429ZM14.2857 3.42857C14.2857 3.20345 14.2414 2.98053 14.1552 2.77254C14.0691 2.56456 13.9428 2.37557 13.7836 2.21639C13.6244 2.0572 13.4354 1.93093 13.2275 1.84478C13.0195 1.75863 12.7966 1.71429 12.5714 1.71429C12.3463 1.71429 12.1234 1.75863 11.9154 1.84478C11.7074 1.93093 11.5184 2.0572 11.3592 2.21639C11.2001 2.37557 11.0738 2.56456 10.9876 2.77254C10.9015 2.98053 10.8571 3.20345 10.8571 3.42857C10.8571 3.65369 10.9015 3.87661 10.9876 4.0846C11.0738 4.29259 11.2001 4.48157 11.3592 4.64075C11.5184 4.79994 11.7074 4.92621 11.9154 5.01237C12.1234 5.09852 12.3463 5.14286 12.5714 5.14286C12.7966 5.14286 13.0195 5.09852 13.2275 5.01237C13.4354 4.92621 13.6244 4.79994 13.7836 4.64075C13.9428 4.48157 14.0691 4.29259 14.1552 4.0846C14.2414 3.87661 14.2857 3.65369 14.2857 3.42857ZM12.5714 14.2857C13.0261 14.2857 13.4621 14.1051 13.7836 13.7836C14.1051 13.4621 14.2857 13.0261 14.2857 12.5714C14.2857 12.1168 14.1051 11.6807 13.7836 11.3592C13.4621 11.0378 13.0261 10.8571 12.5714 10.8571C12.1168 10.8571 11.6807 11.0378 11.3592 11.3592C11.0378 11.6807 10.8571 12.1168 10.8571 12.5714C10.8571 13.0261 11.0378 13.4621 11.3592 13.7836C11.6807 14.1051 12.1168 14.2857 12.5714 14.2857Z"})});t.Z=function(e){var t,i=e.campUrl,d=e.campName,s=[{key:"facebook_share",label:(0,n.jsx)(o.Dk,{url:i,quote:d,hashtag:"#".concat(!(0,r.sk)()&&(null===window||void 0===window||null===(t=window.location)||void 0===t?void 0:t.hostname)),children:(0,n.jsx)(o.Vq,{size:32,round:!0})})},{key:"twitter_share",label:(0,n.jsx)(o.B,{url:i,title:d,children:(0,n.jsx)(o.Zm,{size:32,round:!0})})}
1,{key:"linkedin_share",label:(0,n.jsx)(o.r2,{url:i,children:(0,n.jsx)(o.pA,{size:32,round:!0})})}];return(0,n.jsx)(l.Z,{placement:"bottomRight",menu:{items:s},trigger:["click"],overlayClassName:"[&_.ant-dropdown-menu]:flex [&_.ant-dropdown-menu]:py-2 [&_.ant-dropdown-menu]:px-2 rounded-lg overflow-hidden shadow-md [&_.ant-dropdown-menu-title-content]:flex [&_svg]:!fill-canBlack [&_svg]:!text-canBlack",children:(0,n.jsx)("a",{id:"share-dropdown",className:"",onClick:function(e){return e.preventDefault()},children:a})},"dropdown_menus")}},27753:function(e,t,i){"use strict";i.d(t,{qb:function(){return f},gK:function(){return _},fR:function(){return y},Bu:function(){return b},qC:function(){return x},ow:function(){return j},HE:function(){return h},am:function(){return g},CP:function(){return w},sN:function(){return m}});var n=i(47568),o=i(97582),l=i(25986),r=i(51438),a=i(28668),d=i(25892),s=i(76166),u=i(96810),c=i(88350),v=function(e){(0,a.Z)(i,e);var t=(0,s.Z)(i);function i(e){return(0,r.Z)(this,i),t.call(this,e)}return i.createThread=function(e){return new c.Z(u.Z.Network.URL.ThreadCreate,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{})},i.updateThread=function(e,t){return new c.Z(u.Z.Network.URL.ThreadUpdate+"/"+t,u.Z.Network.Method.PUT,e,u.Z.Network.Header.Type.Json,{})},i.getThreads=function(e){return new c.Z(u.Z.Network.URL.ThreadsList+e,u.Z.Network.Method.GET,null,u.Z.Network.Header.Type.Json,{})},i.latestThread=function(e){return new c.Z(u.Z.Network.URL.GetTopFiveThreadData,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{})},i.siblingCamps=function(e){return new c.Z(u.Z.Network.URL.GetSiblingCamp,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{})},i.createPost=function(e){return new c.Z(u.Z.Network.URL.PostSave,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{})},i.updatePost=function(e,t){return new c.Z(u.Z.Network.URL.PostUpdate+"/"+t,u.Z.Network.Method.PUT,e,u.Z.Network.Header.Type.Json,{})},i.getPosts=function(e,t,i){return new c.Z(u.Z.Network.URL.PostList+"/"+e+t,u.Z.Network.Method.GET,null,u.Z.Network.Header.Type.Json,{},i)},i.deletePost=function(e){return new c.Z(u.Z.Network.URL.PostDelete+"/"+e,u.Z.Network.Method.DELETE,null,u.Z.Network.Header.Type.Json,{})},i.getThreadDetails=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return new c.Z(u.Z.Network.URL.GetThreadData+e+"?topic_num=".concat(t,"&camp_num=").concat(i),u.Z.Network.Method.GET,null,u.Z.Network.Header.Type.Json,{},n)},i}((0,d.Z)(c.Z)),p=i(78206),_=function(){var e=(0,n.Z)((function(e){var t,i;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,l.Z.fetch(v.createThread(e),!1)];case 1:return[2,n.sent()];case 2:return t=n.sent(),(0,p.S3)(t),[2,null===t||void 0===t||null===(i=t.error)||void 0===i?void 0:i.data];case 3:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=(0,n.Z)((function(e,t){var i,n;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,l.Z.fetch(v.updateThread(e,t),!1)];case 1:return[2,o.sent()];case 2:return i=o.sent(),(0,p.S3)(i),[2,null===i||void 0===i||null===(n=i.error)||void 0===n?void 0:n.data];case 3:return[2]}}))}));return function(t,i){return e.apply(this,arguments)}}(),h=function(){var e=(0,n.Z)((function(e){var t,i;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,l.Z.fetch(v.getThreads(e),!1)];case 1:return[2,n.sent()];case 2:return[2,null===(t=n.sent())||void 0===t||null===(i=t.error)||void 0===i?void 0:i.data];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,l.Z.fetch(v.createPost(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,p.S3)(t),[3,3];case 3:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=(0,n.Z)((function(e){var t,i;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,l.Z.fetch(v.latestThread(e),!1)];case 1:return[2,n.sent()];case 2:return[2,null===(t=n.sent())||void 0===t||null===(i=t.error)||void 0===i?void 0:i.data];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=(0,n.Z)((function(e){var t,i;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,l.Z.fetch(v.siblingCamps(e),!1)];case 1:return[2,n.sent()];case 2:return[2,null===(t=n.sent())||void 0===t||null===(i=t.error)||void 0===i?void 0:i.data];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,n.Z)((function(e,t){var i;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,l.Z.fetch(v.updatePost(e,t),!1)];case 1:return[2,n.sent()];case 2:return i=n.sent(),(0,p.S3)(i),[3,3];case 3:return[2]}}
1))}));return function(t,i){return e.apply(this,arguments)}}(),b=function(){var e=(0,n.Z)((function(e,t){var i,n,r=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:i=r.length>2&&void 0!==r[2]?r[2]:"",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(v.getPosts(e,t,i),!1)];case 2:return[2,o.sent()];case 3:return n=o.sent(),(0,p.S3)(n),[3,4];case 4:return[2]}}))}));return function(t,i){return e.apply(this,arguments)}}(),y=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,l.Z.fetch(v.deletePost(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,p.S3)(t),[3,3];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,n.Z)((function(e,t,i){var n,r=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:n=r.length>3&&void 0!==r[3]?r[3]:"",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(v.getThreadDetails(e,t,i,n),!1)];case 2:return[2,o.sent()];case 3:return[2,o.sent().error];case 4:return[2]}}
1))}));return function(t,i,n){return e.apply(this,arguments)}}()},65424:function(e,t,i){"use strict";i.d(t,{gQ:function(){return h},Dc:function(){return x},z$:function(){return f},KF:function(){return g}});var n=i(47568),o=i(97582),l=i(25986),r=i(51438),a=i(28668),d=i(25892),s=i(76166),u=i(96810),c=i(88350),v=function(e){(0,a.Z)(i,e);var t=(0,s.Z)(i);function i(e){return(0,r.Z)(this,i),t.call(this,e)}return i.addNewsFeed=function(e,t){return new c.Z(u.Z.Network.URL.AddNewsFeed,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{},t)},i.getEditCampNewsFeed=function(e,t){return new c.Z(u.Z.Network.URL.GetEditCampNewsFeed,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{},t)},i.updateNewsFeed=function(e,t){return new c.Z(u.Z.Network.URL.UpdateNewsFeed,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{},t)},i.deleteNewsFeed=function(e,t){return new c.Z(u.Z.Network.URL.DeleteNewsFeed,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{},t)},i}((0,d.Z)(c.Z)),p=i(66069),_=i(1317),m=i(73918),h=function(){var e=(0,n.Z)((function(e){var t,i,n,r,a,d=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:t=d.length>1&&void 0!==d[1]?d[1]:null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(v.addNewsFeed(e,t))];case 2:return[2,o.sent()];case 3:return i=o.sent(),(0,m.I)(null===i||void 0===i||null===(n=i.error)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.message,"error"),[2,null===i||void 0===i||null===(a=i.error)||void 0===a?void 0:a.data];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=(0,n.Z)((function(e){var t,i,n,r=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:t=r.length>1&&void 0!==r[1]?r[1]:null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(v.getEditCampNewsFeed(e,t))];case 2:return i=o.sent(),n=null===i||void 0===i?void 0:i.data,p.h.dispatch((0,_.de)(n&&n[0]||{})),[2,n];case 3:return[2,o.sent()];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=(0,n.Z)((function(e){var t,i,n,r,a,d=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:t=d.length>1&&void 0!==d[1]?d[1]:null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(v.updateNewsFeed(e,t))];case 2:return[2,o.sent()];case 3:return i=o.sent(),Object.keys(null===i||void 0===i||null===(n=i.error)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.error).includes("newsfeed_id")&&(0,m.I)("News does not found","error"),[2,null===i||void 0===i||null===(a=i.error)||void 0===a?void 0:a.data];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=(0,n.Z)((function(e){var t,i,n,r=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:t=r.length>1&&void 0!==r[1]?r[1]:null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(v.deleteNewsFeed(e,t))];case 2:return[2,o.sent()];case 3:return[2,null===(i=o.sent())||void 0===i||null===(n=i.error)||void 0===n?void 0:n.data];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()},12125:function(e,t,i){"use strict";i.d(t,{Cl:function(){return b},nh:function(){return x},Rp:function(){return w},Lg:function(){return f},Lo:function(){return g},yE:function(){return h}});var n=i(47568),o=i(97582),l=i(78206),r=i(66069),a=i(13590),d=i(25986),s=i(51438),u=i(28668),c=i(25892),v=i(76166),p=i(96810),_=i(88350),m=function(e){(0,u.Z)(i,e);var t=(0,v.Z)(i);function i(e){return(0,s.Z)(this,i),t.call(this,e)}return i.campHistory=function(e,t){return new _.Z(p.Z.Network.URL.CampStatementHistory,p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{},t)},i.getHistoryUrl=function(e){var t;return"statement"==e?t="CampStatementHistory":"camp"==e?t="GetCampHistory":"topic"==e&&(t="GetTopicHistory"),{historyUrl:t,liveHistoryUrl:undefined}},i.getHistory=function(e,t,n){var o=i.getHistoryUrl(n).historyUrl;return new _.Z(p.Z.Network.URL[o],p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{},t)},i.changeSupporters=function(e){return new _.Z(p.Z.Network.URL.ChangeSupporters,p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{})},i.checkCampStatus=function(e){return new _.Z(p.Z.Network.URL.CheckCampStatus,p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{})},i.statementCompare=function(e){return new _.Z(p.Z.Network.URL.CompareStatement,p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{})},i.commitChangeStatement=function(e){return new _.Z(p.Z.Network.URL.CommitChangeStatement,p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{})},i.discardChangeStatement=function(e){return new _.Z(p.Z.Network.URL.DiscardChangeStatement,p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{})},i.agreeToChange=function(e){return new _.Z(p.Z.Network.URL.AgreeToChange,p.Z.Network.Method.POST,e,p.Z.Network.Header.Type.Json,{})},i}((0,c.Z)(_.Z)),h=function(){var e=(0,n.Z)((function(e,t,i){var n,l,s,u,c,v,p,_,h,f=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:n=f.length>3&&void 0!==f[3]?f[3]:null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,d.Z.fetch(m.getHistory(e,n,i),!1)];case 2:return l=o.sent(),1==t?r.h.dispatch((0,a.JB)(l.data)):r.h.dispatch((0,a.ES)(l.data.items||[])),[2,{data:null===l||void 0===l?void 0:l.data,status_code:null===l||void 0===l?void 0:l.status_code}];case 3:return s=o.sent(),r.h.dispatch((0,a.ES)([])),404==(null===s||void 0===s||null===(u=s.error)||void 0===u||null===(c=u.data)||void 0===c?void 0:c.status_code)&&(null===r.h||void 0===r.h||r.h.dispatch((0,a.JB)({}))),[2,{status_code:null===s||void 0===s||null===(v=s.error)||void 0===v||null===(p=v.data)||void 0===p?void 0:p.status_code,errorType:null===s||void 0===s||null===(_=s.error)||void 0===_||null===(h=_.data)||void 0===h?void 0:h.error}];case 4:return[2]}}
1))}));return function(t,i,n){return e.apply(this,arguments)}}(),f=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,d.Z.fetch(m.changeSupporters(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,l.S3)(t),[3,3];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),g=(function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,d.Z.fetch(m.checkCampStatus(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,l.S3)(t),[3,3];case 3:return[2]}}))}))}(),function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,d.Z.fetch(m.statementCompare(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,l.S3)(t),[3,3];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()),x=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,d.Z.fetch(m.commitChangeStatement(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,l.S3)(t),[2,t];case 3:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,d.Z.fetch(m.discardChangeStatement(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,l.S3)(t),[2,t];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,d.Z.fetch(m.agreeToChange(e),!1)];case 1:return[2,i.sent()];case 2:return t=i.sent(),(0,l.S3)(t),[2,t];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()},66433:function(e,t,i){"use strict";i.d(t,{AR:function(){return f},L2:function(){return g},GH:function(){return x},HV:function(){return h}});var n=i(47568),o=i(97582),l=i(25986),r=i(51438),a=i(28668),d=i(25892),s=i(76166),u=i(96810),c=i(88350),v=i(78206),p=function(e){(0,a.Z)(i,e);var t=(0,s.Z)(i);function i(e){return(0,r.Z)(this,i),t.call(this,e)}return i.createTopic=function(e){var t=(0,v.$1)();return new c.Z(u.Z.Network.URL.CreateTopic,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{},null===t||void 0===t?void 0:t.loginToken)},i.GetActiveSupportTopic=function(e,t){return new c.Z(u.Z.Network.URL.GetActiveSupportTopic,u.Z.Network.Method.POST,e,u.Z.Network.Header.Type.Json,{},t)},i.GetCheckSupportExists=function(e,t){return new c.Z(u.Z.Network.URL.GetCheckSupportExists+e,u.Z.Network.Method.GET,{},u.Z.Network.Header.Type.Json,{},t)},i.GetHotTopic=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return new c.Z(u.Z.Network.URL.GetHotTopic+"?page=".concat(e,"&per_page=").concat(t),u.Z.Network.Method.GET,{},u.Z.Network.Header.Type.Json,{},i)},i.GetPreferedTopic=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return new c.Z(u.Z.Network.URL.GetPrefTopic+"?page=".concat(e,"&per_page=").concat(t,"&is_random=").concat(i),u.Z.Network.Method.GET,{},u.Z.Network.Header.Type.Json,{},n)},i.GetFeaturedTopic=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new c.Z(u.Z.Network.URL.GetFeaturedTopic,u.Z.Network.Method.GET,{},u.Z.Network.Header.Type.Json,{},e)},i.GetConsensusVideoPodcasts=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return new c.Z(u.Z.Network.URL.GetconsensusVideoPodcasts+"?page=".concat(e,"&per_page=").concat(t),u.Z.Network.Method.GET,{},u.Z.Network.Header.Type.Json,{},i)},i}((0,d.Z)(c.Z)),_=i(66069),m=i(95240),h=function(){var e=(0,n.Z)((function(e){var t,i,n;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,l.Z.fetch(p.createTopic(e))];case 1:return[2,o.sent()];case 2:return(t=o.sent())&&t.error&&t.error.data&&400===t.error.data.status_code&&!(null===(i=t.error.data.error)||void 0===i?void 0:i.topic_name)?((0,v.S3)(t),[3,3]):[2,null===t||void 0===t||null===(n=t.error)||void 0===n?void 0:n.data];case 3:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=(0,n.Z)((function(e){var t,i,n,r,a=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:t=a.length>1&&void 0!==a[1]?a[1]:null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(p.GetActiveSupportTopic(e,t))];case 2:return[2,o.sent()];case 3:return(i=o.sent())&&i.error&&i.error.data&&400===i.error.data.status_code&&!(null===(n=i.error.data.error)||void 0===n?void 0:n.topic_name)?((0,v.S3)(i),[3,4]):[2,null===(r=i.error)||void 0===r?void 0:r.data];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=(0,n.Z)((function(e){var t,i,n,r,a=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:t=a.length>1&&void 0!==a[1]?a[1]:null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(p.GetCheckSupportExists(e,t))];case 2:return[2,o.sent()];case 3:return(i=o.sent())&&i.error&&i.error.data&&400===i.error.data.status_code&&!(null===(n=i.error.data.error)||void 0===n?void 0:n.topic_name)?((0,v.S3)(i),[3,4]):[2,null===i||void 0===i||null===(r=i.error)||void 0===r?void 0:r.data];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),x=(function(){var e=(0,n.Z)((function(e,t){var i,n,r,a,d,s=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:i=s.length>2&&void 0!==s[2]?s[2]:"",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(p.GetHotTopic(e,t,i))];case 2:return 200===(n=o.sent()).status_code&&_.h.dispatch((0,m.gS)((null===n||void 0===n||null===(r=n.data)||void 0===r?void 0:r.items)||[])),400===n.status_code&&_.h.dispatch((0,m.gS)([])),[2,n];case 3:return[2,null===(a=o.sent())||void 0===a||null===(d=a.error)||void 0===d?void 0:d.data];case 4:return[2]}}))}))}(),function(){var e=(0,n.Z)((function(){var e,t,i,n,r,a,d,s,u=arguments;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:e=u.length>0&&void 0!==u[0]?u[0]:1,t=u.length>1&&void 0!==u[1]?u[1]:6,i=u.length>2&&void 0!==u[2]&&u[2],n=u.length>3?u[3]:void 0,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.Z.fetch(p.GetPreferedTopic(e,t,i,n))];case 2:return 200===(r=o.sent()).status_code&&_.h.dispatch((0,m.bN)((null===r||void 0===r||null===(a=r.data)||void 0===a?void 0:a.items)||[])),400===r.status_code&&_.h.dispatch((0,m.bN)([])),[2,r];case 3:return[2,null===(d=o.sent())||void 0===d||null===(s=d.error)||void 0===s?void 0:s.data];case 4:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}());(function(){var e=(0,n.Z)((function(e){var t,i,n,r;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,l.Z.fetch(p.GetFeaturedTopic(e))];case 1:return 200===(t=o.sent()).status_code&&_.h.dispatch((0,m.OL)((null===t||void 0===t||null===(i=t.data)||void 0===i?void 0:i.items)||[])),400===t.status_code&&_.h.dispatch((0,m.OL)([])),[2,t];case 2:return[2,null===(n=o.sent())||void 0===n||null===(r=n.error)||void 0===r?void 0:r.data];case 3:return[2]}}))}))})(),function(){var e=(0,n.Z)((function(e,t,i){var n,r,a,d;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,l.Z.fetch(p.GetConsensusVideoPodcasts(e,t,i))];case 1:return 200===(n=o.sent()).status_code&&_.h.dispatch((0,m.VQ)((null===n||void 0===n||null===(r=n.data)||void 0===r?void 0:r.items)||[])),400===n.status_code&&_.h.dispatch((0,m.VQ)([])),[2,n];case 2:return[2,null===(a=o.sent())||void 0===a||null===(d=a.error)||void 0===d?void 0:d.data];case 3:return[2]}}
1))}))}()},15417:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return Ot},default:function(){return Ht}});var n=i(85893),o=i(67294),l=i(25617),r=i(13590),a=i(47568),d=i(26042),s=i(69396),u=i(97582),c=i(11163),v=i(80284),p=i(54907),_=i(12461),m=i(55241),h=i(38939),f=i(1212),g=i(14670),x=i(55848),w=i(85402),b=i(75008),y=i(30381),j=i.n(y),Z=i(56717),C=i(28508),S=i(44872),k=i.n(S),N=i(33202),A=i(61079),T=i(66069),D=i(25675),E=i.n(D),B=i(47389),I=i(11713),q=i(27732),R=i(71577),L=i(96810),P=i(78206),M=i(46466),Q=i(64144),O=i(71099),H=i(54765),F=i(59852),U=i(30825),G=function(e){var t,i,r,a,d,s,u,v,p,_,m,h,f,g,x,w,b,y,j,Z,C,S,N,A,T,D,G,J=e.loadingIndicator,Y=(0,c.useRouter)(),V=(0,l.v9)((function(e){var t,i,n,o,l,r,a,d;return{campStatement:null===e||void 0===e||null===(t=e.topicDetails)||void 0===t?void 0:t.campStatement,campRecord:null===e||void 0===e||null===(i=e.topicDetails)||void 0===i?void 0:i.currentCampRecord,tree:(null===e||void 0===e||null===(n=e.topicDetails)||void 0===n?void 0:n.tree)&&(null===e||void 0===e||null===(o=e.topicDetails)||void 0===o?void 0:o.tree[0]),haveStatementPreview:null===e||void 0===e||null===(l=e.topic)||void 0===l?void 0:l.haveStatementPreview,openConsensusTreePopup:e.hotTopic.openConsensusTreePopup,asof:null===e||void 0===e||null===(r=e.filters)||void 0===r||null===(a=r.filterObject)||void 0===a?void 0:a.asof,restrictUser:null===e||void 0===e||null===(d=e.topicDetails)||void 0===d?void 0:d.restrictSupporters,loggedInUser:e.auth.loggedInUser}})),K=V.campRecord,z=V.campStatement,W=V.tree,X=V.haveStatementPreview,$=V.openConsensusTreePopup,ee=V.asof,te=V.loggedInUser,ie=V.restrictUser,ne=(0,o.useState)(!1),oe=ne[0],le=ne[1];if(J||!z)return(0,n.jsx)(M.Z,{skeltonFor:"card",titleName:null===L.Z||void 0===L.Z||null===(G=L.Z.exceptionalMessages)||void 0===G?void 0:G.campStatementHeading,bodyCount:2,stylingClass:"test",isButton:!1});var re=function(e){var t;null===e||void 0===e||e.preventDefault(),null===Y||void 0===Y||Y.push({pathname:"/manage/statement/"+(null===(t=z[0])||void 0===t?void 0:t.draft_record_id),query:{is_draft:"1"}})},ae=function(){var e,t;if((null===z||void 0===z?void 0:z.length)&&(!(null===(e=z[0])||void 0===e?void 0:e.parsed_value)&&(null===(t=z[0])||void 0===t?void 0:t.draft_record_id)))return!0;return!1},de=function(){var e=document.querySelector("#statementCard .ant-card-head");return(null===e||void 0===e?void 0:e.offsetHeight)||0},se=(0,P.EC)(ie,te);return(0,n.jsx)(H.Z,{style:{"--card-body-height":"calc(100% - ".concat(de(),"px)"),"--element-height":"".concat(de(),"px")},className:oe?"[&_.ant-card-body]:h-full [&_.ant-card-body]:w-full [&_.ant-card-body]:items-center fixed top-0  left-0 w-full h-full z-[9999] bg-white border-none flex justify-start items-start shadow-md flex-col overflow-hidden !overflow-y-auto [&_.ant-card-head]:w-full":"border-0 h-100  bg-white [&_.ant-card-body]:p-0  [&_.ant-card-body]:lg:p-[24px] [&_.ant-card-body]:h-full [&_.ant-card-body]:flex overflow-hidden lg:bg-canGray mb-8 lg:mb-14 border-t-8  \n          ".concat("in_review"==(null===Y||void 0===Y||null===(t=Y.query)||void 0===t?void 0:t.status)?"!border-canOrange":"old"==(null===Y||void 0===Y||null===(i=Y.query)||void 0===i?void 0:i.status)?"!border-canBlue":"live"==(null===Y||void 0===Y||null===(r=Y.query)||void 0===r?void 0:r.status)?"!border-canGreen":"objected"==(null===Y||void 0===Y||null===(a=Y.query)||void 0===a?void 0:a.status)?"!border-canRed":"review"==(null===Y||void 0===Y||null===(d=Y.query)||void 0===d?void 0:d.asof)&&(null===z||void 0===z||null===(s=z[0])||void 0===s?void 0:s.in_review_changes)>0?"!border-canOrange":"bydate"==(null===Y||void 0===Y||null===(u=Y.query)||void 0===u?void 0:u.asof)?"border-[#4786CB]":"!border-canGreen"," \n            ").concat($?"[&_.ant-card-body]:!h-[700px]":"h-[400px] xl:h-[600px]"," statementCardBody"),"data-testid":"algoSelect",id:"statementCard",title:(0,n.jsxs)("div",{className:"flex justify-between items-start flex-wrap bg-green",children:[(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsxs)("div",{className:"camp-agreement-header flex items-center mb-2.5 lg:mb-1 gap-2 justify-between",children:[(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[(0,n.jsx)(U.Z,{title:(null===X||void 0===X?void 0:X.review_title)||(null===K||void 0===K?void 0:K.camp_name),infoContent:"",icon:null,className:"text-sm lg:text-base normal-case text-canBlack text-left font-semibold !mb-0"}),(0,n.jsx)(Q.Z,{views:(null===W||void 0===W?void 0:W[1])&&(null===(v=W[1])||void 0===v?void 0:v.camp_views),className:"!gap-1"})]}),(0,n.jsxs)("div",{children:[oe&&(null===z||void 0===z?void 0:z.length)&&(null===(p=z[0])||void 0===p?void 0:p.parsed_value)&&(null===(_=z[0])||void 0===_?void 0:_.draft_record_id)?(0,n.jsxs)(F.Z,{className:"px-8 h-auto py-2 ml-auto",onClick:re,children:["Edit Draft ",(0,n.jsx)(B.Z,{})]}):null,(0,n.jsx)(R.Z,{className:"border-none bg-transparent hover:bg-transparent shadow-none focus:!bg-transparent",onClick:function(){return le(!oe)},children:oe?(0,n.jsx)(I.Z,{style:{fontSize:"20px"}}):(0,n.jsx)(q.Z,{style:{fontSize:"20px"}})})]})]}),(null===z||void 0===z||null===(m=z[0])||void 0===m?void 0:m.go_live_time)&&(0,n.jsx)("div",{className:"flex items-center justify-start gap-6 camp-header-content lg:border-none border-t border-b border-canGrey2 lg:py-0 py-1.5 lg:mb-0 mb-2",children:(null===z||void 0===z||null===(h=z[0])||void 0===h?void 0:h.go_live_time)&&(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(E(),{src:"/images/calendar-camp.svg",alt:"svg",className:"icon-topic",height:16,width:16}),(0,n.jsxs)("p",{className:"text-[10px] font-normal text-canBlack text-opacity-50",children:["Last update:"," ",(0,P.fq)(null===z||void 0===z||null===(f=z[0])||void 0===f?void 0:f.go_live_time)]})]})})]}),!oe&&(null===z||void 0===z?void 0:z.length)&&(null===(g=z[0])||void 0===g?void 0:g.parsed_value)&&(null===(x=z[0])||void 0===x?void 0:x.draft_record_id)?(0,n.jsxs)(F.Z,{className:"px-8 h-auto py-2 ml-auto",onClick:re,disabled:se,children:["Edit Draft ",(0,n.jsx)(B.Z,{})]}):null]}),children:(0,n.jsx)("div",{className:"camp-agrrement-new overflow-hidden  !overflow-y-auto w-full pr-4 ".concat((null===z||void 0===z||null===(w=z[0])||void 0===w||null===(b=w.value)||void 0===b?void 0:b.length)?"":"h-full flex justify-center my-auto"," ").concat((null===z||void 0===z?void 0:z.length)>0&&(null===(y=z[0])||void 0===y?void 0:y.parsed_value)?"":"my-auto"),children:(0,n.jsxs)("div",{className:"flex flex-col ".concat((null===z||void 0===z?void 0:z.length)&&(null===(j=z[0])||void 0===j?void 0:j.parsed_value)?"items-start justify-start":"items-center justify-center"),children:[(0,n.jsx)("div",{className:"".concat(k().campStatement," text-canBlack opacity-80 text-sm font-normal leading-6 [&_a]:!text-canBlue [&_a]:hover:!text-canHoverBlue"),children:(null===z||void 0===z?void 0:z.length)&&(null===(Z=z[0])||void 0===Z?void 0:Z.parsed_value)&&"review"==ee&&0==(null===(C=null===z||void 0===z?void 0:z.at(0))||void 0===C?void 0:C.in_review_changes)?(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:'<div class="ck-content editorContent">'.concat(null===(S=z[0])||void 0===S?void 0:S.parsed_value,"</div>")}}):(null===z||void 0===z?void 0:z.length)&&(null===(N=z[0])||void 0===N?void 0:N.parsed_value)?(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:'<div class="ck-content editorContent">'.concat(null===(A=z[0])||void 0===A?void 0:A.parsed_value,"</div>")}}):(0,n.jsx)("span",{className:"text-sm",children:ae()?"Continue finishing up your statement":null===L.Z||void 0===L.Z||null===(T=L.Z.exceptionalMe
1ssages)||void 0===T?void 0:T.campStatement})}),(0,n.jsx)("div",{className:"topicDetailsCollapseFooter printHIde camp ".concat((null===z||void 0===z?void 0:z.length)&&(null===(D=z[0])||void 0===D?void 0:D.parsed_value)?"mt-5 border-t-2 pt-5 w-full":""),children:function(){var e,t,i,o,l,r,a,d,s,u,c;return ae()?(0,n.jsxs)(O.Z,{className:"printHIde flex items-center justify-center text-base h-auto py-2 px-9 gap-2 w-full mt-5 font-medium",onClick:re,children:["Edit Draft ",(0,n.jsx)(B.Z,{})]}):ae()||(null===z||void 0===z?void 0:z.length)&&(!(null===z||void 0===z?void 0:z.length)||(null===(e=z[0])||void 0===e?void 0:e.parsed_value))?(0,n.jsxs)(O.Z,{disabled:1==(null===K||void 0===K?void 0:K.is_archive),className:"btn-green printHIde hidden lg:hidden sm:flex md:flex items-center justify-center text-base font-medium",id:"add-camp-statement-btn",onClick:function(){var e,t,i,n;return null===Y||void 0===Y?void 0:Y.push({pathname:(null===z||void 0===z?void 0:z.length)>0?"/statement/history/".concat((0,P.s6)(null===Y||void 0===Y||null===(e=Y.query)||void 0===e?void 0:e.camp.at(0),"-"),"/").concat((0,P.s6)(null!==(u=null===Y||void 0===Y||null===(t=Y.query)||void 0===t?void 0:t.camp.at(1))&&void 0!==u?u:"1-Agreement","-")):"/create/statement/".concat((0,P.s6)(null===Y||void 0===Y||null===(i=Y.query)||void 0===i?void 0:i.camp.at(0),"-"),"/").concat((0,P.s6)(null!==(c=null===Y||void 0===Y||null===(n=Y.query)||void 0===n?void 0:n.camp.at(1))&&void 0!==c?c:"1-Agreement","-"))})},children:[null===L.Z||void 0===L.Z||null===(t=L.Z.exceptionalMessages)||void 0===t?void 0:t.manageCampStatementButton,(0,n.jsx)(E(),{src:"/images/manage-btn-icon.svg",alt:"svg",className:"icon-topic",height:24,width:24})]}):(0,n.jsxs)(O.Z,{disabled:1==(null===K||void 0===K?void 0:K.is_archive),className:"printHIde flex items-center justify-center text-base py-5 gap-2 w-full mt-5 font-medium mt-4",id:"add-camp-statement-btn",onClick:function(){var e,t,i,n,o,l;return null===Y||void 0===Y?void 0:Y.push({pathname:(null===z||void 0===z?void 0:z.length)<0||(null===(e=null===z||void 0===z?void 0:z.at(0))||void 0===e?void 0:e.grace_period_record_count)>0||Array.isArray(z)&&(null===(t=z[0])||void 0===t?void 0:t.in_review_changes)>0?"/statement/history/".concat((0,P.s6)(null===Y||void 0===Y||null===(i=Y.query)||void 0===i?void 0:i.camp.at(0),"-"),"/").concat((0,P.s6)(null!==(d=null===Y||void 0===Y||null===(n=Y.query)||void 0===n?void 0:n.camp.at(1))&&void 0!==d?d:"1-Agreement","-")):"/create/statement/".concat((0,P.s6)(null===Y||void 0===Y||null===(o=Y.query)||void 0===o?void 0:o.camp.at(0),"-"),"/").concat((0,P.s6)(null!==(s=null===Y||void 0===Y||null===(l=Y.query)||void 0===l?void 0:l.camp.at(1))&&void 0!==s?s:"1-Agreement","-"))})},children:[(null===(i=z[0])||void 0===i?void 0:i.parsed_value)||Array.isArray(z)&&(null===(o=z[0])||void 0===o?void 0:o.in_review_changes)>0||Array.isArray(z)&&(null===(l=z[0])||void 0===l?void 0:l.grace_period_record_count)>0?null===L.Z||void 0===L.Z||null===(r=L.Z.exceptionalMessages)||void 0===r?void 0:r.manageCampStatementButton:null===L.Z||void 0===L.Z||null===(a=L.Z.exceptionalMessages)||void 0===a?void 0:a.addCampStatementButton,(0,n.jsx)(E(),{src:"/images/manage-btn-icon.svg",alt:"svg",className:"icon-topic",height:24,width:24})]})}()})]})})})},J=i(10578),Y=i(66433),V=i(85209),K=i(19044),z=i(828),W=(i(31662),i(87784)),X=i(82114),$=i(1704),ee=i(51018),te=i(41664),ie=i.n(te),ne=i(78208),oe=i.n(ne),le=function(e){return(0,n.jsx)(R.Z,(0,s.Z)((0,d.Z)({className:"".concat(oe().customButton," printHIde")},e),{children:e.children}))},re=i(21803),ae=i(13400),de=i(92227),se={src:"/_next/static/media/support-tree-avatar.e3626dbd.svg",height:36,width:36},ue=i(5152),ce=i.n(ue),ve=i(15746),pe=i(20550),_e=(i(59652),i(89779),i(40436)),me=(_e.Z.placeholders,i(25881)),he=$.Z.TreeNode,fe=(k().addSupportText,ce()((function(){return i.e(4482).then(i.bind(i,94482))}),{loadableGenerated:{webpack:function(){return[94482]}},ssr:!1})),ge=function(e){var t,i,v,p,_,h,x,b,y,j=e.loadingIndicator,Z=e.isRemovingSupport,C=e.getCheckSupportStatus,S=e.removeApiSupport,k=e.removeSupport,N=e.topicList,T=e.removeSupportForDelegate,D=(e.isSupportTreeCardModal,e.setIsSupportTreeCardModal,e.handleSupportTreeCardCancel,e.removeSupportSpinner,e.supp
1ortTreeForCamp),E=(e.totalCampScoreForSupportTree,e.isDelegateSupportTreeCardModal,e.setIsDelegateSupportTreeCardModal,e.backGroundColorClass,e.getCheckStatusAPI),B=e.GetActiveSupportTopicList,I=e.setSupportTreeForCamp,q=e.setTotalCampScoreForSupportTree,P=e.hideRank,Q=e.handleSupporterClick,O=(0,l.v9)((function(e){var t,i,n,o,l,r,a,d,s,u,c,v,p,_,m,h;return{currentGetCheckSupportExistsData:e.topicDetails.currentGetCheckSupportExistsData,is_checked:null===e||void 0===e||null===(t=e.utils)||void 0===t?void 0:t.score_checkbox,topicRecord:null===e||void 0===e||null===(i=e.topicDetails)||void 0===i?void 0:i.currentTopicRecord,campRecord:null===e||void 0===e||null===(n=e.topicDetails)||void 0===n?void 0:n.currentCampRecord,filterData:null===e||void 0===e||null===(o=e.filters)||void 0===o?void 0:o.filterObject,algorithms:null===(l=e.homePage)||void 0===l?void 0:l.algorithms,algorithm:null===(r=e.filters)||void 0===r||null===(a=r.filterObject)||void 0===a?void 0:a.algorithm,asofdate:null===(d=e.filters)||void 0===d||null===(s=d.filterObject)||void 0===s?void 0:s.asofdate,isModalOpenSupportCamps:null===e||void 0===e||null===(u=e.topic)||void 0===u?void 0:u.isModalOpenSupportCamps,selectedAlgorithm:null===e||void 0===e||null===(c=e.filters)||void 0===c||null===(v=c.filterObject)||void 0===v?void 0:v.algorithm,tree:null===e||void 0===e||null===(p=e.topicDetails)||void 0===p?void 0:p.tree,userEmail:null===e||void 0===e||null===(_=e.auth)||void 0===_||null===(m=_.loggedInUser)||void 0===m?void 0:m.email,restrictUser:null===e||void 0===e||null===(h=e.topicDetails)||void 0===h?void 0:h.restrictSupporters}})),H=O.currentGetCheckSupportExistsData,F=O.is_checked,U=O.topicRecord,G=O.campRecord,J=O.algorithms,Y=O.algorithm,V=O.asofdate,te=(O.isModalOpenSupportCamps,O.selectedAlgorithm),ne=(O.tree,O.userEmail),oe=O.restrictUser,ue=(0,l.v9)((function(e){return{manageSupportStatusCheck:e.topicDetails.manageSupportStatusCheck,openDrawerForManageSupport:e.topicDetails.openDrawerForManageSupport,totalScoreforTreeCard:e.topicDetails.totalScoreforTreeCard}})),ce=ue.manageSupportStatusCheck,ve=ue.openDrawerForManageSupport,pe=(ue.totalScoreforTreeCard,(0,K.Z)().isUserAuthenticated),_e=(0,c.useRouter)(),ge=(0,o.useState)(!1),xe=(ge[0],ge[1],(0,o.useState)([])),we=xe[0],be=xe[1],ye=(0,o.useState)(!1),je=ye[0],Ze=ye[1],Ce=(0,o.useState)({}),Se=Ce[0],ke=Ce[1],Ne=(0,o.useState)(),Ae=Ne[0],Te=Ne[1],De=(0,o.useState)(""),Ee=(De[0],De[1]),Be=(0,o.useState)(null),Ie=Be[0],qe=Be[1],Re=(0,o.useState)(0),Le=Re[0],Pe=Re[1],Me=(0,o.useState)(null),Qe=Me[0],Oe=Me[1],He=(0,o.useState)(null),Fe=He[0],Ue=He[1],Ge=(0,o.useState)(!1),Je=Ge[0],Ye=(Ge[1],(0,o.useState)(!1)),Ve=Ye[0],Ke=Ye[1],ze=(0,o.useState)(null),We=ze[0],Xe=ze[1],$e=(0,o.useState)(!0),et=($e[0],$e[1],(0,o.useState)(0)),tt=(et[0],et[1]),it=(0,o.useState)(!1),nt=it[0],ot=it[1],lt=(0,o.useState)(null),rt=(lt[0],lt[1],(0,o.useState)(!1)),at=rt[0],dt=rt[1],st=(0,o.useState)(""),ut=st[0],ct=st[1],vt="directAdd",pt="delegateAdd",_t="directRemove",mt="manageSupport",ht="signPetition",ft=function(){ot(!0)},gt=function(){ot(!1),ct(""),bt((0,r.tb)(!1))},xt=function(){var e=(0,a.Z)((function(){var e,t,i,n,o,l,r,a,d,s,c;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return c={topic_num:+(null===(n=null===(i=null===_e||void 0===_e||null===(e=_e.query)||void 0===e||null===(t=e.camp)||void 0===t?void 0:t.at(0))||void 0===i?void 0:i.split("-"))||void 0===n?void 0:n.at(0)),camp_num:+(null!==(s=null===(a=null===(r=null===_e||void 0===_e||null===(o=_e.query)||void 0===o||null===(l=o.camp)||void 0===l?void 0:l.at(1))||void 0===r?void 0:r.split("-"))||void 0===a?void 0:a.at(0))&&void 0!==s?s:1),asOf:Tt,asofdate:"default"==Tt||"review"==Tt?Date.now()/1e3:V,algorithm:Y,update_all:1,fetch_topic_history:+(null===_e||void 0===_e||null===(d=_e.query)||void 0===d?void 0:d.topic_history),current_user:pe?ne:""},[4,(0,A.zQ)(c)];case 1:return u.sent(),[2]}}))}));return function(){return e.apply(this,arguments)}}(),wt=function(){var e=(0,a.Z)((function(e){var t,i;return(0,u.__generator)(this,(function(n){switch(n.label){case 0:return t=e.isCallApiStatus,1!=(i=void 0!==t&&t)?[3,2]:[4,E()];case 1:n.sent(),n.label=2;case 2:return 1!=i?[3,4]:[4,xt()];case 3:n.sent(),B(),n.label=4;case 4:return setTimeout((function(){return Pe(Le+1)}),500),[2]}}))}));return function(t){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){var e,t=null===J||void 0===J?void 0:J.filter((function(e){var t;return e.algorithm_key===(te||(null===_e||void 0===_e||null===(t=_e.query)||void 0===t?void 0:t.algo))}));(null===t||void 0===t?void 0:t.length)&&Ee(null===(e=null===t||void 0===t?void 0:t.at(0))||void 0===e?void 0:e.algorithm_label)}),[J,null===_e||void 0===_e||null===(t=_e.query)||void 0===t?void 0:t.algo,te]);var bt=(0,l.I0)(),yt=[],jt=function(){var e=(0,a.Z)((function(){var e,t;return(0,u.__generator)(this,(function(i){switch(i.label){case 0:return[4,(0,ae.CV)()];case 1:return null===(t=i.sent())||void 0===t||null===(e=t.data)||void 0===e||e.map((function(e){yt.push(e.id)}
1)),be(yt),[2]}}))}));return function(){return e.apply(this,arguments)}}(),Zt=function(){Ke(!0)};(0,o.useEffect)((function(){pe&&jt(),0==ce&&bt((0,re.Rf)(!1))}),[pe]),(0,o.useEffect)((function(){bt((0,de.DD)({delegatedSupportClick:!1})),bt((0,r.ME)(!1))}),[Le]);var Ct=function(e){pe&&(bt((0,r.ME)(!0)),bt((0,de.DD)({delegatedSupportClick:!0})),qe(null===e||void 0===e?void 0:e.nick_name_id),Xe(null===e||void 0===e?void 0:e.nick_name),ft(),ct(pt))},St=function(){null===_e||void 0===_e||_e.query;pe?(bt((0,r.Gj)(kt)),qe(null),0===(null===C||void 0===C?void 0:C.support_flag)||1==(null===C||void 0===C?void 0:C.is_delegator)?(ct(vt),ft()):(ct(mt),ft())):null===_e||void 0===_e||_e.push("/login")};(0,o.useEffect)((function(){var e,t=null===_e||void 0===_e?void 0:_e.query;if(t&&t.from&&t.from.includes("notify_")&&"support"===(null===t||void 0===t||null===(e=t.n_type)||void 0===e?void 0:e.toLowerCase())){var i=t.from.split("_");+(null===i||void 0===i?void 0:i.at(1))&&St()}}),[_e,ve]),(0,o.useEffect)((function(){ve&&St()}),[_e,ve]);var kt=null===_e||void 0===_e?void 0:_e.asPath.replace("/topic/","/support/"),Nt=(0,l.v9)((function(e){var t,i,n,o;return{campSupportingTree:D,asof:null===e||void 0===e||null===(t=e.filters)||void 0===t||null===(i=t.filterObject)||void 0===i?void 0:i.asof,userNickNames:null===e||void 0===e||null===(n=e.auth)||void 0===n?void 0:n.userNickNames,initialTree:null===e||void 0===e||null===(o=e.topicDetails)||void 0===o?void 0:o.tree}})),At=Nt.campSupportingTree,Tt=Nt.asof,Dt=Nt.userNickNames,Et=Nt.initialTree,Bt=function(e){var t;null===(t=Object.keys(e))||void 0===t||t.some((function(t){var i,n,o,l;if(null===(l=null===(o=null===_e||void 0===_e||null===(i=_e.query)||void 0===i||null===(n=i.camp)||void 0===n?void 0:n.at(1))||void 0===o?void 0:o.split("-"))||void 0===l?void 0:l.at(0)){var r,a,d,s,u,c,v,p;if((null===(r=e[t])||void 0===r?void 0:r.camp_id)==(null===(u=null===(s=null===_e||void 0===_e||null===(a=_e.query)||void 0===a||null===(d=a.camp)||void 0===d?void 0:d.at(1))||void 0===s?void 0:s.split("-"))||void 0===u?void 0:u.at(0)))return I(e[t].support_tree),q(F&&pe?e[t].full_score:e[t].score),!0;(null===(v=Object.keys(null===(c=e[t])||void 0===c?void 0:c.children))||void 0===v?void 0:v.length)>0&&Bt(null===(p=e[t])||void 0===p?void 0:p.children)}}))};(0,o.useEffect)((function(){(null===Et||void 0===Et?void 0:Et[0])&&Bt(null===Et||void 0===Et?void 0:Et[0])}),[Et,I]),(0,o.useEffect)((function(){(null===At||void 0===At?void 0:At.length)>0&&It(At)}),[At]);var It=function(e){e.forEach((function(e){var t;we.includes(null===e||void 0===e?void 0:e.nick_name_id)?Te(null===e||void 0===e?void 0:e.delegate_nick_name_id):(null===e||void 0===e||null===(t=e.delegates)||void 0===t?void 0:t.length)>0&&It(null===e||void 0===e?void 0:e.delegates)}))};(0,o.useEffect)((function(){var e,t,i;if(At){var n=(null===At||void 0===At?void 0:At.length)>0&&(null===At||void 0===At?void 0:At.find((function(e){return!0===e.camp_leader}))),o=null===n||void 0===n?void 0:n.nick_name_id,l=(null===n||void 0===n||null===(e=n.delegates)||void 0===e?void 0:e.length)?null===(i=null===n||void 0===n||null===(t=n.delegates)||void 0===t?void 0:t.at(0))||void 0===i?void 0:i.nick_name_id:null;Oe(o),Ue(l)}}),[At]);var qt=function(){var e=!1,t=!1;return pe&&Dt&&(e=!!Dt.find((function(e){return e.id===Qe})),t=!!Dt.find((function(e){return e.id===Fe}))),{campLeaderExist:e,delegateSupportExist:t}},Rt=function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return null===(t=Object.keys(e))||void 0===t?void 0:t.map((function(t,u){var c,v,p,_,h;(null===we||void 0===we?void 0:we.includes(null===(c=e[t])||void 0===c?void 0:c.nick_name_id))&&(a=!0);var g,x,w,b,y,j,C=o;(o=1==e[t].is_one_level||1==o?1:0,null===(h=null===(_=null===_e||void 0===_e||null===(v=_e.query)||void 0===v||null===(p=v.camp)||void 0===p?void 0:p.at(1))||void 0===_?void 0:_.split("-"))||void 0===h?void 0:h.at(0))?(null===(g=e[t])||void 0===g?void 0:g.camp_id)==(null===(y=null===(b=null===_e||void 0===_e||null===(x=_e.query)||void 0===x||null===(w=x.camp)||void 0===w?void 0:w.at(1))||void 0===b?void 0:b.split("-"))||void 0===y?void 0:y.at(0))&&(I(e[t].support_tree),tt(e[t].support_order),q(F&&pe?e[t].full_score:e[t].score),F&&pe?(0,r.hj)(e[t].full_score):(0,r.hj)(e[t].score)):1==(null===(j=e[t])||void 0===j?void 0:j.camp_
1id)&&(I(e[t].support_tree),tt(e[t].support_order),q(F&&pe?e[t].full_score:e[t].score),F&&pe?(0,r.hj)(e[t].full_score):(0,r.hj)(e[t].score));if((!je&&u<15||je)&&e[t].delegates){var S,k,N,A,T=oe.some((function(i){var n,o,l,r;return(null===i||void 0===i||null===(n=i.nick_name)||void 0===n||null===(o=n.user)||void 0===o?void 0:o.id)&&(null===i||void 0===i||null===(l=i.nick_name)||void 0===l?void 0:l.id)===(null===(r=e[t])||void 0===r?void 0:r.nick_name_id)&&["active","lifted"].includes(null===i||void 0===i?void 0:i.status)})),E=function(e){var t=null===D||void 0===D?void 0:D.some((function(e){return!0===(null===e||void 0===e?void 0:e.camp_leader)&&(null===we||void 0===we?void 0:we.includes(null===e||void 0===e?void 0:e.nick_name_id))})),i=null===we||void 0===we?void 0:we.includes(null===e||void 0===e?void 0:e.nick_name_id),n=!0===(null===e||void 0===e?void 0:e.camp_leader);return t&&!i&&!n};return(0,n.jsx)(he,{id:"topic_detail_user_support_tree_card",className:"[&_.ant-tree-node-content-wrapper]:!w-full [&_.ant-tree-switcher]:!hidden ".concat(T?"!bg-red-200":"!bg-transparent"," border-b hover:[&_.ant-tree-node-content-wrapper]:!bg-transparent !w-full !p-0"),title:(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"group w-full",id:"topic_detail_user_support_tree_card_div",children:[(0,n.jsxs)("div",{className:"flex gap-1 items-center boder-b p-[8px] w-full flex-wrap",id:"topic_detail_user_support_tree_card_div_1",children:[(0,n.jsx)(ie(),{className:"flex flex-wrap",href:{pathname:"/user/supports/".concat(e[t].nick_name_id),query:{canon:null===U||void 0===U?void 0:U.namespace_id}},children:(0,n.jsxs)("a",{className:"flex gap-2 items-center flex-wrap text-canBlack hover:!text-canBlack line-clamp-1",id:"topic_detail_user_support_tree_card_link",children:[(0,n.jsxs)("span",{className:"text-canBlack text-xs font-normal",id:"topic_detail_user_support_tree_card_support_order",children:["#",e[t].support_order," "]}),(0,n.jsx)("div",{className:"w-[24px] h-[24px] rounded-full overflow-hidden bg-canLightBg flex items-center justify-center text-xs",id:"topic_detail_user_support_tree_card_profile_img",children:Ve?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(f.Z,{id:"topic_detail_user_support_tree_card_img",src:se,alt:"svg",height:24,width:24,onError:Zt})}):(0,n.jsx)("span",{id:"topic_detail_user_support_tree_card_nick_name",children:e[t].nick_name.charAt(0).toUpperCase()})}),(null===(S=e[t])||void 0===S?void 0:S.camp_leader)&&(0,n.jsx)("i",{className:"icon-crown text-canOrange",id:"topic_detail_user_support_tree_card_info_icon"}),(0,n.jsx)("span",{className:"text-canBlack text-sm 2xl:text-sm font-normal",id:"topic_detail_user_support_tree_card_nick_name_1",children:e[t].nick_name})]})}),(0,n.jsx)(me.Z,{topic_score:(null===G||void 0===G?void 0:G.is_archive)?0:F&&pe?e[t].full_score:e[t].score})]}),(null===we||void 0===we?void 0:we.length)>0&&!we.includes(e[t].nick_name_id)||!pe?(0,n.jsx)(n.Fragment,{children:l||a&&Ae!=(null===(k=e[t])||void 0===k?void 0:k.delegate_nick_name_id)||Array.isArray(null===(N=e[t])||void 0===N?void 0:N.delegates)&&e[t].delegates.findIndex((function(e){return null===we||void 0===we?void 0:we.includes(null===e||void 0===e?void 0:e.nick_name_id)}))>-1?(0,n.jsx)(m.Z,{id:"topic_detail_user_support_tree_card_popover_info",placement:"right",content:pe?"This will delegate your support to the selected supporter":"Log in to participate",children:(0,n.jsx)("a",{className:"printHIde custom-btn group",id:"topic_detail_user_support_tree_card_delegate_section",children:(0,n.jsxs)("div",{className:"hidden group-hover:flex items-baseline gap-3",children:[(0,n.jsxs)(R.Z,{id:"supportTreeDelegateYourSupport",disabled:!0,className:"hidden group-hover:flex mb-2 items-center gap-1 justify-center bg-canLightBlue text-canBlue text-xs 2xl:text-sm rounded-lg font-medium w-full !shadow-none p-2",children:[(0,n.jsx)(f.Z,{id:"supportTreeDelegateYourSupportimg",src:"/images/user-minus-regular.svg",alt:"svg",height:16,width:16,preview:!1}),"Delegate Your Suppport"]}),E(e[t])&&(0,n.jsx)(W.Z,{onClick:function(){return Q(e[t])},className:"text-red-500 cursor-pointer"})]})})}):(0,n.jsx)(m.Z,{id:"topic_detail_user_support_tree_card_popover_info",placement:"right",content:pe?"This will delegate your support to the selected supporter":"Log in to participate",children:(0,n.jsx)("a",{className:"printHIde custom-btn group",id:"topic_detail_user_support_tree_card_delegate_section",children:(0,n.jsxs)("div",{className:"hidden group-hover:flex items-baseline gap-3",children:[(0,n.jsxs)(R.Z,{id:"supportTreeDelegateYourSupport",disabled:"bydate"===Tt||!pe||1===(null===G||void 0===G?void 0:G.is_archive),onClick:function(){return Ct(e[t])},className:"hidden group-hover:flex mb-2 items-center gap-1 justify-center bg-canLightBlue text-canBlue text-xs 2xl:text-sm rounded-lg font-medium w-full !shadow-none p-2",children:[(0,n.jsx)(f.Z,{id:"supportTreeDelegateYourSupportimg",src:"/images/user-minus-regular.svg",alt:"svg",height:16,width:16,preview:!1}),"Delegate Your Suppport"]}),E(e[t])&&(0,n.jsx)(W.Z,{onClick:function(){return Q(e[t])},className:"text-red-500 cursor-pointer"})]})})})}):(0,n.jsx)("a",{className:"printHIde custom-btn hidden group-hover:flex",id:"topic_detail_user_support_tree_card_remove_section",children:(0,n.jsxs)(R.Z,{id:"supportTreeRemoveSupport",disabled:"bydate"==Tt||Z||!pe||(null===G||void 0===G?void 0:G.is_archive),onClick:function(){return Pt(e,t)},className:"mb-2 flex items-center gap-1 justify-center bg-canLightRed text-canRed text-xs 2xl:text-sm rounded-lg font-medium w-full",children:[(0,n.jsx)(f.Z,{id:"supportTreeRemoveSupportimg",src:"/images/user-minus-red.svg",alt:"svg",height:16,width:16,preview:!1}),"Remove Your Support"]})})]})}),data:(0,s.Z)((0,d.Z)({},e[t]),{parentIsOneLevel:C,isDisabled:i}),children:Rt(e[t].delegates,i,o,we.includes(null===(A=e[t])||void 0===A?void 0:A.nick_name_id),a)},e[t].camp_id)}}))},Lt=(0,z.Z)(ee.Z.useForm(),1)[0],Pt=function(e,t){H.is_delegator?w.Z.confirm({title:"Are you sure you want to remove your support?",icon:(0,n.jsx)(X.Z,{}),width:400,onOk:function(){dt(!0),H.is_delegator?T():N.length<=1?S(null===Se||void 0===Se?void 0:Se.nick_name_id):k(null===Se||void 0===Se?void 0:Se.nick_name_id),ke({}),dt(!1)}}):(ct(_t),ft()),ke(null===e||void 0===e?void 0:e.at(t))},Mt=function(){var e=(0,a.Z)((function(e){var t,i,n,o,l,r,a,d,s;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return dt(!0),H.is_delegator?T(e):N.length<=1?S(null===Se||void 0===Se?void 0:Se.nick_name_id,e):k(null===Se||void 0===Se?void 0:Se.nick_name_id,e),s={as_of:Tt,as_of_date:V,topic_num:+(null===(o=null===(n=null===_e||void 0===_e||null===(t=_e.query)||void 0===t||null===(i=t.camp)||void 0===i?void 0:i.at(0))||void 0===n?void 0:n.split("-"))||void 0===o?void 0:o.at(0)),camp_num:+(null===(d=null===(a=null===_e||void 0===_e||null===(l=_e.query)||void 0===l||null===(r=l.camp)||void 0===r?void 0:r.at(1))||void 0===a?void 0:a.split("-"))||void 0===d?void 0:d.at(0))},[4,(0,A.E0)(s)];case 1:return u.sent(),ke({}),gt(),dt(!1),Lt.resetFields(),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),Qt=function(){var e,t,i;return pe?0==(null===C||void 0===C?void 0:C.support_flag)||1==(null===C||void 0===C?void 0:C.is_delegator)?null===L.Z||void 0===L.Z||null===(t=L.Z.exceptionalMe
1ssages)||void 0===t?void 0:t.addSupport:1==(null===C||void 0===C?void 0:C.support_flag)?null===L.Z||void 0===L.Z||null===(i=L.Z.exceptionalMessages)||void 0===i?void 0:i.manageSupport:void 0:null===(e=L.Z.exceptionalMessages)||void 0===e?void 0:e.directJoinSupport};return j||Je?(0,n.jsx)(M.Z,{id:"topic_detail_loader",skeltonFor:"list",bodyCount:10,stylingClass:"test",isButton:!1}):(0,n.jsxs)("div",{className:"topicDetailsCollapse flex flex-col w-full h-full",id:"topic_detail_user_support_tree_drawer_section",children:[(0,n.jsx)(fe,{onClose:gt,open:nt,drawerFor:ut,setDrawerFor:ct,onRemoveFinish:Mt,selectNickId:Ie,delegateNickName:We,handleCancelSupportCamps:wt,getCheckStatusAPI:E,loader:at,setLoader:dt,isCampLeader:qt,renderSupportBtn:Qt}),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"support-tree-sec overflow-hidden overflow-y-auto",id:"topic_detail_user_support_camp_tree_card_section",children:[(null===At||void 0===At?void 0:At.length)>0?(0,n.jsx)($.Z,{className:"Parent_Leaf",showLine:!1,showIcon:!1,defaultExpandedKeys:[1==+(null===(_=null===(p=null===_e||void 0===_e||null===(i=_e.query)||void 0===i||null===(v=i.camp)||void 0===v?void 0:v.at(1))||void 0===p?void 0:p.split("-"))||void 0===_?void 0:_.at(0))?2:+(null===(y=null===(b=null===_e||void 0===_e||null===(h=_e.query)||void 0===h||null===(x=h.camp)||void 0===x?void 0:x.at(1))||void 0===b?void 0:b.split("-"))||void 0===y?void 0:y.at(0))],defaultExpandAll:!0,children:At&&Rt(At)}):(0,n.jsx)(n.Fragment,{children:P?(0,n.jsx)(g.Z,{type:"warning",showIcon:!0,icon:(0,n.jsx)("i",{className:"icon-warning !text-canRed mt-1"}),description:"To view the support on this topic, you need to add your direct support or delegate support to another user first.",className:"bg-transparent border-0"}):(0,n.jsxs)("p",{id:"topic_detail_user_support_tree_no_data",children:[" ","No direct supporters of this camp"]})}),(null===At||void 0===At?void 0:At.length)>15&&(0,n.jsx)(le,{type:"primary",ghost:!0,className:"load-more-btn",onClick:function(){return Ze(!je)},children:je?"Load Less":"Load More"})]})}),(0,n.jsxs)("div",{className:"topicDetailsCollapseFooter printHIde mt-auto pt-3 w-full flex flex-col gap-2 justify-center",id:"topic_detail_user_support_tree_btn_section",children:[(0,n.jsxs)(le,{onClick:St,className:"w-full justify-center bg-canGreen focus:!bg-canGreen focus:!text-white hover:!bg-canGreen hover:!text-white hover:!border-transparent !border-transparent h-auto py-2 text-white flex items-center rounded-lg font-medium text-sm gap-2",disabled:"bydate"==Tt||1==(null===G||void 0===G?void 0:G.is_archive),id:"manage-support-btn",children:[Qt(),(0,n.jsx)(f.Z,{src:"/images/hand-icon.svg",alt:"svg",height:14,width:14})]}),(0,n.jsx)(m.Z,{content:function(){var e=qt(),t=e.campLeaderExist,i=e.delegateSupportExist;return pe&&i?"Your support has already been delegated to the Camp Leader":pe&&t?"As you are the current Camp Leader, hence you cannot sign the petition.":!pe&&"L
1ogin to Canonizer to sign the camp"}(),children:(0,n.jsxs)(R.Z,{id:"topic_detail_user_support_sign_petition_section",size:"large",className:"flex items-center justify-center border-[#4EB966] hover:!text-canBlack hover:!border-[#4EB966] hover:!bg-[#4EB9661A] bg-[#4EB9661A] rounded-lg font-medium text-sm",style:{borderRadius:"0.5rem"},block:!0,disabled:function(){var e,t;return(null===(e=qt())||void 0===e?void 0:e.campLeaderExist)||(null===(t=qt())||void 0===t?void 0:t.delegateSupportExist)||(null===G||void 0===G?void 0:G.is_archive)}(),onClick:function(){pe?(ot(!0),ct(ht)):null===_e||void 0===_e||_e.push("/login")},children:["Sign Petition Camp",(0,n.jsx)("i",{className:"icon-user-plus ml-2"})]})})]})]})},xe=i(68534),we=i(11382),be=i(94199),ye=i(13013),je=i(26522),Ze=i(95240),Ce=i(63463),Se=i(21014),ke=function(){var e=(0,l.v9)((function(e){return{openDrawer:e.topicDetails.openDrawer}})).openDrawer,t=(0,l.I0)(),i=window.matchMedia("(min-width: 1280px)").matches,a=(0,o.useRef)(null);return(0,n.jsx)(Ce.Z,{id:"refine_filter_drawer",closeIcon:(0,n.jsx)(E(),{src:"/images/refine-back-arrow.svg",width:16,height:16}),placement:i?"right":"bottom",title:"Refine",onClose:function(){t((0,r.dl)(!1))},open:e,height:700,width:490,extra:(0,n.jsx)("span",{onClick:function(){return t((0,r.Pj)(2)),t((0,r._U)("blind_popularity")),t((0,r.BR)(0)),void t((0,r.wv)(!0))},children:"Clear all"}),className:"custom-collapse pt-14 lg:[&_.ant-drawer-header]:pl-8 [&_.ant-drawer-header]:pl-4 [&_.ant-drawer-header-title]:gap-5 [&_.ant-drawer-close]:!hidden lg:[&_.ant-drawer-close]:!flex lg:[&_.ant-drawer-close]:!m-0 [&_.ant-drawer-header-title]:!flex [&_.ant-drawer-header-title]:!items-center lg:[&_.ant-drawer-title]:text-base [&_.ant-drawer-title]:text-sm [&_.ant-drawer-title]:font-medium [&_.ant-drawer-title]:text-canBlack lg:[&_.ant-drawer-header-title]:pb-5 [&_.ant-drawer-title]:pb-0 lg:[&_.ant-drawer-header]:!border-none [&_.ant-drawer-header]:!border-canLightgrey4 [&_.ant-drawer-body]:!w-full [&_.ant-drawer-body]:p-0 [&_.ant-drawer-content]:!rounded-tl-2xl md:[&_.ant-drawer-content]:!rounded-tl-2xl xl:[&_.ant-drawer-content]:!rounded-tl-[0px] xl:[&_.ant-drawer-content]:!rounded-tr-[0px] lg:[&_.ant-drawer-content]:!rounded-tr-[0px] lg:[&_.ant-drawer-content]:!rounded-tl-[0px] [&_.ant-drawer-content]:!rounded-tr-2xl [&_.ant-drawer-body]:overflow-hidden lg:[&_.ant-drawer-extra]:hidden [&_.ant-drawer-extra]:block [&_.ant-drawer-extra]:text-canRed [&_.ant-drawer-extra]:text-sm [&_.ant-drawer-extra]:font-semibold ",children:(0,n.jsx)(Se.Z,{getTreeLoadingIndicator:!1,scrollToCampStatement:function(){var e;null===(e=a.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},setTotalCampScoreForSupportTree:function(){},setSupportTreeForCamp:function(){}})})},Ne=i(26713),Ae=i(63291),Te={src:"/_next/static/media/calendar-icon.6e28d610.svg",height:20,width:20},De=function(){var e,t,i,o,s,v,p,_,m=(0,c.useRouter)(),h=(0,l.I0)(),f=(0,K.Z)().isUserAuthenticated,g=(0,l.v9)((function(e){var t,i,n,o,l,r,a,d,s,u,c,v,p,_,m,h,f,g,x,w,b,y,j,Z,C,S,k,N;return{is_camp_archive_checked:null===e||void 0===e||null===(t=e.utils)||void 0===t?void 0:t.archived_checkbox,loading:null===e||void 0===e||null===(i=e.loading)||void 0===i?void 0:i.loading,is_checked:null===e||void 0===e||null===(n=e.utils)||void 0===n?void 0:n.score_checkbox,filteredAsOfDate:null===e||void 0===e||null===(o=e.filters)||void 0===o||null===(l=o.filterObject)||void 0===l?void 0:l.asofdate,includeReview:null===e||void 0===e||null===(r=e.filters)||void 0===r||null===(a=r.filterObject)||void 0===a?void 0:a.includeReview,filteredScore:null===e||void 0===e||null===(d=e.filters)||void 0===d||null===(s=d.filterObject)||void 0===s?void 0:s.filterByScore,selectedAlgorithm:null===e||void 0===e||null===(u=e.filters)||void 0===u||null===(c=u.filterObject)||void 0===c?void 0:c.algorithm,algorithms:null===(v=e.homePage)||void 0===v?void 0:v.algorithms,current_date_filter:null===e||void 0===e||null===(p=e.filters)||void 0===p?void 0:p.current_date,filterObject:null===e||void 0===e||null===(_=e.filters)||void 0===_?void 0:_.filterObject,viewThisVersion:null===e||void 0===e||null===(m=e.filters)||void 0===m?void 0:m.viewThisVersionCheck,campScoreValue:null===e||void 0===e||null===(h=e.filters)||void 0===h?void 0:h.campWithScoreValue,selectedAsOf:null===e||void 0===e||null===(f=e.filters)||void 0===f||null===(g=f.filterObject)||void 0===g?void 0:g.asof,asof:null===e||void 0===e||null===(x=e.filters)||void 0===x||null===(w=x.filterObject)||void 0===w?void 0:w.asof,algorithm:null===(b=e.filters)||void 0===b||null===(y=b.filterObject)||void 0===y?void 0:y.algorithm,asofdate:null===(j=e.filters)||void 0===j||null===(Z=j.filterObject)||void 0===Z?void 0:Z.asofdate,viewThisVersionCheck:null===e||void 0===e||null===(C=e.filters)||void 0===C?void 0:C.viewThisVersionCheck,selectAlgoBrowsePage:null===e||void 0===e||null===(S=e.filters)||void 0===S?void 0:S.selectAlgoBrowsePage,userEmail:null===e||void 0===e||null===(k=e.auth)||void 0===k||null===(N=k.loggedInUser)||void 0===N?void 0:N.email}})),x=g.algorithms,w=g.selectedAlgorithm,b=g.is_camp_archive_checked,y=g.is_checked,Z=g.filteredAsOfDate,C=g.includeReview,S=g.filteredScore,k=g.filterObject,T=g.viewThisVersion,D=g.campScoreValue,B=g.selectedAsOf,I=g.asof,q=(g.algorithm,g.viewThisVersionCheck),R=g.asofdate,L=(g.selectAlgoBrowsePage,g.userEmail),P=null===x||void 0===x?void 0:x.find((function(e){return e.algorithm_key==w})),M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===k||void 0===k?void 0:k.filterByScore,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===k||void 0===k?void 0:k.algorithm,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null===k||void 0===k?void 0:k.asof,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null===k||void 0===k?void 0:k.asofdate,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null===k||void 0===k?void 0:k.namespace_id,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:T,r={score:e,algo:t,canon:o,asof:i,filter:D||"10"};"bydate"===i&&(r.asofdate=n),l&&(r.viewversion="1"),m&&(m.query=(0,d.Z)({},null===m||void 0===m?void 0:m.query,r)),"bydate"!==i&&(null===m||void 0===m||delete m.query.asofdate),"0"===String(e)&&(null===m||void 0===m||delete m.query.score),"1"===String(o)&&(null===m||void 0===m||delete m.query.canon),o||"0"!==String(o)||delete m.query.canon,"default"===i&&(null===m||void 0===m||delete m.query.asof),(null===r||void 0===r?void 0:r.canon)||null===m||void 0===m||delete m.query.canon,"blind_popularity"===t&&(null===m||void 0===m||delete m.query.algo),"10"===String(D)&&(null===m||void 0===m||delete m.query.filter),"undefined"!==(null===m||void 0===m?void 0:m.query.filter)&&void 0!==(null===m||void 0===m?void 0:m.query.filter)&&"null"!==(null===m||void 0===m?void 0:m.query.filter)&&null!==(null===m||void 0===m?void 0:m.query.filter)||null===m||void 0===m||delete m.query.filter,null===m||void 0===m||m.replace(m,null,{shallow:!0})},Q=function(){var e;null===m||void 0===m||null===(e=m.query)||void 0===e||delete e.viewversion,h((0,N.Lc)(!1)),h((0,N.b7)({asofdate:Date.now()/1e3,asof:"default"})),h((0,r.Pj)(2)),M(null===k||void 0===k?void 0:k.filterByScore,null===k||void 0===k?void 0:k.algorithm,"default",Date.now()/1e3,null===k||void 0===k?void 0:k.namespace_id,T)}
1,O=function(){h((0,N.Lc)(!1)),h((0,N.b7)({filterByScore:0})),M(0,null===k||void 0===k?void 0:k.algorithm,null===k||void 0===k?void 0:k.asof,null===k||void 0===k?void 0:k.asofdate,null===k||void 0===k?void 0:k.namespace_id,T),U()},H=function(){M(null===k||void 0===k?void 0:k.filterByScore,"blind_popularity",null===k||void 0===k?void 0:k.asof,null===k||void 0===k?void 0:k.asofdate,null===k||void 0===k?void 0:k.namespace_id,T),h((0,N.b7)({algorithm:"blind_popularity"}))},F={topic_num:null===(t=null===m||void 0===m||null===(e=m.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0],camp_num:null!==(_=null===(o=null===m||void 0===m||null===(i=m.query)||void 0===i?void 0:i.camp[1])||void 0===o?void 0:o.split("-")[0])&&void 0!==_?_:1,asOf:I,asofdate:"default"==I||"review"==I?Date.now()/1e3:R,algorithm:"blind_popularity",update_all:1,fetch_topic_history:q?1:null,current_user:f?L:""},U=function(){(0,A.zQ)(F)},G=(function(){var e=(0,a.Z)((function(){var e;return(0,u.__generator)(this,(function(t){return h((0,N.Tu)(!1)),h((0,Ae.PS)(!1)),h((0,Ae.pb)(!1)),h((0,N.b7)({filterByScore:0})),h((0,N.b7)({algorithm:"blind_popularity"})),h((0,Ae.PS)(!1)),h((0,Ae.PS)(!1)),Q(),(null===m||void 0===m||null===(e=m.query)||void 0===e?void 0:e.algo)&&w&&H(),[2]}))}))}(),j()(1e3*Z).format("YYYY-MM-DD"));return(0,n.jsx)("div",{className:"flex",id:"refine_filter_section",children:(0,n.jsxs)(Ne.Z,{size:[0,18],wrap:!0,className:"flex !gap-2.5",id:"refine_filter_section_space_tag",children:[(null===m||void 0===m||null===(s=m.query)||void 0===s?void 0:s.algo)&&w&&void 0!==(null===P||void 0===P?void 0:P.algorithm_label)?(0,n.jsxs)(pe.Z,{className:"bg-canLightGrey rounded-full h-8 px-3.5 !m-0 text-xs text-canBlue leading-4 font-medium border-none flex items-center gap-2.5",id:"refine_filter_section_tag",children:[null===P||void 0===P?void 0:P.algorithm_label,(0,n.jsx)("div",{id:"refine_filter_section_algo_label",role:"button",tabIndex:0,onClick:function(){H(),U()},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(H(),U(),e.preventDefault())},style:{cursor:"pointer"},children:(0,n.jsx)(E(),{id:"refine_filter_section_algo_filter_img",className:"cursor-pointer",src:"/images/filter-cross.svg",alt:"",width:10,height:10})})]}):"",b?(0,n.jsxs)(pe.Z,{id:"refine_filter_section_is_camp_archive_checked",className:"bg-canLightGrey rounded-full h-8 px-3.5 text-xs text-canBlue leading-4 font-medium border-none flex items-center gap-3","data-testid":"archived_camps",children:["Show archived camps",(0,n.jsx)("div",{id:"refine_filter_section_is_camp_archive_checked_div",role:"button",tabIndex:0,onClick:function(){h((0,Ae.PS)(!1))},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(h((0,Ae.PS)(!1)),e.preventDefault())},"data-testid":"close_icon_archived_camps",style:{cursor:"pointer"},children:(0,n.jsx)(E(),{id:"refine_filter_section_is_camp_archive_checked_div_img",className:"cursor-pointer",src:"/images/filter-cross.svg",alt:"",width:10,height:10})})]}):"",y?(0,n.jsxs)(pe.Z,{className:"bg-canLightGrey rounded-full h-8 px-3.5 text-xs text-canBlue leading-4 font-medium border-none flex items-center gap-3",id:"refine_filter_section_canonized_score",children:["100% of canonized score",(0,n.jsx)("div",{id:"refine_filter_section_canonized_score_div",role:"button",tabIndex:0,onClick:function(){h((0,Ae.pb)(!1))},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(h((0,Ae.pb)(!1)),e.preventDefault())},"data-testid":"close_icon_100%_of_canonized_score",style:{cursor:"pointer"},children:(0,n.jsx)(E(),{id:"refine_filter_section_canonized_score_img",className:"cursor-pointer",src:"/images/filter-cross.svg",alt:"",width:10,height:10})})]}):"","bydate"==B||"bydate"==(null===m||void 0===m||null===(v=m.query)||void 0===v?void 0:v.asof)?(0,n.jsxs)(pe.Z,{id:"refine_filter_section_filter_date",className:"bg-canLightGrey rounded-full h-8 px-3.5 text-xs text-canBlue leading-4 font-medium border-none flex items-center gap-3","data-testid":"asOfDate",children:[(0,n.jsx)(E(),{src:Te,alt:"svg",height:20,width:20,id:"refine_filter_section_filter_date"}),"".concat(G),(0,n.jsx)("div",{id:"refine_filter_section_filter_date_img_div",role:"button",tabIndex:0,onClick:Q,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(Q(),e.preventDefault())},"data-testid":"close_icon_as_of_date",style:{cursor:"pointer"},children:(0,n.jsx)(E(),{id:"refine_filter_section_filter_date_filter_img",className:"cursor-pointer",src:"/images/filter-cross.svg",alt:"",width:10,height:10})})]}):"",C||"review"==(null===m||void 0===m||null===(p=m.query)||void 0===p?void 0:p.asof)?(0,n.jsxs)(pe.Z,{id:"refine_filter_section_include_review",className:"bg-canLightGrey rounded-full h-8 px-3.5 text-xs text-canBlue leading-4 font-medium border-none flex items-center gap-3","data-testid":"include_review",children:["Include review",(0,n.jsx)("div",{id:"refine_filter_section_include_review_div",role:"button",tabIndex:0,onClick:Q,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(Q(),e.preventDefault())},"data-testid":"close_icon_include_review",style:{cursor:"pointer"},children:(0,n.jsx)(E(),{id:"refine_filter_section_include_review_div_img",className:"cursor-pointer",src:"/images/filter-cross.svg",alt:"",width:10,height:10})})]}):"",0!=S?(0,n.jsxs)(pe.Z,{id:"refine_filter_section_score",className:"bg-canLightGrey rounded-full h-8 px-3.5 text-xs text-canBlue leading-4 font-medium border-none flex items-center gap-3","data-testid":"Score",children:["Score > ".concat(S.toString().length>15?S.toString().slice(0,15)+"...":S),(0,n.jsx)("div",{onClick:O,"data-testid":"close_icon_Score",id:"refine_filter_section_score_div",role:"button",tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(O(),e.preventDefault())},style:{cursor:"pointer"},children:(0,n.jsx)(E(),{id:"refine_filter_section_score_img",className:"cursor-pointer",src:"/images/filter-cross.svg",alt:"",width:10,height:10})})]}):""]})})},Ee=function(){var e,t;(0,l.v9)((function(e){var t,i;
1return{tree:(null===e||void 0===e||null===(t=e.topicDetails)||void 0===t?void 0:t.tree)&&(null===e||void 0===e||null===(i=e.topicDetails)||void 0===i?void 0:i.tree[0])}})).tree;return(0,n.jsx)("div",{className:"flex justify-between mb-4 items-center",children:(0,n.jsx)("div",{className:"flex gap-2.5 items-center",children:(0,n.jsx)(U.Z,{title:null===L.Z||void 0===L.Z||null===(e=L.Z.exceptionalMessages)||void 0===e?void 0:e.campStatementHeading,infoContent:null===L.Z||void 0===L.Z||null===(t=L.Z.exceptionalMessages)||void 0===t?void 0:t.campStatementHeading,className:"!mb-0"})})})},Be=i(36867),Ie=i(36722),qe=i(83031),Re=i(49647),Le=i(15360),Pe=i(30019),Me=i(66516),Qe=function(e){var t=e.fill,i=void 0===t?"#242B37":t,o=e.className,l=void 0===o?"":o;return(0,n.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.67085 0.754349C3.78025 0.644956 3.92862 0.583496 4.08333 0.583496H8.75C9.71653 0.583496 10.5 1.367 10.5 2.3335V5.25016C10.5 5.57233 10.2388 5.8335 9.91667 5.8335C9.59449 5.8335 9.33333 5.57233 9.33333 5.25016V2.3335C9.33333 2.01133 9.07218 1.75016 8.75 1.75016H4.66667V4.66683C4.66667 4.98899 4.40551 5.25016 4.08333 5.25016H1.16667V11.6668C1.16667 11.989 1.42784 12.2502 1.75 12.2502H3.5C3.82216 12.2502 4.08333 12.5113 4.08333 12.8335C4.08333 13.1557 3.82216 13.4168 3.5 13.4168H1.75C0.783504 13.4168 0 12.6334 0 11.6668V4.66683C0 4.51212 0.06146 4.36375 0.170853 4.25435L3.67085 0.754349ZM1.99162 4.0835H3.5V2.57512L1.99162 4.0835ZM9.16248 7.17102L11.4958 9.50435C11.7236 9.73215 11.7236 10.1015 11.4958 10.3293L9.16248 12.6626C8.93468 12.8904 8.56532 12.8904 8.33753 12.6626C8.10973 12.4348 8.10973 12.0655 8.33753 11.8377L10.2584 9.91683L8.33753 7.99597C8.10973 7.76818 8.10973 7.39881 8.33753 7.17102C8.56532 6.94323 8.93468 6.94323 9.16248 7.17102ZM6.82914 7.99597C7.05693 7.76818 7.05693 7.39881 6.82914 7.17102C6.60135 6.94323 6.23198 6.94323 6.00419 7.17102L3.67085 9.50435C3.44305 9.73215 3.44305 10.1015 3.67085 10.3293L6.00419 12.6626C6.23198 12.8904 6.60135 12.8904 6.82914 12.6626C7.05693 12.4348 7.05693 12.0655 6.82914 11.8377L4.90828 9.91683L6.82914 7.99597Z",fill:i})})},Oe=i(71535),He=i.n(Oe),Fe=_e.Z.labels;function Ue(e){var t=e.topic_num,i=e.camp_num,l=(0,o.useState)(!1),r=l[0],a=l[1],d=(0,o.useState)(""),s=d[0],u=d[1],c=function(){a(!1)};(0,o.useEffect)((function(){var e;u(null===window||void 0===window||null===(e=window.location)||void 0===e?void 0:e.origin)}),[]);return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(R.Z,{type:"primary",onClick:function(){a(!0)},id:"generate-script-btn","data-testid":"generate-btn",className:"".concat(He().generate_btn),children:"Get Embed Code"}),(0,n.jsx)(w.Z,{title:"Copy Script",open:r,footer:(0,n.jsx)(o.Fragment,{children:(0,n.jsxs)("div",{className:He().btn_box,children:[(0,n.jsx)(R.Z,{type:"primary",htmlType:"button",size:"large",className:"".concat(He().cancel_btn),onClick:c,id:"cancel-btn",children:"Cancel"}),(0,n.jsx)(R.Z,{type:"primary",htmlType:"submit",size:"large",className:"".concat(He().submit_btn),"data-testid":"btn",id:"crate-camp-btn",onClick:function(){try{var e=document.getElementById("script_for_generate_tree");navigator.clipboard&&navigator.clipboard.writeText(e.innerText).then((function(){_.ZP.success(Fe.copied_success)})).catch((function(){_.ZP.error(Fe.copied_error)}))}catch(t){_.ZP.error(t.message)}},children:"Copy"})]})}),onOk:function(){a(!1)},onCancel:c,className:"".concat(He().script_modal),children:(0,n.jsx)("pre",{children:(0,n.jsx)("code",{id:"script_for_generate_tree",children:'<div id="embedHere">Loading...</div>\n<script src="'.concat(s,'/embed/embed.js" type="text/javascript" charset="utf-8"><\/script>\n<script type="text/javascript" charset="utf-8">\n    LoadTree.init({ selector: "#embedHere", topic_num: ').concat(t,", camp_num: ").concat(i," });\n<\/script>")})})})]})}var Ge=i(2980),Je=function(){var e,t,i,d,s,v,p,_,m,h,f,g,x,w,b,y,j,Z,C,S,N,T,D,E,B,I,q,R=(0,l.v9)((function(e){var t,i,n,o,l,r,a,d,s,u,c,v,p,_,m,h,f,g,x,w,b,y,j,Z,C,S,k,N,A,T;return{topicRecord:null===e||void 0===e||null===(t=e.topicDetail
1s)||void 0===t?void 0:t.currentTopicRecord,campRecord:null===e||void 0===e||null===(i=e.topicDetails)||void 0===i?void 0:i.currentCampRecord,is_admin:null===e||void 0===e||null===(n=e.auth)||void 0===n||null===(o=n.loggedInUser)||void 0===o?void 0:o.is_admin,asofdate:null===(l=e.filters)||void 0===l||null===(r=l.filterObject)||void 0===r?void 0:r.asofdate,algorithm:null===(a=e.filters)||void 0===a||null===(d=a.filterObject)||void 0===d?void 0:d.algorithm,asof:null===e||void 0===e||null===(s=e.filters)||void 0===s||null===(u=s.filterObject)||void 0===u?void 0:u.asof,currentCampNode:null===e||void 0===e||null===(c=e.filters)||void 0===c?void 0:c.selectedCampNode,tree:(null===e||void 0===e||null===(v=e.topicDetails)||void 0===v?void 0:v.tree)&&(null===e||void 0===e||null===(p=e.topicDetails)||void 0===p?void 0:p.tree[0]),campExist:(null===e||void 0===e||null===(_=e.topicDetails)||void 0===_?void 0:_.tree)&&(null===e||void 0===e||null===(m=e.topicDetails)||void 0===m?void 0:m.tree[1]),campStatement:null===e||void 0===e||null===(h=e.topicDetails)||void 0===h?void 0:h.campStatement,selectedAlgorithm:null===e||void 0===e||null===(f=e.filters)||void 0===f||null===(g=f.filterObject)||void 0===g?void 0:g.algorithm,is_camp_archive_checked:null===e||void 0===e||null===(x=e.utils)||void 0===x?void 0:x.archived_checkbox,includeReview:null===e||void 0===e||null===(w=e.filters)||void 0===w||null===(b=w.filterObject)||void 0===b?void 0:b.includeReview,filteredScore:null===e||void 0===e||null===(y=e.filters)||void 0===y||null===(j=y.filterObject)||void 0===j?void 0:j.filterByScore,is_checked:null===e||void 0===e||null===(Z=e.utils)||void 0===Z?void 0:Z.score_checkbox,selectedAsOf:null===e||void 0===e||null===(C=e.filters)||void 0===C||null===(S=C.filterObject)||void 0===S?void 0:S.asof,algorithms:null===(k=e.homePage)||void 0===k?void 0:k.algorithms,currentGetCheckSupportExistsData:e.topicDetails.currentGetCheckSupportExistsData,userEmail:null===e||void 0===e||null===(N=e.auth)||void 0===N||null===(A=N.loggedInUser)||void 0===A?void 0:A.email,restrictUser:null===e||void 0===e||null===(T=e.topicDetails)||void 0===T?void 0:T.restrictSupporters,loggedInUser:e.auth.loggedInUser}})),M=R.topicRecord,Q=R.campRecord,O=R.is_admin,H=R.asofdate,F=R.asof,U=R.algorithm,G=(R.currentCampNode,R.tree,R.campExist,R.campStatement),J=(R.selectedAlgorithm,R.is_camp_archive_checked,R.filteredScore,R.includeReview,R.is_checked,R.selectedAsOf,R.algorithms,R.currentGetCheckSupportExistsData),Y=R.userEmail,V=R.loggedInUser,z=R.restrictUser,W=(0,P.EC)(z,V),X=(0,o.useState)(null===M||void 0===M?void 0:M.topicSubscriptionId),$=X[0],ee=X[1],te=(0,o.useState)(null===Q||void 0===Q?void 0:Q.subscriptionId),ne=te[0],oe=te[1],le=(0,o.useRef)(!1),ae=(0,c.useRouter)(),de=history&&{camp_num:null!==(q=null===(d=null===(i=null===ae||void 0===ae||null===(e=ae.query)||void 0===e||null===(t=e.camp)||void 0===t?void 0:t.at(1))||void 0===i?void 0:i.split("-"))||void 0===d?void 0:d.at(0))&&void 0!==q?q:"1",topic_num:null===(_=null===(p=null===ae||void 0===ae||null===(s=ae.query)||void 0===s||null===(v=s.camp)||void 0===v?void 0:v.at(0))||void 0===p?void 0:p.split("-"))||void 0===_?void 0:_.at(0)},se=(0,K.Z)().isUserAuthenticated,ue=function(){var e=(0,a.Z)((function(e){var t,i,n,o,l,r,a,d,s,c,v;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return d={topic_num:+(null===ae||void 0===ae||null===(t=ae.query)||void 0===t||null===(i=t.camp)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.split("-")[0]),camp_num:+(null!==(a=null===ae||void 0===ae||null===(o=ae.query)||void 0===o||null===(l=o.camp)||void 0===l||null===(r=l[1])||void 0===r?void 0:r.split("-")[0])&&void 0!==a?a:1),asOf:F,asofdate:"default"==F||"review"==F?Date.now()/1e3:H,algorithm:U,update_all:1,current_user:se?Y:""},c={topic_num:null!==(s=Q.topic_num)&&void 0!==s?s:null===de||void 0===de?void 0:de.topic_num,camp_num:e?0:Q.camp_num,checked:e?!$:!ne,subscription_id:e?$:ne},[4,(0,A.BO)(c,e)];case 1:return 200===(null===(v=u.sent())||void 0===v?void 0:v.status_code)&&(0,A.zQ)(d),[2]}}))}));return function(t){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){window.onbeforeprint=function(){return ve()}}),[]);var ce=(0,l.I0)(),ve=function(){var e,t=document.querySelector(".currentCampRecords"),i=null===t||void 0===t?void 0:t.querySelector(".ant-collapse-item"),n=null===t||void 0===t?void 0:t.querySelector(".ant-collapse-header");(null===i||void 0===i||null===(e=i.classList)||void 0===e?void 0:e.contains("ant-collapse-item-active"))||null===n||void 0===n||n.click(),setTimeout((function(){var e;(null===i||void 0===i||null===(e=i.classList)||void 0===e?void 0:e.contains("ant-collapse-item-active"))&&(null===n||void 0===n||n.click())}),5e3)},pe=null===ae||void 0===ae?void 0:ae.asPath.replace("/topic/","/support/"),_e=null===ae||void 0===ae||null===(m=ae.pathname)||void 0===m?void 0:m.split("/")[1];(0,o.useEffect)((function(){_e&&(le.current?(oe(null===Q||void 0===Q?void 0:Q.subscriptionId),ee(null===M||void 0===M?void 0:M.topicSubscriptionId)):le.current=!0)}),[null===Q||void 0===Q?void 0:Q.subscriptionId,null===M||void 0===M?void 0:M.topicSubscriptionId]),(0,o.useEffect)((function(){_e&&ce((0,r.ME)(!1))}),[]);var me,he=(0,o.useMemo)((function(){return(0,P.nH)(z,V)}),[z,V]);return(0,n.jsx)("div",{id:"threedot_dropdown_section",children:(0,n.jsxs)(Me.Z,{className:k().campForumDropdownMenu,id:"threedot_dropdown_event_line_menu",children:[(0,n.jsx)(Me.Z.Item,{id:"threedot_dropdown_event_line_menu_item",icon:(0,n.jsx)("span",{className:k().svgIconCode,children:(0,n.jsx)(qe.Z,{})}),children:_e&&(0,n.jsx)("a",{onClick:function(){null===ae||void 0===ae||ae.push(null===ae||void 0===ae?void 0:ae.asPath.replace("topic","eventline"))},id:"threedot_dropdown_event_line_menu_item_link",children:(0,n.jsx)("span",{id:"threedot_dropdown_event_line_menu_item_text",children:"Event Line"})})}),se&&O&&(0,n.jsx)(Me.Z.Item,{icon:(0,n.jsx)("i",{className:"icon-newspaper",id:"threedot_dropdown_add_news_menu_item"}),children:"/support/[...manageSupport]"==(null===ae||void 0===ae?void 0:ae.pathname)?(0,n.jsx)(ie(),{href:null===ae||void 0===ae?void 0:ae.asPath.replace("support","addnews"),id:"threedot_dropdown_add_news_menu_item_link_1",children:"Add News"}):(0,n.jsx)(ie(),{href:null===ae||void 0===ae?void 0:ae.asPath.replace("topic","addnews"),id:"threedot_dropdown_add_news_menu_item_link_2",children:"Add News"})},"0"),(0,n.jsx)(Me.Z.Item,{id:"threedot_dropdown_unsubscribe_entire_topic_menu_item",icon:(0,n.jsx)("i",{className:"icon-subscribe ".concat(!!$&&"!text-canBlue")}),onClick:function(){se?ue(!0):null===ae||void 0===ae||ae.push({pathname:"/login",query:{returnUrl:null===ae||void 0===ae?void 0:ae.asPath}})},children:$?" Unsubscribe to Entire Topic":" Subscribe to Entire Topic"}),(0,n.jsx)(Me.Z.Item,{id:"threedot_dropdown_unsubscribe_entire_camp_menu_item",icon:(0,n.jsx)("i",{className:"icon-subscribe ".concat(!!ne&&"!text-canBlue")}),disabled:!!(ne&&2==(null===Q||void 0===Q?void 0:Q.flag)||0==(null===Q||void 0===Q?void 0:Q.length)),onClick:function(){se?ue(!1):null===ae||void 0===ae||ae.push({pathname:"/login",query:{returnUrl:null===ae||void 0===ae?void 0:ae.asPath}})},children:ne&&2!==(null===Q||void 0===Q?void 0:Q.flag)?"Unsubscribe to the Camp":ne&&2==(null===Q||void 0===Q?void 0:Q.flag)?(0,n.jsx)(be.Z,{id:"threedot_dropdown_unsubscribe_camp_menu_item_tooltip_1",title:"You are subscribed to ".concat(null===Q||void 0===Q?void 0:Q.subscriptionCampName),children:"Subscribe to the Camp"}):0==(null===Q||void 0===Q?void 0:Q.length)?(0,n.jsx)(be.Z,{id:"threedot_dropdown_unsubscribe_camp_menu_item_tooltip_2",title:"You can't modify history, please go to the current state. ",children:"Subscribe to the Camp"}):"Subscribe to the Camp"}),(0,n.jsx)(Me.Z.Item,{id:"threedot_dropdown_manage_support_btn__menu_item",icon:(0,n.jsx)(Re.Z,{}),disabled:"bydate"==F||(null===Q||void 0===Q?void 0:Q.is_archive),children:_e&&(0,n.jsx)(ie(),{id:"threedot_dropdown_manage_support_btn__menu_item_link",href:se?"#":"/login",onClick:function(e){null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation()},passHref:!0,children:(0,n.jsx)("div",{id:"threedot_dropdown_manage_support_btn__menu_item_text",className:"topicDetail
1sCollapseFooter",onClick:function(e){se&&(null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),ce((0,r.Gj)(pe)),ce((0,r.ME)(!0)),se?se&&"bydate"==F||se&&(null===Q||void 0===Q?void 0:Q.is_archive)?ce((0,re.Rf)(!1)):ce((0,r.tb)(!0)):(ce((0,re.Rf)(!1)),ce((0,Ge.m8)())))},style:{pointerEvents:"bydate"==F||(null===Q||void 0===Q?void 0:Q.is_archive)?"none":"all"},children:se?1==(null===J||void 0===J?void 0:J.is_delegator)||1!=(null===J||void 0===J?void 0:J.support_flag)?null===L.Z||void 0===L.Z||null===(h=L.Z.exceptionalMessages)||void 0===h?void 0:h.addSupport:null===L.Z||void 0===L.Z||null===(f=L.Z.exceptionalMessages)||void 0===f?void 0:f.manageSupport:null===L.Z||void 0===L.Z||null===(g=L.Z.exceptionalMessages)||void 0===g?void 0:g.directJoinSupport})})}),(0,n.jsx)(Me.Z.Item,{icon:(0,n.jsx)("i",{className:"icon-camp",id:"threedot_dropdown_manage_camp_btn__menu_item"}),disabled:(null===Q||void 0===Q?void 0:Q.is_archive)||W,title:W&&"Reason: ".concat(null===he||void 0===he?void 0:he.reason," \nRestricted by: ").concat(null===he||void 0===he?void 0:he.restrictedBy," \nRemaining Time: ").concat(null===he||void 0===he?void 0:he.remainingTime,"\n            "),children:_e&&(0,n.jsx)(ie(),{id:"threedot_dropdown_manage_camp_btn__menu_item_link",href:"/camp/history/".concat((0,P.s6)((null===ae||void 0===ae||null===(x=ae.query)||void 0===x?void 0:x.camp)?null===ae||void 0===ae||null===(w=ae.query)||void 0===w?void 0:w.camp[0]:null===ae||void 0===ae||null===(b=ae.query)||void 0===b||null===(y=b.manageSupport)||void 0===y?void 0:y.at(0),"-"),"/").concat((0,P.s6)((null===ae||void 0===ae||null===(j=ae.query)||void 0===j?void 0:j.camp)?null!==(me=null===ae||void 0===ae||null===(Z=ae.query)||void 0===Z?void 0:Z.camp[1])&&void 0!==me?me:"1-Agreement":null===ae||void 0===ae||null===(C=ae.query)||void 0===C||null===(S=C.manageSupport)||void 0===S?void 0:S.at(1),"-")),children:(0,n.jsx)("a",{id:"threedot_dropdown_manage_camp_btn__menu_item_text",children:null===L.Z||void 0===L.Z||null===(N=L.Z.exceptionalMessages)||void 0===N?void 0:N.manageCampButton})})}),(0,n.jsx)(Me.Z.Item,{icon:(0,n.jsx)("i",{className:"icon-topic"}),id:"threedot_dropdown_manage_topic_btn__menu_item",children:_e&&(0,n.jsx)(ie(),{id:"threedot_dropdown_manage_topic_btn__menu_item_link",href:"/topic/history/".concat((0,P.s6)((null===ae||void 0===ae||null===(T=ae.query)||void 0===T?void 0:T.camp)?null===ae||void 0===ae||null===(D=ae.query)||void 0===D?void 0:D.camp[0]:null===ae||void 0===ae||null===(E=ae.query)||void 0===E||null===(B=E.manageSupport)||void 0===B?void 0:B.at(0),"-")),children:(0,n.jsxs)("a",{id:"threedot_dropdown_manage_topic_btn__menu_item_text",children:[null===L.Z||void 0===L.Z||null===(I=L.Z.exceptionalMessages)||void 0===I?void 0:I.manageTopicButton," "]})})}),(0,n.jsx)(Me.Z.Item,{id:"threedot_dropdown_btn_lable_menu_item",icon:(0,n.jsx)(Le.Z,{}),disabled:(null===Q||void 0===Q?void 0:Q.is_archive)||W,title:W&&"Reason: ".concat(null===he||void 0===he?void 0:he.reason," \nRestricted by: ").concat(null===he||void 0===he?void 0:he.restrictedBy," \nRemaining Time: ").concat(null===he||void 0===he?void 0:he.remainingTime,"\n            "),children:_e&&(0,n.jsx)(ie(),{href:function(){var e,t,i,n=null===ae||void 0===ae||null===(e=ae.query)||void 0===e?void 0:e.camp,o=null===ae||void 0===ae||null===(t=ae.query)||void 0===t?void 0:t.manageSupport,l=n?n[0]:null===o||void 0===o?void 0:o[0],r=n?null!==(i=n[1])&&void 0!==i?i:"1-Agreement":null===o||void 0===o?void 0:o[1];if((null===G||void 0===G?void 0:G.length)>0){var a,d,s,u,c=null===(a=G[0])||void 0===a?void 0:a.draft_record_id,v=null===(d=G[0])||void 0===d?void 0:d.parsed_value;if(c)return"/manage/statement/".concat(c,"?is_draft=1");if(v||(null===(s=null===G||void 0===G?void 0:G.at(0))||void 0===s?void 0:s.grace_period_record_count)>0||(null===(u=null===G||void 0===G?void 0:G.at(0))||void 0===u?void 0:u.in_review_changes)>0)return"/statement/history/".concat((0,P.s6)(l,"-"),"/").concat((0,P.s6)(r,"-"))}return"/create/statement/".concat((0,P.s6)(l,"-"),"/").concat((0,P.s6)(r,"-"))}(),id:"threedot_dropdown_btn_lable_menu_item_link",children:(0,n.jsx)("a",{id:"threedot_dropdown_btn_lable_menu_item_text",children:function(){var e,t;if(!G||0===G.length)return null===L.Z||void 0===L.Z||null===(t=L.Z.exceptionalMe
1ssages)||void 0===t?void 0:t.addCampStatementButton;var i,n=G[0];return(null===n||void 0===n?void 0:n.draft_record_id)?"Edit Draft Statement":(null===n||void 0===n?void 0:n.parsed_value)||(null===n||void 0===n?void 0:n.grace_period_record_count)>0||(null===n||void 0===n?void 0:n.in_review_changes)>0?null===L.Z||void 0===L.Z||null===(i=L.Z.exceptionalMessages)||void 0===i?void 0:i.manageCampStatementButton:null===L.Z||void 0===L.Z||null===(e=L.Z.exceptionalMessages)||void 0===e?void 0:e.addCampStatementButton}()})})}),(0,n.jsx)(Me.Z.Item,{id:"threedot_dropdown_generate_modal_menu_item",icon:(0,n.jsx)("span",{className:k().svgIconCode,id:"threedot_dropdown_generate_modal_menu_item_code_icon",children:(0,n.jsx)(Qe,{})}),children:_e&&(0,n.jsx)(Ue,{topic_num:null===de||void 0===de?void 0:de.topic_num,camp_num:null===de||void 0===de?void 0:de.camp_num})}),(0,n.jsx)(Me.Z.Item,{id:"threedot_dropdown_print_outline_menu_item",icon:(0,n.jsx)("span",{className:k().svgIconCode,children:(0,n.jsx)(Pe.Z,{})}),children:_e&&(0,n.jsx)("a",{onClick:function(e){null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),ve(),setTimeout((function(){window.focus(),window.print()}),100)},id:"threedot_dropdown_print_outline_menu_item_link",children:(0,n.jsx)("span",{id:"threedot_dropdown_print_outline_menu_item_text",children:"Print"})})})]})})},Ye=function(e){var t,i,a,d,s,u=e.isTopicPage,p=void 0!==u&&u,_=(0,l.I0)(),m=(0,c.useRouter)(),h=(0,l.v9)((function(e){var t,i,n,o,l,r,a,d,s,u,c,v,p,_,m;return{campRecord:null===e||void 0===e||null===(t=e.topicDetails)||void 0===t?void 0:t.currentCampRecord,currentCampNode:null===e||void 0===e||null===(i=e.filters)||void 0===i?void 0:i.selectedCampNode,tree:(null===e||void 0===e||null===(n=e.topicDetails)||void 0===n?void 0:n.tree)&&(null===e||void 0===e||null===(o=e.topicDetails)||void 0===o?void 0:o.tree[0]),selectedAlgorithm:null===e||void 0===e||null===(l=e.filters)||void 0===l||null===(r=l.filterObject)||void 0===r?void 0:r.algorithm,is_camp_archive_checked:null===e||void 0===e||null===(a=e.utils)||void 0===a?void 0:a.archived_checkbox,includeReview:null===e||void 0===e||null===(d=e.filters)||void 0===d||null===(s=d.filterObject)||void 0===s?void 0:s.includeReview,filteredScore:null===e||void 0===e||null===(u=e.filters)||void 0===u||null===(c=u.filterObject)||void 0===c?void 0:c.filterByScore,is_checked:null===e||void 0===e||null===(v=e.utils)||void 0===v?void 0:v.score_checkbox,selectedAsOf:null===e||void 0===e||null===(p=e.filters)||void 0===p||null===(_=p.filterObject)||void 0===_?void 0:_.asof,algorithms:null===(m=e.homePage)||void 0===m?void 0:m.algorithms,openConsensusTreePopup:e.hotTopic.openConsensusTreePopup,openDrawerForManageSupport:e.topicDetails.openDrawerForManageSupport}})),f=h.tree,g=h.selectedAlgorithm,x=h.is_camp_archive_checked,w=h.filteredScore,b=h.includeReview,y=h.is_checked,j=h.selectedAsOf,Z=h.algorithms,C=h.openConsensusTreePopup,S=h.campRecord,N=h.openDrawerForManageSupport,A=window.matchMedia("(min-width: 1280px)").matches,T=(0,o.useState)(!1),D=T[0],B=T[1];(0,o.useEffect)((function(){p&&_((0,r.ME)(!1))}),[]);(0,o.useEffect)((function(){window.onbeforeprint=function(){return function(){var e,t=document.querySelector(".currentCampRecords"),i=null===t||void 0===t?void 0:t.querySelector(".ant-collapse-item"),n=null===t||void 0===t?void 0:t.querySelector(".ant-collapse-header");(null===i||void 0===i||null===(e=i.classList)||void 0===e?void 0:e.contains("ant-collapse-item-active"))||n.click(),setTimeout((function(){var e;(null===i||void 0===i||null===(e=i.classList)||void 0===e?void 0:e.contains("ant-collapse-item-active"))&&n.click()}),5e3)}()}}),[]);(0,o.useEffect)((function(){if(!D){var e=m.query.is_tree_open;_((0,Ze.GC)("1"===e)),B(!0)}}),[m.query.is_tree_open]);var I=function(){var e=!C;_((0,Ze.GC)(e))},q=null===Z||void 0===Z?void 0:Z.find((function(e){return e.algorithm_key==g})),M=function(e){var t=e.className,i=void 0===t?"":t;return(0,n.jsxs)(R.Z,{id:"info_bar_topic_detail_page_section_consesnus_tree_btn",onClick:I,className:"text-canBlack border border-".concat(C?"canBlue":"[#CCD4E7]"," py-2.5 lg:px-5 !h-[44px] refine-btn lg:!text-sm !text-sm font-medium flex items-center justify-between gap-2.5 rounded-lg bg-[#F8F8FC] [&_.blueText]:
1hover:fill-canBlue shadow-[0_10px_20px_0_#3150721A] ").concat(i," "),children:[(0,n.jsxs)("span",{className:"!flex items-center justify-start gap-2.5",children:[(0,n.jsx)(je.Z,{className:"text-canBlack"}),(0,n.jsx)("span",{className:"text-canBlack",children:"Consensus Tree"})]}),(0,n.jsx)("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"".concat(C?"!fill-canBlue":"fill-canBlack"," blueText"),children:(0,n.jsx)("path",{d:"M18.125 15.25C18.125 15.5938 17.8438 15.875 17.5 15.875H5V6.5H0V15.25C0 16.6289 1.12109 17.75 2.5 17.75H17.5C18.8789 17.75 20 16.6289 20 15.25V2.75C20 1.37109 18.8789 0.25 17.5 0.25H6.25V5.25H18.125V15.25ZM2.5 0.25C1.12109 0.25 0 1.37109 0 2.75V5.25H5V0.25H2.5ZM16.2031 8.61328C16.3008 8.37891 16.2461 8.10938 16.0664 7.93359L14.8164 6.68359C14.5742 6.44141 14.1758 6.44141 13.9336 6.68359L12.6836 7.93359C12.5039 8.11328 12.4531 8.38281 12.5469 8.61328C12.6406 8.84375 12.8711 9 13.125 9H13.75V10.875C13.75 11.2188 13.4688 11.5 13.125 11.5H11.25V10.875C11.25 10.6211 11.0977 10.3945 10.8633 10.2969C10.6289 10.1992 10.3594 10.2539 10.1836 10.4336L8.93359 11.6836C8.69141 11.9258 8.69141 12.3242 8.93359 12.5664L10.1836 13.8164C10.3633 13.9961 10.6328 14.0469 10.8633 13.9531C11.0938 13.8594 11.25 13.6289 11.25 13.375V12.75H13.125C14.1602 12.75 15 11.9102 15 10.875V9H15.625C15.8789 9 16.1055 8.84766 16.2031 8.61328Z"})})]})};return(0,n.jsx)("div",{id:"info_bar_topic_detail_page_section",className:"".concat(k().topicDetailContentHead," ").concat(k().inforBarHEad," printHIde"),children:(0,n.jsx)(we.Z,{spinning:!1,children:(0,n.jsxs)("div",{id:"info_bar_topic_detail_page_section_right_panel",className:"".concat(k().topicDetailContentHead_Left," ").concat(k().rightPanel),children:[(0,n.jsxs)("div",{className:"btnsWrap w-full",id:"info_bar_topic_detail_page_section_tooltip",children:[(null===f||void 0===f||null===(t=f[1])||void 0===t?void 0:t.is_valid_as_of_time)?(0,n.jsx)(be.Z,{id:"tooltip",title:f&&!(null===(i=f[1])||void 0===i?void 0:i.is_valid_as_of_time)?L.Z.exceptionalMessages.createNewCampTooltipMsg:"",children:!A&&(0,n.jsx)("div",{children:(0,n.jsx)(Ee,{})})}):null,(0,n.jsxs)("div",{className:"flex lg:gap-6 gap-4 items-center lg:flex-nowrap flex-wrap lg:mb-5 mb-7",id:"info_bar_topic_detail_page_section_btn",children:[(0,n.jsxs)(R.Z,{id:"info_bar_topic_detail_page_section_refine_btn",onClick:function(){_((0,r.dl)(!0)),_((0,r.Fl)(!1))},className:"w-36 hover:!text-canBlack gap-5 relative text-canBlack py-2.5 lg:px-5 h-[44px] rounded-lg w-auto lg:text-sm text-sm font-medium flex items-center justify-center !border !border-canGrey2",children:[(0,n.jsx)("span",{id:"info_bar_topic_detail_page_section_refine_text",children:"Refine"}),(0,n.jsx)(Be.Z,{className:"w-[16px]"}),m.query.algo&&g&&void 0!==(null===q||void 0===q?void 0:q.algorithm_label)||x||y||"bydate"==j||b||"review"===(null===m||void 0===m||null===(a=m.query)||void 0===a?void 0:a.asof)||0!=w?(0,n.jsx)("div",{className:"w-3.5 h-3.5 rounded-full bg-canRed absolute -top-1.5 -right-1.5"}):null]}),m.query.algo&&g&&void 0!==(null===q||void 0===q?void 0:q.algorithm_label)||x||y||"bydate"==j||b||"review"===(null===m||void 0===m||null===(d=m.query)||void 0===d?void 0:d.asof)||0!=w?(0,n.jsx)(De,{}):null,(0,n.jsxs)("div",{className:"flex gap-5 items-center ml-auto",children:[(0,n.jsx)(Ie.Z,{campName:null===S||void 0===S?void 0:S.camp_name,campUrl:!(0,P.sk)()&&(null===window||void 0===window||null===(s=window.location)||void 0===s?void 0:s.href)},null===S||void 0===S?void 0:S.id),(0,n.jsx)(ye.Z,{placement:"bottomRight",dropdownRender:function(){return N?"":(0,n.jsx)(Je,{})},trigger:["click"],children:(0,n.jsx)("a",{onClick:function(e){return e.preventDefault()},className:"flex",children:(0,n.jsx)(E(),{src:"/images/options-icon.svg",alt:"menu",height:24,width:24})})})]})]}),(0,n.jsx)(M,{className:"w-[68%]"})]}),(0,n.jsx)("div",{id:"info_bar_topic_detail_page_section_refine_filter_area",className:"".concat(k().topicDetailContentHead_Right," ").concat(k().leftPanel),children:(0,n.jsx)(v.Z.Paragraph,{id:"info_bar_topic_detail_page_section_typography_area",className:"mb-0 campInfoRight "+k().topicTitleStyle,children:p&&(0,n.jsx)(ke,{})})})]})})})},Ve=i(42071),Ke=i(71230),ze=i(27753),We=i(11524);var Xe=function(){var e,t,i,l=(0,c.useRouter)(),r=(0,o.useState)([]),d=r[0],s=r[1],p=function(){var e=(0,a.Z)((function(){var e,t,i,n,o,r;return(0,u.__generator)(this,(function(a){switch(a.label){case 0:return o={topic_num:null===(t=null===l||void 0===l||null===(e=l.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0],c
1amp_num:null===(n=null===l||void 0===l||null===(i=l.query)||void 0===i?void 0:i.camp[1])||void 0===n?void 0:n.split("-")[0]},[4,(0,ze.am)(o)];case 1:return r=a.sent(),s(r),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){p()}),[null===l||void 0===l||null===(e=l.query)||void 0===e?void 0:e.camp]),(0,n.jsxs)(o.Fragment,{children:[(0,n.jsxs)(Ke.Z,{gutter:15,children:[(0,n.jsx)(ve.Z,{md:12,sm:12,xs:12,children:(0,n.jsx)(U.Z,{title:"Camp Forum",infoContent:"",icon:null})}),(null===d||void 0===d?void 0:d.length)?(0,n.jsx)(ve.Z,{md:12,sm:12,xs:12,className:"text-right",children:(0,n.jsx)(We.Z,{href:{pathname:"/forum/".concat(null===l||void 0===l||null===(t=l.query)||void 0===t?void 0:t.camp[0],"/").concat((null===l||void 0===l||null===(i=l.query)||void 0===i?void 0:i.camp[1])||"1","/threads")},title:"See All Threads"})}):null]}),(0,n.jsx)(Ke.Z,{className:"mt-4",gutter:[24,24],children:(0,n.jsx)(ve.Z,{md:24,lg:24,xs:24,sm:24,children:(0,n.jsx)(H.Z,{className:"bg-canGray flex flex-col items-center justify-center [&_.ant-card-body]:w-full [&_.ant-card-body]:p-3 ".concat((null===d||void 0===d?void 0:d.length)?"!py-0":"py-14 [&_.ant-card-body]:text-center "),children:(null===d||void 0===d?void 0:d.length)?null===d||void 0===d?void 0:d.map((function(e){var t;return(0,n.jsx)(ie(),{href:{pathname:(null===l||void 0===l||null===(t=l.asPath)||void 0===t?void 0:t.replace("topic","forum"))+"/threads/"+(null===e||void 0===e?void 0:e.id)},children:(0,n.jsx)("div",{className:"cursor-pointer last:border-none py-3 px-5 group flex justify-between w-full hover:[&_.headingTitle]:font-semibold [&_.arrowIcon]:hover:block lg:border-b lg:mb-0 mb-2.5",children:(0,n.jsxs)("div",{className:"w-full grid grid-rows-2 md:grid-flow-col center",children:[(0,n.jsx)(v.Z.Paragraph,{className:"!mb-0 text-sm text-canBlack text-ellipsis font-normal row-start-1 md:row-start-0 col-span-2 md:col-span-2 headingTitle",children:e.body}),(0,n.jsx)(v.Z.Paragraph,{className:"text-canBlack text-opacity-50 font-medium text-xs 2xl:text-xs !mb-0 flex items-center mt-1 row-start-2 row-span-2 col-span-2 md:col-span-2 md:row-start-0 md:row-span-0",children:(null===e||void 0===e?void 0:e.created_at)?(0,P.fq)(null===e||void 0===e?void 0:e.created_at):""}),(0,n.jsxs)("div",{className:"flex justify-end items-center gap-3 row-start-2 row-span-2 md:row-start-0 md:row-span-2",children:[(0,n.jsx)(f.Z,{src:"/images/comment-icon.svg",alt:"svg",height:15,width:18,preview:!1}),(0,n.jsxs)(v.Z.Text,{className:"text-xs text-canLightBlack flex items-center gap-1 font-medium",children:[e.post_count," ",(0,n.jsx)("span",{children:+e.post_count>1?"Replies":"Reply"})]})]})]})})},null===e||void 0===e?void 0:e.id)})):(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(v.Z.Paragraph,{className:"font-normal text-sm text-canBlack",children:"No threads have been started in the Camp Forum"}),(0,n.jsxs)(F.Z,{className:"h-[44px] flex items-center justify-center px-20 py-2.5 mx-auto",onClick:function(){var e,t;null===l||void 0===l||l.push({pathname:"/forum/".concat(null===l||void 0===l||null===(e=l.query)||void 0===e?void 0:e.camp[0],"/").concat((null===l||void 0===l||null===(t=l.query)||void 0===t?void 0:t.camp[1])||"1","/threads")})},children:["Start A Thread",(0,n.jsx)(f.Z,{src:"/images/plus-Icon.svg",alt:"svg",height:24,width:24})]})]})})})})]})},$e=i(64678),et=i(71926),tt=function(){var e,t=(0,c.useRouter)(),i=(0,l.I0)(),v=(0,l.v9)((function(e){var t;return{campRecord:null===e||void 0===e||null===(t=e.topicDetails)||void 0===t?void 0:t.currentCampRecord}})).campRecord,p=(null===v||void 0===v?void 0:v.parentCamps)&&(null===v||void 0===v?void 0:v.parentCamps[(null===v||void 0===v||null===(e=v.parentCamps)||void 0===e?void 0:e.length)-2]),_=p?null===p||void 0===p?void 0:p.camp_num:1,m=(0,o.useState)([]),h=m[0],f=m[1],g=function(){var e=(0,a.Z)((function(){var e,n,o,l,a,d;return(0,u.__generator)(this,(function(s){switch(s.label){case 0:return a={topic_num:null===(n=null===t||void 0===t||null===(e=t.query)||void 0===e?void 0:e.camp[0])||void 0===n?void 0:n.split("-")[0],camp_num:null===(l=null===t||void 0===t||null===(o=t.query)||void 0===o?void 0:o.camp[1])||void 0===l?void 0:l.split("-")[0],parent_camp_num:_},[4,(0,ze.qC)(a)];case 1:return 200===(null===(d=s.sent())||void 0===d?void 0:d.status_code)&&(f(null===d||void 0===d?void 0:d.data),i((0,r.kM)(null===d||void 0===d?void 0:d.data))),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){g()}),[]),(null===h||void 0===h?void 0:h.length)?(0,n.jsxs)("div",{className:"flex flex-col mt-14",children:[(0,n.jsx)(U.Z,{title:"SIBLING CAMPS",icon:null}),(0,n.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 my-6",children:null===h||void 0===h?void 0:h.map((function(e){var t,i=(null===e||void 0===e||null===(t=e.supporterData)||void 0===t?void 0:t.slice(0,3))||[],o=null===i||void 0===i?void 0:i.map((function(e){var t,i;return(0,s.Z)((0,d.Z)({},e),{first_name:null===e||void 0===e||null===(t=e.user)||void 0===t?void 0:t.first_name,email:null===e||void 0===e||null===(i=e.user)||void 0===i?void 0:i.email})}));return(0,n.jsx)(et.Z,{topic:(0,s.Z)((0,d.Z)({},e),{topic_name:null===e||void 0===e?void 0:e.camp_name}),tag_key:"",avatars:o},null===e||void 0===e?void 0:e.id)}
1))})]}):null},it=i(29815),nt=i(34804),ot=$.Z.TreeNode,lt=function(e){var t=e.scrollToCampStatement,i=e.setTotalCampScoreForSupportTree,r=e.setSupportTreeForCamp,a=e.prevTreeValueRef,u=e.isForumPage,v=void 0!==u&&u,p=(0,l.v9)((function(e){var t,i,n,o,l,r,a,d,s,u,c,v,p,_,m,h,f,g;return{tree:null===e||void 0===e||null===(t=e.topicDetails)||void 0===t?void 0:t.tree,filterByScore:null===(i=e.filters)||void 0===i||null===(n=i.filterObject)||void 0===n?void 0:n.filterByScore,review:null===e||void 0===e||null===(o=e.filters)||void 0===o||null===(l=o.filterObject)||void 0===l?void 0:l.asof,is_checked:null===e||void 0===e||null===(r=e.utils)||void 0===r?void 0:r.score_checkbox,topicRecord:null===e||void 0===e||null===(a=e.topicDetails)||void 0===a?void 0:a.currentTopicRecord,filterObject:null===e||void 0===e||null===(d=e.filters)||void 0===d?void 0:d.filterObject,viewThisVersion:null===e||void 0===e||null===(s=e.filters)||void 0===s?void 0:s.viewThisVersionCheck,is_camp_archive_checked:null===e||void 0===e||null===(u=e.utils)||void 0===u?void 0:u.archived_checkbox,campRecord:null===e||void 0===e||null===(c=e.topicDetails)||void 0===c?void 0:c.currentCampRecord,treeExpandValue:null===e||void 0===e||null===(v=e.filters)||void 0===v?void 0:v.treeExpandValue,asof:null===e||void 0===e||null===(p=e.filters)||void 0===p||null===(_=p.filterObject)||void 0===_?void 0:_.asof,asofdate:null===(m=e.filters)||void 0===m||null===(h=m.filterObject)||void 0===h?void 0:h.asofdate,haveStatementPreview:null===e||void 0===e||null===(f=e.topic)||void 0===f?void 0:f.haveStatementPreview,is_percentage_score_checked:null===e||void 0===e||null===(g=e.utils)||void 0===g?void 0:g.score_percentage_checked}})),_=p.tree,h=p.filterByScore,f=p.review,g=p.is_checked,x=p.topicRecord,w=p.filterObject,b=p.viewThisVersion,y=p.is_camp_archive_checked,Z=p.campRecord,C=p.treeExpandValue,S=p.asof,T=p.asofdate,D=p.haveStatementPreview,B=p.is_percentage_score_checked,I=[],q=(0,o.useState)([]),R=q[0],L=q[1],M=(0,o.useState)([]),Q=M[0],O=M[1],H=(0,o.useState)([]),U=H[0],G=H[1],J=(0,o.useState)(h),Y=J[0],V=J[1],z=(0,o.useState)("review"==f),W=z[0],X=z[1],ee=(0,o.useState)(!1),te=ee[0],ne=ee[1],oe=(0,c.useRouter)(),le=(0,l.I0)(),ae=(0,K.Z)(),de=ae.isUserAuthenticated,se=ae.userID,ue=function(e,t){var i,n;null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),le((0,re.w1)(t));var o={topic_num:+(null===t||void 0===t?void 0:t.topic_id),camp_num:+(null===t||void 0===t?void 0:t.camp_id),as_of:S,as_of_date:"default"==S||"review"==S?Date.now()/1e3:(null===oe||void 0===oe||null===(i=oe.query)||void 0===i?void 0:i.asofdate)?j().utc(1e3*+(null===oe||void 0===oe||null===(n=oe.query)||void 0===n?void 0:n.asofdate)).format("DD-MM-YYYY H:mm:ss"):j().utc(1e3*T).format("DD-MM-YYYY H:mm:ss")};(0,A.fo)(o)},ce=function(e,t,i){null===Object||void 0===Object||Object.keys(e).map((function(i){var n;if(e[i].children){if(!(e[i].score>=Y))return null;var o;if((null===(o=e[i])||void 0===o?void 0:o.camp_id)==t)return void ne(!0);ce(e[i].children,t,"")}(null===(n=e[i])||void 0===n?void 0:n.camp_id)!=t||ne(!0)})),i&&!i.camp_exist&&ne(!0)},ve=function(e,t){return(null===e||void 0===e?void 0:e.children)?(null===Object||void 0===Object||Object.keys(null===e||void 0===e?void 0:e.children).map((function(i){var n,o;if(!(t*C/100<=(null===(n=null===e||void 0===e?void 0:e.children[i])||void 0===n?void 0:n.score)))return I;I.push(null===(o=null===e||void 0===e?void 0:e.children[i])||void 0===o?void 0:o.camp_id),ve(null===e||void 0===e?void 0:e.children[i],t)})),I):I};(0,o.useEffect)((function(){V(h),X("review"==f)}),[h,f]);var pe=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=Object.keys(e),l=0;l<o.length;l++){var r,a,u,c,v,p=o[l],_=i,m=1==e[p].is_one_level||1==i?1:0,h=1==e[p].is_disabled||1==t?1:0,f=1==e[p].is_archive||1==n?1:0;if(e[p].camp_id===+(null!==(v=null===(c=null===(u=null===oe||void 0===oe||null===(r=oe.query)||void 0===r||null===(a=r.camp)||void 0===a?void 0:a.at(1))||void 0===u?void 0:u.split("-"))||void 0===c?void 0:c.at(0))&&void 0!==v?v:1)){le((0,N.so)((0,s.Z)((0,d.Z)({},e[p]),{parentIsOneLevel:_,_isDisabled:h,_isOneLevel:m,_isArchive:f})));break}e[p].children&&pe(e[p].children,h,m,f)}};(0,o.useEffect)((function(){var e,t,i,n,o;null!=(null===_||void 0===_?void 0:_.at(0))&&pe(null===_||void 0===_?void 0:_.at(0));var l,r=JSON.parse(sessionStorage.getItem("value"))||[],d=r&&(null===_||void 0===_?void 0:_.at(0))&&(null===r||void 0===r?void 0:r.find((function(e){var t;return e.topic_id==(null===(t=null===_||void 0===_?void 0:_.at(0)[1])||void 0===t?void 0:t.topic_id)})));if(d&&(null===_||void 0===_?void 0:_.at(0))&&C==(null===a||void 0===a?void 0:a.current)&&(null===d||void 0===d||null===(e=d.sessionexpandsKeys)||void 0===e?void 0:e.includes(String(null!==(l=null===(o=null===(n=null===oe||void 0===oe||null===(t=oe.query)||void 0===t||null===(i=t.camp)||void 0===i?void 0:i.at(1))||void 0===n?void 0:n.split("-"))||void 0===o?void 0:o.at(0))&&void 0!==l?l:1))))L(d.sessionexpandsKeys),O(d.sessionexpandsKeys),ne(!0);else{var s,u,c,v,p,m,h,f,g,x;(null===_||void 0===_?void 0:_.at(0))&&ce(null===_||void 0===_?void 0:_.at(0),+(null!==(x=null===(v=null===(c=null===oe||void 0===oe||null===(s=oe.query)||void 0===s||null===(u=s.camp)||void 0===u?void 0:u.at(1))||void 0===c?void 0:c.split("-"))||void 0===v?void 0:v.at(0))&&void 0!==x?x:1),null===_||void 0===_?void 0:_.at(1));var w,b=(null===_||void 0===_?void 0:_.at(0))&&ve(null===_||void 0===_?void 0:_.at(0)[1],null===(p=null===_||void 0===_?void 0:_.at(0)[1])||void 0===p?void 0:p.score);(null===_||void 0===_?void 0:_.at(0))&&b.push(+(null!==(w=null===(g=null===(f=null===oe||void 0===oe||null===(m=oe.query)||void 0===m||null===(h=m.camp)||void 0===h?void 0:h.at(1))||void 0===f?void 0:f.split("-"))||void 0===g?void 0:g.at(0))&&void 0!==w?w:1));var y,j,Z=["1"].concat((0,it.Z)(U),(0,it.Z)(b||[])),S=Ce(Z);if(C==(null===a||void 0===a?void 0:a.current))S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=new Set((0,it.Z)(e.map(String)).concat((0,it.Z)(t.map(String))));return Array.from(i).sort((function(e,t){return e.localeCompare(t,"en",{numeric:!0})}))}(S,null===(y=null===_||void 0===_?void 0:_.at(0))||void 0===y||null===(j=y[1])||void 0===j?void 0:j.collapsedTreeCampIds);if(L(b),O(S),null===_||void 0===_?void 0:_.at(0)){var k,N,A=null===r||void 0===r?void 0:r.findIndex((function(e){var t;return(null===e||void 0===e?void 0:e.topic_id)===(null===(t=null===_||void 0===_?void 0:_.at(0)[1])||void 0===t?void 0:t.topic_id)}));if(-1!==A)r[A]={topic_id:null===(k=null===_||void 0===_?void 0:_.at(0)[1])||void 0===k?void 0:k.topic_id,sessionexpandsKeys:S};else r.push({topic_id:null===(N=null===_||void 0===_?void 0:_.at(0)[1])||void 0===N?void 0:N.topic_id,sessionexpandsKeys:S}
1);sessionStorage.setItem("value",JSON.stringify(r))}}void 0!==a&&(a.current=C)}),[null===_||void 0===_?void 0:_.at(0),C]);var _e,he,fe=function(e,t){var i;return Object.keys(e).length>0&&(null===(i=Object.keys(e))||void 0===i?void 0:i.includes("".concat(se)))?e[se].explicit?(0,n.jsx)(be.Z,{title:!(null===x||void 0===x?void 0:x.topicSubscriptionId)||(null===t||void 0===t?void 0:t.title)!==(null===x||void 0===x?void 0:x.topic_name)&&(null===t||void 0===t?void 0:t.review_title)!==(null===x||void 0===x?void 0:x.topic_name)?"You have subscribed to this camp.":"You have subscribed to the entire topic.",children:(0,n.jsx)("i",{className:"icon-subscribe small text-xs text-primary ".concat(k().iconSubscribe)})},"camp_subscribed_icon"):(0,n.jsx)(be.Z,{title:"You are subscribed to ".concat(e[se].child_camp_name?e[se].child_camp_name:"child camp."),children:(0,n.jsx)("i",{className:"icon-subscribe small text-xs !text-canBlack !font-[300]  ".concat(k().implicitIcon)})}):null},ge=function(e){return(null===e||void 0===e?void 0:e.children)&&1===Object.keys(e.children).length},xe=function(e,t){return Object.keys(e)[0]===t.toString()},we=function(e,t){var i=Object.keys(e);return i[i.length-1]===t.toString()},ye=function(){var e=new URLSearchParams;return C&&10!=C&&e.append("filter",C.toString()),h&&0!=h&&e.append("score",h.toString()),"blind_popularity"!==(null===w||void 0===w?void 0:w.algorithm)&&e.append("algo",w.algorithm),(null===w||void 0===w?void 0:w.asof)&&"default"!==(null===w||void 0===w?void 0:w.asof)&&e.append("asof",w.asof),"bydate"===(null===w||void 0===w?void 0:w.asof)&&(null===w||void 0===w?void 0:w.asofdate)&&e.append("asofdate",null===w||void 0===w?void 0:w.asofdate.toString()),(null===w||void 0===w?void 0:w.namespace_id)&&1!=(null===w||void 0===w?void 0:w.namespace_id)&&e.append("canon",w.namespace_id.toString()),b&&e.append("viewversion","1"),e.toString()},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=Object.keys(e).map((function(t){return[Number(t),e[t]]})).sort((function(e,t){return t[1].score-e[1].score}));return a.map((function(a){var u,c,p,h,f,x,w,b,j,C,S=a[0],N=o,A=1==e[S].is_one_level||1==o?1:0,T=1==e[S].is_disabled||1==t?1:0,I=1==e[S].is_archive||1==l?1:0;(null===(h=null===(p=null===oe||void 0===oe||null===(u=oe.query)||void 0===u||null===(c=u.camp)||void 0===c?void 0:c.at(1))||void 0===p?void 0:p.split("-"))||void 0===h?void 0:h.at(0))?(null===(f=e[S])||void 0===f?void 0:f.camp_id)==(null===(j=null===(b=null===oe||void 0===oe||null===(x=oe.query)||void 0===x||null===(w=x.camp)||void 0===w?void 0:w.at(1))||void 0===b?void 0:b.split("-"))||void 0===j?void 0:j.at(0))&&(r(e[S].support_tree),i(g&&de?e[S].full_score:e[S].score)):1==(null===(C=e[S])||void 0===C?void 0:C.camp_id)&&(r(e[S].support_tree),i(g&&de?e[S].full_score:e[S].score));var q,R,L,M,O,H,U,G,J,V,K,z,X,$,ee,te,ne,le,re,ae,se,ce,ve,pe,_e,he,be,Ze,Ce,Se,ke,Ne,Ae,Te,De,Ee,Be,Ie,qe,Re,Le,Pe,Me,Qe,Oe,He,Fe,Ue,Ge,Je,Ye,Ve=[xe(e,a[0])?"first-node-class":"",we(e,a[0])?"last-node-class":"",ge(S)?"only-one-child":""].filter(Boolean).join(" ");return e[S].children?e[S].score>=Y&&(0==e[S].is_archive||0!=e[S].is_archive&&1==y)?(0,n.jsxs)(ot,{className:"[&_.ant-tree-switcher]:!flex [&_.ant-tree-switcher]:!items-center [&_.ant-tree-node-content-wrapper]:hover:!bg-transparent [&_.ant-tree-switcher.ant-tree-switcher-noop>span]:!hidden [&_.ant-tree-node-content-wrapper]:py-1 ".concat(Ve," treeHoover"),switcherIcon:function(t){var i,o,l,r,a,d=t.expanded;return e[S].camp_id===+(null!==(a=null===(r=null===(l=null===oe||void 0===oe||null===(i=oe.query)||void 0===i||null===(o=i.camp)||void 0===o?void 0:o.at(1))||void 0===l?void 0:l.split("-"))||void 0===r?void 0:r.at(0))&&void 0!==a?a:1)&&0==T&&0==N&&0==I&&0==(null===Z||void 0===Z?void 0:Z.is_archive)?d?(0,n.jsx)(E(),{className:"rotate-180",src:"/images/tree-green-icon.svg",width:16,height:16}):(0,n.jsx)(E(),{className:"",src:"/images/tree-green-icon.svg",width:16,height:16}):d?(0,n.jsx)(E(),{className:"",src:"/images/tree-black-icon.svg",width:16,height:16}):(0,n.jsx)(E(),{className:"-rotate-90",src:"/images/tree-black-icon.svg",width:16,height:16})},title:(0,n.jsx)("div",{style:{overflowX:"auto",overflowY:"clip"},id:"camp-".concat(e[S].camp_id),children:(0,n.jsxs)("div",{className:"treeListItem !my-0 flex items-center flex-wrap "+k().topicDetail
1sTreeListItem,children:[(0,n.jsxs)("span",{className:"treeListItemTitle "+k().treeListItemTitle+" !text-sm !text-canBlack font-normal hover:!text-canblack  !break-all".concat(Q.includes(e[S].camp_id.toString())?"!font-bold !break-all":""),children:[(0,n.jsx)(ie(),{href:"".concat(W?v?(null===(L=null===(q=e[S])||void 0===q||null===(R=q.review_link)||void 0===R?void 0:R.replace("#statement",""))||void 0===L?void 0:L.replace("/topic/","/forum/"))+"/threads":null===(M=e[S])||void 0===M||null===(O=M.review_link)||void 0===O?void 0:O.replace("#statement",""):v?(null===(G=null===(H=e[S])||void 0===H||null===(U=H.link)||void 0===U?void 0:U.replace("#statement",""))||void 0===G?void 0:G.replace("/topic/","/forum/"))+"/threads":null===(J=e[S])||void 0===J||null===(V=J.link)||void 0===V?void 0:V.replace("#statement",""),"?").concat(ye()),children:(0,n.jsx)("a",{className:"".concat(1==e[S].is_archive?'font-bold !text-canBlack hover:!text-canBlack !break-all"  '.concat(k().archive_grey):v||null!==(Fe=(null===(K=e[S])||void 0===K?void 0:K.camp_id)==(null===(ee=null===($=null===oe||void 0===oe||null===(z=oe.query)||void 0===z||null===(X=z.camp)||void 0===X?void 0:X.at(1))||void 0===$?void 0:$.split("-"))||void 0===ee?void 0:ee.at(0)))&&void 0!==Fe&&!Fe?" hover:!text-canBlack !break-all":'font-weight-bold text-sm hover:!text-canBlack !break-all"  '.concat(k().activeCamp)," ").concat(v&&(null===(te=e[S])||void 0===te?void 0:te.camp_id)==(null!==(Ue=null===(re=null===(le=null===oe||void 0===oe||null===(ne=oe.query)||void 0===ne?void 0:ne.camp)||void 0===le?void 0:le.split("-"))||void 0===re?void 0:re.at(0))&&void 0!==Ue?Ue:"1")?"font-weight-bold forumActive ".concat(k().activeCamp):""," ").concat(e[S].camp_id===+(null!==(Ge=null===(ve=null===(ce=null===oe||void 0===oe||null===(ae=oe.query)||void 0===ae||null===(se=ae.camp)||void 0===se?void 0:se.at(1))||void 0===ce?void 0:ce.split("-"))||void 0===ve?void 0:ve.at(0))&&void 0!==Ge?Ge:1)&&0==I&&0==(null===Z||void 0===Z?void 0:Z.is_archive)?"!text-canGreen font-semibold text-sm":""," ").concat((null===D||void 0===D?void 0:D.camp_id)===e[S].camp_id?"font-bold":""),children:1==e[S].is_archive?(0,n.jsx)(m.Z,{content:"Archived Camp",children:W?null===(pe=e[S])||void 0===pe?void 0:pe.review_title:1===e[S].camp_id?"Agreement":null===(_e=e[S])||void 0===_e?void 0:_e.title}):1===e[S].camp_id?"Agreement":null===(he=e[S])||void 0===he?void 0:he.title})})," "]}),(0,n.jsx)("span",{className:k().subScriptionIcon,children:de&&fe(e[S].subscribed_users,e[S])}),_&&void 0==(null===_||void 0===_||null===(be=_[0])||void 0===be||null===(Ze=be[1])||void 0===Ze?void 0:Ze.rank_hidden)&&(0,n.jsx)(me.Z,{topic_score:g?B?(null===(Ce=e[S])||void 0===Ce?void 0:Ce.full_score)/(null===_||void 0===_||null===(Se=_[0])||void 0===Se?void 0:Se[1].full_score)*100:null===(ke=e[S])||void 0===ke?void 0:ke.full_score:B?(null===(Ne=e[S])||void 0===Ne?void 0:Ne.score)/(null===_||void 0===_||null===(Ae=_[0])||void 0===Ae?void 0:Ae[1].score)*100:null===(Te=e[S])||void 0===Te?void 0:Te.score,hideRank:_&&(null===_||void 0===_||null===(De=_[0])||void 0===De||null===(Ee=De[1])||void 0===Ee?void 0:Ee.rank_hidden),isPercentage:B}),(0,n.jsx)(F.Z,{onClick:function(t){return ue(t,e[S])},className:"!text-canBlue hover:!text-canHoverBlue !text-[12px] !font-semibold !bg-transparent !border-0 !p-0 !shadow-none ml-4 previewBTN opacity-0 invisible ".concat((null===D||void 0===D?void 0:D.camp_id)===e[S].camp_id?"!pointer-events-none !opacity-0 !invisible !cursor-default":""),children:"Preview Statement"})]})}),data:(0,s.Z)((0,d.Z)({},e[S]),{parentIsOneLevel:N,_isDisabled:T,_isOneLevel:A,_isArchive:I}),children:[e[S].camp_id===+(Array.isArray(null===oe||void 0===oe||null===(Be=oe.query)||void 0===Be?void 0:Be.camp)?null!==(Je=null===(Le=null===(Re=null===oe||void 0===oe||null===(Ie=oe.query)||void 0===Ie||null===(qe=Ie.camp)||void 0===qe?void 0:qe.at(1))||void 0===Re?void 0:Re.split("-"))||void 0===Le?void 0:Le.at(0))&&void 0!==Je?Je:1:null!==(Ye=null===(Qe=null===(Me=null===oe||void 0===oe||null===(Pe=oe.query)||void 0===Pe?void 0:Pe.camp)||void 0===Me?void 0:Me.split("-"))||void 0===Qe?void 0:Qe.at(0))&&void 0!==Ye?Ye:1)&&0==T&&0==N&&0==I&&0==(null===Z||void 0===Z?void 0:Z.is_archive)&&(0,n.jsx)(ot,{title:(0,n.jsx)("p",{className:k().startNew,children:(0,n.jsx)(ie(),{href:{pathname:"/camp/create/".concat((0,P.s6)(Array.isArray(null===oe||void 0===oe||null===(Oe=oe.query)||void 0===Oe?void 0:Oe.camp)?null===oe||void 0===oe?void 0:oe.query.camp[0]:null===oe||void 0===oe||null===(He=oe.query)||void 0===He?void 0:He.topic,"-"),"/").concat((null===oe||void 0===oe?void 0:oe.query.camp[1])?(0,P.s6)(null===oe||void 0===oe?void 0:oe.query.camp[1],"-"):1)},children:(0,n.jsxs)("a",{className:"!text-canGreen font-semibold italic text-sm",children:["Start new"," "]})})})},"custom"),je(e[S].children,T,A,I)]},e[S].camp_id):null:(0,n.jsx)(ot,(0,d.Z)({},e[S]),e[S].key)}))},Ze=function(e){var t=Ce(e),i=(null===_||void 0===_?void 0:_.at(0))&&(null===_||void 0===_?void 0:_.at(0)[1].topic_id),n=JSON.parse(sessionStorage.getItem("value")).map((function(e){return e.topic_id==i?{topic_id:i,sessionexpandsKeys:t}:e}));sessionStorage.setItem("value",JSON.stringify(n)),O(t)},Ce=function(e){return e.filter((function(e,t,i){return i.indexOf(e)==t})).map(String)};(null===_||void 0===_?void 0:_.at(0))?_e=te&&""!=(null===(he=null===_||void 0===_?void 0:_.at(0)[1])||void 0===he?void 0:he.title)&&R||v?(0,n.jsx)($.Z,{showLine:!0,switcherIcon:(0,n.jsx)(nt.Z,{}),onSelect:function(e,i){var n,o=Ce((0,it.Z)(e).concat((0,it.Z)(Q)));
1Ze(o),"custom"!==e.join()&&""!==e.join()&&(G(e),le((0,N.so)(null===(n=null===i||void 0===i?void 0:i.selectedNodes[0])||void 0===n?void 0:n.data)),t())},onExpand:Ze,expandedKeys:(0,it.Z)(Q),"data-testid":"camp-tree",children:(null===_||void 0===_?void 0:_.at(0))&&je(null===_||void 0===_?void 0:_.at(0))}):null:_e=(0,n.jsx)("p",{"data-testid":"camp-tree",children:"No Camp Tree Found"});return _e},rt=i(27813),at=i(73918),dt=i(4536),st=i(3381);var ut=function(e){var t,i,o,l,r,a=e.isActivityTab,d=e.router,s=e.userData,u=e.hasShowViewAll;return(0,n.jsxs)(Ke.Z,{gutter:15,children:[(0,n.jsx)(ve.Z,{md:12,sm:12,xs:12,children:(0,n.jsx)(U.Z,{title:"Updates",infoContent:"",icon:null})}),(null===s||void 0===s?void 0:s.is_admin)&&u&&a&&(0,n.jsx)(ve.Z,{md:12,sm:12,xs:12,className:"text-right",children:(0,n.jsx)(We.Z,{title:"View All",href:{pathname:"/activities",query:{topic_num:null===(i=null===d||void 0===d||null===(t=d.query)||void 0===t?void 0:t.camp[0])||void 0===i?void 0:i.split("-")[0],camp_num:null!==(r=null===(l=null===d||void 0===d||null===(o=d.query)||void 0===o?void 0:o.camp[1])||void 0===l?void 0:l.split("-")[0])&&void 0!==r?r:1}}})})]})},ct=i(95507),vt=i(58076),pt=v.Z.Link,_t=v.Z.Text;var mt=function(e){var t=e.getTopicsLoadingIndicator,i=e.recentActivities,l=e.covertToTime,r=e.bodyCount,a=void 0===r?5:r;return t?(0,n.jsx)(M.Z,{skeltonFor:"list",bodyCount:a,stylingClass:"listSkeleton",isButton:!1}):(0,n.jsx)(ct.ZP,{className:"rounded-lg max-h-[300px] overflow-y-auto",bordered:!1,locale:{emptyText:"You don't have any recent activity right now."},dataSource:null===i||void 0===i?void 0:i.topics,renderItem:function(e){var t,i,r,a=JSON.parse(null===e||void 0===e?void 0:e.properties);return(0,n.jsx)(ct.ZP.Item,{className:"font-inter text-sm font-medium bg-white w-full px-2",children:(0,n.jsx)(pt,{href:(null===a||void 0===a||null===(t=a.url)||void 0===t?void 0:t.startsWith("topic"))?"/".concat(a.url.replace(/\s+/g,"-")):null===a||void 0===a||null===(i=a.url)||void 0===i?void 0:i.replace(/\s+/g,"-"),className:"w-full !text-canBlue hover:!text-canHoverBlue",children:(0,n.jsxs)(o.Fragment,{children:[(0,n.jsxs)(_t,{className:"text-canBlack text-sm font-normal mb-0",children:[null===e||void 0===e?void 0:e.description," ","support"===(null===e||void 0===e?void 0:e.log_name)&&(null===(r=(0,P.vw)(e))||void 0===r?void 0:r.reason)&&(0,n.jsx)(be.Z,{title:(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(vt.Z,{CurrentItem:e})}),placement:"top",className:"pointer text-canGrey2",children:(0,n.jsx)("i",{className:"icon-info ml-1"})})]}),(0,n.jsx)(_t,{className:"text-canBlack opacity-[0.5] font-normal font-inter text-[10px] block mt-1",type:"secondary",children:l(e.updated_at)})]})})})}})};var ht=function(e){var t,i,r,d,s,v,p=e.onShowAllSet,_=(0,l.v9)((function(e){return{data:e.recentActivities.campActivityData}})).data,m=(0,c.useRouter)(),h=(0,o.useState)(!1),f=h[0],g=h[1];return(0,o.useEffect)((function(){function e(){return e=(0,a.Z)((function(){var e,t,i,n,o,l,r,a,d;return(0,u.__generator)(this,(function(s){switch(s.label){case 0:return g(!0),a={topic_num:null===(t=null===m||void 0===m||null===(e=m.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0],camp_num:null!==(r=null===(n=null===m||void 0===m||null===(i=m.query)||void 0===i?void 0:i.camp[1])||void 0===n?void 0:n.split("-")[0])&&void 0!==r?r:1},[4,(0,A.BR)(a)];case 1:return d=s.sent(),T.h.dispatch((0,rt.KQ)(null===d||void 0===d||null===(o=d.data)||void 0===o?void 0:o.items)),p(null===d||void 0===d||null===(l=d.data)||void 0===l?void 0:l.is_show_all_btn),g(!1),[2]}}))})),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[null!==(v=null===(i=null===m||void 0===m||null===(t=m.query)||void 0===t?void 0:t.camp[1])||void 0===i?void 0:i.split("-")[0])&&void 0!==v?v:1,null===(d=null===m||void 0===m||null===(r=m.query)||void 0===r?void 0:r.camp[0])||void 0===d?void 0:d.split("-")[0]]),(null===_||void 0===_?void 0:_.length)?(0,n.jsx)(mt,{getTopicsLoadingIndicator:f,recentActivities:{topics:_},covertToTime:function(e){return j()(1e3*e).format("DD MMMM YYYY, hh:mm:ss A")}}):(0,n.jsxs)("div",{className:"flex items-center justify-center gap-3 flex-col pt-14 pb-14",children:[null===L.Z||void 0===L.Z||null===(s=L.Z.exceptionalMe
1ssages)||void 0===s?void 0:s.noRecentActivityFound,(0,n.jsx)(E(),{src:"/images/no-activity.svg",alt:"svg",className:"icon-topic",height:81,width:118})]})},ft=i(96705),gt=i(65424),xt=i(65360),wt=i(51042),bt=i(82061),yt=v.Z.Text,jt=v.Z.Paragraph;var Zt=function(e){var t=e.newsFeedList,i=e.getTopicsLoadingIndicator,o=e.handleDeleteCamp,l=e.handleTextOverflow,r=e.is_admin,a=e.isUserAuthenticated,d=e.router,s=e.bodyCount,u=void 0===s?5:s;return i?(0,n.jsx)(M.Z,{skeltonFor:"list",bodyCount:u,stylingClass:"listSkeleton",isButton:!1}):(0,n.jsx)(ct.ZP,{className:"rounded-lg max-h-[300px] overflow-y-auto [&_.ant-list-footer]:mt-auto",bordered:!1,locale:{emptyText:"You don't have any news right now."},dataSource:t,footer:r&&a?(0,n.jsx)(ie(),{href:{pathname:null===d||void 0===d?void 0:d.asPath.replace("topic","addnews")},children:(0,n.jsxs)("a",{className:"flex items-center justify-center !bg-canBlue hover:!bg-canHoverBlue !text-white hover:shadow-md rounded-lg px-3 py-2 w-[200px] inline-block gap-2 mx-auto text-sm",children:["Add News ",(0,n.jsx)(wt.Z,{})]})}):null,renderItem:function(e){var t,i,s,u;return(0,n.jsxs)(ct.ZP.Item,{className:"font-inter text-sm font-medium bg-white w-full px-2 [&_.editDeleteSection]:hover:flex",children:[(0,n.jsxs)(jt,{children:[(0,n.jsx)("a",{href:/^https?:\/\//i.test(null===e||void 0===e?void 0:e.link)?null===e||void 0===e?void 0:e.link:"http://".concat(null===e||void 0===e?void 0:e.link),target:"__blank",id:"news-a-tag",className:"w-full !text-canBlue hover:!text-canHoverBlue text-sm",children:l(null===e||void 0===e||null===(t=e.display_text)||void 0===t?void 0:t.trim())}),(0,n.jsxs)(yt,{className:"flex gap-1 w-full",children:[(0,n.jsx)("span",{className:"text-[#242B3780]",children:"by"}),(0,n.jsx)("span",{className:"!text-canBlue hover:!text-canHoverBlue text-sm",children:null===e||void 0===e?void 0:e.submitter_nick_name})]})]}),r&&a&&(0,n.jsxs)(jt,{className:"editDeleteSection hidden flex items-center justify-end gap-2",children:[(null===e||void 0===e?void 0:e.manage_flag)?(0,n.jsx)(xt.Z,{placement:"topLeft",title:null===L.Z||void 0===L.Z||null===(i=L.Z.exceptionalMessages)||void 0===i?void 0:i.deleteCampNewsTooltipMessage,onConfirm:function(){return o(null===e||void 0===e?void 0:e.id)},okText:"Yes",cancelText:"No",children:(0,n.jsx)(R.Z,{size:"small",type:"link",className:"text-canBlack hover:!text-canBlue h-[20px] flex items-center justify-center p-0",id:"delete-btn-news",children:(0,n.jsx)(bt.Z,{})})}):(0,n.jsx)(be.Z,{title:(0,n.jsxs)(n.Fragment,{children:["This news is inherited from"," ",(0,n.jsx)(ie(),{href:{pathname:(null===e||void 0===e?void 0:e.parent_camp_url)||""},id:"inherit-btn",children:(0,n.jsx)("a",{className:"font-medium !text-white hover:!text-canHoverBlue flex items-center justify-center",children:null===e||void 0===e?void 0:e.parent_camp_name})})]}),children:(0,n.jsx)(bt.Z,{})}),(0,n.jsx)(ie(),{href:{pathname:"/editnews/".concat((0,P.s6)(null===d||void 0===d||null===(s=d.query)||void 0===s?void 0:s.camp[0],"-"),"/").concat((0,P.s6)(null===d||void 0===d||null===(u=d.query)||void 0===u?void 0:u.camp[1],"-"),"/news-id-").concat(null===e||void 0===e?void 0:e.id)},type:"link",id:"news-edit-btn",children:(0,n.jsx)("a",{className:"!text-canBlack hover:!text-canBlue flex items-center justify-center",children:(0,n.jsx)(B.Z,{})})})]})]},null===e||void 0===e?void 0:e.id)}})},Ct=function(){var e=(0,c.useRouter)(),t=(0,K.Z)().isUserAuthenticated,i=(0,l.v9)((function(e){var t,i,n;return{is_admin:null===e||void 0===e||null===(t=e.auth)||void 0===t||null===(i=t.loggedInUser)||void 0===i?void 0:i.is_admin,newsFeed:null===e||void 0===e||null===(n=e.topicDetails)||void 0===n?void 0:n.newsFeed}})),r=i.is_admin,d=i.newsFeed,s=(0,o.useState)(d||[]),v=s[0],p=s[1];(0,o.useEffect)((function(){p(d||[])}),[d]);var _=function(){var t=(0,a.Z)((function(t){var i,n,o,l,r,a,d,s,c,v,p;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return[4,(0,gt.Dc)({newsfeed_id:t})];case 1:return 200!=(null===(i=u.sent())||void 0===i?void 0:i.status_code)?[3,3]:(p={topic_num:+(null===(r=null===(l=null===e||void 0===e||null===(n=e.query)||void 0===n||null===(o=n.camp)||void 0===o?void 0:o.at(0))||void 0===l?void 0:l.split("-"))||void 0===r?void 0:r.at(0)),camp_num:+(null!==(v=null===(c=null===(s=null===e||void 0===e||null===(a=e.query)||void 0===a||null===(d=a.camp)||void 0===d?void 0:d.at(1))||void 0===s?void 0:s.split("-"))||void 0===c?void 0:c.at(0))&&void 0!==v?v:1)},[4,(0,A.EO)(p)]);case 2:u.sent(),u.label=3;case 3:return[2]}}
1))}));return function(e){return t.apply(this,arguments)}}();return(0,n.jsx)(Zt,{newsFeedList:v,getTopicsLoadingIndicator:!1,handleDeleteCamp:_,handleTextOverflow:function(e){var t=(0,ft.OQ)(null===e||void 0===e?void 0:e.replace(/<img[^>]*>/gi,""),{wordwrap:130});return(null===t||void 0===t?void 0:t.length)>90?(null===t||void 0===t?void 0:t.substring(0,90))+"...":t},is_admin:r,isUserAuthenticated:t,router:e})},St=st.Z.TabPane,kt=function(){var e,t=(0,c.useRouter)(),i=(null===(e=t.query)||void 0===e?void 0:e.tabName)||"camps",r=(0,l.v9)((function(e){return{loggedInUser:e.auth.loggedInUser}})).loggedInUser,a=(0,o.useState)("camps"),s=a[0],u=a[1],v=(0,o.useState)(["left"])[0],p=(0,o.useState)(r),_=p[0],m=p[1],h=(0,o.useState)(!1),f=h[0],g=h[1],x=(0,o.useMemo)((function(){return 0===v.length?null:v.reduce((function(e){return(0,d.Z)({},e)}),{})}),[v]);(0,o.useEffect)((function(){return m(r)}),[r]);return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(ut,{router:t,userData:_,hasShowViewAll:f,isActivityTab:"camps"===s}),(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(H.Z,{className:"border-0 h-100 !bg-white [&_.ant-card-body]:p-0 [&_.ant-tabs-tab-active]:!border [&_.ant-card-body]:lg:p-[24px] lg:!bg-canGray mt-3",children:(0,n.jsx)("div",{className:"bg-white border p-2 rounded-lg min-h-80",children:(0,n.jsxs)(st.Z,{className:"[&_.ant-tabs-nav]:mb-0 [&_.ant-tabs-nav-wrap]:w-full [&_.ant-tabs-nav-wrap]:justify-center [&_.ant-tabs-nav-list]:w-full px-2 [&_.ant-tabs-tab-btn]:!text-canBlue [&_.ant-tabs-tab-btn]:!px-4 [&_.ant-tabs-ink-bar]:!h-[3px]",defaultActiveKey:"".concat(i),tabBarExtraContent:x,onChange:function(e){u(e)},children:[(0,n.jsx)(St,{tab:"Camp Activities",children:(0,n.jsx)(ht,{onShowAllSet:function(e){g(e)}})},"camps"),(0,n.jsx)(St,{tab:"News Feed",children:(0,n.jsx)(Ct,{})},"news")]})})})})]})},Nt=i(45011),At=i(25577),Tt=i(32808),Dt=i(33433),Et=i.n(Dt),Bt=function(e){var t,i=e.loadingIndicator,r=void 0!==i&&i,a=(0,c.useRouter)(),d=(0,l.v9)((function(e){var t,i;return{is_score_percentage_checked:null===e||void 0===e||null===(t=e.utils)||void 0===t?void 0:t.score_percentage_checked,loading:null===e||void 0===e||null===(i=e.loading)||void 0===i?void 0:i.loading}})),s=d.is_score_percentage_checked,u=d.loading,v=(0,o.useState)(s),p=v[0],_=v[1],m=(0,l.I0)();(0,o.useEffect)((function(){return _(s)}),[s]);return(0,n.jsx)("div",{className:Et().percentage_checkbox,children:(0,n.jsx)(Tt.Z,{disabled:(null===a||void 0===a||null===(t=a.asPath)||void 0===t?void 0:t.includes("topic"))?r:u,onChange:function(e){var t;t=e.target.checked,m((0,Ae.fL)(t))},checked:p,className:" text-canBlack !text-sm leading-[24px] font-normal mt-2 [&_.ant-checkbox-inner]:!w-[22px] [&_.ant-checkbox-inner]:!h-[22px] [&_.ant-checkbox-inner]:!border-canBlue [&_.ant-checkbox-inner]:!rounded-md ",children:"Show score in percentage"})})},It=i(12125),qt=v.Z.Link,Rt=p.Z.Panel,Lt=v.Z.Text,Pt=function(e){var t,i,v,y,S,D,E,B,I,q,R,L,P,M,Q,O,H,z,W,X,$,ee,te,ie,ne,oe,le,de,se,ue,ce,ve,pe,_e,he,fe,we,be,ye,je=e.serverSideCall,Ce=(0,o.useRef)(null),Se=(0,o.useRef)(!1),ke=(0,o.useRef)(!1),Ne=(0,c.useRouter)(),Ae=(0,l.I0)(),Te=(0,l.v9)((function(e){var t,i,n,o,l,r,a,d,s,u,c,v,p,_,m,h,f,g,x,w,b,y;return{algorithms:null===(t=e.homePage)||void 0===t?void 0:t.algorithms,asof:null===e||void 0===e||null===(i=e.filters)||void 0===i||null===(n=i.filterObject)||void 0===n?void 0:n.asof,asofdate:null===(o=e.filters)||void 0===o||null===(l=o.filterObject)||void 0===l?void 0:l.asofdate,algorithm:null===(r=e.filters)||void 0===r||null===(a=r.filterObject)||void 0===a?void 0:a.algorithm,excludeBots:null===e||void 0===e||null===(d=e.filters)||void 0===d||null===(s=d.filterObject)||void 0===s?void 0:s.exclude_bots,campRecord:null===e||void 0===e||null===(u=e.topicDetails)||void 0===u?void 0:u.currentCampRecord,tree:(null===e||void 0===e||null===(c=e.topicDetails)||void 0===c?void 0:c.tree)&&(null===e||void 0===e||null===(v=e.topicDetails)||void 0===v?void 0:v.tree[0]),campExist:(null===e||void 0===e||null===(p=e.topicDetails)||void 0===p?void 0:p.tree)&&(null===e||void 0===e||null===(_=e.topicDetail
1s)||void 0===_?void 0:_.tree[1]),viewThisVersionCheck:null===e||void 0===e||null===(m=e.filters)||void 0===m?void 0:m.viewThisVersionCheck,campWithScore:null===e||void 0===e||null===(h=e.filters)||void 0===h?void 0:h.campWithScoreValue,openConsensusTreePopup:e.hotTopic.openConsensusTreePopup,treeExpandValue:null===e||void 0===e||null===(f=e.filters)||void 0===f?void 0:f.treeExpandValue,userEmail:null===e||void 0===e||null===(g=e.auth)||void 0===g||null===(x=g.loggedInUser)||void 0===x?void 0:x.email,haveStatementPreview:null===e||void 0===e||null===(w=e.topic)||void 0===w?void 0:w.haveStatementPreview,campStatement:null===e||void 0===e||null===(b=e.topicDetails)||void 0===b?void 0:b.campStatement,history:null===e||void 0===e||null===(y=e.topicDetails)||void 0===y?void 0:y.history}})),De=Te.algorithms,Be=Te.asof,Ie=Te.asofdate,qe=Te.algorithm,Re=Te.excludeBots,Le=Te.campRecord,Pe=Te.tree,Me=Te.campExist,Qe=Te.viewThisVersionCheck,Oe=Te.campWithScore,He=Te.openConsensusTreePopup,Fe=Te.treeExpandValue,Ue=Te.userEmail,Ge=Te.haveStatementPreview,Je=(Te.campStatement,Te.history),Ke=(0,K.Z)().isUserAuthenticated,ze=(0,o.useState)(!1),We=ze[0],et=ze[1],it=(0,o.useState)({}),nt=it[0],ot=it[1],st=(0,o.useState)([]),ut=st[0],ct=st[1],vt=(0,o.useState)(!1),pt=vt[0],_t=vt[1],mt=(0,o.useState)(!1),ht=mt[0],ft=mt[1],gt=(0,o.useState)(!1),xt=gt[0],wt=gt[1],bt=(0,o.useState)(!1),yt=bt[0],jt=bt[1],Zt=(0,o.useState)(!1),Ct=Zt[0],St=Zt[1],Tt=(0,o.useState)(!1),Dt=Tt[0],Et=Tt[1],Pt=(0,o.useState)("default"),Mt=Pt[0],Qt=Pt[1],Ot=(0,o.useState)(null),Ht=Ot[0],Ft=Ot[1],Ut=(0,o.useState)(null),Gt=Ut[0],Jt=Ut[1],Yt=(0,o.useState)(""),Vt=Yt[0],Kt=Yt[1],zt=(0,o.useState)(!1),Wt=zt[0],Xt=zt[1],$t=(0,o.useRef)(1),ei=(0,o.useState)([]),ti=ei[0],ii=ei[1],ni=(0,o.useState)(!0),oi=ni[0],li=ni[1],ri=(0,n.jsx)("div",{className:"popoverSupport text-xs",children:(0,n.jsx)("span",{children:"Supporters can delegate their support to others. Direct supporters receive email notifications of proposed camp changes, while delegated supporters don\u2019t. People delegating their support to others are shown below and indented from their delegates in an outline form. If a delegate changes camp, everyone delegating their support to them will change camps with them."})});(0,o.useEffect)((function(){Ae((0,N.Yh)(Oe))}),[Oe]);var ai,di,si=window.matchMedia("(min-width: 1280px)").matches,ui=function(){var e=(0,a.Z)((function(){var e,t,i,n,o,l,r;return(0,u.__generator)(this,(function(a){switch(a.label){case 0:return o=null===(n=null===(i=null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e||null===(t=e.camp)||void 0===t?void 0:t.at(0))||void 0===i?void 0:i.split("-"))||void 0===n?void 0:n.at(0),l={topic_num:o},Ke?[4,(0,Y.AR)(o&&l)]:[3,2];case 1:200==(null===(r=a.sent())||void 0===r?void 0:r.status_code)&&ct(null===r||void 0===r?void 0:r.data),a.label=2;case 2:return et(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();function ci(){return vi.apply(this,arguments)}function vi(){return vi=(0,a.Z)((function(){var e,t,i,n,o,l,r,a;return(0,u.__generator)(this,(function(d){switch(d.label){case 0:return r={topic_num:null===(t=null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0],camp_num:null!==(l=null===(n=null===Ne||void 0===Ne||null===(i=Ne.query)||void 0===i?void 0:i.camp[1])||void 0===n?void 0:n.split("-")[0])&&void 0!==l?l:1},[4,(0,A.BR)(r)];case 1:return a=d.sent(),T.h.dispatch((0,rt.KQ)(null===a||void 0===a||null===(o=a.data)||void 0===o?void 0:o.items)),[2]}}))})),vi.apply(this,arguments)}(0,o.useEffect)((function(){function e(){return e=(0,a.Z)((function(){var e,t,i,n,o,l,a,d,s,c,v,p,_,m,h,f,g,x;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return ke||(ke.current=!0),et(!0),!Se.current||je.current?[3,4]:(f={topic_num:null===(t=null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0],camp_num:null!==(h=null===(n=null===Ne||void 0===Ne||null===(i=Ne.query)||void 0===i?void 0:i.camp[1])||void 0===n?void 0:n.split("-")[0])&&void 0!==h?h:1,asOf:Be,asofdate:"default"==Be||"review"==Be?Date.now()/1e3:Ie,algorithm:qe,update_all:1,fetch_topic_history:Qe?
11:null,current_user:Ke?Ue:"",exclude_bots:Re?1:0},x={topic_num:+(null===(d=null===(a=null===Ne||void 0===Ne||null===(o=Ne.query)||void 0===o||null===(l=o.camp)||void 0===l?void 0:l.at(0))||void 0===a?void 0:a.split("-"))||void 0===d?void 0:d.at(0)),camp_num:+(null!==(g=null===(p=null===(v=null===Ne||void 0===Ne||null===(s=Ne.query)||void 0===s||null===(c=s.camp)||void 0===c?void 0:c.at(1))||void 0===v?void 0:v.split("-"))||void 0===p?void 0:p.at(0))&&void 0!==g?g:1),as_of:Be,as_of_date:"default"==Be||"review"==Be?Date.now()/1e3:(null===Ne||void 0===Ne||null===(_=Ne.query)||void 0===_?void 0:_.asofdate)?j().utc(1e3*+(null===Ne||void 0===Ne||null===(m=Ne.query)||void 0===m?void 0:m.asofdate)).format("DD-MM-YYYY H:mm:ss"):j().utc(1e3*Ie).format("DD-MM-YYYY H:mm:ss")},(null===De||void 0===De?void 0:De.length)>0?[3,2]:[4,(0,J.jc)()]);case 1:u.sent(),u.label=2;case 2:return[4,Promise.all([Ae((0,r.Fq)({})),(0,A.EO)(x),(0,A.eC)(x),(0,A.E0)(x),(0,A.fo)(x),(0,A.zQ)(f)])];case 3:return u.sent(),[3,5];case 4:je.current?(je.current=!1,Se.current=!0):Se.current=!0,u.label=5;case 5:return ui(),[2]}}))})),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[Ie,qe,Re,+(null!==(ai=null===(i=null===Ne||void 0===Ne||null===(t=Ne.query)||void 0===t?void 0:t.camp[1])||void 0===i?void 0:i.split("-")[0])&&void 0!==ai?ai:1),null===(y=null===Ne||void 0===Ne||null===(v=Ne.query)||void 0===v?void 0:v.camp[0])||void 0===y?void 0:y.split("-")[0]]),(0,o.useEffect)((function(){var e=(0,s.Z)((0,d.Z)({},Ne.query),{is_tree_open:He?"1":"0"});Ne.replace({pathname:Ne.pathname,query:e},void 0,{shallow:!0})}),[He]),(0,o.useEffect)((function(){var e,t,i=function(){var e=(0,a.Z)((function(){var e,t,i,n,o,l,r,a,d,s,c,v;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return v={topic_num:+(null===(n=null===(i=null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e||null===(t=e.camp)||void 0===t?void 0:t.at(0))||void 0===i?void 0:i.split("-"))||void 0===n?void 0:n.at(0)),camp_num:+(null!==(c=null===(a=null===(r=null===Ne||void 0===Ne||null===(o=Ne.query)||void 0===o||null===(l=o.camp)||void 0===l?void 0:l.at(1))||void 0===r?void 0:r.split("-"))||void 0===a?void 0:a.at(0))&&void 0!==c?c:1),as_of:Be,as_of_date:"default"==Be||"review"==Be?Date.now()/1e3:(null===Ne||void 0===Ne||null===(d=Ne.query)||void 0===d?void 0:d.asofdate)?j().utc(1e3*+(null===Ne||void 0===Ne||null===(s=Ne.query)||void 0===s?void 0:s.asofdate)).format("DD-MM-YYYY H:mm:ss"):j().utc(1e3*Ie).format("DD-MM-YYYY H:mm:ss")},Ae((0,re.w1)(null)),[4,(0,A.fo)(v)];case 1:return u.sent(),[2]}}))}));return function(){return e.apply(this,arguments)}}();(Ge||(null===Ge||void 0===Ge?void 0:Ge.camp_id)!==(null===(t=null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0])&&!He)&&(console.log("haveStatementPreview",Ge),i())}),[Ge,He]),(0,o.useEffect)((function(){var e,t,i,n=null!==(i=null===Je||void 0===Je||null===(e=Je.details)||void 0===e||null===(t=e.liveCamp)||void 0===t?void 0:t.live_record_id)&&void 0!==i?i:null===Je||void 0===Je?void 0:Je.live_record_id,o=function(){var e=(0,a.Z)((function(){return(0,u.__generator)(this,(function(e){switch(e.label){case 0:return[4,(0,A.nK)(n)];case 1:return e.sent(),[2]}}))}));return function(){return e.apply(this,arguments)}}();o()}),[]),(0,o.useEffect)((function(){var e,t,i,n,o;((null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e?void 0:e.asOf)&&"bydate"!==Ne.query.asOf||void 0==Ne.query.asOf)&&(Ae((0,N.Lc)(!1)),Ae((0,N.b7)({asofdate:(null===Ne||void 0===Ne||null===(i=Ne.query)||void 0===i?void 0:i.asofdate)?+(null===Ne||void 0===Ne||null===(n=Ne.query)||void 0===n?void 0:n.asofdate):Date.now()/1e3,asof:(null===Ne||void 0===Ne||null===(o=Ne.query)||void 0===o?void 0:o.asofdate)?"bydate":"default"})));(null===Ne||void 0===Ne||null===(t=Ne.query)||void 0===t?void 0:t.asof)||Ae((0,N.b7)({asofdate:Date.now()/1e3,asof:"default"}))}),[Ne.query.asOf]);var pi={topic_num:+(null===(D=null===Ne||void 0===Ne||null===(S=Ne.query)||void 0===S?void 0:S.camp[0])||void 0===D?void 0:D.split("-")[0]),camp_num:+(null!==(di=null===(B=null===Ne||void 0===Ne||null===(E=Ne.query)||void 0===E?void 0:E.
1camp[1])||void 0===B?void 0:B.split("-")[0])&&void 0!==di?di:1)},_i=function(){var e=(0,a.Z)((function(e){var t,i,n,o,l,r,a,c,v,p,_,m,h,f,g,x,w,b=arguments;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return t=b.length>1&&void 0!==b[1]?b[1]:{},Et(!0),_=(0,d.Z)({topic_num:pi.topic_num,remove_camps:[pi.camp_num],type:"direct",action:"all",nick_name_id:e,order_update:[]},t),h={topic_num:+(null===(n=null===Ne||void 0===Ne||null===(i=Ne.query)||void 0===i?void 0:i.camp[0])||void 0===n?void 0:n.split("-")[0]),camp_num:+(null!==(m=null===(l=null===Ne||void 0===Ne||null===(o=Ne.query)||void 0===o?void 0:o.camp[1])||void 0===l?void 0:l.split("-")[0])&&void 0!==m?m:1),asOf:Be,asofdate:"default"==Be||"review"==Be?Date.now()/1e3:Ie,algorithm:qe,update_all:1,fetch_topic_history:+(null===Ne||void 0===Ne||null===(r=Ne.query)||void 0===r?void 0:r.topic_history),current_user:Ke?Ue:"",exclude_bots:Re?1:0},St(!0),f={as_of:Be,as_of_date:Ie,topic_num:+(null===(c=null===Ne||void 0===Ne||null===(a=Ne.query)||void 0===a?void 0:a.camp[0])||void 0===c?void 0:c.split("-")[0]),camp_num:+(null===(p=null===Ne||void 0===Ne||null===(v=Ne.query)||void 0===v?void 0:v.camp[1])||void 0===p?void 0:p.split("-")[0])},[4,(0,ae.OL)(_)];case 1:return(g=u.sent())&&200==g.status_code?(x="success",w=(0,s.Z)((0,d.Z)({},null===g||void 0===g?void 0:g.message),{isSupport:!0}),(0,at.I)(w,x),_t(!1),fi(),[4,(0,A.zQ)(h)]):[3,4];case 2:return u.sent(),ci(),[4,(0,A.E0)(f)];case 3:u.sent(),St(!1),Et(!1),u.label=4;case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),mi=function(){var e=(0,a.Z)((function(e){var t,i,n,o,l,r,a,s,c,v,p,_,m,h,f,g,x=arguments;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return t=x.length>1&&void 0!==x[1]?x[1]:{},Et(!0),p=(0,d.Z)({topic_num:pi.topic_num,add_camp:{},remove_camps:[pi.camp_num],type:"direct",action:"partial",nick_name_id:e,order_update:[]},t),m={topic_num:+(null===(n=null===Ne||void 0===Ne||null===(i=Ne.query)||void 0===i?void 0:i.camp[0])||void 0===n?void 0:n.split("-")[0]),camp_num:+(null!==(_=null===(l=null===Ne||void 0===Ne||null===(o=Ne.query)||void 0===o?void 0:o.camp[1])||void 0===l?void 0:l.split("-")[0])&&void 0!==_?_:1),asOf:Be,asofdate:"default"==Be||"review"==Be?Date.now()/1e3:Ie,algorithm:qe,update_all:1,fetch_topic_history:+(null===Ne||void 0===Ne||null===(r=Ne.query)||void 0===r?void 0:r.topic_history),current_user:Ke?Ue:"",exclude_bots:Re?1:0},St(!0),h={as_of:Be,as_of_date:Ie,topic_num:+(null===(s=null===Ne||void 0===Ne||null===(a=Ne.query)||void 0===a?void 0:a.camp[0])||void 0===s?void 0:s.split("-")[0]),camp_num:+(null===(v=null===Ne||void 0===Ne||null===(c=Ne.query)||void 0===c?void 0:c.camp[1])||void 0===v?void 0:v.split("-")[0])},[4,(0,ae.H)(p)];case 1:return(f=u.sent())&&200==f.status_code?(g="success",(0,at.I)(null===f||void 0===f?void 0:f.message,g),_t(!1),fi(),[4,(0,A.zQ)(m)]):[3,4];case 2:return u.sent(),ci(),[4,(0,A.E0)(h)];case 3:u.sent(),St(!1),Et(!1),u.label=4;case 4:return St(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),hi=function(){var e=(0,a.Z)((function(){var e,t,i,n,o,l,r,a,s,c,v,p,_,m=arguments;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:return e=m.length>0&&void 0!==m[0]?m[0]:{},Et(!0),s=(0,d.Z)({topic_num:ut[0].topic_num,nick_name_id:null===(t=ut[0])||void 0===t?void 0:t.nick_name_id,delegated_nick_name_id:null===(i=ut[0])||void 0===i?void 0:i.delegate_nick_name_id},e),v={topic_num:+(null===(o=null===Ne||void 0===Ne||null===(n=Ne.query)||void 0===n?void 0:n.camp[0])||void 0===o?void 0:o.split("-")[0]),camp_num:+(null!==(c=null===(r=null===Ne||void 0===Ne||null===(l=Ne.query)||void 0===l?void 0:l.camp[1])||void 0===r?void 0:r.split("-")[0])&&void 0!==c?c:1),asOf:Be,asofdate:"default"==Be||"review"==Be?Date.now()/1e3:Ie,algorithm:qe,update_all:1,fetch_topic_history:+(null===Ne||void 0===Ne||null===(a=Ne.query)||void 0===a?void 0:a.topic_history),current_user:Ke?Ue:"",exclude_bots:Re?1:0},St(!0),[4,(0,ae.I2)(s)];case 1:return(p=u.sent())&&200==p.status_code?(_="success",(0,at.I)(null===p||void 0===p?void 0:p.message,_),St(!1),_t(!1),jt(!1),fi(),ci(),[4,(0,A.zQ)(v)]):[3,3];case 2:u.sent(),Et(!1),St(!1),u.label=3;case 3:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),fi=function(){var e=(0,a.Z)((function(){var e;return(0,u.__generator)(this,(function(t){switch(t.label){case 0:return[4,(0,Y.L2)((0,V.Z)(pi))];case 1:return(e=t.sent())&&200===e.status_code&&(ot(e.data),Ae((0,r.tv)("")),Ae((0,r.ET)("")),Ae((0,r.tv)(e.data.warning?e.data.warning:"")),Ae((0,r.ET)(e.data))),[2]}}))}));return function(){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){Ke&&fi()}),[Ke||Ne||qe,Ne.query.camp.at(1)]),(0,o.useEffect)((function(){Qt(Be)}),[Be]);var gi=function(){var e=(0,a.Z)((function(){return(0,u.__generator)(this,(function(e){return[2]}))}));return function(){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){var e=null===Ne||void 0===Ne?void 0:Ne.query;(null===e||void 0===e?void 0:e.is_tree_open)&&("1"===(null===e||void 0===e?void 0:e.is_tree_open)?Ae((0,N.KY)(!0)):"0"===(null===e||void 0===e?void 0:e.is_tree_open)&&Ae((0,N.KY)(!1)))}),[]);(0,o.useEffect)((function(){ft(!0)}),[]);(0,l.v9)((function(e){var t,i;return{campSupportingTree:Array.isArray(ti)?ti:[],asof:null===e||void 0===e||null===(t=e.filters)||void 0===t||null===(i=t.filterObject)||void 0===i?void 0:i.asof}})).campSupportingTree;(0,o.useEffect)((function(){var e,t,i=function(){var e=(0,a.Z)((function(){var e;return(0,u.__generator)(this,(function(t){switch(t.label){case 0:return e={topic_num:null===Ne||void 0===Ne?void 0:Ne.query.camp[0].split("-")[0],camp_num:(null===Le||void 0===Le?void 0:Le.topic_num)||1,type:null,per_page:4,page:$t.current},[4,(0,It.yE)(e,$t.current,"topic")];case 1:return t.sent(),[2]}}))}));return function(){return e.apply(this,arguments)}}();(Ge||(null===Ge||void 0===Ge?void 0:Ge.camp_id)!==(null===(t=null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0])&&!He)&&i()}),[Ge,He]);function xi(){return xi=(0,a.Z)((function(){var e,t,i,n,o,l,r;return(0,u.__generator)(this,(function(a){switch(a.label){case 0:if(ke.current||(ke.current=!0),et(!0),!Se.current||je.current)return[3,6];a.label=1;case 1:return a.trys.push([1,3,4,5]),l={topic_num:null===(t=null===Ne||void 0===Ne||null===(e=Ne.query)||void 0===e?void 0:e.camp[0])||void 0===t?void 0:t.split("-")[0],camp_num:null!==(o=null===(n=null===Ne||void 0===Ne||null===(i=Ne.query)||void 0===i?void 0:i.camp[1])||void 0===n?void 0:n.split("-")[0])&&void 0!==o?o:1,asOf:Be,asofdate:"default"===Be||"review"===Be?Date.now()/1e3:Ie,algorithm:qe,update_all:1,fetch_topic_history:Qe?
11:null,current_user:Ke?Ue:"",exclude_bots:Re?1:0},[4,(0,A.zQ)(l)];case 2:return[2,a.sent()];case 3:return r=a.sent(),console.error("Error fetching tree data:",r),[3,5];case 4:return et(!1),[7];case 5:return[3,7];case 6:et(!1),a.label=7;case 7:return[2]}}))})),xi.apply(this,arguments)}var wi,bi,yi,ji=function(){wt(!1),Jt(null),Kt("")},Zi=function(){var e=(0,a.Z)((function(){var e,t,i,n,o,l;return(0,u.__generator)(this,(function(r){switch(r.label){case 0:e={restricted_user_nick_name_id:null===Gt||void 0===Gt?void 0:Gt.nick_name_id,reason:Vt},r.label=1;case 1:return r.trys.push([1,3,4,5]),Xt(!0),o=null!==(n=null===Je||void 0===Je||null===(t=Je.details)||void 0===t||null===(i=t.liveCamp)||void 0===i?void 0:i.live_record_id)&&void 0!==n?n:null===Je||void 0===Je?void 0:Je.live_record_id,[4,(0,A.MC)(o,e)];case 2:return"User restricted successfully"===(null===(l=r.sent())||void 0===l?void 0:l.message)?(_.ZP.success(null===l||void 0===l?void 0:l.message),ji(),function(){xi.apply(this,arguments)}()):_.ZP.error((null===l||void 0===l?void 0:l.message)||"Failed to restrict user"),[3,5];case 3:return r.sent(),_.ZP.error("An error occurred. Please try again."),[3,5];case 4:return Xt(!1),[7];case 5:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(xe.Z,{className:"topicDetailsPageLayout",rightSidebar:(0,n.jsxs)(o.Fragment,{children:[He?(0,n.jsx)("div",{className:"w-full sticky top-8 z-50",children:(0,n.jsx)(G,{loadingIndicator:We})}):null,(null===Pe||void 0===Pe||null===(I=Pe[1])||void 0===I?void 0:I.is_valid_as_of_time)&&(0,n.jsxs)("div",{className:"w-full ".concat(He?"hidden":""),children:[(0,n.jsxs)("div",{className:"support-tree-parent-box w-full mt-14 lg:mt-0",id:"topic_detail_section",children:[(null===Pe||void 0===Pe||null===(q=Pe[1])||void 0===q?void 0:q.is_valid_as_of_time)&&(0,n.jsxs)("div",{className:"flex gap-1 items-center mb-4",id:"topic_detail_section_heading",children:[(0,n.jsx)(U.Z,{title:"Support Tree",infoContent:"",icon:null,className:"!mb-0 [&_span]:mr-1"}),(0,n.jsx)(m.Z,{id:"topic_detail_section_heading_pop_over",content:ri,className:"title-popover",placement:"top",children:(0,n.jsx)(Z.Z,{id:"topic_detail_section_heading_info"})}),(0,n.jsx)(me.Z,{topic_score:(null===Le||void 0===Le?void 0:Le.is_archive)?0:Ht,hideRank:Pe&&(null===Pe||void 0===Pe||null===(R=Pe[1])||void 0===R?void 0:R.rank_hidden)})]}),(null===Pe||void 0===Pe||null===(L=Pe[1])||void 0===L?void 0:L.is_valid_as_of_time)&&(0,n.jsxs)("div",{className:Pe&&1==(null===Pe||void 0===Pe||null===(P=Pe[1])||void 0===P?void 0:P.rank_hidden)?"bg-canGray py-7 px-2.5 lg:px-6 rounded-lg":"bg-canGray py-7 px-2.5 lg:px-6 rounded-lg h-[400px] xl:h-[600px]",id:"topic_detail_section_heading_support_tree",children:[(0,n.jsx)("div",{className:Pe&&1==(null===Pe||void 0===Pe||null===(M=Pe[1])||void 0===M?void 0:M.rank_hidden)?null:"border border-canGrey2 bg-white rounded-lg lg:p-2 p-2.5 h-full",id:"topic_detail_section_heading_support_tree_1",children:(0,n.jsx)(ge,{loadingIndicator:We,isRemovingSupport:Dt,handleLoadMoreSupporters:gi,getCheckSupportStatus:nt,removeApiSupport:_i,totalSupportScore:0,totalFullSupportScore:0,removeSupport:mi,topicList:ut,removeSupportForDelegate:hi,isSupportTreeCardModal:pt,setIsSupportTreeCardModal:_t,isDelegateSupportTreeCardModal:yt,setIsDelegateSupportTreeCardModal:jt,handleSupportTreeCardCancel:function(){_t(!1),jt(!1)},removeSupportSpinner:Ct,supportTreeForCamp:ti,totalCampScoreForSupportTree:Ht,backGroundColorClass:Mt,getCheckStatusAPI:fi,GetActiveSupportTopic:Y.AR,GetActiveSupportTopicList:ui,setSupportTreeForCamp:ii,setTotalCampScoreForSupportTree:Ft,handleSupporterClick:function(e){Jt(e),wt(!0),Kt("")},hideRank:Pe&&(null===Pe||void 0===Pe||null===(Q=Pe[1])||void 0===Q?void 0:Q.rank_hidden)})}),(0,n.jsx)(At.Z,{})]})]}),(null===Pe||void 0===Pe||null===(O=Pe[1])||void 0===O?void 0:O.is_valid_as_of_time)&&(0,n.jsx)("div",{className:"my-14",id:"topic_detail_section_activity_card",children:(0,n.jsx)(kt,{})})]})]}),afterHeader:(0,n.jsxs)(o.Fragment,{children:[Pe&&(null===Pe||void 0===Pe||null===(H=Pe[1])||void 0===H?void 0:H.is_valid_as_of_time)||"default"===Be?(0,n.jsx)(dt.Z,{isTopicPage:!0,payload:{topic_num:+(null===(W=null===Ne||void 0===Ne||null===(z=Ne.query)||void 0===z?void 0:z.camp[0])||void 0===W?void 0:W.split("-")[0]),camp_num:+(null!==(wi=null===($=null===Ne||void 0===Ne||null===(X=Ne.query)||void 0===X?void 0:X.camp[1])||void 0===$?void 0:$.split("-")[0])&&void 0!==wi?wi:1)},getCheckSupportStatus:nt,setBreadCrumbBolean:li}):oi&&(0,n.jsx)(dt.Z,{payload:{topic_num:+(null===(te=null===Ne||void 0===Ne||null===(ee=Ne.query)||void 0===ee?void 0:ee.camp[0])||void 0===te?void 0:te.split("-")[0]),camp_num:+(null!==(bi=null===(ne=null===Ne||void 0===Ne||null===(ie=Ne.query)||void 0===ie?void 0:ie.camp[1])||void 0===ne?void 0:ne.split("-")[0])&&void 0!==bi?bi:1)},isTopicHistoryPage:!0,getCheckSupportStatus:nt,setBreadCrumbBolean:li}),(0,n.jsx)(Ye,{isTopicPage:!0,payload:{topic_num:+(null===(le=null===Ne||void 0===Ne||null===(oe=Ne.query)||void 0===oe?void 0:oe.camp[0])||void 0===le?void 0:le.split("-")[0]),camp_num:+(null!==(yi=null===(se=null===Ne||void 0===Ne||null===(de=Ne.query)||void 0===de?void 0:de.camp[1])||void 0===se?void 0:se.split("-")[0])&&void 0!==yi?yi:1)},isTopicHistoryPage:!0,getCheckSupportStatus:nt})]}),children:(0,n.jsxs)("div",{className:k().pageContent+" pageContentWrap",id:"printWrap",children:[He?(0,n.jsx)("div",{className:"flex justify-between gap-3 items-start w-full h-full mb-6",children:(0,n.jsx)("div",{className:"bg-canGray py-7 px-5 rounded-lg w-full",children:(0,n.jsxs)("div",{className:"border border-canGrey2 bg-white rounded-lg p-5 w-full",children:[(0,n.jsx)("div",{className:"consensu-tree-section",children:(0,n.jsxs)("div",{className:"flex justify-between items-start",children:[(0,n.jsx)(U.Z,{title:"Consensus tree",infoContent:"",icon:null}),(0,n.jsx)(F.Z,{className:"border-0 p-0 bg-transparent h-auto",onClick:function(){return Ae((0,Ze.GC)(!1))},children:(0,n.jsx)(C.Z,{})})]})}),(0,n.jsx)(p.Z,{className:"camp-accordion topic-d-accordion",ghost:!0,expandIconPosition:"right",defaultActiveKey:["0"],children:(0,n.jsx)(Rt,{header:(0,n.jsxs)(n.Fragment,{children:["Advanced Settings",(0,n.jsx)("br",{})," ",(0,n.jsx)(Lt,{className:"block mt-1 text-xs text-[#777F93]",children:Nt.p.cr_keywords_sp})]}),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"text-sm font-normal 
1!text-canBlack",id:"topic_detail_section_collapse_camps_text",children:"Collapse camps with support less than"}),(0,n.jsx)(h.Z,{id:"topic_detail_section_consesnus_tree_select_tag",className:"flex items-center [&_.ant-select-selector]:!bg-transparent [&_.ant-select-selector]:!border-none [&_.ant-select-selector]:focus:!border-none !border !border-canGrey2 !shadow-none rounded-md !w-[200px] !mt-2.5 !mb-5 h-[40px]",suffixIcon:(0,n.jsx)(f.Z,{src:"/images/select-caret.svg",alt:"",height:7,width:15,preview:!1}),value:"".concat(Fe),defaultValue:"".concat(Fe),onChange:function(e){Ne.push({pathname:Ne.pathname,query:(0,d.Z)({},Ne.query,{filter:e})},void 0,{shallow:!0}),Ae((0,N.ft)(e))},options:[{value:"0",label:"0%"},{value:"10",label:"10%"},{value:"20",label:"20%"},{value:"50",label:"50%"},{value:"70",label:"70%"},{value:"80",label:"80%"},{value:"90",label:"90%"}]}),(0,n.jsx)("div",{className:k().scoreCheckbox,id:"topic_detail_section_consesnus_tree_full_score_checkbox",children:(0,n.jsx)($e.Z,{loadingIndicator:We,isDisabled:Pe&&(null===Pe||void 0===Pe||null===(ue=Pe[1])||void 0===ue?void 0:ue.rank_hidden)})}),(0,n.jsx)(Ve.Z,{loadingIndicator:We,isDisabled:Pe&&(null===Pe||void 0===Pe||null===(ce=Pe[1])||void 0===ce?void 0:ce.rank_hidden)}),(0,n.jsx)(Bt,{loadingIndicator:We,isDisabled:Pe&&(null===Pe||void 0===Pe||null===(ve=Pe[1])||void 0===ve?void 0:ve.rank_hidden)})]})},"1")}),(0,n.jsx)("hr",{className:"border-1 my-7 border-canGrey2",id:"topic_detail_section_consesnus_tree_line_break"}),Pe&&!0===(null===Pe||void 0===Pe||null===(pe=Pe[1])||void 0===pe?void 0:pe.rank_hidden)&&(0,n.jsx)(g.Z,{type:"warning",showIcon:!0,icon:(0,n.jsx)("i",{className:"icon-warning !text-canRed text-[1.125rem]"}),message:"To view support, add your direct support to the topic or delegate support to another user first.",className:"bg-transparent border-0 font-medium text-canBlack p-0 mb-[1rem]"}),(0,n.jsx)(lt,{id:"topic_detail_section_consesnus_tree_camp_tree",scrollToCampStatement:function(){var e;null===(e=Ce.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},setTotalCampScoreForSupportTree:Ft,setSupportTreeForCamp:ii})]})})}):null,(0,n.jsx)("div",{className:"",id:"topic_detail_section_consesnus_tree_camp_disclaimer",children:(null===Pe||void 0===Pe||null===(_e=Pe[1])||void 0===_e?void 0:_e.is_valid_as_of_time)&&(0,n.jsxs)("div",{className:"w-full ".concat(He?"hidden":""),children:[(0,n.jsxs)("div",{className:"w-full ".concat(He?"hidden":"block"),children:[si&&(0,n.jsx)(Ee,{}),(0,n.jsx)(G,{loadingIndicator:We})]}),(0,n.jsx)(Xe,{}),(0,n.jsx)(tt,{})]})}),ht&&Pe&&!(null===(he=Pe[1])||void 0===he?void 0:he.is_valid_as_of_time)&&(0,n.jsx)("div",{className:"justify-center w-full flex text-right",id:"topic_detail_section_consesnus_tree_no_camp_tree_img",children:(0,n.jsxs)("div",{id:"topic_detail_section_consesnus_tree_no_camp_tree_img_1",children:[(0,n.jsx)(f.Z,{preview:!1,alt:"No topic created",src:"/images/empty-img-default.png",fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",width:200,id:"forgot-modal-img"}),(0,n.jsxs)("p",{id:"topic_detail_before_date",children:["The topic was created on"," ",(0,n.jsx)(qt,{onClick:function(){!function(){var e,t;Ae((0,N.b7)({asofdate:Date.parse(j().unix(null===(e=Pe[1])||void 0===e?void 0:e.created_date).endOf("day")._d)/1e3,asof:"bydate"})),Ne.query.asofdate="".concat(Date.parse(j().unix(null===(t=Pe[1])||void 0===t?void 0:t.created_date).endOf("day")._d)/1e3),null===Ne||void 0===Ne||Ne.push(Ne,null,{shallow:!0})}()},children:null===(we=new Date(1e3*(Pe&&(null===(fe=Pe[1])||void 0===fe?void 0:fe.created_date))).toISOString())||void 0===we?void 0:we.split("T")[0]})]})]})}),(Pe&&(null===(be=Pe[1])||void 0===be?void 0:be.is_valid_as_of_time)||"default"==Be)&&Me&&!(null===Me||void 0===Me?void 0:Me.camp_exist)&&(0,n.jsx)(g.Z,{className:"alert-camp-created-on printHIde",message:"The camp was first created on",type:"info",description:(0,n.jsx)(qt,{onClick:function(){Ae((0,N.b7)({asofdate:Date.parse(j().unix(Me&&(null===Me||void 0===Me?void 0:Me.created_at)).endOf("day")._d)/1e3,asof:"bydate"}))},children:null===(ye=new Date(1e3*(Me&&(null===Me||void 0===Me?void 0:Me.created_at))).toLocaleStr
1ing())||void 0===ye?void 0:ye.split(",")[0]})})]})}),(0,n.jsx)(x.Z,{className:"printHIde"}),(0,n.jsx)(w.Z,{title:"Restrict User",open:xt,onOk:Zi,onCancel:ji,confirmLoading:Wt,okText:"Restrict",cancelText:"Cancel",children:Gt&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"mb-4",children:[(0,n.jsx)("strong",{children:"User:"})," ",Gt.nick_name]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block mb-2 font-medium",children:["Reason for restriction: ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(b.Z.TextArea,{placeholder:"Enter reason for restricting this user",value:Vt,onChange:function(e){return Kt(e.target.value)},rows:4,maxLength:500,showCount:!0})]})]})})]})},Mt=i(24544),Qt=function(e){var t,i,a,d=e.current_date,s=e.newsFeed,u=e.topicRecord,c=e.campRecord,v=e.campStatement,p=e.statementHistory,_=e.tree,m=e.serverCall,h=(e.reqBodyForService,(0,l.I0)()),f=(0,o.useRef)(m||!1);(0,o.useEffect)((function(){h((0,r.iU)(s)),h((0,r.YJ)(u)),h((0,r.kj)(null===c||void 0===c?void 0:c.campData)),h((0,r.jg)(v)),h((0,r.JB)(p)),h((0,r.BI)(200==(null===_||void 0===_?void 0:_.status_code)?[null===_||void 0===_?void 0:_.treeData]:[])),h((0,N.vz)(d))}),[]);var g=404==(null===_||void 0===_?void 0:_.status_code)||422==(null===_||void 0===_?void 0:_.status_code)&&(!(null===_||void 0===_||null===(t=_.error)||void 0===t?void 0:t.camp_num)||(null===_||void 0===_||null===(i=_.error)||void 0===i?void 0:i.camp_num)&&(null===_||void 0===_||null===(a=_.error)||void 0===a?void 0:a.topic_num))?"Topic":"Camp";return(0,n.jsx)(o.Fragment,{children:404==(null===_||void 0===_?void 0:_.status_code)||404==(null===c||void 0===c?void 0:c.status_code)||400==(null===c||void 0===c?void 0:c.status_code)?(0,n.jsx)(Mt.Z,{name:g,message:"".concat(g," not found"),backURL:"/",goBack:!0}):(0,n.jsx)(Pt,{serverSideCall:f})})};Qt.displayName="TopicDetailsPage";var Ot=!0,Ht=Qt},32016:function(e){e.exports={errorPageContentWrap:"datanotfound_errorPageContentWrap__BX6y1",errorPageImg:"datanotfound_errorPageImg__cio1Q",errorPageContent:"datanotfound_errorPageContent__JVL_P",btnGoBack:"datanotfound_btnGoBack__ypWDT"}},89779:function(e){e.exports={card:"ManageSupport_card__Tj4hV",btnsWrap:"ManageSupport_btnsWrap__6ga09",btn:"ManageSupport_btn__o9WQh",main_card_title:"ManageSupport_main_card_title__Ungvd",card_spacing:"ManageSupport_card_spacing__2cxvv",notes:"ManageSupport_notes___f9n_",tag_btn:"ManageSupport_tag_btn__3Y7D9",count:"ManageSupport_count__r9A1o",dropdown:"ManageSupport_dropdown__YIIrO",Upload_Cancel_Btn:"ManageSupport_Upload_Cancel_Btn__lv8nh",Upload_Btn:"ManageSupport_Upload_Btn__nLnHZ",cancel_Btn:"ManageSupport_cancel_Btn__H0YGu",margin_top:"ManageSupport_margin_top__LcqNh",card_width:"ManageSupport_card_width__jDAFr",card_heading:"ManageSupport_card_heading__VrC3_",Bluecolor:"ManageSupport_Bluecolor__86USP",clear_Btn:"ManageSupport_clear_Btn__U1xCo",checkbox:"ManageSupport_checkbox__DQcrk",warning:"ManageSupport_warning__ixYw0",info:"ManageSupport_info__EtxHu",hrtag:"ManageSupport_hrtag__QRaqw",removeAll:"ManageSupport_removeAll__bx8D6",quickAction:"ManageSupport_quickAction__ljLFu",btndiv:"ManageSupport_btndiv__uIjq5",modalTitle:"ManageSupport_modalTitle__fUzPe",support_reason:"ManageSupport_support_reason__rZumB"}},33433:function(e){e.exports={percentage_checkbox:"scorePercentageCheckbox_percentage_checkbox__i1GGC"}},44872:function(e){e.exports={topicDetailContentWrap:"topicDetails_topicDetailContentWrap__qsCtp",ctCard:"topicDetails_ctCard__9_e2y",chexkboxLabel:"topicDetails_chexkboxLabel__E7_KT",startNew:"topicDetails_startNew__sQAbd",topicDetailContentHead:"topicDetails_topicDetailContentHead__ADZg_",info_bar_n:"topicDetails_info_bar_n__TlfXS",inforBarHEad:"topicDetails_inforBarHEad__MYFjt",topicDetailContentHead_Left:"topicDetails_topicDetailContentHead_Left__DslaW",rightPanel:"topicDetails_rightPanel__Tenmw",leftPanel:"topicDetails_leftPanel__juhZc",topicTitleStyle:"topicDetails_topicTitleStyle__JfdtB",breadcrumbLinks:"topicDetails_breadcrumbLinks__7BG2D",topicTitleSkeleton:"topicDetails_topicTitleSkeleton__8tAhK",topicDetailContentHead_Right:"topicDetail
1s_topicDetailContentHead_Right__Vc37F",btnCampForum:"topicDetails_btnCampForum__xiKmO",btnEventLine:"topicDetails_btnEventLine__8X206",campForumDropdown:"topicDetails_campForumDropdown__kN0x2",topicDetailsPanelNo:"topicDetails_topicDetailsPanelNo__21H1V",imageWrapper:"topicDetails_imageWrapper__No_1t",campForumDropdownMenu:"topicDetails_campForumDropdownMenu__b1zqK",topicDetailsTreeListItem:"topicDetails_topicDetailsTreeListItem__dQy1x",treeListItemTitle:"topicDetails_treeListItemTitle__G91mC",activeCamp:"topicDetails_activeCamp__QYGbO",treeListItemNumber:"topicDetails_treeListItemNumber__H9VWW",subScriptionIcon:"topicDetails_subScriptionIcon__TvlOO",implicitIcon:"topicDetails_implicitIcon__7IbRZ",iconSubscribe:"topicDetails_iconSubscribe__ij_8z",addSupportText:"topicDetails_addSupportText__O0qlw",miniSide:"topicDetails_miniSide__4dIY4",cardActions:"topicDetails_cardActions__cl3_O",campStatement:"topicDetails_campStatement__aaZgU",slashStyle:"topicDetails_slashStyle__F1VHB",greenIndicateText:"topicDetails_greenIndicateText__AFlxd",campinfoSocialOt:"topicDetails_campinfoSocialOt__HRgQt",btn_group:"topicDetails_btn_group__1u69F",modalTitle:"topicDetails_modalTitle__r_qx5",eventLineBtn:"topicDetails_eventLineBtn__4CF0v",descriptions:"topicDetails_descriptions__dLYom",svgIconCode:"topicDetails_svgIconCode__qfTK5",archive_grey:"topicDetails_archive_grey__V5FLz",algoLabel:"topicDetails_algoLabel__TD92M",bottomRow:"topicDetails_bottomRow__Hwfpd",backButton:"topicDetails_backButton__6IQo7",topicTitle:"topicDetails_topicTitle__TyJVB",campLeaderCrown:"topicDetails_campLeaderCrown__vM38S",shareIcon:"topicDetails_shareIcon__ZU5T7",topicBreadcrums:"topicDetails_topicBreadcrums__gpnQS",topicnameBreadcrum:"topicDetails_topicnameBreadcrum__16Vaa",campContent:"topicDetails_campContent__r_41m",normal:"topicDetails_normal__yBvRu",createNewcamp:"topicDetails_createNewcamp__rnh_E",camp:"topicDetails_camp__fDoiq",manage_camp_btn:"topicDetails_manage_camp_btn__59VDV","create-new-camp-btn":"topicDetails_create-new-camp-btn__2ocYX",topicDetails_topicnameBreadcrum__16Vaa:"topicDetails_topicDetails_topicnameBreadcrum__16Vaa__YXIzc"}},78208:function(e){e.exports={customButton:"button_customButton__5u9y8",btn:"button_btn__gXwui"}},71535:function(e){e.exports={script_modal:"generate_script_modal__EU1up",generate_btn:"generate_generate_btn__OTlwE",btn_box:"generate_btn_box__IV0_d",cancel_btn:"generate_cancel_btn__CPNyv",submit_btn:"generate_submit_btn___Zapb"}}},function(e){e.O(0,[4752,4907,4146,8206,7747,3646,1818,6705,2360,1516,8534,4536,3619,7071,8054,9774,2888,179],(function(){return t=93450,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.