text: /**
   * @Version 7.0.2
   * @Author: ta7sudan
   * @Repo: https://github.com/ta7sudan/apiz-browser-client#readme
   * @License: MIT
   */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("tinyjx")):"function"==typeof define&&define.amd?define(["tinyjx"],b):(a=a||self,a.ApizClient=b(a.tinyjx))})(this,function(a){'use strict';function b(){return b=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},b.apply(this,arguments)}function c(a){return!!(a&&"function"==typeof a.then)}async function d(a,{retry:b,beforeRetry:f},g=1){let h=null;if(0>b||b>Number.MAX_SAFE_INTEGER&&b!==1/0)throw new Error("retry must be between 0 to Number.MAX_SAFE_INTEGER or be Infinity");try{h=a.call(this),c(h)&&(h=await h)}catch(c){if(f&&f(g,c),b)return d(a,{retry:--b,beforeRetry:f},++g);throw c}return h}function e({method:c,beforeSend:g,afterResponse:h,error:i,retry:j=0}){return async function({url:k,options:l,body:m,headers:o={},type:n,handleError:p=!0}){let q;if(q=l?b({},l,{url:k,method:c}):{url:k,method:c,processData:!1,data:m,contentType:n,headers:o},f(g)){const a=await g(q);if(!1===a)throw new Error("apiz: cancel")}let r,s;try{r=await d(()=>new Promise((c,d)=>{a.ajax(b({},q,{success(a,b){c({data:a,xhr:b})},recoverableError(a,b,c){d({status:"recoverableError",data:b,xhr:c,err:a})},unrecoverableError(a,b){d({status:"unrecoverableError",data:void 0,xhr:b,err:a})}}))}),{retry:j})}catch(a){s=a}const t=r&&r.data||s&&s.data,u=r&&!s?"success":"error",v=r&&r.xhr||s&&s.xhr;if((r||s&&"recoverableError"===s.status)&&f(h)&&(await h(t,u,v,k,m)),s){let a=!1;if(f(i)&&p&&(a=await i(s.status,s.err,s.data,s.xhr)),!1===a||void 0===a)throw new Error(`Error: ${s.err.message}, URL: ${k}, Method: ${c}`);else return a}else return r}}const f=a=>"function"==typeof a;return function(a={}){return["get","head","post","put","patch","delete","options"].reduce((c,d)=>(c[d]=e(b({},a,{method:d.toUpperCase()})),c),{})}});
  //# sourceMappingURL=apizclient.min.js.map
  