@oiyo/framework 0.4.5 → 0.4.7
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-DaPBMr2_.d.cts} +1 -1
- package/dist/{index-C_vPDBDX.d.mts → index-DaPBMr2_.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-Cfyt1TAC.mjs +7 -0
- package/dist/oiyo-Dz2nYhKn.cjs +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.7
|
|
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-Dz2nYhKn.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.7
|
|
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-DaPBMr2_.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.7
|
|
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-DaPBMr2_.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.7
|
|
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-Cfyt1TAC.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.7
|
|
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 _0x9a34dd=_0x480c;(function(_0x2ff281,_0xf5c4c2){const _0x262cab=_0x480c,_0x433a86=_0x2ff281();while(!![]){try{const _0x381ae9=parseInt(_0x262cab(0xc7))/0x1+parseInt(_0x262cab(0xf7))/0x2*(-parseInt(_0x262cab(0xd1))/0x3)+-parseInt(_0x262cab(0xe8))/0x4*(-parseInt(_0x262cab(0xec))/0x5)+-parseInt(_0x262cab(0xef))/0x6+parseInt(_0x262cab(0xf8))/0x7*(-parseInt(_0x262cab(0xfd))/0x8)+parseInt(_0x262cab(0xda))/0x9*(-parseInt(_0x262cab(0xfc))/0xa)+parseInt(_0x262cab(0x10e))/0xb*(parseInt(_0x262cab(0xff))/0xc);if(_0x381ae9===_0xf5c4c2)break;else _0x433a86['push'](_0x433a86['shift']());}catch(_0x53d0a7){_0x433a86['push'](_0x433a86['shift']());}}}(_0x1013,0x6a914));function createHttpAborter(){const _0x4739b5=new HttpAbortSignal();return{'signal':_0x4739b5,'abort':_0x13fcd9=>_0x4739b5['_abort'](_0x13fcd9)};}const ABORT_ERROR_NAME='AbortError';var AbortEmitter=class{[_0x9a34dd(0x10a)]=[];[_0x9a34dd(0xc4)](_0x1616ef,_0x58ce9a){const _0x107a5e=_0x9a34dd;if(_0x1616ef!=='abort')return;this[_0x107a5e(0x10a)]['push'](_0x58ce9a);}[_0x9a34dd(0x10b)](_0x4382c3,_0x2bfb16){const _0x3bef99=_0x9a34dd;if(_0x4382c3!=='abort')return;const _0x3d77b8=this['listeners'][_0x3bef99(0xd9)](_0x2bfb16);if(_0x3d77b8!==-0x1)this[_0x3bef99(0x10a)][_0x3bef99(0xc5)](_0x3d77b8,0x1);}['emit'](_0x3e0dc5){const _0x55d1a9=_0x9a34dd;for(const _0x1ca8e0 of this['listeners'][_0x55d1a9(0xf1)]())_0x1ca8e0['call'](this,_0x3e0dc5);}},HttpAbortSignal=class extends AbortEmitter{[_0x9a34dd(0xc6)]=![];[_0x9a34dd(0xd4)]=void 0x0;[_0x9a34dd(0xf5)]=null;['_abort'](_0x3a9b2e){const _0x24ac9e=_0x9a34dd;if(this['aborted'])return;this['aborted']=!![],this['reason']=_0x3a9b2e===void 0x0?createAbortError():_0x3a9b2e;const _0x537951={};_0x537951['type']=_0x24ac9e(0xe6);const _0x37b1a0=_0x537951;if(typeof this[_0x24ac9e(0xf5)]==='function')this['onabort'](_0x37b1a0);this['emit'](_0x37b1a0);}[_0x9a34dd(0xfb)](){const _0x5880be=_0x9a34dd;if(this['aborted'])throw this[_0x5880be(0xd4)];}};function createAbortError(_0x564a9d=_0x9a34dd(0x100)){const _0x326076=new Error(_0x564a9d);return _0x326076['name']=ABORT_ERROR_NAME,_0x326076;}function isAbortError(_0x25f112){const _0x357226=_0x9a34dd;return _0x25f112 instanceof Error&&_0x25f112[_0x357226(0x102)]===ABORT_ERROR_NAME;}function onAbort(_0x433621,_0x5485f2){const _0x14698f=_0x9a34dd;if(!_0x433621)return()=>{};if(_0x433621['aborted'])return _0x5485f2(),()=>{};return _0x433621[_0x14698f(0xc4)](_0x14698f(0xe6),_0x5485f2),()=>_0x433621['removeEventListener']('abort',_0x5485f2);}const HOOK_NAMES=[_0x9a34dd(0x107),_0x9a34dd(0xe7),'onResponse','onResponseError'];function _0x480c(_0x46d8ff,_0x42f565){_0x46d8ff=_0x46d8ff-0xc4;const _0x1013a0=_0x1013();let _0x480cf8=_0x1013a0[_0x46d8ff];return _0x480cf8;}function mergeOptions(..._0x261b08){const _0x4f7c2c=_0x9a34dd,_0x3d5df2={},_0x488392={};for(const _0x5d2255 of _0x261b08){if(!_0x5d2255)continue;for(const _0x1a6ed9 of HOOK_NAMES)collectHook(_0x488392,_0x1a6ed9,_0x5d2255);const _0x16f771=_0x3d5df2[_0x4f7c2c(0xe3)],_0x4b23a5=_0x3d5df2[_0x4f7c2c(0xea)];Object[_0x4f7c2c(0xe2)](_0x3d5df2,_0x5d2255);const _0x1425c7={..._0x16f771,..._0x5d2255['headers']};_0x3d5df2[_0x4f7c2c(0xe3)]=_0x1425c7;const _0x3e6420={..._0x4b23a5,..._0x5d2255[_0x4f7c2c(0xea)]};_0x3d5df2['query']=_0x3e6420;}for(const [_0x51a750,_0x5c93bb]of Object['entries'](_0x488392))Object[_0x4f7c2c(0xe2)](_0x3d5df2,{[_0x51a750]:async _0x2d467b=>{for(const _0x1b52fd of _0x5c93bb)await _0x1b52fd(_0x2d467b);}});return _0x3d5df2;}function collectHook(_0x4ae99d,_0x43c441,_0x5c38a6){const _0x3d43ca=_0x9a34dd,_0x1a25e0=_0x5c38a6[_0x43c441];if(typeof _0x1a25e0!==_0x3d43ca(0x111))return;_0x4ae99d[_0x43c441]??=[],_0x4ae99d[_0x43c441][_0x3d43ca(0xdc)](_0x1a25e0);}function dispatch(_0x3246d7,_0x14d138,_0x5aa343,_0x2aadfb){let _0x45b066;if(_0x3246d7==='upload')_0x45b066=dispatchUpload(_0x14d138,_0x5aa343,_0x2aadfb);else{if(_0x3246d7==='download')_0x45b066=dispatchDownload(_0x14d138,_0x5aa343,_0x2aadfb);else _0x45b066=dispatchRequest(_0x14d138,_0x5aa343,_0x2aadfb);}bindTask(_0x45b066,_0x5aa343);}function bindTask(_0x53f7bc,_0x2695ce){const _0x2cd083=_0x9a34dd;onAbort(_0x2695ce['signal'],()=>_0x53f7bc[_0x2cd083(0xe6)]());if(typeof _0x2695ce['onHeadersReceived']===_0x2cd083(0x111))_0x53f7bc['onHeadersReceived'](_0x2695ce[_0x2cd083(0x105)]);const _0x2ebd34=_0x2695ce[_0x2cd083(0xcc)];if(typeof _0x2ebd34==='function'&&'onProgressUpdate'in _0x53f7bc)_0x53f7bc['onProgressUpdate'](_0x2ebd34);}function dispatchRequest(_0x8185c0,_0x2636db,_0x13d596){const _0x1c16fa=_0x9a34dd,_0x3a3cc6={'url':_0x8185c0,'method':_0x2636db['method'],'header':_0x2636db['headers'],'data':_0x2636db[_0x1c16fa(0xe0)]??{},'timeout':_0x2636db['timeout'],'dataType':_0x2636db[_0x1c16fa(0xd3)]||'json','responseType':mappedResponseBodyType(_0x2636db[_0x1c16fa(0xdd)]),'sslVerify':_0x2636db[_0x1c16fa(0xf3)],'withCredentials':_0x2636db['withCredentials'],'firstIpv4':_0x2636db['firstIpv4'],'enableHttp2':_0x2636db[_0x1c16fa(0xce)],'enableQuic':_0x2636db['enableQuic'],'enableCache':_0x2636db['enableCache'],'enableHttpDNS':_0x2636db['enableHttpDNS'],'httpDNSServiceId':_0x2636db['httpDNSServiceId'],'enableChunked':_0x2636db['enableChunked'],'forceCellularNetwork':_0x2636db[_0x1c16fa(0x10c)],'success':_0x13d596[_0x1c16fa(0xe4)],'fail':_0x13d596['onFail'],'complete':()=>{}};return uni[_0x1c16fa(0xf9)](_0x3a3cc6);}function dispatchUpload(_0x4861cd,_0x572df0,_0x5d491d){const _0x22d96a=_0x9a34dd,_0x58267c={};_0x58267c[_0x22d96a(0xd6)]=_0x4861cd,_0x58267c['fileType']=_0x572df0['fileType'],_0x58267c['file']=_0x572df0[_0x22d96a(0xed)],_0x58267c[_0x22d96a(0xdf)]=_0x572df0[_0x22d96a(0xdf)],_0x58267c[_0x22d96a(0x102)]=_0x572df0[_0x22d96a(0x102)]??_0x22d96a(0xed),_0x58267c['files']=_0x572df0['files'],_0x58267c[_0x22d96a(0x10d)]=_0x572df0['headers'],_0x58267c['formData']=_0x572df0[_0x22d96a(0xe0)]??{},_0x58267c[_0x22d96a(0x110)]=_0x572df0[_0x22d96a(0x110)],_0x58267c['success']=_0x5d491d[_0x22d96a(0xe4)],_0x58267c['fail']=_0x5d491d['onFail'],_0x58267c['complete']=()=>{};const _0x5174e8=_0x58267c;return uni['uploadFile'](_0x5174e8);}function dispatchDownload(_0x5d9c77,_0x37c7a6,_0x46313b){const _0x446854=_0x9a34dd,_0x4159b2={'url':_0x5d9c77,'header':_0x37c7a6[_0x446854(0xe3)],'timeout':_0x37c7a6[_0x446854(0x110)],'success':_0x53fe75=>{const _0x5ba138=_0x446854,_0x3e782c={..._0x53fe75};_0x3e782c['data']={},_0x3e782c['data'][_0x5ba138(0x109)]=_0x53fe75['tempFilePath'],_0x46313b[_0x5ba138(0xe4)](_0x3e782c);},'fail':_0x46313b['onFail'],'complete':()=>{}};return uni['downloadFile'](_0x4159b2);}function mappedResponseBodyType(_0x441935){const _0x33ceef=_0x9a34dd;if(!_0x441935||_0x441935==='json')return'text';if(_0x441935==='arrayBuffer')return'arraybuffer';return _0x33ceef(0xfa);}var HttpError=class extends Error{constructor(_0x342cd7){super(_0x342cd7),this['name']='HttpError';}};function createResponseError(_0x38ec63,_0x2cf82d,_0x324d04){const _0x4a7588=_0x9a34dd,_0x508fdf=_0x38ec63,_0xe2de30='['+(_0x2cf82d?.[_0x4a7588(0x108)]||'GET')+']\x20'+_0x508fdf,_0x404de2=_0x324d04?_0x324d04[_0x4a7588(0xd5)]+'\x20'+(_0x324d04['errMsg']||''):'<no\x20response>',_0x193bfb=_0x324d04?JSON['stringify'](_0x324d04['data']):'<no\x20response\x20body>',_0x6e95bf=new HttpError(_0xe2de30+':\x20'+_0x404de2+(_0x324d04[_0x4a7588(0xde)]?'\x20'+_0x193bfb:''));for(const _0xc1d880 of[_0x4a7588(0xf9),_0x4a7588(0x112),_0x4a7588(0x10f),'data'])Object[_0x4a7588(0xd0)](_0x6e95bf,_0xc1d880,{'get'(){const _0x565b7e=_0x4a7588,_0x5750df={};return _0x5750df[_0x565b7e(0xf9)]=_0x38ec63,_0x5750df['options']=_0x2cf82d,_0x5750df[_0x565b7e(0x10f)]=_0x324d04,_0x5750df[_0x565b7e(0xde)]=_0x324d04['data'],_0x5750df[_0xc1d880];}});return _0x6e95bf;}function normalizeError(_0x2b116e){const _0x5944f3=_0x9a34dd;if(_0x2b116e instanceof Error)return _0x2b116e;return Object['assign'](new Error(_0x2b116e?.['errMsg']||_0x2b116e?.[_0x5944f3(0xca)]||_0x5944f3(0xee)),{'cause':_0x2b116e});}async function callRequestHooks(_0x35b7ed,_0x4f6011){await _0x4f6011['onRequest']?.({'options':_0x4f6011,'resource':_0x35b7ed});}async function callRequestErrorHooks(_0x235e13,_0x9a4e53,_0xb39135){await _0x9a4e53['onRequestError']?.({'options':_0x9a4e53,'resource':_0x235e13,'error':_0xb39135});}async function callResponseHooks(_0x35a05c,_0x3d81b6,_0x3dfed3){const _0x395d09=_0x9a34dd;await _0x3d81b6[_0x395d09(0xe1)]?.({'options':_0x3d81b6,'resource':_0x35a05c,'response':_0x3dfed3});}async function callResponseErrorHooks(_0x5ca8a0,_0x286fef,_0x5e771a){await _0x286fef['onResponseError']?.({'options':_0x286fef,'resource':_0x5ca8a0,'response':_0x5e771a});}async function refineResponse(_0x511ed3,_0x4c9f02){const _0x462b9a=_0x9a34dd;if(_0x4c9f02[_0x462b9a(0xdd)]===_0x462b9a(0xf6)||!_0x4c9f02[_0x462b9a(0xdd)])return{..._0x511ed3,'data':await parseJSONResponse(_0x511ed3['data'],_0x4c9f02)};return _0x511ed3;}function parseJSONResponse(_0x2b5bc0,_0x219e72){const _0x486cd7=_0x9a34dd;if(typeof _0x2b5bc0!==_0x486cd7(0xc8))return _0x2b5bc0;if(_0x219e72[_0x486cd7(0xf2)])return _0x219e72['parseResponse'](_0x2b5bc0);return _0x2b5bc0?JSON['parse'](_0x2b5bc0):null;}function isResponseError(_0x2b0c41){const _0x13e2f5=_0x9a34dd,_0x59e32b='statusCode'in _0x2b0c41?_0x2b0c41[_0x13e2f5(0xd5)]:void 0x0;return typeof _0x59e32b==='number'&&(_0x59e32b<0xc8||_0x59e32b>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x9a34dd(0xd2),_0x9a34dd(0xc9),_0x9a34dd(0xd8),_0x9a34dd(0xf4)]);async function withRetry(_0x2e14f2,_0x479e7d){const _0x3ffbc2=resolveRetryCount(_0x2e14f2);for(let _0x76ca5d=0x0;;_0x76ca5d++)try{return await _0x479e7d();}catch(_0x4a2f2b){if(_0x76ca5d>=_0x3ffbc2||!shouldRetry(_0x4a2f2b,_0x2e14f2))throw _0x4a2f2b;await sleep(_0x2e14f2['retryDelay']??0x0,_0x2e14f2['signal']);}}function resolveRetryCount(_0x43f2e4){const _0x3cd3d4=_0x9a34dd,{retry:_0x30c053}=_0x43f2e4;if(_0x30c053===![])return 0x0;if(typeof _0x30c053==='number')return _0x30c053>0x0?_0x30c053:0x0;return isPayloadMethod(_0x43f2e4[_0x3cd3d4(0x108)])?0x0:0x1;}function shouldRetry(_0x315a26,_0xcc77bb){const _0x35f353=_0x9a34dd;if(_0xcc77bb[_0x35f353(0xdb)]?.['aborted']||isAbortError(_0x315a26))return![];const _0x509160=_0x315a26?.['response']?.[_0x35f353(0xd5)];if(typeof _0x509160!==_0x35f353(0x101))return!![];return(_0xcc77bb['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x509160);}function isPayloadMethod(_0x129166){return!!_0x129166&&PAYLOAD_METHODS['has'](_0x129166['toUpperCase']());}function sleep(_0x3edcbf,_0x147c94){return new Promise((_0x4d42e9,_0x1f0320)=>{if(_0x147c94?.['aborted']){_0x1f0320(_0x147c94['reason']);return;}if(!(_0x3edcbf>0x0)){_0x4d42e9();return;}let _0x41c8a9=()=>{};const _0x301cc2=setTimeout(()=>{_0x41c8a9(),_0x4d42e9();},_0x3edcbf);_0x41c8a9=onAbort(_0x147c94,()=>{const _0x19dca5=_0x480c;clearTimeout(_0x301cc2),_0x1f0320(_0x147c94[_0x19dca5(0xd4)]);});});}function buildURL(_0x70de90,_0xeb3555){const _0x2f8a13=_0x9a34dd,_0x47ee2e=joinURL(_0xeb3555['baseURL'],_0x70de90),_0x336f2d=_0xeb3555['query']??{},_0x10a031=Object['keys'](_0x336f2d)[_0x2f8a13(0xcd)](_0x4a9649=>_0x336f2d[_0x4a9649]!==void 0x0)[_0x2f8a13(0xe5)](_0x1c097e=>{const _0x3b09ae=_0x336f2d[_0x1c097e];return(Array['isArray'](_0x3b09ae)?_0x3b09ae:[_0x3b09ae])['map'](_0x28d9a8=>encodeURIComponent(_0x1c097e)+'='+encodeURIComponent(String(_0x28d9a8)));})[_0x2f8a13(0xe9)]('&');if(!_0x10a031)return _0x47ee2e;return''+_0x47ee2e+(_0x47ee2e['includes']('?')?'&':'?')+_0x10a031;}function joinURL(_0x217b21,_0x462259){const _0x20880c=_0x9a34dd;if(!_0x217b21||isAbsoluteURL(_0x462259))return _0x462259;return _0x217b21[_0x20880c(0xeb)](/\/+$/,'')+'/'+_0x462259['replace'](/^\/+/,'');}function isAbsoluteURL(_0x572f17){const _0x52b05e=_0x9a34dd;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x52b05e(0xf0)](_0x572f17)||_0x572f17['startsWith']('//');}function dispatchHttp(_0x12f5ae,_0x17a0f1,_0x5de830){const _0x391ec8=buildURL(_0x17a0f1,_0x5de830);return withRetry(_0x5de830,()=>attemptRequest(_0x12f5ae,_0x17a0f1,_0x391ec8,_0x5de830));}function attemptRequest(_0x1d06e8,_0x55124d,_0x50377d,_0x50b56c){const _0x50d8d9=!!_0x50b56c['raw'];return new Promise((_0x58cc26,_0x5b9b22)=>{const _0x42f212=_0x480c;let _0x1c6c02=![];const _0x552d06=_0x21a577=>{if(_0x1c6c02)return;_0x1c6c02=!![],_0x21a577();},_0x568ff3=onAbort(_0x50b56c[_0x42f212(0xdb)],()=>{const _0x351269=_0x42f212;_0x552d06(()=>_0x5b9b22(_0x50b56c[_0x351269(0xdb)]['reason']));}),_0x7e3dc6=_0x51a80d=>{_0x568ff3(),_0x552d06(_0x51a80d);};callRequestHooks(_0x55124d,_0x50b56c)['then'](()=>{if(_0x1c6c02)return;dispatch(_0x1d06e8,_0x50377d,_0x50b56c,{'onSuccess':_0x3a5b5e=>{const _0x373073=_0x480c;Promise[_0x373073(0x104)]()[_0x373073(0x106)](()=>refineResponse(_0x3a5b5e,_0x50b56c))[_0x373073(0x106)](async _0x2be88a=>{const _0xcde284=_0x373073;if(isResponseError(_0x3a5b5e)){await callResponseErrorHooks(_0x55124d,_0x50b56c,_0x2be88a);if(!_0x50b56c[_0xcde284(0xcb)])throw createResponseError(_0x55124d,_0x50b56c,_0x2be88a);}else await callResponseHooks(_0x55124d,_0x50b56c,_0x2be88a);_0x7e3dc6(()=>_0x58cc26(_0x50d8d9?_0x2be88a:_0x2be88a['data']));})[_0x373073(0x103)](_0xbdc548=>_0x7e3dc6(()=>_0x5b9b22(_0xbdc548)));},'onFail':_0x5899bc=>{const _0x16bbae=_0x480c;Promise['resolve']()['then'](async()=>{const _0x4b2209=normalizeError(_0x5899bc);if(!isAbortError(_0x4b2209))await callRequestErrorHooks(_0x55124d,_0x50b56c,_0x4b2209);throw _0x4b2209;})[_0x16bbae(0x103)](_0x4ab787=>_0x7e3dc6(()=>_0x5b9b22(_0x4ab787)));}});})['catch'](async _0x2e8583=>{const _0x4cfef6=normalizeError(_0x2e8583);await callRequestErrorHooks(_0x55124d,_0x50b56c,_0x4cfef6),_0x7e3dc6(()=>_0x5b9b22(_0x4cfef6));});});}const _0x1fca69={};_0x1fca69['method']=_0x9a34dd(0xd7),_0x1fca69['responseType']='json';function _0x1013(){const _0x10fc22=['enableHttp2','download','defineProperty','593313SyWTfA','POST','dataType','reason','statusCode','url','GET','DELETE','indexOf','542664moIfcR','signal','push','responseType','data','filePath','body','onResponse','assign','headers','onSuccess','flatMap','abort','onRequestError','1204Bhhgcp','join','query','replace','9715xLYdVS','file','HTTP\x20request\x20failed','2552694EJFlHe','test','slice','parseResponse','sslVerify','PATCH','onabort','json','6mePETq','194747yEaeyP','request','text','throwIfAborted','100JnRbmA','224rCCJDy','upload','24509844OYKnlK','The\x20operation\x20was\x20aborted','number','name','catch','resolve','onHeadersReceived','then','onRequest','method','tempFilePath','listeners','removeEventListener','forceCellularNetwork','header','11hMkGYr','response','timeout','function','options','addEventListener','splice','aborted','209880JNHUob','string','PUT','message','ignoreResponseError','onProgress','filter'];_0x1013=function(){return _0x10fc22;};return _0x1013();}const defaultConfig=_0x1fca69;function createHttp(_0x2178c9={}){const _0x2233a0=_0x9a34dd,_0x593412=(_0x45d5f5,_0x3393ee)=>{const _0x2ded71=_0x480c;return dispatchHttp(_0x2ded71(0xf9),_0x45d5f5,mergeOptions(defaultConfig,_0x2178c9,_0x3393ee));},_0x4b4d27=(_0x32f372,_0x5b30be)=>{const _0x52fc13=_0x480c,_0x618bdf={};return _0x618bdf[_0x52fc13(0x108)]='POST',dispatchHttp(_0x52fc13(0xfe),_0x32f372,mergeOptions(defaultConfig,_0x2178c9,_0x5b30be,_0x618bdf));},_0x57c092=(_0x50fd6d,_0x5abd95)=>{const _0xf89190=_0x480c,_0x464784={};return _0x464784['method']='GET',dispatchHttp(_0xf89190(0xcf),_0x50fd6d,mergeOptions(defaultConfig,_0x2178c9,_0x5abd95,_0x464784));},_0x383dd5=_0x7ee4d4=>createHttp(mergeOptions(_0x2178c9,_0x7ee4d4)),_0x288b98={};return _0x288b98['request']=_0x593412,_0x288b98['upload']=_0x4b4d27,_0x288b98[_0x2233a0(0xcf)]=_0x57c092,_0x288b98['create']=_0x383dd5,_0x288b98;}const http=createHttp();export{http as n,createHttpAborter as r,createHttp as t};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.7
|
|
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 _0x2a89f2=_0x4447;(function(_0x285e33,_0xafda58){const _0x27a5a0=_0x4447,_0x405da3=_0x285e33();while(!![]){try{const _0x5d7a50=-parseInt(_0x27a5a0(0x206))/0x1*(-parseInt(_0x27a5a0(0x203))/0x2)+-parseInt(_0x27a5a0(0x1f5))/0x3+parseInt(_0x27a5a0(0x214))/0x4+-parseInt(_0x27a5a0(0x1e2))/0x5*(-parseInt(_0x27a5a0(0x1d9))/0x6)+parseInt(_0x27a5a0(0x1ca))/0x7*(-parseInt(_0x27a5a0(0x1da))/0x8)+-parseInt(_0x27a5a0(0x201))/0x9+parseInt(_0x27a5a0(0x1c5))/0xa;if(_0x5d7a50===_0xafda58)break;else _0x405da3['push'](_0x405da3['shift']());}catch(_0x8e272e){_0x405da3['push'](_0x405da3['shift']());}}}(_0x38cf,0x92ee1));function createHttpAborter(){const _0x39cd55=new HttpAbortSignal();return{'signal':_0x39cd55,'abort':_0x188460=>_0x39cd55['_abort'](_0x188460)};}const ABORT_ERROR_NAME=_0x2a89f2(0x21b);var AbortEmitter=class{[_0x2a89f2(0x202)]=[];['addEventListener'](_0x3d2dab,_0x598dd4){const _0x3834ff=_0x2a89f2;if(_0x3d2dab!==_0x3834ff(0x209))return;this['listeners']['push'](_0x598dd4);}['removeEventListener'](_0x4df258,_0x5ef6cd){const _0x2a1492=_0x2a89f2;if(_0x4df258!=='abort')return;const _0x5db49f=this[_0x2a1492(0x202)]['indexOf'](_0x5ef6cd);if(_0x5db49f!==-0x1)this['listeners']['splice'](_0x5db49f,0x1);}[_0x2a89f2(0x20d)](_0x182ae6){const _0xe7fd50=_0x2a89f2;for(const _0x19d8ae of this[_0xe7fd50(0x202)][_0xe7fd50(0x1ef)]())_0x19d8ae[_0xe7fd50(0x1c7)](this,_0x182ae6);}},HttpAbortSignal=class extends AbortEmitter{['aborted']=![];[_0x2a89f2(0x1e0)]=void 0x0;[_0x2a89f2(0x1df)]=null;['_abort'](_0x37b4fb){const _0x21f39f=_0x2a89f2;if(this[_0x21f39f(0x207)])return;this[_0x21f39f(0x207)]=!![],this[_0x21f39f(0x1e0)]=_0x37b4fb===void 0x0?createAbortError():_0x37b4fb;const _0x4db41b={};_0x4db41b['type']='abort';const _0x45c023=_0x4db41b;if(typeof this['onabort']==='function')this['onabort'](_0x45c023);this['emit'](_0x45c023);}[_0x2a89f2(0x1fb)](){const _0x1febd9=_0x2a89f2;if(this[_0x1febd9(0x207)])throw this[_0x1febd9(0x1e0)];}};function createAbortError(_0x12843d=_0x2a89f2(0x1cc)){const _0x4612a8=_0x2a89f2,_0x469ab6=new Error(_0x12843d);return _0x469ab6[_0x4612a8(0x1f0)]=ABORT_ERROR_NAME,_0x469ab6;}function isAbortError(_0x18a741){const _0x3130b0=_0x2a89f2;return _0x18a741 instanceof Error&&_0x18a741[_0x3130b0(0x1f0)]===ABORT_ERROR_NAME;}function onAbort(_0x46df1e,_0x16c022){const _0x4ae787=_0x2a89f2;if(!_0x46df1e)return()=>{};if(_0x46df1e['aborted'])return _0x16c022(),()=>{};return _0x46df1e['addEventListener']('abort',_0x16c022),()=>_0x46df1e['removeEventListener'](_0x4ae787(0x209),_0x16c022);}const HOOK_NAMES=['onRequest',_0x2a89f2(0x1e5),_0x2a89f2(0x1f2),'onResponseError'];function mergeOptions(..._0x2ce094){const _0x5af313=_0x2a89f2,_0x2be285={},_0x1b536a={};for(const _0xa5cb36 of _0x2ce094){if(!_0xa5cb36)continue;for(const _0x31774c of HOOK_NAMES)collectHook(_0x1b536a,_0x31774c,_0xa5cb36);const _0x3115fa=_0x2be285['headers'],_0x340292=_0x2be285[_0x5af313(0x1ed)];Object[_0x5af313(0x1d7)](_0x2be285,_0xa5cb36);const _0x22539d={..._0x3115fa,..._0xa5cb36[_0x5af313(0x1d3)]};_0x2be285[_0x5af313(0x1d3)]=_0x22539d;const _0x209afc={..._0x340292,..._0xa5cb36[_0x5af313(0x1ed)]};_0x2be285['query']=_0x209afc;}for(const [_0xc08038,_0x3030f6]of Object[_0x5af313(0x1de)](_0x1b536a))Object[_0x5af313(0x1d7)](_0x2be285,{[_0xc08038]:async _0x2225d3=>{for(const _0x4da1df of _0x3030f6)await _0x4da1df(_0x2225d3);}});return _0x2be285;}function collectHook(_0x1792b4,_0x48aec4,_0xa54d5c){const _0x50ce69=_0xa54d5c[_0x48aec4];if(typeof _0x50ce69!=='function')return;_0x1792b4[_0x48aec4]??=[],_0x1792b4[_0x48aec4]['push'](_0x50ce69);}function dispatch(_0x47f4f7,_0x3f723c,_0x1d757c,_0x131493){let _0x5a0a2a;if(_0x47f4f7==='upload')_0x5a0a2a=dispatchUpload(_0x3f723c,_0x1d757c,_0x131493);else{if(_0x47f4f7==='download')_0x5a0a2a=dispatchDownload(_0x3f723c,_0x1d757c,_0x131493);else _0x5a0a2a=dispatchRequest(_0x3f723c,_0x1d757c,_0x131493);}bindTask(_0x5a0a2a,_0x1d757c);}function bindTask(_0x4716fd,_0x2b4e09){const _0x4b831d=_0x2a89f2;onAbort(_0x2b4e09[_0x4b831d(0x1d0)],()=>_0x4716fd[_0x4b831d(0x209)]());if(typeof _0x2b4e09['onHeadersReceived']==='function')_0x4716fd[_0x4b831d(0x1c2)](_0x2b4e09[_0x4b831d(0x1c2)]);const _0x50203f=_0x2b4e09['onProgress'];if(typeof _0x50203f==='function'&&'onProgressUpdate'in _0x4716fd)_0x4716fd[_0x4b831d(0x1c6)](_0x50203f);}function dispatchRequest(_0x22553a,_0x1bd96b,_0x89e072){const _0x5ae744=_0x2a89f2,_0x3e0db2={'url':_0x22553a,'method':_0x1bd96b[_0x5ae744(0x210)],'header':_0x1bd96b['headers'],'data':_0x1bd96b['body']??{},'timeout':_0x1bd96b[_0x5ae744(0x216)],'dataType':_0x1bd96b[_0x5ae744(0x1e1)]||_0x5ae744(0x1db),'responseType':mappedResponseBodyType(_0x1bd96b[_0x5ae744(0x1dc)]),'sslVerify':_0x1bd96b[_0x5ae744(0x1cd)],'withCredentials':_0x1bd96b['withCredentials'],'firstIpv4':_0x1bd96b[_0x5ae744(0x1ce)],'enableHttp2':_0x1bd96b[_0x5ae744(0x20c)],'enableQuic':_0x1bd96b[_0x5ae744(0x1d4)],'enableCache':_0x1bd96b[_0x5ae744(0x213)],'enableHttpDNS':_0x1bd96b[_0x5ae744(0x208)],'httpDNSServiceId':_0x1bd96b['httpDNSServiceId'],'enableChunked':_0x1bd96b[_0x5ae744(0x1cf)],'forceCellularNetwork':_0x1bd96b[_0x5ae744(0x1c8)],'success':_0x89e072['onSuccess'],'fail':_0x89e072[_0x5ae744(0x1ff)],'complete':()=>{}};return uni['request'](_0x3e0db2);}function dispatchUpload(_0x4cd20e,_0x36ebdf,_0x1db79f){const _0x11d4a9=_0x2a89f2,_0x59e0ff={};_0x59e0ff['url']=_0x4cd20e,_0x59e0ff[_0x11d4a9(0x1f1)]=_0x36ebdf['fileType'],_0x59e0ff[_0x11d4a9(0x1e3)]=_0x36ebdf[_0x11d4a9(0x1e3)],_0x59e0ff['filePath']=_0x36ebdf[_0x11d4a9(0x200)],_0x59e0ff[_0x11d4a9(0x1f0)]=_0x36ebdf[_0x11d4a9(0x1f0)]??_0x11d4a9(0x1e3),_0x59e0ff[_0x11d4a9(0x1d6)]=_0x36ebdf[_0x11d4a9(0x1d6)],_0x59e0ff[_0x11d4a9(0x1d2)]=_0x36ebdf['headers'],_0x59e0ff['formData']=_0x36ebdf['body']??{},_0x59e0ff[_0x11d4a9(0x216)]=_0x36ebdf['timeout'],_0x59e0ff['success']=_0x1db79f[_0x11d4a9(0x21a)],_0x59e0ff[_0x11d4a9(0x1cb)]=_0x1db79f[_0x11d4a9(0x1ff)],_0x59e0ff['complete']=()=>{};const _0x5808f5=_0x59e0ff;return uni['uploadFile'](_0x5808f5);}function dispatchDownload(_0x534c13,_0x46b29d,_0x5232ff){const _0x36dddd=_0x2a89f2,_0x25ed57={'url':_0x534c13,'header':_0x46b29d[_0x36dddd(0x1d3)],'timeout':_0x46b29d[_0x36dddd(0x216)],'success':_0x2ab795=>{const _0x2dcab3=_0x36dddd,_0x14d07e={..._0x2ab795};_0x14d07e[_0x2dcab3(0x205)]={},_0x14d07e[_0x2dcab3(0x205)]['tempFilePath']=_0x2ab795[_0x2dcab3(0x20f)],_0x5232ff['onSuccess'](_0x14d07e);},'fail':_0x5232ff[_0x36dddd(0x1ff)],'complete':()=>{}};return uni['downloadFile'](_0x25ed57);}function mappedResponseBodyType(_0x3c9006){const _0x5c3b98=_0x2a89f2;if(!_0x3c9006||_0x3c9006===_0x5c3b98(0x1db))return _0x5c3b98(0x1e9);if(_0x3c9006===_0x5c3b98(0x1d1))return _0x5c3b98(0x1e8);return _0x5c3b98(0x1e9);}var HttpError=class extends Error{constructor(_0x226d5d){const _0x3a9d4d=_0x2a89f2;super(_0x226d5d),this['name']=_0x3a9d4d(0x1fa);}};function createResponseError(_0x3397dc,_0x134aa8,_0x13ef42){const _0x44422a=_0x2a89f2,_0x38ed50=_0x3397dc,_0x2ec1ad='['+(_0x134aa8?.[_0x44422a(0x210)]||_0x44422a(0x20a))+']\x20'+_0x38ed50,_0xe1f557=_0x13ef42?_0x13ef42['statusCode']+'\x20'+(_0x13ef42['errMsg']||''):_0x44422a(0x1ee),_0x3e00be=_0x13ef42?JSON[_0x44422a(0x1f6)](_0x13ef42[_0x44422a(0x205)]):_0x44422a(0x212),_0x599468=new HttpError(_0x2ec1ad+':\x20'+_0xe1f557+(_0x13ef42[_0x44422a(0x205)]?'\x20'+_0x3e00be:''));for(const _0x2bb94e of['request','options',_0x44422a(0x1d8),_0x44422a(0x205)])Object['defineProperty'](_0x599468,_0x2bb94e,{'get'(){const _0x1ad317=_0x44422a,_0x4e5733={};return _0x4e5733['request']=_0x3397dc,_0x4e5733[_0x1ad317(0x1c3)]=_0x134aa8,_0x4e5733['response']=_0x13ef42,_0x4e5733['data']=_0x13ef42['data'],_0x4e5733[_0x2bb94e];}});return _0x599468;}function normalizeError(_0x51bfea){const _0x352be3=_0x2a89f2;if(_0x51bfea instanceof Error)return _0x51bfea;return Object[_0x352be3(0x1d7)](new Error(_0x51bfea?.['errMsg']||_0x51bfea?.['message']||_0x352be3(0x1d5)),{'cause':_0x51bfea});}async function callRequestHooks(_0x74aa3f,_0xcec4ee){await _0xcec4ee['onRequest']?.({'options':_0xcec4ee,'resource':_0x74aa3f});}async function callRequestErrorHooks(_0x1f605f,_0x30be86,_0x22c4e7){await _0x30be86['onRequestError']?.({'options':_0x30be86,'resource':_0x1f605f,'error':_0x22c4e7});}async function callResponseHooks(_0x880e83,_0x1b6e77,_0x206c2f){await _0x1b6e77['onResponse']?.({'options':_0x1b6e77,'resource':_0x880e83,'response':_0x206c2f});}async function callResponseErrorHooks(_0x1b0717,_0x22311e,_0x817ee9){const _0x40384e=_0x2a89f2;await _0x22311e[_0x40384e(0x1c9)]?.({'options':_0x22311e,'resource':_0x1b0717,'response':_0x817ee9});}async function refineResponse(_0x4554bb,_0x231f1e){const _0xcf7351=_0x2a89f2;if(_0x231f1e[_0xcf7351(0x1dc)]===_0xcf7351(0x1db)||!_0x231f1e[_0xcf7351(0x1dc)])return{..._0x4554bb,'data':await parseJSONResponse(_0x4554bb[_0xcf7351(0x205)],_0x231f1e)};return _0x4554bb;}function parseJSONResponse(_0x518e21,_0x4eca49){const _0x45ac27=_0x2a89f2;if(typeof _0x518e21!=='string')return _0x518e21;if(_0x4eca49[_0x45ac27(0x1f7)])return _0x4eca49[_0x45ac27(0x1f7)](_0x518e21);return _0x518e21?JSON[_0x45ac27(0x215)](_0x518e21):null;}function isResponseError(_0x1040ee){const _0x25e8f4=_0x2a89f2,_0x2f3166='statusCode'in _0x1040ee?_0x1040ee[_0x25e8f4(0x1eb)]:void 0x0;return typeof _0x2f3166==='number'&&(_0x2f3166<0xc8||_0x2f3166>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x2a89f2(0x1ea),_0x2a89f2(0x20b),'DELETE',_0x2a89f2(0x20e)]);async function withRetry(_0x5474e3,_0x5e7dde){const _0xe77195=_0x2a89f2,_0x539131=resolveRetryCount(_0x5474e3);for(let _0x5d56eb=0x0;;_0x5d56eb++)try{return await _0x5e7dde();}catch(_0x267056){if(_0x5d56eb>=_0x539131||!shouldRetry(_0x267056,_0x5474e3))throw _0x267056;await sleep(_0x5474e3[_0xe77195(0x1f9)]??0x0,_0x5474e3['signal']);}}function resolveRetryCount(_0x5ab607){const _0x3880ea=_0x2a89f2,{retry:_0x3a5b7e}=_0x5ab607;if(_0x3a5b7e===![])return 0x0;if(typeof _0x3a5b7e==='number')return _0x3a5b7e>0x0?_0x3a5b7e:0x0;return isPayloadMethod(_0x5ab607[_0x3880ea(0x210)])?0x0:0x1;}function shouldRetry(_0x6d2bab,_0x492f01){const _0x1bf38b=_0x2a89f2;if(_0x492f01['signal']?.[_0x1bf38b(0x207)]||isAbortError(_0x6d2bab))return![];const _0x53a3db=_0x6d2bab?.[_0x1bf38b(0x1d8)]?.[_0x1bf38b(0x1eb)];if(typeof _0x53a3db!=='number')return!![];return(_0x492f01[_0x1bf38b(0x1dd)]??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x53a3db);}function isPayloadMethod(_0x2bbd90){const _0x19f123=_0x2a89f2;return!!_0x2bbd90&&PAYLOAD_METHODS[_0x19f123(0x1fd)](_0x2bbd90[_0x19f123(0x1e6)]());}function sleep(_0x5809b0,_0x4f9537){return new Promise((_0x4be4ef,_0x458335)=>{const _0x34d1b8=_0x4447;if(_0x4f9537?.[_0x34d1b8(0x207)]){_0x458335(_0x4f9537[_0x34d1b8(0x1e0)]);return;}if(!(_0x5809b0>0x0)){_0x4be4ef();return;}let _0x2bc96f=()=>{};const _0x51ba56=setTimeout(()=>{_0x2bc96f(),_0x4be4ef();},_0x5809b0);_0x2bc96f=onAbort(_0x4f9537,()=>{const _0x3819ab=_0x34d1b8;clearTimeout(_0x51ba56),_0x458335(_0x4f9537[_0x3819ab(0x1e0)]);});});}function buildURL(_0x206e4d,_0x5d5ff7){const _0x1bbfba=_0x2a89f2,_0x5bee0a=joinURL(_0x5d5ff7['baseURL'],_0x206e4d),_0x1ce55a=_0x5d5ff7['query']??{},_0x59a59b=Object[_0x1bbfba(0x1ec)](_0x1ce55a)['filter'](_0x1402e3=>_0x1ce55a[_0x1402e3]!==void 0x0)[_0x1bbfba(0x1c4)](_0x3c604b=>{const _0x668250=_0x1ce55a[_0x3c604b];return(Array['isArray'](_0x668250)?_0x668250:[_0x668250])['map'](_0x37240e=>encodeURIComponent(_0x3c604b)+'='+encodeURIComponent(String(_0x37240e)));})[_0x1bbfba(0x218)]('&');if(!_0x59a59b)return _0x5bee0a;return''+_0x5bee0a+(_0x5bee0a['includes']('?')?'&':'?')+_0x59a59b;}function joinURL(_0x1d9f00,_0x16a365){const _0x195e62=_0x2a89f2;if(!_0x1d9f00||isAbsoluteURL(_0x16a365))return _0x16a365;return _0x1d9f00[_0x195e62(0x1e4)](/\/+$/,'')+'/'+_0x16a365[_0x195e62(0x1e4)](/^\/+/,'');}function isAbsoluteURL(_0x415140){return/^[a-z][a-z\d+\-.]*:\/\//i['test'](_0x415140)||_0x415140['startsWith']('//');}function dispatchHttp(_0xc1e385,_0x5695e6,_0x4207e5){const _0x38e38c=buildURL(_0x5695e6,_0x4207e5);return withRetry(_0x4207e5,()=>attemptRequest(_0xc1e385,_0x5695e6,_0x38e38c,_0x4207e5));}function attemptRequest(_0xaebc87,_0x494710,_0x175ee6,_0xe82e7e){const _0x11f8e0=_0x2a89f2,_0x231f6c=!!_0xe82e7e[_0x11f8e0(0x1fe)];return new Promise((_0x564458,_0x3ae56f)=>{const _0x4a1024=_0x11f8e0;let _0x3f51a3=![];const _0x2e5c57=_0x3ef91f=>{if(_0x3f51a3)return;_0x3f51a3=!![],_0x3ef91f();},_0xc7242b=onAbort(_0xe82e7e['signal'],()=>{const _0x127b62=_0x4447;_0x2e5c57(()=>_0x3ae56f(_0xe82e7e[_0x127b62(0x1d0)][_0x127b62(0x1e0)]));}),_0x4fab32=_0x39b23f=>{_0xc7242b(),_0x2e5c57(_0x39b23f);};callRequestHooks(_0x494710,_0xe82e7e)[_0x4a1024(0x1f8)](()=>{if(_0x3f51a3)return;dispatch(_0xaebc87,_0x175ee6,_0xe82e7e,{'onSuccess':_0x8a49cd=>{const _0x50c6dd=_0x4447;Promise['resolve']()[_0x50c6dd(0x1f8)](()=>refineResponse(_0x8a49cd,_0xe82e7e))['then'](async _0x11e2c9=>{const _0x290a7a=_0x50c6dd;if(isResponseError(_0x8a49cd)){await callResponseErrorHooks(_0x494710,_0xe82e7e,_0x11e2c9);if(!_0xe82e7e[_0x290a7a(0x1f3)])throw createResponseError(_0x494710,_0xe82e7e,_0x11e2c9);}else await callResponseHooks(_0x494710,_0xe82e7e,_0x11e2c9);_0x4fab32(()=>_0x564458(_0x231f6c?_0x11e2c9:_0x11e2c9[_0x290a7a(0x205)]));})[_0x50c6dd(0x217)](_0x51b52c=>_0x4fab32(()=>_0x3ae56f(_0x51b52c)));},'onFail':_0x415b49=>{const _0x2ae480=_0x4447;Promise['resolve']()[_0x2ae480(0x1f8)](async()=>{const _0x1b9b47=normalizeError(_0x415b49);if(!isAbortError(_0x1b9b47))await callRequestErrorHooks(_0x494710,_0xe82e7e,_0x1b9b47);throw _0x1b9b47;})['catch'](_0x3792d8=>_0x4fab32(()=>_0x3ae56f(_0x3792d8)));}});})[_0x4a1024(0x217)](async _0x48154d=>{const _0x421433=normalizeError(_0x48154d);await callRequestErrorHooks(_0x494710,_0xe82e7e,_0x421433),_0x4fab32(()=>_0x3ae56f(_0x421433));});});}const _0x2fd224={};_0x2fd224['method']='GET',_0x2fd224['responseType']='json';const defaultConfig=_0x2fd224;function createHttp(_0x209740={}){const _0x5dfeff=_0x2a89f2,_0x464b1e=(_0x562183,_0x1ec768)=>{const _0x130bf6=_0x4447;return dispatchHttp(_0x130bf6(0x211),_0x562183,mergeOptions(defaultConfig,_0x209740,_0x1ec768));},_0x54f92e=(_0x13f7a2,_0x2bd065)=>{const _0x5e028b=_0x4447,_0xf2100={};return _0xf2100['method']=_0x5e028b(0x1ea),dispatchHttp('upload',_0x13f7a2,mergeOptions(defaultConfig,_0x209740,_0x2bd065,_0xf2100));},_0x330d2d=(_0x33f8cb,_0x30f560)=>{const _0xe541dc=_0x4447,_0x1fa6e0={};return _0x1fa6e0['method']='GET',dispatchHttp(_0xe541dc(0x1e7),_0x33f8cb,mergeOptions(defaultConfig,_0x209740,_0x30f560,_0x1fa6e0));},_0x541c8a=_0x3856c5=>createHttp(mergeOptions(_0x209740,_0x3856c5)),_0x18289e={};return _0x18289e[_0x5dfeff(0x211)]=_0x464b1e,_0x18289e['upload']=_0x54f92e,_0x18289e['download']=_0x330d2d,_0x18289e['create']=_0x541c8a,_0x18289e;}function _0x4447(_0x52cdd1,_0x5a05cf){_0x52cdd1=_0x52cdd1-0x1c2;const _0x38cf5d=_0x38cf();let _0x44476b=_0x38cf5d[_0x52cdd1];return _0x44476b;}const http=createHttp(),_0x5a410f={};_0x5a410f[_0x2a89f2(0x1fc)]=!![],_0x5a410f[_0x2a89f2(0x219)]=function(){return createHttp;},Object[_0x2a89f2(0x204)](exports,_0x2a89f2(0x1f4),_0x5a410f);const _0x227556={};function _0x38cf(){const _0x187763=['then','retryDelay','HttpError','throwIfAborted','enumerable','has','raw','onFail','filePath','2788758rOBcme','listeners','108HODkrx','defineProperty','data','577BRnAzs','aborted','enableHttpDNS','abort','GET','PUT','enableHttp2','emit','PATCH','tempFilePath','method','request','<no\x20response\x20body>','enableCache','2913520jnECEA','parse','timeout','catch','join','get','onSuccess','AbortError','onHeadersReceived','options','flatMap','5791230YdxtGW','onProgressUpdate','call','forceCellularNetwork','onResponseError','7icnivw','fail','The\x20operation\x20was\x20aborted','sslVerify','firstIpv4','enableChunked','signal','arrayBuffer','header','headers','enableQuic','HTTP\x20request\x20failed','files','assign','response','3415482FkINWx','3390584UXNTLt','json','responseType','retryStatusCodes','entries','onabort','reason','dataType','5OlwxGZ','file','replace','onRequestError','toUpperCase','download','arraybuffer','text','POST','statusCode','keys','query','<no\x20response>','slice','name','fileType','onResponse','ignoreResponseError','createHttp','1717194dWHZaR','stringify','parseResponse'];_0x38cf=function(){return _0x187763;};return _0x38cf();}_0x227556['enumerable']=!![],_0x227556['get']=function(){return createHttpAborter;},Object[_0x2a89f2(0x204)](exports,'createHttpAborter',_0x227556);const _0x5ab8c3={};_0x5ab8c3['enumerable']=!![],_0x5ab8c3['get']=function(){return http;},Object[_0x2a89f2(0x204)](exports,'http',_0x5ab8c3);
|
package/dist/oiyo.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.
|
|
2
|
+
* @oiyo/framework v0.4.7
|
|
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-Dz2nYhKn.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.7
|
|
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-DaPBMr2_.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.7
|
|
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-DaPBMr2_.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.7
|
|
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-Cfyt1TAC.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};
|