@oiyo/framework 0.4.0 → 0.4.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/{index-pyn8N4Rs.d.cts → index-CmD0iXcE.d.cts} +11 -16
- package/dist/{index-pyn8N4Rs.d.mts → index-CmD0iXcE.d.mts} +11 -16
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/oiyo-BS1ESthW.cjs +7 -0
- package/dist/oiyo-CQlUPoLW.mjs +7 -0
- package/dist/oiyo.cjs +2 -2
- package/dist/oiyo.d.cts +3 -3
- package/dist/oiyo.d.mts +3 -3
- package/dist/oiyo.mjs +2 -2
- package/dist/{rolldown-runtime-rYKViu2D.cjs → rolldown-runtime-CrmOzWpZ.cjs} +1 -1
- package/dist/{rolldown-runtime-C2BuSXcD.mjs → rolldown-runtime-D0eOKGL5.mjs} +1 -1
- 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-C2SfNxiw.mjs +0 -7
- package/dist/oiyo-Cct_RYCR.cjs +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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
|
|
@@ -60,7 +60,7 @@ type UniAppRequestOptions = Omit<UniNamespace.RequestOptions, 'url' | 'data' | '
|
|
|
60
60
|
type UniAppRequestResponse<TRBody = any> = Prettify<Omit<UniNamespace.RequestSuccessCallbackResult, 'data'> & {
|
|
61
61
|
data: TRBody;
|
|
62
62
|
}>;
|
|
63
|
-
type UniAppUploadOptions = Omit<UniNamespace.UploadFileOption, 'url' | '
|
|
63
|
+
type UniAppUploadOptions = Omit<UniNamespace.UploadFileOption, 'url' | 'header' | 'formData' | 'timeout' | 'success' | 'fail' | 'complete'>;
|
|
64
64
|
interface UniAppOnUploadProgress extends UniNamespace.OnProgressUpdateResult {}
|
|
65
65
|
type UniAppUploadResponse<TRBody = any> = Prettify<Omit<UniNamespace.UploadFileSuccessCallbackResult, 'data'> & {
|
|
66
66
|
data: TRBody;
|
|
@@ -87,7 +87,7 @@ interface HeadersReceived {
|
|
|
87
87
|
/**
|
|
88
88
|
* 所有请求共享的基础选项。
|
|
89
89
|
*/
|
|
90
|
-
interface
|
|
90
|
+
interface HttpCommonOptions<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>;
|
|
@@ -119,17 +119,12 @@ interface HttpBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType> {
|
|
|
119
119
|
*/
|
|
120
120
|
onHeadersReceived?: (result: HeadersReceived) => void;
|
|
121
121
|
}
|
|
122
|
-
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends
|
|
122
|
+
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpCommonOptions<TRBType>, UniAppRequestOptions {
|
|
123
123
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
124
124
|
}
|
|
125
|
-
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends
|
|
125
|
+
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpCommonOptions<TRBType>, UniAppUploadOptions {
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
128
|
-
* @default - 'file'
|
|
129
|
-
*/
|
|
130
|
-
name?: string;
|
|
131
|
-
/**
|
|
132
|
-
* 上传请求方法
|
|
127
|
+
* 上传请求方法,强制 POST
|
|
133
128
|
* @default - 'POST'
|
|
134
129
|
*/
|
|
135
130
|
method?: 'POST';
|
|
@@ -138,9 +133,9 @@ interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType>
|
|
|
138
133
|
*/
|
|
139
134
|
onProgress?: (result: UniAppOnUploadProgress) => void;
|
|
140
135
|
}
|
|
141
|
-
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends
|
|
136
|
+
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends HttpCommonOptions<TRBType>, UniAppDownloadOptions {
|
|
142
137
|
/**
|
|
143
|
-
*
|
|
138
|
+
* 下载请求方法,强制 GET
|
|
144
139
|
* @default - 'GET'
|
|
145
140
|
*/
|
|
146
141
|
method?: 'GET';
|
|
@@ -150,7 +145,7 @@ interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> e
|
|
|
150
145
|
onProgress?: (result: UniAppDownloadProgress) => void;
|
|
151
146
|
}
|
|
152
147
|
type HttpURL = string;
|
|
153
|
-
|
|
148
|
+
interface HttpOptions extends HttpCommonOptions, UniAppRequestOptions, UniAppUploadOptions, UniAppDownloadOptions {}
|
|
154
149
|
//#endregion
|
|
155
150
|
//#region src/oiyo/http/types/response.d.ts
|
|
156
151
|
type HttpRequestResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
@@ -201,7 +196,7 @@ interface HttpHooks<TContextOptions, TResponse> {
|
|
|
201
196
|
response: TResponse;
|
|
202
197
|
}) => MaybePromise<void>;
|
|
203
198
|
}
|
|
204
|
-
interface HttpConfig extends
|
|
199
|
+
interface HttpConfig extends HttpCommonOptions, HttpHooks<HttpOptions, HttpRawResponse> {}
|
|
205
200
|
interface HttpError<T = any> extends Error {
|
|
206
201
|
resource?: HttpURL;
|
|
207
202
|
options?: HttpOptions;
|
|
@@ -231,4 +226,4 @@ interface Http {
|
|
|
231
226
|
declare function createHttp(globalConfig?: HttpConfig): Http;
|
|
232
227
|
declare const http: Http;
|
|
233
228
|
//#endregion
|
|
234
|
-
export { HttpDownloadResponse as a,
|
|
229
|
+
export { HttpDownloadResponse as a, HttpCommonOptions as c, HttpRequestOptions as d, HttpUploadOptions as f, HttpError as i, HttpDownloadOptions as l, createHttpAborter as m, http as n, HttpRequestResponse as o, ResponseBodyType as p, HttpConfig as r, HttpUploadResponse as s, createHttp as t, HttpOptions as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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
|
|
@@ -60,7 +60,7 @@ type UniAppRequestOptions = Omit<UniNamespace.RequestOptions, 'url' | 'data' | '
|
|
|
60
60
|
type UniAppRequestResponse<TRBody = any> = Prettify<Omit<UniNamespace.RequestSuccessCallbackResult, 'data'> & {
|
|
61
61
|
data: TRBody;
|
|
62
62
|
}>;
|
|
63
|
-
type UniAppUploadOptions = Omit<UniNamespace.UploadFileOption, 'url' | '
|
|
63
|
+
type UniAppUploadOptions = Omit<UniNamespace.UploadFileOption, 'url' | 'header' | 'formData' | 'timeout' | 'success' | 'fail' | 'complete'>;
|
|
64
64
|
interface UniAppOnUploadProgress extends UniNamespace.OnProgressUpdateResult {}
|
|
65
65
|
type UniAppUploadResponse<TRBody = any> = Prettify<Omit<UniNamespace.UploadFileSuccessCallbackResult, 'data'> & {
|
|
66
66
|
data: TRBody;
|
|
@@ -87,7 +87,7 @@ interface HeadersReceived {
|
|
|
87
87
|
/**
|
|
88
88
|
* 所有请求共享的基础选项。
|
|
89
89
|
*/
|
|
90
|
-
interface
|
|
90
|
+
interface HttpCommonOptions<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>;
|
|
@@ -119,17 +119,12 @@ interface HttpBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType> {
|
|
|
119
119
|
*/
|
|
120
120
|
onHeadersReceived?: (result: HeadersReceived) => void;
|
|
121
121
|
}
|
|
122
|
-
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends
|
|
122
|
+
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpCommonOptions<TRBType>, UniAppRequestOptions {
|
|
123
123
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
124
124
|
}
|
|
125
|
-
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends
|
|
125
|
+
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpCommonOptions<TRBType>, UniAppUploadOptions {
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
128
|
-
* @default - 'file'
|
|
129
|
-
*/
|
|
130
|
-
name?: string;
|
|
131
|
-
/**
|
|
132
|
-
* 上传请求方法
|
|
127
|
+
* 上传请求方法,强制 POST
|
|
133
128
|
* @default - 'POST'
|
|
134
129
|
*/
|
|
135
130
|
method?: 'POST';
|
|
@@ -138,9 +133,9 @@ interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType>
|
|
|
138
133
|
*/
|
|
139
134
|
onProgress?: (result: UniAppOnUploadProgress) => void;
|
|
140
135
|
}
|
|
141
|
-
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends
|
|
136
|
+
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends HttpCommonOptions<TRBType>, UniAppDownloadOptions {
|
|
142
137
|
/**
|
|
143
|
-
*
|
|
138
|
+
* 下载请求方法,强制 GET
|
|
144
139
|
* @default - 'GET'
|
|
145
140
|
*/
|
|
146
141
|
method?: 'GET';
|
|
@@ -150,7 +145,7 @@ interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> e
|
|
|
150
145
|
onProgress?: (result: UniAppDownloadProgress) => void;
|
|
151
146
|
}
|
|
152
147
|
type HttpURL = string;
|
|
153
|
-
|
|
148
|
+
interface HttpOptions extends HttpCommonOptions, UniAppRequestOptions, UniAppUploadOptions, UniAppDownloadOptions {}
|
|
154
149
|
//#endregion
|
|
155
150
|
//#region src/oiyo/http/types/response.d.ts
|
|
156
151
|
type HttpRequestResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
@@ -201,7 +196,7 @@ interface HttpHooks<TContextOptions, TResponse> {
|
|
|
201
196
|
response: TResponse;
|
|
202
197
|
}) => MaybePromise<void>;
|
|
203
198
|
}
|
|
204
|
-
interface HttpConfig extends
|
|
199
|
+
interface HttpConfig extends HttpCommonOptions, HttpHooks<HttpOptions, HttpRawResponse> {}
|
|
205
200
|
interface HttpError<T = any> extends Error {
|
|
206
201
|
resource?: HttpURL;
|
|
207
202
|
options?: HttpOptions;
|
|
@@ -231,4 +226,4 @@ interface Http {
|
|
|
231
226
|
declare function createHttp(globalConfig?: HttpConfig): Http;
|
|
232
227
|
declare const http: Http;
|
|
233
228
|
//#endregion
|
|
234
|
-
export { HttpDownloadResponse as a,
|
|
229
|
+
export { HttpDownloadResponse as a, HttpCommonOptions as c, HttpRequestOptions as d, HttpUploadOptions as f, HttpError as i, HttpDownloadOptions as l, createHttpAborter as m, http as n, HttpRequestResponse as o, ResponseBodyType as p, HttpConfig as r, HttpUploadResponse as s, createHttp as t, HttpOptions as u };
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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("./rolldown-runtime-
|
|
9
|
-
const require_oiyo = require("./oiyo-
|
|
8
|
+
require("./rolldown-runtime-CrmOzWpZ.cjs");
|
|
9
|
+
const require_oiyo = require("./oiyo-BS1ESthW.cjs");
|
|
10
10
|
require("./uni.cjs");
|
|
11
11
|
require("./vue.cjs");
|
|
12
12
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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 HttpDownloadResponse, c as
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpCommonOptions, d as HttpRequestOptions, f as HttpUploadOptions, i as HttpError, l as HttpDownloadOptions, m as createHttpAborter, n as http, o as HttpRequestResponse, p as ResponseBodyType, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpOptions } from "./index-CmD0iXcE.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 { HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
13
|
+
export { HttpCommonOptions, HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpOptions, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
|
16
|
+
export { type HttpCommonOptions, type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpOptions, 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.
|
|
2
|
+
* @oiyo/framework v0.4.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 HttpDownloadResponse, c as
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpCommonOptions, d as HttpRequestOptions, f as HttpUploadOptions, i as HttpError, l as HttpDownloadOptions, m as createHttpAborter, n as http, o as HttpRequestResponse, p as ResponseBodyType, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpOptions } from "./index-CmD0iXcE.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 { HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
13
|
+
export { HttpCommonOptions, HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpOptions, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
|
16
|
+
export { type HttpCommonOptions, type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpOptions, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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 "./rolldown-runtime-
|
|
8
|
-
import { n as http, r as createHttpAborter, t as createHttp } from "./oiyo-
|
|
7
|
+
import "./rolldown-runtime-D0eOKGL5.mjs";
|
|
8
|
+
import { n as http, r as createHttpAborter, t as createHttp } from "./oiyo-CQlUPoLW.mjs";
|
|
9
9
|
import "./uni.mjs";
|
|
10
10
|
import "./vue.mjs";
|
|
11
11
|
export * from "@dcloudio/uni-app";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.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 _0x32ba21=_0x5dea;(function(_0x5d8ebc,_0x48473d){const _0x395a20=_0x5dea,_0x1809fa=_0x5d8ebc();while(!![]){try{const _0x32c3a2=parseInt(_0x395a20(0x1be))/0x1*(parseInt(_0x395a20(0x1c6))/0x2)+-parseInt(_0x395a20(0x1f4))/0x3+parseInt(_0x395a20(0x1b1))/0x4*(parseInt(_0x395a20(0x1f9))/0x5)+-parseInt(_0x395a20(0x1e0))/0x6+parseInt(_0x395a20(0x1db))/0x7*(parseInt(_0x395a20(0x1de))/0x8)+parseInt(_0x395a20(0x1a4))/0x9*(parseInt(_0x395a20(0x1b4))/0xa)+parseInt(_0x395a20(0x1ea))/0xb*(-parseInt(_0x395a20(0x1fb))/0xc);if(_0x32c3a2===_0x48473d)break;else _0x1809fa['push'](_0x1809fa['shift']());}catch(_0x668695){_0x1809fa['push'](_0x1809fa['shift']());}}}(_0x3ead,0x29e7c));function _0x3ead(){const _0x171246=['POST','sslVerify','arrayBuffer','onResponse','uploadFile','header','push','enableHttpDNS','has','name','indexOf','427rKkFoN','HttpError','number','20848IfaqTI','onFail','594600QRxDlM','flatMap','onHeadersReceived','tempFilePath','join','aborted','fail','addEventListener','function','withCredentials','188837HZEzOZ','PATCH','abort','enableHttp2','onSuccess','timeout','enableQuic','enumerable','onabort','options','620481LpoTIf','headers','create','includes','resolve','460555xnDNAu','baseURL','264jfmyhZ','method','dataType','63bVtFPK','call','throwIfAborted','retryStatusCodes','removeEventListener','http','reason','<no\x20response>','parseResponse','HTTP\x20request\x20failed','request','firstIpv4','responseType','4ifyTZE','retryDelay','defineProperty','411970SxWJAf','map','data','query','json','enableCache','files','listeners','statusCode','upload','105263yYVauj','complete','filePath','signal','replace','startsWith','raw','onResponseError','6LDzaOW','download','then','file','GET','text','formData','assign','body','<no\x20response\x20body>'];_0x3ead=function(){return _0x171246;};return _0x3ead();}function createHttpAborter(){const _0x30259d=new HttpAbortSignal();return{'signal':_0x30259d,'abort':_0x470b38=>_0x30259d['_abort'](_0x470b38)};}const ABORT_ERROR_NAME='AbortError';var AbortEmitter=class{['listeners']=[];[_0x32ba21(0x1e7)](_0x191fb2,_0x4ff7c1){const _0x28dcdb=_0x32ba21;if(_0x191fb2!=='abort')return;this[_0x28dcdb(0x1bb)][_0x28dcdb(0x1d6)](_0x4ff7c1);}['removeEventListener'](_0x4dbfe5,_0x467c32){const _0x424748=_0x32ba21;if(_0x4dbfe5!==_0x424748(0x1ec))return;const _0x4fd6de=this['listeners'][_0x424748(0x1da)](_0x467c32);if(_0x4fd6de!==-0x1)this['listeners']['splice'](_0x4fd6de,0x1);}['emit'](_0x3c16f8){const _0x5a998b=_0x32ba21;for(const _0x35fd06 of this['listeners']['slice']())_0x35fd06[_0x5a998b(0x1a5)](this,_0x3c16f8);}},HttpAbortSignal=class extends AbortEmitter{['aborted']=![];['reason']=void 0x0;['onabort']=null;['_abort'](_0x320487){const _0xa16068=_0x32ba21;if(this[_0xa16068(0x1e5)])return;this[_0xa16068(0x1e5)]=!![],this['reason']=_0x320487===void 0x0?createAbortError():_0x320487;const _0x20b8b6={};_0x20b8b6['type']=_0xa16068(0x1ec);const _0x4c6c16=_0x20b8b6;if(typeof this['onabort']===_0xa16068(0x1e8))this[_0xa16068(0x1f2)](_0x4c6c16);this['emit'](_0x4c6c16);}[_0x32ba21(0x1a6)](){const _0x46a402=_0x32ba21;if(this[_0x46a402(0x1e5)])throw this['reason'];}};function createAbortError(_0x45bcc6='The\x20operation\x20was\x20aborted'){const _0x557cb9=new Error(_0x45bcc6);return _0x557cb9['name']=ABORT_ERROR_NAME,_0x557cb9;}function isAbortError(_0x239ac4){const _0x10ef5b=_0x32ba21;return _0x239ac4 instanceof Error&&_0x239ac4[_0x10ef5b(0x1d9)]===ABORT_ERROR_NAME;}function onAbort(_0x4590df,_0x165002){const _0x1c7acc=_0x32ba21;if(!_0x4590df)return()=>{};if(_0x4590df[_0x1c7acc(0x1e5)])return _0x165002(),()=>{};return _0x4590df[_0x1c7acc(0x1e7)](_0x1c7acc(0x1ec),_0x165002),()=>_0x4590df[_0x1c7acc(0x1a8)]('abort',_0x165002);}const HOOK_NAMES=['onRequest','onRequestError','onResponse',_0x32ba21(0x1c5)];function mergeOptions(..._0x572725){const _0x1f030c=_0x32ba21,_0x5279b0={},_0x5389d7={};for(const _0x4b23ec of _0x572725){if(!_0x4b23ec)continue;for(const _0x5cba8d of HOOK_NAMES)collectHook(_0x5389d7,_0x5cba8d,_0x4b23ec);const _0x3cebc0=_0x5279b0['headers'],_0x4e2550=_0x5279b0['query'];Object[_0x1f030c(0x1cd)](_0x5279b0,_0x4b23ec);const _0x5283d3={..._0x3cebc0,..._0x4b23ec[_0x1f030c(0x1f5)]};_0x5279b0[_0x1f030c(0x1f5)]=_0x5283d3;const _0x235df1={..._0x4e2550,..._0x4b23ec[_0x1f030c(0x1b7)]};_0x5279b0[_0x1f030c(0x1b7)]=_0x235df1;}for(const [_0x698800,_0x8fcead]of Object['entries'](_0x5389d7))Object[_0x1f030c(0x1cd)](_0x5279b0,{[_0x698800]:async _0x19cd71=>{for(const _0x335685 of _0x8fcead)await _0x335685(_0x19cd71);}});return _0x5279b0;}function collectHook(_0x3e3715,_0x53cb9b,_0x362ce4){const _0x54f672=_0x32ba21,_0x5d3d31=_0x362ce4[_0x53cb9b];if(typeof _0x5d3d31!==_0x54f672(0x1e8))return;_0x3e3715[_0x53cb9b]??=[],_0x3e3715[_0x53cb9b]['push'](_0x5d3d31);}function _0x5dea(_0x997416,_0x6cb2c5){_0x997416=_0x997416-0x1a3;const _0x3eadd4=_0x3ead();let _0x5deac6=_0x3eadd4[_0x997416];return _0x5deac6;}function dispatch(_0x16bd8d,_0x46ad26,_0x47a39f,_0x1a1c62){const _0x55f79b=_0x32ba21;let _0xe42e31;if(_0x16bd8d===_0x55f79b(0x1bd))_0xe42e31=dispatchUpload(_0x46ad26,_0x47a39f,_0x1a1c62);else{if(_0x16bd8d===_0x55f79b(0x1c7))_0xe42e31=dispatchDownload(_0x46ad26,_0x47a39f,_0x1a1c62);else _0xe42e31=dispatchRequest(_0x46ad26,_0x47a39f,_0x1a1c62);}bindTask(_0xe42e31,_0x47a39f);}function bindTask(_0x13d54a,_0x3861b5){const _0x57e59f=_0x32ba21;onAbort(_0x3861b5[_0x57e59f(0x1c1)],()=>_0x13d54a['abort']());if(typeof _0x3861b5[_0x57e59f(0x1e2)]==='function')_0x13d54a[_0x57e59f(0x1e2)](_0x3861b5[_0x57e59f(0x1e2)]);const _0x108410=_0x3861b5['onProgress'];if(typeof _0x108410==='function'&&'onProgressUpdate'in _0x13d54a)_0x13d54a['onProgressUpdate'](_0x108410);}function dispatchRequest(_0x29f3ca,_0x39a6b6,_0x350b26){const _0x4b18d4=_0x32ba21,_0x270dda={'url':_0x29f3ca,'method':_0x39a6b6[_0x4b18d4(0x1fc)],'header':_0x39a6b6['headers'],'data':_0x39a6b6[_0x4b18d4(0x1ce)]??{},'timeout':_0x39a6b6[_0x4b18d4(0x1ef)],'dataType':_0x39a6b6[_0x4b18d4(0x1a3)]||_0x4b18d4(0x1b8),'responseType':mappedResponseBodyType(_0x39a6b6['responseType']),'sslVerify':_0x39a6b6[_0x4b18d4(0x1d1)],'withCredentials':_0x39a6b6[_0x4b18d4(0x1e9)],'firstIpv4':_0x39a6b6[_0x4b18d4(0x1af)],'enableHttp2':_0x39a6b6[_0x4b18d4(0x1ed)],'enableQuic':_0x39a6b6[_0x4b18d4(0x1f0)],'enableCache':_0x39a6b6[_0x4b18d4(0x1b9)],'enableHttpDNS':_0x39a6b6[_0x4b18d4(0x1d7)],'httpDNSServiceId':_0x39a6b6['httpDNSServiceId'],'enableChunked':_0x39a6b6['enableChunked'],'forceCellularNetwork':_0x39a6b6['forceCellularNetwork'],'success':_0x350b26[_0x4b18d4(0x1ee)],'fail':_0x350b26['onFail'],'complete':()=>{}};return uni[_0x4b18d4(0x1ae)](_0x270dda);}function dispatchUpload(_0x47865c,_0x46bbd4,_0x4c0388){const _0xd2decb=_0x32ba21,_0x5813b7={};_0x5813b7['url']=_0x47865c,_0x5813b7['fileType']=_0x46bbd4['fileType'],_0x5813b7[_0xd2decb(0x1c9)]=_0x46bbd4['file'],_0x5813b7[_0xd2decb(0x1c0)]=_0x46bbd4['filePath'],_0x5813b7['name']=_0x46bbd4[_0xd2decb(0x1d9)]??'file',_0x5813b7[_0xd2decb(0x1ba)]=_0x46bbd4['files'],_0x5813b7[_0xd2decb(0x1d5)]=_0x46bbd4['headers'],_0x5813b7[_0xd2decb(0x1cc)]=_0x46bbd4['body']??{},_0x5813b7[_0xd2decb(0x1ef)]=_0x46bbd4[_0xd2decb(0x1ef)],_0x5813b7['success']=_0x4c0388[_0xd2decb(0x1ee)],_0x5813b7[_0xd2decb(0x1e6)]=_0x4c0388['onFail'],_0x5813b7[_0xd2decb(0x1bf)]=()=>{};const _0x944e62=_0x5813b7;return uni[_0xd2decb(0x1d4)](_0x944e62);}function dispatchDownload(_0x13efa5,_0x2c67c1,_0x4bb694){const _0x197c46=_0x32ba21,_0x5f4f24={'url':_0x13efa5,'header':_0x2c67c1['headers'],'timeout':_0x2c67c1[_0x197c46(0x1ef)],'success':_0xf35d32=>{const _0x3d4e54=_0x197c46,_0xfa9b27={..._0xf35d32};_0xfa9b27[_0x3d4e54(0x1b6)]={},_0xfa9b27[_0x3d4e54(0x1b6)][_0x3d4e54(0x1e3)]=_0xf35d32['tempFilePath'],_0x4bb694['onSuccess'](_0xfa9b27);},'fail':_0x4bb694[_0x197c46(0x1df)],'complete':()=>{}};return uni['downloadFile'](_0x5f4f24);}function mappedResponseBodyType(_0x30a0a6){const _0x3ccd87=_0x32ba21;if(!_0x30a0a6||_0x30a0a6==='json')return _0x3ccd87(0x1cb);if(_0x30a0a6===_0x3ccd87(0x1d2))return'arraybuffer';return'text';}var HttpError=class extends Error{constructor(_0x4bbdc7){const _0x18d2b5=_0x32ba21;super(_0x4bbdc7),this[_0x18d2b5(0x1d9)]=_0x18d2b5(0x1dc);}};function createResponseError(_0x5164b8,_0x109905,_0x53b0b0){const _0x50e853=_0x32ba21,_0x3e7f11=_0x5164b8,_0x40a454='['+(_0x109905?.['method']||_0x50e853(0x1ca))+']\x20'+_0x3e7f11,_0x34161c=_0x53b0b0?_0x53b0b0[_0x50e853(0x1bc)]+'\x20'+(_0x53b0b0['errMsg']||''):_0x50e853(0x1ab),_0x30614c=_0x53b0b0?JSON['stringify'](_0x53b0b0['data']):_0x50e853(0x1cf),_0x40b5a6=new HttpError(_0x40a454+':\x20'+_0x34161c+(_0x53b0b0['data']?'\x20'+_0x30614c:''));for(const _0x3a90f6 of['request',_0x50e853(0x1f3),'response',_0x50e853(0x1b6)])Object[_0x50e853(0x1b3)](_0x40b5a6,_0x3a90f6,{'get'(){const _0x49814e=_0x50e853,_0x1a0582={};return _0x1a0582[_0x49814e(0x1ae)]=_0x5164b8,_0x1a0582[_0x49814e(0x1f3)]=_0x109905,_0x1a0582['response']=_0x53b0b0,_0x1a0582[_0x49814e(0x1b6)]=_0x53b0b0['data'],_0x1a0582[_0x3a90f6];}});return _0x40b5a6;}function normalizeError(_0x2efbcc){const _0x182afb=_0x32ba21;if(_0x2efbcc instanceof Error)return _0x2efbcc;return Object[_0x182afb(0x1cd)](new Error(_0x2efbcc?.['errMsg']||_0x2efbcc?.['message']||_0x182afb(0x1ad)),{'cause':_0x2efbcc});}async function callRequestHooks(_0x4aba8b,_0x54aa6e){await _0x54aa6e['onRequest']?.({'options':_0x54aa6e,'resource':_0x4aba8b});}async function callRequestErrorHooks(_0x48258b,_0x55fd87,_0x299837){await _0x55fd87['onRequestError']?.({'options':_0x55fd87,'resource':_0x48258b,'error':_0x299837});}async function callResponseHooks(_0x3a67f8,_0x494013,_0x421cd7){const _0x5dd15d=_0x32ba21;await _0x494013[_0x5dd15d(0x1d3)]?.({'options':_0x494013,'resource':_0x3a67f8,'response':_0x421cd7});}async function callResponseErrorHooks(_0x2660a5,_0x2a4315,_0x1befa9){await _0x2a4315['onResponseError']?.({'options':_0x2a4315,'resource':_0x2660a5,'response':_0x1befa9});}async function refineResponse(_0x50a5e4,_0x3df7f3){const _0x58e782=_0x32ba21;if(_0x3df7f3[_0x58e782(0x1b0)]===_0x58e782(0x1b8)||!_0x3df7f3['responseType'])return{..._0x50a5e4,'data':await parseJSONResponse(_0x50a5e4['data'],_0x3df7f3)};return _0x50a5e4;}function parseJSONResponse(_0x1739dc,_0x4c9868){const _0x1f1a05=_0x32ba21;if(typeof _0x1739dc!=='string')return _0x1739dc;if(_0x4c9868[_0x1f1a05(0x1ac)])return _0x4c9868['parseResponse'](_0x1739dc);return _0x1739dc?JSON['parse'](_0x1739dc):null;}function isResponseError(_0x2432f7){const _0x424ad4=_0x32ba21,_0x2e9795=_0x424ad4(0x1bc)in _0x2432f7?_0x2432f7[_0x424ad4(0x1bc)]:void 0x0;return typeof _0x2e9795==='number'&&(_0x2e9795<0xc8||_0x2e9795>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x32ba21(0x1d0),'PUT','DELETE',_0x32ba21(0x1eb)]);async function withRetry(_0x27cb4d,_0x30ba0f){const _0x36b5ab=_0x32ba21,_0x152ee8=resolveRetryCount(_0x27cb4d);for(let _0x3c024c=0x0;;_0x3c024c++)try{return await _0x30ba0f();}catch(_0x52ba19){if(_0x3c024c>=_0x152ee8||!shouldRetry(_0x52ba19,_0x27cb4d))throw _0x52ba19;await sleep(_0x27cb4d[_0x36b5ab(0x1b2)]??0x0,_0x27cb4d[_0x36b5ab(0x1c1)]);}}function resolveRetryCount(_0x1f7190){const _0x3b9dec=_0x32ba21,{retry:_0x4b893c}=_0x1f7190;if(_0x4b893c===![])return 0x0;if(typeof _0x4b893c==='number')return _0x4b893c>0x0?_0x4b893c:0x0;return isPayloadMethod(_0x1f7190[_0x3b9dec(0x1fc)])?0x0:0x1;}function shouldRetry(_0x18f178,_0x6b14c2){const _0x2ccff6=_0x32ba21;if(_0x6b14c2['signal']?.[_0x2ccff6(0x1e5)]||isAbortError(_0x18f178))return![];const _0x426d8a=_0x18f178?.['response']?.['statusCode'];if(typeof _0x426d8a!==_0x2ccff6(0x1dd))return!![];return(_0x6b14c2[_0x2ccff6(0x1a7)]??DEFAULT_RETRY_STATUS_CODES)[_0x2ccff6(0x1f7)](_0x426d8a);}function isPayloadMethod(_0xb533a9){const _0x2a00ee=_0x32ba21;return!!_0xb533a9&&PAYLOAD_METHODS[_0x2a00ee(0x1d8)](_0xb533a9['toUpperCase']());}function sleep(_0x581205,_0x51a0e6){return new Promise((_0x185003,_0x152c57)=>{if(_0x51a0e6?.['aborted']){_0x152c57(_0x51a0e6['reason']);return;}if(!(_0x581205>0x0)){_0x185003();return;}let _0x4b6ebb=()=>{};const _0xe92792=setTimeout(()=>{_0x4b6ebb(),_0x185003();},_0x581205);_0x4b6ebb=onAbort(_0x51a0e6,()=>{const _0x4d80fc=_0x5dea;clearTimeout(_0xe92792),_0x152c57(_0x51a0e6[_0x4d80fc(0x1aa)]);});});}function buildURL(_0x272078,_0x2a9e51){const _0x34595b=_0x32ba21,_0x2b7aec=joinURL(_0x2a9e51[_0x34595b(0x1fa)],_0x272078),_0x5b88a4=_0x2a9e51['query']??{},_0x305b2b=Object['keys'](_0x5b88a4)['filter'](_0x290047=>_0x5b88a4[_0x290047]!==void 0x0)[_0x34595b(0x1e1)](_0x2bc782=>{const _0x6cff1=_0x34595b,_0x27a225=_0x5b88a4[_0x2bc782];return(Array['isArray'](_0x27a225)?_0x27a225:[_0x27a225])[_0x6cff1(0x1b5)](_0x3099cd=>encodeURIComponent(_0x2bc782)+'='+encodeURIComponent(String(_0x3099cd)));})[_0x34595b(0x1e4)]('&');if(!_0x305b2b)return _0x2b7aec;return''+_0x2b7aec+(_0x2b7aec['includes']('?')?'&':'?')+_0x305b2b;}function joinURL(_0x2591f2,_0x1a3e55){const _0x4cb4f1=_0x32ba21;if(!_0x2591f2||isAbsoluteURL(_0x1a3e55))return _0x1a3e55;return _0x2591f2[_0x4cb4f1(0x1c2)](/\/+$/,'')+'/'+_0x1a3e55[_0x4cb4f1(0x1c2)](/^\/+/,'');}function isAbsoluteURL(_0x5e93d5){const _0x556b13=_0x32ba21;return/^[a-z][a-z\d+\-.]*:\/\//i['test'](_0x5e93d5)||_0x5e93d5[_0x556b13(0x1c3)]('//');}function dispatchHttp(_0x4f9ce7,_0x5b85fb,_0x3950ca){const _0x3ad917=buildURL(_0x5b85fb,_0x3950ca);return withRetry(_0x3950ca,()=>attemptRequest(_0x4f9ce7,_0x5b85fb,_0x3ad917,_0x3950ca));}function attemptRequest(_0xc015d3,_0x1d9193,_0x2d178d,_0x4a719a){const _0x15f905=_0x32ba21,_0x33b63c=!!_0x4a719a[_0x15f905(0x1c4)];return new Promise((_0xd19824,_0x1d5945)=>{const _0x16e3fd=_0x15f905;let _0xd0896c=![];const _0x1dcd18=_0x148326=>{if(_0xd0896c)return;_0xd0896c=!![],_0x148326();},_0x47fe4a=onAbort(_0x4a719a[_0x16e3fd(0x1c1)],()=>{const _0x3b9a7a=_0x16e3fd;_0x1dcd18(()=>_0x1d5945(_0x4a719a[_0x3b9a7a(0x1c1)]['reason']));}),_0x3e6db0=_0x31ea4b=>{_0x47fe4a(),_0x1dcd18(_0x31ea4b);};callRequestHooks(_0x1d9193,_0x4a719a)[_0x16e3fd(0x1c8)](()=>{if(_0xd0896c)return;dispatch(_0xc015d3,_0x2d178d,_0x4a719a,{'onSuccess':_0x3d75b2=>{const _0x3c10c0=_0x5dea;Promise[_0x3c10c0(0x1f8)]()[_0x3c10c0(0x1c8)](()=>refineResponse(_0x3d75b2,_0x4a719a))[_0x3c10c0(0x1c8)](async _0x55781a=>{if(isResponseError(_0x3d75b2)){await callResponseErrorHooks(_0x1d9193,_0x4a719a,_0x55781a);if(!_0x4a719a['ignoreResponseError'])throw createResponseError(_0x1d9193,_0x4a719a,_0x55781a);}else await callResponseHooks(_0x1d9193,_0x4a719a,_0x55781a);_0x3e6db0(()=>_0xd19824(_0x33b63c?_0x55781a:_0x55781a['data']));})['catch'](_0x27b778=>_0x3e6db0(()=>_0x1d5945(_0x27b778)));},'onFail':_0x598061=>{const _0xf2169c=_0x5dea;Promise['resolve']()[_0xf2169c(0x1c8)](async()=>{const _0x463eb2=normalizeError(_0x598061);if(!isAbortError(_0x463eb2))await callRequestErrorHooks(_0x1d9193,_0x4a719a,_0x463eb2);throw _0x463eb2;})['catch'](_0x3c53d1=>_0x3e6db0(()=>_0x1d5945(_0x3c53d1)));}});})['catch'](async _0x435675=>{const _0x398788=normalizeError(_0x435675);await callRequestErrorHooks(_0x1d9193,_0x4a719a,_0x398788),_0x3e6db0(()=>_0x1d5945(_0x398788));});});}const _0xc47fb6={};_0xc47fb6['method']='GET',_0xc47fb6['responseType']='json';const defaultConfig=_0xc47fb6;function createHttp(_0x2c82e9={}){const _0x877b23=_0x32ba21,_0x28a5e1=(_0x4804cc,_0x11cf55)=>{return dispatchHttp('request',_0x4804cc,mergeOptions(defaultConfig,_0x2c82e9,_0x11cf55));},_0x35b9b1=(_0x540e05,_0x2febb1)=>{const _0x12ce49=_0x5dea,_0x3244a4={};return _0x3244a4[_0x12ce49(0x1fc)]=_0x12ce49(0x1d0),dispatchHttp('upload',_0x540e05,mergeOptions(defaultConfig,_0x2c82e9,_0x2febb1,_0x3244a4));},_0x1deef4=(_0x14ddc7,_0x555964)=>{const _0x7a81d5={};return _0x7a81d5['method']='GET',dispatchHttp('download',_0x14ddc7,mergeOptions(defaultConfig,_0x2c82e9,_0x555964,_0x7a81d5));},_0xf6777e=_0xaa2b1b=>createHttp(mergeOptions(_0x2c82e9,_0xaa2b1b)),_0x34f75a={};return _0x34f75a[_0x877b23(0x1ae)]=_0x28a5e1,_0x34f75a['upload']=_0x35b9b1,_0x34f75a['download']=_0x1deef4,_0x34f75a[_0x877b23(0x1f6)]=_0xf6777e,_0x34f75a;}const http=createHttp(),_0x5c37a4={};_0x5c37a4[_0x32ba21(0x1f1)]=!![],_0x5c37a4['get']=function(){return createHttp;},Object[_0x32ba21(0x1b3)](exports,'createHttp',_0x5c37a4);const _0x159b27={};_0x159b27['enumerable']=!![],_0x159b27['get']=function(){return createHttpAborter;},Object[_0x32ba21(0x1b3)](exports,'createHttpAborter',_0x159b27);const _0x2a9e96={};_0x2a9e96[_0x32ba21(0x1f1)]=!![],_0x2a9e96['get']=function(){return http;},Object['defineProperty'](exports,_0x32ba21(0x1a9),_0x2a9e96);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.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 _0x2e45e0=_0x29a8;(function(_0x18452c,_0x363571){const _0x15de72=_0x29a8,_0x32ebca=_0x18452c();while(!![]){try{const _0x3f61b8=parseInt(_0x15de72(0xc4))/0x1*(-parseInt(_0x15de72(0xd9))/0x2)+parseInt(_0x15de72(0xbb))/0x3+parseInt(_0x15de72(0xdf))/0x4+-parseInt(_0x15de72(0xad))/0x5*(-parseInt(_0x15de72(0xe3))/0x6)+parseInt(_0x15de72(0xd3))/0x7+-parseInt(_0x15de72(0xec))/0x8*(-parseInt(_0x15de72(0xac))/0x9)+-parseInt(_0x15de72(0xee))/0xa;if(_0x3f61b8===_0x363571)break;else _0x32ebca['push'](_0x32ebca['shift']());}catch(_0x5af95e){_0x32ebca['push'](_0x32ebca['shift']());}}}(_0x4f0c,0x52a72));function createHttpAborter(){const _0x1bd184=new HttpAbortSignal();return{'signal':_0x1bd184,'abort':_0x2d1da4=>_0x1bd184['_abort'](_0x2d1da4)};}const ABORT_ERROR_NAME='AbortError';var AbortEmitter=class{[_0x2e45e0(0xce)]=[];['addEventListener'](_0x29d9aa,_0x19d1eb){const _0x1ea2d0=_0x2e45e0;if(_0x29d9aa!=='abort')return;this[_0x1ea2d0(0xce)][_0x1ea2d0(0x9d)](_0x19d1eb);}[_0x2e45e0(0xb2)](_0x32b5d0,_0x5b3611){const _0x843400=_0x2e45e0;if(_0x32b5d0!=='abort')return;const _0x328ade=this['listeners'][_0x843400(0xb3)](_0x5b3611);if(_0x328ade!==-0x1)this['listeners'][_0x843400(0xba)](_0x328ade,0x1);}[_0x2e45e0(0xd1)](_0x4684e5){const _0x2f20c6=_0x2e45e0;for(const _0x52aee9 of this[_0x2f20c6(0xce)][_0x2f20c6(0xd2)]())_0x52aee9['call'](this,_0x4684e5);}},HttpAbortSignal=class extends AbortEmitter{[_0x2e45e0(0xe9)]=![];[_0x2e45e0(0xd4)]=void 0x0;[_0x2e45e0(0xe5)]=null;['_abort'](_0x333309){const _0x1a4784=_0x2e45e0;if(this['aborted'])return;this[_0x1a4784(0xe9)]=!![],this['reason']=_0x333309===void 0x0?createAbortError():_0x333309;const _0xe9819e={};_0xe9819e['type']='abort';const _0x2efcdc=_0xe9819e;if(typeof this['onabort']===_0x1a4784(0xe6))this[_0x1a4784(0xe5)](_0x2efcdc);this['emit'](_0x2efcdc);}[_0x2e45e0(0xb4)](){if(this['aborted'])throw this['reason'];}};function createAbortError(_0x1f5aae='The\x20operation\x20was\x20aborted'){const _0x5afc89=new Error(_0x1f5aae);return _0x5afc89['name']=ABORT_ERROR_NAME,_0x5afc89;}function isAbortError(_0xfb3ef8){const _0x5bc53e=_0x2e45e0;return _0xfb3ef8 instanceof Error&&_0xfb3ef8[_0x5bc53e(0xcf)]===ABORT_ERROR_NAME;}function onAbort(_0x1d874c,_0x599fa6){const _0x3fb5ad=_0x2e45e0;if(!_0x1d874c)return()=>{};if(_0x1d874c[_0x3fb5ad(0xe9)])return _0x599fa6(),()=>{};return _0x1d874c['addEventListener'](_0x3fb5ad(0xc7),_0x599fa6),()=>_0x1d874c['removeEventListener'](_0x3fb5ad(0xc7),_0x599fa6);}const HOOK_NAMES=[_0x2e45e0(0xdd),_0x2e45e0(0xeb),_0x2e45e0(0xa1),'onResponseError'];function mergeOptions(..._0x149ff3){const _0x462bd1=_0x2e45e0,_0x47d570={},_0x11313b={};for(const _0x553897 of _0x149ff3){if(!_0x553897)continue;for(const _0xf4ed00 of HOOK_NAMES)collectHook(_0x11313b,_0xf4ed00,_0x553897);const _0xbd9ca1=_0x47d570[_0x462bd1(0xea)],_0x55287c=_0x47d570[_0x462bd1(0xda)];Object['assign'](_0x47d570,_0x553897);const _0x239be0={..._0xbd9ca1,..._0x553897['headers']};_0x47d570['headers']=_0x239be0;const _0x457f22={..._0x55287c,..._0x553897['query']};_0x47d570[_0x462bd1(0xda)]=_0x457f22;}for(const [_0x44e63b,_0x2cc050]of Object['entries'](_0x11313b))Object[_0x462bd1(0x99)](_0x47d570,{[_0x44e63b]:async _0x345f97=>{for(const _0x165c32 of _0x2cc050)await _0x165c32(_0x345f97);}});return _0x47d570;}function collectHook(_0x5003f6,_0x359a1a,_0x9978d2){const _0x51b0de=_0x2e45e0,_0x1c9e81=_0x9978d2[_0x359a1a];if(typeof _0x1c9e81!=='function')return;_0x5003f6[_0x359a1a]??=[],_0x5003f6[_0x359a1a][_0x51b0de(0x9d)](_0x1c9e81);}function dispatch(_0x5a1734,_0x36d295,_0x2d4798,_0x385890){const _0x3fd76e=_0x2e45e0;let _0x5d64e9;if(_0x5a1734==='upload')_0x5d64e9=dispatchUpload(_0x36d295,_0x2d4798,_0x385890);else{if(_0x5a1734===_0x3fd76e(0x98))_0x5d64e9=dispatchDownload(_0x36d295,_0x2d4798,_0x385890);else _0x5d64e9=dispatchRequest(_0x36d295,_0x2d4798,_0x385890);}bindTask(_0x5d64e9,_0x2d4798);}function bindTask(_0x3725fd,_0x13f145){const _0x43e3cc=_0x2e45e0;onAbort(_0x13f145['signal'],()=>_0x3725fd[_0x43e3cc(0xc7)]());if(typeof _0x13f145[_0x43e3cc(0xcd)]===_0x43e3cc(0xe6))_0x3725fd['onHeadersReceived'](_0x13f145[_0x43e3cc(0xcd)]);const _0x452e73=_0x13f145['onProgress'];if(typeof _0x452e73==='function'&&'onProgressUpdate'in _0x3725fd)_0x3725fd[_0x43e3cc(0xbe)](_0x452e73);}function dispatchRequest(_0x378757,_0xedf9c0,_0x4e6a87){const _0x40702e=_0x2e45e0,_0x564047={'url':_0x378757,'method':_0xedf9c0[_0x40702e(0xd8)],'header':_0xedf9c0[_0x40702e(0xea)],'data':_0xedf9c0['body']??{},'timeout':_0xedf9c0[_0x40702e(0xae)],'dataType':_0xedf9c0['dataType']||_0x40702e(0xa3),'responseType':mappedResponseBodyType(_0xedf9c0[_0x40702e(0xf0)]),'sslVerify':_0xedf9c0['sslVerify'],'withCredentials':_0xedf9c0['withCredentials'],'firstIpv4':_0xedf9c0[_0x40702e(0xdc)],'enableHttp2':_0xedf9c0['enableHttp2'],'enableQuic':_0xedf9c0[_0x40702e(0xed)],'enableCache':_0xedf9c0['enableCache'],'enableHttpDNS':_0xedf9c0['enableHttpDNS'],'httpDNSServiceId':_0xedf9c0[_0x40702e(0xb8)],'enableChunked':_0xedf9c0['enableChunked'],'forceCellularNetwork':_0xedf9c0['forceCellularNetwork'],'success':_0x4e6a87['onSuccess'],'fail':_0x4e6a87['onFail'],'complete':()=>{}};return uni['request'](_0x564047);}function dispatchUpload(_0x53ceee,_0x4b12da,_0x6df9e8){const _0x1c80fb=_0x2e45e0,_0x2c9501={};_0x2c9501[_0x1c80fb(0xe1)]=_0x53ceee,_0x2c9501['fileType']=_0x4b12da[_0x1c80fb(0xaf)],_0x2c9501[_0x1c80fb(0xc2)]=_0x4b12da['file'],_0x2c9501['filePath']=_0x4b12da[_0x1c80fb(0xe7)],_0x2c9501[_0x1c80fb(0xcf)]=_0x4b12da['name']??_0x1c80fb(0xc2),_0x2c9501[_0x1c80fb(0xd7)]=_0x4b12da['files'],_0x2c9501['header']=_0x4b12da[_0x1c80fb(0xea)],_0x2c9501['formData']=_0x4b12da[_0x1c80fb(0xa5)]??{},_0x2c9501['timeout']=_0x4b12da[_0x1c80fb(0xae)],_0x2c9501[_0x1c80fb(0xa7)]=_0x6df9e8[_0x1c80fb(0xa0)],_0x2c9501[_0x1c80fb(0xc9)]=_0x6df9e8[_0x1c80fb(0xb9)],_0x2c9501[_0x1c80fb(0xe4)]=()=>{};const _0x5247b8=_0x2c9501;return uni['uploadFile'](_0x5247b8);}function dispatchDownload(_0x1d7e5e,_0x3fdbbf,_0x1dae30){const _0x11be2b=_0x2e45e0,_0x2e7140={'url':_0x1d7e5e,'header':_0x3fdbbf[_0x11be2b(0xea)],'timeout':_0x3fdbbf[_0x11be2b(0xae)],'success':_0x2c22a7=>{const _0x432dc3=_0x11be2b,_0x44d5ba={..._0x2c22a7};_0x44d5ba['data']={},_0x44d5ba['data'][_0x432dc3(0xef)]=_0x2c22a7[_0x432dc3(0xef)],_0x1dae30['onSuccess'](_0x44d5ba);},'fail':_0x1dae30['onFail'],'complete':()=>{}};return uni['downloadFile'](_0x2e7140);}function mappedResponseBodyType(_0x279585){const _0x3b2aa5=_0x2e45e0;if(!_0x279585||_0x279585===_0x3b2aa5(0xa3))return _0x3b2aa5(0xcb);if(_0x279585===_0x3b2aa5(0xbd))return _0x3b2aa5(0xbf);return _0x3b2aa5(0xcb);}var HttpError=class extends Error{constructor(_0x54e159){const _0x3de3f0=_0x2e45e0;super(_0x54e159),this['name']=_0x3de3f0(0x9a);}};function _0x29a8(_0x158b6a,_0x1f8b31){_0x158b6a=_0x158b6a-0x97;const _0x4f0cae=_0x4f0c();let _0x29a8c6=_0x4f0cae[_0x158b6a];return _0x29a8c6;}function createResponseError(_0x26c0dd,_0x5d9e35,_0x4474a2){const _0x3e70bb=_0x2e45e0,_0x1a5349=_0x26c0dd,_0x4772ab='['+(_0x5d9e35?.['method']||_0x3e70bb(0xd0))+']\x20'+_0x1a5349,_0x2b06b2=_0x4474a2?_0x4474a2['statusCode']+'\x20'+(_0x4474a2[_0x3e70bb(0xe0)]||''):'<no\x20response>',_0xe7ddcd=_0x4474a2?JSON[_0x3e70bb(0xa4)](_0x4474a2[_0x3e70bb(0xd5)]):_0x3e70bb(0xb1),_0x48620d=new HttpError(_0x4772ab+':\x20'+_0x2b06b2+(_0x4474a2['data']?'\x20'+_0xe7ddcd:''));for(const _0x5c2051 of[_0x3e70bb(0xbc),_0x3e70bb(0x9f),'response','data'])Object[_0x3e70bb(0xa2)](_0x48620d,_0x5c2051,{'get'(){const _0x491cb2=_0x3e70bb,_0x2d5ca3={};return _0x2d5ca3['request']=_0x26c0dd,_0x2d5ca3['options']=_0x5d9e35,_0x2d5ca3['response']=_0x4474a2,_0x2d5ca3[_0x491cb2(0xd5)]=_0x4474a2['data'],_0x2d5ca3[_0x5c2051];}});return _0x48620d;}function normalizeError(_0x1a1b68){const _0xfa13fb=_0x2e45e0;if(_0x1a1b68 instanceof Error)return _0x1a1b68;return Object['assign'](new Error(_0x1a1b68?.['errMsg']||_0x1a1b68?.['message']||_0xfa13fb(0xde)),{'cause':_0x1a1b68});}async function callRequestHooks(_0x3c49c1,_0x2dc9f3){await _0x2dc9f3['onRequest']?.({'options':_0x2dc9f3,'resource':_0x3c49c1});}async function callRequestErrorHooks(_0x402c96,_0xd6bd18,_0x24f279){const _0x5d8094=_0x2e45e0;await _0xd6bd18[_0x5d8094(0xeb)]?.({'options':_0xd6bd18,'resource':_0x402c96,'error':_0x24f279});}async function callResponseHooks(_0x4e9747,_0x33427f,_0x39d623){await _0x33427f['onResponse']?.({'options':_0x33427f,'resource':_0x4e9747,'response':_0x39d623});}async function callResponseErrorHooks(_0x486321,_0x5e5a1b,_0x3864d1){const _0x864e59=_0x2e45e0;await _0x5e5a1b[_0x864e59(0xe8)]?.({'options':_0x5e5a1b,'resource':_0x486321,'response':_0x3864d1});}async function refineResponse(_0x31318c,_0x2f2271){const _0x1cbf57=_0x2e45e0;if(_0x2f2271[_0x1cbf57(0xf0)]===_0x1cbf57(0xa3)||!_0x2f2271['responseType'])return{..._0x31318c,'data':await parseJSONResponse(_0x31318c['data'],_0x2f2271)};return _0x31318c;}function parseJSONResponse(_0x10d619,_0x4236f8){const _0x47ff2e=_0x2e45e0;if(typeof _0x10d619!=='string')return _0x10d619;if(_0x4236f8[_0x47ff2e(0xab)])return _0x4236f8['parseResponse'](_0x10d619);return _0x10d619?JSON[_0x47ff2e(0xa9)](_0x10d619):null;}function isResponseError(_0x1c734e){const _0x257da0=_0x2e45e0,_0x2973db='statusCode'in _0x1c734e?_0x1c734e[_0x257da0(0xa6)]:void 0x0;return typeof _0x2973db==='number'&&(_0x2973db<0xc8||_0x2973db>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST',_0x2e45e0(0xc6),_0x2e45e0(0xaa),'PATCH']);async function withRetry(_0x29a921,_0x325564){const _0xe5db38=_0x2e45e0,_0x645070=resolveRetryCount(_0x29a921);for(let _0x5c1de0=0x0;;_0x5c1de0++)try{return await _0x325564();}catch(_0x170df8){if(_0x5c1de0>=_0x645070||!shouldRetry(_0x170df8,_0x29a921))throw _0x170df8;await sleep(_0x29a921['retryDelay']??0x0,_0x29a921[_0xe5db38(0x9e)]);}}function resolveRetryCount(_0x13786d){const {retry:_0x1a500d}=_0x13786d;if(_0x1a500d===![])return 0x0;if(typeof _0x1a500d==='number')return _0x1a500d>0x0?_0x1a500d:0x0;return isPayloadMethod(_0x13786d['method'])?0x0:0x1;}function shouldRetry(_0x169b09,_0x46425b){const _0x52ad9f=_0x2e45e0;if(_0x46425b[_0x52ad9f(0x9e)]?.[_0x52ad9f(0xe9)]||isAbortError(_0x169b09))return![];const _0x39b6d0=_0x169b09?.[_0x52ad9f(0xd6)]?.[_0x52ad9f(0xa6)];if(typeof _0x39b6d0!==_0x52ad9f(0x9b))return!![];return(_0x46425b[_0x52ad9f(0xe2)]??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x39b6d0);}function isPayloadMethod(_0x174472){const _0x1f14dc=_0x2e45e0;return!!_0x174472&&PAYLOAD_METHODS[_0x1f14dc(0x97)](_0x174472['toUpperCase']());}function sleep(_0x2abaf2,_0x231113){return new Promise((_0x28fb33,_0x49eccf)=>{if(_0x231113?.['aborted']){_0x49eccf(_0x231113['reason']);return;}if(!(_0x2abaf2>0x0)){_0x28fb33();return;}let _0x5f2766=()=>{};const _0x1f2b94=setTimeout(()=>{_0x5f2766(),_0x28fb33();},_0x2abaf2);_0x5f2766=onAbort(_0x231113,()=>{const _0x115715=_0x29a8;clearTimeout(_0x1f2b94),_0x49eccf(_0x231113[_0x115715(0xd4)]);});});}function buildURL(_0x513d14,_0x44b7de){const _0x881be1=_0x2e45e0,_0x28c998=joinURL(_0x44b7de[_0x881be1(0xb0)],_0x513d14),_0x15108b=_0x44b7de['query']??{},_0x2834b6=Object[_0x881be1(0xb5)](_0x15108b)[_0x881be1(0x9c)](_0x135f2f=>_0x15108b[_0x135f2f]!==void 0x0)[_0x881be1(0xc8)](_0x143a44=>{const _0x310ba=_0x881be1,_0x3c3a51=_0x15108b[_0x143a44];return(Array[_0x310ba(0xca)](_0x3c3a51)?_0x3c3a51:[_0x3c3a51])['map'](_0x2c1ac7=>encodeURIComponent(_0x143a44)+'='+encodeURIComponent(String(_0x2c1ac7)));})['join']('&');if(!_0x2834b6)return _0x28c998;return''+_0x28c998+(_0x28c998['includes']('?')?'&':'?')+_0x2834b6;}function joinURL(_0x5e1d66,_0x2176dd){const _0x450384=_0x2e45e0;if(!_0x5e1d66||isAbsoluteURL(_0x2176dd))return _0x2176dd;return _0x5e1d66['replace'](/\/+$/,'')+'/'+_0x2176dd[_0x450384(0xdb)](/^\/+/,'');}function isAbsoluteURL(_0x571b53){const _0x389e40=_0x2e45e0;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x389e40(0xb7)](_0x571b53)||_0x571b53['startsWith']('//');}function dispatchHttp(_0x24e567,_0x35600f,_0x3e1ec8){const _0x7b6092=buildURL(_0x35600f,_0x3e1ec8);return withRetry(_0x3e1ec8,()=>attemptRequest(_0x24e567,_0x35600f,_0x7b6092,_0x3e1ec8));}function attemptRequest(_0x20d137,_0x28ec94,_0x545fbf,_0x4e7ed4){const _0x28dd38=_0x2e45e0,_0xfd5554=!!_0x4e7ed4[_0x28dd38(0xc3)];return new Promise((_0x5780c3,_0x36c594)=>{const _0x476f55=_0x28dd38;let _0x4fb48d=![];const _0x38bab6=_0xe3bbff=>{if(_0x4fb48d)return;_0x4fb48d=!![],_0xe3bbff();},_0x141599=onAbort(_0x4e7ed4[_0x476f55(0x9e)],()=>{const _0x192675=_0x476f55;_0x38bab6(()=>_0x36c594(_0x4e7ed4[_0x192675(0x9e)][_0x192675(0xd4)]));}),_0x655583=_0x24f9c7=>{_0x141599(),_0x38bab6(_0x24f9c7);};callRequestHooks(_0x28ec94,_0x4e7ed4)['then'](()=>{if(_0x4fb48d)return;dispatch(_0x20d137,_0x545fbf,_0x4e7ed4,{'onSuccess':_0x1b5e2b=>{const _0x500662=_0x29a8;Promise[_0x500662(0xb6)]()['then'](()=>refineResponse(_0x1b5e2b,_0x4e7ed4))['then'](async _0x48af7d=>{const _0x545cc1=_0x500662;if(isResponseError(_0x1b5e2b)){await callResponseErrorHooks(_0x28ec94,_0x4e7ed4,_0x48af7d);if(!_0x4e7ed4[_0x545cc1(0xc5)])throw createResponseError(_0x28ec94,_0x4e7ed4,_0x48af7d);}else await callResponseHooks(_0x28ec94,_0x4e7ed4,_0x48af7d);_0x655583(()=>_0x5780c3(_0xfd5554?_0x48af7d:_0x48af7d['data']));})['catch'](_0x68a295=>_0x655583(()=>_0x36c594(_0x68a295)));},'onFail':_0x33a9a3=>{const _0xeca590=_0x29a8;Promise[_0xeca590(0xb6)]()[_0xeca590(0xc1)](async()=>{const _0x4ebbcf=normalizeError(_0x33a9a3);if(!isAbortError(_0x4ebbcf))await callRequestErrorHooks(_0x28ec94,_0x4e7ed4,_0x4ebbcf);throw _0x4ebbcf;})[_0xeca590(0xa8)](_0x177227=>_0x655583(()=>_0x36c594(_0x177227)));}});})['catch'](async _0x167b01=>{const _0x5e07fe=normalizeError(_0x167b01);await callRequestErrorHooks(_0x28ec94,_0x4e7ed4,_0x5e07fe),_0x655583(()=>_0x36c594(_0x5e07fe));});});}const _0x5bb108={};_0x5bb108['method']=_0x2e45e0(0xd0),_0x5bb108['responseType']='json';const defaultConfig=_0x5bb108;function createHttp(_0x523252={}){const _0x589989=_0x2e45e0,_0x5965fa=(_0x3add0e,_0x263fc0)=>{return dispatchHttp('request',_0x3add0e,mergeOptions(defaultConfig,_0x523252,_0x263fc0));},_0x5215e7=(_0x1026ce,_0x589a4b)=>{const _0x469974=_0x29a8,_0x4d576c={};return _0x4d576c['method']='POST',dispatchHttp(_0x469974(0xc0),_0x1026ce,mergeOptions(defaultConfig,_0x523252,_0x589a4b,_0x4d576c));},_0x211212=(_0x46767e,_0x431ff6)=>{const _0x1d91b8=_0x29a8,_0x20754d={};return _0x20754d['method']=_0x1d91b8(0xd0),dispatchHttp('download',_0x46767e,mergeOptions(defaultConfig,_0x523252,_0x431ff6,_0x20754d));},_0x39d72a=_0x36198b=>createHttp(mergeOptions(_0x523252,_0x36198b)),_0x312095={};return _0x312095['request']=_0x5965fa,_0x312095[_0x589989(0xc0)]=_0x5215e7,_0x312095[_0x589989(0x98)]=_0x211212,_0x312095[_0x589989(0xcc)]=_0x39d72a,_0x312095;}function _0x4f0c(){const _0x348fcf=['isArray','text','create','onHeadersReceived','listeners','name','GET','emit','slice','4132387NvUcOb','reason','data','response','files','method','28746xdlJMy','query','replace','firstIpv4','onRequest','HTTP\x20request\x20failed','1886820ebRowp','errMsg','url','retryStatusCodes','2936646GlKtcx','complete','onabort','function','filePath','onResponseError','aborted','headers','onRequestError','48fqrcNG','enableQuic','16230160RYWull','tempFilePath','responseType','has','download','assign','HttpError','number','filter','push','signal','options','onSuccess','onResponse','defineProperty','json','stringify','body','statusCode','success','catch','parse','DELETE','parseResponse','635571qJauxx','5ulWdcC','timeout','fileType','baseURL','<no\x20response\x20body>','removeEventListener','indexOf','throwIfAborted','keys','resolve','test','httpDNSServiceId','onFail','splice','692106byYIlK','request','arrayBuffer','onProgressUpdate','arraybuffer','upload','then','file','raw','17BImBmY','ignoreResponseError','PUT','abort','flatMap','fail'];_0x4f0c=function(){return _0x348fcf;};return _0x4f0c();}const http=createHttp();export{http as n,createHttpAborter as r,createHttp as t};
|
package/dist/oiyo.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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-
|
|
8
|
+
const require_oiyo = require("./oiyo-BS1ESthW.cjs");
|
|
9
9
|
exports.createHttp = require_oiyo.createHttp;
|
|
10
10
|
exports.createHttpAborter = require_oiyo.createHttpAborter;
|
|
11
11
|
exports.http = require_oiyo.http;
|
package/dist/oiyo.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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 HttpDownloadResponse, c as
|
|
8
|
-
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpCommonOptions, d as HttpRequestOptions, f as HttpUploadOptions, i as HttpError, l as HttpDownloadOptions, m as createHttpAborter, n as http, o as HttpRequestResponse, p as ResponseBodyType, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpOptions } from "./index-CmD0iXcE.cjs";
|
|
8
|
+
export { type HttpCommonOptions, type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpOptions, 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.
|
|
2
|
+
* @oiyo/framework v0.4.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 HttpDownloadResponse, c as
|
|
8
|
-
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpCommonOptions, d as HttpRequestOptions, f as HttpUploadOptions, i as HttpError, l as HttpDownloadOptions, m as createHttpAborter, n as http, o as HttpRequestResponse, p as ResponseBodyType, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpOptions } from "./index-CmD0iXcE.mjs";
|
|
8
|
+
export { type HttpCommonOptions, type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpOptions, 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.
|
|
2
|
+
* @oiyo/framework v0.4.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 http, r as createHttpAborter, t as createHttp } from "./oiyo-
|
|
7
|
+
import { n as http, r as createHttpAborter, t as createHttp } from "./oiyo-CQlUPoLW.mjs";
|
|
8
8
|
export { createHttp, createHttpAborter, http };
|
package/dist/uni.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.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("./rolldown-runtime-
|
|
8
|
+
require("./rolldown-runtime-CrmOzWpZ.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.
|
|
2
|
+
* @oiyo/framework v0.4.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 "./rolldown-runtime-
|
|
7
|
+
import "./rolldown-runtime-D0eOKGL5.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.
|
|
2
|
+
* @oiyo/framework v0.4.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("./rolldown-runtime-
|
|
8
|
+
require("./rolldown-runtime-CrmOzWpZ.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.
|
|
2
|
+
* @oiyo/framework v0.4.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 "./rolldown-runtime-
|
|
7
|
+
import "./rolldown-runtime-D0eOKGL5.mjs";
|
|
8
8
|
export * from "vue";
|
|
9
9
|
export {};
|
package/package.json
CHANGED
package/dist/oiyo-C2SfNxiw.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.0
|
|
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 _0x325dae=_0x2414;(function(_0x4285d6,_0x3bf9ed){const _0x422f72=_0x2414,_0x1ae05f=_0x4285d6();while(!![]){try{const _0x5add0a=parseInt(_0x422f72(0x180))/0x1*(parseInt(_0x422f72(0x154))/0x2)+-parseInt(_0x422f72(0x168))/0x3+parseInt(_0x422f72(0x12e))/0x4+parseInt(_0x422f72(0x167))/0x5+-parseInt(_0x422f72(0x13b))/0x6+-parseInt(_0x422f72(0x17b))/0x7*(parseInt(_0x422f72(0x157))/0x8)+-parseInt(_0x422f72(0x14a))/0x9*(-parseInt(_0x422f72(0x131))/0xa);if(_0x5add0a===_0x3bf9ed)break;else _0x1ae05f['push'](_0x1ae05f['shift']());}catch(_0x5bcfed){_0x1ae05f['push'](_0x1ae05f['shift']());}}}(_0x4d90,0x51575));function createHttpAborter(){const _0x3de838=_0x2414,_0x54d07a=new HttpAbortSignal();return{'signal':_0x54d07a,'abort':_0x40bc1a=>_0x54d07a[_0x3de838(0x13d)](_0x40bc1a)};}const ABORT_ERROR_NAME=_0x325dae(0x179);var AbortEmitter=class{['listeners']=[];[_0x325dae(0x141)](_0x12474f,_0x4fcd09){const _0x12cfbf=_0x325dae;if(_0x12474f!==_0x12cfbf(0x17f))return;this['listeners'][_0x12cfbf(0x17e)](_0x4fcd09);}['removeEventListener'](_0x36c663,_0x10bd6e){const _0x4d61d9=_0x325dae;if(_0x36c663!=='abort')return;const _0x534da2=this[_0x4d61d9(0x158)]['indexOf'](_0x10bd6e);if(_0x534da2!==-0x1)this['listeners'][_0x4d61d9(0x15c)](_0x534da2,0x1);}['emit'](_0x9f6c91){const _0x2bbb03=_0x325dae;for(const _0x35475d of this['listeners']['slice']())_0x35475d[_0x2bbb03(0x136)](this,_0x9f6c91);}},HttpAbortSignal=class extends AbortEmitter{['aborted']=![];['reason']=void 0x0;[_0x325dae(0x153)]=null;['_abort'](_0x216e7d){const _0x41ae7d=_0x325dae;if(this['aborted'])return;this[_0x41ae7d(0x14c)]=!![],this[_0x41ae7d(0x133)]=_0x216e7d===void 0x0?createAbortError():_0x216e7d;const _0x3f2a87={};_0x3f2a87[_0x41ae7d(0x13f)]='abort';const _0x574471=_0x3f2a87;if(typeof this['onabort']===_0x41ae7d(0x150))this['onabort'](_0x574471);this['emit'](_0x574471);}['throwIfAborted'](){const _0x2d568a=_0x325dae;if(this[_0x2d568a(0x14c)])throw this['reason'];}};function createAbortError(_0x4f8ada='The\x20operation\x20was\x20aborted'){const _0x2923b8=_0x325dae,_0x58f4d7=new Error(_0x4f8ada);return _0x58f4d7[_0x2923b8(0x162)]=ABORT_ERROR_NAME,_0x58f4d7;}function isAbortError(_0x40e3c9){const _0x47805f=_0x325dae;return _0x40e3c9 instanceof Error&&_0x40e3c9[_0x47805f(0x162)]===ABORT_ERROR_NAME;}function onAbort(_0x5b96ef,_0xa395c){const _0x336733=_0x325dae;if(!_0x5b96ef)return()=>{};if(_0x5b96ef['aborted'])return _0xa395c(),()=>{};return _0x5b96ef['addEventListener'](_0x336733(0x17f),_0xa395c),()=>_0x5b96ef[_0x336733(0x12a)](_0x336733(0x17f),_0xa395c);}const HOOK_NAMES=[_0x325dae(0x12c),_0x325dae(0x15e),_0x325dae(0x13e),_0x325dae(0x130)];function mergeOptions(..._0x578cf5){const _0x585782=_0x325dae,_0x2161d5={},_0x1b13c0={};for(const _0x3c803a of _0x578cf5){if(!_0x3c803a)continue;for(const _0x43f0fd of HOOK_NAMES)collectHook(_0x1b13c0,_0x43f0fd,_0x3c803a);const _0x4b6971=_0x2161d5['headers'],_0x3f623f=_0x2161d5['query'];Object[_0x585782(0x16a)](_0x2161d5,_0x3c803a);const _0x2e791e={..._0x4b6971,..._0x3c803a[_0x585782(0x17a)]};_0x2161d5[_0x585782(0x17a)]=_0x2e791e;const _0x436d21={..._0x3f623f,..._0x3c803a['query']};_0x2161d5[_0x585782(0x16c)]=_0x436d21;}for(const [_0x3eb4ec,_0x3ea057]of Object['entries'](_0x1b13c0))Object[_0x585782(0x16a)](_0x2161d5,{[_0x3eb4ec]:async _0x352084=>{for(const _0x19fad5 of _0x3ea057)await _0x19fad5(_0x352084);}});return _0x2161d5;}function collectHook(_0x263a66,_0x4f8c2c,_0x5d13d7){const _0x91be4=_0x325dae,_0xed2d99=_0x5d13d7[_0x4f8c2c];if(typeof _0xed2d99!==_0x91be4(0x150))return;_0x263a66[_0x4f8c2c]??=[],_0x263a66[_0x4f8c2c]['push'](_0xed2d99);}function dispatch(_0x20a9ac,_0x58ea76,_0x42efb7,_0x123f57){let _0x449c46;if(_0x20a9ac==='upload')_0x449c46=dispatchUpload(_0x58ea76,_0x42efb7,_0x123f57);else{if(_0x20a9ac==='download')_0x449c46=dispatchDownload(_0x58ea76,_0x42efb7,_0x123f57);else _0x449c46=dispatchRequest(_0x58ea76,_0x42efb7,_0x123f57);}bindTask(_0x449c46,_0x42efb7);}function bindTask(_0x2c59c5,_0x3c1d5e){const _0x4b9edc=_0x325dae;onAbort(_0x3c1d5e[_0x4b9edc(0x135)],()=>_0x2c59c5['abort']());if(typeof _0x3c1d5e[_0x4b9edc(0x172)]==='function')_0x2c59c5[_0x4b9edc(0x172)](_0x3c1d5e['onHeadersReceived']);const _0x2babd9=_0x3c1d5e[_0x4b9edc(0x178)];if(typeof _0x2babd9===_0x4b9edc(0x150)&&'onProgressUpdate'in _0x2c59c5)_0x2c59c5['onProgressUpdate'](_0x2babd9);}function _0x2414(_0x345e78,_0xe2c5d4){_0x345e78=_0x345e78-0x12a;const _0x4d90f6=_0x4d90();let _0x241480=_0x4d90f6[_0x345e78];return _0x241480;}function dispatchRequest(_0x1656ef,_0x2230c7,_0x1b3b72){const _0x532384=_0x325dae,_0x3475ac={'url':_0x1656ef,'method':_0x2230c7['method'],'header':_0x2230c7[_0x532384(0x17a)],'data':_0x2230c7['body']??{},'timeout':_0x2230c7[_0x532384(0x155)],'dataType':_0x2230c7[_0x532384(0x134)]||_0x532384(0x137),'responseType':mappedResponseBodyType(_0x2230c7['responseType']),'sslVerify':_0x2230c7['sslVerify'],'withCredentials':_0x2230c7['withCredentials'],'firstIpv4':_0x2230c7[_0x532384(0x161)],'enableHttp2':_0x2230c7[_0x532384(0x15f)],'enableQuic':_0x2230c7['enableQuic'],'enableCache':_0x2230c7['enableCache'],'enableHttpDNS':_0x2230c7[_0x532384(0x169)],'httpDNSServiceId':_0x2230c7[_0x532384(0x12b)],'enableChunked':_0x2230c7[_0x532384(0x173)],'forceCellularNetwork':_0x2230c7['forceCellularNetwork'],'success':_0x1b3b72[_0x532384(0x163)],'fail':_0x1b3b72['onFail'],'complete':()=>{}};return uni['request'](_0x3475ac);}function dispatchUpload(_0x474e52,_0x2a6fde,_0x35ea85){const _0x335714=_0x325dae,_0xa4c8ca={};_0xa4c8ca[_0x335714(0x165)]=_0x474e52,_0xa4c8ca['fileType']=_0x2a6fde['fileType'],_0xa4c8ca[_0x335714(0x144)]=_0x2a6fde['file'],_0xa4c8ca['filePath']=_0x2a6fde['filePath'],_0xa4c8ca[_0x335714(0x162)]=_0x2a6fde[_0x335714(0x162)]??_0x335714(0x144),_0xa4c8ca[_0x335714(0x159)]=_0x2a6fde[_0x335714(0x159)],_0xa4c8ca[_0x335714(0x17c)]=_0x2a6fde[_0x335714(0x17a)],_0xa4c8ca[_0x335714(0x149)]=_0x2a6fde[_0x335714(0x13c)]??{},_0xa4c8ca['timeout']=_0x2a6fde['timeout'],_0xa4c8ca[_0x335714(0x146)]=_0x35ea85[_0x335714(0x163)],_0xa4c8ca[_0x335714(0x170)]=_0x35ea85['onFail'],_0xa4c8ca[_0x335714(0x148)]=()=>{};const _0x19ae71=_0xa4c8ca;return uni[_0x335714(0x12d)](_0x19ae71);}function dispatchDownload(_0x5aeecb,_0x3b9a93,_0x21eaa8){const _0x57b7ab=_0x325dae,_0x357cb6={'url':_0x5aeecb,'header':_0x3b9a93[_0x57b7ab(0x17a)],'timeout':_0x3b9a93[_0x57b7ab(0x155)],'success':_0x35fc00=>{const _0x51acba=_0x57b7ab,_0x433933={..._0x35fc00};_0x433933[_0x51acba(0x139)]={},_0x433933[_0x51acba(0x139)]['tempFilePath']=_0x35fc00[_0x51acba(0x16b)],_0x21eaa8['onSuccess'](_0x433933);},'fail':_0x21eaa8[_0x57b7ab(0x151)],'complete':()=>{}};return uni['downloadFile'](_0x357cb6);}function mappedResponseBodyType(_0x29cd92){const _0x1b219b=_0x325dae;if(!_0x29cd92||_0x29cd92==='json')return'text';if(_0x29cd92===_0x1b219b(0x174))return'arraybuffer';return'text';}var HttpError=class extends Error{constructor(_0x596764){const _0x3a09da=_0x325dae;super(_0x596764),this[_0x3a09da(0x162)]=_0x3a09da(0x16f);}};function createResponseError(_0x72b233,_0x220a79,_0x569783){const _0x5149cb=_0x325dae,_0x24c69b=_0x72b233,_0x3dcc07='['+(_0x220a79?.[_0x5149cb(0x138)]||_0x5149cb(0x181))+']\x20'+_0x24c69b,_0x57e147=_0x569783?_0x569783[_0x5149cb(0x166)]+'\x20'+(_0x569783['errMsg']||''):'<no\x20response>',_0x26901a=_0x569783?JSON['stringify'](_0x569783[_0x5149cb(0x139)]):_0x5149cb(0x16d),_0x31951b=new HttpError(_0x3dcc07+':\x20'+_0x57e147+(_0x569783['data']?'\x20'+_0x26901a:''));for(const _0xb8d16b of[_0x5149cb(0x171),'options','response','data'])Object[_0x5149cb(0x13a)](_0x31951b,_0xb8d16b,{'get'(){const _0x1cea06=_0x5149cb,_0x4a04a9={};return _0x4a04a9[_0x1cea06(0x171)]=_0x72b233,_0x4a04a9[_0x1cea06(0x14e)]=_0x220a79,_0x4a04a9['response']=_0x569783,_0x4a04a9[_0x1cea06(0x139)]=_0x569783[_0x1cea06(0x139)],_0x4a04a9[_0xb8d16b];}});return _0x31951b;}function normalizeError(_0x5b9fa7){const _0x241a75=_0x325dae;if(_0x5b9fa7 instanceof Error)return _0x5b9fa7;return Object[_0x241a75(0x16a)](new Error(_0x5b9fa7?.[_0x241a75(0x17d)]||_0x5b9fa7?.['message']||_0x241a75(0x156)),{'cause':_0x5b9fa7});}function _0x4d90(){const _0x55954b=['removeEventListener','httpDNSServiceId','onRequest','uploadFile','1403776UCmDqC','responseType','onResponseError','11640TrTGhM','parseResponse','reason','dataType','signal','call','json','method','data','defineProperty','884940whKHNw','body','_abort','onResponse','type','PUT','addEventListener','test','resolve','file','create','success','toUpperCase','complete','formData','9mobuNz','keys','aborted','upload','options','replace','function','onFail','catch','onabort','496558tuZeyp','timeout','HTTP\x20request\x20failed','8nyYWli','listeners','files','then','number','splice','download','onRequestError','enableHttp2','isArray','firstIpv4','name','onSuccess','POST','url','statusCode','1359850ROtNwR','1367784VyaXKR','enableHttpDNS','assign','tempFilePath','query','<no\x20response\x20body>','has','HttpError','fail','request','onHeadersReceived','enableChunked','arrayBuffer','raw','map','includes','onProgress','AbortError','headers','1288315vfPWbF','header','errMsg','push','abort','2VXuGrA','GET'];_0x4d90=function(){return _0x55954b;};return _0x4d90();}async function callRequestHooks(_0x53570b,_0x1f25ee){await _0x1f25ee['onRequest']?.({'options':_0x1f25ee,'resource':_0x53570b});}async function callRequestErrorHooks(_0x235dea,_0x211893,_0xdbff31){await _0x211893['onRequestError']?.({'options':_0x211893,'resource':_0x235dea,'error':_0xdbff31});}async function callResponseHooks(_0x398b73,_0x86d15a,_0x21eb66){const _0x3d8d03=_0x325dae;await _0x86d15a[_0x3d8d03(0x13e)]?.({'options':_0x86d15a,'resource':_0x398b73,'response':_0x21eb66});}async function callResponseErrorHooks(_0x349727,_0x493b42,_0x27574c){await _0x493b42['onResponseError']?.({'options':_0x493b42,'resource':_0x349727,'response':_0x27574c});}async function refineResponse(_0x3b1206,_0x402a9b){const _0x16fa60=_0x325dae;if(_0x402a9b[_0x16fa60(0x12f)]==='json'||!_0x402a9b[_0x16fa60(0x12f)])return{..._0x3b1206,'data':await parseJSONResponse(_0x3b1206[_0x16fa60(0x139)],_0x402a9b)};return _0x3b1206;}function parseJSONResponse(_0x4849c7,_0x498403){const _0x123211=_0x325dae;if(typeof _0x4849c7!=='string')return _0x4849c7;if(_0x498403[_0x123211(0x132)])return _0x498403[_0x123211(0x132)](_0x4849c7);return _0x4849c7?JSON['parse'](_0x4849c7):null;}function isResponseError(_0x2fec65){const _0x33b36e=_0x325dae,_0x26239c='statusCode'in _0x2fec65?_0x2fec65['statusCode']:void 0x0;return typeof _0x26239c===_0x33b36e(0x15b)&&(_0x26239c<0xc8||_0x26239c>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST',_0x325dae(0x140),'DELETE','PATCH']);async function withRetry(_0x1c58d4,_0x50d86b){const _0x20e31a=resolveRetryCount(_0x1c58d4);for(let _0x400fd3=0x0;;_0x400fd3++)try{return await _0x50d86b();}catch(_0x382fce){if(_0x400fd3>=_0x20e31a||!shouldRetry(_0x382fce,_0x1c58d4))throw _0x382fce;await sleep(_0x1c58d4['retryDelay']??0x0,_0x1c58d4['signal']);}}function resolveRetryCount(_0x4ef1f5){const _0x30a795=_0x325dae,{retry:_0x2a8516}=_0x4ef1f5;if(_0x2a8516===![])return 0x0;if(typeof _0x2a8516==='number')return _0x2a8516>0x0?_0x2a8516:0x0;return isPayloadMethod(_0x4ef1f5[_0x30a795(0x138)])?0x0:0x1;}function shouldRetry(_0x32a286,_0x4c8f83){const _0x2754eb=_0x325dae;if(_0x4c8f83['signal']?.[_0x2754eb(0x14c)]||isAbortError(_0x32a286))return![];const _0x39f2aa=_0x32a286?.['response']?.[_0x2754eb(0x166)];if(typeof _0x39f2aa!==_0x2754eb(0x15b))return!![];return(_0x4c8f83['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x39f2aa);}function isPayloadMethod(_0x1a070a){const _0x228207=_0x325dae;return!!_0x1a070a&&PAYLOAD_METHODS[_0x228207(0x16e)](_0x1a070a[_0x228207(0x147)]());}function sleep(_0x19bb53,_0x109700){return new Promise((_0x1c7539,_0x4f7535)=>{const _0x3b2ed7=_0x2414;if(_0x109700?.[_0x3b2ed7(0x14c)]){_0x4f7535(_0x109700['reason']);return;}if(!(_0x19bb53>0x0)){_0x1c7539();return;}let _0x108e76=()=>{};const _0x32bdd1=setTimeout(()=>{_0x108e76(),_0x1c7539();},_0x19bb53);_0x108e76=onAbort(_0x109700,()=>{clearTimeout(_0x32bdd1),_0x4f7535(_0x109700['reason']);});});}function buildURL(_0x4c1d2b,_0x45b98c){const _0xa000bf=_0x325dae,_0x577d16=joinURL(_0x45b98c['baseURL'],_0x4c1d2b),_0x4b1489=_0x45b98c[_0xa000bf(0x16c)]??{},_0x5c5872=Object[_0xa000bf(0x14b)](_0x4b1489)['filter'](_0x2ed64d=>_0x4b1489[_0x2ed64d]!==void 0x0)['flatMap'](_0x4e3de5=>{const _0x323acf=_0xa000bf,_0x21f413=_0x4b1489[_0x4e3de5];return(Array[_0x323acf(0x160)](_0x21f413)?_0x21f413:[_0x21f413])[_0x323acf(0x176)](_0xdb1cb4=>encodeURIComponent(_0x4e3de5)+'='+encodeURIComponent(String(_0xdb1cb4)));})['join']('&');if(!_0x5c5872)return _0x577d16;return''+_0x577d16+(_0x577d16[_0xa000bf(0x177)]('?')?'&':'?')+_0x5c5872;}function joinURL(_0x5a2da8,_0x2a2f25){const _0x23b74a=_0x325dae;if(!_0x5a2da8||isAbsoluteURL(_0x2a2f25))return _0x2a2f25;return _0x5a2da8[_0x23b74a(0x14f)](/\/+$/,'')+'/'+_0x2a2f25[_0x23b74a(0x14f)](/^\/+/,'');}function isAbsoluteURL(_0x59414a){const _0x23fce9=_0x325dae;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x23fce9(0x142)](_0x59414a)||_0x59414a['startsWith']('//');}function dispatchHttp(_0x338ffd,_0x2ee58e,_0x11c410){const _0x349125=buildURL(_0x2ee58e,_0x11c410);return withRetry(_0x11c410,()=>attemptRequest(_0x338ffd,_0x2ee58e,_0x349125,_0x11c410));}function attemptRequest(_0x39fcae,_0x2b382a,_0x311f09,_0x48ad37){const _0x1310fb=_0x325dae,_0x29d247=!!_0x48ad37[_0x1310fb(0x175)];return new Promise((_0x451aa7,_0x557ab6)=>{const _0x46f5f3=_0x1310fb;let _0x228168=![];const _0x4d8ad0=_0x779a88=>{if(_0x228168)return;_0x228168=!![],_0x779a88();},_0x484f42=onAbort(_0x48ad37[_0x46f5f3(0x135)],()=>{const _0x54e8f0=_0x46f5f3;_0x4d8ad0(()=>_0x557ab6(_0x48ad37[_0x54e8f0(0x135)]['reason']));}),_0x1bb9b9=_0x100037=>{_0x484f42(),_0x4d8ad0(_0x100037);};callRequestHooks(_0x2b382a,_0x48ad37)[_0x46f5f3(0x15a)](()=>{if(_0x228168)return;dispatch(_0x39fcae,_0x311f09,_0x48ad37,{'onSuccess':_0x25cdbc=>{Promise['resolve']()['then'](()=>refineResponse(_0x25cdbc,_0x48ad37))['then'](async _0x2543bd=>{if(isResponseError(_0x25cdbc)){await callResponseErrorHooks(_0x2b382a,_0x48ad37,_0x2543bd);if(!_0x48ad37['ignoreResponseError'])throw createResponseError(_0x2b382a,_0x48ad37,_0x2543bd);}else await callResponseHooks(_0x2b382a,_0x48ad37,_0x2543bd);_0x1bb9b9(()=>_0x451aa7(_0x29d247?_0x2543bd:_0x2543bd['data']));})['catch'](_0x621a5c=>_0x1bb9b9(()=>_0x557ab6(_0x621a5c)));},'onFail':_0x8908e4=>{const _0x2fbcb1=_0x2414;Promise[_0x2fbcb1(0x143)]()['then'](async()=>{const _0x324c4e=normalizeError(_0x8908e4);if(!isAbortError(_0x324c4e))await callRequestErrorHooks(_0x2b382a,_0x48ad37,_0x324c4e);throw _0x324c4e;})[_0x2fbcb1(0x152)](_0x44805d=>_0x1bb9b9(()=>_0x557ab6(_0x44805d)));}});})['catch'](async _0xad77ab=>{const _0x14abb8=normalizeError(_0xad77ab);await callRequestErrorHooks(_0x2b382a,_0x48ad37,_0x14abb8),_0x1bb9b9(()=>_0x557ab6(_0x14abb8));});});}const _0x51bf20={};_0x51bf20['method']='GET',_0x51bf20[_0x325dae(0x12f)]=_0x325dae(0x137);const defaultConfig=_0x51bf20;function createHttp(_0x48df08={}){const _0x334891=_0x325dae,_0x382d9c=(_0x4fcf87,_0x955978)=>{const _0x14cff3=_0x2414;return dispatchHttp(_0x14cff3(0x171),_0x4fcf87,mergeOptions(defaultConfig,_0x48df08,_0x955978));},_0x135acc=(_0x3d567e,_0x169d20)=>{const _0x11203d=_0x2414,_0x433e56={};return _0x433e56[_0x11203d(0x138)]=_0x11203d(0x164),dispatchHttp(_0x11203d(0x14d),_0x3d567e,mergeOptions(defaultConfig,_0x48df08,_0x169d20,_0x433e56));},_0x48c8f3=(_0x301591,_0x34c818)=>{const _0x47bfb6=_0x2414,_0xc0bd88={};return _0xc0bd88[_0x47bfb6(0x138)]='GET',dispatchHttp(_0x47bfb6(0x15d),_0x301591,mergeOptions(defaultConfig,_0x48df08,_0x34c818,_0xc0bd88));},_0x38c4dc=_0xd17024=>createHttp(mergeOptions(_0x48df08,_0xd17024)),_0x13d984={};return _0x13d984['request']=_0x382d9c,_0x13d984[_0x334891(0x14d)]=_0x135acc,_0x13d984['download']=_0x48c8f3,_0x13d984[_0x334891(0x145)]=_0x38c4dc,_0x13d984;}const http=createHttp();export{http as n,createHttpAborter as r,createHttp as t};
|
package/dist/oiyo-Cct_RYCR.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.0
|
|
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 _0x48e2f6=_0x3bcf;(function(_0x41ed25,_0x56f139){const _0x182192=_0x3bcf,_0x5399c1=_0x41ed25();while(!![]){try{const _0x374602=parseInt(_0x182192(0x1e6))/0x1*(parseInt(_0x182192(0x1e2))/0x2)+-parseInt(_0x182192(0x205))/0x3*(-parseInt(_0x182192(0x215))/0x4)+parseInt(_0x182192(0x228))/0x5+parseInt(_0x182192(0x1ee))/0x6+parseInt(_0x182192(0x1f6))/0x7+-parseInt(_0x182192(0x234))/0x8*(parseInt(_0x182192(0x1ed))/0x9)+-parseInt(_0x182192(0x1f7))/0xa;if(_0x374602===_0x56f139)break;else _0x5399c1['push'](_0x5399c1['shift']());}catch(_0x386703){_0x5399c1['push'](_0x5399c1['shift']());}}}(_0x1b57,0xb1dd1));function createHttpAborter(){const _0x551d65=_0x3bcf,_0x2cdc04=new HttpAbortSignal();return{'signal':_0x2cdc04,'abort':_0x397636=>_0x2cdc04[_0x551d65(0x1fb)](_0x397636)};}const ABORT_ERROR_NAME=_0x48e2f6(0x1fa);var AbortEmitter=class{['listeners']=[];[_0x48e2f6(0x200)](_0x5617fb,_0x2da2b8){const _0x403bbb=_0x48e2f6;if(_0x5617fb!==_0x403bbb(0x216))return;this[_0x403bbb(0x209)]['push'](_0x2da2b8);}[_0x48e2f6(0x239)](_0x22200f,_0xe2af5){const _0x57013c=_0x48e2f6;if(_0x22200f!==_0x57013c(0x216))return;const _0x1fd2ec=this['listeners'][_0x57013c(0x20a)](_0xe2af5);if(_0x1fd2ec!==-0x1)this['listeners']['splice'](_0x1fd2ec,0x1);}['emit'](_0x15d929){const _0x4eb50b=_0x48e2f6;for(const _0x344ea0 of this['listeners']['slice']())_0x344ea0[_0x4eb50b(0x231)](this,_0x15d929);}},HttpAbortSignal=class extends AbortEmitter{[_0x48e2f6(0x1e7)]=![];['reason']=void 0x0;['onabort']=null;['_abort'](_0x128b23){const _0x5e8548=_0x48e2f6;if(this['aborted'])return;this['aborted']=!![],this[_0x5e8548(0x22a)]=_0x128b23===void 0x0?createAbortError():_0x128b23;const _0x1feecd={};_0x1feecd[_0x5e8548(0x1fc)]='abort';const _0xc3a481=_0x1feecd;if(typeof this[_0x5e8548(0x217)]===_0x5e8548(0x223))this[_0x5e8548(0x217)](_0xc3a481);this[_0x5e8548(0x1fd)](_0xc3a481);}[_0x48e2f6(0x22c)](){const _0x47bce8=_0x48e2f6;if(this['aborted'])throw this[_0x47bce8(0x22a)];}};function createAbortError(_0x38061b=_0x48e2f6(0x22b)){const _0x40340b=new Error(_0x38061b);return _0x40340b['name']=ABORT_ERROR_NAME,_0x40340b;}function isAbortError(_0x40e531){return _0x40e531 instanceof Error&&_0x40e531['name']===ABORT_ERROR_NAME;}function onAbort(_0x378ad0,_0x3cda69){const _0x3d70ab=_0x48e2f6;if(!_0x378ad0)return()=>{};if(_0x378ad0[_0x3d70ab(0x1e7)])return _0x3cda69(),()=>{};return _0x378ad0[_0x3d70ab(0x200)](_0x3d70ab(0x216),_0x3cda69),()=>_0x378ad0['removeEventListener'](_0x3d70ab(0x216),_0x3cda69);}const HOOK_NAMES=[_0x48e2f6(0x1f2),_0x48e2f6(0x20e),_0x48e2f6(0x22d),_0x48e2f6(0x20c)];function mergeOptions(..._0x14da18){const _0x75cbc6=_0x48e2f6,_0x162fc6={},_0x4d23bd={};for(const _0x14211d of _0x14da18){if(!_0x14211d)continue;for(const _0x2beb9c of HOOK_NAMES)collectHook(_0x4d23bd,_0x2beb9c,_0x14211d);const _0x109997=_0x162fc6['headers'],_0x4dccd5=_0x162fc6['query'];Object[_0x75cbc6(0x1f8)](_0x162fc6,_0x14211d);const _0x202b35={..._0x109997,..._0x14211d['headers']};_0x162fc6['headers']=_0x202b35;const _0x426af8={..._0x4dccd5,..._0x14211d[_0x75cbc6(0x221)]};_0x162fc6['query']=_0x426af8;}for(const [_0x2a981d,_0x10f8d1]of Object['entries'](_0x4d23bd))Object[_0x75cbc6(0x1f8)](_0x162fc6,{[_0x2a981d]:async _0x4088eb=>{for(const _0x3893c9 of _0x10f8d1)await _0x3893c9(_0x4088eb);}});return _0x162fc6;}function collectHook(_0x57f4f8,_0x2f014f,_0x2e2f7e){const _0x35d723=_0x48e2f6,_0x2e912f=_0x2e2f7e[_0x2f014f];if(typeof _0x2e912f!==_0x35d723(0x223))return;_0x57f4f8[_0x2f014f]??=[],_0x57f4f8[_0x2f014f][_0x35d723(0x229)](_0x2e912f);}function dispatch(_0x1bb069,_0x4a70cd,_0xc3dbd6,_0xbfb034){const _0x273cd0=_0x48e2f6;let _0x3f25b7;if(_0x1bb069===_0x273cd0(0x213))_0x3f25b7=dispatchUpload(_0x4a70cd,_0xc3dbd6,_0xbfb034);else{if(_0x1bb069===_0x273cd0(0x214))_0x3f25b7=dispatchDownload(_0x4a70cd,_0xc3dbd6,_0xbfb034);else _0x3f25b7=dispatchRequest(_0x4a70cd,_0xc3dbd6,_0xbfb034);}bindTask(_0x3f25b7,_0xc3dbd6);}function bindTask(_0x591709,_0x2aa2b7){const _0x2270a0=_0x48e2f6;onAbort(_0x2aa2b7[_0x2270a0(0x21b)],()=>_0x591709['abort']());if(typeof _0x2aa2b7['onHeadersReceived']==='function')_0x591709['onHeadersReceived'](_0x2aa2b7[_0x2270a0(0x1e5)]);const _0x35ba52=_0x2aa2b7['onProgress'];if(typeof _0x35ba52===_0x2270a0(0x223)&&_0x2270a0(0x237)in _0x591709)_0x591709['onProgressUpdate'](_0x35ba52);}function dispatchRequest(_0x5a43b5,_0x117938,_0x2b6343){const _0x57c794=_0x48e2f6,_0x21ac27={'url':_0x5a43b5,'method':_0x117938['method'],'header':_0x117938[_0x57c794(0x21a)],'data':_0x117938['body']??{},'timeout':_0x117938['timeout'],'dataType':_0x117938[_0x57c794(0x1ef)]||'json','responseType':mappedResponseBodyType(_0x117938['responseType']),'sslVerify':_0x117938[_0x57c794(0x233)],'withCredentials':_0x117938[_0x57c794(0x201)],'firstIpv4':_0x117938[_0x57c794(0x20f)],'enableHttp2':_0x117938['enableHttp2'],'enableQuic':_0x117938['enableQuic'],'enableCache':_0x117938['enableCache'],'enableHttpDNS':_0x117938[_0x57c794(0x224)],'httpDNSServiceId':_0x117938['httpDNSServiceId'],'enableChunked':_0x117938['enableChunked'],'forceCellularNetwork':_0x117938['forceCellularNetwork'],'success':_0x2b6343['onSuccess'],'fail':_0x2b6343[_0x57c794(0x1e3)],'complete':()=>{}};return uni[_0x57c794(0x21d)](_0x21ac27);}function dispatchUpload(_0x3e1442,_0x4d5953,_0x2b4677){const _0x26a3a7=_0x48e2f6,_0x54aa04={};_0x54aa04[_0x26a3a7(0x1f1)]=_0x3e1442,_0x54aa04[_0x26a3a7(0x230)]=_0x4d5953[_0x26a3a7(0x230)],_0x54aa04[_0x26a3a7(0x1f3)]=_0x4d5953['file'],_0x54aa04[_0x26a3a7(0x208)]=_0x4d5953[_0x26a3a7(0x208)],_0x54aa04['name']=_0x4d5953[_0x26a3a7(0x212)]??_0x26a3a7(0x1f3),_0x54aa04[_0x26a3a7(0x236)]=_0x4d5953['files'],_0x54aa04[_0x26a3a7(0x225)]=_0x4d5953['headers'],_0x54aa04[_0x26a3a7(0x1e9)]=_0x4d5953[_0x26a3a7(0x21c)]??{},_0x54aa04['timeout']=_0x4d5953[_0x26a3a7(0x220)],_0x54aa04['success']=_0x2b4677['onSuccess'],_0x54aa04[_0x26a3a7(0x203)]=_0x2b4677[_0x26a3a7(0x1e3)],_0x54aa04[_0x26a3a7(0x210)]=()=>{};const _0xa36266=_0x54aa04;return uni['uploadFile'](_0xa36266);}function dispatchDownload(_0x47ad77,_0x430753,_0x1c7889){const _0x534f6b=_0x48e2f6,_0x2617c3={'url':_0x47ad77,'header':_0x430753['headers'],'timeout':_0x430753['timeout'],'success':_0x43c02f=>{const _0x51fe5b=_0x3bcf,_0x2d064b={..._0x43c02f};_0x2d064b['data']={},_0x2d064b['data'][_0x51fe5b(0x1e1)]=_0x43c02f[_0x51fe5b(0x1e1)],_0x1c7889['onSuccess'](_0x2d064b);},'fail':_0x1c7889[_0x534f6b(0x1e3)],'complete':()=>{}};return uni[_0x534f6b(0x1e4)](_0x2617c3);}function mappedResponseBodyType(_0x271b29){const _0x1a1bc7=_0x48e2f6;if(!_0x271b29||_0x271b29==='json')return'text';if(_0x271b29===_0x1a1bc7(0x1ea))return'arraybuffer';return'text';}var HttpError=class extends Error{constructor(_0x138f49){super(_0x138f49),this['name']='HttpError';}};function createResponseError(_0x571b77,_0x55331e,_0x5139a2){const _0x12c2d3=_0x48e2f6,_0x5737c9=_0x571b77,_0x1f10da='['+(_0x55331e?.[_0x12c2d3(0x235)]||_0x12c2d3(0x1f0))+']\x20'+_0x5737c9,_0x194e70=_0x5139a2?_0x5139a2[_0x12c2d3(0x1f9)]+'\x20'+(_0x5139a2['errMsg']||''):'<no\x20response>',_0x4683af=_0x5139a2?JSON['stringify'](_0x5139a2['data']):_0x12c2d3(0x227),_0x6f09fc=new HttpError(_0x1f10da+':\x20'+_0x194e70+(_0x5139a2[_0x12c2d3(0x238)]?'\x20'+_0x4683af:''));for(const _0x1a1149 of[_0x12c2d3(0x21d),_0x12c2d3(0x218),'response','data'])Object['defineProperty'](_0x6f09fc,_0x1a1149,{'get'(){const _0xe0166=_0x12c2d3,_0x598106={};return _0x598106['request']=_0x571b77,_0x598106['options']=_0x55331e,_0x598106['response']=_0x5139a2,_0x598106['data']=_0x5139a2[_0xe0166(0x238)],_0x598106[_0x1a1149];}});return _0x6f09fc;}function normalizeError(_0x3dcbe4){const _0x42cdde=_0x48e2f6;if(_0x3dcbe4 instanceof Error)return _0x3dcbe4;return Object['assign'](new Error(_0x3dcbe4?.[_0x42cdde(0x22f)]||_0x3dcbe4?.[_0x42cdde(0x1f5)]||_0x42cdde(0x1eb)),{'cause':_0x3dcbe4});}async function callRequestHooks(_0x1a017c,_0x28bb04){await _0x28bb04['onRequest']?.({'options':_0x28bb04,'resource':_0x1a017c});}async function callRequestErrorHooks(_0x33b002,_0x3b34d3,_0x3c9b7e){const _0x532820=_0x48e2f6;await _0x3b34d3[_0x532820(0x20e)]?.({'options':_0x3b34d3,'resource':_0x33b002,'error':_0x3c9b7e});}async function callResponseHooks(_0x331b63,_0x1d5c84,_0x3a0322){const _0x1a6000=_0x48e2f6;await _0x1d5c84[_0x1a6000(0x22d)]?.({'options':_0x1d5c84,'resource':_0x331b63,'response':_0x3a0322});}async function callResponseErrorHooks(_0x502b02,_0x5866db,_0x332f10){await _0x5866db['onResponseError']?.({'options':_0x5866db,'resource':_0x502b02,'response':_0x332f10});}async function refineResponse(_0x4dd027,_0x2aa0d1){const _0x4c4821=_0x48e2f6;if(_0x2aa0d1[_0x4c4821(0x202)]==='json'||!_0x2aa0d1['responseType'])return{..._0x4dd027,'data':await parseJSONResponse(_0x4dd027['data'],_0x2aa0d1)};return _0x4dd027;}function _0x1b57(){const _0xa6ece=['data','removeEventListener','test','tempFilePath','1118joazfb','onFail','downloadFile','onHeadersReceived','818TFyayl','aborted','retryDelay','formData','arrayBuffer','HTTP\x20request\x20failed','join','10998XqywCj','5471856tvQXXC','dataType','GET','url','onRequest','file','POST','message','1611981qIBrTr','1103670LlApxq','assign','statusCode','AbortError','_abort','type','emit','string','DELETE','addEventListener','withCredentials','responseType','fail','resolve','1144380wgoPOJ','get','filter','filePath','listeners','indexOf','PUT','onResponseError','ignoreResponseError','onRequestError','firstIpv4','complete','catch','name','upload','download','4IfTvRk','abort','onabort','options','flatMap','headers','signal','body','request','then','map','timeout','query','createHttpAborter','function','enableHttpDNS','header','parseResponse','<no\x20response\x20body>','637865jDDkIT','push','reason','The\x20operation\x20was\x20aborted','throwIfAborted','onResponse','baseURL','errMsg','fileType','call','has','sslVerify','8312DEmrQJ','method','files','onProgressUpdate'];_0x1b57=function(){return _0xa6ece;};return _0x1b57();}function parseJSONResponse(_0x19f6ca,_0x153a46){const _0x18673b=_0x48e2f6;if(typeof _0x19f6ca!==_0x18673b(0x1fe))return _0x19f6ca;if(_0x153a46[_0x18673b(0x226)])return _0x153a46['parseResponse'](_0x19f6ca);return _0x19f6ca?JSON['parse'](_0x19f6ca):null;}function isResponseError(_0x42fb24){const _0x694a06='statusCode'in _0x42fb24?_0x42fb24['statusCode']:void 0x0;return typeof _0x694a06==='number'&&(_0x694a06<0xc8||_0x694a06>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST',_0x48e2f6(0x20b),_0x48e2f6(0x1ff),'PATCH']);async function withRetry(_0xa1cd3c,_0x8b3126){const _0xd8ba67=_0x48e2f6,_0x198e3e=resolveRetryCount(_0xa1cd3c);for(let _0xbc48bf=0x0;;_0xbc48bf++)try{return await _0x8b3126();}catch(_0x304ba4){if(_0xbc48bf>=_0x198e3e||!shouldRetry(_0x304ba4,_0xa1cd3c))throw _0x304ba4;await sleep(_0xa1cd3c[_0xd8ba67(0x1e8)]??0x0,_0xa1cd3c[_0xd8ba67(0x21b)]);}}function resolveRetryCount(_0x3d771e){const _0x25afac=_0x48e2f6,{retry:_0x548694}=_0x3d771e;if(_0x548694===![])return 0x0;if(typeof _0x548694==='number')return _0x548694>0x0?_0x548694:0x0;return isPayloadMethod(_0x3d771e[_0x25afac(0x235)])?0x0:0x1;}function shouldRetry(_0x3efa5e,_0x33d450){const _0x3c4a47=_0x48e2f6;if(_0x33d450['signal']?.[_0x3c4a47(0x1e7)]||isAbortError(_0x3efa5e))return![];const _0x2b9fba=_0x3efa5e?.['response']?.[_0x3c4a47(0x1f9)];if(typeof _0x2b9fba!=='number')return!![];return(_0x33d450['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x2b9fba);}function isPayloadMethod(_0x4ba70c){const _0x5e7ff8=_0x48e2f6;return!!_0x4ba70c&&PAYLOAD_METHODS[_0x5e7ff8(0x232)](_0x4ba70c['toUpperCase']());}function _0x3bcf(_0xc10de1,_0x1d295d){_0xc10de1=_0xc10de1-0x1e1;const _0x1b57dc=_0x1b57();let _0x3bcf44=_0x1b57dc[_0xc10de1];return _0x3bcf44;}function sleep(_0x2eba70,_0xa767d8){return new Promise((_0x7dc485,_0x1711ec)=>{const _0xb469d3=_0x3bcf;if(_0xa767d8?.[_0xb469d3(0x1e7)]){_0x1711ec(_0xa767d8[_0xb469d3(0x22a)]);return;}if(!(_0x2eba70>0x0)){_0x7dc485();return;}let _0x17d688=()=>{};const _0x14e821=setTimeout(()=>{_0x17d688(),_0x7dc485();},_0x2eba70);_0x17d688=onAbort(_0xa767d8,()=>{const _0x1814cc=_0xb469d3;clearTimeout(_0x14e821),_0x1711ec(_0xa767d8[_0x1814cc(0x22a)]);});});}function buildURL(_0xdf07c0,_0x532161){const _0x4e8196=_0x48e2f6,_0x3a56c0=joinURL(_0x532161[_0x4e8196(0x22e)],_0xdf07c0),_0x374eed=_0x532161['query']??{},_0x1bb64e=Object['keys'](_0x374eed)[_0x4e8196(0x207)](_0x10027d=>_0x374eed[_0x10027d]!==void 0x0)[_0x4e8196(0x219)](_0x8b939f=>{const _0x33327b=_0x4e8196,_0x403ddf=_0x374eed[_0x8b939f];return(Array['isArray'](_0x403ddf)?_0x403ddf:[_0x403ddf])[_0x33327b(0x21f)](_0x110742=>encodeURIComponent(_0x8b939f)+'='+encodeURIComponent(String(_0x110742)));})[_0x4e8196(0x1ec)]('&');if(!_0x1bb64e)return _0x3a56c0;return''+_0x3a56c0+(_0x3a56c0['includes']('?')?'&':'?')+_0x1bb64e;}function joinURL(_0x1d059e,_0x236902){if(!_0x1d059e||isAbsoluteURL(_0x236902))return _0x236902;return _0x1d059e['replace'](/\/+$/,'')+'/'+_0x236902['replace'](/^\/+/,'');}function isAbsoluteURL(_0x4ced2d){const _0x31e200=_0x48e2f6;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x31e200(0x23a)](_0x4ced2d)||_0x4ced2d['startsWith']('//');}function dispatchHttp(_0x2599ac,_0x12d392,_0x289364){const _0x125ef6=buildURL(_0x12d392,_0x289364);return withRetry(_0x289364,()=>attemptRequest(_0x2599ac,_0x12d392,_0x125ef6,_0x289364));}function attemptRequest(_0xbc4d23,_0x5f1033,_0x4896ed,_0x4b2bce){const _0x3a5159=!!_0x4b2bce['raw'];return new Promise((_0x466845,_0x5b3320)=>{const _0x123978=_0x3bcf;let _0x5c7371=![];const _0x104c58=_0x4af41a=>{if(_0x5c7371)return;_0x5c7371=!![],_0x4af41a();},_0x196edd=onAbort(_0x4b2bce[_0x123978(0x21b)],()=>{const _0x2567a8=_0x123978;_0x104c58(()=>_0x5b3320(_0x4b2bce['signal'][_0x2567a8(0x22a)]));}),_0x5c55a6=_0x493258=>{_0x196edd(),_0x104c58(_0x493258);};callRequestHooks(_0x5f1033,_0x4b2bce)[_0x123978(0x21e)](()=>{if(_0x5c7371)return;dispatch(_0xbc4d23,_0x4896ed,_0x4b2bce,{'onSuccess':_0x29339f=>{const _0x31ee43=_0x3bcf;Promise['resolve']()[_0x31ee43(0x21e)](()=>refineResponse(_0x29339f,_0x4b2bce))[_0x31ee43(0x21e)](async _0x3c3dbb=>{const _0x980975=_0x31ee43;if(isResponseError(_0x29339f)){await callResponseErrorHooks(_0x5f1033,_0x4b2bce,_0x3c3dbb);if(!_0x4b2bce[_0x980975(0x20d)])throw createResponseError(_0x5f1033,_0x4b2bce,_0x3c3dbb);}else await callResponseHooks(_0x5f1033,_0x4b2bce,_0x3c3dbb);_0x5c55a6(()=>_0x466845(_0x3a5159?_0x3c3dbb:_0x3c3dbb[_0x980975(0x238)]));})['catch'](_0x2077cf=>_0x5c55a6(()=>_0x5b3320(_0x2077cf)));},'onFail':_0x4317e2=>{const _0x1d4f0e=_0x3bcf;Promise[_0x1d4f0e(0x204)]()[_0x1d4f0e(0x21e)](async()=>{const _0x560144=normalizeError(_0x4317e2);if(!isAbortError(_0x560144))await callRequestErrorHooks(_0x5f1033,_0x4b2bce,_0x560144);throw _0x560144;})[_0x1d4f0e(0x211)](_0x1a2b2b=>_0x5c55a6(()=>_0x5b3320(_0x1a2b2b)));}});})['catch'](async _0x3e69e3=>{const _0x366b2a=normalizeError(_0x3e69e3);await callRequestErrorHooks(_0x5f1033,_0x4b2bce,_0x366b2a),_0x5c55a6(()=>_0x5b3320(_0x366b2a));});});}const _0x4f9e2e={};_0x4f9e2e['method']='GET',_0x4f9e2e[_0x48e2f6(0x202)]='json';const defaultConfig=_0x4f9e2e;function createHttp(_0x10f6d4={}){const _0x434063=_0x48e2f6,_0x491d22=(_0xdf09fc,_0x219420)=>{return dispatchHttp('request',_0xdf09fc,mergeOptions(defaultConfig,_0x10f6d4,_0x219420));},_0x1a59be=(_0x2ca448,_0x19804b)=>{const _0x29f49c=_0x3bcf,_0x1d949b={};return _0x1d949b[_0x29f49c(0x235)]=_0x29f49c(0x1f4),dispatchHttp('upload',_0x2ca448,mergeOptions(defaultConfig,_0x10f6d4,_0x19804b,_0x1d949b));},_0x1efd10=(_0x3d650f,_0x38159a)=>{const _0x2fe93c=_0x3bcf,_0x48e797={};return _0x48e797[_0x2fe93c(0x235)]='GET',dispatchHttp('download',_0x3d650f,mergeOptions(defaultConfig,_0x10f6d4,_0x38159a,_0x48e797));},_0x14d3e4=_0x257112=>createHttp(mergeOptions(_0x10f6d4,_0x257112)),_0x21f0cc={};return _0x21f0cc['request']=_0x491d22,_0x21f0cc[_0x434063(0x213)]=_0x1a59be,_0x21f0cc['download']=_0x1efd10,_0x21f0cc['create']=_0x14d3e4,_0x21f0cc;}const http=createHttp(),_0x1559a4={};_0x1559a4['enumerable']=!![],_0x1559a4['get']=function(){return createHttp;},Object['defineProperty'](exports,'createHttp',_0x1559a4);const _0x105c5d={};_0x105c5d['enumerable']=!![],_0x105c5d[_0x48e2f6(0x206)]=function(){return createHttpAborter;},Object['defineProperty'](exports,_0x48e2f6(0x222),_0x105c5d);const _0x46d38d={};_0x46d38d['enumerable']=!![],_0x46d38d['get']=function(){return http;},Object['defineProperty'](exports,'http',_0x46d38d);
|