remotepy 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/remotepy.minobs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x487b7e,_0xd9f44f){var _0x2ab95e=a0_0xecc8,_0x482762=_0x487b7e();while(!![]){try{var _0x231180=-parseInt(_0x2ab95e(0x9f))/0x1+parseInt(_0x2ab95e(0xdd))/0x2+-parseInt(_0x2ab95e(0xb3))/0x3*(parseInt(_0x2ab95e(0xca))/0x4)+parseInt(_0x2ab95e(0xc1))/0x5*(parseInt(_0x2ab95e(0xff))/0x6)+parseInt(_0x2ab95e(0xb7))/0x7*(-parseInt(_0x2ab95e(0xa7))/0x8)+parseInt(_0x2ab95e(0xa0))/0x9+parseInt(_0x2ab95e(0xf8))/0xa;if(_0x231180===_0xd9f44f)break;else _0x482762['push'](_0x482762['shift']());}catch(_0xa99e67){_0x482762['push'](_0x482762['shift']());}}}(a0_0x12bc,0x34613));import*as a0_0x2a6419 from'../node_modules/msgpack-lite';function RemotePyClient(_0x278d95,_0x4a376e){var _0x175535=a0_0xecc8;if(_0x278d95===undefined)this[_0x175535(0xd9)]=_0x175535(0x9d);else this[_0x175535(0xd9)]=_0x278d95;if(_0x4a376e===undefined)this[_0x175535(0x109)]=_0x175535(0x94);else this['clientPageId']=_0x4a376e;this['isOpen']=![],this[_0x175535(0xaa)]=[],this[_0x175535(0x96)]=[],this[_0x175535(0xf5)]=[],this['PythonFunctions']={},this[_0x175535(0xbd)]=null,this[_0x175535(0xf9)]={},this[_0x175535(0xe2)]={},this[_0x175535(0x92)]={},this['JS2Py']={};let _0x1cfcfe=null;this[_0x175535(0xf6)]=[],this[_0x175535(0xc0)]=[],this[_0x175535(0xbe)]=[],this[_0x175535(0xfc)]=[],this[_0x175535(0x100)]=[],this[_0x175535(0xae)]=[],this[_0x175535(0xed)]=_0xfb5a70=>this[_0x175535(0xf6)][_0x175535(0xef)](_0xfb5a70),this[_0x175535(0xad)]=_0x4d65b5=>this['PreCloseEventHandlers'][_0x175535(0xef)](_0x4d65b5),this[_0x175535(0xaf)]=_0x391d8b=>this[_0x175535(0xbe)][_0x175535(0xef)](_0x391d8b),this['addPostOpenEventHandler']=_0x2110b8=>this['PostOpenEventHandlers'][_0x175535(0xef)](_0x2110b8),this[_0x175535(0x10b)]=_0x12f192=>this[_0x175535(0x100)][_0x175535(0xef)](_0x12f192),this[_0x175535(0xfb)]=_0x147d57=>this[_0x175535(0xae)]['push'](_0x147d57),this[_0x175535(0xb2)]=function(){var _0x101958=_0x175535;return this[_0x101958(0xd9)]+'/'+this[_0x101958(0x109)];},this[_0x175535(0xee)]=function(_0x2dad63,..._0x11dc1a){var _0x203e27=_0x175535;for(var _0xac0da8=_0x11dc1a[_0x203e27(0xa1)]-0x1;_0xac0da8>=0x0;--_0xac0da8){if(typeof _0x11dc1a[_0xac0da8]!=='function')break;}var _0x2c9549=_0x11dc1a[_0x203e27(0xd5)](0x0,_0xac0da8+0x1),_0x363750=_0x11dc1a[_0x203e27(0xd5)](_0xac0da8+0x1);return[_0x2dad63,_0x2c9549,_0x363750];},this[_0x175535(0xa2)]=function(_0x12ed15,..._0x22ac23){var _0x46d7eb=_0x175535;this[_0x46d7eb(0xe2)][_0x12ed15]=_0x22ac23;},this['callMultipleCallbackPythonFunction']=function(_0x264b76,..._0x3cf07f){var _0xeb87f7=_0x175535,_0x3c4f00=this[_0xeb87f7(0xee)](_0x264b76,..._0x3cf07f);_0x264b76=_0x3c4f00[0x0];let _0x520cf1=_0x3c4f00[0x1][0x0],_0x54d027=_0x3c4f00[0x2];this[_0xeb87f7(0x106)]?(this[_0xeb87f7(0xbd)][_0xeb87f7(0x102)](JSON[_0xeb87f7(0xb6)]({'funcName':_0x264b76,'args':_0x520cf1,'session_id':this[_0xeb87f7(0xf1)]()})),console[_0xeb87f7(0xb5)](_0xeb87f7(0xb4)+_0x264b76+_0xeb87f7(0xd4),_0x520cf1)):console[_0xeb87f7(0xb5)](_0xeb87f7(0xc9)),_0x54d027[_0xeb87f7(0xa1)]>0x0&&this['registerMultipleCallbackPythonFunction'](_0x264b76,..._0x54d027);},this[_0x175535(0x101)]=function(_0x430151,_0x502cb9){var _0x690370=_0x175535,_0x54197f=this[_0x690370(0x96)][_0x690370(0xf3)](function(_0x27d010){return _0x27d010['funcName'];})[_0x690370(0x107)](_0x430151);_0x54197f<0x0?this[_0x690370(0x96)][_0x690370(0xef)]({'funcName':_0x430151,'callback':_0x502cb9}):this[_0x690370(0x96)][_0x54197f][_0x690370(0x10d)]=_0x502cb9;},this['getSessionId']=function(){var _0x4bd315=_0x175535;return sessionStorage[_0x4bd315(0xfd)](_0x4bd315(0xe4));},this['registerJSFunctionToBeCalledByPython']=function(_0x51d0e7,_0x33fccd){var _0x4b4cf1=_0x175535;this['jsFunctionDict'][_0x4b4cf1(0xef)]({'funcName':_0x51d0e7,'func':_0x33fccd});},this[_0x175535(0xd2)]=function(_0x2076f8,_0x120eae,_0x54f98f){var _0x85c181=_0x175535;this[_0x85c181(0x106)]?(this[_0x85c181(0xbd)][_0x85c181(0x102)](JSON[_0x85c181(0xb6)]({'funcName':_0x2076f8,'args':_0x120eae,'session_id':this['getSessionId']()})),console['log'](_0x85c181(0xb4)+_0x2076f8+_0x85c181(0xd4),_0x120eae)):console['log'](_0x85c181(0xc9));if(_0x54f98f===undefined){}else this[_0x85c181(0x101)](_0x2076f8,_0x54f98f);},this[_0x175535(0xcf)]=function(_0x22a94d,_0x1101a0,..._0x42203e){var _0x4ff490=_0x175535;this[_0x4ff490(0x97)](_0x22a94d,_0x1101a0,..._0x42203e);},this['callPythonFunctionBinary']=function(_0x33e396,_0x3bff6c,_0x1bec5e,_0x54ff46){var _0x468fcd=_0x175535;_0x3bff6c===undefined&&(_0x3bff6c={});_0x3bff6c[_0x468fcd(0xc7)]=!![],this[_0x468fcd(0xd2)](_0x33e396,_0x3bff6c);if(this[_0x468fcd(0x106)]){this[_0x468fcd(0xd0)](_0x1bec5e);if(_0x54ff46===undefined){}else this[_0x468fcd(0x101)](_0x33e396,_0x54ff46);}else console[_0x468fcd(0xb5)](_0x468fcd(0xc9));},this['sendBinary']=function(_0x5067ca){var _0x5aa7e6=_0x175535,_0x2c5f65=new FileReader();_0x2c5f65[_0x5aa7e6(0xe7)]=function(_0x2ab9e2){var _0x20b72b=_0x5aa7e6,_0x27b4a3=_0x2ab9e2[_0x20b72b(0xb8)]['result'];if(this[_0x20b72b(0xbd)]&&this[_0x20b72b(0xbd)][_0x20b72b(0xf4)]==0x1)this[_0x20b72b(0xbd)][_0x20b72b(0x102)](_0x27b4a3);},_0x2c5f65[_0x5aa7e6(0xc4)](_0x5067ca);},this[_0x175535(0xdc)]=function(_0x45b5a8){var _0x293a89=_0x175535;if(_0x45b5a8['type'][_0x293a89(0x105)](/image.*/)){console[_0x293a89(0xb5)](_0x293a89(0x9c),_0x45b5a8['type']);return;}var _0x3661c9=new FileReader();_0x3661c9[_0x293a89(0xe7)]=function(_0x39cff8){var _0x53d267=_0x293a89,_0x409551=_0x39cff8['target'][_0x53d267(0x108)];if(this['socket']&&this[_0x53d267(0xbd)][_0x53d267(0xf4)]==0x1)this[_0x53d267(0xbd)][_0x53d267(0x102)](_0x409551);},_0x3661c9[_0x293a89(0xc4)](_0x45b5a8);},this[_0x175535(0x103)]=function(_0x12c79b){var _0x5375dd=_0x175535;if(!_0x12c79b[_0x5375dd(0x10a)][_0x5375dd(0x105)](/image.*/)){console[_0x5375dd(0xb5)]('The\x20dropped\x20file\x20is\x20not\x20an\x20image:\x20',_0x12c79b[_0x5375dd(0x10a)]);return;}var _0x36ea10=new FileReader();_0x36ea10['onload']=function(_0x536eb4){var _0x4ef149=_0x5375dd,_0x4c3b87=_0x536eb4[_0x4ef149(0xb8)][_0x4ef149(0x108)];if(this[_0x4ef149(0xbd)]&&this[_0x4ef149(0xbd)][_0x4ef149(0xf4)]==0x1)this[_0x4ef149(0xbd)]['send'](_0x4c3b87);},_0x36ea10['readAsArrayBuffer'](_0x12c79b);},this[_0x175535(0xf0)]=function(_0x4b4efa){var _0x4ecd17=_0x175535;for(var _0x444bf8 in this['PythonFunctionsArgs']){var _0x1878b3=this[_0x4ecd17(0x92)][_0x444bf8];_0x1878b3['push'](_0x4ecd17(0xcd));var _0x334472='var\x20paramNames\x20=\x20this.PythonFunctionsArgs[\x27'+_0x444bf8+'\x27].slice(0,\x20-1);\x0a'+_0x4ecd17(0xd8)+_0x444bf8+_0x4ecd17(0xce);_0x1878b3[_0x4ecd17(0xef)](_0x334472),_0x1cfcfe=this;if(_0x444bf8[_0x4ecd17(0x107)]('.')>=0x0){var _0x1277aa=_0x444bf8[_0x4ecd17(0x9a)]('.'),_0x316e4c=this[_0x4ecd17(0xc3)];for(var _0x5af289=0x0;_0x5af289<_0x1277aa[_0x4ecd17(0xa1)]-0x1;_0x5af289++){!(_0x1277aa[_0x5af289]in _0x316e4c)&&(_0x316e4c[_0x1277aa[_0x5af289]]={}),_0x316e4c=_0x316e4c[_0x1277aa[_0x5af289]];}_0x316e4c[_0x1277aa[_0x1277aa[_0x4ecd17(0xa1)]-0x1]]=Function[_0x4ecd17(0xbb)](null,_0x1878b3)['bind'](this);}else this['PythonFunctions'][_0x444bf8]=Function['apply'](null,_0x1878b3)[_0x4ecd17(0xa9)](this);}},this['connect']=function(){var _0x114af8=_0x175535;this[_0x114af8(0x10f)]!==undefined&&this[_0x114af8(0x10f)]();var _0x2dcf3e=this['getServerString']();console[_0x114af8(0xb5)](_0x114af8(0xe0)+_0x2dcf3e+_0x114af8(0x95)),this[_0x114af8(0xbd)]=new WebSocket(_0x2dcf3e),this['socket'][_0x114af8(0xa3)]=_0x114af8(0x104),_0x1cfcfe=this,this[_0x114af8(0xbd)][_0x114af8(0xa4)]=function(){var _0x5f4b62=_0x114af8;console[_0x5f4b62(0xb5)](_0x5f4b62(0xdf)+_0x2dcf3e),_0x1cfcfe['PreOpenEventHandlers'][_0x5f4b62(0xd1)](_0x410965=>_0x410965()),_0x1cfcfe[_0x5f4b62(0x106)]=!![],_0x1cfcfe[_0x5f4b62(0xa4)]!==undefined&&(_0x1cfcfe['callMultipleCallbackPythonFunction'](_0x5f4b62(0xf2),{},function(_0x28231a){var _0x58b431=_0x5f4b62;_0x1cfcfe[_0x58b431(0x92)]={};for(var _0x17f2b4 in _0x28231a){_0x28231a[_0x17f2b4]['shift'](),_0x28231a[_0x17f2b4][0x0]==_0x58b431(0xc5)&&_0x28231a[_0x17f2b4][_0x58b431(0xcb)](),_0x1cfcfe[_0x58b431(0x92)][_0x17f2b4]=_0x28231a[_0x17f2b4];}_0x1cfcfe[_0x58b431(0xf0)](''),_0x1cfcfe[_0x58b431(0xa4)]();}),_0x1cfcfe[_0x5f4b62(0x97)](_0x5f4b62(0x9b),{},function(_0x2f4aa1){var _0x8acd9c=_0x5f4b62;_0x1cfcfe[_0x8acd9c(0xf9)]=_0x2f4aa1;})),_0x1cfcfe['PostOpenEventHandlers']['forEach'](_0x4bc4ef=>_0x4bc4ef());},this['socket'][_0x114af8(0xd3)]=function(_0x344d3e){var _0x465b50=_0x114af8;_0x1cfcfe[_0x465b50(0xbe)][_0x465b50(0xd1)](_0x40a124=>_0x40a124());_0x1cfcfe[_0x465b50(0xe8)]!==undefined&&_0x1cfcfe[_0x465b50(0xe8)](_0x344d3e);let _0x37bfb6=null;if(_0x344d3e['data']instanceof ArrayBuffer)try{const _0x3d7b52=a0_0x2a6419[_0x465b50(0xf7)](new Uint8Array(_0x344d3e[_0x465b50(0xb0)]));_0x37bfb6=_0x3d7b52;}catch(_0x943518){_0x37bfb6=null;}else typeof _0x344d3e['data']==_0x465b50(0xfa)&&(_0x37bfb6=JSON[_0x465b50(0xc8)](_0x344d3e[_0x465b50(0xb0)]));if(_0x37bfb6!==null){console[_0x465b50(0xb5)](_0x465b50(0xab),_0x37bfb6);if(_0x465b50(0x99)in _0x37bfb6){var _0x2d812a=_0x1cfcfe['jsFunctionDict'][_0x465b50(0xf3)](function(_0xf9ca41){return _0xf9ca41['funcName'];})[_0x465b50(0x107)](_0x37bfb6[_0x465b50(0x98)]);if(_0x2d812a>=0x0){var _0xaf8cb2=_0x1cfcfe[_0x465b50(0xaa)][_0x2d812a];_0x465b50(0xc7)in _0x37bfb6[_0x465b50(0x99)]?_0x1cfcfe[_0x465b50(0xf5)][_0x465b50(0xef)]({'funcName':_0x37bfb6['funcName'],'callback':_0xaf8cb2[_0x465b50(0xec)],'args':_0x37bfb6[_0x465b50(0x99)]}):_0xaf8cb2['func'](_0x37bfb6[_0x465b50(0x99)]);}else{if(_0x37bfb6[_0x465b50(0x98)]===_0x465b50(0xf2))return;else throw _0x465b50(0xeb)+_0x37bfb6[_0x465b50(0x98)];}}else{if('streaming'in _0x37bfb6){if(_0x37bfb6['funcName']in _0x1cfcfe[_0x465b50(0xe2)]){var _0x3c62c8=_0x1cfcfe[_0x465b50(0xe2)][_0x37bfb6[_0x465b50(0x98)]];switch(_0x3c62c8[_0x465b50(0xa1)]){case 0x0:break;case 0x1:if(_0x465b50(0xb9)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xb9)],![]);if(_0x465b50(0xbc)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6['streaming'],_0x37bfb6['return'],![]);break;case 0x2:if(_0x465b50(0xb9)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xb9)],![]);if(_0x465b50(0xbc)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xcc)],_0x37bfb6[_0x465b50(0xbc)],![]);if(_0x37bfb6['streaming']==_0x465b50(0xa8))_0x3c62c8[0x1](_0x37bfb6[_0x465b50(0xe1)],_0x37bfb6[_0x465b50(0x10e)],![]);break;case 0x3:if(_0x465b50(0xb9)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xb9)],![]);if(_0x37bfb6[_0x465b50(0xcc)]=='start')_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xbc)],![]);if(_0x37bfb6[_0x465b50(0xcc)]==_0x465b50(0xa8))_0x3c62c8[0x1](_0x37bfb6[_0x465b50(0xe1)],_0x37bfb6[_0x465b50(0x10e)],![]);if(_0x37bfb6['streaming']==_0x465b50(0xc6))_0x3c62c8[0x2](_0x37bfb6[_0x465b50(0xfe)],![]);break;case 0x4:if(_0x465b50(0xb9)in _0x37bfb6)_0x3c62c8[0x4](_0x37bfb6[_0x465b50(0xb9)],![]);if(_0x37bfb6[_0x465b50(0xcc)]=='start')_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xbc)],![]);if(_0x37bfb6[_0x465b50(0xcc)]=='row')_0x3c62c8[0x1](_0x37bfb6[_0x465b50(0xe1)],_0x37bfb6[_0x465b50(0x10e)],![]);if(_0x37bfb6[_0x465b50(0xcc)]==_0x465b50(0xc6))_0x3c62c8[0x2](_0x37bfb6[_0x465b50(0xfe)],![]);break;default:throw _0x465b50(0xea)+_0x37bfb6['funcName'];}}else throw'No\x20function\x20callback\x20defined\x20for\x20'+_0x37bfb6['funcName'];}else{if(_0x37bfb6[_0x465b50(0x98)]in _0x1cfcfe[_0x465b50(0xe2)]){var _0x3c62c8=_0x1cfcfe[_0x465b50(0xe2)][_0x37bfb6[_0x465b50(0x98)]];switch(_0x3c62c8[_0x465b50(0xa1)]){case 0x0:break;case 0x1:if(_0x465b50(0xb9)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xb9)],![]);if(_0x465b50(0xbc)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xbc)],![]);break;case 0x2:if(_0x465b50(0xb9)in _0x37bfb6)_0x3c62c8[0x1](_0x37bfb6['error'],![]);if(_0x465b50(0xbc)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xbc)],![]);break;case 0x3:if(_0x465b50(0xb9)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xb9)],![]);if(_0x465b50(0xbc)in _0x37bfb6)_0x3c62c8[0x0](_0x37bfb6[_0x465b50(0xbc)],![]);break;default:throw _0x465b50(0xea)+_0x37bfb6[_0x465b50(0x98)];}}else{var _0x2d812a=_0x1cfcfe[_0x465b50(0x96)][_0x465b50(0xf3)](function(_0x323051){var _0x40108c=_0x465b50;return _0x323051[_0x40108c(0x98)];})['indexOf'](_0x37bfb6['funcName']);if(_0x2d812a>=0x0){var _0xaf8cb2=_0x1cfcfe[_0x465b50(0x96)][_0x2d812a];_0x37bfb6['return']===undefined?_0x37bfb6[_0x465b50(0xb9)]!==undefined&&_0xaf8cb2[_0x465b50(0x10d)](_0x37bfb6[_0x465b50(0xb9)],![]):_0xaf8cb2[_0x465b50(0x10d)](_0x37bfb6[_0x465b50(0xbc)],!![]);}else throw _0x465b50(0xeb)+_0x37bfb6[_0x465b50(0x98)];}}}}else{console[_0x465b50(0xb5)](_0x465b50(0xdb));var _0x4b7ec5=new Uint8Array(_0x344d3e['data']),_0x2e80ec='\x20';for(var _0x35b861=0x0;_0x35b861<_0x4b7ec5[_0x465b50(0xa1)];_0x35b861++){_0x2e80ec+=(_0x465b50(0x10c)+_0x4b7ec5[_0x35b861][_0x465b50(0xe3)](0x10))[_0x465b50(0x93)](-0x2);}var _0xc9c9c1=_0x344d3e['data'],_0x1be199=new Uint8Array(_0xc9c9c1),_0x21d18f=new Blob([_0x1be199['buffer']]);if(_0x1cfcfe[_0x465b50(0xf5)][_0x465b50(0xa1)]>0x0){var _0xafca67=_0x1cfcfe[_0x465b50(0xf5)][_0x465b50(0xcb)]();_0xafca67[_0x465b50(0x99)][_0x465b50(0xc2)]=_0x21d18f,_0xafca67['callback'](_0xafca67[_0x465b50(0x99)]);}else{var _0x39fd26=new FileReader();_0x39fd26[_0x465b50(0xe7)]=function(_0x55e37a){var _0x247af6=_0x465b50,_0x4a1c07=document[_0x247af6(0xac)]('img');_0x4a1c07[_0x247af6(0xe5)]=_0x55e37a[_0x247af6(0xb8)]['result'],document[_0x247af6(0xb1)][_0x247af6(0xe6)](_0x4a1c07);},_0x39fd26[_0x465b50(0xa5)](_0x21d18f),document[_0x465b50(0xa6)](_0x465b50(0xe9))[_0x465b50(0x9e)]=_0x465b50(0xba);}console[_0x465b50(0xb5)](_0x465b50(0xd7),_0x2e80ec);}_0x1cfcfe['onmessageprocessed']!==undefined&&_0x1cfcfe['onmessageprocessed'](),_0x1cfcfe[_0x465b50(0xae)][_0x465b50(0xd1)](_0x31829f=>_0x31829f());},this[_0x114af8(0xbd)]['onclose']=function(_0x3f1b3d){var _0x3d0a3d=_0x114af8;console['log'](_0x3d0a3d(0xd6)+_0x2dcf3e+_0x3d0a3d(0xde)),_0x1cfcfe[_0x3d0a3d(0xc0)][_0x3d0a3d(0xd1)](_0x434d42=>_0x434d42(_0x3f1b3d)),_0x1cfcfe[_0x3d0a3d(0x106)]=![],this[_0x3d0a3d(0xbd)]=null,_0x1cfcfe['onclose']!==undefined&&_0x1cfcfe[_0x3d0a3d(0xda)](_0x3f1b3d),_0x1cfcfe['PostCloseEventHandlers'][_0x3d0a3d(0xd1)](_0x12b132=>_0x12b132(_0x3f1b3d));};},this[_0x175535(0xbf)]=function(){var _0x56d463=_0x175535;return this[_0x56d463(0xc3)];},this['getService']=function(_0x3ad19c){return this['PythonFunctions'][_0x3ad19c];};}export{RemotePyClient};function a0_0xecc8(_0x281c84,_0x231d36){var _0x12bcb7=a0_0x12bc();return a0_0xecc8=function(_0xecc8f1,_0x48b656){_0xecc8f1=_0xecc8f1-0x92;var _0x201168=_0x12bcb7[_0xecc8f1];return _0x201168;},a0_0xecc8(_0x281c84,_0x231d36);}function a0_0x12bc(){var _0x139ce4=['getElementById','824536cbYcFM','row','bind','jsFunctionDict','Message\x20received:\x20','createElement','addPreCloseEventHandler','PostMessageEventHandlers','addPreMessageEventHandler','data','body','getServerString','14127FYeebM','Function\x20:\x20','log','stringify','14aNUqrB','target','error','Chart\x20Loading\x20Completed\x20...','apply','return','socket','PreMessageEventHandlers','getServerAPI','PreCloseEventHandlers','76375RXcYLY','blob','PythonFunctions','readAsArrayBuffer','session_id','end','isBinary','parse','Connection\x20not\x20open.','76TjiUPq','shift','streaming','...func','\x27,\x20inputObject,\x20...func);','callPythonFunction','sendBinary','forEach','callFunc','onmessage','\x20called\x20with\x20arguments:\x20','slice','Connection\x20to\x20','message(b)\x20received\x20:\x20','var\x20args\x20=\x20Array.prototype.slice.call(arguments);\x20var\x20inputObject\x20=\x20{};\x20for(var\x20i\x20in\x20paramNames)\x20{\x20var\x20paramName\x20=\x20paramNames[i];\x20if(paramName\x20!=\x20\x27...func\x27)\x20{\x20inputObject[paramName]\x20=\x20args[i];}\x20}\x20return\x20this.callMultipleCallbackPythonFunction(\x27','serverName','onclose','No\x20msgpack\x20library\x20loaded','sendNonImageBinary','307062oAtaFw','\x20closed.','Connected\x20to\x20Server\x20:','Connecting\x20to\x20:\x20','stream_index','pythonMultipleCallbackDict','toString','JS2PY_SESSION_ID','src','appendChild','onload','onmessagereceived','StatusBar','Too\x20many\x20callbacks\x20for\x20','No\x20function\x20defined\x20for\x20','func','addPreOpenEventHandler','readCallbackArguments','push','createJSProxyFunctions','getSessionId','getPythonFunctionLibrary','map','readyState','binaryFunctionQueue','PreOpenEventHandlers','decode','2523780AecxsF','PythonFunctionsHelp','string','addPostMessageEventHandler','PostOpenEventHandlers','getItem','stream_empty','42LrRrJo','PostCloseEventHandlers','registerCallbackToPythonFunction','send','sendImageBinary','arraybuffer','match','isOpen','indexOf','result','clientPageId','type','addPostCloseEventHandler','00\x20','callback','stream_item','oninit','PythonFunctionsArgs','substr','wss','\x20...','pythonCallbackDict','callMultipleCallbackPythonFunction','funcName','args','split','getPythonFunctionLibraryHelp','The\x20dropped\x20file\x20is\x20an\x20image:\x20','ws://localhost:80','innerHTML','274481cNVwKr','2446191jrifrD','length','registerMultipleCallbackPythonFunction','binaryType','onopen','readAsDataURL'];a0_0x12bc=function(){return _0x139ce4;};return a0_0x12bc();}
|
|
1
|
+
(function(_0x2db585,_0x41f4ea){var _0x33db29=a0_0x37d9,_0x333bf1=_0x2db585();while(!![]){try{var _0x4d69e8=-parseInt(_0x33db29(0x1c1))/0x1+parseInt(_0x33db29(0x1c6))/0x2*(parseInt(_0x33db29(0x1cd))/0x3)+-parseInt(_0x33db29(0x198))/0x4+-parseInt(_0x33db29(0x1cf))/0x5+parseInt(_0x33db29(0x1d9))/0x6*(-parseInt(_0x33db29(0x1da))/0x7)+-parseInt(_0x33db29(0x1ce))/0x8*(parseInt(_0x33db29(0x19b))/0x9)+-parseInt(_0x33db29(0x176))/0xa*(-parseInt(_0x33db29(0x1b3))/0xb);if(_0x4d69e8===_0x41f4ea)break;else _0x333bf1['push'](_0x333bf1['shift']());}catch(_0xcdd6db){_0x333bf1['push'](_0x333bf1['shift']());}}}(a0_0x5a1c,0x9d7fc));function a0_0x37d9(_0x541d0f,_0x4caf62){var _0x5a1c1e=a0_0x5a1c();return a0_0x37d9=function(_0x37d9dd,_0x5c2375){_0x37d9dd=_0x37d9dd-0x16e;var _0xd05bf3=_0x5a1c1e[_0x37d9dd];return _0xd05bf3;},a0_0x37d9(_0x541d0f,_0x4caf62);}import*as a0_0x12a9f0 from'https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26';function a0_0x5a1c(){var _0x10fdf4=['data','connect','start','apply','socket','row','function','isBinary','\x27,\x20inputObject,\x20...func);','The\x20dropped\x20file\x20is\x20an\x20image:\x20','Too\x20many\x20callbacks\x20for\x20','createElement','763920yHajst','target','args','169407FbNXuO','wss','No\x20function\x20callback\x20defined\x20for\x20','stream_empty','result','PythonFunctionsHelp','PostOpenEventHandlers','buffer','Function\x20:\x20','...func','callPythonFunctionBinary','arraybuffer','slice','end','readAsArrayBuffer','Connecting\x20to\x20:\x20','error','No\x20function\x20defined\x20for\x20','\x20closed.','getService','JS2PY_SESSION_ID','registerCallbackToPythonFunction','stream_item','getSessionId','29194KgmKtS','getElementById','callPythonFunction','indexOf','createJSProxyFunctions','\x27].slice(0,\x20-1);\x0a','substr','PreOpenEventHandlers','readyState','onload','length','isOpen','\x20...','getPythonFunctionLibraryHelp','1203964UhUEGa','No\x20msgpack\x20library\x20loaded','decode','match','split','91928GzMsfm','callback','streaming','onmessageprocessed','map','getPythonFunctionLibrary','Connected\x20to\x20Server\x20:','3kVQXua','120uRxxiz','3422400kWEVEh','pythonCallbackDict','addPostOpenEventHandler','forEach','\x20called\x20with\x20arguments:\x20','shift','registerMultipleCallbackPythonFunction','binaryFunctionQueue','sendNonImageBinary','Connection\x20not\x20open.','186qcrTqO','250117NosjeJ','var\x20args\x20=\x20Array.prototype.slice.call(arguments);\x20var\x20inputObject\x20=\x20{};\x20for(var\x20i\x20in\x20paramNames)\x20{\x20var\x20paramName\x20=\x20paramNames[i];\x20if(paramName\x20!=\x20\x27...func\x27)\x20{\x20inputObject[paramName]\x20=\x20args[i];}\x20}\x20return\x20this.callMultipleCallbackPythonFunction(\x27','body','addPreCloseEventHandler','onmessagereceived','stringify','stream_index','innerHTML','toString','PostCloseEventHandlers','addPostCloseEventHandler','blob','img','return','funcName','Chart\x20Loading\x20Completed\x20...','clientPageId','serverName','log','callFunc','JS2Py','type','func','push','string','callMultipleCallbackPythonFunction','PythonFunctions','getItem','sendBinary','15330yJBfzB','onmessage','sendImageBinary','session_id','readAsDataURL','oninit','onopen','message(b)\x20received\x20:\x20','Connection\x20to\x20','getServerString','00\x20','registerJSFunctionToBeCalledByPython','onclose','PythonFunctionsArgs','PostMessageEventHandlers','PreMessageEventHandlers','parse','bind','StatusBar','pythonMultipleCallbackDict','jsFunctionDict','send'];a0_0x5a1c=function(){return _0x10fdf4;};return a0_0x5a1c();}function RemotePyClient(_0x49230f,_0x2c3688){var _0x5a344f=a0_0x37d9;if(_0x49230f===undefined)this[_0x5a344f(0x1eb)]='ws://localhost:80';else this[_0x5a344f(0x1eb)]=_0x49230f;if(_0x2c3688===undefined)this[_0x5a344f(0x1ea)]=_0x5a344f(0x19c);else this[_0x5a344f(0x1ea)]=_0x2c3688;this[_0x5a344f(0x1be)]=![],this[_0x5a344f(0x18a)]=[],this[_0x5a344f(0x1d0)]=[],this[_0x5a344f(0x1d6)]=[],this[_0x5a344f(0x173)]={},this['socket']=null,this[_0x5a344f(0x1a0)]={},this[_0x5a344f(0x189)]={},this[_0x5a344f(0x183)]={},this[_0x5a344f(0x1ee)]={};let _0x59759b=null;this[_0x5a344f(0x1ba)]=[],this['PreCloseEventHandlers']=[],this['PreMessageEventHandlers']=[],this[_0x5a344f(0x1a1)]=[],this[_0x5a344f(0x1e3)]=[],this[_0x5a344f(0x184)]=[],this['addPreOpenEventHandler']=_0x103b7f=>this[_0x5a344f(0x1ba)][_0x5a344f(0x170)](_0x103b7f),this[_0x5a344f(0x1dd)]=_0x3e2e70=>this['PreCloseEventHandlers'][_0x5a344f(0x170)](_0x3e2e70),this['addPreMessageEventHandler']=_0xd95a5a=>this[_0x5a344f(0x185)][_0x5a344f(0x170)](_0xd95a5a),this[_0x5a344f(0x1d1)]=_0x3266fa=>this['PostOpenEventHandlers'][_0x5a344f(0x170)](_0x3266fa),this[_0x5a344f(0x1e4)]=_0xbfbe77=>this[_0x5a344f(0x1e3)][_0x5a344f(0x170)](_0xbfbe77),this['addPostMessageEventHandler']=_0x3b210c=>this[_0x5a344f(0x184)][_0x5a344f(0x170)](_0x3b210c),this[_0x5a344f(0x17f)]=function(){var _0xad675b=_0x5a344f;return this[_0xad675b(0x1eb)]+'/'+this['clientPageId'];},this['readCallbackArguments']=function(_0x5b7233,..._0x40692f){var _0x17b7b5=_0x5a344f;for(var _0x43a33a=_0x40692f[_0x17b7b5(0x1bd)]-0x1;_0x43a33a>=0x0;--_0x43a33a){if(typeof _0x40692f[_0x43a33a]!==_0x17b7b5(0x192))break;}var _0x4b8311=_0x40692f[_0x17b7b5(0x1a7)](0x0,_0x43a33a+0x1),_0x86f8da=_0x40692f['slice'](_0x43a33a+0x1);return[_0x5b7233,_0x4b8311,_0x86f8da];},this[_0x5a344f(0x1d5)]=function(_0x2f00e3,..._0x4d0393){var _0x5dccda=_0x5a344f;this[_0x5dccda(0x189)][_0x2f00e3]=_0x4d0393;},this[_0x5a344f(0x172)]=function(_0x28b487,..._0x4684b9){var _0x303aa3=_0x5a344f,_0x120b9e=this['readCallbackArguments'](_0x28b487,..._0x4684b9);_0x28b487=_0x120b9e[0x0];let _0x11dafd=_0x120b9e[0x1][0x0],_0x46d71b=_0x120b9e[0x2];this[_0x303aa3(0x1be)]?(this[_0x303aa3(0x190)][_0x303aa3(0x18b)](JSON['stringify']({'funcName':_0x28b487,'args':_0x11dafd,'session_id':this[_0x303aa3(0x1b2)]()})),console[_0x303aa3(0x1ec)](_0x303aa3(0x1a3)+_0x28b487+_0x303aa3(0x1d3),_0x11dafd)):console[_0x303aa3(0x1ec)](_0x303aa3(0x1d8)),_0x46d71b[_0x303aa3(0x1bd)]>0x0&&this[_0x303aa3(0x1d5)](_0x28b487,..._0x46d71b);},this[_0x5a344f(0x1b0)]=function(_0x22a613,_0x23097f){var _0x220431=_0x5a344f,_0x1452c9=this[_0x220431(0x1d0)][_0x220431(0x1ca)](function(_0x5a1585){var _0x3653c4=_0x220431;return _0x5a1585[_0x3653c4(0x1e8)];})[_0x220431(0x1b6)](_0x22a613);_0x1452c9<0x0?this[_0x220431(0x1d0)][_0x220431(0x170)]({'funcName':_0x22a613,'callback':_0x23097f}):this[_0x220431(0x1d0)][_0x1452c9][_0x220431(0x1c7)]=_0x23097f;},this[_0x5a344f(0x1b2)]=function(){var _0x2c6d40=_0x5a344f;return sessionStorage[_0x2c6d40(0x174)](_0x2c6d40(0x1af));},this[_0x5a344f(0x181)]=function(_0x3b1bcf,_0x544939){var _0xd32484=_0x5a344f;this['jsFunctionDict'][_0xd32484(0x170)]({'funcName':_0x3b1bcf,'func':_0x544939});},this[_0x5a344f(0x1ed)]=function(_0x406bff,_0x11f731,_0x22db6a){var _0x5c60ff=_0x5a344f;this[_0x5c60ff(0x1be)]?(this[_0x5c60ff(0x190)][_0x5c60ff(0x18b)](JSON[_0x5c60ff(0x1df)]({'funcName':_0x406bff,'args':_0x11f731,'session_id':this[_0x5c60ff(0x1b2)]()})),console[_0x5c60ff(0x1ec)](_0x5c60ff(0x1a3)+_0x406bff+_0x5c60ff(0x1d3),_0x11f731)):console['log'](_0x5c60ff(0x1d8));if(_0x22db6a===undefined){}else this[_0x5c60ff(0x1b0)](_0x406bff,_0x22db6a);},this[_0x5a344f(0x1b5)]=function(_0x57aabb,_0x2ef030,..._0x1eb21f){this['callMultipleCallbackPythonFunction'](_0x57aabb,_0x2ef030,..._0x1eb21f);},this[_0x5a344f(0x1a5)]=function(_0x3d52d4,_0x1893e7,_0x5b6104,_0x21a9af){var _0x3830e2=_0x5a344f;_0x1893e7===undefined&&(_0x1893e7={});_0x1893e7[_0x3830e2(0x193)]=!![],this['callFunc'](_0x3d52d4,_0x1893e7);if(this[_0x3830e2(0x1be)]){this[_0x3830e2(0x175)](_0x5b6104);if(_0x21a9af===undefined){}else this[_0x3830e2(0x1b0)](_0x3d52d4,_0x21a9af);}else console['log'](_0x3830e2(0x1d8));},this[_0x5a344f(0x175)]=function(_0x524f33){var _0x18a123=_0x5a344f,_0x58d93d=new FileReader();_0x58d93d[_0x18a123(0x1bc)]=function(_0x2cdf99){var _0x24d763=_0x18a123,_0x572eca=_0x2cdf99[_0x24d763(0x199)][_0x24d763(0x19f)];if(this['socket']&&this[_0x24d763(0x190)][_0x24d763(0x1bb)]==0x1)this['socket'][_0x24d763(0x18b)](_0x572eca);},_0x58d93d[_0x18a123(0x1a9)](_0x524f33);},this[_0x5a344f(0x1d7)]=function(_0x391367){var _0x414ca7=_0x5a344f;if(_0x391367[_0x414ca7(0x16e)][_0x414ca7(0x1c4)](/image.*/)){console[_0x414ca7(0x1ec)](_0x414ca7(0x195),_0x391367[_0x414ca7(0x16e)]);return;}var _0x39bc48=new FileReader();_0x39bc48['onload']=function(_0x5265b0){var _0x4a43a0=_0x414ca7,_0x21a09f=_0x5265b0[_0x4a43a0(0x199)]['result'];if(this[_0x4a43a0(0x190)]&&this[_0x4a43a0(0x190)][_0x4a43a0(0x1bb)]==0x1)this[_0x4a43a0(0x190)]['send'](_0x21a09f);},_0x39bc48['readAsArrayBuffer'](_0x391367);},this[_0x5a344f(0x178)]=function(_0x38f936){var _0x3219b2=_0x5a344f;if(!_0x38f936['type'][_0x3219b2(0x1c4)](/image.*/)){console[_0x3219b2(0x1ec)]('The\x20dropped\x20file\x20is\x20not\x20an\x20image:\x20',_0x38f936[_0x3219b2(0x16e)]);return;}var _0x3b0e0d=new FileReader();_0x3b0e0d['onload']=function(_0x540738){var _0x5e274a=_0x3219b2,_0x39895e=_0x540738[_0x5e274a(0x199)][_0x5e274a(0x19f)];if(this[_0x5e274a(0x190)]&&this[_0x5e274a(0x190)][_0x5e274a(0x1bb)]==0x1)this[_0x5e274a(0x190)][_0x5e274a(0x18b)](_0x39895e);},_0x3b0e0d[_0x3219b2(0x1a9)](_0x38f936);},this[_0x5a344f(0x1b7)]=function(_0x59a8e1){var _0x53a03b=_0x5a344f;for(var _0x3b4d5d in this[_0x53a03b(0x183)]){var _0x3c066a=this[_0x53a03b(0x183)][_0x3b4d5d];_0x3c066a[_0x53a03b(0x170)](_0x53a03b(0x1a4));var _0x5315f1='var\x20paramNames\x20=\x20this.PythonFunctionsArgs[\x27'+_0x3b4d5d+_0x53a03b(0x1b8)+_0x53a03b(0x1db)+_0x3b4d5d+_0x53a03b(0x194);_0x3c066a[_0x53a03b(0x170)](_0x5315f1),_0x59759b=this;if(_0x3b4d5d[_0x53a03b(0x1b6)]('.')>=0x0){var _0x3cf7da=_0x3b4d5d[_0x53a03b(0x1c5)]('.'),_0x1110e8=this[_0x53a03b(0x173)];for(var _0x156d45=0x0;_0x156d45<_0x3cf7da[_0x53a03b(0x1bd)]-0x1;_0x156d45++){!(_0x3cf7da[_0x156d45]in _0x1110e8)&&(_0x1110e8[_0x3cf7da[_0x156d45]]={}),_0x1110e8=_0x1110e8[_0x3cf7da[_0x156d45]];}_0x1110e8[_0x3cf7da[_0x3cf7da[_0x53a03b(0x1bd)]-0x1]]=Function[_0x53a03b(0x18f)](null,_0x3c066a)[_0x53a03b(0x187)](this);}else this['PythonFunctions'][_0x3b4d5d]=Function[_0x53a03b(0x18f)](null,_0x3c066a)[_0x53a03b(0x187)](this);}},this[_0x5a344f(0x18d)]=function(){var _0xef2a5=_0x5a344f;this[_0xef2a5(0x17b)]!==undefined&&this['oninit']();var _0x5db62b=this[_0xef2a5(0x17f)]();console['log'](_0xef2a5(0x1aa)+_0x5db62b+_0xef2a5(0x1bf)),this[_0xef2a5(0x190)]=new WebSocket(_0x5db62b),this[_0xef2a5(0x190)]['binaryType']=_0xef2a5(0x1a6),_0x59759b=this,this[_0xef2a5(0x190)][_0xef2a5(0x17c)]=function(){var _0x4b53b2=_0xef2a5;console[_0x4b53b2(0x1ec)](_0x4b53b2(0x1cc)+_0x5db62b),_0x59759b[_0x4b53b2(0x1ba)]['forEach'](_0x364d32=>_0x364d32()),_0x59759b['isOpen']=!![],_0x59759b['onopen']!==undefined&&(_0x59759b[_0x4b53b2(0x172)]('getPythonFunctionLibrary',{},function(_0x16313a){var _0x105775=_0x4b53b2;_0x59759b[_0x105775(0x183)]={};for(var _0xec3b1 in _0x16313a){_0x16313a[_0xec3b1][_0x105775(0x1d4)](),_0x16313a[_0xec3b1][0x0]==_0x105775(0x179)&&_0x16313a[_0xec3b1][_0x105775(0x1d4)](),_0x59759b[_0x105775(0x183)][_0xec3b1]=_0x16313a[_0xec3b1];}_0x59759b['createJSProxyFunctions'](''),_0x59759b[_0x105775(0x17c)]();}),_0x59759b[_0x4b53b2(0x172)](_0x4b53b2(0x1c0),{},function(_0x518806){var _0x283994=_0x4b53b2;_0x59759b[_0x283994(0x1a0)]=_0x518806;})),_0x59759b[_0x4b53b2(0x1a1)][_0x4b53b2(0x1d2)](_0x4368da=>_0x4368da());},this['socket'][_0xef2a5(0x177)]=function(_0x3ffc9b){var _0x1173ec=_0xef2a5;_0x59759b['PreMessageEventHandlers'][_0x1173ec(0x1d2)](_0x620a3c=>_0x620a3c());_0x59759b[_0x1173ec(0x1de)]!==undefined&&_0x59759b[_0x1173ec(0x1de)](_0x3ffc9b);let _0x17009c=null;if(_0x3ffc9b['data']instanceof ArrayBuffer)try{const _0x11cd78=a0_0x12a9f0[_0x1173ec(0x1c3)](new Uint8Array(_0x3ffc9b[_0x1173ec(0x18c)]));_0x17009c=_0x11cd78;}catch(_0x53c66e){_0x17009c=null;}else typeof _0x3ffc9b['data']==_0x1173ec(0x171)&&(_0x17009c=JSON[_0x1173ec(0x186)](_0x3ffc9b[_0x1173ec(0x18c)]));if(_0x17009c!==null){console[_0x1173ec(0x1ec)]('Message\x20received:\x20',_0x17009c);if('args'in _0x17009c){var _0x5caa34=_0x59759b[_0x1173ec(0x18a)][_0x1173ec(0x1ca)](function(_0x4f1e67){var _0x364c63=_0x1173ec;return _0x4f1e67[_0x364c63(0x1e8)];})[_0x1173ec(0x1b6)](_0x17009c[_0x1173ec(0x1e8)]);if(_0x5caa34>=0x0){var _0x2cc6e9=_0x59759b[_0x1173ec(0x18a)][_0x5caa34];_0x1173ec(0x193)in _0x17009c[_0x1173ec(0x19a)]?_0x59759b[_0x1173ec(0x1d6)][_0x1173ec(0x170)]({'funcName':_0x17009c[_0x1173ec(0x1e8)],'callback':_0x2cc6e9[_0x1173ec(0x16f)],'args':_0x17009c[_0x1173ec(0x19a)]}):_0x2cc6e9[_0x1173ec(0x16f)](_0x17009c[_0x1173ec(0x19a)]);}else{if(_0x17009c['funcName']===_0x1173ec(0x1cb))return;else throw _0x1173ec(0x1ac)+_0x17009c[_0x1173ec(0x1e8)];}}else{if(_0x1173ec(0x1c8)in _0x17009c){if(_0x17009c[_0x1173ec(0x1e8)]in _0x59759b[_0x1173ec(0x189)]){var _0x47c297=_0x59759b[_0x1173ec(0x189)][_0x17009c[_0x1173ec(0x1e8)]];switch(_0x47c297[_0x1173ec(0x1bd)]){case 0x0:break;case 0x1:if(_0x1173ec(0x1ab)in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1ab)],![]);if(_0x1173ec(0x1e7)in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1c8)],_0x17009c[_0x1173ec(0x1e7)],![]);break;case 0x2:if(_0x1173ec(0x1ab)in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1ab)],![]);if('return'in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1c8)],_0x17009c[_0x1173ec(0x1e7)],![]);if(_0x17009c[_0x1173ec(0x1c8)]=='row')_0x47c297[0x1](_0x17009c['stream_index'],_0x17009c[_0x1173ec(0x1b1)],![]);break;case 0x3:if(_0x1173ec(0x1ab)in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1ab)],![]);if(_0x17009c[_0x1173ec(0x1c8)]==_0x1173ec(0x18e))_0x47c297[0x0](_0x17009c[_0x1173ec(0x1e7)],![]);if(_0x17009c[_0x1173ec(0x1c8)]==_0x1173ec(0x191))_0x47c297[0x1](_0x17009c['stream_index'],_0x17009c[_0x1173ec(0x1b1)],![]);if(_0x17009c[_0x1173ec(0x1c8)]==_0x1173ec(0x1a8))_0x47c297[0x2](_0x17009c[_0x1173ec(0x19e)],![]);break;case 0x4:if(_0x1173ec(0x1ab)in _0x17009c)_0x47c297[0x4](_0x17009c[_0x1173ec(0x1ab)],![]);if(_0x17009c[_0x1173ec(0x1c8)]==_0x1173ec(0x18e))_0x47c297[0x0](_0x17009c[_0x1173ec(0x1e7)],![]);if(_0x17009c[_0x1173ec(0x1c8)]==_0x1173ec(0x191))_0x47c297[0x1](_0x17009c[_0x1173ec(0x1e0)],_0x17009c[_0x1173ec(0x1b1)],![]);if(_0x17009c[_0x1173ec(0x1c8)]==_0x1173ec(0x1a8))_0x47c297[0x2](_0x17009c[_0x1173ec(0x19e)],![]);break;default:throw _0x1173ec(0x196)+_0x17009c[_0x1173ec(0x1e8)];}}else throw _0x1173ec(0x19d)+_0x17009c['funcName'];}else{if(_0x17009c[_0x1173ec(0x1e8)]in _0x59759b[_0x1173ec(0x189)]){var _0x47c297=_0x59759b[_0x1173ec(0x189)][_0x17009c[_0x1173ec(0x1e8)]];switch(_0x47c297[_0x1173ec(0x1bd)]){case 0x0:break;case 0x1:if(_0x1173ec(0x1ab)in _0x17009c)_0x47c297[0x0](_0x17009c['error'],![]);if(_0x1173ec(0x1e7)in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1e7)],![]);break;case 0x2:if(_0x1173ec(0x1ab)in _0x17009c)_0x47c297[0x1](_0x17009c[_0x1173ec(0x1ab)],![]);if('return'in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1e7)],![]);break;case 0x3:if(_0x1173ec(0x1ab)in _0x17009c)_0x47c297[0x0](_0x17009c[_0x1173ec(0x1ab)],![]);if(_0x1173ec(0x1e7)in _0x17009c)_0x47c297[0x0](_0x17009c['return'],![]);break;default:throw _0x1173ec(0x196)+_0x17009c[_0x1173ec(0x1e8)];}}else{var _0x5caa34=_0x59759b[_0x1173ec(0x1d0)][_0x1173ec(0x1ca)](function(_0x37e9f6){return _0x37e9f6['funcName'];})[_0x1173ec(0x1b6)](_0x17009c['funcName']);if(_0x5caa34>=0x0){var _0x2cc6e9=_0x59759b['pythonCallbackDict'][_0x5caa34];_0x17009c[_0x1173ec(0x1e7)]===undefined?_0x17009c['error']!==undefined&&_0x2cc6e9[_0x1173ec(0x1c7)](_0x17009c[_0x1173ec(0x1ab)],![]):_0x2cc6e9[_0x1173ec(0x1c7)](_0x17009c[_0x1173ec(0x1e7)],!![]);}else throw _0x1173ec(0x1ac)+_0x17009c[_0x1173ec(0x1e8)];}}}}else{console[_0x1173ec(0x1ec)](_0x1173ec(0x1c2));var _0x6ab46d=new Uint8Array(_0x3ffc9b[_0x1173ec(0x18c)]),_0x5e1d0d='\x20';for(var _0x4f47ca=0x0;_0x4f47ca<_0x6ab46d[_0x1173ec(0x1bd)];_0x4f47ca++){_0x5e1d0d+=(_0x1173ec(0x180)+_0x6ab46d[_0x4f47ca][_0x1173ec(0x1e2)](0x10))[_0x1173ec(0x1b9)](-0x2);}var _0x5bf4a5=_0x3ffc9b[_0x1173ec(0x18c)],_0x92c89a=new Uint8Array(_0x5bf4a5),_0x7b8a8c=new Blob([_0x92c89a[_0x1173ec(0x1a2)]]);if(_0x59759b[_0x1173ec(0x1d6)][_0x1173ec(0x1bd)]>0x0){var _0x4124c9=_0x59759b['binaryFunctionQueue'][_0x1173ec(0x1d4)]();_0x4124c9[_0x1173ec(0x19a)][_0x1173ec(0x1e5)]=_0x7b8a8c,_0x4124c9[_0x1173ec(0x1c7)](_0x4124c9[_0x1173ec(0x19a)]);}else{var _0x1910e5=new FileReader();_0x1910e5[_0x1173ec(0x1bc)]=function(_0x4e4bda){var _0x500d82=_0x1173ec,_0x42c979=document[_0x500d82(0x197)](_0x500d82(0x1e6));_0x42c979['src']=_0x4e4bda[_0x500d82(0x199)][_0x500d82(0x19f)],document[_0x500d82(0x1dc)]['appendChild'](_0x42c979);},_0x1910e5[_0x1173ec(0x17a)](_0x7b8a8c),document[_0x1173ec(0x1b4)](_0x1173ec(0x188))[_0x1173ec(0x1e1)]=_0x1173ec(0x1e9);}console[_0x1173ec(0x1ec)](_0x1173ec(0x17d),_0x5e1d0d);}_0x59759b['onmessageprocessed']!==undefined&&_0x59759b[_0x1173ec(0x1c9)](),_0x59759b['PostMessageEventHandlers'][_0x1173ec(0x1d2)](_0x5f076c=>_0x5f076c());},this['socket'][_0xef2a5(0x182)]=function(_0x30c9f6){var _0x8e3ba7=_0xef2a5;console[_0x8e3ba7(0x1ec)](_0x8e3ba7(0x17e)+_0x5db62b+_0x8e3ba7(0x1ad)),_0x59759b['PreCloseEventHandlers'][_0x8e3ba7(0x1d2)](_0x1a39db=>_0x1a39db(_0x30c9f6)),_0x59759b[_0x8e3ba7(0x1be)]=![],this[_0x8e3ba7(0x190)]=null,_0x59759b[_0x8e3ba7(0x182)]!==undefined&&_0x59759b[_0x8e3ba7(0x182)](_0x30c9f6),_0x59759b[_0x8e3ba7(0x1e3)][_0x8e3ba7(0x1d2)](_0x42d88a=>_0x42d88a(_0x30c9f6));};},this['getServerAPI']=function(){var _0x57e0bf=_0x5a344f;return this[_0x57e0bf(0x173)];},this[_0x5a344f(0x1ae)]=function(_0x1cecfc){var _0x34f8cc=_0x5a344f;return this[_0x34f8cc(0x173)][_0x1cecfc];};}export{RemotePyClient as RemotePy};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a0_0x3c5b(_0x3e61b8,_0x3b21ee){var _0x141f5e=a0_0x141f();return a0_0x3c5b=function(_0x3c5bab,_0x5423e3){_0x3c5bab=_0x3c5bab-0x1df;var _0x2fcad3=_0x141f5e[_0x3c5bab];return _0x2fcad3;},a0_0x3c5b(_0x3e61b8,_0x3b21ee);}(function(_0x38269f,_0x1fc73a){var _0x2e8159=a0_0x3c5b,_0x3ded4c=_0x38269f();while(!![]){try{var _0x2394e0=parseInt(_0x2e8159(0x24f))/0x1+-parseInt(_0x2e8159(0x1e4))/0x2+parseInt(_0x2e8159(0x1ff))/0x3+-parseInt(_0x2e8159(0x22a))/0x4*(-parseInt(_0x2e8159(0x216))/0x5)+parseInt(_0x2e8159(0x25a))/0x6*(-parseInt(_0x2e8159(0x1f4))/0x7)+-parseInt(_0x2e8159(0x21a))/0x8*(parseInt(_0x2e8159(0x1e9))/0x9)+-parseInt(_0x2e8159(0x222))/0xa;if(_0x2394e0===_0x1fc73a)break;else _0x3ded4c['push'](_0x3ded4c['shift']());}catch(_0x51aad6){_0x3ded4c['push'](_0x3ded4c['shift']());}}}(a0_0x141f,0x953e4));import*as a0_0x349d04 from'msgpack-lite';function a0_0x141f(){var _0xa42263=['type','onload','registerCallbackToPythonFunction','decode','1964bylaoN','\x20closed.','\x20called\x20with\x20arguments:\x20','Connected\x20to\x20Server\x20:','indexOf','Message\x20received:\x20','split','connect','PreMessageEventHandlers','No\x20function\x20defined\x20for\x20','getServerString','\x27,\x20inputObject,\x20...func);','No\x20msgpack\x20library\x20loaded','PreOpenEventHandlers','pythonCallbackDict','onmessageprocessed','socket','JS2PY_SESSION_ID','message(b)\x20received\x20:\x20','substr','shift','binaryType','push','stream_empty','getService','innerHTML','data','end','jsFunctionDict','session_id','Connection\x20not\x20open.','log','parse','pythonMultipleCallbackDict','callFunc','stream_item','return','766105iOyGbo','row','isBinary','sendNonImageBinary','getItem','arraybuffer','\x20...','getPythonFunctionLibraryHelp','result','PostOpenEventHandlers','readyState','6PVMfgs','onmessagereceived','ws://localhost:80','sendImageBinary','PythonFunctions','forEach','slice','PythonFunctionsArgs','Connecting\x20to\x20:\x20','797876mYMMNr','\x27].slice(0,\x20-1);\x0a','onopen','PostCloseEventHandlers','readAsArrayBuffer','603DXIkyH','args','createElement','sendBinary','addPreOpenEventHandler','getPythonFunctionLibrary','JS2Py','registerMultipleCallbackPythonFunction','wss','body','error','8450813vHlHXF','length','registerJSFunctionToBeCalledByPython','Too\x20many\x20callbacks\x20for\x20','readCallbackArguments','getSessionId','blob','string','function','addPostMessageEventHandler','isOpen','2030583zwXIal','onclose','appendChild','callback','streaming','target','The\x20dropped\x20file\x20is\x20not\x20an\x20image:\x20','img','start','Chart\x20Loading\x20Completed\x20...','addPostOpenEventHandler','src','PostMessageEventHandlers','apply','getServerAPI','addPreMessageEventHandler','serverName','bind','func','binaryFunctionQueue','readAsDataURL','stream_index','stringify','11595rsDtzQ','callMultipleCallbackPythonFunction','funcName','00\x20','40408fXKbao','createJSProxyFunctions','PreCloseEventHandlers','oninit','send','addPostCloseEventHandler','clientPageId','map','256810PhNJGc','Function\x20:\x20','var\x20args\x20=\x20Array.prototype.slice.call(arguments);\x20var\x20inputObject\x20=\x20{};\x20for(var\x20i\x20in\x20paramNames)\x20{\x20var\x20paramName\x20=\x20paramNames[i];\x20if(paramName\x20!=\x20\x27...func\x27)\x20{\x20inputObject[paramName]\x20=\x20args[i];}\x20}\x20return\x20this.callMultipleCallbackPythonFunction(\x27','The\x20dropped\x20file\x20is\x20an\x20image:\x20'];a0_0x141f=function(){return _0xa42263;};return a0_0x141f();}function RemotePyClient(_0x33b0db,_0x104dbb){var _0x522c79=a0_0x3c5b;if(_0x33b0db===undefined)this['serverName']=_0x522c79(0x25c);else this['serverName']=_0x33b0db;if(_0x104dbb===undefined)this['clientPageId']=_0x522c79(0x1f1);else this[_0x522c79(0x220)]=_0x104dbb;this[_0x522c79(0x1fe)]=![],this[_0x522c79(0x246)]=[],this[_0x522c79(0x238)]=[],this[_0x522c79(0x212)]=[],this[_0x522c79(0x1df)]={},this['socket']=null,this['PythonFunctionsHelp']={},this[_0x522c79(0x24b)]={},this[_0x522c79(0x1e2)]={},this[_0x522c79(0x1ef)]={};let _0x445793=null;this[_0x522c79(0x237)]=[],this[_0x522c79(0x21c)]=[],this['PreMessageEventHandlers']=[],this[_0x522c79(0x258)]=[],this[_0x522c79(0x1e7)]=[],this[_0x522c79(0x20b)]=[],this[_0x522c79(0x1ed)]=_0x2b05a8=>this['PreOpenEventHandlers'][_0x522c79(0x240)](_0x2b05a8),this['addPreCloseEventHandler']=_0x1d618f=>this[_0x522c79(0x21c)]['push'](_0x1d618f),this[_0x522c79(0x20e)]=_0x5e9522=>this[_0x522c79(0x232)]['push'](_0x5e9522),this[_0x522c79(0x209)]=_0x46cc07=>this[_0x522c79(0x258)][_0x522c79(0x240)](_0x46cc07),this[_0x522c79(0x21f)]=_0x322d43=>this[_0x522c79(0x1e7)][_0x522c79(0x240)](_0x322d43),this[_0x522c79(0x1fd)]=_0x492b0e=>this[_0x522c79(0x20b)]['push'](_0x492b0e),this[_0x522c79(0x234)]=function(){var _0x14fece=_0x522c79;return this[_0x14fece(0x20f)]+'/'+this[_0x14fece(0x220)];},this['readCallbackArguments']=function(_0x1f1683,..._0x45d2e5){var _0x2cde40=_0x522c79;for(var _0x33e9d6=_0x45d2e5['length']-0x1;_0x33e9d6>=0x0;--_0x33e9d6){if(typeof _0x45d2e5[_0x33e9d6]!==_0x2cde40(0x1fc))break;}var _0x44c797=_0x45d2e5[_0x2cde40(0x1e1)](0x0,_0x33e9d6+0x1),_0x737fd5=_0x45d2e5[_0x2cde40(0x1e1)](_0x33e9d6+0x1);return[_0x1f1683,_0x44c797,_0x737fd5];},this[_0x522c79(0x1f0)]=function(_0x1a34d4,..._0x4fda02){this['pythonMultipleCallbackDict'][_0x1a34d4]=_0x4fda02;},this['callMultipleCallbackPythonFunction']=function(_0x22ee37,..._0x3390c1){var _0x12702d=_0x522c79,_0x40fe5f=this[_0x12702d(0x1f8)](_0x22ee37,..._0x3390c1);_0x22ee37=_0x40fe5f[0x0];let _0x483567=_0x40fe5f[0x1][0x0],_0x1de85c=_0x40fe5f[0x2];this[_0x12702d(0x1fe)]?(this[_0x12702d(0x23a)][_0x12702d(0x21e)](JSON[_0x12702d(0x215)]({'funcName':_0x22ee37,'args':_0x483567,'session_id':this[_0x12702d(0x1f9)]()})),console['log'](_0x12702d(0x223)+_0x22ee37+_0x12702d(0x22c),_0x483567)):console[_0x12702d(0x249)](_0x12702d(0x248)),_0x1de85c['length']>0x0&&this['registerMultipleCallbackPythonFunction'](_0x22ee37,..._0x1de85c);},this[_0x522c79(0x228)]=function(_0x3f1eb3,_0x6ef1f1){var _0x357125=_0x522c79,_0x42bbdd=this[_0x357125(0x238)][_0x357125(0x221)](function(_0x4b5ea){var _0x470b40=_0x357125;return _0x4b5ea[_0x470b40(0x218)];})[_0x357125(0x22e)](_0x3f1eb3);_0x42bbdd<0x0?this['pythonCallbackDict'][_0x357125(0x240)]({'funcName':_0x3f1eb3,'callback':_0x6ef1f1}):this[_0x357125(0x238)][_0x42bbdd]['callback']=_0x6ef1f1;},this['getSessionId']=function(){var _0x1b6b68=_0x522c79;return sessionStorage[_0x1b6b68(0x253)](_0x1b6b68(0x23b));},this[_0x522c79(0x1f6)]=function(_0x3927b7,_0x3a7da6){var _0x512de7=_0x522c79;this[_0x512de7(0x246)][_0x512de7(0x240)]({'funcName':_0x3927b7,'func':_0x3a7da6});},this['callFunc']=function(_0x4030b4,_0x1c21f8,_0x106df9){var _0x4be295=_0x522c79;this['isOpen']?(this[_0x4be295(0x23a)][_0x4be295(0x21e)](JSON[_0x4be295(0x215)]({'funcName':_0x4030b4,'args':_0x1c21f8,'session_id':this[_0x4be295(0x1f9)]()})),console['log'](_0x4be295(0x223)+_0x4030b4+_0x4be295(0x22c),_0x1c21f8)):console['log'](_0x4be295(0x248));if(_0x106df9===undefined){}else this['registerCallbackToPythonFunction'](_0x4030b4,_0x106df9);},this['callPythonFunction']=function(_0x2672fa,_0x6f245b,..._0x13f8b){this['callMultipleCallbackPythonFunction'](_0x2672fa,_0x6f245b,..._0x13f8b);},this['callPythonFunctionBinary']=function(_0x2a3a11,_0x30c792,_0x585746,_0x2d8570){var _0x56ebb1=_0x522c79;_0x30c792===undefined&&(_0x30c792={});_0x30c792[_0x56ebb1(0x251)]=!![],this[_0x56ebb1(0x24c)](_0x2a3a11,_0x30c792);if(this[_0x56ebb1(0x1fe)]){this[_0x56ebb1(0x1ec)](_0x585746);if(_0x2d8570===undefined){}else this[_0x56ebb1(0x228)](_0x2a3a11,_0x2d8570);}else console['log'](_0x56ebb1(0x248));},this[_0x522c79(0x1ec)]=function(_0x2b8faf){var _0x2bdfb9=_0x522c79,_0x408922=new FileReader();_0x408922[_0x2bdfb9(0x227)]=function(_0x490171){var _0x8204fe=_0x2bdfb9,_0x3f6ad6=_0x490171[_0x8204fe(0x204)][_0x8204fe(0x257)];if(this[_0x8204fe(0x23a)]&&this[_0x8204fe(0x23a)][_0x8204fe(0x259)]==0x1)this[_0x8204fe(0x23a)][_0x8204fe(0x21e)](_0x3f6ad6);},_0x408922[_0x2bdfb9(0x1e8)](_0x2b8faf);},this[_0x522c79(0x252)]=function(_0x13e516){var _0x3a07fc=_0x522c79;if(_0x13e516['type']['match'](/image.*/)){console[_0x3a07fc(0x249)](_0x3a07fc(0x225),_0x13e516['type']);return;}var _0x53f2f8=new FileReader();_0x53f2f8[_0x3a07fc(0x227)]=function(_0x69435a){var _0x5736be=_0x3a07fc,_0x25c778=_0x69435a[_0x5736be(0x204)][_0x5736be(0x257)];if(this['socket']&&this['socket'][_0x5736be(0x259)]==0x1)this[_0x5736be(0x23a)][_0x5736be(0x21e)](_0x25c778);},_0x53f2f8[_0x3a07fc(0x1e8)](_0x13e516);},this[_0x522c79(0x25d)]=function(_0x39569e){var _0x48d500=_0x522c79;if(!_0x39569e[_0x48d500(0x226)]['match'](/image.*/)){console[_0x48d500(0x249)](_0x48d500(0x205),_0x39569e[_0x48d500(0x226)]);return;}var _0x4984d7=new FileReader();_0x4984d7[_0x48d500(0x227)]=function(_0x5d5ea1){var _0x3c5513=_0x48d500,_0x47b09e=_0x5d5ea1[_0x3c5513(0x204)][_0x3c5513(0x257)];if(this[_0x3c5513(0x23a)]&&this[_0x3c5513(0x23a)][_0x3c5513(0x259)]==0x1)this[_0x3c5513(0x23a)]['send'](_0x47b09e);},_0x4984d7[_0x48d500(0x1e8)](_0x39569e);},this['createJSProxyFunctions']=function(_0x275cef){var _0x13af02=_0x522c79;for(var _0xc5c01d in this['PythonFunctionsArgs']){var _0x144996=this[_0x13af02(0x1e2)][_0xc5c01d];_0x144996[_0x13af02(0x240)]('...func');var _0x18cff1='var\x20paramNames\x20=\x20this.PythonFunctionsArgs[\x27'+_0xc5c01d+_0x13af02(0x1e5)+_0x13af02(0x224)+_0xc5c01d+_0x13af02(0x235);_0x144996['push'](_0x18cff1),_0x445793=this;if(_0xc5c01d[_0x13af02(0x22e)]('.')>=0x0){var _0x267ccd=_0xc5c01d[_0x13af02(0x230)]('.'),_0x567f80=this[_0x13af02(0x1df)];for(var _0x4b6947=0x0;_0x4b6947<_0x267ccd[_0x13af02(0x1f5)]-0x1;_0x4b6947++){!(_0x267ccd[_0x4b6947]in _0x567f80)&&(_0x567f80[_0x267ccd[_0x4b6947]]={}),_0x567f80=_0x567f80[_0x267ccd[_0x4b6947]];}_0x567f80[_0x267ccd[_0x267ccd['length']-0x1]]=Function[_0x13af02(0x20c)](null,_0x144996)[_0x13af02(0x210)](this);}else this[_0x13af02(0x1df)][_0xc5c01d]=Function['apply'](null,_0x144996)['bind'](this);}},this[_0x522c79(0x231)]=function(){var _0x8f44ca=_0x522c79;this[_0x8f44ca(0x21d)]!==undefined&&this[_0x8f44ca(0x21d)]();var _0x408158=this[_0x8f44ca(0x234)]();console[_0x8f44ca(0x249)](_0x8f44ca(0x1e3)+_0x408158+_0x8f44ca(0x255)),this['socket']=new WebSocket(_0x408158),this[_0x8f44ca(0x23a)][_0x8f44ca(0x23f)]=_0x8f44ca(0x254),_0x445793=this,this['socket'][_0x8f44ca(0x1e6)]=function(){var _0x52d078=_0x8f44ca;console[_0x52d078(0x249)](_0x52d078(0x22d)+_0x408158),_0x445793[_0x52d078(0x237)][_0x52d078(0x1e0)](_0x33d8fd=>_0x33d8fd()),_0x445793[_0x52d078(0x1fe)]=!![],_0x445793[_0x52d078(0x1e6)]!==undefined&&(_0x445793[_0x52d078(0x217)](_0x52d078(0x1ee),{},function(_0x47e434){var _0x553413=_0x52d078;_0x445793[_0x553413(0x1e2)]={};for(var _0x2e9ea6 in _0x47e434){_0x47e434[_0x2e9ea6][_0x553413(0x23e)](),_0x47e434[_0x2e9ea6][0x0]==_0x553413(0x247)&&_0x47e434[_0x2e9ea6][_0x553413(0x23e)](),_0x445793['PythonFunctionsArgs'][_0x2e9ea6]=_0x47e434[_0x2e9ea6];}_0x445793[_0x553413(0x21b)](''),_0x445793[_0x553413(0x1e6)]();}),_0x445793[_0x52d078(0x217)](_0x52d078(0x256),{},function(_0x1e8e11){_0x445793['PythonFunctionsHelp']=_0x1e8e11;})),_0x445793['PostOpenEventHandlers']['forEach'](_0xf3a2e6=>_0xf3a2e6());},this[_0x8f44ca(0x23a)]['onmessage']=function(_0x3d8757){var _0x3ec709=_0x8f44ca;_0x445793['PreMessageEventHandlers'][_0x3ec709(0x1e0)](_0x3bb064=>_0x3bb064());_0x445793[_0x3ec709(0x25b)]!==undefined&&_0x445793[_0x3ec709(0x25b)](_0x3d8757);let _0x431a56=null;if(_0x3d8757[_0x3ec709(0x244)]instanceof ArrayBuffer)try{const _0x4623fa=a0_0x349d04[_0x3ec709(0x229)](new Uint8Array(_0x3d8757[_0x3ec709(0x244)]));_0x431a56=_0x4623fa;}catch(_0x2f16f4){_0x431a56=null;}else typeof _0x3d8757[_0x3ec709(0x244)]==_0x3ec709(0x1fb)&&(_0x431a56=JSON[_0x3ec709(0x24a)](_0x3d8757['data']));if(_0x431a56!==null){console[_0x3ec709(0x249)](_0x3ec709(0x22f),_0x431a56);if('args'in _0x431a56){var _0x3f05c0=_0x445793[_0x3ec709(0x246)]['map'](function(_0x384c09){var _0x43b294=_0x3ec709;return _0x384c09[_0x43b294(0x218)];})['indexOf'](_0x431a56[_0x3ec709(0x218)]);if(_0x3f05c0>=0x0){var _0x2473a4=_0x445793['jsFunctionDict'][_0x3f05c0];'isBinary'in _0x431a56[_0x3ec709(0x1ea)]?_0x445793['binaryFunctionQueue']['push']({'funcName':_0x431a56[_0x3ec709(0x218)],'callback':_0x2473a4[_0x3ec709(0x211)],'args':_0x431a56[_0x3ec709(0x1ea)]}):_0x2473a4[_0x3ec709(0x211)](_0x431a56[_0x3ec709(0x1ea)]);}else{if(_0x431a56['funcName']==='getPythonFunctionLibrary')return;else throw _0x3ec709(0x233)+_0x431a56[_0x3ec709(0x218)];}}else{if(_0x3ec709(0x203)in _0x431a56){if(_0x431a56['funcName']in _0x445793['pythonMultipleCallbackDict']){var _0x210638=_0x445793['pythonMultipleCallbackDict'][_0x431a56[_0x3ec709(0x218)]];switch(_0x210638[_0x3ec709(0x1f5)]){case 0x0:break;case 0x1:if('error'in _0x431a56)_0x210638[0x0](_0x431a56[_0x3ec709(0x1f3)],![]);if('return'in _0x431a56)_0x210638[0x0](_0x431a56[_0x3ec709(0x203)],_0x431a56[_0x3ec709(0x24e)],![]);break;case 0x2:if(_0x3ec709(0x1f3)in _0x431a56)_0x210638[0x0](_0x431a56['error'],![]);if(_0x3ec709(0x24e)in _0x431a56)_0x210638[0x0](_0x431a56['streaming'],_0x431a56[_0x3ec709(0x24e)],![]);if(_0x431a56[_0x3ec709(0x203)]==_0x3ec709(0x250))_0x210638[0x1](_0x431a56[_0x3ec709(0x214)],_0x431a56[_0x3ec709(0x24d)],![]);break;case 0x3:if('error'in _0x431a56)_0x210638[0x0](_0x431a56['error'],![]);if(_0x431a56[_0x3ec709(0x203)]==_0x3ec709(0x207))_0x210638[0x0](_0x431a56['return'],![]);if(_0x431a56[_0x3ec709(0x203)]=='row')_0x210638[0x1](_0x431a56['stream_index'],_0x431a56[_0x3ec709(0x24d)],![]);if(_0x431a56[_0x3ec709(0x203)]==_0x3ec709(0x245))_0x210638[0x2](_0x431a56[_0x3ec709(0x241)],![]);break;case 0x4:if(_0x3ec709(0x1f3)in _0x431a56)_0x210638[0x4](_0x431a56[_0x3ec709(0x1f3)],![]);if(_0x431a56[_0x3ec709(0x203)]==_0x3ec709(0x207))_0x210638[0x0](_0x431a56['return'],![]);if(_0x431a56[_0x3ec709(0x203)]==_0x3ec709(0x250))_0x210638[0x1](_0x431a56[_0x3ec709(0x214)],_0x431a56[_0x3ec709(0x24d)],![]);if(_0x431a56['streaming']=='end')_0x210638[0x2](_0x431a56['stream_empty'],![]);break;default:throw _0x3ec709(0x1f7)+_0x431a56[_0x3ec709(0x218)];}}else throw'No\x20function\x20callback\x20defined\x20for\x20'+_0x431a56['funcName'];}else{if(_0x431a56['funcName']in _0x445793[_0x3ec709(0x24b)]){var _0x210638=_0x445793['pythonMultipleCallbackDict'][_0x431a56['funcName']];switch(_0x210638[_0x3ec709(0x1f5)]){case 0x0:break;case 0x1:if(_0x3ec709(0x1f3)in _0x431a56)_0x210638[0x0](_0x431a56[_0x3ec709(0x1f3)],![]);if('return'in _0x431a56)_0x210638[0x0](_0x431a56['return'],![]);break;case 0x2:if(_0x3ec709(0x1f3)in _0x431a56)_0x210638[0x1](_0x431a56[_0x3ec709(0x1f3)],![]);if(_0x3ec709(0x24e)in _0x431a56)_0x210638[0x0](_0x431a56[_0x3ec709(0x24e)],![]);break;case 0x3:if(_0x3ec709(0x1f3)in _0x431a56)_0x210638[0x0](_0x431a56[_0x3ec709(0x1f3)],![]);if(_0x3ec709(0x24e)in _0x431a56)_0x210638[0x0](_0x431a56[_0x3ec709(0x24e)],![]);break;default:throw _0x3ec709(0x1f7)+_0x431a56[_0x3ec709(0x218)];}}else{var _0x3f05c0=_0x445793['pythonCallbackDict'][_0x3ec709(0x221)](function(_0x172817){var _0x37e98e=_0x3ec709;return _0x172817[_0x37e98e(0x218)];})[_0x3ec709(0x22e)](_0x431a56[_0x3ec709(0x218)]);if(_0x3f05c0>=0x0){var _0x2473a4=_0x445793[_0x3ec709(0x238)][_0x3f05c0];_0x431a56['return']===undefined?_0x431a56[_0x3ec709(0x1f3)]!==undefined&&_0x2473a4['callback'](_0x431a56[_0x3ec709(0x1f3)],![]):_0x2473a4[_0x3ec709(0x202)](_0x431a56[_0x3ec709(0x24e)],!![]);}else throw _0x3ec709(0x233)+_0x431a56[_0x3ec709(0x218)];}}}}else{console[_0x3ec709(0x249)](_0x3ec709(0x236));var _0x16d93e=new Uint8Array(_0x3d8757[_0x3ec709(0x244)]),_0x3638bf='\x20';for(var _0x2955e5=0x0;_0x2955e5<_0x16d93e[_0x3ec709(0x1f5)];_0x2955e5++){_0x3638bf+=(_0x3ec709(0x219)+_0x16d93e[_0x2955e5]['toString'](0x10))[_0x3ec709(0x23d)](-0x2);}var _0x2b459e=_0x3d8757[_0x3ec709(0x244)],_0x3b481=new Uint8Array(_0x2b459e),_0x2cee4a=new Blob([_0x3b481['buffer']]);if(_0x445793[_0x3ec709(0x212)][_0x3ec709(0x1f5)]>0x0){var _0x20819b=_0x445793[_0x3ec709(0x212)][_0x3ec709(0x23e)]();_0x20819b[_0x3ec709(0x1ea)][_0x3ec709(0x1fa)]=_0x2cee4a,_0x20819b[_0x3ec709(0x202)](_0x20819b[_0x3ec709(0x1ea)]);}else{var _0x18effa=new FileReader();_0x18effa['onload']=function(_0x3e8338){var _0x177632=_0x3ec709,_0x5b0426=document[_0x177632(0x1eb)](_0x177632(0x206));_0x5b0426[_0x177632(0x20a)]=_0x3e8338['target'][_0x177632(0x257)],document[_0x177632(0x1f2)][_0x177632(0x201)](_0x5b0426);},_0x18effa[_0x3ec709(0x213)](_0x2cee4a),document['getElementById']('StatusBar')[_0x3ec709(0x243)]=_0x3ec709(0x208);}console['log'](_0x3ec709(0x23c),_0x3638bf);}_0x445793[_0x3ec709(0x239)]!==undefined&&_0x445793[_0x3ec709(0x239)](),_0x445793[_0x3ec709(0x20b)][_0x3ec709(0x1e0)](_0x1efa3f=>_0x1efa3f());},this[_0x8f44ca(0x23a)][_0x8f44ca(0x200)]=function(_0x51e1cf){var _0x51f485=_0x8f44ca;console[_0x51f485(0x249)]('Connection\x20to\x20'+_0x408158+_0x51f485(0x22b)),_0x445793['PreCloseEventHandlers'][_0x51f485(0x1e0)](_0x2d0ac1=>_0x2d0ac1(_0x51e1cf)),_0x445793['isOpen']=![],this[_0x51f485(0x23a)]=null,_0x445793[_0x51f485(0x200)]!==undefined&&_0x445793[_0x51f485(0x200)](_0x51e1cf),_0x445793['PostCloseEventHandlers']['forEach'](_0x10c6ad=>_0x10c6ad(_0x51e1cf));};},this[_0x522c79(0x20d)]=function(){var _0x23dc5b=_0x522c79;return this[_0x23dc5b(0x1df)];},this[_0x522c79(0x242)]=function(_0x10051b){return this['PythonFunctions'][_0x10051b];};}module['exports']=RemotePyClient;
|
package/package.json
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotepy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "JavaScript library to connect to RemotePy server. Allows you to call python functions on server from JavaScript.",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "dist/RemotePyClient.common.js",
|
|
6
|
+
"module": "dist/RemotePyClient.esm.js",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"build": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
8
|
+
"dev-build": "mkdirp dist && cp-cli src/RemotePyClient.js dist/RemotePyClient.dev.js",
|
|
9
|
+
"prod-build": "mkdirp dist && npx uglify-js src/RemotePyClient.js --compress --mangle --output dist/RemotePyClient.min.js && npx javascript-obfuscator dist/RemotePyClient.min.js --output dist/RemotePyClient.obfuscated.js && cp-cli dist/RemotePyClient.obfuscated.js dist/RemotePyClient.common.js && echo export default RemotePyClient; >> dist/RemotePyClient.common.js && npx rename-cli dist/RemotePyClient.common.js dist/RemotePyClient.esm.js",
|
|
10
|
+
"build": "npm run dev-build && npm run process",
|
|
11
|
+
"process": "mkdirp dist && npm run minify && npm run obfuscate",
|
|
12
|
+
"minify": "terser src/RemotePyClient.js -o dist/RemotePyClient.min.js",
|
|
13
|
+
"obfuscate": "javascript-obfuscator dist/RemotePyClient.min.js --output dist/RemotePyClient.obfuscated.js && cp-cli dist/RemotePyClient.obfuscated.js dist/RemotePyClient.esm.js",
|
|
14
|
+
"update-file": "echo export default RemotePyClient; >> RemotePyClient.common.js",
|
|
15
|
+
"rename-file": "rename RemotePyClient.common.js RemotePyClient.esm.js || mv RemotePyClient.common.js RemotePyClient.esm.js",
|
|
16
|
+
"test": "cross-env NODE_ENV=test mocha test/RemotePyClient.test.js",
|
|
17
|
+
"publish": "npm run build && cp-cli dist/RemotePyClient.esm.js ./RemotePyClient.js && npm publish && rm ./RemotePyClient.js"
|
|
12
18
|
},
|
|
13
19
|
"repository": {
|
|
14
20
|
"type": "git",
|
|
@@ -34,9 +40,17 @@
|
|
|
34
40
|
"devDependencies": {
|
|
35
41
|
"@babel/core": "^7.25.2",
|
|
36
42
|
"@babel/preset-env": "^7.25.3",
|
|
43
|
+
"assert": "^2.0.0",
|
|
37
44
|
"babel-loader": "^9.1.3",
|
|
38
|
-
"
|
|
45
|
+
"cp-cli": "^1.0.2",
|
|
46
|
+
"cpy-cli": "^5.0.0",
|
|
47
|
+
"cross-env": "^7.0.3",
|
|
48
|
+
"javascript-obfuscator": "^4.1.1",
|
|
49
|
+
"mkdirp": "^3.0.1",
|
|
50
|
+
"mocha": "^10.0.0",
|
|
51
|
+
"rename-cli": "^7.0.2",
|
|
39
52
|
"terser": "^5.19.2",
|
|
53
|
+
"uglify-js": "^3.19.1",
|
|
40
54
|
"webpack": "^5.93.0",
|
|
41
55
|
"webpack-cli": "^5.1.4"
|
|
42
56
|
},
|
|
@@ -44,8 +58,12 @@
|
|
|
44
58
|
"build/remotepy.minobs.js"
|
|
45
59
|
],
|
|
46
60
|
"dependencies": {
|
|
61
|
+
"cpx": "^1.2.1",
|
|
47
62
|
"msgpack-lite": "^0.1.26",
|
|
48
|
-
"
|
|
63
|
+
"npx": "^3.0.0",
|
|
49
64
|
"ws": "^8.13.0"
|
|
65
|
+
},
|
|
66
|
+
"directories": {
|
|
67
|
+
"test": "test"
|
|
50
68
|
}
|
|
51
69
|
}
|