"use strict";function p(n="POST",s,o,t={}){return new Promise((c,i)=>{const e=new XMLHttpRequest;e.open(n,s);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.setRequestHeader(r,t[r]);e.responseType="json",e.send(JSON.stringify(o)),e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&e.status===200&&c(e.response)},e.onerror=()=>{i(new Error("** An error occurred during the transaction"))}})}module.exports=p;
