PageSourceSearch

https://five9sc.ai/assets/index-d175b4ed.js

js five9sc.ai collected 2026-10-05 15:21:45 UTC 10,374 bytes, 4 lines download raw bytes

1import{R as l,r,g as M,j as e,U as S,b5 as V,y as E,z as I,aU as A,aV as H,B as Z,C as y,E as L,c as z,W as B,o as F,a4 as O,i as $,V as T,S as W,M as P}from"../index.js";import{A as f}from"./admin-04b020fe.js";import{h as R}from"./moment-2f8b2688.js";import{w as D}from"./Check-7e83fb0d.js";import{C as U}from"./Copy-d323e545.js";const Y=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,56l-96,88L32,56Z",opacity:"0.2"}),l.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,144H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM208.58,62,128,135.86,47.42,62ZM216,194H40a2,2,0,0,1-2-2V69.64l86,78.78a6,6,0,0,0,8.1,0L218,69.64V192A2,2,0,0,1,216,194Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-10.28,8L128,138.57,42.28,60ZM216,196H40a4,4,0,0,1-4-4V65.09L125.3,147a4,4,0,0,0,5.4,0L220,65.09V192A4,4,0,0,1,216,196Z"}))]]);var _=Object.defineProperty,J=Object.defineProperties,q=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,w=(t,a,s)=>a in t?_(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,Q=(t,a)=>{for(var s in a||(a={}))G.call(a,s)&&w(t,s,a[s]);if(v)for(var s of v(a))K.call(a,s)&&w(t,s,a[s]);return t},X=(t,a)=>J(t,q(a));const j=r.forwardRef((t,a)=>l.createElement(M,X(Q({ref:a},t),{weights:Y})));j.displayName="EnvelopeSimple";function ee({invite:t}){var i,p;const a=r.useRef(null),[s,x]=r.useState(t.status),[o,c]=r.useState(!1),d=async()=>{if(!window.confirm(`Are you sure you want to deactivate this invite?
2After you do this it will not longer be useable.
3
4This action is irreversible.`))return!1;a!=null&&a.current&&(a.current.children[0].innerText="Disabled"),x("disabled"),await f.disableInvite(t.id)},m=()=>{if(!t)return!1;window.navigator.clipboard.writeText(`${window.location.origin}/accept-invite/${t.code}`),c(!0)};return r.useEffect(()=>{function h(){if(!o)return!1;setTimeout(()=>{c(!1)},3e3)}h()},[o]),e.jsx(e.Fragment,{children:e.jsxs("tr",{ref:a,className:"bg-transparent text-white text-opacity-80 text-xs font-medium border-b border-white/10 h-10",children:[e.jsx("td",{scope:"row",className:"px-6 whitespace-nowrap",children:S(s)}),e.jsx("td",{className:"px-6",children:t.claimedBy?((i=t.claimedBy)==null?void 0:i.username)||"deleted user":"--"}),e.jsx("td",{className:"px-6",children:((p=t.createdBy)==null?void 0:p.username)||"deleted user"}),e.jsx("td",{className:"px-6",children:R(t.createdAt).format("lll")}),e.jsx("td",{className:"px-6 flex items-center gap-x-6 h-full mt-1",children:s==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:m,disabled:o,className:"text-xs font-medium text-blue-300 rounded-lg hover:text-blue-400 hover:underline",children:o?"Copied":"Copy Invite Link"}),e.jsx("button",{onClick:d,className:"text-xs font-medium text-white/80 light:text-black/80 hover:light:text-red-500 hover:text-red-300 rounded-lg px-2 py-1 hover:bg-white hover:light:bg-red-50 hover:bg-opacity-10",children:e.jsx(V,{className:"h-5 w-5"})})]})})]})})}function te({closeModal:t,onSuccess:a}){const[s,x]=r.useState(null),[o,c]=r.useState(null),[d,m]=r.useState(!1),[i,p]=r.useState([]),[h,g]=r.useState([]),N=async n=>{c(null),n.preventDefault();
4const{invite:u,error:b}=await f.newInvite({role:null,workspaceIds:h});u&&(x(u),a()),c(b)},k=()=>{if(!s)return!1;window.navigator.clipboard.writeText(`${window.location.origin}/accept-invite/${s.code}`),m(!0),z("Invite link copied to clipboard","success",{clear:!0})},C=n=>{if(h.includes(n)){const u=h.filter(b=>b!==n);g(u);return}g([...h,n])};return r.useEffect(()=>{function n(){if(!d)return!1;setTimeout(()=>{m(!1)},3e3)}n()},[d]),r.useEffect(()=>{async function n(){B.all().then(u=>p(u)).catch(()=>p([]))}n()},[]),e.jsxs("form",{onSubmit:N,className:"flex flex-col gap-y-5",children:[e.jsx(E,{title:"Create new invite",onClose:t}),e.jsxs(I,{children:[o&&e.jsxs("p",{className:"text-red-400 text-sm",children:["Error: ",o]}),s&&e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"url",defaultValue:`${window.location.origin}/accept-invite/${s.code}`,disabled:!0,className:"w-full h-[34px] px-3.5 pr-10 text-sm rounded-lg outline-none bg-zinc-800 border border-zinc-800 text-zinc-100 placeholder:text-zinc-400 light:bg-white light:border-slate-300 light:text-slate-900 light:placeholder:text-slate-400 focus:border-sky-500 light:focus:border-sky-500"}),e.jsx("button",{type:"button",onClick:k,disabled:d,className:"border-none absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-md hover:bg-zinc-800 light:hover:bg-slate-100 transition-all duration-300",children:d?e.jsx(D,{size:20,className:"text-green-400",weight:"bold"}):e.jsx(U,{size:20,className:"text-slate-50 light:text-slate-900",weight:"bold"})})]}),e.jsxs("p",{className:"text-zinc-400 light:text-slate-600 text-xs md:text-sm",children:["After creation you will be able to copy the invite and send it to a new user where they can create an account as the ",e.jsx("b",{children:"default"})," role and automatically be added to workspaces selected."]}),i.length>0&&!s&&e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex flex-col gap-y-1 mb-2",children:[e.jsx(A,{htmlFor:"workspaces",children:"Auto-add invitee to workspaces"}),e.jsx(H,{children:"You can optionally automatically assign the user to the workspaces below by selecting them. By default, the user will not have any workspaces visible. You can assign workspaces later post-invite acceptance."})]}),e.jsx("div",{className:"flex flex-col gap-y-2 mt-2",children:i.map(n=>e.jsx(ae,{workspace:n,selected:h.includes(n.id),toggleSelection:C},n.id))})]})]}),e.jsx(Z,{className:s?"justify-end":void 0,children:s?e.jsx(y,{onClick:t,type:"button",children:"Close"}):e.jsxs(e.Fragment,{children:[e.jsx(y,{onClick:t,type:"button",children:"Cancel"}),e.jsx(L,{type:"submit",children:"Create Invite"})]})})]})}function ae({workspace:t,selected:a,toggleSelection:s}){return e.jsxs("button",{type:"button",onClick:()=>s(t.id),className:`transition-all duration-300 w-full h-11 p-2.5 rounded-lg flex justify-start items-center gap-2.5 cursor-pointer border ${a?"border-theme-sidebar-item-workspace-active bg-theme-bg-secondary":"border-theme-sidebar-border"} hover:border-theme-sidebar-border hover:bg-theme-bg-secondary`,children:[e.jsx("input",{type:"radio",name:"workspace",value:t.id,checked:a,className:"hidden"}),e.jsx("div",{className:`w-4 h-4 rounded-full border-2 border-theme-sidebar-border mr-2 ${a?"bg-[var(--theme-sidebar-item-workspace-active)]":""}`}),e.jsx("div",{className:"text-theme-text-primary text-sm font-medium font-['Plus Jakarta Sans'] leading-tight",children:t.name})]})}function oe(){const{isOpen:t,openModal:a,closeModal:s}=F(),[x,o]=r.useState(!0),[c,d]=r.useState([]),m=async()=>{const i=await f.invites();d(i),o(!1)};return r.useEffect(()=>{m()},[]),e.jsxs("div",{className:"w-screen h-screen overflow-hidden bg-theme-bg-container flex",children:[e.jsx(O,{}),e.jsxs("div",{style:{height:$?"100%":"calc(100% - 32px)"},className:"relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-theme-bg-secondary w-full h-full overflow-y-scroll p-4 md:p-0",children:[e.jsxs("div",{className:"flex flex-col w-full px-1 md:pl-6 md:pr-[50px] md:py-6 py-16",children:[e.jsxs("div",{className:"w-full flex flex-col gap-y-1 pb-6 border-white/10 border-b-2",children:[e.jsx("div",{className:"items-center flex gap-x-4",children:e.jsx("p",{className:"text-lg leading-6 font-bold text-theme-text-primary",children:"Invitations"})}),e.jsx("p",{className:"text-xs leading-[18px] font-base text-theme-text-secondary mt-2",children:"Create invitation links for people in your organization to accept and sign up with. Invitations can only be used by a single user."})]}),e.jsx("div",{className:"w-full justify-end flex",children:e.jsxs(T,{onClick:a,className:"mt-3 mr-0 mb-4 md:-mb-12 z-10",children:[e.jsx(j,{className:"h-4 w-4",weight:"bold"})," Create Invite Link"]})}),e.jsx("div",{className:"overflow-x-auto mt-6",children:x?e.jsx(W,{height:"80vh",width:"100%",highlightColor:"var(--theme-bg
4-primary)",baseColor:"var(--theme-bg-secondary)",count:1,className:"w-full p-4 rounded-b-2xl rounded-tr-2xl rounded-tl-sm",containerClassName:"flex w-full"}):e.jsxs("table",{className:"w-full text-xs text-left rounded-lg min-w-[640px] border-spacing-0",children:[e.jsx("thead",{className:"text-theme-text-secondary text-xs leading-[18px] font-bold uppercase border-white/10 border-b",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-6 py-3 rounded-tl-lg",children:"Status"}),e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Accepted By"}),e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Created By"}),e.jsx("th",{scope:"col",className:"px-6 py-3",children:"Created"}),e.jsx("th",{scope:"col",className:"px-6 py-3 rounded-tr-lg",children:" "})]})}),e.jsx("tbody",{children:c.length===0?e.jsx("tr",{className:"bg-transparent text-theme-text-secondary text-sm font-medium",children:e.jsx("td",{colSpan:"5",className:"px-6 py-4 text-center",children:"No invitations found"})}):c.map(i=>e.jsx(ee,{invite:i},i.id))})]})})]}),e.jsx(P,{isOpen:t,onClose:s,children:e.jsx(te,{closeModal:s,onSuccess:m})})]})]})}export{oe 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.