"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3911],{15152:(e,r,a)=>{a.d(r,{XC:()=>t.X}),a(93208);var t=a(85190);a(95155),a(12115),a(21586)},23403:(e,r,a)=>{a.d(r,{N:()=>l});var t=a(95155),s=a(12115),o=a(24717);function l(e){let{mainGradient:r="linear-gradient(125deg, rgb(20, 20, 40) 0%, rgb(30, 30, 58) 50%, rgb(20, 20, 40) 100%)",overlayGradient:a="bg-gradient-to-br from-purple-800/15 via-transparent to-purple-700/15",topBarGradient:l="bg-gradient-to-r from-transparent via-yellow-400/70 to-purple-400/70",decorations:n=!0,className:d="",children:i}=e,g=(0,s.useRef)(null);return(0,s.useEffect)(()=>{g.current},[]),(0,t.jsxs)("div",{className:"relative overflow-hidden ".concat(d),style:{background:r,opacity:1},children:[(0,t.jsx)("canvas",{ref:g,className:"absolute inset-0 pointer-events-none z-10","aria-hidden":"true"}),(0,t.jsx)("div",{className:"absolute inset-0 ".concat(a)}),(0,t.jsx)("div",{className:"absolute top-0 left-0 w-full h-1 ".concat(l)}),(0,t.jsx)("div",{className:"absolute -top-24 -right-24 w-48 h-48 bg-purple-600/10 rounded-full blur-3xl"}),(0,t.jsx)("div",{className:"absolute -bottom-32 -left-32 w-64 h-64 bg-yellow-600/10 rounded-full blur-3xl"}),n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute top-4 left-[10%] text-yellow-300/30",style:{transform:"scale(1.09941) rotate(14.911deg)"},children:(0,t.jsx)(o.HiStar,{className:"w-6 h-6 fill-current"})}),(0,t.jsx)("div",{className:"absolute bottom-4 right-[15%] text-purple-300/30",style:{transform:"scale(1.09513) rotate(-14.2689deg)"},children:(0,t.jsx)(o.HiStar,{className:"w-8 h-8 fill-current"})}),(0,t.jsx)("div",{className:"absolute top-[40%] left-[5%] w-24 h-[1px] bg-yellow-400/30 rotate-45"}),(0,t.jsx)("div",{className:"absolute bottom-[30%] right-[5%] w-16 h-[1px] bg-purple-400/30 -rotate-45"})]}),i]})}},23911:(e,r,a)=>{a.d(r,{In:()=>t.In,gu:()=>s.g});var t=a(5935);a(59505);var s=a(34965);a(70522),a(23403),a(60548),a(96102),a(15152),a(65269)},54252:(e,r,a)=>{a.d(r,{$:()=>l});var t=a(95155),s=a(12115),o=a(52596);let l=(0,s.forwardRef)((e,r)=>{let{children:a,color:l="primary",size:n="md",variant:d="solid",fullWidth:i=!1,isLoading:g=!1,leftIcon:c,rightIcon:x,className:u,disabled:b,preventDoubleClick:y=!0,onClick:h,...m}=e,f=(0,s.useRef)(0);return(0,t.jsxs)("button",{ref:r,disabled:b||g,onClick:e=>{if(b||g){e.preventDefault(),e.stopPropagation();return}if(y){let r=Date.now();if(r-f.current<500){e.preventDefault(),e.stopPropagation();return}f.current=r}h&&h(e)},className:(0,o.$)("inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900",{primary:{solid:"bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500 dark:bg-primary-600 dark:hover:bg-primary-700",outline:"border border-primary-600 text-primary-600 hover:bg-primary-50 focus:ring-primary-500 dark:border-primary-500 dark:text-primary-500 dark:hover:bg-gray-800",ghost:"text-primary-600 hover:bg-primary-50 focus:ring-primary-500 dark:text-primary-500 dark:hover:bg-gray-800"},secondary:{solid:"bg-gray-200 text-gray-800 hover:bg-gray-300 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600",outline:"border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-gray-200 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",ghost:"text-gray-700 hover:bg-gray-100 focus:ring-gray-200 dark:text-gray-300 dark:hover:bg-gray-800"},success:{solid:"bg-green-600 text-white hover:bg-green-700 focus:ring-green-500 dark:bg-green-600 dark:hover:bg-green-700",outline:"border border-green-600 text-green-600 hover:bg-green-50 focus:ring-green-500 dark:border-green-500 dark:text-green-500 dark:hover:bg-gray-800",ghost:"text-green-600 hover:bg-green-50 focus:ring-green-500 dark:text-green-500 dark:hover:bg-gray-800"},danger:{solid:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500 dark:bg-red-600 dark:hover:bg-red-700",outline:"border border-red-600 text-red-600 hover:bg-red-50 focus:ring-red-500 dark:border-red-500 dark:text-red-500 dark:hover:bg-gray-800",ghost:"text-red-600 hover:bg-red-50 focus:ring-red-500 dark:text-red-500 dark:hover:bg-gray-800"},warning:{solid:"bg-yellow-500 text-white hover:bg-yellow-600 focus:ring-yellow-400 dark:bg-yellow-600 dark:hover:bg-yellow-700",outline:"border border-yellow-500 text-yellow-500 hover:bg-yellow-50 focus:ring-yellow-400 dark:border-yellow-400 dark:text-yellow-400 dark:hover:bg-gray-800",ghost:"text-yellow-500 hover:bg-yellow-50 focus:ring-yellow-400 dark:text-yellow-400 dark:hover:bg-gray-800"},info:{solid:"bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-400 dark:bg-blue-600 dark:hover:bg-blue-700",outline:"border border-blue-500 text-blue-500 hover:bg-blue-50 focus:ring-blue-400 dark:border-blue-400 dark:text-blue-400 dark:hover:bg-gray-800",ghost:"text-blue-500 hover:bg-blue-50 focus:ring-blue-400 dark:text-blue-400 dark:hover:bg-gray-800"},light:{solid:"bg-gray-50 text-gray-900 hover:bg-gray-100 focus:ring-gray-100 dark:bg-gray-600 dark:text-white dark:hover:bg-gray-500",outline:"border border-gray-200 text-gray-900 hover:bg-gray-50 focus:ring-gray-100 dark:border-gray-700 dark:text-white dark:hover:bg-gray-800",ghost:"text-gray-900 hover:bg-gray-50 focus:ring-gray-100 dark:text-white dark:hover:bg-gray-800"},dark:{solid:"bg-gray-900 text-white hover:bg-gray-800 focus:ring-gray-800 dark:bg-gray-800 dark:hover:bg-gray-700",outline:"border border-gray-900 text-gray-900 hover:bg-gray-100 focus:ring-gray-800 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700",ghost:"text-gray-900 hover:bg-gray-100 focus:ring-gray-800 dark:text-white dark:hover:bg-gray-700"}}[l][d],{xs:"px-2 py-1 text-xs",sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-5 py-2.5 text-base",xl:"px-6 py-3 text-base"}[n],i?"w-full":"",(b||g)&&"opacity-50 cursor-not-allowed pointer-events-none",u),...m,children:[g&&(0,t.jsxs)("div",{className:"mr-2 relative",children:[(0,t.jsxs)("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),(0,t.jsx)("path",{className:"opacity-90",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,t.jsx)("div",{className:"absolute inset-0 h-4 w-4 bg-current opacity-10 rounded-full blur-sm animate-pulse"})]}),!g&&c&&(0,t.jsx)("span",{className:"mr-2",children:c}),a,!g&&x&&(0,t.jsx)("span",{className:"ml-2",children:x})]})});l.displayName="Button"},59505:(e,r,a)=>{a.d(r,{p:()=>n,J:()=>d});var t=a(95155),s=a(3294),o=a(12115),l=a(5935);let n=(0,o.forwardRef)((e,r)=>{let{className:a,variant:o="default",type:n="text",error:d,icon:i,rightIcon:g,onRightIconClick:c,...x}=e;return(0,t.jsxs)("div",{className:"relative",children:[i&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,t.jsx)(l.In,{name:i,className:"text-gray-400 dark:text-white/50 group-focus-within:text-secondary transition-colors duration-300",size:"sm"})}),(0,t.jsx)("input",{type:n,className:(0,s.cn)("block w-full text-sm focus:outline-none focus:ring-1 transition-all",{default:"rounded-lg border border-transparent bg-white dark:bg-[#232834] text-gray-900 dark:text-white/80 placeholder-gray-400 dark:placeholder-white/50 px-4 py-2.5 focus:ring-2 focus:ring-secondary hover:shadow-[0_0_0_5px_var(--tw-shadow-color)] hover:shadow-secondary/30",pill:"rounded-full border border-transparent bg-white dark:bg-[#232834] text-gray-900 dark:text-white/80 placeholder-gray-400 dark:placeholder-white/50 px-6 py-2.5 focus:ring-2 focus:ring-secondary hover:shadow-[0_0_0_5px_var(--tw-shadow-color)] hover:shadow-secondary/30",signin:"h-11 rounded-lg border border-transparent bg-white dark:bg-[#232834] px-10 text-gray-900 dark:text-white/80 shadow-sm placeholder-gray-400 dark:placeholder-white/50 focus:ring-2 focus:ring-secondary transition-all"}[o],i&&"pl-10",g&&"pr-10",d&&"border-danger focus:border-danger focus:ring-danger",a),ref:r,...x}),g&&(0,t.jsx)("button",{type:"button",onClick:c,className:"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 dark:text-white/50 hover:text-secondary",children:(0,t.jsx)(l.In,{name:g,size:"sm"})})]})});n.displayName="Input";let d=(0,o.forwardRef)((e,r)=>{let{className:a,children:o,...l}=e;return(0,t.jsx)("label",{ref:r,className:(0,s.cn)("block text-sm font-medium text-text-secondary dark:text-text-secondary",a),...l,children:o})});d.displayName="Label"},60548:(e,r,a)=>{a.d(r,{o:()=>o});var t=a(95155),s=a(12115);let o=e=>{let{src:r,alt:a="",className:o="",fallbackIcon:l,...n}=e,[d,i]=(0,s.useState)(!1);return d?l||(0,t.jsx)("div",{className:"flex items-center justify-center bg-slate-800 text-slate-400 ".concat(o),style:{minHeight:80},"aria-label":"Image not found",children:(0,t.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-12 h-12",children:[(0,t.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,t.jsx)("line",{x1:"3",y1:"3",x2:"21",y2:"21"})]})}):(0,t.jsx)("img",{src:r,alt:a,className:o,onError:()=>i(!0),...n})}},70522:(e,r,a)=>{a.d(r,{$:()=>t.$});var t=a(54252)},93208:(e,r,a)=>{a.d(r,{d:()=>d});var t=a(95155),s=a(12115),o=a(5935),l=a(59505),n=a(34965);let d=e=>{let{organizations:r,onSelectOrganization:a,onCreateOrganization:d,selectedOrganizationId:i,glossyBorder:g=!0,defaultExpanded:c=!1,placement:x="bottom",variant:u="default",showPopover:b=!0,className:y="",onManageMembers:h,onSettingOrganization:m,currentOrganizationId:f}=e,[p,k]=(0,s.useState)(""),[v,w]=(0,s.useState)(c),j=(0,s.useRef)(null),N=(0,s.useRef)(null),[z,C]=(0,s.useState)(0),H=r.filter(e=>e.name.toLowerCase().includes(p.toLowerCase())),I=i?r.find(e=>e.id===i):void 0;return(0,s.useEffect)(()=>{let e=e=>{j.current&&!j.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{N.current&&C(N.current.offsetWidth)},[v]),(0,t.jsxs)("div",{className:"relative w-full ".concat(y),ref:j,children:["mini"===u?(0,t.jsx)("button",{ref:N,onClick:()=>w(!v),className:"flex w-full items-center justify-center rounded-lg p-1.5 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700",children:(null==I?void 0:I.logo)?(0,t.jsx)(n.g,{src:I.logo,size:"sm",glossyBorder:g}):(0,t.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full ".concat(g?"border border-gray-200/20 bg-gradient-to-b from-gray-600/50 to-gray-800/50 shadow-sm dark:border-gray-700/50 dark:from-gray-700/50 dark:to-gray-900/50":"bg-gray-800 dark:bg-gray-900"),children:(0,t.jsx)(o.In,{name:"HiOfficeBuilding",className:"text-white",size:"sm"})})}):(0,t.jsx)("button",{ref:N,onClick:()=>w(!v),className:"flex w-full items-center gap-2 rounded-lg bg-white px-2.5 py-1.5 text-gray-800 shadow-sm ring-1 ring-gray-200/50 transition-all hover:bg-gray-50 hover:ring-gray-300/50 focus:outline-none focus:ring-2 focus:ring-blue-500/50 dark:bg-gray-800 dark:text-gray-100 dark:ring-gray-700/50 dark:hover:bg-gray-700/80 dark:hover:ring-gray-600/50",children:I?(0,t.jsxs)(t.Fragment,{children:[I.logo?(0,t.jsx)(n.g,{src:I.logo,size:"md",glossyBorder:g}):(0,t.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full ".concat(g?"border-2 border-gray-200/20 bg-gradient-to-b from-gray-600/50 to-gray-800/50 shadow-lg dark:border-gray-700/50 dark:from-gray-700/50 dark:to-gray-900/50":"bg-gray-800 dark:bg-gray-900"),children:(0,t.jsx)(o.In,{name:"HiOfficeBuilding",className:"text-white",size:"sm"})}),(0,t.jsx)("span",{className:"text-sm font-medium",children:I.name}),(0,t.jsx)(o.In,{name:v?"HiChevronUp":"HiChevronDown",className:"ml-auto text-gray-500 dark:text-gray-400",size:"md"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full ".concat(g?"border-2 border-gray-200/20 bg-gradient-to-b from-gray-600/50 to-gray-800/50 shadow-lg dark:border-gray-700/50 dark:from-gray-700/50 dark:to-gray-900/50":"bg-gray-800 dark:bg-gray-900"),children:(0,t.jsx)(o.In,{name:"HiOfficeBuilding",className:"text-white",size:"sm"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-400 dark:text-gray-500",children:"Select organization"}),(0,t.jsx)(o.In,{name:v?"HiChevronUp":"HiChevronDown",className:"ml-auto text-gray-500 dark:text-gray-400",size:"sm"})]})}),v&&b&&(0,t.jsxs)("div",{className:"\n absolute z-50 ".concat({top:"bottom-full mb-2",bottom:"top-full mt-2",left:"right-full mr-2 -translate-y-1/2 top-1/2",right:"left-full ml-2 -translate-y-1/2 top-1/2"}[x]," animate-in\n fade-in zoom-in-95 w-full overflow-hidden rounded-lg bg-white\n shadow-xl ring-1 ring-gray-200/50\n transition-all duration-200 ease-out\n dark:bg-gray-800 dark:shadow-gray-900/50 dark:ring-gray-700/50\n "),children:[(()=>{if(!I)return null;let e=!!f&&I.id===f;return(0,t.jsxs)("div",{className:"border-b border-gray-200 dark:border-gray-700/50 px-2 pt-2 pb-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide",children:[(0,t.jsx)(o.In,{name:"HiCog",size:"xs",className:"text-gray-400 dark:text-gray-500"}),"Organization Actions"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[m&&!e&&(0,t.jsxs)("button",{onClick:()=>{m(I),w(!1)},className:"flex items-center gap-1 rounded px-2 py-1 text-xs font-medium text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-blue-900/30",title:"Set as Current Organization",children:[(0,t.jsx)(o.In,{name:"HiSwitchHorizontal",className:"text-current",size:"xs"}),"Set as Current"]}),h&&(0,t.jsxs)("button",{onClick:()=>{h(I),w(!1)},className:"flex items-center gap-1 rounded px-2 py-1 text-xs font-medium text-green-600 hover:bg-green-50 dark:text-green-400 dark:hover:bg-green-900/30",title:"Manage Members",children:[(0,t.jsx)(o.In,{name:"HiUserAdd",className:"text-current",size:"xs"}),"Add Member"]})]})]})})(),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(o.In,{name:"HiSearch",className:"absolute left-2 top-1/2 -translate-y-1/2 transform text-gray-400 dark:text-gray-500",size:"xs"}),(0,t.jsx)(l.p,{type:"text",placeholder:"Search organization...",value:p,onChange:e=>k(e.target.value),className:"w-full py-1.5 pl-7 text-xs dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 dark:placeholder-gray-400"})]})}),(0,t.jsx)("div",{className:"max-h-[220px] overflow-y-auto px-1.5 pb-1.5",children:(0,t.jsx)("div",{className:"space-y-0.5",children:H.length>0?H.map(e=>(0,t.jsxs)("button",{onClick:()=>{a(e),w(!1)},className:"\n flex w-full items-center gap-2 rounded-md px-2 py-1.5\n transition-colors hover:bg-gray-100 dark:hover:bg-gray-700/80\n ".concat(e.id===i?"bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"text-gray-700 dark:text-gray-200","\n "),children:[e.logo?(0,t.jsx)(n.g,{src:e.logo,size:"sm",glossyBorder:g}):(0,t.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full ".concat(g?"border border-gray-200/20 bg-gradient-to-b from-gray-600/50 to-gray-800/50 shadow-sm dark:border-gray-700/50 dark:from-gray-700/50 dark:to-gray-900/50":"bg-gray-800 dark:bg-gray-900"),children:(0,t.jsx)(o.In,{name:"HiOfficeBuilding",className:"text-white",size:"xs"})}),(0,t.jsx)("span",{className:"text-left text-xs font-medium",children:e.name}),i&&e.id===i&&(0,t.jsx)(o.In,{name:"HiCheck",className:"ml-auto text-blue-600 dark:text-blue-400",size:"xs"})]},e.id)):(0,t.jsx)("div",{className:"px-2 py-1.5 text-xs text-gray-500 dark:text-gray-400",children:"No organization found."})})}),(0,t.jsx)("div",{className:"border-t border-gray-200 p-1.5 dark:border-gray-700/50",children:(0,t.jsxs)("button",{onClick:()=>{d(),w(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-blue-600 transition-colors hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-blue-900/30",children:[(0,t.jsx)(o.In,{name:"HiOfficeBuilding",className:"text-current",size:"xs"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Manage Organizations"})]})})]})]})}},96102:(e,r,a)=>{a.d(r,{m:()=>l});var t=a(95155),s=a(3294),o=a(37040);a(12115);let l=e=>{let{children:r,content:a,className:l,delayDuration:n=200,contentProps:d}=e;return(0,t.jsx)(o.Kq,{delayDuration:n,children:(0,t.jsxs)(o.bL,{children:[(0,t.jsx)(o.l9,{asChild:!0,children:r}),(0,t.jsx)(o.ZL,{children:(0,t.jsxs)(o.UC,{sideOffset:6,className:(0,s.cn)("z-50 rounded-md bg-gray-900 px-2 py-1 text-xs text-white shadow-lg data-[state=delayed-open]:animate-fade-in","border border-border",l),...d,children:[a,(0,t.jsx)(o.i3,{className:"fill-gray-900"})]})})]})})};l.displayName="Tooltip"}}]);