@unicom-cloud/utils 0.1.27 → 0.1.28
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/case-name/index.js +1 -1
- package/caseName.js +1 -1
- package/class-name/index.js +1 -1
- package/className.js +1 -1
- package/clipboard-copy/index.js +1 -1
- package/clipboardCopy.js +1 -1
- package/constant/address.js +1 -1
- package/constant/chineseCharacters.js +1 -1
- package/constant/constellations.js +1 -1
- package/constant/domain.js +1 -1
- package/constant/emoji.js +1 -1
- package/constant/identity.js +1 -1
- package/constant/index.js +1 -1
- package/constant/keyboardCode.js +1 -1
- package/constant/licensePlate.js +1 -1
- package/constant/name.js +1 -1
- package/constant/platform.js +1 -1
- package/constant/protocol.js +1 -1
- package/constant/ui.js +1 -1
- package/constant.js +1 -1
- package/content-disposition/index.js +1 -1
- package/contentDisposition.js +1 -1
- package/cookie/index.js +1 -1
- package/cookie/src/index.js +1 -1
- package/cookie.js +1 -1
- package/date/convertTime.js +1 -1
- package/date/convertToDuration.js +1 -1
- package/date/index.js +1 -1
- package/date.js +1 -1
- package/decimal/decimal.js +1 -1
- package/decimal/index.js +1 -1
- package/decimal.js +1 -1
- package/dom-helpers/LICENSE +20 -0
- package/dom-helpers/activeElement.js +1 -1
- package/dom-helpers/addClass.js +1 -1
- package/dom-helpers/addEventListener.js +1 -1
- package/dom-helpers/animate.js +1 -1
- package/dom-helpers/animationFrame.js +1 -1
- package/dom-helpers/attribute.js +1 -1
- package/dom-helpers/camelize.js +1 -1
- package/dom-helpers/camelizeStyle.js +1 -1
- package/dom-helpers/canUseDOM.js +1 -1
- package/dom-helpers/childElements.js +1 -1
- package/dom-helpers/childNodes.js +1 -1
- package/dom-helpers/clear.js +1 -1
- package/dom-helpers/closest.js +1 -1
- package/dom-helpers/collectElements.js +1 -1
- package/dom-helpers/collectSiblings.js +1 -1
- package/dom-helpers/contains.js +1 -1
- package/dom-helpers/css.js +1 -1
- package/dom-helpers/filterEventHandler.js +1 -1
- package/dom-helpers/getComputedStyle.js +1 -1
- package/dom-helpers/getScrollAccessor.js +1 -1
- package/dom-helpers/hasClass.js +1 -1
- package/dom-helpers/height.js +1 -1
- package/dom-helpers/hyphenate.js +1 -1
- package/dom-helpers/hyphenateStyle.js +1 -1
- package/dom-helpers/index.js +1 -1
- package/dom-helpers/insertAfter.js +1 -1
- package/dom-helpers/isDocument.js +1 -1
- package/dom-helpers/isInput.js +1 -1
- package/dom-helpers/isTransform.js +1 -1
- package/dom-helpers/isVisible.js +1 -1
- package/dom-helpers/isWindow.js +1 -1
- package/dom-helpers/listen.js +1 -1
- package/dom-helpers/matches.js +1 -1
- package/dom-helpers/nextUntil.js +1 -1
- package/dom-helpers/offset.js +1 -1
- package/dom-helpers/offsetParent.js +1 -1
- package/dom-helpers/ownerDocument.js +1 -1
- package/dom-helpers/ownerWindow.js +1 -1
- package/dom-helpers/parents.js +1 -1
- package/dom-helpers/position.js +1 -1
- package/dom-helpers/prepend.js +1 -1
- package/dom-helpers/querySelectorAll.js +1 -1
- package/dom-helpers/reflow.js +1 -1
- package/dom-helpers/remove.js +1 -1
- package/dom-helpers/removeClass.js +1 -1
- package/dom-helpers/removeEventListener.js +1 -1
- package/dom-helpers/scrollLeft.js +1 -1
- package/dom-helpers/scrollParent.js +1 -1
- package/dom-helpers/scrollTo.js +1 -1
- package/dom-helpers/scrollTop.js +1 -1
- package/dom-helpers/scrollbarSize.js +1 -1
- package/dom-helpers/siblings.js +1 -1
- package/dom-helpers/text.js +1 -1
- package/dom-helpers/toggleClass.js +1 -1
- package/dom-helpers/transitionEnd.js +1 -1
- package/dom-helpers/triggerEvent.js +1 -1
- package/dom-helpers/types.js +1 -1
- package/dom-helpers/width.js +1 -1
- package/domHelpers.js +1 -1
- package/emitter/index.js +1 -1
- package/emitter/src/index.js +1 -1
- package/emitter.js +1 -1
- package/file/fileToURL.js +1 -1
- package/file/index.js +1 -1
- package/file/saveAs.js +1 -1
- package/file.js +1 -1
- package/filesize/LICENSE +26 -0
- package/idb/index.js +1 -1
- package/idb.js +1 -1
- package/index.js +1 -1
- package/invariant/index.js +1 -1
- package/invariant.js +1 -1
- package/is/index.js +1 -1
- package/is.js +1 -1
- package/js-cookie/index.js +1 -1
- package/js-cookie/src/api.js +1 -1
- package/js-cookie/src/assign.js +1 -1
- package/js-cookie/src/converter.js +1 -1
- package/jsCookie.js +1 -1
- package/lodash/LICENSE +47 -0
- package/lunar/LICENSE +20 -0
- package/lunar/index.js +1 -1
- package/lunar/lib/Holiday.js +1 -1
- package/lunar/lib/HolidayUtil.js +1 -1
- package/lunar/lib/I18n.js +1 -1
- package/lunar/lib/JieQi.js +1 -1
- package/lunar/lib/Lunar.js +1 -1
- package/lunar/lib/LunarMonth.js +1 -1
- package/lunar/lib/LunarTime.js +1 -1
- package/lunar/lib/LunarUtil.js +1 -1
- package/lunar/lib/LunarYear.js +1 -1
- package/lunar/lib/ShouXingUtil.js +1 -1
- package/lunar/lib/Solar.js +1 -1
- package/lunar/lib/SolarHalfYear.js +1 -1
- package/lunar/lib/SolarMonth.js +1 -1
- package/lunar/lib/SolarSeason.js +1 -1
- package/lunar/lib/SolarUtil.js +1 -1
- package/lunar/lib/SolarWeek.js +1 -1
- package/lunar/lib/SolarYear.js +1 -1
- package/lunar/lib/index.js +1 -1
- package/lunar.js +1 -1
- package/math/index.js +1 -1
- package/math.js +1 -1
- package/md5/index.js +1 -1
- package/md5.js +1 -1
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -1
- package/mock.js +1 -1
- package/normalize-wheel/ExecutionEnvironment.js +1 -1
- package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
- package/normalize-wheel/index.js +1 -1
- package/normalize-wheel/isEventSupported.js +1 -1
- package/normalizeWheel.js +1 -1
- package/number-to-chinese/index.js +1 -1
- package/numberToChinese.js +1 -1
- package/nzh/cn.js +1 -1
- package/nzh/hk.js +1 -1
- package/nzh/index.js +1 -1
- package/nzh/nzh.js +1 -1
- package/nzh/src/autoGet.js +1 -1
- package/nzh/src/index.js +1 -1
- package/nzh/src/langs/cn_b.js +1 -1
- package/nzh/src/langs/cn_s.js +1 -1
- package/nzh/src/langs/hk_b.js +1 -1
- package/nzh/src/langs/hk_s.js +1 -1
- package/nzh/src/utils.js +1 -1
- package/nzh.js +1 -1
- package/object-keys-sort/index.js +1 -1
- package/object-prototype-to-string-call/index.js +1 -1
- package/objectKeysSort.js +1 -1
- package/objectPrototypeToStringCall.js +1 -1
- package/package.json +1 -1
- package/pinyin/LICENSE +20 -0
- package/pinyin/index.d.ts +6 -0
- package/pinyin/index.js +1 -1
- package/pinyin/simplified.js +1 -1
- package/pinyin/src/core.js +62 -62
- package/pinyin/src/simplified.js +1 -1
- package/pinyin/src/simplified_dict.js +2 -2
- package/pinyin/src/traditional.js +1 -1
- package/pinyin/src/traditional_dict.js +1 -1
- package/pinyin/traditional.js +1 -1
- package/pinyin.js +1 -1
- package/query-string/LICENSE +20 -0
- package/query-string/base.js +1 -1
- package/query-string/index.js +1 -1
- package/query-string/splitOnFirst.js +1 -1
- package/queryString.js +1 -1
- package/random/address.js +1 -1
- package/random/constellation.js +1 -1
- package/random/image.js +1 -1
- package/random/index.js +1 -1
- package/random/licensePlate.js +1 -1
- package/random/name.js +1 -1
- package/random/number.js +1 -1
- package/random/text.js +1 -1
- package/random/time.js +1 -1
- package/random/web.js +1 -1
- package/random.js +1 -1
- package/screenfull/index.js +1 -1
- package/screenfull.js +1 -1
- package/sleep/index.js +1 -1
- package/sleep.js +1 -1
- package/snapdom/LICENSE +20 -0
- package/snapdom/index.js +1 -1
- package/snapdom/src/api/preCache.js +1 -1
- package/snapdom/src/api/snapdom.js +1 -1
- package/snapdom/src/core/cache.js +1 -1
- package/snapdom/src/core/capture.js +1 -1
- package/snapdom/src/core/clone.js +1 -1
- package/snapdom/src/core/context.js +1 -1
- package/snapdom/src/core/plugins.js +1 -1
- package/snapdom/src/core/prepare.js +1 -1
- package/snapdom/src/exporters/download.js +1 -1
- package/snapdom/src/exporters/toBlob.js +1 -1
- package/snapdom/src/exporters/toCanvas.js +1 -1
- package/snapdom/src/exporters/toImg.js +1 -1
- package/snapdom/src/modules/CSSVar.js +1 -1
- package/snapdom/src/modules/background.js +1 -1
- package/snapdom/src/modules/changeCSS.js +1 -1
- package/snapdom/src/modules/counter.js +1 -1
- package/snapdom/src/modules/fonts.js +1 -1
- package/snapdom/src/modules/iconFonts.js +1 -1
- package/snapdom/src/modules/images.js +1 -1
- package/snapdom/src/modules/lineClamp.js +1 -1
- package/snapdom/src/modules/pseudo.js +1 -1
- package/snapdom/src/modules/rasterize.js +1 -1
- package/snapdom/src/modules/snapFetch.js +1 -1
- package/snapdom/src/modules/styles.js +1 -1
- package/snapdom/src/modules/svgDefs.js +1 -1
- package/snapdom/src/utils/browser.js +1 -1
- package/snapdom/src/utils/css.js +1 -1
- package/snapdom/src/utils/helpers.js +1 -1
- package/snapdom/src/utils/image.js +1 -1
- package/snapdom.js +1 -1
- package/string/index.js +7 -0
- package/string.js +5 -0
- package/tinycolor/index.js +1 -1
- package/tinycolor/src/conversion.js +1 -1
- package/tinycolor/src/css-color-names.js +1 -1
- package/tinycolor/src/format-input.js +1 -1
- package/tinycolor/src/from-ratio.js +1 -1
- package/tinycolor/src/index.js +1 -1
- package/tinycolor/src/random.js +1 -1
- package/tinycolor/src/readability.js +1 -1
- package/tinycolor/src/to-ms-filter.js +1 -1
- package/tinycolor/src/utils.js +1 -1
- package/tinycolor.js +1 -1
- package/tree/index.js +1 -1
- package/tree/search/index.js +1 -1
- package/tree.js +1 -1
- package/tween/index.js +1 -1
- package/tween/src/easing.js +1 -1
- package/tween/src/tween.js +1 -1
- package/tween.js +1 -1
- package/types/string/index.d.ts +8 -0
- package/types/xlsx/index.d.ts +2 -0
- package/types/xlsx/xlsx.d.ts +224 -0
- package/ui-color/compareColorByRange.js +1 -1
- package/ui-color/index.js +1 -1
- package/uiColor.js +1 -1
- package/url-toolkit/index.js +1 -1
- package/url-toolkit/src/url-toolkit.js +1 -1
- package/urlToolkit.js +1 -1
- package/validate/index.js +1 -1
- package/validate/src/index.js +1 -1
- package/validate/src/locale/en-US.js +1 -1
- package/validate/src/locale/zh-CN.js +1 -1
- package/validate/src/message.js +1 -1
- package/validate/src/rules/array.js +1 -1
- package/validate/src/rules/base.js +1 -1
- package/validate/src/rules/boolean.js +1 -1
- package/validate/src/rules/custom.js +1 -1
- package/validate/src/rules/number.js +1 -1
- package/validate/src/rules/object.js +1 -1
- package/validate/src/rules/string.js +1 -1
- package/validate/src/rules/type.js +1 -1
- package/validate/src/utils.js +1 -1
- package/validate.js +1 -1
- package/version/index.js +1 -1
- package/version.js +1 -1
- package/xlsx/LICENSE +189 -0
- package/xlsx/index.d.ts +1139 -0
- package/xlsx/index.js +23 -0
- package/xlsx/xlsx.js +28329 -0
- package/xlsx.js +23 -0
- package/axios/chunk/BJvTEV6n.js +0 -253
- package/axios/chunk/CB3wlosT.js +0 -64
- package/axios/index.d.ts +0 -796
- package/axios/index.js +0 -43
- package/axios/lib/axios.js +0 -1635
- package/axios/lib/utils.js +0 -5
- package/axios/mock-adapter/index.d.ts +0 -59
- package/axios/mock-adapter/index.js +0 -205
- package/axios/mock-adapter/request.js +0 -50
- package/axios/mock-adapter/utils.js +0 -130
package/axios/lib/utils.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AxiosAdapter,
|
|
3
|
-
AxiosInstance,
|
|
4
|
-
AxiosRequestConfig,
|
|
5
|
-
} from '../index.js';
|
|
6
|
-
|
|
7
|
-
type CallbackResponseSpecFunc = (
|
|
8
|
-
config: AxiosRequestConfig,
|
|
9
|
-
) => any[] | Promise<any[]>;
|
|
10
|
-
|
|
11
|
-
type ResponseSpecFunc = (
|
|
12
|
-
statusOrCallback: number | CallbackResponseSpecFunc,
|
|
13
|
-
data?: any,
|
|
14
|
-
headers?: any,
|
|
15
|
-
) => MockAdapter;
|
|
16
|
-
|
|
17
|
-
interface RequestHandler {
|
|
18
|
-
reply: ResponseSpecFunc;
|
|
19
|
-
replyOnce: ResponseSpecFunc;
|
|
20
|
-
|
|
21
|
-
passThrough(): void;
|
|
22
|
-
networkError(): void;
|
|
23
|
-
timeout(): void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface MockAdapterOptions {
|
|
27
|
-
delayResponse?: number;
|
|
28
|
-
onNoMatch?: 'passthrough' | 'throwException';
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface RequestDataMatcher {
|
|
32
|
-
[index: string]: any;
|
|
33
|
-
params?: {
|
|
34
|
-
[index: string]: any;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
type RequestMatcherFunc = (
|
|
39
|
-
matcher?: string | RegExp,
|
|
40
|
-
body?: string | RequestDataMatcher,
|
|
41
|
-
) => RequestHandler;
|
|
42
|
-
|
|
43
|
-
declare class MockAdapter {
|
|
44
|
-
constructor(axiosInstance: AxiosInstance, options?: MockAdapterOptions);
|
|
45
|
-
|
|
46
|
-
adapter(): AxiosAdapter;
|
|
47
|
-
reset(): void;
|
|
48
|
-
restore(): void;
|
|
49
|
-
|
|
50
|
-
onGet: RequestMatcherFunc;
|
|
51
|
-
onPost: RequestMatcherFunc;
|
|
52
|
-
onPut: RequestMatcherFunc;
|
|
53
|
-
onHead: RequestMatcherFunc;
|
|
54
|
-
onDelete: RequestMatcherFunc;
|
|
55
|
-
onPatch: RequestMatcherFunc;
|
|
56
|
-
onAny: RequestMatcherFunc;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export default MockAdapter;
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
/* 2025-11-07 13:23:48 */
|
|
2
|
-
import { A as E } from "../chunk/BJvTEV6n.js";
|
|
3
|
-
import { request as w } from "./request.js";
|
|
4
|
-
import i from "./utils.js";
|
|
5
|
-
const A = [
|
|
6
|
-
"get",
|
|
7
|
-
"post",
|
|
8
|
-
"head",
|
|
9
|
-
"delete",
|
|
10
|
-
"patch",
|
|
11
|
-
"put",
|
|
12
|
-
"options",
|
|
13
|
-
"list",
|
|
14
|
-
"link",
|
|
15
|
-
"unlink"
|
|
16
|
-
];
|
|
17
|
-
function m() {
|
|
18
|
-
const r = [];
|
|
19
|
-
return A.forEach(function(e) {
|
|
20
|
-
Object.defineProperty(r, e, {
|
|
21
|
-
get() {
|
|
22
|
-
return r.filter(function(n) {
|
|
23
|
-
return !n.method || n.method === e;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}), r;
|
|
28
|
-
}
|
|
29
|
-
class N {
|
|
30
|
-
constructor(e, n = {
|
|
31
|
-
delayResponse: 27,
|
|
32
|
-
onNoMatch: "passthrough"
|
|
33
|
-
}) {
|
|
34
|
-
if (this.reset(), e)
|
|
35
|
-
this.axiosInstance = e, this.axiosInstanceWithoutInterceptors = e.create ? e.create() : void 0, this.originalAdapter = e.defaults.adapter, this.delayResponse = n.delayResponse > 0 ? n.delayResponse : null, this.onNoMatch = n.onNoMatch || null, e.defaults.adapter = this.adapter();
|
|
36
|
-
else
|
|
37
|
-
throw new Error("Please provide an instance of axios to mock");
|
|
38
|
-
}
|
|
39
|
-
adapter() {
|
|
40
|
-
return (e) => w(this, e);
|
|
41
|
-
}
|
|
42
|
-
restore() {
|
|
43
|
-
this.axiosInstance && (this.axiosInstance.defaults.adapter = this.originalAdapter, this.axiosInstance = void 0);
|
|
44
|
-
}
|
|
45
|
-
reset() {
|
|
46
|
-
this.resetHandlers(), this.resetHistory();
|
|
47
|
-
}
|
|
48
|
-
resetHandlers() {
|
|
49
|
-
this.handlers ? this.handlers.length = 0 : this.handlers = m();
|
|
50
|
-
}
|
|
51
|
-
resetHistory() {
|
|
52
|
-
this.history ? this.history.length = 0 : this.history = m();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const R = [
|
|
56
|
-
"any",
|
|
57
|
-
"get",
|
|
58
|
-
"delete",
|
|
59
|
-
"head",
|
|
60
|
-
"options"
|
|
61
|
-
];
|
|
62
|
-
function T(r, e, n) {
|
|
63
|
-
return R.includes(r) ? O(r, e || {}) : O(r, Object.assign({}, n, { data: e }));
|
|
64
|
-
}
|
|
65
|
-
const C = ["headers", "params", "data"];
|
|
66
|
-
function O(r, e) {
|
|
67
|
-
for (const n in e)
|
|
68
|
-
if (!C.includes(n))
|
|
69
|
-
throw new Error(
|
|
70
|
-
`Invalid config property ${JSON.stringify(
|
|
71
|
-
n
|
|
72
|
-
)} provided to ${g(r)}. Config: ${JSON.stringify(
|
|
73
|
-
e
|
|
74
|
-
)}`
|
|
75
|
-
);
|
|
76
|
-
return e;
|
|
77
|
-
}
|
|
78
|
-
function g(r) {
|
|
79
|
-
return `on${r.charAt(0).toUpperCase()}${r.slice(1)}`;
|
|
80
|
-
}
|
|
81
|
-
A.concat("any").forEach(function(r) {
|
|
82
|
-
N.prototype[g(r)] = function(e, n, a) {
|
|
83
|
-
const s = this;
|
|
84
|
-
let d;
|
|
85
|
-
e = e === void 0 ? /.*/ : e;
|
|
86
|
-
const o = T(r, n, a);
|
|
87
|
-
function c(t, u, p) {
|
|
88
|
-
const h = {
|
|
89
|
-
url: e,
|
|
90
|
-
method: r === "any" ? void 0 : r,
|
|
91
|
-
params: o.params,
|
|
92
|
-
data: o.data,
|
|
93
|
-
headers: o.headers,
|
|
94
|
-
replyOnce: !1,
|
|
95
|
-
delay: d,
|
|
96
|
-
response: E.isFunction(t) ? t : [t, u, p]
|
|
97
|
-
};
|
|
98
|
-
return y(r, s.handlers, h), s;
|
|
99
|
-
}
|
|
100
|
-
function x(t) {
|
|
101
|
-
d = t;
|
|
102
|
-
const u = f.reply.bind(f);
|
|
103
|
-
return Object.assign(u, f), u;
|
|
104
|
-
}
|
|
105
|
-
function l(t, u, p) {
|
|
106
|
-
const h = {
|
|
107
|
-
url: e,
|
|
108
|
-
method: r === "any" ? void 0 : r,
|
|
109
|
-
params: o.params,
|
|
110
|
-
data: o.data,
|
|
111
|
-
headers: o.headers,
|
|
112
|
-
replyOnce: !0,
|
|
113
|
-
delay: d,
|
|
114
|
-
response: E.isFunction(t) ? t : [t, u, p]
|
|
115
|
-
};
|
|
116
|
-
return y(r, s.handlers, h), s;
|
|
117
|
-
}
|
|
118
|
-
const f = {
|
|
119
|
-
reply: c,
|
|
120
|
-
replyOnce: l,
|
|
121
|
-
withDelayInMs: x,
|
|
122
|
-
passThrough() {
|
|
123
|
-
const t = {
|
|
124
|
-
passThrough: !0,
|
|
125
|
-
method: r === "any" ? void 0 : r,
|
|
126
|
-
url: e,
|
|
127
|
-
params: o.params,
|
|
128
|
-
data: o.data,
|
|
129
|
-
headers: o.headers
|
|
130
|
-
};
|
|
131
|
-
return y(r, s.handlers, t), s;
|
|
132
|
-
},
|
|
133
|
-
abortRequest() {
|
|
134
|
-
return c(async function(t) {
|
|
135
|
-
throw i.createAxiosError(
|
|
136
|
-
"Request aborted",
|
|
137
|
-
t,
|
|
138
|
-
void 0,
|
|
139
|
-
"ECONNABORTED"
|
|
140
|
-
);
|
|
141
|
-
});
|
|
142
|
-
},
|
|
143
|
-
abortRequestOnce() {
|
|
144
|
-
return l(async function(t) {
|
|
145
|
-
throw i.createAxiosError(
|
|
146
|
-
"Request aborted",
|
|
147
|
-
t,
|
|
148
|
-
void 0,
|
|
149
|
-
"ECONNABORTED"
|
|
150
|
-
);
|
|
151
|
-
});
|
|
152
|
-
},
|
|
153
|
-
networkError() {
|
|
154
|
-
return c(async function(t) {
|
|
155
|
-
throw i.createAxiosError("Network Error", t);
|
|
156
|
-
});
|
|
157
|
-
},
|
|
158
|
-
networkErrorOnce() {
|
|
159
|
-
return l(async function(t) {
|
|
160
|
-
throw i.createAxiosError("Network Error", t);
|
|
161
|
-
});
|
|
162
|
-
},
|
|
163
|
-
timeout() {
|
|
164
|
-
return c(async function(t) {
|
|
165
|
-
throw i.createAxiosError(
|
|
166
|
-
t.timeoutErrorMessage || `timeout of ${t.timeout}ms exceeded`,
|
|
167
|
-
t,
|
|
168
|
-
void 0,
|
|
169
|
-
t.transitional && t.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"
|
|
170
|
-
);
|
|
171
|
-
});
|
|
172
|
-
},
|
|
173
|
-
timeoutOnce() {
|
|
174
|
-
return l(async function(t) {
|
|
175
|
-
throw i.createAxiosError(
|
|
176
|
-
t.timeoutErrorMessage || `timeout of ${t.timeout}ms exceeded`,
|
|
177
|
-
t,
|
|
178
|
-
void 0,
|
|
179
|
-
t.transitional && t.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"
|
|
180
|
-
);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
return f;
|
|
185
|
-
};
|
|
186
|
-
});
|
|
187
|
-
function M(r, e) {
|
|
188
|
-
let n = -1;
|
|
189
|
-
for (let a = 0; a < r.length; a += 1) {
|
|
190
|
-
const s = r[a], d = s.url instanceof RegExp && e.url instanceof RegExp ? String(s.url) === String(e.url) : s.url === e.url;
|
|
191
|
-
(!s.method || s.method === e.method) && d && i.isEqual(s.params, e.params) && i.isEqual(s.data, e.data) && i.isEqual(s.headers, e.headers) && !s.replyOnce && (n = a);
|
|
192
|
-
}
|
|
193
|
-
return n;
|
|
194
|
-
}
|
|
195
|
-
function y(r, e, n) {
|
|
196
|
-
if (r === "any")
|
|
197
|
-
e.push(n);
|
|
198
|
-
else {
|
|
199
|
-
const a = M(e, n);
|
|
200
|
-
a > -1 && !n.replyOnce ? e.splice(a, 1, n) : e.push(n);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
export {
|
|
204
|
-
N as default
|
|
205
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/* 2025-11-07 13:23:48 */
|
|
2
|
-
import { A as l } from "../chunk/BJvTEV6n.js";
|
|
3
|
-
import a from "./utils.js";
|
|
4
|
-
function u(s, e) {
|
|
5
|
-
let t = e.baseURL;
|
|
6
|
-
return t && !/^https?:/.test(t) && (t = void 0), l.isFunction(s.originalAdapter) ? s.originalAdapter(e) : s.axiosInstanceWithoutInterceptors(
|
|
7
|
-
Object.assign({}, e, {
|
|
8
|
-
baseURL: t,
|
|
9
|
-
// Use the original adapter, not the mock adapter
|
|
10
|
-
adapter: s.originalAdapter,
|
|
11
|
-
// The request transformation runs on the original axios handler already
|
|
12
|
-
transformRequest: [],
|
|
13
|
-
transformResponse: []
|
|
14
|
-
})
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
function n(s, e) {
|
|
18
|
-
return l.isNumber(e.delay) ? e.delay : s.delayResponse;
|
|
19
|
-
}
|
|
20
|
-
async function i(s, e) {
|
|
21
|
-
let t = e.url || "";
|
|
22
|
-
e.baseURL && t.substr(0, e.baseURL.length) === e.baseURL && (t = t.slice(e.baseURL.length)), delete e.adapter, s.history.push(e);
|
|
23
|
-
const r = a.findHandler(
|
|
24
|
-
s.handlers,
|
|
25
|
-
e.method,
|
|
26
|
-
t,
|
|
27
|
-
e.data,
|
|
28
|
-
e.params,
|
|
29
|
-
e.headers && e.headers.constructor.name === "AxiosHeaders" ? Object.assign({}, e.headers.toJSON()) : e.headers,
|
|
30
|
-
e.baseURL
|
|
31
|
-
);
|
|
32
|
-
if (r)
|
|
33
|
-
return r.replyOnce && a.purgeIfReplyOnce(s, r), r.passThrough ? u(s, e) : a.settle(
|
|
34
|
-
e,
|
|
35
|
-
r.response,
|
|
36
|
-
n(s, r)
|
|
37
|
-
);
|
|
38
|
-
switch (s.onNoMatch) {
|
|
39
|
-
case "passthrough":
|
|
40
|
-
return u(s, e);
|
|
41
|
-
case "throwException":
|
|
42
|
-
throw a.createCouldNotFindMockError(e);
|
|
43
|
-
default:
|
|
44
|
-
return a.settle(e, { status: 404 }, s.delayResponse);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
i as default,
|
|
49
|
-
i as request
|
|
50
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/* 2025-11-07 13:23:48 */
|
|
2
|
-
import O from "lodash/isArrayBuffer.js";
|
|
3
|
-
import b from "lodash/isBuffer.js";
|
|
4
|
-
import d from "lodash/isEqual.js";
|
|
5
|
-
import { A as m } from "../chunk/CB3wlosT.js";
|
|
6
|
-
import { A as o } from "../chunk/BJvTEV6n.js";
|
|
7
|
-
function p(t, r) {
|
|
8
|
-
const n = t.length;
|
|
9
|
-
for (let i = 0; i < n; i++) {
|
|
10
|
-
const e = t[i];
|
|
11
|
-
if (r(e)) return e;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function w(t) {
|
|
15
|
-
return o.isStream(t);
|
|
16
|
-
}
|
|
17
|
-
function N(t) {
|
|
18
|
-
return o.isBlob(t);
|
|
19
|
-
}
|
|
20
|
-
function l(t, r) {
|
|
21
|
-
return t ? `${t.replace(/\/+$/, "")}/${r.replace(/^\/+/, "")}` : r;
|
|
22
|
-
}
|
|
23
|
-
function E(t, r, n, i, e, c, a) {
|
|
24
|
-
return p(t[r.toLowerCase()], function(s) {
|
|
25
|
-
let u = !1;
|
|
26
|
-
return o.isString(s.url) ? u = h(n, s.url) || h(l(a, n), s.url) : s.url instanceof RegExp && (u = s.url.test(n) || s.url.test(l(a, n))), u && S(i, e, s) && f(c, s.headers);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function h(t, r) {
|
|
30
|
-
const n = t[0] === "/" ? t.substr(1) : t, i = r[0] === "/" ? r.substr(1) : r;
|
|
31
|
-
return n === i;
|
|
32
|
-
}
|
|
33
|
-
function S(t, r, n) {
|
|
34
|
-
return f(r, n.params) && y(t, n.data);
|
|
35
|
-
}
|
|
36
|
-
function f(t, r) {
|
|
37
|
-
return r === void 0 ? !0 : o.isFunction(r.asymmetricMatch) ? r.asymmetricMatch(t) : d(t, r);
|
|
38
|
-
}
|
|
39
|
-
function y(t, r) {
|
|
40
|
-
if (r === void 0)
|
|
41
|
-
return !0;
|
|
42
|
-
let n;
|
|
43
|
-
try {
|
|
44
|
-
n = JSON.parse(t);
|
|
45
|
-
} catch (i) {
|
|
46
|
-
console.error(i);
|
|
47
|
-
}
|
|
48
|
-
return f(n || t, r);
|
|
49
|
-
}
|
|
50
|
-
function M(t, r) {
|
|
51
|
-
const n = t.handlers.indexOf(r);
|
|
52
|
-
n > -1 && t.handlers.splice(n, 1);
|
|
53
|
-
}
|
|
54
|
-
function A(t) {
|
|
55
|
-
return O(t) || o.isBuffer(t) || w(t) || N(t) ? t : o.isObject(t) ? JSON.parse(JSON.stringify(t)) : t;
|
|
56
|
-
}
|
|
57
|
-
async function B(t, r) {
|
|
58
|
-
o.isFunction(t) && (t = await t(r));
|
|
59
|
-
const n = t.status || t[0], i = A(t.data || t[1]), e = t.headers || t[2];
|
|
60
|
-
return t.config && (r = t.config), {
|
|
61
|
-
status: n,
|
|
62
|
-
data: i,
|
|
63
|
-
headers: e,
|
|
64
|
-
config: r,
|
|
65
|
-
request: { responseURL: r.url }
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
async function J(t, r, n) {
|
|
69
|
-
n > 0 && await new Promise((e) => setTimeout(e, n));
|
|
70
|
-
const i = await B(r, t);
|
|
71
|
-
if (!i.config.validateStatus || i.config.validateStatus(i.status))
|
|
72
|
-
return i;
|
|
73
|
-
throw g(
|
|
74
|
-
`Request failed with status code ${i.status}`,
|
|
75
|
-
i.config,
|
|
76
|
-
i
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
function g(t, r, n, i) {
|
|
80
|
-
if (o.isFunction(m))
|
|
81
|
-
return m.from(new Error(t), i, r, null, n);
|
|
82
|
-
const e = new Error(t);
|
|
83
|
-
return e.isAxiosError = !0, e.config = r, n !== void 0 && (e.response = n), i !== void 0 && (e.code = i), e.toJSON = function() {
|
|
84
|
-
return {
|
|
85
|
-
// Standard
|
|
86
|
-
message: this.message,
|
|
87
|
-
name: this.name,
|
|
88
|
-
// Microsoft
|
|
89
|
-
description: this.description,
|
|
90
|
-
number: this.number,
|
|
91
|
-
// Mozilla
|
|
92
|
-
fileName: this.fileName,
|
|
93
|
-
lineNumber: this.lineNumber,
|
|
94
|
-
columnNumber: this.columnNumber,
|
|
95
|
-
stack: this.stack,
|
|
96
|
-
// Axios
|
|
97
|
-
config: this.config,
|
|
98
|
-
code: this.code
|
|
99
|
-
};
|
|
100
|
-
}, e;
|
|
101
|
-
}
|
|
102
|
-
function k(t) {
|
|
103
|
-
const r = `Could not find mock for:
|
|
104
|
-
${JSON.stringify(
|
|
105
|
-
{
|
|
106
|
-
method: t.method,
|
|
107
|
-
url: t.url,
|
|
108
|
-
params: t.params,
|
|
109
|
-
headers: t.headers
|
|
110
|
-
},
|
|
111
|
-
null,
|
|
112
|
-
2
|
|
113
|
-
)}`, n = new Error(r);
|
|
114
|
-
return n.isCouldNotFindMockError = !0, n.url = t.url, n.method = t.method, n;
|
|
115
|
-
}
|
|
116
|
-
const U = {
|
|
117
|
-
createAxiosError: g,
|
|
118
|
-
createCouldNotFindMockError: k,
|
|
119
|
-
find: p,
|
|
120
|
-
findHandler: E,
|
|
121
|
-
isBlob: N,
|
|
122
|
-
isBodyOrParametersMatching: S,
|
|
123
|
-
isBuffer: b,
|
|
124
|
-
isEqual: d,
|
|
125
|
-
purgeIfReplyOnce: M,
|
|
126
|
-
settle: J
|
|
127
|
-
};
|
|
128
|
-
export {
|
|
129
|
-
U as default
|
|
130
|
-
};
|