septor-store-react 0.0.2 → 0.0.4
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/README.MD +16 -12
- package/dist/index.js +189 -188
- package/dist/index.umd.cjs +5 -5
- package/package.json +6 -3
- package/src/index.ts +0 -7
- package/src/setUp/GlobalScripts/AbortHandler.ts +0 -13
- package/src/setUp/GlobalScripts/Axios.ts +0 -67
- package/src/setUp/GlobalScripts/useFetch.ts +0 -65
- package/src/setUp/pomStore.jsx +0 -170
- package/tsconfig.json +0 -13
- package/vite.config.ts +0 -23
package/dist/index.js
CHANGED
|
@@ -4,24 +4,24 @@ function Qe(e, t) {
|
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const n =
|
|
7
|
+
const { toString: St } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: oe, toStringTag: Xe } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const n = St.call(t);
|
|
9
9
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
10
|
})(/* @__PURE__ */ Object.create(null)), k = (e) => (e = e.toLowerCase(), (t) => ie(t) === e), ae = (e) => (t) => typeof t === e, { isArray: q } = Array, $ = ae("undefined");
|
|
11
11
|
function W(e) {
|
|
12
12
|
return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && T(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
14
|
const Ke = k("ArrayBuffer");
|
|
15
|
-
function
|
|
15
|
+
function Et(e) {
|
|
16
16
|
let t;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ke(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const Rt = ae("string"), T = ae("function"), Ge = ae("number"), v = (e) => e !== null && typeof e == "object", Ot = (e) => e === !0 || e === !1, te = (e) => {
|
|
20
20
|
if (ie(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const t = Se(e);
|
|
23
23
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Xe in e) && !(oe in e);
|
|
24
|
-
},
|
|
24
|
+
}, Tt = (e) => {
|
|
25
25
|
if (!v(e) || W(e))
|
|
26
26
|
return !1;
|
|
27
27
|
try {
|
|
@@ -29,11 +29,11 @@ const Et = ae("string"), T = ae("function"), Ge = ae("number"), v = (e) => e !==
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, At = k("Date"), Ct = k("File"), xt = k("Blob"), Nt = k("FileList"), kt = (e) => v(e) && T(e.pipe), Pt = (e) => {
|
|
33
33
|
let t;
|
|
34
34
|
return e && (typeof FormData == "function" && e instanceof FormData || T(e.append) && ((t = ie(e)) === "formdata" || // detect form-data instance
|
|
35
35
|
t === "object" && T(e.toString) && e.toString() === "[object FormData]"));
|
|
36
|
-
},
|
|
36
|
+
}, Ft = k("URLSearchParams"), [Ut, Lt, _t, Bt] = ["ReadableStream", "Request", "Response", "Headers"].map(k), Dt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Q(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
38
38
|
if (e === null || typeof e > "u")
|
|
39
39
|
return;
|
|
@@ -71,13 +71,13 @@ function me() {
|
|
|
71
71
|
arguments[s] && Q(arguments[s], r);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const jt = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (s, i) => {
|
|
75
75
|
n && T(s) ? e[i] = Qe(s, n) : e[i] = s;
|
|
76
|
-
}, { allOwnKeys: r }), e),
|
|
76
|
+
}, { allOwnKeys: r }), e), It = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ht = (e, t, n, r) => {
|
|
77
77
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
78
78
|
value: t.prototype
|
|
79
79
|
}), n && Object.assign(e.prototype, n);
|
|
80
|
-
},
|
|
80
|
+
}, $t = (e, t, n, r) => {
|
|
81
81
|
let s, i, o;
|
|
82
82
|
const c = {};
|
|
83
83
|
if (t = t || {}, e == null) return t;
|
|
@@ -87,11 +87,11 @@ const Dt = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (s, i) => {
|
|
|
87
87
|
e = n !== !1 && Se(e);
|
|
88
88
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
89
89
|
return t;
|
|
90
|
-
},
|
|
90
|
+
}, Mt = (e, t, n) => {
|
|
91
91
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
92
92
|
const r = e.indexOf(t, n);
|
|
93
93
|
return r !== -1 && r === n;
|
|
94
|
-
},
|
|
94
|
+
}, qt = (e) => {
|
|
95
95
|
if (!e) return null;
|
|
96
96
|
if (q(e)) return e;
|
|
97
97
|
let t = e.length;
|
|
@@ -100,31 +100,31 @@ const Dt = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (s, i) => {
|
|
|
100
100
|
for (; t-- > 0; )
|
|
101
101
|
n[t] = e[t];
|
|
102
102
|
return n;
|
|
103
|
-
},
|
|
103
|
+
}, Vt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Se(Uint8Array)), zt = (e, t) => {
|
|
104
104
|
const r = (e && e[oe]).call(e);
|
|
105
105
|
let s;
|
|
106
106
|
for (; (s = r.next()) && !s.done; ) {
|
|
107
107
|
const i = s.value;
|
|
108
108
|
t.call(e, i[0], i[1]);
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, Jt = (e, t) => {
|
|
111
111
|
let n;
|
|
112
112
|
const r = [];
|
|
113
113
|
for (; (n = e.exec(t)) !== null; )
|
|
114
114
|
r.push(n);
|
|
115
115
|
return r;
|
|
116
|
-
},
|
|
116
|
+
}, Wt = k("HTMLFormElement"), vt = (e) => e.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
118
|
function(n, r, s) {
|
|
119
119
|
return r.toUpperCase() + s;
|
|
120
120
|
}
|
|
121
|
-
), Pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
121
|
+
), Pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Qt = k("RegExp"), et = (e, t) => {
|
|
122
122
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
123
123
|
Q(n, (s, i) => {
|
|
124
124
|
let o;
|
|
125
125
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
126
126
|
}), Object.defineProperties(e, r);
|
|
127
|
-
},
|
|
127
|
+
}, Xt = (e) => {
|
|
128
128
|
et(e, (t, n) => {
|
|
129
129
|
if (T(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
130
|
return !1;
|
|
@@ -139,19 +139,19 @@ const Dt = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (s, i) => {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Kt = (e, t) => {
|
|
143
143
|
const n = {}, r = (s) => {
|
|
144
144
|
s.forEach((i) => {
|
|
145
145
|
n[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return q(e) ? r(e) : r(String(e).split(t)), n;
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
function
|
|
149
|
+
}, Gt = () => {
|
|
150
|
+
}, Zt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
151
|
+
function Yt(e) {
|
|
152
152
|
return !!(e && T(e.append) && e[Xe] === "FormData" && e[oe]);
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const en = (e) => {
|
|
155
155
|
const t = new Array(10), n = (r, s) => {
|
|
156
156
|
if (v(r)) {
|
|
157
157
|
if (t.indexOf(r) >= 0)
|
|
@@ -170,72 +170,72 @@ const Yt = (e) => {
|
|
|
170
170
|
return r;
|
|
171
171
|
};
|
|
172
172
|
return n(e, 0);
|
|
173
|
-
},
|
|
173
|
+
}, tn = k("AsyncFunction"), nn = (e) => e && (v(e) || T(e)) && T(e.then) && T(e.catch), tt = ((e, t) => e ? setImmediate : t ? ((n, r) => (D.addEventListener("message", ({ source: s, data: i }) => {
|
|
174
174
|
s === D && i === n && r.length && r.shift()();
|
|
175
175
|
}, !1), (s) => {
|
|
176
176
|
r.push(s), D.postMessage(n, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
T(D.postMessage)
|
|
180
|
-
),
|
|
180
|
+
), rn = typeof queueMicrotask < "u" ? queueMicrotask.bind(D) : typeof process < "u" && process.nextTick || tt, sn = (e) => e != null && T(e[oe]), a = {
|
|
181
181
|
isArray: q,
|
|
182
182
|
isArrayBuffer: Ke,
|
|
183
183
|
isBuffer: W,
|
|
184
|
-
isFormData:
|
|
185
|
-
isArrayBufferView:
|
|
186
|
-
isString:
|
|
184
|
+
isFormData: Pt,
|
|
185
|
+
isArrayBufferView: Et,
|
|
186
|
+
isString: Rt,
|
|
187
187
|
isNumber: Ge,
|
|
188
|
-
isBoolean:
|
|
188
|
+
isBoolean: Ot,
|
|
189
189
|
isObject: v,
|
|
190
190
|
isPlainObject: te,
|
|
191
|
-
isEmptyObject:
|
|
192
|
-
isReadableStream:
|
|
193
|
-
isRequest:
|
|
194
|
-
isResponse:
|
|
195
|
-
isHeaders:
|
|
191
|
+
isEmptyObject: Tt,
|
|
192
|
+
isReadableStream: Ut,
|
|
193
|
+
isRequest: Lt,
|
|
194
|
+
isResponse: _t,
|
|
195
|
+
isHeaders: Bt,
|
|
196
196
|
isUndefined: $,
|
|
197
|
-
isDate:
|
|
198
|
-
isFile:
|
|
199
|
-
isBlob:
|
|
200
|
-
isRegExp:
|
|
197
|
+
isDate: At,
|
|
198
|
+
isFile: Ct,
|
|
199
|
+
isBlob: xt,
|
|
200
|
+
isRegExp: Qt,
|
|
201
201
|
isFunction: T,
|
|
202
|
-
isStream:
|
|
203
|
-
isURLSearchParams:
|
|
204
|
-
isTypedArray:
|
|
205
|
-
isFileList:
|
|
202
|
+
isStream: kt,
|
|
203
|
+
isURLSearchParams: Ft,
|
|
204
|
+
isTypedArray: Vt,
|
|
205
|
+
isFileList: Nt,
|
|
206
206
|
forEach: Q,
|
|
207
207
|
merge: me,
|
|
208
|
-
extend:
|
|
209
|
-
trim:
|
|
210
|
-
stripBOM:
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
208
|
+
extend: jt,
|
|
209
|
+
trim: Dt,
|
|
210
|
+
stripBOM: It,
|
|
211
|
+
inherits: Ht,
|
|
212
|
+
toFlatObject: $t,
|
|
213
213
|
kindOf: ie,
|
|
214
214
|
kindOfTest: k,
|
|
215
|
-
endsWith:
|
|
216
|
-
toArray:
|
|
217
|
-
forEachEntry:
|
|
218
|
-
matchAll:
|
|
219
|
-
isHTMLForm:
|
|
215
|
+
endsWith: Mt,
|
|
216
|
+
toArray: qt,
|
|
217
|
+
forEachEntry: zt,
|
|
218
|
+
matchAll: Jt,
|
|
219
|
+
isHTMLForm: Wt,
|
|
220
220
|
hasOwnProperty: Pe,
|
|
221
221
|
hasOwnProp: Pe,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
223
|
reduceDescriptors: et,
|
|
224
|
-
freezeMethods:
|
|
225
|
-
toObjectSet:
|
|
226
|
-
toCamelCase:
|
|
227
|
-
noop:
|
|
228
|
-
toFiniteNumber:
|
|
224
|
+
freezeMethods: Xt,
|
|
225
|
+
toObjectSet: Kt,
|
|
226
|
+
toCamelCase: vt,
|
|
227
|
+
noop: Gt,
|
|
228
|
+
toFiniteNumber: Zt,
|
|
229
229
|
findKey: Ze,
|
|
230
230
|
global: D,
|
|
231
231
|
isContextDefined: Ye,
|
|
232
|
-
isSpecCompliantForm:
|
|
233
|
-
toJSONObject:
|
|
234
|
-
isAsyncFn:
|
|
235
|
-
isThenable:
|
|
232
|
+
isSpecCompliantForm: Yt,
|
|
233
|
+
toJSONObject: en,
|
|
234
|
+
isAsyncFn: tn,
|
|
235
|
+
isThenable: nn,
|
|
236
236
|
setImmediate: tt,
|
|
237
|
-
asap:
|
|
238
|
-
isIterable:
|
|
237
|
+
asap: rn,
|
|
238
|
+
isIterable: sn
|
|
239
239
|
};
|
|
240
240
|
function y(e, t, n, r, s) {
|
|
241
241
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -289,7 +289,7 @@ y.from = (e, t, n, r, s, i) => {
|
|
|
289
289
|
const c = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
|
|
290
290
|
return y.call(o, c, f, n, r, s), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
|
-
const
|
|
292
|
+
const on = null;
|
|
293
293
|
function ye(e) {
|
|
294
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
295
|
}
|
|
@@ -301,10 +301,10 @@ function Fe(e, t, n) {
|
|
|
301
301
|
return s = st(s), !n && i ? "[" + s + "]" : s;
|
|
302
302
|
}).join(n ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function an(e) {
|
|
305
305
|
return a.isArray(e) && !e.some(ye);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const cn = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
310
|
function ce(e, t, n) {
|
|
@@ -335,7 +335,7 @@ function ce(e, t, n) {
|
|
|
335
335
|
if (d && !h && typeof d == "object") {
|
|
336
336
|
if (a.endsWith(m, "{}"))
|
|
337
337
|
m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
|
|
338
|
-
else if (a.isArray(d) &&
|
|
338
|
+
else if (a.isArray(d) && an(d) || (a.isFileList(d) || a.endsWith(m, "[]")) && (S = a.toArray(d)))
|
|
339
339
|
return m = st(m), S.forEach(function(E, O) {
|
|
340
340
|
!(a.isUndefined(E) || E === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -346,7 +346,7 @@ function ce(e, t, n) {
|
|
|
346
346
|
}
|
|
347
347
|
return ye(d) ? !0 : (t.append(Fe(h, m, i), l(d)), !1);
|
|
348
348
|
}
|
|
349
|
-
const p = [], b = Object.assign(
|
|
349
|
+
const p = [], b = Object.assign(cn, {
|
|
350
350
|
defaultVisitor: u,
|
|
351
351
|
convertValue: l,
|
|
352
352
|
isVisitable: ye
|
|
@@ -399,13 +399,13 @@ ot.toString = function(t) {
|
|
|
399
399
|
return n(s[0]) + "=" + n(s[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function ln(e) {
|
|
403
403
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
404
404
|
}
|
|
405
405
|
function it(e, t, n) {
|
|
406
406
|
if (!t)
|
|
407
407
|
return e;
|
|
408
|
-
const r = n && n.encode ||
|
|
408
|
+
const r = n && n.encode || ln;
|
|
409
409
|
a.isFunction(n) && (n = {
|
|
410
410
|
serialize: n
|
|
411
411
|
});
|
|
@@ -475,27 +475,27 @@ const at = {
|
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
478
|
+
}, un = typeof URLSearchParams < "u" ? URLSearchParams : Ee, fn = typeof FormData < "u" ? FormData : null, dn = typeof Blob < "u" ? Blob : null, pn = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
481
|
+
URLSearchParams: un,
|
|
482
|
+
FormData: fn,
|
|
483
|
+
Blob: dn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, Re = typeof window < "u" && typeof document < "u", be = typeof navigator == "object" && navigator || void 0,
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, Re = typeof window < "u" && typeof document < "u", be = typeof navigator == "object" && navigator || void 0, hn = Re && (!be || ["ReactNative", "NativeScript", "NS"].indexOf(be.product) < 0), mn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", yn = Re && window.location.href || "http://localhost", bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
489
|
hasBrowserEnv: Re,
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
490
|
+
hasStandardBrowserEnv: hn,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: mn,
|
|
492
492
|
navigator: be,
|
|
493
|
-
origin:
|
|
493
|
+
origin: yn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
495
|
+
...bn,
|
|
496
|
+
...pn
|
|
497
497
|
};
|
|
498
|
-
function
|
|
498
|
+
function wn(e, t) {
|
|
499
499
|
return ce(e, new R.classes.URLSearchParams(), {
|
|
500
500
|
visitor: function(n, r, s, i) {
|
|
501
501
|
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
@@ -503,10 +503,10 @@ function bn(e, t) {
|
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function gn(e) {
|
|
507
507
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Sn(e) {
|
|
510
510
|
const t = {}, n = Object.keys(e);
|
|
511
511
|
let r;
|
|
512
512
|
const s = n.length;
|
|
@@ -520,17 +520,17 @@ function ct(e) {
|
|
|
520
520
|
let o = n[i++];
|
|
521
521
|
if (o === "__proto__") return !0;
|
|
522
522
|
const c = Number.isFinite(+o), f = i >= n.length;
|
|
523
|
-
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
523
|
+
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Sn(s[o])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
526
|
const n = {};
|
|
527
527
|
return a.forEachEntry(e, (r, s) => {
|
|
528
|
-
t(
|
|
528
|
+
t(gn(r), s, n, 0);
|
|
529
529
|
}), n;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function En(e, t, n) {
|
|
534
534
|
if (a.isString(e))
|
|
535
535
|
try {
|
|
536
536
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -556,7 +556,7 @@ const X = {
|
|
|
556
556
|
let c;
|
|
557
557
|
if (i) {
|
|
558
558
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
559
|
+
return wn(t, this.formSerializer).toString();
|
|
560
560
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const f = this.env && this.env.FormData;
|
|
562
562
|
return ce(
|
|
@@ -566,7 +566,7 @@ const X = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
569
|
+
return i || s ? (n.setContentType("application/json", !1), En(t)) : t;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(t) {
|
|
572
572
|
const n = this.transitional || X.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -609,7 +609,7 @@ const X = {
|
|
|
609
609
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
610
|
X.headers[e] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const Rn = a.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,12 +627,12 @@ const En = a.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), On = (e) => {
|
|
631
631
|
const t = {};
|
|
632
632
|
let n, r, s;
|
|
633
633
|
return e && e.split(`
|
|
634
634
|
`).forEach(function(o) {
|
|
635
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
635
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Rn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
636
636
|
}), t;
|
|
637
637
|
}, _e = /* @__PURE__ */ Symbol("internals");
|
|
638
638
|
function J(e) {
|
|
@@ -641,14 +641,14 @@ function J(e) {
|
|
|
641
641
|
function ne(e) {
|
|
642
642
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ne) : String(e);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Tn(e) {
|
|
645
645
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
646
|
let r;
|
|
647
647
|
for (; r = n.exec(e); )
|
|
648
648
|
t[r[1]] = r[2];
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const An = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
652
|
function de(e, t, n, r, s) {
|
|
653
653
|
if (a.isFunction(r))
|
|
654
654
|
return r.call(this, t, n);
|
|
@@ -659,10 +659,10 @@ function de(e, t, n, r, s) {
|
|
|
659
659
|
return r.test(t);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Cn(e) {
|
|
663
663
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function xn(e, t) {
|
|
666
666
|
const n = a.toCamelCase(" " + t);
|
|
667
667
|
["get", "set", "has"].forEach((r) => {
|
|
668
668
|
Object.defineProperty(e, r + n, {
|
|
@@ -689,8 +689,8 @@ let A = class {
|
|
|
689
689
|
const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
|
|
690
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
691
|
o(t, n);
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
693
|
-
o(
|
|
692
|
+
else if (a.isString(t) && (t = t.trim()) && !An(t))
|
|
693
|
+
o(On(t), n);
|
|
694
694
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
695
|
let c = {}, f, l;
|
|
696
696
|
for (const u of t) {
|
|
@@ -711,7 +711,7 @@ let A = class {
|
|
|
711
711
|
if (!n)
|
|
712
712
|
return s;
|
|
713
713
|
if (n === !0)
|
|
714
|
-
return
|
|
714
|
+
return Tn(s);
|
|
715
715
|
if (a.isFunction(n))
|
|
716
716
|
return n.call(this, s, r);
|
|
717
717
|
if (a.isRegExp(n))
|
|
@@ -755,7 +755,7 @@ let A = class {
|
|
|
755
755
|
n[o] = ne(s), delete n[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = t ?
|
|
758
|
+
const c = t ? Cn(i) : String(i).trim();
|
|
759
759
|
c !== i && delete n[i], n[c] = ne(s), r[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
@@ -794,7 +794,7 @@ let A = class {
|
|
|
794
794
|
}).accessors, s = this.prototype;
|
|
795
795
|
function i(o) {
|
|
796
796
|
const c = J(o);
|
|
797
|
-
r[c] || (
|
|
797
|
+
r[c] || (xn(s, o), r[c] = !0);
|
|
798
798
|
}
|
|
799
799
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
800
800
|
}
|
|
@@ -836,11 +836,11 @@ function ut(e, t, n) {
|
|
|
836
836
|
n
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Nn(e) {
|
|
840
840
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
841
|
return t && t[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function kn(e, t) {
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const n = new Array(e), r = new Array(e);
|
|
846
846
|
let s = 0, i = 0, o;
|
|
@@ -856,7 +856,7 @@ function Nn(e, t) {
|
|
|
856
856
|
return w ? Math.round(b * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function Pn(e, t) {
|
|
860
860
|
let n = 0, r = 1e3 / t, s, i;
|
|
861
861
|
const o = (l, u = Date.now()) => {
|
|
862
862
|
n = u, s = null, i && (clearTimeout(i), i = null), e(...l);
|
|
@@ -870,8 +870,8 @@ function kn(e, t) {
|
|
|
870
870
|
}
|
|
871
871
|
const se = (e, t, n = 3) => {
|
|
872
872
|
let r = 0;
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
873
|
+
const s = kn(50, 250);
|
|
874
|
+
return Pn((i) => {
|
|
875
875
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r, l = s(f), u = o <= c;
|
|
876
876
|
r = o;
|
|
877
877
|
const p = {
|
|
@@ -894,10 +894,10 @@ const se = (e, t, n = 3) => {
|
|
|
894
894
|
total: e,
|
|
895
895
|
loaded: r
|
|
896
896
|
}), t[1]];
|
|
897
|
-
}, De = (e) => (...t) => a.asap(() => e(...t)),
|
|
897
|
+
}, De = (e) => (...t) => a.asap(() => e(...t)), Fn = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, R.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
898
898
|
new URL(R.origin),
|
|
899
899
|
R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, Un = R.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
903
|
write(e, t, n, r, s, i, o) {
|
|
@@ -926,15 +926,15 @@ const se = (e, t, n = 3) => {
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
);
|
|
929
|
-
function
|
|
929
|
+
function Ln(e) {
|
|
930
930
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function _n(e, t) {
|
|
933
933
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
934
934
|
}
|
|
935
935
|
function ft(e, t, n) {
|
|
936
|
-
let r = !
|
|
937
|
-
return e && (r || n == !1) ?
|
|
936
|
+
let r = !Ln(t);
|
|
937
|
+
return e && (r || n == !1) ? _n(e, t) : t;
|
|
938
938
|
}
|
|
939
939
|
const je = (e) => e instanceof A ? { ...e } : e;
|
|
940
940
|
function I(e, t) {
|
|
@@ -1017,12 +1017,12 @@ const dt = (e) => {
|
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
|
-
if (R.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1021
|
-
const f = s && i &&
|
|
1020
|
+
if (R.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Fn(t.url))) {
|
|
1021
|
+
const f = s && i && Un.read(i);
|
|
1022
1022
|
f && o.set(s, f);
|
|
1023
1023
|
}
|
|
1024
1024
|
return t;
|
|
1025
|
-
},
|
|
1025
|
+
}, Bn = typeof XMLHttpRequest < "u", Dn = Bn && function(e) {
|
|
1026
1026
|
return new Promise(function(n, r) {
|
|
1027
1027
|
const s = dt(e);
|
|
1028
1028
|
let i = s.data;
|
|
@@ -1073,14 +1073,14 @@ const dt = (e) => {
|
|
|
1073
1073
|
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([b, d] = se(l, !0), h.addEventListener("progress", b)), f && h.upload && ([p, w] = se(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (u = (E) => {
|
|
1074
1074
|
h && (r(!E || E.type ? new V(null, e, h) : E), h.abort(), h = null);
|
|
1075
1075
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1076
|
-
const C =
|
|
1076
|
+
const C = Nn(s.url);
|
|
1077
1077
|
if (C && R.protocols.indexOf(C) === -1) {
|
|
1078
1078
|
r(new y("Unsupported protocol " + C + ":", y.ERR_BAD_REQUEST, e));
|
|
1079
1079
|
return;
|
|
1080
1080
|
}
|
|
1081
1081
|
h.send(i || null);
|
|
1082
1082
|
});
|
|
1083
|
-
},
|
|
1083
|
+
}, jn = (e, t) => {
|
|
1084
1084
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1085
1085
|
if (t || n) {
|
|
1086
1086
|
let r = new AbortController(), s;
|
|
@@ -1103,7 +1103,7 @@ const dt = (e) => {
|
|
|
1103
1103
|
const { signal: f } = r;
|
|
1104
1104
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1105
1105
|
}
|
|
1106
|
-
},
|
|
1106
|
+
}, In = function* (e, t) {
|
|
1107
1107
|
let n = e.byteLength;
|
|
1108
1108
|
if (n < t) {
|
|
1109
1109
|
yield e;
|
|
@@ -1112,10 +1112,10 @@ const dt = (e) => {
|
|
|
1112
1112
|
let r = 0, s;
|
|
1113
1113
|
for (; r < n; )
|
|
1114
1114
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1115
|
-
},
|
|
1116
|
-
for await (const n of
|
|
1117
|
-
yield*
|
|
1118
|
-
},
|
|
1115
|
+
}, Hn = async function* (e, t) {
|
|
1116
|
+
for await (const n of $n(e))
|
|
1117
|
+
yield* In(n, t);
|
|
1118
|
+
}, $n = async function* (e) {
|
|
1119
1119
|
if (e[Symbol.asyncIterator]) {
|
|
1120
1120
|
yield* e;
|
|
1121
1121
|
return;
|
|
@@ -1132,7 +1132,7 @@ const dt = (e) => {
|
|
|
1132
1132
|
await t.cancel();
|
|
1133
1133
|
}
|
|
1134
1134
|
}, Ie = (e, t, n, r) => {
|
|
1135
|
-
const s =
|
|
1135
|
+
const s = Hn(e, t);
|
|
1136
1136
|
let i = 0, o, c = (f) => {
|
|
1137
1137
|
o || (o = !0, r && r(f));
|
|
1138
1138
|
};
|
|
@@ -1160,7 +1160,7 @@ const dt = (e) => {
|
|
|
1160
1160
|
}, {
|
|
1161
1161
|
highWaterMark: 2
|
|
1162
1162
|
});
|
|
1163
|
-
}, He = 64 * 1024, { isFunction: ee } = a,
|
|
1163
|
+
}, He = 64 * 1024, { isFunction: ee } = a, Mn = (({ Request: e, Response: t }) => ({
|
|
1164
1164
|
Request: e,
|
|
1165
1165
|
Response: t
|
|
1166
1166
|
}))(a.global), {
|
|
@@ -1172,10 +1172,10 @@ const dt = (e) => {
|
|
|
1172
1172
|
} catch {
|
|
1173
1173
|
return !1;
|
|
1174
1174
|
}
|
|
1175
|
-
},
|
|
1175
|
+
}, qn = (e) => {
|
|
1176
1176
|
e = a.merge.call({
|
|
1177
1177
|
skipUndefined: !0
|
|
1178
|
-
},
|
|
1178
|
+
}, Mn, e);
|
|
1179
1179
|
const { fetch: t, Request: n, Response: r } = e, s = t ? ee(t) : typeof fetch == "function", i = ee(n), o = ee(r);
|
|
1180
1180
|
if (!s)
|
|
1181
1181
|
return !1;
|
|
@@ -1234,7 +1234,7 @@ const dt = (e) => {
|
|
|
1234
1234
|
fetchOptions: Te
|
|
1235
1235
|
} = dt(d), Ae = t || fetch;
|
|
1236
1236
|
x = x ? (x + "").toLowerCase() : "text";
|
|
1237
|
-
let G =
|
|
1237
|
+
let G = jn([C, E && E.toAbortSignal()], O), z = null;
|
|
1238
1238
|
const B = G && G.unsubscribe && (() => {
|
|
1239
1239
|
G.unsubscribe();
|
|
1240
1240
|
});
|
|
@@ -1284,10 +1284,10 @@ const dt = (e) => {
|
|
|
1284
1284
|
);
|
|
1285
1285
|
}
|
|
1286
1286
|
x = x || "text";
|
|
1287
|
-
let
|
|
1287
|
+
let gt = await p[a.findKey(p, x) || "text"](U, d);
|
|
1288
1288
|
return !Ne && B && B(), await new Promise((L, H) => {
|
|
1289
1289
|
ut(L, H, {
|
|
1290
|
-
data:
|
|
1290
|
+
data: gt,
|
|
1291
1291
|
headers: A.from(U.headers),
|
|
1292
1292
|
status: U.status,
|
|
1293
1293
|
statusText: U.statusText,
|
|
@@ -1304,22 +1304,22 @@ const dt = (e) => {
|
|
|
1304
1304
|
) : y.from(P, P && P.code, d, z);
|
|
1305
1305
|
}
|
|
1306
1306
|
};
|
|
1307
|
-
},
|
|
1307
|
+
}, Vn = /* @__PURE__ */ new Map(), pt = (e) => {
|
|
1308
1308
|
let t = e && e.env || {};
|
|
1309
1309
|
const { fetch: n, Request: r, Response: s } = t, i = [
|
|
1310
1310
|
r,
|
|
1311
1311
|
s,
|
|
1312
1312
|
n
|
|
1313
1313
|
];
|
|
1314
|
-
let o = i.length, c = o, f, l, u =
|
|
1314
|
+
let o = i.length, c = o, f, l, u = Vn;
|
|
1315
1315
|
for (; c--; )
|
|
1316
|
-
f = i[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() :
|
|
1316
|
+
f = i[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() : qn(t)), u = l;
|
|
1317
1317
|
return l;
|
|
1318
1318
|
};
|
|
1319
1319
|
pt();
|
|
1320
1320
|
const Oe = {
|
|
1321
|
-
http:
|
|
1322
|
-
xhr:
|
|
1321
|
+
http: on,
|
|
1322
|
+
xhr: Dn,
|
|
1323
1323
|
fetch: {
|
|
1324
1324
|
get: pt
|
|
1325
1325
|
}
|
|
@@ -1333,8 +1333,8 @@ a.forEach(Oe, (e, t) => {
|
|
|
1333
1333
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
|
-
const Ve = (e) => `- ${e}`,
|
|
1337
|
-
function
|
|
1336
|
+
const Ve = (e) => `- ${e}`, zn = (e) => a.isFunction(e) || e === null || e === !1;
|
|
1337
|
+
function Jn(e, t) {
|
|
1338
1338
|
e = a.isArray(e) ? e : [e];
|
|
1339
1339
|
const { length: n } = e;
|
|
1340
1340
|
let r, s;
|
|
@@ -1342,7 +1342,7 @@ function zn(e, t) {
|
|
|
1342
1342
|
for (let o = 0; o < n; o++) {
|
|
1343
1343
|
r = e[o];
|
|
1344
1344
|
let c;
|
|
1345
|
-
if (s = r, !
|
|
1345
|
+
if (s = r, !zn(r) && (s = Oe[(c = String(r)).toLowerCase()], s === void 0))
|
|
1346
1346
|
throw new y(`Unknown adapter '${c}'`);
|
|
1347
1347
|
if (s && (a.isFunction(s) || (s = s.get(t))))
|
|
1348
1348
|
break;
|
|
@@ -1367,7 +1367,7 @@ const ht = {
|
|
|
1367
1367
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1368
1368
|
* @type {Function}
|
|
1369
1369
|
*/
|
|
1370
|
-
getAdapter:
|
|
1370
|
+
getAdapter: Jn,
|
|
1371
1371
|
/**
|
|
1372
1372
|
* Exposes all known adapters
|
|
1373
1373
|
* @type {Object<string, Function|Object>}
|
|
@@ -1424,7 +1424,7 @@ le.transitional = function(t, n, r) {
|
|
|
1424
1424
|
le.spelling = function(t) {
|
|
1425
1425
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1426
1426
|
};
|
|
1427
|
-
function
|
|
1427
|
+
function Wn(e, t, n) {
|
|
1428
1428
|
if (typeof e != "object")
|
|
1429
1429
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1430
1430
|
const r = Object.keys(e);
|
|
@@ -1442,7 +1442,7 @@ function Jn(e, t, n) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
const re = {
|
|
1445
|
-
assertOptions:
|
|
1445
|
+
assertOptions: Wn,
|
|
1446
1446
|
validators: le
|
|
1447
1447
|
}, F = re.validators;
|
|
1448
1448
|
let j = class {
|
|
@@ -1569,7 +1569,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
|
|
1571
1571
|
});
|
|
1572
|
-
let
|
|
1572
|
+
let vn = class yt {
|
|
1573
1573
|
constructor(t) {
|
|
1574
1574
|
if (typeof t != "function")
|
|
1575
1575
|
throw new TypeError("executor must be a function.");
|
|
@@ -1642,12 +1642,12 @@ let Wn = class yt {
|
|
|
1642
1642
|
};
|
|
1643
1643
|
}
|
|
1644
1644
|
};
|
|
1645
|
-
function
|
|
1645
|
+
function Qn(e) {
|
|
1646
1646
|
return function(n) {
|
|
1647
1647
|
return e.apply(null, n);
|
|
1648
1648
|
};
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function Xn(e) {
|
|
1651
1651
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1652
1652
|
}
|
|
1653
1653
|
const we = {
|
|
@@ -1733,7 +1733,7 @@ function bt(e) {
|
|
|
1733
1733
|
const g = bt(X);
|
|
1734
1734
|
g.Axios = j;
|
|
1735
1735
|
g.CanceledError = V;
|
|
1736
|
-
g.CancelToken =
|
|
1736
|
+
g.CancelToken = vn;
|
|
1737
1737
|
g.isCancel = lt;
|
|
1738
1738
|
g.VERSION = mt;
|
|
1739
1739
|
g.toFormData = ce;
|
|
@@ -1742,8 +1742,8 @@ g.Cancel = g.CanceledError;
|
|
|
1742
1742
|
g.all = function(t) {
|
|
1743
1743
|
return Promise.all(t);
|
|
1744
1744
|
};
|
|
1745
|
-
g.spread =
|
|
1746
|
-
g.isAxiosError =
|
|
1745
|
+
g.spread = Qn;
|
|
1746
|
+
g.isAxiosError = Xn;
|
|
1747
1747
|
g.mergeConfig = I;
|
|
1748
1748
|
g.AxiosHeaders = A;
|
|
1749
1749
|
g.formToJSON = (e) => ct(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1751,34 +1751,35 @@ g.getAdapter = ht.getAdapter;
|
|
|
1751
1751
|
g.HttpStatusCode = we;
|
|
1752
1752
|
g.default = g;
|
|
1753
1753
|
const {
|
|
1754
|
-
Axios:
|
|
1755
|
-
AxiosError:
|
|
1756
|
-
CanceledError:
|
|
1757
|
-
isCancel:
|
|
1758
|
-
CancelToken:
|
|
1759
|
-
VERSION:
|
|
1760
|
-
all:
|
|
1761
|
-
Cancel:
|
|
1762
|
-
isAxiosError:
|
|
1763
|
-
spread:
|
|
1764
|
-
toFormData:
|
|
1765
|
-
AxiosHeaders:
|
|
1766
|
-
HttpStatusCode:
|
|
1767
|
-
formToJSON:
|
|
1768
|
-
getAdapter:
|
|
1769
|
-
mergeConfig:
|
|
1770
|
-
} = g,
|
|
1754
|
+
Axios: lr,
|
|
1755
|
+
AxiosError: ur,
|
|
1756
|
+
CanceledError: fr,
|
|
1757
|
+
isCancel: dr,
|
|
1758
|
+
CancelToken: pr,
|
|
1759
|
+
VERSION: hr,
|
|
1760
|
+
all: mr,
|
|
1761
|
+
Cancel: yr,
|
|
1762
|
+
isAxiosError: br,
|
|
1763
|
+
spread: wr,
|
|
1764
|
+
toFormData: gr,
|
|
1765
|
+
AxiosHeaders: Sr,
|
|
1766
|
+
HttpStatusCode: Er,
|
|
1767
|
+
formToJSON: Rr,
|
|
1768
|
+
getAdapter: Or,
|
|
1769
|
+
mergeConfig: Tr
|
|
1770
|
+
} = g, Kn = {
|
|
1771
1771
|
abortController: new AbortController()
|
|
1772
1772
|
};
|
|
1773
|
-
let ge = "";
|
|
1774
|
-
const
|
|
1775
|
-
e.backendURL && (ge = e.backendURL, M.defaults.baseURL = ge);
|
|
1773
|
+
let ge = "", wt = {};
|
|
1774
|
+
const Ar = (e) => {
|
|
1775
|
+
e.backendURL && (ge = e.backendURL, M.defaults.baseURL = ge), e?.axiosCreate && (wt = e.axiosCreate);
|
|
1776
1776
|
}, M = g.create({
|
|
1777
1777
|
baseURL: ge,
|
|
1778
|
-
signal:
|
|
1778
|
+
signal: Kn.abortController.signal,
|
|
1779
1779
|
// Signal that is assiciated with any request to be made with this axios instance
|
|
1780
|
-
|
|
1781
|
-
|
|
1780
|
+
...wt ?? {}
|
|
1781
|
+
}), Gn = (e) => {
|
|
1782
|
+
const t = Yn(), n = t?.token ?? null, r = t?.expiresIn ?? null;
|
|
1782
1783
|
if (r) {
|
|
1783
1784
|
const s = t?.timestamp ?? null, i = Date.now();
|
|
1784
1785
|
if (r && i - s > r * 1e3)
|
|
@@ -1796,15 +1797,15 @@ M.interceptors.response.use(
|
|
|
1796
1797
|
(e) => (console.log("Error.....", e), e.response?.status, Promise.reject(e))
|
|
1797
1798
|
);
|
|
1798
1799
|
M.interceptors.request.use(
|
|
1799
|
-
|
|
1800
|
+
Gn,
|
|
1800
1801
|
(e) => Promise.reject(e)
|
|
1801
1802
|
);
|
|
1802
|
-
const
|
|
1803
|
+
const Cr = async ({ url: e, method: t, data: n }) => {
|
|
1803
1804
|
let r = n ?? {};
|
|
1804
1805
|
try {
|
|
1805
1806
|
let s = null;
|
|
1806
1807
|
if (t.toLowerCase() === "get") {
|
|
1807
|
-
const o =
|
|
1808
|
+
const o = Zn(r ?? {});
|
|
1808
1809
|
s = await M.get(`${e}${o}`);
|
|
1809
1810
|
} else
|
|
1810
1811
|
s = await M.post(e, r);
|
|
@@ -1812,7 +1813,7 @@ const Ar = async ({ url: e, method: t, data: n }) => {
|
|
|
1812
1813
|
} catch (s) {
|
|
1813
1814
|
return console.error(s), { success: !1, error: s };
|
|
1814
1815
|
}
|
|
1815
|
-
},
|
|
1816
|
+
}, Zn = (e = {}) => {
|
|
1816
1817
|
try {
|
|
1817
1818
|
let t = "?";
|
|
1818
1819
|
for (let n in e)
|
|
@@ -1828,13 +1829,13 @@ const Ar = async ({ url: e, method: t, data: n }) => {
|
|
|
1828
1829
|
console.error(t);
|
|
1829
1830
|
}
|
|
1830
1831
|
};
|
|
1831
|
-
function
|
|
1832
|
+
function xr(e = { token: null }) {
|
|
1832
1833
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
1833
1834
|
throw new TypeError("setBearerToken expects an object {token} with a 'token' property.");
|
|
1834
1835
|
const t = { token: null, ...e, timestamp: Date.now() };
|
|
1835
1836
|
localStorage.setItem("logginToken", JSON.stringify(t));
|
|
1836
1837
|
}
|
|
1837
|
-
function
|
|
1838
|
+
function Yn() {
|
|
1838
1839
|
const e = localStorage.getItem("logginToken");
|
|
1839
1840
|
try {
|
|
1840
1841
|
return e ? JSON.parse(e) : null;
|
|
@@ -1852,8 +1853,8 @@ const We = (e) => {
|
|
|
1852
1853
|
}
|
|
1853
1854
|
}, s = () => t, c = { setState: r, getState: s, getInitialState: () => f, subscribe: (l) => (n.add(l), () => n.delete(l)) }, f = t = e(r, s, c);
|
|
1854
1855
|
return c;
|
|
1855
|
-
},
|
|
1856
|
-
function
|
|
1856
|
+
}, er = ((e) => e ? We(e) : We), tr = (e) => e;
|
|
1857
|
+
function nr(e, t = tr) {
|
|
1857
1858
|
const n = Y.useSyncExternalStore(
|
|
1858
1859
|
e.subscribe,
|
|
1859
1860
|
Y.useCallback(() => t(e.getState()), [e, t]),
|
|
@@ -1862,9 +1863,9 @@ function tr(e, t = er) {
|
|
|
1862
1863
|
return Y.useDebugValue(n), n;
|
|
1863
1864
|
}
|
|
1864
1865
|
const ve = (e) => {
|
|
1865
|
-
const t =
|
|
1866
|
+
const t = er(e), n = (r) => nr(t, r);
|
|
1866
1867
|
return Object.assign(n, t), n;
|
|
1867
|
-
},
|
|
1868
|
+
}, rr = ((e) => e ? ve(e) : ve), sr = rr((e, t) => ({
|
|
1868
1869
|
loading: !1,
|
|
1869
1870
|
stateValue: {},
|
|
1870
1871
|
checkQueriesInQue: {},
|
|
@@ -1940,16 +1941,16 @@ const ve = (e) => {
|
|
|
1940
1941
|
t().cleareQueApi(l), f && f([]), console.error(u);
|
|
1941
1942
|
}
|
|
1942
1943
|
}
|
|
1943
|
-
})),
|
|
1944
|
-
function
|
|
1945
|
-
return
|
|
1944
|
+
})), or = sr;
|
|
1945
|
+
function Nr() {
|
|
1946
|
+
return or();
|
|
1946
1947
|
}
|
|
1947
1948
|
export {
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1949
|
+
or as Store,
|
|
1950
|
+
Nr as default,
|
|
1951
|
+
Zn as generateParams,
|
|
1952
|
+
Yn as getBearerToken,
|
|
1953
|
+
Ar as setBaseURL,
|
|
1954
|
+
xr as setBearerToken,
|
|
1955
|
+
Cr as useFetch
|
|
1955
1956
|
};
|