"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(o,c,t=!1)=>new Promise((a,i)=>{fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(c)}).then(function(n){n.status!==200&&i(n),t&&a(n.blob()),n.json().then(function(e){a(e)}).catch(()=>a(n.status))}).catch(function(n){i(n)})}),p=async(o,c={})=>{try{const t=await fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"}});if(!t.ok)throw t;return await t.json()}catch(t){throw t}};exports.get=p;exports.post=s;
