1import{r as o,j as e}from"./vendor-react.l8Rnuy9A.bundle.js";import{a3 as L,fz as T,iu as v,ix as E,h as C,o as N}from"./index.entry.BuJoZZ4t.bundle.js";import{f as y,v as p,c as A,C as _}from"./vendor-antd.Yb1N6ZFd.bundle.js";import{T as G,i as w,b as I,a as M}from"./index.Dj-MTuMp.bundle.js";import"./vendor-sentry.CM8pNoEG.bundle.js";import"./clock.DTQHmIfw.bundle.js";import"./MobileSidebarMenu.Cu-AjQ57.bundle.js";import"./IconButton.BqYPbIYz.bundle.js";import"./index.Z5EvFCl8.bundle.js";import"./index.CXirXpWX.bundle.js";import"./DatePicker.BiE83B3X.bundle.js";import"./usePersistedPagination.Cmalla4d.bundle.js";import"./LoadingRows.c0forUdO.bundle.js";import"./columnWidths.yEd9owWx.bundle.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"[email protected]+71849ab"};var t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="51f9a75c-a972-49c3-9ae6-121f5cdba97c",s._sentryDebugIdIdentifier="sentry-dbid-51f9a75c-a972-49c3-9ae6-121f5cdba97c")}catch{}})();const R=({label:s,description:t})=>e.jsxs("span",{children:[s,e.jsx("br",{}),e.jsx("span",{className:"hp-text-color-black-60 hp-text-color-dark-40",style:{fontSize:12},children:t})]}),j=s=>s.map(t=>({key:t.key,label:R(t)})),Q=()=>{const{team:s,canAdmin:t}=o.useContext(G),n=L(),[r,l]=o.useState(null),[d,b]=o.useState(!0),[c,f]=o.useState(!1),[S,g]=o.useState(!1),[k,x]=o.useState(!1),u=o.useCallback(()=>{s?.uuid&&(b(!0),g(!1),n(T(s.uuid)).then(({payload:a})=>{w(a)?l(a):g(!0)}).finally(()=>b(!1)))},[s?.uuid,n]);o.useEffect(()=>{u()},[u]),o.useEffect(()=>{if(!d){x(!1);return}const a=setTimeout(()=>x(!0),400);return()=>clearTimeout(a)},[d]);const m=(a,i)=>{if(!s?.uuid||!t||c)return;const D=r;l(a),f(!0),n(E({teamUuid:s.uuid,settings:a})).then(({payload:h})=>{w(h)?(l(h),C({title:i,body:""})):(l(D),N({title:"Error",body:h?.errors?.[0]?.message||"Could not update access settings. Please try again."}))}).finally(()=>f(!1))};return d?k?e.jsxs("div",{"aria-hidden":!0,style:{padding:32},children:[e.jsx(y,{active:!0,title:{width:"30%"},paragraph:{rows:4}}),e.jsx(p,{}),e.jsx(y,{active:!0,title:{width:"30%"},paragraph:{rows:1}})]}):null:S||!r?e.jsxs("div",{children:[e.jsx("p",{className:"hp-text-color-black-80",children:"We couldn't load your team's access settings. Please try again."}),e.jsx(A,{type:"primary",onClick:u,children:"Try again"})]}):e.jsxs("div",{children:[!t&&e.jsx("p",{className:"hp-text-color-black-60",style:{fontStyle:"italic"},children:"These settings are managed by your team admins. You can view them here, but only admins can make changes."}),e.jsx("h3",{className:"hp-mb-sm-0",children:"Default member access"}),e.jsx("p",{children:"The access level a regular member gets on team resources that use the default audience. Restricted resources and explicit grants are unaffected."}),e.jsx(v,{name:"baseMemberLevel",value:r.baseMemberLevel,onChange:(a,i)=>{i!==r.baseMemberLevel&&m({...r,baseMemberLevel:i},"Default member access updated")},options:j(I),disabled:!t||c}),e.jsx(p,{className:"hp-border-color-black-40 hp-border-color-dark-80"}),e.jsx("h3",{className:"hp-mb-sm-0",children:"Default guest access"}),e.jsx("p",{children:"The access level a guest gets on team resources that use the default audience. Guests are read-only, so this stops at View. Set it to No access to give guests nothing by default and grant them individual resources instead."}),e.jsx(v,{name:"baseGuestLevel",value:r.baseGuestLevel,onChange:(a,i)=>{i!==r.baseGuestLevel&&m({...r,baseGuestLevel:i},"Default guest access updated")},options:j(M),disabled:!t||c}),e.jsx(p,{className:"hp-border-color-black-40 hp-border-color-dark-80"}),e.jsx("h3",{className:"hp-mb-sm-0",children:"Downloads"}),e.jsx("p",{children:"Allow members to download raw files from team resources by default. This applies on top of the levels above: someone with View can open a resource, but cannot download its raw data unless this is on."}),e.jsx(_,{checked:r.baseCanDownload,disabled:!t||c,onChange:a=>m({...r,baseCanDownload:a.target.checked},`Default downloads ${a.target.checked?"enabled":"disabled"}`),children:"Allow downloads by default"})]})};export{Q 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.