@flyfish-group/file-viewer3 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/ImageViewer.js +795 -743
- package/dist/components/MarkdownViewer.js +990 -1099
- package/dist/components/PdfView.js +20049 -19079
- package/dist/components/PptxRender.js +7101 -6518
- package/dist/components/XlsxTable.js +48841 -64918
- package/dist/components/_commonjsHelpers.js +15 -21
- package/dist/components/docx-preview.js +5622 -0
- package/dist/components/index.js +819 -702
- package/dist/components/utils.d.ts +3 -0
- package/dist/index.umd.js +193 -382
- package/dist/main.d.ts +0 -0
- package/dist/package/components/FileViewer/FileViewer.vue.d.ts +18 -0
- package/dist/package/vendors/image/ImageViewer.vue.d.ts +15 -0
- package/dist/package/vendors/md/MarkdownViewer.vue.d.ts +15 -0
- package/dist/package/vendors/pdf/PdfView.vue.d.ts +15 -0
- package/dist/package/vendors/pptx/PptxRender.vue.d.ts +87 -0
- package/dist/{src/package → package}/vendors/pptx/index.d.ts +1 -1
- package/dist/{src/package → package}/vendors/renders.d.ts +1 -1
- package/dist/package/vendors/text/CodeViewer.vue.d.ts +15 -0
- package/dist/package/vendors/xlsx/XlsxTable.vue.d.ts +17 -0
- package/dist/package/vendors/xlsx/worker/xls/sheet.worker.d.ts +1 -0
- package/dist/package/vendors/xlsx/worker/xlsx/xlsx.worker.d.ts +2 -0
- package/dist/style.css +23 -23
- package/dist/worker/pdf.worker.js +37 -45
- package/dist/worker/pptx.worker.js +7 -7
- package/dist/worker/sheet.worker.js +24 -24
- package/dist/worker/xlsx.worker.js +43 -46
- package/package.json +21 -20
- package/dist/components/docx-preview.min.js +0 -5287
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -25
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -13
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -13
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -13
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -81
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -13
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -21
- /package/dist/{src/package → package}/common/type.d.ts +0 -0
- /package/dist/{src/package → package}/common/util.d.ts +0 -0
- /package/dist/{src/package → package}/common/worker-ref.d.ts +0 -0
- /package/dist/{src/package → package}/components/FileViewer/index.d.ts +0 -0
- /package/dist/{src/package → package}/components/FileViewer/util.d.ts +0 -0
- /package/dist/{src/package → package}/index.d.ts +0 -0
- /package/dist/{src/package → package}/use/index.d.ts +0 -0
- /package/dist/{src/package → package}/use/worker.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/docx/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/image/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/md/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/mp4/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/pdf/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/pdf/worker/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/pptx/options.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/pptx/support/chart.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/pptx/worker/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/text/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/render.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/util.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/xls/SheetJsModel.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/xls/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/xlsx/ExcelJsModel.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/xlsx/color.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/xlsx/context.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/xlsx/index.d.ts +0 -0
- /package/dist/{src/package → package}/vendors/xlsx/worker/xlsx/util.d.ts +0 -0
package/dist/components/index.js
CHANGED
|
@@ -1,235 +1,307 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var it = Object.defineProperty;
|
|
2
|
+
var ye = Object.getOwnPropertySymbols;
|
|
3
|
+
var at = Object.prototype.hasOwnProperty, ct = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var Z = (e, t, n) => t in e ? it(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Y = (e, t) => {
|
|
5
|
+
for (var n in t || (t = {}))
|
|
6
|
+
at.call(t, n) && Z(e, n, t[n]);
|
|
7
|
+
if (ye)
|
|
8
|
+
for (var n of ye(t))
|
|
9
|
+
ct.call(t, n) && Z(e, n, t[n]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
var we = (e, t, n) => (Z(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
13
|
+
var w = (e, t, n) => new Promise((r, s) => {
|
|
14
|
+
var o = (u) => {
|
|
15
|
+
try {
|
|
16
|
+
l(n.next(u));
|
|
17
|
+
} catch (p) {
|
|
18
|
+
s(p);
|
|
19
|
+
}
|
|
20
|
+
}, i = (u) => {
|
|
21
|
+
try {
|
|
22
|
+
l(n.throw(u));
|
|
23
|
+
} catch (p) {
|
|
24
|
+
s(p);
|
|
25
|
+
}
|
|
26
|
+
}, l = (u) => u.done ? r(u.value) : Promise.resolve(u.value).then(o, i);
|
|
27
|
+
l((n = n.apply(e, t)).next());
|
|
28
|
+
});
|
|
29
|
+
import { defineAsyncComponent as k, createApp as N, createVNode as F, defineComponent as Ue, openBlock as H, createElementBlock as M, toDisplayString as q, ref as B, onMounted as lt, watch as Ee, createElementVNode as ee, Fragment as ut, withDirectives as be, vShow as Re } from "vue";
|
|
30
|
+
const ft = (() => {
|
|
6
31
|
const e = {
|
|
7
32
|
module: null,
|
|
8
|
-
|
|
9
|
-
return this
|
|
33
|
+
load() {
|
|
34
|
+
return w(this, null, function* () {
|
|
35
|
+
return this.module || (this.module = import("./docx-preview.js")), this.module;
|
|
36
|
+
});
|
|
10
37
|
}
|
|
11
38
|
};
|
|
12
|
-
return
|
|
39
|
+
return () => w(void 0, null, function* () {
|
|
40
|
+
return yield e.load();
|
|
41
|
+
});
|
|
13
42
|
})();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
43
|
+
function dt(e, t) {
|
|
44
|
+
return w(this, null, function* () {
|
|
45
|
+
const { defaultOptions: n, renderAsync: r } = yield ft(), s = Object.assign(n, {
|
|
46
|
+
debug: !0,
|
|
47
|
+
experimental: !0
|
|
48
|
+
});
|
|
49
|
+
yield r(e, t, void 0, s);
|
|
18
50
|
});
|
|
19
|
-
await r(e, t, void 0, s);
|
|
20
51
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
52
|
+
const pt = k(() => import("./PptxRender.js"));
|
|
53
|
+
function ht(e, t) {
|
|
54
|
+
return w(this, null, function* () {
|
|
55
|
+
return N({
|
|
56
|
+
render: () => F(pt, {
|
|
57
|
+
data: e
|
|
58
|
+
}, null)
|
|
59
|
+
}).mount(t);
|
|
60
|
+
});
|
|
28
61
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
62
|
+
const mt = k(() => import("./XlsxTable.js"));
|
|
63
|
+
function Se(e, t, n) {
|
|
64
|
+
return w(this, null, function* () {
|
|
65
|
+
const r = N({
|
|
66
|
+
render: () => F(mt, {
|
|
67
|
+
data: e,
|
|
68
|
+
type: n
|
|
69
|
+
}, null)
|
|
70
|
+
});
|
|
71
|
+
return r.mount(t), r;
|
|
36
72
|
});
|
|
37
|
-
return r.mount(t), r;
|
|
38
73
|
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
74
|
+
const yt = k(() => import("./PdfView.js"));
|
|
75
|
+
function wt(e, t) {
|
|
76
|
+
return w(this, null, function* () {
|
|
77
|
+
const n = N({
|
|
78
|
+
render: () => F(yt, {
|
|
79
|
+
data: e
|
|
80
|
+
}, null)
|
|
81
|
+
});
|
|
82
|
+
return n.mount(t), n;
|
|
45
83
|
});
|
|
46
|
-
return n.mount(t), n;
|
|
47
84
|
}
|
|
48
|
-
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
85
|
+
function Et(e) {
|
|
86
|
+
return w(this, null, function* () {
|
|
87
|
+
return new Promise((t, n) => {
|
|
88
|
+
const r = new FileReader();
|
|
89
|
+
r.onload = (s) => {
|
|
90
|
+
var o;
|
|
91
|
+
return t((o = s.target) == null ? void 0 : o.result);
|
|
92
|
+
}, r.onerror = (s) => n(s), r.readAsArrayBuffer(e);
|
|
93
|
+
});
|
|
55
94
|
});
|
|
56
95
|
}
|
|
57
|
-
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
96
|
+
function bt(e) {
|
|
97
|
+
return w(this, null, function* () {
|
|
98
|
+
return new Promise((t, n) => {
|
|
99
|
+
const r = new FileReader();
|
|
100
|
+
r.onload = (s) => {
|
|
101
|
+
var i;
|
|
102
|
+
const o = (i = s.target) == null ? void 0 : i.result;
|
|
103
|
+
typeof o == "string" && t(o);
|
|
104
|
+
}, r.onerror = (s) => n(s), r.readAsDataURL(new Blob([e]));
|
|
105
|
+
});
|
|
65
106
|
});
|
|
66
107
|
}
|
|
67
|
-
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
108
|
+
function De(e) {
|
|
109
|
+
return w(this, null, function* () {
|
|
110
|
+
return new Promise((t, n) => {
|
|
111
|
+
const r = new FileReader();
|
|
112
|
+
r.onload = (s) => {
|
|
113
|
+
var i;
|
|
114
|
+
const o = (i = s.target) == null ? void 0 : i.result;
|
|
115
|
+
typeof o == "string" && t(o);
|
|
116
|
+
}, r.onerror = (s) => n(s), r.readAsText(new Blob([e]), "utf-8");
|
|
117
|
+
});
|
|
75
118
|
});
|
|
76
119
|
}
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
120
|
+
const Rt = k(() => import("./ImageViewer.js"));
|
|
121
|
+
function St(e, t) {
|
|
122
|
+
return w(this, null, function* () {
|
|
123
|
+
const n = yield bt(e), r = N({
|
|
124
|
+
render: () => F(Rt, {
|
|
125
|
+
image: n
|
|
126
|
+
}, null)
|
|
127
|
+
});
|
|
128
|
+
return r.mount(t), r;
|
|
83
129
|
});
|
|
84
|
-
return r.mount(t), r;
|
|
85
130
|
}
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
131
|
+
const gt = k(() => import("./MarkdownViewer.js"));
|
|
132
|
+
function Ot(e, t) {
|
|
133
|
+
return w(this, null, function* () {
|
|
134
|
+
const n = yield De(e), r = N({
|
|
135
|
+
render: () => F(gt, {
|
|
136
|
+
data: n
|
|
137
|
+
}, null)
|
|
138
|
+
});
|
|
139
|
+
return r.mount(t), r;
|
|
92
140
|
});
|
|
93
|
-
return r.mount(t), r;
|
|
94
141
|
}
|
|
95
|
-
const
|
|
142
|
+
const xt = { class: "code-area" }, At = /* @__PURE__ */ Ue({
|
|
96
143
|
__name: "CodeViewer",
|
|
97
144
|
props: {
|
|
98
|
-
value:
|
|
145
|
+
value: {}
|
|
99
146
|
},
|
|
100
147
|
setup(e) {
|
|
101
|
-
return (t, n) => (
|
|
148
|
+
return (t, n) => (H(), M("pre", xt, " " + q(t.value) + `
|
|
102
149
|
`, 1));
|
|
103
150
|
}
|
|
104
151
|
});
|
|
105
|
-
const
|
|
152
|
+
const ke = (e, t) => {
|
|
106
153
|
const n = e.__vccOpts || e;
|
|
107
154
|
for (const [r, s] of t)
|
|
108
155
|
n[r] = s;
|
|
109
156
|
return n;
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
157
|
+
}, _t = /* @__PURE__ */ ke(At, [["__scopeId", "data-v-3be501eb"]]);
|
|
158
|
+
function Tt(e, t) {
|
|
159
|
+
return w(this, null, function* () {
|
|
160
|
+
const n = yield De(e), r = N({
|
|
161
|
+
render: () => F(_t, {
|
|
162
|
+
value: n
|
|
163
|
+
}, null)
|
|
164
|
+
});
|
|
165
|
+
return r.mount(t), r;
|
|
116
166
|
});
|
|
117
|
-
return r.mount(t), r;
|
|
118
167
|
}
|
|
119
|
-
function
|
|
168
|
+
function Pt(e, t) {
|
|
120
169
|
const n = document.createElement("video");
|
|
121
170
|
n.width = 840, n.height = 480, n.controls = !0;
|
|
122
171
|
const r = document.createElement("source");
|
|
123
172
|
r.src = URL.createObjectURL(new Blob([e])), n.appendChild(r), t.appendChild(n);
|
|
124
173
|
}
|
|
125
|
-
const
|
|
174
|
+
const I = (e) => ({
|
|
126
175
|
$el: e,
|
|
127
176
|
unmount() {
|
|
128
177
|
}
|
|
129
|
-
}),
|
|
178
|
+
}), Ct = [
|
|
130
179
|
// 使用docxjs支持,目前效果最好的渲染器
|
|
131
180
|
{
|
|
132
181
|
accepts: ["docx"],
|
|
133
|
-
handler:
|
|
182
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
183
|
+
return yield dt(e, t), window.dispatchEvent(new Event("resize")), I(t);
|
|
184
|
+
})
|
|
134
185
|
},
|
|
135
186
|
// 使用pptx2html,已通过默认值更替
|
|
136
187
|
{
|
|
137
188
|
accepts: ["pptx"],
|
|
138
|
-
handler:
|
|
189
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
190
|
+
return yield ht(e, t), window.dispatchEvent(new Event("resize")), I(t);
|
|
191
|
+
})
|
|
139
192
|
},
|
|
140
193
|
// 使用exceljs + handsontable,全部样式
|
|
141
194
|
{
|
|
142
195
|
accepts: ["xlsx"],
|
|
143
|
-
handler:
|
|
196
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
197
|
+
return Se(e, t, "xml");
|
|
198
|
+
})
|
|
144
199
|
},
|
|
145
200
|
// 使用js-xlsx + handsontable,无样式
|
|
146
201
|
{
|
|
147
202
|
accepts: ["xlsm", "xlsb", "xls", "csv", "ods", "fods", "numbers"],
|
|
148
|
-
handler:
|
|
203
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
204
|
+
return Se(e, t, "binary");
|
|
205
|
+
})
|
|
149
206
|
},
|
|
150
207
|
// 使用pdfjs,渲染pdf,效果最好
|
|
151
208
|
{
|
|
152
209
|
accepts: ["pdf"],
|
|
153
|
-
handler:
|
|
210
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
211
|
+
return wt(e, t);
|
|
212
|
+
})
|
|
154
213
|
},
|
|
155
214
|
// 图片过滤器
|
|
156
215
|
{
|
|
157
216
|
accepts: ["gif", "jpg", "jpeg", "bmp", "tiff", "tif", "png", "svg"],
|
|
158
|
-
handler:
|
|
217
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
218
|
+
return St(e, t);
|
|
219
|
+
})
|
|
159
220
|
},
|
|
160
221
|
{
|
|
161
222
|
accepts: ["md", "markdown"],
|
|
162
|
-
handler:
|
|
223
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
224
|
+
return Ot(e, t);
|
|
225
|
+
})
|
|
163
226
|
},
|
|
164
227
|
// 纯文本预览
|
|
165
228
|
{
|
|
166
229
|
accepts: ["txt", "json", "js", "css", "java", "py", "html", "jsx", "ts", "tsx", "xml", "log"],
|
|
167
|
-
handler:
|
|
230
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
231
|
+
return Tt(e, t);
|
|
232
|
+
})
|
|
168
233
|
},
|
|
169
234
|
// 视频预览,仅支持MP4
|
|
170
235
|
{
|
|
171
236
|
accepts: ["mp4"],
|
|
172
|
-
handler:
|
|
237
|
+
handler: (e, t) => w(void 0, null, function* () {
|
|
238
|
+
return Pt(e, t), I(t);
|
|
239
|
+
})
|
|
173
240
|
},
|
|
174
241
|
// 错误处理
|
|
175
242
|
{
|
|
176
243
|
accepts: ["error"],
|
|
177
|
-
handler:
|
|
178
|
-
|
|
244
|
+
handler: (e, t, n) => w(void 0, null, function* () {
|
|
245
|
+
return t.innerHTML = `<div style='text-align: center; margin-top: 80px'>不支持.${n}格式的在线预览,请下载后预览或转换为支持的格式</div>
|
|
246
|
+
<div style='text-align: center'>支持docx, xlsx, pptx, pdf, 以及纯文本格式和各种图片格式的在线预览</div>`, I(t);
|
|
247
|
+
})
|
|
179
248
|
}
|
|
180
|
-
],
|
|
181
|
-
function
|
|
249
|
+
], je = Ct.reduce((e, { accepts: t, handler: n }) => (t.forEach((r) => e.set(r, n)), e), /* @__PURE__ */ new Map()), ge = je.get("error");
|
|
250
|
+
function Nt(e) {
|
|
182
251
|
const t = e.lastIndexOf(".");
|
|
183
252
|
return e.substring(t + 1);
|
|
184
253
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
254
|
+
function Ft(e, t, n) {
|
|
255
|
+
return w(this, null, function* () {
|
|
256
|
+
const r = je.get(t.toLowerCase());
|
|
257
|
+
if (r)
|
|
258
|
+
return r(e, n);
|
|
259
|
+
if (ge)
|
|
260
|
+
return ge(e, n, t);
|
|
261
|
+
});
|
|
191
262
|
}
|
|
192
|
-
function
|
|
263
|
+
function ve(e, t) {
|
|
193
264
|
return function() {
|
|
194
265
|
return e.apply(t, arguments);
|
|
195
266
|
};
|
|
196
267
|
}
|
|
197
|
-
const { toString:
|
|
198
|
-
const n =
|
|
268
|
+
const { toString: Lt } = Object.prototype, { getPrototypeOf: ue } = Object, W = ((e) => (t) => {
|
|
269
|
+
const n = Lt.call(t);
|
|
199
270
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
200
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
201
|
-
function
|
|
202
|
-
return e !== null && !
|
|
271
|
+
})(/* @__PURE__ */ Object.create(null)), _ = (e) => (e = e.toLowerCase(), (t) => W(t) === e), K = (e) => (t) => typeof t === e, { isArray: L } = Array, D = K("undefined");
|
|
272
|
+
function Bt(e) {
|
|
273
|
+
return e !== null && !D(e) && e.constructor !== null && !D(e.constructor) && g(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
203
274
|
}
|
|
204
|
-
const
|
|
205
|
-
function
|
|
275
|
+
const Ie = _("ArrayBuffer");
|
|
276
|
+
function Ut(e) {
|
|
206
277
|
let t;
|
|
207
|
-
return typeof ArrayBuffer
|
|
278
|
+
return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ie(e.buffer), t;
|
|
208
279
|
}
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
280
|
+
const Dt = K("string"), g = K("function"), He = K("number"), X = (e) => e !== null && typeof e == "object", kt = (e) => e === !0 || e === !1, z = (e) => {
|
|
281
|
+
if (W(e) !== "object")
|
|
211
282
|
return !1;
|
|
212
|
-
const t =
|
|
283
|
+
const t = ue(e);
|
|
213
284
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
285
|
+
}, jt = _("Date"), vt = _("File"), It = _("Blob"), Ht = _("FileList"), Mt = (e) => X(e) && g(e.pipe), qt = (e) => {
|
|
286
|
+
let t;
|
|
287
|
+
return e && (typeof FormData == "function" && e instanceof FormData || g(e.append) && ((t = W(e)) === "formdata" || // detect form-data instance
|
|
288
|
+
t === "object" && g(e.toString) && e.toString() === "[object FormData]"));
|
|
289
|
+
}, zt = _("URLSearchParams"), Vt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
290
|
+
function j(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
291
|
+
if (e === null || typeof e == "undefined")
|
|
220
292
|
return;
|
|
221
293
|
let r, s;
|
|
222
|
-
if (typeof e != "object" && (e = [e]),
|
|
294
|
+
if (typeof e != "object" && (e = [e]), L(e))
|
|
223
295
|
for (r = 0, s = e.length; r < s; r++)
|
|
224
296
|
t.call(null, e[r], r, e);
|
|
225
297
|
else {
|
|
226
298
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
227
|
-
let
|
|
299
|
+
let l;
|
|
228
300
|
for (r = 0; r < i; r++)
|
|
229
|
-
|
|
301
|
+
l = o[r], t.call(null, e[l], l, e);
|
|
230
302
|
}
|
|
231
303
|
}
|
|
232
|
-
function
|
|
304
|
+
function Me(e, t) {
|
|
233
305
|
t = t.toLowerCase();
|
|
234
306
|
const n = Object.keys(e);
|
|
235
307
|
let r = n.length, s;
|
|
@@ -238,78 +310,79 @@ function ke(e, t) {
|
|
|
238
310
|
return s;
|
|
239
311
|
return null;
|
|
240
312
|
}
|
|
241
|
-
const
|
|
242
|
-
function
|
|
243
|
-
const { caseless: e } =
|
|
244
|
-
const o = e &&
|
|
245
|
-
|
|
313
|
+
const qe = (() => typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global)(), ze = (e) => !D(e) && e !== qe;
|
|
314
|
+
function oe() {
|
|
315
|
+
const { caseless: e } = ze(this) && this || {}, t = {}, n = (r, s) => {
|
|
316
|
+
const o = e && Me(t, s) || s;
|
|
317
|
+
z(t[o]) && z(r) ? t[o] = oe(t[o], r) : z(r) ? t[o] = oe({}, r) : L(r) ? t[o] = r.slice() : t[o] = r;
|
|
246
318
|
};
|
|
247
319
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
248
|
-
arguments[r] &&
|
|
320
|
+
arguments[r] && j(arguments[r], n);
|
|
249
321
|
return t;
|
|
250
322
|
}
|
|
251
|
-
const
|
|
252
|
-
n &&
|
|
253
|
-
}, { allOwnKeys: r }), e),
|
|
323
|
+
const $t = (e, t, n, { allOwnKeys: r } = {}) => (j(t, (s, o) => {
|
|
324
|
+
n && g(s) ? e[o] = ve(s, n) : e[o] = s;
|
|
325
|
+
}, { allOwnKeys: r }), e), Jt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Wt = (e, t, n, r) => {
|
|
254
326
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
255
327
|
value: t.prototype
|
|
256
328
|
}), n && Object.assign(e.prototype, n);
|
|
257
|
-
},
|
|
329
|
+
}, Kt = (e, t, n, r) => {
|
|
258
330
|
let s, o, i;
|
|
259
|
-
const
|
|
331
|
+
const l = {};
|
|
260
332
|
if (t = t || {}, e == null)
|
|
261
333
|
return t;
|
|
262
334
|
do {
|
|
263
335
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
264
|
-
i = s[o], (!r || r(i, e, t)) && !
|
|
265
|
-
e = n !== !1 &&
|
|
336
|
+
i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
|
|
337
|
+
e = n !== !1 && ue(e);
|
|
266
338
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
267
339
|
return t;
|
|
268
|
-
},
|
|
340
|
+
}, Xt = (e, t, n) => {
|
|
269
341
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
270
342
|
const r = e.indexOf(t, n);
|
|
271
343
|
return r !== -1 && r === n;
|
|
272
|
-
},
|
|
344
|
+
}, Gt = (e) => {
|
|
273
345
|
if (!e)
|
|
274
346
|
return null;
|
|
275
|
-
if (
|
|
347
|
+
if (L(e))
|
|
276
348
|
return e;
|
|
277
349
|
let t = e.length;
|
|
278
|
-
if (!
|
|
350
|
+
if (!He(t))
|
|
279
351
|
return null;
|
|
280
352
|
const n = new Array(t);
|
|
281
353
|
for (; t-- > 0; )
|
|
282
354
|
n[t] = e[t];
|
|
283
355
|
return n;
|
|
284
|
-
},
|
|
356
|
+
}, Qt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array != "undefined" && ue(Uint8Array)), Zt = (e, t) => {
|
|
285
357
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
286
358
|
let s;
|
|
287
359
|
for (; (s = r.next()) && !s.done; ) {
|
|
288
360
|
const o = s.value;
|
|
289
361
|
t.call(e, o[0], o[1]);
|
|
290
362
|
}
|
|
291
|
-
},
|
|
363
|
+
}, Yt = (e, t) => {
|
|
292
364
|
let n;
|
|
293
365
|
const r = [];
|
|
294
366
|
for (; (n = e.exec(t)) !== null; )
|
|
295
367
|
r.push(n);
|
|
296
368
|
return r;
|
|
297
|
-
},
|
|
369
|
+
}, en = _("HTMLFormElement"), tn = (e) => e.toLowerCase().replace(
|
|
298
370
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
299
371
|
function(n, r, s) {
|
|
300
372
|
return r.toUpperCase() + s;
|
|
301
373
|
}
|
|
302
|
-
),
|
|
374
|
+
), Oe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), nn = _("RegExp"), Ve = (e, t) => {
|
|
303
375
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
304
|
-
|
|
305
|
-
|
|
376
|
+
j(n, (s, o) => {
|
|
377
|
+
let i;
|
|
378
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
306
379
|
}), Object.defineProperties(e, r);
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
if (
|
|
380
|
+
}, rn = (e) => {
|
|
381
|
+
Ve(e, (t, n) => {
|
|
382
|
+
if (g(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
310
383
|
return !1;
|
|
311
384
|
const r = e[n];
|
|
312
|
-
if (
|
|
385
|
+
if (g(r)) {
|
|
313
386
|
if (t.enumerable = !1, "writable" in t) {
|
|
314
387
|
t.writable = !1;
|
|
315
388
|
return;
|
|
@@ -319,96 +392,98 @@ const kt = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
|
|
|
319
392
|
});
|
|
320
393
|
}
|
|
321
394
|
});
|
|
322
|
-
},
|
|
395
|
+
}, sn = (e, t) => {
|
|
323
396
|
const n = {}, r = (s) => {
|
|
324
397
|
s.forEach((o) => {
|
|
325
398
|
n[o] = !0;
|
|
326
399
|
});
|
|
327
400
|
};
|
|
328
|
-
return
|
|
329
|
-
},
|
|
330
|
-
},
|
|
331
|
-
DIGIT:
|
|
332
|
-
ALPHA:
|
|
333
|
-
ALPHA_DIGIT:
|
|
334
|
-
},
|
|
401
|
+
return L(e) ? r(e) : r(String(e).split(t)), n;
|
|
402
|
+
}, on = () => {
|
|
403
|
+
}, an = (e, t) => (e = +e, Number.isFinite(e) ? e : t), te = "abcdefghijklmnopqrstuvwxyz", xe = "0123456789", $e = {
|
|
404
|
+
DIGIT: xe,
|
|
405
|
+
ALPHA: te,
|
|
406
|
+
ALPHA_DIGIT: te + te.toUpperCase() + xe
|
|
407
|
+
}, cn = (e = 16, t = $e.ALPHA_DIGIT) => {
|
|
335
408
|
let n = "";
|
|
336
409
|
const { length: r } = t;
|
|
337
410
|
for (; e--; )
|
|
338
411
|
n += t[Math.random() * r | 0];
|
|
339
412
|
return n;
|
|
340
413
|
};
|
|
341
|
-
function
|
|
342
|
-
return !!(e &&
|
|
414
|
+
function ln(e) {
|
|
415
|
+
return !!(e && g(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
343
416
|
}
|
|
344
|
-
const
|
|
417
|
+
const un = (e) => {
|
|
345
418
|
const t = new Array(10), n = (r, s) => {
|
|
346
|
-
if (
|
|
419
|
+
if (X(r)) {
|
|
347
420
|
if (t.indexOf(r) >= 0)
|
|
348
421
|
return;
|
|
349
422
|
if (!("toJSON" in r)) {
|
|
350
423
|
t[s] = r;
|
|
351
|
-
const o =
|
|
352
|
-
return
|
|
353
|
-
const
|
|
354
|
-
!
|
|
424
|
+
const o = L(r) ? [] : {};
|
|
425
|
+
return j(r, (i, l) => {
|
|
426
|
+
const u = n(i, s + 1);
|
|
427
|
+
!D(u) && (o[l] = u);
|
|
355
428
|
}), t[s] = void 0, o;
|
|
356
429
|
}
|
|
357
430
|
}
|
|
358
431
|
return r;
|
|
359
432
|
};
|
|
360
433
|
return n(e, 0);
|
|
361
|
-
}, a = {
|
|
362
|
-
isArray:
|
|
363
|
-
isArrayBuffer:
|
|
364
|
-
isBuffer:
|
|
365
|
-
isFormData:
|
|
366
|
-
isArrayBufferView:
|
|
367
|
-
isString:
|
|
368
|
-
isNumber:
|
|
369
|
-
isBoolean:
|
|
370
|
-
isObject:
|
|
371
|
-
isPlainObject:
|
|
372
|
-
isUndefined:
|
|
373
|
-
isDate:
|
|
374
|
-
isFile:
|
|
375
|
-
isBlob:
|
|
376
|
-
isRegExp:
|
|
377
|
-
isFunction:
|
|
378
|
-
isStream:
|
|
379
|
-
isURLSearchParams:
|
|
380
|
-
isTypedArray:
|
|
381
|
-
isFileList:
|
|
382
|
-
forEach:
|
|
383
|
-
merge:
|
|
384
|
-
extend:
|
|
385
|
-
trim:
|
|
386
|
-
stripBOM:
|
|
387
|
-
inherits:
|
|
388
|
-
toFlatObject:
|
|
389
|
-
kindOf:
|
|
390
|
-
kindOfTest:
|
|
391
|
-
endsWith:
|
|
392
|
-
toArray:
|
|
393
|
-
forEachEntry:
|
|
394
|
-
matchAll:
|
|
395
|
-
isHTMLForm:
|
|
396
|
-
hasOwnProperty:
|
|
397
|
-
hasOwnProp:
|
|
434
|
+
}, fn = _("AsyncFunction"), dn = (e) => e && (X(e) || g(e)) && g(e.then) && g(e.catch), a = {
|
|
435
|
+
isArray: L,
|
|
436
|
+
isArrayBuffer: Ie,
|
|
437
|
+
isBuffer: Bt,
|
|
438
|
+
isFormData: qt,
|
|
439
|
+
isArrayBufferView: Ut,
|
|
440
|
+
isString: Dt,
|
|
441
|
+
isNumber: He,
|
|
442
|
+
isBoolean: kt,
|
|
443
|
+
isObject: X,
|
|
444
|
+
isPlainObject: z,
|
|
445
|
+
isUndefined: D,
|
|
446
|
+
isDate: jt,
|
|
447
|
+
isFile: vt,
|
|
448
|
+
isBlob: It,
|
|
449
|
+
isRegExp: nn,
|
|
450
|
+
isFunction: g,
|
|
451
|
+
isStream: Mt,
|
|
452
|
+
isURLSearchParams: zt,
|
|
453
|
+
isTypedArray: Qt,
|
|
454
|
+
isFileList: Ht,
|
|
455
|
+
forEach: j,
|
|
456
|
+
merge: oe,
|
|
457
|
+
extend: $t,
|
|
458
|
+
trim: Vt,
|
|
459
|
+
stripBOM: Jt,
|
|
460
|
+
inherits: Wt,
|
|
461
|
+
toFlatObject: Kt,
|
|
462
|
+
kindOf: W,
|
|
463
|
+
kindOfTest: _,
|
|
464
|
+
endsWith: Xt,
|
|
465
|
+
toArray: Gt,
|
|
466
|
+
forEachEntry: Zt,
|
|
467
|
+
matchAll: Yt,
|
|
468
|
+
isHTMLForm: en,
|
|
469
|
+
hasOwnProperty: Oe,
|
|
470
|
+
hasOwnProp: Oe,
|
|
398
471
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
399
|
-
reduceDescriptors:
|
|
400
|
-
freezeMethods:
|
|
401
|
-
toObjectSet:
|
|
402
|
-
toCamelCase:
|
|
403
|
-
noop:
|
|
404
|
-
toFiniteNumber:
|
|
405
|
-
findKey:
|
|
406
|
-
global:
|
|
407
|
-
isContextDefined:
|
|
408
|
-
ALPHABET:
|
|
409
|
-
generateString:
|
|
410
|
-
isSpecCompliantForm:
|
|
411
|
-
toJSONObject:
|
|
472
|
+
reduceDescriptors: Ve,
|
|
473
|
+
freezeMethods: rn,
|
|
474
|
+
toObjectSet: sn,
|
|
475
|
+
toCamelCase: tn,
|
|
476
|
+
noop: on,
|
|
477
|
+
toFiniteNumber: an,
|
|
478
|
+
findKey: Me,
|
|
479
|
+
global: qe,
|
|
480
|
+
isContextDefined: ze,
|
|
481
|
+
ALPHABET: $e,
|
|
482
|
+
generateString: cn,
|
|
483
|
+
isSpecCompliantForm: ln,
|
|
484
|
+
toJSONObject: un,
|
|
485
|
+
isAsyncFn: fn,
|
|
486
|
+
isThenable: dn
|
|
412
487
|
};
|
|
413
488
|
function m(e, t, n, r, s) {
|
|
414
489
|
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);
|
|
@@ -434,7 +509,7 @@ a.inherits(m, Error, {
|
|
|
434
509
|
};
|
|
435
510
|
}
|
|
436
511
|
});
|
|
437
|
-
const
|
|
512
|
+
const Je = m.prototype, We = {};
|
|
438
513
|
[
|
|
439
514
|
"ERR_BAD_OPTION_VALUE",
|
|
440
515
|
"ERR_BAD_OPTION",
|
|
@@ -450,97 +525,97 @@ const qe = m.prototype, Ve = {};
|
|
|
450
525
|
"ERR_INVALID_URL"
|
|
451
526
|
// eslint-disable-next-line func-names
|
|
452
527
|
].forEach((e) => {
|
|
453
|
-
|
|
528
|
+
We[e] = { value: e };
|
|
454
529
|
});
|
|
455
|
-
Object.defineProperties(m,
|
|
456
|
-
Object.defineProperty(
|
|
530
|
+
Object.defineProperties(m, We);
|
|
531
|
+
Object.defineProperty(Je, "isAxiosError", { value: !0 });
|
|
457
532
|
m.from = (e, t, n, r, s, o) => {
|
|
458
|
-
const i = Object.create(
|
|
459
|
-
return a.toFlatObject(e, i, function(
|
|
460
|
-
return
|
|
461
|
-
}, (
|
|
533
|
+
const i = Object.create(Je);
|
|
534
|
+
return a.toFlatObject(e, i, function(u) {
|
|
535
|
+
return u !== Error.prototype;
|
|
536
|
+
}, (l) => l !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
462
537
|
};
|
|
463
|
-
const
|
|
464
|
-
function
|
|
538
|
+
const pn = null;
|
|
539
|
+
function ie(e) {
|
|
465
540
|
return a.isPlainObject(e) || a.isArray(e);
|
|
466
541
|
}
|
|
467
|
-
function
|
|
542
|
+
function Ke(e) {
|
|
468
543
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
469
544
|
}
|
|
470
|
-
function
|
|
545
|
+
function Ae(e, t, n) {
|
|
471
546
|
return e ? e.concat(t).map(function(s, o) {
|
|
472
|
-
return s =
|
|
547
|
+
return s = Ke(s), !n && o ? "[" + s + "]" : s;
|
|
473
548
|
}).join(n ? "." : "") : t;
|
|
474
549
|
}
|
|
475
|
-
function
|
|
476
|
-
return a.isArray(e) && !e.some(
|
|
550
|
+
function hn(e) {
|
|
551
|
+
return a.isArray(e) && !e.some(ie);
|
|
477
552
|
}
|
|
478
|
-
const
|
|
553
|
+
const mn = a.toFlatObject(a, {}, null, function(t) {
|
|
479
554
|
return /^is[A-Z]/.test(t);
|
|
480
555
|
});
|
|
481
|
-
function
|
|
556
|
+
function G(e, t, n) {
|
|
482
557
|
if (!a.isObject(e))
|
|
483
558
|
throw new TypeError("target must be an object");
|
|
484
559
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
485
560
|
metaTokens: !0,
|
|
486
561
|
dots: !1,
|
|
487
562
|
indexes: !1
|
|
488
|
-
}, !1, function(
|
|
489
|
-
return !a.isUndefined(
|
|
563
|
+
}, !1, function(d, b) {
|
|
564
|
+
return !a.isUndefined(b[d]);
|
|
490
565
|
});
|
|
491
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
566
|
+
const r = n.metaTokens, s = n.visitor || f, o = n.dots, i = n.indexes, u = (n.Blob || typeof Blob != "undefined" && Blob) && a.isSpecCompliantForm(t);
|
|
492
567
|
if (!a.isFunction(s))
|
|
493
568
|
throw new TypeError("visitor must be a function");
|
|
494
|
-
function
|
|
495
|
-
if (
|
|
569
|
+
function p(h) {
|
|
570
|
+
if (h === null)
|
|
496
571
|
return "";
|
|
497
|
-
if (a.isDate(
|
|
498
|
-
return
|
|
499
|
-
if (!
|
|
572
|
+
if (a.isDate(h))
|
|
573
|
+
return h.toISOString();
|
|
574
|
+
if (!u && a.isBlob(h))
|
|
500
575
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
501
|
-
return a.isArrayBuffer(
|
|
576
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? u && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
502
577
|
}
|
|
503
|
-
function
|
|
504
|
-
let
|
|
505
|
-
if (
|
|
506
|
-
if (a.endsWith(
|
|
507
|
-
|
|
508
|
-
else if (a.isArray(
|
|
509
|
-
return
|
|
510
|
-
!(a.isUndefined(
|
|
578
|
+
function f(h, d, b) {
|
|
579
|
+
let S = h;
|
|
580
|
+
if (h && !b && typeof h == "object") {
|
|
581
|
+
if (a.endsWith(d, "{}"))
|
|
582
|
+
d = r ? d : d.slice(0, -2), h = JSON.stringify(h);
|
|
583
|
+
else if (a.isArray(h) && hn(h) || (a.isFileList(h) || a.endsWith(d, "[]")) && (S = a.toArray(h)))
|
|
584
|
+
return d = Ke(d), S.forEach(function(x, ot) {
|
|
585
|
+
!(a.isUndefined(x) || x === null) && t.append(
|
|
511
586
|
// eslint-disable-next-line no-nested-ternary
|
|
512
|
-
i === !0 ?
|
|
513
|
-
|
|
587
|
+
i === !0 ? Ae([d], ot, o) : i === null ? d : d + "[]",
|
|
588
|
+
p(x)
|
|
514
589
|
);
|
|
515
590
|
}), !1;
|
|
516
591
|
}
|
|
517
|
-
return
|
|
592
|
+
return ie(h) ? !0 : (t.append(Ae(b, d, o), p(h)), !1);
|
|
518
593
|
}
|
|
519
|
-
const
|
|
520
|
-
defaultVisitor:
|
|
521
|
-
convertValue:
|
|
522
|
-
isVisitable:
|
|
594
|
+
const c = [], y = Object.assign(mn, {
|
|
595
|
+
defaultVisitor: f,
|
|
596
|
+
convertValue: p,
|
|
597
|
+
isVisitable: ie
|
|
523
598
|
});
|
|
524
|
-
function
|
|
525
|
-
if (!a.isUndefined(
|
|
526
|
-
if (
|
|
527
|
-
throw Error("Circular reference detected in " +
|
|
528
|
-
|
|
529
|
-
(!(a.isUndefined(
|
|
599
|
+
function E(h, d) {
|
|
600
|
+
if (!a.isUndefined(h)) {
|
|
601
|
+
if (c.indexOf(h) !== -1)
|
|
602
|
+
throw Error("Circular reference detected in " + d.join("."));
|
|
603
|
+
c.push(h), a.forEach(h, function(S, O) {
|
|
604
|
+
(!(a.isUndefined(S) || S === null) && s.call(
|
|
530
605
|
t,
|
|
531
|
-
|
|
532
|
-
a.isString(
|
|
533
|
-
|
|
606
|
+
S,
|
|
607
|
+
a.isString(O) ? O.trim() : O,
|
|
608
|
+
d,
|
|
534
609
|
y
|
|
535
|
-
)) === !0 &&
|
|
536
|
-
}),
|
|
610
|
+
)) === !0 && E(S, d ? d.concat(O) : [O]);
|
|
611
|
+
}), c.pop();
|
|
537
612
|
}
|
|
538
613
|
}
|
|
539
614
|
if (!a.isObject(e))
|
|
540
615
|
throw new TypeError("data must be an object");
|
|
541
|
-
return
|
|
616
|
+
return E(e), t;
|
|
542
617
|
}
|
|
543
|
-
function
|
|
618
|
+
function _e(e) {
|
|
544
619
|
const t = {
|
|
545
620
|
"!": "%21",
|
|
546
621
|
"'": "%27",
|
|
@@ -554,36 +629,36 @@ function ge(e) {
|
|
|
554
629
|
return t[r];
|
|
555
630
|
});
|
|
556
631
|
}
|
|
557
|
-
function
|
|
558
|
-
this._pairs = [], e &&
|
|
632
|
+
function fe(e, t) {
|
|
633
|
+
this._pairs = [], e && G(e, this, t);
|
|
559
634
|
}
|
|
560
|
-
const
|
|
561
|
-
|
|
635
|
+
const Xe = fe.prototype;
|
|
636
|
+
Xe.append = function(t, n) {
|
|
562
637
|
this._pairs.push([t, n]);
|
|
563
638
|
};
|
|
564
|
-
|
|
639
|
+
Xe.toString = function(t) {
|
|
565
640
|
const n = t ? function(r) {
|
|
566
|
-
return t.call(this, r,
|
|
567
|
-
} :
|
|
641
|
+
return t.call(this, r, _e);
|
|
642
|
+
} : _e;
|
|
568
643
|
return this._pairs.map(function(s) {
|
|
569
644
|
return n(s[0]) + "=" + n(s[1]);
|
|
570
645
|
}, "").join("&");
|
|
571
646
|
};
|
|
572
|
-
function
|
|
647
|
+
function yn(e) {
|
|
573
648
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
574
649
|
}
|
|
575
|
-
function
|
|
650
|
+
function Ge(e, t, n) {
|
|
576
651
|
if (!t)
|
|
577
652
|
return e;
|
|
578
|
-
const r = n && n.encode ||
|
|
653
|
+
const r = n && n.encode || yn, s = n && n.serialize;
|
|
579
654
|
let o;
|
|
580
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
655
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new fe(t, n).toString(r), o) {
|
|
581
656
|
const i = e.indexOf("#");
|
|
582
657
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
583
658
|
}
|
|
584
659
|
return e;
|
|
585
660
|
}
|
|
586
|
-
class
|
|
661
|
+
class wn {
|
|
587
662
|
constructor() {
|
|
588
663
|
this.handlers = [];
|
|
589
664
|
}
|
|
@@ -637,36 +712,36 @@ class an {
|
|
|
637
712
|
});
|
|
638
713
|
}
|
|
639
714
|
}
|
|
640
|
-
const
|
|
715
|
+
const Te = wn, Qe = {
|
|
641
716
|
silentJSONParsing: !0,
|
|
642
717
|
forcedJSONParsing: !0,
|
|
643
718
|
clarifyTimeoutError: !1
|
|
644
|
-
},
|
|
645
|
-
let e;
|
|
646
|
-
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
647
|
-
})(), dn = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
648
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), S = {
|
|
719
|
+
}, En = typeof URLSearchParams != "undefined" ? URLSearchParams : fe, bn = typeof FormData != "undefined" ? FormData : null, Rn = typeof Blob != "undefined" ? Blob : null, Sn = {
|
|
649
720
|
isBrowser: !0,
|
|
650
721
|
classes: {
|
|
651
|
-
URLSearchParams:
|
|
652
|
-
FormData:
|
|
653
|
-
Blob:
|
|
722
|
+
URLSearchParams: En,
|
|
723
|
+
FormData: bn,
|
|
724
|
+
Blob: Rn
|
|
654
725
|
},
|
|
655
|
-
isStandardBrowserEnv: fn,
|
|
656
|
-
isStandardBrowserWebWorkerEnv: dn,
|
|
657
726
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
658
|
-
}
|
|
659
|
-
function
|
|
660
|
-
|
|
727
|
+
}, Ze = typeof window != "undefined" && typeof document != "undefined", gn = ((e) => Ze && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator != "undefined" && navigator.product), On = (() => typeof WorkerGlobalScope != "undefined" && // eslint-disable-next-line no-undef
|
|
728
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
729
|
+
__proto__: null,
|
|
730
|
+
hasBrowserEnv: Ze,
|
|
731
|
+
hasStandardBrowserEnv: gn,
|
|
732
|
+
hasStandardBrowserWebWorkerEnv: On
|
|
733
|
+
}, Symbol.toStringTag, { value: "Module" })), A = Y(Y({}, xn), Sn);
|
|
734
|
+
function An(e, t) {
|
|
735
|
+
return G(e, new A.classes.URLSearchParams(), Object.assign({
|
|
661
736
|
visitor: function(n, r, s, o) {
|
|
662
|
-
return
|
|
737
|
+
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
663
738
|
}
|
|
664
739
|
}, t));
|
|
665
740
|
}
|
|
666
|
-
function
|
|
741
|
+
function _n(e) {
|
|
667
742
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
668
743
|
}
|
|
669
|
-
function
|
|
744
|
+
function Tn(e) {
|
|
670
745
|
const t = {}, n = Object.keys(e);
|
|
671
746
|
let r;
|
|
672
747
|
const s = n.length;
|
|
@@ -675,24 +750,23 @@ function mn(e) {
|
|
|
675
750
|
o = n[r], t[o] = e[o];
|
|
676
751
|
return t;
|
|
677
752
|
}
|
|
678
|
-
function
|
|
753
|
+
function Ye(e) {
|
|
679
754
|
function t(n, r, s, o) {
|
|
680
755
|
let i = n[o++];
|
|
681
|
-
|
|
682
|
-
|
|
756
|
+
if (i === "__proto__")
|
|
757
|
+
return !0;
|
|
758
|
+
const l = Number.isFinite(+i), u = o >= n.length;
|
|
759
|
+
return i = !i && a.isArray(s) ? s.length : i, u ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Tn(s[i])), !l);
|
|
683
760
|
}
|
|
684
761
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
685
762
|
const n = {};
|
|
686
763
|
return a.forEachEntry(e, (r, s) => {
|
|
687
|
-
t(
|
|
764
|
+
t(_n(r), s, n, 0);
|
|
688
765
|
}), n;
|
|
689
766
|
}
|
|
690
767
|
return null;
|
|
691
768
|
}
|
|
692
|
-
|
|
693
|
-
"Content-Type": void 0
|
|
694
|
-
};
|
|
695
|
-
function wn(e, t, n) {
|
|
769
|
+
function Pn(e, t, n) {
|
|
696
770
|
if (a.isString(e))
|
|
697
771
|
try {
|
|
698
772
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -702,43 +776,43 @@ function wn(e, t, n) {
|
|
|
702
776
|
}
|
|
703
777
|
return (n || JSON.stringify)(e);
|
|
704
778
|
}
|
|
705
|
-
const
|
|
706
|
-
transitional:
|
|
779
|
+
const de = {
|
|
780
|
+
transitional: Qe,
|
|
707
781
|
adapter: ["xhr", "http"],
|
|
708
782
|
transformRequest: [function(t, n) {
|
|
709
783
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
710
784
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
711
|
-
return s
|
|
785
|
+
return s ? JSON.stringify(Ye(t)) : t;
|
|
712
786
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
713
787
|
return t;
|
|
714
788
|
if (a.isArrayBufferView(t))
|
|
715
789
|
return t.buffer;
|
|
716
790
|
if (a.isURLSearchParams(t))
|
|
717
791
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
718
|
-
let
|
|
792
|
+
let l;
|
|
719
793
|
if (o) {
|
|
720
794
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
721
|
-
return
|
|
722
|
-
if ((
|
|
723
|
-
const
|
|
724
|
-
return
|
|
725
|
-
|
|
726
|
-
|
|
795
|
+
return An(t, this.formSerializer).toString();
|
|
796
|
+
if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
797
|
+
const u = this.env && this.env.FormData;
|
|
798
|
+
return G(
|
|
799
|
+
l ? { "files[]": t } : t,
|
|
800
|
+
u && new u(),
|
|
727
801
|
this.formSerializer
|
|
728
802
|
);
|
|
729
803
|
}
|
|
730
804
|
}
|
|
731
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
805
|
+
return o || s ? (n.setContentType("application/json", !1), Pn(t)) : t;
|
|
732
806
|
}],
|
|
733
807
|
transformResponse: [function(t) {
|
|
734
|
-
const n = this.transitional ||
|
|
808
|
+
const n = this.transitional || de.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
735
809
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
736
810
|
const i = !(n && n.silentJSONParsing) && s;
|
|
737
811
|
try {
|
|
738
812
|
return JSON.parse(t);
|
|
739
|
-
} catch (
|
|
813
|
+
} catch (l) {
|
|
740
814
|
if (i)
|
|
741
|
-
throw
|
|
815
|
+
throw l.name === "SyntaxError" ? m.from(l, m.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
742
816
|
}
|
|
743
817
|
}
|
|
744
818
|
return t;
|
|
@@ -753,25 +827,23 @@ const G = {
|
|
|
753
827
|
maxContentLength: -1,
|
|
754
828
|
maxBodyLength: -1,
|
|
755
829
|
env: {
|
|
756
|
-
FormData:
|
|
757
|
-
Blob:
|
|
830
|
+
FormData: A.classes.FormData,
|
|
831
|
+
Blob: A.classes.Blob
|
|
758
832
|
},
|
|
759
833
|
validateStatus: function(t) {
|
|
760
834
|
return t >= 200 && t < 300;
|
|
761
835
|
},
|
|
762
836
|
headers: {
|
|
763
837
|
common: {
|
|
764
|
-
Accept: "application/json, text/plain, */*"
|
|
838
|
+
Accept: "application/json, text/plain, */*",
|
|
839
|
+
"Content-Type": void 0
|
|
765
840
|
}
|
|
766
841
|
}
|
|
767
842
|
};
|
|
768
|
-
a.forEach(["delete", "get", "head"],
|
|
769
|
-
|
|
843
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
844
|
+
de.headers[e] = {};
|
|
770
845
|
});
|
|
771
|
-
|
|
772
|
-
G.headers[t] = a.merge(yn);
|
|
773
|
-
});
|
|
774
|
-
const le = G, En = a.toObjectSet([
|
|
846
|
+
const pe = de, Cn = a.toObjectSet([
|
|
775
847
|
"age",
|
|
776
848
|
"authorization",
|
|
777
849
|
"content-length",
|
|
@@ -789,31 +861,29 @@ const le = G, En = a.toObjectSet([
|
|
|
789
861
|
"referer",
|
|
790
862
|
"retry-after",
|
|
791
863
|
"user-agent"
|
|
792
|
-
]),
|
|
864
|
+
]), Nn = (e) => {
|
|
793
865
|
const t = {};
|
|
794
866
|
let n, r, s;
|
|
795
867
|
return e && e.split(`
|
|
796
868
|
`).forEach(function(i) {
|
|
797
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
869
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Cn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
798
870
|
}), t;
|
|
799
|
-
},
|
|
800
|
-
function
|
|
871
|
+
}, Pe = Symbol("internals");
|
|
872
|
+
function U(e) {
|
|
801
873
|
return e && String(e).trim().toLowerCase();
|
|
802
874
|
}
|
|
803
875
|
function V(e) {
|
|
804
876
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
|
|
805
877
|
}
|
|
806
|
-
function
|
|
878
|
+
function Fn(e) {
|
|
807
879
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
808
880
|
let r;
|
|
809
881
|
for (; r = n.exec(e); )
|
|
810
882
|
t[r[1]] = r[2];
|
|
811
883
|
return t;
|
|
812
884
|
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
}
|
|
816
|
-
function Z(e, t, n, r, s) {
|
|
885
|
+
const Ln = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
886
|
+
function ne(e, t, n, r, s) {
|
|
817
887
|
if (a.isFunction(r))
|
|
818
888
|
return r.call(this, t, n);
|
|
819
889
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -823,10 +893,10 @@ function Z(e, t, n, r, s) {
|
|
|
823
893
|
return r.test(t);
|
|
824
894
|
}
|
|
825
895
|
}
|
|
826
|
-
function
|
|
896
|
+
function Bn(e) {
|
|
827
897
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
828
898
|
}
|
|
829
|
-
function
|
|
899
|
+
function Un(e, t) {
|
|
830
900
|
const n = a.toCamelCase(" " + t);
|
|
831
901
|
["get", "set", "has"].forEach((r) => {
|
|
832
902
|
Object.defineProperty(e, r + n, {
|
|
@@ -837,31 +907,31 @@ function On(e, t) {
|
|
|
837
907
|
});
|
|
838
908
|
});
|
|
839
909
|
}
|
|
840
|
-
class
|
|
910
|
+
class Q {
|
|
841
911
|
constructor(t) {
|
|
842
912
|
t && this.set(t);
|
|
843
913
|
}
|
|
844
914
|
set(t, n, r) {
|
|
845
915
|
const s = this;
|
|
846
|
-
function o(u, p
|
|
847
|
-
const
|
|
848
|
-
if (!
|
|
916
|
+
function o(l, u, p) {
|
|
917
|
+
const f = U(u);
|
|
918
|
+
if (!f)
|
|
849
919
|
throw new Error("header name must be a non-empty string");
|
|
850
|
-
const
|
|
851
|
-
(!
|
|
920
|
+
const c = a.findKey(s, f);
|
|
921
|
+
(!c || s[c] === void 0 || p === !0 || p === void 0 && s[c] !== !1) && (s[c || u] = V(l));
|
|
852
922
|
}
|
|
853
|
-
const i = (
|
|
854
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
923
|
+
const i = (l, u) => a.forEach(l, (p, f) => o(p, f, u));
|
|
924
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Ln(t) ? i(Nn(t), n) : t != null && o(n, t, r), this;
|
|
855
925
|
}
|
|
856
926
|
get(t, n) {
|
|
857
|
-
if (t =
|
|
927
|
+
if (t = U(t), t) {
|
|
858
928
|
const r = a.findKey(this, t);
|
|
859
929
|
if (r) {
|
|
860
930
|
const s = this[r];
|
|
861
931
|
if (!n)
|
|
862
932
|
return s;
|
|
863
933
|
if (n === !0)
|
|
864
|
-
return
|
|
934
|
+
return Fn(s);
|
|
865
935
|
if (a.isFunction(n))
|
|
866
936
|
return n.call(this, s, r);
|
|
867
937
|
if (a.isRegExp(n))
|
|
@@ -871,9 +941,9 @@ class X {
|
|
|
871
941
|
}
|
|
872
942
|
}
|
|
873
943
|
has(t, n) {
|
|
874
|
-
if (t =
|
|
944
|
+
if (t = U(t), t) {
|
|
875
945
|
const r = a.findKey(this, t);
|
|
876
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
946
|
+
return !!(r && this[r] !== void 0 && (!n || ne(this, this[r], r, n)));
|
|
877
947
|
}
|
|
878
948
|
return !1;
|
|
879
949
|
}
|
|
@@ -881,9 +951,9 @@ class X {
|
|
|
881
951
|
const r = this;
|
|
882
952
|
let s = !1;
|
|
883
953
|
function o(i) {
|
|
884
|
-
if (i =
|
|
885
|
-
const
|
|
886
|
-
|
|
954
|
+
if (i = U(i), i) {
|
|
955
|
+
const l = a.findKey(r, i);
|
|
956
|
+
l && (!n || ne(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
887
957
|
}
|
|
888
958
|
}
|
|
889
959
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -893,7 +963,7 @@ class X {
|
|
|
893
963
|
let r = n.length, s = !1;
|
|
894
964
|
for (; r--; ) {
|
|
895
965
|
const o = n[r];
|
|
896
|
-
(!t ||
|
|
966
|
+
(!t || ne(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
897
967
|
}
|
|
898
968
|
return s;
|
|
899
969
|
}
|
|
@@ -905,8 +975,8 @@ class X {
|
|
|
905
975
|
n[i] = V(s), delete n[o];
|
|
906
976
|
return;
|
|
907
977
|
}
|
|
908
|
-
const
|
|
909
|
-
|
|
978
|
+
const l = t ? Bn(o) : String(o).trim();
|
|
979
|
+
l !== o && delete n[o], n[l] = V(s), r[l] = !0;
|
|
910
980
|
}), this;
|
|
911
981
|
}
|
|
912
982
|
concat(...t) {
|
|
@@ -936,37 +1006,45 @@ class X {
|
|
|
936
1006
|
return n.forEach((s) => r.set(s)), r;
|
|
937
1007
|
}
|
|
938
1008
|
static accessor(t) {
|
|
939
|
-
const r = (this[
|
|
1009
|
+
const r = (this[Pe] = this[Pe] = {
|
|
940
1010
|
accessors: {}
|
|
941
1011
|
}).accessors, s = this.prototype;
|
|
942
1012
|
function o(i) {
|
|
943
|
-
const
|
|
944
|
-
r[
|
|
1013
|
+
const l = U(i);
|
|
1014
|
+
r[l] || (Un(s, i), r[l] = !0);
|
|
945
1015
|
}
|
|
946
1016
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
947
1017
|
}
|
|
948
1018
|
}
|
|
949
|
-
|
|
950
|
-
a.
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1019
|
+
Q.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1020
|
+
a.reduceDescriptors(Q.prototype, ({ value: e }, t) => {
|
|
1021
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1022
|
+
return {
|
|
1023
|
+
get: () => e,
|
|
1024
|
+
set(r) {
|
|
1025
|
+
this[n] = r;
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
});
|
|
1029
|
+
a.freezeMethods(Q);
|
|
1030
|
+
const T = Q;
|
|
1031
|
+
function re(e, t) {
|
|
1032
|
+
const n = this || pe, r = t || n, s = T.from(r.headers);
|
|
955
1033
|
let o = r.data;
|
|
956
|
-
return a.forEach(e, function(
|
|
957
|
-
o =
|
|
1034
|
+
return a.forEach(e, function(l) {
|
|
1035
|
+
o = l.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
958
1036
|
}), s.normalize(), o;
|
|
959
1037
|
}
|
|
960
|
-
function
|
|
1038
|
+
function et(e) {
|
|
961
1039
|
return !!(e && e.__CANCEL__);
|
|
962
1040
|
}
|
|
963
|
-
function
|
|
964
|
-
m.call(this, e
|
|
1041
|
+
function v(e, t, n) {
|
|
1042
|
+
m.call(this, e == null ? "canceled" : e, m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
965
1043
|
}
|
|
966
|
-
a.inherits(
|
|
1044
|
+
a.inherits(v, m, {
|
|
967
1045
|
__CANCEL__: !0
|
|
968
1046
|
});
|
|
969
|
-
function
|
|
1047
|
+
function Dn(e, t, n) {
|
|
970
1048
|
const r = n.config.validateStatus;
|
|
971
1049
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
972
1050
|
"Request failed with status code " + n.status,
|
|
@@ -976,47 +1054,43 @@ function xn(e, t, n) {
|
|
|
976
1054
|
n
|
|
977
1055
|
));
|
|
978
1056
|
}
|
|
979
|
-
const
|
|
1057
|
+
const kn = A.hasStandardBrowserEnv ? (
|
|
980
1058
|
// Standard browser envs support document.cookie
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
};
|
|
995
|
-
}()
|
|
1059
|
+
{
|
|
1060
|
+
write(e, t, n, r, s, o) {
|
|
1061
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
1062
|
+
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("; ");
|
|
1063
|
+
},
|
|
1064
|
+
read(e) {
|
|
1065
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
1066
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
1067
|
+
},
|
|
1068
|
+
remove(e) {
|
|
1069
|
+
this.write(e, "", Date.now() - 864e5);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
996
1072
|
) : (
|
|
997
|
-
// Non
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
};
|
|
1008
|
-
}()
|
|
1073
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1074
|
+
{
|
|
1075
|
+
write() {
|
|
1076
|
+
},
|
|
1077
|
+
read() {
|
|
1078
|
+
return null;
|
|
1079
|
+
},
|
|
1080
|
+
remove() {
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1009
1083
|
);
|
|
1010
|
-
function
|
|
1084
|
+
function jn(e) {
|
|
1011
1085
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1012
1086
|
}
|
|
1013
|
-
function
|
|
1014
|
-
return t ? e.replace(
|
|
1087
|
+
function vn(e, t) {
|
|
1088
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1015
1089
|
}
|
|
1016
|
-
function
|
|
1017
|
-
return e && !
|
|
1090
|
+
function tt(e, t) {
|
|
1091
|
+
return e && !jn(t) ? vn(e, t) : t;
|
|
1018
1092
|
}
|
|
1019
|
-
const
|
|
1093
|
+
const In = A.hasStandardBrowserEnv ? (
|
|
1020
1094
|
// Standard browser envs have full support of the APIs needed to test
|
|
1021
1095
|
// whether the request URL is of the same origin as current location.
|
|
1022
1096
|
function() {
|
|
@@ -1036,8 +1110,8 @@ const Pn = S.isStandardBrowserEnv ? (
|
|
|
1036
1110
|
};
|
|
1037
1111
|
}
|
|
1038
1112
|
return r = s(window.location.href), function(i) {
|
|
1039
|
-
const
|
|
1040
|
-
return
|
|
1113
|
+
const l = a.isString(i) ? s(i) : i;
|
|
1114
|
+
return l.protocol === r.protocol && l.host === r.host;
|
|
1041
1115
|
};
|
|
1042
1116
|
}()
|
|
1043
1117
|
) : (
|
|
@@ -1048,197 +1122,216 @@ const Pn = S.isStandardBrowserEnv ? (
|
|
|
1048
1122
|
};
|
|
1049
1123
|
}()
|
|
1050
1124
|
);
|
|
1051
|
-
function
|
|
1125
|
+
function Hn(e) {
|
|
1052
1126
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1053
1127
|
return t && t[1] || "";
|
|
1054
1128
|
}
|
|
1055
|
-
function
|
|
1129
|
+
function Mn(e, t) {
|
|
1056
1130
|
e = e || 10;
|
|
1057
1131
|
const n = new Array(e), r = new Array(e);
|
|
1058
1132
|
let s = 0, o = 0, i;
|
|
1059
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
1060
|
-
const
|
|
1061
|
-
i || (i =
|
|
1062
|
-
let
|
|
1063
|
-
for (;
|
|
1064
|
-
y += n[
|
|
1065
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
1133
|
+
return t = t !== void 0 ? t : 1e3, function(u) {
|
|
1134
|
+
const p = Date.now(), f = r[o];
|
|
1135
|
+
i || (i = p), n[s] = u, r[s] = p;
|
|
1136
|
+
let c = o, y = 0;
|
|
1137
|
+
for (; c !== s; )
|
|
1138
|
+
y += n[c++], c = c % e;
|
|
1139
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), p - i < t)
|
|
1066
1140
|
return;
|
|
1067
|
-
const
|
|
1068
|
-
return
|
|
1141
|
+
const E = f && p - f;
|
|
1142
|
+
return E ? Math.round(y * 1e3 / E) : void 0;
|
|
1069
1143
|
};
|
|
1070
1144
|
}
|
|
1071
|
-
function
|
|
1145
|
+
function Ce(e, t) {
|
|
1072
1146
|
let n = 0;
|
|
1073
|
-
const r =
|
|
1147
|
+
const r = Mn(50, 250);
|
|
1074
1148
|
return (s) => {
|
|
1075
|
-
const o = s.loaded, i = s.lengthComputable ? s.total : void 0,
|
|
1149
|
+
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, l = o - n, u = r(l), p = o <= i;
|
|
1076
1150
|
n = o;
|
|
1077
|
-
const
|
|
1151
|
+
const f = {
|
|
1078
1152
|
loaded: o,
|
|
1079
1153
|
total: i,
|
|
1080
1154
|
progress: i ? o / i : void 0,
|
|
1081
|
-
bytes:
|
|
1082
|
-
rate:
|
|
1083
|
-
estimated:
|
|
1155
|
+
bytes: l,
|
|
1156
|
+
rate: u || void 0,
|
|
1157
|
+
estimated: u && i && p ? (i - o) / u : void 0,
|
|
1084
1158
|
event: s
|
|
1085
1159
|
};
|
|
1086
|
-
|
|
1160
|
+
f[t ? "download" : "upload"] = !0, e(f);
|
|
1087
1161
|
};
|
|
1088
1162
|
}
|
|
1089
|
-
const
|
|
1163
|
+
const qn = typeof XMLHttpRequest != "undefined", zn = qn && function(e) {
|
|
1090
1164
|
return new Promise(function(n, r) {
|
|
1091
1165
|
let s = e.data;
|
|
1092
|
-
const o =
|
|
1093
|
-
let u;
|
|
1166
|
+
const o = T.from(e.headers).normalize();
|
|
1167
|
+
let { responseType: i, withXSRFToken: l } = e, u;
|
|
1094
1168
|
function p() {
|
|
1095
1169
|
e.cancelToken && e.cancelToken.unsubscribe(u), e.signal && e.signal.removeEventListener("abort", u);
|
|
1096
1170
|
}
|
|
1097
|
-
|
|
1171
|
+
let f;
|
|
1172
|
+
if (a.isFormData(s)) {
|
|
1173
|
+
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1174
|
+
o.setContentType(!1);
|
|
1175
|
+
else if ((f = o.getContentType()) !== !1) {
|
|
1176
|
+
const [d, ...b] = f ? f.split(";").map((S) => S.trim()).filter(Boolean) : [];
|
|
1177
|
+
o.setContentType([d || "multipart/form-data", ...b].join("; "));
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1098
1180
|
let c = new XMLHttpRequest();
|
|
1099
1181
|
if (e.auth) {
|
|
1100
|
-
const
|
|
1101
|
-
o.set("Authorization", "Basic " + btoa(
|
|
1182
|
+
const d = e.auth.username || "", b = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
1183
|
+
o.set("Authorization", "Basic " + btoa(d + ":" + b));
|
|
1102
1184
|
}
|
|
1103
|
-
const
|
|
1104
|
-
c.open(e.method.toUpperCase(),
|
|
1105
|
-
function
|
|
1185
|
+
const y = tt(e.baseURL, e.url);
|
|
1186
|
+
c.open(e.method.toUpperCase(), Ge(y, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
|
|
1187
|
+
function E() {
|
|
1106
1188
|
if (!c)
|
|
1107
1189
|
return;
|
|
1108
|
-
const
|
|
1190
|
+
const d = T.from(
|
|
1109
1191
|
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
1110
|
-
),
|
|
1192
|
+
), S = {
|
|
1111
1193
|
data: !i || i === "text" || i === "json" ? c.responseText : c.response,
|
|
1112
1194
|
status: c.status,
|
|
1113
1195
|
statusText: c.statusText,
|
|
1114
|
-
headers:
|
|
1196
|
+
headers: d,
|
|
1115
1197
|
config: e,
|
|
1116
1198
|
request: c
|
|
1117
1199
|
};
|
|
1118
|
-
|
|
1119
|
-
n(
|
|
1120
|
-
}, function(
|
|
1121
|
-
r(
|
|
1122
|
-
},
|
|
1200
|
+
Dn(function(x) {
|
|
1201
|
+
n(x), p();
|
|
1202
|
+
}, function(x) {
|
|
1203
|
+
r(x), p();
|
|
1204
|
+
}, S), c = null;
|
|
1123
1205
|
}
|
|
1124
|
-
if ("onloadend" in c ? c.onloadend =
|
|
1125
|
-
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1206
|
+
if ("onloadend" in c ? c.onloadend = E : c.onreadystatechange = function() {
|
|
1207
|
+
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1126
1208
|
}, c.onabort = function() {
|
|
1127
1209
|
c && (r(new m("Request aborted", m.ECONNABORTED, e, c)), c = null);
|
|
1128
1210
|
}, c.onerror = function() {
|
|
1129
1211
|
r(new m("Network Error", m.ERR_NETWORK, e, c)), c = null;
|
|
1130
1212
|
}, c.ontimeout = function() {
|
|
1131
|
-
let
|
|
1132
|
-
const
|
|
1133
|
-
e.timeoutErrorMessage && (
|
|
1134
|
-
|
|
1135
|
-
|
|
1213
|
+
let b = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
1214
|
+
const S = e.transitional || Qe;
|
|
1215
|
+
e.timeoutErrorMessage && (b = e.timeoutErrorMessage), r(new m(
|
|
1216
|
+
b,
|
|
1217
|
+
S.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1136
1218
|
e,
|
|
1137
1219
|
c
|
|
1138
1220
|
)), c = null;
|
|
1139
|
-
},
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1221
|
+
}, A.hasStandardBrowserEnv && (l && a.isFunction(l) && (l = l(e)), l || l !== !1 && In(y))) {
|
|
1222
|
+
const d = e.xsrfHeaderName && e.xsrfCookieName && kn.read(e.xsrfCookieName);
|
|
1223
|
+
d && o.set(e.xsrfHeaderName, d);
|
|
1142
1224
|
}
|
|
1143
|
-
s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(
|
|
1144
|
-
c.setRequestHeader(
|
|
1145
|
-
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress",
|
|
1146
|
-
c && (r(!
|
|
1225
|
+
s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(b, S) {
|
|
1226
|
+
c.setRequestHeader(S, b);
|
|
1227
|
+
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", Ce(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", Ce(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (d) => {
|
|
1228
|
+
c && (r(!d || d.type ? new v(null, e, c) : d), c.abort(), c = null);
|
|
1147
1229
|
}, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
|
|
1148
|
-
const
|
|
1149
|
-
if (
|
|
1150
|
-
r(new m("Unsupported protocol " +
|
|
1230
|
+
const h = Hn(y);
|
|
1231
|
+
if (h && A.protocols.indexOf(h) === -1) {
|
|
1232
|
+
r(new m("Unsupported protocol " + h + ":", m.ERR_BAD_REQUEST, e));
|
|
1151
1233
|
return;
|
|
1152
1234
|
}
|
|
1153
1235
|
c.send(s || null);
|
|
1154
1236
|
});
|
|
1155
|
-
},
|
|
1156
|
-
http:
|
|
1157
|
-
xhr:
|
|
1237
|
+
}, ae = {
|
|
1238
|
+
http: pn,
|
|
1239
|
+
xhr: zn
|
|
1158
1240
|
};
|
|
1159
|
-
a.forEach(
|
|
1241
|
+
a.forEach(ae, (e, t) => {
|
|
1160
1242
|
if (e) {
|
|
1161
1243
|
try {
|
|
1162
1244
|
Object.defineProperty(e, "name", { value: t });
|
|
1163
|
-
} catch {
|
|
1245
|
+
} catch (n) {
|
|
1164
1246
|
}
|
|
1165
1247
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1166
1248
|
}
|
|
1167
1249
|
});
|
|
1168
|
-
const
|
|
1250
|
+
const Ne = (e) => `- ${e}`, Vn = (e) => a.isFunction(e) || e === null || e === !1, nt = {
|
|
1169
1251
|
getAdapter: (e) => {
|
|
1170
1252
|
e = a.isArray(e) ? e : [e];
|
|
1171
1253
|
const { length: t } = e;
|
|
1172
1254
|
let n, r;
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1255
|
+
const s = {};
|
|
1256
|
+
for (let o = 0; o < t; o++) {
|
|
1257
|
+
n = e[o];
|
|
1258
|
+
let i;
|
|
1259
|
+
if (r = n, !Vn(n) && (r = ae[(i = String(n)).toLowerCase()], r === void 0))
|
|
1260
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1261
|
+
if (r)
|
|
1262
|
+
break;
|
|
1263
|
+
s[i || "#" + o] = r;
|
|
1264
|
+
}
|
|
1265
|
+
if (!r) {
|
|
1266
|
+
const o = Object.entries(s).map(
|
|
1267
|
+
([l, u]) => `adapter ${l} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1268
|
+
);
|
|
1269
|
+
let i = t ? o.length > 1 ? `since :
|
|
1270
|
+
` + o.map(Ne).join(`
|
|
1271
|
+
`) : " " + Ne(o[0]) : "as no adapter specified";
|
|
1272
|
+
throw new m(
|
|
1273
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1178
1274
|
"ERR_NOT_SUPPORT"
|
|
1179
|
-
) : new Error(
|
|
1180
|
-
a.hasOwnProp(z, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
|
1181
1275
|
);
|
|
1182
|
-
|
|
1183
|
-
throw new TypeError("adapter is not a function");
|
|
1276
|
+
}
|
|
1184
1277
|
return r;
|
|
1185
1278
|
},
|
|
1186
|
-
adapters:
|
|
1279
|
+
adapters: ae
|
|
1187
1280
|
};
|
|
1188
|
-
function
|
|
1281
|
+
function se(e) {
|
|
1189
1282
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1190
|
-
throw new
|
|
1283
|
+
throw new v(null, e);
|
|
1191
1284
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return
|
|
1285
|
+
function Fe(e) {
|
|
1286
|
+
return se(e), e.headers = T.from(e.headers), e.data = re.call(
|
|
1194
1287
|
e,
|
|
1195
1288
|
e.transformRequest
|
|
1196
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1197
|
-
return
|
|
1289
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), nt.getAdapter(e.adapter || pe.adapter)(e).then(function(r) {
|
|
1290
|
+
return se(e), r.data = re.call(
|
|
1198
1291
|
e,
|
|
1199
1292
|
e.transformResponse,
|
|
1200
1293
|
r
|
|
1201
|
-
), r.headers =
|
|
1294
|
+
), r.headers = T.from(r.headers), r;
|
|
1202
1295
|
}, function(r) {
|
|
1203
|
-
return
|
|
1296
|
+
return et(r) || (se(e), r && r.response && (r.response.data = re.call(
|
|
1204
1297
|
e,
|
|
1205
1298
|
e.transformResponse,
|
|
1206
1299
|
r.response
|
|
1207
|
-
), r.response.headers =
|
|
1300
|
+
), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
|
|
1208
1301
|
});
|
|
1209
1302
|
}
|
|
1210
|
-
const
|
|
1211
|
-
function
|
|
1303
|
+
const Le = (e) => e instanceof T ? e.toJSON() : e;
|
|
1304
|
+
function C(e, t) {
|
|
1212
1305
|
t = t || {};
|
|
1213
1306
|
const n = {};
|
|
1214
|
-
function r(
|
|
1215
|
-
return a.isPlainObject(
|
|
1307
|
+
function r(p, f, c) {
|
|
1308
|
+
return a.isPlainObject(p) && a.isPlainObject(f) ? a.merge.call({ caseless: c }, p, f) : a.isPlainObject(f) ? a.merge({}, f) : a.isArray(f) ? f.slice() : f;
|
|
1216
1309
|
}
|
|
1217
|
-
function s(
|
|
1218
|
-
if (a.isUndefined(
|
|
1219
|
-
if (!a.isUndefined(
|
|
1220
|
-
return r(void 0,
|
|
1310
|
+
function s(p, f, c) {
|
|
1311
|
+
if (a.isUndefined(f)) {
|
|
1312
|
+
if (!a.isUndefined(p))
|
|
1313
|
+
return r(void 0, p, c);
|
|
1221
1314
|
} else
|
|
1222
|
-
return r(
|
|
1315
|
+
return r(p, f, c);
|
|
1223
1316
|
}
|
|
1224
|
-
function o(
|
|
1225
|
-
if (!a.isUndefined(
|
|
1226
|
-
return r(void 0,
|
|
1317
|
+
function o(p, f) {
|
|
1318
|
+
if (!a.isUndefined(f))
|
|
1319
|
+
return r(void 0, f);
|
|
1227
1320
|
}
|
|
1228
|
-
function i(
|
|
1229
|
-
if (a.isUndefined(
|
|
1230
|
-
if (!a.isUndefined(
|
|
1231
|
-
return r(void 0,
|
|
1321
|
+
function i(p, f) {
|
|
1322
|
+
if (a.isUndefined(f)) {
|
|
1323
|
+
if (!a.isUndefined(p))
|
|
1324
|
+
return r(void 0, p);
|
|
1232
1325
|
} else
|
|
1233
|
-
return r(void 0,
|
|
1326
|
+
return r(void 0, f);
|
|
1234
1327
|
}
|
|
1235
|
-
function
|
|
1236
|
-
if (
|
|
1237
|
-
return r(
|
|
1238
|
-
if (
|
|
1239
|
-
return r(void 0,
|
|
1328
|
+
function l(p, f, c) {
|
|
1329
|
+
if (c in t)
|
|
1330
|
+
return r(p, f);
|
|
1331
|
+
if (c in e)
|
|
1332
|
+
return r(void 0, p);
|
|
1240
1333
|
}
|
|
1241
|
-
const
|
|
1334
|
+
const u = {
|
|
1242
1335
|
url: o,
|
|
1243
1336
|
method: o,
|
|
1244
1337
|
data: o,
|
|
@@ -1249,6 +1342,7 @@ function T(e, t) {
|
|
|
1249
1342
|
timeout: i,
|
|
1250
1343
|
timeoutMessage: i,
|
|
1251
1344
|
withCredentials: i,
|
|
1345
|
+
withXSRFToken: i,
|
|
1252
1346
|
adapter: i,
|
|
1253
1347
|
responseType: i,
|
|
1254
1348
|
xsrfCookieName: i,
|
|
@@ -1265,40 +1359,40 @@ function T(e, t) {
|
|
|
1265
1359
|
cancelToken: i,
|
|
1266
1360
|
socketPath: i,
|
|
1267
1361
|
responseEncoding: i,
|
|
1268
|
-
validateStatus:
|
|
1269
|
-
headers: (
|
|
1362
|
+
validateStatus: l,
|
|
1363
|
+
headers: (p, f) => s(Le(p), Le(f), !0)
|
|
1270
1364
|
};
|
|
1271
|
-
return a.forEach(Object.keys(
|
|
1272
|
-
const
|
|
1273
|
-
a.isUndefined(y) &&
|
|
1365
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
|
|
1366
|
+
const c = u[f] || s, y = c(e[f], t[f], f);
|
|
1367
|
+
a.isUndefined(y) && c !== l || (n[f] = y);
|
|
1274
1368
|
}), n;
|
|
1275
1369
|
}
|
|
1276
|
-
const
|
|
1370
|
+
const rt = "1.6.7", he = {};
|
|
1277
1371
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1278
|
-
|
|
1372
|
+
he[e] = function(r) {
|
|
1279
1373
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1280
1374
|
};
|
|
1281
1375
|
});
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1376
|
+
const Be = {};
|
|
1377
|
+
he.transitional = function(t, n, r) {
|
|
1284
1378
|
function s(o, i) {
|
|
1285
|
-
return "[Axios v" +
|
|
1379
|
+
return "[Axios v" + rt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1286
1380
|
}
|
|
1287
|
-
return (o, i,
|
|
1381
|
+
return (o, i, l) => {
|
|
1288
1382
|
if (t === !1)
|
|
1289
1383
|
throw new m(
|
|
1290
1384
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1291
1385
|
m.ERR_DEPRECATED
|
|
1292
1386
|
);
|
|
1293
|
-
return n && !
|
|
1387
|
+
return n && !Be[i] && (Be[i] = !0, console.warn(
|
|
1294
1388
|
s(
|
|
1295
1389
|
i,
|
|
1296
1390
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1297
1391
|
)
|
|
1298
|
-
)), t ? t(o, i,
|
|
1392
|
+
)), t ? t(o, i, l) : !0;
|
|
1299
1393
|
};
|
|
1300
1394
|
};
|
|
1301
|
-
function
|
|
1395
|
+
function $n(e, t, n) {
|
|
1302
1396
|
if (typeof e != "object")
|
|
1303
1397
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1304
1398
|
const r = Object.keys(e);
|
|
@@ -1306,24 +1400,24 @@ function Dn(e, t, n) {
|
|
|
1306
1400
|
for (; s-- > 0; ) {
|
|
1307
1401
|
const o = r[s], i = t[o];
|
|
1308
1402
|
if (i) {
|
|
1309
|
-
const
|
|
1310
|
-
if (
|
|
1311
|
-
throw new m("option " + o + " must be " +
|
|
1403
|
+
const l = e[o], u = l === void 0 || i(l, o, e);
|
|
1404
|
+
if (u !== !0)
|
|
1405
|
+
throw new m("option " + o + " must be " + u, m.ERR_BAD_OPTION_VALUE);
|
|
1312
1406
|
continue;
|
|
1313
1407
|
}
|
|
1314
1408
|
if (n !== !0)
|
|
1315
1409
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1316
1410
|
}
|
|
1317
1411
|
}
|
|
1318
|
-
const
|
|
1319
|
-
assertOptions:
|
|
1320
|
-
validators:
|
|
1321
|
-
},
|
|
1322
|
-
class
|
|
1412
|
+
const ce = {
|
|
1413
|
+
assertOptions: $n,
|
|
1414
|
+
validators: he
|
|
1415
|
+
}, P = ce.validators;
|
|
1416
|
+
class J {
|
|
1323
1417
|
constructor(t) {
|
|
1324
1418
|
this.defaults = t, this.interceptors = {
|
|
1325
|
-
request: new
|
|
1326
|
-
response: new
|
|
1419
|
+
request: new Te(),
|
|
1420
|
+
response: new Te()
|
|
1327
1421
|
};
|
|
1328
1422
|
}
|
|
1329
1423
|
/**
|
|
@@ -1335,71 +1429,89 @@ class $ {
|
|
|
1335
1429
|
* @returns {Promise} The Promise to be fulfilled
|
|
1336
1430
|
*/
|
|
1337
1431
|
request(t, n) {
|
|
1338
|
-
|
|
1432
|
+
return w(this, null, function* () {
|
|
1433
|
+
try {
|
|
1434
|
+
return yield this._request(t, n);
|
|
1435
|
+
} catch (r) {
|
|
1436
|
+
if (r instanceof Error) {
|
|
1437
|
+
let s;
|
|
1438
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1439
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1440
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1441
|
+
` + o) : r.stack = o;
|
|
1442
|
+
}
|
|
1443
|
+
throw r;
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
_request(t, n) {
|
|
1448
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = C(this.defaults, n);
|
|
1339
1449
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1340
|
-
r !== void 0 &&
|
|
1341
|
-
silentJSONParsing:
|
|
1342
|
-
forcedJSONParsing:
|
|
1343
|
-
clarifyTimeoutError:
|
|
1344
|
-
}, !1), s
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1450
|
+
r !== void 0 && ce.assertOptions(r, {
|
|
1451
|
+
silentJSONParsing: P.transitional(P.boolean),
|
|
1452
|
+
forcedJSONParsing: P.transitional(P.boolean),
|
|
1453
|
+
clarifyTimeoutError: P.transitional(P.boolean)
|
|
1454
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1455
|
+
serialize: s
|
|
1456
|
+
} : ce.assertOptions(s, {
|
|
1457
|
+
encode: P.function,
|
|
1458
|
+
serialize: P.function
|
|
1459
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1460
|
+
let i = o && a.merge(
|
|
1350
1461
|
o.common,
|
|
1351
1462
|
o[n.method]
|
|
1352
|
-
)
|
|
1463
|
+
);
|
|
1464
|
+
o && a.forEach(
|
|
1353
1465
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1354
|
-
(
|
|
1355
|
-
delete o[
|
|
1466
|
+
(h) => {
|
|
1467
|
+
delete o[h];
|
|
1356
1468
|
}
|
|
1357
|
-
), n.headers =
|
|
1358
|
-
const
|
|
1359
|
-
let
|
|
1360
|
-
this.interceptors.request.forEach(function(
|
|
1361
|
-
typeof
|
|
1469
|
+
), n.headers = T.concat(i, o);
|
|
1470
|
+
const l = [];
|
|
1471
|
+
let u = !0;
|
|
1472
|
+
this.interceptors.request.forEach(function(d) {
|
|
1473
|
+
typeof d.runWhen == "function" && d.runWhen(n) === !1 || (u = u && d.synchronous, l.unshift(d.fulfilled, d.rejected));
|
|
1362
1474
|
});
|
|
1363
|
-
const
|
|
1364
|
-
this.interceptors.response.forEach(function(
|
|
1365
|
-
|
|
1475
|
+
const p = [];
|
|
1476
|
+
this.interceptors.response.forEach(function(d) {
|
|
1477
|
+
p.push(d.fulfilled, d.rejected);
|
|
1366
1478
|
});
|
|
1367
|
-
let
|
|
1368
|
-
if (!
|
|
1369
|
-
const
|
|
1370
|
-
for (
|
|
1371
|
-
|
|
1372
|
-
return
|
|
1479
|
+
let f, c = 0, y;
|
|
1480
|
+
if (!u) {
|
|
1481
|
+
const h = [Fe.bind(this), void 0];
|
|
1482
|
+
for (h.unshift.apply(h, l), h.push.apply(h, p), y = h.length, f = Promise.resolve(n); c < y; )
|
|
1483
|
+
f = f.then(h[c++], h[c++]);
|
|
1484
|
+
return f;
|
|
1373
1485
|
}
|
|
1374
|
-
y =
|
|
1375
|
-
let
|
|
1376
|
-
for (
|
|
1377
|
-
const
|
|
1486
|
+
y = l.length;
|
|
1487
|
+
let E = n;
|
|
1488
|
+
for (c = 0; c < y; ) {
|
|
1489
|
+
const h = l[c++], d = l[c++];
|
|
1378
1490
|
try {
|
|
1379
|
-
|
|
1380
|
-
} catch (
|
|
1381
|
-
|
|
1491
|
+
E = h(E);
|
|
1492
|
+
} catch (b) {
|
|
1493
|
+
d.call(this, b);
|
|
1382
1494
|
break;
|
|
1383
1495
|
}
|
|
1384
1496
|
}
|
|
1385
1497
|
try {
|
|
1386
|
-
|
|
1387
|
-
} catch (
|
|
1388
|
-
return Promise.reject(
|
|
1498
|
+
f = Fe.call(this, E);
|
|
1499
|
+
} catch (h) {
|
|
1500
|
+
return Promise.reject(h);
|
|
1389
1501
|
}
|
|
1390
|
-
for (
|
|
1391
|
-
|
|
1392
|
-
return
|
|
1502
|
+
for (c = 0, y = p.length; c < y; )
|
|
1503
|
+
f = f.then(p[c++], p[c++]);
|
|
1504
|
+
return f;
|
|
1393
1505
|
}
|
|
1394
1506
|
getUri(t) {
|
|
1395
|
-
t =
|
|
1396
|
-
const n =
|
|
1397
|
-
return
|
|
1507
|
+
t = C(this.defaults, t);
|
|
1508
|
+
const n = tt(t.baseURL, t.url);
|
|
1509
|
+
return Ge(n, t.params, t.paramsSerializer);
|
|
1398
1510
|
}
|
|
1399
1511
|
}
|
|
1400
1512
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1401
|
-
|
|
1402
|
-
return this.request(
|
|
1513
|
+
J.prototype[t] = function(n, r) {
|
|
1514
|
+
return this.request(C(r || {}, {
|
|
1403
1515
|
method: t,
|
|
1404
1516
|
url: n,
|
|
1405
1517
|
data: (r || {}).data
|
|
@@ -1408,8 +1520,8 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1408
1520
|
});
|
|
1409
1521
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1410
1522
|
function n(r) {
|
|
1411
|
-
return function(o, i,
|
|
1412
|
-
return this.request(
|
|
1523
|
+
return function(o, i, l) {
|
|
1524
|
+
return this.request(C(l || {}, {
|
|
1413
1525
|
method: t,
|
|
1414
1526
|
headers: r ? {
|
|
1415
1527
|
"Content-Type": "multipart/form-data"
|
|
@@ -1419,10 +1531,10 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1419
1531
|
}));
|
|
1420
1532
|
};
|
|
1421
1533
|
}
|
|
1422
|
-
|
|
1534
|
+
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
1423
1535
|
});
|
|
1424
|
-
const
|
|
1425
|
-
class
|
|
1536
|
+
const $ = J;
|
|
1537
|
+
class me {
|
|
1426
1538
|
constructor(t) {
|
|
1427
1539
|
if (typeof t != "function")
|
|
1428
1540
|
throw new TypeError("executor must be a function.");
|
|
@@ -1440,14 +1552,14 @@ class de {
|
|
|
1440
1552
|
r._listeners = null;
|
|
1441
1553
|
}), this.promise.then = (s) => {
|
|
1442
1554
|
let o;
|
|
1443
|
-
const i = new Promise((
|
|
1444
|
-
r.subscribe(
|
|
1555
|
+
const i = new Promise((l) => {
|
|
1556
|
+
r.subscribe(l), o = l;
|
|
1445
1557
|
}).then(s);
|
|
1446
1558
|
return i.cancel = function() {
|
|
1447
1559
|
r.unsubscribe(o);
|
|
1448
1560
|
}, i;
|
|
1449
|
-
}, t(function(o, i,
|
|
1450
|
-
r.reason || (r.reason = new
|
|
1561
|
+
}, t(function(o, i, l) {
|
|
1562
|
+
r.reason || (r.reason = new v(o, i, l), n(r.reason));
|
|
1451
1563
|
});
|
|
1452
1564
|
}
|
|
1453
1565
|
/**
|
|
@@ -1483,23 +1595,23 @@ class de {
|
|
|
1483
1595
|
static source() {
|
|
1484
1596
|
let t;
|
|
1485
1597
|
return {
|
|
1486
|
-
token: new
|
|
1598
|
+
token: new me(function(s) {
|
|
1487
1599
|
t = s;
|
|
1488
1600
|
}),
|
|
1489
1601
|
cancel: t
|
|
1490
1602
|
};
|
|
1491
1603
|
}
|
|
1492
1604
|
}
|
|
1493
|
-
const
|
|
1494
|
-
function
|
|
1605
|
+
const Jn = me;
|
|
1606
|
+
function Wn(e) {
|
|
1495
1607
|
return function(n) {
|
|
1496
1608
|
return e.apply(null, n);
|
|
1497
1609
|
};
|
|
1498
1610
|
}
|
|
1499
|
-
function
|
|
1611
|
+
function Kn(e) {
|
|
1500
1612
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1501
1613
|
}
|
|
1502
|
-
const
|
|
1614
|
+
const le = {
|
|
1503
1615
|
Continue: 100,
|
|
1504
1616
|
SwitchingProtocols: 101,
|
|
1505
1617
|
Processing: 102,
|
|
@@ -1564,154 +1676,159 @@ const oe = {
|
|
|
1564
1676
|
NotExtended: 510,
|
|
1565
1677
|
NetworkAuthenticationRequired: 511
|
|
1566
1678
|
};
|
|
1567
|
-
Object.entries(
|
|
1568
|
-
|
|
1679
|
+
Object.entries(le).forEach(([e, t]) => {
|
|
1680
|
+
le[t] = e;
|
|
1569
1681
|
});
|
|
1570
|
-
const
|
|
1571
|
-
function
|
|
1572
|
-
const t = new
|
|
1573
|
-
return a.extend(n,
|
|
1574
|
-
return
|
|
1682
|
+
const Xn = le;
|
|
1683
|
+
function st(e) {
|
|
1684
|
+
const t = new $(e), n = ve($.prototype.request, t);
|
|
1685
|
+
return a.extend(n, $.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1686
|
+
return st(C(e, s));
|
|
1575
1687
|
}, n;
|
|
1576
1688
|
}
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1689
|
+
const R = st(pe);
|
|
1690
|
+
R.Axios = $;
|
|
1691
|
+
R.CanceledError = v;
|
|
1692
|
+
R.CancelToken = Jn;
|
|
1693
|
+
R.isCancel = et;
|
|
1694
|
+
R.VERSION = rt;
|
|
1695
|
+
R.toFormData = G;
|
|
1696
|
+
R.AxiosError = m;
|
|
1697
|
+
R.Cancel = R.CanceledError;
|
|
1698
|
+
R.all = function(t) {
|
|
1587
1699
|
return Promise.all(t);
|
|
1588
1700
|
};
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1701
|
+
R.spread = Wn;
|
|
1702
|
+
R.isAxiosError = Kn;
|
|
1703
|
+
R.mergeConfig = C;
|
|
1704
|
+
R.AxiosHeaders = T;
|
|
1705
|
+
R.formToJSON = (e) => Ye(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1706
|
+
R.getAdapter = nt.getAdapter;
|
|
1707
|
+
R.HttpStatusCode = Xn;
|
|
1708
|
+
R.default = R;
|
|
1709
|
+
const Gn = R, Qn = { class: "file-viewer" }, Zn = { class: "name" }, Yn = {
|
|
1597
1710
|
key: 0,
|
|
1598
1711
|
class: "content loading"
|
|
1599
|
-
},
|
|
1712
|
+
}, er = /* @__PURE__ */ Ue({
|
|
1600
1713
|
__name: "FileViewer",
|
|
1601
1714
|
props: {
|
|
1602
|
-
file:
|
|
1603
|
-
url:
|
|
1715
|
+
file: {},
|
|
1716
|
+
url: {}
|
|
1604
1717
|
},
|
|
1605
1718
|
setup(e) {
|
|
1606
|
-
const t = e, n =
|
|
1719
|
+
const t = e, n = B(!1), r = B(""), s = B(""), o = B(""), i = B();
|
|
1607
1720
|
return (() => {
|
|
1608
|
-
const
|
|
1721
|
+
const l = {
|
|
1609
1722
|
loading: "正在加载中,请耐心等待...",
|
|
1610
1723
|
reading: "正在努力解析文件...",
|
|
1611
|
-
errorLoading: (
|
|
1612
|
-
errorReading: (
|
|
1724
|
+
errorLoading: (c) => `加载文件异常:${c}`,
|
|
1725
|
+
errorReading: (c) => `读取文件异常:${c}`
|
|
1613
1726
|
};
|
|
1614
|
-
let
|
|
1615
|
-
const
|
|
1727
|
+
let u;
|
|
1728
|
+
const p = {
|
|
1616
1729
|
// 从url加载
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1730
|
+
loadFromUrl() {
|
|
1731
|
+
return w(this, null, function* () {
|
|
1732
|
+
const { url: c } = t;
|
|
1733
|
+
if (!c)
|
|
1734
|
+
return;
|
|
1735
|
+
this.startLoading(l.loading);
|
|
1736
|
+
const y = c.substring(c.lastIndexOf("/") + 1);
|
|
1737
|
+
try {
|
|
1738
|
+
const { data: E } = yield Gn({ url: c, method: "get", responseType: "blob" });
|
|
1739
|
+
if (!E)
|
|
1740
|
+
return this.showError("文件下载失败");
|
|
1741
|
+
const h = this.wrap(E, y);
|
|
1742
|
+
return this.resolveFile(h);
|
|
1743
|
+
} catch (E) {
|
|
1744
|
+
this.showError(l.errorLoading(E));
|
|
1745
|
+
} finally {
|
|
1746
|
+
this.endLoading();
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1634
1749
|
},
|
|
1635
1750
|
// 包装file
|
|
1636
|
-
wrap(
|
|
1637
|
-
if (
|
|
1638
|
-
return
|
|
1639
|
-
if (
|
|
1640
|
-
return new File([
|
|
1641
|
-
if (
|
|
1642
|
-
return this.wrap(new Blob([
|
|
1751
|
+
wrap(c, y) {
|
|
1752
|
+
if (c instanceof File)
|
|
1753
|
+
return c;
|
|
1754
|
+
if (c instanceof Blob && y)
|
|
1755
|
+
return new File([c], y, {});
|
|
1756
|
+
if (c instanceof ArrayBuffer)
|
|
1757
|
+
return this.wrap(new Blob([c]));
|
|
1643
1758
|
throw new Error("不支持的文件类型格式!");
|
|
1644
1759
|
},
|
|
1645
1760
|
// 处理并解析文件
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1761
|
+
resolveFile(c) {
|
|
1762
|
+
return w(this, null, function* () {
|
|
1763
|
+
n.value && this.endLoading();
|
|
1764
|
+
const y = this.wrap(c);
|
|
1765
|
+
this.startLoading(l.reading);
|
|
1766
|
+
try {
|
|
1767
|
+
o.value = y.name && decodeURIComponent(y.name) || "";
|
|
1768
|
+
const E = yield Et(y);
|
|
1769
|
+
E instanceof ArrayBuffer && (u = yield this.displayResult(E, y));
|
|
1770
|
+
} catch (E) {
|
|
1771
|
+
console.error(E), this.showError(l.errorReading(E));
|
|
1772
|
+
} finally {
|
|
1773
|
+
this.endLoading();
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1659
1776
|
},
|
|
1660
1777
|
// 展示渲染最终效果
|
|
1661
|
-
displayResult(
|
|
1662
|
-
const { name:
|
|
1663
|
-
if (!
|
|
1778
|
+
displayResult(c, y) {
|
|
1779
|
+
const { name: E } = y, h = Nt(E), d = i.value;
|
|
1780
|
+
if (!d)
|
|
1664
1781
|
return Promise.resolve();
|
|
1665
|
-
|
|
1666
|
-
const
|
|
1667
|
-
|
|
1668
|
-
const
|
|
1669
|
-
return new Promise((
|
|
1782
|
+
u && (d.lastChild && d.removeChild(d.lastChild), u.unmount());
|
|
1783
|
+
const b = document.createElement("div");
|
|
1784
|
+
b.className = "file-render";
|
|
1785
|
+
const S = d.appendChild(b);
|
|
1786
|
+
return new Promise((O, x) => Ft(c, h, S).then(O).catch(x));
|
|
1670
1787
|
},
|
|
1671
|
-
showError(
|
|
1672
|
-
r.value =
|
|
1788
|
+
showError(c) {
|
|
1789
|
+
r.value = c;
|
|
1673
1790
|
},
|
|
1674
|
-
startLoading(
|
|
1675
|
-
n.value = !0, s.value =
|
|
1791
|
+
startLoading(c) {
|
|
1792
|
+
n.value = !0, s.value = c, r.value = "";
|
|
1676
1793
|
},
|
|
1677
1794
|
endLoading() {
|
|
1678
1795
|
n.value = !1, s.value = "";
|
|
1679
1796
|
}
|
|
1680
1797
|
};
|
|
1681
|
-
|
|
1682
|
-
t.file &&
|
|
1683
|
-
}),
|
|
1684
|
-
})(), (
|
|
1685
|
-
|
|
1686
|
-
r.value ? (
|
|
1687
|
-
|
|
1688
|
-
[
|
|
1798
|
+
lt(() => {
|
|
1799
|
+
t.file && p.resolveFile(t.file), p.loadFromUrl();
|
|
1800
|
+
}), Ee(() => t.url, () => p.loadFromUrl()), Ee(() => t.file, (c) => c && p.resolveFile(c));
|
|
1801
|
+
})(), (l, u) => (H(), M("div", Qn, [
|
|
1802
|
+
ee("div", Zn, q(o.value), 1),
|
|
1803
|
+
r.value ? (H(), M("div", Yn, q(r.value), 1)) : (H(), M(ut, { key: 1 }, [
|
|
1804
|
+
be(ee("div", { class: "content loading" }, q(s.value), 513), [
|
|
1805
|
+
[Re, n.value]
|
|
1689
1806
|
]),
|
|
1690
|
-
|
|
1807
|
+
be(ee("div", {
|
|
1691
1808
|
class: "content",
|
|
1692
1809
|
ref_key: "output",
|
|
1693
1810
|
ref: i
|
|
1694
1811
|
}, null, 512), [
|
|
1695
|
-
[
|
|
1812
|
+
[Re, !n.value]
|
|
1696
1813
|
])
|
|
1697
1814
|
], 64))
|
|
1698
1815
|
]));
|
|
1699
1816
|
}
|
|
1700
1817
|
});
|
|
1701
|
-
const
|
|
1702
|
-
["file-viewer",
|
|
1818
|
+
const tr = /* @__PURE__ */ ke(er, [["__scopeId", "data-v-4732f9f2"]]), nr = [
|
|
1819
|
+
["file-viewer", tr]
|
|
1703
1820
|
];
|
|
1704
|
-
class
|
|
1821
|
+
class rr {
|
|
1705
1822
|
constructor() {
|
|
1706
|
-
|
|
1823
|
+
we(this, "installed", !1);
|
|
1707
1824
|
}
|
|
1708
1825
|
install(t) {
|
|
1709
|
-
this.installed || (
|
|
1826
|
+
this.installed || (nr.forEach(([n, r]) => t.component(n, r)), this.installed = !0);
|
|
1710
1827
|
}
|
|
1711
1828
|
}
|
|
1712
|
-
const
|
|
1829
|
+
const ir = new rr();
|
|
1713
1830
|
export {
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1831
|
+
tr as F,
|
|
1832
|
+
ke as _,
|
|
1833
|
+
ir as i
|
|
1717
1834
|
};
|