@oiyo/framework 0.4.0-beta.1 → 0.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CzvwBCEU.mjs → chunk-Bcqm9nz_.mjs} +1 -1
- package/dist/{chunk-CPOuyFJX.cjs → chunk-BnILMwZG.cjs} +1 -1
- package/dist/{index-DzsQka7j.d.cts → index-DCAh9vr9.d.cts} +70 -70
- package/dist/{index-DzsQka7j.d.mts → index-DCAh9vr9.d.mts} +70 -70
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/oiyo-CUWG-Hhg.mjs +7 -0
- package/dist/oiyo-CZ64L3f6.cjs +7 -0
- package/dist/oiyo.cjs +5 -5
- package/dist/oiyo.d.cts +3 -3
- package/dist/oiyo.d.mts +3 -3
- package/dist/oiyo.mjs +3 -3
- package/dist/uni.cjs +2 -2
- package/dist/uni.d.cts +1 -1
- package/dist/uni.d.mts +1 -1
- package/dist/uni.mjs +2 -2
- package/dist/vue.cjs +2 -2
- package/dist/vue.d.cts +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.mjs +2 -2
- package/package.json +1 -1
- package/dist/oiyo-CdQ_-aZW.mjs +0 -7
- package/dist/oiyo-DZ6BFYIw.cjs +0 -7
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
//#region src/oiyo/
|
|
8
|
-
|
|
7
|
+
//#region src/oiyo/http/abort.d.ts
|
|
8
|
+
interface HttpAborter {
|
|
9
|
+
readonly signal: HttpAbortSignal;
|
|
10
|
+
abort: (reason?: any) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 创建一个中断信标。
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const aborter = createHttpAborter()
|
|
17
|
+
* http.request('/pet/1', { signal: aborter.signal })
|
|
18
|
+
* aborter.abort()
|
|
19
|
+
*/
|
|
20
|
+
declare function createHttpAborter(): HttpAborter;
|
|
21
|
+
type AbortListener = (this: HttpAbortSignal, event: {
|
|
9
22
|
type: 'abort';
|
|
10
23
|
}) => void;
|
|
11
|
-
declare class
|
|
24
|
+
declare class AbortEmitter {
|
|
12
25
|
private listeners;
|
|
13
26
|
addEventListener(type: 'abort', listener: AbortListener): void;
|
|
14
27
|
removeEventListener(type: 'abort', listener: AbortListener): void;
|
|
@@ -16,7 +29,7 @@ declare class Emitter {
|
|
|
16
29
|
type: 'abort';
|
|
17
30
|
}): void;
|
|
18
31
|
}
|
|
19
|
-
declare class
|
|
32
|
+
declare class HttpAbortSignal extends AbortEmitter {
|
|
20
33
|
aborted: boolean;
|
|
21
34
|
reason: any;
|
|
22
35
|
onabort: AbortListener | null;
|
|
@@ -29,25 +42,12 @@ declare class BeaconSignal extends Emitter {
|
|
|
29
42
|
*/
|
|
30
43
|
throwIfAborted(): void;
|
|
31
44
|
}
|
|
32
|
-
interface Beacon {
|
|
33
|
-
readonly signal: BeaconSignal;
|
|
34
|
-
abort: (reason?: any) => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 创建一个中断信标。
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* const beacon = createBeacon()
|
|
41
|
-
* vessel.request('/pet/1', { signal: beacon.signal })
|
|
42
|
-
* beacon.abort()
|
|
43
|
-
*/
|
|
44
|
-
declare function createBeacon(): Beacon;
|
|
45
45
|
//#endregion
|
|
46
|
-
//#region src/oiyo/
|
|
46
|
+
//#region src/oiyo/http/types/utils.d.ts
|
|
47
47
|
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
48
48
|
type MaybePromise<T> = T | Promise<T>;
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region src/oiyo/
|
|
50
|
+
//#region src/oiyo/http/types/body.d.ts
|
|
51
51
|
interface ResponseBodyTypeMap {
|
|
52
52
|
text: string;
|
|
53
53
|
arrayBuffer: ArrayBuffer;
|
|
@@ -55,7 +55,7 @@ interface ResponseBodyTypeMap {
|
|
|
55
55
|
type ResponseBodyType = Prettify<keyof ResponseBodyTypeMap | 'json'>;
|
|
56
56
|
type MappedResponseBodyType<TRBType extends ResponseBodyType, TRBJsonType = any> = TRBType extends keyof ResponseBodyTypeMap ? ResponseBodyTypeMap[TRBType] : TRBJsonType;
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region src/oiyo/
|
|
58
|
+
//#region src/oiyo/http/types/uni.d.ts
|
|
59
59
|
type UniAppRequestOptions = Omit<UniNamespace.RequestOptions, 'url' | 'data' | 'header' | 'method' | 'timeout' | 'responseType' | 'success' | 'fail' | 'complete'>;
|
|
60
60
|
type UniAppRequestResponse<TRBody = any> = Prettify<Omit<UniNamespace.RequestSuccessCallbackResult, 'data'> & {
|
|
61
61
|
data: TRBody;
|
|
@@ -77,7 +77,7 @@ type UniAppDownloadResponse<TRBody = any> = Prettify<Omit<UniNamespace.DownloadS
|
|
|
77
77
|
data: TRBody;
|
|
78
78
|
}>;
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region src/oiyo/
|
|
80
|
+
//#region src/oiyo/http/types/options.d.ts
|
|
81
81
|
/**
|
|
82
82
|
* 响应头监听回调入参。
|
|
83
83
|
*/
|
|
@@ -87,7 +87,7 @@ interface HeadersReceived {
|
|
|
87
87
|
/**
|
|
88
88
|
* 所有请求共享的基础选项。
|
|
89
89
|
*/
|
|
90
|
-
interface
|
|
90
|
+
interface HttpBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType> {
|
|
91
91
|
baseURL?: string;
|
|
92
92
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
93
93
|
headers?: Record<string, string>;
|
|
@@ -110,19 +110,19 @@ interface VesselBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType>
|
|
|
110
110
|
retryStatusCodes?: number[];
|
|
111
111
|
ignoreResponseError?: boolean;
|
|
112
112
|
/**
|
|
113
|
-
* 中断信号,由 `
|
|
113
|
+
* 中断信号,由 `createHttpAborter()` 创建。
|
|
114
114
|
* 信号触发后请求会被中断;已中断的信号会让请求立即中断。
|
|
115
115
|
*/
|
|
116
|
-
signal?:
|
|
116
|
+
signal?: HttpAbortSignal;
|
|
117
117
|
/**
|
|
118
118
|
* 监听响应头(对应 task.onHeadersReceived)。
|
|
119
119
|
*/
|
|
120
120
|
onHeadersReceived?: (result: HeadersReceived) => void;
|
|
121
121
|
}
|
|
122
|
-
interface
|
|
122
|
+
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppRequestOptions {
|
|
123
123
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
124
124
|
}
|
|
125
|
-
interface
|
|
125
|
+
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppUploadOptions {
|
|
126
126
|
/**
|
|
127
127
|
* 文件对应的 key
|
|
128
128
|
* @default - 'file'
|
|
@@ -138,7 +138,7 @@ interface VesselUploadOptions<TRBType extends ResponseBodyType = ResponseBodyTyp
|
|
|
138
138
|
*/
|
|
139
139
|
onProgress?: (result: UniAppOnUploadProgress) => void;
|
|
140
140
|
}
|
|
141
|
-
interface
|
|
141
|
+
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends HttpBaseOptions<TRBType>, UniAppDownloadOptions {
|
|
142
142
|
/**
|
|
143
143
|
* 下载请求方法
|
|
144
144
|
* @default - 'GET'
|
|
@@ -149,86 +149,86 @@ interface VesselDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'>
|
|
|
149
149
|
*/
|
|
150
150
|
onProgress?: (result: UniAppDownloadProgress) => void;
|
|
151
151
|
}
|
|
152
|
-
type
|
|
153
|
-
type
|
|
152
|
+
type HttpURL = string;
|
|
153
|
+
type HttpOptions = HttpRequestOptions | HttpUploadOptions | HttpDownloadOptions;
|
|
154
154
|
//#endregion
|
|
155
|
-
//#region src/oiyo/
|
|
156
|
-
type
|
|
157
|
-
type
|
|
158
|
-
type
|
|
159
|
-
type
|
|
160
|
-
type
|
|
161
|
-
type
|
|
162
|
-
type
|
|
155
|
+
//#region src/oiyo/http/types/response.d.ts
|
|
156
|
+
type HttpRequestResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
157
|
+
type HttpUploadResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
158
|
+
type HttpDownloadResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = MappedResponseBodyType<TRBType, TRBody>;
|
|
159
|
+
type HttpRequestRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppRequestResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
160
|
+
type HttpUploadRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppUploadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
161
|
+
type HttpDownloadRawResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = UniAppDownloadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
162
|
+
type HttpRawResponse<T = any> = HttpRequestRawResponse<T> | HttpUploadRawResponse<T> | HttpDownloadRawResponse;
|
|
163
163
|
//#endregion
|
|
164
|
-
//#region src/oiyo/
|
|
165
|
-
interface
|
|
166
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
164
|
+
//#region src/oiyo/http/types/core.d.ts
|
|
165
|
+
interface HttpRequestMethod {
|
|
166
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpRequestOptions<TRBType> & {
|
|
167
167
|
raw: true;
|
|
168
|
-
}): Promise<
|
|
169
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
168
|
+
}): Promise<HttpRequestRawResponse<TRBody, TRBType>>;
|
|
169
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpRequestOptions<TRBType>): Promise<HttpRequestResponse<TRBody, TRBType>>;
|
|
170
170
|
}
|
|
171
|
-
interface
|
|
172
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
171
|
+
interface HttpUploadMethod {
|
|
172
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpUploadOptions<TRBType> & {
|
|
173
173
|
raw: true;
|
|
174
|
-
}): Promise<
|
|
175
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
174
|
+
}): Promise<HttpUploadRawResponse<TRBody, TRBType>>;
|
|
175
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpUploadOptions<TRBType>): Promise<HttpUploadResponse<TRBody, TRBType>>;
|
|
176
176
|
}
|
|
177
|
-
interface
|
|
178
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
177
|
+
interface HttpDownloadMethod {
|
|
178
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options: HttpDownloadOptions<TRBType> & {
|
|
179
179
|
raw: true;
|
|
180
|
-
}): Promise<
|
|
181
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
180
|
+
}): Promise<HttpDownloadRawResponse<TRBody, TRBType>>;
|
|
181
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options?: HttpDownloadOptions<TRBType>): Promise<HttpDownloadResponse<TRBody, TRBType>>;
|
|
182
182
|
}
|
|
183
|
-
interface
|
|
183
|
+
interface HttpHooks<TContextOptions, TResponse> {
|
|
184
184
|
onRequest?: (context: {
|
|
185
|
-
resource:
|
|
185
|
+
resource: HttpURL;
|
|
186
186
|
options: TContextOptions;
|
|
187
187
|
}) => MaybePromise<void>;
|
|
188
188
|
onRequestError?: (context: {
|
|
189
|
-
resource:
|
|
189
|
+
resource: HttpURL;
|
|
190
190
|
options: TContextOptions;
|
|
191
191
|
error: Error;
|
|
192
192
|
}) => MaybePromise<void>;
|
|
193
193
|
onResponse?: (context: {
|
|
194
|
-
resource:
|
|
194
|
+
resource: HttpURL;
|
|
195
195
|
options: TContextOptions;
|
|
196
196
|
response: TResponse;
|
|
197
197
|
}) => MaybePromise<void>;
|
|
198
198
|
onResponseError?: (context: {
|
|
199
|
-
resource:
|
|
199
|
+
resource: HttpURL;
|
|
200
200
|
options: TContextOptions;
|
|
201
201
|
response: TResponse;
|
|
202
202
|
}) => MaybePromise<void>;
|
|
203
203
|
}
|
|
204
|
-
interface
|
|
205
|
-
interface
|
|
206
|
-
resource?:
|
|
207
|
-
options?:
|
|
208
|
-
response?:
|
|
204
|
+
interface HttpConfig extends HttpBaseOptions<ResponseBodyType>, HttpHooks<HttpConfig, HttpRawResponse> {}
|
|
205
|
+
interface HttpError<T = any> extends Error {
|
|
206
|
+
resource?: HttpURL;
|
|
207
|
+
options?: HttpOptions;
|
|
208
|
+
response?: HttpRawResponse<T>;
|
|
209
209
|
data: T;
|
|
210
210
|
}
|
|
211
211
|
//#endregion
|
|
212
|
-
//#region src/oiyo/
|
|
213
|
-
interface
|
|
212
|
+
//#region src/oiyo/http/core.d.ts
|
|
213
|
+
interface Http {
|
|
214
214
|
/**
|
|
215
215
|
* 普通请求
|
|
216
216
|
*/
|
|
217
|
-
request:
|
|
217
|
+
request: HttpRequestMethod;
|
|
218
218
|
/**
|
|
219
219
|
* 文件上传
|
|
220
220
|
*/
|
|
221
|
-
upload:
|
|
221
|
+
upload: HttpUploadMethod;
|
|
222
222
|
/**
|
|
223
223
|
* 文件下载
|
|
224
224
|
*/
|
|
225
|
-
download:
|
|
225
|
+
download: HttpDownloadMethod;
|
|
226
226
|
/**
|
|
227
227
|
* 基于当前配置派生一个新实例。
|
|
228
228
|
*/
|
|
229
|
-
create: (config:
|
|
229
|
+
create: (config: HttpConfig) => Http;
|
|
230
230
|
}
|
|
231
|
-
declare function
|
|
232
|
-
declare const
|
|
231
|
+
declare function createHttp(globalConfig?: HttpConfig): Http;
|
|
232
|
+
declare const http: Http;
|
|
233
233
|
//#endregion
|
|
234
|
-
export {
|
|
234
|
+
export { HttpDownloadResponse as a, HttpDownloadOptions as c, ResponseBodyType as d, createHttpAborter as f, HttpError as i, HttpRequestOptions as l, http as n, HttpRequestResponse as o, HttpConfig as r, HttpUploadResponse as s, createHttp as t, HttpUploadOptions as u };
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
//#region src/oiyo/
|
|
8
|
-
|
|
7
|
+
//#region src/oiyo/http/abort.d.ts
|
|
8
|
+
interface HttpAborter {
|
|
9
|
+
readonly signal: HttpAbortSignal;
|
|
10
|
+
abort: (reason?: any) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 创建一个中断信标。
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const aborter = createHttpAborter()
|
|
17
|
+
* http.request('/pet/1', { signal: aborter.signal })
|
|
18
|
+
* aborter.abort()
|
|
19
|
+
*/
|
|
20
|
+
declare function createHttpAborter(): HttpAborter;
|
|
21
|
+
type AbortListener = (this: HttpAbortSignal, event: {
|
|
9
22
|
type: 'abort';
|
|
10
23
|
}) => void;
|
|
11
|
-
declare class
|
|
24
|
+
declare class AbortEmitter {
|
|
12
25
|
private listeners;
|
|
13
26
|
addEventListener(type: 'abort', listener: AbortListener): void;
|
|
14
27
|
removeEventListener(type: 'abort', listener: AbortListener): void;
|
|
@@ -16,7 +29,7 @@ declare class Emitter {
|
|
|
16
29
|
type: 'abort';
|
|
17
30
|
}): void;
|
|
18
31
|
}
|
|
19
|
-
declare class
|
|
32
|
+
declare class HttpAbortSignal extends AbortEmitter {
|
|
20
33
|
aborted: boolean;
|
|
21
34
|
reason: any;
|
|
22
35
|
onabort: AbortListener | null;
|
|
@@ -29,25 +42,12 @@ declare class BeaconSignal extends Emitter {
|
|
|
29
42
|
*/
|
|
30
43
|
throwIfAborted(): void;
|
|
31
44
|
}
|
|
32
|
-
interface Beacon {
|
|
33
|
-
readonly signal: BeaconSignal;
|
|
34
|
-
abort: (reason?: any) => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 创建一个中断信标。
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* const beacon = createBeacon()
|
|
41
|
-
* vessel.request('/pet/1', { signal: beacon.signal })
|
|
42
|
-
* beacon.abort()
|
|
43
|
-
*/
|
|
44
|
-
declare function createBeacon(): Beacon;
|
|
45
45
|
//#endregion
|
|
46
|
-
//#region src/oiyo/
|
|
46
|
+
//#region src/oiyo/http/types/utils.d.ts
|
|
47
47
|
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
48
48
|
type MaybePromise<T> = T | Promise<T>;
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region src/oiyo/
|
|
50
|
+
//#region src/oiyo/http/types/body.d.ts
|
|
51
51
|
interface ResponseBodyTypeMap {
|
|
52
52
|
text: string;
|
|
53
53
|
arrayBuffer: ArrayBuffer;
|
|
@@ -55,7 +55,7 @@ interface ResponseBodyTypeMap {
|
|
|
55
55
|
type ResponseBodyType = Prettify<keyof ResponseBodyTypeMap | 'json'>;
|
|
56
56
|
type MappedResponseBodyType<TRBType extends ResponseBodyType, TRBJsonType = any> = TRBType extends keyof ResponseBodyTypeMap ? ResponseBodyTypeMap[TRBType] : TRBJsonType;
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region src/oiyo/
|
|
58
|
+
//#region src/oiyo/http/types/uni.d.ts
|
|
59
59
|
type UniAppRequestOptions = Omit<UniNamespace.RequestOptions, 'url' | 'data' | 'header' | 'method' | 'timeout' | 'responseType' | 'success' | 'fail' | 'complete'>;
|
|
60
60
|
type UniAppRequestResponse<TRBody = any> = Prettify<Omit<UniNamespace.RequestSuccessCallbackResult, 'data'> & {
|
|
61
61
|
data: TRBody;
|
|
@@ -77,7 +77,7 @@ type UniAppDownloadResponse<TRBody = any> = Prettify<Omit<UniNamespace.DownloadS
|
|
|
77
77
|
data: TRBody;
|
|
78
78
|
}>;
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region src/oiyo/
|
|
80
|
+
//#region src/oiyo/http/types/options.d.ts
|
|
81
81
|
/**
|
|
82
82
|
* 响应头监听回调入参。
|
|
83
83
|
*/
|
|
@@ -87,7 +87,7 @@ interface HeadersReceived {
|
|
|
87
87
|
/**
|
|
88
88
|
* 所有请求共享的基础选项。
|
|
89
89
|
*/
|
|
90
|
-
interface
|
|
90
|
+
interface HttpBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType> {
|
|
91
91
|
baseURL?: string;
|
|
92
92
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
93
93
|
headers?: Record<string, string>;
|
|
@@ -110,19 +110,19 @@ interface VesselBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType>
|
|
|
110
110
|
retryStatusCodes?: number[];
|
|
111
111
|
ignoreResponseError?: boolean;
|
|
112
112
|
/**
|
|
113
|
-
* 中断信号,由 `
|
|
113
|
+
* 中断信号,由 `createHttpAborter()` 创建。
|
|
114
114
|
* 信号触发后请求会被中断;已中断的信号会让请求立即中断。
|
|
115
115
|
*/
|
|
116
|
-
signal?:
|
|
116
|
+
signal?: HttpAbortSignal;
|
|
117
117
|
/**
|
|
118
118
|
* 监听响应头(对应 task.onHeadersReceived)。
|
|
119
119
|
*/
|
|
120
120
|
onHeadersReceived?: (result: HeadersReceived) => void;
|
|
121
121
|
}
|
|
122
|
-
interface
|
|
122
|
+
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppRequestOptions {
|
|
123
123
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
124
124
|
}
|
|
125
|
-
interface
|
|
125
|
+
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppUploadOptions {
|
|
126
126
|
/**
|
|
127
127
|
* 文件对应的 key
|
|
128
128
|
* @default - 'file'
|
|
@@ -138,7 +138,7 @@ interface VesselUploadOptions<TRBType extends ResponseBodyType = ResponseBodyTyp
|
|
|
138
138
|
*/
|
|
139
139
|
onProgress?: (result: UniAppOnUploadProgress) => void;
|
|
140
140
|
}
|
|
141
|
-
interface
|
|
141
|
+
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends HttpBaseOptions<TRBType>, UniAppDownloadOptions {
|
|
142
142
|
/**
|
|
143
143
|
* 下载请求方法
|
|
144
144
|
* @default - 'GET'
|
|
@@ -149,86 +149,86 @@ interface VesselDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'>
|
|
|
149
149
|
*/
|
|
150
150
|
onProgress?: (result: UniAppDownloadProgress) => void;
|
|
151
151
|
}
|
|
152
|
-
type
|
|
153
|
-
type
|
|
152
|
+
type HttpURL = string;
|
|
153
|
+
type HttpOptions = HttpRequestOptions | HttpUploadOptions | HttpDownloadOptions;
|
|
154
154
|
//#endregion
|
|
155
|
-
//#region src/oiyo/
|
|
156
|
-
type
|
|
157
|
-
type
|
|
158
|
-
type
|
|
159
|
-
type
|
|
160
|
-
type
|
|
161
|
-
type
|
|
162
|
-
type
|
|
155
|
+
//#region src/oiyo/http/types/response.d.ts
|
|
156
|
+
type HttpRequestResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
157
|
+
type HttpUploadResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
158
|
+
type HttpDownloadResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = MappedResponseBodyType<TRBType, TRBody>;
|
|
159
|
+
type HttpRequestRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppRequestResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
160
|
+
type HttpUploadRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppUploadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
161
|
+
type HttpDownloadRawResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = UniAppDownloadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
162
|
+
type HttpRawResponse<T = any> = HttpRequestRawResponse<T> | HttpUploadRawResponse<T> | HttpDownloadRawResponse;
|
|
163
163
|
//#endregion
|
|
164
|
-
//#region src/oiyo/
|
|
165
|
-
interface
|
|
166
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
164
|
+
//#region src/oiyo/http/types/core.d.ts
|
|
165
|
+
interface HttpRequestMethod {
|
|
166
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpRequestOptions<TRBType> & {
|
|
167
167
|
raw: true;
|
|
168
|
-
}): Promise<
|
|
169
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
168
|
+
}): Promise<HttpRequestRawResponse<TRBody, TRBType>>;
|
|
169
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpRequestOptions<TRBType>): Promise<HttpRequestResponse<TRBody, TRBType>>;
|
|
170
170
|
}
|
|
171
|
-
interface
|
|
172
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
171
|
+
interface HttpUploadMethod {
|
|
172
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpUploadOptions<TRBType> & {
|
|
173
173
|
raw: true;
|
|
174
|
-
}): Promise<
|
|
175
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
174
|
+
}): Promise<HttpUploadRawResponse<TRBody, TRBType>>;
|
|
175
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpUploadOptions<TRBType>): Promise<HttpUploadResponse<TRBody, TRBType>>;
|
|
176
176
|
}
|
|
177
|
-
interface
|
|
178
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
177
|
+
interface HttpDownloadMethod {
|
|
178
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options: HttpDownloadOptions<TRBType> & {
|
|
179
179
|
raw: true;
|
|
180
|
-
}): Promise<
|
|
181
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
180
|
+
}): Promise<HttpDownloadRawResponse<TRBody, TRBType>>;
|
|
181
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options?: HttpDownloadOptions<TRBType>): Promise<HttpDownloadResponse<TRBody, TRBType>>;
|
|
182
182
|
}
|
|
183
|
-
interface
|
|
183
|
+
interface HttpHooks<TContextOptions, TResponse> {
|
|
184
184
|
onRequest?: (context: {
|
|
185
|
-
resource:
|
|
185
|
+
resource: HttpURL;
|
|
186
186
|
options: TContextOptions;
|
|
187
187
|
}) => MaybePromise<void>;
|
|
188
188
|
onRequestError?: (context: {
|
|
189
|
-
resource:
|
|
189
|
+
resource: HttpURL;
|
|
190
190
|
options: TContextOptions;
|
|
191
191
|
error: Error;
|
|
192
192
|
}) => MaybePromise<void>;
|
|
193
193
|
onResponse?: (context: {
|
|
194
|
-
resource:
|
|
194
|
+
resource: HttpURL;
|
|
195
195
|
options: TContextOptions;
|
|
196
196
|
response: TResponse;
|
|
197
197
|
}) => MaybePromise<void>;
|
|
198
198
|
onResponseError?: (context: {
|
|
199
|
-
resource:
|
|
199
|
+
resource: HttpURL;
|
|
200
200
|
options: TContextOptions;
|
|
201
201
|
response: TResponse;
|
|
202
202
|
}) => MaybePromise<void>;
|
|
203
203
|
}
|
|
204
|
-
interface
|
|
205
|
-
interface
|
|
206
|
-
resource?:
|
|
207
|
-
options?:
|
|
208
|
-
response?:
|
|
204
|
+
interface HttpConfig extends HttpBaseOptions<ResponseBodyType>, HttpHooks<HttpConfig, HttpRawResponse> {}
|
|
205
|
+
interface HttpError<T = any> extends Error {
|
|
206
|
+
resource?: HttpURL;
|
|
207
|
+
options?: HttpOptions;
|
|
208
|
+
response?: HttpRawResponse<T>;
|
|
209
209
|
data: T;
|
|
210
210
|
}
|
|
211
211
|
//#endregion
|
|
212
|
-
//#region src/oiyo/
|
|
213
|
-
interface
|
|
212
|
+
//#region src/oiyo/http/core.d.ts
|
|
213
|
+
interface Http {
|
|
214
214
|
/**
|
|
215
215
|
* 普通请求
|
|
216
216
|
*/
|
|
217
|
-
request:
|
|
217
|
+
request: HttpRequestMethod;
|
|
218
218
|
/**
|
|
219
219
|
* 文件上传
|
|
220
220
|
*/
|
|
221
|
-
upload:
|
|
221
|
+
upload: HttpUploadMethod;
|
|
222
222
|
/**
|
|
223
223
|
* 文件下载
|
|
224
224
|
*/
|
|
225
|
-
download:
|
|
225
|
+
download: HttpDownloadMethod;
|
|
226
226
|
/**
|
|
227
227
|
* 基于当前配置派生一个新实例。
|
|
228
228
|
*/
|
|
229
|
-
create: (config:
|
|
229
|
+
create: (config: HttpConfig) => Http;
|
|
230
230
|
}
|
|
231
|
-
declare function
|
|
232
|
-
declare const
|
|
231
|
+
declare function createHttp(globalConfig?: HttpConfig): Http;
|
|
232
|
+
declare const http: Http;
|
|
233
233
|
//#endregion
|
|
234
|
-
export {
|
|
234
|
+
export { HttpDownloadResponse as a, HttpDownloadOptions as c, ResponseBodyType as d, createHttpAborter as f, HttpError as i, HttpRequestOptions as l, http as n, HttpRequestResponse as o, HttpConfig as r, HttpUploadResponse as s, createHttp as t, HttpUploadOptions as u };
|
package/dist/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
require("./chunk-
|
|
9
|
-
const require_oiyo = require("./oiyo-
|
|
8
|
+
require("./chunk-BnILMwZG.cjs");
|
|
9
|
+
const require_oiyo = require("./oiyo-CZ64L3f6.cjs");
|
|
10
10
|
require("./uni.cjs");
|
|
11
11
|
require("./vue.cjs");
|
|
12
12
|
//#endregion
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
13
|
+
exports.createHttp = require_oiyo.createHttp;
|
|
14
|
+
exports.createHttpAborter = require_oiyo.createHttpAborter;
|
|
15
|
+
exports.http = require_oiyo.http;
|
|
16
16
|
var _dcloudio_uni_app = require("@dcloudio/uni-app");
|
|
17
17
|
Object.keys(_dcloudio_uni_app).forEach(function(k) {
|
|
18
18
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-DCAh9vr9.cjs";
|
|
8
8
|
export * from "@dcloudio/uni-app";
|
|
9
9
|
export * from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/index.d.ts
|
|
12
12
|
declare namespace index_d_exports {
|
|
13
|
-
export {
|
|
13
|
+
export { HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { type
|
|
16
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-DCAh9vr9.mjs";
|
|
8
8
|
export * from "@dcloudio/uni-app";
|
|
9
9
|
export * from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/index.d.ts
|
|
12
12
|
declare namespace index_d_exports {
|
|
13
|
-
export {
|
|
13
|
+
export { HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { type
|
|
16
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import { n as
|
|
7
|
+
import "./chunk-Bcqm9nz_.mjs";
|
|
8
|
+
import { n as http, r as createHttpAborter, t as createHttp } from "./oiyo-CUWG-Hhg.mjs";
|
|
9
9
|
import "./uni.mjs";
|
|
10
10
|
import "./vue.mjs";
|
|
11
11
|
export * from "@dcloudio/uni-app";
|
|
12
12
|
export * from "vue";
|
|
13
13
|
//#endregion
|
|
14
|
-
export {
|
|
14
|
+
export { createHttp, createHttpAborter, http };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
|
+
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
+
* Commercial software. See LICENSE for terms.
|
|
5
|
+
* Official site: https://oiyo.js.org
|
|
6
|
+
*/
|
|
7
|
+
const _0x2b5027=_0x167a;(function(_0x369913,_0x37e29a){const _0x481d05=_0x167a,_0x5c5bde=_0x369913();while(!![]){try{const _0x29de9c=-parseInt(_0x481d05(0x10e))/0x1*(parseInt(_0x481d05(0x119))/0x2)+parseInt(_0x481d05(0xfc))/0x3*(parseInt(_0x481d05(0x115))/0x4)+-parseInt(_0x481d05(0x107))/0x5*(-parseInt(_0x481d05(0xf4))/0x6)+-parseInt(_0x481d05(0xf7))/0x7+-parseInt(_0x481d05(0xd6))/0x8*(parseInt(_0x481d05(0x10b))/0x9)+parseInt(_0x481d05(0xd8))/0xa+parseInt(_0x481d05(0xe4))/0xb;if(_0x29de9c===_0x37e29a)break;else _0x5c5bde['push'](_0x5c5bde['shift']());}catch(_0x271def){_0x5c5bde['push'](_0x5c5bde['shift']());}}}(_0x1c3b,0x68e1c));function createHttpAborter(){const _0x5a8243=new HttpAbortSignal();return{'signal':_0x5a8243,'abort':_0x19de66=>_0x5a8243['_abort'](_0x19de66)};}const ABORT_ERROR_NAME='AbortError';var AbortEmitter=class{['listeners']=[];['addEventListener'](_0x1d14a1,_0x1e3382){const _0x3753ee=_0x167a;if(_0x1d14a1!=='abort')return;this[_0x3753ee(0xff)][_0x3753ee(0xd1)](_0x1e3382);}[_0x2b5027(0xd9)](_0x16eea4,_0x3c875d){const _0x2065c5=_0x2b5027;if(_0x16eea4!=='abort')return;const _0x228222=this[_0x2065c5(0xff)][_0x2065c5(0xdf)](_0x3c875d);if(_0x228222!==-0x1)this[_0x2065c5(0xff)]['splice'](_0x228222,0x1);}['emit'](_0x460a13){for(const _0x2fe4d6 of this['listeners']['slice']())_0x2fe4d6['call'](this,_0x460a13);}},HttpAbortSignal=class extends AbortEmitter{['aborted']=![];[_0x2b5027(0x106)]=void 0x0;['onabort']=null;[_0x2b5027(0xe2)](_0x50020c){const _0xc3e650=_0x2b5027;if(this['aborted'])return;this['aborted']=!![],this['reason']=_0x50020c===void 0x0?createAbortError():_0x50020c;const _0x2ee881={};_0x2ee881[_0xc3e650(0x11b)]=_0xc3e650(0xd4);const _0x46b8de=_0x2ee881;if(typeof this[_0xc3e650(0x10f)]==='function')this['onabort'](_0x46b8de);this['emit'](_0x46b8de);}['throwIfAborted'](){const _0x1e7d73=_0x2b5027;if(this[_0x1e7d73(0xdc)])throw this[_0x1e7d73(0x106)];}};function createAbortError(_0x3eefc0=_0x2b5027(0x101)){const _0xb82315=new Error(_0x3eefc0);return _0xb82315['name']=ABORT_ERROR_NAME,_0xb82315;}function isAbortError(_0x52a9aa){const _0x385137=_0x2b5027;return _0x52a9aa instanceof Error&&_0x52a9aa[_0x385137(0x108)]===ABORT_ERROR_NAME;}function onAbort(_0x38742e,_0x1714f4){const _0x7feeb8=_0x2b5027;if(!_0x38742e)return()=>{};if(_0x38742e[_0x7feeb8(0xdc)])return _0x1714f4(),()=>{};return _0x38742e[_0x7feeb8(0x114)](_0x7feeb8(0xd4),_0x1714f4),()=>_0x38742e['removeEventListener']('abort',_0x1714f4);}function _0x167a(_0x5661b0,_0x584ce0){_0x5661b0=_0x5661b0-0xc3;const _0x1c3b4d=_0x1c3b();let _0x167adf=_0x1c3b4d[_0x5661b0];return _0x167adf;}const HOOK_NAMES=['onRequest',_0x2b5027(0xe0),'onResponse','onResponseError'];function mergeOptions(..._0x3820dd){const _0x35614e=_0x2b5027,_0x4299c5={},_0x542a5c={};for(const _0x17c8c1 of _0x3820dd){if(!_0x17c8c1)continue;for(const _0x25d2f8 of HOOK_NAMES)collectHook(_0x542a5c,_0x25d2f8,_0x17c8c1);const _0x13ff84=_0x4299c5['headers'],_0x2cdfa5=_0x4299c5['query'];Object[_0x35614e(0xd7)](_0x4299c5,_0x17c8c1);const _0x267e82={..._0x13ff84,..._0x17c8c1['headers']};_0x4299c5['headers']=_0x267e82;const _0x215bff={..._0x2cdfa5,..._0x17c8c1[_0x35614e(0xea)]};_0x4299c5[_0x35614e(0xea)]=_0x215bff;}for(const [_0x449045,_0x20e1ef]of Object['entries'](_0x542a5c))Object['assign'](_0x4299c5,{[_0x449045]:async _0x17d19b=>{for(const _0x2afca4 of _0x20e1ef)await _0x2afca4(_0x17d19b);}});return _0x4299c5;}function collectHook(_0x29568b,_0x1207c8,_0x377d25){const _0x5212e6=_0x2b5027,_0x4b9611=_0x377d25[_0x1207c8];if(typeof _0x4b9611!==_0x5212e6(0xe1))return;_0x29568b[_0x1207c8]??=[],_0x29568b[_0x1207c8]['push'](_0x4b9611);}function dispatch(_0x44ea88,_0x2ac0e5,_0x13d576,_0x326236){const _0x1c7b88=_0x2b5027;let _0x69fbde;if(_0x44ea88===_0x1c7b88(0x116))_0x69fbde=dispatchUpload(_0x2ac0e5,_0x13d576,_0x326236);else{if(_0x44ea88==='download')_0x69fbde=dispatchDownload(_0x2ac0e5,_0x13d576,_0x326236);else _0x69fbde=dispatchRequest(_0x2ac0e5,_0x13d576,_0x326236);}bindTask(_0x69fbde,_0x13d576);}function bindTask(_0x51e77b,_0x3e9dc8){const _0x12f7b8=_0x2b5027;onAbort(_0x3e9dc8['signal'],()=>_0x51e77b[_0x12f7b8(0xd4)]());if(typeof _0x3e9dc8['onHeadersReceived']===_0x12f7b8(0xe1))_0x51e77b['onHeadersReceived'](_0x3e9dc8[_0x12f7b8(0xf5)]);const _0x310183=_0x3e9dc8[_0x12f7b8(0xcc)];if(typeof _0x310183==='function'&&_0x12f7b8(0xfa)in _0x51e77b)_0x51e77b[_0x12f7b8(0xfa)](_0x310183);}function _0x1c3b(){const _0x50c8b7=['enableHttpDNS','catch','onProgress','dataType','flatMap','create','onResponse','push','tempFilePath','includes','abort','data','8UTJXTA','assign','510640EBvjYt','removeEventListener','url','toUpperCase','aborted','HTTP\x20request\x20failed','json','indexOf','onRequestError','function','_abort','formData','13449623aHAgyf','timeout','method','filePath','arrayBuffer','fileType','query','ignoreResponseError','errMsg','retryStatusCodes','forceCellularNetwork','enableQuic','headers','number','request','enableChunked','335334ljHvWW','onHeadersReceived','files','3021270ODWxeO','defineProperty','signal','onProgressUpdate','message','3fRLyty','then','GET','listeners','replace','The\x20operation\x20was\x20aborted','has','response','test','onFail','reason','5UWEjWx','name','body','POST','3891996WFStVD','statusCode','isArray','4790BrpbMw','onabort','responseType','PATCH','onResponseError','enableCache','addEventListener','2710856ZUqEmW','upload','text','baseURL','298MPUcMC','join','type','download','<no\x20response>','resolve','arraybuffer','PUT','enableHttp2','startsWith'];_0x1c3b=function(){return _0x50c8b7;};return _0x1c3b();}function dispatchRequest(_0x1594c0,_0x421334,_0x2c7a59){const _0x41dc81=_0x2b5027,_0x3edf08={'url':_0x1594c0,'method':_0x421334[_0x41dc81(0xe6)],'header':_0x421334[_0x41dc81(0xf0)],'data':_0x421334[_0x41dc81(0x109)]??{},'timeout':_0x421334['timeout'],'dataType':_0x421334[_0x41dc81(0xcd)]||'json','responseType':mappedResponseBodyType(_0x421334['responseType']),'sslVerify':_0x421334['sslVerify'],'withCredentials':_0x421334['withCredentials'],'firstIpv4':_0x421334['firstIpv4'],'enableHttp2':_0x421334[_0x41dc81(0xc8)],'enableQuic':_0x421334[_0x41dc81(0xef)],'enableCache':_0x421334[_0x41dc81(0x113)],'enableHttpDNS':_0x421334[_0x41dc81(0xca)],'httpDNSServiceId':_0x421334['httpDNSServiceId'],'enableChunked':_0x421334[_0x41dc81(0xf3)],'forceCellularNetwork':_0x421334[_0x41dc81(0xee)],'success':_0x2c7a59['onSuccess'],'fail':_0x2c7a59[_0x41dc81(0x105)],'complete':()=>{}};return uni['request'](_0x3edf08);}function dispatchUpload(_0x255ff5,_0x34f365,_0x4c7282){const _0x422fda=_0x2b5027,_0x13b266={};_0x13b266[_0x422fda(0xda)]=_0x255ff5,_0x13b266[_0x422fda(0xe9)]=_0x34f365['fileType'],_0x13b266['file']=_0x34f365['file'],_0x13b266['filePath']=_0x34f365[_0x422fda(0xe7)],_0x13b266['name']=_0x34f365['name']??'file',_0x13b266[_0x422fda(0xf6)]=_0x34f365[_0x422fda(0xf6)],_0x13b266['header']=_0x34f365[_0x422fda(0xf0)],_0x13b266[_0x422fda(0xe3)]=_0x34f365[_0x422fda(0x109)]??{},_0x13b266['timeout']=_0x34f365[_0x422fda(0xe5)],_0x13b266['success']=_0x4c7282['onSuccess'],_0x13b266['fail']=_0x4c7282[_0x422fda(0x105)],_0x13b266['complete']=()=>{};const _0x140615=_0x13b266;return uni['uploadFile'](_0x140615);}function dispatchDownload(_0x597dd8,_0x29b619,_0x574c10){const _0x45c597=_0x2b5027,_0x461ac6={'url':_0x597dd8,'header':_0x29b619['headers'],'timeout':_0x29b619[_0x45c597(0xe5)],'success':_0x36bee4=>{const _0x3aa507=_0x45c597,_0x498ac2={..._0x36bee4};_0x498ac2[_0x3aa507(0xd5)]={},_0x498ac2[_0x3aa507(0xd5)][_0x3aa507(0xd2)]=_0x36bee4['tempFilePath'],_0x574c10['onSuccess'](_0x498ac2);},'fail':_0x574c10['onFail'],'complete':()=>{}};return uni['downloadFile'](_0x461ac6);}function mappedResponseBodyType(_0x1b4f4a){const _0x108aaa=_0x2b5027;if(!_0x1b4f4a||_0x1b4f4a==='json')return'text';if(_0x1b4f4a===_0x108aaa(0xe8))return _0x108aaa(0xc6);return _0x108aaa(0x117);}var HttpError=class extends Error{constructor(_0x149bb2){super(_0x149bb2),this['name']='HttpError';}};function createResponseError(_0x1aebad,_0x14b814,_0x749082){const _0x150b8a=_0x2b5027,_0x3887f3=_0x1aebad,_0x42b20d='['+(_0x14b814?.['method']||'GET')+']\x20'+_0x3887f3,_0x5beff7=_0x749082?_0x749082[_0x150b8a(0x10c)]+'\x20'+(_0x749082[_0x150b8a(0xec)]||''):_0x150b8a(0xc4),_0x5a661d=_0x749082?JSON['stringify'](_0x749082[_0x150b8a(0xd5)]):'<no\x20response\x20body>',_0x464136=new HttpError(_0x42b20d+':\x20'+_0x5beff7+(_0x749082['data']?'\x20'+_0x5a661d:''));for(const _0x577157 of['request','options',_0x150b8a(0x103),'data'])Object[_0x150b8a(0xf8)](_0x464136,_0x577157,{'get'(){const _0x40ee5f=_0x150b8a,_0x12032e={};return _0x12032e[_0x40ee5f(0xf2)]=_0x1aebad,_0x12032e['options']=_0x14b814,_0x12032e['response']=_0x749082,_0x12032e['data']=_0x749082[_0x40ee5f(0xd5)],_0x12032e[_0x577157];}});return _0x464136;}function normalizeError(_0x47dca7){const _0x2e551b=_0x2b5027;if(_0x47dca7 instanceof Error)return _0x47dca7;return Object[_0x2e551b(0xd7)](new Error(_0x47dca7?.[_0x2e551b(0xec)]||_0x47dca7?.[_0x2e551b(0xfb)]||_0x2e551b(0xdd)),{'cause':_0x47dca7});}async function callRequestHooks(_0x19ded4,_0x4768ae){await _0x4768ae['onRequest']?.({'options':_0x4768ae,'resource':_0x19ded4});}async function callRequestErrorHooks(_0x2b2afd,_0x21d50d,_0x46e6fd){await _0x21d50d['onRequestError']?.({'options':_0x21d50d,'resource':_0x2b2afd,'error':_0x46e6fd});}async function callResponseHooks(_0xd08b59,_0x1f164a,_0x994454){const _0x1e3fcd=_0x2b5027;await _0x1f164a[_0x1e3fcd(0xd0)]?.({'options':_0x1f164a,'resource':_0xd08b59,'response':_0x994454});}async function callResponseErrorHooks(_0x591c48,_0x4ea977,_0x4ac985){const _0x481cf4=_0x2b5027;await _0x4ea977[_0x481cf4(0x112)]?.({'options':_0x4ea977,'resource':_0x591c48,'response':_0x4ac985});}async function refineResponse(_0x4da2d7,_0x5708ac){const _0x2e97c0=_0x2b5027;if(_0x5708ac[_0x2e97c0(0x110)]==='json'||!_0x5708ac['responseType'])return{..._0x4da2d7,'data':await parseJSONResponse(_0x4da2d7['data'],_0x5708ac)};return _0x4da2d7;}function parseJSONResponse(_0x1c5bbd,_0xf954a5){if(typeof _0x1c5bbd!=='string')return _0x1c5bbd;if(_0xf954a5['parseResponse'])return _0xf954a5['parseResponse'](_0x1c5bbd);return _0x1c5bbd?JSON['parse'](_0x1c5bbd):null;}function isResponseError(_0x471b14){const _0x565c17=_0x2b5027,_0x19a6c5='statusCode'in _0x471b14?_0x471b14[_0x565c17(0x10c)]:void 0x0;return typeof _0x19a6c5===_0x565c17(0xf1)&&(_0x19a6c5<0xc8||_0x19a6c5>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x2b5027(0x10a),_0x2b5027(0xc7),'DELETE',_0x2b5027(0x111)]);async function withRetry(_0x272f73,_0x29fd77){const _0x1adf15=_0x2b5027,_0x341cbd=resolveRetryCount(_0x272f73);for(let _0x48fe33=0x0;;_0x48fe33++)try{return await _0x29fd77();}catch(_0x2fd81c){if(_0x48fe33>=_0x341cbd||!shouldRetry(_0x2fd81c,_0x272f73))throw _0x2fd81c;await sleep(_0x272f73['retryDelay']??0x0,_0x272f73[_0x1adf15(0xf9)]);}}function resolveRetryCount(_0x1e67f1){const {retry:_0x532595}=_0x1e67f1;if(_0x532595===![])return 0x0;if(typeof _0x532595==='number')return _0x532595>0x0?_0x532595:0x0;return isPayloadMethod(_0x1e67f1['method'])?0x0:0x1;}function shouldRetry(_0x296f7e,_0x30f08b){const _0x5f4932=_0x2b5027;if(_0x30f08b[_0x5f4932(0xf9)]?.['aborted']||isAbortError(_0x296f7e))return![];const _0x5cc7c9=_0x296f7e?.[_0x5f4932(0x103)]?.[_0x5f4932(0x10c)];if(typeof _0x5cc7c9!=='number')return!![];return(_0x30f08b[_0x5f4932(0xed)]??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x5cc7c9);}function isPayloadMethod(_0xdaf9fc){const _0x18bd6f=_0x2b5027;return!!_0xdaf9fc&&PAYLOAD_METHODS[_0x18bd6f(0x102)](_0xdaf9fc[_0x18bd6f(0xdb)]());}function sleep(_0x222eb3,_0x1ef38c){return new Promise((_0x28ec9a,_0x4ccc73)=>{const _0x11f9e1=_0x167a;if(_0x1ef38c?.[_0x11f9e1(0xdc)]){_0x4ccc73(_0x1ef38c['reason']);return;}if(!(_0x222eb3>0x0)){_0x28ec9a();return;}let _0x7332ae=()=>{};const _0xf1f75d=setTimeout(()=>{_0x7332ae(),_0x28ec9a();},_0x222eb3);_0x7332ae=onAbort(_0x1ef38c,()=>{clearTimeout(_0xf1f75d),_0x4ccc73(_0x1ef38c['reason']);});});}function buildURL(_0x201eb2,_0x2a07a9){const _0x1cfcc2=_0x2b5027,_0x445420=joinURL(_0x2a07a9[_0x1cfcc2(0x118)],_0x201eb2),_0x4e843f=_0x2a07a9['query']??{},_0x3cc429=Object['keys'](_0x4e843f)['filter'](_0x25b573=>_0x4e843f[_0x25b573]!==void 0x0)[_0x1cfcc2(0xce)](_0x2756e9=>{const _0x1f5fb9=_0x1cfcc2,_0x52f1a9=_0x4e843f[_0x2756e9];return(Array[_0x1f5fb9(0x10d)](_0x52f1a9)?_0x52f1a9:[_0x52f1a9])['map'](_0xd5d5c5=>encodeURIComponent(_0x2756e9)+'='+encodeURIComponent(String(_0xd5d5c5)));})[_0x1cfcc2(0x11a)]('&');if(!_0x3cc429)return _0x445420;return''+_0x445420+(_0x445420[_0x1cfcc2(0xd3)]('?')?'&':'?')+_0x3cc429;}function joinURL(_0x392199,_0xd1268b){const _0x22cddb=_0x2b5027;if(!_0x392199||isAbsoluteURL(_0xd1268b))return _0xd1268b;return _0x392199['replace'](/\/+$/,'')+'/'+_0xd1268b[_0x22cddb(0x100)](/^\/+/,'');}function isAbsoluteURL(_0x19be06){const _0x121396=_0x2b5027;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x121396(0x104)](_0x19be06)||_0x19be06[_0x121396(0xc9)]('//');}function dispatchHttp(_0x3cdeaa,_0x5d2330,_0x221b47){const _0x4b121e=buildURL(_0x5d2330,_0x221b47);return withRetry(_0x221b47,()=>attemptRequest(_0x3cdeaa,_0x5d2330,_0x4b121e,_0x221b47));}function attemptRequest(_0x21d6d0,_0x513be7,_0x44cc30,_0x3a717d){const _0x31abf4=!!_0x3a717d['raw'];return new Promise((_0x33a20d,_0xbe2fa9)=>{const _0x4a52b6=_0x167a;let _0x53994c=![];const _0x58382f=_0x1c3808=>{if(_0x53994c)return;_0x53994c=!![],_0x1c3808();},_0x3f6362=onAbort(_0x3a717d['signal'],()=>{const _0x52d034=_0x167a;_0x58382f(()=>_0xbe2fa9(_0x3a717d['signal'][_0x52d034(0x106)]));}),_0x94bf9b=_0x5b89fe=>{_0x3f6362(),_0x58382f(_0x5b89fe);};callRequestHooks(_0x513be7,_0x3a717d)[_0x4a52b6(0xfd)](()=>{if(_0x53994c)return;dispatch(_0x21d6d0,_0x44cc30,_0x3a717d,{'onSuccess':_0x3ab3cf=>{Promise['resolve']()['then'](()=>refineResponse(_0x3ab3cf,_0x3a717d))['then'](async _0x4ab5cd=>{const _0x19dde6=_0x167a;if(isResponseError(_0x3ab3cf)){await callResponseErrorHooks(_0x513be7,_0x3a717d,_0x4ab5cd);if(!_0x3a717d[_0x19dde6(0xeb)])throw createResponseError(_0x513be7,_0x3a717d,_0x4ab5cd);}else await callResponseHooks(_0x513be7,_0x3a717d,_0x4ab5cd);_0x94bf9b(()=>_0x33a20d(_0x31abf4?_0x4ab5cd:_0x4ab5cd['data']));})['catch'](_0x3cbbb7=>_0x94bf9b(()=>_0xbe2fa9(_0x3cbbb7)));},'onFail':_0x3234b2=>{const _0x4796f8=_0x167a;Promise[_0x4796f8(0xc5)]()[_0x4796f8(0xfd)](async()=>{const _0x184679=normalizeError(_0x3234b2);if(!isAbortError(_0x184679))await callRequestErrorHooks(_0x513be7,_0x3a717d,_0x184679);throw _0x184679;})[_0x4796f8(0xcb)](_0x36a984=>_0x94bf9b(()=>_0xbe2fa9(_0x36a984)));}});})[_0x4a52b6(0xcb)](async _0x12011b=>{const _0x432976=normalizeError(_0x12011b);await callRequestErrorHooks(_0x513be7,_0x3a717d,_0x432976),_0x94bf9b(()=>_0xbe2fa9(_0x432976));});});}const _0x15a9f7={};_0x15a9f7['method']=_0x2b5027(0xfe),_0x15a9f7['responseType']=_0x2b5027(0xde);const defaultConfig=_0x15a9f7;function createHttp(_0x54e2ce={}){const _0x3aadf4=_0x2b5027,_0x52a994=(_0x210d5f,_0x38c05c)=>{const _0x3207f8=_0x167a;return dispatchHttp(_0x3207f8(0xf2),_0x210d5f,mergeOptions(defaultConfig,_0x54e2ce,_0x38c05c));},_0x53a720=(_0x59770d,_0x52af02)=>{const _0x52b156=_0x167a,_0x44400c={};return _0x44400c['method']=_0x52b156(0x10a),dispatchHttp(_0x52b156(0x116),_0x59770d,mergeOptions(defaultConfig,_0x54e2ce,_0x52af02,_0x44400c));},_0x268a29=(_0x462177,_0x2f6f20)=>{const _0x47567a=_0x167a,_0x11bf67={};return _0x11bf67[_0x47567a(0xe6)]=_0x47567a(0xfe),dispatchHttp(_0x47567a(0xc3),_0x462177,mergeOptions(defaultConfig,_0x54e2ce,_0x2f6f20,_0x11bf67));},_0x343296=_0x5d0dab=>createHttp(mergeOptions(_0x54e2ce,_0x5d0dab)),_0x41cd82={};return _0x41cd82[_0x3aadf4(0xf2)]=_0x52a994,_0x41cd82[_0x3aadf4(0x116)]=_0x53a720,_0x41cd82['download']=_0x268a29,_0x41cd82[_0x3aadf4(0xcf)]=_0x343296,_0x41cd82;}const http=createHttp();export{http as n,createHttpAborter as r,createHttp as t};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
|
+
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
+
* Commercial software. See LICENSE for terms.
|
|
5
|
+
* Official site: https://oiyo.js.org
|
|
6
|
+
*/
|
|
7
|
+
const _0x351574=_0x5285;(function(_0x3dda41,_0x134864){const _0x654f75=_0x5285,_0x3e58da=_0x3dda41();while(!![]){try{const _0x306b2d=parseInt(_0x654f75(0x1be))/0x1*(parseInt(_0x654f75(0x1c9))/0x2)+-parseInt(_0x654f75(0x1c8))/0x3+-parseInt(_0x654f75(0x1ec))/0x4*(parseInt(_0x654f75(0x1e9))/0x5)+parseInt(_0x654f75(0x1b9))/0x6*(parseInt(_0x654f75(0x1c2))/0x7)+parseInt(_0x654f75(0x1fc))/0x8*(parseInt(_0x654f75(0x1f0))/0x9)+parseInt(_0x654f75(0x1d0))/0xa*(parseInt(_0x654f75(0x1fb))/0xb)+-parseInt(_0x654f75(0x210))/0xc;if(_0x306b2d===_0x134864)break;else _0x3e58da['push'](_0x3e58da['shift']());}catch(_0x503577){_0x3e58da['push'](_0x3e58da['shift']());}}}(_0x3192,0xad737));function createHttpAborter(){const _0x97092a=_0x5285,_0xa00505=new HttpAbortSignal();return{'signal':_0xa00505,'abort':_0x22b86c=>_0xa00505[_0x97092a(0x1dc)](_0x22b86c)};}const ABORT_ERROR_NAME='AbortError';var AbortEmitter=class{['listeners']=[];['addEventListener'](_0x1780b4,_0x3da2ed){const _0x3e81ef=_0x5285;if(_0x1780b4!==_0x3e81ef(0x1d9))return;this['listeners']['push'](_0x3da2ed);}[_0x351574(0x1bc)](_0x326a39,_0x5de996){const _0x711962=_0x351574;if(_0x326a39!==_0x711962(0x1d9))return;const _0x5e0cd1=this[_0x711962(0x1ee)][_0x711962(0x1f2)](_0x5de996);if(_0x5e0cd1!==-0x1)this[_0x711962(0x1ee)]['splice'](_0x5e0cd1,0x1);}['emit'](_0x302124){for(const _0x14d9c3 of this['listeners']['slice']())_0x14d9c3['call'](this,_0x302124);}},HttpAbortSignal=class extends AbortEmitter{[_0x351574(0x1cb)]=![];['reason']=void 0x0;['onabort']=null;['_abort'](_0x59c7e7){const _0xfbf602=_0x351574;if(this[_0xfbf602(0x1cb)])return;this['aborted']=!![],this[_0xfbf602(0x1ff)]=_0x59c7e7===void 0x0?createAbortError():_0x59c7e7;const _0x31b093={};_0x31b093[_0xfbf602(0x1c1)]=_0xfbf602(0x1d9);const _0x5648ad=_0x31b093;if(typeof this['onabort']==='function')this['onabort'](_0x5648ad);this[_0xfbf602(0x204)](_0x5648ad);}['throwIfAborted'](){const _0x24588c=_0x351574;if(this[_0x24588c(0x1cb)])throw this['reason'];}};function createAbortError(_0x9abc1e='The\x20operation\x20was\x20aborted'){const _0x232a3b=_0x351574,_0x3c8361=new Error(_0x9abc1e);return _0x3c8361[_0x232a3b(0x209)]=ABORT_ERROR_NAME,_0x3c8361;}function isAbortError(_0x382d76){const _0x1096ff=_0x351574;return _0x382d76 instanceof Error&&_0x382d76[_0x1096ff(0x209)]===ABORT_ERROR_NAME;}function onAbort(_0x4a2ab3,_0x2d0a9d){const _0x3e81c8=_0x351574;if(!_0x4a2ab3)return()=>{};if(_0x4a2ab3['aborted'])return _0x2d0a9d(),()=>{};return _0x4a2ab3[_0x3e81c8(0x1da)](_0x3e81c8(0x1d9),_0x2d0a9d),()=>_0x4a2ab3[_0x3e81c8(0x1bc)]('abort',_0x2d0a9d);}const HOOK_NAMES=['onRequest',_0x351574(0x1df),'onResponse','onResponseError'];function mergeOptions(..._0x2cc5cd){const _0x3a4cdd=_0x351574,_0x2b672c={},_0xa58b46={};for(const _0x3f4b87 of _0x2cc5cd){if(!_0x3f4b87)continue;for(const _0x7f763c of HOOK_NAMES)collectHook(_0xa58b46,_0x7f763c,_0x3f4b87);const _0x1d67e0=_0x2b672c['headers'],_0x46474f=_0x2b672c[_0x3a4cdd(0x20f)];Object[_0x3a4cdd(0x1e7)](_0x2b672c,_0x3f4b87);const _0x5378ec={..._0x1d67e0,..._0x3f4b87['headers']};_0x2b672c['headers']=_0x5378ec;const _0x3cbc7d={..._0x46474f,..._0x3f4b87[_0x3a4cdd(0x20f)]};_0x2b672c['query']=_0x3cbc7d;}for(const [_0x3d89f3,_0x191ac0]of Object['entries'](_0xa58b46))Object['assign'](_0x2b672c,{[_0x3d89f3]:async _0x1105de=>{for(const _0x4b290c of _0x191ac0)await _0x4b290c(_0x1105de);}});return _0x2b672c;}function collectHook(_0x4e63d8,_0x1e80ec,_0x56fab2){const _0x46234d=_0x351574,_0x51ea2a=_0x56fab2[_0x1e80ec];if(typeof _0x51ea2a!==_0x46234d(0x1d3))return;_0x4e63d8[_0x1e80ec]??=[],_0x4e63d8[_0x1e80ec][_0x46234d(0x1f6)](_0x51ea2a);}function dispatch(_0x55bc4,_0x1d7822,_0x14ca55,_0x5928a9){let _0x55e044;if(_0x55bc4==='upload')_0x55e044=dispatchUpload(_0x1d7822,_0x14ca55,_0x5928a9);else{if(_0x55bc4==='download')_0x55e044=dispatchDownload(_0x1d7822,_0x14ca55,_0x5928a9);else _0x55e044=dispatchRequest(_0x1d7822,_0x14ca55,_0x5928a9);}bindTask(_0x55e044,_0x14ca55);}function bindTask(_0x22c745,_0x1d119b){const _0xeb36b2=_0x351574;onAbort(_0x1d119b['signal'],()=>_0x22c745['abort']());if(typeof _0x1d119b['onHeadersReceived']===_0xeb36b2(0x1d3))_0x22c745[_0xeb36b2(0x1e6)](_0x1d119b['onHeadersReceived']);const _0x5b1125=_0x1d119b[_0xeb36b2(0x1c5)];if(typeof _0x5b1125===_0xeb36b2(0x1d3)&&'onProgressUpdate'in _0x22c745)_0x22c745[_0xeb36b2(0x1d5)](_0x5b1125);}function dispatchRequest(_0x4b2309,_0x8e2a75,_0xf439ec){const _0x338e01=_0x351574,_0x2b5a99={'url':_0x4b2309,'method':_0x8e2a75[_0x338e01(0x202)],'header':_0x8e2a75[_0x338e01(0x1f4)],'data':_0x8e2a75['body']??{},'timeout':_0x8e2a75[_0x338e01(0x1f8)],'dataType':_0x8e2a75['dataType']||_0x338e01(0x1cd),'responseType':mappedResponseBodyType(_0x8e2a75['responseType']),'sslVerify':_0x8e2a75[_0x338e01(0x1e3)],'withCredentials':_0x8e2a75['withCredentials'],'firstIpv4':_0x8e2a75[_0x338e01(0x1bd)],'enableHttp2':_0x8e2a75['enableHttp2'],'enableQuic':_0x8e2a75[_0x338e01(0x1d2)],'enableCache':_0x8e2a75['enableCache'],'enableHttpDNS':_0x8e2a75[_0x338e01(0x1ea)],'httpDNSServiceId':_0x8e2a75['httpDNSServiceId'],'enableChunked':_0x8e2a75['enableChunked'],'forceCellularNetwork':_0x8e2a75[_0x338e01(0x1e8)],'success':_0xf439ec[_0x338e01(0x1ba)],'fail':_0xf439ec['onFail'],'complete':()=>{}};return uni['request'](_0x2b5a99);}function dispatchUpload(_0x53cc8d,_0x5e74b9,_0x2ac009){const _0xc9a1a2=_0x351574,_0x128c5c={};_0x128c5c[_0xc9a1a2(0x1d7)]=_0x53cc8d,_0x128c5c['fileType']=_0x5e74b9['fileType'],_0x128c5c['file']=_0x5e74b9['file'],_0x128c5c[_0xc9a1a2(0x1f3)]=_0x5e74b9['filePath'],_0x128c5c[_0xc9a1a2(0x209)]=_0x5e74b9['name']??'file',_0x128c5c[_0xc9a1a2(0x1db)]=_0x5e74b9[_0xc9a1a2(0x1db)],_0x128c5c[_0xc9a1a2(0x1e0)]=_0x5e74b9['headers'],_0x128c5c[_0xc9a1a2(0x1c0)]=_0x5e74b9['body']??{},_0x128c5c[_0xc9a1a2(0x1f8)]=_0x5e74b9[_0xc9a1a2(0x1f8)],_0x128c5c[_0xc9a1a2(0x1cf)]=_0x2ac009[_0xc9a1a2(0x1ba)],_0x128c5c[_0xc9a1a2(0x20e)]=_0x2ac009['onFail'],_0x128c5c[_0xc9a1a2(0x1f9)]=()=>{};const _0x5d9b1d=_0x128c5c;return uni[_0xc9a1a2(0x1ca)](_0x5d9b1d);}function dispatchDownload(_0x1bf236,_0x1a1f29,_0x199441){const _0x566d45=_0x351574,_0x48f6e5={'url':_0x1bf236,'header':_0x1a1f29['headers'],'timeout':_0x1a1f29[_0x566d45(0x1f8)],'success':_0xdae9b2=>{const _0x39711e=_0x566d45,_0x978b60={..._0xdae9b2};_0x978b60[_0x39711e(0x1cc)]={},_0x978b60[_0x39711e(0x1cc)][_0x39711e(0x203)]=_0xdae9b2['tempFilePath'],_0x199441['onSuccess'](_0x978b60);},'fail':_0x199441[_0x566d45(0x1c6)],'complete':()=>{}};return uni[_0x566d45(0x1e1)](_0x48f6e5);}function mappedResponseBodyType(_0x28d927){const _0x20de18=_0x351574;if(!_0x28d927||_0x28d927===_0x20de18(0x1cd))return _0x20de18(0x1d6);if(_0x28d927==='arrayBuffer')return'arraybuffer';return'text';}var HttpError=class extends Error{constructor(_0x70f2ed){const _0x4a601a=_0x351574;super(_0x70f2ed),this['name']=_0x4a601a(0x211);}};function createResponseError(_0x13895c,_0x45c0e0,_0x3968e9){const _0x5b79de=_0x351574,_0x332078=_0x13895c,_0x5d3d11='['+(_0x45c0e0?.[_0x5b79de(0x202)]||'GET')+']\x20'+_0x332078,_0x3b278a=_0x3968e9?_0x3968e9['statusCode']+'\x20'+(_0x3968e9[_0x5b79de(0x1e2)]||''):'<no\x20response>',_0x30484f=_0x3968e9?JSON['stringify'](_0x3968e9['data']):_0x5b79de(0x1f7),_0x4e8bdb=new HttpError(_0x5d3d11+':\x20'+_0x3b278a+(_0x3968e9['data']?'\x20'+_0x30484f:''));for(const _0x1cb020 of['request','options',_0x5b79de(0x206),_0x5b79de(0x1cc)])Object[_0x5b79de(0x1bb)](_0x4e8bdb,_0x1cb020,{'get'(){const _0x41dbcb=_0x5b79de,_0x3d3862={};return _0x3d3862[_0x41dbcb(0x1de)]=_0x13895c,_0x3d3862[_0x41dbcb(0x1c7)]=_0x45c0e0,_0x3d3862['response']=_0x3968e9,_0x3d3862['data']=_0x3968e9[_0x41dbcb(0x1cc)],_0x3d3862[_0x1cb020];}});return _0x4e8bdb;}function normalizeError(_0x2d12d0){if(_0x2d12d0 instanceof Error)return _0x2d12d0;return Object['assign'](new Error(_0x2d12d0?.['errMsg']||_0x2d12d0?.['message']||'HTTP\x20request\x20failed'),{'cause':_0x2d12d0});}async function callRequestHooks(_0x5adcaa,_0x59040b){await _0x59040b['onRequest']?.({'options':_0x59040b,'resource':_0x5adcaa});}async function callRequestErrorHooks(_0xb96117,_0x4e2277,_0x481625){await _0x4e2277['onRequestError']?.({'options':_0x4e2277,'resource':_0xb96117,'error':_0x481625});}async function callResponseHooks(_0x4a72e9,_0x43a748,_0xc72657){const _0x2fef8f=_0x351574;await _0x43a748[_0x2fef8f(0x1dd)]?.({'options':_0x43a748,'resource':_0x4a72e9,'response':_0xc72657});}async function callResponseErrorHooks(_0xfc7503,_0x103eb4,_0x2288d2){const _0x165a83=_0x351574;await _0x103eb4[_0x165a83(0x20d)]?.({'options':_0x103eb4,'resource':_0xfc7503,'response':_0x2288d2});}async function refineResponse(_0x38dd83,_0x4223c3){const _0x36464f=_0x351574;if(_0x4223c3[_0x36464f(0x1c4)]===_0x36464f(0x1cd)||!_0x4223c3[_0x36464f(0x1c4)])return{..._0x38dd83,'data':await parseJSONResponse(_0x38dd83[_0x36464f(0x1cc)],_0x4223c3)};return _0x38dd83;}function parseJSONResponse(_0x3cd3ef,_0x402e33){const _0x2429d9=_0x351574;if(typeof _0x3cd3ef!=='string')return _0x3cd3ef;if(_0x402e33['parseResponse'])return _0x402e33[_0x2429d9(0x205)](_0x3cd3ef);return _0x3cd3ef?JSON[_0x2429d9(0x212)](_0x3cd3ef):null;}function isResponseError(_0x4e6002){const _0x34df53=_0x351574,_0x1bdd85=_0x34df53(0x1fd)in _0x4e6002?_0x4e6002[_0x34df53(0x1fd)]:void 0x0;return typeof _0x1bdd85==='number'&&(_0x1bdd85<0xc8||_0x1bdd85>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST','PUT','DELETE',_0x351574(0x207)]);async function withRetry(_0x59edb3,_0x32970a){const _0x258cb4=_0x351574,_0x227341=resolveRetryCount(_0x59edb3);for(let _0x3ca263=0x0;;_0x3ca263++)try{return await _0x32970a();}catch(_0xb1b8f6){if(_0x3ca263>=_0x227341||!shouldRetry(_0xb1b8f6,_0x59edb3))throw _0xb1b8f6;await sleep(_0x59edb3[_0x258cb4(0x1c3)]??0x0,_0x59edb3['signal']);}}function resolveRetryCount(_0xfbd84f){const {retry:_0x24f350}=_0xfbd84f;if(_0x24f350===![])return 0x0;if(typeof _0x24f350==='number')return _0x24f350>0x0?_0x24f350:0x0;return isPayloadMethod(_0xfbd84f['method'])?0x0:0x1;}function shouldRetry(_0x351c59,_0x5a14d2){const _0x244442=_0x351574;if(_0x5a14d2['signal']?.['aborted']||isAbortError(_0x351c59))return![];const _0x34ac20=_0x351c59?.['response']?.[_0x244442(0x1fd)];if(typeof _0x34ac20!==_0x244442(0x1fe))return!![];return(_0x5a14d2['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x34ac20);}function isPayloadMethod(_0x312403){return!!_0x312403&&PAYLOAD_METHODS['has'](_0x312403['toUpperCase']());}function sleep(_0x1cea43,_0x3aba64){return new Promise((_0x3544a1,_0x1a7273)=>{const _0x465650=_0x5285;if(_0x3aba64?.['aborted']){_0x1a7273(_0x3aba64[_0x465650(0x1ff)]);return;}if(!(_0x1cea43>0x0)){_0x3544a1();return;}let _0x35f8a8=()=>{};const _0x59a2d1=setTimeout(()=>{_0x35f8a8(),_0x3544a1();},_0x1cea43);_0x35f8a8=onAbort(_0x3aba64,()=>{const _0x3731df=_0x465650;clearTimeout(_0x59a2d1),_0x1a7273(_0x3aba64[_0x3731df(0x1ff)]);});});}function buildURL(_0x3a3101,_0x341a47){const _0x558409=_0x351574,_0xfbdddd=joinURL(_0x341a47[_0x558409(0x201)],_0x3a3101),_0x58d150=_0x341a47[_0x558409(0x20f)]??{},_0x2f5010=Object[_0x558409(0x1fa)](_0x58d150)[_0x558409(0x1d1)](_0x139ae8=>_0x58d150[_0x139ae8]!==void 0x0)[_0x558409(0x1eb)](_0x2992ce=>{const _0x1eeb56=_0x558409,_0x2fa4a9=_0x58d150[_0x2992ce];return(Array[_0x1eeb56(0x1ef)](_0x2fa4a9)?_0x2fa4a9:[_0x2fa4a9])['map'](_0x413df2=>encodeURIComponent(_0x2992ce)+'='+encodeURIComponent(String(_0x413df2)));})['join']('&');if(!_0x2f5010)return _0xfbdddd;return''+_0xfbdddd+(_0xfbdddd[_0x558409(0x208)]('?')?'&':'?')+_0x2f5010;}function joinURL(_0xc9c725,_0x5c5f4b){const _0x5416d7=_0x351574;if(!_0xc9c725||isAbsoluteURL(_0x5c5f4b))return _0x5c5f4b;return _0xc9c725[_0x5416d7(0x20c)](/\/+$/,'')+'/'+_0x5c5f4b['replace'](/^\/+/,'');}function _0x3192(){const _0x320e1a=['createHttpAborter','baseURL','method','tempFilePath','emit','parseResponse','response','PATCH','includes','name','http','test','replace','onResponseError','fail','query','15123144jlAnLe','HttpError','parse','6738048RErlwD','onSuccess','defineProperty','removeEventListener','firstIpv4','1zIaQRD','resolve','formData','type','7fMmGVE','retryDelay','responseType','onProgress','onFail','options','3458793dAXUyE','2109010zVdftr','uploadFile','aborted','data','json','GET','success','10RPeexx','filter','enableQuic','function','catch','onProgressUpdate','text','url','ignoreResponseError','abort','addEventListener','files','_abort','onResponse','request','onRequestError','header','downloadFile','errMsg','sslVerify','create','enumerable','onHeadersReceived','assign','forceCellularNetwork','5yCBSUn','enableHttpDNS','flatMap','2491400ToKVZZ','download','listeners','isArray','64791TCjgSo','createHttp','indexOf','filePath','headers','upload','push','<no\x20response\x20body>','timeout','complete','keys','15437488odBFLk','184cOvrfM','statusCode','number','reason'];_0x3192=function(){return _0x320e1a;};return _0x3192();}function isAbsoluteURL(_0x5ccea9){const _0xb1a615=_0x351574;return/^[a-z][a-z\d+\-.]*:\/\//i[_0xb1a615(0x20b)](_0x5ccea9)||_0x5ccea9['startsWith']('//');}function dispatchHttp(_0x461db6,_0x3b6e1e,_0x247ea3){const _0x68a1fd=buildURL(_0x3b6e1e,_0x247ea3);return withRetry(_0x247ea3,()=>attemptRequest(_0x461db6,_0x3b6e1e,_0x68a1fd,_0x247ea3));}function attemptRequest(_0x4e39c3,_0x1e5cc2,_0x2c368e,_0x3011b5){const _0x19cba3=!!_0x3011b5['raw'];return new Promise((_0x355fb3,_0x5353d4)=>{let _0x7773e5=![];const _0x37f1a5=_0x2e573a=>{if(_0x7773e5)return;_0x7773e5=!![],_0x2e573a();},_0x10ff81=onAbort(_0x3011b5['signal'],()=>{const _0x318cb3=_0x5285;_0x37f1a5(()=>_0x5353d4(_0x3011b5['signal'][_0x318cb3(0x1ff)]));}),_0x13ba6a=_0x242e84=>{_0x10ff81(),_0x37f1a5(_0x242e84);};callRequestHooks(_0x1e5cc2,_0x3011b5)['then'](()=>{if(_0x7773e5)return;dispatch(_0x4e39c3,_0x2c368e,_0x3011b5,{'onSuccess':_0xcdca6=>{const _0x4b0a19=_0x5285;Promise['resolve']()['then'](()=>refineResponse(_0xcdca6,_0x3011b5))['then'](async _0x584a5b=>{const _0x15b8f7=_0x5285;if(isResponseError(_0xcdca6)){await callResponseErrorHooks(_0x1e5cc2,_0x3011b5,_0x584a5b);if(!_0x3011b5[_0x15b8f7(0x1d8)])throw createResponseError(_0x1e5cc2,_0x3011b5,_0x584a5b);}else await callResponseHooks(_0x1e5cc2,_0x3011b5,_0x584a5b);_0x13ba6a(()=>_0x355fb3(_0x19cba3?_0x584a5b:_0x584a5b['data']));})[_0x4b0a19(0x1d4)](_0x1c1f3e=>_0x13ba6a(()=>_0x5353d4(_0x1c1f3e)));},'onFail':_0x73c10a=>{const _0x3416a4=_0x5285;Promise[_0x3416a4(0x1bf)]()['then'](async()=>{const _0x256138=normalizeError(_0x73c10a);if(!isAbortError(_0x256138))await callRequestErrorHooks(_0x1e5cc2,_0x3011b5,_0x256138);throw _0x256138;})[_0x3416a4(0x1d4)](_0x33ec24=>_0x13ba6a(()=>_0x5353d4(_0x33ec24)));}});})['catch'](async _0x2de28c=>{const _0x1806c5=normalizeError(_0x2de28c);await callRequestErrorHooks(_0x1e5cc2,_0x3011b5,_0x1806c5),_0x13ba6a(()=>_0x5353d4(_0x1806c5));});});}const _0x488ff8={};_0x488ff8['method']='GET',_0x488ff8[_0x351574(0x1c4)]=_0x351574(0x1cd);const defaultConfig=_0x488ff8;function _0x5285(_0x2e7584,_0x4bc5f2){_0x2e7584=_0x2e7584-0x1b9;const _0x319204=_0x3192();let _0x5285e0=_0x319204[_0x2e7584];return _0x5285e0;}function createHttp(_0x4fadc9={}){const _0x58b816=_0x351574,_0x5bf06c=(_0x273403,_0x14639a)=>{const _0x525d50=_0x5285;return dispatchHttp(_0x525d50(0x1de),_0x273403,mergeOptions(defaultConfig,_0x4fadc9,_0x14639a));},_0x4f4e25=(_0x3ae0c5,_0x3cbb5e)=>{const _0x2530bb=_0x5285,_0x4cc701={};return _0x4cc701[_0x2530bb(0x202)]='POST',dispatchHttp(_0x2530bb(0x1f5),_0x3ae0c5,mergeOptions(defaultConfig,_0x4fadc9,_0x3cbb5e,_0x4cc701));},_0xdb3334=(_0x173979,_0x482970)=>{const _0x233ab8=_0x5285,_0x4a26ea={};return _0x4a26ea[_0x233ab8(0x202)]=_0x233ab8(0x1ce),dispatchHttp(_0x233ab8(0x1ed),_0x173979,mergeOptions(defaultConfig,_0x4fadc9,_0x482970,_0x4a26ea));},_0x456954=_0x5f20c3=>createHttp(mergeOptions(_0x4fadc9,_0x5f20c3)),_0x32e13={};return _0x32e13[_0x58b816(0x1de)]=_0x5bf06c,_0x32e13['upload']=_0x4f4e25,_0x32e13['download']=_0xdb3334,_0x32e13[_0x58b816(0x1e4)]=_0x456954,_0x32e13;}const http=createHttp(),_0x25be38={};_0x25be38['enumerable']=!![],_0x25be38['get']=function(){return createHttp;},Object[_0x351574(0x1bb)](exports,_0x351574(0x1f1),_0x25be38);const _0xc1833f={};_0xc1833f[_0x351574(0x1e5)]=!![],_0xc1833f['get']=function(){return createHttpAborter;},Object[_0x351574(0x1bb)](exports,_0x351574(0x200),_0xc1833f);const _0xe345cf={};_0xe345cf[_0x351574(0x1e5)]=!![],_0xe345cf['get']=function(){return http;},Object['defineProperty'](exports,_0x351574(0x20a),_0xe345cf);
|
package/dist/oiyo.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
const require_oiyo = require("./oiyo-
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
8
|
+
const require_oiyo = require("./oiyo-CZ64L3f6.cjs");
|
|
9
|
+
exports.createHttp = require_oiyo.createHttp;
|
|
10
|
+
exports.createHttpAborter = require_oiyo.createHttpAborter;
|
|
11
|
+
exports.http = require_oiyo.http;
|
package/dist/oiyo.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
8
|
-
export { type
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-DCAh9vr9.cjs";
|
|
8
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/oiyo.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
8
|
-
export { type
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-DCAh9vr9.mjs";
|
|
8
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/oiyo.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { n as
|
|
8
|
-
export {
|
|
7
|
+
import { n as http, r as createHttpAborter, t as createHttp } from "./oiyo-CUWG-Hhg.mjs";
|
|
8
|
+
export { createHttp, createHttpAborter, http };
|
package/dist/uni.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
require("./chunk-
|
|
8
|
+
require("./chunk-BnILMwZG.cjs");
|
|
9
9
|
var _dcloudio_uni_app = require("@dcloudio/uni-app");
|
|
10
10
|
Object.keys(_dcloudio_uni_app).forEach(function(k) {
|
|
11
11
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/uni.d.cts
CHANGED
package/dist/uni.d.mts
CHANGED
package/dist/uni.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-Bcqm9nz_.mjs";
|
|
8
8
|
export * from "@dcloudio/uni-app";
|
|
9
9
|
export {};
|
package/dist/vue.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
require("./chunk-
|
|
8
|
+
require("./chunk-BnILMwZG.cjs");
|
|
9
9
|
var vue = require("vue");
|
|
10
10
|
Object.keys(vue).forEach(function(k) {
|
|
11
11
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/vue.d.cts
CHANGED
package/dist/vue.d.mts
CHANGED
package/dist/vue.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.2
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-Bcqm9nz_.mjs";
|
|
8
8
|
export * from "vue";
|
|
9
9
|
export {};
|
package/package.json
CHANGED
package/dist/oiyo-CdQ_-aZW.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.1
|
|
3
|
-
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
-
* Commercial software. See LICENSE for terms.
|
|
5
|
-
* Official site: https://oiyo.js.org
|
|
6
|
-
*/
|
|
7
|
-
const _0x57f845=_0x5260;(function(_0x2a3388,_0x325ffc){const _0x4a6af5=_0x5260,_0x53bf85=_0x2a3388();while(!![]){try{const _0xd65509=parseInt(_0x4a6af5(0x90))/0x1+-parseInt(_0x4a6af5(0xc9))/0x2*(parseInt(_0x4a6af5(0xbc))/0x3)+-parseInt(_0x4a6af5(0xb2))/0x4+-parseInt(_0x4a6af5(0xa3))/0x5+parseInt(_0x4a6af5(0xae))/0x6+parseInt(_0x4a6af5(0xa0))/0x7+-parseInt(_0x4a6af5(0xac))/0x8*(-parseInt(_0x4a6af5(0xdc))/0x9);if(_0xd65509===_0x325ffc)break;else _0x53bf85['push'](_0x53bf85['shift']());}catch(_0x4afcf9){_0x53bf85['push'](_0x53bf85['shift']());}}}(_0x3699,0xcea87));const ABORT_ERROR_NAME='AbortError';var Emitter=class{['listeners']=[];[_0x57f845(0xad)](_0x736ceb,_0x1c3e63){const _0x1ecf64=_0x57f845;if(_0x736ceb!=='abort')return;this['listeners'][_0x1ecf64(0xa5)](_0x1c3e63);}[_0x57f845(0xa4)](_0x5a6417,_0xb326e3){if(_0x5a6417!=='abort')return;const _0x49aaa8=this['listeners']['indexOf'](_0xb326e3);if(_0x49aaa8!==-0x1)this['listeners']['splice'](_0x49aaa8,0x1);}[_0x57f845(0xcd)](_0x4cfcdf){for(const _0xbe05c2 of this['listeners']['slice']())_0xbe05c2['call'](this,_0x4cfcdf);}},BeaconSignal=class extends Emitter{[_0x57f845(0xda)]=![];['reason']=void 0x0;['onabort']=null;['_abort'](_0x1cafd8){const _0x3d0c8d=_0x57f845;if(this['aborted'])return;this['aborted']=!![],this['reason']=_0x1cafd8===void 0x0?createAbortError():_0x1cafd8;const _0x2b9746={};_0x2b9746[_0x3d0c8d(0xab)]='abort';const _0x13d650=_0x2b9746;if(typeof this['onabort']==='function')this['onabort'](_0x13d650);this['emit'](_0x13d650);}[_0x57f845(0xbd)](){const _0x594cd5=_0x57f845;if(this[_0x594cd5(0xda)])throw this[_0x594cd5(0x9e)];}};function createBeacon(){const _0x3d7815=new BeaconSignal();return{'signal':_0x3d7815,'abort':_0x4e98c8=>_0x3d7815['_abort'](_0x4e98c8)};}function createAbortError(_0x7f6ec7=_0x57f845(0xb9)){const _0x2fc0e5=_0x57f845,_0x34e255=new Error(_0x7f6ec7);return _0x34e255[_0x2fc0e5(0xb7)]=ABORT_ERROR_NAME,_0x34e255;}function isAbortError(_0x1f9b95){const _0x1133b6=_0x57f845;return _0x1f9b95 instanceof Error&&_0x1f9b95[_0x1133b6(0xb7)]===ABORT_ERROR_NAME;}function onAbort(_0x76fe90,_0x44cfea){const _0x5b8300=_0x57f845;if(!_0x76fe90)return()=>{};if(_0x76fe90[_0x5b8300(0xda)])return _0x44cfea(),()=>{};return _0x76fe90[_0x5b8300(0xad)]('abort',_0x44cfea),()=>_0x76fe90['removeEventListener'](_0x5b8300(0xaf),_0x44cfea);}const HOOK_NAMES=['onRequest',_0x57f845(0xb4),_0x57f845(0x9c),'onResponseError'];function mergeOptions(..._0xc38814){const _0x422c7e=_0x57f845,_0x3adb33={},_0x56d77f={};for(const _0x53e32f of _0xc38814){if(!_0x53e32f)continue;for(const _0x4d3527 of HOOK_NAMES)collectHook(_0x56d77f,_0x4d3527,_0x53e32f);const _0x346a3b=_0x3adb33[_0x422c7e(0xc3)],_0x35f77c=_0x3adb33[_0x422c7e(0xd7)];Object['assign'](_0x3adb33,_0x53e32f);const _0x5b0eba={..._0x346a3b,..._0x53e32f[_0x422c7e(0xc3)]};_0x3adb33['headers']=_0x5b0eba;const _0x2e65c4={..._0x35f77c,..._0x53e32f[_0x422c7e(0xd7)]};_0x3adb33[_0x422c7e(0xd7)]=_0x2e65c4;}for(const [_0x5ed489,_0x110816]of Object['entries'](_0x56d77f))Object['assign'](_0x3adb33,{[_0x5ed489]:async _0xb25a52=>{for(const _0x20f0c6 of _0x110816)await _0x20f0c6(_0xb25a52);}});return _0x3adb33;}function collectHook(_0x4c329e,_0x96d2e,_0x12ce7c){const _0x4eff3d=_0x57f845,_0x1168c4=_0x12ce7c[_0x96d2e];if(typeof _0x1168c4!==_0x4eff3d(0xd6))return;_0x4c329e[_0x96d2e]??=[],_0x4c329e[_0x96d2e]['push'](_0x1168c4);}function dispatch(_0x36f2c5,_0x5e1f49,_0x956fed,_0x13979e){const _0x5ae130=_0x57f845;let _0x3f48f8;if(_0x36f2c5==='upload')_0x3f48f8=dispatchUpload(_0x5e1f49,_0x956fed,_0x13979e);else{if(_0x36f2c5===_0x5ae130(0xb0))_0x3f48f8=dispatchDownload(_0x5e1f49,_0x956fed,_0x13979e);else _0x3f48f8=dispatchRequest(_0x5e1f49,_0x956fed,_0x13979e);}bindTask(_0x3f48f8,_0x956fed);}function bindTask(_0x3a47b4,_0x58ed48){const _0x4be057=_0x57f845;onAbort(_0x58ed48[_0x4be057(0xa2)],()=>_0x3a47b4['abort']());if(typeof _0x58ed48[_0x4be057(0x9a)]==='function')_0x3a47b4[_0x4be057(0x9a)](_0x58ed48[_0x4be057(0x9a)]);const _0x2104fe=_0x58ed48[_0x4be057(0x95)];if(typeof _0x2104fe==='function'&&_0x4be057(0x98)in _0x3a47b4)_0x3a47b4['onProgressUpdate'](_0x2104fe);}function dispatchRequest(_0x2bbcce,_0x378ceb,_0x1c8acc){const _0x217376=_0x57f845,_0xfcccb5={'url':_0x2bbcce,'method':_0x378ceb[_0x217376(0xc8)],'header':_0x378ceb[_0x217376(0xc3)],'data':_0x378ceb[_0x217376(0xc4)]??{},'timeout':_0x378ceb[_0x217376(0xbb)],'dataType':_0x378ceb['dataType']||'json','responseType':mappedResponseBodyType(_0x378ceb['responseType']),'sslVerify':_0x378ceb['sslVerify'],'withCredentials':_0x378ceb['withCredentials'],'firstIpv4':_0x378ceb['firstIpv4'],'enableHttp2':_0x378ceb['enableHttp2'],'enableQuic':_0x378ceb[_0x217376(0xcc)],'enableCache':_0x378ceb['enableCache'],'enableHttpDNS':_0x378ceb['enableHttpDNS'],'httpDNSServiceId':_0x378ceb['httpDNSServiceId'],'enableChunked':_0x378ceb[_0x217376(0x9d)],'forceCellularNetwork':_0x378ceb['forceCellularNetwork'],'success':_0x1c8acc['onSuccess'],'fail':_0x1c8acc['onFail'],'complete':()=>{}};return uni['request'](_0xfcccb5);}function dispatchUpload(_0x579fcf,_0x47a031,_0x4a4337){const _0xecb92d=_0x57f845,_0x5abb5b={};_0x5abb5b['url']=_0x579fcf,_0x5abb5b['fileType']=_0x47a031['fileType'],_0x5abb5b['file']=_0x47a031['file'],_0x5abb5b[_0xecb92d(0xd9)]=_0x47a031[_0xecb92d(0xd9)],_0x5abb5b[_0xecb92d(0xb7)]=_0x47a031[_0xecb92d(0xb7)]??_0xecb92d(0xb3),_0x5abb5b['files']=_0x47a031['files'],_0x5abb5b['header']=_0x47a031[_0xecb92d(0xc3)],_0x5abb5b['formData']=_0x47a031[_0xecb92d(0xc4)]??{},_0x5abb5b['timeout']=_0x47a031[_0xecb92d(0xbb)],_0x5abb5b[_0xecb92d(0xcf)]=_0x4a4337['onSuccess'],_0x5abb5b['fail']=_0x4a4337[_0xecb92d(0x94)],_0x5abb5b[_0xecb92d(0xce)]=()=>{};const _0x25181a=_0x5abb5b;return uni['uploadFile'](_0x25181a);}function dispatchDownload(_0x3abaf7,_0x57d822,_0x324e58){const _0x42a237=_0x57f845,_0x23a049={'url':_0x3abaf7,'header':_0x57d822[_0x42a237(0xc3)],'timeout':_0x57d822['timeout'],'success':_0x882ab9=>{const _0x44cb6a=_0x42a237,_0x5421af={..._0x882ab9};_0x5421af['data']={},_0x5421af['data']['tempFilePath']=_0x882ab9[_0x44cb6a(0x93)],_0x324e58['onSuccess'](_0x5421af);},'fail':_0x324e58[_0x42a237(0x94)],'complete':()=>{}};return uni[_0x42a237(0xaa)](_0x23a049);}function mappedResponseBodyType(_0x44ec6f){const _0x4b2a41=_0x57f845;if(!_0x44ec6f||_0x44ec6f===_0x4b2a41(0xdb))return _0x4b2a41(0xd8);if(_0x44ec6f==='arrayBuffer')return _0x4b2a41(0xd4);return'text';}function _0x5260(_0x21db5d,_0x3c17d4){_0x21db5d=_0x21db5d-0x90;const _0x369954=_0x3699();let _0x526031=_0x369954[_0x21db5d];return _0x526031;}var VesselError=class extends Error{constructor(_0x11d992){const _0x7a97e1=_0x57f845;super(_0x11d992),this['name']=_0x7a97e1(0xb5);}};function createResponseError(_0x120b8d,_0x5c81da,_0x4acd19){const _0x38564a=_0x57f845,_0x14af2e=_0x120b8d,_0x29a07a='['+(_0x5c81da?.[_0x38564a(0xc8)]||'GET')+']\x20'+_0x14af2e,_0x2cc11a=_0x4acd19?_0x4acd19[_0x38564a(0xc5)]+'\x20'+(_0x4acd19[_0x38564a(0xd5)]||''):_0x38564a(0xc1),_0x4801d4=_0x4acd19?JSON['stringify'](_0x4acd19[_0x38564a(0xd0)]):_0x38564a(0xd1),_0x3dc53d=new VesselError(_0x29a07a+':\x20'+_0x2cc11a+(_0x4acd19['data']?'\x20'+_0x4801d4:''));for(const _0x5e68e5 of[_0x38564a(0xd3),_0x38564a(0xa1),'response','data'])Object[_0x38564a(0xa9)](_0x3dc53d,_0x5e68e5,{'get'(){const _0x8f1bf8=_0x38564a,_0x1bb544={};return _0x1bb544[_0x8f1bf8(0xd3)]=_0x120b8d,_0x1bb544['options']=_0x5c81da,_0x1bb544['response']=_0x4acd19,_0x1bb544[_0x8f1bf8(0xd0)]=_0x4acd19['data'],_0x1bb544[_0x5e68e5];}});return _0x3dc53d;}function normalizeError(_0x3034d6){const _0x16a809=_0x57f845;if(_0x3034d6 instanceof Error)return _0x3034d6;return Object['assign'](new Error(_0x3034d6?.[_0x16a809(0xd5)]||_0x3034d6?.[_0x16a809(0xba)]||_0x16a809(0xc0)),{'cause':_0x3034d6});}async function callRequestHooks(_0x6f0f5c,_0x1ee3a7){await _0x1ee3a7['onRequest']?.({'options':_0x1ee3a7,'resource':_0x6f0f5c});}async function callRequestErrorHooks(_0x3f2864,_0x24fc1a,_0x4060c8){const _0x244376=_0x57f845;await _0x24fc1a[_0x244376(0xb4)]?.({'options':_0x24fc1a,'resource':_0x3f2864,'error':_0x4060c8});}async function callResponseHooks(_0x487d01,_0x460660,_0x533833){await _0x460660['onResponse']?.({'options':_0x460660,'resource':_0x487d01,'response':_0x533833});}async function callResponseErrorHooks(_0x36b914,_0x918b9b,_0x3d2f68){const _0x257c74=_0x57f845;await _0x918b9b[_0x257c74(0xcb)]?.({'options':_0x918b9b,'resource':_0x36b914,'response':_0x3d2f68});}async function refineResponse(_0x56588f,_0x57805e){const _0x3484bd=_0x57f845;if(_0x57805e['responseType']===_0x3484bd(0xdb)||!_0x57805e[_0x3484bd(0xc7)])return{..._0x56588f,'data':await parseJSONResponse(_0x56588f['data'],_0x57805e)};return _0x56588f;}function parseJSONResponse(_0x3e65f7,_0x29940c){const _0x2bd949=_0x57f845;if(typeof _0x3e65f7!==_0x2bd949(0xa6))return _0x3e65f7;if(_0x29940c[_0x2bd949(0x91)])return _0x29940c[_0x2bd949(0x91)](_0x3e65f7);return _0x3e65f7?JSON['parse'](_0x3e65f7):null;}function isResponseError(_0x49ea15){const _0x367455='statusCode'in _0x49ea15?_0x49ea15['statusCode']:void 0x0;return typeof _0x367455==='number'&&(_0x367455<0xc8||_0x367455>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST','PUT','DELETE',_0x57f845(0xb6)]);async function withRetry(_0x34897d,_0x446002){const _0x2c3560=_0x57f845,_0x16781e=resolveRetryCount(_0x34897d);for(let _0x250d1c=0x0;;_0x250d1c++)try{return await _0x446002();}catch(_0x124e4d){if(_0x250d1c>=_0x16781e||!shouldRetry(_0x124e4d,_0x34897d))throw _0x124e4d;await sleep(_0x34897d['retryDelay']??0x0,_0x34897d[_0x2c3560(0xa2)]);}}function resolveRetryCount(_0x21b926){const _0x15f6b8=_0x57f845,{retry:_0xf3c6ae}=_0x21b926;if(_0xf3c6ae===![])return 0x0;if(typeof _0xf3c6ae==='number')return _0xf3c6ae>0x0?_0xf3c6ae:0x0;return isPayloadMethod(_0x21b926[_0x15f6b8(0xc8)])?0x0:0x1;}function shouldRetry(_0x864885,_0x584ec0){const _0x33cb2c=_0x57f845;if(_0x584ec0['signal']?.['aborted']||isAbortError(_0x864885))return![];const _0x17966c=_0x864885?.[_0x33cb2c(0x96)]?.['statusCode'];if(typeof _0x17966c!==_0x33cb2c(0xd2))return!![];return(_0x584ec0[_0x33cb2c(0x9f)]??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x17966c);}function isPayloadMethod(_0x36ffc7){const _0x3ba35d=_0x57f845;return!!_0x36ffc7&&PAYLOAD_METHODS['has'](_0x36ffc7[_0x3ba35d(0x92)]());}function sleep(_0x486888,_0x1ac3cf){return new Promise((_0x119a71,_0x4beef9)=>{const _0x3b3281=_0x5260;if(_0x1ac3cf?.['aborted']){_0x4beef9(_0x1ac3cf[_0x3b3281(0x9e)]);return;}if(!(_0x486888>0x0)){_0x119a71();return;}let _0x125745=()=>{};const _0x5cb00a=setTimeout(()=>{_0x125745(),_0x119a71();},_0x486888);_0x125745=onAbort(_0x1ac3cf,()=>{const _0x3e3f8d=_0x3b3281;clearTimeout(_0x5cb00a),_0x4beef9(_0x1ac3cf[_0x3e3f8d(0x9e)]);});});}function buildURL(_0x349937,_0x4ca0a9){const _0x3882f5=_0x57f845,_0xf6adf3=joinURL(_0x4ca0a9[_0x3882f5(0xc6)],_0x349937),_0x14aae8=_0x4ca0a9['query']??{},_0x5403d2=Object['keys'](_0x14aae8)['filter'](_0x3744e6=>_0x14aae8[_0x3744e6]!==void 0x0)[_0x3882f5(0xa7)](_0x4c7525=>{const _0x34625b=_0x14aae8[_0x4c7525];return(Array['isArray'](_0x34625b)?_0x34625b:[_0x34625b])['map'](_0x10765f=>encodeURIComponent(_0x4c7525)+'='+encodeURIComponent(String(_0x10765f)));})[_0x3882f5(0xbe)]('&');if(!_0x5403d2)return _0xf6adf3;return''+_0xf6adf3+(_0xf6adf3[_0x3882f5(0xb8)]('?')?'&':'?')+_0x5403d2;}function joinURL(_0x153cdb,_0x5cbc4a){const _0x4fdde0=_0x57f845;if(!_0x153cdb||isAbsoluteURL(_0x5cbc4a))return _0x5cbc4a;return _0x153cdb[_0x4fdde0(0xc2)](/\/+$/,'')+'/'+_0x5cbc4a[_0x4fdde0(0xc2)](/^\/+/,'');}function isAbsoluteURL(_0x3a0fda){const _0x1067ff=_0x57f845;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x1067ff(0xa8)](_0x3a0fda)||_0x3a0fda['startsWith']('//');}function dispatchHttp(_0x2b4884,_0x6996e8,_0x390be5){const _0x44cf68=buildURL(_0x6996e8,_0x390be5);return withRetry(_0x390be5,()=>attemptRequest(_0x2b4884,_0x6996e8,_0x44cf68,_0x390be5));}function _0x3699(){const _0x2eadf9=['message','timeout','838788caFkyP','throwIfAborted','join','catch','HTTP\x20request\x20failed','<no\x20response>','replace','headers','body','statusCode','baseURL','responseType','method','4SagaFO','upload','onResponseError','enableQuic','emit','complete','success','data','<no\x20response\x20body>','number','request','arraybuffer','errMsg','function','query','text','filePath','aborted','json','17703KpRmLF','1327766ltnbpc','parseResponse','toUpperCase','tempFilePath','onFail','onProgress','response','then','onProgressUpdate','raw','onHeadersReceived','GET','onResponse','enableChunked','reason','retryStatusCodes','2128875aFlzWG','options','signal','7707685bkcLpU','removeEventListener','push','string','flatMap','test','defineProperty','downloadFile','type','7672EieCri','addEventListener','2036184iAoiEJ','abort','download','resolve','3641632sahcgS','file','onRequestError','VesselError','PATCH','name','includes','The\x20operation\x20was\x20aborted'];_0x3699=function(){return _0x2eadf9;};return _0x3699();}function attemptRequest(_0x59279e,_0x38693b,_0x4bfecc,_0x3640ac){const _0x4b1b52=_0x57f845,_0x4e13a2=!!_0x3640ac[_0x4b1b52(0x99)];return new Promise((_0x50f771,_0x499843)=>{const _0x94eade=_0x4b1b52;let _0x73be81=![];const _0x12520f=_0x200b54=>{if(_0x73be81)return;_0x73be81=!![],_0x200b54();},_0x3ebf85=onAbort(_0x3640ac['signal'],()=>{_0x12520f(()=>_0x499843(_0x3640ac['signal']['reason']));}),_0x1dca4c=_0x499a65=>{_0x3ebf85(),_0x12520f(_0x499a65);};callRequestHooks(_0x38693b,_0x3640ac)[_0x94eade(0x97)](()=>{if(_0x73be81)return;dispatch(_0x59279e,_0x4bfecc,_0x3640ac,{'onSuccess':_0x7739be=>{const _0x2974e3=_0x5260;Promise[_0x2974e3(0xb1)]()['then'](()=>refineResponse(_0x7739be,_0x3640ac))['then'](async _0x37fbc7=>{const _0x26e2fe=_0x2974e3;if(isResponseError(_0x7739be)){await callResponseErrorHooks(_0x38693b,_0x3640ac,_0x37fbc7);if(!_0x3640ac['ignoreResponseError'])throw createResponseError(_0x38693b,_0x3640ac,_0x37fbc7);}else await callResponseHooks(_0x38693b,_0x3640ac,_0x37fbc7);_0x1dca4c(()=>_0x50f771(_0x4e13a2?_0x37fbc7:_0x37fbc7[_0x26e2fe(0xd0)]));})[_0x2974e3(0xbf)](_0x1b7255=>_0x1dca4c(()=>_0x499843(_0x1b7255)));},'onFail':_0x3d107f=>{const _0x35c4b2=_0x5260;Promise[_0x35c4b2(0xb1)]()[_0x35c4b2(0x97)](async()=>{const _0x199d38=normalizeError(_0x3d107f);if(!isAbortError(_0x199d38))await callRequestErrorHooks(_0x38693b,_0x3640ac,_0x199d38);throw _0x199d38;})['catch'](_0x231939=>_0x1dca4c(()=>_0x499843(_0x231939)));}});})[_0x94eade(0xbf)](async _0x53334f=>{const _0x2e9c7d=normalizeError(_0x53334f);await callRequestErrorHooks(_0x38693b,_0x3640ac,_0x2e9c7d),_0x1dca4c(()=>_0x499843(_0x2e9c7d));});});}const _0x4cc407={};_0x4cc407['method']='GET',_0x4cc407[_0x57f845(0xc7)]='json';const defaultConfig=_0x4cc407;function createVessel(_0x1efca1={}){const _0x43c6bd=_0x57f845,_0x2edc28=(_0xd743d7,_0x2155f5)=>{return dispatchHttp('request',_0xd743d7,mergeOptions(defaultConfig,_0x1efca1,_0x2155f5));},_0x4df490=(_0x8c7a77,_0x5321ec)=>{const _0x5e217a=_0x5260,_0x503715={};return _0x503715[_0x5e217a(0xc8)]='POST',dispatchHttp('upload',_0x8c7a77,mergeOptions(defaultConfig,_0x1efca1,_0x5321ec,_0x503715));},_0x378f37=(_0x1a0cc5,_0xa64481)=>{const _0x3ca6b1=_0x5260,_0x428336={};return _0x428336[_0x3ca6b1(0xc8)]=_0x3ca6b1(0x9b),dispatchHttp('download',_0x1a0cc5,mergeOptions(defaultConfig,_0x1efca1,_0xa64481,_0x428336));},_0x127e66=_0x5a3652=>createVessel(mergeOptions(_0x1efca1,_0x5a3652)),_0x1dd501={};return _0x1dd501['request']=_0x2edc28,_0x1dd501[_0x43c6bd(0xca)]=_0x4df490,_0x1dd501[_0x43c6bd(0xb0)]=_0x378f37,_0x1dd501['create']=_0x127e66,_0x1dd501;}const vessel=createVessel();export{vessel as n,createBeacon as r,createVessel as t};
|
package/dist/oiyo-DZ6BFYIw.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.1
|
|
3
|
-
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
-
* Commercial software. See LICENSE for terms.
|
|
5
|
-
* Official site: https://oiyo.js.org
|
|
6
|
-
*/
|
|
7
|
-
const _0x39377b=_0x43fc;(function(_0xf7877b,_0x42d449){const _0x23ab28=_0x43fc,_0x4e04a0=_0xf7877b();while(!![]){try{const _0x2743ef=parseInt(_0x23ab28(0xa9))/0x1*(parseInt(_0x23ab28(0xba))/0x2)+parseInt(_0x23ab28(0x90))/0x3+parseInt(_0x23ab28(0x8b))/0x4*(-parseInt(_0x23ab28(0x98))/0x5)+-parseInt(_0x23ab28(0x7f))/0x6+parseInt(_0x23ab28(0x91))/0x7+parseInt(_0x23ab28(0xaa))/0x8*(-parseInt(_0x23ab28(0x9e))/0x9)+-parseInt(_0x23ab28(0x7c))/0xa*(-parseInt(_0x23ab28(0xa8))/0xb);if(_0x2743ef===_0x42d449)break;else _0x4e04a0['push'](_0x4e04a0['shift']());}catch(_0x23cd82){_0x4e04a0['push'](_0x4e04a0['shift']());}}}(_0x12aa,0xcd60c));const ABORT_ERROR_NAME=_0x39377b(0xab);var Emitter=class{[_0x39377b(0xbe)]=[];[_0x39377b(0xa5)](_0x521dbe,_0x4a9c78){const _0x4fd409=_0x39377b;if(_0x521dbe!=='abort')return;this[_0x4fd409(0xbe)][_0x4fd409(0x93)](_0x4a9c78);}['removeEventListener'](_0x3d3dad,_0x84d2ee){const _0x3c42b5=_0x39377b;if(_0x3d3dad!=='abort')return;const _0xd19fdd=this[_0x3c42b5(0xbe)][_0x3c42b5(0x9d)](_0x84d2ee);if(_0xd19fdd!==-0x1)this['listeners'][_0x3c42b5(0x96)](_0xd19fdd,0x1);}[_0x39377b(0xbf)](_0x373704){const _0x1726b4=_0x39377b;for(const _0x4793c3 of this['listeners']['slice']())_0x4793c3[_0x1726b4(0xc0)](this,_0x373704);}},BeaconSignal=class extends Emitter{['aborted']=![];['reason']=void 0x0;['onabort']=null;['_abort'](_0x1e68e8){const _0xf5f281=_0x39377b;if(this['aborted'])return;this['aborted']=!![],this[_0xf5f281(0x8c)]=_0x1e68e8===void 0x0?createAbortError():_0x1e68e8;const _0x42da32={};_0x42da32[_0xf5f281(0x92)]='abort';const _0xb65297=_0x42da32;if(typeof this['onabort']==='function')this[_0xf5f281(0xc3)](_0xb65297);this['emit'](_0xb65297);}['throwIfAborted'](){const _0x167ca7=_0x39377b;if(this[_0x167ca7(0x86)])throw this[_0x167ca7(0x8c)];}};function createBeacon(){const _0x45ed5d=_0x39377b,_0x52ad6e=new BeaconSignal();return{'signal':_0x52ad6e,'abort':_0x34a7ad=>_0x52ad6e[_0x45ed5d(0x7b)](_0x34a7ad)};}function createAbortError(_0x5eb9fb='The\x20operation\x20was\x20aborted'){const _0x3de4da=_0x39377b,_0xeaad92=new Error(_0x5eb9fb);return _0xeaad92[_0x3de4da(0x7e)]=ABORT_ERROR_NAME,_0xeaad92;}function isAbortError(_0x4298c0){return _0x4298c0 instanceof Error&&_0x4298c0['name']===ABORT_ERROR_NAME;}function onAbort(_0x1e7600,_0x3e85b6){const _0x58c3ac=_0x39377b;if(!_0x1e7600)return()=>{};if(_0x1e7600[_0x58c3ac(0x86)])return _0x3e85b6(),()=>{};return _0x1e7600['addEventListener'](_0x58c3ac(0x76),_0x3e85b6),()=>_0x1e7600['removeEventListener'](_0x58c3ac(0x76),_0x3e85b6);}function _0x43fc(_0x108aff,_0x4963f1){_0x108aff=_0x108aff-0x75;const _0x12aa7d=_0x12aa();let _0x43fcb3=_0x12aa7d[_0x108aff];return _0x43fcb3;}const HOOK_NAMES=[_0x39377b(0x8d),'onRequestError','onResponse','onResponseError'];function mergeOptions(..._0xe7c681){const _0x43b2e1=_0x39377b,_0xa6b99={},_0x5a9115={};for(const _0x25ddff of _0xe7c681){if(!_0x25ddff)continue;for(const _0x30472a of HOOK_NAMES)collectHook(_0x5a9115,_0x30472a,_0x25ddff);const _0x442c00=_0xa6b99[_0x43b2e1(0x97)],_0x31e9a8=_0xa6b99['query'];Object['assign'](_0xa6b99,_0x25ddff);const _0xeeed8a={..._0x442c00,..._0x25ddff[_0x43b2e1(0x97)]};_0xa6b99[_0x43b2e1(0x97)]=_0xeeed8a;const _0x29bc4a={..._0x31e9a8,..._0x25ddff['query']};_0xa6b99['query']=_0x29bc4a;}for(const [_0x549968,_0x115b2e]of Object[_0x43b2e1(0xae)](_0x5a9115))Object['assign'](_0xa6b99,{[_0x549968]:async _0x5e74d8=>{for(const _0x32bc64 of _0x115b2e)await _0x32bc64(_0x5e74d8);}});return _0xa6b99;}function collectHook(_0x4111b9,_0x4529c0,_0xfa2a45){const _0x49d405=_0x39377b,_0x343b02=_0xfa2a45[_0x4529c0];if(typeof _0x343b02!=='function')return;_0x4111b9[_0x4529c0]??=[],_0x4111b9[_0x4529c0][_0x49d405(0x93)](_0x343b02);}function dispatch(_0x32c944,_0x4a440e,_0x16b25e,_0x2346bf){let _0x3e40c6;if(_0x32c944==='upload')_0x3e40c6=dispatchUpload(_0x4a440e,_0x16b25e,_0x2346bf);else{if(_0x32c944==='download')_0x3e40c6=dispatchDownload(_0x4a440e,_0x16b25e,_0x2346bf);else _0x3e40c6=dispatchRequest(_0x4a440e,_0x16b25e,_0x2346bf);}bindTask(_0x3e40c6,_0x16b25e);}function bindTask(_0x10bc7c,_0x3666bd){const _0x4e7ee2=_0x39377b;onAbort(_0x3666bd['signal'],()=>_0x10bc7c[_0x4e7ee2(0x76)]());if(typeof _0x3666bd['onHeadersReceived']==='function')_0x10bc7c['onHeadersReceived'](_0x3666bd[_0x4e7ee2(0xb8)]);const _0x2eb32b=_0x3666bd[_0x4e7ee2(0xb1)];if(typeof _0x2eb32b===_0x4e7ee2(0x9c)&&_0x4e7ee2(0x82)in _0x10bc7c)_0x10bc7c['onProgressUpdate'](_0x2eb32b);}function dispatchRequest(_0x278a4d,_0x527aee,_0x53aab4){const _0x48b3d9=_0x39377b,_0x376bfe={'url':_0x278a4d,'method':_0x527aee[_0x48b3d9(0x83)],'header':_0x527aee['headers'],'data':_0x527aee[_0x48b3d9(0x89)]??{},'timeout':_0x527aee[_0x48b3d9(0xb7)],'dataType':_0x527aee['dataType']||'json','responseType':mappedResponseBodyType(_0x527aee[_0x48b3d9(0x85)]),'sslVerify':_0x527aee[_0x48b3d9(0x87)],'withCredentials':_0x527aee[_0x48b3d9(0xb2)],'firstIpv4':_0x527aee[_0x48b3d9(0xb4)],'enableHttp2':_0x527aee['enableHttp2'],'enableQuic':_0x527aee['enableQuic'],'enableCache':_0x527aee['enableCache'],'enableHttpDNS':_0x527aee[_0x48b3d9(0xc4)],'httpDNSServiceId':_0x527aee['httpDNSServiceId'],'enableChunked':_0x527aee[_0x48b3d9(0x80)],'forceCellularNetwork':_0x527aee[_0x48b3d9(0x81)],'success':_0x53aab4[_0x48b3d9(0x77)],'fail':_0x53aab4['onFail'],'complete':()=>{}};return uni['request'](_0x376bfe);}function dispatchUpload(_0x27007c,_0x59eeca,_0x5d9560){const _0x2d4bcf=_0x39377b,_0x47814d={};_0x47814d['url']=_0x27007c,_0x47814d['fileType']=_0x59eeca['fileType'],_0x47814d[_0x2d4bcf(0xbc)]=_0x59eeca['file'],_0x47814d['filePath']=_0x59eeca[_0x2d4bcf(0xb6)],_0x47814d[_0x2d4bcf(0x7e)]=_0x59eeca[_0x2d4bcf(0x7e)]??'file',_0x47814d['files']=_0x59eeca[_0x2d4bcf(0xbb)],_0x47814d[_0x2d4bcf(0x75)]=_0x59eeca[_0x2d4bcf(0x97)],_0x47814d['formData']=_0x59eeca[_0x2d4bcf(0x89)]??{},_0x47814d['timeout']=_0x59eeca[_0x2d4bcf(0xb7)],_0x47814d[_0x2d4bcf(0xa1)]=_0x5d9560['onSuccess'],_0x47814d['fail']=_0x5d9560['onFail'],_0x47814d['complete']=()=>{};const _0x163011=_0x47814d;return uni[_0x2d4bcf(0xb9)](_0x163011);}function dispatchDownload(_0x138162,_0x44802f,_0x1e7b18){const _0x28837c=_0x39377b,_0x10c153={'url':_0x138162,'header':_0x44802f['headers'],'timeout':_0x44802f['timeout'],'success':_0x42e0d2=>{const _0x3e1b8f=_0x43fc,_0x50c581={..._0x42e0d2};_0x50c581[_0x3e1b8f(0x84)]={},_0x50c581[_0x3e1b8f(0x84)][_0x3e1b8f(0xa2)]=_0x42e0d2[_0x3e1b8f(0xa2)],_0x1e7b18[_0x3e1b8f(0x77)](_0x50c581);},'fail':_0x1e7b18[_0x28837c(0xc5)],'complete':()=>{}};return uni['downloadFile'](_0x10c153);}function mappedResponseBodyType(_0xf5cc69){const _0x17ad2e=_0x39377b;if(!_0xf5cc69||_0xf5cc69==='json')return'text';if(_0xf5cc69===_0x17ad2e(0xa0))return'arraybuffer';return'text';}var VesselError=class extends Error{constructor(_0x1f41bf){const _0x51cd72=_0x39377b;super(_0x1f41bf),this[_0x51cd72(0x7e)]='VesselError';}};function createResponseError(_0x40f8b8,_0x2de955,_0x4a9253){const _0x2a984c=_0x39377b,_0x5a28d3=_0x40f8b8,_0x3a5ce5='['+(_0x2de955?.['method']||'GET')+']\x20'+_0x5a28d3,_0x79b8f8=_0x4a9253?_0x4a9253['statusCode']+'\x20'+(_0x4a9253[_0x2a984c(0x78)]||''):'<no\x20response>',_0x259390=_0x4a9253?JSON[_0x2a984c(0xac)](_0x4a9253[_0x2a984c(0x84)]):'<no\x20response\x20body>',_0x5d35f6=new VesselError(_0x3a5ce5+':\x20'+_0x79b8f8+(_0x4a9253['data']?'\x20'+_0x259390:''));for(const _0x447a2e of[_0x2a984c(0x95),_0x2a984c(0x94),_0x2a984c(0xb3),_0x2a984c(0x84)])Object['defineProperty'](_0x5d35f6,_0x447a2e,{'get'(){const _0x56697c=_0x2a984c,_0x374f6e={};return _0x374f6e['request']=_0x40f8b8,_0x374f6e[_0x56697c(0x94)]=_0x2de955,_0x374f6e['response']=_0x4a9253,_0x374f6e['data']=_0x4a9253[_0x56697c(0x84)],_0x374f6e[_0x447a2e];}});return _0x5d35f6;}function normalizeError(_0x18457e){const _0x12d30f=_0x39377b;if(_0x18457e instanceof Error)return _0x18457e;return Object['assign'](new Error(_0x18457e?.[_0x12d30f(0x78)]||_0x18457e?.['message']||'HTTP\x20request\x20failed'),{'cause':_0x18457e});}async function callRequestHooks(_0x4cf6c2,_0x5c9e0a){await _0x5c9e0a['onRequest']?.({'options':_0x5c9e0a,'resource':_0x4cf6c2});}async function callRequestErrorHooks(_0x14da47,_0x435038,_0x71a13){await _0x435038['onRequestError']?.({'options':_0x435038,'resource':_0x14da47,'error':_0x71a13});}async function callResponseHooks(_0x44fb74,_0x85d332,_0x7b233){await _0x85d332['onResponse']?.({'options':_0x85d332,'resource':_0x44fb74,'response':_0x7b233});}async function callResponseErrorHooks(_0x3c7a88,_0x455851,_0x560b64){const _0x1171a2=_0x39377b;await _0x455851[_0x1171a2(0xc2)]?.({'options':_0x455851,'resource':_0x3c7a88,'response':_0x560b64});}async function refineResponse(_0x520f07,_0x340458){const _0x392393=_0x39377b;if(_0x340458['responseType']===_0x392393(0xbd)||!_0x340458[_0x392393(0x85)])return{..._0x520f07,'data':await parseJSONResponse(_0x520f07['data'],_0x340458)};return _0x520f07;}function parseJSONResponse(_0x21cf4e,_0x2151bf){const _0x21ef2c=_0x39377b;if(typeof _0x21cf4e!=='string')return _0x21cf4e;if(_0x2151bf[_0x21ef2c(0xb5)])return _0x2151bf['parseResponse'](_0x21cf4e);return _0x21cf4e?JSON['parse'](_0x21cf4e):null;}function isResponseError(_0x1580aa){const _0x158ada=_0x39377b,_0x424994='statusCode'in _0x1580aa?_0x1580aa['statusCode']:void 0x0;return typeof _0x424994===_0x158ada(0xb0)&&(_0x424994<0xc8||_0x424994>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x39377b(0x7a),_0x39377b(0x8e),'DELETE',_0x39377b(0xaf)]);async function withRetry(_0x193985,_0x1aaf05){const _0x2f10ef=_0x39377b,_0x201418=resolveRetryCount(_0x193985);for(let _0x2ab680=0x0;;_0x2ab680++)try{return await _0x1aaf05();}catch(_0x454c93){if(_0x2ab680>=_0x201418||!shouldRetry(_0x454c93,_0x193985))throw _0x454c93;await sleep(_0x193985[_0x2f10ef(0xc6)]??0x0,_0x193985['signal']);}}function resolveRetryCount(_0x416d9f){const _0x87b757=_0x39377b,{retry:_0x1be4b8}=_0x416d9f;if(_0x1be4b8===![])return 0x0;if(typeof _0x1be4b8==='number')return _0x1be4b8>0x0?_0x1be4b8:0x0;return isPayloadMethod(_0x416d9f[_0x87b757(0x83)])?0x0:0x1;}function shouldRetry(_0x301bd3,_0x2a8f6e){const _0xfa53fb=_0x39377b;if(_0x2a8f6e['signal']?.['aborted']||isAbortError(_0x301bd3))return![];const _0xd7fe93=_0x301bd3?.['response']?.['statusCode'];if(typeof _0xd7fe93!==_0xfa53fb(0xb0))return!![];return(_0x2a8f6e[_0xfa53fb(0xad)]??DEFAULT_RETRY_STATUS_CODES)[_0xfa53fb(0x9b)](_0xd7fe93);}function isPayloadMethod(_0x2a1a68){const _0x1a1692=_0x39377b;return!!_0x2a1a68&&PAYLOAD_METHODS[_0x1a1692(0xa6)](_0x2a1a68['toUpperCase']());}function sleep(_0x165433,_0xc5b077){return new Promise((_0x27bc3c,_0x32fa66)=>{const _0x3feba3=_0x43fc;if(_0xc5b077?.[_0x3feba3(0x86)]){_0x32fa66(_0xc5b077['reason']);return;}if(!(_0x165433>0x0)){_0x27bc3c();return;}let _0x4fe6ba=()=>{};const _0x153ef4=setTimeout(()=>{_0x4fe6ba(),_0x27bc3c();},_0x165433);_0x4fe6ba=onAbort(_0xc5b077,()=>{const _0x210ef6=_0x3feba3;clearTimeout(_0x153ef4),_0x32fa66(_0xc5b077[_0x210ef6(0x8c)]);});});}function buildURL(_0x26be9a,_0x402635){const _0x20f9b5=_0x39377b,_0x19b8dd=joinURL(_0x402635['baseURL'],_0x26be9a),_0x77c2ea=_0x402635['query']??{},_0x32a81c=Object[_0x20f9b5(0x9a)](_0x77c2ea)[_0x20f9b5(0x79)](_0x2faa54=>_0x77c2ea[_0x2faa54]!==void 0x0)['flatMap'](_0x14e180=>{const _0x41e015=_0x77c2ea[_0x14e180];return(Array['isArray'](_0x41e015)?_0x41e015:[_0x41e015])['map'](_0x5bc34b=>encodeURIComponent(_0x14e180)+'='+encodeURIComponent(String(_0x5bc34b)));})['join']('&');if(!_0x32a81c)return _0x19b8dd;return''+_0x19b8dd+(_0x19b8dd[_0x20f9b5(0x9b)]('?')?'&':'?')+_0x32a81c;}function joinURL(_0x58de7a,_0x4d0086){if(!_0x58de7a||isAbsoluteURL(_0x4d0086))return _0x4d0086;return _0x58de7a['replace'](/\/+$/,'')+'/'+_0x4d0086['replace'](/^\/+/,'');}function isAbsoluteURL(_0x4de141){const _0x4b42c2=_0x39377b;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x4b42c2(0x7d)](_0x4de141)||_0x4de141['startsWith']('//');}function dispatchHttp(_0x3d9e1b,_0x103b76,_0x36af1e){const _0x22b378=buildURL(_0x103b76,_0x36af1e);return withRetry(_0x36af1e,()=>attemptRequest(_0x3d9e1b,_0x103b76,_0x22b378,_0x36af1e));}function attemptRequest(_0x5961a2,_0x5a1a28,_0x1986bf,_0x1b2875){const _0x54bc28=!!_0x1b2875['raw'];return new Promise((_0x4f87ed,_0x41c1d0)=>{const _0x77633f=_0x43fc;let _0x50214c=![];const _0x598cec=_0x11c8f8=>{if(_0x50214c)return;_0x50214c=!![],_0x11c8f8();},_0x23ebc3=onAbort(_0x1b2875[_0x77633f(0xa4)],()=>{const _0x30cef8=_0x77633f;_0x598cec(()=>_0x41c1d0(_0x1b2875[_0x30cef8(0xa4)]['reason']));}),_0x50e9c0=_0x340b20=>{_0x23ebc3(),_0x598cec(_0x340b20);};callRequestHooks(_0x5a1a28,_0x1b2875)[_0x77633f(0x8f)](()=>{if(_0x50214c)return;dispatch(_0x5961a2,_0x1986bf,_0x1b2875,{'onSuccess':_0x32f26d=>{const _0x15ec5a=_0x43fc;Promise['resolve']()['then'](()=>refineResponse(_0x32f26d,_0x1b2875))['then'](async _0x5a1b75=>{const _0x46f241=_0x43fc;if(isResponseError(_0x32f26d)){await callResponseErrorHooks(_0x5a1a28,_0x1b2875,_0x5a1b75);if(!_0x1b2875[_0x46f241(0xa7)])throw createResponseError(_0x5a1a28,_0x1b2875,_0x5a1b75);}else await callResponseHooks(_0x5a1a28,_0x1b2875,_0x5a1b75);_0x50e9c0(()=>_0x4f87ed(_0x54bc28?_0x5a1b75:_0x5a1b75['data']));})[_0x15ec5a(0x9f)](_0x3c68b3=>_0x50e9c0(()=>_0x41c1d0(_0x3c68b3)));},'onFail':_0x4deaa3=>{const _0x3f92c4=_0x43fc;Promise[_0x3f92c4(0x99)]()[_0x3f92c4(0x8f)](async()=>{const _0x426d95=normalizeError(_0x4deaa3);if(!isAbortError(_0x426d95))await callRequestErrorHooks(_0x5a1a28,_0x1b2875,_0x426d95);throw _0x426d95;})['catch'](_0x44d9d5=>_0x50e9c0(()=>_0x41c1d0(_0x44d9d5)));}});})[_0x77633f(0x9f)](async _0x3d4b71=>{const _0x56ad43=normalizeError(_0x3d4b71);await callRequestErrorHooks(_0x5a1a28,_0x1b2875,_0x56ad43),_0x50e9c0(()=>_0x41c1d0(_0x56ad43));});});}const _0x4f241b={};_0x4f241b[_0x39377b(0x83)]='GET',_0x4f241b[_0x39377b(0x85)]='json';const defaultConfig=_0x4f241b;function createVessel(_0x2dc6d3={}){const _0x2b4ad6=_0x39377b,_0x25ad99=(_0x885fe8,_0x304640)=>{return dispatchHttp('request',_0x885fe8,mergeOptions(defaultConfig,_0x2dc6d3,_0x304640));},_0x43ed9f=(_0x111923,_0x2da874)=>{const _0x4283f2=_0x43fc,_0x21f4b6={};return _0x21f4b6[_0x4283f2(0x83)]=_0x4283f2(0x7a),dispatchHttp('upload',_0x111923,mergeOptions(defaultConfig,_0x2dc6d3,_0x2da874,_0x21f4b6));},_0x4ddfa9=(_0x4c2903,_0x219418)=>{const _0x39d725=_0x43fc,_0x3a9958={};return _0x3a9958['method']='GET',dispatchHttp(_0x39d725(0x88),_0x4c2903,mergeOptions(defaultConfig,_0x2dc6d3,_0x219418,_0x3a9958));},_0x471b8f=_0x2047eb=>createVessel(mergeOptions(_0x2dc6d3,_0x2047eb)),_0x496079={};return _0x496079[_0x2b4ad6(0x95)]=_0x25ad99,_0x496079['upload']=_0x43ed9f,_0x496079[_0x2b4ad6(0x88)]=_0x4ddfa9,_0x496079[_0x2b4ad6(0xc1)]=_0x471b8f,_0x496079;}function _0x12aa(){const _0x5edd1b=['7892759GIEvDt','type','push','options','request','splice','headers','1405hitSJG','resolve','keys','includes','function','indexOf','4113jxXdhy','catch','arrayBuffer','success','tempFilePath','get','signal','addEventListener','has','ignoreResponseError','957qtdSeg','233787HfjRas','17192TjEkuV','AbortError','stringify','retryStatusCodes','entries','PATCH','number','onProgress','withCredentials','response','firstIpv4','parseResponse','filePath','timeout','onHeadersReceived','uploadFile','6sAInWp','files','file','json','listeners','emit','call','create','onResponseError','onabort','enableHttpDNS','onFail','retryDelay','header','abort','onSuccess','errMsg','filter','POST','_abort','1450NzcuMm','test','name','7983276YdZyMD','enableChunked','forceCellularNetwork','onProgressUpdate','method','data','responseType','aborted','sslVerify','download','body','enumerable','1016RVuyvh','reason','onRequest','PUT','then','4151184TyZtBN'];_0x12aa=function(){return _0x5edd1b;};return _0x12aa();}const vessel=createVessel(),_0x45dd10={};_0x45dd10[_0x39377b(0x8a)]=!![],_0x45dd10[_0x39377b(0xa3)]=function(){return createBeacon;},Object['defineProperty'](exports,'createBeacon',_0x45dd10);const _0x3132c5={};_0x3132c5['enumerable']=!![],_0x3132c5['get']=function(){return createVessel;},Object['defineProperty'](exports,'createVessel',_0x3132c5);const _0x383d46={};_0x383d46['enumerable']=!![],_0x383d46['get']=function(){return vessel;},Object['defineProperty'](exports,'vessel',_0x383d46);
|