@akad/sdk 1.0.19 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ts-lib.js CHANGED
@@ -6,30 +6,30 @@ function Be(e, t) {
6
6
  const { toString: nt } = Object.prototype, { getPrototypeOf: le } = Object, K = /* @__PURE__ */ ((e) => (t) => {
7
7
  const n = nt.call(t);
8
8
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
9
- })(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => K(t) === e), v = (e) => (t) => typeof t === e, { isArray: U } = Array, $ = v("undefined");
9
+ })(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => K(t) === e), v = (e) => (t) => typeof t === e, { isArray: q } = Array, $ = v("undefined");
10
10
  function rt(e) {
11
11
  return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
12
12
  }
13
- const qe = A("ArrayBuffer");
13
+ const Fe = P("ArrayBuffer");
14
14
  function st(e) {
15
15
  let t;
16
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qe(e.buffer), t;
16
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Fe(e.buffer), t;
17
17
  }
18
- const ot = v("string"), R = v("function"), Fe = v("number"), W = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, M = (e) => {
18
+ const ot = v("string"), R = v("function"), Ue = v("number"), W = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, M = (e) => {
19
19
  if (K(e) !== "object")
20
20
  return !1;
21
21
  const t = le(e);
22
22
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
23
- }, at = A("Date"), ct = A("File"), ut = A("Blob"), lt = A("FileList"), ft = (e) => W(e) && R(e.pipe), dt = (e) => {
23
+ }, at = P("Date"), ct = P("File"), ut = P("Blob"), lt = P("FileList"), ft = (e) => W(e) && R(e.pipe), dt = (e) => {
24
24
  let t;
25
25
  return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = K(e)) === "formdata" || // detect form-data instance
26
26
  t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
27
- }, pt = A("URLSearchParams"), [ht, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(A), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
27
+ }, ht = P("URLSearchParams"), [pt, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
28
28
  function I(e, t, { allOwnKeys: n = !1 } = {}) {
29
29
  if (e === null || typeof e > "u")
30
30
  return;
31
31
  let r, s;
32
- if (typeof e != "object" && (e = [e]), U(e))
32
+ if (typeof e != "object" && (e = [e]), q(e))
33
33
  for (r = 0, s = e.length; r < s; r++)
34
34
  t.call(null, e[r], r, e);
35
35
  else {
@@ -39,7 +39,7 @@ function I(e, t, { allOwnKeys: n = !1 } = {}) {
39
39
  u = o[r], t.call(null, e[u], u, e);
40
40
  }
41
41
  }
42
- function Ue(e, t) {
42
+ function qe(e, t) {
43
43
  t = t.toLowerCase();
44
44
  const n = Object.keys(e);
45
45
  let r = n.length, s;
@@ -51,8 +51,8 @@ function Ue(e, t) {
51
51
  const Le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, _e = (e) => !$(e) && e !== Le;
52
52
  function re() {
53
53
  const { caseless: e } = _e(this) && this || {}, t = {}, n = (r, s) => {
54
- const o = e && Ue(t, s) || s;
55
- M(t[o]) && M(r) ? t[o] = re(t[o], r) : M(r) ? t[o] = re({}, r) : U(r) ? t[o] = r.slice() : t[o] = r;
54
+ const o = e && qe(t, s) || s;
55
+ M(t[o]) && M(r) ? t[o] = re(t[o], r) : M(r) ? t[o] = re({}, r) : q(r) ? t[o] = r.slice() : t[o] = r;
56
56
  };
57
57
  for (let r = 0, s = arguments.length; r < s; r++)
58
58
  arguments[r] && I(arguments[r], n);
@@ -82,10 +82,10 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
82
82
  }, Ot = (e) => {
83
83
  if (!e)
84
84
  return null;
85
- if (U(e))
85
+ if (q(e))
86
86
  return e;
87
87
  let t = e.length;
88
- if (!Fe(t))
88
+ if (!Ue(t))
89
89
  return null;
90
90
  const n = new Array(t);
91
91
  for (; t-- > 0; )
@@ -104,12 +104,12 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
104
104
  for (; (n = e.exec(t)) !== null; )
105
105
  r.push(n);
106
106
  return r;
107
- }, Ct = A("HTMLFormElement"), kt = (e) => e.toLowerCase().replace(
107
+ }, kt = P("HTMLFormElement"), Ct = (e) => e.toLowerCase().replace(
108
108
  /[-_\s]([a-z\d])(\w*)/g,
109
109
  function(n, r, s) {
110
110
  return r.toUpperCase() + s;
111
111
  }
112
- ), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = A("RegExp"), De = (e, t) => {
112
+ ), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = P("RegExp"), De = (e, t) => {
113
113
  const n = Object.getOwnPropertyDescriptors(e), r = {};
114
114
  I(n, (s, o) => {
115
115
  let i;
@@ -130,15 +130,15 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
130
130
  });
131
131
  }
132
132
  });
133
- }, qt = (e, t) => {
133
+ }, Ft = (e, t) => {
134
134
  const n = {}, r = (s) => {
135
135
  s.forEach((o) => {
136
136
  n[o] = !0;
137
137
  });
138
138
  };
139
- return U(e) ? r(e) : r(String(e).split(t)), n;
140
- }, Ft = () => {
141
- }, Ut = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", $e = {
139
+ return q(e) ? r(e) : r(String(e).split(t)), n;
140
+ }, Ut = () => {
141
+ }, qt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", $e = {
142
142
  DIGIT: ye,
143
143
  ALPHA: Z,
144
144
  ALPHA_DIGIT: Z + Z.toUpperCase() + ye
@@ -159,7 +159,7 @@ const Dt = (e) => {
159
159
  return;
160
160
  if (!("toJSON" in r)) {
161
161
  t[s] = r;
162
- const o = U(r) ? [] : {};
162
+ const o = q(r) ? [] : {};
163
163
  return I(r, (i, u) => {
164
164
  const f = n(i, s + 1);
165
165
  !$(f) && (o[u] = f);
@@ -169,18 +169,18 @@ const Dt = (e) => {
169
169
  return r;
170
170
  };
171
171
  return n(e, 0);
172
- }, $t = A("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), c = {
173
- isArray: U,
174
- isArrayBuffer: qe,
172
+ }, $t = P("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), c = {
173
+ isArray: q,
174
+ isArrayBuffer: Fe,
175
175
  isBuffer: rt,
176
176
  isFormData: dt,
177
177
  isArrayBufferView: st,
178
178
  isString: ot,
179
- isNumber: Fe,
179
+ isNumber: Ue,
180
180
  isBoolean: it,
181
181
  isObject: W,
182
182
  isPlainObject: M,
183
- isReadableStream: ht,
183
+ isReadableStream: pt,
184
184
  isRequest: mt,
185
185
  isResponse: yt,
186
186
  isHeaders: gt,
@@ -191,7 +191,7 @@ const Dt = (e) => {
191
191
  isRegExp: xt,
192
192
  isFunction: R,
193
193
  isStream: ft,
194
- isURLSearchParams: pt,
194
+ isURLSearchParams: ht,
195
195
  isTypedArray: At,
196
196
  isFileList: lt,
197
197
  forEach: I,
@@ -202,22 +202,22 @@ const Dt = (e) => {
202
202
  inherits: Et,
203
203
  toFlatObject: St,
204
204
  kindOf: K,
205
- kindOfTest: A,
205
+ kindOfTest: P,
206
206
  endsWith: Rt,
207
207
  toArray: Ot,
208
208
  forEachEntry: Pt,
209
209
  matchAll: Nt,
210
- isHTMLForm: Ct,
210
+ isHTMLForm: kt,
211
211
  hasOwnProperty: me,
212
212
  hasOwnProp: me,
213
213
  // an alias to avoid ESLint no-prototype-builtins detection
214
214
  reduceDescriptors: De,
215
215
  freezeMethods: Bt,
216
- toObjectSet: qt,
217
- toCamelCase: kt,
218
- noop: Ft,
219
- toFiniteNumber: Ut,
220
- findKey: Ue,
216
+ toObjectSet: Ft,
217
+ toCamelCase: Ct,
218
+ noop: Ut,
219
+ toFiniteNumber: qt,
220
+ findKey: qe,
221
221
  global: Le,
222
222
  isContextDefined: _e,
223
223
  ALPHABET: $e,
@@ -302,54 +302,54 @@ function Q(e, t, n) {
302
302
  metaTokens: !0,
303
303
  dots: !1,
304
304
  indexes: !1
305
- }, !1, function(h, w) {
306
- return !c.isUndefined(w[h]);
305
+ }, !1, function(p, w) {
306
+ return !c.isUndefined(w[p]);
307
307
  });
308
308
  const r = n.metaTokens, s = n.visitor || a, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
309
309
  if (!c.isFunction(s))
310
310
  throw new TypeError("visitor must be a function");
311
- function l(p) {
312
- if (p === null)
311
+ function l(h) {
312
+ if (h === null)
313
313
  return "";
314
- if (c.isDate(p))
315
- return p.toISOString();
316
- if (!f && c.isBlob(p))
314
+ if (c.isDate(h))
315
+ return h.toISOString();
316
+ if (!f && c.isBlob(h))
317
317
  throw new y("Blob is not supported. Use a Buffer instead.");
318
- return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
318
+ return c.isArrayBuffer(h) || c.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
319
319
  }
320
- function a(p, h, w) {
321
- let E = p;
322
- if (p && !w && typeof p == "object") {
323
- if (c.endsWith(h, "{}"))
324
- h = r ? h : h.slice(0, -2), p = JSON.stringify(p);
325
- else if (c.isArray(p) && Ht(p) || (c.isFileList(p) || c.endsWith(h, "[]")) && (E = c.toArray(p)))
326
- return h = He(h), E.forEach(function(b, _) {
320
+ function a(h, p, w) {
321
+ let E = h;
322
+ if (h && !w && typeof h == "object") {
323
+ if (c.endsWith(p, "{}"))
324
+ p = r ? p : p.slice(0, -2), h = JSON.stringify(h);
325
+ else if (c.isArray(h) && Ht(h) || (c.isFileList(h) || c.endsWith(p, "[]")) && (E = c.toArray(h)))
326
+ return p = He(p), E.forEach(function(b, _) {
327
327
  !(c.isUndefined(b) || b === null) && t.append(
328
328
  // eslint-disable-next-line no-nested-ternary
329
- i === !0 ? ge([h], _, o) : i === null ? h : h + "[]",
329
+ i === !0 ? ge([p], _, o) : i === null ? p : p + "[]",
330
330
  l(b)
331
331
  );
332
332
  }), !1;
333
333
  }
334
- return se(p) ? !0 : (t.append(ge(w, h, o), l(p)), !1);
334
+ return se(h) ? !0 : (t.append(ge(w, p, o), l(h)), !1);
335
335
  }
336
336
  const d = [], m = Object.assign(Jt, {
337
337
  defaultVisitor: a,
338
338
  convertValue: l,
339
339
  isVisitable: se
340
340
  });
341
- function g(p, h) {
342
- if (!c.isUndefined(p)) {
343
- if (d.indexOf(p) !== -1)
344
- throw Error("Circular reference detected in " + h.join("."));
345
- d.push(p), c.forEach(p, function(E, N) {
341
+ function g(h, p) {
342
+ if (!c.isUndefined(h)) {
343
+ if (d.indexOf(h) !== -1)
344
+ throw Error("Circular reference detected in " + p.join("."));
345
+ d.push(h), c.forEach(h, function(E, N) {
346
346
  (!(c.isUndefined(E) || E === null) && s.call(
347
347
  t,
348
348
  E,
349
349
  c.isString(N) ? N.trim() : N,
350
- h,
350
+ p,
351
351
  m
352
- )) === !0 && g(E, h ? h.concat(N) : [N]);
352
+ )) === !0 && g(E, p ? p.concat(N) : [N]);
353
353
  }), d.pop();
354
354
  }
355
355
  }
@@ -473,14 +473,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qt
473
473
  hasStandardBrowserEnv: vt,
474
474
  hasStandardBrowserWebWorkerEnv: Wt,
475
475
  origin: Qt
476
- }, Symbol.toStringTag, { value: "Module" })), O = {
476
+ }, Symbol.toStringTag, { value: "Module" })), A = {
477
477
  ...Xt,
478
478
  ...Kt
479
479
  };
480
480
  function Zt(e, t) {
481
- return Q(e, new O.classes.URLSearchParams(), Object.assign({
481
+ return Q(e, new A.classes.URLSearchParams(), Object.assign({
482
482
  visitor: function(n, r, s, o) {
483
- return O.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
483
+ return A.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
484
484
  }
485
485
  }, t));
486
486
  }
@@ -575,8 +575,8 @@ const j = {
575
575
  maxContentLength: -1,
576
576
  maxBodyLength: -1,
577
577
  env: {
578
- FormData: O.classes.FormData,
579
- Blob: O.classes.Blob
578
+ FormData: A.classes.FormData,
579
+ Blob: A.classes.Blob
580
580
  },
581
581
  validateStatus: function(t) {
582
582
  return t >= 200 && t < 300;
@@ -859,7 +859,7 @@ const V = (e, t, n = 3) => {
859
859
  };
860
860
  d[t ? "download" : "upload"] = !0, e(d);
861
861
  }, n);
862
- }, dn = O.hasStandardBrowserEnv ? (
862
+ }, dn = A.hasStandardBrowserEnv ? (
863
863
  // Standard browser envs have full support of the APIs needed to test
864
864
  // whether the request URL is of the same origin as current location.
865
865
  function() {
@@ -890,7 +890,7 @@ const V = (e, t, n = 3) => {
890
890
  return !0;
891
891
  };
892
892
  }()
893
- ), pn = O.hasStandardBrowserEnv ? (
893
+ ), hn = A.hasStandardBrowserEnv ? (
894
894
  // Standard browser envs support document.cookie
895
895
  {
896
896
  write(e, t, n, r, s, o) {
@@ -917,17 +917,17 @@ const V = (e, t, n = 3) => {
917
917
  }
918
918
  }
919
919
  );
920
- function hn(e) {
920
+ function pn(e) {
921
921
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
922
922
  }
923
923
  function mn(e, t) {
924
924
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
925
925
  }
926
926
  function ve(e, t) {
927
- return e && !hn(t) ? mn(e, t) : t;
927
+ return e && !pn(t) ? mn(e, t) : t;
928
928
  }
929
929
  const Ee = (e) => e instanceof S ? { ...e } : e;
930
- function q(e, t) {
930
+ function F(e, t) {
931
931
  t = t || {};
932
932
  const n = {};
933
933
  function r(l, a, d) {
@@ -994,7 +994,7 @@ function q(e, t) {
994
994
  }), n;
995
995
  }
996
996
  const We = (e) => {
997
- const t = q({}, e);
997
+ const t = F({}, e);
998
998
  let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: u } = t;
999
999
  t.headers = i = S.from(i), t.url = Me(ve(t.baseURL, t.url), e.params, e.paramsSerializer), u && i.set(
1000
1000
  "Authorization",
@@ -1002,15 +1002,15 @@ const We = (e) => {
1002
1002
  );
1003
1003
  let f;
1004
1004
  if (c.isFormData(n)) {
1005
- if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
1005
+ if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1006
1006
  i.setContentType(void 0);
1007
1007
  else if ((f = i.getContentType()) !== !1) {
1008
1008
  const [l, ...a] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1009
1009
  i.setContentType([l || "multipart/form-data", ...a].join("; "));
1010
1010
  }
1011
1011
  }
1012
- if (O.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && dn(t.url))) {
1013
- const l = s && o && pn.read(o);
1012
+ if (A.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && dn(t.url))) {
1013
+ const l = s && o && hn.read(o);
1014
1014
  l && i.set(s, l);
1015
1015
  }
1016
1016
  return t;
@@ -1030,7 +1030,7 @@ const We = (e) => {
1030
1030
  return;
1031
1031
  const g = S.from(
1032
1032
  "getAllResponseHeaders" in a && a.getAllResponseHeaders()
1033
- ), h = {
1033
+ ), p = {
1034
1034
  data: !u || u === "text" || u === "json" ? a.responseText : a.response,
1035
1035
  status: a.status,
1036
1036
  statusText: a.statusText,
@@ -1042,7 +1042,7 @@ const We = (e) => {
1042
1042
  n(E), l();
1043
1043
  }, function(E) {
1044
1044
  r(E), l();
1045
- }, h), a = null;
1045
+ }, p), a = null;
1046
1046
  }
1047
1047
  "onloadend" in a ? a.onloadend = d : a.onreadystatechange = function() {
1048
1048
  !a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(d);
@@ -1051,21 +1051,21 @@ const We = (e) => {
1051
1051
  }, a.onerror = function() {
1052
1052
  r(new y("Network Error", y.ERR_NETWORK, s, a)), a = null;
1053
1053
  }, a.ontimeout = function() {
1054
- let p = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1055
- const h = s.transitional || ze;
1056
- s.timeoutErrorMessage && (p = s.timeoutErrorMessage), r(new y(
1057
- p,
1058
- h.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1054
+ let h = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1055
+ const p = s.transitional || ze;
1056
+ s.timeoutErrorMessage && (h = s.timeoutErrorMessage), r(new y(
1057
+ h,
1058
+ p.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1059
1059
  s,
1060
1060
  a
1061
1061
  )), a = null;
1062
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in a && c.forEach(i.toJSON(), function(p, h) {
1063
- a.setRequestHeader(h, p);
1062
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in a && c.forEach(i.toJSON(), function(h, p) {
1063
+ a.setRequestHeader(p, h);
1064
1064
  }), c.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), u && u !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", V(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", V(s.onUploadProgress)), (s.cancelToken || s.signal) && (f = (g) => {
1065
1065
  a && (r(!g || g.type ? new L(null, e, a) : g), a.abort(), a = null);
1066
1066
  }, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
1067
1067
  const m = un(s.url);
1068
- if (m && O.protocols.indexOf(m) === -1) {
1068
+ if (m && A.protocols.indexOf(m) === -1) {
1069
1069
  r(new y("Unsupported protocol " + m + ":", y.ERR_BAD_REQUEST, e));
1070
1070
  return;
1071
1071
  }
@@ -1134,7 +1134,7 @@ const We = (e) => {
1134
1134
  }));
1135
1135
  }, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = X && typeof ReadableStream == "function", oe = X && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), En = Qe && (() => {
1136
1136
  let e = !1;
1137
- const t = new Request(O.origin, {
1137
+ const t = new Request(A.origin, {
1138
1138
  body: new ReadableStream(),
1139
1139
  method: "POST",
1140
1140
  get duplex() {
@@ -1187,21 +1187,21 @@ const Sn = async (e) => {
1187
1187
  fetchOptions: m
1188
1188
  } = We(e);
1189
1189
  l = l ? (l + "").toLowerCase() : "text";
1190
- let [g, p] = s || o || i ? wn([s, o], i) : [], h, w;
1190
+ let [g, h] = s || o || i ? wn([s, o], i) : [], p, w;
1191
1191
  const E = () => {
1192
- !h && setTimeout(() => {
1192
+ !p && setTimeout(() => {
1193
1193
  g && g.unsubscribe();
1194
- }), h = !0;
1194
+ }), p = !0;
1195
1195
  };
1196
1196
  let N;
1197
1197
  try {
1198
1198
  if (f && En && n !== "get" && n !== "head" && (N = await Rn(a, r)) !== 0) {
1199
- let C = new Request(t, {
1199
+ let k = new Request(t, {
1200
1200
  method: "POST",
1201
1201
  body: r,
1202
1202
  duplex: "half"
1203
- }), F;
1204
- c.isFormData(r) && (F = C.headers.get("content-type")) && a.setContentType(F), C.body && (r = Se(C.body, Oe, Re(
1203
+ }), U;
1204
+ c.isFormData(r) && (U = k.headers.get("content-type")) && a.setContentType(U), k.body && (r = Se(k.body, Oe, Re(
1205
1205
  N,
1206
1206
  V(f)
1207
1207
  ), null, oe));
@@ -1218,23 +1218,23 @@ const Sn = async (e) => {
1218
1218
  let b = await fetch(w);
1219
1219
  const _ = ie && (l === "stream" || l === "response");
1220
1220
  if (ie && (u || _)) {
1221
- const C = {};
1222
- ["status", "statusText", "headers"].forEach((he) => {
1223
- C[he] = b[he];
1221
+ const k = {};
1222
+ ["status", "statusText", "headers"].forEach((pe) => {
1223
+ k[pe] = b[pe];
1224
1224
  });
1225
- const F = c.toFiniteNumber(b.headers.get("content-length"));
1225
+ const U = c.toFiniteNumber(b.headers.get("content-length"));
1226
1226
  b = new Response(
1227
1227
  Se(b.body, Oe, u && Re(
1228
- F,
1228
+ U,
1229
1229
  V(u, !0)
1230
1230
  ), _ && E, oe),
1231
- C
1231
+ k
1232
1232
  );
1233
1233
  }
1234
1234
  l = l || "text";
1235
1235
  let tt = await G[c.findKey(G, l) || "text"](b, e);
1236
- return !_ && E(), p && p(), await new Promise((C, F) => {
1237
- Ke(C, F, {
1236
+ return !_ && E(), h && h(), await new Promise((k, U) => {
1237
+ Ke(k, U, {
1238
1238
  data: tt,
1239
1239
  headers: S.from(b.headers),
1240
1240
  status: b.status,
@@ -1318,14 +1318,14 @@ function Pe(e) {
1318
1318
  ), r.response.headers = S.from(r.response.headers))), Promise.reject(r);
1319
1319
  });
1320
1320
  }
1321
- const Ze = "1.7.2", pe = {};
1321
+ const Ze = "1.7.2", he = {};
1322
1322
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1323
- pe[e] = function(r) {
1323
+ he[e] = function(r) {
1324
1324
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1325
1325
  };
1326
1326
  });
1327
1327
  const Ne = {};
1328
- pe.transitional = function(t, n, r) {
1328
+ he.transitional = function(t, n, r) {
1329
1329
  function s(o, i) {
1330
1330
  return "[Axios v" + Ze + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1331
1331
  }
@@ -1362,8 +1362,8 @@ function Pn(e, t, n) {
1362
1362
  }
1363
1363
  const ce = {
1364
1364
  assertOptions: Pn,
1365
- validators: pe
1366
- }, k = ce.validators;
1365
+ validators: he
1366
+ }, C = ce.validators;
1367
1367
  let B = class {
1368
1368
  constructor(t) {
1369
1369
  this.defaults = t, this.interceptors = {
@@ -1397,17 +1397,17 @@ let B = class {
1397
1397
  }
1398
1398
  }
1399
1399
  _request(t, n) {
1400
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = q(this.defaults, n);
1400
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
1401
1401
  const { transitional: r, paramsSerializer: s, headers: o } = n;
1402
1402
  r !== void 0 && ce.assertOptions(r, {
1403
- silentJSONParsing: k.transitional(k.boolean),
1404
- forcedJSONParsing: k.transitional(k.boolean),
1405
- clarifyTimeoutError: k.transitional(k.boolean)
1403
+ silentJSONParsing: C.transitional(C.boolean),
1404
+ forcedJSONParsing: C.transitional(C.boolean),
1405
+ clarifyTimeoutError: C.transitional(C.boolean)
1406
1406
  }, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
1407
1407
  serialize: s
1408
1408
  } : ce.assertOptions(s, {
1409
- encode: k.function,
1410
- serialize: k.function
1409
+ encode: C.function,
1410
+ serialize: C.function
1411
1411
  }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1412
1412
  let i = o && c.merge(
1413
1413
  o.common,
@@ -1415,55 +1415,55 @@ let B = class {
1415
1415
  );
1416
1416
  o && c.forEach(
1417
1417
  ["delete", "get", "head", "post", "put", "patch", "common"],
1418
- (p) => {
1419
- delete o[p];
1418
+ (h) => {
1419
+ delete o[h];
1420
1420
  }
1421
1421
  ), n.headers = S.concat(i, o);
1422
1422
  const u = [];
1423
1423
  let f = !0;
1424
- this.interceptors.request.forEach(function(h) {
1425
- typeof h.runWhen == "function" && h.runWhen(n) === !1 || (f = f && h.synchronous, u.unshift(h.fulfilled, h.rejected));
1424
+ this.interceptors.request.forEach(function(p) {
1425
+ typeof p.runWhen == "function" && p.runWhen(n) === !1 || (f = f && p.synchronous, u.unshift(p.fulfilled, p.rejected));
1426
1426
  });
1427
1427
  const l = [];
1428
- this.interceptors.response.forEach(function(h) {
1429
- l.push(h.fulfilled, h.rejected);
1428
+ this.interceptors.response.forEach(function(p) {
1429
+ l.push(p.fulfilled, p.rejected);
1430
1430
  });
1431
1431
  let a, d = 0, m;
1432
1432
  if (!f) {
1433
- const p = [Pe.bind(this), void 0];
1434
- for (p.unshift.apply(p, u), p.push.apply(p, l), m = p.length, a = Promise.resolve(n); d < m; )
1435
- a = a.then(p[d++], p[d++]);
1433
+ const h = [Pe.bind(this), void 0];
1434
+ for (h.unshift.apply(h, u), h.push.apply(h, l), m = h.length, a = Promise.resolve(n); d < m; )
1435
+ a = a.then(h[d++], h[d++]);
1436
1436
  return a;
1437
1437
  }
1438
1438
  m = u.length;
1439
1439
  let g = n;
1440
1440
  for (d = 0; d < m; ) {
1441
- const p = u[d++], h = u[d++];
1441
+ const h = u[d++], p = u[d++];
1442
1442
  try {
1443
- g = p(g);
1443
+ g = h(g);
1444
1444
  } catch (w) {
1445
- h.call(this, w);
1445
+ p.call(this, w);
1446
1446
  break;
1447
1447
  }
1448
1448
  }
1449
1449
  try {
1450
1450
  a = Pe.call(this, g);
1451
- } catch (p) {
1452
- return Promise.reject(p);
1451
+ } catch (h) {
1452
+ return Promise.reject(h);
1453
1453
  }
1454
1454
  for (d = 0, m = l.length; d < m; )
1455
1455
  a = a.then(l[d++], l[d++]);
1456
1456
  return a;
1457
1457
  }
1458
1458
  getUri(t) {
1459
- t = q(this.defaults, t);
1459
+ t = F(this.defaults, t);
1460
1460
  const n = ve(t.baseURL, t.url);
1461
1461
  return Me(n, t.params, t.paramsSerializer);
1462
1462
  }
1463
1463
  };
1464
1464
  c.forEach(["delete", "get", "head", "options"], function(t) {
1465
1465
  B.prototype[t] = function(n, r) {
1466
- return this.request(q(r || {}, {
1466
+ return this.request(F(r || {}, {
1467
1467
  method: t,
1468
1468
  url: n,
1469
1469
  data: (r || {}).data
@@ -1473,7 +1473,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
1473
1473
  c.forEach(["post", "put", "patch"], function(t) {
1474
1474
  function n(r) {
1475
1475
  return function(o, i, u) {
1476
- return this.request(q(u || {}, {
1476
+ return this.request(F(u || {}, {
1477
1477
  method: t,
1478
1478
  headers: r ? {
1479
1479
  "Content-Type": "multipart/form-data"
@@ -1553,12 +1553,12 @@ let Nn = class Ye {
1553
1553
  };
1554
1554
  }
1555
1555
  };
1556
- function Cn(e) {
1556
+ function kn(e) {
1557
1557
  return function(n) {
1558
1558
  return e.apply(null, n);
1559
1559
  };
1560
1560
  }
1561
- function kn(e) {
1561
+ function Cn(e) {
1562
1562
  return c.isObject(e) && e.isAxiosError === !0;
1563
1563
  }
1564
1564
  const ue = {
@@ -1632,7 +1632,7 @@ Object.entries(ue).forEach(([e, t]) => {
1632
1632
  function et(e) {
1633
1633
  const t = new B(e), n = Be(B.prototype.request, t);
1634
1634
  return c.extend(n, B.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1635
- return et(q(e, s));
1635
+ return et(F(e, s));
1636
1636
  }, n;
1637
1637
  }
1638
1638
  const T = et(j);
@@ -1647,9 +1647,9 @@ T.Cancel = T.CanceledError;
1647
1647
  T.all = function(t) {
1648
1648
  return Promise.all(t);
1649
1649
  };
1650
- T.spread = Cn;
1651
- T.isAxiosError = kn;
1652
- T.mergeConfig = q;
1650
+ T.spread = kn;
1651
+ T.isAxiosError = Cn;
1652
+ T.mergeConfig = F;
1653
1653
  T.AxiosHeaders = S;
1654
1654
  T.formToJSON = (e) => Ve(c.isHTMLForm(e) ? new FormData(e) : e);
1655
1655
  T.getAdapter = Xe.getAdapter;
@@ -1667,7 +1667,7 @@ const {
1667
1667
  isAxiosError: rr,
1668
1668
  spread: sr,
1669
1669
  toFormData: or,
1670
- AxiosHeaders: Ce,
1670
+ AxiosHeaders: ke,
1671
1671
  HttpStatusCode: ir,
1672
1672
  formToJSON: ar,
1673
1673
  getAdapter: cr,
@@ -1675,14 +1675,14 @@ const {
1675
1675
  } = T, H = () => new xn(
1676
1676
  "Unauthorized",
1677
1677
  "ERR_UNAUTHORIZED",
1678
- { headers: new Ce() },
1678
+ { headers: new ke() },
1679
1679
  null,
1680
1680
  {
1681
1681
  status: 401,
1682
1682
  data: null,
1683
1683
  statusText: "UNAUTHORIZED",
1684
1684
  headers: {},
1685
- config: { headers: new Ce() }
1685
+ config: { headers: new ke() }
1686
1686
  }
1687
1687
  ), Bn = (e) => {
1688
1688
  let t = !1;
@@ -1692,7 +1692,8 @@ const {
1692
1692
  localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
1693
1693
  }, u = (a, d = null) => {
1694
1694
  n.forEach((m) => {
1695
- a ? m.reject(a) : (m.requestConfig.headers || (m.requestConfig.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
1695
+ var g;
1696
+ a ? m.reject(a) : ((g = m.requestConfig).headers ?? (g.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
1696
1697
  }), n.length = 0;
1697
1698
  };
1698
1699
  return {
@@ -1700,23 +1701,23 @@ const {
1700
1701
  setTokens: o,
1701
1702
  clearTokens: i,
1702
1703
  handleTokenRefresh: async (a) => {
1703
- var p;
1704
- if ((p = a.url) == null ? void 0 : p.includes(
1704
+ var h;
1705
+ if ((h = a.url) == null ? void 0 : h.includes(
1705
1706
  e.refreshTokenEndpointPath
1706
1707
  )) {
1707
1708
  i();
1708
- const h = H();
1709
- throw u(h), h;
1709
+ const p = H();
1710
+ throw u(p), p;
1710
1711
  }
1711
1712
  if (!r()) {
1712
1713
  i();
1713
- const h = H();
1714
- throw u(h), h;
1714
+ const p = H();
1715
+ throw u(p), p;
1715
1716
  }
1716
1717
  if (t)
1717
- return new Promise((h, w) => {
1718
+ return new Promise((p, w) => {
1718
1719
  n.push({
1719
- resolve: h,
1720
+ resolve: p,
1720
1721
  reject: w,
1721
1722
  requestConfig: a
1722
1723
  });
@@ -1724,13 +1725,13 @@ const {
1724
1725
  const g = s();
1725
1726
  if (!g) {
1726
1727
  i();
1727
- const h = H();
1728
- throw u(h), h;
1728
+ const p = H();
1729
+ throw u(p), p;
1729
1730
  }
1730
1731
  t = !0;
1731
1732
  try {
1732
- const h = await e.onRefreshToken(g);
1733
- return o(h), a.headers || (a.headers = {}), a.headers.Authorization = `Bearer ${h.accessToken}`, u(null, h.accessToken), t = !1, a;
1733
+ const p = await e.onRefreshToken(g);
1734
+ return o(p), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, u(null, p.accessToken), t = !1, a;
1734
1735
  } catch {
1735
1736
  i();
1736
1737
  const w = H();
@@ -1742,9 +1743,9 @@ const {
1742
1743
  return ((d = a == null ? void 0 : a.response) == null ? void 0 : d.status) === 401;
1743
1744
  }
1744
1745
  };
1745
- }, P = (e) => {
1746
- const t = T.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, o = s ? s.replace(/\/$/, "") : "", i = e.refreshTokenApiVersion || n, u = e.refreshTokenEndpointPath || "/refresh-token", f = `${o}/auth/${i}${u}`, l = Bn({
1747
- baseUrl: s || "",
1746
+ }, O = (e) => {
1747
+ const t = T.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, o = s ? s.replace(/\/$/, "") : "", i = e.refreshTokenApiVersion ?? n, u = e.refreshTokenEndpointPath ?? "/refresh-token", f = `${o}/auth/${i}${u}`, l = Bn({
1748
+ baseUrl: s ?? "",
1748
1749
  apiVersion: n,
1749
1750
  refreshTokenEndpointPath: u,
1750
1751
  onRefreshToken: async (d) => (await t.post(f, {
@@ -1770,17 +1771,18 @@ const {
1770
1771
  e.responseInterceptor.onReject
1771
1772
  ), {
1772
1773
  request: async (d, m) => {
1773
- const g = d.startsWith("/") ? d.substring(1) : d, p = `${o}/${r}/${n}/${g}`, h = {
1774
- "Content-Type": (m == null ? void 0 : m.contentType) || "application/json",
1774
+ const g = d.startsWith("/") ? d.substring(1) : d, h = `${o}/${r}/${n}/${g}`, p = {
1775
+ "Content-Type": (m == null ? void 0 : m.contentType) ?? "application/json",
1775
1776
  apiVersion: n,
1776
1777
  Authorization: "",
1777
- ...e.headers ?? {}
1778
+ ...e.headers ?? {},
1779
+ ...(m == null ? void 0 : m.headers) ?? {}
1778
1780
  }, w = l.getAccessToken();
1779
- w && (h.Authorization = `Bearer ${w}`);
1781
+ w && (p.Authorization = `Bearer ${w}`);
1780
1782
  const E = {
1781
- method: (m == null ? void 0 : m.method) || "GET",
1782
- headers: h,
1783
- url: p,
1783
+ method: (m == null ? void 0 : m.method) ?? "GET",
1784
+ headers: p,
1785
+ url: h,
1784
1786
  data: m == null ? void 0 : m.data,
1785
1787
  responseType: m == null ? void 0 : m.responseType
1786
1788
  };
@@ -1790,11 +1792,11 @@ const {
1790
1792
  setTokens: l.setTokens,
1791
1793
  clearTokens: l.clearTokens
1792
1794
  };
1793
- }, qn = "cep";
1794
- function Fn(e) {
1795
- const t = P(e);
1795
+ }, Fn = "cep";
1796
+ function Un(e) {
1797
+ const t = O(e);
1796
1798
  function n(r) {
1797
- return t.request(`/${qn}`, {
1799
+ return t.request(`/${Fn}`, {
1798
1800
  method: "POST",
1799
1801
  data: JSON.stringify(r)
1800
1802
  });
@@ -1803,24 +1805,24 @@ function Fn(e) {
1803
1805
  getAddress: n
1804
1806
  };
1805
1807
  }
1806
- const ke = "auth", Un = (e) => {
1807
- const t = P(e);
1808
+ const Ce = "auth", qn = (e) => {
1809
+ const t = O(e);
1808
1810
  return {
1809
1811
  postLogin: async (s) => {
1810
1812
  var i;
1811
- const o = await t.request(`/${ke}/login`, {
1813
+ const o = await t.request(`/${Ce}/login`, {
1812
1814
  method: "POST",
1813
1815
  data: JSON.stringify(s)
1814
1816
  });
1815
1817
  return o.status === 200 && ((i = o.data) != null && i.accessToken) && localStorage.setItem("accessToken", o.data.accessToken), o;
1816
1818
  },
1817
- getToken: async (s) => await t.request(`/${ke}?code=${s}`, {
1819
+ getToken: async (s) => await t.request(`/${Ce}?code=${s}`, {
1818
1820
  method: "GET",
1819
1821
  data: ""
1820
1822
  })
1821
1823
  };
1822
1824
  }, Ln = (e) => {
1823
- const t = P(e);
1825
+ const t = O(e);
1824
1826
  return {
1825
1827
  signUp: async (u) => await t.request("/sign-up", {
1826
1828
  method: "POST",
@@ -1848,7 +1850,7 @@ const ke = "auth", Un = (e) => {
1848
1850
  })
1849
1851
  };
1850
1852
  }, xe = "digital", _n = (e) => {
1851
- const t = P(e);
1853
+ const t = O(e);
1852
1854
  return {
1853
1855
  getBroker: () => t.request(`/${xe}/getBroker`, {
1854
1856
  method: "GET",
@@ -1863,7 +1865,7 @@ const ke = "auth", Un = (e) => {
1863
1865
  )
1864
1866
  };
1865
1867
  }, Dn = "data", $n = (e) => {
1866
- const t = P(e);
1868
+ const t = O(e);
1867
1869
  return {
1868
1870
  postData: async (r) => await t.request(`/${Dn}`, {
1869
1871
  method: "POST",
@@ -1871,7 +1873,7 @@ const ke = "auth", Un = (e) => {
1871
1873
  })
1872
1874
  };
1873
1875
  }, In = "endorsement", jn = (e) => {
1874
- const t = P(e);
1876
+ const t = O(e);
1875
1877
  return {
1876
1878
  putEndorsement: (r, s) => {
1877
1879
  const o = new FormData();
@@ -1885,7 +1887,7 @@ const ke = "auth", Un = (e) => {
1885
1887
  }
1886
1888
  };
1887
1889
  }, ne = "payment", Hn = (e) => {
1888
- const t = P(e);
1890
+ const t = O(e);
1889
1891
  return {
1890
1892
  postPayment: (o) => t.request(`/${ne}`, {
1891
1893
  method: "POST",
@@ -1907,7 +1909,7 @@ const ke = "auth", Un = (e) => {
1907
1909
  )
1908
1910
  };
1909
1911
  }, J = "product/action", Jn = (e) => {
1910
- const t = P(e);
1912
+ const t = O(e);
1911
1913
  return {
1912
1914
  getCnpjStatus: (i) => t.request(`/${J}/Custom/CnpjCheck?cnpj=${i}`, {
1913
1915
  method: "GET",
@@ -1933,7 +1935,7 @@ const ke = "auth", Un = (e) => {
1933
1935
  )
1934
1936
  };
1935
1937
  }, x = "quotation", Mn = (e) => {
1936
- const t = P(e);
1938
+ const t = O(e);
1937
1939
  return {
1938
1940
  getQuotations: (a) => {
1939
1941
  const d = new URLSearchParams({ ...a });
@@ -1987,12 +1989,12 @@ const ke = "auth", Un = (e) => {
1987
1989
  )
1988
1990
  };
1989
1991
  }, zn = "report", Vn = (e) => {
1990
- const t = P(e);
1992
+ const t = O(e);
1991
1993
  return {
1992
1994
  getReportStream: (r) => {
1993
1995
  const s = new URLSearchParams({
1994
1996
  policyId: r.policyId,
1995
- documentType: r.documentType || "certificate",
1997
+ documentType: r.documentType ?? "certificate",
1996
1998
  ...r.additionalParams
1997
1999
  });
1998
2000
  return t.request(
@@ -2006,7 +2008,7 @@ const ke = "auth", Un = (e) => {
2006
2008
  }
2007
2009
  };
2008
2010
  }, Gn = "SubscriberData", Kn = (e) => {
2009
- const t = P(e);
2011
+ const t = O(e);
2010
2012
  return {
2011
2013
  getSubscriber: (r) => t.request(
2012
2014
  `/${Gn}/get-subscriber-data?cnpj=${r}`,
@@ -2018,7 +2020,7 @@ const ke = "auth", Un = (e) => {
2018
2020
  };
2019
2021
  };
2020
2022
  function lr(e) {
2021
- const t = Un(e), n = Ln(e), r = $n(e), s = Mn(e), o = Hn(e), i = Fn(e), u = _n(e), f = jn(e), l = Jn(e), a = Vn(e), d = Kn(e);
2023
+ const t = qn(e), n = Ln(e), r = $n(e), s = Mn(e), o = Hn(e), i = Un(e), u = _n(e), f = jn(e), l = Jn(e), a = Vn(e), d = Kn(e), m = O(e);
2022
2024
  return {
2023
2025
  auth: t,
2024
2026
  authAkad: n,
@@ -2030,7 +2032,8 @@ function lr(e) {
2030
2032
  endorsement: f,
2031
2033
  plugin: l,
2032
2034
  report: a,
2033
- subscriber: d
2035
+ subscriber: d,
2036
+ base: m
2034
2037
  };
2035
2038
  }
2036
2039
  export {