PageSourceSearch

https://typefully.com/_next/static/chunks/11kxx78l9icbi.js?dpl=dpl_iHPkyWiYzfNtPWUZTzYNLF9Kaerb

js typefully.com collected 2026-09-24 08:36:20 UTC 40,500 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="050bb49d-6d11-f52c-8c2b-3ae14aae3556")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,527349,e=>{"use strict";var t=e.i(71667),a=e.i(436413);function n(){try{return(0,t.createStore)("threads","backup")}catch(e){return console.error("Error while creating backups store",e),null}}function i(e,t){return new Date(t[1].date).getTime()-new Date(e[1].date).getTime()}e.s(["cleanOldBackups",0,function(){let e=n();e&&(a.loggers.draftBackup.debug("🧹 Cleaning old backups"),(0,t.entries)(e).then(n=>{a.loggers.draftBackup.debug("Total backups",n.length);let s=n.sort(i).slice(400).map(e=>{let[t]=e;return t});s.length>0&&(a.loggers.draftBackup.debug("Deleting old backups",s),(0,t.delMany)(s,e))}))},"getBackupsStore",0,n])},837991,e=>{"use strict";var t=e.i(617865),a=e.i(416340),n=e.i(575216);e.s(["default",0,function(e){let{dirtyStatuses:i}=e,s=(0,t.default)();return(0,a.useCallback)(async e=>{let t=n.useDraftStore.getState(),a=null!=e?e:t.selectedDraftId,r=a?t.getDraftSyncStatus(a):void 0;return"error"===r&&i.includes(r)?!await s({title:"Discard changes?",body:"You have unsaved changes because of a sync problem. Please check your connection.",ctaLabel:"Discard and change draft"}):!!("dirty"===r&&i.includes(r))&&!await s({title:"Draft is syncing",body:"You have unsaved changes. Do you want to discard them?",ctaLabel:"Discard and change draft"})},[s,i])}])},707752,e=>{"use strict";var t=e.i(549198),a=e.i(839532),n=e.i(103658);let i=(0,t.create)()((0,n.withDevtools)((0,a.subscribeWithSelector)((e,t)=>({shown:!1,activeSubMenu:void 0,query:"",resetTimeoutId:null,setCommandBarActiveSubMenu:t=>e({activeSubMenu:t},!1,"setCommandBarActiveSubMenu"),setCommandBarQuery:t=>e({query:t},!1,"setCommandBarQuery"),toggleCommandBar:()=>e(e=>({shown:!e.shown}),!1,"toggleCommandBar"),hideCommandBar:()=>e({shown:!1,activeSubMenu:void 0},!1,"hideCommandBar"),hideAndReset:()=>{let a=t().resetTimeoutId;a&&clearTimeout(a),e({shown:!1},!1,"hideAndReset");let n=setTimeout(()=>{e({activeSubMenu:void 0,query:"",resetTimeoutId:null},!1,"hideAndReset:reset")},200);e({resetTimeoutId:n},!1,"hideAndReset:setTimer")},showCommandBar:()=>{let a=t().resetTimeoutId;a&&(clearTimeout(a),e({resetTimeoutId:null},!1,"showCommandBar:clearTimer")),e({shown:!0},!1,"showCommandBar")},resetCommandBar:()=>e({activeSubMenu:void 0,query:""},!1,"resetCommandBar")})),{name:"CommandBarStore"}));e.s(["useCommandBarQuery",0,()=>i(e=>e.query),"useCommandBarShown",0,()=>i(e=>e.shown),"useCommandBarStore",0,i])},541689,e=>{"use strict";let t=(0,e.i(843842).default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);e.s(["BookOpen",0,t],541689)},827824,e=>{"use strict";let t=(0,e.i(843842).default)("megaphone",[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]);e.s(["Megaphone",0,t],827824)},726508,e=>{"use strict";e.i(927840);var t=e.i(540826),a=e.i(209163),n=e.i(136328),i=e.i(541689),s=e.i(843842);let r=(0,s.default)("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);var l=e.i(567353),o=e.i(655420),c=e.i(827824);let u=(0,s.default)("message-square-more",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M8 11h.01",key:"1dfujw"}]]);var d=e.i(278337),p=e.i(915354),m=e.i(216957),f=e.i(989589),h=e.i(488685);let x={help_menu:"Help menu",command_bar:"Command bar"};e.s(["default",0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"help_menu",s=(0,d.useRouter)(),g=(0,a.useShowIntercomChat)(),y=(0,m.useModalStore)(e=>e.showFeedbackModal);return[{label:"Keyboard Shortcuts",icon:l.Command,onSelect:function(){(0,h.default)("/shortcuts")}},{label:"Drafts Backups",icon:o.History,onSelect:()=>s.push(f.default.backups())},{label:"Follow Us",icon:t.Twitter,onSelect:function(){(0,h.default)(n.default.twitter)}}
2,"divider",{label:"Help Docs",icon:i.BookOpen,onSelect:function(){(0,h.default)(n.default.supportHome)},extraQuery:"help docs guides support articles"},{label:"Feature Requests",icon:r,onSelect:function(){(0,h.default)("/feedback")}},{label:"Send Feedback",icon:c.Megaphone,onSelect:function(){y({kind:"feature",featureTitle:x[e],copy:{title:"How can we improve Typefully?",description:"We read every message. The more specific, the better.",placeholder:"A bug, something confusing, or a feature you wish Typefully had?"},surface:e})},extraQuery:"feedback help support suggestion improvement"},{label:"Contact Support",icon:u,onSelect:function(){(0,p.trackServerEvent)("Contact Support"),g()}}]}],726508)},687407,e=>{"use strict";let t=(0,e.i(843842).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],687407)},625972,e=>{"use strict";var t=e.i(878420),a=e.i(221628),n=e.i(384345),i=e.i(674829),s=e.i(591183),r=e.i(771607),l=e.i(251839),o=e.i(307737),c=e.i(830469),u=e.i(883606),d=e.i(4362),p=e.i(527417),m=e.i(349876),f=e.i(361258),h=e.i(416340),x=e.i(892111);function g(e){let{account:t,className:n}=e,i=(0,m.default)(),{setShowNewAccountsMenu:s}=(0,h.useContext)(d.NewAccountsMenuContext);return(0,a.jsx)(u.default,{title:"Social set settings",children:(0,a.jsx)(c.Button,{"aria-label":"Social set settings",size:"icon",className:(0,l.default)("size-[22px] flex-none pointer-events-auto text-typ-c3",n),icon:(0,a.jsx)(f.Ellipsis,{className:"size-[13px] text-typ-c3",strokeWidth:1.5}),variant:"line",onClick:e=>{null==e||e.preventDefault(),null==e||e.stopPropagation(),s(!1),i({pages:{navigationStack:(0,x.createAccountNavigationStack)(p.SETTINGS_PAGES_IDS.SOCIAL_SETS__GENERAL,t.id.toString())}})}})})}function y(e){let{badge:t,control:n}=e;return t||n?(0,a.jsxs)("div",{className:"relative z-[2] grid flex-none place-items-center",children:[t&&(0,a.jsx)("span",{className:(0,l.default)("pointer-events-none col-start-1 row-start-1 flex transition-opacity",!!n&&"group-hover/social-set:opacity-0 group-focus-within/social-set:opacity-0"),children:t}),n]}):null}function v(e){let{platform:t,selected:n}=e,i=o.platformsMetadata[t];return(0,a.jsx)(r.default,{icon:i.icon,size:11,className:n?"text-typ-c3":"text-typ-c4","aria-label":i.displayName})}e.s(["default",0,function(e){var r;let{account:o,selected:c,color:u,selectionControl:d,trailingAction:p,overflowAction:m,trailingBadge:f,trailingBadgeSlot:h="selection",selectionStyle:x="subtle",showInlineActions:b=!0,persistentActions:j=!1,mutePlatformGlyphs:k=!1,preventClickFocus:S=!1,selectionButtonIsToggle:w=!0,onClick:N,selectionButtonRef:C,selectionButtonProps:A}=e,T=!!(b||d||f),_=o.connected_social_platforms.length>0;return(0,a.jsxs)("div",{className:(0,l.default)("group/social-set relative z-[1] flex w-full items-center gap-2 rounded-lg px-1.5 py-1 transition-opacity",N?"cursor-pointer":"cursor-default","subtle"===x&&!c&&"opacity-50 hover:opacity-100"),children:[(0,a.jsx)("div",{className:(0,l.default)("absolute inset-x-0 -inset-y-0.5 z-[-1] rounded-lg transition-all duration-150","active"===x&&c?"bg-typ-accent/10 opacity-100":N?"bg-typ-c4/10 opacity-0 group-hover/social-set:opacity-100":"opacity-0")}),N&&(0,a.jsx)("button",(0,t._)({ref:C,type:"button",className:"button-focus-ring absolute inset-x-0 -inset-y-0.5 z-0 rounded-lg border-0 bg-transparent p-0 text-left outline-hidden","aria-label":"".concat(c?"Selected":"Select"," ").concat(o.name),"aria-pressed":w?c:void 0,onMouseDown:S?e=>e.preventDefault():void 0,onClick:N},A)),(0,a.jsx)("div",{className:(0,l.default)("pointer-events-none relative z-[1] rounded-full border-2 p-px",c?null!=(r=null==u?void 0:u.border)?r:"border-typ-accent":"border-transparent"),children:(0,a.jsx)(s.default,{url:o.profile_image_url,className:"size-[22px]"})}),(0,a.jsxs)("div",{className:"pointer-events-none relative z-[1] min-w-0 flex-1",children:[(0,a.jsx)(i.P2,{className:(0,l.default)("truncate text-sm font-medium leading-[1.15]",c?"text-typ-c1":"text-typ-c2"),children:o.name}),_&&(0,a.jsx)(n.HStack,{className:"mt-0.5 flex-none gap-1",noWrap:!0,children:o.connected_social_platforms.map(e=>(0,a.jsx)(v,{platform:e,selected:c&&!k},e))})]}),T&&(0,a.jsxs)(n.HStack,{className:"flex-none gap-1.5",noWrap:!0,children:[(0,a.jsx)(y,{badge:"actions"!==h||j?void 0:f,control:b&&(0,a.jsxs)(n.HStack,{className:(0,l.default)("pointer-events-none col-start-1 row-start-1 gap-1.5",!j&&"opacity-0 transition-opacity group-hover/social-set:opacity-100 group-focus-within/social-set:opacity-100 has-[[data-state=open]]:opacity-100",p&&!j&&"w-0 overflow-hidden group-hover/social-set:w-auto group-focus-within/social-set:w-auto has-[[data-state=open]]:w-auto"),noWrap:!0,children:[p,null!=m?m:(0,a.jsx)(g,{account:o})]})}),(0,a.jsx)(y,{badge:"selection"===h?f:void 0,control:d&&(0,a.jsx)("div",{className:"pointer-events-auto col-start-1 row-start-1",children:d})})]})]})}],625972)},581865,e=>{"use strict";var t=e.i(878420),a=e.i(64386),n=e.i(831136),i=e.i(976859),s=e.i(811343),r=e.i(772880),l=e.i(673073),o=e.i(46672);e.s(["default",0,function(){var e,c;let{enabled:u=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=(0,i.useAppSelectedAccount)(),p=(0,i.useAppSelectedAccountId)(),m=null==d?void 0:d.features.analytics,{settings:f,areSettingsFetched:h}=(0,o.useAccountSettings)("appSelectedAccount"),x=h&&(null==f?void 0:f.STREAK_MODE),{data:g}=(0,n.useQuery)((0,a._)((0,t._)({},l.queries.streaks.currentStreak(null!=p?p:0)),{enabled:!!(p&&m&&u),staleTime:3e5})),y=null!=(e=null==g?void 0:g.unit)?e:"day",v=null!=(c=null==g?void 0:g["current-streak"])?c:0,b=function(e,t){if(!e)return null;if("day"===t){let t=Math.floor(e/30),a="".concat(t," months streak"),n=Math.floor((e-365)/30),i="1 year ".concat(n?"and ".concat(n," ").concat((0,r.pluralize)("month",n)):"streak");if(e>=1e3)return["⭐","".concat((0,s.default)(1e3),"+ days streak, insane")];if(e>=500)return["🐐","500+ days streak, you're the GOAT"];if(e>=365)return["👑","".concat(i,", you're a legend")];if(e>=360)return["😱","Almost there..."];if(e>=350)return["🏆","Closer to one year streak, don't stop now"];if(e>=340)return["🏆","One year in on the horizon..."];if(e>
2=180)return["🏆","".concat(a,", you're killing it")];if(e>=90)return["🚀","".concat(a,", you're a machine")];if(e>=70)return["🎉","".concat(t," months, fantastic work")];if(e>=60)return["🎉","Two months under your belt, congrats"];if(e>=35)return["🔥","".concat(e," days streak, you're on fire")];if(e>=30)return["🔥","One month streak, you're on fire"];if(e>=25)return["🔥","Almost one month, keep going!"];if(e>=2)return["🔥","".concat(e," days streak, keep it up")];if(e>=1)return["🔥","Today's the day"]}if("week"===t){let t="".concat(Math.floor(e/4)," ").concat((0,r.pluralize)("month",Math.floor(e/4))," and ").concat(e%4," ").concat((0,r.pluralize)("week",e%4)),a="".concat(Math.floor(e/52)," ").concat((0,r.pluralize)("year",Math.floor(e/52))," and ").concat(e%52," ").concat((0,r.pluralize)("week",e%52));if(e>52)return["👑","".concat(a,", you're a legend")];if(52===e)return["👑","1 year streak, you're a legend"];if(e>=48)return["😱","Almost there..."];if(e>=45)return["🏆","Closer to one year streak, don't stop now"];if(e>=40)return["🏆","One year in on the horizon..."];if(e>=24)return["🏆","".concat(t,", you're killing it")];if(e>=12)return["🚀","".concat(t,", you're a machine")];if(e>=10)return["🎉","".concat(t,", fantastic work")];if(e>=8)return["🎉","Two months under your belt, congrats"];if(e>=5)return["🔥","".concat(e," weeks streak, you're on fire")];if(e>=4)return["🔥","One month streak, you're on fire"];if(e>=3)return["🔥","Almost one month, keep going!"];if(e>=2)return["🔥","".concat(e," weeks streak, keep it up")];if(e>=1)return["🔥","Today's the day"]}return null}(v,y);return{streak:g?{data:g,emojiMessage:b,currentStreak:v}:null,isStreakConfigured:x}}])},500797,e=>{"use strict";let t=(0,e.i(843842).default)("arrow-down-wide-narrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]]);e.s(["ArrowDownWideNarrow",0,t],500797)},703869,110988,625153,e=>{"use strict";var t=e.i(221628),a=e.i(976859),n=e.i(830469),i=e.i(384345),s=e.i(878420),r=e.i(64386);e.i(927840);var l=e.i(106168),o=e.i(527417),c=e.i(427663),u=e.i(759520),d=e.i(881705),p=e.i(726704),m=e.i(349876);let f=(0,e.i(843842).default)("circle-pause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);var h=e.i(675996),x=e.i(85918),g=e.i(717587),y=e.i(886513),v=e.i(837991),b=e.i(771607),j=e.i(278337),k=e.i(416340),S=e.i(251839),w=e.i(702236),N=e.i(86918);let C=(0,k.forwardRef)((e,a)=>{let l=(0,j.useRouter)(),{name:o,icon:c,to:u,onClick:d,onlyLoggedIn:p,children:m,innerChildren:f,color:h}=e,x=(0,y._)(e,["name","icon","to","onClick","onlyLoggedIn","children","innerChildren","color"]),g=!x.variant||"link"===x.variant,v=l.pathname===u,S=(0,k.useRef)(null),[w,C]=(0,k.useState)(!1);return(0,t.jsxs)(i.HStack,{className:"justify-between h-[26px]",noWrap:!0,children:[(0,t.jsx)(A,{onlyLoggedIn:p,to:u,ref:(0,N.default)(a,S),onClick:d,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:"max-w-full",children:(0,t.jsxs)(i.HStack,{className:"justify-between",noWrap:!0,children:[(0,t.jsx)(n.Button,(0,r._)((0,s._)({variant:"link",style:{color:void 0!==h?h:g?v||w?"var(--c1)":"var(--c3)":void 0},icon:(0,t.jsx)(b.default,{icon:c}),tabIndex:-1},x),{children:o})),f]})}),m]})});C.displayName="SidebarNavLink";let A=(0,k.forwardRef)((e,n)=>{let[i,...l]=[e,n],{to:o,onClick:c,onlyLoggedIn:u,style:d,className:p,children:m}=i,f=(0,y._)(i,["to","onClick","onlyLoggedIn","style","className","children"]),[h]=l,x=(0,j.useRouter)(),{isLoggedIn:g}=(0,a.useLoggedIn)(),b=(0,v.default)({dirtyStatuses:["error","dirty"]}),k=async e=>{if(u&&!g){e.preventDefault(),e.stopPropagation(),(0,w.dispatchCustomEvent)(w.CustomEventKey.ShowLandingPageModal);return}if(null==c||c(),o){if(await b())return void e.preventDefault();x.push(o)}};return(0,t.jsx)("div",(0,r._)((0,s._)({style:{position:"relative",flex:"1 0 auto",lineHeight:0,zIndex:1},tabIndex:0,className:(0,S.default)("cursor-pointer button-focus-ring rounded-md",p),ref:h,onClick:k,onKeyDown:e=>{"Enter"===e.key&&k(e)}},f),{children:m}))});A.displayName="NavLinkInner";var T=e.i(640227);let _=(e,t,a)=>"floating"===e?{variant:a,size:"small"}:{color:t};function I(e){let{presentation:n="sidebar-link"}=e,[i]=(0,u.useOnboardingState)(),y=(0,T.default)(),v=(0,m.default)(),{isLoggedIn:b}=(0,a.useLoggedIn)(),j=(0,a.useUser)(),k=(0,a.useAppSelectedAccount)(),S=(0,d.useAppSelectedTeamMembership)(),w=(0,p.useCurrentEnterpriseBillingContext)(),N=(0,c.default)();if(!b||!j||!i.finished||S&&"o"!==S.access_level)return null;if(k&&k.paused)return(0,t.jsx)(C,(0,r._)((0,s._)({},_(n,"var(--error)","primary")),{name:"Social Set Disabled",icon:l.AlertTriangle,onClick:()=>v({pages:{navigationStack:[o.SETTINGS_PAGES_IDS.BILLING]}})}));if(w.isDirectEnterprise)return null;switch(j.monetization_status){case"canceled_with_access":return(0,t.jsx)(C,(0,r._)((0,s._)({},_(n,"var(--orange)","orange")),{name:"Subscription Canceled",icon:h.X,onClick:()=>v({pages:{navigationStack:[o.SETTINGS_PAGES_IDS.BILLING]}})}));case"paused":return(0,t.jsx)(C,(0,r._)((0,s._)({},_(n,"var(--orange)","orange")),{name:"Subscription Paused",icon:f,onClick:()=>v({pages:{navigationStack:[o.SETTINGS_PAGES_IDS.BILLING]}})}));case"free":if(S)return null;return(0,t.jsx)(C,(0,r._)((0,s._)({},_(n,"var(--accent)","primary")),{name:N?"Start Free Trial":"Upgrade",icon:x.Zap,onClick:()=>y({location:"billing-button"})}));case"past_due":return(0,t.jsx)(C,(0,r._)((0,s._)({},_(n,"var(--error)","destructive")),{name:"Billing Issue",icon:l.AlertTriangle,onClick:()=>v({pages:{navigationStack:[o.SETTINGS_PAGES_IDS.BILLING]}})}));case"trialing":case"subscribed":case"gifted":case"enterprise":return null;default:(0,g.default)(j.monetization_status)}}var M=e.i(186662),z=e.i(855732),D=e.i(344163),E=e.i(103658);let P=(0,e.i(549198).create)()((0,E.withDevtools)(e=>({openAccountId:null,tab:"drafts",open:t=>e(e=>e.openAccountId===t?{}:{openAccountId:t,tab:"drafts"},!1,"open"),close:()=>e({openAccountId:null},!1,"close"),setTab:t=>e({tab:t},!1,"setTab")}),{name:"CalendarDraftsSidebarStore"}));e.s(["useCalendarDraftsSidebarStore",0,P],110988);var B=e.i(663973),L=e.i(252428),W=e.i(288489),R=e.i(674829),H=e.i(26167),O=e.i(371123),G=e.i(923498),q=e.i(841869),F=e.i(216957),U=e.i(450579),V=e.i(989589),Q=e.i(353950),K=e.i(488685),Y=e.i(673073),J=e.i(12564),X=e.i(726508);function Z(e){let{children:a,showSettingsItem:n=!1}=e,i=(0,B.useQueryClient)(),s=(0,F.useModalStore)(e=>e.setAffiliateProgramModalShown),r=(0,H.useShowChangelogEntry)(),l=(0,m.default)(),o=(0,k.useRef)(null),[c]=(0,O.default)(o);(0,k.useEffect)(()=>{c&&!i.getQueryData(Y.queries.updates.changelog.queryKey)&&i.prefetchQuery(Y.queries.updates.changelog),c&&i.prefetchQuery(Y.queries.updates.announcements)},[c,i]);let u=(0,X.default)();return(0,t.jsx)(L.default,{content:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($,{setOpenEntry:r}),(0,t.jsx)(L.default.Item,{label:"Affiliate Program",description:"Join & earn passive income",icon:q.Star,onSelect:function(){s(!0)}}),(0,t.jsx)(L.default.Divider,{}),n&&(0,t.jsx)(L.default.Item,{label:"Settings",icon:G.Settings2,onSelect:()=>l()}),u.map((e,a)=>"divider"===e?(0,t.jsx)(L.default.Divider,{},"divider-".concat(a)):(0,t.jsx)(L.default.Item,{label:e.label,icon:e.icon,onSelect:e.onSelect},a))]}),contentWrapperStyle:{width:"240px"},trigger:(0,t.jsx)("div",{ref:o,children:a}),sideOffset:8,side:"top"})}let $=e=>{var a;let{setOpenEntry:n}=e,{height:s}=(0,U.useWindowSize)(),r=Math.min(5,Math.max(1,(s-450)/70)),{updates:l,isLoading:o,updateLastSeenDate:c}=(0,J.default)();return o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"select-none p-2",children:(0,t.jsxs)(i.HStack,{className:"gap-2",children:[(0,t.jsx)(W.Spinner,{size:"tiny"}),(0,t.jsx)(R.P3,{children:"Loading updates..."})]})}),(0,t.jsx)(L.default.Divider,{})]}):0===l.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"select-none p-2 pb-0",children:(0,t.jsx)(R.P3,{className:"text-typ-400",children:"Latest updates:"})}),null==l||null==(a=l.slice(0,r))?void 0:a.map((e,a)=>
2(0,t.jsx)(L.default.Item,{label:e.entry.title,description:(0,Q.friendlyTime)(e.published_at,{short:!1,capitalize:!0})+("announcement"===e.type?" - Announcement":""),descriptionClassName:"text-typ-c4",onSelect:()=>{"announcement"===e.type?(0,K.default)(V.default.announcementPost(e.entry.slug)):n(e.entry),c(e.published_at)},children:e.isUnseen&&(0,t.jsx)(ee,{})},e.entry.id)),(0,t.jsx)(L.default.Item,{label:"View more...",onSelect:()=>(0,K.default)(V.default.changelog())}),(0,t.jsx)(L.default.Divider,{})]})},ee=()=>(0,t.jsx)("div",{className:"size-[7px] rounded-full flex-none bg-typ-accent"});var et=e.i(478760),ea=e.i(208447),en=e.i(549481),ei=e.i(953303),es=e.i(286870),er=e.i(293503),el=e.i(58778),eo=e.i(588354),ec=e.i(390634);function eu(){let{isLoggedIn:e}=(0,a.useLoggedIn)(),i=(0,B.useQueryClient)(),s=(0,ei.default)(ea.MOBILE_EDITOR_BREAKPOINT),{isOnline:r}=(0,es.default)(),[o,c]=(0,k.useState)(!1);(0,k.useEffect)(()=>{let e=i.getQueryCache().subscribe(e=>{var t,a;let{query:n}=e,{error:i,status:s}=null!=(t=n.state)?t:{};n.queryKey===Y.queries.auth.me.queryKey&&(((0,ec.default)(i)||(null==i||null==(a=i.response)?void 0:a.status)===500)&&c(!0),"success"===s&&c(!1))});return()=>e()},[i]),(0,k.useEffect)(()=>{s&&o&&(0,eo.default)((0,t.jsx)(en.ToastWithMessage,{icon:l.AlertTriangle,title:"Can't connect to servers",message:"Please check your internet connection.\nTypefully may also be down."}),{id:es.NETWORK_TOAST_ID})},[s,o]);let u=o?"error":!1===r?"offline":"online";return e&&"online"!==u?"offline"===u?(0,t.jsx)(et.Callout,{icon:(0,t.jsx)(el.WifiOff,{size:14}),title:"You seem offline",description:"Don't leave this page to make sure you don't lose your work.",className:"mb-2 mt-1 p-3 [zoom:0.95] bg-typ-bg2 border-[0.5px] border-typ-c6"}):"error"===u?(0,t.jsx)(et.Callout,{icon:(0,t.jsx)(l.AlertTriangle,{size:14}),title:"Can't connect to servers",description:"Please check your connection. Typefully may also be down.",className:"mb-2 mt-1 p-3 [zoom:0.95] bg-typ-bg2 border-[0.5px] border-typ-c6",children:(0,t.jsx)(n.Button,{icon:(0,t.jsx)(er.RefreshCw,{size:14}),variant:"white",size:"small",className:"mt-1.5 p-3 [zoom:0.95]",onClick:()=>i.refetchQueries(Y.queries.auth.me),children:"Try reconnecting"})}):null:null}var ed=e.i(883606),ep=e.i(925874),em=e.i(209163),ef=e.i(617048);function eh(e){let a,{notice:s,compact:r=!1}=e,l=(0,T.default)(),o=(0,em.useShowIntercomChat)(),c=(0,k.useRef)(!1),{used:u,limit:d,remaining:p,canU
2pgradeForHigherLimit:m,resetLabel:f}=s,h=Math.min(u/d*100,100),x=ep.publishingLimitTrackingLocations.sidebarNotice,g=f?" Your limit resets ".concat(f,"."):"";return a=0===p?"You've used all ".concat(d," posts this month.").concat(g):"You have ".concat(p," ").concat(1===p?"post":"posts"," left this month.").concat(g),m||(a+=" Contact support for higher limits."),(0,k.useEffect)(()=>{c.current||(c.current=!0,(0,ep.trackPublishingLimitViewed)(x))},[x]),(0,t.jsx)(ed.default,{content:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R.P3,{className:"font-semibold leading-[1.4]",children:0===p?"Monthly limit reached":"Approaching monthly limit"}),(0,t.jsx)(R.P3,{className:"text-typ-c3 leading-[1.4]",children:a})]}),m?(0,t.jsx)(ef.default,{size:"medium",className:"rounded-lg",onClick:function(){(0,ep.trackPublishingLimitClicked)(x),l({feature:"publishing",location:x})},children:"Upgrade for higher limits"}):(0,t.jsx)(n.Button,{variant:"white",size:"medium",onClick:function(){(0,ep.trackPublishingLimitClicked)(x),o({newChatText:"Hi! This social set has reached its publishing limit, and upgrading would not unlock a higher limit. We'd like to discuss higher limits for our use case:\n\nUse case:\nExpected posting volume:\nAnything else we should know:"})},children:"Contact support for higher limits"})]}),side:"right",interactive:!0,maxWidth:280,children:(0,t.jsxs)(i.HStack,{noWrap:!0,className:(0,S.default)("h-[26px]",!r&&"w-full justify-between px-0.5"),children:[(0,t.jsx)(R.P3,{className:"font-medium text-typ-orange truncate",children:r?"".concat(u,"/").concat(d):"".concat(u," of ").concat(d," posts used")}),(0,t.jsx)(ex,{percentage:h})]})})}function ex(e){let{percentage:a}=e,n=2*Math.PI*7.2;return(0,t.jsxs)("svg",{width:18,height:18,className:"rotate-[-90deg] text-typ-orange flex-none",children:[(0,t.jsx)("circle",{cx:9,cy:9,r:7.2,fill:"transparent",stroke:"currentColor",strokeWidth:1.8,strokeOpacity:"0.2"}),(0,t.jsx)("circle",{cx:9,cy:9,r:7.2,fill:"transparent",stroke:"currentColor",strokeWidth:1.8,strokeDasharray:n,strokeDashoffset:n-n*a/100,strokeLinecap:"round"})]})}var eg=e.i(87328),ey=e.i(958016),ev=e.i(559964),eb=e.i(803310),ej=e.i(581865),ek=e.i(750717),eS=e.i(811343);let ew=(0,ek.default)(()=>e.A(674280),{loadableGenerated:{modules:[932714]},ssr:!1});function eN(e){var n;let{}=e,l=(0,eg._)({},e),o=(0,a.useAppSelectedAccount)(),c=(0,a.useAppSelectedPlatformAccount)("twitter"),u=(0,F.useModalStore)(e=>e.streaksModalShown),d=(0,F.useModalStore)(e=>e.setStreaksModalShown),p=(0,k.useRef)(!1);u&&(p.current=!0);let{streak:m,isStreakConfigured:f}=(0,ej.default)({enabled:!!(o&&c)}),h=null==o?void 0:o.features.streaks,x=!f||!h;return m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eb.default.Streaks,{children:[x&&(0,t.jsx)(ed.default,{title:"Set up streaks to track your progress 🔥",children:(0,t.jsx)(ev.default,(0,r._)((0,s._)({},l),{icon:(0,t.jsx)(ey.Fire,{}),onClick:()=>{d(!0)}}))}),!x&&(0,t.jsx)(ed.default,{title:null==(n=m.emojiMessage)?void 0:n[1],asChild:!0,maxWidth:300,triggerClassName:"min-w-0 max-w-full",children:(0,t.jsx)("button",{type:"button",className:"bg-red-300/20 rounded-md px-[5px] py-[4px] min-w-0 cursor-pointer z-2 transition duration-100 hover:scale-110 button-focus-ring","aria-label":"Open streaks",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(!0)},children:(0,t.jsx)(i.HStack,{noWrap:!0,children:m.emojiMessage?(0,t.jsxs)(R.P3,{className:"text-[12.5px] text-typ-c2 font-semibold truncate",children:[m.emojiMessage[0]," ",(0,eS.default)(m.currentStreak)]}):(0,t.jsx)(R.P3,{className:"text-[12.5px] text-typ-c2 font-semibold",children:"🔥"})})})})]}),p.current&&(0,t.jsx)(ew,{show:u,setShow:d})]}):null}var eC=e.i(29534),eA=e.i(488501);function eT(){let{isLoggedIn:e}=(0,a.useLoggedIn)(),n=(0,eC.default)(),{isLoading:i}=(0,J.default)();return!e||n||i?null:(0,t.jsx)(t.Fragment,{children:Object.entries(eA.callouts).map(e=>{let[a,{component:n}]=e;return(0,t.jsx)(k.Fragment,{children:n&&(0,t.jsx)(n,{})},a)})})}var e_=e.i(13561),eI=e.i(560716),eM=e.i(4362),ez=e.i(343602),eD=e.i(454118),eE=e.i(361258),eP=e.i(52722),eB=e.i(8596),eL=e.i(201686),eW=e.i(455746);function eR(e){return"team"!==e.type||!!(e.membership&&(0,eW.accessLevel_gte)(e.membership.access_level,"a"))}function eH(){let{className:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{showCreateTeam:s}=(0,eD.default)(),{teams:r}=(0,a.useAuth)(),l=(0,T.default)(),c=(0,m.default)(),{setShowNewAccountsMenu:u}=(0,k.useContext)(eM.NewAccountsMenuContext),d=(0,eI.default)({onUpgrade:()=>l({feature:"accounts",location:"navigation-revamp-social-set-list-footer"})}),p=0===r.length;return(0,t.jsxs)(i.VStack,{className:(0,S.default)("items-start gap-2.5 border-t-[0.5px] border-typ-c6 px-2 mt-1 pt-3",e),noWrap:!0,children:[(0,t.jsx)(eq,{appearance:"labeled",onClick:()=>{(u(!1),p)?d():c({pages:{navigationStack:[o.SETTINGS_PAGES_IDS.SOCIAL_SETS]}})}}),(0,t.jsx)(n.Button,{variant:"link",size:"small",className:"text-typ-c3 gap-2",icon:(0,t.jsx)(eL.Users,{}),onClick:e=>{e.preventDefault(),e.stopPropagation(),u(!1),s()},children:"Create new team"}),(0,t.jsx)(n.Button,{variant:"link",size:"small",className:"text-typ-c3 gap-2",icon:(0,t.jsx)(eB.Settings,{}),onClick:e=>{e.preventDefault(),e.stopPropagation(),u(!1),c({pages:{navigationStack:[o.SETTINGS_PAGES_IDS.SOCIAL_SETS]}})},children:"Settings"})]})}function eO(e){let{appearance:a}=e,n=(0,T.default)(),i=(0,eI.default)({onUpgrade:()=>n({feature:"accounts",location:"navigation-revamp-social-set-group"})}),{setShowNewAccountsMenu:s}=(0,k.useContext)(eM.NewAccountsMenuContext);return(0,t.jsx)(eq,{appearance:a,"aria-label":"Add social set to your personal workspace",onClick:()=>{s(!1),i()}})}function eG(e){let{team:a,appearance:n}=e,i=(0,F.useModalStore)(e=>e.setAddAccountModalV2),{setShowNewAccountsMenu:s}=(0,k.useContext)(eM.NewAccountsMenuContext);return(0,t.jsx)(eq,{appearance:n,"aria-label":"Add social set to ".concat(a.name),onClick:()=>{s(!1),i({mode:"connect-new-account",connectToTeamId:a.id})}})}function eq(e){let{appearance:a,"aria-label":i,onClick:s}=e,r=e=>{e.preventDefault(),e.stopPropagation(),s()};return"labeled"===a?(0,t.jsxs)(n.Button,{"aria-label":i,variant:"link",size:"small",className:"text-typ-c3 gap-2",icon:(0,t.jsx)(eP.Plus,{}),onClick:r,children:["Add ",ez.SOCIAL_SET_NAME]}):(0,t.jsx)(ed.default,{title:"Add ".concat(ez.SOCIAL_SET_NAME),children:(0,t.jsx)(n.Button,{"aria-label":i,size:"icon",className:"size-[22px] flex-none text-typ-c3",icon:(0,t.jsx)(eP.Plus,{className:"size-[13px] text-typ-c3",strokeWidth:1.8}),variant:"line",onClick:r})})}e.s(["CreateSocialSetGroupAction",0,function(e){let{group:a,appearance:n="icon"}=e;return eR(a)?"team"===a.type&&a.membership?(0,t.jsx)(eG,{team:a.membership,appearance:n}):(0,t.jsx)(eO,{appearance:n}):null},"SocialSetListFooterActions",0,eH,"TeamHeaderActions",0,function(e){let{team:a}=e,{showManageTeam:i}=(0,eD.default)(),{setShowNewAccountsMenu:s}=(0,k.useContext)(eM.NewAccountsMenuContext),r=(0,eW.accessLevel_gte)(a.access_level,"a");return(0,t.jsx)(ed.default,{title:"Team settings",children:(0,t.jsx)(n.Button,{"aria-label":"".concat(r?"Manage":"View"," ").concat(a.name," team settings"),size:"icon",className:"size-[22px] flex-none text-typ-c3",icon:(0,t.jsx)(eE.Ellipsis,{className:"size-[13px] text-typ-c3",strokeWidth:1.5}),variant:"line",onClick:e=>{e.preventDefault(),e.stopPropagation(),s(!1),i(a.id)}})})},"canCreateSocialSetInGroup",0,eR],625153);let eF="--nav-revamp-bottom-area-height",eU="var(".concat(eF,", 28rem)");function eV(e){let{mode:a}=e,n=P(e=>null!==e.openAccountId);return"plan"===a&&n?null:(0,t.jsx)(eH,{className:(0,S.default)("pointer-events-auto mt-0 border-t-0 px-1 pt-0","plan"===a&&"max-desktop:hidden")})}e.s(["NAV_REVAMP_BOTTOM_AREA_CLEARANCE",0,eU,"NavRevampBottomClearance",0,function(){return(0,t.jsx)("div",{className:"flex-none",style:{height:eU}})},"default",0,function(e){let{mode:s}=e,r=(0,k.useRef)(null);(0,k.useLayoutEffect)(()=>{let e=r.current,t=null==e?void 0:e.parentElement;if(!e||!t)return;let a=()=>{t.style.setProperty(eF,"".concat(e.getBoundingClientRect().height,"px"))};if(a(),"u"<typeof ResizeObserver)return()=>t.style.removeProperty(eF);let n=new ResizeObserver(a);return n.observe(e),()=>{n.disconnect(),t.style.removeProperty(eF)}},[]);let l="write"===s,o=(0,a.useAppSelectedAccountId)(),c=(0,e_.useFeatureEnabled)(e_.featureFlagKeys.publishingLimitsUi),[u]=(0,M.usePublishingLimitDebugState)(),{data:d}=(0,D.useCurrentPublishingQuota)({accountId:o,enabled:c&&l}),p=c&&l?(null==u?void 0:u.enabled)?(0,z.getPublishingLimitSidebarNoticeDataFromDebugState)(u):(0,z.getPublishingLimitSidebarNoticeData)(d):null;return(0,t.jsxs)("div",{ref:r,className:"pointer-events-none absolute inset-x-0 bottom-0 z-20 flex max-h-full flex-col px-3 pb-3.5 pt-10",children:[(0,t.jsx)("div",{"aria-hidden":!0,
2className:"absolute inset-x-0 top-0 h-10 bg-linear-to-b from-transparent to-typ-bg1"}),(0,t.jsx)("div",{"aria-hidden":!0,className:"absolute inset-x-0 top-10 bottom-0 bg-typ-bg1"}),(0,t.jsxs)("div",{className:"relative z-1 flex min-h-0 flex-col gap-3",children:[(0,t.jsxs)("div",{className:"pointer-events-auto flex min-h-0 flex-col gap-3 overflow-y-auto empty:hidden",children:["write"!==s&&(0,t.jsx)(eV,{mode:s}),(0,t.jsx)(eu,{}),(0,t.jsx)(eT,{})]}),(0,t.jsxs)("div",{className:"flex flex-none justify-between gap-3 pointer-events-auto",children:[(0,t.jsxs)(i.HStack,{noWrap:!0,className:"gap-3",children:[(0,t.jsx)(Z,{showSettingsItem:!0,children:(0,t.jsx)(n.Button,{variant:"white",size:"icon",className:"size-7 shrink-0 text-typ-c3","aria-label":"Help",children:"?"})}),"write"===s&&(0,t.jsx)(eN,{})]}),p?(0,t.jsx)("div",{className:(0,S.default)((0,n.buttonVariants)({variant:"white",size:"small",noHover:!0}),"min-w-0 empty:hidden"),children:(0,t.jsx)(eh,{notice:p,compact:!0})}):(0,t.jsx)("div",{children:l&&(0,t.jsx)(I,{presentation:"floating"})})]})]})]})}],703869)},914177,e=>{"use strict";var t=e.i(221628);e.i(927840);var a=e.i(106168),n=e.i(830469),i=e.i(883606),s=e.i(4362),r=e.i(640227),l=e.i(416340),o=e.i(251839);e.s(["default",0,function(e){let{account:c,interactive:u=!0,appearance:d="inline",className:p}=e,m=(0,r.default)(),{setShowNewAccountsMenu:f}=(0,l.useContext)(s.NewAccountsMenuContext);return u?(0,t.jsx)(i.default,{title:"This social set is temporarily disabled because of a billing issue",children:(0,t.jsx)(n.Button,{"aria-label":"".concat(c.name," is disabled — resolve billing issue"),size:"icon",className:(0,o.default)("size-[22px] flex-none pointer-events-auto text-typ-error hover:text-typ-error",p),icon:(0,t.jsx)(a.AlertTriangle,{size:"rowAction"===d?13:14}),variant:"rowAction"===d?"line":"link",onClick:e=>{e.preventDefault(),e.stopPropagation(),f(!1),m({feature:"accounts",location:"paused-account-button"})}})}):(0,t.jsx)("span",{role:"img","aria-label":"".concat(c.name," is disabled because of a billing issue"),className:(0,o.default)("flex size-[22px] flex-none items-center justify-center text-typ-error",p),children:(0,t.jsx)(a.AlertTriangle,{size:14})})}])},800856,704489,e=>{"use strict";var t=e.i(878420),a=e.i(64386),n=e.i(221628),i=e.i(79036),s=e.i(674829),r=e.i(845642),l=e.i(4362),o=e.i(976859),c=e.i(262708),u=e.i(416340),d=e.i(251839),p=e.i(914177),m=e.i(313199),f=e.i(384345),h=e.i(703869),x=e.i(625153);function g(e){let{groups:t,renderAccount:a,renderGroupAction:i,renderGroupLeading:s,onGroupHeaderClick:r,groupHeaderActionLabel:l,spacious:o=!1,calmHeader:c=!1,className:u,withFooterActions:p=!0,withFooterClearance:m=!0}=e;return(0,n.jsxs)(f.VStack,{className:(0,d.default)("gap-3 px-2 py-1 h-full",u),noWrap:!0,children:[t.map(e=>{let u=t.length>1||"team"===e.type||"personal"===e.type;return(0,n.jsxs)(f.VStack,{className:"gap-1",noWrap:!0,children:[u&&(0,n.jsx)(y,{group:e,leading:null==s?void 0:s(e),renderGroupAction:i,onGroupHeaderClick:r,actionLabel:null==l?void 0:l(e),calmHeader:c}),(0,n.jsx)(f.VStack,{className:(0,d.default)("gap-1",o&&"gap-2"),noWrap:!0,children:e.accounts.length>0?e.accounts.map(a):(0,n.jsx)(v,{group:e})})]},e.key)}),p&&(0,n.jsx)(x.SocialSetListFooterActions,{}),m&&(0,n.jsx)(h.NavRevampBottomClearance,{})]})}function y(e){let{group:t,leading:a,renderGroupAction:i,onGroupHeaderClick:r,actionLabel:l,calmHeader:o=!1}=e,c=!!r&&t.accounts.length>0,u=null!=l?l:"Show only ".concat(t.label),p=(0,n.jsxs)(n.Fragment,{children:[t.accounts.length>0&&(0,n.jsx)(x.CreateSocialSetGroupAction,{group:t}),"team"===t.type&&t.membership&&(0,n.jsx)(x.TeamHeaderActions,{team:t.membership})]});return(0,n.jsxs)("div",{className:"group/team-header relative",children:[(0,n.jsxs)(f.HStack,{className:"h-7 justify-between gap-2 px-1.5",noWrap:!0,children:[(0,n.jsxs)(f.HStack,{className:(0,d.default)("relative z-[1]",c&&"pointer-events-none"),noWrap:!0,children:[a&&(0,n.jsx)("span",{className:"pointer-events-auto flex flex-none items-center",children:a}),(0,n.jsx)(s.P3,{className:"min-w-0 truncate text-[13px] font-semibold text-typ-c2",noWrap:!0,children:t.label}),"team"===t.type&&t.membership&&(0,n.jsx)(m.default,{size:"tiny",mono:!0,children:b[t.membership.access_level]})]}),o?(0,n.jsxs)(f.HStack,{className:"relative z-[2] flex-none gap-2",noWrap:!0,children:[(0,n.jsx)(f.HStack,{className:"flex-none gap-1.5 opacity-0 transition-opacity group-hover/team-header:opacity-100 group-focus-within/team-header:opacity-100",noWrap:!0,children:p}),null==i?void 0:i(t)]}):(0,n.jsxs)(f.HStack,{className:"relative z-[2] flex-none gap-2.5",noWrap:!0,children:[null==i?void 0:i(t),(0,n.jsx)(f.HStack,{className:"flex-none gap-1.5",noWrap:!0,children:p})]})]}),c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"absolute inset-x-0 -inset-y-0.5 z-0 rounded-md bg-typ-c4/10 opacity-0 transition-opacity group-hover/team-header:opacity-100"}),(0,n.jsx)("button",{type:"button",className:"button-focus-ring absolute inset-x-0 -inset-y-0.5 z-0 rounded-md border-0 bg-transparent p-0 outline-hidden","aria-label":u,title:u,onMouseDown:e=>e.preventDefault(),onClick:e=>null==r?void 0:r(t,e)})]})]})}function v(e){let{group:t}=e;return(0,x.canCreateSocialSetInGroup)(t)?(0,n.jsx)("div",{className:"px-1.5 py-1",children:(0,n.jsx)(x.CreateSocialSetGroupAction,{group:t,appearance:"labeled"})}):(0,n.jsx)(s.P3,{className:"px-1.5 py-1 text-typ-c3",children:"No social sets yet"})}let b={o:"OWNER",a:"ADMIN",p:"PUBLISH",w:"WRITE",r:"READ"};e.s(["default",0,g],704489);var j=e.i(625972),k=e.i(886513),S=e.i(591183),w=e.i(687407);let N=(0,u.forwardRef)(function(e,i){let[r,...l]=[e,i],{name:o,avatarUrl:c,secondaryLabel:u}=r,d=(0,k._)(r,["name","avatarUrl","secondaryLabel"]),[p]=l;return(0,n.jsxs)("button",(0,a._)((0,t._)({ref:p,type:"button"},d),{className:"button-focus-ring flex min-w-0 flex-1 items-center gap-2 rounded-lg px-1.5 py-1 text-left outline-hidden transition-colors hover:bg-typ-c4/10",style:{minHeight:30},children:[(0,n.jsx)(S.default,{url:c,className:"size-5 flex-none"}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-baseline gap-1.5",children:[(0,n.jsx)(s.P2,{noWrap:!0,className:"min-w-0 shrink text-sm font-medium leading-[1.15]",children:o}),u&&(0,n.jsx)(s.P3,{noWrap:!0,className:"max-w-[45%] flex-none text-[12px] leading-[1.15] text-typ-c4",children:u})]}),(0,n.jsx)(w.ChevronsUpDown,{size:14,className:"flex-none text-typ-c4"})]}))});function C(e){let{title:t,className:a}=e;return(0,n.jsxs)("div",{className:(0,d.default)("px-2 pt-1.5 pb-0.5",a),"aria-label":"Loading social set","aria-busy":"true",children:[t&&(0,n.jsx)(s.P3,{className:"mb-2 text-[11px] font-semibold uppercase text-typ-c3",children:t}),(0,n.jsx)("div",{className:"flex min-w-0 items-center gap-1.5",children:(0,n.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-center gap-2 rounded-lg px-1.5 py-1",style:{minHeight:30}
2,children:[(0,n.jsx)(c.default,{"aria-hidden":!0,className:"block size-5 flex-none rounded-full"}),(0,n.jsx)(c.default,{"aria-hidden":!0,className:"block h-[13px] w-[132px] max-w-[70%]"})]})})]})}e.s(["default",0,function(e){var c;let{title:m,trailing:f,accountFilter:h,showTeamLabel:x=!0,className:y}=e,{accountsLoading:v}=(0,o.useAuth)(),b=(0,o.useAppSelectedAccount)(),k=(0,o.useAccountsGroupedByTeam)({uniqueTeamName:!0}),[S,w]=(0,u.useState)(!1),A=(0,r.default)({onDone:()=>w(!1)}),T=(0,u.useRef)(new Map),_=(0,u.useMemo)(()=>h?k.map(e=>(0,a._)((0,t._)({},e),{accounts:e.accounts.filter(h)})).filter(e=>e.accounts.length>0):k,[h,k]),I=(0,u.useMemo)(()=>_.flatMap(e=>e.accounts),[_]),M=b?I.findIndex(e=>e.id===b.id):-1,z=null==(c=_.find(e=>"team"===e.type&&e.accounts.some(e=>e.id===(null==b?void 0:b.id))))?void 0:c.label,D=(0,u.useCallback)(e=>{var t;e&&(null==(t=T.current.get(e.id))||t.focus())},[]),E=(0,u.useCallback)(e=>{if(0===I.length)return;let t=(e+I.length)%I.length;D(I[t])},[I,D]);(0,u.useEffect)(()=>{if(!S)return;let e=requestAnimationFrame(()=>{var e;D(null!=(e=I[M])?e:I[0])});return()=>cancelAnimationFrame(e)},[I,D,S,M]);let P=(0,u.useCallback)(e=>{if(0===I.length)return;if("Escape"===e.key)return void w(!1);let t=I.findIndex(e=>T.current.get(e.id)===document.activeElement),a=M>=0?M:0;"ArrowDown"===e.key&&(e.preventDefault(),E(t>=0?t+1:a)),"ArrowUp"===e.key&&(e.preventDefault(),E(t>=0?t-1:a)),"Home"===e.key&&(e.preventDefault(),E(0)),"End"===e.key&&(e.preventDefault(),E(I.length-1))},[I,E,M]);return b&&(!h||h(b))?(0,n.jsxs)("div",{className:(0,d.default)("px-2 pt-1.5 pb-0.5",y),children:[m&&(0,n.jsx)(s.P3,{className:"mb-2 text-[11px] font-semibold uppercase text-typ-c3",children:m}),(0,n.jsx)(l.NewAccountsMenuContext.Provider,{value:{setShowNewAccountsMenu:w,isAccountsMenu:!0},children:(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,n.jsx)(i.default,{open:S,onOpenChange:w,withArrow:!1,align:"start",sideOffset:8,contentClassName:"w-[320px] max-w-[calc(100vw-20px)] rounded-xl p-0",contentStyle:{maxHeight:"calc(var(--radix-popover-content-available-height, 80vh) - 12px)"},content:(0,n.jsx)("div",{className:"scroll-mask-vertical max-h-[inherit] overflow-x-hidden overflow-y-auto pb-1",onKeyDown:P,children:(0,n.jsx)(g,{className:"p-1",groups:_,withFooterClearance:!1,renderAccount:e=>(0,n.jsx)(j.default,{account:e,selected:b.id===e.id,selectionStyle:"active",trailingBadge:e.paused?(0,n.jsx)(p.default,{account:e}):void 0,onClick:()=>A(e),selectionButtonRef:t=>{t?T.current.set(e.id,t):T.current.delete(e.id)},selectionButtonProps:{role:"option","aria-selected":b.id===e.id}},e.id)})}),children:(0,n.jsx)(N,{name:b.name,avatarUrl:b.profile_image_url,secondaryLabel:x?z:void 0,"aria-label":"Change social set (current: ".concat(b.name,")")})}),f&&(0,n.jsx)("div",{className:"flex-none",children:f})]})})]}):v?(0,n.jsx)(C,{title:m,className:y}):null}],800856)}]);
3
4//# debugId=050bb49d-6d11-f52c-8c2b-3ae14aae3556
5//# sourceMappingURL=0jnn5ogtp4908.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.