PageSourceSearch

https://app.lemonpod.ai/_next/static/chunks/8601.5360be70f035cbd8.js

js lemonpod.ai collected 2026-10-05 12:09:59 UTC 22,567 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="e0be81bf-d31e-4658-9595-1e426979ef58",e._sentryDebugIdIdentifier="sentry-dbid-e0be81bf-d31e-4658-9595-1e426979ef58")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8601],{39540:(e,s,t)=>{t.d(s,{T:()=>n});var r=t(95155);t(12115);var a=t(91337);function n({className:e,...s}){return(0,r.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("flex min-h-[100px] w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground transition-all duration-100 resize-none","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 focus:border-yellow-400","disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted",e),...s})}},74350:(e,s,t)=>{t.d(s,{Cf:()=>i,Es:()=>u,L3:()=>x,c7:()=>m,lG:()=>c,rr:()=>h});var r=t(95155);t(12115);var a=t(29483),n=t(33210),o=t(91337);function c({...e}){return(0,r.jsx)(a.bL,{"data-slot":"dialog",...e})}function d({...e}){return(0,r.jsx)(a.ZL,{"data-slot":"dialog-portal",...e})}function l({className:e,...s}){return(0,r.jsx)(a.hJ,{"data-slot":"dialog-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-foreground
1/20 backdrop-blur-sm",e),...s})}function i({className:e,children:s,showCloseButton:t=!0,...c}){return(0,r.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,r.jsx)(l,{}),(0,r.jsxs)(a.UC,{"data-slot":"dialog-content",className:(0,o.cn)("bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-5 rounded-xl border border-border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...c,children:[s,t&&(0,r.jsxs)(a.bm,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-md bg-muted p-1 transition-all hover:bg-muted/80 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,r.jsx)(n.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m({className:e,...s}){return(0,r.jsx)("div",{"data-slot":"dialog-header",className:(0,o.cn)("flex flex-col gap-2 text-center sm:text-left",e),...s})}function u({className:e,...s}){return(0,r.jsx)("div",{"data-slot":"dialog-footer",className:(0,o.cn)("flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",e),...s})}function x({className:e,...s}){return(0,r.jsx)(a.hE,{"data-slot":"dialog-title",className:(0,o.cn)("font-display text-lg font-bold",e),...s})}function h({className:e,...s}){return(0,r.jsx)(a.VY,{"data-slot":"dialog-description",className:(0,o.cn)("text-muted-foreground text-sm leading-relaxed",e),...s})}},79792:(e,s,t)=>{t.d(s,{J:()=>o});var r=t(95155),a=t(12115),n=t(91337);let o=a.forwardRef(({className:e,...s},t)=>(0,r.jsx)("label",{ref:t,className:(0,n.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...s}));o.displayName="Label"},88601:(e,s,t)=>{t.r(s),t.d(s,{IntegrationModal:()=>y});var r=t(95155),a=t(12115),n=t(74350),o=t(4474),c=t(79792),d=t(39540),l=t(39658),i=t(38291),m=t(66609),u=t(94514),x=t(6296),h=t(8195),g=t(96725),f=t(22164),p=t(47834),j=t(7810),b=t(64890);function y({integration:e,open:s,onOpenChange:t}){let[y,N]=(0,a.useState)(""),[v,w]=(0,a.useState)(""),[k,C]=(0,a.useState)(!1),[S,A]=(0,a.useState)(!1),[_,$]=(0,a.useState)(null),[L,E]=(0,a.useState)(!1),[F,R]=(0,a.useState)(null),[z,D]=(0,a.useState)([]),[P,T]=(0,a.useState)(new Set),[G,I]=(0,a.useState)(!1),[Y,U]=(0,a.useState)(!1),[H,J]=(0,a.useState)(!1),{integrations:O,connectIntegration:W,disconnectIntegration:X,setIntegrationStatus:M,syncIntegrationsFromServer:q}=(0,b.D0)(),V=O[e],Z=V.metadata??{},B=j.n[e],K="connected"===V.status,Q="expired"===V.status,ee=b.oA.includes(e),es="ics-calendar"===e,et="notion"===e,er="github"===e,ea=Array.isArray(Z.tracked_repositories)?Z.tracked_repositories.filter(e=>!!e&&"object"==typeof e&&"number"==typeof e.id&&"string"==typeof e.full_name).map(e=>e):[],en="string"==typeof Z.installation_target_url?Z.installation_target_url:null,eo="all"===Z.repository_selection||"selected"===Z.repository_selection?Z.repository_selection:null;(0,a.useEffect)(()=>{if(!s||!er||!K)return;let t=!1;return async function(){try{let s=await fetch("/api/integrations/github");if(!s.ok)return;let r=await s.json();if(t)return;r.trackedRepositories&&M(e,"connected",{connectedAt:V.connectedAt??void 0,lastSyncAt:V.lastSyncAt??void 0,metadata:{...Z,tracked_repositories:r.trackedRepositories,repository_selection:r.installation?.repositorySelection??Z.repository_selection,installation_target_url:r.installation?.targetUrl??Z.installation_target_url}})}catch{}}(),()=>{t=!0}},[s,er,K]),(0,a.useEffect)(()=>{if(!s||!et)return;let e=!1;return async function(){E(!0),R(null);try{let s=await fetch("/api/integrations/notion"),t=await s.json();if(!s.ok)throw Error("error"in t&&t.error?t.error:"Failed to load Notion status");if(e)return;$(t)}catch(s){e||R(s instanceof Error?s.message:"Failed to load Notion setup")}finally{e||E(!1)}}(),()=>{e=!0}},[s,et]);let ec=async()=>{J(!0),I(!0);try{let e=await fetch("/api/integrations/notion/sources"),s=await e.json();if(!e.ok)throw Error(s.error||"Failed to load databases");D(s.sources||[]),T(new Set((s.selectedSources||[]).map(e=>e.id)))}catch(e){m.oR.error(e instanceof Error?e.message:"Failed to load databases"),J(!1)}finally{I(!1)}},ed=async()=>{U(!0);try{let e=await fetch("/api/integrations/notion/sources",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({selectedSourceIds:Array.from(P)})}),s=await e.json();if(!e.ok)throw Error(s.error||"Failed to save");_&&$({..._,selectedSources:s.selectedSources||[]}),m.oR.success(`Tracking ${s.selectedSources?.length||0} databases`),J(!1)}catch(e){m.oR.error(e instanceof Error?e.message:"Failed to save")}finally{U(!1)}},el=()=>{window.location.href=`/api/integrations/${e}/auth`},ei=async()=>
1{if(!v.trim())return void m.oR.error("Please enter an ICS URL");C(!0);try{let e=await fetch("/api/integrations/ics-calendar/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:v.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"Failed to connect ICS calendar");await q(),w(""),m.oR.success(`${s.calendarName||"ICS Calendar"} connected successfully!`),t(!1)}catch(e){console.error("ICS connect error:",e),m.oR.error(e instanceof Error?e.message:"Failed to connect. Please check the URL.")}finally{C(!1)}},em=async()=>{y.trim()?(C(!0),await new Promise(e=>setTimeout(e,1e3)),W(e,y),C(!1),N(""),m.oR.success(`${B.name} connected successfully!`),t(!1)):m.oR.error("Please enter a token")},eu=async()=>{A(!0);try{if(ee||es){if(!(await fetch(`/api/integrations/${e}`,{method:"DELETE"})).ok)throw Error("Failed to disconnect");await q()}else X(e);m.oR.success(`${B.name} disconnected`),t(!1)}catch(e){console.error("Disconnect error:",e),m.oR.error("Failed to disconnect. Please try again.")}finally{A(!1)}};return(0,r.jsx)(n.lG,{open:s,onOpenChange:t,children:(0,r.jsxs)(n.Cf,{className:"sm:max-w-md",children:[(0,r.jsxs)(n.c7,{className:"text-center sm:text-center",children:[(0,r.jsx)("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-xl bg-secondary border border-border shadow-sm",children:(0,r.jsx)(j._,{integration:e,size:"lg"})}),(0,r.jsxs)(n.L3,{className:"flex items-center justify-center gap-2",children:[K?`${B.name} Connected`:Q?`${B.name} Session Expired`:`Connect ${B.name}`,K&&(0,r.jsx)(i.E,{variant:"success",className:"ml-2",children:"Active"})]}),(0,r.jsx)(n.rr,{children:K?`Connected to ${B.name}. Data syncs daily.`:Q?`Your ${B.name} connection expired. Reconnect to resume syncing.`:ee?(()=>{switch(e){case"gmail":return"Connect your Gmail account to sync important inbox and sent threads. You'll be redirected to Google to authorize read-only access.";case"google-calendar":return"Connect your Google Calendar to sync your events and meetings. You'll be redirected to Google to authorize access.";case"github":return"Install the GitHub App, choose which repositories to track, and then authorize LemonPod to attribute activity to your account.";case"notion":return"Connect your Notion workspace to automatically sync the shared tasks and docs LemonPod can access.";case"twitter":return"Connect your X (Twitter) account to track your tweets, engagement, and social activity. You'll be redirected to X to authorize access.";default:return`Connect your ${B.name} account. You'll be redirected to authorize access.`}})():`Paste your ${B.name} access token to connect.`})]}),(0,r.jsx)("div",{className:"space-y-4 pt-2",children:K&&et?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-xl bg-muted border border-border p-4",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"h-10 w-10 rounded-lg bg-card border border-border flex items-center justify-center",children:(0,r.jsx)(u.A,{className:"h-5 w-5 text-foreground"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Connected"}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Since"," ",new Date(_?.connectedAt||V.connectedAt).toLocaleDateString()]}),(_?.lastSyncAt||V.lastSyncAt)&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground font-mono",children:["Last synced:"," ",new Date(_?.lastSyncAt||V.lastSyncAt).toLocaleString()]})]})]})}),(_?.workspace?.name||_?.user?.name)&&(0,r.jsxs)("div",{className:"rounded-lg bg-secondary border border-foreground
1/20 p-3",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"Workspace"}),(0,r.jsxs)("p",{className:"text-sm font-medium text-foreground",children:[_?.workspace?.icon?`${_.workspace.icon} `:"",_?.workspace?.name||"Notion workspace"]}),_?.user?.name&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["Connected as ",_.user.name,_.user.email?` (${_.user.email})`:""]})]}),(0,r.jsxs)("div",{className:"rounded-lg bg-secondary border border-foreground/20 p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Tracked databases"}),!H&&_?.selectedSources?.length?(0,r.jsxs)(i.E,{variant:"success",children:[_.selectedSources.length," tracked"]}):null]}),F&&(0,r.jsx)("div",{className:"rounded-lg border border-destructive/20 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:F}),H?(0,r.jsxs)("div",{className:"space-y-3",children:[G?(0,r.jsxs)("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-border px-3 py-6 text-sm text-muted-foreground",children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading databases..."]}):0===z.length?(0,r.jsxs)("div",{className:"rounded-lg border border-dashed border-border px-3 py-4 text-sm text-muted-foreground",children:["No databases found. Share a database with LemonPod in Notion first: open it → ",(0,r.jsx)("strong",{children:"\xb7\xb7\xb7"})," → ",(0,r.jsx)("strong",{children:"Connections"})," → add LemonPod."]}):(0,r.jsx)("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-border divide-y divide-border",children:z.map(e=>(0,r.jsxs)("label",{className:"flex items-center gap-3 px-3 py-2 hover:bg-muted/50 cursor-pointer transition-colors",children:[(0,r.jsx)("input",{type:"checkbox",checked:P.has(e.id),onChange:()=>{T(s=>{let t=new Set(s);return t.has(e.id)?t.delete(e.id):t.add(e.id),t})},className:"h-4 w-4 rounded border-border accent-foreground shrink-0"}),(0,r.jsx)("div",{className:"min-w-0 flex-1",children:(0,r.jsx)("p",{className:"text-sm text-foreground truncate",children:e.title})})]},e.id))}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.$,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>J(!1),disabled:Y,children:"Cancel"}),(0,r.jsxs)(o.$,{size:"sm",className:"flex-1",onClick:ed,disabled:Y||G,children:[Y?(0,r.jsx)(x.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(u.A,{className:"mr-2 h-3.5 w-3.5"}),Y?"Saving...":"Save"]})]})]}):L?(0,r.jsxs)("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-border px-3 py-6 text-sm text-muted-foreground",children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):_?.selectedSources?.length?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:_.selectedSources.map(e=>(0,r.jsxs)(i.E,{variant:"secondary",className:"flex items-center gap-1.5",children:[(0,r.jsx)(h.A,{className:"h-3 w-3 shrink-0"}),e.title]},e.id))}),(0,r.jsx)(o.$,{variant:"outline",size:"sm",className:"w-full",onClick:ec,children:"Edit tracked databases"})]}):(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"No databases tracked. Share databases with LemonPod in Notion, then select which ones to include in your briefs."}),(0,r.jsxs)(o.$,{variant:"outline",size:"sm",className:"w-full",onClick:ec,children:[(0,r.jsx)(h.A,{className:"mr-2 h-4 w-4"}),"Select databases"]})]})]}),(0,r.jsx)(o.$,{variant:"outline",className:"w-full text-destructive hover:text-destructive hover:bg-destructive/10",onClick:eu,disabled:S,children:S?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Disconnecting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.A,{className:"mr-2 h-4 w-4"}),"Disconnect"]})})]}):K?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-xl bg-muted border border-border p-4",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"h-10 w-10 rounded-lg bg-card border border-border flex items-center justify-center",children:(0,r.jsx)(u.A,{className:"h-5 w-5 text-foreground"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Connected"}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Since"," ",new Date(V.connectedAt).toLocaleDateString()]}),V.lastSyncAt&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground font-mono",children:["Last synced:"," ",new Date(V.lastSyncAt).toLocaleStr
1ing()]})]})]})}),"string"==typeof Z.calendar_name&&(0,r.jsxs)("div",{className:"rounded-lg bg-secondary border border-foreground/20 p-3",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"Calendar"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:Z.calendar_name})]}),"string"==typeof Z.email_address&&(0,r.jsxs)("div",{className:"rounded-lg bg-secondary border border-foreground/20 p-3",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"Gmail Account"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground font-mono",children:Z.email_address}),"number"==typeof Z.messages_total&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:[Z.messages_total.toLocaleString()," ","total messages in account"]})]}),"string"==typeof Z.github_username&&(0,r.jsxs)("div",{className:"rounded-lg bg-secondary border border-foreground/20 p-3",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"GitHub Account"}),(0,r.jsxs)("p",{className:"text-sm font-medium text-foreground font-mono",children:["@",Z.github_username]})]}),er&&(0,r.jsxs)("div",{className:"rounded-lg bg-secondary border border-foreground
1/20 p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Tracked repositories"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:ea.length>0?`GitHub is currently sharing ${ea.length} repos with LemonPod.`:"No repositories are currently shared with LemonPod."})]}),eo&&(0,r.jsx)(i.E,{variant:"secondary",children:"selected"===eo?"Selected repos":"All repos"})]}),ea.length>0?(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[ea.slice(0,8).map(e=>(0,r.jsx)(i.E,{variant:"secondary",children:e.full_name},e.id)),ea.length>8&&(0,r.jsxs)(i.E,{variant:"muted",children:["+",ea.length-8," more"]})]}):(0,r.jsx)("div",{className:"rounded-lg border border-dashed border-border px-3 py-4 text-sm text-muted-foreground",children:"Update the GitHub App installation in GitHub to grant LemonPod access to repositories."}),en&&(0,r.jsx)(o.$,{asChild:!0,variant:"outline",className:"w-full",children:(0,r.jsxs)("a",{href:en,target:"_blank",rel:"noreferrer",children:[(0,r.jsx)(f.A,{className:"mr-2 h-4 w-4"}),"Manage in GitHub"]})})]}),"string"==typeof Z.twitter_username&&(0,r.jsxs)("div",{className:"rounded-lg bg-secondary border border-foreground
1/20 p-3",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:"X (Twitter) Account"}),(0,r.jsxs)("p",{className:"text-sm font-medium text-foreground font-mono",children:["@",Z.twitter_username]}),(void 0!==Z.followers_count||void 0!==Z.following_count)&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:[Z.followers_count?.toLocaleString()," ","followers \xb7"," ",Z.following_count?.toLocaleString()," ","following"]})]}),(0,r.jsx)(o.$,{variant:"outline",className:"w-full text-destructive hover:text-destructive hover:bg-destructive/10",onClick:eu,disabled:S,children:S?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Disconnecting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.A,{className:"mr-2 h-4 w-4"}),"Disconnect"]})})]}):Q&&es?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-lg bg-destructive/10 border-2 border-destructive/20 p-4",children:(0,r.jsx)("p",{className:"text-sm text-destructive",children:"Failed to fetch your calendar. Please check if the URL is still valid and reconnect."})}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(c.J,{htmlFor:"ics-url-reconnect",children:"ICS Calendar URL"}),(0,r.jsx)(l.p,{id:"ics-url-reconnect",value:v,onChange:e=>w(e.target.value),placeholder:"https://calendar.example.com/feed.ics",className:"font-mono text-sm"})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(o.$,{variant:"outline",className:"flex-1",onClick:()=>t(!1),children:"Cancel"}),(0,r.jsx)(o.$,{className:"flex-1",onClick:ei,disabled:k||!v.trim(),children:k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Connecting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{className:"mr-2 h-4 w-4"}),"Reconnect"]})})]})]}):Q?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-lg bg-destructive/10 border-2 border-destructive/20 p-4",children:(0,r.jsx)("p",{className:"text-sm text-destructive",children:"Your access has expired. Click below to reconnect and restore syncing."})}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(o.$,{variant:"outline",className:"flex-1",onClick:()=>t(!1),children:"Cancel"}),(0,r.jsxs)(o.$,{className:"flex-1",onClick:()=>{ee&&el()},children:[(0,r.jsx)(f.A,{className:"mr-2 h-4 w-4"}),"Reconnect"]})]})]}):es?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-lg bg-secondary border border-foreground
1/20 p-4",children:(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:'Paste your calendar\'s subscription link. In most apps, look for "Export", "Subscribe", or "Share" in calendar settings.'})}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(c.J,{htmlFor:"ics-url-connect",children:"ICS Calendar URL"}),(0,r.jsx)(l.p,{id:"ics-url-connect",value:v,onChange:e=>w(e.target.value),placeholder:"https://calendar.example.com/feed.ics",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Works with Google Calendar, Apple Calendar, Outlook, and most other apps."})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(o.$,{variant:"outline",className:"flex-1",onClick:()=>t(!1),children:"Cancel"}),(0,r.jsx)(o.$,{className:"flex-1",onClick:ei,disabled:k||!v.trim(),children:k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Connecting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{className:"mr-2 h-4 w-4"}),"Connect"]})})]})]}):ee?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-lg bg-secondary border border-foreground
1/20 p-4",children:(0,r.jsxs)("p",{className:"text-sm text-muted-foreground",children:["You'll be redirected to"," ","google-calendar"===e?"Google":B.name," ","to authorize access. We only read your data — we never post or delete anything."]})}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(o.$,{variant:"outline",className:"flex-1",onClick:()=>t(!1),children:"Cancel"}),(0,r.jsxs)(o.$,{className:"flex-1",onClick:el,children:[(0,r.jsx)(f.A,{className:"mr-2 h-4 w-4"}),"Connect"]})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(c.J,{htmlFor:"access-token",children:"Access Token"}),(0,r.jsx)(d.T,{id:"access-token",value:y,onChange:e=>N(e.target.value),placeholder:(()=>{switch(e){case"github":return"ghp_xxxxxxxxxxxxxxxxxxxx";case"gmail":return"OAuth connection required";default:return"Enter your access token..."}})(),className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your token is encrypted and stored securely."})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(o.$,{variant:"outline",className:"flex-1",onClick:()=>t(!1),children:"Cancel"}),(0,r.jsx)(o.$,{className:"flex-1",onClick:em,disabled:k||!y.trim(),children:k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Connecting..."]}):"Connect"})]})]})})]})})}}}]);

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.