yahee-components 0.0.65 → 0.0.66
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/es/api/server.js +2 -2
- package/es/api/tool.js +1 -1
- package/es/complex-search/complex-search.vue.js +27 -23
- package/es/complex-search/props.js +6 -4
- package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/adapters/fetch.js +29 -29
- package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/Axios.js +1 -1
- package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosHeaders.js +181 -0
- package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/env/data.js +1 -1
- package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/toFormData.js +16 -14
- package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/utils.js +222 -0
- package/es/node_modules/.pnpm/{element-plus@2.9.7_vue@3.5.13_typescript@5.8.3_ → element-plus@2.10.2_vue@3.5.17_typescript@5.8.3_}/node_modules/element-plus/es/locale/lang/zh-cn.js +1 -1
- package/es/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js +526 -526
- package/es/packages/components/api/log-server.js +2 -2
- package/es/packages/components/api/server.js +2 -2
- package/es/packages/components/api/tool.js +1 -1
- package/es/packages/components/api/upload-server.js +2 -2
- package/es/utils/translate.js +2 -2
- package/package.json +1 -3
- package/types/src/annex-upload/annex-upload.vue.d.ts +649 -435
- package/types/src/annex-upload/index.d.ts +321 -214
- package/types/src/complex-search/props.d.ts +11 -3
- package/types/src/drop-down-condition/drop-down-condition.vue.d.ts +264 -55
- package/types/src/drop-down-condition/index.d.ts +264 -55
- package/types/src/input/index.d.ts +189 -62
- package/types/src/input/input.vue.d.ts +189 -62
- package/types/src/operation-log/index.d.ts +199 -55
- package/types/src/operation-log/operation-log.vue.d.ts +199 -55
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosHeaders.js +0 -173
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/utils.js +0 -221
- package/types/src/complex-search/complex-search.vue.d.ts +0 -208
- package/types/src/complex-search/index.d.ts +0 -212
- package/types/src/installs.d.ts +0 -1863
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/index.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/adapters/adapters.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/adapters/xhr.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/axios.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/cancel/CancelToken.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/cancel/CanceledError.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/cancel/isCancel.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/AxiosError.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/InterceptorManager.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/buildFullPath.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/dispatchRequest.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/mergeConfig.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/settle.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/core/transformData.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/defaults/index.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/defaults/transitional.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/bind.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/buildURL.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/combineURLs.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/composeSignals.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/cookies.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/formDataToJSON.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/isAxiosError.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/null.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/parseHeaders.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/parseProtocol.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/progressEventReducer.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/resolveConfig.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/speedometer.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/spread.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/throttle.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/trackStream.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/helpers/validator.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/platform/browser/index.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/platform/common/utils.js +0 -0
- /package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/platform/index.js +0 -0
package/es/api/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../node_modules/.pnpm/axios@1.
|
|
1
|
+
import "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js";
|
|
2
2
|
import { handleChangeRequestHeader as s, handleConfigureAuth as d, handleAuthError as u, handleGeneralError as i, handleNetworkError as h } from "./tool.js";
|
|
3
|
-
import n from "../node_modules/.pnpm/axios@1.
|
|
3
|
+
import n from "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js";
|
|
4
4
|
n.interceptors.request.use((t) => {
|
|
5
5
|
let e = s(t);
|
|
6
6
|
return e = d(e), e;
|
package/es/api/tool.js
CHANGED
|
@@ -6,7 +6,7 @@ import "element-plus/theme-chalk/src/message-box.scss";
|
|
|
6
6
|
import "element-plus/theme-chalk/src/button.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/input.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
9
|
-
import { AxiosHeaders as l } from "../node_modules/.pnpm/axios@1.
|
|
9
|
+
import { AxiosHeaders as l } from "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js";
|
|
10
10
|
const w = (e) => ({
|
|
11
11
|
...e,
|
|
12
12
|
timeout: 2e4
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as ue, mergeDefaults as ne, toRefs as ce, ref as p, createBlock as d, openBlock as n, unref as a, withCtx as t, createElementVNode as x, createVNode as o, withKeys as ie, createSlots as pe, createElementBlock as y, Fragment as b, renderList as S, createCommentVNode as P, createTextVNode as C, toDisplayString as g } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import _ from "../_virtual/lodash.js";
|
|
3
3
|
import { defaultComplexSearchProps as de } from "./props.js";
|
|
4
4
|
import { ElConfigProvider as me, ElInput as U, ElIcon as he, ElSelect as V, ElOption as k, ElCheckbox as fe, ElLink as ve, ElDialog as ye, ElForm as be, ElRow as L, ElFormItem as R, ElButton as z } from "element-plus";
|
|
5
5
|
import "element-plus/theme-chalk/src/base.scss";
|
|
@@ -20,7 +20,7 @@ import "element-plus/theme-chalk/src/button.scss";
|
|
|
20
20
|
import "element-plus/theme-chalk/src/link.scss";
|
|
21
21
|
import "element-plus/theme-chalk/src/config-provider.scss";
|
|
22
22
|
import { Search as Se } from "@element-plus/icons-vue";
|
|
23
|
-
import Ce from "../node_modules/.pnpm/element-plus@2.
|
|
23
|
+
import Ce from "../node_modules/.pnpm/element-plus@2.10.2_vue@3.5.17_typescript@5.8.3_/node_modules/element-plus/es/locale/lang/zh-cn.js";
|
|
24
24
|
const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbox" }, ke = { class: "dialog-footer" }, Ye = /* @__PURE__ */ ue({
|
|
25
25
|
name: "YaheeComplexSearch",
|
|
26
26
|
__name: "complex-search",
|
|
@@ -42,20 +42,20 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
42
42
|
setup(G, { emit: H }) {
|
|
43
43
|
const N = Ce, h = H, A = G, {
|
|
44
44
|
defaultSearch: q,
|
|
45
|
-
options:
|
|
45
|
+
options: T,
|
|
46
46
|
showPatchSearch: X,
|
|
47
|
-
specialOptions:
|
|
47
|
+
specialOptions: O,
|
|
48
48
|
showWithinFilterCheckbox: Y,
|
|
49
49
|
placeholderText: j,
|
|
50
50
|
normalOptions: J,
|
|
51
|
-
showSelect:
|
|
51
|
+
showSelect: F,
|
|
52
52
|
searchItem: c,
|
|
53
53
|
isBatchSelectOptionsSameWithInput: M,
|
|
54
54
|
batchOptions: Q
|
|
55
|
-
} = ce(A), u = p(q.value || "WHOLE_SEARCH"), m = p(""), f = p(!1), E = p(!1), v = p(!1),
|
|
55
|
+
} = ce(A), u = p(q.value || "WHOLE_SEARCH"), m = p(""), f = p(!1), E = p(!1), v = p(!1), B = p(null), s = p({ searchType: "WHOLE_SEARCH", searchContent: "" }), Z = {
|
|
56
56
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
57
57
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
58
|
-
},
|
|
58
|
+
}, I = [
|
|
59
59
|
{
|
|
60
60
|
value: "WHOLE_SEARCH",
|
|
61
61
|
label: "综合搜索"
|
|
@@ -70,13 +70,13 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
70
70
|
m.value ? re() : h("filterChangeGrandson", le(), u.value);
|
|
71
71
|
}, ae = (r, l) => {
|
|
72
72
|
const e = { ...r };
|
|
73
|
-
return
|
|
73
|
+
return _.map(O.value, (i) => i.key).includes(l.filterKey) ? O.value.forEach((i) => delete e[i.key]) : delete e[l.filterKey], e;
|
|
74
74
|
};
|
|
75
75
|
function W(r) {
|
|
76
|
-
|
|
76
|
+
_.forEach(r, (l) => {
|
|
77
77
|
ae(c.value, l);
|
|
78
78
|
const { checkedValues: e, filterKey: i } = l;
|
|
79
|
-
|
|
79
|
+
_.isEmpty(e) || (J.value.includes(i) ? c.value[i] = e[0] : c.value[i] = e);
|
|
80
80
|
}), h("filterChangeGrandson", c.value, u.value);
|
|
81
81
|
}
|
|
82
82
|
const te = (r) => {
|
|
@@ -107,7 +107,7 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
107
107
|
u.value
|
|
108
108
|
);
|
|
109
109
|
}, se = () => {
|
|
110
|
-
|
|
110
|
+
B.value.validate((r) => {
|
|
111
111
|
r && (E.value = !0, f.value ? W([
|
|
112
112
|
{
|
|
113
113
|
filterKey: "putSearch",
|
|
@@ -157,7 +157,7 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
157
157
|
]),
|
|
158
158
|
_: 2
|
|
159
159
|
}, [
|
|
160
|
-
a(
|
|
160
|
+
a(F) ? {
|
|
161
161
|
name: "prepend",
|
|
162
162
|
fn: t(() => [
|
|
163
163
|
o(a(V), {
|
|
@@ -167,7 +167,7 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
167
167
|
class: "custom-select"
|
|
168
168
|
}, {
|
|
169
169
|
default: t(() => [
|
|
170
|
-
(n(!0), y(b, null, S(a(
|
|
170
|
+
(n(!0), y(b, null, S(a(T), (e) => (n(), d(a(k), {
|
|
171
171
|
key: e.label,
|
|
172
172
|
label: e.label,
|
|
173
173
|
value: e.value
|
|
@@ -188,7 +188,7 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
188
188
|
disabled: ""
|
|
189
189
|
}, {
|
|
190
190
|
default: t(() => [
|
|
191
|
-
(n(), y(b, null, S(
|
|
191
|
+
(n(), y(b, null, S(I, (e) => o(a(k), {
|
|
192
192
|
key: e.label,
|
|
193
193
|
label: e.label,
|
|
194
194
|
value: e.value
|
|
@@ -208,9 +208,10 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
208
208
|
onChange: ee
|
|
209
209
|
}, {
|
|
210
210
|
default: t(() => l[8] || (l[8] = [
|
|
211
|
-
C(g("在筛选条件内查询"))
|
|
211
|
+
C(g("在筛选条件内查询1"))
|
|
212
212
|
])),
|
|
213
|
-
_: 1
|
|
213
|
+
_: 1,
|
|
214
|
+
__: [8]
|
|
214
215
|
}, 8, ["modelValue"])) : P("", !0),
|
|
215
216
|
a(X) ? (n(), d(a(ve), {
|
|
216
217
|
key: 1,
|
|
@@ -220,7 +221,8 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
220
221
|
default: t(() => l[9] || (l[9] = [
|
|
221
222
|
C(g("批量查询"))
|
|
222
223
|
])),
|
|
223
|
-
_: 1
|
|
224
|
+
_: 1,
|
|
225
|
+
__: [9]
|
|
224
226
|
})) : P("", !0)
|
|
225
227
|
])
|
|
226
228
|
]),
|
|
@@ -243,20 +245,22 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
243
245
|
default: t(() => l[10] || (l[10] = [
|
|
244
246
|
C(g("确认"))
|
|
245
247
|
])),
|
|
246
|
-
_: 1
|
|
248
|
+
_: 1,
|
|
249
|
+
__: [10]
|
|
247
250
|
}, 8, ["loading"]),
|
|
248
251
|
o(a(z), { onClick: K }, {
|
|
249
252
|
default: t(() => l[11] || (l[11] = [
|
|
250
253
|
C(g("关闭"))
|
|
251
254
|
])),
|
|
252
|
-
_: 1
|
|
255
|
+
_: 1,
|
|
256
|
+
__: [11]
|
|
253
257
|
})
|
|
254
258
|
])
|
|
255
259
|
]),
|
|
256
260
|
default: t(() => [
|
|
257
261
|
o(a(be), {
|
|
258
262
|
ref_key: "batchSearchFormRef",
|
|
259
|
-
ref:
|
|
263
|
+
ref: B,
|
|
260
264
|
model: s.value,
|
|
261
265
|
rules: Z
|
|
262
266
|
}, {
|
|
@@ -265,7 +269,7 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
265
269
|
default: t(() => [
|
|
266
270
|
o(a(R), { prop: "searchType" }, {
|
|
267
271
|
default: t(() => [
|
|
268
|
-
a(
|
|
272
|
+
a(F) ? (n(), d(a(V), {
|
|
269
273
|
key: 0,
|
|
270
274
|
modelValue: s.value.searchType,
|
|
271
275
|
"onUpdate:modelValue": l[4] || (l[4] = (e) => s.value.searchType = e),
|
|
@@ -273,7 +277,7 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
273
277
|
style: { width: "100px", "background-color": "white" }
|
|
274
278
|
}, {
|
|
275
279
|
default: t(() => [
|
|
276
|
-
(n(!0), y(b, null, S(a(M) ? a(
|
|
280
|
+
(n(!0), y(b, null, S(a(M) ? a(T) : a(Q), (e) => (n(), d(a(k), {
|
|
277
281
|
key: e.label,
|
|
278
282
|
label: e.label,
|
|
279
283
|
value: e.value
|
|
@@ -289,7 +293,7 @@ const ge = { class: "yahee-complex-search" }, Ve = { class: "search-type-checkbo
|
|
|
289
293
|
disabled: ""
|
|
290
294
|
}, {
|
|
291
295
|
default: t(() => [
|
|
292
|
-
(n(), y(b, null, S(
|
|
296
|
+
(n(), y(b, null, S(I, (e) => o(a(k), {
|
|
293
297
|
key: e.label,
|
|
294
298
|
label: e.label,
|
|
295
299
|
value: e.value
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
function e() {
|
|
2
2
|
return {
|
|
3
|
-
defaultSearch: "",
|
|
4
3
|
pasteFormat: () => {
|
|
5
4
|
},
|
|
5
|
+
defaultSearch: "integrated",
|
|
6
6
|
options: () => [],
|
|
7
|
+
placeholderText: "",
|
|
7
8
|
showPatchSearch: !1,
|
|
8
|
-
specialOptions: () => [],
|
|
9
9
|
showWithinFilterCheckbox: !1,
|
|
10
|
-
|
|
10
|
+
specialOptions: () => [],
|
|
11
11
|
normalOptions: () => [],
|
|
12
12
|
showSelect: !1,
|
|
13
|
-
searchItem: () => ({})
|
|
13
|
+
searchItem: () => ({}),
|
|
14
|
+
isBatchSelectOptionsSameWithInput: !0,
|
|
15
|
+
batchOptions: () => []
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
export {
|
package/es/node_modules/.pnpm/{axios@1.8.4 → axios@1.10.0}/node_modules/axios/lib/adapters/fetch.js
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import D from "../platform/index.js";
|
|
2
2
|
import r from "../utils.js";
|
|
3
3
|
import l from "../core/AxiosError.js";
|
|
4
4
|
import H from "../helpers/composeSignals.js";
|
|
5
|
-
import { trackStream as
|
|
5
|
+
import { trackStream as P } from "../helpers/trackStream.js";
|
|
6
6
|
import K from "../core/AxiosHeaders.js";
|
|
7
|
-
import { progressEventDecorator as
|
|
7
|
+
import { progressEventDecorator as A, progressEventReducer as O, asyncDecorator as _ } from "../helpers/progressEventReducer.js";
|
|
8
8
|
import z from "../helpers/resolveConfig.js";
|
|
9
9
|
import j from "../core/settle.js";
|
|
10
|
-
const w = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
10
|
+
const w = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", F = w && typeof ReadableStream == "function", I = w && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), N = (e, ...t) => {
|
|
11
11
|
try {
|
|
12
12
|
return !!e(...t);
|
|
13
13
|
} catch {
|
|
14
14
|
return !1;
|
|
15
15
|
}
|
|
16
|
-
}, J =
|
|
16
|
+
}, J = F && N(() => {
|
|
17
17
|
let e = !1;
|
|
18
|
-
const t = new Request(
|
|
18
|
+
const t = new Request(D.origin, {
|
|
19
19
|
body: new ReadableStream(),
|
|
20
20
|
method: "POST",
|
|
21
21
|
get duplex() {
|
|
@@ -23,7 +23,7 @@ const w = typeof fetch == "function" && typeof Request == "function" && typeof R
|
|
|
23
23
|
}
|
|
24
24
|
}).headers.has("Content-Type");
|
|
25
25
|
return e && !t;
|
|
26
|
-
}),
|
|
26
|
+
}), B = 64 * 1024, T = F && N(() => r.isReadableStream(new Response("").body)), g = {
|
|
27
27
|
stream: T && ((e) => e.body)
|
|
28
28
|
};
|
|
29
29
|
w && ((e) => {
|
|
@@ -39,7 +39,7 @@ const V = async (e) => {
|
|
|
39
39
|
if (r.isBlob(e))
|
|
40
40
|
return e.size;
|
|
41
41
|
if (r.isSpecCompliantForm(e))
|
|
42
|
-
return (await new Request(
|
|
42
|
+
return (await new Request(D.origin, {
|
|
43
43
|
method: "POST",
|
|
44
44
|
body: e
|
|
45
45
|
}).arrayBuffer()).byteLength;
|
|
@@ -55,41 +55,41 @@ const V = async (e) => {
|
|
|
55
55
|
url: t,
|
|
56
56
|
method: s,
|
|
57
57
|
data: u,
|
|
58
|
-
signal:
|
|
58
|
+
signal: U,
|
|
59
59
|
cancelToken: x,
|
|
60
|
-
timeout:
|
|
60
|
+
timeout: v,
|
|
61
61
|
onDownloadProgress: R,
|
|
62
62
|
onUploadProgress: b,
|
|
63
63
|
responseType: n,
|
|
64
64
|
headers: y,
|
|
65
65
|
withCredentials: m = "same-origin",
|
|
66
|
-
fetchOptions:
|
|
66
|
+
fetchOptions: E
|
|
67
67
|
} = z(e);
|
|
68
68
|
n = n ? (n + "").toLowerCase() : "text";
|
|
69
|
-
let d = H([
|
|
69
|
+
let d = H([U, x && x.toAbortSignal()], v), f;
|
|
70
70
|
const c = d && d.unsubscribe && (() => {
|
|
71
71
|
d.unsubscribe();
|
|
72
72
|
});
|
|
73
|
-
let
|
|
73
|
+
let C;
|
|
74
74
|
try {
|
|
75
|
-
if (b && J && s !== "get" && s !== "head" && (
|
|
75
|
+
if (b && J && s !== "get" && s !== "head" && (C = await W(y, u)) !== 0) {
|
|
76
76
|
let i = new Request(t, {
|
|
77
77
|
method: "POST",
|
|
78
78
|
body: u,
|
|
79
79
|
duplex: "half"
|
|
80
80
|
}), p;
|
|
81
81
|
if (r.isFormData(u) && (p = i.headers.get("content-type")) && y.setContentType(p), i.body) {
|
|
82
|
-
const [S, h] =
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
const [S, h] = A(
|
|
83
|
+
C,
|
|
84
|
+
O(_(b))
|
|
85
85
|
);
|
|
86
|
-
u =
|
|
86
|
+
u = P(i.body, B, S, h);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
r.isString(m) || (m = m ? "include" : "omit");
|
|
90
90
|
const o = "credentials" in Request.prototype;
|
|
91
91
|
f = new Request(t, {
|
|
92
|
-
...
|
|
92
|
+
...E,
|
|
93
93
|
signal: d,
|
|
94
94
|
method: s.toUpperCase(),
|
|
95
95
|
headers: y.normalize().toJSON(),
|
|
@@ -97,19 +97,19 @@ const V = async (e) => {
|
|
|
97
97
|
duplex: "half",
|
|
98
98
|
credentials: o ? m : void 0
|
|
99
99
|
});
|
|
100
|
-
let a = await fetch(f);
|
|
101
|
-
const
|
|
102
|
-
if (T && (R ||
|
|
100
|
+
let a = await fetch(f, E);
|
|
101
|
+
const q = T && (n === "stream" || n === "response");
|
|
102
|
+
if (T && (R || q && c)) {
|
|
103
103
|
const i = {};
|
|
104
|
-
["status", "statusText", "headers"].forEach((
|
|
105
|
-
i[
|
|
104
|
+
["status", "statusText", "headers"].forEach((L) => {
|
|
105
|
+
i[L] = a[L];
|
|
106
106
|
});
|
|
107
|
-
const p = r.toFiniteNumber(a.headers.get("content-length")), [S, h] = R &&
|
|
107
|
+
const p = r.toFiniteNumber(a.headers.get("content-length")), [S, h] = R && A(
|
|
108
108
|
p,
|
|
109
|
-
|
|
109
|
+
O(_(R), !0)
|
|
110
110
|
) || [];
|
|
111
111
|
a = new Response(
|
|
112
|
-
|
|
112
|
+
P(a.body, B, S, () => {
|
|
113
113
|
h && h(), c && c();
|
|
114
114
|
}),
|
|
115
115
|
i
|
|
@@ -117,7 +117,7 @@ const V = async (e) => {
|
|
|
117
117
|
}
|
|
118
118
|
n = n || "text";
|
|
119
119
|
let k = await g[r.findKey(g, n) || "text"](a, e);
|
|
120
|
-
return !
|
|
120
|
+
return !q && c && c(), await new Promise((i, p) => {
|
|
121
121
|
j(i, p, {
|
|
122
122
|
data: k,
|
|
123
123
|
headers: K.from(a.headers),
|
|
@@ -128,7 +128,7 @@ const V = async (e) => {
|
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
130
|
} catch (o) {
|
|
131
|
-
throw c && c(), o && o.name === "TypeError" && /fetch/i.test(o.message) ? Object.assign(
|
|
131
|
+
throw c && c(), o && o.name === "TypeError" && /Load failed|fetch/i.test(o.message) ? Object.assign(
|
|
132
132
|
new l("Network Error", l.ERR_NETWORK, e, f),
|
|
133
133
|
{
|
|
134
134
|
cause: o.cause || o
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import i from "../utils.js";
|
|
2
|
+
import S from "../helpers/parseHeaders.js";
|
|
3
|
+
const h = Symbol("internals");
|
|
4
|
+
function y(r) {
|
|
5
|
+
return r && String(r).trim().toLowerCase();
|
|
6
|
+
}
|
|
7
|
+
function m(r) {
|
|
8
|
+
return r === !1 || r == null ? r : i.isArray(r) ? r.map(m) : String(r);
|
|
9
|
+
}
|
|
10
|
+
function A(r) {
|
|
11
|
+
const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
12
|
+
let s;
|
|
13
|
+
for (; s = e.exec(r); )
|
|
14
|
+
t[s[1]] = s[2];
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
const k = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
|
|
18
|
+
function g(r, t, e, s, n) {
|
|
19
|
+
if (i.isFunction(s))
|
|
20
|
+
return s.call(this, t, e);
|
|
21
|
+
if (n && (t = e), !!i.isString(t)) {
|
|
22
|
+
if (i.isString(s))
|
|
23
|
+
return t.indexOf(s) !== -1;
|
|
24
|
+
if (i.isRegExp(s))
|
|
25
|
+
return s.test(t);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function E(r) {
|
|
29
|
+
return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, s) => e.toUpperCase() + s);
|
|
30
|
+
}
|
|
31
|
+
function j(r, t) {
|
|
32
|
+
const e = i.toCamelCase(" " + t);
|
|
33
|
+
["get", "set", "has"].forEach((s) => {
|
|
34
|
+
Object.defineProperty(r, s + e, {
|
|
35
|
+
value: function(n, o, f) {
|
|
36
|
+
return this[s].call(this, t, n, o, f);
|
|
37
|
+
},
|
|
38
|
+
configurable: !0
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
class b {
|
|
43
|
+
constructor(t) {
|
|
44
|
+
t && this.set(t);
|
|
45
|
+
}
|
|
46
|
+
set(t, e, s) {
|
|
47
|
+
const n = this;
|
|
48
|
+
function o(c, l, a) {
|
|
49
|
+
const u = y(l);
|
|
50
|
+
if (!u)
|
|
51
|
+
throw new Error("header name must be a non-empty string");
|
|
52
|
+
const p = i.findKey(n, u);
|
|
53
|
+
(!p || n[p] === void 0 || a === !0 || a === void 0 && n[p] !== !1) && (n[p || l] = m(c));
|
|
54
|
+
}
|
|
55
|
+
const f = (c, l) => i.forEach(c, (a, u) => o(a, u, l));
|
|
56
|
+
if (i.isPlainObject(t) || t instanceof this.constructor)
|
|
57
|
+
f(t, e);
|
|
58
|
+
else if (i.isString(t) && (t = t.trim()) && !k(t))
|
|
59
|
+
f(S(t), e);
|
|
60
|
+
else if (i.isObject(t) && i.isIterable(t)) {
|
|
61
|
+
let c = {}, l, a;
|
|
62
|
+
for (const u of t) {
|
|
63
|
+
if (!i.isArray(u))
|
|
64
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
65
|
+
c[a = u[0]] = (l = c[a]) ? i.isArray(l) ? [...l, u[1]] : [l, u[1]] : u[1];
|
|
66
|
+
}
|
|
67
|
+
f(c, e);
|
|
68
|
+
} else
|
|
69
|
+
t != null && o(e, t, s);
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
get(t, e) {
|
|
73
|
+
if (t = y(t), t) {
|
|
74
|
+
const s = i.findKey(this, t);
|
|
75
|
+
if (s) {
|
|
76
|
+
const n = this[s];
|
|
77
|
+
if (!e)
|
|
78
|
+
return n;
|
|
79
|
+
if (e === !0)
|
|
80
|
+
return A(n);
|
|
81
|
+
if (i.isFunction(e))
|
|
82
|
+
return e.call(this, n, s);
|
|
83
|
+
if (i.isRegExp(e))
|
|
84
|
+
return e.exec(n);
|
|
85
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
has(t, e) {
|
|
90
|
+
if (t = y(t), t) {
|
|
91
|
+
const s = i.findKey(this, t);
|
|
92
|
+
return !!(s && this[s] !== void 0 && (!e || g(this, this[s], s, e)));
|
|
93
|
+
}
|
|
94
|
+
return !1;
|
|
95
|
+
}
|
|
96
|
+
delete(t, e) {
|
|
97
|
+
const s = this;
|
|
98
|
+
let n = !1;
|
|
99
|
+
function o(f) {
|
|
100
|
+
if (f = y(f), f) {
|
|
101
|
+
const c = i.findKey(s, f);
|
|
102
|
+
c && (!e || g(s, s[c], c, e)) && (delete s[c], n = !0);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return i.isArray(t) ? t.forEach(o) : o(t), n;
|
|
106
|
+
}
|
|
107
|
+
clear(t) {
|
|
108
|
+
const e = Object.keys(this);
|
|
109
|
+
let s = e.length, n = !1;
|
|
110
|
+
for (; s--; ) {
|
|
111
|
+
const o = e[s];
|
|
112
|
+
(!t || g(this, this[o], o, t, !0)) && (delete this[o], n = !0);
|
|
113
|
+
}
|
|
114
|
+
return n;
|
|
115
|
+
}
|
|
116
|
+
normalize(t) {
|
|
117
|
+
const e = this, s = {};
|
|
118
|
+
return i.forEach(this, (n, o) => {
|
|
119
|
+
const f = i.findKey(s, o);
|
|
120
|
+
if (f) {
|
|
121
|
+
e[f] = m(n), delete e[o];
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const c = t ? E(o) : String(o).trim();
|
|
125
|
+
c !== o && delete e[o], e[c] = m(n), s[c] = !0;
|
|
126
|
+
}), this;
|
|
127
|
+
}
|
|
128
|
+
concat(...t) {
|
|
129
|
+
return this.constructor.concat(this, ...t);
|
|
130
|
+
}
|
|
131
|
+
toJSON(t) {
|
|
132
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
133
|
+
return i.forEach(this, (s, n) => {
|
|
134
|
+
s != null && s !== !1 && (e[n] = t && i.isArray(s) ? s.join(", ") : s);
|
|
135
|
+
}), e;
|
|
136
|
+
}
|
|
137
|
+
[Symbol.iterator]() {
|
|
138
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
139
|
+
}
|
|
140
|
+
toString() {
|
|
141
|
+
return Object.entries(this.toJSON()).map(([t, e]) => t + ": " + e).join(`
|
|
142
|
+
`);
|
|
143
|
+
}
|
|
144
|
+
getSetCookie() {
|
|
145
|
+
return this.get("set-cookie") || [];
|
|
146
|
+
}
|
|
147
|
+
get [Symbol.toStringTag]() {
|
|
148
|
+
return "AxiosHeaders";
|
|
149
|
+
}
|
|
150
|
+
static from(t) {
|
|
151
|
+
return t instanceof this ? t : new this(t);
|
|
152
|
+
}
|
|
153
|
+
static concat(t, ...e) {
|
|
154
|
+
const s = new this(t);
|
|
155
|
+
return e.forEach((n) => s.set(n)), s;
|
|
156
|
+
}
|
|
157
|
+
static accessor(t) {
|
|
158
|
+
const s = (this[h] = this[h] = {
|
|
159
|
+
accessors: {}
|
|
160
|
+
}).accessors, n = this.prototype;
|
|
161
|
+
function o(f) {
|
|
162
|
+
const c = y(f);
|
|
163
|
+
s[c] || (j(n, f), s[c] = !0);
|
|
164
|
+
}
|
|
165
|
+
return i.isArray(t) ? t.forEach(o) : o(t), this;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
b.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
169
|
+
i.reduceDescriptors(b.prototype, ({ value: r }, t) => {
|
|
170
|
+
let e = t[0].toUpperCase() + t.slice(1);
|
|
171
|
+
return {
|
|
172
|
+
get: () => r,
|
|
173
|
+
set(s) {
|
|
174
|
+
this[e] = s;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
});
|
|
178
|
+
i.freezeMethods(b);
|
|
179
|
+
export {
|
|
180
|
+
b as default
|
|
181
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "../utils.js";
|
|
2
2
|
import E from "../core/AxiosError.js";
|
|
3
|
-
function
|
|
3
|
+
function B(i) {
|
|
4
4
|
return t.isPlainObject(i) || t.isArray(i);
|
|
5
5
|
}
|
|
6
6
|
function h(i) {
|
|
@@ -12,7 +12,7 @@ function O(i, e, s) {
|
|
|
12
12
|
}).join(s ? "." : "") : e;
|
|
13
13
|
}
|
|
14
14
|
function T(i) {
|
|
15
|
-
return t.isArray(i) && !i.some(
|
|
15
|
+
return t.isArray(i) && !i.some(B);
|
|
16
16
|
}
|
|
17
17
|
const S = t.toFlatObject(t, {}, null, function(e) {
|
|
18
18
|
return /^is[A-Z]/.test(e);
|
|
@@ -27,24 +27,26 @@ function W(i, e, s) {
|
|
|
27
27
|
}, !1, function(n, u) {
|
|
28
28
|
return !t.isUndefined(u[n]);
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const p = s.metaTokens, o = s.visitor || j, d = s.dots, m = s.indexes, w = (s.Blob || typeof Blob < "u" && Blob) && t.isSpecCompliantForm(e);
|
|
31
31
|
if (!t.isFunction(o))
|
|
32
32
|
throw new TypeError("visitor must be a function");
|
|
33
33
|
function l(r) {
|
|
34
34
|
if (r === null) return "";
|
|
35
35
|
if (t.isDate(r))
|
|
36
36
|
return r.toISOString();
|
|
37
|
+
if (t.isBoolean(r))
|
|
38
|
+
return r.toString();
|
|
37
39
|
if (!w && t.isBlob(r))
|
|
38
40
|
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
39
41
|
return t.isArrayBuffer(r) || t.isTypedArray(r) ? w && typeof Blob == "function" ? new Blob([r]) : Buffer.from(r) : r;
|
|
40
42
|
}
|
|
41
43
|
function j(r, n, u) {
|
|
42
|
-
let
|
|
44
|
+
let f = r;
|
|
43
45
|
if (r && !u && typeof r == "object") {
|
|
44
46
|
if (t.endsWith(n, "{}"))
|
|
45
|
-
n =
|
|
46
|
-
else if (t.isArray(r) && T(r) || (t.isFileList(r) || t.endsWith(n, "[]")) && (
|
|
47
|
-
return n = h(n),
|
|
47
|
+
n = p ? n : n.slice(0, -2), r = JSON.stringify(r);
|
|
48
|
+
else if (t.isArray(r) && T(r) || (t.isFileList(r) || t.endsWith(n, "[]")) && (f = t.toArray(r)))
|
|
49
|
+
return n = h(n), f.forEach(function(b, x) {
|
|
48
50
|
!(t.isUndefined(b) || b === null) && e.append(
|
|
49
51
|
// eslint-disable-next-line no-nested-ternary
|
|
50
52
|
m === !0 ? O([n], x, d) : m === null ? n : n + "[]",
|
|
@@ -52,25 +54,25 @@ function W(i, e, s) {
|
|
|
52
54
|
);
|
|
53
55
|
}), !1;
|
|
54
56
|
}
|
|
55
|
-
return
|
|
57
|
+
return B(r) ? !0 : (e.append(O(u, n, d), l(r)), !1);
|
|
56
58
|
}
|
|
57
59
|
const a = [], F = Object.assign(S, {
|
|
58
60
|
defaultVisitor: j,
|
|
59
61
|
convertValue: l,
|
|
60
|
-
isVisitable:
|
|
62
|
+
isVisitable: B
|
|
61
63
|
});
|
|
62
64
|
function A(r, n) {
|
|
63
65
|
if (!t.isUndefined(r)) {
|
|
64
66
|
if (a.indexOf(r) !== -1)
|
|
65
67
|
throw Error("Circular reference detected in " + n.join("."));
|
|
66
|
-
a.push(r), t.forEach(r, function(
|
|
67
|
-
(!(t.isUndefined(
|
|
68
|
+
a.push(r), t.forEach(r, function(f, c) {
|
|
69
|
+
(!(t.isUndefined(f) || f === null) && o.call(
|
|
68
70
|
e,
|
|
69
|
-
|
|
70
|
-
t.isString(
|
|
71
|
+
f,
|
|
72
|
+
t.isString(c) ? c.trim() : c,
|
|
71
73
|
n,
|
|
72
74
|
F
|
|
73
|
-
)) === !0 && A(
|
|
75
|
+
)) === !0 && A(f, n ? n.concat(c) : [c]);
|
|
74
76
|
}), a.pop();
|
|
75
77
|
}
|
|
76
78
|
}
|