PageSourceSearch

https://n71.ai/assets/TeamInvite-IAoruXD4.js

js n71.ai collected 2026-10-05 12:18:13 UTC 26,287 bytes, 2 lines download raw bytes

1import{j as e}from"./ui-vendor-CBbdTawN.js";import{f as r,i as t,r as o}from"./react-vendor-DQSFk_7t.js";import{u as s,s as n,m as a,A as l,c as i,a as d}from"./index-DNEY-jN9.js";import"./supabase-NZ2Vt4Mp.js";import"./chart-vendor-Dq0yAQdW.js";import"./form-vendor-CzIjS8Un.js";function c(){const{workspaceId:c,code:u}=r(),m=t(),{user:x}=s(),g=!!x,[f,h]=o.useState("intro"),[p,b]=o.useState(null),[v,j]=o.useState(!0),[N,y]=o.useState(!1),[w,k]=o.useState(null),[C,_]=o.useState(["google"]),[z,M]=o.useState(null),[F,S]=o.useState([]),[A,H]=o.useState([]),[B,I]=o.useState(!1),[V,E]=o.useState(!1),[G,R]=o.useState({role_description:"",team_name:"",primary_focus:""});o.useEffect(()=>{T()},[c,u]),o.useEffect(()=>{(async()=>{var e,r,t;if(g&&x&&p&&!B&&!V){E(!0);try{if(u){console.log("[TeamInvite] Auto-accepting invite for authenticated user...");const o=x.email??null,s=(null==(e=x.user_metadata)?void 0:e.full_name)||(null==(r=x.user_metadata)?void 0:r.name)||(null==o?void 0:o.split("@")[0])||"User",{error:a}=await n.functions.invoke("invite-accept",{body:{code:u,workspaceId:p.id,userId:x.id,email:o,displayName:s}});a?(null==(t=a.message)?void 0:t.includes("already a member"))||console.error("[TeamInvite] Failed to auto-accept invite:",a):d.success("You've been added to the workspace!")}console.log("[TeamInvite] Redirecting to /n71/integrations"),m("/n71/integrations?from=invite",{replace:!0})}catch(o){console.error("[TeamInvite] Error auto-accepting invite:",o),m("/n71/integrations?from=invite",{replace:!0})}finally{I(!0),E(!1)}}})()},[g,x,p,u,B,V,m]);const T=async()=>{if(!c)return k("Invalid invite link"),void j(!1);try{const{data:e,error:r}=await n.functions.invoke("validate-team-invite",{body:{workspace_id:c,code:u||void 0}});if(r||!(null==e?void 0:e.valid))return console.error("Validation failed:",r,e),k((null==e?void 0:e.error)||"Workspace not found"),void j(!1);if(u&&!e.invite_valid)return k("This invite link has expired or is no longer valid"),void j(!1);b({id:e.workspace.id,name:e.workspace.name,leader_name:e.workspace.leader_name||void 0}),e.org_integrations&&e.org_integrations.length>0&&H(e.org_integrations),j(!1)}catch(e){console.error("Error validating invite:",e),k("Failed to validate invite"),j(!1)}},L=()=>{m(`/auth?mode=signup&redirect=${encodeURIComponent(u?`/n71/team-invite/${c}/${u}`:`/n71/team-invite/${c}`)}`)},D=async e=>{var r,t;if(p&&x)if(V)d.info("Setting up your account, please wait...");else{y(!0),M(e);try{let o=await n.from("workspace_members").select("person_id").eq("workspace_id",p.id).eq("user_id",x.id).maybeSingle().then(e=>e.data);if(!(null==o?void 0:o.person_id)&&u){console.log("[TeamInvite] User not a member, attempting to accept invite...");const e=x.email??null,s=(null==(r=x.user_metadata)?void 0:r.full_name)||(null==(t=x.user_metadata)?void 0:t.name)||(null==e?void 0:e.split("@")[0])||"User",{error:a}=await n.functions.invoke("invite-accept",{body:{code:u,workspaceId:p.id,userId:x.id,email:e,displayName:s}});a||(o=await n.from("workspace_members").select("person_id").eq("workspace_id",p.id).eq("user_id",x.id).maybeSingle().then(e=>e.data))}if(!(null==o?void 0:o.person_id))return d.error("Unable to add you to this workspace. The invite may have expired."),y(!1),void M(null);0===F.length&&(G.role_description||G.team_name||G.primary_focus)&&await n.from("person_context").upsert({person_id:o.person_id,workspace_id:p.id,role_description:G.role_description||null,team_name:G.team_name||null,primary_focus:G.primary_focus||null,updated_at:(new Date).toISOString()},{onConflict:"person_id,workspace_id"});const s="google"===e?["calendar","gmail"]:void 0,{data:a,error:l}=await n.functions.invoke("invite-team-oauth",{body:{workspace_id:p.id,person_id:o.person_id,provider:e,scopes:s}});if(l)throw l;if(null==a?void 0:a.auth_url)window.location.href=a.auth_url;else{if("already_connected"!==(null==a?void 0:a.status))throw new Error("Failed to generate authorization URL");{S(r=>[...r,e]);const r="google"===e?"Google":"github"===e?"GitHub":"slack"===e?"Slack":"microsoft"===e?"Microsoft":"Notion";d.success(`${r} already connected!`),y(!1),M(null),C.every(r=>r===e||F.includes(r))&&h("success")}}}catch(o){console.error("Error authorizing:",o),d.error("Failed to start authorization"),y(!1),M(null)}}else d.error("Please sign in to continue")};return v?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx(a.div,{className:"w-8 h-8 border-2 border-foreground
1/10 border-t-foreground/40 rounded-full",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}})}):w?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-6",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-red-500/10 flex items-center justify-center",children:e.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500"})}),e.jsx("h1",{className:"text-xl font-semibold text-foreground mb-2",children:"Invalid Invite"}),e.jsx("p",{className:"text-foreground/60 mb-6",children:w}),e.jsx("button",{onClick:()=>m("/n71"),className:"px-6 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground/90 transition-colors",children:"Go to N71"})]})}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("div",{className:"fixed inset-0 bg-gradient-to-b from-foreground/[0.02] to-transparent pointer-events-none"}),e.jsx("div",{className:"relative min-h-screen flex flex-col items-center justify-center p-6",children:e.jsxs(a.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"w-full max-w-lg",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("p",{className:"text-sm font-medium text-foreground/40 mb-3",children:"N71"}),p&&e.jsx("p",{className:"text-foreground/60 mb-1",children:p.leader_name?`${p.leader_name} invited you to connect with`:"You're invited to connect with"}),e.jsx("h1",{className:"text-xl font-semibold text-foreground",children:(null==p?void 0:p.name)||"Team"})]}),e.jsx("div",{className:"bg-card border border-border rounded-2xl shadow-xl overflow-hidden",children:e.jsxs(l,{mode:"wait",children:["intro"===f&&e.jsxs(a.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-8",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground mb-4",children:"Help N71 understand your work"}),e.jsx("p",{className:"text-foreground/60 text-sm mb-6",children:"By sharing read-only access to your work tools, N71 can provide better insights about team activity and help your team work more effectively."}),e.jsxs("div",{className:"space-y-3 mb-8",children:[e.jsx("p",{className:"text-xs text-foreground/40 uppercase tracking-wider",children:"Available integrations"}
1),e.jsxs("div",{className:"p-4 rounded-lg bg-foreground/[0.03] border border-foreground/10",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-white flex items-center justify-center shadow-sm",children:e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Google Workspace"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 ml-11",children:[e.jsx("span",{className:"text-xs px-2 py-0.5 bg-foreground
1/5 rounded text-foreground/60",children:"Calendar"}),e.jsx("span",{className:"text-xs px-2 py-0.5 bg-foreground/5 rounded text-foreground/60",children:"Email"})]})]}),e.jsxs("div",{className:"p-4 rounded-lg bg-foreground/[0.03] border border-foreground/10",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-white flex items-center justify-center shadow-sm",children:e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.98-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466l1.823 1.447zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.84-.046.933-.56.933-1.167V6.354c0-.606-.233-.933-.746-.886l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.746 0-.933-.234-1.495-.933l-4.577-7.186v6.952l1.448.327s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.14c-.093-.514.28-.886.747-.933l3.222-.186z"})})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Notion"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 ml-11",children:[e.jsx("span",{className:"text-xs px-2 py-0.5 bg-foreground
1/5 rounded text-foreground/60",children:"Pages"}),e.jsx("span",{className:"text-xs px-2 py-0.5 bg-foreground/5 rounded text-foreground/60",children:"Databases"})]})]}),e.jsxs("div",{className:"p-4 rounded-lg bg-foreground/[0.03] border border-foreground/10",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#24292e] flex items-center justify-center shadow-sm",children:e.jsx("svg",{className:"w-5 h-5 text-white",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:"GitHub"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 ml-11",children:[e.jsx("span",{className:"text-xs px-2 py-0.5 bg-foreground
1/5 rounded text-foreground/60",children:"Commits"}),e.jsx("span",{className:"text-xs px-2 py-0.5 bg-foreground/5 rounded text-foreground/60",children:"Pull Requests"}),e.jsx("span",{className:"text-xs px-2 py-0.5 bg-foreground/5 rounded text-foreground/60",children:"Code Reviews"})]})]})]}),e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-foreground/[0.02] border border-foreground/10 mb-6",children:[e.jsx("span",{className:"w-1.5 h-1.5 mt-1.5 rounded-full bg-foreground/40 flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-foreground/60",children:[e.jsx("span",{className:"font-medium",children:"Privacy:"})," N71 can only read your data. It cannot send emails, create events, or modify anything on your behalf. You can revoke access at any time."]})]}),e.jsx("button",{onClick:g?()=>m("/n71/integrations?from=invite",{replace:!0}):L,className:"w-full px-6 py-3 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground/90 transition-colors",children:g?"Continue to integrations":"Sign up to continue"})]},"intro"),"context"===f&&e.jsxs(a.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-8",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"Tell us about yourself"}),e.jsx("p",{className:"text-foreground/60 text-sm mb-6",children:"This helps N71 understand your role and provide more relevant insights. All fields are optional."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground block mb-1.5",children:"What's your role?"}),e.jsx("input",{type:"text",value:G.role_description,onChange:e=>R({...G,role_description:e.target.value}),placeholder:"e.g., Product Designer, Backend Engineer, Sales Lead",className:"w-full px-4 py-2.5 bg-background border border-border rounded-lg text-foreground placeholder:text-foreground/30 focus:outline-none focus:border-foreground
1/30 transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground block mb-1.5",children:"Which team are you on?"}),e.jsx("input",{type:"text",value:G.team_name,onChange:e=>R({...G,team_name:e.target.value}),placeholder:"e.g., Platform, Growth, Design",className:"w-full px-4 py-2.5 bg-background border border-border rounded-lg text-foreground placeholder:text-foreground/30 focus:outline-none focus:border-foreground/30 transition-colors"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-foreground block mb-1.5",children:"What are you primarily working on?"}),e.jsx("textarea",{value:G.primary_focus,onChange:e=>R({...G,primary_focus:e.target.value}),placeholder:"e.g., Launching the new mobile app, Q4 sales targets",rows:2,className:"w-full px-4 py-2.5 bg-background border border-border rounded-lg text-foreground placeholder:text-foreground/30 focus:outline-none focus:border-foreground/30 resize-none transition-colors"})]})]}),e.jsxs("div",{className:"flex gap-3 mt-8",children:[e.jsx("button",{onClick:()=>
1h("intro"),className:"flex-1 px-6 py-3 bg-foreground/5 text-foreground rounded-lg text-sm font-medium hover:bg-foreground/10 transition-colors",children:"Back"}),e.jsx("button",{onClick:()=>h("authorize"),className:"flex-1 px-6 py-3 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground/90 transition-colors",children:"Continue"})]})]},"context"),"authorize"===f&&e.jsxs(a.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-8",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"Connect your accounts"}),e.jsx("p",{className:"text-foreground/60 text-sm mb-6",children:"Choose which tools to share with N71. You can connect one or both."}),!g&&e.jsxs("div",{className:"p-4 rounded-lg bg-amber-500/10 border border-amber-500/20 mb-6",children:[e.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-300 mb-3",children:"You'll need to create an account to continue."}),e.jsx("button",{onClick:L,className:"w-full px-4 py-2 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
1/90 transition-colors",children:"Sign Up to Continue"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("button",{onClick:()=>D("google"),disabled:N||F.includes("google"),className:i("w-full px-6 py-4 rounded-lg text-sm font-medium transition-colors flex items-center gap-3",F.includes("google")?"bg-emerald-500/10 border border-emerald-500/30":"bg-foreground text-background hover:bg-foreground/90 disabled:opacity-50"),children:N&&"google"===z?e.jsxs(e.Fragment,{children:[e.jsx(a.span,{className:"w-5 h-5 border-2 border-current/30 border-t-current rounded-full",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),"Redirecting to Google..."]}):F.includes("google")?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-emerald-700 dark:text-emerald-300",children:"Google Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-6 h-6 bg-white rounded flex items-center justify-center",children:e.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}),e.jsxs("div",{className:"text-left flex-1",children:[e.jsx("div",{children:"Connect Google"}),e.jsx("div",{className:"text-xs opacity-70 font-normal",children:"Calendar & Email"})]})]})}),!A.includes("slack")&&e.jsx("button",{onClick:()=>D("slack"),disabled:N||F.includes("slack"),className:i("w-full px-6 py-4 rounded-lg text-sm font-medium transition-colors flex items-center gap-3",F.includes("slack")?"bg-emerald-500/10 border border-emerald-500/30":"bg-foreground
1/10 text-foreground hover:bg-foreground/20 disabled:opacity-50 border border-foreground/20"),children:N&&"slack"===z?e.jsxs(e.Fragment,{children:[e.jsx(a.span,{className:"w-5 h-5 border-2 border-current/30 border-t-current rounded-full",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),"Redirecting to Slack..."]}):F.includes("slack")?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-emerald-700 dark:text-emerald-300",children:"Slack Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-6 h-6 bg-[#4A154B] rounded flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4 text-white",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}),e.jsxs("div",{className:"text-left flex-1",children:[e.jsx("div",{children:"Connect Slack"}),e.jsx("div",{className:"text-xs opacity-70 font-normal",children:"Messages & Channels"})]})]})}),!A.includes("microsoft")&&e.jsx("button",{onClick:()=>D("microsoft"),disabled:N||F.includes("microsoft"),className:i("w-full px-6 py-4 rounded-lg text-sm font-medium transition-colors flex items-center gap-3",F.includes("microsoft")?"bg-emerald-500/10 border border-emerald-500/30":"bg-foreground
1/10 text-foreground hover:bg-foreground/20 disabled:opacity-50 border border-foreground/20"),children:N&&"microsoft"===z?e.jsxs(e.Fragment,{children:[e.jsx(a.span,{className:"w-5 h-5 border-2 border-current/30 border-t-current rounded-full",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),"Redirecting to Microsoft..."]}):F.includes("microsoft")?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-emerald-700 dark:text-emerald-300",children:"Microsoft Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-6 h-6 bg-[#00A4EF] rounded flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4 text-white",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zm12.6 0H12.6V0H24v11.4z"})})}),e.jsxs("div",{className:"text-left flex-1",children:[e.jsx("div",{children:"Connect Microsoft 365"}),e.jsx("div",{className:"text-xs opacity-70 font-normal",children:"Outlook, Teams, OneDrive"})]})]})}),e.jsx("button",{onClick:()=>D("notion"),disabled:N||F.includes("notion"),className:i("w-full px-6 py-4 rounded-lg text-sm font-medium transition-colors flex items-center gap-3",F.includes("notion")?"bg-emerald-500/10 border border-emerald-500/30":"bg-foreground
1/10 text-foreground hover:bg-foreground/20 disabled:opacity-50 border border-foreground/20"),children:N&&"notion"===z?e.jsxs(e.Fragment,{children:[e.jsx(a.span,{className:"w-5 h-5 border-2 border-current/30 border-t-current rounded-full",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),"Redirecting to Notion..."]}):F.includes("notion")?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-emerald-700 dark:text-emerald-300",children:"Notion Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-6 h-6 bg-foreground rounded flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4 text-background",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.98-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466l1.823 1.447zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.84-.046.933-.56.933-1.167V6.354c0-.606-.233-.933-.746-.886l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.746 0-.933-.234-1.495-.933l-4.577-7.186v6.952l1.448.327s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.14c-.093-.514.28-.886.747-.933l3.222-.186z"})})}),e.jsxs("div",{className:"text-left flex-1",children:[e.jsx("div",{children:"Connect Notion"}),e.jsx("div",{className:"text-xs opacity-70 font-normal",children:"Pages & Databases"})]})]})}),e.jsx("button",{onClick:()=>D("github"),disabled:N||F.includes("github"),className:i("w-full px-6 py-4 rounded-lg text-sm font-medium transition-colors flex items-center gap-3",F.includes("github")?"bg-emerald-500/10 border border-emerald-500/30":"bg-foreground
1/10 text-foreground hover:bg-foreground/20 disabled:opacity-50 border border-foreground/20"),children:N&&"github"===z?e.jsxs(e.Fragment,{children:[e.jsx(a.span,{className:"w-5 h-5 border-2 border-current/30 border-t-current rounded-full",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),"Redirecting to GitHub..."]}):F.includes("github")?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-emerald-700 dark:text-emerald-300",children:"GitHub Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-6 h-6 bg-[#24292e] rounded flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4 text-white",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})}),e.jsxs("div",{className:"text-left flex-1",children:[e.jsx("div",{children:"Connect GitHub"}),e.jsx("div",{className:"text-xs opacity-70 font-normal",children:"Commits, PRs & Code Reviews"})]})]})})]}),F.length>0&&e.jsx("button",{onClick:()=>h("success"),className:"w-full mt-6 px-6 py-3 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
1/90 transition-colors",children:"Done"}),e.jsx("button",{onClick:()=>h("context"),className:"w-full mt-3 px-6 py-2 text-foreground/60 text-sm hover:text-foreground transition-colors",children:"Back"})]},"authorize"),"success"===f&&e.jsxs(a.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-6 rounded-full bg-emerald-500/10 flex items-center justify-center",children:e.jsx("span",{className:"w-3 h-3 rounded-full bg-emerald-500"})}),e.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"You're all set!"}),e.jsx("p",{className:"text-foreground/60 text-sm mb-6",children:"N71 now has read-only access to your connected tools. Your team lead will be able to see insights about team activity."}),F.length>0&&e.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:F.map(r=>e.jsxs("span",{className:"flex items-center gap-2 px-3 py-1 bg-emerald-500/10 rounded-full text-xs font-medium text-emerald-700 dark:text-emerald-300 capitalize",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),"microsoft"===r?"Microsoft 365":r]},r))}),e.jsx("button",{onClick:()=>m("/n71"),className:"px-6 py-3 bg-foreground text-background rounded-lg text-sm font-medium hover:bg-foreground
1/90 transition-colors",children:"Done"})]},"success")]})}),"success"!==f&&e.jsx("div",{className:"flex justify-center gap-2 mt-6",children:["intro","context","authorize"].map(r=>e.jsx("div",{className:i("w-1.5 h-1.5 rounded-full transition-colors",f===r?"bg-foreground/60":"bg-foreground/20")},r))})]})})]})}export{c as default};
2//# sourceMappingURL=TeamInvite-IAoruXD4.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.