PageSourceSearch

https://soshlabs.ai/_next/static/chunks/pages/settings/dr-sosh-af9382b61ca11ffd.js

js soshlabs.ai collected 2026-10-05 12:40:43 UTC 14,439 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6658],{3520:(e,n,s)=>{"use strict";s.d(n,{A:()=>t});var i=s(37876),a=s(39955);function t(e){let{boxSize:n="1.15em",...s}=e;return(0,i.jsx)(a.a,{as:"svg",viewBox:"0 0 24 24",fill:"currentColor",boxSize:n,"aria-hidden":"true",...s,children:(0,i.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}},62262:(e,n,s)=>{"use strict";s.d(n,{A:()=>y});var i=s(37876),a=s(32985),t=s(97491),r=s(84940),l=s(79736),o=s(18387),c=s(91921),d=s(89099),u=s(80192),h=s(14136),x=s(46293),g=s(50665),p=s(3381),m=s(25527),j=s(45412),b=s(74049);function y(e){let{activeTab:n}=e,s=(0,d.useRouter)(),{membership:y}=(0,u.Z5)(),f=(null==y?void 0:y.role)==="org:admin",{billingStatus:k}=(0,b.H)(),S=[];S.push({key:"organization",label:"My Brands",icon:h.A,route:"/settings"}),S.push({key:"team",label:"Team",icon:x.A,route:"/settings/team"}),S.push({key:"social-accounts",label:"Connected Accounts",icon:g.A,route:"/settings/social-accounts"}),S.push({key:"dr-sosh",label:"Dr. Sosh",icon:p.A,route:"/settings/dr-sosh"}),f&&(null==k?void 0:k.isBillingOwner)&&S.push({key:"billing",label:"Billing",icon:m.A,route:"/settings/billing"}),f&&S.push({key:"brand-dna",label:"Brand DNA",icon:j.A,route:"/settings/brand-dna"});let z=S.findIndex(e=>e.key===n);return(0,i.jsx)(a.t,{variant:"line",mb:8,index:-1===z?0:z,children:(0,i.jsx)(t.w,{children:S.map(e=>(0,i.jsx)(r.o,{fontSize:"sm",onClick:()=>s.push(e.route),children:(0,i.jsxs)(l.z,{spacing:2,children:[(0,i.jsx)(o.I,{as:e.icon,boxSize:4}),(0,i.jsx)(c.E,{children:e.label})]})},e.key))})})}},68392:(e,n,s)=>{"use strict";s.r(n),s.d(n,{default:()=>X});var i=s(37876),a=s(39955),t=s(38061),r=s(79736),l=s(18387),o=s(82736),c=s(91921),d=s(61886),u=s(34647),h=s(72105),x=s(62262),g=s(25429),p=s(5377),m=s(34185),j=s(88392),b=s(59803),y=s(60851),f=s(17523),k=s(38890),S=s(51362),z=s(69345),v=s(60947),A=s(28113),w=s(72502),C=s(45691),E=s(74206),I=s(67768),W=s(67914),T=s(40097),U=s(80192),D=s(72402);let P={linkCode:"/api/v1/messaging/telegram/link-code",status:"/api/v1/messaging/telegram/status"},R={async createLinkCode(){let{data:e}=await D.Ay.post(P.linkCode);return e.data},async status(){let{data:e}=await D.Ay.get(P.status);return e.data}},L=d.P.create(g.Z);function N(){var e,n,s,d,u;let h=(0,p.d)(),x=(0,I.jE)(),{organization:g}=(0,U.Z5)(),D=(0,t.dU)("white","surface.700"),P=(0,t.dU)("slate.500","slate.400"),N=(0,t.dU)("slate.700","slate.200"),_=(0,t.dU)("green.50","green.900"),B=(0,t.dU)("green.700","green.200"),Q=(0,t.dU)("blue.50","blue.900"),$=(0,t.dU)("blue.500","blue.200"),q=(0,t.dU)("slate.50","surface.600"),{data:F,isLoading:O}=(0,W.I)({queryKey:["telegram-status",null==g?void 0:g.id],queryFn:()=>R.status(),enabled:!!(null==g?void 0:g.id)}),Z=(0,T.n)({mutationFn:()=>R.createLinkCode(),onError:()=>{h({title:"Could not create a link",description:"Please try again in a moment.",status:"error",duration:4e3,isClosable:!0})}}),M=null!=(s=null==(e=Z.data)?void 0:e.deepLink)?s:"",Y=null!=(d=null==(n=Z.data)?void 0:n.code)?d:"",{onCopy:K,hasCopied:H}=(0,m.i)(M),X=null!=(u=null==F?void 0:F.connected)&&u,G=()=>{Z.mutate(void 0,{onSuccess:()=>{x.invalidateQueries({queryKey:["telegram-status",null==g?void 0:g.id]})}})};return(0,i.jsx)(L,{bg:D,borderRadius:"xl",boxShadow:"sm",initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.3},children:(0,i.jsxs)(j.b,{children:[(0,i.jsxs)(b.s,{justify:"space-between",align:"flex-start",mb:4,gap:4,flexWrap:"wrap",children:[(0,i.jsxs)(r.z,{spacing:3,align:"flex-start",children:[(0,i.jsx)(b.s,{w:10,h:10,borderRadius:"lg",bg:Q,align:"center",justify:"center",flexShrink:0,children:(0,i.jsx)(l.I,{as:A.A,boxSize:5,color:$})}),(0,i.jsxs)(a.a,{children:[(0,i.jsx)(o.D,{size:"sm",color:N,mb:1,children:"Connect Telegram"}),(0,i.jsx)(c.E,{fontSize:"sm",color:P,maxW:"lg",children:"Link your personal Telegram to Dr. Sosh so you can run your content operation by texting. This links your own Telegram account, not your whole brand, so each member connects separately."})]})]}),O?(0,i.jsx)(y.y,{size:"sm",color:$}):X?(0,i.jsx)(f.E,{bg:_,color:B,px:3,py:1,borderRadius:"full",children:(0,i.jsxs)(r.z,{spacing:1,children:[(0,i.jsx)(l.I,{as:w.A,boxSize:3.5}),(0,i.jsx)(c.E,{children:"Connected"})]})}):(0,i.jsx)(f.E,{variant:"subtle",colorScheme:"gray",px:3,py:1,borderRadius:"full",children:"Not connected"})]}),X?(0,i.jsxs)(a.a,{children:[(0,i.jsx)(c.E,{fontSize:"sm",color:P,children:"Your Telegram is linked to Dr. Sosh. Message the Sosh AI bot anytime to check your Content Lab, draft a content formula, or launch a post."}),(0,i.jsx)(k.$,{mt:4,size:"sm",variant:"outline",leftIcon:(0,i.jsx)(l.I,{as:A.A,boxSize:4}),onClick:G,isLoading:Z.isPending,children:"Re-link this Telegram"})]}):Z.data?(0,i.jsxs)(S.T,{align:"stretch",spacing:4,children:[(0,i.jsx)(c.E,{fontSize:"sm",color:P,children:"Open the link below on the device that has Telegram, then tap Start to finish connecting. This code is single-use and expires shortly."}),(0,i.jsxs)(a.a,{bg:q,borderRadius:"lg",p:4,children:[(0,i.jsx)(c.E,{fontSize:"xs",color:P,mb:1,children:"Your Telegram link"}),(0,i.jsx)(r.z,{spacing:2,align:"center",flexWrap:"wrap",children:(0,i.jsxs)(z.N,{href:M,isExternal:!0,fontSize:"sm",fontWeight:"medium",color:$,wordBreak:"break-all",children:[M,(0,i.jsx)(l.I,{as:C.A,boxSize:3.5,ml:1,verticalAlign:"middle"})]})}),(0,i.jsxs)(r.z,{spacing:3,mt:3,children:[(0,i.jsx)(k.$,{as:z.N,href:M,isExternal:!0,size:"sm",colorScheme:"blue",leftIcon:(0,i.jsx)(l.I,{as:A.A,boxSize:4}),_hover:{textDecoration:"none"},children:"Open in Telegram"}),(0,i.jsx)(k.$,{size:"sm",variant:"ghost",leftIcon:(0,i.jsx)(l.I,{as:E.A,boxSize:4}),onClick:K,children:H?"Copied":"Copy link"})]})]}),Y?(0,i.jsxs)(c.E,{fontSize:"xs",color:P,children:["If asked for a code, use ",(0,i.jsx)(v.C,{children:Y})]}):null]}):(0,i.jsx)(k.$,{size:"sm",colorScheme:"blue",leftIcon:(0,i.jsx)(l.I,{as:A.A,boxSize:4}),onClick:G,isLoading:Z.isPending,loadingText:"Creating link",children:"Connect Telegram"})]})})}var _=s(71950);let B={linkCode:"/api/v1/messaging/whatsapp/link-code",status:"/api/v1/messaging/whatsapp/status"},Q={async createLinkCode(){let{data:e}=await D.Ay.post(B.linkCode);return e.data},async status(){let{data:e}=await D.Ay.get(B.status);return e.data}};var $=s(3520);let q=d.P.create(g.Z);function F(){var e,n,s,d,u;let h=(0,p.d)(),x=(0,I.jE)(),{organization:g}=(0,U.Z5)(),A=(0,t.dU)("white","surface.700"),D=(0,t.dU)("slate.500","slate.400"),P=(0,t.dU)("slate.700","slate.200"),R=(0,t.dU)("green.50","green.900"),L=(0,t.dU)("green.700","green.200"),N=(0,t.dU)("green.50","green.900"),B=(0,t.dU)("green.500","green.200"),F=(0,t.dU)("slate.50","surface.600"),{data:O,isLoading:Z}=(0,W.I)({queryKey:["whatsapp-status",null==g?void 0:g.id],queryFn:()=>Q.status(),enabled:!!(null==g?void 0:g.id)}),M=(0,T.n)({mutationFn:()=>Q.createLinkCode(),onError:()=>{h({title:"Could not create a link",description:"Please try again in a moment.",status:"error",duration:4e3,isClosable:!0})}}),Y=null!=(s=null==(e=M.data)?void 0:e.deepLink)?s:"",K=null!=(d=null==(n=M.data)?void 0:n.code)?d:"",{onCopy:H,hasCopied:X}=(0,m.i)(Y),G=null!=(u=null==O?void 0:O.connected)&&u,J=()=>{M.mutate(void 0,{onSuccess:()=>{x.invalidateQueries({queryKey:["whatsapp-status",null==g?void 0:g.id]})}})};return(0,i.jsx)(q,{bg:A,borderRadius:"xl",boxShadow:"sm",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3},children:(0,i.jsxs)(j.b,{children:[(0,i.jsxs)(b.s,{justify:"space-between",align:"flex-start",mb:4,gap:4,flexWrap:"wrap",children:[(0,i.jsxs)(r.z,{spacing:3,align:"flex-start",children:[(0,i.jsx)(b.s,{w:10,h:10,borderRadius:"lg",bg:N,align:"center",justify:"center",flexShrink:0,color:B,children:(0,i.jsx)($.A,{boxSize:5})}),(0,i.jsxs)(a.a,{children:[(0,i.jsx)(o.D,{size:"sm",color:P,mb:1,children:"Connect WhatsApp"}),(0,i.jsx)(c.E,{fontSize:"sm",color:D,maxW:"lg",children:"Link your personal WhatsApp to Dr. Sosh so you can run your content operation by texting. This links your own WhatsApp number, not your whole brand, so each member connects separately."})]})]}),Z?(0,i.jsx)(y.y,{size:"sm",color:B}):G?(0,i.jsx)(f.E,{bg:R,color:L,px:3,py:1,borderRadius:"full",children:(0,i.jsxs)(r.z,{spacing:1,children:[(0,i.jsx)(l.I,{as:w.A,boxSize:3.5}),(0,i.jsx)(c.E,{children:"Connected"})]})}):(0,i.jsx)(f.E,{variant:"subtle",colorScheme:"gray",px:3,py:1,borderRadius:"full",children:"Not connected"})]}),G?(0,i.jsxs)(a.a,{children:[(0,i.jsx)(c.E,{fontSize:"sm",color:D,children:"Your WhatsApp is linked to Dr. Sosh. Message the Sosh AI number anytime to check your Content Lab, draft a content formula, or launch a post."}),(0,i.jsx)(k.$,{mt:4,size:"sm",variant:"outline",leftIcon:(0,i.jsx)($.A,{boxSize:4}),onClick:J,isLoading:M.isPending,children:"Re-link this WhatsApp"})]}):M.data?(0,i.jsxs)(S.T,{align:"stretch",spacing:4,children:[(0,i.jsx)(c.E,{fontSize:"sm",color:D,children:"Open the link below on the device that has WhatsApp. We pre-fill a short message for you, so all you have to do is hit send to finish connecting. This code is single-use and expires shortly."}),(0,i.jsxs)(b.s,{gap:4,align:"flex-start",flexWrap:"wrap",children:[(0,i.jsx)(a.a,{role:"img","aria-label":"QR code to connect WhatsApp to Dr. Sosh",bg:"white",p:3,borderRadius:"lg",boxShadow:"sm",lineHeight:0,flexShrink:0,children:(0,i.jsx)(_.h,{value:Y,fgColor:"#0D9B84",size:128})}),(0,i.jsxs)(a.a,{bg:F,borderRadius:"lg",p:4,flex:"1",minW:"240px",children:[(0,i.jsx)(c.E,{fontSize:"xs",color:D,mb:1,children:"Your WhatsApp link"}),(0,i.jsx)(r.z,{spacing:2,align:"center",flexWrap:"wrap",children:(0,i.jsxs)(z.N,{href:Y,isExternal:!0,fontSize:"sm",fontWeight:"medium",color:B,wordBreak:"break-all",children:[Y,(0,i.jsx)(l.I,{as:C.A,boxSize:3.5,ml:1,verticalAlign:"middle"})]})}),(0,i.jsxs)(r.z,{spacing:3,mt:3,children:[(0,i.jsx)(k.$,{as:z.N,href:Y,isExternal:!0,size:"sm",colorScheme:"green",leftIcon:(0,i.jsx)($.A,{boxSize:4}),_hover:{textDecoration:"none"},children:"Open in WhatsApp"}),(0,i.jsx)(k.$,{size:"sm",variant:"ghost",leftIcon:(0,i.jsx)(l.I,{as:E.A,boxSize:4}),onClick:H,children:X?"Copied":"Copy link"})]})]})]}),K?(0,i.jsxs)(c.E,{fontSize:"xs",color:D,children:["If asked for a code, use ",(0,i.jsx)(v.C,{children:K})]}):null]}):(0,i.jsx)(k.$,{size:"sm",colorScheme:"green",leftIcon:(0,i.jsx)($.A,{boxSize:4}),onClick:J,isLoading:M.isPending,loadingText:"Creating link",children:"Connect WhatsApp"})]})})}var O=s(38745),Z=s(17907),M=s(91149);let Y=d.P.create(g.Z);function K(){var e;let n=(0,p.d)(),s=(0,I.jE)(),{organization:d}=(0,U.Z5)(),u=(0,t.dU)("white","surface.700"),h=(0,t.dU)("slate.500","slate.400"),x=(0,t.dU)("slate.700","slate.200"),g=(0,t.dU)("purple.50","purple.900"),m=(0,t.dU)("purple.500","purple.200"),f=["dr-sosh-nudge-preference",null==d?void 0:d.id],{data:k,isLoading:S}=(0,W.I)({queryKey:f,queryFn:()=>M.W.getNudgePreference(),enabled:!!(null==d?void 0:d.id)}),z=(0,T.n)({mutationFn:e=>M.W.setNudgePreference(e),onMutate:async e=>{await s.cancelQueries({queryKey:f});let n=s.getQueryData(f);return s.setQueryData(f,{enabled:e}),{previous:n}},onError:(e,i,a)=>{s.setQueryData(f,null==a?void 0:a.previous),n({title:"Could not save that preference",description:"Please try again in a moment.",status:"error",duration:4e3,isClosable:!0})},onSettled:()=>{s.invalidateQueries({queryKey:f})}}),v=null==(e=null==k?void 0:k.enabled)||e;return(0,i.jsx)(Y,{bg:u,borderRadius:"xl",boxShadow:"sm",mt:6,initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},children:(0,i.jsx)(j.b,{children:(0,i.jsxs)(b.s,{justify:"space-between",align:"flex-start",gap:4,flexWrap:"wrap",children:[(0,i.jsxs)(r.z,{spacing:3,align:"flex-start",children:[(0,i.jsx)(b.s,{w:10,h:10,borderRadius:"lg",bg:g,align:"center",justify:"center",flexShrink:0,children:(0,i.jsx)(l.I,{as:Z.A,boxSize:5,color:m})}),(0,i.jsxs)(a.a,{children:[(0,i.jsx)(o.D,{size:"sm",color:x,mb:1,children:"Proactive check-ins from Sosh AI"}),(0,i.jsx)(c.E,{fontSize:"sm",color:h,maxW:"lg",children:"Sosh AI proactively checks in with you, a short weekly plan and the occasional friendly nudge, so your content operation keeps moving without you opening the app. Turn this off to stop the check-ins. You can still message Dr. Sosh anytime."})]})]}),S?(0,i.jsx)(y.y,{size:"sm",color:m}):(0,i.jsx)(O.d,{colorScheme:"purple",size:"lg",isChecked:v,isDisabled:z.isPending||!(null==d?void 0:d.id),onChange:e=>z.mutate(e.target.checked),"aria-label":"Proactive check-ins from Sosh AI"})]})})})}let H=d.P.create(a.a);function X(){let e=(0,t.dU)("slate.500","slate.400");return(0,i.jsx)(h.A,{children:(0,i.jsxs)(H,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.3},children:[(0,i.jsxs)(a.a,{mb:6,children:[(0,i.jsxs)(r.z,{spacing:3,mb:1,children:[(0,i.jsx)(l.I,{as:u.A,boxSize:6,color:"brand.emphasis",strokeWidth:2}),(0,i.jsx)(o.D,{size:"lg",fontFamily:"heading",color:"text.primary",children:"Settings"})]}),(0,i.jsx)(c.E,{fontSize:"sm",color:e,pl:9,children:"Manage your organization preferences and configuration"})]}),(0,i.jsx)(x.A,{activeTab:"dr-sosh"}),(0,i.jsx)(N,{}),(0,i.jsx)(F,{}),(0,i.jsx)(K,{})]})})}},91708:(e,n,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/dr-sosh",function(){return s(68392)}])}},e=>{e.O(0,[2710,3302,5533,5768,2900,6152,9161,6418,7914,5057,6109,1594,1250,4089,8892,8977,2105,636,6593,8792],()=>e(e.s=91708)),_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.