@private.me/xbind 1.2.16 → 1.3.0
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/README.md +124 -8
- package/dist-standalone/_deps/crypto/base64.js +198 -86
- package/dist-standalone/_deps/shared/cjs/errors.js +232 -539
- package/dist-standalone/_deps/shared/cjs/index.js +88 -442
- package/dist-standalone/_deps/shared/cjs/types.js +61 -374
- package/dist-standalone/_deps/shared/errors.d.ts +7 -1
- package/dist-standalone/_deps/shared/errors.d.ts.map +1 -1
- package/dist-standalone/_deps/shared/errors.js +231 -161
- package/dist-standalone/_deps/shared/errors.js.map +1 -1
- package/dist-standalone/_deps/shared/index.js +54 -55
- package/dist-standalone/_deps/shared/types.js +60 -58
- package/dist-standalone/_deps/ux-helpers/cjs/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.js +1 -1
- package/dist-standalone/_deps/ux-helpers/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/search.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/index.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/types.js +1 -1
- package/dist-standalone/_deps/xregistry/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/index.js +1 -1
- package/dist-standalone/_deps/xregistry/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/types.js +1 -1
- package/dist-standalone/cli/setup.d.ts +52 -0
- package/dist-standalone/cli/setup.js +515 -0
- package/dist-standalone/cli/types.d.ts +79 -0
- package/dist-standalone/cli/types.js +27 -0
- package/dist-standalone/cli/xbind.d.ts +20 -0
- package/dist-standalone/cli/xbind.js +149 -0
- package/package.json +2 -2
- package/share1.dat +0 -0
|
@@ -1,56 +1,77 @@
|
|
|
1
|
-
(function (
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
1
|
+
(function (_0x10caa0, _0x494e1e) {
|
|
2
|
+
const a10_0x1f2d9d = {
|
|
3
|
+
_0x5577e7: 0x1e8,
|
|
4
|
+
_0x33d6cc: 0x1ec,
|
|
5
|
+
_0x20ad20: 0x1e6,
|
|
6
|
+
_0x218714: 0x1e9,
|
|
7
|
+
_0x53e343: 0x1ee,
|
|
8
|
+
_0xc034e7: 0x1ed,
|
|
9
|
+
_0xd299d5: 0x1ea
|
|
10
|
+
}, _0x354749 = a10_0x1cd0, _0x2b58b9 = _0x10caa0();
|
|
11
11
|
while (!![]) {
|
|
12
12
|
try {
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
13
|
+
const _0x59e402 = parseInt(_0x354749(0x1e5)) / 0x1 * (parseInt(_0x354749(0x1ef)) / 0x2) + parseInt(_0x354749(a10_0x1f2d9d._0x5577e7)) / 0x3 * (-parseInt(_0x354749(0x1eb)) / 0x4) + parseInt(_0x354749(0x1e4)) / 0x5 + -parseInt(_0x354749(a10_0x1f2d9d._0x33d6cc)) / 0x6 * (-parseInt(_0x354749(a10_0x1f2d9d._0x20ad20)) / 0x7) + parseInt(_0x354749(0x1e3)) / 0x8 * (-parseInt(_0x354749(a10_0x1f2d9d._0x218714)) / 0x9) + parseInt(_0x354749(a10_0x1f2d9d._0x53e343)) / 0xa * (parseInt(_0x354749(0x1e7)) / 0xb) + -parseInt(_0x354749(a10_0x1f2d9d._0xc034e7)) / 0xc * (parseInt(_0x354749(a10_0x1f2d9d._0xd299d5)) / 0xd);
|
|
14
|
+
if (_0x59e402 === _0x494e1e)
|
|
15
15
|
break;
|
|
16
16
|
else
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
_0x2b58b9['push'](_0x2b58b9['shift']());
|
|
18
|
+
} catch (_0x51c0b6) {
|
|
19
|
+
_0x2b58b9['push'](_0x2b58b9['shift']());
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
}(
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
}(a10_0x371b, 0xa1210));
|
|
23
|
+
export function ok(_0x41809b) {
|
|
24
|
+
return {
|
|
25
|
+
'ok': !![],
|
|
26
|
+
'value': _0x41809b
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function a10_0x1cd0(_0xb7bdca, _0xb855ed) {
|
|
30
|
+
_0xb7bdca = _0xb7bdca - 0x1e3;
|
|
31
|
+
const _0x371bc3 = a10_0x371b();
|
|
32
|
+
let _0x1cd0fb = _0x371bc3[_0xb7bdca];
|
|
33
|
+
if (a10_0x1cd0['ubqiVU'] === undefined) {
|
|
34
|
+
var _0x82891f = function (_0x40ab98) {
|
|
35
|
+
const _0x161ed7 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
36
|
+
let _0x5d5a4d = '', _0x52b397 = '';
|
|
37
|
+
for (let _0x3a13f9 = 0x0, _0x187336, _0x1cf1ac, _0xd29749 = 0x0; _0x1cf1ac = _0x40ab98['charAt'](_0xd29749++); ~_0x1cf1ac && (_0x187336 = _0x3a13f9 % 0x4 ? _0x187336 * 0x40 + _0x1cf1ac : _0x1cf1ac, _0x3a13f9++ % 0x4) ? _0x5d5a4d += String['fromCharCode'](0xff & _0x187336 >> (-0x2 * _0x3a13f9 & 0x6)) : 0x0) {
|
|
38
|
+
_0x1cf1ac = _0x161ed7['indexOf'](_0x1cf1ac);
|
|
33
39
|
}
|
|
34
|
-
for (let
|
|
35
|
-
|
|
40
|
+
for (let _0x13cfd5 = 0x0, _0x256aad = _0x5d5a4d['length']; _0x13cfd5 < _0x256aad; _0x13cfd5++) {
|
|
41
|
+
_0x52b397 += '%' + ('00' + _0x5d5a4d['charCodeAt'](_0x13cfd5)['toString'](0x10))['slice'](-0x2);
|
|
36
42
|
}
|
|
37
|
-
return decodeURIComponent(
|
|
43
|
+
return decodeURIComponent(_0x52b397);
|
|
38
44
|
};
|
|
39
|
-
|
|
45
|
+
a10_0x1cd0['GqULvh'] = _0x82891f, a10_0x1cd0['JlHqAo'] = {}, a10_0x1cd0['ubqiVU'] = !![];
|
|
40
46
|
}
|
|
41
|
-
const
|
|
42
|
-
return !
|
|
47
|
+
const _0x212f32 = _0x371bc3[0x0], _0x27b44b = _0xb7bdca + _0x212f32, _0x1a8f37 = a10_0x1cd0['JlHqAo'][_0x27b44b];
|
|
48
|
+
return !_0x1a8f37 ? (_0x1cd0fb = a10_0x1cd0['GqULvh'](_0x1cd0fb), a10_0x1cd0['JlHqAo'][_0x27b44b] = _0x1cd0fb) : _0x1cd0fb = _0x1a8f37, _0x1cd0fb;
|
|
43
49
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
'
|
|
50
|
+
function a10_0x371b() {
|
|
51
|
+
const _0x2b18ab = [
|
|
52
|
+
'nfvhy1rlzG',
|
|
53
|
+
'nZyYmti5mermyxDrsW',
|
|
54
|
+
'mZC2ntzTv1brquK',
|
|
55
|
+
'nteWyMHxtuHb',
|
|
56
|
+
'nfj2qLbNrq',
|
|
57
|
+
'mZC5mdrgD0nQq2S',
|
|
58
|
+
'ntG0mJa5nuXMDLjYCa',
|
|
59
|
+
'ntuWnZaYtLnwANDX',
|
|
60
|
+
'n3nzy3vODq',
|
|
61
|
+
'mJa2ntaZBMTAC3DK',
|
|
62
|
+
'mtu3ndiYow1sz3njCW',
|
|
63
|
+
'mtK4ow9jEM9XAa',
|
|
64
|
+
'otm4nNz3D0HPCW'
|
|
65
|
+
];
|
|
66
|
+
a10_0x371b = function () {
|
|
67
|
+
return _0x2b18ab;
|
|
48
68
|
};
|
|
69
|
+
return a10_0x371b();
|
|
49
70
|
}
|
|
50
|
-
export function err(
|
|
71
|
+
export function err(_0x13e4d4) {
|
|
51
72
|
return {
|
|
52
73
|
'ok': ![],
|
|
53
|
-
'error':
|
|
74
|
+
'error': _0x13e4d4
|
|
54
75
|
};
|
|
55
76
|
}
|
|
56
77
|
export const TLV_TYPE = {
|
|
@@ -67,23 +88,4 @@ export const TLV_TYPE = {
|
|
|
67
88
|
'CONTENT_TYPE': 0xb,
|
|
68
89
|
'MESSAGE_SUBJECT': 0xc,
|
|
69
90
|
'SENDER_EMAIL': 0xd
|
|
70
|
-
};
|
|
71
|
-
function a10_0x4a04() {
|
|
72
|
-
const _0x5da42b = [
|
|
73
|
-
'mta1ntGXme12s2rzCa',
|
|
74
|
-
'nJiXmJeYyvDsugn0',
|
|
75
|
-
'oxPyuxLXvG',
|
|
76
|
-
'mtG3mgTsqKXhBG',
|
|
77
|
-
'ntuZmK1qyMnjrG',
|
|
78
|
-
'ofb5Eg1SvG',
|
|
79
|
-
'mti5nZGXm3DYCwf5sG',
|
|
80
|
-
'ndiYmdKWzLPXyurQ',
|
|
81
|
-
'ndi0mdy4sur5uufh',
|
|
82
|
-
'nKX1ALnIqG',
|
|
83
|
-
'mJm3nduZme9ytMz1yW'
|
|
84
|
-
];
|
|
85
|
-
a10_0x4a04 = function () {
|
|
86
|
-
return _0x5da42b;
|
|
87
|
-
};
|
|
88
|
-
return a10_0x4a04();
|
|
89
|
-
}
|
|
91
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ERROR_DETAILS']=void 0x0,exports['createDetailedError']=createDetailedError,exports['formatErrorForUser']=formatErrorForUser,exports['formatErrorForLog']=formatErrorForLog,exports['isACIError']=isACIError,exports['toACIError']=toACIError,exports['formatErrorStructured']=formatErrorStructured;function createDetailedError(
|
|
1
|
+
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ERROR_DETAILS']=void 0x0,exports['createDetailedError']=createDetailedError,exports['formatErrorForUser']=formatErrorForUser,exports['formatErrorForLog']=formatErrorForLog,exports['isACIError']=isACIError,exports['toACIError']=toACIError,exports['formatErrorStructured']=formatErrorStructured;function createDetailedError(_0x52ab98,_0x91fe3d,_0x3f9ef7){return{'code':_0x52ab98,'message':_0x91fe3d,'hint':_0x3f9ef7?.['hint'],'suggested_action':_0x3f9ef7?.['suggested_action'],'field':_0x3f9ef7?.['field'],'docs':_0x3f9ef7?.['docs'],'severity':_0x3f9ef7?.['severity']};}function formatErrorForUser(_0x5a0485){const _0x3183b0=[_0x5a0485['message']];return _0x5a0485['field']&&_0x3183b0['push']('Field:\x20'+_0x5a0485['field']),_0x5a0485['hint']&&_0x3183b0['push']('Hint:\x20'+_0x5a0485['hint']),_0x5a0485['docs']&&_0x3183b0['push']('Docs:\x20'+_0x5a0485['docs']),_0x3183b0['join']('\x0a');}function formatErrorForLog(_0x4ddd84){const _0x318be1=['['+_0x4ddd84['code']+']\x20'+_0x4ddd84['message']];return _0x4ddd84['field']&&_0x318be1['push']('field='+_0x4ddd84['field']),_0x4ddd84['hint']&&_0x318be1['push']('hint=\x22'+_0x4ddd84['hint']+'\x22'),_0x4ddd84['docs']&&_0x318be1['push']('docs='+_0x4ddd84['docs']),_0x318be1['join']('\x20|\x20');}function isACIError(_0x1e4726){if(typeof _0x1e4726!=='object'||_0x1e4726===null)return![];const _0x1472dc=_0x1e4726;return typeof _0x1472dc['code']==='string'&&typeof _0x1472dc['message']==='string'&&(_0x1472dc['hint']===undefined||typeof _0x1472dc['hint']==='string')&&(_0x1472dc['field']===undefined||typeof _0x1472dc['field']==='string')&&(_0x1472dc['docs']===undefined||typeof _0x1472dc['docs']==='string');}function toACIError(_0x5223a5){if(isACIError(_0x5223a5))return _0x5223a5;if(_0x5223a5 instanceof Error)return{'code':'INTERNAL_ERROR','message':_0x5223a5['message'],'hint':'An\x20unexpected\x20error\x20occurred'};return{'code':'UNKNOWN_ERROR','message':String(_0x5223a5),'hint':'An\x20unexpected\x20error\x20occurred'};}function formatErrorStructured(_0x134559){const _0x2d5fd9=['Error:\x20'+_0x134559['message'],'Code:\x20'+_0x134559['code']];if(_0x134559['severity'])_0x2d5fd9['push']('Severity:\x20'+_0x134559['severity']);if(_0x134559['field'])_0x2d5fd9['push']('Field:\x20'+_0x134559['field']);if(_0x134559['hint'])_0x2d5fd9['push']('Hint:\x20'+_0x134559['hint']);if(_0x134559['suggested_action'])_0x2d5fd9['push']('Action:\x20'+_0x134559['suggested_action']);if(_0x134559['docs'])_0x2d5fd9['push']('Docs:\x20'+_0x134559['docs']);const _0x3bf0a5=_0x2d5fd9['join']('\x0a'),_0x4af0fb=['error',_0x134559['code'],_0x134559['message']];if(_0x134559['severity'])_0x4af0fb['push']('severity='+_0x134559['severity']);if(_0x134559['field'])_0x4af0fb['push']('field='+_0x134559['field']);if(_0x134559['hint']){const _0xbc77d7=_0x134559['hint']['replace'](/"/g,'\x5c\x22');_0x4af0fb['push']('hint=\x22'+_0xbc77d7+'\x22');}if(_0x134559['suggested_action']){const _0x4843ce=_0x134559['suggested_action']['replace'](/"/g,'\x5c\x22');_0x4af0fb['push']('action=\x22'+_0x4843ce+'\x22');}if(_0x134559['docs'])_0x4af0fb['push']('docs='+_0x134559['docs']);const _0x15ca9f=_0x4af0fb['join']('\x20|\x20'),_0x5b1571={'code':_0x134559['code'],'message':_0x134559['message']};if(_0x134559['severity'])_0x5b1571['severity']=_0x134559['severity'];if(_0x134559['field'])_0x5b1571['field']=_0x134559['field'];if(_0x134559['hint'])_0x5b1571['hint']=_0x134559['hint'];if(_0x134559['suggested_action'])_0x5b1571['suggested_action']=_0x134559['suggested_action'];if(_0x134559['docs'])_0x5b1571['docs']=_0x134559['docs'];const _0x53be69=JSON['stringify'](_0x5b1571),_0x41c670=['**Error:**\x20'+_0x134559['message'],'**Code:**\x20`'+_0x134559['code']+'`'];if(_0x134559['severity'])_0x41c670['push']('**Severity:**\x20'+_0x134559['severity']);if(_0x134559['field'])_0x41c670['push']('**Field:**\x20`'+_0x134559['field']+'`');if(_0x134559['hint'])_0x41c670['push']('**Hint:**\x20'+_0x134559['hint']);if(_0x134559['suggested_action'])_0x41c670['push']('**Action:**\x20'+_0x134559['suggested_action']);if(_0x134559['docs'])_0x41c670['push']('**Docs:**\x20['+_0x134559['docs']+']('+_0x134559['docs']+')');const _0x56d398=_0x41c670['join']('\x0a\x0a');return{..._0x134559,'formats':{'multiline':_0x3bf0a5,'singleline':_0x15ca9f,'json':_0x53be69,'markdown':_0x56d398}};}exports['ERROR_DETAILS']={};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['paginate']=paginate,exports['createPaginationMetadata']=createPaginationMetadata;const DEFAULT_LIMIT=0x32,MAX_LIMIT=0x64;function paginate(
|
|
1
|
+
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['paginate']=paginate,exports['createPaginationMetadata']=createPaginationMetadata;const DEFAULT_LIMIT=0x32,MAX_LIMIT=0x64;function paginate(_0x3998f1,_0x4402fc){const _0x5d7689=Math['max'](0x1,_0x4402fc?.['page']??0x1),_0x562d80=Math['min'](Math['max'](0x1,_0x4402fc?.['limit']??DEFAULT_LIMIT),MAX_LIMIT),_0x47533b=_0x3998f1['length'],_0x33102b=Math['max'](0x1,Math['ceil'](_0x47533b/_0x562d80)),_0xdc5a90=Math['min'](_0x5d7689,_0x33102b),_0x45c816=(_0xdc5a90-0x1)*_0x562d80,_0xb1865e=Math['min'](_0x45c816+_0x562d80,_0x47533b),_0x21daf1=_0x3998f1['slice'](_0x45c816,_0xb1865e);return{'data':_0x21daf1,'pagination':{'page':_0xdc5a90,'limit':_0x562d80,'total':_0x47533b,'totalPages':_0x33102b,'hasNext':_0xdc5a90<_0x33102b,'hasPrev':_0xdc5a90>0x1}};}function createPaginationMetadata(_0x19d7b6,_0xd22390){const _0x43c169=Math['max'](0x1,_0xd22390?.['page']??0x1),_0x124a33=Math['min'](Math['max'](0x1,_0xd22390?.['limit']??DEFAULT_LIMIT),MAX_LIMIT),_0x417d01=Math['max'](0x1,Math['ceil'](_0x19d7b6/_0x124a33)),_0x37c14a=Math['min'](_0x43c169,_0x417d01);return{'page':_0x37c14a,'limit':_0x124a33,'total':_0x19d7b6,'totalPages':_0x417d01,'hasNext':_0x37c14a<_0x417d01,'hasPrev':_0x37c14a>0x1};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ProgressReporter']=void 0x0,exports['createStagedProgress']=createStagedProgress;class ProgressReporter{['callback'];['lastPercent']=0x0;constructor(
|
|
1
|
+
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ProgressReporter']=void 0x0,exports['createStagedProgress']=createStagedProgress;class ProgressReporter{['callback'];['lastPercent']=0x0;constructor(_0x309348){this['callback']=_0x309348;}['report'](_0x295d3e,_0x534827){const _0x1476c2=_0x534827!==undefined?Math['max'](0x0,Math['min'](0x64,_0x534827)):undefined;_0x1476c2!==undefined&&(this['lastPercent']=_0x1476c2),this['callback']&&this['callback'](_0x295d3e,_0x1476c2);}['start'](_0x4b819c){this['report'](_0x4b819c,0x0);}['update'](_0x10c0df,_0x2d7643){this['report'](_0x10c0df,_0x2d7643);}['complete'](){this['report']('Complete',0x64);}['getLastPercent'](){return this['lastPercent'];}}exports['ProgressReporter']=ProgressReporter;function createStagedProgress(_0x571143,_0x539f97){const _0x83ed6e=new ProgressReporter(_0x539f97);let _0x278b50=0x0;const _0x470882=_0x571143['length']>0x0?0x64/_0x571143['length']:0x64;return{'start':()=>{_0x278b50=0x0,_0x83ed6e['start'](_0x571143[0x0]??'Starting...');},'nextStage':()=>{_0x278b50=Math['min'](_0x278b50+0x1,_0x571143['length']-0x1);const _0x349a97=Math['round'](_0x278b50*_0x470882);_0x83ed6e['update'](_0x571143[_0x278b50]??'Processing...',_0x349a97);},'complete':()=>{_0x278b50=_0x571143['length'],_0x83ed6e['complete']();},'getCurrentStage':()=>{return _0x571143[_0x278b50]??'';},'getProgress':()=>{return Math['round'](_0x278b50*_0x470882);}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['search']=search;function search(
|
|
1
|
+
'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['search']=search;function search(_0x56a4c0,_0x53e5ca){const {query:_0x1fec80,fields:_0x373f08,fuzzy:fuzzy=!![],limit:_0x59d6a6}=_0x53e5ca;if(!_0x1fec80['trim']())return _0x59d6a6!==undefined?_0x56a4c0['slice'](0x0,_0x59d6a6):_0x56a4c0;const _0x2597fd=fuzzy?_0x1fec80['toLowerCase']():_0x1fec80,_0x15ccd3=_0x56a4c0['filter'](_0x44e9ec=>{if(_0x373f08&&_0x373f08['length']>0x0)return _0x373f08['some'](_0x42cbfa=>{const _0x2d203b=getNestedValue(_0x44e9ec,_0x42cbfa);if(_0x2d203b===null||_0x2d203b===undefined)return![];return matchesQuery(String(_0x2d203b),_0x2597fd,fuzzy);});return searchAllFields(_0x44e9ec,_0x2597fd,fuzzy);});return _0x59d6a6!==undefined?_0x15ccd3['slice'](0x0,_0x59d6a6):_0x15ccd3;}function getNestedValue(_0x3d698d,_0x1767a1){const _0x3f1c75=_0x1767a1['split']('.');let _0x31f005=_0x3d698d;for(const _0x397947 of _0x3f1c75){if(_0x31f005===null||_0x31f005===undefined)return null;if(typeof _0x31f005!=='object')return null;_0x31f005=_0x31f005[_0x397947];}return _0x31f005;}function matchesQuery(_0x4bedca,_0x4623c9,_0x5a40c7){if(_0x5a40c7)return _0x4bedca['toLowerCase']()['includes'](_0x4623c9);return _0x4bedca['includes'](_0x4623c9);}function searchAllFields(_0x4ffb88,_0x3f2610,_0x36daaa){if(_0x4ffb88===null||_0x4ffb88===undefined)return![];if(typeof _0x4ffb88==='string')return matchesQuery(_0x4ffb88,_0x3f2610,_0x36daaa);if(typeof _0x4ffb88==='number'||typeof _0x4ffb88==='boolean')return matchesQuery(String(_0x4ffb88),_0x3f2610,_0x36daaa);if(Array['isArray'](_0x4ffb88))return _0x4ffb88['some'](_0x4995c9=>searchAllFields(_0x4995c9,_0x3f2610,_0x36daaa));if(typeof _0x4ffb88==='object')return Object['values'](_0x4ffb88)['some'](_0x30205c=>searchAllFields(_0x30205c,_0x3f2610,_0x36daaa));return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function createDetailedError(
|
|
1
|
+
export function createDetailedError(_0x46aacb,_0x2eda03,_0x4c31a9){return{'code':_0x46aacb,'message':_0x2eda03,'hint':_0x4c31a9?.['hint'],'suggested_action':_0x4c31a9?.['suggested_action'],'field':_0x4c31a9?.['field'],'docs':_0x4c31a9?.['docs'],'severity':_0x4c31a9?.['severity']};}export function formatErrorForUser(_0x58ef37){const _0x27fdd7=[_0x58ef37['message']];return _0x58ef37['field']&&_0x27fdd7['push']('Field:\x20'+_0x58ef37['field']),_0x58ef37['hint']&&_0x27fdd7['push']('Hint:\x20'+_0x58ef37['hint']),_0x58ef37['docs']&&_0x27fdd7['push']('Docs:\x20'+_0x58ef37['docs']),_0x27fdd7['join']('\x0a');}export function formatErrorForLog(_0x1c294e){const _0x526a87=['['+_0x1c294e['code']+']\x20'+_0x1c294e['message']];return _0x1c294e['field']&&_0x526a87['push']('field='+_0x1c294e['field']),_0x1c294e['hint']&&_0x526a87['push']('hint=\x22'+_0x1c294e['hint']+'\x22'),_0x1c294e['docs']&&_0x526a87['push']('docs='+_0x1c294e['docs']),_0x526a87['join']('\x20|\x20');}export function isACIError(_0x2b8ac6){if(typeof _0x2b8ac6!=='object'||_0x2b8ac6===null)return![];const _0x452bb2=_0x2b8ac6;return typeof _0x452bb2['code']==='string'&&typeof _0x452bb2['message']==='string'&&(_0x452bb2['hint']===undefined||typeof _0x452bb2['hint']==='string')&&(_0x452bb2['field']===undefined||typeof _0x452bb2['field']==='string')&&(_0x452bb2['docs']===undefined||typeof _0x452bb2['docs']==='string');}export function toACIError(_0x16f82d){if(isACIError(_0x16f82d))return _0x16f82d;if(_0x16f82d instanceof Error)return{'code':'INTERNAL_ERROR','message':_0x16f82d['message'],'hint':'An\x20unexpected\x20error\x20occurred'};return{'code':'UNKNOWN_ERROR','message':String(_0x16f82d),'hint':'An\x20unexpected\x20error\x20occurred'};}export function formatErrorStructured(_0x47fdab){const _0x457967=['Error:\x20'+_0x47fdab['message'],'Code:\x20'+_0x47fdab['code']];if(_0x47fdab['severity'])_0x457967['push']('Severity:\x20'+_0x47fdab['severity']);if(_0x47fdab['field'])_0x457967['push']('Field:\x20'+_0x47fdab['field']);if(_0x47fdab['hint'])_0x457967['push']('Hint:\x20'+_0x47fdab['hint']);if(_0x47fdab['suggested_action'])_0x457967['push']('Action:\x20'+_0x47fdab['suggested_action']);if(_0x47fdab['docs'])_0x457967['push']('Docs:\x20'+_0x47fdab['docs']);const _0x4dc2a3=_0x457967['join']('\x0a'),_0x1b1ddc=['error',_0x47fdab['code'],_0x47fdab['message']];if(_0x47fdab['severity'])_0x1b1ddc['push']('severity='+_0x47fdab['severity']);if(_0x47fdab['field'])_0x1b1ddc['push']('field='+_0x47fdab['field']);if(_0x47fdab['hint']){const _0x330cf6=_0x47fdab['hint']['replace'](/"/g,'\x5c\x22');_0x1b1ddc['push']('hint=\x22'+_0x330cf6+'\x22');}if(_0x47fdab['suggested_action']){const _0x20d7cc=_0x47fdab['suggested_action']['replace'](/"/g,'\x5c\x22');_0x1b1ddc['push']('action=\x22'+_0x20d7cc+'\x22');}if(_0x47fdab['docs'])_0x1b1ddc['push']('docs='+_0x47fdab['docs']);const _0x2886c8=_0x1b1ddc['join']('\x20|\x20'),_0x5c0f1e={'code':_0x47fdab['code'],'message':_0x47fdab['message']};if(_0x47fdab['severity'])_0x5c0f1e['severity']=_0x47fdab['severity'];if(_0x47fdab['field'])_0x5c0f1e['field']=_0x47fdab['field'];if(_0x47fdab['hint'])_0x5c0f1e['hint']=_0x47fdab['hint'];if(_0x47fdab['suggested_action'])_0x5c0f1e['suggested_action']=_0x47fdab['suggested_action'];if(_0x47fdab['docs'])_0x5c0f1e['docs']=_0x47fdab['docs'];const _0x12b1d5=JSON['stringify'](_0x5c0f1e),_0x5b8030=['**Error:**\x20'+_0x47fdab['message'],'**Code:**\x20`'+_0x47fdab['code']+'`'];if(_0x47fdab['severity'])_0x5b8030['push']('**Severity:**\x20'+_0x47fdab['severity']);if(_0x47fdab['field'])_0x5b8030['push']('**Field:**\x20`'+_0x47fdab['field']+'`');if(_0x47fdab['hint'])_0x5b8030['push']('**Hint:**\x20'+_0x47fdab['hint']);if(_0x47fdab['suggested_action'])_0x5b8030['push']('**Action:**\x20'+_0x47fdab['suggested_action']);if(_0x47fdab['docs'])_0x5b8030['push']('**Docs:**\x20['+_0x47fdab['docs']+']('+_0x47fdab['docs']+')');const _0x1b6fbd=_0x5b8030['join']('\x0a\x0a');return{..._0x47fdab,'formats':{'multiline':_0x4dc2a3,'singleline':_0x2886c8,'json':_0x12b1d5,'markdown':_0x1b6fbd}};}export const ERROR_DETAILS={};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const DEFAULT_LIMIT=0x32,MAX_LIMIT=0x64;export function paginate(
|
|
1
|
+
const DEFAULT_LIMIT=0x32,MAX_LIMIT=0x64;export function paginate(_0x3453ae,_0x1923a5){const _0x27ee16=Math['max'](0x1,_0x1923a5?.['page']??0x1),_0x167a57=Math['min'](Math['max'](0x1,_0x1923a5?.['limit']??DEFAULT_LIMIT),MAX_LIMIT),_0x51c9a9=_0x3453ae['length'],_0x5d6c3a=Math['max'](0x1,Math['ceil'](_0x51c9a9/_0x167a57)),_0x5ef82a=Math['min'](_0x27ee16,_0x5d6c3a),_0x46b294=(_0x5ef82a-0x1)*_0x167a57,_0x53e3be=Math['min'](_0x46b294+_0x167a57,_0x51c9a9),_0xe65582=_0x3453ae['slice'](_0x46b294,_0x53e3be);return{'data':_0xe65582,'pagination':{'page':_0x5ef82a,'limit':_0x167a57,'total':_0x51c9a9,'totalPages':_0x5d6c3a,'hasNext':_0x5ef82a<_0x5d6c3a,'hasPrev':_0x5ef82a>0x1}};}export function createPaginationMetadata(_0x4acbf3,_0x28629b){const _0x2398de=Math['max'](0x1,_0x28629b?.['page']??0x1),_0x42c693=Math['min'](Math['max'](0x1,_0x28629b?.['limit']??DEFAULT_LIMIT),MAX_LIMIT),_0x2d1ee8=Math['max'](0x1,Math['ceil'](_0x4acbf3/_0x42c693)),_0x4819f0=Math['min'](_0x2398de,_0x2d1ee8);return{'page':_0x4819f0,'limit':_0x42c693,'total':_0x4acbf3,'totalPages':_0x2d1ee8,'hasNext':_0x4819f0<_0x2d1ee8,'hasPrev':_0x4819f0>0x1};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export class ProgressReporter{['callback'];['lastPercent']=0x0;constructor(
|
|
1
|
+
export class ProgressReporter{['callback'];['lastPercent']=0x0;constructor(_0x1918f9){this['callback']=_0x1918f9;}['report'](_0x558049,_0xac7f48){const _0x2d4566=_0xac7f48!==undefined?Math['max'](0x0,Math['min'](0x64,_0xac7f48)):undefined;_0x2d4566!==undefined&&(this['lastPercent']=_0x2d4566),this['callback']&&this['callback'](_0x558049,_0x2d4566);}['start'](_0xa7fa3e){this['report'](_0xa7fa3e,0x0);}['update'](_0xcf2448,_0x9989df){this['report'](_0xcf2448,_0x9989df);}['complete'](){this['report']('Complete',0x64);}['getLastPercent'](){return this['lastPercent'];}}export function createStagedProgress(_0x33b5b0,_0x2054be){const _0x2fe1ff=new ProgressReporter(_0x2054be);let _0x5948a8=0x0;const _0x3edf92=_0x33b5b0['length']>0x0?0x64/_0x33b5b0['length']:0x64;return{'start':()=>{_0x5948a8=0x0,_0x2fe1ff['start'](_0x33b5b0[0x0]??'Starting...');},'nextStage':()=>{_0x5948a8=Math['min'](_0x5948a8+0x1,_0x33b5b0['length']-0x1);const _0x58e8b1=Math['round'](_0x5948a8*_0x3edf92);_0x2fe1ff['update'](_0x33b5b0[_0x5948a8]??'Processing...',_0x58e8b1);},'complete':()=>{_0x5948a8=_0x33b5b0['length'],_0x2fe1ff['complete']();},'getCurrentStage':()=>{return _0x33b5b0[_0x5948a8]??'';},'getProgress':()=>{return Math['round'](_0x5948a8*_0x3edf92);}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function search(
|
|
1
|
+
export function search(_0x507c5f,_0x271ccb){const {query:_0x23b2b0,fields:_0x5b836d,fuzzy:fuzzy=!![],limit:_0x1cf671}=_0x271ccb;if(!_0x23b2b0['trim']())return _0x1cf671!==undefined?_0x507c5f['slice'](0x0,_0x1cf671):_0x507c5f;const _0x3f8b22=fuzzy?_0x23b2b0['toLowerCase']():_0x23b2b0,_0x545786=_0x507c5f['filter'](_0x5cf150=>{if(_0x5b836d&&_0x5b836d['length']>0x0)return _0x5b836d['some'](_0x208a12=>{const _0x3fb9c0=getNestedValue(_0x5cf150,_0x208a12);if(_0x3fb9c0===null||_0x3fb9c0===undefined)return![];return matchesQuery(String(_0x3fb9c0),_0x3f8b22,fuzzy);});return searchAllFields(_0x5cf150,_0x3f8b22,fuzzy);});return _0x1cf671!==undefined?_0x545786['slice'](0x0,_0x1cf671):_0x545786;}function getNestedValue(_0x429047,_0x45a3bf){const _0x3b17c1=_0x45a3bf['split']('.');let _0xbbd5b5=_0x429047;for(const _0x423ad1 of _0x3b17c1){if(_0xbbd5b5===null||_0xbbd5b5===undefined)return null;if(typeof _0xbbd5b5!=='object')return null;_0xbbd5b5=_0xbbd5b5[_0x423ad1];}return _0xbbd5b5;}function matchesQuery(_0x3ec801,_0x475613,_0x2debc8){if(_0x2debc8)return _0x3ec801['toLowerCase']()['includes'](_0x475613);return _0x3ec801['includes'](_0x475613);}function searchAllFields(_0x1ac5a7,_0x5b6829,_0x4972c9){if(_0x1ac5a7===null||_0x1ac5a7===undefined)return![];if(typeof _0x1ac5a7==='string')return matchesQuery(_0x1ac5a7,_0x5b6829,_0x4972c9);if(typeof _0x1ac5a7==='number'||typeof _0x1ac5a7==='boolean')return matchesQuery(String(_0x1ac5a7),_0x5b6829,_0x4972c9);if(Array['isArray'](_0x1ac5a7))return _0x1ac5a7['some'](_0x563d4b=>searchAllFields(_0x563d4b,_0x5b6829,_0x4972c9));if(typeof _0x1ac5a7==='object')return Object['values'](_0x1ac5a7)['some'](_0x2ab929=>searchAllFields(_0x2ab929,_0x5b6829,_0x4972c9));return![];}
|