@hotmeshio/hotmesh 0.3.16 → 0.3.18
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 +10 -5
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +3 -6
- package/build/services/activities/activity.js +1 -1
- package/build/services/activities/await.js +1 -1
- package/build/services/activities/cycle.js +1 -1
- package/build/services/activities/hook.js +1 -1
- package/build/services/activities/index.js +1 -1
- package/build/services/activities/interrupt.js +1 -1
- package/build/services/activities/signal.js +1 -1
- package/build/services/activities/trigger.js +1 -1
- package/build/services/activities/worker.js +1 -1
- package/build/services/collator/index.js +1 -1
- package/build/services/compiler/deployer.js +1 -1
- package/build/services/compiler/index.js +1 -1
- package/build/services/compiler/validator.js +1 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.js +1 -1
- package/build/services/search/providers/postgres/postgres.js +1 -1
- package/build/services/search/providers/redis/ioredis.js +1 -1
- package/build/services/search/providers/redis/redis.js +1 -1
- package/build/services/serializer/index.js +1 -1
- package/build/services/store/providers/postgres/kvsql.js +1 -1
- package/build/services/store/providers/postgres/kvtables.js +1 -1
- package/build/services/store/providers/postgres/kvtransaction.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
- package/build/services/store/providers/postgres/postgres.js +1 -1
- package/build/services/store/providers/redis/_base.js +1 -1
- package/build/services/store/providers/redis/ioredis.js +1 -1
- package/build/services/store/providers/redis/redis.js +1 -1
- package/build/services/store/providers/store-initializable.js +1 -1
- package/build/services/stream/providers/nats/nats.js +1 -1
- package/build/services/stream/providers/postgres/postgres.js +1 -1
- package/build/services/stream/providers/redis/ioredis.js +1 -1
- package/build/services/stream/providers/redis/redis.js +1 -1
- package/build/services/stream/providers/stream-initializable.js +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/package.json +3 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x1d551f,_0x1eb3d6){const _0x4046f8=_0x8003,_0x4ef060=_0x1d551f();while(!![]){try{const _0x2539c4=parseInt(_0x4046f8(0x113))/0x1+parseInt(_0x4046f8(0x116))/0x2*(parseInt(_0x4046f8(0x112))/0x3)+-parseInt(_0x4046f8(0x117))/0x4*(parseInt(_0x4046f8(0x111))/0x5)+-parseInt(_0x4046f8(0x118))/0x6*(-parseInt(_0x4046f8(0x110))/0x7)+parseInt(_0x4046f8(0x115))/0x8+-parseInt(_0x4046f8(0x114))/0x9+parseInt(_0x4046f8(0x119))/0xa;if(_0x2539c4===_0x1eb3d6)break;else _0x4ef060['push'](_0x4ef060['shift']());}catch(_0x13ec25){_0x4ef060['push'](_0x4ef060['shift']());}}}(_0xe741,0x8addb));function _0x8003(_0xe7bafe,_0x166b8b){const _0xe74197=_0xe741();return _0x8003=function(_0x8003e3,_0x579ed0){_0x8003e3=_0x8003e3-0x110;let _0x488c2c=_0xe74197[_0x8003e3];return _0x488c2c;},_0x8003(_0xe7bafe,_0x166b8b);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CronHandler']=void 0x0;const cron_parser_1=require('cron-parser'),enums_1=require('../../../modules/enums'),utils_1=require('../../../modules/utils'),logger_1=require('../../logger');class CronHandler{['nextDelay'](_0x39421a){try{if(!(0x0,utils_1['isValidCron'])(_0x39421a))return-0x1;const _0x270546=(0x0,cron_parser_1['parseExpression'])(_0x39421a,{'utc':!![]}),_0x270c50=_0x270546['next']()['toDate'](),_0x2f8259=new Date(),_0x8b3801=(_0x270c50['getTime']()-_0x2f8259['getTime']())/0x3e8;if(_0x8b3801<=0x0)return-0x1;if(_0x8b3801<enums_1['HMSH_FIDELITY_SECONDS'])return enums_1['HMSH_FIDELITY_SECONDS'];const _0x5df005=Math['round'](_0x8b3801);return _0x5df005;}catch(_0x1a85c0){return CronHandler['logger']['error']('Error\x20calculating\x20next\x20cron\x20job\x20execution\x20\x20delay:',{..._0x1a85c0}),-0x1;}}}exports['CronHandler']=CronHandler,CronHandler['logger']=new logger_1['LoggerService']('hotmesh','meshos');function _0xe741(){const _0xef71f6=['4412sDisSz','17970fTDXPK','12920120xakZrp','322FjOiUT','4955MdatXc','87LaXYah','463218bJNXbB','7439076sipdcR','1360944WwgRMG','29332ZbhCOf'];_0xe741=function(){return _0xef71f6;};return _0xe741();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x4c67(_0x188570,_0x58e342){const _0x36dd0b=_0x36dd();return _0x4c67=function(_0x4c67a0,_0x56a572){_0x4c67a0=_0x4c67a0-0xb7;let _0x5b1b62=_0x36dd0b[_0x4c67a0];return _0x5b1b62;},_0x4c67(_0x188570,_0x58e342);}(function(_0x1e182d,_0x362874){const _0x4b6f0a=_0x4c67,_0x3d9534=_0x1e182d();while(!![]){try{const _0x36de28=parseInt(_0x4b6f0a(0xb9))/0x1*(-parseInt(_0x4b6f0a(0xc1))/0x2)+parseInt(_0x4b6f0a(0xb7))/0x3+parseInt(_0x4b6f0a(0xc0))/0x4*(-parseInt(_0x4b6f0a(0xbc))/0x5)+parseInt(_0x4b6f0a(0xbe))/0x6+-parseInt(_0x4b6f0a(0xb8))/0x7*(parseInt(_0x4b6f0a(0xba))/0x8)+parseInt(_0x4b6f0a(0xbb))/0x9*(-parseInt(_0x4b6f0a(0xbd))/0xa)+parseInt(_0x4b6f0a(0xbf))/0xb;if(_0x36de28===_0x362874)break;else _0x3d9534['push'](_0x3d9534['shift']());}catch(_0x53d737){_0x3d9534['push'](_0x3d9534['shift']());}}}(_0x36dd,0x73d0f));function _0x36dd(){const _0x4f1d39=['64328nEeTqM','1611iNbLqi','1675nabKJk','22660spnIpn','3558168tCOoxL','17412989HSsbny','6308TNQDDo','2890nTvHgy','2453208bDQVgc','672HGoTtX','563YXKlUZ'];_0x36dd=function(){return _0x4f1d39;};return _0x36dd();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['DateHandler']=void 0x0;const utils_1=require('../../../modules/utils');class DateHandler{static['getDateInstance'](_0x48f94e){const _0x4acf60=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z)?$/;if(typeof _0x48f94e==='string'){if(_0x4acf60['test'](_0x48f94e))return new Date(_0x48f94e);const _0x44b749=parseInt(_0x48f94e,0xa);if(!isNaN(_0x44b749))return new Date(_0x44b749);}else{if(_0x48f94e instanceof Date)return _0x48f94e;else{if(typeof _0x48f94e==='number')return new Date(_0x48f94e);}}throw new Error('Invalid\x20date\x20format');}['fromISOString'](_0x536dce){return new Date(_0x536dce);}['now'](){return Date['now']();}['parse'](_0x276b3f){return Date['parse'](_0x276b3f);}['getDate'](_0x2ac711){return DateHandler['getDateInstance'](_0x2ac711)['getDate']();}['getDay'](_0x46fbab){return DateHandler['getDateInstance'](_0x46fbab)['getDay']();}['getFullYear'](_0x52f6d2){return DateHandler['getDateInstance'](_0x52f6d2)['getFullYear']();}['getHours'](_0x3442dd){return DateHandler['getDateInstance'](_0x3442dd)['getHours']();}['getMilliseconds'](_0x80fa4f){return DateHandler['getDateInstance'](_0x80fa4f)['getMilliseconds']();}['getMinutes'](_0x1e27f1){return DateHandler['getDateInstance'](_0x1e27f1)['getMinutes']();}['getMonth'](_0x8eb048){return DateHandler['getDateInstance'](_0x8eb048)['getMonth']();}['getSeconds'](_0x5d1f1f){return DateHandler['getDateInstance'](_0x5d1f1f)['getSeconds']();}['getTime'](_0x541e7a){return DateHandler['getDateInstance'](_0x541e7a)['getTime']();}['getTimezoneOffset'](_0x291eb5){return DateHandler['getDateInstance'](_0x291eb5)['getTimezoneOffset']();}['getUTCDate'](_0x19d027){return DateHandler['getDateInstance'](_0x19d027)['getUTCDate']();}['getUTCDay'](_0x329f68){return DateHandler['getDateInstance'](_0x329f68)['getUTCDay']();}['getUTCFullYear'](_0x300e78){return DateHandler['getDateInstance'](_0x300e78)['getUTCFullYear']();}['getUTCHours'](_0x17ab37){return DateHandler['getDateInstance'](_0x17ab37)['getUTCHours']();}['getUTCMilliseconds'](_0x38a942){return DateHandler['getDateInstance'](_0x38a942)['getUTCMilliseconds']();}['getUTCMinutes'](_0x5af3aa){return DateHandler['getDateInstance'](_0x5af3aa)['getUTCMinutes']();}['getUTCMonth'](_0x267b38){return DateHandler['getDateInstance'](_0x267b38)['getUTCMonth']();}['getUTCSeconds'](_0x374537){return DateHandler['getDateInstance'](_0x374537)['getUTCSeconds']();}['setMilliseconds'](_0x55ba5e,_0x3ebeec){return DateHandler['getDateInstance'](_0x55ba5e)['setMilliseconds'](_0x3ebeec);}['setMinutes'](_0x34ce9e,_0xc092b8,_0x55263b,_0x4689a0){return DateHandler['getDateInstance'](_0x34ce9e)['setMinutes'](_0xc092b8,_0x55263b,_0x4689a0);}['setMonth'](_0x38aedb,_0x589eca,_0x59f717){return DateHandler['getDateInstance'](_0x38aedb)['setMonth'](_0x589eca,_0x59f717);}['setSeconds'](_0x43a60b,_0x57eb86,_0x2682b1){return DateHandler['getDateInstance'](_0x43a60b)['setSeconds'](_0x57eb86,_0x2682b1);}['setTime'](_0x283d73,_0x124252){return DateHandler['getDateInstance'](_0x283d73)['setTime'](_0x124252);}['setUTCDate'](_0x2658ce,_0x452139){return DateHandler['getDateInstance'](_0x2658ce)['setUTCDate'](_0x452139);}['setUTCFullYear'](_0x3c3e15,_0x1d3128,_0x191253,_0xc94654){return DateHandler['getDateInstance'](_0x3c3e15)['setUTCFullYear'](_0x1d3128,_0x191253,_0xc94654);}['setUTCHours'](_0x3d48b4,_0x37f556,_0x3f1836,_0x107e11,_0x5bb050){return DateHandler['getDateInstance'](_0x3d48b4)['setUTCHours'](_0x37f556,_0x3f1836,_0x107e11,_0x5bb050);}['setUTCMilliseconds'](_0x46e058,_0x27c4ca){return DateHandler['getDateInstance'](_0x46e058)['setUTCMilliseconds'](_0x27c4ca);}['setUTCMinutes'](_0xf27758,_0x23f1d7,_0x5b0657,_0x539ed3){return DateHandler['getDateInstance'](_0xf27758)['setUTCMinutes'](_0x23f1d7,_0x5b0657,_0x539ed3);}['setUTCMonth'](_0x371b15,_0x20e36e,_0x353987){return DateHandler['getDateInstance'](_0x371b15)['setUTCMonth'](_0x20e36e,_0x353987);}['setUTCSeconds'](_0x8a3ce3,_0x2a96f2,_0x2e7f28){return DateHandler['getDateInstance'](_0x8a3ce3)['setUTCSeconds'](_0x2a96f2,_0x2e7f28);}['setDate'](_0x11e7d9,_0x2820b5){return DateHandler['getDateInstance'](_0x11e7d9)['setDate'](_0x2820b5);}['setFullYear'](_0x572caf,_0xd4b78b,_0x1ac651,_0x3fa8fd){return DateHandler['getDateInstance'](_0x572caf)['setFullYear'](_0xd4b78b,_0x1ac651,_0x3fa8fd);}['setHours'](_0x5d32d1,_0x2270d1,_0x52329d,_0xa7edb,_0x36c993){return DateHandler['getDateInstance'](_0x5d32d1)['setHours'](_0x2270d1,_0x52329d,_0xa7edb,_0x36c993);}['toDateString'](_0x4a775e){return DateHandler['getDateInstance'](_0x4a775e)['toDateString']();}['toISOString'](_0x369126){return DateHandler['getDateInstance'](_0x369126)['toISOString']();}['toISOXString'](_0x2c7b43){return(0x0,utils_1['formatISODate'])(_0x2c7b43?DateHandler['getDateInstance'](_0x2c7b43):new Date());}['toJSON'](_0x2f302f){return DateHandler['getDateInstance'](_0x2f302f)['toJSON']();}['toLocaleDateString'](_0x15470b,_0x32b04c,_0x551198){return DateHandler['getDateInstance'](_0x15470b)['toLocaleDateString'](_0x32b04c,_0x551198);}['toLocaleString'](_0x4d2667,_0x5f14fd,_0x54efd5){return DateHandler['getDateInstance'](_0x4d2667)['toLocaleString'](_0x5f14fd,_0x54efd5);}['toLocaleTimeString'](_0x287e36,_0x377d28,_0x3cf17){return DateHandler['getDateInstance'](_0x287e36)['toLocaleTimeString'](_0x377d28,_0x3cf17);}['toString'](_0x1519ca){return DateHandler['getDateInstance'](_0x1519ca)['toString']();}['UTC'](_0x5ee418,_0x13ea60,_0x12b68a,_0x4703ab,_0x12fba3,_0x2015d7,_0x15db9b){return Date['UTC'](_0x5ee418,_0x13ea60,_0x12b68a,_0x4703ab,_0x12fba3,_0x2015d7,_0x15db9b);}['valueOf'](_0x5a86e8){return DateHandler['getDateInstance'](_0x5a86e8)['valueOf']();}}exports['DateHandler']=DateHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x3830(_0xb95da8,_0x1a6185){const _0xb1ca47=_0xb1ca();return _0x3830=function(_0x38305a,_0x22e84b){_0x38305a=_0x38305a-0x1a1;let _0x1bd53c=_0xb1ca47[_0x38305a];return _0x1bd53c;},_0x3830(_0xb95da8,_0x1a6185);}(function(_0x327410,_0x16c50e){const _0xeda6d8=_0x3830,_0x245305=_0x327410();while(!![]){try{const _0x3e9add=parseInt(_0xeda6d8(0x1a9))/0x1*(-parseInt(_0xeda6d8(0x1ab))/0x2)+-parseInt(_0xeda6d8(0x1a2))/0x3*(-parseInt(_0xeda6d8(0x1a1))/0x4)+parseInt(_0xeda6d8(0x1a8))/0x5+parseInt(_0xeda6d8(0x1a6))/0x6*(parseInt(_0xeda6d8(0x1aa))/0x7)+parseInt(_0xeda6d8(0x1a4))/0x8+-parseInt(_0xeda6d8(0x1a3))/0x9*(parseInt(_0xeda6d8(0x1ac))/0xa)+-parseInt(_0xeda6d8(0x1a7))/0xb*(parseInt(_0xeda6d8(0x1a5))/0xc);if(_0x3e9add===_0x16c50e)break;else _0x245305['push'](_0x245305['shift']());}catch(_0x220132){_0x245305['push'](_0x245305['shift']());}}}(_0xb1ca,0x54be4));Object['defineProperty'](exports,'__esModule',{'value':!![]});const array_1=require('./array'),bitwise_1=require('./bitwise'),conditional_1=require('./conditional'),cron_1=require('./cron'),date_1=require('./date'),json_1=require('./json'),logical_1=require('./logical'),math_1=require('./math'),number_1=require('./number'),object_1=require('./object'),string_1=require('./string'),symbol_1=require('./symbol'),unary_1=require('./unary');exports['default']={'array':new array_1['ArrayHandler'](),'bitwise':new bitwise_1['BitwiseHandler'](),'conditional':new conditional_1['ConditionalHandler'](),'cron':new cron_1['CronHandler'](),'date':new date_1['DateHandler'](),'json':new json_1['JsonHandler'](),'logical':new logical_1['LogicalHandler'](),'math':new math_1['MathHandler'](),'number':new number_1['NumberHandler'](),'object':new object_1['ObjectHandler'](),'string':new string_1['StringHandler'](),'symbol':new symbol_1['SymbolHandler'](),'unary':new unary_1['UnaryHandler']()};function _0xb1ca(){const _0x2f73ae=['63zupWOl','3548168XhFUGW','22404EEqJxn','175242LnFqxg','3916AVNfFI','2276385yyTjix','271DbMIBQ','49ldxYhS','1882xjjgBc','667410kbGXQk','840948nhiyuM','9ByANGt'];_0xb1ca=function(){return _0x2f73ae;};return _0xb1ca();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x4ff3a1,_0x373ace){var _0x6c685f=_0x4865,_0x2164e6=_0x4ff3a1();while(!![]){try{var _0x2359a3=parseInt(_0x6c685f(0x177))/0x1*(-parseInt(_0x6c685f(0x176))/0x2)+parseInt(_0x6c685f(0x173))/0x3*(parseInt(_0x6c685f(0x175))/0x4)+-parseInt(_0x6c685f(0x17b))/0x5+-parseInt(_0x6c685f(0x17c))/0x6+parseInt(_0x6c685f(0x174))/0x7*(-parseInt(_0x6c685f(0x172))/0x8)+-parseInt(_0x6c685f(0x17a))/0x9*(parseInt(_0x6c685f(0x171))/0xa)+-parseInt(_0x6c685f(0x179))/0xb*(-parseInt(_0x6c685f(0x178))/0xc);if(_0x2359a3===_0x373ace)break;else _0x2164e6['push'](_0x2164e6['shift']());}catch(_0x5b78e8){_0x2164e6['push'](_0x2164e6['shift']());}}}(_0x19e9,0x192e2));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['JsonHandler']=void 0x0;class JsonHandler{['stringify'](_0x59955f,_0xa290a7,_0x570bd8){return JSON['stringify'](_0x59955f,_0xa290a7,_0x570bd8);}['parse'](_0x1b9375,_0x2076b5){return JSON['parse'](_0x1b9375,_0x2076b5);}}function _0x19e9(){var _0x220622=['1275336BpQgjT','59325DODOHR','7JTXEqY','28TLhqoH','64542bYDXmN','1BhuvIh','12KcgNYl','4536147oLleYp','36rNLeAI','251370Amothl','337284byQyvF','373720DoHWrz'];_0x19e9=function(){return _0x220622;};return _0x19e9();}function _0x4865(_0x1c1c83,_0x48a668){var _0x19e95b=_0x19e9();return _0x4865=function(_0x48658e,_0x5ebc04){_0x48658e=_0x48658e-0x171;var _0x4fdd06=_0x19e95b[_0x48658e];return _0x4fdd06;},_0x4865(_0x1c1c83,_0x48a668);}exports['JsonHandler']=JsonHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x286686,_0x371673){var _0x146776=_0x1a82,_0x16f55e=_0x286686();while(!![]){try{var _0x36c740=parseInt(_0x146776(0xe7))/0x1*(-parseInt(_0x146776(0xe4))/0x2)+parseInt(_0x146776(0xea))/0x3+parseInt(_0x146776(0xe5))/0x4*(parseInt(_0x146776(0xeb))/0x5)+-parseInt(_0x146776(0xe9))/0x6+-parseInt(_0x146776(0xe6))/0x7*(parseInt(_0x146776(0xe8))/0x8)+parseInt(_0x146776(0xe1))/0x9+parseInt(_0x146776(0xe3))/0xa*(parseInt(_0x146776(0xe2))/0xb);if(_0x36c740===_0x371673)break;else _0x16f55e['push'](_0x16f55e['shift']());}catch(_0x3fb521){_0x16f55e['push'](_0x16f55e['shift']());}}}(_0x2b9e,0xcb180));function _0x2b9e(){var _0x13e0d8=['1970EYNKUu','22862SlZuGs','20JJEhrA','11462843IoaYnC','82mLDitu','8mkhxYb','1344366QBQchE','4592847kOlvRq','642775PfdFpc','3688632FEXqeY','58476ZHasVQ'];_0x2b9e=function(){return _0x13e0d8;};return _0x2b9e();}function _0x1a82(_0x4ed003,_0x5e163e){var _0x2b9e35=_0x2b9e();return _0x1a82=function(_0x1a8267,_0x14ad5e){_0x1a8267=_0x1a8267-0xe1;var _0x72022f=_0x2b9e35[_0x1a8267];return _0x72022f;},_0x1a82(_0x4ed003,_0x5e163e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['LogicalHandler']=void 0x0;class LogicalHandler{['and'](_0x28eacb,_0x5b6ad0){return _0x28eacb&&_0x5b6ad0;}['or'](_0x20dbfb,_0x1f7c0f){return _0x20dbfb||_0x1f7c0f;}}exports['LogicalHandler']=LogicalHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x13c979,_0x7290db){const _0x56527d=_0x2989,_0x4fd70f=_0x13c979();while(!![]){try{const _0x594777=parseInt(_0x56527d(0x1ab))/0x1+-parseInt(_0x56527d(0x1a9))/0x2+parseInt(_0x56527d(0x1a8))/0x3*(parseInt(_0x56527d(0x1ac))/0x4)+parseInt(_0x56527d(0x1ae))/0x5+parseInt(_0x56527d(0x1a7))/0x6+parseInt(_0x56527d(0x1ad))/0x7+-parseInt(_0x56527d(0x1aa))/0x8*(parseInt(_0x56527d(0x1a6))/0x9);if(_0x594777===_0x7290db)break;else _0x4fd70f['push'](_0x4fd70f['shift']());}catch(_0x45238f){_0x4fd70f['push'](_0x4fd70f['shift']());}}}(_0x28e1,0x18986));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MathHandler']=void 0x0;function _0x2989(_0x55a33e,_0x4a9786){const _0x28e12f=_0x28e1();return _0x2989=function(_0x298962,_0x1ac40b){_0x298962=_0x298962-0x1a6;let _0x4725cb=_0x28e12f[_0x298962];return _0x4725cb;},_0x2989(_0x55a33e,_0x4a9786);}function _0x28e1(){const _0x2eb4d1=['364668dDHKta','537243pelVen','604455TrokZv','5328DgQhVp','395448RkMvit','6teWRnf','65126Daqtbe','6784mZLBlr','189439YKWmNb'];_0x28e1=function(){return _0x2eb4d1;};return _0x28e1();}class MathHandler{['add'](..._0x295b68){return _0x295b68['reduce']((_0x440c97,_0x5ceff5)=>{return Array['isArray'](_0x5ceff5)?_0x440c97+this['add'](..._0x5ceff5):_0x440c97+_0x5ceff5;},0x0);}['subtract'](..._0x3f33be){if(_0x3f33be['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');let _0xc05115=[];_0x3f33be['forEach'](_0x577d6d=>{Array['isArray'](_0x577d6d)?_0xc05115=[..._0xc05115,..._0x577d6d]:_0xc05115['push'](_0x577d6d);});if(_0xc05115['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required\x20after\x20flattening.');const _0xc03547=_0xc05115['reduce']((_0x27710c,_0x256263,_0x130ae6)=>{return _0x130ae6===0x0?_0x27710c:_0x27710c-_0x256263;});return _0xc03547;}['multiply'](..._0x1b0dd1){if(_0x1b0dd1['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');return _0x1b0dd1['reduce']((_0x3084ff,_0x4e0e1c)=>{return Array['isArray'](_0x4e0e1c)?_0x3084ff*this['multiply'](..._0x4e0e1c):_0x3084ff*_0x4e0e1c;},0x1);}['divide'](..._0x37f8a5){if(_0x37f8a5['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');let _0xed09ec=[];_0x37f8a5['forEach'](_0x49359f=>{Array['isArray'](_0x49359f)?_0xed09ec=[..._0xed09ec,..._0x49359f]:_0xed09ec['push'](_0x49359f);});if(_0xed09ec['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required\x20after\x20flattening.');const _0x271eae=_0xed09ec['reduce']((_0x4a14a6,_0xfc62e3,_0x19eec4)=>{if(_0xfc62e3===0x0)return NaN;return _0x19eec4===0x0?_0x4a14a6:_0x4a14a6/_0xfc62e3;});if(isNaN(_0x271eae))return NaN;return _0x271eae;}['abs'](_0x3f8e27){return Math['abs'](_0x3f8e27);}['acos'](_0x20f809){return Math['acos'](_0x20f809);}['acosh'](_0x1c1ce7){return Math['acosh'](_0x1c1ce7);}['asin'](_0x3aa003){return Math['asin'](_0x3aa003);}['asinh'](_0x4ca837){return Math['asinh'](_0x4ca837);}['atan'](_0x3f1bb8){return Math['atan'](_0x3f1bb8);}['atan2'](_0x328ebe,_0x458c71){return Math['atan2'](_0x328ebe,_0x458c71);}['atanh'](_0x536f04){return Math['atanh'](_0x536f04);}['cbrt'](_0x4f7930){return Math['cbrt'](_0x4f7930);}['ceil'](_0x754c19){return Math['ceil'](_0x754c19);}['clz32'](_0x2a0f00){return Math['clz32'](_0x2a0f00);}['cos'](_0x19e5cc){return Math['cos'](_0x19e5cc);}['cosh'](_0x44761b){return Math['cosh'](_0x44761b);}['exp'](_0x16190c){return Math['exp'](_0x16190c);}['expm1'](_0x15c28e){return Math['expm1'](_0x15c28e);}['floor'](_0x16fd51){return Math['floor'](_0x16fd51);}['fround'](_0x43155a){return Math['fround'](_0x43155a);}['hypot'](..._0x3c2d36){return Math['hypot'](..._0x3c2d36);}['imul'](_0x3d577b,_0x2417f5){return Math['imul'](_0x3d577b,_0x2417f5);}['log'](_0x1da563){return Math['log'](_0x1da563);}['log10'](_0x56180f){return Math['log10'](_0x56180f);}['log1p'](_0x28ee9f){return Math['log1p'](_0x28ee9f);}['log2'](_0x43c3c6){return Math['log2'](_0x43c3c6);}['max'](..._0x15ec05){return Math['max'](..._0x15ec05);}['min'](..._0x3a34e0){return Math['min'](..._0x3a34e0);}['pow'](_0x4db5cf,_0x42ffe1){return Math['pow'](_0x4db5cf,_0x42ffe1);}['random'](){return Math['random']();}['round'](_0x3dbd7){return Math['round'](_0x3dbd7);}['sign'](_0x23c427){return Math['sign'](_0x23c427);}['sin'](_0x5f04f2){return Math['sin'](_0x5f04f2);}['sinh'](_0x527c48){return Math['sinh'](_0x527c48);}['sqrt'](_0x25da12){return Math['sqrt'](_0x25da12);}['tan'](_0x574e51){return Math['tan'](_0x574e51);}['tanh'](_0xc5b905){return Math['tanh'](_0xc5b905);}['trunc'](_0x345945){return Math['trunc'](_0x345945);}}exports['MathHandler']=MathHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x178829,_0x54f3ed){var _0xbbbff0=_0x4137,_0x12ea5a=_0x178829();while(!![]){try{var _0x6324f8=parseInt(_0xbbbff0(0x92))/0x1*(parseInt(_0xbbbff0(0x91))/0x2)+-parseInt(_0xbbbff0(0x94))/0x3+-parseInt(_0xbbbff0(0x8f))/0x4*(-parseInt(_0xbbbff0(0x93))/0x5)+-parseInt(_0xbbbff0(0x90))/0x6+parseInt(_0xbbbff0(0x95))/0x7+parseInt(_0xbbbff0(0x8e))/0x8*(-parseInt(_0xbbbff0(0x8d))/0x9)+-parseInt(_0xbbbff0(0x8c))/0xa;if(_0x6324f8===_0x54f3ed)break;else _0x12ea5a['push'](_0x12ea5a['shift']());}catch(_0x2eb080){_0x12ea5a['push'](_0x12ea5a['shift']());}}}(_0x52bb,0xc50ea));function _0x4137(_0x24ca2b,_0x1a1de6){var _0x52bbde=_0x52bb();return _0x4137=function(_0x4137df,_0x1f686c){_0x4137df=_0x4137df-0x8c;var _0x5dca78=_0x52bbde[_0x4137df];return _0x5dca78;},_0x4137(_0x24ca2b,_0x1a1de6);}function _0x52bb(){var _0x1b1385=['8726740tOsmEm','35703oJXqDH','904tZcqbf','327708nYTfkK','2790882RemYsO','20FePlxr','101797VEnWIJ','85bJBOCr','2556399iJJpfY','7242494mQgbKT'];_0x52bb=function(){return _0x1b1385;};return _0x52bb();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['NumberHandler']=void 0x0;class NumberHandler{['isFinite'](_0x447e90){return Number['isFinite'](_0x447e90);}['isEven'](_0x7ea6c){return!isNaN(_0x7ea6c)&&_0x7ea6c%0x2===0x0;}['isOdd'](_0x2d91b4){return!isNaN(_0x2d91b4)&&_0x2d91b4%0x2!==0x0;}['isInteger'](_0x586f7a){return Number['isInteger'](_0x586f7a);}['isNaN'](_0x178488){return Number['isNaN'](_0x178488);}['parseFloat'](_0x576d17){return parseFloat(_0x576d17);}['parseInt'](_0x1e86e6,_0x1bc970){return parseInt(_0x1e86e6,_0x1bc970);}['toFixed'](_0x173607,_0x7e163c){return _0x173607['toFixed'](_0x7e163c);}['toExponential'](_0x43fed9,_0x472129){return _0x43fed9['toExponential'](_0x472129);}['toPrecision'](_0x43a0d7,_0x21e47e){return _0x43a0d7['toPrecision'](_0x21e47e);}['gte'](_0x176de3,_0x57e971){return _0x176de3>=_0x57e971;}['lte'](_0x442afd,_0x1c83fa){return _0x442afd<=_0x1c83fa;}['gt'](_0x3ebffa,_0x962e55){return _0x3ebffa>_0x962e55;}['lt'](_0x64c8b,_0x41ca9c){return _0x64c8b<_0x41ca9c;}['max'](..._0x1875db){return Math['max'](..._0x1875db);}['min'](..._0x1f6fa0){return Math['min'](..._0x1f6fa0);}['pow'](_0x12d306,_0x482555){return Math['pow'](_0x12d306,_0x482555);}['round'](_0x534d33){return Math['round'](_0x534d33);}}exports['NumberHandler']=NumberHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x3419(){const _0x4caeb8=['6082rWbZgv','17760754SjyEUW','1919610eztLbw','1470416HtjFLq','10PSCxOE','8096696GdtklT','10UcTSay','933csnLlP','7wyETFC','1166307llEtFf','1743318jsswfP'];_0x3419=function(){return _0x4caeb8;};return _0x3419();}(function(_0x34fa9d,_0x3a8f31){const _0x298cd9=_0x5038,_0x185851=_0x34fa9d();while(!![]){try{const _0xb00dc1=parseInt(_0x298cd9(0x119))/0x1+-parseInt(_0x298cd9(0x11b))/0x2*(-parseInt(_0x298cd9(0x117))/0x3)+parseInt(_0x298cd9(0x113))/0x4+-parseInt(_0x298cd9(0x114))/0x5*(-parseInt(_0x298cd9(0x11a))/0x6)+-parseInt(_0x298cd9(0x118))/0x7*(parseInt(_0x298cd9(0x115))/0x8)+parseInt(_0x298cd9(0x11d))/0x9+-parseInt(_0x298cd9(0x116))/0xa*(parseInt(_0x298cd9(0x11c))/0xb);if(_0xb00dc1===_0x3a8f31)break;else _0x185851['push'](_0x185851['shift']());}catch(_0x599506){_0x185851['push'](_0x185851['shift']());}}}(_0x3419,0x9e0bd));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ObjectHandler']=void 0x0;class ObjectHandler{['get'](_0x2321b0,_0x5b59b8){return _0x2321b0?.[_0x5b59b8];}['set'](_0x3b6848,_0x546020,_0x69dfc4){if(!_0x3b6848)_0x3b6848={};return _0x3b6848[_0x546020]=_0x69dfc4,_0x3b6848;}['create'](..._0x565cb9){const _0x10b2e4={};if(_0x565cb9['length']===0x0)return _0x10b2e4;for(let _0x57c1ee=0x0;_0x57c1ee<_0x565cb9['length'];_0x57c1ee+=0x2){_0x10b2e4[_0x565cb9[_0x57c1ee]]=_0x565cb9[_0x57c1ee+0x1];}return _0x10b2e4;}['keys'](_0x1e2430){return _0x1e2430&&Object['keys'](_0x1e2430)||[];}['values'](_0x51aa58){return _0x51aa58&&Object['values'](_0x51aa58)||[];}['entries'](_0x348800){return _0x348800&&Object['entries'](_0x348800)||[];}['fromEntries'](_0x2a147b){return Object['fromEntries'](_0x2a147b);}['assign'](_0x5a1626,..._0xd1c9ee){return Object['assign'](_0x5a1626||{},..._0xd1c9ee);}['getOwnPropertyNames'](_0x4b9023){return Object['getOwnPropertyNames'](_0x4b9023||{});}['getOwnPropertySymbols'](_0x2752b1){return Object['getOwnPropertySymbols'](_0x2752b1||{});}['getOwnPropertyDescriptor'](_0x4699b6,_0x2cae6c){return Object['getOwnPropertyDescriptor'](_0x4699b6||{},_0x2cae6c);}['defineProperty'](_0x72eebd,_0x4b4e01,_0x40efd8){return Object['defineProperty'](_0x72eebd,_0x4b4e01,_0x40efd8);}['defineProperties'](_0x5b2f78,_0xb32f4a){return Object['defineProperties'](_0x5b2f78,_0xb32f4a);}['freeze'](_0x514ba8){return Object['freeze'](_0x514ba8);}['isFrozen'](_0x8d4071){return Object['isFrozen'](_0x8d4071);}['seal'](_0x1fabd3){return Object['seal'](_0x1fabd3);}['isSealed'](_0x42ba34){return Object['isSealed'](_0x42ba34);}['preventExtensions'](_0x4e4ad2){return Object['preventExtensions'](_0x4e4ad2);}['isExtensible'](_0x192581){return Object['isExtensible'](_0x192581);}['hasOwnProperty'](_0x58d0b6,_0x3ec4ed){return Object['prototype']['hasOwnProperty']['call'](_0x58d0b6,_0x3ec4ed);}['isPrototypeOf'](_0x1f09e1,_0x599126){return Object['prototype']['isPrototypeOf']['call'](_0x1f09e1,_0x599126);}['propertyIsEnumerable'](_0x268c63,_0x3711a6){return Object['prototype']['propertyIsEnumerable']['call'](_0x268c63,_0x3711a6);}}function _0x5038(_0x1c71ea,_0xbc1205){const _0x3419de=_0x3419();return _0x5038=function(_0x503885,_0x404ab1){_0x503885=_0x503885-0x113;let _0x5de821=_0x3419de[_0x503885];return _0x5de821;},_0x5038(_0x1c71ea,_0xbc1205);}exports['ObjectHandler']=ObjectHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x57dabd,_0x4dfc27){var _0x233677=_0x533a,_0x589c71=_0x57dabd();while(!![]){try{var _0x236c68=-parseInt(_0x233677(0x1aa))/0x1+-parseInt(_0x233677(0x1ad))/0x2*(-parseInt(_0x233677(0x1ab))/0x3)+parseInt(_0x233677(0x1b3))/0x4*(-parseInt(_0x233677(0x1a9))/0x5)+parseInt(_0x233677(0x1ae))/0x6*(parseInt(_0x233677(0x1b0))/0x7)+parseInt(_0x233677(0x1b2))/0x8*(parseInt(_0x233677(0x1b1))/0x9)+parseInt(_0x233677(0x1af))/0xa*(-parseInt(_0x233677(0x1ac))/0xb)+parseInt(_0x233677(0x1b4))/0xc*(parseInt(_0x233677(0x1a8))/0xd);if(_0x236c68===_0x4dfc27)break;else _0x589c71['push'](_0x589c71['shift']());}catch(_0x14d86d){_0x589c71['push'](_0x589c71['shift']());}}}(_0x5a8a,0xd4e95));function _0x533a(_0x44a72f,_0x1e50a7){var _0x5a8a43=_0x5a8a();return _0x533a=function(_0x533a8e,_0x458814){_0x533a8e=_0x533a8e-0x1a8;var _0xbfda49=_0x5a8a43[_0x533a8e];return _0xbfda49;},_0x533a(_0x44a72f,_0x1e50a7);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['StringHandler']=void 0x0;class StringHandler{['split'](_0x237dc8,_0x32fad6){return _0x237dc8['split'](_0x32fad6);}['charAt'](_0x292eb8,_0x5850cb){return _0x292eb8['charAt'](_0x5850cb);}['concat'](..._0x4816fc){return _0x4816fc['join']('');}['includes'](_0x29a6f5,_0x2324e5,_0xc993f4){return _0x29a6f5['includes'](_0x2324e5,_0xc993f4);}['indexOf'](_0x5c8a1c,_0x5db287,_0x5f0ef9){return _0x5c8a1c['indexOf'](_0x5db287,_0x5f0ef9);}['lastIndexOf'](_0x718247,_0x261f0d,_0x5e3580){return _0x718247['lastIndexOf'](_0x261f0d,_0x5e3580);}['slice'](_0x28d2af,_0x14a4e8,_0x489a3c){return _0x28d2af['slice'](_0x14a4e8,_0x489a3c);}['toLowerCase'](_0x5b55dd){return _0x5b55dd['toLowerCase']();}['toUpperCase'](_0x58d1a8){return _0x58d1a8['toUpperCase']();}['trim'](_0x2deaa7){return _0x2deaa7['trim']();}['trimStart'](_0x176519){return _0x176519['trimStart']();}['trimEnd'](_0x3b7245){return _0x3b7245['trimEnd']();}['padStart'](_0x4cedb2,_0x22241e,_0x4bf9c2){return _0x4cedb2['padStart'](_0x22241e,_0x4bf9c2);}['padEnd'](_0x54c8c3,_0x141253,_0x167c67){return _0x54c8c3['padEnd'](_0x141253,_0x167c67);}['replace'](_0x1d0a43,_0x476391,_0x1528a3){return _0x1d0a43['replace'](_0x476391,_0x1528a3);}['search'](_0x266e65,_0x513eba){return _0x266e65['search'](_0x513eba);}['substring'](_0x4674b0,_0x492047,_0xf78a5f){return _0x4674b0['substring'](_0x492047,_0xf78a5f);}['startsWith'](_0x3b3de8,_0x2afb6b,_0x3652b3){return _0x3b3de8['startsWith'](_0x2afb6b,_0x3652b3);}['endsWith'](_0x380912,_0x1fb9ff,_0x26f3ad){return _0x380912['endsWith'](_0x1fb9ff,_0x26f3ad);}['repeat'](_0x36494c,_0x881d66){if(_0x881d66<0x0||_0x881d66===Infinity)throw new RangeError('Invalid\x20repeat\x20count.\x20Must\x20be\x20a\x20positive\x20finite\x20number.');return _0x36494c['repeat'](_0x881d66);}}function _0x5a8a(){var _0x5e5650=['6ALGNaK','340YJFHkj','4891957OdAjdw','17559dypZCA','6080JPQdDh','164PSXfOt','17178036iCopvu','13zQXSMr','36370znwewy','1661688PlCucu','1773CbGzkv','295350yBKOBO','446RQWBCd'];_0x5a8a=function(){return _0x5e5650;};return _0x5a8a();}exports['StringHandler']=StringHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x4c431c,_0x413d07){var _0x4a681f=_0xfdb7,_0x52d90a=_0x4c431c();while(!![]){try{var _0x305e4a=parseInt(_0x4a681f(0x1a0))/0x1*(-parseInt(_0x4a681f(0x19b))/0x2)+parseInt(_0x4a681f(0x197))/0x3*(-parseInt(_0x4a681f(0x19d))/0x4)+-parseInt(_0x4a681f(0x19e))/0x5+parseInt(_0x4a681f(0x199))/0x6*(-parseInt(_0x4a681f(0x1a1))/0x7)+parseInt(_0x4a681f(0x19a))/0x8*(-parseInt(_0x4a681f(0x19f))/0x9)+parseInt(_0x4a681f(0x1a2))/0xa+parseInt(_0x4a681f(0x19c))/0xb*(parseInt(_0x4a681f(0x198))/0xc);if(_0x305e4a===_0x413d07)break;else _0x52d90a['push'](_0x52d90a['shift']());}catch(_0x44f9ec){_0x52d90a['push'](_0x52d90a['shift']());}}}(_0x535a,0xe2c99));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['SymbolHandler']=void 0x0;function _0x535a(){var _0x1ccf0b=['3trzSZf','49884WbJzIa','3371706kXqXez','77088DvSxDk','26whbPDR','14905qqgwDi','3272456euHXBx','7602940jjGpcY','1278SWMqAa','16671RwzGun','21vFtqBP','9057760RXaggA'];_0x535a=function(){return _0x1ccf0b;};return _0x535a();}function _0xfdb7(_0x5be87c,_0x3b1738){var _0x535a6a=_0x535a();return _0xfdb7=function(_0xfdb7bc,_0x16c3a3){_0xfdb7bc=_0xfdb7bc-0x197;var _0xc12f72=_0x535a6a[_0xfdb7bc];return _0xc12f72;},_0xfdb7(_0x5be87c,_0x3b1738);}class SymbolHandler{['null'](){return null;}['undefined'](){return undefined;}['whitespace'](){return'\x20';}['object'](){return{};}['array'](){return[];}['posInfinity'](){return Infinity;}['negInfinity'](){return-Infinity;}['NaN'](){return NaN;}['date'](){return new Date();}}exports['SymbolHandler']=SymbolHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x143f(_0x18affd,_0x2b0de7){var _0x4164dc=_0x4164();return _0x143f=function(_0x143f25,_0x589911){_0x143f25=_0x143f25-0x13c;var _0xbfb76e=_0x4164dc[_0x143f25];return _0xbfb76e;},_0x143f(_0x18affd,_0x2b0de7);}(function(_0x32020e,_0x541ac6){var _0x50f37b=_0x143f,_0x560cde=_0x32020e();while(!![]){try{var _0x52430f=parseInt(_0x50f37b(0x147))/0x1*(-parseInt(_0x50f37b(0x145))/0x2)+-parseInt(_0x50f37b(0x13d))/0x3*(-parseInt(_0x50f37b(0x13f))/0x4)+parseInt(_0x50f37b(0x144))/0x5*(parseInt(_0x50f37b(0x140))/0x6)+parseInt(_0x50f37b(0x13c))/0x7+parseInt(_0x50f37b(0x141))/0x8*(-parseInt(_0x50f37b(0x142))/0x9)+parseInt(_0x50f37b(0x143))/0xa*(parseInt(_0x50f37b(0x13e))/0xb)+-parseInt(_0x50f37b(0x146))/0xc;if(_0x52430f===_0x541ac6)break;else _0x560cde['push'](_0x560cde['shift']());}catch(_0x5eb14e){_0x560cde['push'](_0x560cde['shift']());}}}(_0x4164,0x8b1df));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['UnaryHandler']=void 0x0;function _0x4164(){var _0x33e0fe=['6HqwjWJ','10167421wWFqru','622876TrqiUl','12522QgRCwn','48HvdXTw','1697877QDlczm','10yqGICv','2005fHnDsC','2HsGItL','8406516cpoSGa','232891FrHgTi','3937773NDbrzZ'];_0x4164=function(){return _0x33e0fe;};return _0x4164();}class UnaryHandler{['not'](_0x164c81){return!_0x164c81;}['positive'](_0xe984bf){return+_0xe984bf;}['negative'](_0x12c1bd){return-_0x12c1bd;}['bitwise_not'](_0xb6ec6c){return~_0xb6ec6c;}}exports['UnaryHandler']=UnaryHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x419ab0,_0x592810){const _0x26b05d=_0x722a,_0x243113=_0x419ab0();while(!![]){try{const _0x32e425=parseInt(_0x26b05d(0xd1))/0x1+parseInt(_0x26b05d(0xd2))/0x2*(parseInt(_0x26b05d(0xd7))/0x3)+-parseInt(_0x26b05d(0xd9))/0x4+-parseInt(_0x26b05d(0xd8))/0x5+parseInt(_0x26b05d(0xd5))/0x6*(-parseInt(_0x26b05d(0xda))/0x7)+-parseInt(_0x26b05d(0xdb))/0x8*(parseInt(_0x26b05d(0xd6))/0x9)+parseInt(_0x26b05d(0xd3))/0xa*(parseInt(_0x26b05d(0xd4))/0xb);if(_0x32e425===_0x592810)break;else _0x243113['push'](_0x243113['shift']());}catch(_0x5bcac0){_0x243113['push'](_0x243113['shift']());}}}(_0x4220,0x9f649));function _0x722a(_0x2e5f2f,_0x2c1fbc){const _0x4220b3=_0x4220();return _0x722a=function(_0x722a82,_0x5584b2){_0x722a82=_0x722a82-0xd1;let _0x3c5f0e=_0x4220b3[_0x722a82];return _0x3c5f0e;},_0x722a(_0x2e5f2f,_0x2c1fbc);}var __importDefault=this&&this['__importDefault']||function(_0x9facfa){return _0x9facfa&&_0x9facfa['__esModule']?_0x9facfa:{'default':_0x9facfa};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Pipe']=void 0x0;const functions_1=__importDefault(require('./functions'));class Pipe{constructor(_0x23de8f,_0x3cc6e5,_0xf52d00){this['rules']=_0x23de8f,this['jobData']=_0x3cc6e5,this['context']=_0xf52d00;}['isPipeType'](_0x185360){return!Array['isArray'](_0x185360)&&'@pipe'in _0x185360;}['isreduceType'](_0x4740cd){return!Array['isArray'](_0x4740cd)&&'@reduce'in _0x4740cd;}static['isPipeObject'](_0x1cf966){return typeof _0x1cf966==='object'&&_0x1cf966!==null&&!Array['isArray'](_0x1cf966)&&'@pipe'in _0x1cf966;}static['resolve'](_0x4fea6c,_0x2e98e5){let _0xbd8268;return Pipe['isPipeObject'](_0x4fea6c)?_0xbd8268=new Pipe(_0x4fea6c['@pipe'],_0x2e98e5):_0xbd8268=new Pipe([[_0x4fea6c]],_0x2e98e5),_0xbd8268['process']();}['process'](_0x29e2f2=null){let _0x1e71e8=0x0;!(_0x29e2f2||this['isPipeType'](this['rules'][0x0])||this['isreduceType'](this['rules'][0x0]))&&(_0x29e2f2=this['processCells'](this['rules'][0x0]),_0x1e71e8=0x1);const _0x483d03=this['rules']['length'],_0x34905c=[];for(let _0x1d7a0c=_0x1e71e8;_0x1d7a0c<_0x483d03;_0x1d7a0c++){_0x29e2f2=this['processRow'](this['rules'][_0x1d7a0c],_0x29e2f2,_0x34905c);}return _0x29e2f2[0x0];}['cloneUnknown'](_0x528d9c){if(_0x528d9c===null||typeof _0x528d9c!=='object')return _0x528d9c;if(_0x528d9c instanceof Date)return new Date(_0x528d9c['getTime']());if(_0x528d9c instanceof RegExp)return new RegExp(_0x528d9c);if(Array['isArray'](_0x528d9c))return _0x528d9c['map'](_0x5c8f77=>this['cloneUnknown'](_0x5c8f77));const _0x372786={};for(const _0x511ee0 in _0x528d9c){Object['prototype']['hasOwnProperty']['call'](_0x528d9c,_0x511ee0)&&(_0x372786[_0x511ee0]=this['cloneUnknown'](_0x528d9c[_0x511ee0]));}return _0x372786;}['reduce'](_0x2bfa26){let _0x3e7970=this['cloneUnknown'](_0x2bfa26[0x1]??null);if(Array['isArray'](_0x2bfa26[0x0]))for(let _0x359e58=0x0;_0x359e58<_0x2bfa26[0x0]['length'];_0x359e58++){this['context']={'$input':_0x2bfa26[0x0],'$output':_0x3e7970,'$item':_0x2bfa26[0x0][_0x359e58],'$key':_0x359e58['toString'](),'$index':_0x359e58},_0x3e7970=this['process']([_0x3e7970]);}else{let _0xc75db4=-0x1;for(const _0x5b2bae in _0x2bfa26[0x0]){_0xc75db4++,this['context']={'$input':_0x2bfa26[0x0],'$output':_0x3e7970,'$item':_0x2bfa26[0x0][_0x5b2bae],'$key':_0x5b2bae,'$index':_0xc75db4},_0x3e7970=this['process']([_0x3e7970]);}}return[_0x3e7970];}['processRow'](_0x4e50ff,_0x58cd7f,_0x497af8){if(_0x58cd7f&&this['isreduceType'](_0x4e50ff)){const _0x1d96f6=new Pipe(_0x4e50ff['@reduce'],this['jobData']),_0x25173e=_0x1d96f6['reduce'](_0x58cd7f);return _0x25173e;}else{if(this['isPipeType'](_0x4e50ff)){const _0x4eebf2=new Pipe(_0x4e50ff['@pipe'],this['jobData'],this['context']);return _0x497af8['push'](_0x4eebf2['process']()),_0x58cd7f;}else{_0x497af8['length']>0x0&&(_0x58cd7f=[..._0x497af8],_0x497af8['length']=0x0);if(!_0x58cd7f)return[]['concat'](this['processCells'](Array['isArray'](_0x4e50ff)?[..._0x4e50ff]:[]));else{const [_0x2320f3,..._0x108845]=_0x4e50ff;let _0x6b0d58;return this['isContextVariable'](_0x2320f3)?_0x6b0d58=this['resolveContextValue'](_0x2320f3):_0x6b0d58=Pipe['resolveFunction'](_0x2320f3)(..._0x58cd7f),[_0x6b0d58]['concat'](this['processCells']([..._0x108845]));}}}}static['resolveFunction'](_0x2ae68e){let [_0x36180d,_0x3ce741]=_0x2ae68e['split']('.');_0x36180d=_0x36180d['substring'](0x2),_0x3ce741=_0x3ce741['substring'](0x0,_0x3ce741['length']-0x1);const _0x525d0d=functions_1['default'][_0x36180d];if(!_0x525d0d)throw new Error('Unknown\x20domain\x20name\x20['+_0x2ae68e+']:\x20'+_0x36180d);if(!_0x525d0d[_0x3ce741])throw new Error('Unknown\x20domain\x20function\x20['+_0x2ae68e+']:\x20'+_0x36180d+'.'+_0x3ce741);return _0x525d0d[_0x3ce741];}['processCells'](_0xf05249){const _0x5c8391=[];if(Array['isArray'](_0xf05249))for(const _0xb1d4a4 of _0xf05249){_0x5c8391['push'](this['resolveCellValue'](_0xb1d4a4));}return _0x5c8391;}['isFunction'](_0x449582){return typeof _0x449582==='string'&&_0x449582['startsWith']('{@')&&_0x449582['endsWith']('}');}['isContextVariable'](_0x520568){if(typeof _0x520568==='string'&&_0x520568['endsWith']('}'))return _0x520568['startsWith']('{$item')||_0x520568['startsWith']('{$key')||_0x520568['startsWith']('{$index')||_0x520568['startsWith']('{$input')||_0x520568['startsWith']('{$output');}['isMappable'](_0x518c04){return typeof _0x518c04==='string'&&_0x518c04['startsWith']('{')&&_0x518c04['endsWith']('}');}['resolveCellValue'](_0x3ebef8){if(this['isFunction'](_0x3ebef8)){const _0x122c73=Pipe['resolveFunction'](_0x3ebef8);return _0x122c73['call']();}else{if(this['isContextVariable'](_0x3ebef8))return this['resolveContextValue'](_0x3ebef8);else return this['isMappable'](_0x3ebef8)?this['resolveMappableValue'](_0x3ebef8):_0x3ebef8;}}['getNestedProperty'](_0x16ef75,_0x36122f){const _0x275a2a=_0x36122f['split']('.');let _0x4ed9c7=_0x16ef75;for(const _0x3d7587 of _0x275a2a){if(_0x4ed9c7===null||typeof _0x4ed9c7!=='object'||!_0x4ed9c7['hasOwnProperty'](_0x3d7587))return undefined;_0x4ed9c7=_0x4ed9c7[_0x3d7587];}return _0x4ed9c7;}['resolveMappableValue'](_0x44f19a){const _0x319afe=this['resolveMapTerm'](_0x44f19a);return this['getNestedProperty'](this['jobData'],_0x319afe);}['resolveContextValue'](_0x34032b){const _0x3b7545=this['resolveContextTerm'](_0x34032b);return this['getNestedProperty'](this['context'],_0x3b7545);}['resolveContextTerm'](_0x5619dc){return _0x5619dc['substring'](0x1,_0x5619dc['length']-0x1);}['resolveFunctionTerm'](_0x1f0e0e){return _0x1f0e0e['substring'](0x2,_0x1f0e0e['length']-0x1);}['resolveMapTerm'](_0x7acd5d){return _0x7acd5d['substring'](0x1,_0x7acd5d['length']-0x1);}}function _0x4220(){const _0x58a522=['272knnniY','462317ZkEzft','55052nFRNxE','9429780EIatGF','33xldyhi','6978786URXBas','136296SWKDMo','96xgvwov','4997935XGrVIw','3366384rVdlOU','7CzWXmv'];_0x4220=function(){return _0x58a522;};return _0x4220();}exports['Pipe']=Pipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x37a5b4,_0x1b091b){const _0x414090=_0xd132,_0x688ebe=_0x37a5b4();while(!![]){try{const _0x543543=-parseInt(_0x414090(0x13f))/0x1*(-parseInt(_0x414090(0x140))/0x2)+-parseInt(_0x414090(0x139))/0x3*(-parseInt(_0x414090(0x136))/0x4)+parseInt(_0x414090(0x13b))/0x5+-parseInt(_0x414090(0x141))/0x6*(parseInt(_0x414090(0x13a))/0x7)+-parseInt(_0x414090(0x13e))/0x8*(-parseInt(_0x414090(0x13d))/0x9)+parseInt(_0x414090(0x13c))/0xa+-parseInt(_0x414090(0x137))/0xb*(parseInt(_0x414090(0x138))/0xc);if(_0x543543===_0x1b091b)break;else _0x688ebe['push'](_0x688ebe['shift']());}catch(_0x1148a1){_0x688ebe['push'](_0x688ebe['shift']());}}}(_0x489a,0x2c693));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['QuorumService']=void 0x0;const enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),compiler_1=require('../compiler'),hotmesh_1=require('../../types/hotmesh'),factory_1=require('../sub/factory'),factory_2=require('../store/factory');function _0x489a(){const _0x4de935=['76HtSbIB','30AQPfQN','28NpglQg','11juVwHk','13052964qsQrUa','140817bIyVTX','249487hHsKaS','1732240vhrHoy','3531780AuuzSe','1502298dpnpEw','8IdWpdI','6651CjToUE'];_0x489a=function(){return _0x4de935;};return _0x489a();}class QuorumService{constructor(){this['profiles']=[],this['cacheMode']='cache',this['untilVersion']=null,this['quorum']=null,this['callbacks']=[];}static async['init'](_0x563e84,_0x533e59,_0x2160aa,_0x3f7baa,_0x587bb6,_0x4c81b4){if(_0x3f7baa['engine']){const _0x52757d=new QuorumService();return _0x52757d['verifyQuorumFields'](_0x3f7baa),_0x52757d['namespace']=_0x563e84,_0x52757d['appId']=_0x533e59,_0x52757d['guid']=_0x2160aa,_0x52757d['logger']=_0x4c81b4,_0x52757d['engine']=_0x587bb6,await _0x52757d['initStoreChannel'](_0x3f7baa['engine']['store']),await _0x52757d['initSubChannel'](_0x3f7baa['engine']['sub'],_0x3f7baa['engine']['pub']),await _0x52757d['subscribe']['subscribe'](hotmesh_1['KeyType']['QUORUM'],_0x52757d['subscriptionHandler'](),_0x533e59),await _0x52757d['subscribe']['subscribe'](hotmesh_1['KeyType']['QUORUM'],_0x52757d['subscriptionHandler'](),_0x533e59,_0x52757d['guid']),_0x52757d['engine']['processWebHooks'](),_0x52757d['engine']['processTimeHooks'](),_0x52757d;}}['verifyQuorumFields'](_0x554942){if(!(0x0,utils_1['identifyProvider'])(_0x554942['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x554942['engine']['sub']))throw new Error('quorum\x20config\x20must\x20include\x20`store`\x20and\x20`sub`\x20fields.');}async['initStoreChannel'](_0xeda5e6){this['store']=await factory_2['StoreServiceFactory']['init'](_0xeda5e6,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x23e272,_0x1fe64d){this['subscribe']=await factory_1['SubServiceFactory']['init'](_0x23e272,_0x1fe64d,this['namespace'],this['appId'],this['guid'],this['logger']);}['subscriptionHandler'](){const _0xe970ed=this;return async(_0x3bbeaa,_0xb4ccac)=>{_0xe970ed['logger']['debug']('quorum-event-received',{'topic':_0x3bbeaa,'type':_0xb4ccac['type']});if(_0xb4ccac['type']==='activate')_0xe970ed['engine']['setCacheMode'](_0xb4ccac['cache_mode'],_0xb4ccac['until_version']);else{if(_0xb4ccac['type']==='ping')_0xe970ed['sayPong'](_0xe970ed['appId'],_0xe970ed['guid'],_0xb4ccac['originator'],_0xb4ccac['details']);else{if(_0xb4ccac['type']==='pong'&&_0xe970ed['guid']===_0xb4ccac['originator'])_0xe970ed['quorum']=_0xe970ed['quorum']+0x1,_0xb4ccac['profile']&&_0xe970ed['profiles']['push'](_0xb4ccac['profile']);else{if(_0xb4ccac['type']==='throttle')_0xe970ed['engine']['throttle'](_0xb4ccac['throttle']);else{if(_0xb4ccac['type']==='work')_0xe970ed['engine']['processWebHooks']();else{if(_0xb4ccac['type']==='job')_0xe970ed['engine']['routeToSubscribers'](_0xb4ccac['topic'],_0xb4ccac['job']);else{if(_0xb4ccac['type']==='cron')_0xe970ed['engine']['processTimeHooks']();else _0xb4ccac['type']==='rollcall'&&_0xe970ed['doRollCall'](_0xb4ccac);}}}}}}_0xe970ed['callbacks']['length']>0x0&&_0xe970ed['callbacks']['forEach'](_0xb09346=>_0xb09346(_0x3bbeaa,_0xb4ccac));};}async['sayPong'](_0x1860b4,_0x9262e4,_0x1b24c0,_0x23acf9=![]){let _0x26625b;if(_0x23acf9){const _0x19c527=this['engine']['store']['mintKey'](hotmesh_1['KeyType']['STREAMS'],{'appId':this['appId']});_0x26625b={'engine_id':this['guid'],'namespace':this['namespace'],'app_id':this['appId'],'stream':_0x19c527,'counts':this['engine']['router']['counts'],'timestamp':(0x0,utils_1['formatISODate'])(new Date()),'inited':this['engine']['inited'],'throttle':this['engine']['router']['throttle'],'reclaimDelay':this['engine']['router']['reclaimDelay'],'reclaimCount':this['engine']['router']['reclaimCount'],'system':await(0x0,utils_1['getSystemHealth'])()};}this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'pong','guid':_0x9262e4,'originator':_0x1b24c0,'profile':_0x26625b},_0x1860b4);}async['requestQuorum'](_0x300245=enums_1['HMSH_QUORUM_DELAY_MS'],_0x38f586=![]){const _0x14f584=this['quorum'];return this['quorum']=0x0,this['profiles']['length']=0x0,await this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'ping','originator':this['guid'],'details':_0x38f586},this['appId']),await(0x0,utils_1['sleepFor'])(_0x300245),_0x14f584;}async['doRollCall'](_0x18b5fe){let _0x321ee7=0x0;const _0x218094=!isNaN(_0x18b5fe['max'])?_0x18b5fe['max']:enums_1['HMSH_QUORUM_ROLLCALL_CYCLES'];if(this['rollCallInterval'])clearTimeout(this['rollCallInterval']);const _0x18900b=_0x18b5fe['interval']/0x2,_0x4d5050=_0x18900b+Math['ceil'](Math['random']()*_0x18900b);do{await(0x0,utils_1['sleepFor'])(Math['ceil'](Math['random']()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![]);if(!_0x18b5fe['interval'])return;const {promise:_0x3fe314,timerId:_0x14c8f4}=(0x0,utils_1['XSleepFor'])(_0x4d5050*0x3e8);this['rollCallInterval']=_0x14c8f4,await _0x3fe314;}while(this['rollCallInterval']&&_0x321ee7++<_0x218094-0x1);}['cancelRollCall'](){this['rollCallInterval']&&(clearTimeout(this['rollCallInterval']),delete this['rollCallInterval']);}['stop'](){this['cancelRollCall']();}async['pub'](_0x91974){return await this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],_0x91974,this['appId'],_0x91974['topic']||_0x91974['guid']);}async['sub'](_0x1d2f90){this['callbacks']['push'](_0x1d2f90);}async['unsub'](_0x5724f6){this['callbacks']=this['callbacks']['filter'](_0x195549=>_0x195549!==_0x5724f6);}async['rollCall'](_0x1c9976=enums_1['HMSH_QUORUM_DELAY_MS']){await this['requestQuorum'](_0x1c9976,!![]);const _0x517ae4=await this['engine']['stream']['getStreamDepths'](this['profiles']);return this['profiles']['forEach'](async(_0x26339b,_0xfdd60b)=>{_0x26339b['stream_depth']=_0x517ae4?.[_0xfdd60b]?.['depth']??0x0;}),this['profiles'];}async['activate'](_0x1acebf,_0x11894d=enums_1['HMSH_QUORUM_DELAY_MS'],_0x5d2f3c=0x0){_0x1acebf=_0x1acebf['toString']();const _0xb55ae8=await this['store']['reserveScoutRole']('activate',Math['ceil'](_0x11894d*0x6/0x3e8)+0x1);if(!_0xb55ae8){this['logger']['debug']('quorum-activation-awaiting',{'version':_0x1acebf}),await(0x0,utils_1['sleepFor'])(_0x11894d*0x6);const _0x578a94=await this['store']['getApp'](this['appId'],!![]);return _0x578a94?.['active']==!![]&&_0x578a94?.['version']===_0x1acebf;}const _0x3e1b68=await this['engine']['getVID']();await this['requestQuorum'](_0x11894d);const _0x4ec794=await this['requestQuorum'](_0x11894d),_0x49dd06=await this['requestQuorum'](_0x11894d),_0x553556=await this['requestQuorum'](_0x11894d);if(_0x4ec794&&_0x4ec794===_0x49dd06&&_0x49dd06===_0x553556){this['logger']['info']('quorum-rollcall-succeeded',{'q1':_0x4ec794,'q2':_0x49dd06,'q3':_0x553556}),this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'activate','cache_mode':'nocache','until_version':_0x1acebf},this['appId']),await new Promise(_0x2de2ae=>setTimeout(_0x2de2ae,_0x11894d)),await this['store']['releaseScoutRole']('activate');if(this['engine']['untilVersion']===_0x1acebf){this['logger']['info']('quorum-activation-succeeded',{'version':_0x1acebf});const {id:_0x2b229f}=_0x3e1b68,_0x352c59=new compiler_1['CompilerService'](this['store'],this['engine']['stream'],this['logger']);return await _0x352c59['activate'](_0x2b229f,_0x1acebf);}else{this['logger']['error']('quorum-activation-error',{'version':_0x1acebf});throw new Error('UntilVersion\x20Not\x20Received.\x20Version\x20'+_0x1acebf+'\x20not\x20activated');}}else{this['logger']['warn']('quorum-rollcall-error',{'q1':_0x4ec794,'q2':_0x49dd06,'q3':_0x553556,'count':_0x5d2f3c}),this['store']['releaseScoutRole']('activate');if(_0x5d2f3c<enums_1['HMSH_ACTIVATION_MAX_RETRY'])return await this['activate'](_0x1acebf,_0x11894d*0x2,_0x5d2f3c+0x1);throw new Error('Quorum\x20not\x20reached.\x20Version\x20'+_0x1acebf+'\x20not\x20activated.');}}}function _0xd132(_0x52a4b7,_0x2dc764){const _0x489a5f=_0x489a();return _0xd132=function(_0xd13263,_0x4ecf43){_0xd13263=_0xd13263-0x136;let _0x3736fd=_0x489a5f[_0xd13263];return _0x3736fd;},_0xd132(_0x52a4b7,_0x2dc764);}exports['QuorumService']=QuorumService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0x422e93,_0x1e79c6){const _0xecc142=_0x2882,_0x489053=_0x422e93();while(!![]){try{const _0x3a71a4=-parseInt(_0xecc142(0x159))/0x1*(-parseInt(_0xecc142(0x157))/0x2)+-parseInt(_0xecc142(0x14f))/0x3*(-parseInt(_0xecc142(0x152))/0x4)+-parseInt(_0xecc142(0x150))/0x5+-parseInt(_0xecc142(0x153))/0x6*(-parseInt(_0xecc142(0x155))/0x7)+-parseInt(_0xecc142(0x151))/0x8+-parseInt(_0xecc142(0x154))/0x9*(parseInt(_0xecc142(0x15a))/0xa)+parseInt(_0xecc142(0x158))/0xb*(parseInt(_0xecc142(0x156))/0xc);if(_0x3a71a4===_0x1e79c6)break;else _0x489053['push'](_0x489053['shift']());}catch(_0x3da85a){_0x489053['push'](_0x489053['shift']());}}}(_0x1fb4,0xe68e4));function _0x2882(_0x2a3d85,_0x3d9c1d){const _0x1fb46c=_0x1fb4();return _0x2882=function(_0x28827b,_0x213123){_0x28827b=_0x28827b-0x14f;let _0x2f96c2=_0x1fb46c[_0x28827b];return _0x2f96c2;},_0x2882(_0x2a3d85,_0x3d9c1d);}function _0x1fb4(){const _0x1aa27a=['176aJSvob','6IUwcuZ','378jgxGbq','3774995PvjBjR','1833564GNtjHD','13894FfiEPX','44exhPzV','143kWxXye','71210sUhHjv','17013OGNbhT','830165ErekKf','7871576KzgzEw'];_0x1fb4=function(){return _0x1aa27a;};return _0x1fb4();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ReporterService']=void 0x0;const pipe_1=require('../pipe');class ReporterService{constructor(_0x32ee35,_0x53f8a4,_0x4878b9){this['appVersion']=_0x32ee35,this['logger']=_0x4878b9,this['store']=_0x53f8a4;}async['getStats'](_0x16588e){this['logger']['debug']('reporter-getstats-started',_0x16588e);const {key:_0x4e5e4f,granularity:_0x6d749c,range:_0x216154,end:_0x5a88ce,start:_0x80d692}=_0x16588e;this['validateOptions'](_0x16588e);const _0x5f009d=this['generateDateTimeSets'](_0x6d749c,_0x216154,_0x5a88ce,_0x80d692),_0x40a252=_0x5f009d['map'](_0x3ee05b=>this['buildRedisKey'](_0x4e5e4f,_0x3ee05b)),_0x2da355=await this['store']['getJobStats'](_0x40a252),[_0x498f49,_0x5e56b7]=this['aggregateData'](_0x2da355),_0x37337d=this['buildStatsResponse'](_0x2da355,_0x40a252,_0x5e56b7,_0x498f49,_0x16588e);return _0x37337d;}['validateOptions'](_0x3afa2a){const {start:_0x444ffa,end:_0x3b9558,range:_0x152477,granularity:_0x24ccf4}=_0x3afa2a;if(_0x24ccf4!=='infinity'&&(_0x444ffa&&_0x3b9558&&_0x152477||!_0x444ffa&&!_0x3b9558&&!_0x152477))throw new Error('Invalid\x20combination\x20of\x20start,\x20end,\x20and\x20range\x20values.\x20Provide\x20either\x20start+end,\x20end+range,\x20or\x20start+range.');}['generateDateTimeSets'](_0x22150f,_0x515811,_0x373cc3,_0x4f1514){if(_0x22150f==='infinity')return['0'];!_0x515811&&(_0x515811='0m');const _0x159071={'5m':0x5,'10m':0xa,'15m':0xf,'30m':0x1e,'1h':0x3c},_0x3a74ad=_0x159071[_0x22150f];if(!_0x3a74ad)throw new Error('Invalid\x20granularity\x20value.');const _0x2b778f=this['convertRangeToMinutes'](_0x515811);if(_0x2b778f===null)throw new Error('Invalid\x20range\x20value.');let _0x129e33,_0x3ac9e1;_0x4f1514?(_0x129e33=new Date(_0x4f1514),_0x3ac9e1=new Date(_0x129e33['getTime']()+_0x2b778f*0x3c*0x3e8)):(_0x3ac9e1=_0x373cc3==='NOW'?new Date():new Date(_0x373cc3),_0x129e33=new Date(_0x3ac9e1['getTime']()-_0x2b778f*0x3c*0x3e8));_0x129e33['setUTCMinutes'](Math['floor'](_0x129e33['getUTCMinutes']()/_0x3a74ad)*_0x3a74ad);const _0x11fe16=[];for(let _0x53fccc=_0x129e33;_0x53fccc<=_0x3ac9e1;_0x53fccc['setUTCMinutes'](_0x53fccc['getUTCMinutes']()+_0x3a74ad)){const _0x32d2bc=[_0x53fccc['getUTCFullYear'](),String(_0x53fccc['getUTCMonth']()+0x1)['padStart'](0x2,'0'),String(_0x53fccc['getUTCDate']())['padStart'](0x2,'0'),String(_0x53fccc['getUTCHours']())['padStart'](0x2,'0'),String(_0x53fccc['getUTCMinutes']())['padStart'](0x2,'0')]['join']('');_0x11fe16['push'](_0x32d2bc);}return _0x11fe16;}['convertRangeToMinutes'](_0x40313a){const _0x5740a2=_0x40313a['slice'](-0x1),_0x38dc1d=parseInt(_0x40313a['slice'](0x0,-0x1),0xa);if(isNaN(_0x38dc1d))return null;switch(_0x5740a2){case'm':return _0x38dc1d;case'h':return _0x38dc1d*0x3c;case'd':return _0x38dc1d*0x3c*0x18;default:return null;}}['buildRedisKey'](_0xbd0066,_0x4a329f,_0x5745bc=''){return'hmsh:'+this['appVersion']['id']+':s:'+_0xbd0066+':'+_0x4a329f+(_0x5745bc?':'+_0x5745bc:'');}['aggregateData'](_0x435068){const _0x556f41={};let _0x68057e=0x0;return Object['entries'](_0x435068)['forEach'](([_0x2f44b4,_0x2d7eb4])=>{for(const _0x4ef962 in _0x2d7eb4){if(_0x4ef962['startsWith']('count:')){const _0xdf7d72=_0x4ef962['slice']('count:'['length']);!_0x556f41[_0xdf7d72]&&(_0x556f41[_0xdf7d72]=0x0),_0x556f41[_0xdf7d72]+=_0x2d7eb4[_0x4ef962];}else _0x4ef962==='count'&&(_0x68057e+=_0x2d7eb4[_0x4ef962]);}}),[_0x68057e,_0x556f41];}['buildStatsResponse'](_0x90b190,_0x2bba3e,_0x1456ca,_0x5d70a5,_0x3abffc){const _0x3588af=[],_0x21f0eb=Object['keys'](_0x1456ca)['filter'](_0x5879b4=>_0x5879b4!=='count');let _0x2e9b88=undefined;_0x3abffc['sparse']!==!![]&&(_0x2e9b88=this['handleSegments'](_0x90b190,_0x2bba3e));_0x21f0eb['forEach'](_0x38c0d=>{const _0x44788b={'target':_0x38c0d,'type':'count','value':_0x1456ca[_0x38c0d]};_0x3588af['push'](_0x44788b);});const _0x2a9140={'key':_0x3abffc['key'],'granularity':_0x3abffc['granularity'],'range':_0x3abffc['range'],'end':_0x3abffc['end'],'count':_0x5d70a5,'measures':_0x3588af};return _0x2e9b88&&(_0x2a9140['segments']=_0x2e9b88),_0x2a9140;}['handleSegments'](_0x31284e,_0x310207){const _0x48fa98=[];return _0x310207['forEach']((_0x1442fe,_0xff8cc0)=>{const _0xaeb0a3=[];_0x31284e[_0x1442fe]&&Object['entries'](_0x31284e[_0x1442fe])['forEach'](([_0x4ef461,_0xd303ea])=>{if(_0x4ef461['startsWith']('count:')){const _0x54db3d=_0x4ef461['slice']('count:'['length']);_0xaeb0a3['push']({'target':_0x54db3d,'type':'count','value':_0xd303ea});}});const _0x410fce=this['isoTimestampFromKeyTimestamp'](_0x1442fe),_0x4929c9=_0x31284e[_0x1442fe]?_0x31284e[_0x1442fe]['count']:0x0;_0x48fa98['push']({'count':_0x4929c9,'time':_0x410fce,'measures':_0xaeb0a3});}),_0x48fa98;}['isoTimestampFromKeyTimestamp'](_0x417ae2){if(_0x417ae2['endsWith'](':'))return'0';const _0x1005d3=_0x417ae2['slice'](-0xc),_0x4c38d2=_0x1005d3['slice'](0x0,0x4),_0x2ffc23=_0x1005d3['slice'](0x4,0x6),_0x405da9=_0x1005d3['slice'](0x6,0x8),_0x4e18d3=_0x1005d3['slice'](0x8,0xa),_0x8a025c=_0x1005d3['slice'](0xa,0xc);return _0x4c38d2+'-'+_0x2ffc23+'-'+_0x405da9+'T'+_0x4e18d3+':'+_0x8a025c+'Z';}async['getIds'](_0xaaaed6,_0x3061b3,_0x287b19=[0x0,-0x1]){if(!_0x3061b3['length']){const _0x44fa8c=await this['getStats'](_0xaaaed6);_0x3061b3=this['getUniqueFacets'](_0x44fa8c);}const {key:_0x19bac9,granularity:_0x158d6a,range:_0xf3c650,end:_0x3f8641,start:_0x34972f}=_0xaaaed6;this['validateOptions'](_0xaaaed6);let _0x5e0ab6=[];_0x3061b3['forEach'](_0x4a6a5d=>{const _0x2c96fd=this['generateDateTimeSets'](_0x158d6a,_0xf3c650,_0x3f8641,_0x34972f);_0x5e0ab6=_0x5e0ab6['concat'](_0x2c96fd['map'](_0x546b0f=>this['buildRedisKey'](_0x19bac9,_0x546b0f,'index:'+_0x4a6a5d)));});const _0x19ef91=await this['store']['getJobIds'](_0x5e0ab6,_0x287b19),_0xf18f1a=this['buildIdsResponse'](_0x19ef91,_0xaaaed6,_0x3061b3);return _0xf18f1a;}['buildIdsResponse'](_0x2cdb02,_0x34f924,_0x2be867){const _0xf3656f={},_0x5c9449=Object['keys'](_0x2cdb02);_0x5c9449['forEach'](_0xaf1cf9=>{const _0x44d5a0=this['getTargetForKey'](_0xaf1cf9),_0x470840=_0x2cdb02[_0xaf1cf9]['length'];_0xf3656f[_0x44d5a0]?_0xf3656f[_0x44d5a0]+=_0x470840:_0xf3656f[_0x44d5a0]=_0x470840;});const _0x42c9e0=Object['entries'](_0xf3656f)['map'](([_0x71e36b,_0xd8ab88])=>({'facet':_0x71e36b,'count':_0xd8ab88})),_0x51468d={'key':_0x34f924['key'],'facets':_0x2be867,'granularity':_0x34f924['granularity'],'range':_0x34f924['range'],'start':_0x34f924['start'],'counts':_0x42c9e0,'segments':this['buildTimeSegments'](_0x2cdb02)};return _0x51468d;}['buildTimeSegments'](_0x96fe1b){const _0x266fea=Object['keys'](_0x96fe1b),_0x1fdf80={};_0x266fea['forEach'](_0xeaa01e=>{const _0x469842={'type':'ids','target':this['getTargetForKey'](_0xeaa01e),'time':this['isoTimestampFromKeyTimestamp'](this['getTargetForTime'](_0xeaa01e)),'count':_0x96fe1b[_0xeaa01e]['length'],'ids':_0x96fe1b[_0xeaa01e]};_0x1fdf80[_0x469842['time']]?_0x1fdf80[_0x469842['time']]['push'](_0x469842):_0x1fdf80[_0x469842['time']]=[_0x469842];});const _0x307972=Object['entries'](_0x1fdf80)['map'](([_0x4e9da2,_0x1f5a07])=>({'time':_0x4e9da2,'measures':_0x1f5a07}));return _0x307972;}['getUniqueFacets'](_0x22abe0){const _0xdae3cd=_0x22abe0['measures']['map'](_0x2d3e60=>_0x2d3e60['target']);return Array['from'](new Set(_0xdae3cd));}['getTargetForKey'](_0x10faf2){return _0x10faf2['split'](':index:')[0x1];}['getTargetForTime'](_0x2d76e4){return _0x2d76e4['split'](':index:')[0x0];}async['getWorkItems'](_0x31ef5a,_0x1ec533){if(!_0x1ec533['length']){const _0xaa49c7=await this['getStats'](_0x31ef5a);_0x1ec533=this['getUniqueFacets'](_0xaa49c7);}const {key:_0x3bf13b,granularity:_0x271351,range:_0x3ea500,end:_0x581893,start:_0x11f4c7}=_0x31ef5a;this['validateOptions'](_0x31ef5a);let _0x16cc89=[];_0x1ec533['forEach'](_0x418ec0=>{const _0x33b118=this['generateDateTimeSets'](_0x271351,_0x3ea500,_0x581893,_0x11f4c7);_0x16cc89=_0x16cc89['concat'](_0x33b118['map'](_0x4975ea=>this['buildRedisKey'](_0x3bf13b,_0x4975ea,'index:'+_0x418ec0)));});const _0xde0834=await this['store']['getJobIds'](_0x16cc89,[0x0,0x1]),_0x4e566a=this['buildWorkerLists'](_0xde0834);return _0x4e566a;}['buildWorkerLists'](_0x340152){const _0x466b97=[];for(const _0x4c95b1 in _0x340152){_0x340152[_0x4c95b1]['length']&&_0x466b97['push'](_0x4c95b1);}return _0x466b97;}['resolveTriggerStatistics']({stats:_0x2c036b},_0x7ea67e){const _0x583cd3={'general':[],'index':[],'median':[]};_0x583cd3['general']['push']({'metric':'count','target':'count','value':0x1});for(const _0x2e5c24 of _0x2c036b['measures']){const _0x45e947=this['resolveMetric']({'metric':_0x2e5c24['measure'],'target':_0x2e5c24['target']},_0x7ea67e);if(this['isGeneralMetric'](_0x2e5c24['measure']))_0x583cd3['general']['push'](_0x45e947);else{if(this['isMedianMetric'](_0x2e5c24['measure']))_0x583cd3['median']['push'](_0x45e947);else this['isIndexMetric'](_0x2e5c24['measure'])&&_0x583cd3['index']['push'](_0x45e947);}}return _0x583cd3;}['isGeneralMetric'](_0x2fe025){return ReporterService['isGeneralMetric'](_0x2fe025);}['isMedianMetric'](_0x1cbfcd){return ReporterService['isMedianMetric'](_0x1cbfcd);}['isIndexMetric'](_0x34a956){return ReporterService['isIndexMetric'](_0x34a956);}static['isGeneralMetric'](_0x453e3f){return _0x453e3f==='sum'||_0x453e3f==='avg'||_0x453e3f==='count';}static['isMedianMetric'](_0x348070){return _0x348070==='mdn';}static['isIndexMetric'](_0x3a7805){return _0x3a7805==='index';}['resolveMetric']({metric:_0x4d288f,target:_0x5bf826},_0x57bc9c){const _0x29f9b9=new pipe_1['Pipe']([[_0x5bf826]],_0x57bc9c),_0x547cb8=_0x29f9b9['process']()['toString'](),_0x350588=this['resolveTarget'](_0x4d288f,_0x5bf826,_0x547cb8);if(_0x4d288f==='index')return{'metric':_0x4d288f,'target':_0x350588,'value':_0x57bc9c['metadata']['jid']};else{if(_0x4d288f==='count')return{'metric':_0x4d288f,'target':_0x350588,'value':0x1};}return{'metric':_0x4d288f,'target':_0x350588,'value':_0x547cb8};}['isCardinalMetric'](_0x460bdf){return _0x460bdf==='index'||_0x460bdf==='count';}['resolveTarget'](_0x309b13,_0x40ce5a,_0x5ede3b){const _0x1f8b30=_0x40ce5a['substring'](0x1,_0x40ce5a['length']-0x1),_0x3c2e96=_0x1f8b30['split']('.')['slice'](0x3)['join']('/');let _0x34a5e8;return this['isCardinalMetric'](_0x309b13)?_0x34a5e8=_0x309b13+':'+_0x3c2e96+':'+_0x5ede3b:_0x34a5e8=_0x309b13+':'+_0x3c2e96,_0x34a5e8;}}exports['ReporterService']=ReporterService,ReporterService['DEFAULT_GRANULARITY']='5m';
|
|
1
|
+
'use strict';(function(_0x9cc663,_0x2466f8){const _0x287973=_0x3006,_0x4dc5b8=_0x9cc663();while(!![]){try{const _0x24a3c0=parseInt(_0x287973(0x81))/0x1+-parseInt(_0x287973(0x83))/0x2+parseInt(_0x287973(0x7e))/0x3+-parseInt(_0x287973(0x7c))/0x4*(parseInt(_0x287973(0x7d))/0x5)+-parseInt(_0x287973(0x82))/0x6+parseInt(_0x287973(0x7f))/0x7*(-parseInt(_0x287973(0x84))/0x8)+parseInt(_0x287973(0x80))/0x9;if(_0x24a3c0===_0x2466f8)break;else _0x4dc5b8['push'](_0x4dc5b8['shift']());}catch(_0x101bfe){_0x4dc5b8['push'](_0x4dc5b8['shift']());}}}(_0x2c31,0xe14bf));function _0x3006(_0x15f6cf,_0x533e69){const _0x2c31bf=_0x2c31();return _0x3006=function(_0x300614,_0x40c196){_0x300614=_0x300614-0x7c;let _0x2f1daf=_0x2c31bf[_0x300614];return _0x2f1daf;},_0x3006(_0x15f6cf,_0x533e69);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ReporterService']=void 0x0;const pipe_1=require('../pipe');function _0x2c31(){const _0x6553c4=['2066439JrIwwQ','21eLpLbL','26275707HuoYPj','1626464nMvUUG','4197870gqeWOl','1453036eEkTpd','4811008BDxiWw','4326776wTreuZ','5VRkNoo'];_0x2c31=function(){return _0x6553c4;};return _0x2c31();}class ReporterService{constructor(_0x2f089a,_0x31ab60,_0x1ca42b){this['appVersion']=_0x2f089a,this['logger']=_0x1ca42b,this['store']=_0x31ab60;}async['getStats'](_0x1a5386){this['logger']['debug']('reporter-getstats-started',_0x1a5386);const {key:_0x43adf1,granularity:_0x2f2bed,range:_0x154ece,end:_0x3691d6,start:_0x7bf4ed}=_0x1a5386;this['validateOptions'](_0x1a5386);const _0x52e4f9=this['generateDateTimeSets'](_0x2f2bed,_0x154ece,_0x3691d6,_0x7bf4ed),_0x1c24b9=_0x52e4f9['map'](_0x16eb0a=>this['buildRedisKey'](_0x43adf1,_0x16eb0a)),_0x2ddef3=await this['store']['getJobStats'](_0x1c24b9),[_0x8cbc05,_0x54c262]=this['aggregateData'](_0x2ddef3),_0x57e0f8=this['buildStatsResponse'](_0x2ddef3,_0x1c24b9,_0x54c262,_0x8cbc05,_0x1a5386);return _0x57e0f8;}['validateOptions'](_0x1a0f38){const {start:_0x5197f0,end:_0x5e7486,range:_0x4859a2,granularity:_0x41f31b}=_0x1a0f38;if(_0x41f31b!=='infinity'&&(_0x5197f0&&_0x5e7486&&_0x4859a2||!_0x5197f0&&!_0x5e7486&&!_0x4859a2))throw new Error('Invalid\x20combination\x20of\x20start,\x20end,\x20and\x20range\x20values.\x20Provide\x20either\x20start+end,\x20end+range,\x20or\x20start+range.');}['generateDateTimeSets'](_0x52c7e3,_0x19359f,_0x50010,_0x474144){if(_0x52c7e3==='infinity')return['0'];!_0x19359f&&(_0x19359f='0m');const _0x3616d5={'5m':0x5,'10m':0xa,'15m':0xf,'30m':0x1e,'1h':0x3c},_0x1eebf6=_0x3616d5[_0x52c7e3];if(!_0x1eebf6)throw new Error('Invalid\x20granularity\x20value.');const _0x28e311=this['convertRangeToMinutes'](_0x19359f);if(_0x28e311===null)throw new Error('Invalid\x20range\x20value.');let _0x4269a6,_0x5a72d3;_0x474144?(_0x4269a6=new Date(_0x474144),_0x5a72d3=new Date(_0x4269a6['getTime']()+_0x28e311*0x3c*0x3e8)):(_0x5a72d3=_0x50010==='NOW'?new Date():new Date(_0x50010),_0x4269a6=new Date(_0x5a72d3['getTime']()-_0x28e311*0x3c*0x3e8));_0x4269a6['setUTCMinutes'](Math['floor'](_0x4269a6['getUTCMinutes']()/_0x1eebf6)*_0x1eebf6);const _0x3fddbd=[];for(let _0x1c4592=_0x4269a6;_0x1c4592<=_0x5a72d3;_0x1c4592['setUTCMinutes'](_0x1c4592['getUTCMinutes']()+_0x1eebf6)){const _0x11cd48=[_0x1c4592['getUTCFullYear'](),String(_0x1c4592['getUTCMonth']()+0x1)['padStart'](0x2,'0'),String(_0x1c4592['getUTCDate']())['padStart'](0x2,'0'),String(_0x1c4592['getUTCHours']())['padStart'](0x2,'0'),String(_0x1c4592['getUTCMinutes']())['padStart'](0x2,'0')]['join']('');_0x3fddbd['push'](_0x11cd48);}return _0x3fddbd;}['convertRangeToMinutes'](_0x3b6092){const _0x5557ea=_0x3b6092['slice'](-0x1),_0x137afe=parseInt(_0x3b6092['slice'](0x0,-0x1),0xa);if(isNaN(_0x137afe))return null;switch(_0x5557ea){case'm':return _0x137afe;case'h':return _0x137afe*0x3c;case'd':return _0x137afe*0x3c*0x18;default:return null;}}['buildRedisKey'](_0x5ac1c7,_0x54bab7,_0x35e2b2=''){return'hmsh:'+this['appVersion']['id']+':s:'+_0x5ac1c7+':'+_0x54bab7+(_0x35e2b2?':'+_0x35e2b2:'');}['aggregateData'](_0x3bc142){const _0xaf5741={};let _0x389f35=0x0;return Object['entries'](_0x3bc142)['forEach'](([_0x1f47ef,_0x62e4fc])=>{for(const _0x227c36 in _0x62e4fc){if(_0x227c36['startsWith']('count:')){const _0x439e4d=_0x227c36['slice']('count:'['length']);!_0xaf5741[_0x439e4d]&&(_0xaf5741[_0x439e4d]=0x0),_0xaf5741[_0x439e4d]+=_0x62e4fc[_0x227c36];}else _0x227c36==='count'&&(_0x389f35+=_0x62e4fc[_0x227c36]);}}),[_0x389f35,_0xaf5741];}['buildStatsResponse'](_0x24297d,_0x465a30,_0x351bd4,_0x5966f7,_0x5a031a){const _0x30a701=[],_0x296141=Object['keys'](_0x351bd4)['filter'](_0x3ec59d=>_0x3ec59d!=='count');let _0x43efbd=undefined;_0x5a031a['sparse']!==!![]&&(_0x43efbd=this['handleSegments'](_0x24297d,_0x465a30));_0x296141['forEach'](_0x22cd3a=>{const _0x1a19cf={'target':_0x22cd3a,'type':'count','value':_0x351bd4[_0x22cd3a]};_0x30a701['push'](_0x1a19cf);});const _0x227504={'key':_0x5a031a['key'],'granularity':_0x5a031a['granularity'],'range':_0x5a031a['range'],'end':_0x5a031a['end'],'count':_0x5966f7,'measures':_0x30a701};return _0x43efbd&&(_0x227504['segments']=_0x43efbd),_0x227504;}['handleSegments'](_0x537d74,_0x3be230){const _0x5ba4b8=[];return _0x3be230['forEach']((_0x15d503,_0x2f6e6c)=>{const _0x17a51a=[];_0x537d74[_0x15d503]&&Object['entries'](_0x537d74[_0x15d503])['forEach'](([_0x29ab81,_0x57903b])=>{if(_0x29ab81['startsWith']('count:')){const _0x50d69f=_0x29ab81['slice']('count:'['length']);_0x17a51a['push']({'target':_0x50d69f,'type':'count','value':_0x57903b});}});const _0x43048c=this['isoTimestampFromKeyTimestamp'](_0x15d503),_0x94ca56=_0x537d74[_0x15d503]?_0x537d74[_0x15d503]['count']:0x0;_0x5ba4b8['push']({'count':_0x94ca56,'time':_0x43048c,'measures':_0x17a51a});}),_0x5ba4b8;}['isoTimestampFromKeyTimestamp'](_0x4bb647){if(_0x4bb647['endsWith'](':'))return'0';const _0x13eb80=_0x4bb647['slice'](-0xc),_0x4fa31a=_0x13eb80['slice'](0x0,0x4),_0x40617c=_0x13eb80['slice'](0x4,0x6),_0xd7f106=_0x13eb80['slice'](0x6,0x8),_0x40b5cf=_0x13eb80['slice'](0x8,0xa),_0x28a138=_0x13eb80['slice'](0xa,0xc);return _0x4fa31a+'-'+_0x40617c+'-'+_0xd7f106+'T'+_0x40b5cf+':'+_0x28a138+'Z';}async['getIds'](_0x3eda07,_0x2d503e,_0x50bd0d=[0x0,-0x1]){if(!_0x2d503e['length']){const _0x46bbe2=await this['getStats'](_0x3eda07);_0x2d503e=this['getUniqueFacets'](_0x46bbe2);}const {key:_0x2f71c0,granularity:_0x4e5bbd,range:_0xdffee2,end:_0x30ef51,start:_0x389ab8}=_0x3eda07;this['validateOptions'](_0x3eda07);let _0x5db61f=[];_0x2d503e['forEach'](_0xa0ec35=>{const _0x4e964d=this['generateDateTimeSets'](_0x4e5bbd,_0xdffee2,_0x30ef51,_0x389ab8);_0x5db61f=_0x5db61f['concat'](_0x4e964d['map'](_0xd3efc0=>this['buildRedisKey'](_0x2f71c0,_0xd3efc0,'index:'+_0xa0ec35)));});const _0xeb6c0e=await this['store']['getJobIds'](_0x5db61f,_0x50bd0d),_0x341952=this['buildIdsResponse'](_0xeb6c0e,_0x3eda07,_0x2d503e);return _0x341952;}['buildIdsResponse'](_0x11093f,_0x406601,_0x43ab07){const _0x48e45e={},_0x552aa9=Object['keys'](_0x11093f);_0x552aa9['forEach'](_0xf93059=>{const _0x20fe7d=this['getTargetForKey'](_0xf93059),_0x3aef5e=_0x11093f[_0xf93059]['length'];_0x48e45e[_0x20fe7d]?_0x48e45e[_0x20fe7d]+=_0x3aef5e:_0x48e45e[_0x20fe7d]=_0x3aef5e;});const _0x293803=Object['entries'](_0x48e45e)['map'](([_0x9d893f,_0x211f54])=>({'facet':_0x9d893f,'count':_0x211f54})),_0x5274de={'key':_0x406601['key'],'facets':_0x43ab07,'granularity':_0x406601['granularity'],'range':_0x406601['range'],'start':_0x406601['start'],'counts':_0x293803,'segments':this['buildTimeSegments'](_0x11093f)};return _0x5274de;}['buildTimeSegments'](_0xbec24){const _0x2697f5=Object['keys'](_0xbec24),_0x408787={};_0x2697f5['forEach'](_0x2d51d6=>{const _0x38a68e={'type':'ids','target':this['getTargetForKey'](_0x2d51d6),'time':this['isoTimestampFromKeyTimestamp'](this['getTargetForTime'](_0x2d51d6)),'count':_0xbec24[_0x2d51d6]['length'],'ids':_0xbec24[_0x2d51d6]};_0x408787[_0x38a68e['time']]?_0x408787[_0x38a68e['time']]['push'](_0x38a68e):_0x408787[_0x38a68e['time']]=[_0x38a68e];});const _0x254d4a=Object['entries'](_0x408787)['map'](([_0x389fa2,_0x370499])=>({'time':_0x389fa2,'measures':_0x370499}));return _0x254d4a;}['getUniqueFacets'](_0x56703b){const _0x1bc2d9=_0x56703b['measures']['map'](_0x2ecb0f=>_0x2ecb0f['target']);return Array['from'](new Set(_0x1bc2d9));}['getTargetForKey'](_0x3fd7a0){return _0x3fd7a0['split'](':index:')[0x1];}['getTargetForTime'](_0x221051){return _0x221051['split'](':index:')[0x0];}async['getWorkItems'](_0x9e5c2b,_0x4b1592){if(!_0x4b1592['length']){const _0x44f87e=await this['getStats'](_0x9e5c2b);_0x4b1592=this['getUniqueFacets'](_0x44f87e);}const {key:_0x17bc55,granularity:_0x28321b,range:_0x2c2bc9,end:_0x5876b5,start:_0x35c031}=_0x9e5c2b;this['validateOptions'](_0x9e5c2b);let _0x282bf1=[];_0x4b1592['forEach'](_0x19af69=>{const _0x3bd47e=this['generateDateTimeSets'](_0x28321b,_0x2c2bc9,_0x5876b5,_0x35c031);_0x282bf1=_0x282bf1['concat'](_0x3bd47e['map'](_0x518ac5=>this['buildRedisKey'](_0x17bc55,_0x518ac5,'index:'+_0x19af69)));});const _0x2952e5=await this['store']['getJobIds'](_0x282bf1,[0x0,0x1]),_0x5aadfa=this['buildWorkerLists'](_0x2952e5);return _0x5aadfa;}['buildWorkerLists'](_0x91fd53){const _0x549739=[];for(const _0x1d6d26 in _0x91fd53){_0x91fd53[_0x1d6d26]['length']&&_0x549739['push'](_0x1d6d26);}return _0x549739;}['resolveTriggerStatistics']({stats:_0x32edbc},_0x3c8e51){const _0x29cd6a={'general':[],'index':[],'median':[]};_0x29cd6a['general']['push']({'metric':'count','target':'count','value':0x1});for(const _0x5071a5 of _0x32edbc['measures']){const _0xf942e9=this['resolveMetric']({'metric':_0x5071a5['measure'],'target':_0x5071a5['target']},_0x3c8e51);if(this['isGeneralMetric'](_0x5071a5['measure']))_0x29cd6a['general']['push'](_0xf942e9);else{if(this['isMedianMetric'](_0x5071a5['measure']))_0x29cd6a['median']['push'](_0xf942e9);else this['isIndexMetric'](_0x5071a5['measure'])&&_0x29cd6a['index']['push'](_0xf942e9);}}return _0x29cd6a;}['isGeneralMetric'](_0x41fce8){return ReporterService['isGeneralMetric'](_0x41fce8);}['isMedianMetric'](_0xc18f09){return ReporterService['isMedianMetric'](_0xc18f09);}['isIndexMetric'](_0x2f305d){return ReporterService['isIndexMetric'](_0x2f305d);}static['isGeneralMetric'](_0xf6febe){return _0xf6febe==='sum'||_0xf6febe==='avg'||_0xf6febe==='count';}static['isMedianMetric'](_0x28de36){return _0x28de36==='mdn';}static['isIndexMetric'](_0x41e1b6){return _0x41e1b6==='index';}['resolveMetric']({metric:_0x4ba02,target:_0x5793f0},_0x459e0f){const _0x30f248=new pipe_1['Pipe']([[_0x5793f0]],_0x459e0f),_0x1b6f9c=_0x30f248['process']()['toString'](),_0x3b9b76=this['resolveTarget'](_0x4ba02,_0x5793f0,_0x1b6f9c);if(_0x4ba02==='index')return{'metric':_0x4ba02,'target':_0x3b9b76,'value':_0x459e0f['metadata']['jid']};else{if(_0x4ba02==='count')return{'metric':_0x4ba02,'target':_0x3b9b76,'value':0x1};}return{'metric':_0x4ba02,'target':_0x3b9b76,'value':_0x1b6f9c};}['isCardinalMetric'](_0xbc56ff){return _0xbc56ff==='index'||_0xbc56ff==='count';}['resolveTarget'](_0x4f503d,_0xb5cb57,_0x1a6a51){const _0x3155b8=_0xb5cb57['substring'](0x1,_0xb5cb57['length']-0x1),_0x1feb1f=_0x3155b8['split']('.')['slice'](0x3)['join']('/');let _0x4fdb9d;return this['isCardinalMetric'](_0x4f503d)?_0x4fdb9d=_0x4f503d+':'+_0x1feb1f+':'+_0x1a6a51:_0x4fdb9d=_0x4f503d+':'+_0x1feb1f,_0x4fdb9d;}}exports['ReporterService']=ReporterService,ReporterService['DEFAULT_GRANULARITY']='5m';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0x1b390d,_0x329882){const _0x466f0c=_0x505b,_0x19285e=_0x1b390d();while(!![]){try{const _0x638fcb=-parseInt(_0x466f0c(0x1c5))/0x1+parseInt(_0x466f0c(0x1c2))/0x2+-parseInt(_0x466f0c(0x1be))/0x3+-parseInt(_0x466f0c(0x1c1))/0x4*(parseInt(_0x466f0c(0x1c0))/0x5)+-parseInt(_0x466f0c(0x1bc))/0x6*(-parseInt(_0x466f0c(0x1bd))/0x7)+parseInt(_0x466f0c(0x1c3))/0x8*(-parseInt(_0x466f0c(0x1bf))/0x9)+parseInt(_0x466f0c(0x1c4))/0xa;if(_0x638fcb===_0x329882)break;else _0x19285e['push'](_0x19285e['shift']());}catch(_0x5c4a30){_0x19285e['push'](_0x19285e['shift']());}}}(_0x4bcb,0xe6ef4));function _0x4bcb(){const _0x1990db=['348152GYRYnw','1626dihrVX','12362sgdXho','281082sqqOjL','211968urLAjq','8380oOwPDp','2672PSviuM','626684aUfrDm','472SnlAJL','31049620boRHHI'];_0x4bcb=function(){return _0x1990db;};return _0x4bcb();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Router']=void 0x0;const enums_1=require('../../modules/enums'),key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');function _0x505b(_0x189214,_0x57b39a){const _0x4bcb2d=_0x4bcb();return _0x505b=function(_0x505bba,_0x559b24){_0x505bba=_0x505bba-0x1bc;let _0x44902d=_0x4bcb2d[_0x505bba];return _0x44902d;},_0x505b(_0x189214,_0x57b39a);}class Router{constructor(_0x3d81a0,_0x96b3e1,_0x4b5ac8){this['throttle']=0x0,this['errorCount']=0x0,this['counts']={},this['currentTimerId']=null,this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null,this['appId']=_0x3d81a0['appId'],this['guid']=_0x3d81a0['guid'],this['role']=_0x3d81a0['role'],this['topic']=_0x3d81a0['topic'],this['stream']=_0x96b3e1,this['throttle']=_0x3d81a0['throttle'],this['reclaimDelay']=_0x3d81a0['reclaimDelay']||enums_1['HMSH_XCLAIM_DELAY_MS'],this['reclaimCount']=_0x3d81a0['reclaimCount']||enums_1['HMSH_XCLAIM_COUNT'],this['logger']=_0x4b5ac8,this['readonly']=_0x3d81a0['readonly']||![],this['resetThrottleState']();}['resetThrottleState'](){this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null;}async['createGroup'](_0xddb81d,_0x5c0ce2){try{await this['stream']['createConsumerGroup'](_0xddb81d,_0x5c0ce2);}catch(_0x5aa35a){this['logger']['debug']('router-stream-group-exists',{'stream':_0xddb81d,'group':_0x5c0ce2});}}async['publishMessage'](_0x389f2a,_0x39adf8,_0x58157e){const _0x3f15b0=_0x39adf8?.['code']||'200';this['counts'][_0x3f15b0]=(this['counts'][_0x3f15b0]||0x0)+0x1;const _0x3f779e=this['stream']['mintKey'](key_1['KeyType']['STREAMS'],{'topic':_0x389f2a}),_0x4a6f49=await this['stream']['publishMessages'](_0x3f779e,[JSON['stringify'](_0x39adf8)],{'transaction':_0x58157e});return _0x4a6f49[0x0];}async['customSleep'](){if(this['throttle']===0x0)return;if(this['isSleeping'])return;this['isSleeping']=!![];const _0x326cd7=Date['now']();await new Promise(async _0x4b6909=>{this['sleepPromiseResolve']=_0x4b6909;let _0x579d85=Date['now']()-_0x326cd7;while(_0x579d85<this['throttle']){await new Promise(_0x81efb=>{this['innerPromiseResolve']=_0x81efb,this['sleepTimout']=setTimeout(_0x81efb,this['throttle']-_0x579d85);}),_0x579d85=Date['now']()-_0x326cd7;}this['resetThrottleState'](),_0x4b6909();});}async['consumeMessages'](_0x423b8a,_0xe30e8a,_0x563e15,_0xb83321){if(this['readonly']){this['logger']['info']('router-stream-readonly',{'group':_0xe30e8a,'consumer':_0x563e15,'stream':_0x423b8a});return;}this['logger']['info']('router-stream-starting',{'group':_0xe30e8a,'consumer':_0x563e15,'stream':_0x423b8a}),Router['instances']['add'](this),this['shouldConsume']=!![],await this['createGroup'](_0x423b8a,_0xe30e8a);let _0x468289=Date['now']();async function _0x5df8d2(){await this['customSleep']();if(this['isStopped'](_0xe30e8a,_0x563e15,_0x423b8a))return;else{if(this['isPaused']()){setImmediate(_0x5df8d2['bind'](this));return;}}const _0x472e91=enums_1['HMSH_BLOCK_TIME_MS']+Math['round'](enums_1['HMSH_BLOCK_TIME_MS']*Math['random']());try{const _0x1a7a65=await this['stream']['consumeMessages'](_0x423b8a,_0xe30e8a,_0x563e15,{'blockTimeout':_0x472e91});if(this['isStopped'](_0xe30e8a,_0x563e15,_0x423b8a))return;else{if(this['isPaused']()){setImmediate(_0x5df8d2['bind'](this));return;}}for(let _0x587432=0x0;_0x587432<_0x1a7a65['length'];_0x587432++){const _0x4e8ef5=_0x1a7a65[_0x587432];await this['consumeOne'](_0x423b8a,_0xe30e8a,_0x4e8ef5['id'],_0x4e8ef5['data'],_0xb83321);}const _0x14f374=Date['now']();if(this['stream']['getProviderSpecificFeatures']()['supportsRetry']&&_0x14f374-_0x468289>this['reclaimDelay']){_0x468289=_0x14f374;const _0x96ce8c=await this['stream']['retryMessages'](_0x423b8a,_0xe30e8a,{'consumerName':_0x563e15,'minIdleTime':this['reclaimDelay'],'limit':enums_1['HMSH_XPENDING_COUNT']});for(let _0x4ddfe9=0x0;_0x4ddfe9<_0x96ce8c['length'];_0x4ddfe9++){const _0x17cb0a=_0x96ce8c[_0x4ddfe9];await this['consumeOne'](_0x423b8a,_0xe30e8a,_0x17cb0a['id'],_0x17cb0a['data'],_0xb83321);}}setImmediate(_0x5df8d2['bind'](this));}catch(_0x5c471a){if(this['shouldConsume']&&process['env']['NODE_ENV']!=='test'){this['logger']['error']('router-stream-error',{'err':_0x5c471a,'stream':_0x423b8a,'group':_0xe30e8a,'consumer':_0x563e15}),this['errorCount']++;const _0x36802d=Math['min'](enums_1['HMSH_GRADUATED_INTERVAL_MS']*0x2**this['errorCount'],enums_1['HMSH_MAX_TIMEOUT_MS']);setTimeout(_0x5df8d2['bind'](this),_0x36802d);}}}_0x5df8d2['call'](this);}['isStreamMessage'](_0x128d0d){return Array['isArray'](_0x128d0d)&&Array['isArray'](_0x128d0d[0x0]);}['isPaused'](){return this['throttle']===enums_1['MAX_DELAY'];}['isStopped'](_0x4aa3c8,_0x592df3,_0x5d34d1){return!this['shouldConsume']&&this['logger']['info']('router-stream-stopped',{'group':_0x4aa3c8,'consumer':_0x592df3,'stream':_0x5d34d1}),!this['shouldConsume'];}async['consumeOne'](_0x556065,_0x51ee08,_0x2b1f17,_0x25d01d,_0x2ba9e1){this['logger']['debug']('stream-read-one',{'group':_0x51ee08,'stream':_0x556065,'id':_0x2b1f17});let _0x41b717,_0x308846;try{_0x308846=new telemetry_1['TelemetryService'](this['appId']),_0x308846['startStreamSpan'](_0x25d01d,this['role']),_0x41b717=await this['execStreamLeg'](_0x25d01d,_0x556065,_0x2b1f17,_0x2ba9e1['bind'](this)),_0x41b717?.['status']===stream_1['StreamStatus']['ERROR']&&_0x308846['setStreamError']('Function\x20Status\x20Code\x20'+(_0x41b717['code']||enums_1['HMSH_CODE_UNKNOWN'])),this['errorCount']=0x0;}catch(_0x2068a0){this['logger']['error']('stream-read-one-error',{'group':_0x51ee08,'stream':_0x556065,'id':_0x2b1f17,'err':_0x2068a0}),_0x308846['setStreamError'](_0x2068a0['message']);}const _0x3b63f5=await this['publishResponse'](_0x25d01d,_0x41b717);_0x308846['setStreamAttributes']({'app.worker.mid':_0x3b63f5}),await this['ackAndDelete'](_0x556065,_0x51ee08,_0x2b1f17),_0x308846['endStreamSpan'](),this['logger']['debug']('stream-read-one-end',{'group':_0x51ee08,'stream':_0x556065,'id':_0x2b1f17});}async['execStreamLeg'](_0x4c14fa,_0x19a4b1,_0x105d15,_0x23cd18){let _0xe6909a;try{_0xe6909a=await _0x23cd18(_0x4c14fa);}catch(_0x3252f7){this['logger']['error']('stream-call-function-error',{..._0x3252f7,'input':_0x4c14fa,'stack':_0x3252f7['stack'],'message':_0x3252f7['message'],'name':_0x3252f7['name'],'stream':_0x19a4b1,'id':_0x105d15}),_0xe6909a=this['structureUnhandledError'](_0x4c14fa,_0x3252f7);}return _0xe6909a;}async['ackAndDelete'](_0x37588f,_0x3125e2,_0x40810c){await this['stream']['ackAndDelete'](_0x37588f,_0x3125e2,[_0x40810c]);}async['publishResponse'](_0x57df5a,_0x4d9a58){if(_0x4d9a58&&typeof _0x4d9a58==='object'){if(_0x4d9a58['status']==='error'){const [_0x761648,_0x32691f]=this['shouldRetry'](_0x57df5a,_0x4d9a58);if(_0x761648)return await(0x0,utils_1['sleepFor'])(_0x32691f),await this['publishMessage'](_0x57df5a['metadata']['topic'],{'data':_0x57df5a['data'],'metadata':{..._0x57df5a['metadata'],'try':(_0x57df5a['metadata']['try']||0x0)+0x1},'policies':_0x57df5a['policies']});else _0x4d9a58=this['structureError'](_0x57df5a,_0x4d9a58);}else typeof _0x4d9a58['metadata']!=='object'?_0x4d9a58['metadata']={..._0x57df5a['metadata'],'guid':(0x0,utils_1['guid'])()}:_0x4d9a58['metadata']['guid']=(0x0,utils_1['guid'])();return _0x4d9a58['type']=stream_1['StreamDataType']['RESPONSE'],await this['publishMessage'](null,_0x4d9a58);}}['shouldRetry'](_0x1c4fc3,_0x309b2f){const _0x38cb35=_0x1c4fc3['policies']?.['retry'],_0x56c9d5=_0x309b2f['code']['toString'](),_0x3073ea=_0x38cb35?.[_0x56c9d5],_0x33fc7d=_0x3073ea?.[0x0],_0x351bc7=Math['min'](_0x1c4fc3['metadata']['try']||0x0,enums_1['HMSH_MAX_RETRIES']);if(_0x33fc7d>_0x351bc7)return[!![],Math['pow'](0xa,_0x351bc7+0x1)];return[![],0x0];}['structureUnhandledError'](_0x397f3b,_0x59c97a){const _0x568f7a={};return typeof _0x59c97a['message']==='string'?_0x568f7a['message']=_0x59c97a['message']:_0x568f7a['message']=enums_1['HMSH_STATUS_UNKNOWN'],typeof _0x59c97a['stack']==='string'&&(_0x568f7a['stack']=_0x59c97a['stack']),typeof _0x59c97a['name']==='string'&&(_0x568f7a['name']=_0x59c97a['name']),{'status':'error','code':enums_1['HMSH_CODE_UNKNOWN'],'metadata':{..._0x397f3b['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x568f7a};}['structureUnacknowledgedError'](_0x44b5c3){const _0x3d7a89='stream\x20message\x20max\x20delivery\x20count\x20exceeded',_0x23a360=enums_1['HMSH_CODE_UNACKED'],_0x417d86={'message':_0x3d7a89,'code':_0x23a360},_0x21fc1f={'metadata':{..._0x44b5c3['metadata'],'guid':(0x0,utils_1['guid'])()},'status':stream_1['StreamStatus']['ERROR'],'code':_0x23a360,'data':_0x417d86};return delete _0x21fc1f['metadata']['topic'],_0x21fc1f;}['structureError'](_0x7afedc,_0x533267){const _0x4a1170=_0x533267['data']?.['message']?_0x533267['data']?.['message']['toString']():enums_1['HMSH_STATUS_UNKNOWN'],_0x530db6=_0x533267['code']||_0x533267['data']?.['code'],_0x193592=isNaN(_0x530db6)?enums_1['HMSH_CODE_UNKNOWN']:parseInt(_0x530db6['toString']()),_0x2d25f0=_0x533267['data']?.['stack']?_0x533267['data']?.['stack']['toString']():undefined,_0x4e40c0={'message':_0x4a1170,'code':_0x193592,'stack':_0x2d25f0};return typeof _0x533267['data']?.['error']==='object'&&(_0x4e40c0['error']={..._0x533267['data']['error']}),{'status':stream_1['StreamStatus']['ERROR'],'code':_0x193592,'stack':_0x2d25f0,'metadata':{..._0x7afedc['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x4e40c0};}static async['stopConsuming'](){for(const _0x5e44dc of[...Router['instances']]){_0x5e44dc['stopConsuming']();}await(0x0,utils_1['sleepFor'])(enums_1['HMSH_BLOCK_TIME_MS']*0x2);}async['stopConsuming'](){this['shouldConsume']=![],this['logger']['info']('router-stream-stopping',this['topic']?{'topic':this['topic']}:undefined),this['cancelThrottle']();}['cancelThrottle'](){this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['resetThrottleState']();}['setThrottle'](_0x34fcaf){if(!Number['isInteger'](_0x34fcaf)||_0x34fcaf<0x0||_0x34fcaf>enums_1['MAX_DELAY'])throw new Error('Throttle\x20must\x20be\x20a\x20non-negative\x20integer\x20and\x20not\x20exceed\x20'+enums_1['MAX_DELAY']+'\x20ms;\x20send\x20-1\x20to\x20throttle\x20indefinitely');const _0x16abb9=_0x34fcaf<this['throttle'];this['throttle']=_0x34fcaf,_0x16abb9&&(this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['innerPromiseResolve']&&this['innerPromiseResolve']());}}exports['Router']=Router,Router['instances']=new Set();
|
|
1
|
+
'use strict';(function(_0x446bf4,_0xefc701){const _0x26eefb=_0x5572,_0x48353d=_0x446bf4();while(!![]){try{const _0x4734d0=-parseInt(_0x26eefb(0x19b))/0x1+-parseInt(_0x26eefb(0x1a1))/0x2*(parseInt(_0x26eefb(0x19a))/0x3)+parseInt(_0x26eefb(0x1a3))/0x4*(parseInt(_0x26eefb(0x1a2))/0x5)+parseInt(_0x26eefb(0x19f))/0x6+-parseInt(_0x26eefb(0x19c))/0x7*(-parseInt(_0x26eefb(0x19d))/0x8)+-parseInt(_0x26eefb(0x199))/0x9+-parseInt(_0x26eefb(0x19e))/0xa*(-parseInt(_0x26eefb(0x1a0))/0xb);if(_0x4734d0===_0xefc701)break;else _0x48353d['push'](_0x48353d['shift']());}catch(_0xb19551){_0x48353d['push'](_0x48353d['shift']());}}}(_0x4c32,0x83f02));function _0x4c32(){const _0x307fa1=['7525809steWfv','9crIOZz','526051MErOAh','7iKPUiR','8126344qgXyuG','5099110wtoYHf','1390482FgeAqw','22QDnMNd','485318fZQmCb','1755qyhINS','4140bagHjr'];_0x4c32=function(){return _0x307fa1;};return _0x4c32();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Router']=void 0x0;function _0x5572(_0x46ec5d,_0x127c87){const _0x4c32bf=_0x4c32();return _0x5572=function(_0x557283,_0x80c4ad){_0x557283=_0x557283-0x199;let _0x5c381f=_0x4c32bf[_0x557283];return _0x5c381f;},_0x5572(_0x46ec5d,_0x127c87);}const enums_1=require('../../modules/enums'),key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');class Router{constructor(_0x5e6d72,_0x454f88,_0x14281b){this['throttle']=0x0,this['errorCount']=0x0,this['counts']={},this['currentTimerId']=null,this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null,this['appId']=_0x5e6d72['appId'],this['guid']=_0x5e6d72['guid'],this['role']=_0x5e6d72['role'],this['topic']=_0x5e6d72['topic'],this['stream']=_0x454f88,this['throttle']=_0x5e6d72['throttle'],this['reclaimDelay']=_0x5e6d72['reclaimDelay']||enums_1['HMSH_XCLAIM_DELAY_MS'],this['reclaimCount']=_0x5e6d72['reclaimCount']||enums_1['HMSH_XCLAIM_COUNT'],this['logger']=_0x14281b,this['readonly']=_0x5e6d72['readonly']||![],this['resetThrottleState']();}['resetThrottleState'](){this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null;}async['createGroup'](_0x33b54b,_0x4b358a){try{await this['stream']['createConsumerGroup'](_0x33b54b,_0x4b358a);}catch(_0x7050ff){this['logger']['debug']('router-stream-group-exists',{'stream':_0x33b54b,'group':_0x4b358a});}}async['publishMessage'](_0x19dfb5,_0x447b0a,_0x51c720){const _0x190532=_0x447b0a?.['code']||'200';this['counts'][_0x190532]=(this['counts'][_0x190532]||0x0)+0x1;const _0x4522e7=this['stream']['mintKey'](key_1['KeyType']['STREAMS'],{'topic':_0x19dfb5}),_0x6d4e3f=await this['stream']['publishMessages'](_0x4522e7,[JSON['stringify'](_0x447b0a)],{'transaction':_0x51c720});return _0x6d4e3f[0x0];}async['customSleep'](){if(this['throttle']===0x0)return;if(this['isSleeping'])return;this['isSleeping']=!![];const _0x649a48=Date['now']();await new Promise(async _0x47b79a=>{this['sleepPromiseResolve']=_0x47b79a;let _0x4acb25=Date['now']()-_0x649a48;while(_0x4acb25<this['throttle']){await new Promise(_0x5b6bb5=>{this['innerPromiseResolve']=_0x5b6bb5,this['sleepTimout']=setTimeout(_0x5b6bb5,this['throttle']-_0x4acb25);}),_0x4acb25=Date['now']()-_0x649a48;}this['resetThrottleState'](),_0x47b79a();});}async['consumeMessages'](_0x169173,_0x10a969,_0x2f4548,_0x3e4d61){if(this['readonly']){this['logger']['info']('router-stream-readonly',{'group':_0x10a969,'consumer':_0x2f4548,'stream':_0x169173});return;}this['logger']['info']('router-stream-starting',{'group':_0x10a969,'consumer':_0x2f4548,'stream':_0x169173}),Router['instances']['add'](this),this['shouldConsume']=!![],await this['createGroup'](_0x169173,_0x10a969);let _0x1f23cb=Date['now']();async function _0x3e1e34(){await this['customSleep']();if(this['isStopped'](_0x10a969,_0x2f4548,_0x169173))return;else{if(this['isPaused']()){setImmediate(_0x3e1e34['bind'](this));return;}}const _0x390564=enums_1['HMSH_BLOCK_TIME_MS']+Math['round'](enums_1['HMSH_BLOCK_TIME_MS']*Math['random']());try{const _0x91b179=await this['stream']['consumeMessages'](_0x169173,_0x10a969,_0x2f4548,{'blockTimeout':_0x390564});if(this['isStopped'](_0x10a969,_0x2f4548,_0x169173))return;else{if(this['isPaused']()){setImmediate(_0x3e1e34['bind'](this));return;}}for(let _0x5ca051=0x0;_0x5ca051<_0x91b179['length'];_0x5ca051++){const _0x1a1bf1=_0x91b179[_0x5ca051];await this['consumeOne'](_0x169173,_0x10a969,_0x1a1bf1['id'],_0x1a1bf1['data'],_0x3e4d61);}const _0x2d303c=Date['now']();if(this['stream']['getProviderSpecificFeatures']()['supportsRetry']&&_0x2d303c-_0x1f23cb>this['reclaimDelay']){_0x1f23cb=_0x2d303c;const _0x2cac94=await this['stream']['retryMessages'](_0x169173,_0x10a969,{'consumerName':_0x2f4548,'minIdleTime':this['reclaimDelay'],'limit':enums_1['HMSH_XPENDING_COUNT']});for(let _0x52a0a1=0x0;_0x52a0a1<_0x2cac94['length'];_0x52a0a1++){const _0x30ed6a=_0x2cac94[_0x52a0a1];await this['consumeOne'](_0x169173,_0x10a969,_0x30ed6a['id'],_0x30ed6a['data'],_0x3e4d61);}}setImmediate(_0x3e1e34['bind'](this));}catch(_0x33c778){if(this['shouldConsume']&&process['env']['NODE_ENV']!=='test'){this['logger']['error']('router-stream-error',{'err':_0x33c778,'stream':_0x169173,'group':_0x10a969,'consumer':_0x2f4548}),this['errorCount']++;const _0x1426e1=Math['min'](enums_1['HMSH_GRADUATED_INTERVAL_MS']*0x2**this['errorCount'],enums_1['HMSH_MAX_TIMEOUT_MS']);setTimeout(_0x3e1e34['bind'](this),_0x1426e1);}}}_0x3e1e34['call'](this);}['isStreamMessage'](_0x120658){return Array['isArray'](_0x120658)&&Array['isArray'](_0x120658[0x0]);}['isPaused'](){return this['throttle']===enums_1['MAX_DELAY'];}['isStopped'](_0x1d7bf4,_0x1efbd0,_0xbfbd34){return!this['shouldConsume']&&this['logger']['info']('router-stream-stopped',{'group':_0x1d7bf4,'consumer':_0x1efbd0,'stream':_0xbfbd34}),!this['shouldConsume'];}async['consumeOne'](_0x2c23fe,_0x163f23,_0x41675f,_0x991fa7,_0x4d1538){this['logger']['debug']('stream-read-one',{'group':_0x163f23,'stream':_0x2c23fe,'id':_0x41675f});let _0x323218,_0x4bc2f9;try{_0x4bc2f9=new telemetry_1['TelemetryService'](this['appId']),_0x4bc2f9['startStreamSpan'](_0x991fa7,this['role']),_0x323218=await this['execStreamLeg'](_0x991fa7,_0x2c23fe,_0x41675f,_0x4d1538['bind'](this)),_0x323218?.['status']===stream_1['StreamStatus']['ERROR']&&_0x4bc2f9['setStreamError']('Function\x20Status\x20Code\x20'+(_0x323218['code']||enums_1['HMSH_CODE_UNKNOWN'])),this['errorCount']=0x0;}catch(_0x90c4e0){this['logger']['error']('stream-read-one-error',{'group':_0x163f23,'stream':_0x2c23fe,'id':_0x41675f,'err':_0x90c4e0}),_0x4bc2f9['setStreamError'](_0x90c4e0['message']);}const _0x17c24b=await this['publishResponse'](_0x991fa7,_0x323218);_0x4bc2f9['setStreamAttributes']({'app.worker.mid':_0x17c24b}),await this['ackAndDelete'](_0x2c23fe,_0x163f23,_0x41675f),_0x4bc2f9['endStreamSpan'](),this['logger']['debug']('stream-read-one-end',{'group':_0x163f23,'stream':_0x2c23fe,'id':_0x41675f});}async['execStreamLeg'](_0x4da855,_0x211f05,_0x276e27,_0xdc0403){let _0x5ac20b;try{_0x5ac20b=await _0xdc0403(_0x4da855);}catch(_0x34037e){this['logger']['error']('stream-call-function-error',{..._0x34037e,'input':_0x4da855,'stack':_0x34037e['stack'],'message':_0x34037e['message'],'name':_0x34037e['name'],'stream':_0x211f05,'id':_0x276e27}),_0x5ac20b=this['structureUnhandledError'](_0x4da855,_0x34037e);}return _0x5ac20b;}async['ackAndDelete'](_0x4bbb8,_0xe853fa,_0x154539){await this['stream']['ackAndDelete'](_0x4bbb8,_0xe853fa,[_0x154539]);}async['publishResponse'](_0x1aaa3e,_0x419768){if(_0x419768&&typeof _0x419768==='object'){if(_0x419768['status']==='error'){const [_0x11a003,_0x592c8d]=this['shouldRetry'](_0x1aaa3e,_0x419768);if(_0x11a003)return await(0x0,utils_1['sleepFor'])(_0x592c8d),await this['publishMessage'](_0x1aaa3e['metadata']['topic'],{'data':_0x1aaa3e['data'],'metadata':{..._0x1aaa3e['metadata'],'try':(_0x1aaa3e['metadata']['try']||0x0)+0x1},'policies':_0x1aaa3e['policies']});else _0x419768=this['structureError'](_0x1aaa3e,_0x419768);}else typeof _0x419768['metadata']!=='object'?_0x419768['metadata']={..._0x1aaa3e['metadata'],'guid':(0x0,utils_1['guid'])()}:_0x419768['metadata']['guid']=(0x0,utils_1['guid'])();return _0x419768['type']=stream_1['StreamDataType']['RESPONSE'],await this['publishMessage'](null,_0x419768);}}['shouldRetry'](_0x1f7432,_0x23d367){const _0x33fad8=_0x1f7432['policies']?.['retry'],_0x69b600=_0x23d367['code']['toString'](),_0x123710=_0x33fad8?.[_0x69b600],_0x57f205=_0x123710?.[0x0],_0x4cd26e=Math['min'](_0x1f7432['metadata']['try']||0x0,enums_1['HMSH_MAX_RETRIES']);if(_0x57f205>_0x4cd26e)return[!![],Math['pow'](0xa,_0x4cd26e+0x1)];return[![],0x0];}['structureUnhandledError'](_0x517a00,_0x4948f3){const _0x3ac969={};return typeof _0x4948f3['message']==='string'?_0x3ac969['message']=_0x4948f3['message']:_0x3ac969['message']=enums_1['HMSH_STATUS_UNKNOWN'],typeof _0x4948f3['stack']==='string'&&(_0x3ac969['stack']=_0x4948f3['stack']),typeof _0x4948f3['name']==='string'&&(_0x3ac969['name']=_0x4948f3['name']),{'status':'error','code':enums_1['HMSH_CODE_UNKNOWN'],'metadata':{..._0x517a00['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x3ac969};}['structureUnacknowledgedError'](_0x5d9106){const _0x5ad926='stream\x20message\x20max\x20delivery\x20count\x20exceeded',_0xdebad2=enums_1['HMSH_CODE_UNACKED'],_0x50ce51={'message':_0x5ad926,'code':_0xdebad2},_0x523e7d={'metadata':{..._0x5d9106['metadata'],'guid':(0x0,utils_1['guid'])()},'status':stream_1['StreamStatus']['ERROR'],'code':_0xdebad2,'data':_0x50ce51};return delete _0x523e7d['metadata']['topic'],_0x523e7d;}['structureError'](_0x299f62,_0x2544e5){const _0x2f6679=_0x2544e5['data']?.['message']?_0x2544e5['data']?.['message']['toString']():enums_1['HMSH_STATUS_UNKNOWN'],_0x17845b=_0x2544e5['code']||_0x2544e5['data']?.['code'],_0x401402=isNaN(_0x17845b)?enums_1['HMSH_CODE_UNKNOWN']:parseInt(_0x17845b['toString']()),_0x181ab1=_0x2544e5['data']?.['stack']?_0x2544e5['data']?.['stack']['toString']():undefined,_0x416ae9={'message':_0x2f6679,'code':_0x401402,'stack':_0x181ab1};return typeof _0x2544e5['data']?.['error']==='object'&&(_0x416ae9['error']={..._0x2544e5['data']['error']}),{'status':stream_1['StreamStatus']['ERROR'],'code':_0x401402,'stack':_0x181ab1,'metadata':{..._0x299f62['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x416ae9};}static async['stopConsuming'](){for(const _0x2a4eea of[...Router['instances']]){_0x2a4eea['stopConsuming']();}await(0x0,utils_1['sleepFor'])(enums_1['HMSH_BLOCK_TIME_MS']*0x2);}async['stopConsuming'](){this['shouldConsume']=![],this['logger']['info']('router-stream-stopping',this['topic']?{'topic':this['topic']}:undefined),this['cancelThrottle']();}['cancelThrottle'](){this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['resetThrottleState']();}['setThrottle'](_0x5396ca){if(!Number['isInteger'](_0x5396ca)||_0x5396ca<0x0||_0x5396ca>enums_1['MAX_DELAY'])throw new Error('Throttle\x20must\x20be\x20a\x20non-negative\x20integer\x20and\x20not\x20exceed\x20'+enums_1['MAX_DELAY']+'\x20ms;\x20send\x20-1\x20to\x20throttle\x20indefinitely');const _0x24c06d=_0x5396ca<this['throttle'];this['throttle']=_0x5396ca,_0x24c06d&&(this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['innerPromiseResolve']&&this['innerPromiseResolve']());}}exports['Router']=Router,Router['instances']=new Set();
|