PageSourceSearch

https://app.tweethunter.io/_next/static/chunks/pages/engage-1f3228be53fcb2fa.js

js tweethunter.io collected 2026-09-24 09:24:19 UTC 50,632 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c0054d34-6111-4666-abf7-d458b0484d64",e._sentryDebugIdIdentifier="sentry-dbid-c0054d34-6111-4666-abf7-d458b0484d64")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4409],{2330:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/engage",function(){return n(47571)}])},16296:function(e,t,n){"use strict";n.d(t,{K:function(){return j}});var i=n(85893),s=n(67294),l=n(48633),o=n(83658),r=n(68029),a=n(8186),d=n(38488),c=n(51107),u=n(88329),x=n(42811),h=n(90092),m=n(64831),f=n(74931),v=n(85551),g=n(93974),p=n(39971);function j(e){let{onApply:t,initialSelection:n}=e,[c,u]=(0,s.useState)([]),[x,h]=(0,s.useState)(!1),{isOpen:m,onOpen:j,onClose:w}=(0,o.q)(),[b]=(0,l.kP)();(0,s.useEffect)(()=>{var e,t,i,s,l,o;if(b&&!x&&(null==n?void 0:n.length)>0){h(!0);let r=null!==(l=null==b?void 0:null===(i=b.user)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:null===(e=t.accounts)||void 0===e?void 0:e.filter(e=>e.idAccount!=b.user.uid&&"twitter"==e.provider))&&void 0!==l?l:[],a=null!==(o=null==b?void 0:null===(s=b.user)||void 0===s?void 0:s.data)&&void 0!==o?o:{},d=[a,...r];d.forEach(e=>{n.some(t=>t.twUserName===e.twUserName)?e.isChecked=!0:e.isChecked=!1}),u(d)}},[b,n]);let C=(e,t)=>{let n=[...c],i=c.findIndex(t=>t.idAccount===e);n[i].isChecked=t,u(n)};return(0,i.jsxs)(r.x,{children:[(null==c?void 0:c.length)>0&&c.map((e,t)=>{var n;return(0,i.jsx)(y,{image:e.image,handle:e.twUserName,type:e.idAccount!=(null==b?void 0:null===(n=b.user)||void 0===n?void 0:n.uid)?"secondary":"main",isChecked:e.isChecked,onChange:t=>C(e.idAccount,t)},t)}),(0,i.jsx)(a.g,{my:"3",mt:"5",spacing:"3",children:(0,i.jsx)(d.z,{variant:"primary",onClick:()=>{let e=[...c].filter(e=>e.isChecked);if((null==e?void 0:e.length)===0){f.default.error("Atleast select 1 account");return}t(e);let n=e.map(e=>e.twUserName);(0,v._m)(g.As,n.join(","))},children:"Apply"})}),(0,i.jsx)(p.n,{isOpen:m,onClose:w})]})}function y(e){let{image:t="",handle:n="",type:s="main",isChecked:l=!1,onChange:o=()=>{}}=e;return(0,i.jsxs)(r.x,{children:[(0,i.jsx)(r.x,{px:"4",py:"1.5",children:(0,i.jsx)(c.X,{isChecked:l,onChange:e=>o(e.target.checked),children:(0,i.jsxs)(u.k,{ml:"3",alignItems:"center",children:[(0,i.jsx)(x.E,{w:"9",h:"9",rounded:"3xl",objectFit:"cover",src:t,fallbackSrc:"/assets/resources/emptyProfile.png"}),(0,i.jsxs)(r.x,{ml:"2",children:[(0,i.jsxs)(h.x,{fontSize:"sm",fontWeight:"medium",mb:"-1.5",textStyle:"body.medium",color:"neutral.content-strong",children:["@",n]}),(0,i.jsxs)(h.x,{fontSize:"sm",mt:"1",textStyle:"body.medium",color:"neutral.content",children:[s," account"]})]})]})})}),(0,i.jsx)(m.i,{})]})}},27687:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.d(t,{z:function(){return y}});var s=n(85893),l=n(67294),o=n(41664),r=n.n(o),a=n(48633),d=n(68029),c=n(90092),u=n(57879),x=n(89582),h=n(93974),m=n(95857),f=n(5913),v=n(93964),g=n(30055),p=n(92676),j=e([x]);function y(e){let{filters:t,onChangeFilters:n}=e,[i,o]=(0,l.useState)(!1),[j,y]=(0,l.useState)(!1),[w,b]=(0,l.useState)(null),[C,S]=(0,l.useState)(t),[k]=(0,a.kP)(),D=(0,l.useContext)(f.T),{updateOnboardSteps:E}=(0,g.o)(),O=(0,p.F)();(0,l.useEffect)(()=>{S(t)},[t]),(0,l.useEffect)(()=>{k&&!j&&(y(!0),_(k,C))},[k]);let _=async(e,t)=>{var n,s;if(i||!O.crmEngage)return;let{minDaysOld:l,maxDaysOld:r,minFollowers:a,maxFollowers:d,positiveKeywords:c,negativeKeywords:u}=t;o(!0),S(t);let x={idUser:null==e?void 0:null===(n=e.user)||void 0===n?void 0:n.uid,idAccount:null===(s=(0,m.D0)(e))||void 0===s?void 0:s.idAccount,isPersonalizedSorting:!1,nbMinDaysOld:l,nbMaxDaysOld:r,nbMinLikes:1,nbMinRt:0,nbMinFollowers:a,nbMaxFollowers:d,mode:h.xJ.byPeople,engageAccounts:O.crmEngage};(null==c?void 0:c.length)>0&&(x.positiveKeywords=c.join(",")),(null==u?void 0:u.length)&&(x.negativeKeywords=u.join(","));let f=await (0,v.t9)(e,"",x,D.onOpenUpgrade);
1f&&(0!==f.success||f.tweets)?(f.tweets.forEach(e=>{e.isPosting=!1}),b(f)):b(null),E("engage"),o(!1)};return(0,s.jsx)(d.x,{children:(0,s.jsx)(x.u,{mode:"people",isLoading:i,data:w,setData:b,hasFilters:!0,overrideFilters:t,onRefresh:e=>_(k,e),onApplyFilters:e=>{n(e),_(k,e)},messageOnNoTweets:(0,s.jsx)(d.x,{mt:"16",children:(0,s.jsx)(c.x,{textAlign:"center",children:(null==w?void 0:w.tweets)===void 0?(0,s.jsxs)(s.Fragment,{children:["Select people from"," ",(0,s.jsx)(r(),{href:"/contacts",passHref:!0,legacyBehavior:!0,children:(0,s.jsx)(u.r,{variant:"primary",textDecoration:"underline",children:"Contacts"})})," ","page to engage with"]}):(0,s.jsx)(s.Fragment,{children:"No Tweets found"})})})})})}x=(j.then?(await j)():j)[0],i()}catch(e){i(e)}})},50233:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.d(t,{e:function(){return S}});var s=n(85893),l=n(67294),o=n(11163),r=n(48633),a=n(95478),d=n(59342),c=n(90573),u=n(33229),x=n(8387),h=n(93974),m=n(10445),f=n(60378),v=n(65202),g=n(28354),p=n(27687),j=n(29992),y=n(92676),w=n(67142),b=n(95857),C=e([m,f,v,g,p]);[m,f,v,g,p]=C.then?(await C)():C;let k=["people","keywords","mentions-and-replies","people-i-follow","custom"];function S(e){let{query:t}=e,[n,i]=(0,l.useState)(-1!==k.indexOf(t.tab)?k.indexOf(t.tab):0),[C,S]=(0,l.useState)(h.js),[D,E]=(0,l.useState)(!1),O=(0,o.useRouter)(),[_]=(0,r.kP)(),A=(0,j.I)(),M=(0,y.F)();(0,l.useEffect)(()=>{let e=localStorage.getItem(h.t6);if(e){let n=JSON.parse(e);S({...n,...t})}},[]),(0,l.useEffect)(()=>{L(t)},[t.tab]),(0,l.useEffect)(()=>{let e=async()=>{try{var e;let t=w.GX.firestore(),n=await t.collection("users").doc(null===(e=(0,b.D0)(_))||void 0===e?void 0:e.id).collection("replies").orderBy("dateLastReply","desc").limit(200).get(),i=[];n.forEach(e=>{var t;let n=e.data();(null==n?void 0:null===(t=n.replies)||void 0===t?void 0:t.length)>0&&i.push(...n.replies)}),M.setLast100Replies(i)}catch(e){console.log("Error in fetching replies: ",e.message)}finally{E(!0)}};_&&A&&!D&&e()},[_,A]);let I=e=>{O.replace({query:{...O.query,...e}}),S(e)},L=e=>{if(e.tab){let t=k.indexOf(e.tab);i(t)}else O.push({pathname:"engage",query:{tab:k[0]}})};return(0,s.jsxs)(a.m,{pt:"8",index:n,onChange:e=>{i(e);let t={...C};t.minDaysOld.toString().includes(".")&&(t.minDaysOld=Math.floor(t.minDaysOld)),t.maxDaysOld.toString().includes(".")&&(t.maxDaysOld=t.maxDaysOld<1?Math.ceil(t.maxDaysOld):Math.floor(t.maxDaysOld)),1===e&&(t.maxDaysOld>7&&(t.maxDaysOld=7),t.minDaysOld>7&&(t.minDaysOld=0)),S({...t}),O.push({pathname:"engage",query:{...O.query,...t,tab:k[e]}})},lazyBehavior:"keepMounted",isLazy:!0,children:[(0,s.jsxs)(d.t,{children:[(0,s.jsx)(c.O,{children:"People"}),(0,s.jsx)(c.O,{children:"Keywords"}),(0,s.jsx)(c.O,{children:"Mentions & Replies"}),(0,s.jsx)(c.O,{children:"People I Follow"})]}),(0,s.jsxs)(u.n,{children:[(0,s.jsx)(x.x,{px:"0",children:(0,s.jsx)(m.Q,{filters:C,onChangeFilters:I})}),(0,s.jsx)(x.x,{px:"0",children:(0,s.jsx)(f.E,{filters:C,onChangeFilters:I})}),(0,s.jsx)(x.x,{px:"0",children:(0,s.jsx)(v._,{filters:C,onChangeFilters:I})}),(0,s.jsx)(x.x,{px:"0",children:(0,s.jsx)(g.i,{filters:C,onChangeFilters:I})}),(0,s.jsx)(x.x,{px:"0",children:(0,s.jsx)(p.z,{filters:C,onChangeFilters:I})})]})]})}i()}catch(e){i(e)}})},40685:function(e,t,n){"use strict";n.d(t,{G$:function(){return E},DC:function(){return D}});var i=n(85893),s=n(67294),l=n(5490),o=n(34614),r=n(56978),a=n(57391),d=n(21360),c=n(70010),u=n(16610),x=n(59099),h=n(54506),m=n(30980),f=n(90092),v=n(2255),g=n(68029),p=n(51107),j=n(45443),y=n(38488),w=n(17629),b=n(25658);function C(e){let{value:t,onChange:n,mode:s="default"}=e,l=Math.floor(t[0]),o=(t[0]-l)*24,r=Math.floor(t[1]),a=(t[1]-r)*24;return(0,i.jsxs)(g.x,{mt:"3",children:[(0,i.jsxs)(b.U2,{"aria-label":["min","max"],min:0,max:"keywords"===s?7:30,step:"peopleIfollow"===s||"keywords"===s?.25:1,value:t,onChange:n,children:[(0,i.jsx)(b.ug,{children:(0,i.jsx)(b.I2,{})}),(0,i.jsx)(b.xW,{index:0,boxSize:"4"}),(0,i.jsx)(b.xW,{index:1,boxSize:"4"})]}),"peopleIfollow"===s||"keywords"===s?(0,i.jsxs)(f.x,{mt:"2",children:[l?l+"d":o?"":"0d"," ",o?o+"h":""," - ",r?r+"d":""," ",a?a+"h":""]}):(0,i.jsxs)(f.x,{mt:"2",children:[t[0]," - ",t[1]," days"]})]})}var S=n(85551);function k(e){let{value:t,onChange:n}=e;return(0,i.jsxs)(g.x,{mt:"3",children:[(0,i.jsxs)(b.U2,{"aria-label":["min","max"],min:0,max:D,step:5e3,value:t,onChange:n,children:[(0,i.jsx)(b.ug,{children:(0,i.jsx)(b.I2,{})}),(0,i.jsx)(b.xW,{index:0,boxSize:"4"}),(0,i.jsx)(b.xW,{index:1,boxSize:"4"})]}),(0,i.jsxs)(f.x,{mt:"2",children:[(0,S.vd)(t[0],0)," -"," ",t[1]===D||999999999===t[1]?"unlimited":(0,S.vd)(t[1],0)," ","followers"]})]})}let D=105e3,E=(0,s.memo)(function(e){let{isOpen:t,onClose:n,filters:b,onApplyFilters:S,mode:E}
1=e,[O,_]=(0,s.useState)([3,24]),[A,M]=(0,s.useState)([2e3,999999999]),[I,L]=(0,s.useState)(1),[z,P]=(0,s.useState)([]),[F,R]=(0,s.useState)([]),[T,N]=(0,s.useState)(!1),[U,W]=(0,s.useState)(!0),[K,H]=(0,s.useState)(!0),[J,q]=(0,s.useState)(!0),X=()=>{let e={minFollowers:A[0],maxFollowers:A[1]>=D?999999999:A[1],minLikes:null!=I?I:1,negativeKeywords:F,positiveKeywords:z,minDaysOld:O[0],maxDaysOld:O[1],noMediaAndLinks:U,noReplies:K,notReplied:J};return"mentions&replies"===E&&(e.notLiked=T),e};return(0,s.useEffect)(()=>{let{minDaysOld:e,maxDaysOld:t,minFollowers:n,maxFollowers:i,minLikes:s,positiveKeywords:l,negativeKeywords:o,notLiked:r,noMediaAndLinks:a,noReplies:d,notReplied:c}=b;_([e,t]),M([n,i||21e3]),L(null!=s?s:1),P(l),R(o),N(null!=r&&r),W(null==a||a),H(null==d||d),q(null==c||c)},[b]),(0,i.jsxs)(l.u_,{size:"2xl",isOpen:t,onClose:n,children:[(0,i.jsx)(o.Z,{}),(0,i.jsxs)(r.h,{children:[(0,i.jsx)(a.x,{children:"Filters"}),(0,i.jsx)(d.o,{}),(0,i.jsxs)(c.f,{children:[(0,i.jsxs)(u.r,{templateColumns:{base:"repeat(1, 1fr)",md:"repeat(2, 1fr)"},columnGap:{base:"8",md:"12"},rowGap:{base:"4",md:"6"},mx:"0",children:[(0,i.jsx)(x.P,{children:(0,i.jsxs)(h.NI,{children:[(0,i.jsxs)(m.l,{children:[(0,i.jsx)(f.x,{textStyle:"h4",fontWeight:600,children:"Date published"}),"peopleIfollow"===E?(0,i.jsx)(f.x,{textStyle:"body.medium",color:"neutral.content",fontSize:"xs",children:"Limited to the last 3200 tweets featured in your timeline"}):null]}),(0,i.jsx)(C,{mode:E,value:O,onChange:e=>_(e)})]})}),(0,i.jsx)(x.P,{children:(0,i.jsxs)(h.NI,{children:[(0,i.jsx)(m.l,{children:(0,i.jsx)(f.x,{textStyle:"h4",fontWeight:600,children:"Followers"})}),(0,i.jsx)(k,{value:A,onChange:e=>M(e)})]})}),(0,i.jsx)(x.P,{children:(0,i.jsxs)(h.NI,{children:[(0,i.jsx)(m.l,{mb:1,children:(0,i.jsx)(f.x,{textStyle:"h4",fontWeight:600,children:"Likes"})}
1),(0,i.jsxs)(v.iR,{mt:0,min:0,max:100,w:200,value:I,onChange:e=>L(e),children:[(0,i.jsx)(v.Uj,{children:(0,i.jsx)(v.Ms,{})}),(0,i.jsx)(v.gs,{})]}),(0,i.jsxs)(f.x,{mt:2,children:["minimum ",I," like",I>1?"s":""]})]})})]}),(0,i.jsxs)(g.x,{mt:"10",children:[(0,i.jsx)(f.x,{textStyle:"h4",fontWeight:600,children:"Keywords"}),(0,i.jsxs)(u.r,{templateColumns:{base:"repeat(1, 1fr)",md:"repeat(1, 1fr)"},gap:{base:"8",md:"8"},mx:"0",mt:"6",children:[(0,i.jsxs)(x.P,{display:"flex",children:[(0,i.jsx)(f.x,{fontSize:"sm",mt:"1",children:"Include"}),(0,i.jsx)(w.G,{onChange:e=>P(e),initValue:z,inputProps:{width:"160px"}})]}),(0,i.jsxs)(x.P,{display:"flex",children:[(0,i.jsx)(f.x,{fontSize:"sm",mt:"1",children:"Exclude"}),(0,i.jsx)(w.G,{onChange:e=>R(e),initValue:F,inputProps:{width:"160px"}})]})]})]}),(0,i.jsxs)(g.x,{mt:"10",children:[(0,i.jsx)(f.x,{fontWeight:"medium",children:"Other filters"}),"mentions&replies"!==E&&(0,i.jsxs)(u.r,{templateColumns:{base:"repeat(1, 1fr)",md:"55% 40%"},gap:{base:"8",md:"8"},mx:"0",mt:"6",children:[(0,i.jsx)(x.P,{children:(0,i.jsx)(p.X,{isChecked:J,onChange:e=>q(e.target.checked),children:"Remove tweets I have already replied"})}),(0,i.jsx)(x.P,{children:(0,i.jsx)(p.X,{isChecked:K,onChange:e=>H(e.target.checked),children:"Remove replies"})})]}),(0,i.jsxs)(u.r,{templateColumns:{base:"repeat(1, 1fr)",md:"repeat(2, 1fr)"},gap:"8",mx:"0",mt:"6",children:[(0,i.jsx)(x.P,{children:(0,i.jsxs)(p.X,{isChecked:U,onChange:e=>W(e.target.checked),children:["Remove ","mentions&replies"===E?"mentions":"tweets"," ","with links & media"]})}),"mentions&replies"===E&&(0,i.jsx)(x.P,{children:(0,i.jsx)(p.X,{isChecked:T,onChange:e=>N(e.target.checked),children:"Don't show mentions I've already liked"})})]})]})]}),(0,i.jsxs)(j.m,{justifyContent:"space-between",children:[(0,i.jsx)(y.z,{mr:3,variant:"text",colorScheme:"neutral",size:"sm",onClick:n,children:"Cancel"}),(0,i.jsx)(y.z,{variant:"primary",onClick:()=>{n(),S(X())},children:"Apply Filters"})]})]})]})})},60378:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.d(t,{E:function(){return w}});var s=n(85893),l=n(67294),o=n(68029),r=n(88329),a=n(15715),d=n(90092),c=n(8573),u=n(74931),x=n(48633),h=n(97410),m=n(93974),f=n(95857),v=n(30055),g=n(93964),p=n(5913),j=n(89582),y=e([j]);function w(e){let{filters:t,onChangeFilters:n}=e,[i,y]=(0,l.useState)(!1),[w,b]=(0,l.useState)(null),[C,S]=(0,l.useState)(""),[k,D]=(0,l.useState)(t),[E]=(0,x.kP)(),{updateOnboardSteps:O}=(0,v.o)(),_=(0,l.useContext)(p.T);(0,l.useEffect)(()=>{D(t)},[t]);let A=async function(e){var t,n;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments.length>2?arguments[2]:void 0;if(i)return;if(!s){u.default.error("Please enter a topic");return}let{minDaysOld:o,maxDaysOld:r,minLikes:a,minFollowers:d,maxFollowers:c,positiveKeywords:x,negativeKeywords:h,noMediaAndLinks:v,noReplies:p,notReplied:j}=l;y(!0),S(s),D(l);let w={idUser:null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.uid,idAccount:null===(n=(0,f.D0)(e))||void 0===n?void 0:n.idAccount,isPersonalizedSorting:!1,nbMinDaysOld:o,nbMaxDaysOld:r,nbMinLikes:void 0===a?1:a,nbMinRt:0,nbMinFollowers:d,nbMaxFollowers:c,noMediaAndLinks:v,noReplies:p,notReplied:j,mode:m.xJ.byKeywords};(null==x?void 0:x.length)>0&&(w.positiveKeywords=x.join(",")),(null==h?void 0:h.length)&&(w.negativeKeywords=h.join(","));let C=await (0,g.t9)(e,s,w,_.onOpenUpgrade);C&&(0!==C.success||C.tweets)?(C.tweets.forEach(e=>{e.isPosting=!1}),b(C)):b(null),O("engage"),y(!1)};return(0,s.jsxs)(o.x,{children:[(0,s.jsx)(r.k,{justifyContent:"center",alignItems:"center",children:(0,s.jsx)(h.Z,{send
1Request:(e,t)=>A(e,t,k),isLoading:i,placeholder:"Search for a keyword",isSending:i,setIsSending:y,setData:b,disableFilters:!0,searchMode:"engage",suggestions:["what are you working on","marketing tips","what is the best tool for","SEO"],mt:12,size:"md",showButton:!0,buttonLeftIcon:(0,s.jsx)(c.W,{}),align:"center"})}),(0,s.jsx)(o.x,{children:(0,s.jsx)(j.u,{mode:"keywords",isLoading:i,data:w,setData:b,hasFilters:!0,overrideFilters:t,topic:C,onRefresh:e=>{A(E,C,e)},onApplyFilters:e=>{n(e),A(E,C,e)},messageOnNoTweets:(0,s.jsx)(a.M,{pt:"16",children:(0,s.jsx)(o.x,{children:(0,s.jsx)(d.x,{textStyle:"body.medium",color:"neutral.content",children:"Launch a search to find tweets to engage with"})})})})})]})}j=(y.then?(await y)():y)[0],i()}catch(e){i(e)}})},65202:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.d(t,{_:function(){return O}});var s=n(85893),l=n(67294),o=n(83658),r=n(68029),a=n(88329),d=n(88502),c=n(933),u=n(38488),x=n(42811),h=n(90092),m=n(73898),f=n(43803),v=n(15715),g=n(48633),p=n(95857),j=n(29992),y=n(93974),w=n(30055),b=n(5913),C=n(93964),S=n(89582),k=n(48204),D=n(16296),E=e([S]);function O(e){var t,n,i,E,O,_,A;let{filters:M,onChangeFilters:I}=e,L={...M,noMediaAndLinks:!1},[z,P]=(0,l.useState)(!1),[F,R]=(0,l.useState)(!1),[T,N]=(0,l.useState)(null),[U,W]=(0,l.useState)(L),[K,H]=(0,l.useState)([]),[J,q]=(0,l.useState)(!1),[X,B]=(0,l.useState)(!1),[V]=(0,g.kP)(),Z=(0,j.I)(),{updateOnboardSteps:G}=(0,w.o)(),Q=(0,p.sr)(V),$=(0,l.useContext)(b.T),{isOpen:Y,onClose:ee,onToggle:et}=(0,o.q)(),en=(null==V?void 0:null===(n=V.user)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.idAccount)===(null===(i=(0,p.D0)(V))||void 0===i?void 0:i.idAccount);(0,l.useEffect)(()=>{W(M)},[M]),(0,l.useEffect)(()=>{V&&Z&&!z&&Q&&(!en||J)&&(P(!0),ei(V,U))},[V,Z,J]),(0,l.useEffect)(()=>{X&&(B(!1),ei(V,U))},[X]),(0,l.useEffect)(()=>{if(V&&en&&!J){var e,t,n,i,s,l,o,r;let a=null===(e=localStorage.getItem(y.As))||void 0===e?void 0:e.split(","),d=null!==(o=null==V?void 0:null===(i=V.user)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:null===(t=n.accounts)||void 0===t?void 0:t.filter(e=>e.idAccount!=V.user.uid&&"twitter"==e.provider))&&void 0!==o?o:[],c=null!==(r=null==V?void 0:null===(s=V.user)||void 0===s?void 0:s.data)&&void 0!==r?r:{},u=[c,...d],x=u.filter(e=>null==a?void 0:a.includes(e.twUserName));q(!0),H((null==x?void 0:x.length)>0?x:[null==V?void 0:null===(l=V.user)||void 0===l?void 0:l.data])}},[V]);let ei=async(e,t)=>{var n,i,s;if(F)return;let{minDaysOld:l,maxDaysOld:o,minFollowers:r,maxFollowers:a,positiveKeywords:d,negativeKeywords:c,notLiked:u,noMediaAndLinks:x}=t;R(!0),W(t);let h={idUser:null==e?void 0:null===(n=e.user)||void 0===n?void 0:n.uid,idAccount:null===(i=(0,p.D0)(e))||void 0===i?void 0:i.idAccount,isPersonalizedSorting:!1,nbMinDaysOld:l,nbMaxDaysOld:o,nbMinLikes:0,nbMinRt:0,nbMinFollowers:r,nbMaxFollowers:a,notLiked:u,noMediaAndLinks:x,mode:y.xJ.byMentionsAndReplies,mentionAccounts:en?K.map(e=>({idAccount:e.idAccount})):[{idAccount:null===(s=(0,p.D0)(e))||void 0===s?void 0:s.idAccount}]};(null==d?void 0:d.length)>0&&(h.positiveKeywords=d.join(",")),(null==c?void 0:c.length)&&(h.negativeKeywords=c.join(","));let m=await (0,C.t9)(e,"",h,$.onOpenUpgrade,"mentions");m&&(0!==m.success||m.tweets)?(m.tweets.forEach(e=>{e.isPosting=!1}),N(m)):N(null),G("engage"),R(!1)},es=(null==K?void 0:K.length)===1&&K[0].twUserName===(null===(E=(0,p.D0)(V))||void 0===E?void 0:E.twUserName);return(0,s.jsxs)(r.x,{children:[(0,s.jsx)(a.k,{justifyContent:"center",alignItems:"center",mt:"4",children:en?(0,s.jsxs)(d.J,{placement:"bottom-end",isOpen:Y,onClose:ee,children:[(0,s.jsx)(c.x,{children:(0,s.jsxs)(u.z,{px:"0",variant:"text",_hover:{bg:"transparent"},_focus:{boxShadow:"none"},_active:{bg:"transparent"},rightIcon:(0,s.jsx)(k.v,{h:"6",w:"6"}),onClick:et,children:[K.map((e,t)=>(0,s.jsx)(x.E,{width:10,height:10,borderRadius:"full",ml:0,zIndex:0===t?1:-t,marginLeft:t>0?"-25px":"0",src:e.image,fallbackSrc:"/assets/resources/emptyProfile.png"},e.id)),(0,s.jsx)(h.x,{ml:"2",children:"Tweets that recently mentioned me"})]})}),(0,s.jsx)(m.y,{_focus:{boxShadow:"none"},children:(0,s.jsx)(f.b,{p:"4",bg:"neutral.background-subdued",border:"1px solid",borderColor:"neutral.border",borderRadius:"6px",overflow:"hidden",children:(0,s.jsx)(D.K,{initialSelection:K,onApply:e=>{let t=K.filter(t=>e.some(e=>e.twUserName!==t.twUserName));(null==t?void 0:t.length)>0&&(H(e),B(!0)),ee()}})})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.E,{width:10,height:10,borderRadius:"full",ml:0,src:null===(O=(0,p.D0)(V))||void 0===O?void 0:O.image,fallbackSrc:"/assets/resources/emptyProfile.png"}),(0,s.jsx)(h.x,{ml:"5",children:"Tweets that recently mentioned me"})]})}),en&&!es&&(0,s.jsxs)(h.x,{fontWeight:"bold",mt:"2",fontSize:"sm",textAlign:"center",color:"neutral.content",children:["replying as @",null==V?void 0:null===(A=V.user)||void 0===A?void 0:null===(_=A.data)||void 0===_?void 0:_.twUserName]}),(0,s.jsx)(S.u,{mode:"mentions&replies",isLoading:F,data:T,setData:N,hasFilters:!0,overrideFilters:M,onRefresh:e=>{ei(V,e)},onApplyFilters:e=>{I(e),ei(V,e)},messageOnNoTweets:(0,s.jsx)(v.M,{pt:"16",children:(0,s.jsxs)(a.k,{flexDirection:"column",alignItems:"center",children:[(0,s.jsx)(h.x,{textStyle:"body.medium",color:"neutral.content",children:"No tweets found"}),(0,s.jsx)(u.z,{variant:"primary",m:5,onClick:()=>{ei(V,U)},children:"Find again"})]})})})]})}S=(E.then?(await E)():E)[0],i()}catch(e){i(e)}})},28354:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.d(t,{i:function(){return j}});var s=n(85893),l=n(67294),o=n(68029),r=n(15715),a=n(88329),d=n(90092),c=n(38488),u=n(48633),x=n(93974),h=n(95857),m=n(30055),f=n(93964),v=n(5913),g=n(89582),p=e([g]);function j(e){let{filters:t,onChangeFilters:n}=e,[i,p]=(0,l.useState)(!1),[j,y]=(0,l.useState)(!1),[w,b]=(0,l.useState)(null),[C,S]=(0,l.useState)(t),[k]=(0,u.kP)(),{updateOnboardSteps:D}=(0,m.o)(),E=(0,l.useContext)(v.T);(0,l.useEffect)(()=>{S(t)},[t]),(0,l.useEffect)(()=>{k&&!j&&(y(!0),O(k,C))},[k]);let O=async(e,t)=>{var n,s;if(i)return;let{minDaysOld:l,maxDaysOld:o,minFollowers:r,maxFollowers:a,positiveKeywords:d,negativeKeywords:c,noMediaAndLinks:u,noReplies:m,notReplied:v,minLikes:g}=t;p(!0),S(t);let j={idUser:null==e?void 0:null===(n=e.user)||void 0===n?void 0:n.uid,idAccount:null===(s=(0,h.D0)(e))||void 0===s?void 0:s.idAccount,isPersonalizedSorting:!1,nbMinDaysOld:l,nbMaxDaysOld:o,nbMinLikes:g,nbMinRt:0,nbMinFollowers:r,nbMaxFollowers:a,noMediaAndLinks:u,noReplies:m,notReplied:v,mode:x.xJ.following,count:100};(null==d?void 0:d.length)>0&&(j.positiveKeywords=d.join(",")),(null==c?void 0:c.length)&&(j.negativeKeywords=c.join(","));let y=await (0,f.t9)(e,"",j,E.onOpenUpgrade);
1y&&(0!==y.success||y.tweets)?(y.tweets.forEach(e=>{e.isPosting=!1}),b(y)):b(null),D("engage"),p(!1)};return(0,s.jsx)(o.x,{children:(0,s.jsx)(g.u,{mode:"peopleIfollow",isLoading:i,data:w,setData:b,hasFilters:!0,overrideFilters:t,onRefresh:e=>O(k,e),onApplyFilters:e=>{n(e),O(k,e)},messageOnNoTweets:(0,s.jsx)(r.M,{pt:"16",children:(0,s.jsxs)(a.k,{flexDirection:"column",alignItems:"center",children:[(0,s.jsx)(d.x,{children:"No tweets found"}),(0,s.jsx)(c.z,{size:"sm",m:5,onClick:()=>{O(k,C)},children:"Find again"})]})})})})}g=(p.then?(await p)():p)[0],i()}catch(e){i(e)}})},10445:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.d(t,{Q:function(){return I}});var s=n(85893),l=n(67294),o=n(83658),r=n(90038),a=n(68029),d=n(88329),c=n(90092),u=n(38488),x=n(15715),h=n(57879),m=n(75218),f=n(41664),v=n.n(f),g=n(48633),p=n(74931),j=n(59764),y=n(67440),w=n(95857),b=n(29992),C=n(93964),S=n(89582),k=n(93974),D=n(5913),E=n(30055),O=n(40263),_=n(86893),A=n(93202),M=e([S]);function I(e){var t,n,i,f,M,I;let{filters:L,onChangeFilters:z}=e,[P,F]=(0,l.useState)([]),[R,T]=(0,l.useState)(!1),[N,U]=(0,l.useState)(!1),[W,K]=(0,l.useState)(null),[H,J]=(0,l.useState)(!1),[q,X]=(0,l.useState)(0),[B,V]=(0,l.useState)(null),[Z,G]=(0,l.useState)(k.xJ.byPeople),[Q,$]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(L),[et,en]=(0,l.useState)(!1),[ei]=(0,g.kP)(),{isOpen:es,onOpen:el,onClose:eo}=(0,o.q)(),er=(0,b.I)(),[ea]=(0,r.a)("(max-width: 800px)"),ed=(0,l.useContext)(D.T),{updateOnboardSteps:ec}=(0,E.o)(),eu=(0,w.sr)(ei);(0,l.useEffect)(()=>{ee(L)},[L]),(0,l.useEffect)(()=>{if(ei&&er&&!R&&eu){var e;T(!0),(null===(e=(0,w.D0)(ei))||void 0===e?void 0:e.keywords)&&!ea&&eh()}},[ei,er]),(0,l.useEffect)(()=>{B&&B.name&&ex(ei,k.xJ.byList,Y)},[B]);let ex=async function(e){var t,n,i,s,l,o,r;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k.xJ.byPeople,d=arguments.length>2?arguments[2]:void 0;if(console.log("sendRequest:"),N)return;if(a===k.xJ.byPeople&&((null===(n=(0,w.D0)(e))||void 0===n?void 0:null===(t=n.engageAccounts)||void 0===t?void 0:t.length)===0||!(null===(i=(0,w.D0)(e))||void 0===i?void 0:i.engageAccounts))){p.default.error("Please, add some accounts to watch or switch to list");return}let{minDaysOld:c,maxDaysOld:u,minLikes:x,minFollowers:h,maxFollowers:m,positiveKeywords:f,negativeKeywords:v,noMediaAndLinks:g,noReplies:j,notReplied:y}=d;U(!0),en(!0),G(a),ee(d);let b={idUser:null==e?void 0:null===(s=e.user)||void 0===s?void 0:s.uid,idAccount:null===(l=(0,w.D0)(e))||void 0===l?void 0:l.idAccount,isPersonalizedSorting:!1,nbMinDaysOld:c,nbMaxDaysOld:u,nbMinLikes:x,nbMinRt:0,nbMinFollowers:h,nbMaxFollowers:m,noMediaAndLinks:g,noReplies:j,notReplied:y,mode:a};if((null==f?void 0:f.length)>0&&(b.positiveKeywords=f.join(",")),(null==v?void 0:v.length)&&(b.negativeKeywords=v.join(",")),a===k.xJ.byPeople&&(b.engageAccounts=(0,w.D0)(e).engageAccounts.join(","),b.count=200),a===k.xJ.byList){let t=await (0,O.K2)(null===(o=(0,w.D0)(e))||void 0===o?void 0:o.id,B.id);if(X(null!==(r=null==t?void 0:t.length)&&void 0!==r?r:0),(null==t?void 0:t.length)===0){p.default.error("No contacts found in the list."),U(!1),K(null);return}(null==t?void 0:t.length)>50?$(!0):$(!1),b.listId=B.id,b.listName=B.name}let S=await (0,C.t9)(e,"",b,ed.onOpenUpgrade);S&&(0!==S.success||S.tweets)?(S.tweets.forEach(e=>{e.isPosting=!1}),K(S),(null==S?void 0:S.isReachedMaxPeopleAddedInList)===!0&&J(!0)):K(null),ec("engage"),U(!1)},eh=async()=>{var e,t;let n=null===(t=(0,w.D0)(ei))||void 0===t?void 0:null===(e=t.keywords)||void 0===e?void 0:e.join(",");if(n){let e=await (0,C.yC)(ei,n,{isPersonalizedSorting:!1,nbMinDaysOld:0,nbMaxDaysOld:180,nbMinLikes:100,nbMinRt:0,nbMinFollowers:2e3},"reco"),t=[];e&&e.success&&(e.tweets.forEach(e=>{var n,i;let s=e.user,l=t.find(e=>e.id_str==s.id_str);(null===(i=(0,w.D0)(ei))||void 0===i?void 0:null===(n=i.engageAccounts)||void 0===n?void 0:n.includes(s.screen_name))||l||t.push(s)}),F(t))}},em=(0,l.useCallback)(e=>{V(e),G(k.xJ.byList)},[]),ef=(0,l.useCallback)(()=>{V(null),ex(ei,k.xJ.byPeople,Y)},[ei,Y]),ev=null!==(I=null===(i=(0,w.D0)(ei))||void 0===i?void 0:null===(n=i.engageAccounts)||void 0===n?void 0:null===(t=n.filter(e=>e.includes("http")))||void 0===t?void 0:t.length)&&void 0!==I?I:0,eg=(null===(M=(0,w.D0)(ei))||void 0===M?void 0:null===(f=M.engageAccounts)||void 0===f?void 0:f.length)-ev;return(0,s.jsxs)(a.x,{children:[(0,s.jsxs)(d.k,{flexDirection:"column",justifyContent:"center",alignItems:"center",mt:"10",children:[(0,s.jsx)(a.x,{ml:"-2",children:(0,s.jsx)(j.I,{placeholder:"Pick from a contact list",onSelectList:em,reset:!B,isDisabled:N})}),(0,s.jsx)(c.x,{mt:"4",textStyle:"body.medium",color:"neutral.content",children:"- or -"}),(0,s.jsx)(u.z,{variant:"text",mt:"2",onClick:el,_focus:{boxShadow:"none"},leftIcon:A.p,children:"add to selection"}),(0,s.jsx)(c.x,{ml:"4",color:"neutral.content-subdued",children:eg||ev?(0,s.jsxs)(u.z,{variant:"text",opacity:1,as:"span",_hover:{textDecoration:"underline",cursor:"pointer",color:"neutral.content"},onClick:()=>{V(null),console.log("searchMode:",Z),ex(ei,k.xJ.byPeople,Y)},children:[eg," account",eg>1?"s":"",", ",ev," list",ev>1?"s":""]}):"No account added"})]}),(0,s.jsx)(a.x,{children:et?(0,s.jsx)(S.u,{mode:"people",isLoading:N,data:W,setData:K,hasFilters:!0,overrideFilters:L,onRefresh:e=>{ex(ei,Z,e)},onApplyFilters:e=>{z(e),ex(ei,Z,e)},messageOnNoTweets:Z===k.xJ.byList?(0,s.jsx)(x.M,{pt:"16",children:(0,s.jsx)(d.k,{flexDirection:"column",alignItems:"center",textStyle:"body.medium",color:"neutral.content",children:(0,s.jsxs)(c.x,{children:["Add people to the list."," ",(0,s.jsx)(v(),{href:"/contacts",passHref:!0,legacyBehavior:!0,children:(0,s.jsxs)(h.r,{textDecoration:"underline",textStyle:"body.medium",color:"neutral.content",children:["Go to Contacts ",(0,s.jsx)(m.m,{})]})})]})})}):(0,s.jsx)(x.M,{pt:"16",children:(0,s.jsxs)(d.k,{flexDirection:"column",alignItems:"center",children:[(0,s.jsx)(c.x,{textStyle:"body.medium",color:"neutral.content",children:"No tweets to engage with"}),(0,s.jsx)(u.z,{m:5,onClick:el,variant:"outline",colorScheme:"neutral",children:"add more people"})]})}),warningText:function(e){let{searchMode:t,nbPeopleInList:n,warningMaxPeopleAddedInList:i,hasMoreThan50InList:s}=e;if("by people's list"===t){if(n&&n>200&&i)return"Because of X limits, we can only get tweets from the first 200 people in the list. Warning: in addition, the list is still warming up, tweet count may be lower than expected for now.";if(n&&n>200)return"Because of X limits, we can only get tweets from the first 200 people in the list.";if(i)return"The list is still warming up, tweet count may be lower than expected for now.";if(s)return"Displaying tweets from 50 people, randomly selected from the list"}return""}({searchMode:Z,nbPeopleInList:q,warningMaxPeopleAddedInList:H,hasMoreThan50InList:Q})}):(0,s.jsx)(d.k,{justifyContent:"center",mt:"16",children:(0,s.jsx)(u.z,{variant:"primary",leftIcon:(0,s.jsx)(_.jRj,{}),ml:"2",onClick:()=>{ex(ei,k.xJ.byPeople,Y)},children:"Find Tweets from Selection"})})}
1),(0,s.jsx)(y.e,{isOpen:es,onClose:eo,sendRequest:ef,recos:P})]})}S=(M.then?(await M)():M)[0],i()}catch(e){i(e)}})},89582:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.d(t,{u:function(){return L}});var s,l,o=n(85893),r=n(67294),a=n(83658),d=n(15715),c=n(68029),u=n(88329),x=n(90092),h=n(38488),m=n(73636),f=n(51107),v=n(97873),g=n(25295),p=n(6630),j=n(48633),y=n(74931),w=n(1814),b=n(95857),C=n(29992),S=n(71082),k=n(40685),D=n(93974),E=n(86511),O=n(5434),_=n(85551),A=n(17872),M=n(76366),I=e([w]);function L(e){var t,n,i,s,I;let{data:L,mode:z,isLoading:P,setData:F,messageOnNoTweets:R=null,onRefresh:T,warningText:N="",hasFilters:U=!1,onApplyFilters:W=()=>{},overrideFilters:K,topic:H}=e,[J,q]=(0,r.useState)(l.MOST_RECENT),[X,B]=(0,r.useState)(null),[V,Z]=(0,r.useState)(!1),[G,Q]=(0,r.useState)(!1),[$,Y]=(0,r.useState)(null!=K?K:D.js),[ee,et]=(0,r.useState)(!1),[en]=(0,j.kP)(),ei=(0,C.I)(),{isOpen:es,onOpen:el,onClose:eo}=(0,a.q)(),er=(0,b.sr)(en);(0,r.useEffect)(()=>{if(en&&ei&&!V&&er){var e,t;Z(!0),Q(null===(e=(0,b.D0)(en))||void 0===e?void 0:e.autoLikeOnReply),(null===(t=(0,b.D0)(en))||void 0===t?void 0:t.autoLikeOnReply)===void 0&&((0,b.Nq)(en,{autoLikeOnReply:!0}),Q(!0))}},[en,ei]),(0,r.useEffect)(()=>{K&&Y(K)},[K]),(0,r.useEffect)(()=>{ea()},[L]),(0,r.useEffect)(()=>{ea()},[J]);let ea=()=>{var e;if(L&&(null==L?void 0:null===(e=L.tweets)||void 0===e?void 0:e.length))switch(J){case l.MOST_LIKES:let t=L.tweets.sort((e,t)=>t.favorite_count-e.favorite_count);B({...L,tweets:t});break;case l.LEAST_LIKES:let n=L.tweets.sort((e,t)=>e.favorite_count-t.favorite_count);B({...L,tweets:n});break;case l.MOST_FOLLOWERS:let i=L.tweets.sort((e,t)=>t.user.followers_count-e.user.followers_count);B({...L,tweets:i});break;case l.LEAST_FOLLOWERS:let s=L.tweets.sort((e,t)=>e.user.followers_count-t.user.followers_count);B({...L,tweets:s});break;case l.MOST_RECENT:default:let o=L.tweets.map(e=>(e.created_at&&(e.created_at=new Date(e.created_at).getTime()),{...e})),r=o.sort((e,t)=>{if(H){if(e.isMainTopic&&!t.isMainTopic)return -1;if(!e.isMainTopic&&t.isMainTopic)return 1}return t.created_at-e.created_at});B({...L,tweets:r})}else B(L)},ed=async()=>{try{await y.default.promise(new Promise(async(e,t)=>{et(!0);let n=[],i=null==X?void 0:X.tweets;i.forEach(e=>{var t;n.push((0,E.se)(e,null==en?void 0:null===(t=en.user)||void 0===t?void 0:t.uid,-1))});try{await Promise.all(n),F({...L,tweets:[]}),e({})}catch(e){t()}}),{loading:"Hiding all...",success:"Successfully hide tweets",error:"Failed to hide some tweets"})}finally{et(!1)}};if(!er&&ei)return(0,o.jsx)(S.H,{});if(!P&&!er)return null;if(P)return(0,o.jsx)(d.M,{pt:10,children:(0,o.jsx)(p.r,{loading:P,css:"display: block; margin: 0 auto; border-color: red;",size:50})});let ec="mentions&replies"===z;return(0,o.jsxs)(c.x,{maxW:"800px",margin:"auto",mt:"10",children:[null!==X&&(null==X?void 0:null===(t=X.tweets)||void 0===t?void 0:t.length)>=0&&(0,o.jsxs)(u.k,{flexDirection:{base:"column-reverse",md:"row"},alignItems:"center",justifyContent:"space-between",textStyle:"body.medium",color:"neutral.content",gap:"4",children:[(0,o.jsxs)(x.x,{mt:{base:"4",md:"0"},textStyle:"body.medium",color:"neutral.content",children:["Found ",null==X?void 0:null===(n=X.tweets)||void 0===n?void 0:n.length," ",(null==X?void 0:null===(i=X.tweets)||void 0===i?void 0:i.length)>1?ec?"mentions":"tweets":ec?"mention":"tweet"," ",ec&&"you haven't replied to"]}),(0,o.jsxs)(u.k,{alignItems:"center",children:[U&&(0,o.jsx)(h.z,{variant:"text",size:"sm",rightIcon:(0,o.jsx)(M.t,{}),onClick:el,children:"Filters"}),(0,o.jsx)(x.x,{ml:"6",textStyle:"body.medium",color:"neutral.content",children:"Sort by"}),(0,o.jsx)(c.x,{ml:"2",maxW:"200px",children:(0,o.jsx)(g.P,{options:[l.MOST_RECENT,l.MOST_LIKES,l.LEAST_LIKES,l.MOST_FOLLOWERS,l.LEAST_FOLLOWERS].map(e=>({label:e,value:e})),value:{label:J,value:J},onChange:e=>e&&q(e.value),isSearchable:!1,size:"sm"})})]})]}),X&&(null==X?void 0:null===(s=X.tweets)||void 0===s?void 0:s.length)>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(u.k,{mt:"4",alignItems:"center",justifyContent:"space-between",children:[(0,o.jsxs)(m.U,{spacing:4,children:[(0,o.jsx)(h.z,{size:"sm",isDisabled:!ei,leftIcon:(0,o.jsx)(A.b,{width:12}),variant:"secondary",onClick:()=>T($),children:"Refresh"}),"mentions&replies"===z&&(null==X?void 0:null===(I=X.tweets)||void 0===I?void 0:I.length)>0&&(0,o.jsx)(h.z,{variant:"outline",colorScheme:"neutral",leftIcon:(0,o.jsx)(O.RAc,{}),size:"sm",isLoading:ee,onClick:ed,children:"Fresh Start"})]}),(0,o.jsx)(f.X,{ml:1,onChange:async e=>{await (0,b.Nq)(en,{autoLikeOnReply:!G}),Q(!G)},isChecked:G,children:"auto-like tweet when replying"})]}),N&&(0,o.jsx)(u.k,{mt:"4",justifyContent:"center",children:(0,o.jsx)(v.Vp,{p:2,colorScheme:"orange",children:N})}),(0,o.jsx)(w.ZP,{data:X,setData:F,refresher:()=>{},type:z})]}):R,U&&(0,o.jsx)(k.G$,{mode:z,isOpen:es,onClose:eo,filters:$,onApplyFilters:e=>{Y(e),W(e),(0,_._m)(D.t6,JSON.stringify(e))}})]})}w=(I.then?(await I)():I)[0],(s=l||(l={})).MOST_RECENT="Most recent",s.MOST_FOLLOWERS="Most followers",s.LEAST_FOLLOWERS="Least followers",s.MOST_LIKES="Most Likes",s.LEAST_LIKES="Least Likes",i()}catch(e){i(e)}})},93974:function(e,t,n){"use strict";n.d(t,{As:function(){return o},js:function(){return s},t6:function(){return l},xJ:function(){return i}});let i={byPeople:"by people",byKeywords:"by keywords",byList:"by people's list",byMentionsAndReplies:"by mention's and replies",following:"following",custom:"custom"},s={minFollowers:0,maxFollowers:999999999,minLikes:1,negativeKeywords:[],positiveKeywords:[],minDaysOld:0,maxDaysOld:2,noMediaAndLinks:!0,noRepl
1ies:!0,notReplied:!0},l="engageFilters",o="engageMentionsAccounts"},71082:function(e,t,n){"use strict";n.d(t,{H:function(){return u}});var i=n(85893),s=n(68029),l=n(15715),o=n(90092),r=n(38488),a=n(48633),d=n(95857),c=n(19996);function u(){let[e]=(0,a.kP)();return(0,i.jsx)(s.x,{display:"flex",justifyContent:"center",children:(0,i.jsxs)(l.M,{maxW:"400px",mt:20,display:"flex",flexDirection:"column",children:[(0,i.jsx)(o.x,{textStyle:"body.medium",color:"neutral.content-strong",children:"To use this feature, you need to refresh your X authorizations. Hit the button below to proceed."}),(0,i.jsx)(r.z,{mt:5,maxW:"200px",variant:"primary",as:"a",href:(0,d.N6)(e),target:"_blank",onClick:()=>{c.cM("hit_getExtraAuth")},children:"Authorize"})]})})}},76366:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var i=n(85893);let s=e=>{let{width:t=10,height:n=10}=e;return(0,i.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M0 2.75C0 2.34375 0.3125 2 0.75 2H13.25C13.6562 2 14 2.34375 14 2.75C14 3.1875 13.6562 3.5 13.25 3.5H0.75C0.3125 3.5 0 3.1875 0 2.75ZM2 7.75C2 7.34375 2.3125 7 2.75 7H11.25C11.6562 7 12 7.34375 12 7.75C12 8.1875 11.6562 8.5 11.25 8.5H2.75C2.3125 8.5 2 8.1875 2 7.75ZM8.25 13.5H5.75C5.3125 13.5 5 13.1875 5 12.75C5 12.3438 5.3125 12 5.75 12H8.25C8.65625 12 9 12.3438 9 12.75C9 13.1875 8.65625 13.5 8.25 13.5Z",fill:"currentColor"})})}},17872:function(e,t,n){"use strict";n.d(t,{b:function(){return s}});var i=n(85893);let s=e=>{let{width:t=16,height:n=16}=e;return(0,i.jsx)("svg",{width:t,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M14.1875 9.03125C14.5938 9.15625 14.8125 9.5625 14.6875 9.96875C13.8125 12.9375 11.0625 15 7.96875 15C5.5 15 3.21875 13.6562 1.96875 11.5625V14.75C1.96875 15.1875 1.65625 15.5 1.21875 15.5C0.8125 15.5 0.46875 15.1875 0.46875 14.75V9.75C0.46875 9.34375 0.8125 9 1.21875 9H6.21875C6.65625 9 6.96875 9.34375 6.96875 9.75C6.96875 10.1875 6.625 10.5 6.21875 10.5H3.0625C4 12.3125 5.875 13.5 7.96875 13.5C10.4062 13.5 12.5938 11.875 13.25 9.53125C13.375 9.125 13.7812 8.90625 14.1875 9.03125ZM14.75 0.5C15.1562 0.5 15.5 0.84375 15.5 1.25V6.25C15.5 6.6875 15.1562 7 14.75 7H9.75C9.3125 7 9 6.6875 9 6.25C9 5.84375 9.3125 5.5 9.75 5.5H12.875C11.9375 3.71875 10.0625 2.5 8 2.5C5.5625 2.5 3.375 4.15625 2.6875 6.46875C2.59375 6.875 2.1875 7.09375 1.78125 6.96875C1.375 6.875 1.15625 6.4375 1.25 6.0625C2.125 3.09375 4.90625 1 8 1C10.4688 1 12.75 2.375 14 4.46875V1.25C14 0.84375 14.3125 0.5 14.75 0.5Z",fill:"currentColor"})})}},17629:function(e,t,n){"use strict";n.d(t,{G:function(){return h}});var i=n(85893),s=n(67294),l=n(68029),o=n(73636),r=n(82206),a=n(38488),d=n(90092),c=n(88329),u=n(97873),x=n(74931);function h(e){let{onChange:t,initValue:n,buttonText:h="Add",inputProps:m={},mainContainerProps:f={},helperText:v}=e,[g,p]=(0,s.useState)(""),[j,y]=(0,s.useState)([]);(0,s.useEffect)(()=>{y(n||[])},[]);let w=()=>{if(!g.trim()){x.default.error("Please enter some text");return}if(!j.includes(g.trim())){let e=[...j,g];y(e),t(e)}p("")},b=e=>{let n=[...j].filter(t=>t!==e);y(n),t(n)};return(0,i.jsxs)(l.x,{ml:"3",w:"min-content",...f,children:[(0,i.jsxs)(l.x,{children:[(0,i.jsxs)(o.U,{children:[(0,i.jsx)(r.I,{size:"sm",borderRadius:"lg",value:g,onChange:e=>p(e.target.value),onKeyPress:e=>{"Enter"===e.key&&w()},width:"170px",...m}),(0,i.jsx)(a.z,{variant:"primary",size:"sm",px:"6",onClick:w,children:h})]}),v?(0,i.jsx)(d.x,{color:"neutral.content",fontSize:"xs",ml:"1",mt:"1",children:v}):null]}),(null==j?void 0:j.length)>0&&(0,i.jsx)(c.k,{mt:"4",flexWrap:"wrap",children:j.map(e=>(0,i.jsxs)(u.Vp,{size:"sm",borderRadius:"full",variant:"solid",colorScheme:"gray",pl:"4",m:"1",children:[(0,i.jsx)(u.Sn,{children:e}),(0,i.jsx)(u.SD,{onClick:()=>b(e)})]},e))})]})}},70550:function(e,t,n){"use strict";n.d(t,{V:function(){return v}});var i=n(85893),s=n(5490),l=n(34614),o=n(56978),r=n(57391),a=n(21360),d=n(70010),c=n(52867),u=n(90092),x=n(45443),h=n(38488),m=n(53990),f=n(5434);function v(e){let{isOpen:t,onClose:n}=e;return(0,i.jsxs)(s.u_,{size:"xl",isOpen:t,onClose:n,children:[(0,i.jsx)(l.Z,{}),(0,i.jsxs)(o.h,{children:[(0,i.jsx)(r.x,{fontWeight:"bold",fontSize:"md",children:"Tips on how to engage responsibly:"}),(0,i.jsx)(a.o,{}),(0,i.jsxs)(d.f,{children:[(0,i.jsxs)(c.aV,{spacing:1,children:[(0,i.jsxs)(c.HC,{children:[(0,i.jsx)(c.DE,{as:f.y5A,color:"success.content-subdued"}),"Post replies that are relevant and contribute to the conversation."]}),(0,i.jsxs)(c.HC,{children:[(0,i.jsx)(c.DE,{as:f.y5A,color:"success.content-subdued"}),"If you can't think of something relevant to reply, move on to the next tweet to which you can contribute!"]})]}),(0,i.jsxs)(c.aV,{spacing:"1",mt:"6",children:[(0,i.jsxs)(c.HC,{children:[(0,i.jsx)(c.DE,{as:m.sQZ,color:"danger.background"}),"Don't copy/paste the same, generic reply on every tweet you see."]}),(0,i.jsxs)(c.HC,{children:[(0,i.jsx)(c.DE,{as:m.sQZ,color:"danger.background"}),"Don't engage in behavior that could be associated to spam or unsolicited interactions."]})]}),(0,i.jsx)(u.x,{mt:"6",fontWeight:"bold",fontSize:"md",children:"Respecting those guidelines means you're likely to comply with X's Terms of Use and Policy, making your account safe from being restricted or suspended!"})]}),(0,i.jsx)(x.m,{justifyContent:"center",children:(0,i.jsx)(h.z,{variant:"primary",mr:3,onClick:n,size:"sm",children:"Got it"})})]})]})}},67440:function(e,t,n){"use strict";n.d(t,{e:function(){return K}});var i=n(85893),s=n(67294),l=n(5490),o=n(34614),r=n(56978),a=n(57391),d=n(21360),c=n(70010),u=n(54506),x=n(4296),h=n(7539),m=n(82206),f=n(38488),v=n(68029),g=n(88329),p=n(90092),j=n(57879),y=n(45443),w=n(12519),b=n(48633),C=n(95857),S=n(96885),k=n(29992),D=n(79352),E=n(12553),O=n(70543),_=n(73636),A=n(88502),M=n(933),I=n(42811),L=n(73898),z=n(4349),P=n(97340);let F=(0,s.memo)(e=>{let{users:t,onSelect:n}=e;return(0,i.jsx)(g.k,{maxW:"800px",overflow:"hidden",children:(0,i.jsx)(_.U,{spacing:"xs-4",justifyContent:"center",overflow:"hidden",children:t.slice(0,14).map(e=>(0,i.jsx)(v.x,{children:(0,i.jsxs)(A.J,{isLazy:!0,trigger:"hover",eventListeners:{scroll:!1}
1,offset:[140,0],children:[(0,i.jsx)(M.x,{children:(0,i.jsx)(P.E.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1},children:(0,i.jsx)(I.E,{borderRadius:"full",src:e.profile_image_url_https,onClick:()=>{n&&n(e)},_hover:{cursor:"pointer"}},e.profile_image_url_https)})}),(0,i.jsx)(L.y,{border:"0",zIndex:4,width:[300,300],boxShadow:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;",css:{margin:"0",marginTop:0,marginBottom:0,webkitMarginStart:0,marginInlineStart:0,padding:0},children:(0,i.jsx)(z.Z,{user:e})})]})},e.id_str))})})});var R=n(61530),T=n(64873),N=n(19302),U=n(85551),W=n(93202);let K=(0,s.memo)(e=>{var t,n;let{isOpen:w,onClose:D,sendRequest:E,recos:_}=e,A=(0,s.useRef)(null),[M,I]=(0,b.kP)(),[L,z]=(0,s.useState)({}),[P,K]=(0,s.useState)(!1),[J,q]=(0,s.useState)(""),[X,B]=(0,s.useState)(""),[V,Z]=(0,s.useState)(!1),{searchSuggestions:G,suggestions:Q,setSuggestions:$,isSuggestionsOpen:Y,setIsSuggestionOpen:ee,disableArrowKeys:et}=(0,T.f)(),en=(0,N.Z)(G,400);(0,S.useRouter)();let ei=(0,k.I)(),es=(0,s.useRef)(null);(0,U.t$)(es,async()=>{await new Promise(e=>setTimeout(e,200)),ee(!1)}),(0,s.useEffect)(()=>{var e,t;(null===(t=(0,C.D0)(M))||void 0===t?void 0:null===(e=t.keywords)||void 0===e?void 0:e.join)&&q((0,C.D0)(M).keywords.join(","))},[M,ei]);let el=()=>{D(),V&&(E(M),Z(!1)),$([]),ee(!1)},eo=async e=>{K(!0),Z(!0),await (0,O.BF)(M,e||X,ei),K(!1),B("")},er=(0,s.useCallback)(async e=>{let t=e.screen_name;await (0,O.BF)(M,t,ei),Z(!0),z({})},[M,ei]);return(0,i.jsxs)(l.u_,{isOpen:w,onClose:el,children:[(0,i.jsx)(o.Z,{}),(0,i.jsxs)(r.h,{children:[(0,i.jsx)(a.x,{children:"Add people to watch"}),(0,i.jsx)(d.o,{}),(0,i.jsxs)(c.f,{children:[(0,i.jsx)(u.NI,{as:"form",onSubmit:e=>{e.preventDefault(),eo()},children:(0,i.jsxs)(x.B,{size:"sm",children:[(0,i.jsx)(h.Ui,{borderLeftRadius:"sm-8",children:(0,i.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M8.71875 0.53125C12.7188 0.625 16 4.15625 16 8.34375V8.875C16 10.4688 14.6875 11.75 13.125 11.75C12.0938 11.75 11.2188 11.2188 10.6875 10.4375C10.0625 11.0625 9.1875 11.4688 8.25 11.4688C6.3125 11.4688 4.75 9.875 4.75 8C4.75 6.09375 6.3125 4.5 8.25 4.5C9 4.5 9.6875 4.75 10.25 5.1875C10.3125 4.84375 10.625 4.5625 11 4.5625C11.4062 4.5625 11.75 4.875 11.75 5.28125V8.9375C11.75 9.6875 12.3438 10.3125 13.125 10.3125C13.875 10.3125 14.5 9.6875 14.5 8.9375V8.34375C14.5 4.9375 11.875 2.125 8.65625 2.03125C7 1.96875 5.5 2.5625 4.3125 3.71875C3.125 4.84375 2.5 6.40625 2.5 8.0625C2.5 11.0312 4.6875 13.5938 7.59375 14.0312C8 14.0938 8.28125 14.4688 8.21875 14.875C8.15625 15.25 7.84375 15.5 7.5 15.5C7.4375 15.5 7.40625 15.5 7.375 15.5C3.71875 14.9688 1 11.75 1 8.0625C1 6 1.8125 4.0625 3.28125 2.625C4.75 1.21875 6.6875 0.46875 8.71875 0.53125ZM8.25 10C9.34375 10 10.25 9.125 10.25 8.03125C10.25 6.96875 9.34375 6.0625 8.25 6.0625C7.125 6.0625 6.25 6.9375 6.25 8.03125C6.25 9.125 7.125 10 8.25 10Z",fill:"currentColor"})})}),(0,i.jsx)(m.I,{ref:A,placeholder:"patxol or list url",value:X,onChange:e=>{let t=e.target.value;(null==t?void 0:t.length)>2&&(en(t),ee(!0)),B(t)},onKeyUp:e=>{27===e.keyCode&&(ee(!1),$([]))},onKeyDown:et}),(0,i.jsx)(f.z,{variant:"primary",ml:"md-12",minW:"max-content",isLoading:P,onClick:()=>eo(),leftIcon:W.p,children:"Add"}),Y&&(null==Q?void 0:Q.length)>0&&(0,i.jsx)(v.x,{position:"absolute",zIndex:"popover",maxH:"44",overflow:"auto",background:"neutral.background-subdued",borderRadius:"md",border:"1px",boxShadow:"md",width:{base:"282px",sm:"352px"},left:"48px",borderColor:"inherit",padding:"1",top:"110%",tabIndex:1,ref:es,children:(0,i.jsx)(R.D,{suggestions:Q,onSelect:e=>{let t=e.replace("@","");B(t),ee(!1),$([]),eo(t)}})})]})}),(null==_?void 0:_.length)>0&&(0,i.jsxs)(g.k,{borderRadius:"12px",mt:5,flexDirection:"column",children:[(0,i.jsx)(p.x,{fontWeight:"600",mb:"sm-8",children:"Suggested accounts"}),(0,i.jsx)(F,{users:_,onSelect:er})]}),(0,i.jsx)(g.k,{borderRadius:"12px",mt:5,flexDirection:"column",children:(0,i.jsx)(j.r,{textDecoration:"underline",fontWeight:"600",href:"https://listr.pro/",target:"_blank",children:"Find great Twitter lists to add"})}),(0,i.jsx)(v.x,{mt:4,maxH:"420px",overflowY:"auto",children:null===(n=(0,C.D0)(M))||void 0===n?void 0:null===(t=n.engageAccounts)||void 0===t?void 0:t.map((e,t)=>(0,i.jsx)(H,{onDelete:async()=>{let e=(0,C.D0)(M).engageAccounts;e.splice(t,1),await (0,C.Nq)(M,{engageAccounts:e}),Z(!0),z({})},account:e},"account-"+t))})]}),(0,i.jsxs)(y.m,{children:[(0,i.jsx)(f.z,{variant:"text",colorScheme:"neutral",size:"sm",onClick:D,children:"Cancel"}),(0,i.jsx)(f.z,{variant:"primary",onClick:()=>{el()},children:"Done"})]})]})]})});function H(e){let{onDelete:t,account:n}
1=e,[l,o]=(0,s.useState)(!1);return(0,i.jsxs)(g.k,{alignItems:"center",justifyContent:"space-between",m:4,p:2,borderRadius:"10px",bg:"neutral.background-strong",children:[(0,i.jsx)(p.x,{ml:"10px",noOfLines:1,wordBreak:"break-all",children:(n.includes("http")?"":"@")+n}),(0,i.jsx)(g.k,{children:(0,i.jsx)(w.h,{"aria-label":"delete",isLoading:l,variant:"text",colorScheme:"danger",size:"sm",onClick:async()=>{o(!0),await t(),o(!1)},icon:(0,i.jsx)(E.J,{as:D.tgW})})})]})}},70543:function(e,t,n){"use strict";n.d(t,{BF:function(){return m},Nx:function(){return u},a9:function(){return h},s:function(){return x}});var i=n(67142),s=n(85551),l=n(80008),o=n.n(l),r=n(19996),a=n(39424),d=n(95857),c=n(74931);let u=async(e,t)=>{try{var n,s,l,o,d,c,u,x,h,m,f;let a=i.GX.firestore(),v={onboardPage:t},g=window.location.search,p=new URLSearchParams(g),j=p.entries();for(let e of j)v[e[0]]=e[1];v.fromReferral=v.via?"true":"false",await a.collection("users").doc(e.user.uid).update({isNeedPay:!0,onboardPage:t,origin:v}),e.user.data.isNeedPay=!0,e.user.data.onboardPage=t,e.user.data.origin=v;let y={...v,subStatus:"SignUp",twUserName:null==e?void 0:null===(s=e.user)||void 0===s?void 0:null===(n=s.data)||void 0===n?void 0:n.twUserName,email:null==e?void 0:null===(o=e.user)||void 0===o?void 0:null===(l=o.data)||void 0===l?void 0:l.email,followers_count:null==e?void 0:null===(c=e.user)||void 0===c?void 0:null===(d=c.data)||void 0===d?void 0:d.followers_count,friends_count:null==e?void 0:null===(x=e.user)||void 0===x?void 0:null===(u=x.data)||void 0===u?void 0:u.friends_count,statuses_count:null==e?void 0:null===(m=e.user)||void 0===m?void 0:null===(h=m.data)||void 0===h?void 0:h.statuses_count};await r.WV(y,null==e?void 0:null===(f=e.user)||void 0===f?void 0:f.data)}catch(e){e instanceof Error?(console.error("Error in initUserAnalytics: "+e.message,e),a.Tb(e)):console.error("Error in initUserAnalytics: "+e)}},x=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;try{let l=i.GX.firestore();await l.collection("users").doc(e).update({email:t}),await (0,s.qC)({url:"user-updateDataTweetButlerDb",data:{idUser:e,data:{email:t},user:{email:t}},session:n})}catch(e){console.error("Error in updateEmail: "+e.message,e),a.Tb(e)}},h=async e=>{try{var t,n,s,l;let r=o().tz.guess();if(r&&(null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.firebaseToken)&&(null==e?void 0:null===(s=e.user)||void 0===s?void 0:null===(n=s.data)||void 0===n?void 0:n.timezone)=="America/Ne
1w_York"){console.log("detected timezone: "+r);let t=i.GX.firestore();await t.collection("users").doc(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.uid).update({timezone:r}),e.user.data.timezone=r}}catch(e){console.error("Error in guessTimezone: "+e.message,e),a.Tb(e)}},m=async(e,t,n)=>{if(t&&n){let n;if(t=t.replace("@",""),(0,d.D0)(e).engageAccounts){if((0,d.D0)(e).engageAccounts.includes(t)){c.default.error("Account already in your list");return}(n=(0,d.D0)(e).engageAccounts).unshift(t)}else n=[t];await (0,d.Nq)(e,{engageAccounts:n}),c.default.success("New item successfully added")}else c.default.error("Error, please retry")}},47571:function(e,t,n){"use strict";n.a(e,async function(e,i){try{n.r(t);var s=n(85893),l=n(67294),o=n(83658),r=n(38488),a=n(48633),d=n(493),c=n(1467),u=n(52154),x=n(95857),h=n(29992),m=n(70550),f=n(19093),v=n(24669),g=n(5913),p=n(50233),j=e([c,p]);[c,p]=j.then?(await j)():j,new Date().getUTCHours();let y=e=>{let{query:t}=e,[n,i]=(0,a.kP)(),[j,y]=(0,l.useState)(!1),{isOpen:w,onOpen:b,onClose:C}=(0,o.q)(),S=(0,h.I)(),{updateStatsCounter:k}=(0,f.V)(),{isOpen:D,onOpen:E,onClose:O}=(0,o.q)(),_=!(0,u.Wh)(null==n?void 0:n.user).includes("enterprise");return(l.useContext(g.T),(0,l.useEffect)(()=>{if(!j&&S){var e,t,i;y(!0);let s=null!==(i=null===(t=(0,x.D0)(n))||void 0===t?void 0:null===(e=t.stats)||void 0===e?void 0:e.counter_access_engage)&&void 0!==i?i:0;0===s&&setTimeout(()=>{b()},1e3),k("access_engage")}},[S]),i||n)?(0,s.jsxs)(c.T,{title:"Engage",description:"Like X lists, but useful. Engage with other X accounts without seeing their retweets, replies, etc. Just original tweets. Say goodbye to clutter and hello to efficiency.",infoTooltipText:"These tweets were selected for you by our AI engine, based on your X bio and what you usually talk about.",mainWrapperProps:{maxWidth:"1100"},contentOnRightOfTitle:_&&(0,s.jsx)(r.z,{variant:"primary",size:"sm",onClick:E,children:"Upgrade for AI replies"}),children:[(0,s.jsx)(p.e,{query:t}),(0,s.jsx)(m.V,{isOpen:w,onClose:C}),(0,s.jsx)(v.z,{isOpen:D,onClose:O,title:"Unlock AI replies and more"})]}):(0,s.jsx)(d.Z,{})};y.getInitialProps=async e=>{let{query:t}=e;return{query:t}},t.default=y,i()}catch(e){i(e)}})},75218:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var i=n(24278);let s=(0,i.I)({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"})},7539:function(e,t,n){"use strict";n.d(t,{Ui:function(){return u},xW:function(){return x}});var i=n(85893),s=n(34926),l=n(4296),o=n(17997),r=n(49381);let a={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},d=(0,o.m)("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),c=(0,r.G)(function(e,t){let{placement:n="left",...s}=e,o=a[n]??{},r=(0,l.m)();return(0,i.jsx)(d,{ref:t,...s,__css:{...r.addon,...o}})});c.displayName="InputAddon";let u=(0,r.G)(function(e,t){return(0,i.jsx)(c,{ref:t,placement:"left",...e,className:(0,s.cx)("chakra-input__left-addon",e.className)})});u.displayName="InputLeftAddon",u.id="InputLeftAddon";let x=(0,r.G)(function(e,t){return(0,i.jsx)(c,{ref:t,placement:"right",...e,className:(0,s.cx)("chakra-input__right-addon",e.className)})});x.displayName="InputRightAddon",x.id="InputRightAddon"}},function(e){e.O(0,[4980,1778,4660,6765,1467,7410,439,9774,2888,179],function(){return e(e.s=2330)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.