1import{aJ as c}from"./vendor-DpgEi8MM.js";import{g as d,k as h}from"./index-Cty89QO7.js";const g=2e4;function m(n,t){var i,o,a;const e=(i=n==null?void 0:n.response)==null?void 0:i.status,s=(a=(o=n==null?void 0:n.response)==null?void 0:o.data)==null?void 0:a.error;return s||(e===400?"Der Link ist ungültig, abgelaufen oder wurde schon benutzt.":e===401?"Das hat nicht geklappt. Bitte prüfe deine Eingabe.":e===409?"Diese E-Mail-Adresse wird bereits verwendet.":e===503?"Das ist gerade nicht möglich. Bitte versuche es später noch einmal.":(n==null?void 0:n.code)==="ECONNABORTED"?"Die Verbindung hat zu lange gedauert. Bitte versuche es noch einmal.":n!=null&&n.response?t:"Keine Verbindung zum Server. Prüfe deine Internetverbindung.")}async function r(n,t,e,s){var i,o;try{const a=await c.post(`${d()}${n}`,t,{timeout:g,headers:s?{Authorization:s}:void 0});return{ok:!0,meldung:"",accessToken:h((i=a==null?void 0:a.data)==null?void 0:i.access_token,(o=a==null?void 0:a.data)==null?void 0:o.refresh_token)}}catch(a){return{ok:!1,meldung:m(a,e)}}}function f(n,t){return r("/auth/password-reset/confirm",{token:n,password:t},"Das Passwort konnte nicht gesetzt werden.")}function p(n){return r("/auth/email/verify/confirm",{token:n},"Die Adresse konnte nicht bestätigt werden.")}function D(n){return r("/auth/email/change/confirm",{token:n},"Der Wechsel konnte nicht abgeschlossen werden.")}function _(n){return r("/auth/password-reset/request",{email:n},"Die E-Mail konnte nicht angefordert werden.")}function b(n,t){return r("/auth/register",{email:n,password:t,origin:u()},"Das Konto konnte nicht angelegt werden.")}function E(n,t){return r("/auth/login",{email:n,password:t,origin:u()},"Anmeldung nicht möglich.")}function v(n,t,e){return r("/auth/password/change",{current_password:t,new_password:e},"Das Passwort konnte nicht geändert werden.",n)}function A(n,t,e){return r("/auth/email/change",{new_email:t,password:e},"Der Wechsel konnte nicht angestoÃen werden.",n)}const T="ao_oauth_next",P="ao_oauth_method";async function O(n){var t;try{const e=await c.get(`${d()}/auth/oauth/${n}/start`,{timeout:g});return((t=e==null?void 0:e.data)==null?void 0:t.url)??null}catch{return null}}function y(n,t,e){return r(`/auth/oauth/${n}/callback`,{code:t,state:e,origin:u()},"Die Anmeldung konnte nicht abgeschlossen werden.")}function u(){var n,t;try{return(t=(n=window.navigator)==null?void 0:n.userAgent)==null?void 0:t.slice(0,200)}catch{return}}export{T as O,P as a,_ as b,p as c,D as d,y as e,A as f,v as g,E as l,O as o,b as r,f as s};
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.