PageSourceSearch

https://app.independently.ai/_next/static/chunks/949.5f121d9d49975cc6.js

js independently.ai collected 2026-10-05 12:04:56 UTC 10,842 bytes, 2 lines download raw bytes

1try{let e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="836dce94-f296-442a-87e6-10a6100478f3",e._sentryDebugIdIdentifier="sentry-dbid-836dce94-f296-442a-87e6-10a6100478f3")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[949],{35949:(e,a,i)=>{i.r(a),i.d(a,{default:()=>en});var t,s=i(6029),n=i(8263),r=i(5494),l=i(65847),o=i(58716),d=i(18836),c=i(47592),p=i(15962),h=i(86366),x=i(95043),g=i(73177),f=i(84),u=i(15657),y=i(7691),m=i(80764),A=i(5690),b=i(10074),C=i(27166),_=i(31407),j=i(55729),w=i(29733),I=i(6929),k=i(54768),T=i(82409),v=i(12193),R=i(44981),D=i(14387),K=i(11208),N=i(40452),S=i(51401),L=i(74335),E=i(53099),O=i(98148),B=i(40670),M=i(18556),q=i(21709),P=i(77241),W=i(44866),Y=i(38788),$=i(9922),z=i.n($),G=i(1909),V=i(25282),J=i(54300),Z=i(73421);let F=e=>{let{isOpen:a,setIsOpen:i}=e,{t}=(0,w.Bd)("app",{i18n:_.A}),[n,r,o]=(0,Y.A)(e=>[e.currentApiKey,e.clearCurrentApiKey,e.setDeleteApiKey]),[c,g]=(0,k.e)(""),f=()=>{i(!1)},u=(0,K.hw)({mutation:{onSuccess:()=>{r(),o(n.id),f()},meta:{showToast:!0,toastMessage:t("api_key")}}});return(0,s.jsxs)(J.A,{open:a,onClose:f,className:"dont-close-modal",PaperProps:{sx:{overflow:"visible"}},sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,s.jsx)(x.A,{position:"sticky",sx:{borderTopLeftRadius:{xs:"0px",md:l.f.shape.pageCurl},borderTopRightRadius:{xs:"0px",md:l.f.shape.pageCurl},boxShadow:`0 8px 6px -6px ${l.f.palette.greyish.dark}`},children:(0,s.jsx)(m.A,{text:t("archive_api_key"),showClose:f,isFloatingClose:!0,isModal:!0,children:(0,s.jsxs)(d.A,{sx:{display:"flex"},children:[(0,s.jsx)(h.A,{onClick:f,children:t("cancel")}),(0,s.jsx)(b.A,{icon:"trash-can",text:t("archive"),callback:()=>{u.mutate(n)},disabled:c!==n.externalId,isError:!0})]})})}),(0,s.jsxs)(d.A,{sx:{height:`calc(100% - (${l.f.shape.headerBarHeight}px + ${l.f.spacing(3)}))`,padding:l.f.spacing(2),display:"flex",flexDirection:"column"},children:[(0,s.jsx)(p.A,{variant:"body2",sx:{marginTop:l.f.spacing()},children:t("confirm_key_desc",{id:n.externalId})}),(0,s.jsx)(p.A,{variant:"body2",sx:{marginTop:l.f.spacing()},children:t("confirm_key_archive",{id:n.externalId})}),(0,s.jsx)(Z.A,{fullWidth:!0,value:c,size:"small",onChange:e=>{g(e.target.value)},placeholder:n.externalId})]})]})};var H=i(65234);let U=e=>{let{tokenValue:a,isOpen:i,setIsOpen:t}=e,{t:n}=(0,w.Bd)("app",{i18n:_.A}),r=()=>{t(!1)};return(0,s.jsx)(J.A,{open:i,onClose:r,sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)(d.A,{sx:{bgcolor:l.f.palette.white.main,borderRadius:l.f.shape.pageCurl,display:"flex",flexDirection:"column",alignItems:"center",padding:l.f.spacing(3),boxShadow:l.f.shadows[5],minWidth:400,maxWidth:600},children:[(0,s.jsx)(y.Z,{icon:"circle-check",style:{fontSize:"2rem",color:l.f.palette.success.main}}),(0,s.jsx)(p.A,{variant:"subtitle1",sx:{textAlign:"center",marginTop:l.f.spacing(1),fontWeight:600},children:n("api_key_created")??"API Key Created"}),(0,s.jsx)(p.A,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",marginTop:l.f.spacing(.5),marginBottom:l.f.spacing(2)},children:"Copy this token now. It will not be shown again."}),a?(0,s.jsx)(d.A,{sx:{width:"100%",bgcolor:l.f.palette.grey[100],borderRadius:1,padding:l.f.spacing(1.5),marginBottom:l.f.spacing(2),wordBreak:"break-all",fontFamily:"monospace",fontSize:"0.85rem",textAlign:"center",border:`1px solid ${l.f.palette.divider}`},children:a}):(0,s.jsx)(p.A,{variant:"body2",color:"error",sx:{textAlign:"center",marginBottom:2},children:'The API key could not be displayed. Create a new key or contact support. Use the value that starts with "indly." — not the row id (ato_…).'}),(0,s.jsx)(C.A,{title:n("copy_key"),children:(0,s.jsx)(H.CopyToClipboard,{text:a,children:(0,s.jsx)(h.A,{fullWidth:!0,variant:"contained",disabled:!a,sx:{boxShadow:0},startIcon:(0,s.jsx)(y.Z,{icon:"copy"}),children:n("copy")??"Copy Token"})})}),(0,s.jsx)(h.A,{fullWidth:!0,onClick:r,variant:"outlined",sx:{boxShadow:0,marginTop:l.f.spacing(1)},children:n("close")})]})})},X=T.u.valueSeq().toArray(),Q=[{code:v.h.CLIENT_ADMINISTRATOR,label:"Administrator",description:"Can create and manage workers, templates, engagements, and all company settings"},{code:v.h.CLIENT_HIRING_MANAGER,label:"Hiring Manager",description:"Can manage own engagements and profile"},{code:v.h.CLIENT_LEGAL,label:"Legal",description:"Read-only access to engagements and workers"}],ee=[{code:v.h.VENDOR_ADMINISTRATOR,label:"Administrator",description:"Can create workers, manage clients, and manage all vendor company settings"},{code:v.h.VENDOR_MANAGER,label:"Manager",description:"Can create engagements and workers, and view most company settings"}];function ea(e){return e===N.c.vendor?v.h.VENDOR_ADMINISTRATOR:v.h.CLIENT_ADMINISTRATOR}let ei=()=>{let{t:e}=(0,w.Bd)("app",{i18n:_.A}),a=(0,f.useNavigate)(),i=(0,f.useLocation)(),[t,r]=(0,k.e)(!1),[l,o]=(0,k.e)(!1),[c,p]=(0,k.e)(!1),[h,x]=(0,k.e)(!1),[g,y]=(0,k.e)(""),[m,A]=(0,k.e)(null),b=(0,j.useMemo)(()=>m===N.c.vendor?ee:Q,[m]),[C,I,T,$,J,Z,H,ei]=(0,Y.A)(e=>[e.isEditPage,e.setIsEditPage,e.isApiKeysOpen,e.setIsApiKeysOpen,e.setNewApiKey,e.currentApiKey,e.setCurrentApiKey,e.clearCurrentApiKey]),et=(0,G.mN)({resolver:(0,R.t)(V.Ik({externalId:V.Yj().required(e("external_id_required")),label:V.Yj().required(e("label_required")),_createdCompany:V.Yj().required(e("company_required")??"Company is required"),_roleTemplate:V.Yj().required(e("role_required")??"Role is required")})),defaultValues:{externalId:(0,S.g)(),_roleTemplate:v.h.CLIENT_ADMINISTRATOR}}),es=(0,j.useCallback)((e,a)=>{let i=a._companyType??null;A(i);let t=ea(i);et.setValue("_roleTemplate",t,{shouldDirty:!0})},[et,A]),en=(0,j.useCallback)(()=>
1{$(!1),ei(),C&&(I(!1),a({search:()=>({})}))},[C]),er={mutation:{onSuccess:({data:e})=>{J(e?.data),ei(),en();let a=e.data._token;y("string"==typeof a?a:""),C||p(!0)},meta:{showToast:!0,toastMessage:e("api_key"),isCreate:!C,isUpdate:C}}},el=(0,K.vr)(er),eo=(0,K.uo)(er),ed=et.handleSubmit(e=>{"custom"!==e.expirationType&&delete e.expirationDate;let a=e._createdCompany,i=e._roleTemplate;if(C)eo.mutate({id:Z.id,data:(0,L.Y)(e,Z),params:W.o.apiKeyGridDefaultParams});else{let t=(0,L.Y)(e);a&&(t._createdCompany=a),i&&(t._roleTemplate=i),el.mutate({_new:!0,data:t,params:W.o.apiKeyGridDefaultParams})}});(0,j.useEffect)(()=>{et.reset(z()(Z))},[Z]);let ec=(0,K.s0)(i.current.search.apiKeyId,{archived:!0},{query:{onSuccess:({data:e})=>{H(e.data)}}});(0,j.useEffect)(()=>{T&&i.current.search.apiKeyId&&ec.refetch()},[T,i.current.search.apiKeyId]),(0,j.useEffect)(()=>{r(ec.isFetching||el.isLoading||eo.isLoading)},[ec.isFetching,el.isLoading,eo.isLoading]);let{isValid:ep}=(0,G.lN)({control:et.control}),eh=e=>{et.trigger(e)};return(0,s.jsxs)(d.A,{children:[(0,s.jsx)(P.A,{isOpen:T,closeSidebar:en,headerText:e(C?"edit_api_key":"new_api_key"),hideDelete:!C,deleteCallback:()=>{(0,u._m)([n.J.Delete,"ApiToken"])&&x(!0)},saveCallback:ed,isLoading:t,isDirty:et.formState.isDirty,isInvalid:!ep,isCustomDelete:!0,children:(0,s.jsxs)("form",{children:[(0,s.jsx)(O.A,{formConfig:et,onBlur:eh}),(0,s.jsx)(B.A,{fieldKey:"label",labelKey:"label",placeholder:e("label"),icon:D.O4.name,formConfig:et,onChangeCallback:eh,isRequired:!0}),(0,s.jsx)(q.y,{fieldKey:"_createdCompany",labelKey:"company",icon:"building",formConfig:et,disabled:C,handleChange:es,isRequired:!0}),(0,s.jsx)(E.A,{fieldKey:"_roleTemplate",labelKey:"role",icon:"shield-halved",list:b,fieldDefault:ea(m),formConfig:et,disabled:C,isRequired:!0,showDesc:!0}),(0,s.jsx)(E.A,{fieldKey:"expirationType",labelKey:"expiration_type",icon:"timer",list:X,fieldDefault:W.o.defaults.accessToken.expiration,formConfig:et,onChangeCallback:(e,a)=>{o("custom"===a)}}),l&&(0,s.jsx)(M.A,{fieldKey:"expirationDate",labelKey:"expiration_date",formConfig:et})]})}),(0,s.jsx)(U,{tokenValue:g,isOpen:c,setIsOpen:p}),(0,s.jsx)(F,{isOpen:h,setIsOpen:x})]})};var et=((t=et||{}).API_KEYS="apiKeys",t);let es=[{page:"apiKeys",icon:"code",label:"api_keys",permission:(0,u._m)([n.J.Read,"ApiToken"]),createPermission:(0,u._m)([n.J.Create,"ApiToken"]),showRefresh:!0,newButtonLabel:"api_key",newButtonIcon:"plus"}],en=()=>{let{t:e}=(0,w.Bd)("app",{i18n:_.A}),a=(0,f.useNavigate)(),i=(0,f.useMatches)(),[t]=(0,I.y)(e=>[e.userType]),[T,v,R]=(0,Y.A)(e=>[e.integrationsLoading,e.setIsApiKeysOpen,e.setRefreshIntegrations]),[D,K]=(0,k.e)({});return(0,j.useEffect)(()=>{let e=es.filter(e=>e.page===i[0].route.path);0===e.length?(a({to:"apiKeys",replace:!0}),[e]=es):[e]=e,K(e),t===o.ut.ADMINISTRATOR&&(0,u._m)([r.p.ReadIntegrations,"Company"])||a({to:(0,u.Xb)()})},[]),(0,s.jsxs)(d.A,{sx:{display:"flex"},children:[(0,s.jsx)(d.A,{sx:{width:"100%",bgcolor:l.f.palette.white.main,borderTopLeftRadius:{xs:"0px",md:l.f.shape.pageCurl},zIndex:2},children:(0,s.jsxs)(c.Ay,{anchor:"left",open:!0,variant:"persistent",sx:{height:`calc(100% - ${l.f.spacing(4)})`,width:l.f.shape.filterBarWidth,"& .MuiDrawer-paper":{position:"relative",boxSizing:"border-box",width:l.f.shape.filterBarWidth,bgcolor:"transparent",border:"none",overflow:"hidden"}},children:[(0,s.jsxs)(d.A,{sx:{display:"flex",alignItems:"center",padding:l.f.spacing(1)},children:[(0,s.jsx)(y.Z,{icon:"plug"}),(0,s.jsx)(p.A,{sx:{paddingLeft:l.f.spacing(1)},children:e("integrations")})]}),es.map(i=>i.permission&&(0,s.jsxs)(h.A,{onClick:()=>{K(i),a({to:i.page,replace:!0})},sx:{color:D?.page===i.page?l.f.palette.blue.main:l.f.palette.white.contrastText,display:"flex",flexDirection:"row",width:"100%",justifyContent:"start",alignItems:"center"},children:[(0,s.jsx)(y.Z,{icon:i.icon}),(0,s.jsx)(p.A,{sx:{paddingLeft:l.f.spacing(1)},children:e(i.label)})]},i.page))]})}),(0,s.jsxs)(d.A,{sx:{width:`calc(100% - (${l.f.shape.filterBarWidth}px + ${l.f.shape.mainSidebarWidth}))`,borderTopLeftRadius:{xs:"0px",md:l.f.shape.pageCurl},position:"fixed",height:"100%",overflow:"visible",right:0,zIndex:3,boxShadow:10,bgcolor:l.f.palette.white.main},children:[(0,s.jsxs)(x.A,{position:"sticky",children:[(0,s.jsx)(m.A,{icon:"plug",text:e("integrations"),breadcrumbs:[{id:"1",label:""!==D.label?e(D.label):""}],showStatus:!0,showShadow:!0,children:(0,s.jsxs)(d.A,{sx:{display:"flex"},children:[D.showRefresh&&(0,s.jsx)(C.A,{title:e("refresh"),children:(0,s.jsx)(A.A,{onClick:()=>{R(!0)},children:(0,s.jsx)(y.Z,{icon:"sync"})})}),D.createPermission&&(0,s.jsx)(C.A,{title:e(D?.newButtonLabel),children:(0,s.jsx)(b.A,{icon:D?.newButtonIcon,text:e(D?.newButtonLabel),callback:()=>{"apiKeys"===D.page&&v(!0)}})})]})}),T?(0,s.jsx)(g.A,{}):null]}),(0,s.jsx)(f.Outlet,{})]}),((0,u._m)([n.J.Create,"ApiToken"])||(0,u._m)([n.J.Update,"ApiToken"]))&&(0,s.jsx)(ei,{})]})}}}]);
2//# sourceMappingURL=949.5f121d9d49975cc6.js.map

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.