@oiyo/framework 0.4.6 → 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-DQmyoOzM.d.cts → index-DaPBMr2_.d.cts} +1 -1
- package/dist/{index-DQmyoOzM.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-CASn7hkX.cjs +0 -7
- package/dist/oiyo-DxaznqPn.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-CASn7hkX.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
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);
|
package/dist/oiyo-DxaznqPn.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
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};
|