1import{b as o}from"./d2906HEn.js";const l=async r=>{let a=null;const n=await fetch(`${o}/auths/admin/details`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n},d=async r=>{let a=null;const n=await fetch(`${o}/auths/admin/config`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n},p=async(r,a)=>{let n=null;const t=await fetch(`${o}/auths/admin/config`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(a)}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,null));if(n)throw n;return t},y=async r=>{let a=null;const n=await fetch(`${o}/auths/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},credentials:"include"}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n},f=async(r,a)=>{let n=null;const t=await fetch(`${o}/auths/ldap`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({user:r,password:a})}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,null));if(n)throw n;return t},w=async(r="")=>{let a=null;const n=await fetch(`${o}/auths/admin/config/ldap`,{method:"GET",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n},j=async(r="",a)=>{let n=null;const t=await fetch(`${o}/auths/admin/config/ldap`,{method:"POST",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}},body:JSON.stringify({enable_ldap:a})}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,null));if(n)throw n;return t},T=async(r="")=>{let a=null;const n=await fetch(`${o}/auths/admin/config/ldap/server`,{method:"GET",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n},g=async(r="",a)=>{let n=null;const t=await fetch(`${o}/auths/admin/config/ldap/server`,{method:"POST",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}},body:JSON.stringify(a)}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,null));if(n)throw n;return t},m=async r=>{let a=null;const n=await fetch(`${o}/auths/admin/config/oauth`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n},$=async(r,a)=>{let n=null;const t=await fetch(`${o}/auths/admin/config/oauth`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(a)}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,null));if(n)throw n;return t},S=async(r,a)=>{let n=null;const t=await fetch(`${o}/auths/signin`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:r,password:a})}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,null));if(n)throw n;return t},C=async(r,a,n,t)=>{let e=null;const i=await fetch(`${o}/auths/signup`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({name:r,email:a,password:n,profile_image_url:t})}).then(async s=>{if(!s.ok)throw await s.json();return s.json()}).catch(s=>(e=s.detail,null));if(e)throw e;return i},O=async()=>{let r=null;const a=await fetch(`${o}/auths/signout`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"}).then(async n=>{if(!n.ok)throw await n.json();return n.json()}).catch(n=>(r=n.detail,null));if(r)throw r;return sessionStorage.clear(),a},A=async(r,a,n,t,e="pending",i=null)=>{let s=null;const c=await fetch(`${o}/auths/add`,{method:"POST",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}},body:JSON.stringify({name:a,email:n,password:t,role:e,...i&&{profile_image_url:i}})}).then(async h=>{if(!h.ok)throw await h.json();return h.json()}).catch(h=>(s=h.detail,null));if(s)throw s;return c},z=async(r,a)=>{let n=null;const t=await fetch(`${o}/auths/update/profile`,{method:"POST",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}},body:JSON.stringify({...a})}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,Array.isArray(n)&&(n=n.map(i=>i.msg).join("; ")),null));if(n)throw n;return t},B=async(r,a)=>{await fetch(`${o}/auths/update/timezone`,{method:"POST",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}},body:JSON.stringify({timezone:a})}).catch(n=>{})}
1,P=async(r,a,n)=>{let t=null;const e=await fetch(`${o}/auths/update/password`,{method:"POST",headers:{"Content-Type":"application/json",...r&&{authorization:`Bearer ${r}`}},body:JSON.stringify({password:a,new_password:n})}).then(async i=>{if(!i.ok)throw await i.json();return i.json()}).catch(i=>(t=i.detail,null));if(t)throw t;return e},k=async r=>{let a=null;const n=await fetch(`${o}/auths/api_key`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n.api_key},b=async r=>{let a=null;const n=await fetch(`${o}/auths/api_key`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(a=t.detail,null));if(a)throw a;return n.api_key},E=async(r,a)=>{let n=null;const t=await fetch(`${o}/auths/oauth/sessions/${encodeURIComponent(a)}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async e=>{if(!e.ok)throw await e.json();return e.json()}).catch(e=>(n=e.detail,null));if(n)throw n;return t};export{B as a,C as b,O as c,A as d,P as e,b as f,y as g,z as h,k as i,d as j,p as k,f as l,T as m,m as n,w as o,j as p,g as q,$ as r,l as s,E as t,S as u}; 2//# sourceMappingURL=C_MjVUKC.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.