PageSourceSearch

https://focus.xyz/_next/static/chunks/3yxvwqkzajdi0.js

js focus.xyz collected 2026-10-04 06:17:26 UTC 31,995 bytes, 6 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,777737,e=>{"use strict";var i=e.i(843476),t=e.i(963489),s=e.i(138413),l=e.i(141110),r=e.i(271645),a=e.i(39839),o=e.i(380506),n=e.i(108262),c=e.i(151733),d=e.i(882151),u=e.i(6705),m=e.i(954779),x=e.i(574097),F=e.i(780856);let v=(0,r.createContext)(void 0),j={type:o.SortType.basic,name:F.DiscoverFilterFields.totalAssetsBalanceUsdCents,direction:"desc"},D={type:o.SortType.basic,name:F.DiscoverFilterFields.totalAssetsBalanceUsdCents,direction:"desc"},b={type:o.SortType.numericWithTime,name:F.DiscoverFilterFields.totalFocusEarningsUsdCents,direction:"desc",timePeriod:F.TimePeriod.Past30D},h={name:F.DiscoverFilterFields.totalPosts,type:o.FilterType.numericWithTime,value:{min:1,timePeriod:F.TimePeriod.Past30D}},g={name:F.DiscoverFilterFields.joinedFocusDate,type:o.FilterType.date,value:{after:m.FocusDateParser.subtract(30,"day")}};e.s(["DiscoverProvider",0,({children:e,useStorage:m=!0,extraFilters:p={},fetchFreshItems:T=!1,initialFilters:w=[{name:"totalPosts",type:o.FilterType.numericWithTime,value:{min:0,timePeriod:F.TimePeriod.Past24H}}],initialSort:C={type:o.SortType.basic,name:F.DiscoverFilterFields.totalAssetsBalanceUsdCents,direction:"desc"},disabledFilters:S=[],queryToUse:f="creatorStats"})=>{let R,{currentUserPublicKey:y}=(0,r.useContext)(n.UserContext),[U,L]=(0,a.useLocalStorage)(x.LocalStorageKeys.discoverFiltersAndSort,{filters:w,currentSort:C}),[N,P]=(0,r.useState)([]),k=(0,r.useCallback)(e=>{P(i=>[...i,e])},[]),B=(0,r.useMemo)(()=>m?{initialFilters:U?.filters||[],initialSort:U?.currentSort||null,disabledFilters:S}:{initialFilters:w,initialSort:C,disabledFilters:S},[S,U?.currentSort,U?.filters,w,C,m]),{setFilters:E,findFilterByName:I,removeFilter:W,filters:V,isSortActive:A,isFilterActive:K,updateFilter:M,currentSort:O,syncLastSavedFilters:H,setFiltersToLastSaved:q,setCurrentSort:_,isFilterDisabled:G}=(0,o.useFiltersAndSort)(B),[J,X]=(0,r.useState)([]),[z,$]=(0,r.useState)(0),[Z,Q]=(0,r.useState)(null),[Y,ee]=(0,r.useState)(null),[ei,et]=(0,r.useState)(!0),[es,el]=(0,r.useState)([]),er=(0,r.useRef)(0),{data:ea,loading:eo}=(0,s.useQuery)(c.TokenMetadataQueryDocument,{variables:{filter:{publicKeyBase58Check:{in:u.PINNED_TOKEN_PUBLIC_KEYS},...p}},skip:"creatorStats"===f}),[en,{loading:ec}]=(0,t.useLazyQuery)(c.CreatorStatsDocument),[ed,{loading:eu}]=(0,t.useLazyQuery)(c.TokenMetadataQueryDocument),em=z>J.length,ex=(0,r.useCallback)(()=>{m&&L({filters:V,currentSort:O})},[m,L,V,O]),eF=(0,r.useCallback)(()=>{let e="creatorStats"===f?{publicKeyBase58Check:{notIn:u.PINNED_TOKEN_PUBLIC_KEYS},account:{isBlacklisted:{equalTo:!1}}}:{publicKeyBase58Check:{notIn:u.PINNED_TOKEN_PUBLIC_KEYS}},i=V.reduce((e,i)=>{if(i.type===o.FilterType.numericWithTime&&(e[i.name+i.value.timePeriod]={greaterThanOrEqualTo:i.value.min,lessThanOrEqualTo:i.value.max}),i.type===o.FilterType.boolean&&(e[i.name]={equalTo:i.value}),i.type===o.FilterType.string&&(e[i.name]={equalToInsensitive:i.value}),i.type===o.FilterType.matchString){let t=i.value.any?.split(" ")||[],s=i.value.all?.split(" ")||[],l=i.value.none?.split(" ")||[];e.or=[{or:t.map(e=>({description:{likeInsensitive:`%${e}%`}}))},{and:s.map(e=>({description:{likeInsensitive:`%${e}%`}}))},{and:l.map(e=>({description:{notLikeInsensitive:`%${e}%`}}))}]}if(i.type===o.FilterType.numeric&&(e[i.name]={greaterThanOrEqualTo:Number(i.value.min),lessThanOrEqualTo:Number(i.value.max)}),i.type===o.FilterType.date){let t=i.value.after,s=i.value.before;e[i.name]={greaterThanOrEqualTo:"string"==typeof t?t:t?.toISOString(),lessThanOrEqualTo:"string"==typeof s?s:s?.toISOString()}}return e},e);return Object.entries(p).forEach(([e,t])=>{i[e]=t}),i},[p,V,f]),ev=(0,r.useCallback)(()=>{let e=[];
1if(O){let i=O.name,t=O.direction||"asc";e.push(O?.type===o.SortType.basic?`${F.SORT_KEYS[i]}_${F.SORT_VALUE_MAP[t]}`:`${F.SORT_KEYS[i]}_${F.TIME_RANGE_SORT_KEYS[O.timePeriod]}_${F.SORT_VALUE_MAP[t]}`)}return e},[O]),ej=async()=>{let e=er.current,i={first:10,after:Z,tokenBalancesFilter:{creator:{publicKey:{equalTo:y}}}},t=eF();Object.keys(t).length&&(i.filter=t);let s=ev();s.length&&(i.orderBy=s);let{newCreators:l,newStartCursor:r,totalCount:a,newEndCursor:o}=await (async()=>{if("creatorStats"===f){let e=en({variables:i});e.retain?.();let{data:t}=await e;return{totalCount:t?.creatorStats?.totalCount??0,newEndCursor:t?.creatorStats?.pageInfo.endCursor??null,newStartCursor:t?.creatorStats?.pageInfo.startCursor??null,newCreators:t?.creatorStats?.nodes.filter(Boolean)??[]}}{let e=ed({variables:i});e.retain?.();let{data:t}=await e;return{newCreators:t?.tokenMetadata?.nodes.filter(Boolean)??[],newStartCursor:t?.tokenMetadata?.pageInfo.startCursor??null,totalCount:t?.tokenMetadata?.totalCount??0,newEndCursor:t?.tokenMetadata?.pageInfo.endCursor??null}}})();e===er.current&&(Y||ee(r),Q(o),$(a),X(e=>{let i=new Map(e.map(e=>[e.publicKeyBase58Check,e]));return l.forEach(e=>{i.set(e.publicKeyBase58Check,e)}),Array.from(i.values())}),ex())},eD=(0,r.useCallback)(async()=>{if(!T||!ei||!Y)return;let e=er.current,i={first:1,before:Y,tokenBalancesFilter:{creator:{publicKey:{equalTo:y}}}},t=eF();Object.keys(t).length&&(i.filter=t);let s=ev();s.length&&(i.orderBy=s);let{newCreators:l,newStartCursor:r}=await (async()=>{if("creatorStats"===f){let e=en({variables:i});e.retain?.();let{data:t}=await e;return{newCreators:t?.creatorStats?.nodes.filter(Boolean)??[],newStartCursor:t?.creatorStats?.pageInfo.startCursor??null}}{let e=ed({variables:i});e.retain?.();let{data:t}=await e;return{newCreators:t?.tokenMetadata?.nodes.filter(Boolean)??[],newStartCursor:t?.tokenMetadata?.pageInfo.startCursor??null}}})();e===er.current&&(et(5===l.length&&!!r),r&&ee(r),el(e=>[...new Set([...e,...l.map(e=>e.publicKeyBase58Check??"").filter(Boolean)])]),X(e=>[...l,...e]))},[y,en,T,ed,eF,ev,ei,f,Y]);(0,r.useEffect)(()=>{if(T){let e=setInterval(eD,1e3);return()=>clearInterval(e)}},[eD,T,ei,Y]);let{loadingMarkup:eb,setInitialLoading:eh,initialLoading:eg,ref:ep,loadingMore:eT}=(0,d.usePaginationRequest)({initialRequest:ej,fetchRequest:ej,hasMoreItems:em}),ew=(0,r.useCallback)(async()=>{er.current+=1,X([]),Q(null),ee(null),el([]),et(!0),eh(!0)},[eh]),eC=(0,r.useCallback)(()=>{er.current+=1,E([],!0),_(null,!0),X([]),Q(null),ee(null),el([]),et(!0)},[_,E]),eS=(0,r.useCallback)(()=>{E(B.initialFilters,!0),ew()},[B.initialFilters,ew,E]),ef=(0,r.useCallback)(()=>{_(C,!0),ew()},[C,ew,_]),{topActiveEnabled:eR,newlyJoinedEnabled:ey,topEarnersEnabled:eU}=(R=1===V.length&&(0,l.isEqual)(V[0],h)&&(0,l.isEqual)(O,j),{topActiveEnabled:R,newlyJoinedEnabled:1===V.length&&(0,l.isEqual)(V[0],g)&&(0,l.isEqual)(O,D),topEarnersEnabled:(0,l.isEqual)(O,b)&&!V.length}),eL=ea?.tokenMetadata?.nodes.filter(Boolean)??[],eN=(0,r.useCallback)(e=>eL.some(i=>i.publicKeyBase58Check===e),[eL]),eP=(0,r.useMemo)(()=>J.filter(e=>!N.includes(e.publicKeyBase58Check??"")),[J,N]);return(0,i.jsx)(v.Provider,{value:{syncLastSavedFilters:H,setFiltersToLastSaved:q,resetAll:eC,onFiltersApply:ew,lazyLoadingMarkup:eb,lazyLoadingRef:ep,creators:eP,pinnedCreators:eL,setFilters:E,findFilterByName:I,removeFilter:W,filters:V,isSortActive:A,isFilterActive:K,updateFilter:M,currentSort:O,resetDiscoverSort:ef,resetDiscoverFilters:eS,setCurrentSort:_,loading:ec||eu,initialLoading:eg||eo,topActiveEnabled:eR,newlyJoinedEnabled:ey,topEarnersEnabled:eU,initialFilters:w,freshCreatorStatPublicKeys:es,isFilterDisabled:G,isPinnedCreator:eN,filterBlockedAccount:k,blockedAccounts:N,loadingMoreCreators:eT,hasMoreCreators:em},children:e})},"newlyJoinedFilterConfig",0,g,"newlyJoinedSortConfig",0,D,"topActiveFilterConfig",0,h,"topActiveSortConfig",0,j,"topEarnersSortConfig",0,b,"useDiscoverContext",0,()=>{let e=(0,r.useContext)(v);if(!e)throw Error("useDiscoverContext must be used within a DiscoverProvider");return e}])},632347,e=>{"use strict";var i=e.i(843476),t=e.i(657688),s=e.i(271645),l=e.i(590106),r=e.i(753070),a=e.i(95358),o=e.i(266397),n=e.i(273443),c=e.i(519455),d=e.i(43236),u=e.i(6705),m=e.i(780856),x=e.i(777737);let F=({isTimePeriodDisabled:e})=>
1{let[t,l]=(0,s.useState)(!1),[a,o]=(0,s.useState)(!1),{setFiltersToLastSaved:n}=(0,x.useDiscoverContext)();return(0,s.useEffect)(()=>{a?l(!1):a||t||n()},[a,n,t]),(0,i.jsxs)(d.PopoverDrawer,{historyName:"discover-filters",onOpenChange:o,open:a,title:"Discover filters",children:[(0,i.jsx)(d.PopoverDrawerTrigger,{asChild:!0,children:(0,i.jsxs)(c.Button,{variant:"link",className:"flex items-center gap-1 text-muted",children:[(0,i.jsx)("span",{className:"text-xs",children:"Filter"}),(0,i.jsx)(r.LuChevronDown,{})]})}),(0,i.jsx)(v,{isTimePeriodDisabled:e,setSubmitting:l})]})},v=({isTimePeriodDisabled:e,setSubmitting:F})=>{let{onFiltersApply:v,findFilterByName:j,updateFilter:D,removeFilter:b,resetDiscoverFilters:h,isFilterActive:g,syncLastSavedFilters:p,isFilterDisabled:T}=(0,x.useDiscoverContext)(),{close:w}=(0,d.usePopoverDrawerContext)(),C={findFilterByName:j,updateFilter:D,removeFilter:b,isFilterActive:g,isFilterDisabled:T,isTimePeriodDisabled:e},S=(0,s.useCallback)(()=>{F(!0),p(),v(),w()},[v,w,p,F]),f=(0,s.useCallback)(()=>{F(!0),h(),w()},[w,h,F]),R=(0,s.useCallback)(e=>e.every(e=>T(e)),[T]);return(0,i.jsx)(d.PopoverDrawerContent,{align:"start",side:"bottom",drawerDescription:"Filter discover users by profile, activity, wealth, and social metrics.",className:" custom-scrollbar w-screen overflow-y-auto p-6 pb-0 shadow-xl md:max-h-[min(72vh,450px)] md:min-h-[450px] md:w-[600px] md:pb-6 ",children:(0,i.jsxs)(n.Accordion,{type:"single",collapsible:!0,children:[(0,i.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,i.jsxs)(a.FiltersSet,{name:"Profile",isSectionDisabled:R([m.DiscoverFilterFields.publicKeyBase58Check,m.DiscoverFilterFields.username,m.DiscoverFilterFields.description,m.DiscoverFilterFields.joinedFocusDate]),children:[(0,i.jsx)(a.FilterString,{...C,label:"Public key",placeholder:"Start typing a public key...",name:m.DiscoverFilterFields.publicKeyBase58Check,icon:(0,i.jsx)(r.LuKeyRound,{})}),(0,i.jsx)(a.FilterString,{...C,label:"Username",placeholder:"Start typing a username...",name:m.DiscoverFilterFields.username,icon:(0,i.jsx)(r.LuUser,{})}),(0,i.jsx)(a.FilterMatchString,{...C,label:"Description",name:m.DiscoverFilterFields.description,icon:(0,i.jsx)(r.LuText,{})}),(0,i.jsx)(a.FilterDate,{...C,label:"Joined Date",icon:(0,i.jsx)(r.LuCalendar,{}),name:m.DiscoverFilterFields.joinedFocusDate})]}),(0,i.jsxs)(a.FiltersSet,{name:"Reactions",isSectionDisabled:R([m.DiscoverFilterFields.totalReactionsReceived,m.DiscoverFilterFields.totalPositiveReactionsReceived,m.DiscoverFilterFields.totalNegativeReactionsReceived,m.DiscoverFilterFields.totalReactionsGiven,m.DiscoverFilterFields.totalPositiveReactionsGiven,m.DiscoverFilterFields.totalNegativeReactionsGiven]),children:[(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,label:"Total Reactions Received",name:m.DiscoverFilterFields.totalReactionsReceived,icon:(0,i.jsx)(r.LuSmile,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,label:"Total Positive Reactions Received",name:m.DiscoverFilterFields.totalPositiveReactionsReceived,icon:(0,i.jsx)(r.LuThumbsUp,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalNegativeReactionsReceived,label:"Total Negative Reactions Received",icon:(0,i.jsx)(r.LuThumbsDown,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalReactionsGiven,label:"Total Reactions Given",icon:(0,i.jsx)(r.LuSmile,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalPositiveReactionsGiven,label:"Total Positive Reactions Given",icon:(0,i.jsx)(r.LuThumbsUp,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalNegativeReactionsGiven,label:"Total Negative Reactions Given",icon:(0,i.jsx)(r.LuThumbsDown,{})})]}),(0,i.jsxs)(a.FiltersSet,{name:"Diamonds",isSectionDisabled:R([m.DiscoverFilterFields.totalDiamondsUsdCentsReceived,m.DiscoverFilterFields.totalDiamondsUsdCentsSent]),children:[(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalDiamondsUsdCentsReceived,label:"Total Tips Received USD",icon:(0,i.jsx)(r.LuGem,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalDiamondsUsdCentsSent,label:"Total Tips Sent USD",icon:(0,i.jsx)(r.LuGem,{})})]}),(0,i.jsxs)(a.FiltersSet,{name:"Followers",isSectionDisabled:R([m.DiscoverFilterFields.totalFollowers,m.DiscoverFilterFields.totalWhaleFollowers,m.DiscoverFilterFields.totalFollowing]),children:[(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.totalFollowers,label:"Total Followers",icon:(0,i.jsx)(r.LuUser,{})}),(0,i.jsx)(a.FilterNumeric,{...C,label:"Total Whale Followers",name:m.DiscoverFilterFields.totalWhaleFollowers,icon:(0,i.jsx)(t.default,{src:u.WHALE_ICON,unoptimized:!0,alt:"whale",width:20,height:20})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.totalFollowing,label:"Total Following",icon:(0,i.jsx)(r.LuUsers,{})})]}),(0,i.jsxs)(a.FiltersSet,{name:"Wealth",isSectionDisabled:R([m.DiscoverFilterFields.totalAssetsBalanceUsdCents,m.DiscoverFilterFields.totalLiquidAssetsBalanceUsdCents,m.DiscoverFilterFields.desoBalanceNanos,m.DiscoverFilterFields.usdcBalanceUsdCents,m.DiscoverFilterFields.usdtBalanceUsdCents]),children:[(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.totalAssetsBalanceUsdCents,label:"Total Assets USD",icon:(0,i.jsx)(r.LuCircleDollarSign,{})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.totalLiquidAssetsBalanceUsdCents,label:"Total Liquid Assets USD",icon:(0,i.jsx)(r.LuCircleDollarSign,{})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.desoBalanceNanos,label:"DESO Balance",icon:(0,i.jsx)(r.LuCircleDollarSign,{})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.usdcBalanceUsdCents,label:"USDC Balance",icon:(0,i.jsx)(r.LuCircleDollarSign,{})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.usdtBalanceUsdCents,label:"USDT Balance",icon:(0,i.jsx)(r.LuCircleDollarSign,{})})]}),(0,i.jsxs)(a.FiltersSet,{name:"Posts",isSectionDisabled:R([m.DiscoverFilterFields.totalPosts,m.DiscoverFilterFields.totalFocusPostViews,m.DiscoverFilterFields.totalFocusPostWhaleViews,m.DiscoverFilterFields.totalViewedFocusPosts]),children:[(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalPosts,label:"Total Posts Created",icon:(0,i.jsx)(r.LuScrollText,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalFocusPostViews,label:"Total Post Views",icon:(0,i.jsx)(r.LuScrollText,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalFocusPostWhaleViews,label:"Total Whale Post Views",icon:(0,i.jsx)(r.LuScrollText,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,label:"Total Viewed Posts",name:m.DiscoverFilterFields.totalViewedFocusPosts,icon:(0,i.jsx)(r.LuScrollText,{})})]}),(0,i.jsxs)(a.FiltersSet,{name:"Earnings",isSectionDisabled:R([m.DiscoverFilterFields.totalFocusEarningsUsdCents,m.DiscoverFilterFields.totalJoiningRewardUsdCents,m.DiscoverFilterFields.unlockedJoiningRewardUsdCents,m.DiscoverFilterFields.lockedJoiningRewardUsdCents,m.DiscoverFilterFields.totalReferralRewardsUsdCents,m.DiscoverFilterFields.unlockedReferralRewardsUsdCents,m.DiscoverFilterFields.lockedReferralRewardsUsdCents]),children:[(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalFocusEarningsUsdCents,label:"Total Earnings USD",icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalJoiningRewardUsdCents,label:"Total Joining Reward USD",icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.unlockedJoiningRewardUsdCents,label:"Unlocked Joining Reward USD",icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.lockedJoiningRewardUsdCents,label:"Locked Joining Reward USD",icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.totalReferralRewardsUsdCents,label:"Total Referral Rewards USD",icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.unlockedReferralRewardsUsdCents,label:"Unlocked Referral Rewards USD",icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(a.FilterNumericRangeWithTimePeriod,{...C,name:m.DiscoverFilterFields.lockedReferralRewardsUsdCents,label:"Locked Referral Rewards USD",icon:(0,i.jsx)(r.LuLandmark,{})})]}),(0,i.jsxs)(a.FiltersSet,{name:"X (Twitter)",isSectionDisabled:R([m.DiscoverFilterFields.twitterUsername,m.DiscoverFilterFields.twitterTotalFollowers,m.DiscoverFilterFields.twitterTotalFollowing,m.DiscoverFilterFields.twitterTotalTweets,m.DiscoverFilterFields.twitterIsVerified]),children:[(0,i.jsx)(a.FilterString,{...C,name:m.DiscoverFilterFields.twitterUsername,label:"X (Twitter) Username",placeholder:"Start typing a username...",icon:(0,i.jsx)(l.BsTwitterX,{})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.twitterTotalFollowers,label:"X (Twitter) Followers",icon:(0,i.jsx)(l.BsTwitterX,{})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.twitterTotalFollowing,label:"X (Twitter) Following",icon:(0,i.jsx)(l.BsTwitterX,{})}),(0,i.jsx)(a.FilterNumeric,{...C,name:m.DiscoverFilterFields.twitterTotalTweets,label:"X (Twitter) Total Tweets Created",icon:(0,i.jsx)(l.BsTwitterX,{})}),(0,i.jsx)(a.FilterBoolean,{...C,name:m.DiscoverFilterFields.twitterIsVerified,label:"Verified on X (Twitter)",icon:(0,i.jsx)(l.BsTwitterX,{})})]})]}),(0,i.jsx)(o.PopoverFilterSortActions,{className:" sticky inset-x-auto bottom-0 z-10 -mx-6 mt-4 w-auto rounded-none border-x-0 border-b-0 bg-card/95 backdrop-blur-sm ",customSubmitButton:(0,i.jsx)(c.Button,{variant:"default",size:"lg",onClick:S,children:"Apply"}),onResetClick:f})]})})};var j=e.i(369620),D=e.i(940141);function b(e){return(0,D.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"
1currentColor"},child:[{tag:"path",attr:{d:"M20 4V16H23L19 21L15 16H18V4H20ZM12 18V20H3V18H12ZM14 11V13H3V11H14ZM14 4V6H3V4H14Z"},child:[]}]})(e)}function h(e){return(0,D.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M19 3L23 8H20V20H18V8H15L19 3ZM14 18V20H3V18H14ZM14 11V13H3V11H14ZM12 4V6H3V4H12Z"},child:[]}]})(e)}var g=e.i(967489),p=e.i(380506);let T=({name:e,children:t})=>(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)("div",{className:" border-b border-border-light pb-2 font-semibold text-muted ",children:e}),t]}),w=({label:e,icon:t,currentSortValue:s,onClick:l,isActive:a,showSortIcon:o})=>(0,i.jsxs)("div",{className:"my-3 flex w-full cursor-pointer items-center justify-between",onClick:l,children:[(0,i.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,i.jsx)("span",{className:"text-xl text-muted",children:t}),e]}),(0,i.jsxs)("div",{className:"flex",children:[o&&(0,i.jsx)("div",{className:"pr-2",children:"asc"===s?(0,i.jsx)(h,{}):(0,i.jsx)(b,{})}),!a&&s&&(0,i.jsx)("div",{className:"pr-2",children:(0,i.jsx)(r.LuCircle,{className:" text-xl text-muted opacity-50 hover:text-muted-foreground "})}),a&&(0,i.jsx)("div",{className:"pr-2",children:(0,i.jsx)(r.LuCircleCheck,{className:"text-xl text-green-500"})})]})]}),C=({label:e,name:t,icon:l,setCurrentSort:r,currentSort:a,isSortActive:o,showSortIcon:n=!0})=>{let c=o(t),d=a?.direction||"asc",u=(0,s.useCallback)(()=>{r({name:t,type:p.SortType.basic,direction:c&&"asc"===d?"desc":"asc"})},[d,c,t,r]);return(0,i.jsx)("div",{className:" border-b border-border-light last:border-none ",children:(0,i.jsx)(w,{label:e,name:t,icon:l,onClick:u,isActive:c,showSortIcon:n,currentSortValue:c?d:"asc"})})},S=({label:e,name:t,icon:l,setCurrentSort:r,currentSort:a,isSortActive:o})=>{let n=o(t),c=a?.direction||"asc",d=(0,s.useCallback)(e=>{r({name:t,type:p.SortType.numericWithTime,timePeriod:e})},[t,r]),u=(0,s.useCallback)(()=>{r({...a,timePeriod:a?.timePeriod||m.TimePeriod.AllTime,name:t,type:p.SortType.numericWithTime,direction:n&&"asc"===c?"desc":"asc"})},[a,c,n,t,r]);return(0,i.jsxs)("div",{className:"flex flex-row justify-between border-b border-border-light",children:[(0,i.jsx)(w,{label:e,name:t,icon:l,onClick:u,isActive:n,currentSortValue:n?c:"asc"}),(0,i.jsx)("div",{className:"my-2 ml-1 overflow-visible rounded-lg",children:(0,i.jsx)("div",{className:"flex flex-row gap-4",children:(0,i.jsxs)(g.Select,{onValueChange:d,defaultValue:a?.timePeriod||m.TimePeriod.AllTime,children:[(0,i.jsx)(g.SelectTrigger,{children:(0,i.jsx)(g.SelectValue,{placeholder:"Select a deposit currency"})}),(0,i.jsx)(g.SelectContent,{children:Object.entries(p.TimePeriodLabels).map(([e,t])=>(0,i.jsx)(g.SelectItem,{value:e,className:"cursor-pointer",children:t},e))})]})})})]})},f=()=>{let[e,t]=(0,s.useState)(!1);return(0,i.jsxs)(d.PopoverDrawer,{historyName:"discover-sort",onOpenChange:t,open:e,title:"Discover sort",children:[(0,i.jsx)(d.PopoverDrawerTrigger,{asChild:!0,children:(0,i.jsxs)(c.Button,{variant:"link",className:"flex items-center gap-1 text-muted",children:[(0,i.jsx)("span",{className:"text-xs",children:"Sort"}),(0,i.jsx)(r.LuChevronDown,{})]})}),(0,i.jsx)(R,{})]})},R=()=>{let{onFiltersApply:e,setCurrentSort:a,currentSort:F,isSortActive:v,resetDiscoverSort:D}=(0,x.useDiscoverContext)(),b={setCurrentSort:a,currentSort:F,isSortActive:v},{close:h}=(0,d.usePopoverDrawerContext)(),g=(0,s.useCallback)(()=>{e(),h()},[e,h]),p=(0,s.useCallback)(()=>{D(),h()},[h,D]);return(0,i.jsx)(d.PopoverDrawerContent,{align:"start",side:"bottom",drawerDescription:"Choose discover sort order.",className:" custom-scrollbar w-screen overflow-y-auto p-6 pb-0 shadow-xl md:max-h-[min(72vh,450px)] md:min-h-[450px] md:w-[600px] md:pb-6 ",children:(0,i.jsxs)(n.Accordion,{type:"single",collapsible:!0,children:[(0,i.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,i.jsx)(T,{name:"Profile",children:(0,i.jsx)(C,{...b,name:m.DiscoverFilterFields.joinedFocusDate,label:"Joined Date",icon:(0,i.jsx)(r.LuCalendar,{})})}),(0,i.jsxs)(T,{name:"Reactions",children:[(0,i.jsx)(S,{...b,label:"Total Reactions Received",name:m.DiscoverFilterFields.totalReactionsReceived,icon:(0,i.jsx)(r.LuSmile,{})}),(0,i.jsx)(S,{...b,label:"Total Positive Reactions Received",name:m.DiscoverFilterFields.totalPositiveReactionsReceived,icon:(0,i.jsx)(r.LuThumbsUp,{})}),(0,i.jsx)(S,{...b,label:"Total Negative Reactions Received",name:m.DiscoverFilterFields.totalNegativeReactionsReceived,icon:(0,i.jsx)(r.LuThumbsDown,{})}),(0,i.jsx)(S,{...b,label:"Total Reactions Given",name:m.DiscoverFilterFields.totalReactionsGiven,icon:(0,i.jsx)(r.LuSmile,{})}),(0,i.jsx)(S,{...b,label:"Total Positive Reactions Given",name:m.DiscoverFilterFields.totalPositiveReactionsGiven,icon:(0,i.jsx)(r.LuThumbsUp,{})}),(0,i.jsx)(S,{...b,label:"Total Negative Reactions Given",name:m.DiscoverFilterFields.totalNegativeReactionsGiven,icon:(0,i.jsx)(r.LuThumbsDown,{})})]}),(0,i.jsxs)(T,{name:"Diamonds",children:[(0,i.jsx)(S,{...b,label:"Total Tips Received USD",name:m.DiscoverFilterFields.totalDiamondsUsdCentsReceived,icon:(0,i.jsx)(r.LuGem,{})}),(0,i.jsx)(S,{...b,label:"Total Tips Sent USD",name:m.DiscoverFilterFields.totalDiamondsUsdCentsSent,icon:(0,i.jsx)(r.LuGem,{})})]}),(0,i.jsxs)(T,{name:"Followers",children:[(0,i.jsx)(C,{...b,label:"Total Followers",name:m.DiscoverFilterFields.totalFollowers,icon:(0,i.jsx)(r.LuUser,{})}),(0,i.jsx)(C,{...b,label:"Total Whale Followers",name:m.DiscoverFilterFields.totalWhaleFollowers,icon:(0,i.jsx)(t.default,{src:u.WHALE_ICON,unoptimized:!0,alt:"whale",width:20,height:20})})]}),(0,i.jsxs)(T,{name:"Wealth",children:[(0,i.jsx)(C,{...b,label:"Total Assets USD",name:m.DiscoverFilterFields.totalAssetsBalanceUsdCents,icon:(0,i.jsx)(j.IoLogoUsd,{})}),(0,i.jsx)(C,{...b,label:"Total Liquid Assets USD",name:m.DiscoverFilterFields.totalLiquidAssetsBalanceUsdCents,icon:(0,i.jsx)(j.IoLogoUsd,{})}),(0,i.jsx)(C,{...b,label:"DESO Balance",name:m.DiscoverFilterFields.desoBalanceNanos,icon:(0,i.jsx)(j.IoLogoUsd,{})}),(0,i.jsx)(C,{...b,label:"USDC Balance",name:m.DiscoverFilterFields.usdcBalanceUsdCents,icon:(0,i.jsx)(j.IoLogoUsd,{})}),(0,i.jsx)(C,{...b,label:"USDT Balance",name:m.DiscoverFilterFields.usdtBalanceUsdCents,icon:(0,i.jsx)(j.IoLogoUsd,{})}),(0,i.jsx)(C,{...b,label:"Market Cap USD",name:m.DiscoverFilterFields.marketCapUsd,icon:(0,i.jsx)(j.IoLogoUsd,{})})]}),(0,i.jsxs)(T,{name:"Posts",children:[(0,i.jsx)(S,{...b,label:"Total Posts Created",
1name:m.DiscoverFilterFields.totalPosts,icon:(0,i.jsx)(r.LuScrollText,{})}),(0,i.jsx)(S,{...b,label:"Total Post Views",name:m.DiscoverFilterFields.totalFocusPostViews,icon:(0,i.jsx)(r.LuScrollText,{})}),(0,i.jsx)(S,{...b,label:"Total Whale Post Views",name:m.DiscoverFilterFields.totalFocusPostWhaleViews,icon:(0,i.jsx)(r.LuScrollText,{})}),(0,i.jsx)(S,{...b,label:"Total Viewed Posts",name:m.DiscoverFilterFields.totalViewedFocusPosts,icon:(0,i.jsx)(r.LuScrollText,{})})]}),(0,i.jsxs)(T,{name:"Earnings",children:[(0,i.jsx)(S,{...b,label:"Total Earnings USD",name:m.DiscoverFilterFields.totalFocusEarningsUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Total Payed Messages Earnings USD",name:m.DiscoverFilterFields.totalPaidMessageEarningsUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Total Subscription Earnings USD",name:m.DiscoverFilterFields.totalSubscriptionEarningsUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Total Joining Reward USD",name:m.DiscoverFilterFields.totalJoiningRewardUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Unlocked Joining Reward USD",name:m.DiscoverFilterFields.unlockedJoiningRewardUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Locked Joining Reward USD",name:m.DiscoverFilterFields.lockedJoiningRewardUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Total Referral Rewards USD",name:m.DiscoverFilterFields.totalReferralRewardsUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Unlocked Referral Rewards USD",name:m.DiscoverFilterFields.unlockedReferralRewardsUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})}),(0,i.jsx)(S,{...b,label:"Locked Referral Rewards USD",name:m.DiscoverFilterFields.lockedReferralRewardsUsdCents,icon:(0,i.jsx)(r.LuLandmark,{})})]}),(0,i.jsxs)(T,{name:"X (Twitter)",children:[(0,i.jsx)(C,{...b,label:"X (Twitter) Followers",name:m.DiscoverFilterFields.twitterTotalFollowers,icon:(0,i.jsx)(l.BsTwitterX,{})}),(0,i.jsx)(C,{...b,label:"X (Twitter) Following",name:m.DiscoverFilterFields.twitterTotalFollowing,icon:(0,i.jsx)(l.BsTwitterX,{})}),(0,i.jsx)(C,{...b,label:"X (Twitter) Total Tweets Created",name:m.DiscoverFilterFields.twitterTotalTweets,icon:(0,i.jsx)(l.BsTwitterX,{})})]})]}),(0,i.jsx)(o.PopoverFilterSortActions,{className:" sticky inset-x-auto bottom-0 z-10 -mx-6 mt-4 w-auto rounded-none border-x-0 border-b-0 bg-card/95 backdrop-blur-sm ",customSubmitButton:(0,i.jsx)(c.Button,{variant:"default",size:"lg",onClick:g,children:"Apply"}),onResetClick:p})]})})};e.s(["DiscoverMainFilter",0,({isTimePeriodDisabled:e})=>(0,i.jsx)("div",{className:"flex items-center justify-between p-0 text-xs text-muted",children:(0,i.jsxs)("div",{className:"flex items-center text-muted",children:[(0,i.jsx)(F,{isTimePeriodDisabled:e}),(0,i.jsx)(f,{})]})})],632347)},451601,e=>{"use strict";var i=e.i(843476),t=e.i(769105),s=e.i(138413),l=e.i(657688),r=e.i(271645),a=e.i(8597),o=e.i(407730),n=e.i(940101),c=e.i(502080),d=e.i(556358),u=e.i(584284),m=e.i(903957),x=e.i(16482),F=e.i(108262),v=e.i(151733),j=e.i(722321),D=e.i(289011),b=e.i(633815),h=e.i(211932),g=e.i(477111),p=e.i(252595),T=e.i(712555),w=e.i(407861);function C({resetErrorBoundary:e}){return(0,i.jsx)("div",{className:" p-4 md:p-6 ",children:(0,i.jsxs)("div",{className:"text-center text-red-500",children:["An error occurred while loading this creator.",(0,i.jsx)("button",{onClick:e,className:"ml-2 underline",children:"Retry"})]})})}e.s(["DiscoverCreatorItem",0,({user:e,isCompact:a,extraContent:C,findFilterByName:S,hasBorder:f=!0,isRounded:R=!0,customPrefix:y,filterBlockedAccount:U})=>{let{currentUserPublicKey:L}=(0,r.useContext)(F.UserContext),{publicKeyBase58Check:N,username:P,totalFollowers:k,displayName:B,description:E,coinCategory:I}=e,W=N??"",V=L===W,A=(0,j.useIdleReady)(!!W,{timeout:1500}),K=(0,h.isCreatorStatType)(e)?e?.totalFollowing??0:0,{data:M,refetch:O}=(0,s.useQuery)(v.CreatorStatAccountDataDocument,W&&A?{variables:{publicKey:W,tokenBalancesFilter:{creator:{publicKey:{equalTo:L}}}}}
1:t.skipToken),H=M?.accountByPublicKey,q={DisplayName:B??"",FeaturedImageURL:H?.extraData?.FeaturedImageURL??"",TwitterURL:H?.extraData?.TwitterURL??"",DiscordURL:H?.extraData?.DiscordURL??"",InstagramURL:H?.extraData?.InstagramURL??"",TwitchURL:H?.extraData?.TwitchURL??"",WebsiteURL:H?.extraData?.WebsiteURL??"",NFTProfilePicturePostHashHex:H?.extraData?.NFTProfilePicturePostHashHex,NFTProfilePictureUrl:H?.extraData?.NFTProfilePictureUrl},_=q.FeaturedImageURL||"/assets/empty-39.png",G=(0,g.getUserDisplayName)({extraData:q,publicKey:W,username:P??"",truncateLength:40}),J=!!H?.tokenBalances?.nodes?.[0]?.balanceNanos;if(W)return(0,i.jsx)("div",{className:(0,D.cn)(`
2          relative rounded-2xl bg-background transition-all
3          hover:bg-accent
4        `,{"rounded-t-none":!R}),children:(0,i.jsxs)("div",{className:(0,D.cn)("rounded-t-2xl",{"rounded-t-2xl border border-border":f,"rounded-t-none":!R}),children:[(0,i.jsx)("div",{className:(0,D.cn)("relative min-h-[120px] w-full overflow-hidden",{"rounded-t-2xl":R,"rounded-t-none":!R}),style:{WebkitMaskImage:"linear-gradient(180deg, #000000FF 0%, #00000000 100%)"},children:(0,i.jsx)(l.default,{src:_,width:700,height:120,quality:90,alt:"Cover Image",className:(0,D.cn)("min-w-full cursor-pointer object-cover",{"rounded-t-2xl":R,"rounded-t-none":!R}),style:{width:"100%",height:120},priority:!0})}),(0,i.jsx)("div",{className:" -mt-12 flex flex-col items-start gap-4 p-4 md:p-6 ",children:(0,i.jsxs)("div",{className:"w-full",children:[(0,i.jsxs)("div",{className:"flex w-full flex-row items-end justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[e&&(0,i.jsx)(c.default,{account:{username:P,publicKey:W,extraData:q},size:56}),(0,i.jsxs)("div",{className:"relative flex flex-col gap-1",children:[(0,i.jsx)("div",{className:"flex flex-row items-center",children:(0,i.jsx)(p.UserDisplayNameWithStatus,{whaleSize:20,className:"font-sans",username:P??"",publicKey:W,extraData:q})}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted",children:[(0,g.getUserName)({account:{username:P,publicKey:H?.publicKey},customPrefix:y||(I?"$":"@")}),(0,i.jsx)("div",{className:"flex items-center gap-2",children:(0,i.jsx)(w.default,{publicKey:W,isMyAccount:V})})]})]})]}),(0,i.jsx)("div",{className:"flex items-center gap-2",children:(0,i.jsxs)(u.IsLoggedIn,{children:[(0,i.jsx)("div",{className:" hidden sm:mr-2 sm:block ",children:(0,i.jsx)(n.FollowUserListsButton,{userLabel:G,userPublicKey:W,variant:"inline"})}),(0,i.jsx)(T.ProfileActionsDropdown,{account:{publicKey:W,username:P??"",extraData:q},onBlock:e=>{e&&U?.(W),O()}})]})})]}),(0,i.jsxs)("div",{className:" mt-4 mb-2 flex flex-col items-start gap-2 text-sm/6 text-foreground md:pr-12 md:leading-6 ",children:[(0,i.jsx)(x.UserFollowCounts,{followersCount:Number(k??"0"),followingCount:Number(K??"0"),publicKey:N??"",username:P??""}),J&&(0,i.jsx)(d.HolderBadge,{}),!!E&&(0,i.jsx)(m.TruncatedContent,{maxHeight:100,children:(0,b.getMarkdownBody)(E)})]}),(0,i.jsx)("div",{className:"mt-4",children:(0,i.jsx)(o.default,{user:e,isCompact:a,findFilterByName:S})}),C]})})]})})},"DiscoverCreatorItemErrorBoundary",0,({children:e})=>(0,i.jsx)(a.ErrorBoundary,{FallbackComponent:C,children:e})])}]);
5
6//# sourceMappingURL=1osy6zuwiuovf.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.