import{n as e}from"./Notification-CxaUkThL.js";var t=new Set([`Missing CSRF token`,`Invalid CSRF token`,`CSRF token expired`]);async function n(n,r){let i=await fetch(n,r);if(i.status===400){let n=null;try{n=await i.clone().json()}catch(e){console.debug(`apiFetch: response body is not JSON`,e)}n&&t.has(n.error)&&e.error(`_common.csrf_error_desc`,`_common.csrf_error`)}return i}export{n as t};