@oiyo/framework 0.4.5 → 0.4.6
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-C_vPDBDX.d.cts → index-DQmyoOzM.d.cts} +1 -1
- package/dist/{index-C_vPDBDX.d.mts → index-DQmyoOzM.d.mts} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/oiyo-CASn7hkX.cjs +7 -0
- package/dist/oiyo-DxaznqPn.mjs +7 -0
- package/dist/oiyo.cjs +2 -2
- package/dist/oiyo.d.cts +2 -2
- package/dist/oiyo.d.mts +2 -2
- package/dist/oiyo.mjs +2 -2
- package/dist/uni.cjs +1 -1
- package/dist/uni.d.cts +1 -1
- package/dist/uni.d.mts +1 -1
- package/dist/uni.mjs +1 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.d.cts +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.mjs +1 -1
- package/package.json +1 -1
- package/dist/oiyo-BhjW8nT_.cjs +0 -7
- package/dist/oiyo-rI8ibY_7.mjs +0 -7
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.6
|
|
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-CASn7hkX.cjs");
|
|
9
9
|
require("./uni.cjs");
|
|
10
10
|
require("./vue.cjs");
|
|
11
11
|
exports.createHttp = require_oiyo.createHttp;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.6
|
|
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 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-
|
|
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-DQmyoOzM.cjs";
|
|
8
8
|
import "./uni.cjs";
|
|
9
9
|
import "./vue.cjs";
|
|
10
10
|
export * from "@dcloudio/uni-app";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.6
|
|
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 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-
|
|
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-DQmyoOzM.mjs";
|
|
8
8
|
import "./uni.mjs";
|
|
9
9
|
import "./vue.mjs";
|
|
10
10
|
export * from "@dcloudio/uni-app";
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.6
|
|
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-DxaznqPn.mjs";
|
|
8
8
|
import "./uni.mjs";
|
|
9
9
|
import "./vue.mjs";
|
|
10
10
|
export * from "@dcloudio/uni-app";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.6
|
|
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 _0x3fd42d=_0x386a;(function(_0x89df50,_0x1995dc){const _0x3e39c0=_0x386a,_0x54b9cb=_0x89df50();while(!![]){try{const _0x3428d1=parseInt(_0x3e39c0(0x17a))/0x1*(parseInt(_0x3e39c0(0x159))/0x2)+-parseInt(_0x3e39c0(0x160))/0x3*(parseInt(_0x3e39c0(0x16f))/0x4)+parseInt(_0x3e39c0(0x16c))/0x5+parseInt(_0x3e39c0(0x17e))/0x6*(parseInt(_0x3e39c0(0x17d))/0x7)+parseInt(_0x3e39c0(0x172))/0x8+-parseInt(_0x3e39c0(0x196))/0x9*(-parseInt(_0x3e39c0(0x14c))/0xa)+-parseInt(_0x3e39c0(0x1a2))/0xb;if(_0x3428d1===_0x1995dc)break;else _0x54b9cb['push'](_0x54b9cb['shift']());}catch(_0x5ac5ad){_0x54b9cb['push'](_0x54b9cb['shift']());}}}(_0x3a6e,0xc93a4));function createHttpAborter(){const _0x29acf6=new HttpAbortSignal();return{'signal':_0x29acf6,'abort':_0x4a6245=>_0x29acf6['_abort'](_0x4a6245)};}const ABORT_ERROR_NAME=_0x3fd42d(0x157);var AbortEmitter=class{[_0x3fd42d(0x156)]=[];['addEventListener'](_0x5af363,_0x286af0){const _0x3f31a2=_0x3fd42d;if(_0x5af363!=='abort')return;this['listeners'][_0x3f31a2(0x14b)](_0x286af0);}['removeEventListener'](_0x131f1b,_0x2da58e){const _0x430cc5=_0x3fd42d;if(_0x131f1b!==_0x430cc5(0x14e))return;const _0x3aa602=this['listeners'][_0x430cc5(0x15d)](_0x2da58e);if(_0x3aa602!==-0x1)this['listeners']['splice'](_0x3aa602,0x1);}[_0x3fd42d(0x170)](_0x1223af){const _0x497fcb=_0x3fd42d;for(const _0x2c9732 of this['listeners'][_0x497fcb(0x194)]())_0x2c9732[_0x497fcb(0x178)](this,_0x1223af);}},HttpAbortSignal=class extends AbortEmitter{[_0x3fd42d(0x174)]=![];[_0x3fd42d(0x193)]=void 0x0;[_0x3fd42d(0x18b)]=null;['_abort'](_0x346ae6){const _0x50eb84=_0x3fd42d;if(this[_0x50eb84(0x174)])return;this[_0x50eb84(0x174)]=!![],this['reason']=_0x346ae6===void 0x0?createAbortError():_0x346ae6;const _0x1efca1={};_0x1efca1[_0x50eb84(0x164)]=_0x50eb84(0x14e);const _0x151aa=_0x1efca1;if(typeof this['onabort']===_0x50eb84(0x198))this['onabort'](_0x151aa);this[_0x50eb84(0x170)](_0x151aa);}[_0x3fd42d(0x186)](){const _0x1b7155=_0x3fd42d;if(this['aborted'])throw this[_0x1b7155(0x193)];}};function createAbortError(_0x504433='The\x20operation\x20was\x20aborted'){const _0x1782a0=_0x3fd42d,_0xbbc35=new Error(_0x504433);return _0xbbc35[_0x1782a0(0x183)]=ABORT_ERROR_NAME,_0xbbc35;}function isAbortError(_0x68f4ea){const _0x4e18d1=_0x3fd42d;return _0x68f4ea instanceof Error&&_0x68f4ea[_0x4e18d1(0x183)]===ABORT_ERROR_NAME;}function onAbort(_0x494732,_0x59a8c6){const _0x2d4990=_0x3fd42d;if(!_0x494732)return()=>{};if(_0x494732['aborted'])return _0x59a8c6(),()=>{};return _0x494732[_0x2d4990(0x192)]('abort',_0x59a8c6),()=>_0x494732[_0x2d4990(0x187)]('abort',_0x59a8c6);}const HOOK_NAMES=[_0x3fd42d(0x17f),_0x3fd42d(0x190),'onResponse','onResponseError'];function mergeOptions(..._0x3be500){const _0xf3ae1=_0x3fd42d,_0x2c7dc4={},_0x752f3c={};for(const _0xa2d8eb of _0x3be500){if(!_0xa2d8eb)continue;for(const _0x14004c of HOOK_NAMES)collectHook(_0x752f3c,_0x14004c,_0xa2d8eb);const _0x2fc945=_0x2c7dc4[_0xf3ae1(0x179)],_0x5456ab=_0x2c7dc4['query'];Object['assign'](_0x2c7dc4,_0xa2d8eb);const _0x2f8538={..._0x2fc945,..._0xa2d8eb[_0xf3ae1(0x179)]};_0x2c7dc4['headers']=_0x2f8538;const _0x21e552={..._0x5456ab,..._0xa2d8eb['query']};_0x2c7dc4[_0xf3ae1(0x19d)]=_0x21e552;}for(const [_0x236215,_0x1ec9a0]of Object[_0xf3ae1(0x150)](_0x752f3c))Object[_0xf3ae1(0x158)](_0x2c7dc4,{[_0x236215]:async _0x17b00c=>{for(const _0x38e11c of _0x1ec9a0)await _0x38e11c(_0x17b00c);}});return _0x2c7dc4;}function collectHook(_0x536bb7,_0x2ddd65,_0x4031d8){const _0x1a0e60=_0x3fd42d,_0x37b34a=_0x4031d8[_0x2ddd65];if(typeof _0x37b34a!=='function')return;_0x536bb7[_0x2ddd65]??=[],_0x536bb7[_0x2ddd65][_0x1a0e60(0x14b)](_0x37b34a);}function dispatch(_0x40eaa7,_0x382706,_0xa20849,_0x20983d){const _0x1d48bb=_0x3fd42d;let _0x31353c;if(_0x40eaa7===_0x1d48bb(0x15b))_0x31353c=dispatchUpload(_0x382706,_0xa20849,_0x20983d);else{if(_0x40eaa7===_0x1d48bb(0x149))_0x31353c=dispatchDownload(_0x382706,_0xa20849,_0x20983d);else _0x31353c=dispatchRequest(_0x382706,_0xa20849,_0x20983d);}bindTask(_0x31353c,_0xa20849);}function bindTask(_0x31cb4c,_0x4acf04){const _0x5f3c4a=_0x3fd42d;onAbort(_0x4acf04[_0x5f3c4a(0x199)],()=>_0x31cb4c['abort']());if(typeof _0x4acf04['onHeadersReceived']==='function')_0x31cb4c['onHeadersReceived'](_0x4acf04[_0x5f3c4a(0x19b)]);const _0x11fc0c=_0x4acf04[_0x5f3c4a(0x188)];if(typeof _0x11fc0c==='function'&&_0x5f3c4a(0x166)in _0x31cb4c)_0x31cb4c[_0x5f3c4a(0x166)](_0x11fc0c);}function dispatchRequest(_0x39567f,_0x2a50a9,_0x58e7ab){const _0x32069e=_0x3fd42d,_0x548dbe={'url':_0x39567f,'method':_0x2a50a9[_0x32069e(0x1a0)],'header':_0x2a50a9[_0x32069e(0x179)],'data':_0x2a50a9[_0x32069e(0x155)]??{},'timeout':_0x2a50a9['timeout'],'dataType':_0x2a50a9[_0x32069e(0x19c)]||'json','responseType':mappedResponseBodyType(_0x2a50a9['responseType']),'sslVerify':_0x2a50a9['sslVerify'],'withCredentials':_0x2a50a9['withCredentials'],'firstIpv4':_0x2a50a9[_0x32069e(0x16d)],'enableHttp2':_0x2a50a9['enableHttp2'],'enableQuic':_0x2a50a9[_0x32069e(0x19a)],'enableCache':_0x2a50a9[_0x32069e(0x152)],'enableHttpDNS':_0x2a50a9[_0x32069e(0x14a)],'httpDNSServiceId':_0x2a50a9['httpDNSServiceId'],'enableChunked':_0x2a50a9['enableChunked'],'forceCellularNetwork':_0x2a50a9['forceCellularNetwork'],'success':_0x58e7ab['onSuccess'],'fail':_0x58e7ab[_0x32069e(0x15e)],'complete':()=>{}};return uni['request'](_0x548dbe);}function dispatchUpload(_0x28d0c7,_0x486d84,_0x1af9b9){const _0x5d5908=_0x3fd42d,_0xc66174={};_0xc66174['url']=_0x28d0c7,_0xc66174[_0x5d5908(0x15f)]=_0x486d84[_0x5d5908(0x15f)],_0xc66174['file']=_0x486d84['file'],_0xc66174['filePath']=_0x486d84[_0x5d5908(0x171)],_0xc66174['name']=_0x486d84[_0x5d5908(0x183)]??_0x5d5908(0x184),_0xc66174['files']=_0x486d84[_0x5d5908(0x18d)],_0xc66174[_0x5d5908(0x16e)]=_0x486d84[_0x5d5908(0x179)],_0xc66174[_0x5d5908(0x16a)]=_0x486d84[_0x5d5908(0x155)]??{},_0xc66174['timeout']=_0x486d84[_0x5d5908(0x180)],_0xc66174[_0x5d5908(0x191)]=_0x1af9b9['onSuccess'],_0xc66174[_0x5d5908(0x1a1)]=_0x1af9b9['onFail'],_0xc66174['complete']=()=>{};const _0x1793ae=_0xc66174;return uni[_0x5d5908(0x17c)](_0x1793ae);}function _0x386a(_0xf43ed0,_0x1655ff){_0xf43ed0=_0xf43ed0-0x149;const _0x3a6eff=_0x3a6e();let _0x386a2d=_0x3a6eff[_0xf43ed0];return _0x386a2d;}function dispatchDownload(_0x1b8c09,_0x14093e,_0x1d9483){const _0x58d1a3=_0x3fd42d,_0x14c747={'url':_0x1b8c09,'header':_0x14093e[_0x58d1a3(0x179)],'timeout':_0x14093e['timeout'],'success':_0x308838=>{const _0x3acb5f=_0x58d1a3,_0x349931={..._0x308838};_0x349931['data']={},_0x349931['data']['tempFilePath']=_0x308838['tempFilePath'],_0x1d9483[_0x3acb5f(0x181)](_0x349931);},'fail':_0x1d9483[_0x58d1a3(0x15e)],'complete':()=>{}};return uni[_0x58d1a3(0x16b)](_0x14c747);}function mappedResponseBodyType(_0x5e8181){const _0x2e77f3=_0x3fd42d;if(!_0x5e8181||_0x5e8181===_0x2e77f3(0x189))return'text';if(_0x5e8181===_0x2e77f3(0x161))return _0x2e77f3(0x18f);return _0x2e77f3(0x19e);}var HttpError=class extends Error{constructor(_0x530392){const _0x18799f=_0x3fd42d;super(_0x530392),this['name']=_0x18799f(0x163);}};function createResponseError(_0x5f2769,_0x353cea,_0x351c9e){const _0x2ea8e4=_0x3fd42d,_0x2af63c=_0x5f2769,_0x3a8cd8='['+(_0x353cea?.[_0x2ea8e4(0x1a0)]||_0x2ea8e4(0x14d))+']\x20'+_0x2af63c,_0x272983=_0x351c9e?_0x351c9e[_0x2ea8e4(0x17b)]+'\x20'+(_0x351c9e[_0x2ea8e4(0x18a)]||''):'<no\x20response>',_0x155dd5=_0x351c9e?JSON['stringify'](_0x351c9e[_0x2ea8e4(0x185)]):_0x2ea8e4(0x151),_0x3ae9cb=new HttpError(_0x3a8cd8+':\x20'+_0x272983+(_0x351c9e['data']?'\x20'+_0x155dd5:''));for(const _0x1f517f of['request','options','response',_0x2ea8e4(0x185)])Object[_0x2ea8e4(0x18e)](_0x3ae9cb,_0x1f517f,{'get'(){const _0x4c04fb=_0x2ea8e4,_0x304d1d={};return _0x304d1d['request']=_0x5f2769,_0x304d1d['options']=_0x353cea,_0x304d1d['response']=_0x351c9e,_0x304d1d[_0x4c04fb(0x185)]=_0x351c9e[_0x4c04fb(0x185)],_0x304d1d[_0x1f517f];}});return _0x3ae9cb;}function normalizeError(_0x2b65e7){const _0x28766e=_0x3fd42d;if(_0x2b65e7 instanceof Error)return _0x2b65e7;return Object[_0x28766e(0x158)](new Error(_0x2b65e7?.['errMsg']||_0x2b65e7?.[_0x28766e(0x169)]||_0x28766e(0x182)),{'cause':_0x2b65e7});}async function callRequestHooks(_0x3425be,_0x50f853){const _0xa8e70b=_0x3fd42d;await _0x50f853[_0xa8e70b(0x17f)]?.({'options':_0x50f853,'resource':_0x3425be});}async function callRequestErrorHooks(_0x56961c,_0x448d34,_0x31d2cd){const _0x210523=_0x3fd42d;await _0x448d34[_0x210523(0x190)]?.({'options':_0x448d34,'resource':_0x56961c,'error':_0x31d2cd});}async function callResponseHooks(_0x31f457,_0x3d0098,_0x2e8bcd){await _0x3d0098['onResponse']?.({'options':_0x3d0098,'resource':_0x31f457,'response':_0x2e8bcd});}async function callResponseErrorHooks(_0x3240cd,_0x48f94e,_0x4077b9){await _0x48f94e['onResponseError']?.({'options':_0x48f94e,'resource':_0x3240cd,'response':_0x4077b9});}async function refineResponse(_0x1bbce9,_0xbcc7e8){const _0x51c536=_0x3fd42d;if(_0xbcc7e8[_0x51c536(0x153)]==='json'||!_0xbcc7e8[_0x51c536(0x153)])return{..._0x1bbce9,'data':await parseJSONResponse(_0x1bbce9['data'],_0xbcc7e8)};return _0x1bbce9;}function parseJSONResponse(_0x1c06a3,_0x5311bb){const _0xd5b5e2=_0x3fd42d;if(typeof _0x1c06a3!=='string')return _0x1c06a3;if(_0x5311bb[_0xd5b5e2(0x195)])return _0x5311bb[_0xd5b5e2(0x195)](_0x1c06a3);return _0x1c06a3?JSON['parse'](_0x1c06a3):null;}function isResponseError(_0xbb10fa){const _0x27b9eb=_0x3fd42d,_0x452b20='statusCode'in _0xbb10fa?_0xbb10fa[_0x27b9eb(0x17b)]:void 0x0;return typeof _0x452b20===_0x27b9eb(0x197)&&(_0x452b20<0xc8||_0x452b20>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x3fd42d(0x14f),'PUT',_0x3fd42d(0x1a3),'PATCH']);async function withRetry(_0x50b9fd,_0x3fe590){const _0x3d3bf9=_0x3fd42d,_0x30bb75=resolveRetryCount(_0x50b9fd);for(let _0x2a7b0b=0x0;;_0x2a7b0b++)try{return await _0x3fe590();}catch(_0x3d0dfd){if(_0x2a7b0b>=_0x30bb75||!shouldRetry(_0x3d0dfd,_0x50b9fd))throw _0x3d0dfd;await sleep(_0x50b9fd['retryDelay']??0x0,_0x50b9fd[_0x3d3bf9(0x199)]);}}function resolveRetryCount(_0x944a09){const {retry:_0x24064a}=_0x944a09;if(_0x24064a===![])return 0x0;if(typeof _0x24064a==='number')return _0x24064a>0x0?_0x24064a:0x0;return isPayloadMethod(_0x944a09['method'])?0x0:0x1;}function shouldRetry(_0x1d2786,_0x766027){const _0x22ee31=_0x3fd42d;if(_0x766027['signal']?.['aborted']||isAbortError(_0x1d2786))return![];const _0x194538=_0x1d2786?.['response']?.['statusCode'];if(typeof _0x194538!==_0x22ee31(0x197))return!![];return(_0x766027[_0x22ee31(0x167)]??DEFAULT_RETRY_STATUS_CODES)[_0x22ee31(0x175)](_0x194538);}function isPayloadMethod(_0x33e420){const _0x395811=_0x3fd42d;return!!_0x33e420&&PAYLOAD_METHODS[_0x395811(0x165)](_0x33e420['toUpperCase']());}function sleep(_0xc599bf,_0xf837fe){return new Promise((_0x59af27,_0x27e86e)=>{const _0x3a0ecd=_0x386a;if(_0xf837fe?.['aborted']){_0x27e86e(_0xf837fe[_0x3a0ecd(0x193)]);return;}if(!(_0xc599bf>0x0)){_0x59af27();return;}let _0x28199c=()=>{};const _0x3f741c=setTimeout(()=>{_0x28199c(),_0x59af27();},_0xc599bf);_0x28199c=onAbort(_0xf837fe,()=>{const _0xe6635a=_0x3a0ecd;clearTimeout(_0x3f741c),_0x27e86e(_0xf837fe[_0xe6635a(0x193)]);});});}function buildURL(_0x2b5fa8,_0x3f5c12){const _0x99ccba=_0x3fd42d,_0x4aeeaa=joinURL(_0x3f5c12['baseURL'],_0x2b5fa8),_0x83dc3e=_0x3f5c12['query']??{},_0x3bcf55=Object[_0x99ccba(0x176)](_0x83dc3e)[_0x99ccba(0x168)](_0x5bd210=>_0x83dc3e[_0x5bd210]!==void 0x0)[_0x99ccba(0x19f)](_0x1f9b3d=>{const _0x4aee92=_0x83dc3e[_0x1f9b3d];return(Array['isArray'](_0x4aee92)?_0x4aee92:[_0x4aee92])['map'](_0x46279c=>encodeURIComponent(_0x1f9b3d)+'='+encodeURIComponent(String(_0x46279c)));})['join']('&');if(!_0x3bcf55)return _0x4aeeaa;return''+_0x4aeeaa+(_0x4aeeaa['includes']('?')?'&':'?')+_0x3bcf55;}function joinURL(_0x313ba4,_0x36cfac){if(!_0x313ba4||isAbsoluteURL(_0x36cfac))return _0x36cfac;return _0x313ba4['replace'](/\/+$/,'')+'/'+_0x36cfac['replace'](/^\/+/,'');}function _0x3a6e(){const _0x30e204=['DELETE','download','enableHttpDNS','push','1322450xRxeTV','GET','abort','POST','entries','<no\x20response\x20body>','enableCache','responseType','catch','body','listeners','AbortError','assign','550qBKxoS','enumerable','upload','createHttpAborter','indexOf','onFail','fileType','369RAGMNn','arrayBuffer','raw','HttpError','type','has','onProgressUpdate','retryStatusCodes','filter','message','formData','downloadFile','4714080jIiFLj','firstIpv4','header','42236SqxVtN','emit','filePath','9459824nMSHRo','then','aborted','includes','keys','createHttp','call','headers','5222Ayesgo','statusCode','uploadFile','5173qTMRSU','10758HSZHhV','onRequest','timeout','onSuccess','HTTP\x20request\x20failed','name','file','data','throwIfAborted','removeEventListener','onProgress','json','errMsg','onabort','get','files','defineProperty','arraybuffer','onRequestError','success','addEventListener','reason','slice','parseResponse','72waqDpQ','number','function','signal','enableQuic','onHeadersReceived','dataType','query','text','flatMap','method','fail','42034806dNpNTd'];_0x3a6e=function(){return _0x30e204;};return _0x3a6e();}function isAbsoluteURL(_0x4e4fa7){return/^[a-z][a-z\d+\-.]*:\/\//i['test'](_0x4e4fa7)||_0x4e4fa7['startsWith']('//');}function dispatchHttp(_0x45e105,_0x1aa8e0,_0x3f5f84){const _0x3f9ad7=buildURL(_0x1aa8e0,_0x3f5f84);return withRetry(_0x3f5f84,()=>attemptRequest(_0x45e105,_0x1aa8e0,_0x3f9ad7,_0x3f5f84));}function attemptRequest(_0x412c32,_0x22724b,_0x33ae07,_0x18a0f0){const _0x63f840=_0x3fd42d,_0x6dbecf=!!_0x18a0f0[_0x63f840(0x162)];return new Promise((_0x1d8d54,_0x12b7e0)=>{const _0x3f1326=_0x63f840;let _0x3f54fe=![];const _0x3da941=_0x49c6a7=>{if(_0x3f54fe)return;_0x3f54fe=!![],_0x49c6a7();},_0x230e37=onAbort(_0x18a0f0[_0x3f1326(0x199)],()=>{const _0x17b030=_0x3f1326;_0x3da941(()=>_0x12b7e0(_0x18a0f0['signal'][_0x17b030(0x193)]));}),_0x190e2c=_0x39c43a=>{_0x230e37(),_0x3da941(_0x39c43a);};callRequestHooks(_0x22724b,_0x18a0f0)[_0x3f1326(0x173)](()=>{if(_0x3f54fe)return;dispatch(_0x412c32,_0x33ae07,_0x18a0f0,{'onSuccess':_0x410f2f=>{const _0x11fbc1=_0x386a;Promise['resolve']()[_0x11fbc1(0x173)](()=>refineResponse(_0x410f2f,_0x18a0f0))['then'](async _0x2e84e0=>{if(isResponseError(_0x410f2f)){await callResponseErrorHooks(_0x22724b,_0x18a0f0,_0x2e84e0);if(!_0x18a0f0['ignoreResponseError'])throw createResponseError(_0x22724b,_0x18a0f0,_0x2e84e0);}else await callResponseHooks(_0x22724b,_0x18a0f0,_0x2e84e0);_0x190e2c(()=>_0x1d8d54(_0x6dbecf?_0x2e84e0:_0x2e84e0['data']));})['catch'](_0x2fd7b5=>_0x190e2c(()=>_0x12b7e0(_0x2fd7b5)));},'onFail':_0x9f5b97=>{const _0x5e8404=_0x386a;Promise['resolve']()['then'](async()=>{const _0x3520f7=normalizeError(_0x9f5b97);if(!isAbortError(_0x3520f7))await callRequestErrorHooks(_0x22724b,_0x18a0f0,_0x3520f7);throw _0x3520f7;})[_0x5e8404(0x154)](_0x11fc12=>_0x190e2c(()=>_0x12b7e0(_0x11fc12)));}});})['catch'](async _0x500d24=>{const _0x2acfc8=normalizeError(_0x500d24);await callRequestErrorHooks(_0x22724b,_0x18a0f0,_0x2acfc8),_0x190e2c(()=>_0x12b7e0(_0x2acfc8));});});}const _0x519aca={};_0x519aca['method']=_0x3fd42d(0x14d),_0x519aca['responseType']=_0x3fd42d(0x189);const defaultConfig=_0x519aca;function createHttp(_0x46dda6={}){const _0x434069=_0x3fd42d,_0x4c45db=(_0x4a93bf,_0x29c6ad)=>{return dispatchHttp('request',_0x4a93bf,mergeOptions(defaultConfig,_0x46dda6,_0x29c6ad));},_0x512f3f=(_0x31ad24,_0x59ed32)=>{const _0x1e8acf=_0x386a,_0x5c0f3d={};return _0x5c0f3d[_0x1e8acf(0x1a0)]=_0x1e8acf(0x14f),dispatchHttp('upload',_0x31ad24,mergeOptions(defaultConfig,_0x46dda6,_0x59ed32,_0x5c0f3d));},_0x1626a1=(_0x1038ac,_0x237a7b)=>{const _0x177580=_0x386a,_0xadcddb={};return _0xadcddb['method']='GET',dispatchHttp(_0x177580(0x149),_0x1038ac,mergeOptions(defaultConfig,_0x46dda6,_0x237a7b,_0xadcddb));},_0x276b4e=_0x5b9ffb=>createHttp(mergeOptions(_0x46dda6,_0x5b9ffb)),_0x259456={};return _0x259456['request']=_0x4c45db,_0x259456[_0x434069(0x15b)]=_0x512f3f,_0x259456[_0x434069(0x149)]=_0x1626a1,_0x259456['create']=_0x276b4e,_0x259456;}const http=createHttp(),_0x51fd02={};_0x51fd02['enumerable']=!![],_0x51fd02['get']=function(){return createHttp;},Object[_0x3fd42d(0x18e)](exports,_0x3fd42d(0x177),_0x51fd02);const _0xa8554={};_0xa8554['enumerable']=!![],_0xa8554[_0x3fd42d(0x18c)]=function(){return createHttpAborter;},Object['defineProperty'](exports,_0x3fd42d(0x15c),_0xa8554);const _0x4f38fb={};_0x4f38fb[_0x3fd42d(0x15a)]=!![],_0x4f38fb[_0x3fd42d(0x18c)]=function(){return http;},Object['defineProperty'](exports,'http',_0x4f38fb);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.6
|
|
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 _0x37031b=_0x26f9;(function(_0x4762b0,_0x2cee80){const _0x18f4b5=_0x26f9,_0x40c540=_0x4762b0();while(!![]){try{const _0x51f19b=parseInt(_0x18f4b5(0x216))/0x1+parseInt(_0x18f4b5(0x235))/0x2+-parseInt(_0x18f4b5(0x232))/0x3*(parseInt(_0x18f4b5(0x21f))/0x4)+-parseInt(_0x18f4b5(0x20e))/0x5+-parseInt(_0x18f4b5(0x226))/0x6+parseInt(_0x18f4b5(0x21d))/0x7*(parseInt(_0x18f4b5(0x20c))/0x8)+-parseInt(_0x18f4b5(0x218))/0x9*(parseInt(_0x18f4b5(0x1f4))/0xa);if(_0x51f19b===_0x2cee80)break;else _0x40c540['push'](_0x40c540['shift']());}catch(_0x5569ba){_0x40c540['push'](_0x40c540['shift']());}}}(_0x517c,0x7825f));function createHttpAborter(){const _0x3812ed=_0x26f9,_0x45f3b2=new HttpAbortSignal();return{'signal':_0x45f3b2,'abort':_0xb69585=>_0x45f3b2[_0x3812ed(0x1fd)](_0xb69585)};}const ABORT_ERROR_NAME='AbortError';var AbortEmitter=class{[_0x37031b(0x230)]=[];[_0x37031b(0x21c)](_0x3cb7f9,_0x1c1888){const _0x3d8122=_0x37031b;if(_0x3cb7f9!==_0x3d8122(0x20d))return;this['listeners'][_0x3d8122(0x221)](_0x1c1888);}['removeEventListener'](_0x397fdf,_0x466368){const _0x413340=_0x37031b;if(_0x397fdf!==_0x413340(0x20d))return;const _0x1b0c5e=this[_0x413340(0x230)]['indexOf'](_0x466368);if(_0x1b0c5e!==-0x1)this['listeners'][_0x413340(0x217)](_0x1b0c5e,0x1);}['emit'](_0x5a9ab7){for(const _0x3688f5 of this['listeners']['slice']())_0x3688f5['call'](this,_0x5a9ab7);}},HttpAbortSignal=class extends AbortEmitter{['aborted']=![];['reason']=void 0x0;['onabort']=null;[_0x37031b(0x1fd)](_0x4ea208){const _0x5a11d8=_0x37031b;if(this['aborted'])return;this['aborted']=!![],this['reason']=_0x4ea208===void 0x0?createAbortError():_0x4ea208;const _0x3ea5b9={};_0x3ea5b9[_0x5a11d8(0x1fc)]=_0x5a11d8(0x20d);const _0x26cad8=_0x3ea5b9;if(typeof this['onabort']===_0x5a11d8(0x236))this[_0x5a11d8(0x22f)](_0x26cad8);this[_0x5a11d8(0x21e)](_0x26cad8);}[_0x37031b(0x211)](){const _0x4f9b0a=_0x37031b;if(this[_0x4f9b0a(0x229)])throw this[_0x4f9b0a(0x222)];}};function createAbortError(_0x8d8810='The\x20operation\x20was\x20aborted'){const _0x3ef4dc=_0x37031b,_0x57a48d=new Error(_0x8d8810);return _0x57a48d[_0x3ef4dc(0x224)]=ABORT_ERROR_NAME,_0x57a48d;}function isAbortError(_0x20ff7f){const _0x2cd303=_0x37031b;return _0x20ff7f instanceof Error&&_0x20ff7f[_0x2cd303(0x224)]===ABORT_ERROR_NAME;}function onAbort(_0x3a1b8f,_0x2197ff){const _0x92a12c=_0x37031b;if(!_0x3a1b8f)return()=>{};if(_0x3a1b8f[_0x92a12c(0x229)])return _0x2197ff(),()=>{};return _0x3a1b8f[_0x92a12c(0x21c)](_0x92a12c(0x20d),_0x2197ff),()=>_0x3a1b8f[_0x92a12c(0x23c)](_0x92a12c(0x20d),_0x2197ff);}const HOOK_NAMES=[_0x37031b(0x200),_0x37031b(0x20a),_0x37031b(0x231),'onResponseError'];function mergeOptions(..._0x878d2c){const _0x23b88b=_0x37031b,_0x5325ff={},_0x3ae565={};for(const _0x77b4c0 of _0x878d2c){if(!_0x77b4c0)continue;for(const _0xb404cc of HOOK_NAMES)collectHook(_0x3ae565,_0xb404cc,_0x77b4c0);const _0x12b8d4=_0x5325ff['headers'],_0x521831=_0x5325ff[_0x23b88b(0x219)];Object[_0x23b88b(0x213)](_0x5325ff,_0x77b4c0);const _0x54589b={..._0x12b8d4,..._0x77b4c0['headers']};_0x5325ff['headers']=_0x54589b;const _0x4a3bae={..._0x521831,..._0x77b4c0['query']};_0x5325ff['query']=_0x4a3bae;}for(const [_0x14844e,_0x8db956]of Object['entries'](_0x3ae565))Object['assign'](_0x5325ff,{[_0x14844e]:async _0x19ab44=>{for(const _0x42bda9 of _0x8db956)await _0x42bda9(_0x19ab44);}});return _0x5325ff;}function collectHook(_0x48970f,_0x6c569,_0x116932){const _0x412aab=_0x116932[_0x6c569];if(typeof _0x412aab!=='function')return;_0x48970f[_0x6c569]??=[],_0x48970f[_0x6c569]['push'](_0x412aab);}function dispatch(_0x2a0965,_0x1c0eea,_0x53c4d3,_0x232feb){const _0x28962a=_0x37031b;let _0x421d22;if(_0x2a0965==='upload')_0x421d22=dispatchUpload(_0x1c0eea,_0x53c4d3,_0x232feb);else{if(_0x2a0965===_0x28962a(0x225))_0x421d22=dispatchDownload(_0x1c0eea,_0x53c4d3,_0x232feb);else _0x421d22=dispatchRequest(_0x1c0eea,_0x53c4d3,_0x232feb);}bindTask(_0x421d22,_0x53c4d3);}function bindTask(_0x594a9a,_0x3158c0){const _0x4be0c7=_0x37031b;onAbort(_0x3158c0[_0x4be0c7(0x22e)],()=>_0x594a9a[_0x4be0c7(0x20d)]());if(typeof _0x3158c0[_0x4be0c7(0x1ff)]==='function')_0x594a9a[_0x4be0c7(0x1ff)](_0x3158c0[_0x4be0c7(0x1ff)]);const _0x443c6f=_0x3158c0[_0x4be0c7(0x241)];if(typeof _0x443c6f==='function'&&'onProgressUpdate'in _0x594a9a)_0x594a9a[_0x4be0c7(0x202)](_0x443c6f);}function dispatchRequest(_0x4657ed,_0x55e76d,_0x3c3942){const _0x335d34=_0x37031b,_0x2092e7={'url':_0x4657ed,'method':_0x55e76d['method'],'header':_0x55e76d['headers'],'data':_0x55e76d['body']??{},'timeout':_0x55e76d['timeout'],'dataType':_0x55e76d['dataType']||'json','responseType':mappedResponseBodyType(_0x55e76d['responseType']),'sslVerify':_0x55e76d['sslVerify'],'withCredentials':_0x55e76d['withCredentials'],'firstIpv4':_0x55e76d[_0x335d34(0x22b)],'enableHttp2':_0x55e76d['enableHttp2'],'enableQuic':_0x55e76d['enableQuic'],'enableCache':_0x55e76d['enableCache'],'enableHttpDNS':_0x55e76d['enableHttpDNS'],'httpDNSServiceId':_0x55e76d[_0x335d34(0x233)],'enableChunked':_0x55e76d['enableChunked'],'forceCellularNetwork':_0x55e76d[_0x335d34(0x1f5)],'success':_0x3c3942[_0x335d34(0x1f6)],'fail':_0x3c3942['onFail'],'complete':()=>{}};return uni['request'](_0x2092e7);}function dispatchUpload(_0x2b1fb0,_0x48ce3d,_0x590725){const _0x10de51=_0x37031b,_0x3eb994={};_0x3eb994[_0x10de51(0x234)]=_0x2b1fb0,_0x3eb994[_0x10de51(0x207)]=_0x48ce3d[_0x10de51(0x207)],_0x3eb994[_0x10de51(0x228)]=_0x48ce3d[_0x10de51(0x228)],_0x3eb994['filePath']=_0x48ce3d['filePath'],_0x3eb994['name']=_0x48ce3d[_0x10de51(0x224)]??_0x10de51(0x228),_0x3eb994['files']=_0x48ce3d[_0x10de51(0x214)],_0x3eb994['header']=_0x48ce3d['headers'],_0x3eb994['formData']=_0x48ce3d[_0x10de51(0x21b)]??{},_0x3eb994[_0x10de51(0x22c)]=_0x48ce3d[_0x10de51(0x22c)],_0x3eb994['success']=_0x590725['onSuccess'],_0x3eb994[_0x10de51(0x215)]=_0x590725[_0x10de51(0x1f3)],_0x3eb994['complete']=()=>{};const _0x2f7eb7=_0x3eb994;return uni['uploadFile'](_0x2f7eb7);}function dispatchDownload(_0x4bc1f7,_0x4fddf4,_0xcac4c3){const _0xde2afe=_0x37031b,_0x4ce9c4={'url':_0x4bc1f7,'header':_0x4fddf4[_0xde2afe(0x23b)],'timeout':_0x4fddf4[_0xde2afe(0x22c)],'success':_0x50a384=>{const _0x46968c=_0xde2afe,_0x2ad4b1={..._0x50a384};_0x2ad4b1[_0x46968c(0x204)]={},_0x2ad4b1[_0x46968c(0x204)][_0x46968c(0x227)]=_0x50a384[_0x46968c(0x227)],_0xcac4c3['onSuccess'](_0x2ad4b1);},'fail':_0xcac4c3[_0xde2afe(0x1f3)],'complete':()=>{}};return uni[_0xde2afe(0x23f)](_0x4ce9c4);}function mappedResponseBodyType(_0xf88057){const _0x5ba496=_0x37031b;if(!_0xf88057||_0xf88057==='json')return _0x5ba496(0x23d);if(_0xf88057===_0x5ba496(0x1fe))return _0x5ba496(0x220);return _0x5ba496(0x23d);}var HttpError=class extends Error{constructor(_0x53d988){const _0x385abf=_0x37031b;super(_0x53d988),this[_0x385abf(0x224)]='HttpError';}};function createResponseError(_0x2cb387,_0x288ead,_0x2d934e){const _0x1bad77=_0x37031b,_0x1075bf=_0x2cb387,_0x4ac5d8='['+(_0x288ead?.['method']||'GET')+']\x20'+_0x1075bf,_0x1942b3=_0x2d934e?_0x2d934e['statusCode']+'\x20'+(_0x2d934e[_0x1bad77(0x201)]||''):'<no\x20response>',_0x352e64=_0x2d934e?JSON['stringify'](_0x2d934e[_0x1bad77(0x204)]):_0x1bad77(0x223),_0x392f51=new HttpError(_0x4ac5d8+':\x20'+_0x1942b3+(_0x2d934e['data']?'\x20'+_0x352e64:''));for(const _0x251d98 of[_0x1bad77(0x22d),'options','response','data'])Object['defineProperty'](_0x392f51,_0x251d98,{'get'(){const _0x31cc22=_0x1bad77,_0x3d1a07={};return _0x3d1a07['request']=_0x2cb387,_0x3d1a07[_0x31cc22(0x208)]=_0x288ead,_0x3d1a07['response']=_0x2d934e,_0x3d1a07[_0x31cc22(0x204)]=_0x2d934e[_0x31cc22(0x204)],_0x3d1a07[_0x251d98];}});return _0x392f51;}function normalizeError(_0x4ee16c){const _0x1666ec=_0x37031b;if(_0x4ee16c instanceof Error)return _0x4ee16c;return Object[_0x1666ec(0x213)](new Error(_0x4ee16c?.['errMsg']||_0x4ee16c?.[_0x1666ec(0x237)]||'HTTP\x20request\x20failed'),{'cause':_0x4ee16c});}async function callRequestHooks(_0x1d2f3e,_0x1ef16c){await _0x1ef16c['onRequest']?.({'options':_0x1ef16c,'resource':_0x1d2f3e});}async function callRequestErrorHooks(_0x5c85a5,_0x254249,_0x3c13d9){const _0xf1a85d=_0x37031b;await _0x254249[_0xf1a85d(0x20a)]?.({'options':_0x254249,'resource':_0x5c85a5,'error':_0x3c13d9});}async function callResponseHooks(_0x57b05c,_0x571c08,_0x214357){await _0x571c08['onResponse']?.({'options':_0x571c08,'resource':_0x57b05c,'response':_0x214357});}async function callResponseErrorHooks(_0x363225,_0xffe494,_0x494913){const _0x8547ef=_0x37031b;await _0xffe494[_0x8547ef(0x239)]?.({'options':_0xffe494,'resource':_0x363225,'response':_0x494913});}async function refineResponse(_0x197f45,_0x5a0535){const _0x3791af=_0x37031b;if(_0x5a0535['responseType']===_0x3791af(0x203)||!_0x5a0535['responseType'])return{..._0x197f45,'data':await parseJSONResponse(_0x197f45[_0x3791af(0x204)],_0x5a0535)};return _0x197f45;}function parseJSONResponse(_0x49d96f,_0x1898b2){const _0x472922=_0x37031b;if(typeof _0x49d96f!=='string')return _0x49d96f;if(_0x1898b2[_0x472922(0x20b)])return _0x1898b2['parseResponse'](_0x49d96f);return _0x49d96f?JSON['parse'](_0x49d96f):null;}function isResponseError(_0x572148){const _0x38dc22=_0x37031b,_0x514f0b=_0x38dc22(0x23a)in _0x572148?_0x572148['statusCode']:void 0x0;return typeof _0x514f0b==='number'&&(_0x514f0b<0xc8||_0x514f0b>=0x12c);}function _0x517c(){const _0x2a3002=['GET','type','_abort','arrayBuffer','onHeadersReceived','onRequest','errMsg','onProgressUpdate','json','data','flatMap','keys','fileType','options','includes','onRequestError','parseResponse','21384WGPTzG','abort','1801250WuXZVY','PATCH','responseType','throwIfAborted','create','assign','files','fail','406868InffJN','splice','171rVMkSI','query','catch','body','addEventListener','2219SKMeCI','emit','20AOBXnE','arraybuffer','push','reason','<no\x20response\x20body>','name','download','5040786UZUXRK','tempFilePath','file','aborted','method','firstIpv4','timeout','request','signal','onabort','listeners','onResponse','30777AdUzpG','httpDNSServiceId','url','1710726pBzatS','function','message','retryDelay','onResponseError','statusCode','headers','removeEventListener','text','upload','downloadFile','then','onProgress','response','number','onFail','192510WpBygS','forceCellularNetwork','onSuccess','startsWith','filter','POST','toUpperCase'];_0x517c=function(){return _0x2a3002;};return _0x517c();}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST','PUT','DELETE',_0x37031b(0x20f)]);async function withRetry(_0x3eb954,_0x5bf552){const _0x5ad370=_0x37031b,_0x1ad92c=resolveRetryCount(_0x3eb954);for(let _0x535da3=0x0;;_0x535da3++)try{return await _0x5bf552();}catch(_0x210c2c){if(_0x535da3>=_0x1ad92c||!shouldRetry(_0x210c2c,_0x3eb954))throw _0x210c2c;await sleep(_0x3eb954[_0x5ad370(0x238)]??0x0,_0x3eb954['signal']);}}function resolveRetryCount(_0x43abae){const _0x33b0fa=_0x37031b,{retry:_0x2b8815}=_0x43abae;if(_0x2b8815===![])return 0x0;if(typeof _0x2b8815==='number')return _0x2b8815>0x0?_0x2b8815:0x0;return isPayloadMethod(_0x43abae[_0x33b0fa(0x22a)])?0x0:0x1;}function shouldRetry(_0x259cc7,_0x1d3963){const _0x519e94=_0x37031b;if(_0x1d3963['signal']?.[_0x519e94(0x229)]||isAbortError(_0x259cc7))return![];const _0x520ebf=_0x259cc7?.[_0x519e94(0x242)]?.[_0x519e94(0x23a)];if(typeof _0x520ebf!==_0x519e94(0x243))return!![];return(_0x1d3963['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x520ebf);}function isPayloadMethod(_0x509a14){const _0x331cc4=_0x37031b;return!!_0x509a14&&PAYLOAD_METHODS['has'](_0x509a14[_0x331cc4(0x1fa)]());}function sleep(_0x3257cd,_0x98f382){return new Promise((_0x3cdee1,_0x424827)=>{const _0x1080fc=_0x26f9;if(_0x98f382?.['aborted']){_0x424827(_0x98f382[_0x1080fc(0x222)]);return;}if(!(_0x3257cd>0x0)){_0x3cdee1();return;}let _0x18803e=()=>{};const _0x509757=setTimeout(()=>{_0x18803e(),_0x3cdee1();},_0x3257cd);_0x18803e=onAbort(_0x98f382,()=>{clearTimeout(_0x509757),_0x424827(_0x98f382['reason']);});});}function buildURL(_0xfd7f8a,_0x450d5c){const _0x5aaa4c=_0x37031b,_0xb43111=joinURL(_0x450d5c['baseURL'],_0xfd7f8a),_0x23b6a6=_0x450d5c[_0x5aaa4c(0x219)]??{},_0x272141=Object[_0x5aaa4c(0x206)](_0x23b6a6)[_0x5aaa4c(0x1f8)](_0x59ea97=>_0x23b6a6[_0x59ea97]!==void 0x0)[_0x5aaa4c(0x205)](_0xe516eb=>{const _0x579684=_0x23b6a6[_0xe516eb];return(Array['isArray'](_0x579684)?_0x579684:[_0x579684])['map'](_0x2b6a7c=>encodeURIComponent(_0xe516eb)+'='+encodeURIComponent(String(_0x2b6a7c)));})['join']('&');if(!_0x272141)return _0xb43111;return''+_0xb43111+(_0xb43111[_0x5aaa4c(0x209)]('?')?'&':'?')+_0x272141;}function joinURL(_0x41b68b,_0x2a77c5){if(!_0x41b68b||isAbsoluteURL(_0x2a77c5))return _0x2a77c5;return _0x41b68b['replace'](/\/+$/,'')+'/'+_0x2a77c5['replace'](/^\/+/,'');}function isAbsoluteURL(_0xb79fc2){const _0x32cfe8=_0x37031b;return/^[a-z][a-z\d+\-.]*:\/\//i['test'](_0xb79fc2)||_0xb79fc2[_0x32cfe8(0x1f7)]('//');}function _0x26f9(_0x220b2b,_0x37c518){_0x220b2b=_0x220b2b-0x1f3;const _0x517c41=_0x517c();let _0x26f9da=_0x517c41[_0x220b2b];return _0x26f9da;}function dispatchHttp(_0x545dff,_0x37fc16,_0x1b0574){const _0x2e17f2=buildURL(_0x37fc16,_0x1b0574);return withRetry(_0x1b0574,()=>attemptRequest(_0x545dff,_0x37fc16,_0x2e17f2,_0x1b0574));}function attemptRequest(_0x475089,_0x7a5be2,_0x1c6513,_0x20136c){const _0x23e3ee=!!_0x20136c['raw'];return new Promise((_0x37d8a1,_0x3e92bd)=>{const _0x489e49=_0x26f9;let _0x55879f=![];const _0xa05293=_0x48ca86=>{if(_0x55879f)return;_0x55879f=!![],_0x48ca86();},_0x2b8c96=onAbort(_0x20136c[_0x489e49(0x22e)],()=>{const _0x1cdc21=_0x489e49;_0xa05293(()=>_0x3e92bd(_0x20136c['signal'][_0x1cdc21(0x222)]));}),_0xc109df=_0xc80c54=>{_0x2b8c96(),_0xa05293(_0xc80c54);};callRequestHooks(_0x7a5be2,_0x20136c)['then'](()=>{if(_0x55879f)return;dispatch(_0x475089,_0x1c6513,_0x20136c,{'onSuccess':_0x34ed80=>{const _0x31ef24=_0x26f9;Promise['resolve']()['then'](()=>refineResponse(_0x34ed80,_0x20136c))[_0x31ef24(0x240)](async _0xa54fae=>{const _0x1376aa=_0x31ef24;if(isResponseError(_0x34ed80)){await callResponseErrorHooks(_0x7a5be2,_0x20136c,_0xa54fae);if(!_0x20136c['ignoreResponseError'])throw createResponseError(_0x7a5be2,_0x20136c,_0xa54fae);}else await callResponseHooks(_0x7a5be2,_0x20136c,_0xa54fae);_0xc109df(()=>_0x37d8a1(_0x23e3ee?_0xa54fae:_0xa54fae[_0x1376aa(0x204)]));})['catch'](_0x4a8985=>_0xc109df(()=>_0x3e92bd(_0x4a8985)));},'onFail':_0x5b0a6c=>{const _0x42197e=_0x26f9;Promise['resolve']()[_0x42197e(0x240)](async()=>{const _0x3f9a79=normalizeError(_0x5b0a6c);if(!isAbortError(_0x3f9a79))await callRequestErrorHooks(_0x7a5be2,_0x20136c,_0x3f9a79);throw _0x3f9a79;})[_0x42197e(0x21a)](_0x4b147b=>_0xc109df(()=>_0x3e92bd(_0x4b147b)));}});})['catch'](async _0x1592fb=>{const _0x948364=normalizeError(_0x1592fb);await callRequestErrorHooks(_0x7a5be2,_0x20136c,_0x948364),_0xc109df(()=>_0x3e92bd(_0x948364));});});}const _0x38e877={};_0x38e877['method']='GET',_0x38e877[_0x37031b(0x210)]='json';const defaultConfig=_0x38e877;function createHttp(_0x1012f5={}){const _0x5e5235=_0x37031b,_0x50d100=(_0x11beb4,_0x28e79c)=>{const _0x5de238=_0x26f9;return dispatchHttp(_0x5de238(0x22d),_0x11beb4,mergeOptions(defaultConfig,_0x1012f5,_0x28e79c));},_0x5d2052=(_0x41d5f7,_0x2962e8)=>{const _0x152117=_0x26f9,_0x589ca5={};return _0x589ca5[_0x152117(0x22a)]=_0x152117(0x1f9),dispatchHttp('upload',_0x41d5f7,mergeOptions(defaultConfig,_0x1012f5,_0x2962e8,_0x589ca5));},_0x46f1de=(_0x337e5e,_0x49cbe2)=>{const _0x2a7c33=_0x26f9,_0x3e7cdb={};return _0x3e7cdb['method']=_0x2a7c33(0x1fb),dispatchHttp(_0x2a7c33(0x225),_0x337e5e,mergeOptions(defaultConfig,_0x1012f5,_0x49cbe2,_0x3e7cdb));},_0x2680a2=_0x5d06b8=>createHttp(mergeOptions(_0x1012f5,_0x5d06b8)),_0x543164={};return _0x543164[_0x5e5235(0x22d)]=_0x50d100,_0x543164[_0x5e5235(0x23e)]=_0x5d2052,_0x543164[_0x5e5235(0x225)]=_0x46f1de,_0x543164[_0x5e5235(0x212)]=_0x2680a2,_0x543164;}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.6
|
|
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-CASn7hkX.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.6
|
|
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 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-
|
|
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-DQmyoOzM.cjs";
|
|
8
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.6
|
|
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 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-
|
|
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-DQmyoOzM.mjs";
|
|
8
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.6
|
|
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-DxaznqPn.mjs";
|
|
8
8
|
export { createHttp, createHttpAborter, http };
|
package/dist/uni.cjs
CHANGED
package/dist/uni.d.cts
CHANGED
package/dist/uni.d.mts
CHANGED
package/dist/uni.mjs
CHANGED
package/dist/vue.cjs
CHANGED
package/dist/vue.d.cts
CHANGED
package/dist/vue.d.mts
CHANGED
package/dist/vue.mjs
CHANGED
package/package.json
CHANGED
package/dist/oiyo-BhjW8nT_.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.5
|
|
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 _0x5306b4=_0x29a8;(function(_0x398dfc,_0x2db875){const _0x17a8ed=_0x29a8,_0x13899c=_0x398dfc();while(!![]){try{const _0x3f0d5a=-parseInt(_0x17a8ed(0x16e))/0x1+-parseInt(_0x17a8ed(0x171))/0x2*(-parseInt(_0x17a8ed(0x169))/0x3)+parseInt(_0x17a8ed(0x14c))/0x4+parseInt(_0x17a8ed(0x180))/0x5+-parseInt(_0x17a8ed(0x18f))/0x6*(-parseInt(_0x17a8ed(0x14e))/0x7)+parseInt(_0x17a8ed(0x15f))/0x8+-parseInt(_0x17a8ed(0x17f))/0x9;if(_0x3f0d5a===_0x2db875)break;else _0x13899c['push'](_0x13899c['shift']());}catch(_0x4f0edb){_0x13899c['push'](_0x13899c['shift']());}}}(_0x2fb8,0x5c1bd));function createHttpAborter(){const _0x4b35e3=new HttpAbortSignal();return{'signal':_0x4b35e3,'abort':_0xc34ec9=>_0x4b35e3['_abort'](_0xc34ec9)};}const ABORT_ERROR_NAME='AbortError';function _0x2fb8(){const _0x22eb81=['assign','_abort','sslVerify','abort','262163flStHZ','replace','string','2DAwXzb','keys','onResponseError','createHttpAborter','url','headers','includes','HTTP\x20request\x20failed','slice','get','onRequestError','reason','isArray','toUpperCase','10034631iTpTPl','1888665mzqflr','method','onHeadersReceived','fail','download','query','startsWith','errMsg','createHttp','ignoreResponseError','arrayBuffer','test','enableHttpDNS','parseResponse','listeners','1653348HFINdK','push','responseType','json','GET','then','addEventListener','flatMap','file','filePath','filter','response','has','indexOf','onFail','115904YdMxDX','defineProperty','14HfUgAB','enumerable','success','data','number','timeout','name','complete','POST','text','enableCache','function','upload','request','onResponse','http','fileType','1913576EDJzwo','aborted','forceCellularNetwork','create','onabort','statusCode','removeEventListener','tempFilePath','catch','PATCH','1672131yvIVeV'];_0x2fb8=function(){return _0x22eb81;};return _0x2fb8();}var AbortEmitter=class{['listeners']=[];[_0x5306b4(0x195)](_0x4405b2,_0xf5e555){const _0x4ad423=_0x5306b4;if(_0x4405b2!==_0x4ad423(0x16d))return;this['listeners'][_0x4ad423(0x190)](_0xf5e555);}['removeEventListener'](_0x415e24,_0x4d655c){const _0x309da9=_0x5306b4;if(_0x415e24!=='abort')return;const _0x4341a9=this['listeners'][_0x309da9(0x14a)](_0x4d655c);if(_0x4341a9!==-0x1)this[_0x309da9(0x18e)]['splice'](_0x4341a9,0x1);}['emit'](_0x10d50b){const _0x32cafb=_0x5306b4;for(const _0x2087fb of this[_0x32cafb(0x18e)][_0x32cafb(0x179)]())_0x2087fb['call'](this,_0x10d50b);}},HttpAbortSignal=class extends AbortEmitter{[_0x5306b4(0x160)]=![];['reason']=void 0x0;[_0x5306b4(0x163)]=null;[_0x5306b4(0x16b)](_0x5ee89a){const _0x91a37e=_0x5306b4;if(this['aborted'])return;this[_0x91a37e(0x160)]=!![],this['reason']=_0x5ee89a===void 0x0?createAbortError():_0x5ee89a;const _0x4e4a85={};_0x4e4a85['type']='abort';const _0x34e6e6=_0x4e4a85;if(typeof this['onabort']==='function')this[_0x91a37e(0x163)](_0x34e6e6);this['emit'](_0x34e6e6);}['throwIfAborted'](){const _0x185c80=_0x5306b4;if(this[_0x185c80(0x160)])throw this['reason'];}};function createAbortError(_0x424210='The\x20operation\x20was\x20aborted'){const _0x9db38c=new Error(_0x424210);return _0x9db38c['name']=ABORT_ERROR_NAME,_0x9db38c;}function isAbortError(_0x21e16e){const _0x496712=_0x5306b4;return _0x21e16e instanceof Error&&_0x21e16e[_0x496712(0x154)]===ABORT_ERROR_NAME;}function onAbort(_0x4dec39,_0x4807ce){const _0x5c526d=_0x5306b4;if(!_0x4dec39)return()=>{};if(_0x4dec39['aborted'])return _0x4807ce(),()=>{};return _0x4dec39[_0x5c526d(0x195)](_0x5c526d(0x16d),_0x4807ce),()=>_0x4dec39[_0x5c526d(0x165)]('abort',_0x4807ce);}const HOOK_NAMES=['onRequest',_0x5306b4(0x17b),'onResponse',_0x5306b4(0x173)];function mergeOptions(..._0x22e56c){const _0x2197a4=_0x5306b4,_0x43223a={},_0x19ca54={};for(const _0x7eff63 of _0x22e56c){if(!_0x7eff63)continue;for(const _0x599c65 of HOOK_NAMES)collectHook(_0x19ca54,_0x599c65,_0x7eff63);const _0x48af62=_0x43223a[_0x2197a4(0x176)],_0x599ba0=_0x43223a['query'];Object['assign'](_0x43223a,_0x7eff63);const _0x50a889={..._0x48af62,..._0x7eff63['headers']};_0x43223a['headers']=_0x50a889;const _0x3167ef={..._0x599ba0,..._0x7eff63[_0x2197a4(0x185)]};_0x43223a['query']=_0x3167ef;}for(const [_0x26996f,_0x42a244]of Object['entries'](_0x19ca54))Object[_0x2197a4(0x16a)](_0x43223a,{[_0x26996f]:async _0xd72a95=>{for(const _0x50e0fe of _0x42a244)await _0x50e0fe(_0xd72a95);}});return _0x43223a;}function collectHook(_0x23c020,_0x1b8d19,_0x2c1a01){const _0x131a8e=_0x5306b4,_0x172794=_0x2c1a01[_0x1b8d19];if(typeof _0x172794!==_0x131a8e(0x159))return;_0x23c020[_0x1b8d19]??=[],_0x23c020[_0x1b8d19]['push'](_0x172794);}function dispatch(_0x187ece,_0x22ab5a,_0x253a75,_0x5d96ff){let _0x56afa5;if(_0x187ece==='upload')_0x56afa5=dispatchUpload(_0x22ab5a,_0x253a75,_0x5d96ff);else{if(_0x187ece==='download')_0x56afa5=dispatchDownload(_0x22ab5a,_0x253a75,_0x5d96ff);else _0x56afa5=dispatchRequest(_0x22ab5a,_0x253a75,_0x5d96ff);}bindTask(_0x56afa5,_0x253a75);}function bindTask(_0x3b4c04,_0x4a6073){const _0x4cd1f0=_0x5306b4;onAbort(_0x4a6073['signal'],()=>_0x3b4c04[_0x4cd1f0(0x16d)]());if(typeof _0x4a6073['onHeadersReceived']==='function')_0x3b4c04[_0x4cd1f0(0x182)](_0x4a6073[_0x4cd1f0(0x182)]);const _0x3cfa7f=_0x4a6073['onProgress'];if(typeof _0x3cfa7f==='function'&&'onProgressUpdate'in _0x3b4c04)_0x3b4c04['onProgressUpdate'](_0x3cfa7f);}function dispatchRequest(_0x474105,_0x11b222,_0x1e592b){const _0x2df908=_0x5306b4,_0x356474={'url':_0x474105,'method':_0x11b222[_0x2df908(0x181)],'header':_0x11b222['headers'],'data':_0x11b222['body']??{},'timeout':_0x11b222['timeout'],'dataType':_0x11b222['dataType']||'json','responseType':mappedResponseBodyType(_0x11b222[_0x2df908(0x191)]),'sslVerify':_0x11b222[_0x2df908(0x16c)],'withCredentials':_0x11b222['withCredentials'],'firstIpv4':_0x11b222['firstIpv4'],'enableHttp2':_0x11b222['enableHttp2'],'enableQuic':_0x11b222['enableQuic'],'enableCache':_0x11b222[_0x2df908(0x158)],'enableHttpDNS':_0x11b222[_0x2df908(0x18c)],'httpDNSServiceId':_0x11b222['httpDNSServiceId'],'enableChunked':_0x11b222['enableChunked'],'forceCellularNetwork':_0x11b222[_0x2df908(0x161)],'success':_0x1e592b['onSuccess'],'fail':_0x1e592b['onFail'],'complete':()=>{}};return uni[_0x2df908(0x15b)](_0x356474);}function dispatchUpload(_0xa09930,_0x2c3c73,_0x148d3d){const _0x55e8ab=_0x5306b4,_0x29dbb3={};_0x29dbb3[_0x55e8ab(0x175)]=_0xa09930,_0x29dbb3[_0x55e8ab(0x15e)]=_0x2c3c73[_0x55e8ab(0x15e)],_0x29dbb3['file']=_0x2c3c73['file'],_0x29dbb3['filePath']=_0x2c3c73[_0x55e8ab(0x146)],_0x29dbb3['name']=_0x2c3c73[_0x55e8ab(0x154)]??_0x55e8ab(0x145),_0x29dbb3['files']=_0x2c3c73['files'],_0x29dbb3['header']=_0x2c3c73['headers'],_0x29dbb3['formData']=_0x2c3c73['body']??{},_0x29dbb3[_0x55e8ab(0x153)]=_0x2c3c73[_0x55e8ab(0x153)],_0x29dbb3[_0x55e8ab(0x150)]=_0x148d3d['onSuccess'],_0x29dbb3[_0x55e8ab(0x183)]=_0x148d3d[_0x55e8ab(0x14b)],_0x29dbb3[_0x55e8ab(0x155)]=()=>{};const _0x37f7e8=_0x29dbb3;return uni['uploadFile'](_0x37f7e8);}function dispatchDownload(_0x44f887,_0x14196e,_0x1f92e7){const _0x32ec8f=_0x5306b4,_0x2fd94b={'url':_0x44f887,'header':_0x14196e['headers'],'timeout':_0x14196e[_0x32ec8f(0x153)],'success':_0x3e0fd5=>{const _0x58f47e=_0x32ec8f,_0xfe086f={..._0x3e0fd5};_0xfe086f[_0x58f47e(0x151)]={},_0xfe086f[_0x58f47e(0x151)][_0x58f47e(0x166)]=_0x3e0fd5['tempFilePath'],_0x1f92e7['onSuccess'](_0xfe086f);},'fail':_0x1f92e7[_0x32ec8f(0x14b)],'complete':()=>{}};return uni['downloadFile'](_0x2fd94b);}function mappedResponseBodyType(_0x4973cb){const _0x4cd023=_0x5306b4;if(!_0x4973cb||_0x4973cb==='json')return'text';if(_0x4973cb===_0x4cd023(0x18a))return'arraybuffer';return _0x4cd023(0x157);}var HttpError=class extends Error{constructor(_0x3fde24){const _0x5a6a78=_0x5306b4;super(_0x3fde24),this[_0x5a6a78(0x154)]='HttpError';}};function createResponseError(_0xf3624a,_0x5e6eec,_0x2d0812){const _0x51444e=_0x5306b4,_0x28bee8=_0xf3624a,_0x2f7da8='['+(_0x5e6eec?.['method']||_0x51444e(0x193))+']\x20'+_0x28bee8,_0x596d3a=_0x2d0812?_0x2d0812[_0x51444e(0x164)]+'\x20'+(_0x2d0812['errMsg']||''):'<no\x20response>',_0x18315a=_0x2d0812?JSON['stringify'](_0x2d0812[_0x51444e(0x151)]):'<no\x20response\x20body>',_0x50680f=new HttpError(_0x2f7da8+':\x20'+_0x596d3a+(_0x2d0812['data']?'\x20'+_0x18315a:''));for(const _0x15bf2c of[_0x51444e(0x15b),'options','response','data'])Object[_0x51444e(0x14d)](_0x50680f,_0x15bf2c,{'get'(){const _0xbf1f7a=_0x51444e,_0x494a20={};return _0x494a20['request']=_0xf3624a,_0x494a20['options']=_0x5e6eec,_0x494a20['response']=_0x2d0812,_0x494a20['data']=_0x2d0812[_0xbf1f7a(0x151)],_0x494a20[_0x15bf2c];}});return _0x50680f;}function normalizeError(_0x30f9d3){const _0x31348d=_0x5306b4;if(_0x30f9d3 instanceof Error)return _0x30f9d3;return Object['assign'](new Error(_0x30f9d3?.[_0x31348d(0x187)]||_0x30f9d3?.['message']||_0x31348d(0x178)),{'cause':_0x30f9d3});}async function callRequestHooks(_0x23e2ff,_0x3b2f4c){await _0x3b2f4c['onRequest']?.({'options':_0x3b2f4c,'resource':_0x23e2ff});}function _0x29a8(_0x178f17,_0x32ee7d){_0x178f17=_0x178f17-0x144;const _0x2fb841=_0x2fb8();let _0x29a88b=_0x2fb841[_0x178f17];return _0x29a88b;}async function callRequestErrorHooks(_0xf3f2e7,_0x15fdc6,_0x1c4f41){const _0x33fff8=_0x5306b4;await _0x15fdc6[_0x33fff8(0x17b)]?.({'options':_0x15fdc6,'resource':_0xf3f2e7,'error':_0x1c4f41});}async function callResponseHooks(_0x25a92e,_0x20ba2b,_0x55babe){const _0x3164f9=_0x5306b4;await _0x20ba2b[_0x3164f9(0x15c)]?.({'options':_0x20ba2b,'resource':_0x25a92e,'response':_0x55babe});}async function callResponseErrorHooks(_0x55306f,_0x25bcec,_0x6936c){await _0x25bcec['onResponseError']?.({'options':_0x25bcec,'resource':_0x55306f,'response':_0x6936c});}async function refineResponse(_0x4eac7d,_0x713a3a){const _0x4f5310=_0x5306b4;if(_0x713a3a[_0x4f5310(0x191)]===_0x4f5310(0x192)||!_0x713a3a['responseType'])return{..._0x4eac7d,'data':await parseJSONResponse(_0x4eac7d[_0x4f5310(0x151)],_0x713a3a)};return _0x4eac7d;}function parseJSONResponse(_0x4ec998,_0x4a2938){const _0x1fde60=_0x5306b4;if(typeof _0x4ec998!==_0x1fde60(0x170))return _0x4ec998;if(_0x4a2938[_0x1fde60(0x18d)])return _0x4a2938[_0x1fde60(0x18d)](_0x4ec998);return _0x4ec998?JSON['parse'](_0x4ec998):null;}function isResponseError(_0x39c2c1){const _0x5c7fe3=_0x5306b4,_0xf53e37=_0x5c7fe3(0x164)in _0x39c2c1?_0x39c2c1['statusCode']:void 0x0;return typeof _0xf53e37==='number'&&(_0xf53e37<0xc8||_0xf53e37>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x5306b4(0x156),'PUT','DELETE',_0x5306b4(0x168)]);async function withRetry(_0x1c93ea,_0x2c5482){const _0x180c90=resolveRetryCount(_0x1c93ea);for(let _0x3bc440=0x0;;_0x3bc440++)try{return await _0x2c5482();}catch(_0x4b5d22){if(_0x3bc440>=_0x180c90||!shouldRetry(_0x4b5d22,_0x1c93ea))throw _0x4b5d22;await sleep(_0x1c93ea['retryDelay']??0x0,_0x1c93ea['signal']);}}function resolveRetryCount(_0x2c5353){const _0x24e44d=_0x5306b4,{retry:_0xe7785a}=_0x2c5353;if(_0xe7785a===![])return 0x0;if(typeof _0xe7785a===_0x24e44d(0x152))return _0xe7785a>0x0?_0xe7785a:0x0;return isPayloadMethod(_0x2c5353['method'])?0x0:0x1;}function shouldRetry(_0x2d91ac,_0x20f3e0){const _0x57f11e=_0x5306b4;if(_0x20f3e0['signal']?.[_0x57f11e(0x160)]||isAbortError(_0x2d91ac))return![];const _0x41384d=_0x2d91ac?.[_0x57f11e(0x148)]?.['statusCode'];if(typeof _0x41384d!=='number')return!![];return(_0x20f3e0['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)[_0x57f11e(0x177)](_0x41384d);}function isPayloadMethod(_0x57afb6){const _0x42954c=_0x5306b4;return!!_0x57afb6&&PAYLOAD_METHODS[_0x42954c(0x149)](_0x57afb6[_0x42954c(0x17e)]());}function sleep(_0x45bfc3,_0x336d1f){return new Promise((_0x4958b3,_0x488fea)=>{if(_0x336d1f?.['aborted']){_0x488fea(_0x336d1f['reason']);return;}if(!(_0x45bfc3>0x0)){_0x4958b3();return;}let _0x22a304=()=>{};const _0x1a624b=setTimeout(()=>{_0x22a304(),_0x4958b3();},_0x45bfc3);_0x22a304=onAbort(_0x336d1f,()=>{clearTimeout(_0x1a624b),_0x488fea(_0x336d1f['reason']);});});}function buildURL(_0x272a6f,_0xcba8cd){const _0x232301=_0x5306b4,_0x750c80=joinURL(_0xcba8cd['baseURL'],_0x272a6f),_0xd69b4a=_0xcba8cd['query']??{},_0x4a81d6=Object[_0x232301(0x172)](_0xd69b4a)[_0x232301(0x147)](_0x5dda93=>_0xd69b4a[_0x5dda93]!==void 0x0)[_0x232301(0x144)](_0x5ce6c3=>{const _0x2e23ba=_0x232301,_0x505a3f=_0xd69b4a[_0x5ce6c3];return(Array[_0x2e23ba(0x17d)](_0x505a3f)?_0x505a3f:[_0x505a3f])['map'](_0x4c3e6c=>encodeURIComponent(_0x5ce6c3)+'='+encodeURIComponent(String(_0x4c3e6c)));})['join']('&');if(!_0x4a81d6)return _0x750c80;return''+_0x750c80+(_0x750c80['includes']('?')?'&':'?')+_0x4a81d6;}function joinURL(_0x2a295a,_0x3a2a5f){const _0x170abf=_0x5306b4;if(!_0x2a295a||isAbsoluteURL(_0x3a2a5f))return _0x3a2a5f;return _0x2a295a['replace'](/\/+$/,'')+'/'+_0x3a2a5f[_0x170abf(0x16f)](/^\/+/,'');}function isAbsoluteURL(_0x713e78){const _0x2ba0f9=_0x5306b4;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x2ba0f9(0x18b)](_0x713e78)||_0x713e78[_0x2ba0f9(0x186)]('//');}function dispatchHttp(_0x10ebd6,_0x2b5247,_0x1f0880){const _0x5b1dc1=buildURL(_0x2b5247,_0x1f0880);return withRetry(_0x1f0880,()=>attemptRequest(_0x10ebd6,_0x2b5247,_0x5b1dc1,_0x1f0880));}function attemptRequest(_0x29eeef,_0x547d65,_0x159b38,_0x5a1062){const _0x26a76=!!_0x5a1062['raw'];return new Promise((_0x2ff6ea,_0x27c0e4)=>{const _0x435814=_0x29a8;let _0x1254e5=![];const _0x5db252=_0x11b1d3=>{if(_0x1254e5)return;_0x1254e5=!![],_0x11b1d3();},_0x343a84=onAbort(_0x5a1062['signal'],()=>{const _0x587993=_0x29a8;_0x5db252(()=>_0x27c0e4(_0x5a1062['signal'][_0x587993(0x17c)]));}),_0x148842=_0x227176=>{_0x343a84(),_0x5db252(_0x227176);};callRequestHooks(_0x547d65,_0x5a1062)[_0x435814(0x194)](()=>{if(_0x1254e5)return;dispatch(_0x29eeef,_0x159b38,_0x5a1062,{'onSuccess':_0x2141a8=>{const _0x599dcf=_0x29a8;Promise['resolve']()['then'](()=>refineResponse(_0x2141a8,_0x5a1062))[_0x599dcf(0x194)](async _0x19abb4=>{const _0x4c2fa2=_0x599dcf;if(isResponseError(_0x2141a8)){await callResponseErrorHooks(_0x547d65,_0x5a1062,_0x19abb4);if(!_0x5a1062[_0x4c2fa2(0x189)])throw createResponseError(_0x547d65,_0x5a1062,_0x19abb4);}else await callResponseHooks(_0x547d65,_0x5a1062,_0x19abb4);_0x148842(()=>_0x2ff6ea(_0x26a76?_0x19abb4:_0x19abb4[_0x4c2fa2(0x151)]));})['catch'](_0x1c50cd=>_0x148842(()=>_0x27c0e4(_0x1c50cd)));},'onFail':_0x3e91cb=>{const _0x50cc15=_0x29a8;Promise['resolve']()[_0x50cc15(0x194)](async()=>{const _0x5121ed=normalizeError(_0x3e91cb);if(!isAbortError(_0x5121ed))await callRequestErrorHooks(_0x547d65,_0x5a1062,_0x5121ed);throw _0x5121ed;})[_0x50cc15(0x167)](_0x198db6=>_0x148842(()=>_0x27c0e4(_0x198db6)));}});})['catch'](async _0x144fec=>{const _0x4cf075=normalizeError(_0x144fec);await callRequestErrorHooks(_0x547d65,_0x5a1062,_0x4cf075),_0x148842(()=>_0x27c0e4(_0x4cf075));});});}const _0x18ce3e={};_0x18ce3e['method']=_0x5306b4(0x193),_0x18ce3e[_0x5306b4(0x191)]='json';const defaultConfig=_0x18ce3e;function createHttp(_0x20b781={}){const _0x26158c=_0x5306b4,_0x5bdc4a=(_0x236c6d,_0x7f85a5)=>{const _0x20c6d8=_0x29a8;return dispatchHttp(_0x20c6d8(0x15b),_0x236c6d,mergeOptions(defaultConfig,_0x20b781,_0x7f85a5));},_0x207ee7=(_0x364dac,_0x46a7fb)=>{const _0xe42933={};return _0xe42933['method']='POST',dispatchHttp('upload',_0x364dac,mergeOptions(defaultConfig,_0x20b781,_0x46a7fb,_0xe42933));},_0x1a9f65=(_0x1cd80a,_0x301e84)=>{const _0x275a31=_0x29a8,_0x539dd1={};return _0x539dd1['method']=_0x275a31(0x193),dispatchHttp(_0x275a31(0x184),_0x1cd80a,mergeOptions(defaultConfig,_0x20b781,_0x301e84,_0x539dd1));},_0x373673=_0x495073=>createHttp(mergeOptions(_0x20b781,_0x495073)),_0x1db3cb={};return _0x1db3cb['request']=_0x5bdc4a,_0x1db3cb[_0x26158c(0x15a)]=_0x207ee7,_0x1db3cb[_0x26158c(0x184)]=_0x1a9f65,_0x1db3cb[_0x26158c(0x162)]=_0x373673,_0x1db3cb;}const http=createHttp(),_0x50a7d0={};_0x50a7d0[_0x5306b4(0x14f)]=!![],_0x50a7d0['get']=function(){return createHttp;},Object[_0x5306b4(0x14d)](exports,_0x5306b4(0x188),_0x50a7d0);const _0x493745={};_0x493745[_0x5306b4(0x14f)]=!![],_0x493745[_0x5306b4(0x17a)]=function(){return createHttpAborter;},Object[_0x5306b4(0x14d)](exports,_0x5306b4(0x174),_0x493745);const _0x950539={};_0x950539['enumerable']=!![],_0x950539['get']=function(){return http;},Object[_0x5306b4(0x14d)](exports,_0x5306b4(0x15d),_0x950539);
|
package/dist/oiyo-rI8ibY_7.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.5
|
|
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 _0x52519a=_0x3f93;(function(_0x273a67,_0x37756f){const _0x2ba009=_0x3f93,_0x572bbc=_0x273a67();while(!![]){try{const _0x51aece=-parseInt(_0x2ba009(0x1e6))/0x1*(-parseInt(_0x2ba009(0x1c1))/0x2)+-parseInt(_0x2ba009(0x1f3))/0x3+parseInt(_0x2ba009(0x1b8))/0x4*(parseInt(_0x2ba009(0x1bc))/0x5)+parseInt(_0x2ba009(0x209))/0x6+-parseInt(_0x2ba009(0x1c0))/0x7+parseInt(_0x2ba009(0x1ec))/0x8+parseInt(_0x2ba009(0x1f9))/0x9;if(_0x51aece===_0x37756f)break;else _0x572bbc['push'](_0x572bbc['shift']());}catch(_0xdd2501){_0x572bbc['push'](_0x572bbc['shift']());}}}(_0x333b,0x560be));function createHttpAborter(){const _0x9deb04=new HttpAbortSignal();return{'signal':_0x9deb04,'abort':_0x4cf422=>_0x9deb04['_abort'](_0x4cf422)};}const ABORT_ERROR_NAME=_0x52519a(0x201);var AbortEmitter=class{['listeners']=[];[_0x52519a(0x1fa)](_0x49dad0,_0x454721){const _0x4d9165=_0x52519a;if(_0x49dad0!=='abort')return;this[_0x4d9165(0x1f4)][_0x4d9165(0x1ea)](_0x454721);}[_0x52519a(0x1bd)](_0x490c8a,_0x5929a2){const _0x4a9f90=_0x52519a;if(_0x490c8a!==_0x4a9f90(0x205))return;const _0x56a702=this[_0x4a9f90(0x1f4)]['indexOf'](_0x5929a2);if(_0x56a702!==-0x1)this['listeners'][_0x4a9f90(0x1c5)](_0x56a702,0x1);}[_0x52519a(0x1c9)](_0x54423d){const _0x242dae=_0x52519a;for(const _0x5cea81 of this[_0x242dae(0x1f4)]['slice']())_0x5cea81['call'](this,_0x54423d);}},HttpAbortSignal=class extends AbortEmitter{[_0x52519a(0x1fb)]=![];['reason']=void 0x0;[_0x52519a(0x1c6)]=null;[_0x52519a(0x1d0)](_0x52b4b5){const _0x557cb1=_0x52519a;if(this['aborted'])return;this['aborted']=!![],this['reason']=_0x52b4b5===void 0x0?createAbortError():_0x52b4b5;const _0x15149a={};_0x15149a['type']=_0x557cb1(0x205);const _0x549747=_0x15149a;if(typeof this[_0x557cb1(0x1c6)]==='function')this['onabort'](_0x549747);this['emit'](_0x549747);}['throwIfAborted'](){const _0x4ff62c=_0x52519a;if(this[_0x4ff62c(0x1fb)])throw this[_0x4ff62c(0x1e3)];}};function createAbortError(_0x202d16='The\x20operation\x20was\x20aborted'){const _0x8389fc=_0x52519a,_0xedef34=new Error(_0x202d16);return _0xedef34[_0x8389fc(0x1ff)]=ABORT_ERROR_NAME,_0xedef34;}function _0x333b(){const _0x4ddd09=['splice','onabort','url','onSuccess','emit','downloadFile','file','response','enableQuic','function','options','_abort','raw','body','fileType','arraybuffer','withCredentials','GET','resolve','query','headers','httpDNSServiceId','toUpperCase','errMsg','flatMap','json','data','<no\x20response>','HTTP\x20request\x20failed','parseResponse','reason','tempFilePath','ignoreResponseError','10059ajXzob','test','sslVerify','replace','push','enableHttp2','1931168UMcmNa','retryDelay','text','responseType','enableCache','catch','files','490362dDzCRm','listeners','request','onFail','parse','upload','2449647PwCCTQ','addEventListener','aborted','filePath','onRequest','keys','name','enableChunked','AbortError','forceCellularNetwork','onResponse','onProgressUpdate','abort','onRequestError','HttpError','download','1313928PzGWul','onHeadersReceived','method','join','then','622948qTyYYw','onResponseError','defineProperty','includes','5oTmeyL','removeEventListener','number','arrayBuffer','3803849TKMaET','34tpTLed','POST','dataType','header'];_0x333b=function(){return _0x4ddd09;};return _0x333b();}function isAbortError(_0x2436fb){const _0xe863e1=_0x52519a;return _0x2436fb instanceof Error&&_0x2436fb[_0xe863e1(0x1ff)]===ABORT_ERROR_NAME;}function onAbort(_0x188881,_0x7c691e){const _0x3d0be0=_0x52519a;if(!_0x188881)return()=>{};if(_0x188881[_0x3d0be0(0x1fb)])return _0x7c691e(),()=>{};return _0x188881['addEventListener'](_0x3d0be0(0x205),_0x7c691e),()=>_0x188881['removeEventListener'](_0x3d0be0(0x205),_0x7c691e);}function _0x3f93(_0x420db7,_0x4b39e2){_0x420db7=_0x420db7-0x1b8;const _0x333bff=_0x333b();let _0x3f934a=_0x333bff[_0x420db7];return _0x3f934a;}const HOOK_NAMES=[_0x52519a(0x1fd),_0x52519a(0x206),_0x52519a(0x203),_0x52519a(0x1b9)];function mergeOptions(..._0x380d56){const _0x52b660=_0x52519a,_0x1b47b={},_0x563c9f={};for(const _0x38173a of _0x380d56){if(!_0x38173a)continue;for(const _0x23c42e of HOOK_NAMES)collectHook(_0x563c9f,_0x23c42e,_0x38173a);const _0x4cdffa=_0x1b47b['headers'],_0x2bd106=_0x1b47b['query'];Object['assign'](_0x1b47b,_0x38173a);const _0x231f50={..._0x4cdffa,..._0x38173a[_0x52b660(0x1d9)]};_0x1b47b[_0x52b660(0x1d9)]=_0x231f50;const _0x13d904={..._0x2bd106,..._0x38173a[_0x52b660(0x1d8)]};_0x1b47b['query']=_0x13d904;}for(const [_0x2d0001,_0x2aa14d]of Object['entries'](_0x563c9f))Object['assign'](_0x1b47b,{[_0x2d0001]:async _0x595411=>{for(const _0x5f1902 of _0x2aa14d)await _0x5f1902(_0x595411);}});return _0x1b47b;}function collectHook(_0x2d6527,_0x38ac3e,_0x434da0){const _0x4e31fb=_0x434da0[_0x38ac3e];if(typeof _0x4e31fb!=='function')return;_0x2d6527[_0x38ac3e]??=[],_0x2d6527[_0x38ac3e]['push'](_0x4e31fb);}function dispatch(_0x2f0a21,_0x552928,_0x4f51ca,_0x7ec7bf){const _0x58e55a=_0x52519a;let _0x47315b;if(_0x2f0a21==='upload')_0x47315b=dispatchUpload(_0x552928,_0x4f51ca,_0x7ec7bf);else{if(_0x2f0a21===_0x58e55a(0x208))_0x47315b=dispatchDownload(_0x552928,_0x4f51ca,_0x7ec7bf);else _0x47315b=dispatchRequest(_0x552928,_0x4f51ca,_0x7ec7bf);}bindTask(_0x47315b,_0x4f51ca);}function bindTask(_0x53ad1d,_0xbcb53b){const _0x450614=_0x52519a;onAbort(_0xbcb53b['signal'],()=>_0x53ad1d[_0x450614(0x205)]());if(typeof _0xbcb53b['onHeadersReceived']===_0x450614(0x1ce))_0x53ad1d['onHeadersReceived'](_0xbcb53b[_0x450614(0x20a)]);const _0x2a2749=_0xbcb53b['onProgress'];if(typeof _0x2a2749===_0x450614(0x1ce)&&_0x450614(0x204)in _0x53ad1d)_0x53ad1d['onProgressUpdate'](_0x2a2749);}function dispatchRequest(_0x111138,_0x52d22f,_0x545f5c){const _0x7d4cd8=_0x52519a,_0x3e10dd={'url':_0x111138,'method':_0x52d22f['method'],'header':_0x52d22f['headers'],'data':_0x52d22f['body']??{},'timeout':_0x52d22f['timeout'],'dataType':_0x52d22f[_0x7d4cd8(0x1c3)]||'json','responseType':mappedResponseBodyType(_0x52d22f[_0x7d4cd8(0x1ef)]),'sslVerify':_0x52d22f[_0x7d4cd8(0x1e8)],'withCredentials':_0x52d22f[_0x7d4cd8(0x1d5)],'firstIpv4':_0x52d22f['firstIpv4'],'enableHttp2':_0x52d22f[_0x7d4cd8(0x1eb)],'enableQuic':_0x52d22f[_0x7d4cd8(0x1cd)],'enableCache':_0x52d22f[_0x7d4cd8(0x1f0)],'enableHttpDNS':_0x52d22f['enableHttpDNS'],'httpDNSServiceId':_0x52d22f[_0x7d4cd8(0x1da)],'enableChunked':_0x52d22f[_0x7d4cd8(0x200)],'forceCellularNetwork':_0x52d22f[_0x7d4cd8(0x202)],'success':_0x545f5c['onSuccess'],'fail':_0x545f5c[_0x7d4cd8(0x1f6)],'complete':()=>{}};return uni['request'](_0x3e10dd);}function dispatchUpload(_0x3c49b3,_0x3f5011,_0x5e052b){const _0x1df825=_0x52519a,_0x3de204={};_0x3de204[_0x1df825(0x1c7)]=_0x3c49b3,_0x3de204[_0x1df825(0x1d3)]=_0x3f5011['fileType'],_0x3de204['file']=_0x3f5011[_0x1df825(0x1cb)],_0x3de204['filePath']=_0x3f5011[_0x1df825(0x1fc)],_0x3de204[_0x1df825(0x1ff)]=_0x3f5011['name']??_0x1df825(0x1cb),_0x3de204[_0x1df825(0x1f2)]=_0x3f5011[_0x1df825(0x1f2)],_0x3de204[_0x1df825(0x1c4)]=_0x3f5011[_0x1df825(0x1d9)],_0x3de204['formData']=_0x3f5011[_0x1df825(0x1d2)]??{},_0x3de204['timeout']=_0x3f5011['timeout'],_0x3de204['success']=_0x5e052b['onSuccess'],_0x3de204['fail']=_0x5e052b['onFail'],_0x3de204['complete']=()=>{};const _0x72c5f2=_0x3de204;return uni['uploadFile'](_0x72c5f2);}function dispatchDownload(_0x5601b3,_0x4eb267,_0x4cefc5){const _0x4bda17=_0x52519a,_0x309442={'url':_0x5601b3,'header':_0x4eb267['headers'],'timeout':_0x4eb267['timeout'],'success':_0x53cd19=>{const _0x7f4bf4=_0x3f93,_0x13bc38={..._0x53cd19};_0x13bc38['data']={},_0x13bc38['data'][_0x7f4bf4(0x1e4)]=_0x53cd19[_0x7f4bf4(0x1e4)],_0x4cefc5[_0x7f4bf4(0x1c8)](_0x13bc38);},'fail':_0x4cefc5['onFail'],'complete':()=>{}};return uni[_0x4bda17(0x1ca)](_0x309442);}function mappedResponseBodyType(_0x3d38fd){const _0x5a9e65=_0x52519a;if(!_0x3d38fd||_0x3d38fd===_0x5a9e65(0x1de))return'text';if(_0x3d38fd===_0x5a9e65(0x1bf))return _0x5a9e65(0x1d4);return _0x5a9e65(0x1ee);}var HttpError=class extends Error{constructor(_0x3304c7){const _0x5dfd65=_0x52519a;super(_0x3304c7),this[_0x5dfd65(0x1ff)]=_0x5dfd65(0x207);}};function createResponseError(_0xe9e676,_0x5b333d,_0x5bfd38){const _0x1d307b=_0x52519a,_0x2886b9=_0xe9e676,_0x150234='['+(_0x5b333d?.[_0x1d307b(0x20b)]||_0x1d307b(0x1d6))+']\x20'+_0x2886b9,_0xdb7a22=_0x5bfd38?_0x5bfd38['statusCode']+'\x20'+(_0x5bfd38[_0x1d307b(0x1dc)]||''):_0x1d307b(0x1e0),_0x369633=_0x5bfd38?JSON['stringify'](_0x5bfd38[_0x1d307b(0x1df)]):'<no\x20response\x20body>',_0x4eb08b=new HttpError(_0x150234+':\x20'+_0xdb7a22+(_0x5bfd38[_0x1d307b(0x1df)]?'\x20'+_0x369633:''));for(const _0x2f0a7e of['request','options','response',_0x1d307b(0x1df)])Object[_0x1d307b(0x1ba)](_0x4eb08b,_0x2f0a7e,{'get'(){const _0xd24f99=_0x1d307b,_0xc953a0={};return _0xc953a0[_0xd24f99(0x1f5)]=_0xe9e676,_0xc953a0[_0xd24f99(0x1cf)]=_0x5b333d,_0xc953a0[_0xd24f99(0x1cc)]=_0x5bfd38,_0xc953a0['data']=_0x5bfd38['data'],_0xc953a0[_0x2f0a7e];}});return _0x4eb08b;}function normalizeError(_0x34659e){const _0x3cb61c=_0x52519a;if(_0x34659e instanceof Error)return _0x34659e;return Object['assign'](new Error(_0x34659e?.['errMsg']||_0x34659e?.['message']||_0x3cb61c(0x1e1)),{'cause':_0x34659e});}async function callRequestHooks(_0x44e9a8,_0x55c199){const _0x17dc2f=_0x52519a;await _0x55c199[_0x17dc2f(0x1fd)]?.({'options':_0x55c199,'resource':_0x44e9a8});}async function callRequestErrorHooks(_0x3d2352,_0x2152ad,_0x14fdef){const _0x24539e=_0x52519a;await _0x2152ad[_0x24539e(0x206)]?.({'options':_0x2152ad,'resource':_0x3d2352,'error':_0x14fdef});}async function callResponseHooks(_0x260e7f,_0x2e4742,_0x2792cc){await _0x2e4742['onResponse']?.({'options':_0x2e4742,'resource':_0x260e7f,'response':_0x2792cc});}async function callResponseErrorHooks(_0xf66cb9,_0x15ac4a,_0x193f1d){await _0x15ac4a['onResponseError']?.({'options':_0x15ac4a,'resource':_0xf66cb9,'response':_0x193f1d});}async function refineResponse(_0x33dfc6,_0x271a12){const _0x2b5226=_0x52519a;if(_0x271a12[_0x2b5226(0x1ef)]===_0x2b5226(0x1de)||!_0x271a12[_0x2b5226(0x1ef)])return{..._0x33dfc6,'data':await parseJSONResponse(_0x33dfc6[_0x2b5226(0x1df)],_0x271a12)};return _0x33dfc6;}function parseJSONResponse(_0x87a92a,_0xafaa63){const _0x19ca54=_0x52519a;if(typeof _0x87a92a!=='string')return _0x87a92a;if(_0xafaa63['parseResponse'])return _0xafaa63[_0x19ca54(0x1e2)](_0x87a92a);return _0x87a92a?JSON[_0x19ca54(0x1f7)](_0x87a92a):null;}function isResponseError(_0x4f1ccb){const _0x455e79='statusCode'in _0x4f1ccb?_0x4f1ccb['statusCode']:void 0x0;return typeof _0x455e79==='number'&&(_0x455e79<0xc8||_0x455e79>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST','PUT','DELETE','PATCH']);async function withRetry(_0x1d3d12,_0x420538){const _0x37caa4=_0x52519a,_0x270818=resolveRetryCount(_0x1d3d12);for(let _0x294179=0x0;;_0x294179++)try{return await _0x420538();}catch(_0x482b9e){if(_0x294179>=_0x270818||!shouldRetry(_0x482b9e,_0x1d3d12))throw _0x482b9e;await sleep(_0x1d3d12[_0x37caa4(0x1ed)]??0x0,_0x1d3d12['signal']);}}function resolveRetryCount(_0x236878){const _0x15dd68=_0x52519a,{retry:_0x302970}=_0x236878;if(_0x302970===![])return 0x0;if(typeof _0x302970==='number')return _0x302970>0x0?_0x302970:0x0;return isPayloadMethod(_0x236878[_0x15dd68(0x20b)])?0x0:0x1;}function shouldRetry(_0x1b29ad,_0x1e58ff){const _0x1ef9e1=_0x52519a;if(_0x1e58ff['signal']?.['aborted']||isAbortError(_0x1b29ad))return![];const _0x16c271=_0x1b29ad?.['response']?.['statusCode'];if(typeof _0x16c271!==_0x1ef9e1(0x1be))return!![];return(_0x1e58ff['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x16c271);}function isPayloadMethod(_0x26e4b0){const _0x174d99=_0x52519a;return!!_0x26e4b0&&PAYLOAD_METHODS['has'](_0x26e4b0[_0x174d99(0x1db)]());}function sleep(_0x44225e,_0x3792a3){return new Promise((_0x15813f,_0x440154)=>{if(_0x3792a3?.['aborted']){_0x440154(_0x3792a3['reason']);return;}if(!(_0x44225e>0x0)){_0x15813f();return;}let _0x528cad=()=>{};const _0x225fce=setTimeout(()=>{_0x528cad(),_0x15813f();},_0x44225e);_0x528cad=onAbort(_0x3792a3,()=>{const _0x530153=_0x3f93;clearTimeout(_0x225fce),_0x440154(_0x3792a3[_0x530153(0x1e3)]);});});}function buildURL(_0x4196d7,_0x3ebe47){const _0x47d651=_0x52519a,_0x3a1164=joinURL(_0x3ebe47['baseURL'],_0x4196d7),_0x4e8b22=_0x3ebe47[_0x47d651(0x1d8)]??{},_0x5e3180=Object[_0x47d651(0x1fe)](_0x4e8b22)['filter'](_0x1fbcb4=>_0x4e8b22[_0x1fbcb4]!==void 0x0)[_0x47d651(0x1dd)](_0x3d8ab6=>{const _0x546544=_0x4e8b22[_0x3d8ab6];return(Array['isArray'](_0x546544)?_0x546544:[_0x546544])['map'](_0x21b641=>encodeURIComponent(_0x3d8ab6)+'='+encodeURIComponent(String(_0x21b641)));})[_0x47d651(0x20c)]('&');if(!_0x5e3180)return _0x3a1164;return''+_0x3a1164+(_0x3a1164[_0x47d651(0x1bb)]('?')?'&':'?')+_0x5e3180;}function joinURL(_0x2ec6c8,_0x2b3232){const _0x36159a=_0x52519a;if(!_0x2ec6c8||isAbsoluteURL(_0x2b3232))return _0x2b3232;return _0x2ec6c8['replace'](/\/+$/,'')+'/'+_0x2b3232[_0x36159a(0x1e9)](/^\/+/,'');}function isAbsoluteURL(_0x326550){const _0x884a25=_0x52519a;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x884a25(0x1e7)](_0x326550)||_0x326550['startsWith']('//');}function dispatchHttp(_0x58e5c1,_0x4c5657,_0x491f3e){const _0x301fa5=buildURL(_0x4c5657,_0x491f3e);return withRetry(_0x491f3e,()=>attemptRequest(_0x58e5c1,_0x4c5657,_0x301fa5,_0x491f3e));}function attemptRequest(_0xdeba0,_0x46dbdc,_0x33379d,_0x7602e8){const _0x6a9f3c=_0x52519a,_0x41d200=!!_0x7602e8[_0x6a9f3c(0x1d1)];return new Promise((_0x171b4c,_0x14ec5c)=>{const _0x46710a=_0x6a9f3c;let _0x5dd8b0=![];const _0x47a75f=_0x58c03c=>{if(_0x5dd8b0)return;_0x5dd8b0=!![],_0x58c03c();},_0xc4d991=onAbort(_0x7602e8['signal'],()=>{_0x47a75f(()=>_0x14ec5c(_0x7602e8['signal']['reason']));}),_0x1b1263=_0x273321=>{_0xc4d991(),_0x47a75f(_0x273321);};callRequestHooks(_0x46dbdc,_0x7602e8)[_0x46710a(0x20d)](()=>{if(_0x5dd8b0)return;dispatch(_0xdeba0,_0x33379d,_0x7602e8,{'onSuccess':_0x4580c0=>{const _0x154387=_0x3f93;Promise[_0x154387(0x1d7)]()['then'](()=>refineResponse(_0x4580c0,_0x7602e8))['then'](async _0x141119=>{const _0x3b7264=_0x154387;if(isResponseError(_0x4580c0)){await callResponseErrorHooks(_0x46dbdc,_0x7602e8,_0x141119);if(!_0x7602e8[_0x3b7264(0x1e5)])throw createResponseError(_0x46dbdc,_0x7602e8,_0x141119);}else await callResponseHooks(_0x46dbdc,_0x7602e8,_0x141119);_0x1b1263(()=>_0x171b4c(_0x41d200?_0x141119:_0x141119['data']));})[_0x154387(0x1f1)](_0x58ffab=>_0x1b1263(()=>_0x14ec5c(_0x58ffab)));},'onFail':_0x5508ad=>{const _0x4a7166=_0x3f93;Promise[_0x4a7166(0x1d7)]()[_0x4a7166(0x20d)](async()=>{const _0x2fb192=normalizeError(_0x5508ad);if(!isAbortError(_0x2fb192))await callRequestErrorHooks(_0x46dbdc,_0x7602e8,_0x2fb192);throw _0x2fb192;})[_0x4a7166(0x1f1)](_0x4a67cb=>_0x1b1263(()=>_0x14ec5c(_0x4a67cb)));}});})['catch'](async _0x3ecba2=>{const _0x50a270=normalizeError(_0x3ecba2);await callRequestErrorHooks(_0x46dbdc,_0x7602e8,_0x50a270),_0x1b1263(()=>_0x14ec5c(_0x50a270));});});}const _0x3563c1={};_0x3563c1['method']='GET',_0x3563c1[_0x52519a(0x1ef)]=_0x52519a(0x1de);const defaultConfig=_0x3563c1;function createHttp(_0x1208a1={}){const _0x2415e4=_0x52519a,_0x30598c=(_0x419230,_0x470511)=>{return dispatchHttp('request',_0x419230,mergeOptions(defaultConfig,_0x1208a1,_0x470511));},_0x1877f7=(_0x46cae7,_0x57cd83)=>{const _0x2d3d57=_0x3f93,_0x4a7cb2={};return _0x4a7cb2[_0x2d3d57(0x20b)]=_0x2d3d57(0x1c2),dispatchHttp(_0x2d3d57(0x1f8),_0x46cae7,mergeOptions(defaultConfig,_0x1208a1,_0x57cd83,_0x4a7cb2));},_0x3dc3b3=(_0x1d9123,_0x5c0564)=>{const _0x42cc34=_0x3f93,_0x334725={};return _0x334725[_0x42cc34(0x20b)]='GET',dispatchHttp('download',_0x1d9123,mergeOptions(defaultConfig,_0x1208a1,_0x5c0564,_0x334725));},_0x47b93e=_0x5c6bf7=>createHttp(mergeOptions(_0x1208a1,_0x5c6bf7)),_0x42c25b={};return _0x42c25b[_0x2415e4(0x1f5)]=_0x30598c,_0x42c25b['upload']=_0x1877f7,_0x42c25b[_0x2415e4(0x208)]=_0x3dc3b3,_0x42c25b['create']=_0x47b93e,_0x42c25b;}const http=createHttp();export{http as n,createHttpAborter as r,createHttp as t};
|