(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{1591:function(e,n,t){Promise.resolve().then(t.t.bind(t,846,23)),Promise.resolve().then(t.bind(t,4631)),Promise.resolve().then(t.bind(t,9387)),Promise.resolve().then(t.bind(t,8482)),Promise.resolve().then(t.bind(t,3475)),Promise.resolve().then(t.t.bind(t,4019,23)),Promise.resolve().then(t.t.bind(t,4613,23))},4631:function(e,n,t){"use strict";t.d(n,{Modals:function(){return B}});var s=t(6436),r=t(8448),o=t(7699),a=t(7881),i=t(777);let d=()=>{let[e,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=()=>n(window.innerWidth<=768);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e};var l=t(1672),c=t(1580),u=t(9234);let x=l.fC;l.xz;let h=l.h_;l.x8;let j=a.forwardRef((e,n)=>{let{className:t,...r}=e;return(0,s.jsx)(l.aV,{ref:n,className:(0,u.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-black/80",t),...r})});j.displayName=l.aV.displayName;let f=a.forwardRef((e,n)=>{let{className:t,children:r,...o}=e;return(0,s.jsxs)(h,{children:[(0,s.jsx)(j,{}),(0,s.jsxs)(l.VY,{ref:n,className:(0,u.cn)("rounded-base shadow-base 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border-2 border-black bg-white p-6 duration-200",t),...o,children:[r,(0,s.jsxs)(l.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-slate-100 data-[state=open]:text-slate-500",children:[(0,s.jsx)(c.Pxu,{className:"size-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=l.VY.displayName;let p=e=>{let{className:n,...t}=e;return(0,s.jsx)("div",{className:(0,u.cn)("flex flex-col space-y-1.5 text-center sm:text-left",n),...t})};p.displayName="DialogHeader";let g=a.forwardRef((e,n)=>{let{className:t,...r}=e;return(0,s.jsx)(l.Dx,{ref:n,className:(0,u.cn)("font-heading text-lg leading-none tracking-tight",t),...r})});g.displayName=l.Dx.displayName;let m=a.forwardRef((e,n)=>{let{className:t,...r}=e;return(0,s.jsx)(l.dk,{ref:n,className:(0,u.cn)("font-base text-sm text-black",t),...r})});m.displayName=l.dk.displayName;var b=t(278);let y=e=>{let{shouldScaleBackground:n=!0,...t}=e;return(0,s.jsx)(b.d.Root,{shouldScaleBackground:n,...t})};y.displayName="Drawer",b.d.Trigger;let v=b.d.Portal,w=b.d.Close,N=a.forwardRef((e,n)=>{let{className:t,...r}=e;return(0,s.jsx)(b.d.Overlay,{ref:n,className:(0,u.cn)("fixed inset-0 z-50 bg-black/80",t),...r})});N.displayName=b.d.Overlay.displayName;let z=a.forwardRef((e,n)=>{let{className:t,children:r,...o}=e;return(0,s.jsxs)(v,{children:[(0,s.jsx)(N,{}),(0,s.jsxs)(b.d.Content,{ref:n,className:(0,u.cn)("rounded-t-base fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col border-2 border-black bg-white p-6 font-bold",t),...o,children:[(0,s.jsx)("div",{className:"bg-bg mx-auto mb-2 h-2 w-[100px] rounded-full"}),r]})]})});z.displayName="DrawerContent";let C=e=>{let{className:n,...t}=e;return(0,s.jsx)("div",{className:(0,u.cn)("grid gap-1.5 py-4 font-bold sm:text-left",n),...t})};C.displayName="DrawerHeader";let k=e=>{let{className:n,...t}=e;return(0,s.jsx)("div",{className:(0,u.cn)("mt-auto flex flex-col gap-2 p-4 font-bold",n),...t})};k.displayName="DrawerFooter";let O=a.forwardRef((e,n)=>{let{className:t,...r}=e;return(0,s.jsx)(b.d.Title,{ref:n,className:(0,u.cn)("font-heading text-lg leading-none tracking-tight",t),...r})});O.displayName=b.d.Title.displayName;let P=a.forwardRef((e,n)=>{let{className:t,...r}=e;return(0,s.jsx)(b.d.Description,{ref:n,className:(0,u.cn)("font-base text-sm text-black",t),...r})});P.displayName=b.d.Description.displayName;var R=t(9176);function I(){let e=d(),[n,t]=(0,r.X)(),o=(0,a.useCallback)(()=>{t(!1),i.A.success("Successfully added new data-sources",{description:"Generating embeddings for the new sources"})},[t]);return e?(0,s.jsxs)(y,{open:!!open,onOpenChange:t,children:[(0,s.jsxs)(z,{children:[(0,s.jsxs)(C,{children:[(0,s.jsx)(O,{children:"Add data-source to your organization"}),(0,s.jsx)(P,{children:"Add your links to the docs, blogs & other help center docs"})]}),(0,s.jsx)(R.v,{onAdd:o,slug:n})]}),(0,s.jsx)(k,{children:(0,s.jsx)(w,{})})]}):(0,s.jsx)(x,{open:!!n,onOpenChange:t,children:(0,s.jsxs)(f,{children:[(0,s.jsxs)(p,{children:[(0,s.jsx)(g,{children:"Add data-source to your organization"}),(0,s.jsx)(m,{children:"Add your links to the docs, blogs & other help center docs"})]}),(0,s.jsx)(R.v,{onAdd:o,slug:n})]})})}var A=t(1996),D=t(8779),E=t(3321);function S(e){let{orgId:n}=e,[t,r]=(0,a.useState)([]);return(0,a.useEffect)(()=>{n&&(async()=>{let{data:e,error:t}=await (0,A.e)(n);t||r(e)})()},[n]),(0,s.jsxs)("div",{children:[(0,s.jsx)(E._,{children:"URLs"}),(0,s.jsx)("div",{className:"mt-2 flex flex-col gap-2",children:t.map(e=>(0,s.jsx)(D.I,{value:e.url,readOnly:!0},e.id))})]})}function V(){let e=d(),[n,t]=(0,r.J)();return e?(0,s.jsxs)(y,{open:!!n,onOpenChange:t,children:[(0,s.jsxs)(z,{children:[(0,s.jsxs)(C,{children:[(0,s.jsx)(O,{children:"View data-sources of your organization"}),(0,s.jsx)(P,{children:"Links to the docs, blogs & other help center docs"})]}),(0,s.jsx)(S,{orgId:n})]}),(0,s.jsx)(k,{children:(0,s.jsx)(w,{})})]}):(0,s.jsx)(x,{open:!!n,onOpenChange:t,children:(0,s.jsxs)(f,{children:[(0,s.jsxs)(p,{children:[(0,s.jsx)(g,{children:"View data-sources of your organization"}),(0,s.jsx)(m,{children:"Links to the docs, blogs & other help center docs"})]}),(0,s.jsx)(S,{orgId:n})]})})}var _=t(3936),L=t(3490);function T(){let e=d(),n=(0,_.useRouter)(),[t,r]=(0,o.yj)(),l=(0,a.useCallback)(e=>{r(!1),i.A.success("Successfully created your organization",{description:"Please wait while we redirect you!"}),n.push("/onboarding/".concat(e,"/email-forwarding")),n.refresh()},[n,r]);return e?(0,s.jsxs)(y,{open:t,onOpenChange:r,children:[(0,s.jsxs)(z,{children:[(0,s.jsxs)(C,{children:[(0,s.jsx)(O,{children:"Set up your organization"}),(0,s.jsx)(P,{children:"Tell us about your organization"})]}),(0,s.jsx)(L.$w,{onCreate:l})]}),(0,s.jsx)(k,{children:(0,s.jsx)(w,{})})]}):(0,s.jsx)(x,{open:t,onOpenChange:r,children:(0,s.jsxs)(f,{children:[(0,s.jsxs)(p,{children:[(0,s.jsx)(g,{children:"Set up your organization"}),(0,s.jsx)(m,{children:"Tell us about your organization"})]}),(0,s.jsx)(L.$w,{onCreate:l})]})})}var Y=t(2189);function F(){let e=d(),[n,t]=(0,o.pF)();return e?(0,s.jsxs)(y,{open:!!n,onOpenChange:t,children:[(0,s.jsxs)(z,{children:[(0,s.jsxs)(C,{children:[(0,s.jsx)(O,{children:"Update your organization"}),(0,s.jsx)(P,{children:"Update the details of your organization"})]}),(0,s.jsx)(Y.d,{})]}),(0,s.jsx)(k,{children:(0,s.jsx)(w,{})})]}):(0,s.jsx)(x,{open:!!n,onOpenChange:t,children:(0,s.jsxs)(f,{children:[(0,s.jsxs)(p,{children:[(0,s.jsx)(g,{children:"Update your organization"}),(0,s.jsx)(m,{children:"Update the details of your organization"})]}),(0,s.jsx)(Y.d,{})]})})}function U(){let e=d(),[n,t]=(0,o.Ev)(),r=(0,a.useCallback)(()=>{t(!1),i.A.success("Success",{description:"Invited user to your organization!"})},[t]);return e?(0,s.jsxs)(y,{open:!!n,onOpenChange:t,children:[(0,s.jsxs)(z,{children:[(0,s.jsxs)(C,{children:[(0,s.jsx)(O,{children:"Invite members to your organization"}),(0,s.jsx)(P,{children:"You can invite users to your organization"})]}),(0,s.jsx)(L.Pg,{orgId:n,onInvite:r})]}),(0,s.jsx)(k,{children:(0,s.jsx)(w,{})})]}):(0,s.jsx)(x,{open:!!n,onOpenChange:t,children:(0,s.jsxs)(f,{children:[(0,s.jsxs)(p,{children:[(0,s.jsx)(g,{children:"Invite members to your organization"}),(0,s.jsx)(m,{children:"You can invite users to your organization"})]}),(0,s.jsx)(L.Pg,{orgId:n,onInvite:r})]})})}function J(){let e=d(),[n,t]=(0,o.LR)();return e?(0,s.jsxs)(y,{open:!!n,onOpenChange:t,children:[(0,s.jsx)(z,{children:(0,s.jsxs)(C,{children:[(0,s.jsx)(O,{children:"View members of your organization"}),(0,s.jsx)(P,{children:"You can view members of your organization"})]})}),(0,s.jsx)(k,{children:(0,s.jsx)(w,{})})]}):(0,s.jsx)(x,{open:!!n,onOpenChange:t,children:(0,s.jsx)(f,{children:(0,s.jsxs)(p,{children:[(0,s.jsx)(g,{children:"View members of your organization"}),(0,s.jsx)(m,{children:"You can view members of your organization"})]})})})}function B(){let[e]=(0,o.yj)(),[n]=(0,o.pF)(),[t]=(0,r.X)(),[a]=(0,r.J)(),[i]=(0,o.Ev)(),[d]=(0,o.LR)();return(0,s.jsxs)(s.Fragment,{children:[e&&(0,s.jsx)(T,{}),!!n&&(0,s.jsx)(F,{}),!!t&&(0,s.jsx)(I,{}),!!a&&(0,s.jsx)(V,{}),!!i&&(0,s.jsx)(U,{}),!!d&&(0,s.jsx)(J,{})]})}},9387:function(e,n,t){"use strict";t.d(n,{JotaiProvider:function(){return o}});var s=t(6436);t(7881);var r=t(1273);function o(e){let{children:n}=e;return(0,s.jsx)(r.zt,{children:n})}},8482:function(e,n,t){"use strict";t.d(n,{Toaster:function(){return a}});var s=t(6436),r=t(1712),o=t(777);let a=e=>{let{...n}=e,{theme:t="system"}=(0,r.F)();return(0,s.jsx)(o.x,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-base",description:"group-[.toast]:text-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-foreground"}},...n})}},8448:function(e,n,t){"use strict";t.d(n,{X:function(){return a},J:function(){return d}});var s=t(9422),r=t(1273);let o=(0,s.cn)(!1),a=()=>(0,r.KO)(o),i=(0,s.cn)(!1),d=()=>(0,r.KO)(i)},846:function(){}},function(e){e.O(0,[374,792,188,273,649,475,204,254,74,835,525,744],function(){return e(e.s=1591)}),_N_E=e.O()}]);