PageSourceSearch

https://www.gemphere.com/assets/AdminWeeklyDigest-BcRGb1HR.js

js gemphere.com collected 2026-09-24 14:43:40 UTC 22,870 bytes, 6 lines download raw bytes

1import{bm as xe,u as he,z as pe,r as o,cl as ge,j as e,P as be,b_ as F,bT as A,cm as fe,bW as P,bU as _,cn as je,co as Z,bS as ye,cp as ve,cq as we,aD as Ne}from"./index-BVpny5eT.js";import{H as ee,C as G,c as D}from"./card-DhoUrTwb.js";import{T as j}from"./textarea-BO5nTpve.js";import{T as ke,a as Ce,b as te,c as se}from"./tabs-BoQ5tA-L.js";import{P as Y}from"./plus-CsqKpaEf.js";import"./index-u7baw35J.js";import"./index-CryiGmSX.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Se=xe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function w(){return{query:"",selectedGem:null,selectedContact:null,manualName:"",manualEmail:"",manualTitle:""}}function q(r){if(r.selectedGem)return{userId:r.selectedGem.id,name:r.selectedGem.fullname,email:r.selectedGem.email,title:[r.selectedGem.title,r.selectedGem.company].filter(Boolean).join(" · ")};if(r.selectedContact)return{userId:r.selectedContact.connectedUserId||0,name:r.selectedContact.displayName,email:r.selectedContact.email,title:[r.selectedContact.title,r.selectedContact.company].filter(Boolean).join(" · ")};const l=r.manualName.trim(),m=r.manualEmail.trim();return!m&&!l?null:{userId:0,name:l,email:m,title:r.manualTitle.trim()||void 0}}function Te(r){return r.selectedGem?`${r.selectedGem.fullname} · ${r.selectedGem.email}`:r.selectedContact?`${r.selectedContact.displayName||r.selectedContact.email} · ${r.selectedContact.email}`:r.manualName||r.manualEmail?`${r.manualName||"(no name)"} · ${r.manualEmail||"(no email)"}`:"—"}let de=0;function ae(r){return de+=1,`${r}-${Date.now()}-${de}`}function Ie(r){if(!r)return null;const l=Math.max(0,Math.floor(r.meetings12mo??0)),m=Math.max(0,Math.floor(r.emailsSent90d??0)),R=Math.max(0,Math.floor(r.emailsReceived90d??0)),N=r.lastMeetingAt??null,d=r.lastEmailAt??r.lastSignalAt??null;return!l&&!m&&!R&&!N&&!d?null:{meetings12mo:l,emailsSent90d:m,emailsReceived90d:R,lastMeetingAt:N,lastEmailAt:d}}function re(r){const l=Ie(r);return l?Ne(l).tier:null}function H({label:r,value:l,onChange:m,token:R,signalsViewerUserId:N,showSignalBadges:d=!0,emptyHint:p,scope:k="pool",recipientUserId:C,scopeNotReadyHint:B}){var W,L;const[y,g]=o.useState({gemUsers:[],contacts:[]}),[S,b]=o.useState(!1),[M,u]=o.useState(!1),[E,U]=o.useState(null),v=k==="pool"||!!C&&C>0;o.useEffect(()=>{if(!v){g({gemUsers:[],contacts:[]}),b(!1),U(null);return}let n=!1;const T=setTimeout(async()=>{b(!0),U(null);try{const h=await je(R,l.query.trim(),N??null,k,C??null);if(n)return;g(h)}catch(h){if(n)return;g({gemUsers:[],contacts:[]}),U(h instanceof Error?h.message:String(h))}finally{n||b(!1)}},200);return()=>{n=!0,clearTimeout(T)}},[l.query,R,N,k,C,v]);const X=!!(l.selectedGem||l.selectedContact),$=!!(l.manualName||l.manualEmail),J=(y.gemUsers||[]).length>0||(y.contacts||[]).length>0;return e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:r}),X?e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border bg-background/60 px-3 py-2 text-sm",children:[e.jsxs("span",{className:"truncate flex items-center gap-2",children:[e.jsx("span",{className:"truncate",children:Te(l)}),d&&e.jsx(Z,{tier:re(((W=l.selectedGem)==null?void 0:W.signals)??((L=l.selectedContact)==null?void 0:L.signals)??null)})]}),e.jsx("button",{type:"button",onClick:()=>m(w()),className:"text-muted-foreground hover:text-foreground","aria-label":"Clear",children:e.jsx(_,{className:"w-4 h-4"})})]}):e.jsxs("div",{className:"space-y-2",children:[k==="recipient_network"&&!v&&B&&e.jsx("div",{className:"rounded-md border border-sky-200 bg-sky-50 px-2.5 py-1.5 text-[11px] text-sky-800 dark:border-sky-900/50 dark:bg-sky-950/40 dark:text-sky-200",children:B}),p&&d&&v&&e.jsx("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-2.5 py-1.5 text-[11px] text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/40 dark:text-amber-200",children:p}),e.jsx(P,{placeholder:k==="recipient_network"?"Search recipient's network…":"Search name or email…",value:l.query,onChange:n=>{m({...l,query:n.target.value}),u(!0)},onFocus:()=>u(!0),onBlur:()=>{setTimeout(()=>u(!1),150)},disabled:!v}),M&&e.jsxs("div",{className:"max-h-64 overflow-y-auto rounded-lg border border-border bg-background shadow-sm divide-y divide-border",children:[S&&e.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:"Searching…"}),E&&!S&&e.jsx("div",{className:"px-3 py-2 text-xs text-destructive",children:E}),!S&&!E&&!J&&e.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:k==="recipient_network"?l.query.trim()?`No one in the recipient's network matches "${l.query.trim()}". Try the "Add by name + email" option below.`:"The recipient has no gem connections or imported contacts yet — use the manual entry below.":l.query.trim()?`No matches for "${l.query.trim()}". Try the "Add by name + email" option below.`:"Start typing to search the people database."}),y.gemUsers.map(n=>{const T=re(n.signals);return e.jsxs("button",{type:"button",onMouseDown:h=>h.preventDefault(),onClick:()=>{m({...w(),selectedGem:n,query:n.fullname}),u(!1)},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-sm hover:bg-accent/40",children:[e.jsx(ye,{className:"mt-0.5 w-3.5 h-3.5 text-emerald-500 shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"font-medium truncate flex items-center gap-2",children:[e.jsx("span",{className:"truncate",children:n.fullname||n.email}),d&&e.jsx(Z,{tier:T})]}),e.jsxs("div",{className:"text-xs text-muted-foreground truncate",children:[n.email,n.title&&` · ${n.title}`,n.company&&` · ${n.company}`]})]})]},`gem-${n.id}`)}),y.contacts.map(n=>{const T=re(n.signals);return e.jsxs("button",{type:"button",onMouseDown:h=>h.preventDefault(),onClick:()=>{m({...w(),selectedContact:n,query:n.displayName||n.email}),u(!1)},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-sm hover:bg-accent/40",children:[e.jsx(Y,{className:"mt-0.5 w-3.5 h-3.5 text-amber-500 shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"font-medium truncate flex items-center gap-2",children:[e.jsx("span",{className:"truncate",children:n.displayName||n.email}),d&&e.jsx(Z,{tier:T})]}),e.jsxs("div",{className:"text-xs text-muted-foreground truncate",children:[n.email,n.title&&` · ${n.title}`,n.company&&` · ${n.company}`,n.connectedUserId?" · on Gemphere":" · contact only"]})]})]},`c-${n.contactId}`)})]}),e.jsxs("details",{className:"rounded-lg border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",open:$,children:[e.jsxs("summary",{className:"cursor-pointer flex items-center justify-between gap-2",children:[e.jsx("span",{children:"Or add by name + email"}),$&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),m({...l,manualName:"",manualEmail:"",manualTitle:""})},className:"text-muted-foreground hover:text-foreground","aria-label":"Clear manual entry",children:e.jsx(_,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",children:[e.jsx(P,{placeholder:"Full name",value:l.manualName,onChange:n=>m({...l,manualName:n.target.value})}),e.jsx(P,{placeholder:"Email",value:l.manualEmail,onChange:n=>m({...l,manualEmail:n.target.value})}),e.jsx(P,{className:"sm:col-span-2",placeholder:"Title / company (optional)",value:l.manualTitle,onChange:n=>m({...l,manualTitle:n.target.value})})]})]})]})]})}function De(){const{user:r,isReady:l,isAdmin:m,adminReady:R}=he(),N=pe(),d=(r==null?void 0:r.accessToken)||"",[p,k]=o.useState(w()),[C,B]=o.use
6State(()=>{const t=new Date,c=t.getMonth()+1,i=t.getDate();return`${c} / ${String(i).padStart(2,"0")}-${String(i+4).padStart(2,"0")}`}),[y,g]=o.useState([]),[S,b]=o.useState([]),[M,u]=o.useState([]),[E,U]=o.useState(""),[v,X]=o.useState(""),[$,J]=o.useState(""),[W,L]=o.useState(""),[n,T]=o.useState(!1),[h,ne]=o.useState(!1),[ie,O]=o.useState(null),[le,K]=o.useState(null);o.useEffect(()=>{l&&(r||N("/",{replace:!0}))},[l,r,N]);const f=o.useMemo(()=>q(p),[p]),x=o.useMemo(()=>{var c,i;if((c=p.selectedGem)!=null&&c.id)return p.selectedGem.id;const t=(i=p.selectedContact)==null?void 0:i.connectedUserId;return t&&t>0?t:null},[p.selectedGem,p.selectedContact]),[me,z]=o.useState(null);o.useEffect(()=>{if(!x||!d){z(null);return}let t=!1;return z(null),ge(d,x,1).then(c=>{t||z(Object.keys(c).length>0)}).catch(()=>{t||z(null)}),()=>{t=!0}},[x,d]);const V=x&&me===!1?"This recipient hasn't connected Nylas yet — relationship-strength badges (Very Strong / Strong / etc.) won't appear on candidates until they do.":null,Q=x?null:"Pick a Gemphere-user recipient above first — this picker is scoped to that user's connections + imported contacts.",oe=o.useCallback(()=>{if(!f||!f.email)throw new Error("Pick a recipient (with an email).");const t=[];for(const a of y){const s=q(a.target);if(!s)continue;const I=a.matchPercent.trim()?Number(a.matchPercent.trim()):null;t.push({target:s,rationale:a.rationale.trim(),blurb:a.blurb.trim(),matchPercent:Number.isFinite(I)?I:null})}const c=[];for(const a of S){const s=q(a.target),I=q(a.connector);!s||!I||c.push({target:s,connector:I,blurb:a.blurb.trim(),note:a.note.trim()})}const i=[];for(const a of M){const s=q(a.target),I=q(a.asker);!s||!I||i.push({askerForIntro:I,target:s,signal:a.signal.trim(),context:a.context.trim(),followup:a.followup.trim(),blurb:a.blurb.trim()})}return{recipient:f,weekRange:C.trim(),meetRationale:E.trim(),askRationale:v.trim(),helpRationale:$.trim(),meetItems:t,askItems:c,helpItems:i}},[f,C,y,S,M,E,v,$]);async function ce(){O(null),K(null),T(!0);try{const t=oe(),c=await ve(d,t);L(c.html||"")}catch(t){O(t instanceof Error?t.message:String(t)),L("")}finally{T(!1)}}async function ue(){O(null),K(null),ne(!0);try{const t=oe(),c=await we(d,t);K(`Sent to ${c.sentTo} — ${c.counts.meet} meet · ${c.counts.ask} ask · ${c.counts.help} help.`)}catch(t){O(t instanceof Error?t.message:String(t))}finally{ne(!1)}}return l?R?m?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(ee,{}),e.jsxs("main",{className:"pt-24 pb-16 px-4 sm:px-6 max-w-6xl mx-auto",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-6 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold tracking-tight",children:"Weekly digest composer"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:`Craft the Monday "Your network this week — N people, 1 tap each" email. Each CTA in the sent email mints a one-time token; clicks flow through Make/Request intro and show up in the recipient's Intros tab.`}),e.jsxs("ul",{className:"text-xs text-muted-foreground mt-2 space-y-0.5 list-disc pl-5",children:[e.jsxs("li",{children:[e.jsx("span",{className:"font-medium",children:"People to meet"})," — target is drawn from the entire pool."]}
6),e.jsxs("li",{children:[e.jsx("span",{className:"font-medium",children:"Intros to ask"})," — target is drawn from the entire pool; the Via (connector) comes from the recipient's network."]}),e.jsxs("li",{children:[e.jsx("span",{className:"font-medium",children:"Ways to help"})," — both the asker and the target come from the recipient's network."]})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(A,{variant:"outline",onClick:ce,disabled:n||!(f!=null&&f.email),children:[n?e.jsx(F,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Se,{className:"w-4 h-4 mr-2"}),"Preview"]}),e.jsxs(A,{onClick:ue,disabled:h||!(f!=null&&f.email),children:[h?e.jsx(F,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(fe,{className:"w-4 h-4 mr-2"}),"Send digest"]})]})]}),ie&&e.jsx("div",{className:"mb-4 rounded-lg border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:ie}),le&&e.jsx("div",{className:"mb-4 rounded-lg border border-emerald-500/40 bg-emerald-500/10 px-4 py-3 text-sm text-emerald-700 dark:text-emerald-400",children:le}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(G,{className:"border-border/60 bg-card/80",children:e.jsxs(D,{className:"p-5 space-y-4",children:[e.jsx("div",{className:"font-semibold",children:"Recipient"}),e.jsx(H,{label:"Who is this digest going to?",value:p,onChange:k,token:d,showSignalBadges:!1}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:'Week range (e.g. "5 / 06-10")'}),e.jsx(P,{value:C,onChange:t=>B(t.target.value)})]})]})}),e.jsxs(ke,{defaultValue:"meet",children:[e.jsxs(Ce,{className:"bg-muted/60",children:[e.jsxs(te,{value:"meet",children:["People to meet (",y.length,")"]}),e.jsxs(te,{value:"ask",children:["Intros to ask (",S.length,")"]}),e.jsxs(te,{value:"help",children:["Ways to help (",M.length,")"]})]}),e.jsx(se,{value:"meet",className:"mt-4 space-y-4",children:e.jsx(G,{className:"border-border/60 bg-card/80",children:e.jsxs(D,{className:"p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Section rationale (optional)"}),e.jsx(j,{rows:2,value:E,onChange:t=>U(t.target.value),placeholder:"Three founders we surfaced from your priorities this quarter — early-stage operators, US/EU."})]}),y.map((t,c)=>e.jsxs("div",{className:"rounded-xl border border-border p-4 bg-background/40 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:["Card ",c+1]}),e.jsx("button",{type:"button",onClick:()=>g(i=>i.filter(a=>a.id!==t.id)),className:"text-muted-foreground hover:text-destructive",children:e.jsx(_,{className:"w-4 h-4"})})]}),e.jsx(H,{label:"Person to meet (target — entire pool)",value:t.target,onChange:i=>g(a=>a.map(s=>s.id===t.id?{...s,target:i}:s)),token:d,signalsViewerUserId:x,emptyHint:V,scope:"pool"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Rationale"}),e.jsx(j,{rows:2,value:t.rationale,onChange:i=>g(a=>a.map(s=>s.id===t.id?{...s,rationale:i.target.value}:s)),placeholder:"Scaled Linear's PLG motion from 40-10M ARR. You said you'd been trying to have this exact conversation for six months — mutual via Marcus Lee."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Blurb (forwarded if recipient says yes)"}),e.jsx(j,{rows:3,value:t.blurb,onChange:i=>g(a=>a.map(s=>s.id===t.id?{...s,blurb:i.target.value}:s)),placeholder:"The intro paragraph the connector will share when both sides say yes."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Match % (optional)"}),e.jsx(P,{type:"number",min:0,max:100,value:t.matchPercent,onChange:i=>g(a=>a.map(s=>s.id===t.id?{...s,matchPercent:i.target.value}:s)),placeholder:"94"})]})]},t.id)),e.jsxs(A,{variant:"outline",onClick:()=>g(t=>[...t,{id:ae("meet"),target:w(),rationale:"",blurb:"",matchPercent:""}]),children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),"Add a person to meet"]})]})})}),e.jsx(se,{value:"ask",className:"mt-4 space-y-4",children:e.jsx(G,{className:"border-border/60 bg-card/80",children:e.jsxs(D,{className:"p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Section rationale (optional)"}
6),e.jsx(j,{rows:2,value:v,onChange:t=>X(t.target.value),placeholder:"Your contacts know these folks."})]}),S.map((t,c)=>e.jsxs("div",{className:"rounded-xl border border-border p-4 bg-background/40 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:["Card ",c+1]}),e.jsx("button",{type:"button",onClick:()=>b(i=>i.filter(a=>a.id!==t.id)),className:"text-muted-foreground hover:text-destructive",children:e.jsx(_,{className:"w-4 h-4"})})]}),e.jsx(H,{label:"Target — the person we want an intro to (entire pool)",value:t.target,onChange:i=>b(a=>a.map(s=>s.id===t.id?{...s,target:i}:s)),token:d,signalsViewerUserId:x,emptyHint:V,scope:"pool"}),e.jsx(H,{label:"Via — connector from the recipient's network",value:t.connector,onChange:i=>b(a=>a.map(s=>s.id===t.id?{...s,connector:i}:s)),token:d,signalsViewerUserId:x,emptyHint:V,scope:"recipient_network",recipientUserId:x,scopeNotReadyHint:Q}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Note for the connector"}),e.jsx(j,{rows:2,value:t.note,onChange:i=>b(a=>a.map(s=>s.id===t.id?{...s,note:i.target.value}:s)),placeholder:"Why this intro is timely / what's at stake."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Blurb the connector will forward"}),e.jsx(j,{rows:3,value:t.blurb,onChange:i=>b(a=>a.map(s=>s.id===t.id?{...s,blurb:i.target.value}:s))})]})]},t.id)),e.jsxs(A,{variant:"outline",onClick:()=>b(t=>[...t,{id:ae("ask"),target:w(),connector:w(),blurb:"",note:""}]),children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),"Add an intro to ask"]})]})})}),e.jsx(se,{value:"help",className:"mt-4 space-y-4",children:e.jsx(G,{className:"border-border/60 bg-card/80",children:e.jsxs(D,{className:"p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Section rationale (optional)"}),e.jsx(j,{rows:2,value:$,onChange:t=>J(t.target.value),placeholder:"Three openings this week where one well-timed intro from you would actually move the needle."})]}),M.map((t,c)=>e.jsxs("div",{className:"rounded-xl border border-border p-4 bg-background/40 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:["Card ",c+1]}),e.jsx("button",{type:"button",onClick:()=>u(i=>i.filter(a=>a.id!==t.id)),className:"text-muted-foreground hover:text-destructive",children:e.jsx(_,{className:"w-4 h-4"})})]}),e.jsx(H,{label:"Asker — person who needs the intro (from recipient's network)",value:t.asker,onChange:i=>u(a=>a.map(s=>s.id===t.id?{...s,asker:i}:s)),token:d,signalsViewerUserId:x,emptyHint:V,scope:"recipient_network",recipientUserId:x,scopeNotReadyHint:Q}),e.jsx(H,{label:"Target — person they want to meet (from recipient's network)",value:t.target,onChange:i=>u(a=>a.map(s=>s.id===t.id?{...s,target:i}:s)),token:d,signalsViewerUserId:x,emptyHint:V,scope:"recipient_network",recipientUserId:x,scopeNotReadyHint:Q}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:'Signal label (e.g. "SIGNAL", "HIRING")'}),e.jsx(P,{value:t.signal,onChange:i=>u(a=>a.map(s=>s.id===t.id?{...s,signal:i.target.value}:s))})]})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Context (the trigger)"}),e.jsx(j,{rows:2,value:t.context,onChange:i=>u(a=>a.map(s=>s.id===t.id?{...s,context:i.target.value}:s)),placeholder:"Maya Okafor just posted about raising her seed round."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Follow-up (why this user is the right intro)"}),e.jsx(j,{rows:2,value:t.followup,onChange:i=>u(a=>a.map(s=>s.id===t.id?{...s,followup:i.target.value}:s)),placeholder:"You know Hannah Liu at Initialized — she invests in Maya's space. A warm intro could be huge."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-1",children:"Blurb (what gets forwarded once both 
6sides accept)"}),e.jsx(j,{rows:3,value:t.blurb,onChange:i=>u(a=>a.map(s=>s.id===t.id?{...s,blurb:i.target.value}:s))})]})]},t.id)),e.jsxs(A,{variant:"outline",onClick:()=>u(t=>[...t,{id:ae("help"),asker:w(),target:w(),signal:"",context:"",followup:"",blurb:""}]),children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),"Add a way to help"]})]})})})]})]}),e.jsx("div",{children:e.jsx(G,{className:"border-border/60 bg-card/80 sticky top-24",children:e.jsxs(D,{className:"p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:"font-semibold",children:"Live preview"}),e.jsx(A,{variant:"ghost",size:"sm",onClick:ce,disabled:n,children:n?e.jsx(F,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(F,{className:"w-3.5 h-3.5"})})]}),W?e.jsx("iframe",{title:"Digest preview",srcDoc:W,className:"w-full h-[700px] rounded-lg border border-border bg-white"}):e.jsx("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-sm text-muted-foreground",children:"Add a recipient + at least one card, then click Preview to render the email."})]})})})]})]})]}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(ee,{}),e.jsx("main",{className:"pt-24 px-4 max-w-2xl mx-auto",children:e.jsx(G,{className:"border-destructive/40",children:e.jsxs(D,{className:"p-6",children:[e.jsx("h1",{className:"text-lg font-semibold mb-2",children:"Admin only"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["The weekly digest composer is restricted to the Gemphere admin accounts. If you should have access, sign in with one of:"," ",e.jsx("code",{children:"[email protected]"}),", ",e.jsx("code",{children:"[email protected]"}),", or"," ",e.jsx("code",{children:"[email protected]"}),"."]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-3",children:["Signed-in email: ",e.jsx("code",{children:(r==null?void 0:r.email)||"(unknown)"})]})]})})})]}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(ee,{}),e.jsx("main",{className:"pt-24 px-4 max-w-2xl mx-auto",children:e.jsxs("div",{className:"flex items-center justify-center text-muted-foreground gap-2 py-12",children:[e.jsx(F,{className:"w-4 h-4 animate-spin"}),"Checking admin access…"]})})]}):e.jsx("div",{className:"gp-page-loading-screen",children:e.jsx(be,{variant:"page",message:"Signing you in…"})})}export{De as default};

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.