@iankibetsh/vue-streamline 1.0.6 → 1.0.8-beta
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/dist/vue-streamline.es.js +152 -147
- package/dist/vue-streamline.umd.js +3 -3
- package/package.json +1 -1
- package/src/composables/useStreamline.js +10 -3
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as et, inject as me, reactive as tt,
|
|
1
|
+
import { ref as et, inject as me, reactive as tt, onMounted as nt, toRefs as rt } from "vue";
|
|
2
2
|
function Fe(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const n =
|
|
7
|
+
const { toString: st } = Object.prototype, { getPrototypeOf: ue } = Object, V = /* @__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)), P = (e) => (e = e.toLowerCase(), (t) => V(t) === e), W = (e) => (t) => typeof t === e, { isArray: B } = Array, q = W("undefined");
|
|
11
|
-
function
|
|
11
|
+
function ot(e) {
|
|
12
12
|
return e !== null && !q(e) && e.constructor !== null && !q(e.constructor) && T(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
14
|
const _e = P("ArrayBuffer");
|
|
15
|
-
function
|
|
15
|
+
function it(e) {
|
|
16
16
|
let t;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && _e(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const at = W("string"), T = W("function"), Le = W("number"), K = (e) => e !== null && typeof e == "object", ct = (e) => e === !0 || e === !1, z = (e) => {
|
|
20
20
|
if (V(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const t = ue(e);
|
|
23
23
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
24
|
-
},
|
|
24
|
+
}, ut = P("Date"), lt = P("File"), ft = P("Blob"), dt = P("FileList"), pt = (e) => K(e) && T(e.pipe), ht = (e) => {
|
|
25
25
|
let t;
|
|
26
26
|
return e && (typeof FormData == "function" && e instanceof FormData || T(e.append) && ((t = V(e)) === "formdata" || // detect form-data instance
|
|
27
27
|
t === "object" && T(e.toString) && e.toString() === "[object FormData]"));
|
|
28
|
-
},
|
|
28
|
+
}, mt = P("URLSearchParams"), [yt, wt, Et, bt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), gt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
29
29
|
function M(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
30
30
|
if (e === null || typeof e > "u")
|
|
31
31
|
return;
|
|
@@ -59,13 +59,13 @@ function ne() {
|
|
|
59
59
|
arguments[r] && M(arguments[r], n);
|
|
60
60
|
return t;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const Rt = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
63
63
|
n && T(s) ? e[o] = Fe(s, n) : e[o] = s;
|
|
64
|
-
}, { allOwnKeys: r }), e),
|
|
64
|
+
}, { allOwnKeys: r }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ot = (e, t, n, r) => {
|
|
65
65
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
66
66
|
value: t.prototype
|
|
67
67
|
}), n && Object.assign(e.prototype, n);
|
|
68
|
-
},
|
|
68
|
+
}, Tt = (e, t, n, r) => {
|
|
69
69
|
let s, o, i;
|
|
70
70
|
const c = {};
|
|
71
71
|
if (t = t || {}, e == null) return t;
|
|
@@ -75,11 +75,11 @@ const gt = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
|
75
75
|
e = n !== !1 && ue(e);
|
|
76
76
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
77
77
|
return t;
|
|
78
|
-
},
|
|
78
|
+
}, At = (e, t, n) => {
|
|
79
79
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
80
80
|
const r = e.indexOf(t, n);
|
|
81
81
|
return r !== -1 && r === n;
|
|
82
|
-
},
|
|
82
|
+
}, xt = (e) => {
|
|
83
83
|
if (!e) return null;
|
|
84
84
|
if (B(e)) return e;
|
|
85
85
|
let t = e.length;
|
|
@@ -88,31 +88,31 @@ const gt = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
|
88
88
|
for (; t-- > 0; )
|
|
89
89
|
n[t] = e[t];
|
|
90
90
|
return n;
|
|
91
|
-
},
|
|
91
|
+
}, Pt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), Ct = (e, t) => {
|
|
92
92
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
93
93
|
let s;
|
|
94
94
|
for (; (s = r.next()) && !s.done; ) {
|
|
95
95
|
const o = s.value;
|
|
96
96
|
t.call(e, o[0], o[1]);
|
|
97
97
|
}
|
|
98
|
-
},
|
|
98
|
+
}, Nt = (e, t) => {
|
|
99
99
|
let n;
|
|
100
100
|
const r = [];
|
|
101
101
|
for (; (n = e.exec(t)) !== null; )
|
|
102
102
|
r.push(n);
|
|
103
103
|
return r;
|
|
104
|
-
},
|
|
104
|
+
}, Ft = P("HTMLFormElement"), _t = (e) => e.toLowerCase().replace(
|
|
105
105
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
106
106
|
function(n, r, s) {
|
|
107
107
|
return r.toUpperCase() + s;
|
|
108
108
|
}
|
|
109
|
-
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
109
|
+
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Lt = P("RegExp"), Be = (e, t) => {
|
|
110
110
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
111
111
|
M(n, (s, o) => {
|
|
112
112
|
let i;
|
|
113
113
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
114
114
|
}), Object.defineProperties(e, r);
|
|
115
|
-
},
|
|
115
|
+
}, Ut = (e) => {
|
|
116
116
|
Be(e, (t, n) => {
|
|
117
117
|
if (T(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
118
118
|
return !1;
|
|
@@ -127,29 +127,29 @@ const gt = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
},
|
|
130
|
+
}, Dt = (e, t) => {
|
|
131
131
|
const n = {}, r = (s) => {
|
|
132
132
|
s.forEach((o) => {
|
|
133
133
|
n[o] = !0;
|
|
134
134
|
});
|
|
135
135
|
};
|
|
136
136
|
return B(e) ? r(e) : r(String(e).split(t)), n;
|
|
137
|
-
},
|
|
138
|
-
},
|
|
137
|
+
}, Bt = () => {
|
|
138
|
+
}, kt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", ke = {
|
|
139
139
|
DIGIT: we,
|
|
140
140
|
ALPHA: Z,
|
|
141
141
|
ALPHA_DIGIT: Z + Z.toUpperCase() + we
|
|
142
|
-
},
|
|
142
|
+
}, jt = (e = 16, t = ke.ALPHA_DIGIT) => {
|
|
143
143
|
let n = "";
|
|
144
144
|
const { length: r } = t;
|
|
145
145
|
for (; e--; )
|
|
146
146
|
n += t[Math.random() * r | 0];
|
|
147
147
|
return n;
|
|
148
148
|
};
|
|
149
|
-
function
|
|
149
|
+
function qt(e) {
|
|
150
150
|
return !!(e && T(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const Mt = (e) => {
|
|
153
153
|
const t = new Array(10), n = (r, s) => {
|
|
154
154
|
if (K(r)) {
|
|
155
155
|
if (t.indexOf(r) >= 0)
|
|
@@ -166,72 +166,72 @@ const qt = (e) => {
|
|
|
166
166
|
return r;
|
|
167
167
|
};
|
|
168
168
|
return n(e, 0);
|
|
169
|
-
},
|
|
169
|
+
}, Ht = P("AsyncFunction"), It = (e) => e && (K(e) || T(e)) && T(e.then) && T(e.catch), je = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: s, data: o }) => {
|
|
170
170
|
s === L && o === n && r.length && r.shift()();
|
|
171
171
|
}, !1), (s) => {
|
|
172
172
|
r.push(s), L.postMessage(n, "*");
|
|
173
173
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
174
174
|
typeof setImmediate == "function",
|
|
175
175
|
T(L.postMessage)
|
|
176
|
-
),
|
|
176
|
+
), zt = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || je, a = {
|
|
177
177
|
isArray: B,
|
|
178
178
|
isArrayBuffer: _e,
|
|
179
|
-
isBuffer:
|
|
180
|
-
isFormData:
|
|
181
|
-
isArrayBufferView:
|
|
182
|
-
isString:
|
|
179
|
+
isBuffer: ot,
|
|
180
|
+
isFormData: ht,
|
|
181
|
+
isArrayBufferView: it,
|
|
182
|
+
isString: at,
|
|
183
183
|
isNumber: Le,
|
|
184
|
-
isBoolean:
|
|
184
|
+
isBoolean: ct,
|
|
185
185
|
isObject: K,
|
|
186
186
|
isPlainObject: z,
|
|
187
|
-
isReadableStream:
|
|
188
|
-
isRequest:
|
|
189
|
-
isResponse:
|
|
190
|
-
isHeaders:
|
|
187
|
+
isReadableStream: yt,
|
|
188
|
+
isRequest: wt,
|
|
189
|
+
isResponse: Et,
|
|
190
|
+
isHeaders: bt,
|
|
191
191
|
isUndefined: q,
|
|
192
|
-
isDate:
|
|
193
|
-
isFile:
|
|
194
|
-
isBlob:
|
|
195
|
-
isRegExp:
|
|
192
|
+
isDate: ut,
|
|
193
|
+
isFile: lt,
|
|
194
|
+
isBlob: ft,
|
|
195
|
+
isRegExp: Lt,
|
|
196
196
|
isFunction: T,
|
|
197
|
-
isStream:
|
|
198
|
-
isURLSearchParams:
|
|
199
|
-
isTypedArray:
|
|
200
|
-
isFileList:
|
|
197
|
+
isStream: pt,
|
|
198
|
+
isURLSearchParams: mt,
|
|
199
|
+
isTypedArray: Pt,
|
|
200
|
+
isFileList: dt,
|
|
201
201
|
forEach: M,
|
|
202
202
|
merge: ne,
|
|
203
|
-
extend:
|
|
204
|
-
trim:
|
|
205
|
-
stripBOM:
|
|
206
|
-
inherits:
|
|
207
|
-
toFlatObject:
|
|
203
|
+
extend: Rt,
|
|
204
|
+
trim: gt,
|
|
205
|
+
stripBOM: St,
|
|
206
|
+
inherits: Ot,
|
|
207
|
+
toFlatObject: Tt,
|
|
208
208
|
kindOf: V,
|
|
209
209
|
kindOfTest: P,
|
|
210
|
-
endsWith:
|
|
211
|
-
toArray:
|
|
212
|
-
forEachEntry:
|
|
213
|
-
matchAll:
|
|
214
|
-
isHTMLForm:
|
|
210
|
+
endsWith: At,
|
|
211
|
+
toArray: xt,
|
|
212
|
+
forEachEntry: Ct,
|
|
213
|
+
matchAll: Nt,
|
|
214
|
+
isHTMLForm: Ft,
|
|
215
215
|
hasOwnProperty: ye,
|
|
216
216
|
hasOwnProp: ye,
|
|
217
217
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
218
218
|
reduceDescriptors: Be,
|
|
219
|
-
freezeMethods:
|
|
220
|
-
toObjectSet:
|
|
221
|
-
toCamelCase:
|
|
222
|
-
noop:
|
|
223
|
-
toFiniteNumber:
|
|
219
|
+
freezeMethods: Ut,
|
|
220
|
+
toObjectSet: Dt,
|
|
221
|
+
toCamelCase: _t,
|
|
222
|
+
noop: Bt,
|
|
223
|
+
toFiniteNumber: kt,
|
|
224
224
|
findKey: Ue,
|
|
225
225
|
global: L,
|
|
226
226
|
isContextDefined: De,
|
|
227
227
|
ALPHABET: ke,
|
|
228
|
-
generateString:
|
|
229
|
-
isSpecCompliantForm:
|
|
230
|
-
toJSONObject:
|
|
231
|
-
isAsyncFn:
|
|
232
|
-
isThenable:
|
|
228
|
+
generateString: jt,
|
|
229
|
+
isSpecCompliantForm: qt,
|
|
230
|
+
toJSONObject: Mt,
|
|
231
|
+
isAsyncFn: Ht,
|
|
232
|
+
isThenable: It,
|
|
233
233
|
setImmediate: je,
|
|
234
|
-
asap:
|
|
234
|
+
asap: zt
|
|
235
235
|
};
|
|
236
236
|
function m(e, t, n, r, s) {
|
|
237
237
|
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);
|
|
@@ -283,7 +283,7 @@ m.from = (e, t, n, r, s, o) => {
|
|
|
283
283
|
return d !== Error.prototype;
|
|
284
284
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
285
285
|
};
|
|
286
|
-
const
|
|
286
|
+
const Jt = null;
|
|
287
287
|
function re(e) {
|
|
288
288
|
return a.isPlainObject(e) || a.isArray(e);
|
|
289
289
|
}
|
|
@@ -295,10 +295,10 @@ function Ee(e, t, n) {
|
|
|
295
295
|
return s = He(s), !n && o ? "[" + s + "]" : s;
|
|
296
296
|
}).join(n ? "." : "") : t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function vt(e) {
|
|
299
299
|
return a.isArray(e) && !e.some(re);
|
|
300
300
|
}
|
|
301
|
-
const
|
|
301
|
+
const $t = a.toFlatObject(a, {}, null, function(t) {
|
|
302
302
|
return /^is[A-Z]/.test(t);
|
|
303
303
|
});
|
|
304
304
|
function G(e, t, n) {
|
|
@@ -327,7 +327,7 @@ function G(e, t, n) {
|
|
|
327
327
|
if (h && !p && typeof h == "object") {
|
|
328
328
|
if (a.endsWith(y, "{}"))
|
|
329
329
|
y = r ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
330
|
-
else if (a.isArray(h) &&
|
|
330
|
+
else if (a.isArray(h) && vt(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (S = a.toArray(h)))
|
|
331
331
|
return y = He(y), S.forEach(function(w, A) {
|
|
332
332
|
!(a.isUndefined(w) || w === null) && t.append(
|
|
333
333
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -338,7 +338,7 @@ function G(e, t, n) {
|
|
|
338
338
|
}
|
|
339
339
|
return re(h) ? !0 : (t.append(Ee(p, y, o), u(h)), !1);
|
|
340
340
|
}
|
|
341
|
-
const f = [], E = Object.assign(
|
|
341
|
+
const f = [], E = Object.assign($t, {
|
|
342
342
|
defaultVisitor: l,
|
|
343
343
|
convertValue: u,
|
|
344
344
|
isVisitable: re
|
|
@@ -391,13 +391,13 @@ Ie.toString = function(t) {
|
|
|
391
391
|
return n(s[0]) + "=" + n(s[1]);
|
|
392
392
|
}, "").join("&");
|
|
393
393
|
};
|
|
394
|
-
function
|
|
394
|
+
function Vt(e) {
|
|
395
395
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
396
396
|
}
|
|
397
397
|
function ze(e, t, n) {
|
|
398
398
|
if (!t)
|
|
399
399
|
return e;
|
|
400
|
-
const r = n && n.encode ||
|
|
400
|
+
const r = n && n.encode || Vt, s = n && n.serialize;
|
|
401
401
|
let o;
|
|
402
402
|
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new le(t, n).toString(r), o) {
|
|
403
403
|
const i = e.indexOf("#");
|
|
@@ -463,36 +463,36 @@ const Je = {
|
|
|
463
463
|
silentJSONParsing: !0,
|
|
464
464
|
forcedJSONParsing: !0,
|
|
465
465
|
clarifyTimeoutError: !1
|
|
466
|
-
},
|
|
466
|
+
}, Wt = typeof URLSearchParams < "u" ? URLSearchParams : le, Kt = typeof FormData < "u" ? FormData : null, Gt = typeof Blob < "u" ? Blob : null, Xt = {
|
|
467
467
|
isBrowser: !0,
|
|
468
468
|
classes: {
|
|
469
|
-
URLSearchParams:
|
|
470
|
-
FormData:
|
|
471
|
-
Blob:
|
|
469
|
+
URLSearchParams: Wt,
|
|
470
|
+
FormData: Kt,
|
|
471
|
+
Blob: Gt
|
|
472
472
|
},
|
|
473
473
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
474
|
-
}, fe = typeof window < "u" && typeof document < "u",
|
|
475
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
474
|
+
}, fe = typeof window < "u" && typeof document < "u", Qt = ((e) => fe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Zt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
475
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Yt = fe && window.location.href || "http://localhost", en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
476
476
|
__proto__: null,
|
|
477
477
|
hasBrowserEnv: fe,
|
|
478
|
-
hasStandardBrowserEnv:
|
|
479
|
-
hasStandardBrowserWebWorkerEnv:
|
|
480
|
-
origin:
|
|
478
|
+
hasStandardBrowserEnv: Qt,
|
|
479
|
+
hasStandardBrowserWebWorkerEnv: Zt,
|
|
480
|
+
origin: Yt
|
|
481
481
|
}, Symbol.toStringTag, { value: "Module" })), x = {
|
|
482
|
-
...
|
|
483
|
-
...
|
|
482
|
+
...en,
|
|
483
|
+
...Xt
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function tn(e, t) {
|
|
486
486
|
return G(e, new x.classes.URLSearchParams(), Object.assign({
|
|
487
487
|
visitor: function(n, r, s, o) {
|
|
488
488
|
return x.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
489
489
|
}
|
|
490
490
|
}, t));
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function nn(e) {
|
|
493
493
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function rn(e) {
|
|
496
496
|
const t = {}, n = Object.keys(e);
|
|
497
497
|
let r;
|
|
498
498
|
const s = n.length;
|
|
@@ -506,17 +506,17 @@ function ve(e) {
|
|
|
506
506
|
let i = n[o++];
|
|
507
507
|
if (i === "__proto__") return !0;
|
|
508
508
|
const c = Number.isFinite(+i), d = o >= n.length;
|
|
509
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
509
|
+
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = rn(s[i])), !c);
|
|
510
510
|
}
|
|
511
511
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
512
512
|
const n = {};
|
|
513
513
|
return a.forEachEntry(e, (r, s) => {
|
|
514
|
-
t(
|
|
514
|
+
t(nn(r), s, n, 0);
|
|
515
515
|
}), n;
|
|
516
516
|
}
|
|
517
517
|
return null;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function sn(e, t, n) {
|
|
520
520
|
if (a.isString(e))
|
|
521
521
|
try {
|
|
522
522
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -542,7 +542,7 @@ const H = {
|
|
|
542
542
|
let c;
|
|
543
543
|
if (o) {
|
|
544
544
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
545
|
-
return
|
|
545
|
+
return tn(t, this.formSerializer).toString();
|
|
546
546
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
547
547
|
const d = this.env && this.env.FormData;
|
|
548
548
|
return G(
|
|
@@ -552,7 +552,7 @@ const H = {
|
|
|
552
552
|
);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
555
|
+
return o || s ? (n.setContentType("application/json", !1), sn(t)) : t;
|
|
556
556
|
}],
|
|
557
557
|
transformResponse: [function(t) {
|
|
558
558
|
const n = this.transitional || H.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -595,7 +595,7 @@ const H = {
|
|
|
595
595
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
596
596
|
H.headers[e] = {};
|
|
597
597
|
});
|
|
598
|
-
const
|
|
598
|
+
const on = a.toObjectSet([
|
|
599
599
|
"age",
|
|
600
600
|
"authorization",
|
|
601
601
|
"content-length",
|
|
@@ -613,12 +613,12 @@ const sn = a.toObjectSet([
|
|
|
613
613
|
"referer",
|
|
614
614
|
"retry-after",
|
|
615
615
|
"user-agent"
|
|
616
|
-
]),
|
|
616
|
+
]), an = (e) => {
|
|
617
617
|
const t = {};
|
|
618
618
|
let n, r, s;
|
|
619
619
|
return e && e.split(`
|
|
620
620
|
`).forEach(function(i) {
|
|
621
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
621
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && on[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
622
622
|
}), t;
|
|
623
623
|
}, Re = Symbol("internals");
|
|
624
624
|
function j(e) {
|
|
@@ -627,14 +627,14 @@ function j(e) {
|
|
|
627
627
|
function J(e) {
|
|
628
628
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(J) : String(e);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function cn(e) {
|
|
631
631
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
632
632
|
let r;
|
|
633
633
|
for (; r = n.exec(e); )
|
|
634
634
|
t[r[1]] = r[2];
|
|
635
635
|
return t;
|
|
636
636
|
}
|
|
637
|
-
const
|
|
637
|
+
const un = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
638
638
|
function Y(e, t, n, r, s) {
|
|
639
639
|
if (a.isFunction(r))
|
|
640
640
|
return r.call(this, t, n);
|
|
@@ -645,10 +645,10 @@ function Y(e, t, n, r, s) {
|
|
|
645
645
|
return r.test(t);
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function ln(e) {
|
|
649
649
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function fn(e, t) {
|
|
652
652
|
const n = a.toCamelCase(" " + t);
|
|
653
653
|
["get", "set", "has"].forEach((r) => {
|
|
654
654
|
Object.defineProperty(e, r + n, {
|
|
@@ -675,8 +675,8 @@ class O {
|
|
|
675
675
|
const i = (c, d) => a.forEach(c, (u, l) => o(u, l, d));
|
|
676
676
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
677
677
|
i(t, n);
|
|
678
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
679
|
-
i(
|
|
678
|
+
else if (a.isString(t) && (t = t.trim()) && !un(t))
|
|
679
|
+
i(an(t), n);
|
|
680
680
|
else if (a.isHeaders(t))
|
|
681
681
|
for (const [c, d] of t.entries())
|
|
682
682
|
o(d, c, r);
|
|
@@ -692,7 +692,7 @@ class O {
|
|
|
692
692
|
if (!n)
|
|
693
693
|
return s;
|
|
694
694
|
if (n === !0)
|
|
695
|
-
return
|
|
695
|
+
return cn(s);
|
|
696
696
|
if (a.isFunction(n))
|
|
697
697
|
return n.call(this, s, r);
|
|
698
698
|
if (a.isRegExp(n))
|
|
@@ -736,7 +736,7 @@ class O {
|
|
|
736
736
|
n[i] = J(s), delete n[o];
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
|
-
const c = t ?
|
|
739
|
+
const c = t ? ln(o) : String(o).trim();
|
|
740
740
|
c !== o && delete n[o], n[c] = J(s), r[c] = !0;
|
|
741
741
|
}), this;
|
|
742
742
|
}
|
|
@@ -772,7 +772,7 @@ class O {
|
|
|
772
772
|
}).accessors, s = this.prototype;
|
|
773
773
|
function o(i) {
|
|
774
774
|
const c = j(i);
|
|
775
|
-
r[c] || (
|
|
775
|
+
r[c] || (fn(s, i), r[c] = !0);
|
|
776
776
|
}
|
|
777
777
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
778
778
|
}
|
|
@@ -814,11 +814,11 @@ function Ve(e, t, n) {
|
|
|
814
814
|
n
|
|
815
815
|
));
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function dn(e) {
|
|
818
818
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
819
819
|
return t && t[1] || "";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function pn(e, t) {
|
|
822
822
|
e = e || 10;
|
|
823
823
|
const n = new Array(e), r = new Array(e);
|
|
824
824
|
let s = 0, o = 0, i;
|
|
@@ -834,7 +834,7 @@ function dn(e, t) {
|
|
|
834
834
|
return b ? Math.round(E * 1e3 / b) : void 0;
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function hn(e, t) {
|
|
838
838
|
let n = 0, r = 1e3 / t, s, o;
|
|
839
839
|
const i = (u, l = Date.now()) => {
|
|
840
840
|
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
@@ -848,8 +848,8 @@ function pn(e, t) {
|
|
|
848
848
|
}
|
|
849
849
|
const v = (e, t, n = 3) => {
|
|
850
850
|
let r = 0;
|
|
851
|
-
const s =
|
|
852
|
-
return
|
|
851
|
+
const s = pn(50, 250);
|
|
852
|
+
return hn((o) => {
|
|
853
853
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - r, u = s(d), l = i <= c;
|
|
854
854
|
r = i;
|
|
855
855
|
const f = {
|
|
@@ -872,7 +872,7 @@ const v = (e, t, n = 3) => {
|
|
|
872
872
|
total: e,
|
|
873
873
|
loaded: r
|
|
874
874
|
}), t[1]];
|
|
875
|
-
}, Oe = (e) => (...t) => a.asap(() => e(...t)),
|
|
875
|
+
}, Oe = (e) => (...t) => a.asap(() => e(...t)), mn = x.hasStandardBrowserEnv ? (
|
|
876
876
|
// Standard browser envs have full support of the APIs needed to test
|
|
877
877
|
// whether the request URL is of the same origin as current location.
|
|
878
878
|
function() {
|
|
@@ -903,7 +903,7 @@ const v = (e, t, n = 3) => {
|
|
|
903
903
|
return !0;
|
|
904
904
|
};
|
|
905
905
|
}()
|
|
906
|
-
),
|
|
906
|
+
), yn = x.hasStandardBrowserEnv ? (
|
|
907
907
|
// Standard browser envs support document.cookie
|
|
908
908
|
{
|
|
909
909
|
write(e, t, n, r, s, o) {
|
|
@@ -930,14 +930,14 @@ const v = (e, t, n = 3) => {
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
|
-
function
|
|
933
|
+
function wn(e) {
|
|
934
934
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function En(e, t) {
|
|
937
937
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
938
938
|
}
|
|
939
939
|
function We(e, t) {
|
|
940
|
-
return e && !
|
|
940
|
+
return e && !wn(t) ? En(e, t) : t;
|
|
941
941
|
}
|
|
942
942
|
const Te = (e) => e instanceof O ? { ...e } : e;
|
|
943
943
|
function D(e, t) {
|
|
@@ -1020,12 +1020,12 @@ const Ke = (e) => {
|
|
|
1020
1020
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
|
-
if (x.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1024
|
-
const u = s && o &&
|
|
1023
|
+
if (x.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && mn(t.url))) {
|
|
1024
|
+
const u = s && o && yn.read(o);
|
|
1025
1025
|
u && i.set(s, u);
|
|
1026
1026
|
}
|
|
1027
1027
|
return t;
|
|
1028
|
-
},
|
|
1028
|
+
}, bn = typeof XMLHttpRequest < "u", gn = bn && function(e) {
|
|
1029
1029
|
return new Promise(function(n, r) {
|
|
1030
1030
|
const s = Ke(e);
|
|
1031
1031
|
let o = s.data;
|
|
@@ -1075,14 +1075,14 @@ const Ke = (e) => {
|
|
|
1075
1075
|
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([E, h] = v(u, !0), p.addEventListener("progress", E)), d && p.upload && ([f, b] = v(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (l = (w) => {
|
|
1076
1076
|
p && (r(!w || w.type ? new k(null, e, p) : w), p.abort(), p = null);
|
|
1077
1077
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1078
|
-
const g =
|
|
1078
|
+
const g = dn(s.url);
|
|
1079
1079
|
if (g && x.protocols.indexOf(g) === -1) {
|
|
1080
1080
|
r(new m("Unsupported protocol " + g + ":", m.ERR_BAD_REQUEST, e));
|
|
1081
1081
|
return;
|
|
1082
1082
|
}
|
|
1083
1083
|
p.send(o || null);
|
|
1084
1084
|
});
|
|
1085
|
-
},
|
|
1085
|
+
}, Rn = (e, t) => {
|
|
1086
1086
|
let n = new AbortController(), r;
|
|
1087
1087
|
const s = function(d) {
|
|
1088
1088
|
if (!r) {
|
|
@@ -1104,7 +1104,7 @@ const Ke = (e) => {
|
|
|
1104
1104
|
return c.unsubscribe = i, [c, () => {
|
|
1105
1105
|
o && clearTimeout(o), o = null;
|
|
1106
1106
|
}];
|
|
1107
|
-
},
|
|
1107
|
+
}, Sn = function* (e, t) {
|
|
1108
1108
|
let n = e.byteLength;
|
|
1109
1109
|
if (!t || n < t) {
|
|
1110
1110
|
yield e;
|
|
@@ -1113,11 +1113,11 @@ const Ke = (e) => {
|
|
|
1113
1113
|
let r = 0, s;
|
|
1114
1114
|
for (; r < n; )
|
|
1115
1115
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1116
|
-
},
|
|
1116
|
+
}, On = async function* (e, t, n) {
|
|
1117
1117
|
for await (const r of e)
|
|
1118
|
-
yield*
|
|
1118
|
+
yield* Sn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1119
1119
|
}, Ae = (e, t, n, r, s) => {
|
|
1120
|
-
const o =
|
|
1120
|
+
const o = On(e, t, s);
|
|
1121
1121
|
let i = 0, c, d = (u) => {
|
|
1122
1122
|
c || (c = !0, r && r(u));
|
|
1123
1123
|
};
|
|
@@ -1151,7 +1151,7 @@ const Ke = (e) => {
|
|
|
1151
1151
|
} catch {
|
|
1152
1152
|
return !1;
|
|
1153
1153
|
}
|
|
1154
|
-
},
|
|
1154
|
+
}, Tn = Ge && Xe(() => {
|
|
1155
1155
|
let e = !1;
|
|
1156
1156
|
const t = new Request(x.origin, {
|
|
1157
1157
|
body: new ReadableStream(),
|
|
@@ -1171,7 +1171,7 @@ X && ((e) => {
|
|
|
1171
1171
|
});
|
|
1172
1172
|
});
|
|
1173
1173
|
})(new Response());
|
|
1174
|
-
const
|
|
1174
|
+
const An = async (e) => {
|
|
1175
1175
|
if (e == null)
|
|
1176
1176
|
return 0;
|
|
1177
1177
|
if (a.isBlob(e))
|
|
@@ -1182,10 +1182,10 @@ const Tn = async (e) => {
|
|
|
1182
1182
|
return e.byteLength;
|
|
1183
1183
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1184
1184
|
return (await se(e)).byteLength;
|
|
1185
|
-
},
|
|
1185
|
+
}, xn = async (e, t) => {
|
|
1186
1186
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1187
|
-
return n ??
|
|
1188
|
-
},
|
|
1187
|
+
return n ?? An(t);
|
|
1188
|
+
}, Pn = X && (async (e) => {
|
|
1189
1189
|
let {
|
|
1190
1190
|
url: t,
|
|
1191
1191
|
method: n,
|
|
@@ -1201,7 +1201,7 @@ const Tn = async (e) => {
|
|
|
1201
1201
|
fetchOptions: E
|
|
1202
1202
|
} = Ke(e);
|
|
1203
1203
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1204
|
-
let [b, h] = s || o || i ?
|
|
1204
|
+
let [b, h] = s || o || i ? Rn([s, o], i) : [], y, p;
|
|
1205
1205
|
const S = () => {
|
|
1206
1206
|
!y && setTimeout(() => {
|
|
1207
1207
|
b && b.unsubscribe();
|
|
@@ -1209,7 +1209,7 @@ const Tn = async (e) => {
|
|
|
1209
1209
|
};
|
|
1210
1210
|
let g;
|
|
1211
1211
|
try {
|
|
1212
|
-
if (d &&
|
|
1212
|
+
if (d && Tn && n !== "get" && n !== "head" && (g = await xn(l, r)) !== 0) {
|
|
1213
1213
|
let C = new Request(t, {
|
|
1214
1214
|
method: "POST",
|
|
1215
1215
|
body: r,
|
|
@@ -1271,9 +1271,9 @@ const Tn = async (e) => {
|
|
|
1271
1271
|
) : m.from(w, w && w.code, e, p);
|
|
1272
1272
|
}
|
|
1273
1273
|
}), ie = {
|
|
1274
|
-
http:
|
|
1275
|
-
xhr:
|
|
1276
|
-
fetch:
|
|
1274
|
+
http: Jt,
|
|
1275
|
+
xhr: gn,
|
|
1276
|
+
fetch: Pn
|
|
1277
1277
|
};
|
|
1278
1278
|
a.forEach(ie, (e, t) => {
|
|
1279
1279
|
if (e) {
|
|
@@ -1284,7 +1284,7 @@ a.forEach(ie, (e, t) => {
|
|
|
1284
1284
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1285
1285
|
}
|
|
1286
1286
|
});
|
|
1287
|
-
const Pe = (e) => `- ${e}`,
|
|
1287
|
+
const Pe = (e) => `- ${e}`, Cn = (e) => a.isFunction(e) || e === null || e === !1, Qe = {
|
|
1288
1288
|
getAdapter: (e) => {
|
|
1289
1289
|
e = a.isArray(e) ? e : [e];
|
|
1290
1290
|
const { length: t } = e;
|
|
@@ -1293,7 +1293,7 @@ const Pe = (e) => `- ${e}`, Pn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1293
1293
|
for (let o = 0; o < t; o++) {
|
|
1294
1294
|
n = e[o];
|
|
1295
1295
|
let i;
|
|
1296
|
-
if (r = n, !
|
|
1296
|
+
if (r = n, !Cn(n) && (r = ie[(i = String(n)).toLowerCase()], r === void 0))
|
|
1297
1297
|
throw new m(`Unknown adapter '${i}'`);
|
|
1298
1298
|
if (r)
|
|
1299
1299
|
break;
|
|
@@ -1362,7 +1362,7 @@ de.transitional = function(t, n, r) {
|
|
|
1362
1362
|
)), t ? t(o, i, c) : !0;
|
|
1363
1363
|
};
|
|
1364
1364
|
};
|
|
1365
|
-
function
|
|
1365
|
+
function Nn(e, t, n) {
|
|
1366
1366
|
if (typeof e != "object")
|
|
1367
1367
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1368
1368
|
const r = Object.keys(e);
|
|
@@ -1380,7 +1380,7 @@ function Cn(e, t, n) {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
1382
|
const ae = {
|
|
1383
|
-
assertOptions:
|
|
1383
|
+
assertOptions: Nn,
|
|
1384
1384
|
validators: de
|
|
1385
1385
|
}, F = ae.validators;
|
|
1386
1386
|
class U {
|
|
@@ -1571,12 +1571,12 @@ class pe {
|
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1574
|
+
function Fn(e) {
|
|
1575
1575
|
return function(n) {
|
|
1576
1576
|
return e.apply(null, n);
|
|
1577
1577
|
};
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function _n(e) {
|
|
1580
1580
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1581
1581
|
}
|
|
1582
1582
|
const ce = {
|
|
@@ -1665,21 +1665,24 @@ R.Cancel = R.CanceledError;
|
|
|
1665
1665
|
R.all = function(t) {
|
|
1666
1666
|
return Promise.all(t);
|
|
1667
1667
|
};
|
|
1668
|
-
R.spread =
|
|
1669
|
-
R.isAxiosError =
|
|
1668
|
+
R.spread = Fn;
|
|
1669
|
+
R.isAxiosError = _n;
|
|
1670
1670
|
R.mergeConfig = D;
|
|
1671
1671
|
R.AxiosHeaders = O;
|
|
1672
1672
|
R.formToJSON = (e) => ve(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1673
1673
|
R.getAdapter = Qe.getAdapter;
|
|
1674
1674
|
R.HttpStatusCode = ce;
|
|
1675
1675
|
R.default = R;
|
|
1676
|
-
const
|
|
1676
|
+
const Un = (e, ...t) => {
|
|
1677
1677
|
let n = {};
|
|
1678
1678
|
const r = et(!1), s = me("streamlineUrl"), o = me("streamlineHeaders"), i = R.create({
|
|
1679
1679
|
headers: {
|
|
1680
1680
|
...o
|
|
1681
1681
|
}
|
|
1682
|
-
}), c = tt({
|
|
1682
|
+
}), c = tt({
|
|
1683
|
+
methods: [],
|
|
1684
|
+
properties: {}
|
|
1685
|
+
}), d = async () => {
|
|
1683
1686
|
try {
|
|
1684
1687
|
r.value = !0;
|
|
1685
1688
|
const f = await i.post(s, {
|
|
@@ -1694,7 +1697,7 @@ const Ln = (e, ...t) => {
|
|
|
1694
1697
|
r.value = !1;
|
|
1695
1698
|
}
|
|
1696
1699
|
}, u = (f) => {
|
|
1697
|
-
Object.assign(c, f.properties);
|
|
1700
|
+
c.methods = f.methods, c.properties = f.properties, Object.assign(c, f.properties);
|
|
1698
1701
|
const E = f.methods;
|
|
1699
1702
|
for (const b of E)
|
|
1700
1703
|
c[b] = async (...h) => {
|
|
@@ -1735,19 +1738,21 @@ const Ln = (e, ...t) => {
|
|
|
1735
1738
|
};
|
|
1736
1739
|
}
|
|
1737
1740
|
});
|
|
1738
|
-
return
|
|
1739
|
-
|
|
1741
|
+
return nt(() => {
|
|
1742
|
+
d();
|
|
1743
|
+
}), {
|
|
1744
|
+
...rt(c),
|
|
1740
1745
|
// Spread the reactive service properties and return as refs for reactivity
|
|
1741
1746
|
service: l,
|
|
1742
1747
|
// Return the proxy service for method calls
|
|
1743
1748
|
loading: r
|
|
1744
1749
|
};
|
|
1745
|
-
},
|
|
1750
|
+
}, Dn = {
|
|
1746
1751
|
install(e, t) {
|
|
1747
1752
|
e.provide("streamlineUrl", t.streamlineUrl), e.provide("streamlineHeaders", t.streamlineHeaders);
|
|
1748
1753
|
}
|
|
1749
1754
|
};
|
|
1750
1755
|
export {
|
|
1751
|
-
|
|
1752
|
-
|
|
1756
|
+
Dn as streamline,
|
|
1757
|
+
Un as useStreamline
|
|
1753
1758
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(L,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],F):(L=typeof globalThis<"u"?globalThis:L||self,F(L.VueStreamline={},L.Vue))})(this,function(L,F){"use strict";function ye(e,t){return function(){return e.apply(t,arguments)}}const{toString:tt}=Object.prototype,{getPrototypeOf:Y}=Object,$=(e=>t=>{const n=tt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>$(t)===e),J=e=>t=>typeof t===e,{isArray:k}=Array,M=J("undefined");function nt(e){return e!==null&&!M(e)&&e.constructor!==null&&!M(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const we=A("ArrayBuffer");function rt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&we(e.buffer),t}const st=J("string"),T=J("function"),be=J("number"),v=e=>e!==null&&typeof e=="object",ot=e=>e===!0||e===!1,V=e=>{if($(e)!=="object")return!1;const t=Y(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},it=A("Date"),at=A("File"),ct=A("Blob"),ut=A("FileList"),lt=e=>v(e)&&T(e.pipe),ft=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=$(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},dt=A("URLSearchParams"),[pt,ht,mt,yt]=["ReadableStream","Request","Response","Headers"].map(A),wt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),k(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Ee(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const U=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Se=e=>!M(e)&&e!==U;function ee(){const{caseless:e}=Se(this)&&this||{},t={},n=(r,s)=>{const o=e&&Ee(t,s)||s;V(t[o])&&V(r)?t[o]=ee(t[o],r):V(r)?t[o]=ee({},r):k(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&H(arguments[r],n);return t}const bt=(e,t,n,{allOwnKeys:r}={})=>(H(t,(s,o)=>{n&&T(s)?e[o]=ye(s,n):e[o]=s},{allOwnKeys:r}),e),Et=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),St=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},gt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Y(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ot=e=>{if(!e)return null;if(k(e))return e;let t=e.length;if(!be(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Y(Uint8Array)),At=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},xt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Pt=A("HTMLFormElement"),Ct=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ge=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Nt=A("RegExp"),Re=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};H(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Ft=e=>{Re(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Lt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return k(e)?r(e):r(String(e).split(t)),n},_t=()=>{},Ut=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,te="abcdefghijklmnopqrstuvwxyz",Oe="0123456789",Te={DIGIT:Oe,ALPHA:te,ALPHA_DIGIT:te+te.toUpperCase()+Oe},Dt=(e=16,t=Te.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Bt(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const jt=e=>{const t=new Array(10),n=(r,s)=>{if(v(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=k(r)?[]:{};return H(r,(i,c)=>{const d=n(i,s+1);!M(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},kt=A("AsyncFunction"),qt=e=>e&&(v(e)||T(e))&&T(e.then)&&T(e.catch),Ae=((e,t)=>e?setImmediate:t?((n,r)=>(U.addEventListener("message",({source:s,data:o})=>{s===U&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),U.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(U.postMessage)),Mt=typeof queueMicrotask<"u"?queueMicrotask.bind(U):typeof process<"u"&&process.nextTick||Ae,a={isArray:k,isArrayBuffer:we,isBuffer:nt,isFormData:ft,isArrayBufferView:rt,isString:st,isNumber:be,isBoolean:ot,isObject:v,isPlainObject:V,isReadableStream:pt,isRequest:ht,isResponse:mt,isHeaders:yt,isUndefined:M,isDate:it,isFile:at,isBlob:ct,isRegExp:Nt,isFunction:T,isStream:lt,isURLSearchParams:dt,isTypedArray:Tt,isFileList:ut,forEach:H,merge:ee,extend:bt,trim:wt,stripBOM:Et,inherits:St,toFlatObject:gt,kindOf:$,kindOfTest:A,endsWith:Rt,toArray:Ot,forEachEntry:At,matchAll:xt,isHTMLForm:Pt,hasOwnProperty:ge,hasOwnProp:ge,reduceDescriptors:Re,freezeMethods:Ft,toObjectSet:Lt,toCamelCase:Ct,noop:_t,toFiniteNumber:Ut,findKey:Ee,global:U,isContextDefined:Se,ALPHABET:Te,generateString:Dt,isSpecCompliantForm:Bt,toJSONObject:jt,isAsyncFn:kt,isThenable:qt,setImmediate:Ae,asap:Mt};function m(e,t,n,r,s){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)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xe=m.prototype,Pe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pe[e]={value:e}}),Object.defineProperties(m,Pe),Object.defineProperty(xe,"isAxiosError",{value:!0}),m.from=(e,t,n,r,s,o)=>{const i=Object.create(xe);return a.toFlatObject(e,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Ht=null;function ne(e){return a.isPlainObject(e)||a.isArray(e)}function Ce(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ne(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ce(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function It(e){return a.isArray(e)&&!e.some(ne)}const zt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function W(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!a.isUndefined(p[y])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(!d&&a.isBlob(h))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?d&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function l(h,y,p){let R=h;if(h&&!p&&typeof h=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&It(h)||(a.isFileList(h)||a.endsWith(y,"[]"))&&(R=a.toArray(h)))return y=Ce(y),R.forEach(function(w,P){!(a.isUndefined(w)||w===null)&&t.append(i===!0?Ne([y],P,o):i===null?y:y+"[]",u(w))}),!1}return ne(h)?!0:(t.append(Ne(p,y,o),u(h)),!1)}const f=[],b=Object.assign(zt,{defaultVisitor:l,convertValue:u,isVisitable:ne});function E(h,y){if(!a.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(h),a.forEach(h,function(R,S){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(S)?S.trim():S,y,b))===!0&&E(R,y?y.concat(S):[S])}),f.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function re(e,t){this._pairs=[],e&&W(e,this,t)}const Le=re.prototype;Le.append=function(t,n){this._pairs.push([t,n])},Le.toString=function(t){const n=t?function(r){return t.call(this,r,Fe)}:Fe;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function $t(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _e(e,t,n){if(!t)return e;const r=n&&n.encode||$t,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ue{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const De={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Jt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:re,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},se=typeof window<"u"&&typeof document<"u",vt=(e=>se&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Vt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wt=se&&window.location.href||"http://localhost",x={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:se,hasStandardBrowserEnv:vt,hasStandardBrowserWebWorkerEnv:Vt,origin:Wt},Symbol.toStringTag,{value:"Module"})),...Jt};function Kt(e,t){return W(e,new x.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return x.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Xt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Be(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Gt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Xt(r),s,n,0)}),n}return null}function Qt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const I={transitional:De,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Be(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Kt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return W(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Qt(t)):t}],transformResponse:[function(t){const n=this.transitional||I.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});const Zt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yt=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
1
|
+
(function(L,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],C):(L=typeof globalThis<"u"?globalThis:L||self,C(L.VueStreamline={},L.Vue))})(this,function(L,C){"use strict";function ye(e,t){return function(){return e.apply(t,arguments)}}const{toString:tt}=Object.prototype,{getPrototypeOf:Y}=Object,$=(e=>t=>{const n=tt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>$(t)===e),J=e=>t=>typeof t===e,{isArray:k}=Array,M=J("undefined");function nt(e){return e!==null&&!M(e)&&e.constructor!==null&&!M(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const we=A("ArrayBuffer");function rt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&we(e.buffer),t}const st=J("string"),T=J("function"),be=J("number"),v=e=>e!==null&&typeof e=="object",ot=e=>e===!0||e===!1,V=e=>{if($(e)!=="object")return!1;const t=Y(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},it=A("Date"),at=A("File"),ct=A("Blob"),ut=A("FileList"),lt=e=>v(e)&&T(e.pipe),ft=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=$(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},dt=A("URLSearchParams"),[pt,ht,mt,yt]=["ReadableStream","Request","Response","Headers"].map(A),wt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),k(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Ee(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const U=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Se=e=>!M(e)&&e!==U;function ee(){const{caseless:e}=Se(this)&&this||{},t={},n=(r,s)=>{const o=e&&Ee(t,s)||s;V(t[o])&&V(r)?t[o]=ee(t[o],r):V(r)?t[o]=ee({},r):k(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&H(arguments[r],n);return t}const bt=(e,t,n,{allOwnKeys:r}={})=>(H(t,(s,o)=>{n&&T(s)?e[o]=ye(s,n):e[o]=s},{allOwnKeys:r}),e),Et=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),St=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},gt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Y(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ot=e=>{if(!e)return null;if(k(e))return e;let t=e.length;if(!be(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Y(Uint8Array)),At=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},xt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Pt=A("HTMLFormElement"),Ct=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ge=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Nt=A("RegExp"),Re=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};H(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Ft=e=>{Re(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Lt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return k(e)?r(e):r(String(e).split(t)),n},_t=()=>{},Ut=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,te="abcdefghijklmnopqrstuvwxyz",Oe="0123456789",Te={DIGIT:Oe,ALPHA:te,ALPHA_DIGIT:te+te.toUpperCase()+Oe},Dt=(e=16,t=Te.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Bt(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const jt=e=>{const t=new Array(10),n=(r,s)=>{if(v(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=k(r)?[]:{};return H(r,(i,c)=>{const d=n(i,s+1);!M(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},kt=A("AsyncFunction"),qt=e=>e&&(v(e)||T(e))&&T(e.then)&&T(e.catch),Ae=((e,t)=>e?setImmediate:t?((n,r)=>(U.addEventListener("message",({source:s,data:o})=>{s===U&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),U.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(U.postMessage)),Mt=typeof queueMicrotask<"u"?queueMicrotask.bind(U):typeof process<"u"&&process.nextTick||Ae,a={isArray:k,isArrayBuffer:we,isBuffer:nt,isFormData:ft,isArrayBufferView:rt,isString:st,isNumber:be,isBoolean:ot,isObject:v,isPlainObject:V,isReadableStream:pt,isRequest:ht,isResponse:mt,isHeaders:yt,isUndefined:M,isDate:it,isFile:at,isBlob:ct,isRegExp:Nt,isFunction:T,isStream:lt,isURLSearchParams:dt,isTypedArray:Tt,isFileList:ut,forEach:H,merge:ee,extend:bt,trim:wt,stripBOM:Et,inherits:St,toFlatObject:gt,kindOf:$,kindOfTest:A,endsWith:Rt,toArray:Ot,forEachEntry:At,matchAll:xt,isHTMLForm:Pt,hasOwnProperty:ge,hasOwnProp:ge,reduceDescriptors:Re,freezeMethods:Ft,toObjectSet:Lt,toCamelCase:Ct,noop:_t,toFiniteNumber:Ut,findKey:Ee,global:U,isContextDefined:Se,ALPHABET:Te,generateString:Dt,isSpecCompliantForm:Bt,toJSONObject:jt,isAsyncFn:kt,isThenable:qt,setImmediate:Ae,asap:Mt};function m(e,t,n,r,s){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)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xe=m.prototype,Pe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pe[e]={value:e}}),Object.defineProperties(m,Pe),Object.defineProperty(xe,"isAxiosError",{value:!0}),m.from=(e,t,n,r,s,o)=>{const i=Object.create(xe);return a.toFlatObject(e,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Ht=null;function ne(e){return a.isPlainObject(e)||a.isArray(e)}function Ce(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ne(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ce(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function It(e){return a.isArray(e)&&!e.some(ne)}const zt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function W(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!a.isUndefined(p[y])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(!d&&a.isBlob(h))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?d&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function l(h,y,p){let R=h;if(h&&!p&&typeof h=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&It(h)||(a.isFileList(h)||a.endsWith(y,"[]"))&&(R=a.toArray(h)))return y=Ce(y),R.forEach(function(w,P){!(a.isUndefined(w)||w===null)&&t.append(i===!0?Ne([y],P,o):i===null?y:y+"[]",u(w))}),!1}return ne(h)?!0:(t.append(Ne(p,y,o),u(h)),!1)}const f=[],b=Object.assign(zt,{defaultVisitor:l,convertValue:u,isVisitable:ne});function E(h,y){if(!a.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(h),a.forEach(h,function(R,S){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(S)?S.trim():S,y,b))===!0&&E(R,y?y.concat(S):[S])}),f.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function re(e,t){this._pairs=[],e&&W(e,this,t)}const Le=re.prototype;Le.append=function(t,n){this._pairs.push([t,n])},Le.toString=function(t){const n=t?function(r){return t.call(this,r,Fe)}:Fe;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function $t(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _e(e,t,n){if(!t)return e;const r=n&&n.encode||$t,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ue{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const De={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Jt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:re,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},se=typeof window<"u"&&typeof document<"u",vt=(e=>se&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Vt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wt=se&&window.location.href||"http://localhost",x={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:se,hasStandardBrowserEnv:vt,hasStandardBrowserWebWorkerEnv:Vt,origin:Wt},Symbol.toStringTag,{value:"Module"})),...Jt};function Kt(e,t){return W(e,new x.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return x.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Xt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Be(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Gt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Xt(r),s,n,0)}),n}return null}function Qt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const I={transitional:De,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Be(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Kt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return W(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Qt(t)):t}],transformResponse:[function(t){const n=this.transitional||I.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});const Zt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yt=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
2
|
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Zt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},je=Symbol("internals");function z(e){return e&&String(e).trim().toLowerCase()}function K(e){return e===!1||e==null?e:a.isArray(e)?e.map(K):String(e)}function en(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const tn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function oe(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function nn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function rn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class O{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,d,u){const l=z(d);if(!l)throw new Error("header name must be a non-empty string");const f=a.findKey(s,l);(!f||s[f]===void 0||u===!0||u===void 0&&s[f]!==!1)&&(s[f||d]=K(c))}const i=(c,d)=>a.forEach(c,(u,l)=>o(u,l,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!tn(t))i(Yt(t),n);else if(a.isHeaders(t))for(const[c,d]of t.entries())o(d,c,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=z(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return en(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=z(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||oe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=z(i),i){const c=a.findKey(r,i);c&&(!n||oe(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||oe(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=K(s),delete n[o];return}const c=t?nn(o):String(o).trim();c!==o&&delete n[o],n[c]=K(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[je]=this[je]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=z(i);r[c]||(rn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(O.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(O);function ie(e,t){const n=this||I,r=t||n,s=O.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function ke(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(q,m,{__CANCEL__:!0});function qe(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function sn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function on(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const u=Date.now(),l=r[o];i||(i=u),n[s]=d,r[s]=u;let f=o,b=0;for(;f!==s;)b+=n[f++],f=f%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const E=l&&u-l;return E?Math.round(b*1e3/E):void 0}}function an(e,t){let n=0,r=1e3/t,s,o;const i=(u,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const l=Date.now(),f=l-n;f>=r?i(u,l):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-f)))},()=>s&&i(s)]}const X=(e,t,n=3)=>{let r=0;const s=on(50,250);return an(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=i-r,u=s(d),l=i<=c;r=i;const f={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:u||void 0,estimated:u&&c&&l?(c-i)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},Me=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},He=e=>(...t)=>a.asap(()=>e(...t)),cn=x.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),un=x.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ln(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ie(e,t){return e&&!ln(t)?fn(e,t):t}const ze=e=>e instanceof O?{...e}:e;function D(e,t){t=t||{};const n={};function r(u,l,f){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:f},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,f){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,f)}else return r(u,l,f)}function o(u,l){if(!a.isUndefined(l))return r(void 0,l)}function i(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function c(u,l,f){if(f in t)return r(u,l);if(f in e)return r(void 0,u)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(u,l)=>s(ze(u),ze(l),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const f=d[l]||s,b=f(e[l],t[l],l);a.isUndefined(b)&&f!==c||(n[l]=b)}),n}const $e=e=>{const t=D({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=O.from(i),t.url=_e(Ie(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(a.isFormData(n)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[u,...l]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...l].join("; "))}}if(x.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&cn(t.url))){const u=s&&o&&un.read(o);u&&i.set(s,u)}return t},dn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=$e(e);let o=s.data;const i=O.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:u}=s,l,f,b,E,h;function y(){E&&E(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function R(){if(!p)return;const w=O.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),j={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:w,config:e,request:p};qe(function(N){n(N),y()},function(N){r(N),y()},j),p=null}"onloadend"in p?p.onloadend=R:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(R)},p.onabort=function(){p&&(r(new m("Request aborted",m.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const j=s.transitional||De;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),r(new m(P,j.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,p)),p=null},o===void 0&&i.setContentType(null),"setRequestHeader"in p&&a.forEach(i.toJSON(),function(P,j){p.setRequestHeader(j,P)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),u&&([b,h]=X(u,!0),p.addEventListener("progress",b)),d&&p.upload&&([f,E]=X(d),p.upload.addEventListener("progress",f),p.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(l=w=>{p&&(r(!w||w.type?new q(null,e,p):w),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const S=sn(s.url);if(S&&x.protocols.indexOf(S)===-1){r(new m("Unsupported protocol "+S+":",m.ERR_BAD_REQUEST,e));return}p.send(o||null)})},pn=(e,t)=>{let n=new AbortController,r;const s=function(d){if(!r){r=!0,i();const u=d instanceof Error?d:this.reason;n.abort(u instanceof m?u:new q(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{s(new m(`timeout ${t} of ms exceeded`,m.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(d=>{d&&(d.removeEventListener?d.removeEventListener("abort",s):d.unsubscribe(s))}),e=null)};e.forEach(d=>d&&d.addEventListener&&d.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=i,[c,()=>{o&&clearTimeout(o),o=null}]},hn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},mn=async function*(e,t,n){for await(const r of e)yield*hn(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Je=(e,t,n,r,s)=>{const o=mn(e,t,s);let i=0,c,d=u=>{c||(c=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:f}=await o.next();if(l){d(),u.close();return}let b=f.byteLength;if(n){let E=i+=b;n(E)}u.enqueue(new Uint8Array(f))}catch(l){throw d(l),l}},cancel(u){return d(u),o.return()}},{highWaterMark:2})},G=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ve=G&&typeof ReadableStream=="function",ae=G&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ve=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yn=ve&&Ve(()=>{let e=!1;const t=new Request(x.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),We=64*1024,ce=ve&&Ve(()=>a.isReadableStream(new Response("").body)),Q={stream:ce&&(e=>e.body)};G&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Q[t]&&(Q[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new m(`Response type '${t}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const wn=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await ae(e)).byteLength},bn=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??wn(t)},ue={http:Ht,xhr:dn,fetch:G&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:d,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:b}=$e(e);u=u?(u+"").toLowerCase():"text";let[E,h]=s||o||i?pn([s,o],i):[],y,p;const R=()=>{!y&&setTimeout(()=>{E&&E.unsubscribe()}),y=!0};let S;try{if(d&&yn&&n!=="get"&&n!=="head"&&(S=await bn(l,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),N;if(a.isFormData(r)&&(N=C.headers.get("content-type"))&&l.setContentType(N),C.body){const[me,Z]=Me(S,X(He(d)));r=Je(C.body,We,me,Z,ae)}}a.isString(f)||(f=f?"include":"omit"),p=new Request(t,{...b,signal:E,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:f});let w=await fetch(p);const P=ce&&(u==="stream"||u==="response");if(ce&&(c||P)){const C={};["status","statusText","headers"].forEach(et=>{C[et]=w[et]});const N=a.toFiniteNumber(w.headers.get("content-length")),[me,Z]=c&&Me(N,X(He(c),!0))||[];w=new Response(Je(w.body,We,me,()=>{Z&&Z(),P&&R()},ae),C)}u=u||"text";let j=await Q[a.findKey(Q,u)||"text"](w,e);return!P&&R(),h&&h(),await new Promise((C,N)=>{qe(C,N,{data:j,headers:O.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:p})})}catch(w){throw R(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,e,p),{cause:w.cause||w}):m.from(w,w&&w.code,e,p)}})};a.forEach(ue,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ke=e=>`- ${e}`,En=e=>a.isFunction(e)||e===null||e===!1,Xe={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!En(n)&&(r=ue[(i=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[je]=this[je]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=z(i);r[c]||(rn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(O.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(O);function ie(e,t){const n=this||I,r=t||n,s=O.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function ke(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(q,m,{__CANCEL__:!0});function qe(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function sn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function on(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const u=Date.now(),l=r[o];i||(i=u),n[s]=d,r[s]=u;let f=o,b=0;for(;f!==s;)b+=n[f++],f=f%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const E=l&&u-l;return E?Math.round(b*1e3/E):void 0}}function an(e,t){let n=0,r=1e3/t,s,o;const i=(u,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const l=Date.now(),f=l-n;f>=r?i(u,l):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-f)))},()=>s&&i(s)]}const X=(e,t,n=3)=>{let r=0;const s=on(50,250);return an(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=i-r,u=s(d),l=i<=c;r=i;const f={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:u||void 0,estimated:u&&c&&l?(c-i)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},Me=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},He=e=>(...t)=>a.asap(()=>e(...t)),cn=x.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),un=x.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ln(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ie(e,t){return e&&!ln(t)?fn(e,t):t}const ze=e=>e instanceof O?{...e}:e;function D(e,t){t=t||{};const n={};function r(u,l,f){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:f},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,f){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,f)}else return r(u,l,f)}function o(u,l){if(!a.isUndefined(l))return r(void 0,l)}function i(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function c(u,l,f){if(f in t)return r(u,l);if(f in e)return r(void 0,u)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(u,l)=>s(ze(u),ze(l),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const f=d[l]||s,b=f(e[l],t[l],l);a.isUndefined(b)&&f!==c||(n[l]=b)}),n}const $e=e=>{const t=D({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=O.from(i),t.url=_e(Ie(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(a.isFormData(n)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[u,...l]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...l].join("; "))}}if(x.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&cn(t.url))){const u=s&&o&&un.read(o);u&&i.set(s,u)}return t},dn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=$e(e);let o=s.data;const i=O.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:u}=s,l,f,b,E,h;function y(){E&&E(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function R(){if(!p)return;const w=O.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),j={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:w,config:e,request:p};qe(function(F){n(F),y()},function(F){r(F),y()},j),p=null}"onloadend"in p?p.onloadend=R:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(R)},p.onabort=function(){p&&(r(new m("Request aborted",m.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const j=s.transitional||De;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),r(new m(P,j.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,p)),p=null},o===void 0&&i.setContentType(null),"setRequestHeader"in p&&a.forEach(i.toJSON(),function(P,j){p.setRequestHeader(j,P)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),u&&([b,h]=X(u,!0),p.addEventListener("progress",b)),d&&p.upload&&([f,E]=X(d),p.upload.addEventListener("progress",f),p.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(l=w=>{p&&(r(!w||w.type?new q(null,e,p):w),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const S=sn(s.url);if(S&&x.protocols.indexOf(S)===-1){r(new m("Unsupported protocol "+S+":",m.ERR_BAD_REQUEST,e));return}p.send(o||null)})},pn=(e,t)=>{let n=new AbortController,r;const s=function(d){if(!r){r=!0,i();const u=d instanceof Error?d:this.reason;n.abort(u instanceof m?u:new q(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{s(new m(`timeout ${t} of ms exceeded`,m.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(d=>{d&&(d.removeEventListener?d.removeEventListener("abort",s):d.unsubscribe(s))}),e=null)};e.forEach(d=>d&&d.addEventListener&&d.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=i,[c,()=>{o&&clearTimeout(o),o=null}]},hn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},mn=async function*(e,t,n){for await(const r of e)yield*hn(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Je=(e,t,n,r,s)=>{const o=mn(e,t,s);let i=0,c,d=u=>{c||(c=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:f}=await o.next();if(l){d(),u.close();return}let b=f.byteLength;if(n){let E=i+=b;n(E)}u.enqueue(new Uint8Array(f))}catch(l){throw d(l),l}},cancel(u){return d(u),o.return()}},{highWaterMark:2})},G=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ve=G&&typeof ReadableStream=="function",ae=G&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ve=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yn=ve&&Ve(()=>{let e=!1;const t=new Request(x.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),We=64*1024,ce=ve&&Ve(()=>a.isReadableStream(new Response("").body)),Q={stream:ce&&(e=>e.body)};G&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Q[t]&&(Q[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new m(`Response type '${t}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const wn=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await ae(e)).byteLength},bn=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??wn(t)},ue={http:Ht,xhr:dn,fetch:G&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:d,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:b}=$e(e);u=u?(u+"").toLowerCase():"text";let[E,h]=s||o||i?pn([s,o],i):[],y,p;const R=()=>{!y&&setTimeout(()=>{E&&E.unsubscribe()}),y=!0};let S;try{if(d&&yn&&n!=="get"&&n!=="head"&&(S=await bn(l,r))!==0){let N=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(a.isFormData(r)&&(F=N.headers.get("content-type"))&&l.setContentType(F),N.body){const[me,Z]=Me(S,X(He(d)));r=Je(N.body,We,me,Z,ae)}}a.isString(f)||(f=f?"include":"omit"),p=new Request(t,{...b,signal:E,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:f});let w=await fetch(p);const P=ce&&(u==="stream"||u==="response");if(ce&&(c||P)){const N={};["status","statusText","headers"].forEach(et=>{N[et]=w[et]});const F=a.toFiniteNumber(w.headers.get("content-length")),[me,Z]=c&&Me(F,X(He(c),!0))||[];w=new Response(Je(w.body,We,me,()=>{Z&&Z(),P&&R()},ae),N)}u=u||"text";let j=await Q[a.findKey(Q,u)||"text"](w,e);return!P&&R(),h&&h(),await new Promise((N,F)=>{qe(N,F,{data:j,headers:O.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:p})})}catch(w){throw R(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,e,p),{cause:w.cause||w}):m.from(w,w&&w.code,e,p)}})};a.forEach(ue,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ke=e=>`- ${e}`,En=e=>a.isFunction(e)||e===null||e===!1,Xe={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!En(n)&&(r=ue[(i=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
4
4
|
`+o.map(Ke).join(`
|
|
5
5
|
`):" "+Ke(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ue};function le(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function Ge(e){return le(e),e.headers=O.from(e.headers),e.data=ie.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Xe.getAdapter(e.adapter||I.adapter)(e).then(function(r){return le(e),r.data=ie.call(e,e.transformResponse,r),r.headers=O.from(r.headers),r},function(r){return ke(r)||(le(e),r&&r.response&&(r.response.data=ie.call(e,e.transformResponse,r.response),r.response.headers=O.from(r.response.headers))),Promise.reject(r)})}const Qe="1.7.4",fe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fe[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ze={};fe.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Qe+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!Ze[i]&&(Ze[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function Sn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new m("option "+o+" must be "+d,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const de={assertOptions:Sn,validators:fe},_=de.validators;class B{constructor(t){this.defaults=t,this.interceptors={request:new Ue,response:new Ue}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=D(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&de.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:de.assertOptions(s,{encode:_.function,serialize:_.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=O.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(d=d&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,f=0,b;if(!d){const h=[Ge.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,u),b=h.length,l=Promise.resolve(n);f<b;)l=l.then(h[f++],h[f++]);return l}b=c.length;let E=n;for(f=0;f<b;){const h=c[f++],y=c[f++];try{E=h(E)}catch(p){y.call(this,p);break}}try{l=Ge.call(this,E)}catch(h){return Promise.reject(h)}for(f=0,b=u.length;f<b;)l=l.then(u[f++],u[f++]);return l}getUri(t){t=D(this.defaults,t);const n=Ie(t.baseURL,t.url);return _e(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){B.prototype[t]=function(n,r){return this.request(D(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(D(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}B.prototype[t]=n(),B.prototype[t+"Form"]=n(!0)});class pe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new q(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new pe(function(s){t=s}),cancel:t}}}function gn(e){return function(n){return e.apply(null,n)}}function Rn(e){return a.isObject(e)&&e.isAxiosError===!0}const he={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(he).forEach(([e,t])=>{he[t]=e});function Ye(e){const t=new B(e),n=ye(B.prototype.request,t);return a.extend(n,B.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ye(D(e,s))},n}const g=Ye(I);g.Axios=B,g.CanceledError=q,g.CancelToken=pe,g.isCancel=ke,g.VERSION=Qe,g.toFormData=W,g.AxiosError=m,g.Cancel=g.CanceledError,g.all=function(t){return Promise.all(t)},g.spread=gn,g.isAxiosError=Rn,g.mergeConfig=D,g.AxiosHeaders=O,g.formToJSON=e=>Be(a.isHTMLForm(e)?new FormData(e):e),g.getAdapter=Xe.getAdapter,g.HttpStatusCode=he,g.default=g;const On=(e,...t)=>{let n={};const r=
|
|
6
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=D(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&de.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:de.assertOptions(s,{encode:_.function,serialize:_.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=O.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(d=d&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,f=0,b;if(!d){const h=[Ge.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,u),b=h.length,l=Promise.resolve(n);f<b;)l=l.then(h[f++],h[f++]);return l}b=c.length;let E=n;for(f=0;f<b;){const h=c[f++],y=c[f++];try{E=h(E)}catch(p){y.call(this,p);break}}try{l=Ge.call(this,E)}catch(h){return Promise.reject(h)}for(f=0,b=u.length;f<b;)l=l.then(u[f++],u[f++]);return l}getUri(t){t=D(this.defaults,t);const n=Ie(t.baseURL,t.url);return _e(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){B.prototype[t]=function(n,r){return this.request(D(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(D(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}B.prototype[t]=n(),B.prototype[t+"Form"]=n(!0)});class pe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new q(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new pe(function(s){t=s}),cancel:t}}}function gn(e){return function(n){return e.apply(null,n)}}function Rn(e){return a.isObject(e)&&e.isAxiosError===!0}const he={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(he).forEach(([e,t])=>{he[t]=e});function Ye(e){const t=new B(e),n=ye(B.prototype.request,t);return a.extend(n,B.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ye(D(e,s))},n}const g=Ye(I);g.Axios=B,g.CanceledError=q,g.CancelToken=pe,g.isCancel=ke,g.VERSION=Qe,g.toFormData=W,g.AxiosError=m,g.Cancel=g.CanceledError,g.all=function(t){return Promise.all(t)},g.spread=gn,g.isAxiosError=Rn,g.mergeConfig=D,g.AxiosHeaders=O,g.formToJSON=e=>Be(a.isHTMLForm(e)?new FormData(e):e),g.getAdapter=Xe.getAdapter,g.HttpStatusCode=he,g.default=g;const On=(e,...t)=>{let n={};const r=C.ref(!1),s=C.inject("streamlineUrl"),o=C.inject("streamlineHeaders"),i=g.create({headers:{...o}}),c=C.reactive({methods:[],properties:{}}),d=async()=>{try{r.value=!0;const f=await i.post(s,{action:"onMounted",stream:e,params:t});u(f.data)}catch(f){throw console.error(`Error fetching properties for stream ${e}`,f),f}finally{r.value=!1}},u=f=>{c.methods=f.methods,c.properties=f.properties,Object.assign(c,f.properties);const b=f.methods;for(const E of b)c[E]=async(...h)=>{try{return(await i.post(s,{action:E,stream:e,...n,params:h})).data}catch(y){throw console.error(`Error calling ${E} on stream ${e}`,y),y}}},l=new Proxy(c,{get(f,b){return b in f?f[b]:(...E)=>{if(["setFormData","setData"].includes(b))return n=E[0],l;if(["getMethods","getActions","getFunctions","getServiceMethods"].includes(b))return Object.keys(l).filter(S=>{if(typeof l[S]=="function")return S});const p={action:b,stream:e,...n};if(["getUrl","getFullUrl","getActionUrl"].includes(b)){p.action=E[0];const S=E.slice(1);return S.length>0&&(p.params=S),s+"?"+new URLSearchParams(p).toString()}return p.params=E,i.post(s,p).then(S=>S.data).catch(S=>{throw console.error(`Error calling ${b} on stream ${e}`,S),S})}}});return C.onMounted(()=>{d()}),{...C.toRefs(c),service:l,loading:r}},Tn={install(e,t){e.provide("streamlineUrl",t.streamlineUrl),e.provide("streamlineHeaders",t.streamlineHeaders)}};L.streamline=Tn,L.useStreamline=On,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Axios from 'axios'
|
|
2
|
-
import { inject, reactive, ref, toRefs } from 'vue'
|
|
2
|
+
import { inject, onMounted, reactive, ref, toRefs } from 'vue'
|
|
3
3
|
|
|
4
4
|
const useStreamline = (stream, ...initialArgs) => {
|
|
5
5
|
let formData = {}
|
|
@@ -15,7 +15,10 @@ const useStreamline = (stream, ...initialArgs) => {
|
|
|
15
15
|
}
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
const service = reactive({
|
|
18
|
+
const service = reactive({
|
|
19
|
+
methods: [],
|
|
20
|
+
properties: {}
|
|
21
|
+
}) // Make the service object reactive
|
|
19
22
|
|
|
20
23
|
// Function to fetch the public properties of the service class
|
|
21
24
|
const fetchServiceProperties = async () => {
|
|
@@ -37,6 +40,8 @@ const useStreamline = (stream, ...initialArgs) => {
|
|
|
37
40
|
|
|
38
41
|
// Function to assign properties and methods to the service object
|
|
39
42
|
const assignPropertiesAndMethods = (data) => {
|
|
43
|
+
service.methods = data.methods
|
|
44
|
+
service.properties = data.properties
|
|
40
45
|
Object.assign(service, data.properties) // Assign the properties to the reactive service object
|
|
41
46
|
const methods = data.methods
|
|
42
47
|
for (const method of methods) {
|
|
@@ -104,7 +109,9 @@ const useStreamline = (stream, ...initialArgs) => {
|
|
|
104
109
|
})
|
|
105
110
|
|
|
106
111
|
// Fetch and set the properties on initialization
|
|
107
|
-
|
|
112
|
+
onMounted(() => {
|
|
113
|
+
fetchServiceProperties()
|
|
114
|
+
})
|
|
108
115
|
|
|
109
116
|
return {
|
|
110
117
|
...toRefs(service), // Spread the reactive service properties and return as refs for reactivity
|