1import{M as re,Z as oe,g,s as S,f as le,r as n,j as e,N as ce,O as de,Q as me,V as ue,Y as ge,B as h,I as H,H as he,a4 as ke,U as Me,n as be,h as Te,i as _e,l as Ee,m as Ie}from"./index-DLd_kDlx.js";import{S as Ae}from"./SuperAdminLayout-BsUvQU2j.js";import{T as Fe,a as Pe,b as J}from"./tabs-DKw2ItQa.js";import{u as ze,a as Le,S as X,g as ee,f as ne,b as Oe,M as Re,B as Ge,D as qe,c as Ue,d as Ve}from"./useGooglePostAuthResume-D2LXR_8h.js";import{T as se}from"./textarea-C6X-I43k.js";import{L as j}from"./label-D4-ENrYn.js";import{u as Be}from"./useMutation-CotV56Sa.js";import{L as We}from"./loader-circle-D2miE2xB.js";import{T as ae}from"./triangle-alert-Chqk_WK7.js";import{L as Ke}from"./link-_ZZxygmy.js";import{E as Qe}from"./external-link-D0CFvOTk.js";import{T as $e}from"./trash-2-0uuZSTFd.js";import{S as He}from"./square-pen-Ce4P3TUP.js";import{f as P,s as Ye,a as Ze}from"./format-BTXglRCX.js";import{A as Je,b as Xe,c as es,d as ss,e as ts,f as ns,g as as,h as is}from"./alert-dialog-Ct5JsrY0.js";import{S as rs}from"./Seo-Diny__Ix.js";import{S as os,a as ls,b as cs,c as ds,d as ie}from"./select-RSrodAEw.js";import{e as ms}from"./endOfDay-DkR3ZXc8.js";import{C as us}from"./chevron-left-Wewsh5d7.js";import{C as gs}from"./chevron-right-CD1gvy-q.js";import{P as hs}from"./plus-0WhrdjYO.js";import{F as ps}from"./filter-BMeMiGQo.js";import{e as xs}from"./endOfMonth-CYn6pTOm.js";import{s as fs,e as js}from"./endOfWeek-6cC00CtY.js";import"./NotificationIcon-C1wwYnH5.js";import"./popover-BMD5FOmU.js";import"./scroll-area-BXTuUF24.js";import"./index-Deh-4PO1.js";import"./index-BdQq_4o_.js";import"./NotificationItem-Dc2WXW-y.js";import"./formatDistanceToNow-57P64IbE.js";import"./en-US-9SRVm7yB.js";import"./differenceInCalendarMonths-BA0TPVs2.js";import"./message-square-CtxeCfRz.js";import"./trophy-DBX-jNOC.js";import"./dropdown-menu-DSd1c3Vk.js";import"./index-lTaZyIGy.js";import"./crown-hzm_bRIt.js";import"./user-check-DxoAQXwU.js";import"./star-BH1OFEcs.js";import"./globe-C057RQ73.js";import"./timer-CZhDpZys.js";import"./briefcase-business-CphIeAJd.js";import"./key-round-B79BulHq.js";import"./search-DFH5eAlA.js";import"./findIndex-Cos7Fxsp.js";import"./warning-vNLIDCnk.js";import"./getDay-qh2J2e9D.js";import"./chevron-down-DpJJsCer.js";import"./chevron-up-M4SAwIjf.js";function ys(d,a,t){const{data:o,isLoading:l,error:x}=re({queryKey:["super-admin-meeting-occurrences",{start:d.toISOString(),end:a.toISOString(),filters:t}],queryFn:async()=>{let y=S.from("meeting_occurrences").select(` 2 id, 3 start_at, 4 end_at, 5 status, 6 meeting_link, 7 location, 8 meeting_series ( 9 id, 10 title, 11 session_type, 12 timezone, 13 pod_id, 14 agenda, 15 is_recurring, 16 rrule, 17 created_by, 18 target_type 19 ) 20 `).gte("start_at",d.toISOString()).lte("end_at",a.toISOString()).neq("status","cancelled");const{data:c,error:f}=await y;if(f)throw f;let m=(c||[]).filter(r=>r.meeting_series).map(r=>({id:r.id,seriesId:r.meeting_series.id,title:r.meeting_series.title,type:r.meeting_series.session_type,start:r.start_at,end:r.end_at,meetingLink:r.meeting_link,location:r.location,podId:r.meeting_series.pod_id,timezone:r.meeting_series.timezone,agenda:r.meeting_series.agenda,isRecurring:r.meeting_series.is_recurring,rrule:r.meeting_series.rrule,createdBy:r.meeting_series.created_by,targetType:r.meeting_series.target_type}));return t.sessionTypes.length>0&&(m=m.filter(r=>t.sessionTypes.includes(r.type))),t.podId&&(m=m.filter(r=>r.podId===t.podId)),t.targetType&&(m=m.filter(r=>r.targetType===t.targetType)),m},meta:{onError:()=>{g.error("Failed to load calendar events")}}});return{events:o||[],isLoading:l,error:x}}function pe(){const{data:d,isLoading:a}=re({queryKey:["super-admin-all-pods"],queryFn:async()=>{const{data:t,error:o}=await S.from("pods").select("id, pod_name, status").order("pod_name");if(o)throw o;return t||[]},meta:{onError:()=>{g.error("Failed to load pods")}}});return{pods:d||[],isLoading:a}}function vs(){const d=oe();return Be({mutationFn:async a=>{const{data:{session:t}}=await S.auth.getSession();if(!(t!=null&&t.access_token))throw new Error("Authentication required");const{data:o,error:l}=await S.functions.invoke("cancel-meeting",{body:a,headers:{Authorization:`Bearer ${t.access_token}`}});if(l)throw l;return o},onSuccess:()=>{g.success("Meeting cancelled successfully"),d.invalidateQueries({queryKey:["super-admin-meeting-occurrences"]}),d.invalidateQueries({queryKey:["meeting-occurrences"]})},onError:a=>{console.error("Cancel meeting error:",a),g.error("Failed to cancel meeting",{description:a.message})}})}const Ss=({open:d,onOpenChange:a})=>{const{user:t}=le(),{pods:o}
20=pe(),l=ze(),x=oe(),{status:y,isChecking:c,checkConnection:f,initiateReconnect:m,isConnected:r}=Le(),[D,z]=n.useState(""),[k,M]=n.useState("knowledge_gap"),[C,b]=n.useState("platform"),[T,_]=n.useState(""),[v,E]=n.useState(""),[V,L]=n.useState(30),[B,O]=n.useState(""),[W,R]=n.useState(""),[p,G]=n.useState("none"),[I,q]=n.useState("");n.useEffect(()=>{d&&f()},[d,f]);const U=n.useMemo(()=>["daily_scrum","sprint_planning","sprint_review"].includes(k),[k]);n.useEffect(()=>{U&&b("pod")},[U]);const Y=n.useMemo(()=>!(!r||!D||!v||!(t!=null&&t.id)||C==="pod"&&!T||p!=="none"&&!I),[r,D,v,C,T,t==null?void 0:t.id,p,I]),w=async()=>{if(!(t!=null&&t.id)){g.error("You need to be logged in");return}l.mutate({title:D,sessionType:k,targetType:C,podId:C==="pod"?T:void 0,dateTime:v,durationMinutes:V,agenda:B||void 0,description:W||void 0,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,recurrence:p,repeatUntil:p!=="none"?I:void 0},{onSuccess:async i=>{const K=i==null?void 0:i.seriesId;if(K){g.message("Creating Google Meet link...",{description:"We'll attach it to this meeting automatically."});try{const{data:{session:N}}=await S.auth.getSession();if(!(N!=null&&N.access_token)){g.success("Meeting created");return}const{data:A,error:Q}=await S.functions.invoke("calendar-create-meeting",{body:{seriesId:K},headers:{Authorization:`Bearer ${N.access_token}`}});Q?(console.error("calendar-create-meeting error:",Q),g.success("Meeting created (without Google Meet link)")):A!=null&&A.meetLink?(g.success("Google Meet link created",{description:A.meetLink}),x.invalidateQueries({queryKey:["super-admin-meeting-occurrences"]})):g.success("Meeting created")}catch(N){console.error("Google Meet creation error:",N),g.success("Meeting created")}}else g.success("Meeting created");z(""),_(""),E(""),L(30),O(""),R(""),G("none"),q(""),a(!1)}})};return e.jsx(ce,{open:d,onOpenChange:a,children:e.jsxs(de,{className:"sm:max-w-xl max-h-[85vh] overflow-y-auto",children:[e.jsxs(me,{children:[e.jsx(ue,{children:"Create Platform Meeting"}),e.jsx(ge,{children:"Create a meeting for any pod or platform-wide."}),c&&e.jsx("div",{className:"bg-muted border border-border rounded-md p-3 mt-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{className:"h-4 w-4 animate-spin text-muted-foreground"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking Google Calendar connection..."})]})}),!c&&y==="expired"&&e.jsx("div",{className:"bg-destructive/10 border border-destructive/30 rounded-md p-3 mt-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ae,{className:"h-4 w-4 text-destructive mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-destructive font-medium",children:"Google Account Expired"}),e.jsx("p",{className:"text-xs text-destructive/80 mt-1",children:"Reconnect to enable automatic Meet links."})]})]}),e.jsx(h,{size:"sm",variant:"destructive",onClick:m,children:"Reconnect"})]})}),!c&&y==="not_connected"&&e.jsx("div",{className:"bg-destructive/10 border border-destructive/30 rounded-md p-3 mt-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ae,{className:"h-4 w-4 text-destructive mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-destructive font-medium",children:"Google Calendar Required"}),e.jsx("p",{className:"text-xs text-destructive/80 mt-1",children:"Connect your Google account to create Meet links."})]})]}),e.jsx(h,{size:"sm",variant:"destructive",onClick:m,children:"Connect Google"})]})})]}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"title",children:"Title"}),e.jsx(H,{id:"title",value:D,onChange:i=>z(i.target.value),placeholder:"Meeting title..."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"sessionType",children:"Meeting Type"}),e.jsx("select",{id:"sessionType",className:"border rounded px-3 py-2 text-sm",value:k,onChange:i=>M(i.target.value),children:X.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"targetType",children:"Audience"}),e.jsxs("select",{id:"targetType",className:"border rounded px-3 py-2 text-sm",value:C,onChange:i=>b(i.target.value),disabled:U,children:[e.jsx("option",{value:"platform",children:"Platform-wide"}),e.jsx("option",{value:"pod",children:"Specific Pod"}),e.jsx("option",{value:"career_path",children:"Professional Role"})]})]}),C==="pod"&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"podId",children:"Select Pod"}),e.jsxs("select",{id:"podId",className:"border rounded px-3 py-2 text-sm",value:T,onChange:i=>_(i.target.value),children:[e.jsx("option",{value:"",children:"Select a pod..."}),o.map(i=>e.jsx("option",{value:i.id,children:i.pod_name},i.id))]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"dateTime",children:"Date & Time"}
20),e.jsx(H,{id:"dateTime",type:"datetime-local",value:v,onChange:i=>E(i.target.value),min:new Date().toISOString().slice(0,16)})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"duration",children:"Duration (minutes)"}),e.jsx(H,{id:"duration",type:"number",min:5,step:5,value:V,onChange:i=>L(parseInt(i.target.value||"0",10))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"agenda",children:"Agenda"}),e.jsx(se,{id:"agenda",placeholder:"What will be covered?",value:B,onChange:i=>O(i.target.value)})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"description",children:"Description (optional)"}),e.jsx(se,{id:"description",placeholder:"Session goals and expectations...",value:W,onChange:i=>R(i.target.value)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"recurrence",children:"Recurrence"}),e.jsxs("select",{id:"recurrence",className:"border rounded px-3 py-2 text-sm",value:p,onChange:i=>G(i.target.value),children:[e.jsx("option",{value:"none",children:"Does not repeat"}),e.jsx("option",{value:"daily",children:"Daily"}),e.jsx("option",{value:"weekly",children:"Weekly"}),e.jsx("option",{value:"monthly",children:"Monthly"})]})]}),p!=="none"&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{htmlFor:"repeatUntil",children:"End by"}),e.jsx(H,{id:"repeatUntil",type:"date",value:I,onChange:i=>q(i.target.value),min:v?v.split("T")[0]:new Date().toISOString().split("T")[0]})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(h,{variant:"ghost",onClick:()=>a(!1),children:"Cancel"}),e.jsx(h,{onClick:w,disabled:!Y||l.isPending,children:l.isPending?"Creating...":"Create Meeting"})]})]})]})})},Cs=({open:d,onOpenChange:a,event:t,onEdit:o,onCancel:l})=>{if(!t)return null;const x=(c,f)=>{if(f)try{return ne(c,f,"PPP 'at' p zzz")}catch{return P(c,"PPP 'at' p")}return P(c,"PPP 'at' p")},y=ee(t.type);return e.jsx(ce,{open:d,onOpenChange:a,children:e.jsxs(de,{className:"sm:max-w-md",children:[e.jsxs(me,{children:[e.jsxs(ue,{className:"flex items-center gap-2",children:[e.jsx(he,{className:"w-5 h-5"}),"Meeting Details"]}),e.jsx(ge,{children:"View and manage meeting details"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-lg font-semibold",children:t.title}),e.jsx("div",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${y}`,children:t.type.replace(/_/g," ").replace(/\b\w/g,c=>c.toUpperCase())})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ke,{className:"w-4 h-4 mt-0.5 text-muted-foreground"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:x(new Date(t.start),t.timezone)}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["to"," ",t.timezone?ne(new Date(t.end),t.timezone,"p zzz"):P(new Date(t.end),"p")]})]})]}),t.meetingLink&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Ke,{className:"w-4 h-4 mt-0.5 text-muted-foreground"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Meeting Link"}),e.jsxs(h,{size:"sm",onClick:()=>window.open(t.meetingLink,"_blank"),className:"w-full",children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),"Join Meeting"]})]})]}),t.agenda&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Me,{className:"w-4 h-4 mt-0.5 text-muted-foreground"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Agenda"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.agenda})]})]}),t.isRecurring&&e.jsx("div",{className:"text-xs text-muted-foreground",children:"This is a recurring meeting"}),e.jsxs("div",{className:"flex justify-between gap-2 pt-4 border-t",children:[e.jsx("div",{children:l&&e.jsxs(h,{variant:"destructive",size:"sm",onClick:()=>l(t),children:[e.jsx($e,{className:"w-4 h-4 mr-2"}),"Cancel Meeting"]})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{variant:"outline",onClick:()=>a(!1),children:"Close"}),o&&e.jsxs(h,{onClick:()=>o(t),children:[e.jsx(He,{className:"w-4 h-4 mr-2"}),"Edit Meeting"]})]})]})]})]})})},Ns=({open:d,onOpenChange:a,event:t})=>{const[o,l]=n.useState(!1),[x,y]=n.useState(""),c=vs(),f=async()=>{t&&(await c.mutateAsync({occurrenceId:t.id,cancelEntireSeries:o&&t.isRecurring,reason:x||void 0}),y(""),l(!1),a(!1))};return t?e.jsx(Je,{open:d,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsxs(es,{children:[e.jsx(ss,{children:"Cancel Meeting"}),e.jsxs(ts,{children:['Are you sure you want to cancel "',t.title,'"? This action cannot be undone.']})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[t.isRecurring&&e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(be,{id:"cancelSeries",checked:o,onCheckedChange:m=>l(m===!0)}),e.jsx(j,{htmlFor:"cancelSeries",className:"text-sm",children:"Cancel all future occurrences in this series"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(j,{htmlFor:"reason",children:"Cancellation Reason (optional)"}),e.jsx(se,{id:"reason",placeholder:"Enter a reason for cancellation...",value:x,onChange:m=>y(m.target.value)})]})]}),e.jsxs(ns,{children:[e.jsx(as,{children:"Keep Meeting"}),e.jsx(is,{onClick:f,disabled:c.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:c.isPending?"Cancelling...":"Cancel Meeting"})]})]})}):null};function vt(){const{user:d}=le(),[a,t]=n.useState("month"),[o,l]=n.useState(new Date),[x,y]=n.useState([]),[c,f]=n.useState(""),[m,r]=n.useState(!1),[D,z]=n.useState(!1),[k,M]=n.useState(!1),[C,b]=n.useState(null),[T,_]=n.useState(!1),[v,E]=n.useState(null),[V,L]=n.useState(!1),[B,O]=n.useState(null),[W,R]=n.useState(!1),[p,G]=n.useState(null),[I,q]=n.useState(!1),[U,Y]=n.useState(null),w=Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",{pods:i}=pe();Oe(),n.useEffect(()=>{(async()=>{try{const{data:u}=await S.from("google_credentials").select("id").maybeSingle();r(!!u)}catch{}const s=new URLSearchParams(window.location.search);if(s.get("google")==="connected"){g.success("Google account connected"),s.delete("google");const u=new URL(window.location.href);u.search=s.toString(),window.history.replaceState({},"",u.toString()),r(!0)}})()},[]);const K=async()=>{try{const s=`${window.location.origin}/super-admin/calendar?google=connected`,{data:u,error:F}=await S.functions.invoke("google-oauth-start",{body:{postAuthRedirect:s}});if(F)throw F;u!=null&&u.url&&(window.location.href=u.url)}catch(s){console.error(s),g.error("Failed to start Google OAuth")}},N=async()=>{try{if(!d){g.error("You need to be logged in");return}const{error:s}=await S.from("google_credentials").delete().eq("user_id",d.id);if(s)throw s;r(!1),g.success("Disconnected Google account")}catch(s){console.error(s),g.error("Failed to disconnect")}},{rangeStart:A,rangeEnd:Q}=n.useMemo(()=>a==="month"?{rangeStart:fs(o),rangeEnd:xs(o)}:a==="week"?{rangeStart:Ye(o),rangeEnd:js(o)}:{rangeStart:Ze(o),rangeEnd:ms(o)},[o,a]),xe=n.useMemo(()=>({sessionTypes:x,podId:c||void 0}),[x,c]),{events:$,isLoading:fe}=ys(A,Q,xe),te=n.useMemo(()=>($||[]).map(s=>({id:s.id,seriesId:s.seriesId,title:s.title,type:s.type,timezone:s.timezone||w,start:new Date(s.start).toISOString(),end:new Date(s.end).toISOString(),meetingLink:s.meetingLink||void 0,agenda:s.agenda||void 0,isRecurring:s.isRecurring||!1,rrule:s.rrule||null,createdBy:s.createdBy,podId:s.podId}
20)),[$,w]),je=n.useMemo(()=>($||[]).map(s=>({id:s.id,seriesId:s.seriesId,title:s.title,type:s.type,timezone:s.timezone||w,start:new Date(s.start),end:new Date(s.end),meetingLink:s.meetingLink||void 0,agenda:s.agenda||void 0})),[$,w]),ye=()=>{const s=new Date(o);a==="month"?s.setMonth(s.getMonth()-1):a==="week"?s.setDate(s.getDate()-7):s.setDate(s.getDate()-1),l(s)},ve=()=>{const s=new Date(o);a==="month"?s.setMonth(s.getMonth()+1):a==="week"?s.setDate(s.getDate()+7):s.setDate(s.getDate()+1),l(s)},Se=s=>{y(u=>u.includes(s)?u.filter(F=>F!==s):[...u,s])},Z=s=>{b(s),M(!0)},Ce=s=>{M(!1),b(null),E(s),_(!0)},Ne=s=>{M(!1),b(null),O(s),L(!0)},we=(s,u)=>{Y(s),q(!0)};return e.jsxs(Ae,{children:[e.jsx(rs,{title:"Platform Calendar â Super Admin",description:"Manage all meetings across the platform",canonical:"/super-admin/calendar"}),e.jsx("main",{className:"p-8 space-y-6",children:e.jsxs(Te,{children:[e.jsxs(_e,{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(he,{className:"w-5 h-5"}),"Platform Calendar"]}),e.jsxs(Ee,{children:["View and manage all meetings across the platform. Timezone: ",w]})]}),e.jsxs(Ie,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{variant:"outline",size:"icon",onClick:ye,children:e.jsx(us,{className:"w-4 h-4"})}),e.jsx(h,{variant:"outline",size:"icon",onClick:ve,children:e.jsx(gs,{className:"w-4 h-4"})}),e.jsx("div",{className:"px-3 py-1 bg-accent/20 rounded-md",children:e.jsxs("span",{className:"text-sm font-medium",children:[a==="month"&&P(o,"MMMM yyyy"),a==="week"&&P(o,"'Week of' MMM d, yyyy"),a==="day"&&P(o,"MMMM d, yyyy")]})}),e.jsx(h,{variant:"ghost",onClick:()=>l(new Date),children:"Today"})]}),e.jsx(Fe,{value:a,onValueChange:s=>t(s),children:e.jsxs(Pe,{children:[e.jsx(J,{value:"month",children:"Month"}),e.jsx(J,{value:"week",children:"Week"}),e.jsx(J,{value:"day",children:"Day"})]})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex items-center gap-2",children:m?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-green-700 bg-green-50 px-2 py-1 rounded-full",children:"Google Connected"}),e.jsx(h,{variant:"outline",size:"sm",onClick:N,children:"Disconnect"})]}):e.jsx(h,{variant:"outline",size:"sm",onClick:K,children:"Connect Google"})}),e.jsxs(os,{value:c||"all",onValueChange:s=>f(s==="all"?"":s),children:[e.jsx(ls,{className:"w-[180px]",children:e.jsx(cs,{placeholder:"All Pods"})}),e.jsxs(ds,{children:[e.jsx(ie,{value:"all",children:"All Pods"}),i.map(s=>e.jsx(ie,{value:s.id,children:s.pod_name},s.id))]})]}),e.jsxs(h,{onClick:()=>z(!0),children:[e.jsx(hs,{className:"w-4 h-4 mr-1"})," New Meeting"]})]})]}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:X.map(s=>e.jsxs("label",{className:"inline-flex items-center gap-1 text-sm cursor-pointer",children:[e.jsx("input",{type:"checkbox",className:"accent-primary",checked:x.includes(s.value),onChange:()=>Se(s.value)}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${ee(s.value)}`,children:s.label})]},s.value))}),e.jsx("div",{className:"rounded-lg min-h-[500px]",children:fe?e.jsx("div",{className:"flex items-center justify-center h-96",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):a==="month"?e.jsx(Re,{currentDate:o,events:te,onEventClick:Z,onShowMoreClick:we}):e.jsx(Ge,{date:o,view:a,onView:s=>t(s),onNavigate:s=>l(s),events:je,onSelectEvent:Z})}),e.jsxs("div",{className:"mt-4 text-xs text-muted-foreground flex items-start gap-3 flex-wrap",children:[e.jsx(ps,{className:"w-4 h-4 mt-0.5"}),e.jsx("div",{className:"flex gap-4 flex-wrap",children:X.map(s=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`${ee(s.value)} inline-block w-2.5 h-2.5 rounded-full`}),e.jsx("span",{children:s.label})]},s.value))})]})]})]})}),e.jsx(Ss,{open:D,onOpenChange:z}),e.jsx(Cs,{open:k,onOpenChange:M,event:C,onEdit:Ce,onCancel:Ne}),e.jsx(qe,{open:I,onOpenChange:q,date:U,events:te,onEventClick:Z}),e.jsx(Ue,{open:T,onOpenChange:s=>{_(s),s||E(null)},event:v,onEditSeries:(s,u,F,De)=>{_(!1),E(null),G({seriesId:s,anchorStart:u,durationMinutes:F,timezone:De,rrule:(v==null?void 0:v.rrule)||null}),R(!0)}}),p&&e.jsx(Ve,{open:W,onOpenChange:s=>{R(s),s||G(null)},seriesId:p.seriesId,anchorStart:p.anchorStart,durationMinutes:p.durationMinutes,timezone:p.timezone,rrule:p.rrule}),e.jsx(Ns,{open:V,onOpenChange:s=>{L(s),s||O(null)},event:B})]})}export{vt 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.