1(self.webpackChunkcommenter_platform_web=self.webpackChunkcommenter_platform_web||[]).push([[5198],{13762:(e,n,t)=>{"use strict";t.d(n,{Z:()=>r});var i=t(1413),o=(t(72791),t(80184));const s={box:{backgroundColor:"#BABABA26",borderRadius:"12px",padding:"48px 40px",textAlign:"center",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",maxWidth:"600px",width:"100%"},title:{fontSize:"22px",fontWeight:700,color:"#FAFAFA",margin:"0 0 16px 0",lineHeight:"1.3"},whyLink:{fontSize:"13px",color:"#71717A",margin:"0 0 24px 0",cursor:"pointer"},description:{fontSize:"14px",color:"#A1A1AA",margin:"0 0 32px 0",lineHeight:"1.6"},reconnectBtn:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"10px",backgroundColor:"#3F3F46",color:"#FAFAFA",fontWeight:500,fontSize:"14px",padding:"10px 24px",borderRadius:"8px",border:"1px solid #52525B",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",transition:"background-color 0.15s ease, opacity 0.15s ease"},linkedinBadge:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",backgroundColor:"rgba(255,255,255,0.15)",borderRadius:"4px",fontSize:"12px",fontWeight:"800",lineHeight:1},savedNote:{fontSize:"13px",color:"#71717A",margin:"16px 0 0 0"}},r=e=>{let{onReconnect:n,reconnectCountdown:t,isReconnectCountdownActive:r,isConnectButtonDisabled:l,isExpired:a=!1}=e;const d=r?"Reconnect in ".concat(t||"..."):"Reconnect LinkedIn",c=l&&!r;return(0,o.jsxs)("div",{style:s.box,children:[(0,o.jsx)("h2",{style:s.title,children:a?"Your plan has expired":"Your session is paused"}),!a&&(0,o.jsx)("p",{style:s.whyLink,children:"Why this happened?"}),(0,o.jsx)("p",{style:s.description,children:a?"Your subscription has ended. Upgrade to continue using Commenter AI.":(0,o.jsxs)(o.Fragment,{children:["You've reached today's trial usage limit.",(0,o.jsx)("br",{}),"Trial access refreshes daily during the trial period."]})}),!a&&(0,o.jsxs)("button",{onClick:n,disabled:c,style:(0,i.Z)((0,i.Z)({},s.reconnectBtn),{},{opacity:c?.6:1,cursor:c?"not-allowed":"pointer"}),children:[(0,o.jsx)("span",{style:s.linkedinBadge,children:"in"}),d]}),(0,o.jsx)("p",{style:s.savedNote,children:"Your data and conversations are saved."})]})}},55711:(e,n,t)=>{"use strict";t.d(n,{y:()=>m});var i=t(1413),o=t(44925),s=t(30168),r=(t(72791),t(16444)),l=t(80184);const a=["title","variant","disabled"];var d,c,p;const u=r.ZP.button(d||(d=(0,s.Z)(["\n font-size: 18px;\n font-weight: 500;\n line-height: 24px;\n font-family: 'Roboto Slab', sans-serif;\n text-transform: uppercase;\n letter-spacing: 0;\n vertical-align: middle;\n padding: 10px 20px;\n border-radius: 8px;\n width:100% !important;\n max-width:177px;\n cursor: pointer;\n transition: all 0.3s ease;\n opacity: ",";\n pointer-events: ",";\n\n @media only screen and (max-width:767px){\n font-size: 16px;\n }\n\n"])),(e=>e.disabled?.5:1),(e=>e.disabled?"none":"auto")),A=(0,r.ZP)(u)(c||(c=(0,s.Z)(["\n background-color: ",";\n color: ",";\n border: none;\n cursor: pointer;\n\n &:hover {\n background-color: ",";\n color: ","; \n }\n"])),(e=>e.theme.primaryColor),(e=>e.theme.textColor),(e=>e.theme.hoverColor),(e=>e.theme.secondaryTextColor)),x=(0,r.ZP)(u)(p||(p=(0,s.Z)(["\n background-color: transparent;\n color: ",";\n border: 2px solid ",";\n cursor: pointer;\n\n &:hover {\n background-color: ",";\n color: white; \n }\n"])),(e=>e.theme.secondaryTextColor),(e=>e.theme.primaryColor),(e=>e.theme.hoverColor)),m=e=>{let{title:n,variant:t="primary",disabled:s=!1}=e,r=(0,o.Z)(e,a);const d="primary"===t?A:x;return(0,l.jsx)(d,(0,i.Z)((0,i.Z)({disabled:s},r),{},{children:n}))}},93815:(e,n,t)=>{"use strict";t.d(n,{H:()=>a});var i=t(72791),o=t(25169),s=t(6210),r=t(26337),l=t(27189);function a(){const[e,n]=(0,i.useState)(!0),[t,a]=(0,i.useState)(!1),[d,c]=(0,i.useState)(null),[p,u]=(0,i.useState)(!1),[A,x]=(0,i.useState)(!1),[m,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(!1),[v,b]=(0,i.useState)(!1),[y,j]=(0,i.useState)(!1),[w,C]=(0,i.useState)(null),[k,E]=(0,i.useState)(null),[I,P]=(0,i.useState)({}),[S,B]=(0,i.useState)(!1),[D,R]=(0,i.useState)(!1),[N,Z]=(0,i.useState)(null),[M,F]=(0,i.useState)(!1),T=(0,r.t)(),Y=(0,i.useRef)(null),Q=(0,i.useRef)(null),L=(0,i.useCallback)((e=>{if(!e)return;Q.current&&clearInterval(Q.current);const n=new Date(1e3*e+864e5);F(!0),j(!0);const t=setInterval((()=>{const e=new Date,i=n-e;if(i<=0)clearInterval(t),Z("00:00:00"),F(!1),j(!1),E("Reconnect LinkedIn\u2122 to continue your 3-day trial. You won't need to do this when you upgrade.");else{const e=Math.floor(i/1e3),n=String(Math.floor(e/3600)).padStart(2,"0"),t=String(Math.floor(e%3600/60)).padStart(2,"0"),o=String(e%60).padStart(2,"0");Z("".concat(n,":").concat(t,":").concat(o))}}),1e3);Q.current=t}),[]),z=(0,i.useCallback)((e=>{Y.current&&clearInterval(Y.current);const n=new Date(1e3*e);let t=!1;const i=setInterval((()=>{const e=new Date,r=n-e;if(r<=0&&!t)return t=!0,clearInterval(i),c("00:00:00"),u(!1),x(!0),a(!1),C("Today's session ended"),void setTimeout((async()=>{try{var e,n,t;const i=await o.I.post("".concat(s.vc.urlPlatform,"/api/v2/unipile/auth/triggerTrialExpiration"),{withCredentials:!0},{email:null===T||void 0===T||null===(e=T.userData)||void 0===e?void 0:e.email,tenantId:null===T||void 0===T||null===(n=T.userData)||void 0===n?void 0:n.tenantId});if(null!==i&&void 0!==i&&null!==(t=i.data)&&void 0!==t&&t.success){const{status:e,trialExpired:n,dailyEndTime:t,dayNumber:o}=i.data.data||{};if(n)return x(!0),h(!0),j(!0),a(!1),void E("Your free trial has ended. Upgrade to continue using all features.");if("active"===e&&t){const e=t._seconds||Math.floor(Date.now()/1e3);b(!0),E("Reconnect LinkedIn\u2122 to continue your 3-day trial. You won't need to do this when you upgrade."),j(!0),L(e),console.log("Day ".concat(o," ended. User moved to waiting. Countdown started for reconnect."))}}else console.warn("API call failed or response invalid:",i)}catch(i){console.error("Error triggering trial expiration:",i)}}),400);if(r>0){const e=Math.floor(r/1e3),n=String(Math.floor(e/3600)).padStart(2,"0"),t=String(Math.floor(e%3600/60)).padStart(2,"0"),i=String(e%60).padStart(2,"0");c("".concat(n,":").concat(t,":").concat(i)),u(e<=300)}}),1e3);Y.current=i}),[T,L]);(0,i.useEffect)((()=>{(async()=>{try{n(!0);const g=await o.I.get("".concat(s.vc.urlPlatform,"/api/v2/unipile/auth/getUserProfile"),{withCredentials:!0,validateStatus:()=>!0});if(g.data.success){var e,t,i,r;P(null===g||void 0===g||null===(e=g.data)||void 0===e?void 0:e.data);const n=null===g||void 0===g||null===(t=g.data)||void 0===t?void 0:t.success,o=null===g||void 0===g||null===(i=g.data)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.userQueueData;if(!n)return;if(o){var d;const e=o.status,n=(null===o||void 0===o||null===(d=o.dailyEndTime)||void 0===d?void 0:d._seconds)+10;
1if("trialExpired"===e)return x(!0),h(!0),j(!0),void a(!1);if("waiting"===e)return a(!1),void x(!0);if("active"===e&&n)return a(!0),f(!0),void z(n);if("active"===e)return void a(!0)}else a(!0)}else if(!g.data.success){var c,p,u;const e=g.data.event,n="EXISTING_UNIPILE_USER_NOT_FOUND"===e,{plan:t,paidStatus:i,queueStatus:o,trialExpired:s}=g.data.data,r=(0,l.t)({plan:t,paidStatus:i}),d="free_trial"===t,v="trialExpired"===o,y=!r&&!d,w=null===g||void 0===g||null===(c=g.data)||void 0===c||null===(p=c.data)||void 0===p||null===(u=p.dailyEndTime)||void 0===u?void 0:u._seconds;if("DUPLICATE_LINKEDIN_ACCOUNT"===e)return E("This LinkedIn account is already connected to another Commenter AI account. Please use a different LinkedIn account."),a(!1),void j(!1);if("LINKEDIN_IDENTITY_MISMATCH"===e)return E("Please reconnect using the same LinkedIn account you started with."),b(!0),a(!1),void j(!1);var A;if("UNIPILE_COOLDOWN"===e)return E((null===g||void 0===g||null===(A=g.data)||void 0===A?void 0:A.message)||"LinkedIn\u2122 data is temporarily unavailable. Please try again after cooldown."),a(!1),j(!0),void R(!0);if(n&&r&&!d)return b(!0),B(!0),void E("Your LinkedIn\u2122 account is not connected. Please reconnect to continue.");if(n&&d&&!v)return f(!0),void a(!1);if(n&&y&&!v)return x(!0),h(!0),j(!0),void a(!1);if(n&&v&&!r)return x(!0),h(!0),j(!0),void a(!1);if("EXISTING_DELETED_UNIPILE_TRIAL_USER"===e&&s&&!r)return x(!0),h(!0),j(!0),E("Your free trial has ended. Upgrade to continue using all features."),void a(!1);if("EXISTING_DELETED_UNIPILE_TRIAL_USER"===e&&!r&&!s)return b(!0),j(!0),x(!0),void(w&&setTimeout((()=>{L(w)}),300));if("EXISTING_DELETED_UNIPILE_USER"===e){var m;const e=null===g||void 0===g||null===(m=g.data)||void 0===m?void 0:m.data;return void(null!==e&&void 0!==e&&e.last_deleted_unipile_account&&(b(!0),E("Your session has expired due to 30+ hours of inactivity. This helps us keep the system fast and affordable for everyone. Please reconnect to continue.")))}if("EXISTING_UNIPILE_ACCOUNT_DISCONNECTED"===e)return b(!0),B(!0),void E("Your LinkedIn\u2122 account has been disconnected. Please reconnect to continue using the service.");if("UPGRADE_REQUIRED"===e)return d&&!v?(b(!0),E("Your LinkedIn\u2122 account is not connected. Please reconnect to continue your trial."),void("waiting"===o&&x(!0))):(h(!0),x(!0),a(!1),void j(!0))}}catch(g){console.log("Error getting profile",g),a(!1)}finally{n(!1)}})()}),[]),(0,i.useEffect)((()=>()=>{Y.current&&clearInterval(Y.current),Q.current&&clearInterval(Q.current)}),[]);const G=!e&&!t&&!m&&null===d,U=!e&&m,H=(0,i.useCallback)((async e=>{try{var n;if(M)return void("function"===typeof e&&e());j(!0),C(null);const l=await o.I.get("".concat(s.vc.urlPlatform,"/api/v2/unipile/auth/wizard/connectLinkedin"),{params:{reconnectAccount:S},withCredentials:!0});if(null!==l&&void 0!==l&&null!==(n=l.data)&&void 0!==n&&n.success){var t;const{data:e}=l;if("waiting"===(null===e||void 0===e?void 0:e.data))C(null===e||void 0===e?void 0:e.message);else if("HostedAuthUrl"===(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.object)){var i;window.location.assign(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.url)}}var r;if(!l.data.success)C(null===l||void 0===l||null===(r=l.data)||void 0===r?void 0:r.message)}catch(d){var l,a;const e=(null===d||void 0===d||null===(l=d.response)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.message)||(null===d||void 0===d?void 0:d.message)||"Error connecting to LinkedIn\u2122";C(e)}finally{setTimeout((()=>{j(!1)}),1e3)}}),[M,S]);return{isTrialLoading:e,isSessionActive:t,isSessionPaused:G,isTrialFullyExpired:U,remainingTime:d,showUpgradeWarning:p,showTrialEndedModal:A,setShowTrialEndedModal:x,trialEnded:m,showReconnectButton:v,reconnectCountdown:N,isReconnectCountdownActive:M,reconnectAccount:S,isConnectButtonDisabled:y,setIsConnectButtonDisabled:j,errorMessage:w,setErrorMessage:C,sessionError:k,showTestNote:g,unipileRestrict:D,userProfile:I,handleConnectClick:H}}},62370:(e,n,t)=>{"use strict";t.r(n),t.d(n,{ConnectButton:()=>Wo,PageLoader:()=>Jo,default:()=>Ko});var i=t(30168),o=t(1413),s=t(16444),r=t(72791),l=t(6210),a=t(25169),d=t(57689),c=t(3042);const p=e=>{const n=new Date(e),t=new Date-n,i=Math.floor(t/1e3),o=Math.floor(i/60),s=Math.floor(o/60),r=M
1ath.floor(s/24),l=Math.floor(r/30),a=Math.floor(r/365);return i<60?"Just now":o<60?"".concat(o," minute").concat(o>1?"s":""," ago"):s<24?"".concat(s," hour").concat(s>1?"s":""," ago"):r<30?"".concat(r," day").concat(r>1?"s":""," ago"):l<12?"".concat(l," month").concat(l>1?"s":""," ago"):"".concat(a," year").concat(a>1?"s":""," ago")};var u,A,x,m,h=t(68287),g=t(65920),f=t(40181),v=t(31243),b=t(79853),y=t(17091),j=(t(44839),t(61044),t(80184));const w=e=>{let{attachments:n}=e;(0,y.defaultLayoutPlugin)();const[t,i]=(0,r.useState)(0),[o,s]=(0,r.useState)(null),a=n[t];(0,r.useEffect)((()=>((async()=>{if("file"===(null===a||void 0===a?void 0:a.type))try{const e=await v.Z.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/pdfProxy?url=").concat(encodeURIComponent(a.url)),{},{responseType:"blob",withCredentials:!0}),n=new Blob([e.data],{type:"application/pdf"}),t=URL.createObjectURL(n);s(t)}catch(e){console.error("Failed to fetch PDF blob:",e)}})(),()=>{o&&URL.revokeObjectURL(o)})),[a]);return(0,j.jsx)(C,{children:n.length>0&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(k,{currentIndex:t,children:(0,j.jsx)(E,{children:"img"===a.type?(0,j.jsx)("img",{src:a.url,alt:"Attachment",style:{width:"100%",objectFit:"cover"}}):"video"===a.type?(0,j.jsx)("video",{src:a.url,controls:!0,style:{width:"100%",objectFit:"cover"}}):"file"===a.type&&o?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("p",{style:{marginBottom:"8px",fontSize:"14px",color:"#666",fontStyle:"italic",textAlign:"center"},children:"Scroll to view the full PDF \u2193"}),(0,j.jsx)("div",{style:{height:"600px",overflowY:"auto",border:"1px solid #ccc",borderRadius:"8px",padding:"8px",backgroundColor:"#fff",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.05)"},children:(0,j.jsx)(b.Worker,{workerUrl:"/pdf.worker.js",children:(0,j.jsx)(b.Viewer,{fileUrl:o})})})]}):"file"===a.type?(0,j.jsx)("p",{children:"Loading PDF preview..."}):null})}),n.length>1&&(0,j.jsxs)(I,{children:[(0,j.jsx)("button",{style:{visibility:t>0?"visible":"hidden"},onClick:()=>{t>0&&(i((e=>e-1)),s(null))},children:"\u2190"}),(0,j.jsx)("button",{style:{visibility:t<n.length-1?"visible":"hidden"},onClick:()=>{t<n.length-1&&(i((e=>e+1)),s(null))},children:"\u2192"})]})]})})},C=s.ZP.div(u||(u=(0,i.Z)(["\n position: relative;\n width: 100%;\n overflow: hidden;\n"]))),k=s.ZP.div(A||(A=(0,i.Z)(["\n display: flex;\n transition: transform 0.5s ease-in-out;\n transform: translateX(-","%);\n"])),(e=>100*e.currentIndex)),E=s.ZP.div(x||(x=(0,i.Z)(["\n min-width: 100%;\n box-sizing: border-box;\n"]))),I=s.ZP.div(m||(m=(0,i.Z)(["\n position: absolute;\n top: 50%;\n width: 100%;\n display: flex;\n justify-content: space-between;\n transform: translateY(-50%);\n button {\n background-color: rgba(0, 0, 0, 0.5);\n color: rgb(255, 255, 255);\n border: none;\n padding: 0;\n cursor: pointer;\n border-radius: 50%;\n font-size: 16px;\n box-sizing: border-box;\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;
1\n align-items: center;\n margin: 0 0.2rem;\n }\n"]))),P=e=>{let{name:n="Unknown User",profilePicture:t,headline:i="",timestamp:o="",postDate:s="",text:l="",media:a=null,shareUrl:d=""}=e;const c=h,[u,A]=(0,r.useState)(!1);return(0,j.jsxs)("div",{className:"w-full max-w-xl mx-auto rounded-xl p-3 mb-4",style:{backgroundColor:"#18181B",border:"1px solid #27272A"},children:[(0,j.jsxs)("div",{className:"flex justify-between items-start w-full",children:[(0,j.jsxs)("div",{className:"flex items-center gap-3 cursor-pointer",children:[(0,j.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-600 overflow-hidden flex-shrink-0",children:(0,j.jsx)("img",{src:t||c,onError:e=>e.target.src=c,alt:n,className:"w-full h-full object-cover"})}),(0,j.jsxs)("div",{className:"flex flex-col",children:[(0,j.jsx)("h3",{className:"font-semibold text-base hover:underline leading-tight",style:{color:"#FAFAFA"},children:n}),i&&(0,j.jsx)("p",{className:"text-sm leading-snug",style:{color:"#A1A1AA"},children:i})]})]}),(0,j.jsxs)("div",{className:"flex items-center gap-1 ml-2 whitespace-nowrap",children:[(0,j.jsx)(g.Z,{className:"w-4 h-4 flex-shrink-0",style:{color:"#71717A"}}),(0,j.jsx)("span",{className:"text-[12px] font-medium",style:{color:"#71717A"},children:p(s)})]})]}),l&&(0,j.jsx)("p",{className:"mt-3 whitespace-pre-line text-[0.95rem]",style:{color:"#E4E4E7"},children:l}),a&&(0,j.jsx)("div",{className:"mt-3 w-full rounded-xl overflow-hidden bg-black/40 flex items-center justify-center",children:(0,j.jsx)(w,{attachments:a})}),d&&(0,j.jsx)("div",{className:"mt-3 pt-3 flex justify-end",style:{borderTop:"1px solid #27272A"},children:(0,j.jsxs)("button",{type:"button",onClick:()=>window.open(d,"_blank"),className:"flex items-center gap-1.5 cursor-pointer",style:{fontSize:"12px",color:"#A1A1AA",background:"none",border:"none",padding:0},children:[(0,j.jsx)(f.Z,{size:14}),"Open in LinkedIn"]})})]})},S=e=>{let{name:n,headline:t,timestamp:i,replyText:o,profilePicture:s,onReply:l,loading:a,count:d}=e;const[c,u]=(0,r.useState)(!1),[A,x]=r.useState("");return(0,j.jsxs)("div",{className:"w-full max-w-xl mx-auto rounded-lg p-4 mb-3",style:{backgroundColor:"#27272A",border:"1px solid #3F3F46"},children:[(0,j.jsxs)("div",{className:"flex justify-between items-center w-full gap-3",children:[(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)("div",{className:"w-10 h-10 rounded-full bg-gray-600 overflow-hidden flex-shrink-0",children:(0,j.jsx)("img",{src:s||h,alt:n,className:"w-full h-full object-cover"})}),(0,j.jsxs)("div",{className:"leading-tight",children:[(0,j.jsx)("h3",{className:"text-sm font-semibold truncate",style:{color:"#FAFAFA"},children:n}),(0,j.jsx)("p",{className:"text-xs line-clamp-1",style:{color:"#A1A1AA"},children:t})]})]}),d>0?(0,j.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,j.jsx)(g.Z,{className:"w-4 h-4",style:{color:"#71717A"}}),(0,j.jsx)("span",{className:"text-[12px] font-medium whitespace-nowrap",style:{color:"#71717A"},children:p(i)})]}):null]}),(0,j.jsx)("p",{className:"mt-3 text-[0.9rem]",style:{color:"#E4E4E7"},children:o}),(0,j.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,j.jsx)("input",{type:"text",value:A,onChange:e=>x(e.target.value),placeholder:"Write a reply...",className:"flex-1 rounded px-3 py-1 text-sm placeholder:text-[#71717A] focus:outline-none",style:{backgroundColor:"#18181B",border:"1px solid #3F3F46",color:"#FAFAFA"}}),(0,j.jsx)("button",{onClick:async()=>{if(A.trim()){u(!0);try{await l(A)&&x("")}finally{u(!1)}}},disabled:c,className:"px-3 py-1 bg-blue-600 text-white rounded text-sm",children:c?"Sending...":"Reply"})]})]})},B=async e=>{let{commentId:n,postId:t,replyText:i}=e;const o={comment_id:n,post_id:t,reply_text:i,mentions:[]};return a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/replyOnComment"),{withCredentials:!0},o)};var D,R,N,Z,M,F;const T=e=>{let{handleLikePost:n,setReactionWidgetOpen:t,selectedReaction:i,setReactionStatus:o,reactions:s,isDark:r}=e;return(0,j.jsxs)(Y,{$isDark:r,children:[(0,j.jsx)(Q,{$isDark:r,children:"Leave a reaction"}),(0,j.jsx)(L,{children:s.map((e=>(0,j.jsx)(z,{onClick:()=>{return(s=e.name)===i?o(null):(o(s),n(s)),void t(!1);var s},selected:i===e.name,$isDark:r,children:(0,j.jsx)(G,{src:e.image,alt:e.name})},e.name)))})]})},Y=s.ZP.div(D||(D=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: ",";\n padding: 1rem 0.5rem;\n border-radius: 10px;\n box-shadow: ",";\n width: 270px;\n position: absolute;\n left: -55px;\n z-index: 99;\n ","\n"])),(e=>e.$isDark?"#27272A":"#ffffff"),(e=>e.$isDark?"rgba(0, 0, 0, 0.4) 0px 4px 12px":"rgba(0, 0, 0, 0.1) 0px 4px 6px, rgba(0, 0, 0, 0.05) 0px 1px 3px"),(e=>e.$isDark&&"border: 1px solid #3F3F46;")),Q=s.ZP.h4(R||(R=(0,i.Z)(["\n margin: 0;\n color: ",";\n"])),(e=>e.$isDark?"#FAFAFA":"#333")),L=s.ZP.div(N||(N=(0,i.Z)(["\n display: flex;\n"]))),z=s.ZP.button(Z||(Z=(0,i.Z)(["\n background-color: ",";\n border: ",";\n border-radius: 50%;\n padding: 0.5rem;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 0.2s ease-in-out;\n\n &:hover {\n background-color: ",";\n }\n"])),(e=>e.selected?e.$isDark?"rgba(10,102,194,0.25)":"#e0f7fa":"transparent"),(e=>e.selected?"1px solid #0a66c2":"1px solid transparent"),(e=>e.$isDark?"rgba(255,255,255,0.1)":"#f5f5f5")),G=s.ZP.img(M||(M=(0,i.Z)(["\n height: 24px;\n width: 24px;\n"])));
1s.ZP.p(F||(F=(0,i.Z)(["\n margin-top: 1rem;\n color: #0a66c2;\n font-weight: bold;\n"])));const U=t.p+"static/media/like.fc24e6349cc4d1babab2939a21c202a6.svg",H={PRAISE:"celebrate",LIKE:"like",CELEBRATE:"celebrate",SUPPORT:"support",LOVE:"love",INSIGHTFUL:"insightful",FUNNY:"funny",APPRECIATION:"support",EMPATHY:"love",INTEREST:"insightful",ENTERTAINMENT:"funny",CURIOSITY:"funny",CONGRATULATION:"celebrate",CONGRATS:"celebrate",CONGRATULATIONS:"celebrate"};var W,O,J,K,V,X,q,_,$,ee,ne,te,ie,oe,se,re,le,ae,de,ce,pe,ue,Ae,xe,me,he,ge,fe,ve,be,ye,je,we,Ce=t(54131);const ke=e=>{var n,t,i,s;let{comment:r,replyingTo:l,replyText:a,setReplyText:d,handleReply:c,handleCommentReply:p,isCommentReplyLoading:u,handleReaction:A,reactions:x,replies:m,loadingReplies:g,fetchReplies:f,reactionStatus:v,setReactionStatus:b,reactionWidgetOpen:y,setReactionWidgetOpen:w,isDark:C}=e;return(0,j.jsx)(Be,{children:(0,j.jsxs)(De,{$isDark:C,children:[(0,j.jsx)(Xe,{$isDark:C,children:(0,j.jsxs)(qe,{children:[(0,j.jsx)(Oe,{src:null!==r&&void 0!==r&&null!==(n=r.author_details)&&void 0!==n&&n.profile_picture_url?null===r||void 0===r||null===(t=r.author_details)||void 0===t?void 0:t.profile_picture_url:h,alt:h}),(0,j.jsxs)(en,{children:[(0,j.jsxs)(_e,{$isDark:C,children:[(0,j.jsx)("strong",{children:null===r||void 0===r?void 0:r.author}),(0,j.jsx)("p",{children:null===r||void 0===r||null===(i=r.author_details)||void 0===i?void 0:i.headline})]}),(0,j.jsx)($e,{$isDark:C,children:null===r||void 0===r?void 0:r.text})]})]})}),(0,j.jsxs)(Re,{$isDark:C,children:[(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsxs)(Ne,{$isDark:C,onClick:()=>w(!y),children:[(0,j.jsx)("img",{style:(0,o.Z)({height:C?"12px":"15px"},C&&!v?{filter:"brightness(0) invert(1)"}:{}),src:v?null===(s=x.find((e=>e.name===v)))||void 0===s?void 0:s.image:U,alt:v||"like"}),(0,j.jsxs)("span",{style:v?{color:"#0a66c2"}:{},children:["\xa0",v?v[0].toUpperCase()+v.slice(1):"Like"]})]}),y&&(0,j.jsx)(T,{handleLikePost:e=>{A(r.id,e,r.post_id)},setReactionWidgetOpen:e=>w(e),selectedReaction:v,setReactionStatus:e=>b(e),reactions:x,isDark:C})]}),(0,j.jsx)(Ze,{$isDark:C,onClick:()=>c(r.id),children:"Reply"})]}),l===r.id&&(0,j.jsx)(Me,{$isDark:C,children:(0,j.jsxs)(Fe,{$isDark:C,children:[(0,j.jsx)(Te,{$isDark:C,type:"text",placeholder:"Write a reply...",value:a,onChange:e=>d(e.target.value)}),(0,j.jsx)(Ye,{$isDark:C,children:(0,j.jsx)(Qe,{$isDark:C,onClick:()=>p(r.id,r.post_id),children:u?(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"1px"},children:[(0,j.jsx)(Ce.Z,{})," Replying..."]})}):"Post"})})]})}),(0,j.jsx)(Ee,{replies:m,handleReply:c,replyText:a,setReplyText:d,loading:g,onFetch:f,replyingTo:l,handleCommentReply:p,isCommentReplyLoading:u,reactionStatus:v,setReactionStatus:b,reactionWidgetOpen:y,setReactionWidgetOpen:w,handleReaction:A,reactions:x,isDark:C})]})})},Ee=e=>{let{replies:n,handleReply:t,replyText:i,setReplyText:s,loading:l,onFetch:a,replyingTo:d,handleCommentReply:c,isCommentReplyLoading:p,reactions:u,handleReaction:A,isDark:x}=e;const[m,g]=(0,r.useState)({}),[f,v]=(0,r.useState)({});return(0,r.useEffect)((()=>{if(n&&n.length>0){const e={};n.forEach((n=>{if(n.user_reacted){const t=H[n.user_reacted]||null;e[n.id]=t}})),v((n=>(0,o.Z)((0,o.Z)({},n),e)))}}),[n]),l?(0,j.jsx)("p",{children:"Loading replies..."}):n?0===n.length?null:(0,j.jsx)(Ge,{$isDark:x,children:n.map((e=>{var n,r,l;return(0,j.jsxs)(He,{$isDark:x,children:[(0,j.jsxs)(We,{$isDark:x,children:[(0,j.jsx)(Oe,{src:(null===e||void 0===e||null===(n=e.author_details)||void 0===n?void 0:n.profile_picture_url)||h,alt:e.author}),(0,j.jsxs)(Ke,{children:[(0,j.jsx)("strong",{children:e.author}),(null===(r=e.author_details)||void 0===r?void 0:r.headline)&&(0,j.jsx)("p",{className:"headline",children:e.author_details.headline}),(0,j.jsx)(Je,{$isDark:x,children:e.text})]})]}),(0,j.jsxs)(Ve,{$isDark:x,children:[(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsxs)(Ne,{$isDark:x,onClick:()=>g((n=>(0,o.Z)((0,o.Z)({},n),{},{[e.id]:!m[e.id]}
1))),children:[(0,j.jsx)("img",{style:(0,o.Z)({height:x?"12px":"15px"},x&&!f[e.id]?{filter:"brightness(0) invert(1)"}:{}),src:f[e.id]?null===(l=u.find((n=>n.name===f[e.id])))||void 0===l?void 0:l.image:U,alt:f[e.id]||"like"}),(0,j.jsxs)("span",{style:f[e.id]?{color:"#0a66c2"}:{},children:["\xa0",f[e.id]?f[e.id][0].toUpperCase()+f[e.id].slice(1):"Like"]})]}),m[e.id]&&(0,j.jsx)(T,{handleLikePost:n=>A(e.id,n,e.post_id),setReactionWidgetOpen:n=>g((t=>(0,o.Z)((0,o.Z)({},t),{},{[e.id]:n}))),selectedReaction:f[e.id],setReactionStatus:n=>v((t=>(0,o.Z)((0,o.Z)({},t),{},{[e.id]:n}))),reactions:u})]}),(0,j.jsx)(Ze,{$isDark:x,onClick:()=>t(e.id),children:"Reply"})]}),d===e.id&&(0,j.jsx)(Me,{$isDark:x,children:(0,j.jsxs)(Fe,{$isDark:x,children:[(0,j.jsx)(Te,{$isDark:x,type:"text",placeholder:"Write a reply...",value:i,onChange:e=>s(e.target.value)}),(0,j.jsx)(Ye,{$isDark:x,children:(0,j.jsx)(Qe,{$isDark:x,onClick:()=>c(e.id,e.post_id),children:p?(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"1px"},children:[(0,j.jsx)(Ce.Z,{})," Replying..."]})}):"Post"})})]})})]},e.id)}))}):(0,j.jsx)(Ue,{$isDark:x,onClick:a,children:"View replies"})},Ie=e=>{let{social_id:n,totalComments:t,reactions:i,expanded:s,reloadComments:d,postData:c,variant:p}=e;const u="commenting"===p,[A,x]=(0,r.useState)([]),[m,h]=(0,r.useState)(!1),[g,f]=(0,r.useState)(null),[v,b]=(0,r.useState)(!1),[y,w]=(0,r.useState)(t||0),[C,k]=(0,r.useState)(!1),[E,I]=(0,r.useState)(null),[P,S]=(0,r.useState)(""),[D,R]=(0,r.useState)(""),[N,Z]=(0,r.useState)({}),[M,F]=(0,r.useState)({}),[T,Y]=(0,r.useState)({}),[Q,L]=(0,r.useState)({}),[z,G]=(0,r.useState)(!1),U=e=>{R(e),setTimeout((()=>R("")),2500)},W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"addMore";if(!m)try{var t;h(!0);const i={social_id:n},o=new URLSearchParams;g&&"reset"!==e&&o.append("cursor",g),o.append("skipCount",C?"true":"false");const s=await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/getAllPostCommentsById?").concat(o.toString()),{withCredentials:!0},i);if(null!==s&&void 0!==s&&null!==(t=s.data)&&void 0!==t&&t.success){const n=s.data.data.items||[],t=s.data.data.next_cursor,i=s.data.data.has_more,o=s.data.data.total_comment_count||0;if("addMore"===e){const e=new Set(A.map((e=>e.id))),t=n.filter((n=>!e.has(n.id)));x((e=>[...e,...t]))}else x(n);L(Object.fromEntries(n.map((e=>[e.id,e.user_reacted?H[e.user_reacted]:null])))),f(t),b(i),k(!0),w(o)}}catch(i){console.log("Failed to load comments",i)}finally{h(!1)}},O=async(e,n)=>{if(!M[e]&&!N[e]){F((n=>(0,o.Z)((0,o.Z)({},n),{},{[e]:!0})));try{var t;const n=await a.I.get("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/replyOnComment/").concat(c.social_id,"/").concat(e),{withCredentials:!0});if(null!==n&&void 0!==n&&null!==(t=n.data)&&void 0!==t&&t.success){const t=n.data.data.items||[];Z((n=>(0,o.Z)((0,o.Z)({},n),{},{[e]:t||[]}))),L((e=>(0,o.Z)((0,o.Z)({},e),Object.fromEntries(t.map((e=>[e.id,H[e.user_reacted]||null]))))))}}catch(i){console.error("Error fetching replies:",i)}finally{F((n=>(0,o.Z)((0,o.Z)({},n),{},{[e]:!1})))}}};(0,r.useEffect)((()=>{s&&(x([]),f(null),b(!0),k(!1),W("reset"))}),[s,d]);const J=e=>I(e),K=async(e,n)=>{if(P.trim()){G(!0);try{var t;const n=await B({commentId:e,postId:c.social_id,replyText:P});null!==n&&void 0!==n&&null!==(t=n.data)&&void 0!==t&&t.success?(G(!1),U("Reply sent successfully!"),S(""),I(null),O(e)):(G(!1),U("Failed to send reply, please try again."),console.error("Reply failed:",null===n||void 0===n?void 0:n.data))}catch(i){G(!1),U("Error while sending reply."),console.error("Error posting reply:",i)}}},V=async(e,n,t)=>{try{var i,s;L((t=>(0,o.Z)((0,o.Z)({},t),{},{[e]:n})));const c=await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/sendPostReaction"),{withCredentials:!0},{social_id:t,reaction:n,comment_id:e});var r,d;if(null!==c&&void 0!==c&&null!==(i=c.data)&&void 0!==i&&i.success&&U('Reaction "'.concat(n,'" sent!')),null===c||void 0===c||null===(s=c.data)||void 0===s||!s.success)console.error("Failed to send reaction:",null===c||void 0===c||null===(r=c.data)||void 0===r?void 0:r.message),U("Failed: ".concat(null===c||void 0===c||null===(d=c.data)||void 0===d?void 0:d.message))}catch(c){console.error("Error sending reaction:",c),U("Something went wrong while sending reaction.")}};return(0,j.jsxs)(Pe,{$isDark:u,children:[s&&(0,j.jsxs)(Se,{$isDark:u,children:[A.length>0?A.map((e=>(0,j.jsx)(ke,{comment:e,replyingTo:E,replyText:P,setReplyText:S,handleReply:J,handleCommentReply:K,isCommentReplyLoading:z,handleReaction:V,reactions:i,replies:N[e.id],loadingReplies:M[e.id],fetchReplies:()=>O(e.id,e.post_id),reactionStatus:Q[e.id],setReactionStatus:n=>L((t=>(0,o.Z)((0,o.Z)({},t),{},{[e.id]:n}
1))),reactionWidgetOpen:T[e.id],setReactionWidgetOpen:n=>Y((t=>(0,o.Z)((0,o.Z)({},t),{},{[e.id]:n}))),isDark:u},e.id))):!m&&(0,j.jsx)("p",{children:"No comments found."}),v&&!m&&(0,j.jsx)(Le,{$isDark:u,onClick:()=>W("addMore"),children:"Load More"}),m&&(0,j.jsx)(nn,{children:"Loading..."})]}),D&&(0,j.jsx)(ze,{children:D})]})},Pe=s.ZP.div(W||(W=(0,i.Z)(["\n width: 100%;\n --cl-text: ",";\n --cl-strong: ",";\n --cl-meta: ",";\n --cl-border: ",";\n --cl-like: ",";\n --cl-hover-bg: ",";\n --cl-reply-border: ",";\n --cl-reaction-bar-bg: ",";\n --cl-reaction-btn-bg: ",";\n --cl-replies-border: ",";\n --cl-view-replies: ",";\n"])),(e=>e.$isDark?"#E4E4E7":"#444"),(e=>e.$isDark?"#FAFAFA":"#333"),(e=>e.$isDark?"#A1A1AA":"#777"),(e=>e.$isDark?"#27272A":"#f0f0f0"),(e=>e.$isDark?"#A1A1AA":"#383838ff"),(e=>e.$isDark?"rgba(255,255,255,0.1)":"#dbdadaff"),(e=>e.$isDark?"#3F3F46":"#ccc"),(e=>e.$isDark?"#27272A":"white"),(e=>e.$isDark?"#3F3F46":"#f0f0f0"),(e=>e.$isDark?"#3F3F46":"#e0e0e0"),(e=>e.$isDark?"#A1A1AA":"#4d4d4dff")),Se=(s.ZP.div(O||(O=(0,i.Z)(["\n display: inline-flex;\n background-color: #0a66c2;\n color: white;\n border-radius: 5px;\n margin: 0.5rem 0;\n padding: 0.7rem 0.6rem;\n cursor: pointer;\n border: none;\n font-size: 12px;\n"]))),s.ZP.div(J||(J=(0,i.Z)(["\n max-width: 100%;\n border-bottom: ",";\n width: 100%;\n"])),(e=>e.$isDark?"none":"1px solid rgba(128, 128, 128, 0.5)"))),Be=s.ZP.div(K||(K=(0,i.Z)(["\n position: relative;\n"]))),De=s.ZP.div(V||(V=(0,i.Z)(["\n padding: 8px 0;\n border-bottom: 1px solid var(--cl-border, #f0f0f0);\n\n strong {\n font-size: ",";\n color: var(--cl-strong, inherit);\n font-weight: 500;\n }\n\n p {\n margin: ",";\n font-size: ",";\n color: var(--cl-text, #444);\n }\n"])),(e=>e.$isDark?"14px":"13px"),(e=>e.$isDark?"2px 0":"4px 0"),(e=>(e.$isDark,"13px"))),Re=s.ZP.div(X||(X=(0,i.Z)(["\n display: flex;\n gap: ",";\n align-items: center;\n margin-top: ",";\n margin-left: ",";\n"])),(e=>e.$isDark?"12px":"10px"),(e=>(e.$isDark,"4px")),(e=>e.$isDark?"36px":"30px")),Ne=(s.ZP.div(q||(q=(0,i.Z)(["\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: #0a66c2;\n cursor: pointer;\n"]))),s.ZP.div(_||(_=(0,i.Z)(["\n position: relative;\n display: flex;\n align-items: center;\n font-size: ",";\n color: var(--cl-like, #383838ff);\n cursor: pointer;\n padding: ",";\n border-radius: ",";\n\n &:hover {\n background: var(--cl-hover-bg, #dbdadaff);\n border: none;\n }\n\n &:hover > div {\n opacity: 1;\n visibility: visible;\n transform: translateY(0px);\n }\n span{\n padding-top: ",";}\n"])),(e=>e.$isDark?"12px":"13px"),(e=>e.$isDark?"2px 6px":"6px 8px"),(e=>e.$isDark?"4px":"10px"),(e=>e.$isDark?"0":"5px"))),Ze=(s.ZP.div($||($=(0,i.Z)(["\n position: absolute;\n top: 100%;\n left: 0;\n background: var(--cl-reaction-bar-bg, white);\n border: 1px solid var(--cl-reply-border, #ccc);\n padding: 6px 8px;\n border-radius: 6px;\n display: flex;\n gap: 6px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n opacity: 0;\n visibility: hidden;\n transform: translateY(5px);\n transition: all 0.2s ease-in-out;\n z-index: 10;\n"]))),s.ZP.button(ee||(ee=(0,i.Z)(["\n background: var(--cl-reaction-btn-bg, #f0f0f0);\n border: none;\n border-radius: 50%;\n padding: 6px 8px;\n font-size: 16px;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover {\n background: #dceeff;\n transform: scale(1.5);\n }\n"]))),s.ZP.span(ne||(ne=(0,i.Z)(["\n font-size: 13px;\n color: var(--cl-like, #383838ff);\n cursor: pointer;\n padding: 6px 8px;\n padding-top: 11px;\n border-radius: 10px;\n &:hover {\n background: var(--cl-hover-bg, #dbdadaff);\n border: none;\n }\n\n ","\n"])),(e=>e.$isDark?"\n font-size: 12px;\n font-weight: 500;\n background-color: #2563EB;\n color: #FFFFFF;\n padding: 2px 8px;\n padding-top: 2px;\n border-radius: 4px;\n &:hover {\n background: #1d4ed8;\n }\n ":""))),Me=s.ZP.div(te||(te=(0,i.Z)(["\n position: relative;\n width: 100%;\n padding: ",";\n"])),(e=>e.$isDark?"4px 0":"10px")),Fe=s.ZP.div(ie||(ie=(0,i.Z)(["\n display: flex;\n min-height: 80px;\n flex-direction: column;\n align-items: start;\n gap: 10px;\n padding: 10px;\n border-radius: 15px;\n border: 1px solid var(--cl-reply-border, #ccc);\n\n ","\n"])),(e=>e.$isDark?"\n flex-direction: row;
1\n align-items: center;\n min-height: unset;\n gap: 8px;\n padding: 0;\n border: none;\n border-radius: 0;\n ":"")),Te=s.ZP.input(oe||(oe=(0,i.Z)(["\n width: 100%;\n padding: 10px;\n border: 1px solid var(--cl-reply-border, #ccc);\n border-radius: 9999px;\n outline: none;\n background: transparent;\n color: var(--cl-strong, inherit);\n\n ","\n"])),(e=>e.$isDark?"\n background-color: #27272A;\n border: none;\n padding: 6px 12px;\n font-size: 12px;\n ":"")),Ye=s.ZP.div(se||(se=(0,i.Z)(["\n width: 100%;\n display: flex;\n justify-content: end;\n align-items: end;\n"]))),Qe=s.ZP.button(re||(re=(0,i.Z)(["\n\n background-color: ","; /* LinkedIn blue */\n color: ",";\n padding: 10px;\n padding-inline: 20px;\n border-radius: 10px;\n border: none;\n cursor: pointer;\n transition: background-color 0.3s;\n\n &:hover {\n background-color: #005a8c; /* Darker blue on hover */\n }\n\n ","\n"])),(e=>e.theme.primaryColor),(e=>e.theme.textColor),(e=>e.$isDark?"\n font-size: 10px;\n font-weight: 500;\n padding: 4px 8px;\n padding-inline: 8px;\n border-radius: 4px;\n background-color: #2563EB;\n color: #FFFFFF;\n &:hover {\n background-color: #1d4ed8;\n }\n ":"")),Le=s.ZP.button(le||(le=(0,i.Z)(["\n display: block;\n margin: 10px auto;\n background: ",";\n color: ",";\n padding: 6px 12px;\n font-size: ",";\n border: none;\n border-radius: 6px;\n cursor: pointer;\n"])),(e=>e.$isDark?"transparent":e.theme.darkBgColor),(e=>e.$isDark?"#A1A1AA":e.theme.textColor),(e=>e.$isDark?"12px":"13px")),ze=s.ZP.div(ae||(ae=(0,i.Z)(["\n position: fixed;\n bottom: 40px;\n right: 40px;\n background-color: #0a66c2;\n color: white;\n padding: 12px 20px;\n border-radius: 6px;\n font-size: 14px;\n z-index: 1000;\n animation: fadeInOut 2.5s ease-in-out;\n\n @keyframes fadeInOut {\n 0% {\n opacity: 0;\n transform: translateY(10px);\n }\n 10% {\n opacity: 1;\n transform: translateY(0px);\n }\n 90% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n transform: translateY(10px);\n }\n }\n"]))),Ge=s.ZP.div(de||(de=(0,i.Z)(["\n margin-left: ",";\n margin-top: ",";\n margin-bottom: ",";\n padding-left: ",";\n border-left: ",";\n"])),(e=>e.$isDark?"24px":"50px"),(e=>e.$isDark?"16px":"25px"),(e=>e.$isDark?"12px":"0"),(e=>e.$isDark?"0":"15px"),(e=>e.$isDark?"none":"2px solid var(--cl-replies-border, #e0e0e0)")),Ue=s.ZP.button(ce||(ce=(0,i.Z)(["\n font-size: 15px;\n font-weight: 500;\n color: var(--cl-view-replies, #4d4d4dff);\n background: transparent;\n border: none;\n padding: 6px 0;\n margin-top: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover {\n text-decoration: underline;\n color: var(--cl-strong, #070707ff);\n }\n\n ","\n"])),(e=>e.$isDark?"\n font-size: 12px;\n font-weight: 500;\n margin-top: 10px;\n margin-left: 36px;\n padding: 2px 0;\n ":"")),He=s.ZP.div(pe||(pe=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n margin-bottom: ",";\n padding-bottom: ",";\n border-bottom: ",";\n color: var(--cl-text, #1f1f1f);\n font-size: ",";\n"])),(e=>e.$isDark?"8px":"12px"),(e=>e.$isDark?"4px":"12px"),(e=>e.$isDark?"none":"1px solid var(--cl-border, #f1f1f1)"),(e=>(e.$isDark,"13px"))),We=s.ZP.div(ue||(ue=(0,i.Z)(["\n display: flex;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: ",";\n\n strong {\n font-size: ",";\n font-weight: ",";\n color: var(--cl-strong, #222);\n }\n\n .headline {\n font-size: ",";\n color: var(--cl-meta, #777);\n margin: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n"])),(e=>e.$isDark?"2px":"4px"),(e=>e.$isDark?"13px":"1.1rem"),(e=>e.$isDark?"500":"600"),(e=>e.$isDark?"12px":"13px")),Oe=s.ZP.img(Ae||(Ae=(0,i.Z)(["\n width: 28px;\n height: 28px;\n border-radius: 50%;\n margin-right: 8px;\n object-fit: cover;\n flex-shrink: 0;\n"]))),Je=s.ZP.span(xe||(xe=(0,i.Z)(["\n font-size: ",";\n color: var(--cl-text, #444);\n margin: ",";\n"])),(e=>e.$isDark?"13px":"15px"),(e=>e.$isDark?"4px 0 0":"10px 0")),Ke=s.ZP.div(me||(me=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n"]))),Ve=s.ZP.div(he||(he=(0,i.Z)(["\n display: flex;\n gap: ",";\n align-items: center;\n font-size: ",";\n margin-top: ",";\n margin-left: ",";\n"])),(e=>(e.$isDark,"12px")),(e=>(e.$isDark,"12px")),(e=>e.$isDark?"4px":"2px"),(e=>e.$isDark?"46px":"45px")),Xe=(s.ZP.button(ge||(ge=(0,i.Z)(["\n background: none;\n border: none;\n color: #0a66c2;\n cursor: pointer;\n padding: 0;\n\n &:hover {\n text-decoration: underline;\n }\n"]))),s.ZP.div(fe||(fe=(0,i.Z)(["\n display: flex;\n align-items: ",";\n padding: ",";\n"])),(e=>e.$isDark?"flex-start":"center"),(e=>e.$isDark?"4px 0":"0.5rem 0"))),qe=s.ZP.div(ve||(ve=(0,i.Z)(["\n display: flex;\n align-items: flex-start;\n gap: 10px;\n // margin-bottom: 4px\n"]))),_e=s.ZP.div(be||(be=(0,i.Z)(["\n strong {\n font-size: ",";\n color: var(--cl-strong, #333);\n font-weight: ",";\n }\n\n p {\n font-size: ",";\n color: var(--cl-meta, #777);\n margin-top: ",";\n margin-bottom: 0;\n }\n"])),(e=>e.$isDark?"14px":"1.1rem"),(e=>e.$isDark?"500":"bold"),(e=>e.$isDark?"13px":"0.8rem"),(e=>e.$isDark?"1px":"0.25rem")),$e=s.ZP.span(ye||(ye=(0,i.Z)(["\n font-size: ",";\n color: var(--cl-text, #1f1e1eff);\n padding: ",";\n"])),(e=>e.$isDark?"14px":"16px"),(e=>e.$isDark?"2px 0":"0.5rem 0")),en=s.ZP.div(je||(je=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n"]))),nn=s.ZP.div(we||(we=(0,i.Z)(["\n display: flex;\n justify-content: center;\n margin: 20px 0;\n"]))),tn=e=>{var n,t,i,s,d;let{commentId:c,postId:p,text:u,author:A,replyCount:x,social_id:m,openCommentId:h,setOpenCommentId:g,setOpenPostId:f,openPostId:v,onClose:b}=e;const[y,w]=(0,r.useState)({}),[C,k]=(0,r.useState)(x),[E,I]=(0,r.useState)({}),[D,R]=(0,r.useState)({}),[N,Z]=(0,r.useState)(null),[M,F]=(0,r.useState)(!1),[T,Y]=(0,r.useState)({}),[Q,L]=(0,r.useState)(!1),[z,G]=(0,r.useState)(""),U=(0,r.useRef)(null),H=(0,r.useRef)(null),W=(0,r.useRef)(null),O=e=>{G(e),setTimeout((()=>G("")),2500)},J=async(e,n)=>{try{var t;Y((n=>(0,o.Z)((0,o.Z)({},n),{},{[e]:!0})));encodeURIComponent(n);const i=encodeURIComponent(e),s=encodeURIComponent(m),r=await a.I.get("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/replyOnComment/").concat(s,"/").concat(i),{withCredentials:!0});if(null!==r&&void 0!==r&&null!==(t=r.data)&&void 0!==t&&t.success){const n=r.data.data.items||[],t=r.data.data.cursor||null,i=r.data.data.hasMore||!1;w((t=>{const i=t[e]||[],s=[...n,...i],r=new Map;
1return s.forEach((e=>r.set(e.id,e))),(0,o.Z)((0,o.Z)({},t),{},{[e]:Array.from(r.values())})})),I((n=>(0,o.Z)((0,o.Z)({},n),{},{[e]:t}))),R((n=>(0,o.Z)((0,o.Z)({},n),{},{[e]:i})))}}catch(i){console.error("Error fetching replies:",i)}finally{Y((n=>(0,o.Z)((0,o.Z)({},n),{},{[e]:!1})))}},K=e=>{v===e?f(null):(f(e),g(null),N||(async()=>{try{var e;F(!0);const t={social_id:m},i=await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/getPost"),{withCredentials:!0},t);var n;null!==i&&void 0!==i&&null!==(e=i.data)&&void 0!==e&&e.success&&Z(null===(n=i.data)||void 0===n?void 0:n.data)}catch(t){console.error("Error fetching post:",t)}finally{F(!1)}})(),setTimeout((()=>{var e;null===(e=W.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})}),100))},V=async e=>{if(e.trim()){L(!0);try{var n;const t=await B({commentId:c,social_id:m,replyText:e});return null!==t&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&n.success?(O("Reply sent successfully!"),L(!0),setTimeout((async()=>{await J(c,p),k((e=>e+1)),L(!1)}),500),!0):(O("Failed to send reply, please try again."),!1)}catch(t){O("Failed to send reply, please try again."),console.error(t)}finally{L(!1)}}};return(0,j.jsxs)("div",{className:"w-full max-w-2xl mx-auto rounded-xl p-4 mb-4",style:{backgroundColor:"#18181B",border:"1px solid #27272A"},ref:W,children:[(0,j.jsxs)("div",{className:"flex flex-col justify-between align-center h-full",children:[(0,j.jsx)("div",{className:"rounded-lg p-3 mb-3",style:{backgroundColor:"#27272A"},children:(0,j.jsx)("p",{className:"text-sm",style:{color:"#E4E4E7"},children:u})}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)("button",{onClick:()=>{K(c)},className:"flex-1 px-4 py-2 bg-blue-600 text-white text-sm rounded-lg hover:bg-blue-700 transition",children:"View Full Post"}),(0,j.jsx)("button",{onClick:()=>{h===c?g(null):(g(c),f(null),y[c]||J(c,p),setTimeout((()=>{var e;null===(e=W.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})}),100))},className:"flex-1 px-4 py-2 rounded-lg hover:bg-white/5 transition text-sm",style:{border:"1px solid #3F3F46",color:"#A1A1AA"},children:0===C?"(0) Add Reply":"(".concat(C,") ").concat(1===C?"Reply":"Replies")})]}),v===c&&(0,j.jsx)("div",{ref:U,className:"mt-10 flex flex-col gap-4",children:M?(0,j.jsxs)("div",{className:"flex justify-center items-center gap-2 py-2 text-gray-600 text-sm",children:[(0,j.jsx)("span",{className:"text-center text-sm text-blue-600",children:"Loading posts"}),(0,j.jsxs)("span",{className:"flex gap-1",children:[(0,j.jsx)("span",{className:"w-2 h-2 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),(0,j.jsx)("span",{className:"w-2 h-2 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"200ms"}}),(0,j.jsx)("span",{className:"w-2 h-2 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"400ms"}})]})]}):N?(0,j.jsx)(P,{name:null===(n=N.author)||void 0===n?void 0:n.name,profilePicture:null===(t=N.author)||void 0===t?void 0:t.profile_picture_url,headline:null===(i=N.author)||void 0===i?void 0:i.headline,timestamp:N.date,postDate:N.parsed_datetime,text:N.text,media:N.attachments,replies:N.comment_counter,shareUrl:N.share_url}):(0,j.jsx)("p",{className:"text-center text-gray-500",children:"No post found"})}),h===c&&(0,j.jsx)("div",{ref:H,className:"mt-10 flex flex-col gap-4",children:!T[c]||null!==(s=y[c])&&void 0!==s&&s.length?0===C?(0,j.jsx)(S,{name:A,headline:"",timestamp:(new Date).toISOString(),replyText:"",profilePicture:"",onReply:e=>V(e),loading:Q,count:C}):(null===(d=y[c])||void 0===d?void 0:d.length)>0?(0,j.jsxs)(j.Fragment,{children:[y[c].map((e=>{var n;return(0,j.jsx)(S,{name:e.author,headline:null===(n=e.author_details)||void 0===n?void 0:n.headline,timestamp:e.date,replyText:e.text,profilePicture:null===e||void 0===e?void 0:e.profile_picture_url,onReply:e=>V(e),loading:Q,count:C},e.id)})),D[c]&&(0,j.jsx)("button",{onClick:()=>J(c,p),className:"mx-auto mt-4 px-4 py-2 bg-blue-600 text-white rounded-lg",children:"Load More Replies"})]}):(0,j.jsx)("p",{className:"text-center",style:{color:"#71717A"},children:"No replies yet"}):(0,j.jsxs)("div",{className:"flex justify-center items-center gap-2 py-2 text-gray-600 text-sm",children:[(0,j.jsx)("span",{className:"text-center text-sm text-blue-600",children:"Loading replies"}),(0,j.jsxs)("span",{className:"flex gap-1",children:[(0,j.jsx)("span",{className:"w-2 h-2 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),(0,j.jsx)("span",{className:"w-2 h-2 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"200ms"}}),(0,j.jsx)("span",{className:"w-2 h-2 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"400ms"}})]})]})})]}),z&&(0,j.jsx)(ze,{children:z})]})};var on=t(18351),sn=t(27189);const rn={width:"33%",padding:"8px",borderRadius:"5px",border:"1px solid gray",backgroundColor:"white",fontSize:"12px",cursor:"pointer"},ln={width:"33%",padding:"8px",borderRadius:"5px",border:"1px solid gray",backgroundColor:"white",fontSize:"12px",cursor:"pointer"},an={width:"33%",padding:"8px",borderRadius:"5px",border:"1px solid gray",backgroundColor:"white",fontSize:"12px",cursor:"pointer"},dn={display:"flex",alignItems:"center",justifyContent:"center",margin:"1rem 0 0 0",gap:"1rem"},cn={cursor:"pointer",padding:"8px 12px",border:"1px solid gray",borderRadius:"6px",fontSize:"12px",fontWeight:"500",textAlign:"center",width:"150px",display:"flex",alignItems:"center",justifyContent:"center"},pn=(0,o.Z)((0,o.Z)({},cn),{},{backgroundColor:"#0073b1",color:"white",border:"1px solid #0073b1"});function un(e){var n,t;let{label:i,value:o,options:s,onChange:l}=e;const[a,d]=r.useState(!1),c=s.map((e=>"string"===typeof e?{label:e,value:e}:e)),p=(null===(n=c.find((e=>e.value===o||e.label===o)))||void 0===n?void 0:n.label)||o||i,u=!o||""===o||p===(null===(t=c[0])||void 0===t?void 0:t.label);return(0,j.jsxs)("div",{className:"relative",children:[(0,j.jsxs)("button",{onClick:()=>d(!a),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{backgroundColor:"#27272A",color:u?"#A1A1AA":"#FAFAFA"},children:[p,(0,j.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,j.jsx)("path",{d:"m6 9 6 6 6-6"})})]}),a&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>d(!1)}),(0,j.jsx)("div",{className:"absolute top-full left-0 mt-1 py-1 rounded-lg shadow-lg z-20 min-w-[150px] max-h-[300px] overflow-y-auto",style:{backgroundColor:"#27272A"},children:c.map((e=>(0,j.jsx)("button",{onClick:()=>{l(e.value),d(!1)},className:"w-full px-4 py-2 text-left text-sm hover:bg-white/5",style:{color:o===e.value?"#2563EB":"#FAFAFA"},children:e.label},e.label)))})]})]})}const An=e=>{let{selectedList:n,setSelectedList:t,selectedSort:i,setSelectedSort:o,selectedDate:s,setSelectedDate:p,setcurrentCursor:u,selectedPeopleList:A,setSelectedPeopleList:x,setPeopleListInitialized:m,userProfile:h,feedMode:g,toggleFeedMode:f,variant:v}=e;const b="commenting"===v,y=JSON.parse(localStorage.getItem("userData")),[w,C]=(0,r.useState)(!1),[k,E]=(0,r.useState)("all"),I=JSON.parse(localStorage.getItem("userData")),[P,S]=(0,r.useState)([]),[B,D]=(0,r.useState)(null),[R,N]=(0,r.useState)(!0),[Z,M]=(0,r.useState)(!1),[F,T]=(0,r.useState)(null),[Y,Q]=(0,r.useState)(null),L=null===I||void 0===I?void 0:I.provider_id,z=(0,r.useRef)(null);(0,r.useEffect)((()=>{function e(e){z.current&&!z.current.contains(e.target)&&C(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const G=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;if(R&&!Z)try{var n,t,i;M(!0);const o={provider_id:L},s=B?"?limit=".concat(e,"&skipCount=false&cursor=").concat(B):"?limit=".concat(e,"&skipCount=false"),r=null===(n=(await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/getAllComments").concat(s),{withCredentials:!0},o)).data)||void 0===n?void 0:n.data,d=(null===r||void 0===r||null===(t=r.items)||void 0===t?void 0:t.filter((e=>!e.thread_id)))||[];S((e=>{const n=[...e,...d],t=new Map;
1return n.forEach((e=>t.set(e.id,e))),Array.from(t.values())})),D((null===r||void 0===r?void 0:r.next_cursor)||null),N(null!==(i=null===r||void 0===r?void 0:r.has_more)&&void 0!==i&&i)}catch(o){console.error("Fetch comments failed:",o)}finally{M(!1)}};(0,r.useEffect)((()=>{w&&G()}),[w]);const[U,H]=(0,r.useState)([{id:"unipile_all_list_filter",list_name:"Select Keyword List",keywords:[]}]),[W,O]=(0,r.useState)(!1);(0,r.useEffect)((()=>{(async()=>{O(!0);try{var e;const n=await a.I.get("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/keywords/getAll"),{withCredentials:!0});null!==n&&void 0!==n&&null!==(e=n.data)&&void 0!==e&&e.success&&H((e=>{var t;return[e[0],...null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.data]}))}catch(n){console.log("Error fetching filters",n)}finally{O(!1)}})()}),[]);const[J,K]=(0,r.useState)([{id:"",list_name:"Select People's List"}]),[V,X]=(0,r.useState)(!1);(0,r.useEffect)((()=>{(async()=>{X(!0);try{var e;const n=await a.I.get("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/people/getAll"),{withCredentials:!0});if(null!==n&&void 0!==n&&null!==(e=n.data)&&void 0!==e&&e.success){const e=n.data.data;if(K((n=>[n[0],...e])),!0===(null===h||void 0===h?void 0:h.newUnipileUser)&&!A&&e.length>0){const n=e[0].id;x(n),m(!0)}else m(!0)}}catch(n){console.log("Error fetching people list",n)}finally{X(!1)}})()}),[]);const q=(0,d.s0)(),{featureToggle:_}=(0,c.Fg)();if(!_)return null;const $=P.filter((e=>!e.thread_id)).filter((e=>"all"===k||"replied"===k&&e.reply_counter>0));if(b){const e=[{label:"Date",value:"date"},{label:"Relevance",value:"relevance"}],r=[{label:"All Time",value:""},{label:"Past Day",value:"past_day"},{label:"Past Week",value:"past_week"},{label:"Past Month",value:"past_month"}],a=[{label:"All Keywords",value:""},...U.slice(1).map((e=>({label:e.list_name,value:e.keywords})))],d=[{label:"All People",value:""},...J.slice(1).map((e=>({label:e.list_name,value:e.id})))];return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"px-6 pt-6 pb-4",children:[(0,j.jsx)("h1",{className:"text-lg font-bold mb-1",style:{color:"#FAFAFA"},children:"COMMENTING WORKSPACE"}),(0,j.jsx)("p",{className:"text-sm",style:{color:"#71717A"},children:"This feed is where engagement becomes conversations that appear in Focus."})]}),(0,j.jsxs)("div",{className:"px-6 py-3 flex items-center gap-3 flex-wrap",style:{borderBottom:"1px solid #27272A"},children:[(0,j.jsx)(un,{label:"Post type",value:"myPosts"===g?"My Posts":"All Posts",options:[{label:"All Posts",value:"All Posts"},{label:"My Posts",value:"My Posts"}],onChange:e=>{"My Posts"===e&&"myPosts"!==g&&(f(),x(""),t(""),u(null)),"All Posts"===e&&"myPosts"===g&&(f(),u(null))}}),(0,j.jsx)(un,{label:"People",value:A,options:d,onChange:e=>{t(""),x(e),u(null),"myPosts"===g&&f()}}),(0,j.jsx)(un,{label:"Keyword",value:n,options:a,onChange:e=>{x(""),t(e),u(null),"myPosts"===g&&f()}}),(0,j.jsx)(un,{label:"Sort",value:i,options:e,onChange:e=>{o(e),u(null)}}),(0,j.jsx)(un,{label:"Time",value:s,options:r,onChange:e=>{p(e),u(null)}}),(0,j.jsx)("button",{onClick:()=>q(l.o0.listposts),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{backgroundColor:"#27272A",color:"#A1A1AA"},children:"Edit Keyword Lists"}),(0,j.jsx)("button",{onClick:()=>q(l.o0.peopleLists),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{backgroundColor:"#27272A",color:"#A1A1AA"},children:"Edit People Lists"}),(0,j.jsx)("button",{onClick:()=>C(!0),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{backgroundColor:"#27272A",color:"#A1A1AA"},children:"Comment Replies"})]}),w&&(0,j.jsx)("div",{className:"fixed inset-0 flex items-start sm:items-center justify-center bg-black/50 z-[999999] p-4",children:(0,j.jsxs)("div",{className:"bg-white w-full sm:w-2/3 h-[95vh] overflow-y-auto rounded-lg p-6 relative",children:[(0,j.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-6",children:[(0,j.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,j.jsx)("button",{onClick:()=>E("all"),className:"px-3 py-1 rounded font-medium text-sm transition ".concat("all"===k?"bg-blue-600 text-white":"bg-gray-200 text-gray-700"),children:"All Comments"}),(0,j.jsx)("button",{onClick:()=>E("replied"),className:"px-3 py-1 rounded font-medium text-sm transition ".concat("replied"===k?"bg-blue-600 text-white":"bg-gray-200 text-gray-700"),children:"Replied Comments"})]}),(0,j.jsx)("button",{onClick:()=>C(!1),className:"self-start sm:self-auto px-3 py-1 bg-gray-200 rounded hover:bg-gray-300 transition text-sm",children:"Close"})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h3",{className:"text-lg font-semibold text-gray-800 my-4 text-center",children:"all"===k?"Here are all your comments":"Here are all your comments that have replies"}),(0,j.jsxs)("div",{className:"grid gap-2 grid-cols-1",children:[0===P.length&&!Z&&(0,j.jsx)("p",{className:"text-center text-gray-500 py-4",children:"No comments found"}),$.map((e=>(0,j.jsx)(tn,{commentId:e.id,postId:e.post_id,social_id:e.post_urn,text:e.text,author:e.author,replyCount:e.reply_counter,openCommentId:F,setOpenCommentId:T,openPostId:Y,setOpenPostId:Q},e.id))),Z&&(0,j.jsxs)("div",{className:"flex flex-col items-center justify-center py-6",children:[(0,j.jsx)("div",{className:"w-8 h-8 border-4 border-blue-600 border-t-transparent roun
1ded-full animate-spin mb-3"}),(0,j.jsx)("p",{className:"text-blue-600 text-sm font-medium",children:"Loading comments..."})]}),R&&!Z&&(0,j.jsx)("div",{className:"flex justify-center mt-4",children:(0,j.jsx)("button",{onClick:()=>G(),className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition",children:"Load More Comments"})})]})]})]})})]})}return(0,j.jsxs)("div",{style:{fontFamily:'"Exo 2", serif'},children:[(0,j.jsxs)("div",{style:{textAlign:"left"},children:[(0,j.jsx)("div",{style:{textAlign:"center"},children:(0,j.jsxs)("h2",{style:{marginBottom:"0.5rem"},children:["Your Customized ",on.c," Feed"]})}),(0,j.jsxs)("div",{style:{fontSize:"15px",color:"gray"},children:["We\u2019ve set up a customized ",on.c," feed for you. Start by writing your first comment, then create your own list to see even more relevant content!"]})]}),(0,j.jsxs)("div",{style:dn,children:[_.keywordList&&(0,j.jsx)("div",{onClick:()=>q(l.o0.listposts),style:cn,children:"Add/Edit keyword lists"}),_.peopleList&&(0,j.jsx)("div",{onClick:()=>q(l.o0.peopleLists),style:cn,children:"Add/Edit people\u2019s lists"}),_.myPosts&&(0,j.jsx)("div",{onClick:()=>{f(),"myPosts"!==g&&(x(""),t(""),u(null))},style:"myPosts"===g?pn:cn,children:"myPosts"===g?"Back to Default Feed":"Show My Posts"}),(0,j.jsx)("div",{onClick:()=>C(!0),style:cn,children:"Comment Replies"}),w&&(0,j.jsx)("div",{className:"fixed inset-0 flex items-start sm:items-center justify-center bg-black/50 z-[999999] p-4",children:(0,j.jsxs)("div",{className:"bg-white w-full sm:w-2/3 h-[95vh] overflow-y-auto rounded-lg p-6 relative",children:[(0,j.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-6",children:[(0,j.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,j.jsx)("button",{onClick:()=>E("all"),className:"px-3 py-1 rounded font-medium text-sm transition ".concat("all"===k?"bg-blue-600 text-white":"bg-gray-200 text-gray-700"),children:"All Comments"}),(0,j.jsx)("button",{onClick:()=>E("replied"),className:"px-3 py-1 rounded font-medium text-sm transition ".concat("replied"===k?"bg-blue-600 text-white":"bg-gray-200 text-gray-700"),children:"Replied Comments"})]}),(0,j.jsx)("button",{onClick:()=>C(!1),className:"self-start sm:self-auto px-3 py-1 bg-gray-200 rounded hover:bg-gray-300 transition text-sm",children:"Close"})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h3",{className:"text-lg font-semibold text-gray-800 my-4 text-center",children:"all"===k?"Here are all your comments":"Here are all your comments that have replies"}),(0,j.jsxs)("div",{className:"grid gap-2 grid-cols-1",children:[0===P.length&&!Z&&(0,j.jsx)("p",{className:"text-center text-gray-500 py-4",children:"No comments found"}),$.map(((e,n)=>(0,j.jsx)(tn,{commentId:e.id,postId:e.post_id,social_id:e.post_urn,text:e.text,author:e.author,replyCount:e.reply_counter,openCommentId:F,setOpenCommentId:T,openPostId:Y,setOpenPostId:Q}))),Z&&(0,j.jsxs)("div",{className:"flex flex-col items-center justify-center py-6",children:[(0,j.jsx)("div",{className:"w-8 h-8 border-4 border-blue-600 border-t-transparent rounded-full animate-spin mb-3"}),(0,j.jsx)("p",{className:"text-blue-600 text-sm font-medium",children:"Loading comments..."})]}),R&&!Z&&(0,j.jsx)("div",{className:"flex justify-center mt-4",children:(0,j.jsx)("button",{onClick:()=>G(),className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition",children:"Load More Comments"})})]})]})]})})]}),(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:"1rem 0 0 0",gap:"1rem"},children:[_.keywordList&&(0,j.jsxs)("select",{value:n,onChange:e=>{x(""),t(e.target.value),u(null),"myPosts"===g&&f()},style:rn,disabled:W,children:[W&&(0,j.jsx)("option",{children:"Loading..."}),!W&&U.map(((e,n)=>(0,j.jsx)("option",{value:e.keywords,children:e.list_name},e.id)))]}),(0,sn.t)(y)&&_.peopleList&&(0,j.jsxs)("select",{value:A,onChange:e=>{t(""),x(e.target.value),u(null),"myPosts"===g&&f()},style:ln,disabled:V,children:[V&&(0,j.jsx)("option",{children:"Loading..."}),!V&&J.map(((e,n)=>(0,j.jsx)("option",{value:e.id,children:e.list_name},e.id)))]}),(0,j.jsx)("select",{value:i,onChange:e=>{o(e.target.value),u(null)},style:an,children:[{name:"Relevance",value:"relevance"},{name:"Date",value:"date"}].map(((e,n)=>(0,j.jsx)("option",{value:e.value,children:e.name},n)))}),(0,j.jsx)("select",{value:s,onChange:e=>{p(e.target.value),u(null)},style:an,children:[{name:"Date Posted",value:""},{name:"Past Day",value:"past_day"},{name:"Past Week",value:"past_week"},{name:"Past Month",value:"past_month"}].map(((e,n)=>(0,j.jsx)("option",{value:e.value,children:e.name},n)))})]})]})};var xn;
1const mn=s.ZP.div(xn||(xn=(0,i.Z)(['\n font-size: 16px;\n font-family: "Exo 2", serif;\n']))),hn=e=>{let{text:n}=e;const[t,i]=(0,r.useState)(!1),[o,s]=(0,r.useState)(!1),l=(0,r.useRef)(null),a=(0,r.useCallback)((()=>{if(l.current){const e=l.current.scrollHeight,n=l.current.clientHeight;s(e>5*(n/5))}}),[]);return(0,r.useEffect)((()=>{a()}),[n,a]),(0,j.jsxs)("div",{children:[(0,j.jsx)(mn,{ref:l,style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t?"unset":5,overflow:"hidden",lineHeight:"1.4rem",wordWrap:"break-word"},dangerouslySetInnerHTML:{__html:n}}),o&&(0,j.jsx)("div",{onClick:()=>i(!t),style:{marginTop:"2px",color:"gray",cursor:"pointer",background:"none",border:"none",fontSize:"12px"},children:t?"... Show Less":"... Show More"})]})};const gn=t.p+"static/media/open.70cfe75e3c2dcb9d2c362bfd6097c1fd.svg";var fn=t(33300),vn=t(92892),bn=t(94308),yn=t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7l6Hc2Pj0rwiRB4y/P3kN8CBJh1h0F3U6qxhefRxqQO/IztXomhqhMLE0vV/vTfNJq2k/So4aZQtSZJMJEqFmdbINrRNoCEBSiuse16pnQY6Ye7oTxvbABSw/xSQax9jQ9Lx6SBzYzleMB5HIUjTX4bX64sy01IBzf0Y1NotcMdhy3CgwnNRv8vRG214Bw7K4N2a4BwSlE2g6zp1/YQUYF0LFLiGwJEHQ32sF0wkurZEUAnXSFyLQAVOKh4bAGuclqMi1dsiqATsHO5m1MUR6x8tz5cDImAGMtPII7mElXY8aUCKCT9zfNHqhKDa1bbbR0cjS2CsCNzph0Kpul3YgpFSAcXQxZYjX8cC3/12KeSpqOAIzBy39sC5h6WoXz5FQaPZycESCasseby3xDqJKgVMkK82hMWjK+apGpy6KGc2LAqJ//KC93KV0aaCkArT0AR3uuGDyaPwHFwYtSnUuerQAAAABJRU5ErkJggg==";var wn=t(54164);t(79575);const Cn=t.p+"static/media/influencer-badge.7f62b678b62ca83052ebd4890e9d80de.svg",kn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAjCAYAAADmOUiuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAbTSURBVHgBvVddTFNnGH5PSyvQYg/MONAA7WJ24ag0WbYMASlXc6iTZUucsgS4mKh1EW78IVnAZEO7GzDBuWwXQOTHLMuGA9E7KhSzmCUUq8kSt/VPwc1JT9EKpZ5z9r6nP7T8aEHwSd6cc77f53u/93u+9zCQIFiEDAKVAIwBzUhFYeNEABsDokUAoYPjZpzwKkHEMlh1o0672Ws6clDs7uoU3S6n6OM4kUBP6/CQaDpSIxq2bRXTWdUgy6qN8CqQwapq0bz1p45HCb0ItAAimsGmOlg2WQtrAXSa9jX0xJ7dO9FbLnEliBBFbzbCaoLIodcc311oFV8WtLgdxQXoTVUbrAYi5Hq6Ly45Kcd5RRfGYKxR2fNA8blSkkwMOTylwdGmM2ZtzSETWK3DcN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/1+T52u1BaNTymboTjp67tqWFy7Xh7c3a9AmbYVZIqM57YTcAF+T6fN73eURkiSDgKevHNmcxOsBfzjPyZETiKDbdS5nxvUqZui12k0H6Rso7PzkrZs125YLfAz4+C/3wlK9l3p23fXDDMPr4F8XSaositB5J9A4NEIzE7ZQLneAOl5zVK7oP9P8P19vjQbY1IWGUwOTPVRU03cLfCy8E/8HCU367NJ5Aiq7Crcyg7JUrI+DtUjyel/Q/UK1RZQKjWV9B4l+B9muV6fr45S89UiKQQeRN95fCdiZMr1+ZC8cSeS+wSSkjNBrTsqlcdCoXm7PI4ggeP8LR63q3E1SUYgk6slD5FN3qkD8dljybx/fAlPx3+Kem+ug4JdQJAwyT09HSHZ090JKwVdZ1NT/uj3uteKIBW9Rl6VjPeHLPxNdSloCxa22OBE0uWe0JlMh5z4yyj94S2HmPlsExjy3wL3vftxdXQw1PO2kpCKW011sRCDU5LMJC01EWYmTnzounu6qnp6uhowQdCWle2WfikpWYj8UhIhKduxWuGGdQiuDPTTN2bffOObmx4ZRX66kZGnxJHkZx6AGP5WpG6BNJ1pwfz89L1eejKQIDbgf4YA8nJK13FwLYRMWkvIRAuajVL7SEI7MWjQJr/+viN5ka2jmOMD/4AKTzGTpI6rC3hvwvTEJWPWjtHrCRNcKR7cMDanab+olSlfLNQEYRZvE3d7+8b3+qrpWwZrjMztlrrHrh8sNPGLgOEA/nt41U176iJla06QkFlwrdTvudhCW7cU6PZ44rjQHnsPE9Z8i2NBMSlPyW6Qp2QZGEW69FcnCk+dPGfv5QVfL8Xc/D7/A7x8rZ0H5lvCAAAAAElFTkSuQmCC";const En=t.p+"static/media/menu.e741c66671e081d9a82eb9ea44d591a1.svg";const In=t.p+"static/media/menu-close.4dea5d8bf14673bd8d5057e8ea04f86a.svg";const Pn=t.p+"static/media/logo-small.fe5e828405219355f7310b37a2ada033.svg";var Sn,Bn,Dn,Rn,Nn,Zn,Mn,Fn,Tn,Yn,Qn,Ln,zn,Gn,Un,Hn,Wn,On,Jn,Kn=t(66254),Vn=t(79737),Xn=t(20368);const qn=s.ZP.div(Sn||(Sn=(0,i.Z)(["\n max-width: 389px;\n width: 100%;\n height: max-content;\n border-radius: 45px;\n border: 8px solid #ebebeb;\n background: var(--w, #fff);\n box-shadow: 0px 20px 56px 0px rgba(0, 0, 0, 0.16);\n @media only screen and (max-width: 991px) {\n max-width: 89%;\n margin: auto;\n }\n @media only screen and (max-width: 1322px) {\n width: 326px;\n flex-shrink: 0;\n ","\n }\n"])),""),_n=s.ZP.div(Bn||(Bn=(0,i.Z)(["\n border-radius: 32px 32px 0px 0px;\n background: radial-gradient(\n 142.67% 120.19% at 91.93% 3.53%,\n #d0e5ff 0%,\n #bfd3ec 0.01%,\n #dedede 48.92%,\n #dcecff 91.67%\n );\n & > h2 {\n color: #4b4b4b;\n font-family: Space Grotesk;\n font-size: 26px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n text-transform: uppercase;\n /* padding: 41px 105px 55px 103px; */\n margin: 0px;\n text-align: center;\n min-height: 105px;\n display: flex;\n justify-content: center;
1\n align-items: center;\n }\n"]))),$n=s.ZP.img(Dn||(Dn=(0,i.Z)(["\n width: 14px !important;\n height: 14px !important;\n"]))),et=s.ZP.div(Rn||(Rn=(0,i.Z)(["\n display: flex;\n gap: 5px;\n align-items: center;\n"]))),nt=s.ZP.div(Nn||(Nn=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 20px;\n @media only screen and (max-width: 480px) {\n padding: 15px;\n }\n"]))),tt=s.ZP.div(Zn||(Zn=(0,i.Z)(["\n font-family: Space Grotesk;\n font-size: 16px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: 0em;\n text-align: left;\n color: #12100b;\n"]))),it=s.ZP.div(Mn||(Mn=(0,i.Z)(["\n color: #000;\n font-family: Space Grotesk;\n font-size: 19.5px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%;\n margin-top: 20px;\n text-align: center;\n > span {\n color: #000;\n text-align: center;\n font-family: Space Grotesk;\n font-size: 20px;\n font-style: normal;\n font-weight: 700;\n line-height: 150%; /* 30px */\n text-decoration-line: line-through;\n }\n"]))),ot=s.ZP.a(Fn||(Fn=(0,i.Z)(['\n background: #ff2400;\n border-radius: 500px;\n padding: 16px 60px;\n color: #fff;\n font-family: "Space Grotesk", sans-serif;\n font-style: normal;\n font-weight: 700;\n font-size: 15px;\n line-height: 30px;\n outline: 6px solid rgba(255, 36, 0, 0.33);\n transition: 0.4s;\n text-transform: capitalize;\n min-width: 100px;\n display:inline-block;\n \n &.block {\n display: block;\n color: white;\n }\n &.cancel {\n background: transparent;\n color: #fff;\n outline: 6px solid rgba(255, 255, 255, 0.33);\n &.block {\n background: #0050b2;\n outline: 6px solid rgba(0, 36, 255, 0.33);\n &:hover {\n background-color: transparent;\n }\n }\n }\n &.loading {\n background-color: #fedd00;\n outline: 6px solid rgba(254, 221, 0, 0.42);\n transition: 0.4s;\n padding: 16px 60px;\n }\n &:hover {\n transition: 0.4s;\n background: var(--white);\n color: #ff2400;\n cursor: pointer;\n }\n\n span {\n display: inline-block;\n }\n\n @media only screen and (max-width: ',") {\n padding: 12px 20px;\n text-align: center;\n outline: 3px solid rgba(255, 255, 255, 0.42);\n font-size: 16px;\n line-height: 25px;\n }\n"])),yn.dp.maxWidthTablet),st=s.ZP.p(Tn||(Tn=(0,i.Z)(['\n font-family: "Roboto", sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 1rem;\n line-height: 26px;\n text-align: ',";\n margin-top: ",";\n &.block {\n margin-top: 0;\n }\n &.plan {\n font-size: 1.2rem;\n }\n"])),(e=>e.isButton?"center":"left"),(e=>e.isButton?"15px":"0")),rt=(s.ZP.div(Yn||(Yn=(0,i.Z)(["\n color: #333;\n text-align: center;\n font-family: Space Grotesk;\n font-size: 16px;\n font-style: normal;\n font-weight: 700;\n line-height: 134.1%;\n letter-spacing: -0.8px;\n text-transform: capitalize;\n margin: 15px 0 0;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 6px;\n"]))),s.ZP.div(Qn||(Qn=(0,i.Z)(["\n border-radius: 45px;\n border: 8px solid #ebebeb;\n box-shadow: 0px 20px 56px 0px rgba(0, 0, 0, 0.16);\n max-width: 389px;\n width: 100%;\n position: relative;\n overflow: hidden;\n background: #fff;\n @media only screen and (max-width: 991px) {\n max-width: 89%;\n margin: auto;\n }\n @media only screen and (max-width: 1322px) {\n width: 306px;\n box-sizing: border-box;\n }\n"])))),lt=s.ZP.div(Ln||(Ln=(0,i.Z)(["\n border-radius: 40px 40px 0px 0px;\n\n background: radial-gradient(\n 142.67% 120.19% at 91.93% 3.53%,\n #0050b2 0%,\n #2c281f 0.01%,\n #1f1b13 48.92%,\n #12100b 100%\n );\n height: 119px;\n color: var(--w, #fff);\n font-family: Space Grotesk;\n font-size: 26px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n text-transform: uppercase;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n ","\n\n >span{\n font-size: 16px;\n margin-top:4px;\n display:block;\n }\n"])),""),at=(s.ZP.div(zn||(zn=(0,i.Z)(["\n background: #ff2400;\n padding: 6px;\n -webkit-transform: rotate(37deg);\n -ms-transform: rotate(37deg);\n -webkit-transform: rotate(37deg);\n -ms-transform: rotate(37deg);\n transform: rotate(37deg);\n position: absolute;\n top: 26px;\n width: 45%;\n right: -46px;\n text-align: center;\n font-size: 13px;\n font-style: normal;\n font-weight: 100;\n line-height: normal;\n text-transform: uppercase;\n font-family: Space Grotesk;\n @media only screen and (max-width: 1323px) {\n top: 16px;\n width: 38%;\n right: -28px;\n font-size: 8px;\n }\n @media only screen and (max-width: 1200px) {\n position: absolute;\n top: 15px;\n width: 47%;\n right: -35px;\n text-align: center;\n font-size: 7px;\n }\n @media only screen and (max-width: 991px) {\n font-size: 13px;\n position: absolute;\n top: 30px;\n width: 200px;\n right: -46px;\n text-align: center;\n }\n\n @media only screen and (max-width: 480px) {\n font-size: 9px;\n top: 19px;\n width: 53%;\n text-align: center;\n }\n"]))),s.ZP.div(Gn||(Gn=(0,i.Z)(["\n color: #000;\n text-align: center;\n font-family: Inter;\n font-size: 15px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;
1\n"])))),dt=s.ZP.div(Un||(Un=(0,i.Z)(["\n display: flex;\n justify-content: center;\n gap: 20px;\n flex-wrap: wrap;\n margin-top: 18px;\n"]))),ct=(s.ZP.div(Hn||(Hn=(0,i.Z)(["\n display: flex;\n align-items: center;\n gap: 3px;\n"]))),s.ZP.div(Wn||(Wn=(0,i.Z)(["\n border-radius: 40px 40px 0px 0px;\n background: radial-gradient(\n 96.02% 97.16% at 23.13% 29.46%,\n #0050b2 0%,\n #0a66c2 70.17%,\n #0050b2 100%\n );\n height: 119px;\n color: var(--w, #fff);\n font-family: Space Grotesk;\n font-size: 26px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n text-transform: uppercase;\n display: flex;\n justify-content: center;\n align-items: center;\n"])))),pt=s.ZP.div(On||(On=(0,i.Z)(["\n ","\n\n @media only screen and (max-width: 767px) {\n margin-top: 0px;\n }\n"])),""),ut=(s.ZP.div(Jn||(Jn=(0,i.Z)(['\n max-width: 1233px;\n display: flex;\n width: 100%;\n margin: auto;\n justify-content: center;\n\n@media only screen and (max-width:767px){\n padding:0px;\n display:flex;\n justify-content:center;\n margin-bottom:40px;\n}\n .toggle-container {\n display: flex;\n align-items: center;\n gap: 10px;\n width: max-content;\n}\n\n.toggle {\n position: relative;\n display: inline-block;\n width: 54px;\n height: 28px;\n}\n\n.toggle input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n transition: 0.4s;\n border-radius: 34px;\n}\n\n.slider:before {\n position: absolute;\n content: "";\n height: 20px;\n width: 20px;\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: 0.4s;\n border-radius: 50%;\n}\n\ninput:checked + .slider {\n background-color: #2196f3;\n}\n\ninput:checked + .slider:before {\n transform: translateX(26px);\n}\n\n.toggle-label {\n font-size: 20px;\n font-weight: bold;\n color:#fff;\n\n @media only screen and (max-width:767px){\n font-size: 12px;\n }\n}\n\n']))),e=>{let{setOpenPlansPopup:n,userData:t}=e;const[i,o]=(0,r.useState)(""),[s,d]=(0,r.useState)(""),[c,p]=(0,r.useState)(!1),[u,A]=(0,r.useState)(!1),[x,m]=(0,r.useState)(!1),h=localStorage.getItem("endorsely_referral");return(0,j.jsxs)("div",{className:"modalOverlay",style:{zIndex:"9999"},children:[(0,j.jsxs)("div",{className:"modalContent",onClick:e=>e.stopPropagation(),children:[(0,j.jsx)("div",{className:"modalHeader",onClick:()=>n(!1),children:(0,j.jsx)("span",{className:"closeButton",children:"\xd7"})}),(0,j.jsx)("div",{className:"planInnermodal",children:(0,j.jsxs)("div",{className:"planWrapperDiv",children:[!("starter"===(null===t||void 0===t?void 0:t.plan)&&!0===(null===t||void 0===t?void 0:t.paidStatus)||"professional"===(null===t||void 0===t?void 0:t.plan)&&!0===(null===t||void 0===t?void 0:t.paidStatus))&&(0,j.jsxs)(qn,{children:[(0,j.jsx)(_n,{children:(0,j.jsx)("h2",{children:"Starter plans"})}),(0,j.jsxs)(nt,{children:[(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:" 300 comments/month"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"1 emotion"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"TextTune\u2122 - only short comments"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"GenuYou\u2122 - turn your ideas into comments "})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"Multi-language support"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"Standard support"})]}),(0,j.jsxs)(it,{children:[" "," Just $19/month"]}),(0,j.jsx)(st,{isButton:!0,children:(0,j.jsx)(ot,{className:x?"loading":"",onClick:()=>{m(!0);const e=h||(0,Xn.A)();a.I.post("".concat(l.vc.urlPlatform,"/api/v2/payment/subscription"),{withCredentials:!0},{email:null===t||void 0===t?void 0:t.email,subscriptionId:null===t||void 0===t?void 0:t.stripeId,plan:"starter",endorsely_referral:e}).then((e=>{if(m(!1),200!==e.status)throw new Error("error");!1===e.data.success?o(e.data.message):(window.location.replace(e.data.url),d("Successfully upgraded subscription!"),localStorage.setItem("subscription","pro"))})).catch((e=>{m(!1),o("There was an issue subscribing. Please contact us!")}))},children:x?(0,j.jsx)(Vn.a,{}):"UPGRADE ME TO STARTER"})})]})]}),(0,j.jsxs)(rt,{children:[(0,j.jsxs)(lt,{children:["Influencer PLAN",(0,j.jsx)("span",{children:"(customize your prompt)"}),(0,j.jsxs)("span",{children:["(personalize your ",on.c," newsfeed)"]})]}),(0,j.jsxs)(nt,{children:[(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"3000 comments/month "})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"5 emotions (+Natural\u2122 emotion)"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"Full TextTune\u2122 - short & long comments"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"GenuYou\u2122 - turn your ideas into comments"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"Multi-language support"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"VIP support"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"SmartReply+\u2122 - reply to comments"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:"+Customize your prompt & voice"})})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:"+Posts feature - personalized newsfeed"})})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:"+Engagement list - unlimited"})})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:"+13 commenting styles"})})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:'+eBook - "All-in-one LI personal branding"'})})]}),(0,j.jsxs)(it,{children:[" ",(0,j.jsx)("span",{children:"$111"})," $37/month"]}),(0,j.jsx)(at,{children:"(less than a cup of coffee per day)"}),(0,j.jsx)(st,{isButton:!0,children:(0,j.jsx)(ot,{className:c?"loading":"",onClick:()=>{p(!0);const e=h||(0,Xn.A)();a.I.post("".concat(l.vc.urlPlatform,"/api/v2/payment/subscription"),{withCredentials:!0},{email:null===t||void 0===t?void 0:t.email,subscriptionId:null===t||void 0===t?void 0:t.stripeId,plan:"proMonth",endorsely_referral:e}).then((e=>{if(p(!1),200!==e.status)throw new Error("error");!1===e.data.success?o(e.data.message):(window.location.replace(e.data.url),d("Successfully upgraded subscription!"),localStorage.setItem("subscription","pro"))})).catch((e=>{A(!1),o("There was an issue subscribing. Please contact us!")}))},children:c?(0,j.jsx)(Vn.a,{}):"UPGRADE ME TO INFLUENCER"})}),(0,j.jsx)(dt,{})]})]}),!("professional"===(null===t||void 0===t?void 0:t.plan)&&!0===(null===t||void 0===t?void 0:t.paidStatus))&&(0,j.jsxs)(qn,{children:[(0,j.jsx)(ct,{children:"Creator PLAN"}),(0,j.jsxs)(nt,{children:[(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"900 comments/month "})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"3 emotions"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:" Full TextTune\u2122 - short and long comments"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"GenuYou\u2122 - turn your ideas into comments"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"Multi-language support."})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:"Priority support"})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:"+SmartReply+\u2122- basic comment replies"})})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:"+5 commenting styles"})})]}),(0,j.jsxs)(et,{children:[(0,j.jsx)($n,{src:Kn}),(0,j.jsx)(tt,{children:(0,j.jsx)("strong",{children:"+Engagement list - up to 40."})})]}),(0,j.jsxs)(it,{children:[" ",(0,j.jsx)("span",{children:"$81"})," $27/month"]}),(0,j.jsx)(pt,{children:(0,j.jsx)(st,{isButton:!0,children:(0,j.jsx)(ot,{className:u?"loading":"",onClick:()=>{A(!0);const e=h||(0,Xn.A)();a.I.post("".concat(l.vc.urlPlatform,"/api/v2/payment/subscription"),{withCredentials:!0},{email:null===t||void 0===t?void 0:t.email,subscriptionId:null===t||void 0===t?void 0:t.stripeId,plan:"professional",endorsely_referral:e}).then((e=>{if(A(!1),200!==e.status)throw new Error("error");!1===e.data.success?o(e.data.message):(window.location.replace(e.data.url),d("Successfully upgraded subscription!"),localStorage.setItem("subscription","pro"))})).catch((e=>{p(!1),o("There was an issue subscribing. Please contact us!")}))},children:u?(0,j.jsx)(Vn.a,{}):"UPGRADE ME TO CREATOR"})})})]})]})]})})]}),(0,j.jsx)("style",{children:"\n .modalOverlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n align-items: start;\n justify-content: center;\n z-index: 99;\n {/* padding-top: 40px; */}\n }\n\n .modalContent {\n background: #fff0;\n padding: 20px;\n border-radius: 8px;\n width: 100%;\n /* margin: 40px auto; */\n height: calc(100vh - 35px);\n overflow-y: auto;\n }\n\n .modalHeader {\n display: flex;\n justify-content: flex-end;\n }\n\n .closeButton {\n cursor: pointer;\n font-size: 30px;\n color: #fff;\n }\n\n .openButton {\n margin-top: 20px;\n cursor: pointer;\n }\n .planWrapperDiv{\n display:flex;\n justify-content: center;\n gap: 10px;\n margin-top: 50px;\n }\n ::-webkit-scrollbar {\n width: 0px;\n }\n\n .planInnermodal{\n position:relative;}\n\n @media only screen and (max-width:1023px){\n .planWrapperDiv {\n flex-direction: column;\n }\n .planWrapperDiv >div {\n width: 100%;\n margin: auto;\n max-width: 100%;\n box-sizing:border-box;\n }\n }\n }\n\n @media only screen and (max-width:767px){\n .modalContent {\n height: 600px;\n }\n }\n "})]})});var At,xt,mt;const ht=(0,s.F4)(At||(At=(0,i.Z)(["\n 0% { opacity: 0.2; transform: translateY(0); }\n 50% { opacity: 1; transform: translateY(-5px); }\n 100% { opacity: 0.2; transform: translateY(0); }
1\n"]))),gt=(s.ZP.div(xt||(xt=(0,i.Z)(["\n position: absolute;\n top: ",";\n left: ",";\n bottom: ",";\n right: ",";\n font-size: 2rem;\n color: orange;\n z-index: 9999;\n animation: "," 1s infinite;\n pointer-events: none;\n height:fit-content;\n width:fit-content;\n"])),(e=>e.t||"0"),(e=>e.l||"0"),(e=>e.b||"0"),(e=>e.r||"0"),ht),s.ZP.div(mt||(mt=(0,i.Z)(["\n position: absolute;\n top: ",";\n left: ",";\n bottom: ",";\n font-size: 2rem;\n color: orange;\n z-index: 1;\n animation: ",' 1s infinite;\n pointer-events: none;\n\n &::after {\n content: "\ud83d\udc48";\n }\n \n @media (max-width: 500px) {\n top: -15px;\n left: 0;\n &::after {\n content: "\ud83d\udc47";\n }\n }\n'])),(e=>e.t||"0"),(e=>e.l||"0"),(e=>e.b||"0"),ht));var ft=t(20911);const vt=()=>(0,j.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,j.jsx)("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),bt=e=>{var n,t,i,o;let{postData:s,setOpenCommentPostId:d,setCommentsLeft:c,openCommentPostId:p,getRemainingComments:u,customPrompt:A,userData:x,onPostComment:m,copyBtnRef:h,setShowHandIconAfterCopy:g,iconRef:f}=e;const v=r.useRef(null),[b,y]=(0,r.useState)(null===(n=null===(t=JSON.parse(localStorage.getItem("menuoptions")))||void 0===t?void 0:t.autogen)||void 0===n||n?"Thinking...":""),[w,C]=(0,r.useState)(A?"custom":"creative"),[k,E]=(0,r.useState)("short"),[I,P]=(0,r.useState)("basic"),[S,B]=(0,r.useState)(!1),[D,R]=(0,r.useState)(!1),[N,Z]=(0,r.useState)(""),[M,F]=(0,r.useState)(!1),[T,Y]=(0,r.useState)([]),[Q,L]=(0,r.useState)(!1),[z,G]=(0,r.useState)(!1),[U,H]=(0,r.useState)(!1),[W,O]=(0,r.useState)(!1),J=!(null===f||void 0===f||!f.current),[K,V]=(0,r.useState)({top:80,left:100});(0,r.useEffect)((()=>{if(!J||null===f||void 0===f||!f.current)return;const e=()=>{const e=f.current.getBoundingClientRect();let n=e.right+15,t=e.top-50;n+510>window.innerWidth&&(n=Math.max(10,e.left-515)),n<10&&(n=10),window.innerWidth<520&&(n=Math.max(10,(window.innerWidth-Math.min(500,window.innerWidth-20))/2)),t=Math.max(10,Math.min(t,window.innerHeight-600)),V({top:t,left:n})};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}),[J,f]),(0,r.useEffect)((()=>{const e=e=>{if(v.current&&!v.current.contains(e.target)){if(null!==f&&void 0!==f&&f.current&&f.current.contains(e.target))return;d(null)}};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[d,f]);const[X,q]=(0,r.useState)(null===(i=null===(o=JSON.parse(localStorage.getItem("menuoptions")))||void 0===o?void 0:o.autogen)||void 0===i||i);(0,r.useEffect)((()=>{localStorage.setItem("menuoptions",JSON.stringify({autogen:X}))}),[X]),(0,r.useEffect)((()=>{(async()=>{try{const e=await fetch("".concat(l.vc.urlPlatform,"/api/v2/auth/user?email=").concat(x.email),{credentials:"include"});if(!e.ok)throw new Error("Failed to fetch user details");const n=await e.json();n.useCustomPrompt&&C("custom"),"function"===typeof G&&G(n)}catch(e){console.error("Error fetching user details:",e)}})()}),[]);const _=e=>{C(e)};(0,r.useEffect)((()=>{C(A?"custom":"creative")}),[A]);const $=async()=>{try{var e,n,t;g(!1),y("Thinking..."),O(!1),R(!0),F(!1);const o=await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/plugin/commentForWebsite"),{withCredentials:!0},{prompt:"".concat(null===s||void 0===s||null===(e=s.author)||void 0===e?void 0:e.name," ").concat(null===s||void 0===s?void 0:s.text),postAuthor:null===s||void 0===s||null===(n=s.author)||void 0===n?void 0:n.name,userHeadline:(null===z||void 0===z?void 0:z.headline)||"",userProfileLink:(null===z||void 0===z?void 0:z.linkedInUrl)||"",keywords:T,emotion:w,platform:"LinkedIn",style:k,emotionNew:re.value||"",rewrite:S});var i;if(null!==o&&void 0!==o&&null!==(t=o.data)&&void 0!==t&&t.success)Z(null===o||void 0===o||null===(i=o.data)||void 0===i?void 0:i.message),y(""),F(!0),B(!0),u()}catch(d){var o,r;O(!0),y((null===d||void 0===d||null===(o=d.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.message)||"Failed to generate comment")}finally{R(!1),L(!0)}};function ee(e,n){return Math.floor(Math.random()*(n-e+1))+e}(0,r.useEffect)((()=>
1{if(M&&N.length>0){let e=0,n="";y("|");const t=setInterval((()=>{e<N.length?(n+=N[e],y(n+"|"),e++):(clearInterval(t),F(!1),y(n))}),7);return()=>clearInterval(t)}}),[M,N]),(0,r.useEffect)((()=>{if(p&&X&&z&&!U){const e=0===ee(0,1)?"basic":"bold";P(e);const n="long"===k&&"creative"===w?pe:"short"===k&&"basic"===e&&"creative"===w?ae:"short"===k&&"bold"===e&&"creative"===w?de:ce,t=n[ee(0,n.length-1)];le(t),$(),H(!0)}}),[p,X,z]),(0,r.useEffect)((()=>{H(!1)}),[p]);const[ne,te]=(0,r.useState)(!1),ie=D||M||ne||W||!b,[oe,se]=(0,r.useState)(""),[re,le]=(0,r.useState)({name:"",value:""}),ae=[{name:"",value:""},{name:"Addition",value:"addition"},{name:"Affirmation",value:"affirmation"},{name:"Extension",value:"extension"},{name:"Reinforcement",value:"reinforcement"}],de=[{name:"",value:""},{name:"Simple",value:"basic"},{name:"Supporter",value:"supporting_others"},{name:"The thinger",value:"the_thinger"},{name:"Helper",value:"helper"},{name:"Congratulate",value:"congratulate"},{name:"Shoulder",value:"shoulder"},{name:"Mathematician",value:"mathematician"},{name:"Ifer",value:"ifer"},{name:"Shouldefiter",value:"shouldefiter"},{name:"Shouldenter",value:"shouldenter"},{name:"W_shoulder",value:"w_shoulder"},{name:"O_benefiter",value:"o_benefiter"}],ce=[{name:"",value:""},{name:"The thinger",value:"the_thinger"},{name:"Helper",value:"helper"},{name:"Shoulder",value:"shoulder"}],pe=[{name:"",value:""},{name:"Pros/cons",value:"pros_vs_cons"},{name:"Benefiter",value:"benefiter"},{name:"Doubler",value:"doubler"},{name:"Triple tip",value:"triple_tip"},{name:"Abouter",value:"abouter"},{name:"Contraster",value:"contraster"},{name:"Three_qualiter",value:"three_qualiter"},{name:"Three_two_commenter",value:"three_two_commenter"}],ue="long"===k&&"creative"===w?pe:"short"===k&&"basic"===I&&"creative"===w?ae:"short"===k&&"bold"===I&&"creative"===w?de:ce,[Ae,xe]=(0,r.useState)(!1),[me,he]=(0,r.useState)(!1),[ge,fe]=(0,r.useState)(!1),ve=()=>"free_trial"===(null===x||void 0===x?void 0:x.plan)||(0,sn.t)(x);console.log("GENERATED COMMENT === ",N);return be=(0,j.jsxs)(j.Fragment,{children:[ge&&(0,ft.d)((0,j.jsx)(ut,{setOpenPlansPopup:fe,userData:x})),me&&(0,j.jsxs)("div",{className:"panel",children:[(0,j.jsxs)("div",{className:"header",children:[(0,j.jsxs)("h2",{children:[(0,j.jsx)("img",{id:"commenter-small-logo",src:Pn,alt:"Commenter Logo",width:"20",height:"20"}),"Features"]}),(0,j.jsx)("button",{className:"close-menu",id:"close-settings-menu",onClick:()=>he(!1),children:(0,j.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{position:"absolute",left:"auto",right:"0px",width:"26px",height:"28px",cursor:"pointer",top:"0",bottom:"0",margin:"auto",inset:"0px 7px 4px auto"},children:(0,j.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,j.jsxs)("div",{className:"feature",children:[(0,j.jsxs)("span",{className:"feature-name",children:["Automatic Generation",(0,j.jsx)("span",{className:"info-icon","data-tooltip":"Automatically generate comment when open Commenter AI",children:"\u24d8"})]}),(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,j.jsx)("div",{style:{fontSize:"14px",color:X?"#999":"#0050B2"},children:"OFF"}),(0,j.jsx)("label",{className:"switch",style:{display:"flex",alignItems:"center",margin:"2px 3px"},children:(0,j.jsxs)("div",{children:[(0,j.jsx)("input",{id:"shortLongCheck",type:"checkbox",checked:X,onChange:()=>q(!X)}),(0,j.jsx)("span",{className:"slider roundNew w-color ".concat(X?"":"hover-active")})]})}),(0,j.jsx)("div",{style:{fontSize:"14px",color:X?"#0050B2":"#999"},children:"ON"})]})]})]}),(0,j.jsxs)("div",{ref:v,id:"spm-popover-template",className:"spm-popover-template-style hide-academy-tips",style:J?{width:"500px",maxWidth:"calc(100vw - 20px)",background:"rgba(30, 30, 30, 0.95)",backdropFilter:"blur(10px)",borderRadius:"15px",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.5)",position:"fixed",zIndex:9999,top:"".concat(K.top,"px"),left:"".concat(K.left,"px"),boxSizing:"border-box",overflow:"hidden"}:{width:"500px",maxWidth:"calc(100vw - 20px)",background:"rgba(30, 30, 30, 0.88)",backdropFilter:"blur(10px)",borderRadius:"15p
1x",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.5)",position:"absolute",zIndex:9999,bottom:"45px",right:"50%",transform:"translateX(50%)",boxSizing:"border-box",overflow:"hidden"},children:[(0,j.jsx)("span",{className:"PopoverWrapper"}),(0,j.jsxs)("div",{className:"wrapperContentPopUp",children:[(0,j.jsx)("div",{className:"webui-popover-title",style:{borderBottom:"2px solid rgba(255, 255, 255, 0.1)"},children:(0,j.jsxs)("div",{style:{textAlign:"center",display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative"},children:[(0,j.jsxs)("div",{id:"spm-header-menu",style:{display:"flex",cursor:"pointer",marginLeft:"13px"},onClick:()=>he(!me),children:[(0,j.jsx)("img",{id:"spm-header-menu-icon",src:me?In:En,alt:"Menu Icon",style:{cursor:"pointer",filter:"invert(1)"}}),(0,j.jsx)("span",{style:{color:"#fff",marginLeft:"5px",cursor:"pointer"},children:"Menu"})]}),(0,j.jsx)("img",{style:{width:"200px",height:"59px",objectFit:"contain",Padding:"5px"},id:"spm-header-commenter-logo",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAT8AAABTCAYAAADp5wA+AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAAR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VmtOIpiUwUWkwRosGdk6HTRyg4xDLM8KN6Dd28xGlmiqH6iqsZX+Gg0xrW+Z9W0VZV4JDbAwscwq5AVI34WWrgqDpBZANNebJSEj5KSuSoxw6xeNFgpCE1ZfBWR2zMsP2/h40gtw6xmVozlp540hu+hmjrH57YKy0RsSpvew4ELhmFWjPhZj8LTag3xo0ju1b4fpYVPysHJ0HQHCx/DMMSK8/mR5UfCR6kss6nS/PLEyPDpTmAYhjFZET4/SsS2pkn44v/0tZTwoUV4ZGSIhY9hGCcrzvK79l89qYAHCd8ln6fGMwyzulkZ0V6PZ7uy8DEMk40VZ/kRmoQDF4cHeoFhGMaHFSF+IV1LmDZsQuh6x0UuPMAwzGqhqWV/S6SlNVBhA4ZhmD8Cf0VdcW4/DN4AAAAASUVORK5CYII=",alt:"Commenter Logo"}),(0,j.jsxs)("div",{style:{height:"18px",padding:"5px",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",paddingRight:"50px",width:"18px"},children:[(0,j.jsx)("div",{onClick:()=>window.open("https://commenter.ai/tutorials","_blank"),style:{cursor:"pointer"},children:(0,j.jsx)("img",{id:"spm-header-tutorials-logo",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEEklEQVRYhc3Ya4hVVRQH8N81X6FYjGlNmKT2QjPKzMBKekgUWUYJUQamBmVaRmbkh8oPkRTRgzQqtMTQ7E1EUKQ9iczUosmESskmtJLeVj4w+7D26c6czp259zoj/uGw7j37rL3+e6+9HueU9u7d60BE1+zHQRNeq1X3GIzDGAxHX3TBTjRjNVbiDWyvZeI9L1xUJlYDpmMuDsvd34Y/0Q+npmtaGnsPt+Ljao10qYHQFOzG/ERqKc7HkSihPwahN7pjaNJZL3Z1NdamZzqEWA+8i0WJwM1J72q8ia0FOruxAU/hRAzEKxiBTbhpX4kNwhax4mXohodRa8Q041Lh3m1pjoX1EjtauKEB12FiHYTyWCdc/j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:"5px"}})}),(0,j.jsx)("div",{onClick:e=>{e.stopPropagation(),d(null),c(null)},children:(0,j.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{position:"absolute",left:"auto",right:"0px",width:"26px",height:"28px",cursor:"pointer",top:"0",bottom:"0",margin:"auto",inset:"0px 7px 4px auto"},children:(0,j.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})]})}),(0,j.jsxs)("div",{style:{padding:"9px 14px",background:"rgba(255, 255, 255, 0.10)"},children:[(0,j.jsx)("div",{className:"comment-gen",children:(0,j.jsxs)("div",{className:"spm-pop-header",children:[(0,j.jsx)("div",{className:"spm-pop-mood",children:(0,j.jsxs)("div",{className:"spm-pop-mood-list",children:[(0,j.jsxs)("div",{className:"spm-mood-item-icon-column ".concat("creative"===w?"spm-mood-item-icon-column-active":""),"data-mood":"creative",onClick:()=>{ve()?(le({name:"",value:""}),_("creative")):fe(!0)},style:{cursor:ve()?"pointer":"default"},children:[(0,j.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABICAYAAABLJIP0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAzfHTVMAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlvRkZzAAAAAAAAAAAA2iq2zgAAAAlwSFlzAAALEgAACxIB0t1+/AAAABR0RVh0b2lpbzpDb2xvclNwYWNlAHNSR0JeLUu7AAASXUlEQVR4AQTBDW8b52EA4IfHV8cPnUjqW5Yd2bJlx1EcJ2jTNhuGFh0wFNj2Z/cDtnVFUTRBmyqJoziObCuKYlEWRVPUSTwd7457nhoAAAAAAAAAAAAAAAAgoIkEPaxgAz000UQTkCHFCCkyDHCIEQAAAAAAAAAAAAAAAEANAAAAAAAAAAAAUEOEBhLMo4V5LKCNJtpI0EKMgAgzFMiRYY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o0AAAAAAAAAAAAAACAACES/IJd7OEWbiDG/3iJp/iIBRoAAACAEAAAAAAAUGGI75ghxjXcxA42scAcFdYAAAAAAAAAAAAAAIAQMc7gDu7iHi7jEM/wCK8wRAUAAAAAEAIAAAAAA
1CpMMMUCAU6igxQZMmwhQRsxAtSoAQAAAAAAAAAREmyjh3O4hKu4grPIMMILPMe/6KMCAAAAAIAAAAAAAAAAECNDDzu4jGu4gB6meIt3+A/76KMAAAAAAAAAAGTIcQ7ncRG7aGGAA+zjCw4xxBgLAAAAAACACAAAAAAAALDEEAUGGKICJIjRxUUkyDHAGEusUKHCGjUAYAMhIkQ4hhib6KKHUziJNmb4jLd4gz6WWAMAAAAAAAAEAAAAAAAAAIANREjQQQ85ushwCudxAhEWGOIIBQpMsQQAxEiRIcM2uogwQ4EJvuIDDjDECGOUqNEAAAAAAAAABAAAAAAAAAAAAIAYGbrIcQnXsYMtBCgwxxIl5lgBACK0cBwJEiRYYYBDfMV7vEEfS6wBAAAAAAAAAAACAAAAAAAAAAAAwAYixGgjxSYypEiRYRNbaGMDAQCgQokVaswwxBEmmGGBKcYoUaMBAAAAAAAAAAAIAAAAAAAAAAAAAAAAABHa6CBHjhwdtBEBAEqMUKDEAB8wQIkKAAAAAAAAAAAAAADgJxZNIV++eVtDAAAAAElFTkSuQmCC",alt:"Creative",style:{filter:"invert(1)"}}),(0,j.jsx)("span",{children:"Creative"})]}),(0,j.jsxs)("div",{className:"spm-mood-item-icon-column ".concat("funny"===w?"spm-mood-item-icon-column-active":""),"data-mood":"funny",onClick:()=>{ve()?(le(ce[1]),_("funny")):fe(!0)},style:{cursor:ve()?"pointer":"default"},children:[(0,j.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG8AAABvCAYAAADixZ5gAAABYWlDQ1BJQ0MgUHJvZmlsZQAAeJx1kMFKAlEUhn/TUEohKoJCYjAIAidyDCKohUlEIGGWlO3GcVJhtNvMZLRr1QNUtGnVpnqC3AT1CIFQ0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}),(0,j.jsx)("span",{children:"Funny"})]}),(0,j.jsxs)("div",{className:"spm-mood-item-icon-column ".concat("controversial"===w?"spm-mood-item-icon-column-active":""),"data-mood":"controversial",onClick:()=>{ve()?(le(ce[1]),_("controversial")):fe(!0)},style:{cursor:ve()?"pointer":"default"},children:[(0,j.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAAB+CAYAAAD/cVlWAAABYWlDQ1BJQ0MgUHJvZmlsZQAAeJx1kMFKAlEUhn/TUEohKoJCYjAIAidyDCKohUlEIGGWlO3GcVJhtNvMZLRr1QNUtGnVpnqC3AT1CIFQ0KpVPUBgi5LpXKcaLbpw+D9+zn/u4QAdfpkxzQOgVDb11MKcsJ7ZELwvcGMIPoQwKCsGiyWTCWrBt7a/+j1cXGsinzX7nD4IHb0dBmrDfZELn/i3v+115VRDIf2gkhSmm4Brgji5azLO+8T9Oi1FfMw5b/Ml56zN182e1VSc+I64RynIOeIn4nC2xc+3cEnbUb524Nv71XJ6hXSAKogE5rEEAcuQMIUCRERAW/2TmWxm4tgCwx50FJGnjEn5GDkMGlTiRZShYBxhYommSYjyW/++oeNVzoCZEfrq1PEydKcrDeitON7oNBDYBm6CTNbln8u66h5jMyrZ3F0FOk8s63UN8I4BjQfLeq9aVuMccD8Ct/VPOXxhnn9eMCwAABpISURBVHhe7V0JeFRFtgYRYQRDwntPQUjYXFgFYoiMG7Kqg6yCPj5xiCIz8z1nQCWoD5+jKMvoILgAM+6MI4OKRAUzohIU1FFDTBQNsohJSASdT+mkk7Bl4f3/pSpWLt1915DbnXu/736ddFedOnXqr1OnTlWdatbMf3wJ+BLwJeBLwJeALwFfAr4EfAn4EvAl4EvAl4AvAV8CTUMCzZtGNU+s5YEDB04PBA60wy+nFBR82wOflMWxbt2672HqHj3O+a6pykatd0wDZM+ebzrk5uZeVFRY0P2rr7684Ouvt/cLBivi
1//3D9x2EEE7BZy3eUwVAKA/+Lz9rzzn3nJ1t28aV9e3b54vExKSi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1)"}}),(0,j.jsx)("span",{children:"Controversial"}),Ae&&"custom"===w?(0,j.jsxs)("div",{class:"influencer-popup",children:[(0,j.jsxs)("div",{class:"influencer-header",children:[(0,j.jsxs)("div",{class:"influencer-logo-title",children:[(0,j.jsx)("div",{class:"influencer-logo",children:(0,j.jsx)("img",{src:kn})}),(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{children:(0,j.jsx)("h2",{class:"influencer-h2",children:"Custom"})}),(0,j.jsxs)("div",{class:"influencer-badge",children:[(0,j.jsx)("img",{src:Cn}),"Influencer"]})]})]}),(0,j.jsx)("button",{class:"influencer-close",onClick:e=>{e.stopPropagation(),xe(!1)},children:(0,j.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{position:"absolute",right:"0px",width:"30px",height:"31px",cursor:"pointer",top:"0",bottom:"0",margin:"auto",inset:"0px 7px 4px auto"},children:(0,j.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,j.jsxs)("div",{class:"influencer-text",children:[(0,j.jsx)("div",{children:"The Custom feature allows you to:"}),(0,j.jsxs)("ul",{class:"influencer-ul",children:[(0,j.jsx)("li",{class:"influencer-li",children:"- Personalize your AI prompt"}),(0,j.jsx)("li",{class:"influencer-li",children:"- Get comments that sound even more like you"}),(0,j.jsx)("li",{class:"influencer-li",children:"- Save more time on your commenting"})]}),(0,j.jsx)("p",{class:"influencer-p",children:'You just need to be subscribed to the "Influencer" plan in order to be able to use it!'})]})]}):Ae&&(0,j.jsxs)("div",{class:"influencer-popup",children:[(0,j.jsxs)("div",{class:"influencer-header",children:[(0,j.jsxs)("div",{class:"influencer-logo-title",children:[(0,j.jsx)("div",{class:"influencer-logo",children:(0,j.jsx)("img",{src:kn})}),(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{children:(0,j.jsx)("h2",{class:"influencer-h2",children:"Custom"})}),(0,j.jsxs)("div",{class:"influencer-badge",children:[(0,j.jsx)("img",{src:Cn}),"Influencer"]})]})]}),(0,j.jsx)("button",{class:"influencer-close",onClick:e=>{e.stopPropagation(),xe(!1)},children:(0,j.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{position:"absolute",right:"0px",width:"30px",height:"31px",cursor:"pointer",top:"0",bottom:"0",margin:"auto",inset:"0px 7px 4px auto"},children:(0,j.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,j.jsx)("div",{class:"influencer-text",children:(0,j.jsx)("p",{class:"influencer-p",children:"You haven't enabled this feature. Enable personalization to use it!"})}),(0,j.jsx)("button",{onClick:e=>{e.stopPropagation(),window.open("https://commenter.ai/custom","_blank")},class:"influencer-button",children:"Enable Personalization"})]})]}),(0,j.jsxs)("div",{className:"spm-mood-item-icon-column ".concat("custom"===w?"
1spm-mood-item-icon-column-active":""),"data-mood":"custom",onClick:()=>{ve()?(le({name:"",value:""}),_("custom"),xe(!A)):fe(!0)},style:{cursor:ve()?"pointer":"default"},children:[(0,j.jsx)("img",{src:kn,alt:"Custom",style:{filter:"invert(1)"}}),(0,j.jsxs)("span",{style:{textAlign:"left"},children:["Custom",(0,j.jsxs)("div",{className:"influencer-badge-mood",children:[(0,j.jsx)("span",{children:(0,j.jsx)("img",{src:Cn,alt:"Influencer",width:"10",height:"8"})}),(0,j.jsx)("span",{children:"INFLUENCER"})]})]})]})]})}),(0,j.jsxs)("div",{className:"spm-pop-style",style:{marginBottom:"0px"},children:[(0,j.jsxs)("div",{className:"short-long-container",style:{display:"flex",alignItems:"center"},children:[(0,j.jsx)("div",{children:"Long"}),(0,j.jsxs)("label",{className:"switch",children:[(0,j.jsx)("input",{id:"shortLongCheck",type:"checkbox",checked:"short"===k,onChange:()=>{le({name:"",value:""}),E("short"===k?"long":"short")}}),(0,j.jsx)("span",{className:"slider roundNew w-color"})]}),(0,j.jsx)("div",{children:"Short"})]}),"short"===k&&"creative"===w&&(0,j.jsxs)("div",{className:"bold-basic-container",style:{display:"flex",alignItems:"center"},children:[(0,j.jsx)("div",{children:"Bold"}),(0,j.jsxs)("label",{className:"switch",children:[(0,j.jsx)("input",{id:"boldBasicCheck",type:"checkbox",checked:"basic"===I,onChange:()=>{le({name:"",value:""}),P("basic"===I?"bold":"basic")}}),(0,j.jsx)("span",{className:"slider roundNew w-color"})]}),(0,j.jsx)("div",{children:"Basic"})]}),"custom"!==w&&(0,j.jsxs)("div",{className:"dropdownEmotion",style:{cursor:"pointer"},children:[(0,j.jsxs)("span",{id:"testSpan",children:[null!==re&&void 0!==re&&re.name?null===re||void 0===re?void 0:re.name:"Style/Tone",(0,j.jsx)(vt,{})," "]}),(0,j.jsx)("ul",{children:ue.map(((e,n)=>(0,j.jsx)("li",{children:(0,j.jsx)("a",{href:"#",name:e.value,className:"Option",onClick:n=>{n.preventDefault(),(null===re||void 0===re?void 0:re.value)!==e.value&&le(e)},children:e.name})},n)))})]})]})]})}),(0,j.jsxs)("div",{className:"spm-pop-body",style:{flexDirection:"column"},children:[(0,j.jsxs)("div",{className:"spm-pop-keywords",children:[(0,j.jsx)("form",{onSubmit:e=>{e.preventDefault(),""!==oe.trim()&&void 0===T.find((e=>e===oe))&&(Y([oe,...T]),se(""))},children:(0,j.jsx)("input",{type:"text",name:"keywords",className:"spm-keywords-input",placeholder:"Write your ideas/concepts/keywords here and hit 'Enter'",style:{boxSizing:"border-box",margin:"12px 0"},value:oe,onChange:e=>se(e.target.value)})}),(0,j.jsx)("div",{className:"spm-entered-keywords-container",style:{display:"flex",flexWrap:"wrap"},children:T.map(((e,n)=>(0,j.jsxs)("span",{className:"spm-entered-keyword-item","data-text":e,children:[e,(0,j.jsx)("span",{onClick:()=>(e=>{const n=[...T];n.splice(e,1),Y(n)})(n),id:"spm-entered-keyword-".concat(n),className:"spm-centered-keyword-item-cancel"})]},n)))})]}),(0,j.jsx)("textarea",{placeholder:"Generated comment",id:"spm-pop-generated-comment",value:b,onChange:e=>y(e.target.value),style:{boxSizing:"border-box"}})]}),(0,j.jsxs)("div",{className:"spm-pop-footer",children:[(0,j.jsx)("button",{onClick:()=>$(),className:"spm-popover-button spm-write-button",id:"spm-pop-write-comment",style:{display:"flex",justifyContent:"center",opacity:D?.5:1,cursor:D?"default":"pointer"},disabled:D,children:(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,j.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAABJElEQVR4nOXUP0oDQRTH8URsFF1JELEUTxHwGjaCVxAs9AIigpWtSWNA8A6eQAttg7GzT+MB4kcWJrCJs39JofiDYYt5+/u+efPetFr/XkhwhxEusLLUouDRvIa5EBzjHV9+aoLtTOxa+PbwuRB7GTM/wDQcdYD+wrrCaqYsT7hBOwIZxwDXYXOnpCRJMJ8pBhnGfkyzVNM8BknvJKkNkG8+BynKLheAzRJzYX+9KeCkxPwZW7nmFQD3BeYv6BSaVwCMcsxfZ+ZpC2fnpDIAG2E+YubdTFw6J5MmgP0w2eka4wGni61Y2uYlJdqL9vayAFX0KwC34fLaDQGD9J6KAs4D4LAuBLt4i76imaAuPjTXFEdlmXRwFsrVr7HSp75X59R/R9/39hd/TdG/awAAAABJRU5ErkJggg==",width:"24",height:"24",alt:"write"}),(0,j.jsx)("span",{style:{paddingTop:"3px"},children:S?"Rewrite":"Write"})]})}),(0,j.jsx)("button",{ref:h,onClick:()=>{(async()=>{if(!b||ne)return;te(!0);const e=await m(b);te(!1),e&&d(null)})(),L(!1)},className:"spm-popover-button spm-copy-button sp-btn-active",id:"spm-pop-copy-comment",style:{display:"flex",justifyContent:"center",opacity:ie?.5:1,cursor:ie?"default":"pointer"},disabled:ie,children:(0,j.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,j.jsx)(bn.Z,{size:19}),(0,j.jsx)("span",{style:{paddingTop:"3px"},children:ne?"Posting...":"Post"})]})})]}
1),(0,j.jsxs)("div",{style:{display:"flex",gap:"15px",marginTop:"-4px",marginBottom:"8px"},children:[(0,j.jsx)("span",{style:{flex:1}}),(0,j.jsx)("span",{style:{flex:1,textAlign:"center",fontSize:"12px",color:"#A1A1AA",textDecoration:"underline"},children:"It\u2019ll be posted on LinkedIn"})]})]})]})]})]}),J?wn.createPortal(be,document.body):be;var be};var yt,jt,wt,Ct,kt,Et,It,Pt,St;const Bt=e=>{var n;let{poll:t}=e;const i=(null===t||void 0===t?void 0:t.total_votes_count)||1,s=null===t||void 0===t?void 0:t.options.map((e=>(0,o.Z)((0,o.Z)({},e),{},{percentage:(e.votes_count/i*100).toFixed(0)})));return(0,j.jsxs)(Dt,{children:[(0,j.jsx)(Rt,{children:"Poll:"}),(0,j.jsx)(Nt,{children:null!==(n=null===t||void 0===t?void 0:t.question)&&void 0!==n?n:""}),s.map((e=>(0,j.jsxs)(Zt,{children:[(0,j.jsx)(Mt,{children:e.text}),(0,j.jsx)(Ft,{children:(0,j.jsx)(Tt,{style:{width:"".concat(e.percentage,"%")}})}),(0,j.jsxs)(Yt,{children:[e.percentage,"%"]})]},e.id))),(0,j.jsxs)(Qt,{children:[i," votes \u2022 ",t.is_open?"Ongoing":"Closed"]})]})},Dt=s.ZP.div(yt||(yt=(0,i.Z)(["\n margin-top: 1rem;\n padding: 1rem;\n border: 1px solid black;\n border-radius: 8px;\n"]))),Rt=s.ZP.h2(jt||(jt=(0,i.Z)(["\n font-size: 1rem;\n font-weight: bold;\n margin: 0;\n"]))),Nt=s.ZP.h3(wt||(wt=(0,i.Z)(["\n font-size: 1rem;\n margin-bottom: 0.5rem;\n"]))),Zt=s.ZP.div(Ct||(Ct=(0,i.Z)(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 0.5rem 0;\n"]))),Mt=s.ZP.span(kt||(kt=(0,i.Z)(["\n flex: 1;\n font-size: 0.9rem;\n"]))),Ft=s.ZP.div(Et||(Et=(0,i.Z)(["\n flex: 3;\n background: #3a3b3c;\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n"]))),Tt=s.ZP.div(It||(It=(0,i.Z)(["\n height: 100%;\n background: #0a66c2;\n border-radius: 4px;\n"]))),Yt=s.ZP.span(Pt||(Pt=(0,i.Z)(["\n flex: 0.5;\n font-size: 0.9rem;\n text-align: right;\n"]))),Qt=s.ZP.div(St||(St=(0,i.Z)(["\n margin-top: 0.5rem;\n font-size: 0.8rem;\n color: #b0b3b8;\n"])));var Lt,zt,Gt,Ut,Ht;const Wt=e=>{var n;let{repost:t}=e;return(0,j.jsxs)(Ot,{children:[(0,j.jsxs)(Jt,{children:[(0,j.jsx)(Kt,{children:null===t||void 0===t||null===(n=t.author)||void 0===n?void 0:n.name}),(0,j.jsx)(Vt,{children:null===t||void 0===t?void 0:t.date})]}),(0,j.jsx)(hn,{text:(i=null===t||void 0===t?void 0:t.text,"string"!==typeof i?"":i.replace(/\n/g,"<br>"))})]});var i},Ot=s.ZP.div(Lt||(Lt=(0,i.Z)(["\n padding: 1rem;\n border: 1px solid #ddd;\n border-radius: 8px;\n background: #f5f5f5;\n"]))),Jt=s.ZP.div(zt||(zt=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n font-size: 0.9rem;\n font-weight: bold;\n margin-bottom: 0.5rem;\n"]))),Kt=s.ZP.span(Gt||(Gt=(0,i.Z)(["\n color: #0073b1;\n"]))),Vt=s.ZP.span(Ut||(Ut=(0,i.Z)(["\n color: #666;\n font-size: 0.8rem;\n"]))),Xt=(s.ZP.p(Ht||(Ht=(0,i.Z)(["\n font-size: 0.9rem;\n color: #333;\n"]))),{margin:0,padding:"8px",border:"1px solid #ccc",borderRadius:"5px",boxSizing:"border-box",fontFamily:"Arial, sans-serif",fontSize:"14px",lineHeight:"1.4",width:"100%",whiteSpace:"pre-wrap",wordWrap:"break-word"}),qt=e=>{let{comment:n,setComment:t,mentions:i,setMentions:s,author:d,authorData:c,variant:p}=e;const u="commenting"===p,[A,x]=(0,r.useState)([]),[m,h]=(0,r.useState)(!1),[g,f]=(0,r.useState)(-1),[v,b]=(0,r.useState)(!1),[y,w]=(0,r.useState)(null),[C,k]=(0,r.useState)(!1),E=(0,r.useRef)(!1),I=(0,r.useRef)(null),P=(0,r.useRef)(null),S=(0,r.useRef)(null),B=(0,r.useRef)(!1),D=(0,r.useRef)(null);(0,r.useEffect)((()=>{function e(e){!D.current||D.current.contains(e.target)||I.current.contains(e.target)||h(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const R=async(e,n)=>{try{var t;b(!0);let p="".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/search");const u={category:"people"};(e||n)&&(u.advanced_keywords={},e&&(u.advanced_keywords.first_name=e),n&&(u.advanced_keywords.last_name=n));const A=await a.I.post(p,{withCredentials:!0},u);var i,o,s,r,d,c;return null!==A&&void 0!==A&&null!==(t=A.data)&&void 0!==t&&t.success?Array.isArray(null===A||void 0===A||null===(i=A.data)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.items)&&(null===A||void 0===A||null===(s=A.data)||void 0===s||null===(r=s.data)||void 0===r?void 0:r.items.length)>0?null===A||void 0===A||null===(d=A.data)||void 0===d||null===(c=d.data)||void 0===c?void 0:c.items:(k(!1),[]):[]}catch(p){return console.log("Error fetching data"),[]}finally{b(!1)}},N=e=>{B.current=!0;const i=I.current.selectionStart,r=n.slice(0,i).lastIndexOf("@");if(-1!==r){const l=n.slice(0,r),a=n.slice(i),d=e.name||e.username||"User",c="@".concat(d," ");t(l+c+a),h(!1),f(-1),w(null),k(!1),E.current=!1,s((n=>[...n,(0,o.Z)((0,o.Z)({},e),{},{token:"@".concat(d)})]))}};(0,r.useEffect)((()=>
1{if(I.current&&P.current){const e=window.innerWidth<1024?80:160;I.current.style.height="".concat(35,"px"),P.current.style.height="".concat(35,"px");const n=Math.min(I.current.scrollHeight,e);I.current.style.height="".concat(n,"px"),P.current.style.height="".concat(n,"px"),I.current.style.overflowY=n>=e?"auto":"hidden"}}),[n]);return(0,j.jsx)("div",{style:{margin:"auto"},children:(0,j.jsxs)("div",{style:(0,o.Z)({position:"relative"},u?{borderRadius:"12px",transition:"box-shadow 0.15s ease"}:{}),children:[(0,j.jsx)("div",{ref:P,style:(0,o.Z)((0,o.Z)({},Xt),{},{position:"absolute",top:0,left:0,pointerEvents:"none",color:u?"#FAFAFA":"black",overflow:"hidden"},u?{border:"1px solid transparent",borderRadius:"12px",padding:"10px 16px"}:{}),dangerouslySetInnerHTML:{__html:(e=>{let n=e;return i.forEach((e=>{const t=e.token.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp("(".concat(t,")(\\s?)"),"g");n=n.replace(i,((e,n,t)=>'<span style="color: #93C5FD; font-weight: 500;">'.concat(n,"</span>").concat(t)))})),n.replace(/\n/g,"<br>")})(n)}}),(0,j.jsx)("textarea",{ref:I,value:n,onChange:async e=>{const n=e.target.value;if(n.length>1250)return;if("historyUndo"===e.nativeEvent.inputType&&(B.current=!0),B.current)return B.current=!1,void t(n);if("insertLineBreak"===e.nativeEvent.inputType)return t(n),h(!1),void w(null);t(n);const i=e.target.selectionStart,o=n.slice(0,i),s=o.lastIndexOf("@"),r=-1===s?"":o.slice(s+1);if(-1===s)return S.current&&clearTimeout(S.current),h(!1),void(E.current=!1);const l=o[s-1];return 0===s||" "===l||"\n"===l?E.current?(h(!0),f(0),0===r.length?(S.current&&clearTimeout(S.current),void(S.current=setTimeout((async()=>{const e=await R();if(!E.current)return;const n=[...d?[d]:[],...e.filter((e=>!d||String(e.id)!==String(d.id)))];x(n),h(n.length>0)}),250))):(S.current&&clearTimeout(S.current),void(S.current=setTimeout((async()=>{const e=await R(r);E.current&&(x(e),h(e.length>0))}),250)))):(S.current&&clearTimeout(S.current),void h(!1)):(S.current&&clearTimeout(S.current),h(!1),void(E.current=!1))},onKeyDown:e=>{const i=I.current,o=i.selectionStart;if("@"===e.key&&(k(!0),E.current=!0),m&&A.length>0){if("ArrowDown"===e.key)return e.preventDefault(),void f((e=>(e+1)%A.length));if("ArrowUp"===e.key)return e.preventDefault(),void f((e=>(e-1+A.length)%A.length));if("Enter"===e.key)return m&&-1!==g?(e.preventDefault(),void N(A[g])):void f(-1)}if("Backspace"===e.key){const r=/@[\w]+$/,l=n.slice(0,o).match(r);if(l){e.preventDefault();const r=l[0],a=o-l[0].length,d=n.slice(0,a)+n.slice(o);t(d),s((e=>e.filter((e=>e.token!==r)))),w(null),E.current=!1,S.current&&clearTimeout(S.current),h(!1),setTimeout((()=>{i.setSelectionRange(a,a)}),0)}}},onScroll:e=>{P.current&&(P.current.scrollTop=e.target.scrollTop,P.current.scrollLeft=e.target.scrollLeft)},placeholder:"Add a comment",style:(0,o.Z)((0,o.Z)({},Xt),{},{position:"relative",resize:"none",overflow:"hidden",color:u?"#FAFAFA":"black",background:u?"#27272A":"white",caretColor:u?"#FAFAFA":"black"},u?{border:"1px solid #3F3F46",borderRadius:"12px",padding:"10px 16px"}:{})}),m&&(0,j.jsx)("ul",{ref:D,style:(0,o.Z)({position:"absolute",background:u?"#27272A":"#fff",border:u?"1px solid #3F3F46":"1px solid #ccc",listStyle:"none",padding:"0",margin:"0",width:"100%",zIndex:1e3,maxHeight:"185px",overflowY:"auto"},u?{borderRadius:"8px",color:"#FAFAFA"}:{}),children:v?(0,j.jsx)("li",{style:(0,o.Z)({padding:"5px"},u?{color:"#A1A1AA"}:{}),children:"Loading..."}):A.map(((e,n)=>{var t,i;const o=null===c||void 0===c?void 0:c.find((n=>String(null===n||void 0===n?void 0:n.id)===String(null===e||void 0===e?void 0:e.id)));return(0,j.jsxs)("li",{onClick:()=>N(e),style:{display:"flex",alignItems:"center",padding:"5px",cursor:"pointer",background:n===g?u?"#3F3F46":"#eee":"transparent"},children:[(0,j.jsx)("img",{src:(null===o||void 0===o?void 0:o.profilePic)||(null===e||void 0===e?void 0:e.profile_picture_url_large)||"https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png",alt:null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"User",style:{width:"30px",height:"30px",borderRadius:"50%",marginRight:"10px"}}),null!==(i=null===e||void 0===e?void 0:e.name)&&void 0!==i?i:"User"]},e.id)}))})]})})};var _t,$t,ei,ni,ti,ii,oi,si,ri,li,ai,di,ci,pi,ui,Ai;s.ZP.ul(_t||(_t=(0,i.Z)(["\n position: absolute;\n background: white;\n border: 1px solid #ccc;\n padding: 5px;\n list-style: none;\n width: 200px;\n z-index: 1000;\n max-height: 200px;\n overflow-y: auto;\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n\n li {\n padding: 5px;\n cursor: pointer;\n }\n\n li:hover {\n background: #f0f0f0;\n }\n"])));const xi=s.ZP.div($t||($t=(0,i.Z)(["\n display: flex ;\n flex-direction: column;\n justify-content: space-between;\n"]))),mi=s.ZP.div(ei||(ei=(0,i.Z)(["\n position:relative;\n\n .inputIcon{\n box-sizing: border-box;\n width: 100% !important;\n padding-left: 75px !important;\n \n }
1\n .inputiconwrapper{\n position: absolute;\n top: 0px;\n left: 0px;\n bottom: 0;\n width: 32px;\n opacity: 0;\n cursor: pointer;\n }\n .pasteWrapper {\n position: absolute;\n left: 5px;\n top: 3px;\n bottom: unset;\n margin: auto;\n height: max-content;\n font-size: 12px;\n color: rgb(108, 102, 133);\n font-weight: 400;\n border: 1px solid rgba(0, 0, 0, 0.2);\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n padding: 3px;\n\n \n > img{\n width: 20px;}\n}\n \n"]))),hi=s.ZP.div(ni||(ni=(0,i.Z)(["\n display: flex;\n align-items: center;\n span{\n padding-top:5px;\n }\n"]))),gi=s.ZP.div(ti||(ti=(0,i.Z)(["\n display:flex;\n align-items:center;\n span{\n padding-top:5px;\n }\n"]))),fi=s.ZP.div(ii||(ii=(0,i.Z)(["\ndisplay:flex;\nalign-items:center;\n"]))),vi=s.ZP.div(oi||(oi=(0,i.Z)(["\ndisplay:flex;\nalign-items:center;\nspan{\n padding-top:5px;\n }\n"]))),bi=s.ZP.div(si||(si=(0,i.Z)(["\n margin: 0 1rem;\n"]))),yi=s.ZP.div(ri||(ri=(0,i.Z)(["\n margin-top: 1rem;\n"]))),ji=s.ZP.div(li||(li=(0,i.Z)(["\n margin: 0 1rem;\n"]))),wi=s.ZP.div(ai||(ai=(0,i.Z)(["\n height: 5rem;\n"]))),Ci=s.ZP.div(di||(di=(0,i.Z)(["\n margin: 1.5rem 0;\n padding: 1rem;\n border: 1px solid rgba(128, 128, 128, 0.5);\n border-radius: 10px;\n box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;\n"]))),ki=s.ZP.div(ci||(ci=(0,i.Z)(["\n display: inline-flex;\n background-color: ",";\n color: ",";\n border-radius: 5px;\n margin: 0.5rem 0;\n padding: 0.7rem 0.6rem;\n cursor: pointer;\n border: none;\n font-size: 12px;\n"])),(e=>e.theme.darkBgColor),(e=>e.theme.textColor)),Ei=s.ZP.div(pi||(pi=(0,i.Z)(["\n width: 100%;\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"]))),Ii=s.ZP.div(ui||(ui=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n align-items: flex-end; /* keeps button aligned right */\n position: relative;\n"]))),Pi=s.ZP.p(Ai||(Ai=(0,i.Z)(["\n font-size: 0.8rem;\n color: #0a66c2;\n margin: 0;\n"]))),Si=e=>{var n,t,i,s,d,p,u,A,x,m,h,g,v;let{data:b,reactions:y,isCommentPopUpOpen:C,setIsCommentPopUpOpen:k,setOpenCommentPostId:E,commentsLeft:I,setCommentsLeft:P,openCommentPostId:S,getRemainingComments:B,customPrompt:D,userData:R,commenterIconRef:N,pasteButton:Z,setPasteButton:M,copyBtnRef:F,replyBtnRef:Y,index:Q,userProfile:L,authorData:z,variant:G}=e;const W="commenting"===G;const[O,J]=(0,r.useState)(null),[K,V]=(0,r.useState)(""),[X,q]=(0,r.useState)(!1),[_,$]=(0,r.useState)(null),[ee,ne]=(0,r.useState)(!1),[te,ie]=(0,r.useState)([]),[oe,se]=(0,r.useState)(!1),[re,le]=(0,r.useState)(!1),[ae,de]=(0,r.useState)(null===L||void 0===L?void 0:L.newUnipileUser),[ce,pe]=(0,r.useState)(null),[ue,Ae]=(0,r.useState)(!1),[xe,me]=(0,r.useState)(0),[he,ge]=(0,r.useState)(null),{theme:fe}=(0,c.Fg)(),ve=(0,r.useRef)(null),be=(0,r.useRef)(null),ye=(0,r.useRef)(null);(0,r.useEffect)((()=>{se(!!ae)}),[L]),(0,r.useEffect)((()=>{ye.current&&(ye.current.style.height="35px",ye.current.style.height="".concat(ye.current.scrollHeight,"px"))}),[K]),(0,r.useEffect)((()=>{if(!O||0!==Q||!ae||!ve.current)return;const e=requestAnimationFrame((()=>{ve.current.scrollIntoView({behavior:"smooth",block:"center"}),le(!0),J(null)}));return()=>cancelAnimationFrame(e)}),[O,Q,ae]);const je=()=>{Ae(!ue),ue||me((e=>e+1))},[we,ke]=(0,r.useState)([]),[Ee,Pe]=(0,r.useState)(!1),[Se,Be]=(0,r.useState)(null),[De,Re]=(0,r.useState)(!1);(0,r.useRef)(null);(0,r.useEffect)((()=>{if(null!==b&&void 0!==b&&b.user_reacted){const e=H[b.user_reacted];ge(e)}else ge(null)}),[null===b||void 0===b?void 0:b.user_reacted]);const Ne=(0,r.useMemo)((()=>{var e;const n=y.find((e=>e.name===he));return null!==(e=null===n||void 0===n?void 0:n.image)&&void 0!==e?e:U}),[he,y]),Ze=e=>{pe(e),setTimeout((()=>{pe(null)}),2e3)},Me=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te;if(console.log("CUR MENTIONS",n),!e||""===e.trim()||null===b||void 0===b||!b.social_id)return!1;try{var t,i;de(!1),le(!1),q(!0);const s=((e,n)=>{const t=null===b||void 0===b?void 0:b.author;if(null===t||void 0===t||!t.id||null===t||void 0===t||!t.name)return{text:e,mentions:n};const i="@".concat(t.name);return e.includes(i)&&n.some((e=>String(e.id)===String(t.id)))?{text:e,mentions:n}:{text:"".concat(e.trimEnd()," ").concat(i),mentions:[...n,(0,o.Z)((0,o.Z)({},t),{},{token:i})]}})(e,n);V(s.text),ie(s.mentions);const r=((e,n)=>{if(0===n.length)return{comment:e,mentions:[]};const t=n.map((e=>e.token.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join("|");console.log("TOK PATTERN",t);const i=new RegExp("(".concat(t,")(\\s?)"),"g");let o=0;console.log("regex",i);const s=[];return{comment:e.replace(i,((e,t,i)=>{const r=n.find((e=>e.token===t));return r&&s.push({name:r.name||r.username,profile_id:r.id}),"{{".concat(o++,"}}")+(i||"")})),mentions:s}})(s.text,s.mentions),d={social_id:null===b||void 0===b?void 0:b.social_id,c
1omment:null!==(t=null===r||void 0===r?void 0:r.comment)&&void 0!==t?t:"",newUnipileUser:!1};Array.isArray(null===r||void 0===r?void 0:r.mentions)&&(null===r||void 0===r?void 0:r.mentions.length)>0&&(d.mentions=r.mentions);const c=await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/sendPostComment"),{withCredentials:!0},d);return null!==c&&void 0!==c&&null!==(i=c.data)&&void 0!==i&&i.success?(V(""),ie([]),$("Comment Added"),setTimeout((()=>{$(null)}),1e3),Ze("Comment added successfully"),setTimeout((()=>{me((e=>e+1))}),2e3),Ae(!0),!0):(Ze("Failed to post comment"),!1)}catch(s){return Ze("Failed to post comment"),!1}finally{q(!1)}},Fe=async e=>{if(e&&null!==b&&void 0!==b&&b.social_id)try{var n;const t={social_id:null===b||void 0===b?void 0:b.social_id,reaction:e},i=await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/sendPostReaction"),{withCredentials:!0},t);null!==i&&void 0!==i&&null!==(n=i.data)&&void 0!==n&&n.success?(ge(e),pe("Reaction sent successfully"),setTimeout((()=>{pe(null)}),2e3)):(ge(null),pe("Failed to send reaction"),setTimeout((()=>{pe(null)}),2e3))}catch(t){console.log("Failed to react"),ge(null)}},[Te,Ye]=(0,r.useState)(!1);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(Ci,{style:(0,o.Z)({position:"relative"},W?{backgroundColor:"#18181B",border:"1px solid #27272A",boxShadow:"none",borderRadius:"8px",overflow:"hidden",padding:0,margin:"1rem 0"}:{}),children:[(0,j.jsx)(wi,{className:"max-sm:!px-4 max-sm:!py-3",style:W?{display:"flex",padding:"12px 56px",alignItems:"flex-start",gap:"10px",height:"auto"}:{display:"flex",paddingLeft:"1rem",alignItems:"center"},children:(0,j.jsxs)("div",{style:{width:"100%"},children:[(0,j.jsxs)("div",{style:{display:"flex",alignItems:W?"flex-start":"center",justifyContent:"space-between",width:"100%",paddingRight:W?0:"1rem"},children:[(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:W?"10px":"0.8rem",marginBottom:W?0:"5px"},children:[null!==b&&void 0!==b&&null!==(n=b.author)&&void 0!==n&&n.profile_picture_url?(0,j.jsx)("img",{src:(null===b||void 0===b||null===(t=b.author)||void 0===t?void 0:t.profile_picture_url)||L,alt:(null===b||void 0===b||null===(i=b.author)||void 0===i?void 0:i.name)||"profile",style:{width:W?"48px":"40px",height:W?"48px":"40px",borderRadius:"50%",objectFit:"cover",cursor:null!==b&&void 0!==b&&null!==(s=b.author)&&void 0!==s&&s.public_identifier?"pointer":"default",flexShrink:0},onClick:()=>{var e;if(null!==b&&void 0!==b&&null!==(e=b.author)&&void 0!==e&&e.public_identifier){const e="https://www.linkedin.com/in/"+b.author.public_identifier;window.open(e,"_blank")}}}):(0,j.jsx)("div",{style:{width:W?"48px":"40px",height:W?"48px":"40px",borderRadius:"50%",background:W?"#3F3F46":"#e1e1e1",display:"flex",alignItems:"center",justifyContent:"center",color:W?"#FAFAFA":void 0,fontSize:"14px",fontWeight:W?"600":"bold",flexShrink:0},children:null!==b&&void 0!==b&&null!==(d=b.author)&&void 0!==d&&d.name?b.author.name.split(" ").map((e=>e[0])).join("").toUpperCase().slice(0,2):"?"}),(0,j.jsxs)("div",{style:{minWidth:0},children:[(0,j.jsx)("div",{onClick:()=>{var e;if(null!==b&&void 0!==b&&null!==(e=b.author)&&void 0!==e&&e.public_identifier){const e="https://www.linkedin.com/in/"+b.author.public_identifier;window.open(e,"_blank")}},style:{cursor:null!==b&&void 0!==b&&null!==(p=b.author)&&void 0!==p&&p.public_identifier?"pointer":"default",fontSize:W?"14px":"1.11rem",fontWeight:W?"600":"bold",color:W?"#FAFAFA":"#000000"},children:null===b||void 0===b||null===(u=b.author)||void 0===u?void 0:u.name}),W&&(0,j.jsx)("div",{style:{fontSize:"12px",color:"#A1A1AA",marginTop:"2px",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"1"},children:null===b||void 0===b||null===(A=b.author)||void 0===A?void 0:A.headline})]})]}),(0,j.jsxs)("div",{style:{cursor:"pointer",flexShrink:0},children:[(0,j.jsx)("div",{style:{position:"relative"},ref:e=>{be.current=e,N&&(N.current=e)},onClick:()=>{C?E(null):(k(),oe&&se(!1))},children:(0,j.jsx)("img",{style:{height:"30px"},src:jn,alt:"open icon"})}),C&&(0,j.jsx)(bt,{setOpenCommentPostId:E,commentsLeft:I,setCommentsLeft:P,openCommentPostId:S,postData:b,getRemainingComments:B,customPrompt:D,userData:R,onPostComment:async e=>{var n;return null!==b&&void 0!==b&&null!==(n=b.permissions)&&void 0!==n&&n.can_post_comments?Me(e,[]):(Ze("You cannot comment on this post."),!1)},copyBtnRef:F,index:Q,newUnipileUser:ae,setShowHandIconAfterCopy:le,iconRef:W?be:void 0})]})]}),!W&&(0,j.jsxs)("div",{style:{color:"gray",fontSize:"0.9rem",marginBottom:"7px"},children:[(0,j.jsx)("span",{style:{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"1"},children:null===b||void 0===b||null===(x=b.author)||void 0===x?void 0:x.headline}),(0,j.jsx)("span",{children:(0,yn.Sy)(null===b||void 0===b?void 0:b.parsed_datetime)}),(0,j.jsx)("span",{children:" \u2022 "}),(0,j.jsx)("span",{children:(0,yn.Po)(null===b||void 0===b?void 0:b.parsed_datetime)})]})]})}),(0,j.jsxs)(ji,{className:"max-sm:!px-4",style:W?{color:"#E4E4E7",margin:0,padding:"0 56px 8px"}:void 0,children:[(0,j.jsx)(hn,{text:(Qe=null===b||void 0===b?void 0:b.text,"string"!==typeof Qe?"":Qe.replace(/\n/g,"<br>"))}),(0,j.jsx)(yi,{children:(0,j.jsx)(w,{attachments:null===b||void 0===b?void 0:b.attachments})}),(null===b||void 0===b?void 0:b.poll)&&(0,j.jsx)(Bt,{poll:null===b||void 0===b?void 0:b.poll}),(null===b||void 0===b?void 0:b.is_repost)&&(0,j.jsx)(Wt,{repost:null===b||void 0===b?void 0:b.repost_content})]}),(0,j.jsx)(bi,{style:W?{margin:0}:void 0,children:W?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"max-sm:!px-4 max-sm:flex-wrap max-sm:gap-2 max-sm:!py-2",style:{padding:"6px 56px",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"12px",color:"#71717A",borderTop:"1px solid #27272A"},children:[(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[(0,j.jsxs)("span",{style:(0,o.Z)({display:"flex",alignItems:"center",gap:"4px",cursor:"pointer",position:"relative"},he?{color:"#3B82F6"}:{}),onClick:()=>ne(!ee),children:[he?(0,j.jsx)("img",{src:(null===(m=y.find((e=>e.name===he)))||void 0===m?void 0:m.image)||U,alt:he,style:{height:"14px",width:"14px"}}):(0,j.jsx)(fn.Z,{size:12,fill:"none"}),(null===b||void 0===b?void 0:b.reaction_counter)||0," likes",ee&&(0,j.jsx)("div",{style:{position:"absolute",bottom:"100%",left:0},children:(0,j.jsx)(T,{handleLikePost:Fe,setReactionWidgetOpen:ne,reactions:y,selectedReaction:he,setReactionStatus:ge,isDark:W})})]}),(0,j.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[(0,j.jsx)(vn.Z,{size:12}),(null===b||void 0===b?void 0:b.comment_counter)||0," comments"]})]}),(0,j.jsxs)("span",{children:[(0,yn.Sy)(null===b||void 0===b?void 0:b.parsed_datetime)," \xb7 ",(0,yn.Po)(null===b||void 0===b?void 0:b.parsed_datetime)]})]}),(0,j.jsxs)("div",{className:"max-sm:!px-4 max-sm:flex-wrap max-sm:gap-2 max-sm:!py-2",style:{padding:"6px 56px",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid #27272A"},children:[(0,j.jsxs)("button",{onClick:je,style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"#A1A1AA",background:"none",border:"none",cursor:"pointer",padding:0},children:[(0,j.jsx)(vn.Z,{size:14}),ue?"Hide Comments":"Show Comments"]}),(0,j.jsxs)("button",{onClick:()=>window.open(null===b||void 0===b?void 0:b.share_url,"_blank"),style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"#A1A1AA",background:"none",border:"none",cursor:"pointer",padding:0},children:[(0,j.jsx)(f.Z,{size:14}),"Open in LinkedIn"]})]}),(0,j.jsxs)("div",{className:"max-sm:!px-4 max-sm:!py-2",style:{padding:"8px 56px",borderTop:"1px solid #27272A"},children:[(0,j.jsxs)("form",{onSubmit:e=>{e.preventDefault(),Me()},children:[null!==b&&void 0!==b&&null!==(h=b.permissions)&&void 0!==h&&h.can_post_comments?(0,j.jsx)(qt,{c
1omment:K,setComment:V,mentions:te,setMentions:ie,author:null===b||void 0===b?void 0:b.author,authorData:z,variant:"commenting"}):(0,j.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 16px",borderRadius:"9999px",backgroundColor:"#27272A"},children:(0,j.jsx)("input",{type:"text",value:K,disabled:!0,placeholder:"You cannot comment on this post.",style:{flex:1,background:"transparent",border:"none",outline:"none",fontSize:"14px",color:"#FAFAFA",padding:"4px 0"}})}),(0,j.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"6px"},children:(0,j.jsx)("button",{type:"submit",disabled:X||""===K.trim(),style:{width:"32px",height:"32px",borderRadius:"9999px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,backgroundColor:X||""===K.trim()?"#3F3F46":"#2563EB",border:"none",cursor:X||""===K.trim()?"not-allowed":"pointer"},children:X?(0,j.jsx)(Ce.Z,{size:14,color:"white",style:{animation:"spin 1s linear infinite"}}):(0,j.jsx)(bn.Z,{size:14,color:"white"})})})]}),_&&(0,j.jsx)("p",{style:{fontSize:"12px",marginTop:"4px",textAlign:"center",color:"#22c55e"},children:_})]}),ue&&(0,j.jsx)("div",{className:"max-sm:!px-4",style:{padding:"0 56px 12px",borderTop:"1px solid #27272A"},children:(0,j.jsx)(Ie,{social_id:null===b||void 0===b?void 0:b.social_id,totalComments:null===b||void 0===b?void 0:b.comment_counter,reactions:y,postData:b,expanded:ue,reloadComments:xe,variant:G})})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{style:{margin:"1rem 0",opacity:"0.4",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",padding:"0 1rem"},children:[(0,j.jsxs)(vi,{children:[(0,j.jsx)("img",{style:{height:"15px"},src:Ne,alt:he||"like"}),(0,j.jsxs)("span",{children:["\xa0",null===b||void 0===b?void 0:b.reaction_counter]})]}),(0,j.jsxs)(fi,{children:[(0,j.jsxs)("span",{children:[null===b||void 0===b?void 0:b.comment_counter,"\xa0"]}),(0,j.jsx)("span",{children:"comments"})]})]}),(0,j.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",borderTop:"1px solid rgba(128, 128, 128, 0.5)",borderBottom:"1px solid rgba(128, 128, 128, 0.5)",padding:"1rem 2rem",margin:"1rem 0",fontSize:"14px"},children:[(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsxs)(gi,{style:{cursor:"pointer",padding:"5px",borderRadius:"5px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.1)",onMouseLeave:e=>e.currentTarget.style.backgroundColor="transparent",onClick:()=>ne(!ee),children:[(0,j.jsx)("img",{style:{height:"15px"},src:he?null===(g=y.find((e=>e.name===he)))||void 0===g?void 0:g.image:U,alt:"like icon"}),(0,j.jsxs)("span",{style:he?{color:"#0a66c2"}:{color:"black"},children:["\xa0",he?he.substring(0,1).toUpperCase()+he.substring(1):"Like"]})]}),ee&&(0,j.jsx)(T,{handleLikePost:Fe,setReactionWidgetOpen:ne,reactions:y,selectedReaction:he,setReactionStatus:ge})]}),(0,j.jsxs)(hi,{style:{cursor:"pointer",padding:"5px",borderRadius:"5px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.1)",onMouseLeave:e=>e.currentTarget.style.backgroundColor="transparent",onClick:()=>window.open(null===b||void 0===b?void 0:b.share_url,"_blank"),children:[(0,j.jsx)("img",{style:{height:"15px"},src:gn,alt:"open icon"}),(0,j.jsx)("span",{children:"\xa0Open"})]})]}),(0,j.jsxs)("form",{onSubmit:e=>{e.preventDefault(),Me()},children:[null!==b&&void 0!==b&&null!==(v=b.permissions)&&void 0!==v&&v.can_post_comments?(0,j.jsx)(qt,{comment:K,setComment:V,mentions:te,setMentions:ie,author:null===b||void 0===b?void 0:b.author,authorData:z,variant:G}):(0,j.jsx)(mi,{children:(0,j.jsx)("input",{type:"text",defaultValue:"",disabled:!0,placeholder:"You cannot comment on this post.",style:{width:"97%",padding:"0.5rem 0",paddingLeft:"1rem"}})}),(0,j.jsx)("div",{ref:0===Q&&ae?ve:null,children:(0,j.jsxs)(xi,{children:[(0,j.jsxs)(Ei,{children:[(0,j.jsx)(ki,{onClick:je,children:ue?"Hide comments":"See comments (".concat(null===b||void 0===b?void 0:b.comment_counter,")")}),(0,j.jsxs)(Ii,{children:[(0,j.jsx)("button",{id:O,ref:Y,type:"submit",disabled:X||""===K.trim(),style:{display:"inline-flex",backgroundColor:fe.darkBgColor,color:fe.textColor,borderRadius:"5px",justifyContent:"space-between",alignItems:"center",margin:"0.5rem 0",padding:"0.5rem 0.6rem",cursor:X||""===K.trim()?"default":"pointer",opacity:""===K.trim()||X?.6:1,border:"none",minWidth:"50px"},children:null!==b&&void 0!==b&&b.isCommented?"Already Commented":X?"Adding comment...":_||"Reply"}),(null===b||void 0===b?void 0:b.isCommented)&&(0,j.jsx)(Pi,{children:"You have already commented on this post"})]})]}),(0,j.jsx)("div",{children:(0,j.jsx)(Ie,{social_id:null===b||void 0===b?void 0:b.social_id,totalComments:null===b||void 0===b?void 0:b.comment_counter,reactions:y,postData:b,expanded:ue,reloadComments:xe,variant:G})})]})})]})]})})]}),ce&&(0,j.jsx)("div",{style:{position:"fixed",bottom:"30px",right:"50px",transform:"translateX(-50%)",backgroundColor:W?"#2563EB":"#0a66c2",color:"white",padding:"10px 20px",borderRadius:"5px",fontSize:"14px",zIndex:1e4,boxShadow:"0px 2px 10px rgba(0,0,0,0.2)",animation:"fadeInOut 2s ease-in-out"},children:ce})]});var Qe};const Bi=t.p+"static/media/likeFilledBlue.12b4c11b7121963f0c93b5cae6bcd227.svg";const Di=t.p+"static/media/celebrate.f9e505585371c01f0a0e77b9ec73f3d2.svg";const Ri=t.p+"static/media/funny.8191a50916fc4f0cfcc7afcfee7af8a4.svg";const Ni=t.p+"static/media/insightful.9b0a5ccb368c379585a92a84e1eb03ef.svg";const Zi=t.p+"static/media/love.27b47f3fe73dbd9912d6a0e378ac5ce5.svg";const Mi=t.p+"static/media/support.bf7ecfd611e54e171470643ea1543262.svg";var Fi,Ti,Yi,Qi,Li,zi=t(30025);const Gi=s.ZP.div(Fi||(Fi=(0,i.Z)(["\n position: fixed;\n top: 100px;\n right: 20px;\n z-index: 1000;\n background-color: #fff3cd;\n color: #856404;\n padding: 1rem;\n border-radius: 8px;\n border: 1px solid #ffeeba;\n max-width: 280px;\n text-align: left;\n font-size: 0.85rem;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n\n button {\n margin-top: 10px;\n padding: 6px 12px;\n background-color: #007bff;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n font-weight: bold;\n font-size: 0.75rem;\n }\n"]))),Ui=s.ZP.div(Ti||(Ti=(0,i.Z)(["\n position: fixed;\n bottom: 10px;\n left: 0px;\n right: 0px;\n width: 100%;\n z-index: 1000;\n background-color: #fff;\n border: 1px solid crimson;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 0.5rem;\n color: black;\n font-weight: 500;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n max-width: 90%;\n text-align: center;\n margin: auto;\n\n span {\n color: crimson;\n font-weight: 600;\n }\n > h1 {\n font-size: 16px;\n font-wieght: 600;\n line-hieght: normal;\n }
1\n"]))),Hi=s.ZP.span(Yi||(Yi=(0,i.Z)(['\n display: block;\n margin-left: auto;\n margin-right: auto;\n width: 35px;\n height: 35px;\n border-radius: 50%;\n position: relative;\n animation: rotate 1s linear infinite;\n &::before {\n content: "";\n box-sizing: border-box;\n position: absolute;\n inset: 0px;\n border-radius: 50%;\n border: 4px solid #0a66c2;\n animation: prixClipFix 2s linear infinite;\n }\n']))),Wi=s.ZP.div(Qi||(Qi=(0,i.Z)(["\n display: flex;\n justify-content: center;\n height: calc(100dvh);\n margin: 0 auto;\n"]))),Oi=s.ZP.div(Li||(Li=(0,i.Z)(["\n margin-top: 2rem;\n max-width: 590px;\n"]))),Ji=e=>{var n;let{remainingTime:t,showUpgradeWarning:i,showTrialEndedModal:s,setShowTrialEndedModal:c,userProfile:p,variant:u,renderPost:A,renderHeader:x}=e;const[m,h]=(0,r.useState)([]),[g,f]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),y=localStorage.getItem("userData"),w=JSON.parse(y),[C,k]=(0,r.useState)(!1),[E,I]=(0,r.useState)(!1),[P,S]=(0,r.useState)(""),[B,D]=(0,r.useState)((null===p||void 0===p?void 0:p.defaultListId)||(null===w||void 0===w?void 0:w.defaultListId)||""),[R,N]=(0,r.useState)("date"),[Z,M]=(0,r.useState)(""),[F,T]=(0,r.useState)(!1),[Y,Q]=(0,r.useState)("default"),[L,z]=(0,r.useState)([]),G=(0,d.TH)();(0,r.useEffect)((()=>{var e;null!==(e=G.state)&&void 0!==e&&e.showSetupPopup&&(T(!0),window.history.replaceState({},document.title))}),[G.state]),(0,r.useEffect)((()=>{null!==p&&void 0!==p&&p.defaultListId&&!B&&D(p.defaultListId)}),[null===p||void 0===p?void 0:p.defaultListId]),(0,r.useEffect)((()=>{if(F)for(let e=0;e<60;e++){const e=document.createElement("div");e.style.position="fixed",e.style.top="-10px",e.style.left=100*Math.random()+"vw",e.style.width="8px",e.style.height="14px",e.style.backgroundColor="hsl(".concat(360*Math.random(),", 100%, 50%)"),e.style.opacity="0.9",e.style.transform="rotate(".concat(360*Math.random(),"deg)"),e.style.animation="dropConfetti ".concat(1+2*Math.random(),"s linear"),document.body.appendChild(e),setTimeout((()=>e.remove()),3e3)}}),[F]);const U=JSON.parse(localStorage.getItem("userData")),H=(0,r.useCallback)((async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!g){v||h([]);try{var n;f(!0);let o="".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/search");o+="?limit=".concat(20),!e&&v&&(o+="&cursor=".concat(v));const s={category:"posts",provider_id:(null===U||void 0===U?void 0:U.provider_id)||""};P&&(s.keywords=P),R&&(s.sort_by=R),Z&&(s.date_posted=Z),B&&(s.people_list_id=B),"myPosts"===Y&&(s.fetchMyPosts=!0);const r=await a.I.post(o,{withCredentials:!0},s);if(null!==r&&void 0!==r&&null!==(n=r.data)&&void 0!==n&&n.success){var t,i;const n=r.data.data.items||[];h((t=>e?n:[...t,...n])),b(null===r||void 0===r||null===(t=r.data)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.cursor);const o=n.map((e=>{var n;return{id:null===e||void 0===e||null===(n=e.author)||void 0===n?void 0:n.id,profilePic:null===e||void 0===e?void 0:e.profile_picture_url}}));z((n=>e?o:[...n,...o]))}}catch(o){console.log("Error getting posts")}finally{f(!1)}}}),[v,g,B,P,R,Z,Y]);(0,r.useEffect)((()=>{h([]),b(null)}),[Y]),(0,r.useEffect)((()=>{const e=!1===(null===U||void 0===U?void 0:U.newUnipileUser)&&""===B,n=E&&""===B&&""!==P,t=null===U||void 0===U?void 0:U.newUnipileUser;("default"===Y||"myPosts"===Y||E&&""!==B||e||n||t)&&H(!0)}),[P,R,Z,B,E,Y]);const W=()=>{Q((e=>"myPosts"===e?"default":"myPosts"))},O=(0,r.useCallback)((e=>{e[0].isIntersecting&&!g&&v&&H()}),[g,v,H]);(0,r.useEffect)((()=>{const e=new IntersectionObserver(O,{rootMargin:"200px",threshold:1}),n=document.querySelector("#infinite-scroll-target");return n&&e.observe(n),()=>{n&&e.unobserve(n)}}),[O]);const J=[{name:"like",image:Bi},{name:"celebrate",image:Di},{name:"support",image:Mi},{name:"love",image:Zi},{name:"insightful",image:Ni},{name:"funny",image:Ri}],[K,V]=(0,r.useState)(null),[X,q]=(0,r.useState)(null),[_,$]=(0,r.useState)(null!==(n=null===w||void 0===w?void 0:w.useCustomPrompt)&&void 0!==n&&n),[ee,ne]=(0,r.useState)(null!==w&&void 0!==w?w:null),[te,ie]=(0,r.useState)(!1),oe=async()=>{const e=null===w||void 0===w?void 0:w.email;if(e)try{var n,t;const i=await a.I.get("".concat(l.vc.urlPlatform,"/api/v2/auth/user?email=").concat(encodeURIComponent(e)),{withCredentials:!0});q(null===i||void 0===i||null===(n=i.data)||void 0===n?void 0:n.commentsLeft),$(null===i||void 0===i||null===(t=i.data)||void 0===t?void 0:t.useCustomPrompt),ne(null===i||void 0===i?void 0:i.data)}catch(i){console.log("Failed to get user details")}};(0,r.useEffect)((()=>{oe()}),[]),(0,r.useEffect)((()=>{K&&oe()}),[K]);const[se,re]=(0,r.useState)(null),le=(0,r.useRef)(null),ae=(0,r.useRef)(null);if("commenting"===u){const e={selectedList:P,setSelectedList:S,selectedSort:R,setSelectedSort:N,selectedDate:Z,setSelectedDate:M,setcurrentCursor:b,selectedPeopleList:B,setSelectedPeopleList:D,setPeopleListInitialized:I,userProfile:p,feedMode:Y,toggleFeedMode:W};return(0,j.jsxs)("div",{style:{backgroundColor:"#09090B"},children:[x?x(e):(0,j.jsx)(An,(0,o.Z)((0,o.Z)({},e),{},{variant:"commenting"})),(0,j.jsx)("div",{className:"px-10 py-4",children:(0,j.jsxs)("div",{style:{maxWidth:"680px"},children:[g&&0===m.length?(0,j.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,j.jsx)("div",{className:"w-8 h-8 border-4 border-blue-500 border-t-transparent roun
1ded-full animate-spin"})}):0===m.length&&!g&&E?(0,j.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,j.jsxs)("div",{className:"text-center",children:[(0,j.jsx)("p",{className:"text-sm",style:{color:"#71717A"},children:"No posts found."}),(0,j.jsx)("p",{className:"text-xs mt-1",style:{color:"#52525B"},children:"Try adjusting your filters or check back later."})]})}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{className:"space-y-4",children:m.map(((e,n)=>(0,j.jsx)(r.Fragment,{children:A?A(e,n,{isCommentPopUpOpen:K===e.id,setIsCommentPopUpOpen:()=>V(e.id),setOpenCommentPostId:V,commentsLeft:X,setCommentsLeft:q,openCommentPostId:K,getRemainingComments:oe,customPrompt:_,userData:ee,pasteButton:se===e.id,setPasteButton:re,copyBtnRef:le,replyBtnRef:ae,userProfile:p,authorData:L}):(0,j.jsx)(Si,{data:e,reactions:J,isCommentPopUpOpen:K===e.id,setIsCommentPopUpOpen:()=>V(e.id),setOpenCommentPostId:V,commentsLeft:X,setCommentsLeft:q,openCommentPostId:K,getRemainingComments:oe,customPrompt:_,userData:U,pasteButton:se===e.id,setPasteButton:re,copyBtnRef:le,replyBtnRef:ae,index:n,userProfile:p,authorData:L,variant:"commenting"})},e.id)))}),g&&m.length>0&&(0,j.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,j.jsx)("div",{className:"w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})]}),(0,j.jsx)("div",{id:"infinite-scroll-target"})]})})]})}return(0,j.jsxs)(Wi,{children:[(0,j.jsxs)("div",{children:[t&&(0,j.jsxs)(Ui,{children:[(0,j.jsxs)("h1",{children:["\u23f3 Free Trial Active: ",(0,j.jsxs)("span",{children:["[",t,"]"]})," Remaining. Your trial session will expire soon."," ",(0,j.jsx)("span",{onClick:()=>k(!0),style:{textDecoration:"underline",cursor:"pointer",color:"#007BFF"},children:"Upgrade now"})," ","to keep using the feature!"]}),C&&(0,ft.d)((0,j.jsx)(zi.Z,{setOpenModal:k,unipile:!0}))]}),i&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(Gi,{children:["\u26a0\ufe0f Your trial session ends in ",(0,j.jsx)("strong",{children:"5 minutes"}),"!",(0,j.jsx)("br",{}),(0,j.jsx)("button",{onClick:()=>k(!0),children:"Upgrade Now"})]}),C&&(0,j.jsx)(zi.Z,{setOpenModal:k,unipile:!0})]})]}),F&&(0,j.jsx)("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:()=>T(!1),children:(0,j.jsxs)("div",{style:{width:"90%",maxWidth:"500px",background:"#fff",padding:"30px",borderRadius:"12px",boxShadow:"0px 4px 12px rgba(0,0,0,0.15)",position:"relative",textAlign:"center"},onClick:e=>e.stopPropagation(),children:[(0,j.jsx)("h2",{style:{fontWeight:"bolder"},children:"You\u2019re All Set!"}),(0,j.jsx)("p",{style:{margin:"20px 0",fontSize:"16px",lineHeight:"1.6"},children:"We\u2019ve built your first People List from your recent LinkedIn\u2122 activity - jump in, comment, and grow your reach now."}),(0,j.jsx)("button",{onClick:()=>T(!1),style:{padding:"12px 24px",fontSize:"16px",backgroundColor:"#007BFF",color:"#fff",border:"none",borderRadius:"8px",cursor:"pointer"},children:"Let\u2019s Go \u2192"})]})}),(0,j.jsxs)(Oi,{children:[(0,j.jsx)("div",{style:{marginTop:"1rem",textAlign:"left",marginBottom:"2rem"},children:(0,j.jsx)("span",{style:{cursor:"pointer",color:"#007BFF",textDecoration:"underline",fontSize:"14px"},onClick:()=>ie(!0),children:"How to use this feature?"})}),(0,j.jsx)(An,{selectedList:P,setSelectedList:S,selectedSort:R,setSelectedSort:N,selectedDate:Z,setSelectedDate:M,setcurrentCursor:b,selectedPeopleList:B,setSelectedPeopleList:D,setPeopleListInitialized:I,userProfile:p,feedMode:Y,toggleFeedMode:W}),(0,j.jsxs)("div",{style:{marginTop:"2rem",paddingBottom:"2rem"},children:[0===m.length&&!g&&E?(0,j.jsx)("div",{style:{textAlign:"center",padding:"20px",fontSize:"18px",color:"#777"},children:"No posts found"}):m.map(((e,n)=>(0,j.jsxs)(r.Fragment,{children:[" ",(0,j.jsx)(Si,{data:e,reactions:J,isCommentPopUpOpen:K===e.id,setIsCommentPopUpOpen:()=>V(e.id),setOpenCommentPostId:V,commentsLeft:X,setCommentsLeft:q,openCommentPostId:K,getRemainingComments:oe,customPrompt:_,userData:ee,pasteButton:se===e.id,setPasteButton:re,copyBtnRef:le,replyBtnRef:ae,index:n,userProfile:p,authorData:L}),g&&n===m.length-1&&(0,j.jsx)("div",{style:{height:"150px"},children:(0,j.jsx)(Hi,{})})]},e.id))),g&&0===m.length&&(0,j.jsx)(Hi,{}),(0,j.jsx)("div",{id:"infinite-scroll-target"})]})]}),te&&(0,j.jsx)("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:()=>ie(!1),children:(0,j.jsxs)("div",{style:{width:"90%",maxWidth:"720px",background:"#fff",padding:"20px",borderRadius:"8px",position:"relative"},onClick:e=>e.stopPropagation(),children:[(0,j.jsx)("span",{onClick:()=>ie(!1),style:{position:"absolute",top:"10px",right:"15px",cursor:"pointer",fontSize:"20px"},children:"\u274c"}),(0,j.jsx)("h2",{style:{marginBottom:"1rem"},children:"How to use the Posts Feature"}),(0,j.jsx)("div",{style:{position:"relative",paddingTop:"56.25%"},children:(0,j.jsx)("iframe",{src:"https://www.youtube.com/embed/SExWS84klkg",title:"Posts Feature Tutorial",frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"8px"}})})]})})]})};var Ki,Vi,Xi,qi,_i,$i,eo=t(55711);const no=s.ZP.div(Ki||(Ki=(0,i.Z)(["\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, 0.5);\n z-index: 99;\n padding: 30px 0;\n"]))),to=s.ZP.div(Vi||(Vi=(0,i.Z)(["\n position: relative;\n background: white;\n border-radius: 16px;\n padding: 40px 30px;\n width: 100%;\n max-width: 600px;\n box-shadow: 10px 10px 0px 0px #5BB7E7;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 767px) {\n width: 90%;\n padding: 25px 15px;\n }\n"]))),io=s.ZP.button(Xi||(Xi=(0,i.Z)(["\n position: absolute;\n top: 20px;\n right: 25px;\n font-size: 36px;\n border: none;\n background: none;\n cursor: pointer;
1\n color: #333;\n\n &:hover {\n color: #000;\n }\n\n @media (max-width: 767px) {\n font-size: 28px;\n top: 15px;\n right: 15px;\n }\n"]))),oo=s.ZP.h2(qi||(qi=(0,i.Z)(['\n font-family: "Roboto Slab", serif;\n font-weight: 600;\n font-size: 32px;\n line-height: 1.4;\n text-align: center;\n margin-bottom: 24px;\n margin-top: 10px;\n\n @media (max-width: 767px) {\n font-size: 24px;\n }\n']))),so=s.ZP.p(_i||(_i=(0,i.Z)(['\n font-family: "Open Sans", sans-serif;\n font-weight: 600;\n font-size: 20px;\n text-align: center;\n margin-bottom: 30px;\n line-height: 1.4;\n\n @media (max-width: 767px) {\n font-size: 18px;\n }\n']))),ro=s.ZP.div($i||($i=(0,i.Z)(["\n display: flex;\n justify-content: center;\n"]))),lo=e=>{let{onClose:n}=e;const t=(0,d.s0)();return(0,j.jsx)(no,{className:"modalContainerOverlay",children:(0,j.jsxs)(to,{className:"modalContainer",children:[(0,j.jsx)(io,{onClick:n,children:"\xd7"}),(0,j.jsx)(oo,{children:"Congratulations! Your AI Is Ready!"}),(0,j.jsx)(so,{children:"Your AI-generated comments are now personalized to you."}),(0,j.jsx)(ro,{children:(0,j.jsx)(eo.y,{title:"Let\u2019s start commenting",style:{maxWidth:"max-content"},onClick:()=>{n(),t("/posts")}})})]})})};var ao,co,po,uo,Ao,xo,mo,ho,go,fo=t(79221);function vo(e){let{isOpen:n,onClose:t,userData:i}=e;const[s,c]=(0,r.useState)(!1),p=(0,d.s0)();if(!n)return null;const u=async e=>{c(!0);try{await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/auth/workspace-preference"),{withCredentials:!0},{email:null===i||void 0===i?void 0:i.email,workspacePreference:e});const n=(0,o.Z)((0,o.Z)({},i),{},{hasSeenMigrationModal:!0,workspacePreference:e});localStorage.setItem("userData",JSON.stringify(n)),t(),p("focus"===e?"/focus":"/commenting")}catch(n){console.error(n),t(),p("focus"===e?"/focus":"/commenting")}finally{c(!1)}},A=()=>{u("commenting")};return(0,j.jsx)(bo,{onClick:A,children:(0,j.jsxs)(yo,{onClick:e=>e.stopPropagation(),children:[(0,j.jsx)(jo,{onClick:A,children:"\xd7"}),(0,j.jsx)(wo,{children:"A quick note about the updated workspace"}),(0,j.jsx)(Co,{children:"Your data and conversations are unchanged."}),(0,j.jsxs)(ko,{children:["Many people first used Commenter AI to help with comments.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"Over time it became clear that the harder part was keeping track of the conversations that started after those comments.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"The platform now includes a new view called ",(0,j.jsx)("strong",{children:"Focus"}),", which shows conversations where timing may matter.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"Commenting remains available as part of the workflow."]}),(0,j.jsxs)(Eo,{children:[(0,j.jsx)(Io,{disabled:s,onClick:()=>u("focus"),children:"Open Focus"}),(0,j.jsx)(Po,{disabled:s,onClick:()=>u("commenting"),children:"Continue to Comments"})]})]})})}const bo=s.ZP.div(ao||(ao=(0,i.Z)(["\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.65);\n backdrop-filter: blur(4px);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 99999;\n"]))),yo=s.ZP.div(co||(co=(0,i.Z)(["\n background: #2b2b2f;\n color: #fff;\n padding: 40px 40px 34px;\n border-radius: 14px;\n\n max-width: 740px; /* increased width */\n width: 92%;\n\n position: relative;\n text-align: center;\n\n box-shadow: 0 20px 60px rgba(0,0,0,0.5);\n\n animation: modal-pop 0.25s ease-out forwards;\n\n @keyframes modal-pop {\n 0% { transform: scale(0.95); opacity: 0; }\n 100% { transform: scale(1); opacity: 1; }\n }\n"]))),jo=s.ZP.button(po||(po=(0,i.Z)(["\n position: absolute;\n top: 18px;\n right: 18px;\n border: none;\n background: none;\n color: #b5b5b5;\n font-size: 26px;\n cursor: pointer;\n\n &:hover {\n color: white;\n }\n"]))),wo=s.ZP.h2(uo||(uo=(0,i.Z)(["\n font-size: 26px;\n font-weight: 700;\n margin-bottom: 8px;\n"]))),Co=s.ZP.div(Ao||(Ao=(0,i.Z)(["\n font-size: 15px;\n color: #b7b7b7;\n margin-bottom: 22px;
1\n"]))),ko=s.ZP.div(xo||(xo=(0,i.Z)(["\n font-size: 16px;\n line-height: 1.65;\n color: #cfcfcf;\n margin-bottom: 30px;\n\n strong {\n color: #fff;\n }\n"]))),Eo=s.ZP.div(mo||(mo=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n"]))),Io=s.ZP.button(ho||(ho=(0,i.Z)(["\n background: linear-gradient(180deg,#4ea3ff,#2f7edb);\n border: none;\n color: white;\n padding: 14px;\n border-radius: 8px;\n font-size: 16px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s;\n\n &:hover:not(:disabled){\n transform: translateY(-1px);\n box-shadow: 0 6px 16px rgba(64,140,255,0.35);\n }\n\n &:disabled{\n opacity: .6;\n cursor: wait;\n }\n"]))),Po=s.ZP.button(go||(go=(0,i.Z)(["\n background: #3a3a3f;\n border: none;\n color: #e5e5e5;\n padding: 13px;\n border-radius: 8px;\n font-size: 15px;\n font-weight: 500;\n cursor: pointer;\n\n transition: all 0.2s;\n\n &:hover:not(:disabled){\n background: #45454a;\n }\n\n &:disabled{\n opacity: .6;\n cursor: wait;\n }\n"])));function So(e){let{userProfile:n,remainingTime:t,showUpgradeWarning:i,showTrialEndedModal:s,setShowTrialEndedModal:l}=e;const[a,c]=(0,r.useState)(!1),p=(0,d.TH)(),u=JSON.parse(localStorage.getItem("userData")||"{}");(0,r.useEffect)((()=>{!("true"===new URLSearchParams(p.search).get("migration"))&&!u.requiresMigration||u.hasSeenMigrationModal||c(!0)}),[p.search,u.requiresMigration,u.hasSeenMigrationModal]);return(0,j.jsxs)("div",{className:"relative h-full",style:{backgroundColor:"#09090B"},children:[(0,j.jsx)(Ji,{variant:"commenting",renderHeader:e=>(0,j.jsx)(Bo,(0,o.Z)({},e)),userProfile:n,remainingTime:t,showUpgradeWarning:i,showTrialEndedModal:s,setShowTrialEndedModal:l}),(0,j.jsx)(vo,{isOpen:a,onClose:()=>c(!1),userData:u})]})}function Bo(e){var n;let{selectedList:t,setSelectedList:i,selectedSort:o,setSelectedSort:s,selectedDate:c,setSelectedDate:p,setcurrentCursor:u,selectedPeopleList:A,setSelectedPeopleList:x,setPeopleListInitialized:m,feedMode:h,toggleFeedMode:g}=e;const f=(0,d.s0)(),[v,b]=(0,r.useState)([]),[y,w]=(0,r.useState)([]),[C,k]=(0,r.useState)(!1),[E,I]=(0,r.useState)("replied"),[P,S]=(0,r.useState)([]),[B,D]=(0,r.useState)(null),[R,N]=(0,r.useState)(!0),[Z,M]=(0,r.useState)(!1),[F,T]=(0,r.useState)(null),[Y,Q]=(0,r.useState)(null),L=null===(n=JSON.parse(localStorage.getItem("userData")||"{}"))||void 0===n?void 0:n.provider_id,z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;if(R&&!Z)try{var n,t,i;M(!0);const o={provider_id:L},s=B?"?limit=".concat(e,"&skipCount=false&cursor=").concat(B):"?limit=".concat(e,"&skipCount=false"),r=null===(n=(await a.I.post("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/getAllComments").concat(s),{withCredentials:!0},o)).data)||void 0===n?void 0:n.data,d=(null===r||void 0===r||null===(t=r.items)||void 0===t?void 0:t.filter((e=>!e.thread_id)))||[];S((e=>{const n=[...e,...d],t=new Map;return n.forEach((e=>t.set(e.id,e))),Array.from(t.values())})),D((null===r||void 0===r?void 0:r.next_cursor)||null),N(null!==(i=null===r||void 0===r?void 0:r.has_more)&&void 0!==i&&i)}catch(o){console.error("Fetch comments failed:",o)}finally{M(!1)}};(0,r.useEffect)((()=>{C&&z()}),[C]);const G=P.filter((e=>!e.thread_id)).filter((e=>"all"===E||"replied"===E&&e.reply_counter>0));(0,r.useEffect)((()=>{(async()=>{try{var e,n;const[t,i]=await Promise.all([a.I.get("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/keywords/getAll"),{withCredentials:!0}).catch((()=>null)),a.I.get("".concat(l.vc.urlPlatform,"/api/v2/unipile/linkedin/people/getAll"),{withCredentials:!0}).catch((()=>null))]);null!==t&&void 0!==t&&null!==(e=t.data)&&void 0!==e&&e.success&&b(t.data.data||[]),null!==i&&void 0!==i&&null!==(n=i.data)&&void 0!==n&&n.success&&w(i.data.data||[])}catch(t){console.error("Failed to load filter lists:",t)}finally{m(!0)}})()}),[]);const U=[{label:"Keywords",value:""},...v.map((e=>({label:e.list_name,value:e.keywords})))],H=[{label:"People",value:""},...y.map((e=>({label:e.list_name,value:e.id})))];return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:"px-6 pt-6 pb-4",children:[(0,j.jsx)("h1",{className:"text-lg font-bold mb-1",style:{color:"#FAFAFA"},children:"COMMENTING WORKSPACE"}),(0,j.jsx)("p",{className:"text-sm",style:{color:"#71717A"},children:"This feed is where engagement becomes conversations that appear in Focus."})]}),(0,j.jsxs)("div",{className:"px-6 py-3 flex items-center gap-3 flex-wrap",style:{borderBottom:"1px solid #27272A"},children:[(0,j.jsx)("button",{onClick:()=>f(l.o0.peopleLists),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{backgroundColor:"#27272A",color:"#A1A1AA"},children:"Add/Edit People Lists"}),(0,j.jsx)("button",{onClick:()=>f(l.o0.listposts),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{backgroundColor:"#27272A",color:"#A1A1AA"},children:"Add/Edit Keyword Lists"}),(0,j.jsx)(Do,{label:"People",value:A,options:H,onChange:e=>{i(""),x(e),u(null),"myPosts"===h&&g()}}),(0,j.jsx)(Do,{label:"Keyword",value:t,options:U,onChange:e=>{x(""),i(e),u(null),"myPosts"===h&&g()}}),(0,j.jsx)(Do,{label:"Sort",value:o,options:[{label:"Date",value:"date"},{label:"Relevance",value:"relevance"}],onChange:e=>{s(e),u(null)}}),(0,j.jsx)(Do,{label:"Time",value:c,options:[{label:"All Time",value:""},{label:"Past Day",value:"past_day"},{label:"Past Week",value:"past_week"},{label:"Past Month",value:"past_month"}],onChange:e=>{p(e),u(null)}}),(0,j.jsx)(Do,{label:"Post type",value:"myPosts"===h?"My Posts":"Posts",options:["Posts","My Posts","My Replies"],onChange:e=>{"My Replies"!==e?("My Posts"===e&&"myPosts"!==h&&(g(),x(""),i(""),u(null)),"Posts"===e&&"myPosts"===h&&(g(),u(null))):k(!0)}})]}),C&&(0,j.jsx)("div",{className:"fixed inset-0 flex items-start sm:items-center justify-center bg-black/70 z-[999999] p-4",children:(0,j.jsxs)("div",{className:"w-full sm:w-2/3 h-[95vh] overflow-y-auto rounded-lg p-6 relative",style:{backgroundColor:"#18181B",border:"1px solid #27272A"},children:[(0,j.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-6",children:[(0,j.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,j.jsx)("button",{onClick:()=>I("replied"),className:"px-3 py-1 rounded font-medium text-sm transition",style:"replied"===E?{backgroundColor:"#2563EB",color:"#FAFAFA"}:{backgroundColor:"#27272A",color:"#A1A1AA"},children:"Replied Comments"})}),(0,j.jsx)("button",{onClick:()=>k(!1),className:"px-3 py-1 rounded text-sm transition",style:{backgroundColor:"#27272A",color:"#A1A1AA"},children:"Close"})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h3",{className:"text-lg font-semibold my-4 text-center",style:{color:"#FAFAFA"},children:"all"===E?"Here are all your comments":"Here are all your comments that have replies"}),(0,j.jsxs)("div",{className:"grid gap-2 grid-cols-1",children:[0===G.length&&!Z&&(0,j.jsx)("p",{className:"text-center py-4",style:{color:"#71717A"},children:"all"===E?"No comments found":"No replied comments found"}),G.map((e=>(0,j.jsx)(tn,{commentId:e.id,postId:e.post_id,social_id:e.post_urn,text:e.text,author:e.author,replyCount:e.reply_counter,openCommentId:F,setOpenCommentId:T,openPostId:Y,setOpenPostId:Q},e.id))),Z&&(0,j.jsxs)("div",{className:"flex flex-col items-center justify-center py-6",children:[(0,j.jsx)("div",{className:"w-8 h-8 border-4 border-blue-600 border-t-transparent roun
1ded-full animate-spin mb-3"}),(0,j.jsx)("p",{className:"text-blue-500 text-sm font-medium",children:"Loading comments..."})]}),R&&!Z&&(0,j.jsx)("div",{className:"flex justify-center mt-4",children:(0,j.jsx)("button",{onClick:()=>z(),className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition",children:"Load More Comments"})})]})]})]})})]})}function Do(e){var n,t;let{label:i,value:o,options:s,onChange:l}=e;const[a,d]=(0,r.useState)(!1),c=s.map((e=>"string"===typeof e?{label:e,value:e}:e)),p=(null===(n=c.find((e=>e.value===o||e.label===o)))||void 0===n?void 0:n.label)||o||i,u=!o||""===o||p===(null===(t=c[0])||void 0===t?void 0:t.label);return(0,j.jsxs)("div",{className:"relative",children:[(0,j.jsxs)("button",{onClick:()=>d(!a),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{backgroundColor:"#27272A",color:u?"#A1A1AA":"#FAFAFA"},children:[p,(0,j.jsx)(fo.Z,{size:14})]}),a&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>d(!1)}),(0,j.jsx)("div",{className:"absolute top-full left-0 mt-1 py-1 rounded-lg shadow-lg z-20 min-w-[150px] max-h-[300px] overflow-y-auto",style:{backgroundColor:"#27272A"},children:c.map((e=>(0,j.jsx)("button",{onClick:()=>{l(e.value),d(!1)},className:"w-full px-4 py-2 text-left text-sm hover:bg-white/5",style:{color:o===e.value?"#2563EB":"#FAFAFA"},children:e.label},e.label)))})]})]})}var Ro,No,Zo,Mo,Fo,To,Yo=t(98741),Qo=t(13762),Lo=t(93815);const zo=s.ZP.div(Ro||(Ro=(0,i.Z)(["\n display: flex;\n justify-content: center;\n margin-top: 60px;\n"]))),Go={display:"flex","justify-content":"center","align-items":"center"},Uo=s.ZP.div(No||(No=(0,i.Z)(["\n height: 100%;\n"]))),Ho=s.ZP.div(Zo||(Zo=(0,i.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: ",";\n background-color: ",";\n"])),(e=>e.$isDark?"100vh":"calc(100dvh - 84px)"),(e=>e.$isDark?"#09090B":"transparent")),Wo=s.ZP.button(Mo||(Mo=(0,i.Z)(["\n text-align: center;\n background-color: ",";\n cursor: pointer;\n color: #fff;\n padding: 10px 20px;\n border-radius: 5px;\n margin-top:30px;\n"])),(e=>e.theme.darkBgColor)),Oo=s.ZP.div(Fo||(Fo=(0,i.Z)(["\n color: red;\n font-weight: 500;\n margin-bottom: 2rem;\n animation: fade-up-quick 0.5s;\n"]))),Jo=s.ZP.span(To||(To=(0,i.Z)(['\n display: block;\n margin-left: auto;\n margin-right: auto;\n width: 35px;\n height: 35px;\n border-radius: 50%;\n position: relative;\n animation: rotate 1s linear infinite;\n &::before {\n content: "";\n box-sizing: border-box;\n position: absolute;\n inset: 0px;\n border-radius: 50%;\n border: 4px solid #0a66c2;\n animation: prixClipFix 2s linear infinite;\n }\n']))),Ko=e=>{let{variant:n}=e;const t="commenting"===n,[i,s]=(0,r.useState)(!1),[l,a]=(0,r.useState)(!1),[c,p]=(0,r.useState)(!1),u=(0,Lo.H)(),A=(0,d.TH)().state;(0,r.useEffect)((()=>{null!==A&&void 0!==A&&A.showCongrats&&!c&&(a(!0),p(!0),window.history.replaceState({},document.title))}),[A,c]);const{isTrialLoading:x,isSessionActive:m,remainingTime:h,showUpgradeWarning:g,showTrialEndedModal:f,trialEnded:v,showTestNote:b,showReconnectButton:y,isConnectButtonDisabled:w,errorMessage:C,sessionError:k,userProfile:E,unipileRestrict:I,reconnectCountdown:P,isReconnectCountdownActive:S}=u;if(x)return(0,j.jsx)(Ho,{$isDark:t,children:(0,j.jsx)(Jo,{})});const B=u.isSessionPaused&&y;return t&&(B||u.isTrialFullyExpired)?(0,j.jsxs)(Ho,{$isDark:!0,children:[(0,j.jsx)(Qo.Z,{onReconnect:()=>u.handleConnectClick((()=>u.setShowTrialEndedModal(!0))),reconnectCountdown:P,isReconnectCountdownActive:S,isConnectButtonDisabled:w,isExpired:u.isTrialFullyExpired}),f&&(0,wn.createPortal)((0,j.jsx)(zi.Z,{setOpenModal:()=>u.setShowTrialEndedModal(!1)}),document.body)]}):(0,j.jsxs)("div",{style:{overflow:"auto",height:t?"100vh":"calc(100dvh - 84px)",backgroundColor:t?"#09090B":void 0},children:[m?t?(0,j.jsx)(So,{userProfile:E,remainingTime:h,showUpgradeWarning:g,showTrialEndedModal:f,setShowTrialEndedModal:e=>u.setShowTrialEndedModal(e)}):(0,j.jsx)(Ji,{remainingTime:h,showUpgradeWarning:g,showTrialEndedModal:f,setShowTrialEndedModal:e=>u.setShowTrialEndedModal(e),userProfile:E,variant:n}):t?v?(0,j.jsx)("div",{style:{minHeight:"100vh",backgroundColor:"#09090B",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,j.jsx)(Qo.Z,{isExpired:!0})}):(0,j.jsx)(Yo.default,{}):(0,j.jsxs)(Uo,{children:[(0,j.jsxs)("div",{style:{height:"100%"},children:[(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"16px",padding:"24px",maxWidth:"600px",margin:"0 auto",textAlign:"center",position:"relative",zIndex:50},children:[(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsxs)("div",{style:{position:"relative",display:"inline-block"},children:[(0,j.jsx)(Wo,{onClick:()=>{u.handleConnectClick()},disabled:w&&!S,style:{opacity:w&&!S?.5:1,cursor:w&&!S?"not-allowed":"pointer",fontSize:"105%",padding:"15px 30px",marginBottom:"5px",transition:"opacity 0.3s ease"},children:y?S?"Reconnect available in ".concat(P||"..."):"Reconnect Now":w&&v?"Connect your LinkedIn\u2122 account":w&&!I?"Connecting...":"Connect your LinkedIn\u2122 account"}),(0,j.jsx)(gt,{t:"40%",l:"105%"})]}),(0,j.jsx)("div",{style:{marginTop:"10px"},children:k&&(0,j.jsx)(Oo,{style:(0,o.Z)((0,o.Z)({},Go),{},{color:"red"}),children:k})})]}),(0,j.jsxs)("div",{style:(0,o.Z)({marginTop:"12px",backgroundColor:t?"#18181B":"#f9f9f9",padding:"10px",borderRadius:"12px",boxShadow:t?"none":"0 2px 6px rgba(0,0,0,0.1)",textAlign:"left"},t?{border:"1px solid #27272A"}:{}),children:[(0,j.jsx)("h3",{style:{textAlign:"center",marginBottom:"16
1px",color:t?"#FAFAFA":void 0},children:"Your first comment is 43 seconds away\u2026"}),(0,j.jsxs)("ol",{style:{paddingLeft:"20px",lineHeight:"1.8",color:t?"#E4E4E7":void 0},children:[(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Connect your LinkedIn\u2122"})," by clicking the blue button above"," ",(0,j.jsx)("span",{role:"img","aria-label":"arrow",children:"\u2b06\ufe0f"})]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:"Write your first comment"})," by clicking this icon:"," ",(0,j.jsx)("img",{style:{height:"25px",width:"25px"},src:jn,alt:"open icon"})]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:'Click "Copy"'})," once your comment is ready."]}),(0,j.jsxs)("li",{children:[(0,j.jsx)("strong",{children:'Click "Reply"'})," to post your comment."]})]}),(0,j.jsx)("p",{style:{marginTop:"12px",fontWeight:"bold",color:t?"#FAFAFA":void 0},children:"And that's it \u2013 your first comment will be posted in under 43 seconds!"}),(0,j.jsx)("p",{style:{marginTop:"8px",fontStyle:"italic",color:t?"#A1A1AA":void 0},children:"P.S. Want to see the steps in action? Watch the video below!"})]}),v&&(0,j.jsx)("div",{children:(0,j.jsx)(Wo,{onClick:()=>u.setShowTrialEndedModal(!0),children:"Subscribe Now"})})]}),(0,j.jsx)("div",{children:C&&(0,j.jsx)(Oo,{style:Go,children:C})}),b&&(0,j.jsx)("div",{style:{backgroundColor:t?"#18181B":"#FFFBEA",borderLeft:"5px solid rgb(21,120,250)",padding:"16px",borderRadius:"16px",boxShadow:t?"none":"0 2px 8px rgba(0,0,0,0.05)",maxWidth:"800px",margin:"20px auto 0"},children:(0,j.jsxs)("h1",{style:{fontSize:"15px",fontWeight:600,color:t?"#E4E4E7":"#92400E",lineHeight:1.6,margin:"0px"},children:["You have a free trial for"," ",(0,j.jsx)("span",{style:{fontWeight:"bold",textDecoration:"underline"},children:"3 days"}),". You can use the feature for"," ",(0,j.jsx)("span",{style:{fontWeight:"bold"},children:"1 hour each day"}),". After the trial ends, you'll need to upgrade to continue."]})}),(0,j.jsx)(zo,{children:(0,j.jsx)("iframe",{style:{border:"0px solid #000"},width:"560",height:"315",src:"https://www.youtube.com/embed/SExWS84klkg",title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})]}),l&&(0,j.jsx)(lo,{onClose:()=>{a(!1)}})]}),f&&(0,wn.createPortal)((0,j.jsx)(zi.Z,{setOpenModal:()=>u.setShowTrialEndedModal(!1)}),document.body)]})}},68287:(e,n,t)=>{"use strict";e.exports=t.p+"static/media/userProfile.838b2604657754be4cd6.png"},93414:()=>{},70172:()=>{},2001:()=>{},33779:()=>{},66558:()=>{},82258:()=>{}}]); 2//# sourceMappingURL=5198.404c098a.chunk.js.map
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.