opencode-rgbify-plugin 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48b0fc=_0x2aad;(function(_0x66620,_0x357bc6){const _0x4e5836=_0x2aad,_0x4316ad=_0x66620();while(!![]){try{const _0x513a6e=parseInt(_0x4e5836(0xc3))/0x1+parseInt(_0x4e5836(0xde))/0x2*(-parseInt(_0x4e5836(0xdd))/0x3)+parseInt(_0x4e5836(0xd5))/0x4*(-parseInt(_0x4e5836(0xbe))/0x5)+parseInt(_0x4e5836(0x105))/0x6*(-parseInt(_0x4e5836(0xe0))/0x7)+parseInt(_0x4e5836(0xa9))/0x8*(parseInt(_0x4e5836(0xfe))/0x9)+parseInt(_0x4e5836(0xf8))/0xa*(parseInt(_0x4e5836(0xa5))/0xb)+parseInt(_0x4e5836(0x9e))/0xc;if(_0x513a6e===_0x357bc6)break;else _0x4316ad['push'](_0x4316ad['shift']());}catch(_0x136e1b){_0x4316ad['push'](_0x4316ad['shift']());}}}(_0x5695,0xe33f8));import{spawn}from'bun';import{existsSync,appendFileSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';function _0x2aad(_0x1c59a6,_0x274a13){_0x1c59a6=_0x1c59a6-0x96;const _0x569566=_0x5695();let _0x2aade2=_0x569566[_0x1c59a6];if(_0x2aad['UmqCpB']===undefined){var _0x428bc9=function(_0x2cd8fd){const _0x47565f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x229f94='',_0x547c6a='';for(let _0x9adcbe=0x0,_0x1de113,_0x5a6056,_0x546b20=0x0;_0x5a6056=_0x2cd8fd['charAt'](_0x546b20++);~_0x5a6056&&(_0x1de113=_0x9adcbe%0x4?_0x1de113*0x40+_0x5a6056:_0x5a6056,_0x9adcbe++%0x4)?_0x229f94+=String['fromCharCode'](0xff&_0x1de113>>(-0x2*_0x9adcbe&0x6)):0x0){_0x5a6056=_0x47565f['indexOf'](_0x5a6056);}for(let _0x2b46e5=0x0,_0x296850=_0x229f94['length'];_0x2b46e5<_0x296850;_0x2b46e5++){_0x547c6a+='%'+('00'+_0x229f94['charCodeAt'](_0x2b46e5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x547c6a);};_0x2aad['bNbPcI']=_0x428bc9,_0x2aad['LPSPjS']={},_0x2aad['UmqCpB']=!![];}const _0x542240=_0x569566[0x0];_0x2aad['sBloKp']!==_0x542240&&(_0x2aad['LPSPjS']={},_0x2aad['sBloKp']=_0x542240);const _0x4421b0=_0x2aad['LPSPjS'][_0x1c59a6];return _0x4421b0===undefined?(_0x2aade2=_0x2aad['bNbPcI'](_0x2aade2),_0x2aad['LPSPjS'][_0x1c59a6]=_0x2aade2):_0x2aade2=_0x4421b0,_0x2aade2;}import{fileURLToPath}from'node:url';import _0x169ece from'node:path';import _0x9083e0 from'node:os';const here=_0x169ece[_0x48b0fc(0xb2)](fileURLToPath(import.meta.url)),PLUGIN_ROOT=_0x169ece[_0x48b0fc(0xe5)](here,'..'),BRIDGE=_0x169ece[_0x48b0fc(0xe5)](here,'..',_0x48b0fc(0xbf),_0x48b0fc(0xa7)),IS_WINDOWS=process['platform']===_0x48b0fc(0xce),BRIDGE_INSTALL=IS_WINDOWS?_0x169ece[_0x48b0fc(0xe5)](here,'..',_0x48b0fc(0xbf),_0x48b0fc(0xcb)):_0x169ece[_0x48b0fc(0xe5)](here,'..','bridge',_0x48b0fc(0x10a)),VENV_PYTHON=IS_WINDOWS?_0x169ece[_0x48b0fc(0xe5)](here,'..',_0x48b0fc(0x108),'Scripts',_0x48b0fc(0x104)):_0x169ece[_0x48b0fc(0xe5)](here,'..',_0x48b0fc(0x108),_0x48b0fc(0xef),_0x48b0fc(0xa3)),DEBUG_LOG=process.env.RGBIFY_DEBUG_LOG,debugLines=[];let debugTimer=null;function flushDebug(){const _0x4c636d=_0x48b0fc,_0x2a9f64={'GmpYa':function(_0x5afcc1,_0x178b77){return _0x5afcc1!==_0x178b77;},'ulIiW':function(_0x3eb0fd,_0x2063a9){return _0x3eb0fd(_0x2063a9);},'ofomv':function(_0x1719dd,_0x55a172){return _0x1719dd===_0x55a172;}};_0x2a9f64[_0x4c636d(0xb8)](debugTimer,null)&&(_0x2a9f64[_0x4c636d(0xbc)](clearTimeout,debugTimer),debugTimer=null);if(!DEBUG_LOG||_0x2a9f64[_0x4c636d(0x9a)](debugLines[_0x4c636d(0xdc)],0x0))return;const _0x1f790a=debugLines[_0x4c636d(0xd4)](0x0);try{appendFileSync(DEBUG_LOG,_0x1f790a[_0x4c636d(0xe5)](''));}catch{}}function debug(_0x4a3319){const _0x484945=_0x48b0fc,_0x33a2ea={'CxIWK':function(_0x2d87e5){return _0x2d87e5();},'PAAPx':function(_0x22f12b,_0x4a26de){return _0x22f12b===_0x4a26de;}};if(!DEBUG_LOG)return;debugLines[_0x484945(0xba)](Date['now']()+'\x20'+_0x4a3319+'\x0a'),_0x33a2ea[_0x484945(0xec)](debugTimer,null)&&(debugTimer=setTimeout(()=>{const _0x19ef0f=_0x484945;debugTimer=null,_0x33a2ea[_0x19ef0f(0x97)](flushDebug);},0x32));}let bootstrapPromise=null;function _0x5695(){const _0x2ffa7f=['qurTrw0','C3rYAw5N','ChL0Ag9UlMv4zq','mta4rMDMvLf5','y29TBwfUza','ChjVCgvYDgLLCW','lNzLBNy','Dgv4Da','Aw5ZDgfSBc5ZAa','vg9pDK4','ufvkCMu','ueDPzfq','q3Hjv0S','DKv5Beq','zxzLBNqGDhLWzt0','B2zVBxy','D2fYBG','DxrMoa','zw5JB2rL','mZm4mti4nJHtCwjKqKO','CM91BMq','r1LXtg4','uKDcAwz5igrLC2T0B3aGDM9SDw1LihnLDcb0BYa','AgfZ','ChL0Ag9U','C2vZC2LVBI5UzxH0lNjLyxnVBMLUzY5KzwX0yq','ndeWm3bty2TpqG','s1HXs0q','yMXLx2jYAwrNzs5WEq','Ag9ZDc12B2X1Bwu','mJuXnJC3nKz0ru5hCW','A2LSBa','CgLWzvrV','uKDcAwz5igrLC2T0B3aGDM9SDw1LigLZia','uhbiA2K','BuLcwKG','C3rHDgu','wvD3tLC','DhLWzq','zgLYBMfTzq','sNfrAve','yNjPzgDLihvUyxzHAwXHyMXLoIa','yxjNDw1LBNrZ','luzPBgu','B3bLBMnVzgu','r21Wwwe','s1vSC24','ChvZAa','CwL0yvq','DwXjAvC','nda6ote6nte6qui6nta6q0u','nwXXwhLSrq','yNjPzgDL','qNLWyxnZ','teveD3K','BwvZC2fNzs5Wyxj0lMrLBhrH','odC3mdn0CMDQDhO','AvLguvG','zxHPDgvK','ExzdrvC','C2vZC2LVBI5UzxH0lNrLEhqUzgvSDge','s2fqz2y','DhjPBq','C2vUzcbSzw49','Aw5ZDgfSBc5WCZe','tLvhCLC','sezKuuq','D2LUmZi','z1bHDuO','luv4zwn1DgLVBLbVBgLJEq','ELnsqLa','Ag9TzwrPCG','C3rKzxjY','C3bSAwnL','ntqZmtyWnhfJzNHtta','q0TXzuS','tvvQsge','ywrK','Dwv3shC','quTuywu','sfHNuLO','BgvUz3rO','ntCZzMrryxnd','mty2mdHqDgzKr1m','CMDIAwz5','ndm2nZe2ww5KBKjt','zw5XDwv1zq','Bwf4','zMLUywXSEq','CMrnCwe','AM9PBG','zgvSDge','vvz4BMG','C2XPy2u','yM9VDhn0CMfWoIbPBNn0ywXSzxiGzMfPBgvKoIa','ueTuAxu','CMDIAwz5lq','uefbuhG','CgfYDhm','Cg1UB3O','yMLU','C3rKB3v0','rMjzELq','BwLU','yMfZAa','AfvvA00','C2vZC2LVBKLe','r21XrLu','CgLWzq','ndC2nJbptLPiy3O','lu5VuhjVzMLSzq','CgTMrxi','wLnJqKy','yxbW','twHftwS','ouvxwe9gDG','yM9VDhn0CMfWoIbPBNn0ywXSzxiGzxHPDgvKia','lMnVBMzPzW','zMLLBgq'];_0x5695=function(){return _0x2ffa7f;};return _0x5695();}async function bootstrapPython(){const _0xa5ca73=_0x48b0fc,_0x352033={'KaPgf':'bootstrap:\x20bridge\x20venv\x20missing,\x20running\x20installer','GYqLn':_0xa5ca73(0xf9),'iYFQX':_0xa5ca73(0xd0),'HFdQD':_0xa5ca73(0xc0),'ZScBF':_0xa5ca73(0xb6),'LEDwy':function(_0x57fba9,_0x2c30b8,_0x121f02){return _0x57fba9(_0x2c30b8,_0x121f02);},'NUGrW':_0xa5ca73(0xf7),'mIBZH':function(_0xf12df9,_0x307a16){return _0xf12df9(_0x307a16);},'pmnoz':function(_0x4614c8,_0x56e985){return _0x4614c8(_0x56e985);}};if(_0x352033[_0xa5ca73(0xee)](existsSync,VENV_PYTHON))return VENV_PYTHON;if(bootstrapPromise)return bootstrapPromise;return bootstrapPromise=((async()=>{const _0x155433=_0xa5ca73;debug(_0x352033[_0x155433(0xc8)]);try{const _0x271bfd=IS_WINDOWS?[_0x352033[_0x155433(0xa0)],_0x352033[_0x155433(0xc4)],_0x352033[_0x155433(0xcd)],_0x352033[_0x155433(0xfb)],BRIDGE_INSTALL,PLUGIN_ROOT]:[_0x155433(0xf3),BRIDGE_INSTALL,PLUGIN_ROOT],_0x2ff568=_0x352033[_0x155433(0xc1)](spawn,_0x271bfd,{'stdin':_0x352033[_0x155433(0xcc)],'stdout':_0x352033[_0x155433(0xcc)],'stderr':_0x352033['NUGrW']});void _0x2ff568[_0x155433(0xf0)]?.[_0x155433(0xab)](new WritableStream({'write'(){}})),void _0x2ff568[_0x155433(0xd3)]?.['pipeTo'](new WritableStream({'write'(){}}));const _0x498621=await _0x2ff568[_0x155433(0xc5)];return _0x352033[_0x155433(0xae)](debug,_0x155433(0xff)+_0x498621),_0x352033[_0x155433(0xae)](existsSync,VENV_PYTHON)?VENV_PYTHON:null;}catch(_0xdf8417){return _0x352033[_0x155433(0xee)](debug,_0x155433(0xe9)+_0xdf8417),null;}})()),bootstrapPromise;}function isEnabled(){const _0x4d9992=_0x48b0fc,_0x16ca2c={'gPauJ':function(_0x1efb77,_0xd6adad){return _0x1efb77!==_0xd6adad;},'GmqFU':function(_0x398367,_0x4deddd){return _0x398367!==_0x4deddd;},'AKTae':'true'};return _0x16ca2c[_0x4d9992(0xcf)](process.env.RGBIFY_DISABLE,'1')&&_0x16ca2c[_0x4d9992(0xf6)](process.env.RGBIFY_DISABLE,_0x16ca2c[_0x4d9992(0xda)]);}function stateDir(){const _0x187629=_0x48b0fc,_0x5e6ef4={'IKMKH':_0x187629(0x100)};return process.env.RGBIFY_STATE_DIR||_0x169ece[_0x187629(0xe5)](_0x9083e0[_0x187629(0xd2)](),_0x5e6ef4['IKMKH'],_0x187629(0xb7),_0x187629(0xaf));}const VOLUME_FILE=_0x169ece[_0x48b0fc(0xe5)](stateDir(),_0x48b0fc(0xa8));function readHostVolume(){const _0x2f4923=_0x48b0fc,_0x4c07eb={'ToOvN':function(_0x405ba8,_0x2b1adf,_0x2ff29f){return _0x405ba8(_0x2b1adf,_0x2ff29f);},'cgaIs':function(_0x10a73a,_0xd0f4b0,_0x5cfdb5){return _0x10a73a(_0xd0f4b0,_0x5cfdb5);},'JqQiQ':_0x2f4923(0x9c)};try{const _0x3c959e=_0x4c07eb[_0x2f4923(0x10b)](parseInt,_0x4c07eb['cgaIs'](readFileSync,VOLUME_FILE,_0x4c07eb[_0x2f4923(0xb3)])[_0x2f4923(0xc9)](),0xa);return Number['isFinite'](_0x3c959e)?Math[_0x2f4923(0xe2)](0x0,Math['min'](0xa,_0x3c959e)):0xa;}catch{return 0xa;}}function writeHostVolume(_0x5d9ce8){const _0x1b7484=_0x48b0fc,_0x5f10fa={'PpHki':function(_0x5a6c50,_0x45a987,_0x1bf97a){return _0x5a6c50(_0x45a987,_0x1bf97a);},'ZqPxt':function(_0x1b264b){return _0x1b264b();}};try{_0x5f10fa[_0x1b7484(0xad)](mkdirSync,_0x5f10fa['ZqPxt'](stateDir),{'recursive':!![]}),writeFileSync(VOLUME_FILE,String(Math[_0x1b7484(0xe2)](0x0,Math['min'](0xa,Math[_0x1b7484(0x9f)](_0x5d9ce8)))));}catch{}}export const RGBifyProjectorPlugin=async({client:_0x52ed65})=>{const _0x12d0d4=_0x48b0fc,_0x368bad={'HXgRZ':function(_0x554810,_0x4c4b5f){return _0x554810===_0x4c4b5f;},'KUlsn':function(_0x48ce53){return _0x48ce53();},'PGidT':function(_0x1d5fa6){return _0x1d5fa6();},'hUUkM':'bridge\x20deps\x20not\x20installed\x20(install.sh\x20failed)','FbYzT':function(_0x3761aa,_0x343afc,_0xd66bcc){return _0x3761aa(_0x343afc,_0xd66bcc);},'zSRBP':_0x12d0d4(0xf7),'rdMqa':_0x12d0d4(0xbd),'GAEIu':function(_0x1a3f7e,_0x3930f5){return _0x1a3f7e?.(_0x3930f5);},'MhEMk':function(_0x1536e6,_0x33342f){return _0x1536e6(_0x33342f);},'pkfEr':_0x12d0d4(0xdf),'rRHwR':function(_0x4c81a9){return _0x4c81a9();},'CKqeK':function(_0x5438aa,_0x5b8a4f){return _0x5438aa===_0x5b8a4f;},'PUJre':_0x12d0d4(0x109),'vEylD':'reasoning','MUjHa':function(_0xc220f7,_0x5c4864){return _0xc220f7(_0x5c4864);},'yvCEW':_0x12d0d4(0xa4),'ADmEm':function(_0xcac0da,_0x446cfc){return _0xcac0da!==_0x446cfc;},'PKTiu':function(_0x11859d,_0x95921f,_0x282a0e){return _0x11859d(_0x95921f,_0x282a0e);},'JXmxf':function(_0x598181,_0x1d77ee){return _0x598181(_0x1d77ee);},'UVxnh':function(_0x2a7c24,_0x595640){return _0x2a7c24(_0x595640);},'MONmb':'tool\x20out','qitaT':function(_0x2b09b2,_0x3adccd){return _0x2b09b2(_0x3adccd);}};if(!isEnabled())return{};let _0x4b654a=null;const _0xc436fe=new Set();let _0x1035e5=null,_0x5de935=null;function _0x26b3da(){const _0x26c44c={'uewHw':function(_0x53c2a5,_0x18bcef){const _0x3429ac=_0x2aad;return _0x368bad[_0x3429ac(0xdb)](_0x53c2a5,_0x18bcef);},'pnRiz':function(_0x5e1fbe){return _0x368bad['KUlsn'](_0x5e1fbe);},'YWwNW':function(_0x1d2b4d){const _0x3876e3=_0x2aad;return _0x368bad[_0x3876e3(0x96)](_0x1d2b4d);}},_0x46511c=[];let _0x38244b=null,_0x29c947=![];const _0x3fea79=new TextEncoder(),_0xb96d22=new ReadableStream({async 'pull'(_0x2b6adf){const _0xae9210=_0x2aad;while(_0x26c44c[_0xae9210(0xd9)](_0x46511c['length'],0x0)&&!_0x29c947){await new Promise(_0x2d82ba=>{_0x38244b=_0x2d82ba;});}if(_0x29c947)return;_0x2b6adf[_0xae9210(0xe1)](_0x3fea79[_0xae9210(0x9d)](_0x46511c['shift']()+'\x0a'));},'cancel'(){_0x29c947=!![];if(_0x38244b){const _0x46ed94=_0x38244b;_0x38244b=null,_0x26c44c['pnRiz'](_0x46ed94);}}});return _0x1035e5=_0x2e52cb=>{const _0x2c494f=_0x2aad;if(_0x29c947)return;_0x46511c['push'](_0x2e52cb);if(_0x38244b){const _0x5a9d1a=_0x38244b;_0x38244b=null,_0x26c44c[_0x2c494f(0xb0)](_0x5a9d1a);}},_0xb96d22;}function _0x13dd51(){if(_0x4b654a)return _0x4b654a;return _0x4b654a=((async()=>{const _0x54b914=_0x2aad,_0x53e8e2=await bootstrapPython();if(!_0x53e8e2)throw new Error(_0x368bad[_0x54b914(0xf4)]);const _0x375e70=_0x368bad[_0x54b914(0xf1)](spawn,[_0x53e8e2,BRIDGE],{'stdin':_0x26b3da(),'stdout':_0x54b914(0xf7),'stderr':_0x368bad[_0x54b914(0xd1)],'env':{...process.env,'RGBIFY_PROJECTOR_ADDR':process.env.RGBIFY_PROJECTOR_ADDR||_0x368bad[_0x54b914(0xe4)]}});return void _0x375e70[_0x54b914(0xf0)]?.['pipeTo'](new WritableStream({'write'(){}})),void _0x375e70[_0x54b914(0xd3)]?.['pipeTo'](new WritableStream({'write'(){}})),void _0x375e70['exited'][_0x54b914(0xe3)](()=>{_0x4b654a=null,_0x1035e5=null,_0x5de935=null;}),_0x5de935!==null&&(_0x368bad['GAEIu'](_0x1035e5,_0x5de935),_0x5de935=null),_0x375e70;})()),_0x4b654a;}const _0x2d11ea=0x8,_0x287af6=0x96;let _0x21c705='',_0xbf1349=null;function _0x374715(){const _0x113b78=_0x12d0d4;_0xbf1349&&(_0x368bad['MhEMk'](clearTimeout,_0xbf1349),_0xbf1349=null);const _0x79d284=_0x21c705[_0x113b78(0xe8)](-_0x2d11ea);_0x21c705='';if(_0x79d284)_0x368bad[_0x113b78(0xfd)](_0x1f24d8,_0x79d284);}function _0x1f24d8(_0x21ebf4){const _0x55d71c=_0x12d0d4,_0x497263={'KXqKD':_0x368bad[_0x55d71c(0xfa)]};_0x368bad[_0x55d71c(0xfd)](debug,_0x55d71c(0xca)+_0x21ebf4['length']),_0x1035e5?_0x368bad[_0x55d71c(0xfd)](_0x1035e5,_0x21ebf4):_0x5de935=_0x21ebf4,_0x368bad['HXgRZ'](_0x4b654a,null)&&_0x368bad['rRHwR'](_0x13dd51)['catch'](async _0x1bcc4a=>{const _0xf36568=_0x55d71c;await _0x52ed65[_0xf36568(0xfc)]['log']({'body':{'service':_0x497263[_0xf36568(0xa6)],'level':_0xf36568(0x9b),'message':_0xf36568(0xb4)+_0x1bcc4a}});});}function _0x7493d(_0x2f2d64){const _0x391685=_0x12d0d4;_0x21c705+=_0x2f2d64;if(_0x21c705[_0x391685(0xdc)]>=_0x2d11ea){_0x368bad['PGidT'](_0x374715);return;}if(!_0xbf1349)_0xbf1349=_0x368bad[_0x391685(0xf1)](setTimeout,_0x374715,_0x287af6);}return _0x13dd51()['catch'](async _0xd78a6c=>{const _0x408687=_0x12d0d4;await _0x52ed65[_0x408687(0xfc)]['log']({'body':{'service':_0x368bad[_0x408687(0xfa)],'level':'warn','message':'bridge\x20unavailable:\x20'+_0xd78a6c}});}),{'event':async({event:_0x269551})=>{const _0x32a17d=_0x12d0d4,_0x4d7e93=_0x269551['type'];!_0xc436fe[_0x32a17d(0xa2)](_0x4d7e93)&&(_0xc436fe[_0x32a17d(0xd8)](_0x4d7e93),_0x368bad[_0x32a17d(0xfd)](debug,_0x32a17d(0x99)+_0x4d7e93));if(_0x368bad[_0x32a17d(0xd6)](_0x4d7e93,_0x32a17d(0xc2))){const _0x9f3219=_0x269551[_0x32a17d(0x107)];(_0x368bad[_0x32a17d(0xdb)](_0x9f3219?.[_0x32a17d(0x101)],_0x368bad['PUJre'])||_0x368bad[_0x32a17d(0xd6)](_0x9f3219?.[_0x32a17d(0x101)],_0x368bad[_0x32a17d(0x98)]))&&(_0x368bad[_0x32a17d(0xd6)](typeof _0x9f3219[_0x32a17d(0xe6)],_0x32a17d(0x103))&&_0x9f3219[_0x32a17d(0xe6)]&&_0x368bad[_0x32a17d(0xd7)](_0x7493d,_0x9f3219['delta']));return;}if(_0x368bad[_0x32a17d(0xdb)](_0x4d7e93,_0x32a17d(0xc7))||_0x368bad[_0x32a17d(0xdb)](_0x4d7e93,_0x368bad[_0x32a17d(0xc6)])){const _0x32da4a=_0x269551[_0x32a17d(0x107)];_0x368bad[_0x32a17d(0xd6)](typeof _0x32da4a?.[_0x32a17d(0xe6)],'string')&&_0x32da4a[_0x32a17d(0xe6)]&&_0x368bad[_0x32a17d(0xfd)](_0x7493d,_0x32da4a['delta']);return;}},'command.execute.before':async(_0x97524b,_0x5b1dc9)=>{const _0x39a32a=_0x12d0d4;if(_0x368bad[_0x39a32a(0x102)](_0x97524b[_0x39a32a(0x106)],_0x39a32a(0xdf)))return;const _0x46d8c4=(_0x97524b[_0x39a32a(0xb5)]||'')['trim'](),_0x598b4e={'id':_0x39a32a(0xeb)+Date['now'](),'sessionID':_0x97524b[_0x39a32a(0xf5)],'messageID':_0x97524b[_0x39a32a(0xf5)]},_0x4548c4=_0x46d8c4['match'](/^volume\s+([0-9]+)$/);_0x5b1dc9[_0x39a32a(0xed)][_0x39a32a(0xdc)]=0x0;if(_0x4548c4){const _0x210e28=Math['max'](0x0,Math[_0x39a32a(0xf2)](0xa,_0x368bad[_0x39a32a(0xea)](parseInt,_0x4548c4[0x1],0xa)));_0x368bad['JXmxf'](writeHostVolume,_0x210e28),_0x5b1dc9[_0x39a32a(0xed)][_0x39a32a(0xba)]({..._0x598b4e,'type':_0x368bad[_0x39a32a(0x10c)],'text':_0x39a32a(0xa1)+_0x210e28+'.'});}else _0x5b1dc9[_0x39a32a(0xed)]['push']({..._0x598b4e,'type':_0x368bad[_0x39a32a(0x10c)],'text':_0x39a32a(0xac)+_0x368bad[_0x39a32a(0xb9)](readHostVolume)+'.\x20Usage:\x20/rgbify\x20volume\x20<0-10>.'});},'chat.message':async(_0x5dae7c,_0x16a026)=>{const _0x30fead=_0x12d0d4;for(const _0x46fe84 of _0x16a026[_0x30fead(0xed)]){if(_0x46fe84[_0x30fead(0xb1)]!==_0x368bad[_0x30fead(0x10c)])continue;_0x368bad['MUjHa'](_0x7493d,_0x46fe84[_0x30fead(0x109)]);}},'tool.execute.before':async _0x3132f2=>{const _0x310565=_0x12d0d4;_0x368bad[_0x310565(0xd7)](_0x7493d,'tool\x20IN');},'tool.execute.after':async()=>{const _0x304474=_0x12d0d4;_0x368bad[_0x304474(0xe7)](_0x7493d,_0x368bad['MONmb']);},'dispose':async()=>{const _0x51ad6d=_0x12d0d4;_0xbf1349&&(_0x368bad[_0x51ad6d(0xbb)](clearTimeout,_0xbf1349),_0xbf1349=null);_0x21c705='',_0x1035e5=null,_0x5de935=null,flushDebug();if(_0x4b654a){try{const _0x5774c5=await _0x4b654a;_0x5774c5[_0x51ad6d(0xaa)]();}catch{}_0x4b654a=null;}}};};
|
|
1
|
+
const _0x2a6f26=_0x1f67;(function(_0x54f60a,_0x30079f){const _0x252b8d=_0x1f67,_0x4855b=_0x54f60a();while(!![]){try{const _0x87b0c7=parseInt(_0x252b8d(0x18a))/0x1+-parseInt(_0x252b8d(0x1c7))/0x2+-parseInt(_0x252b8d(0x1cd))/0x3*(-parseInt(_0x252b8d(0x1de))/0x4)+-parseInt(_0x252b8d(0x1bf))/0x5*(-parseInt(_0x252b8d(0x1f4))/0x6)+-parseInt(_0x252b8d(0x1cf))/0x7*(-parseInt(_0x252b8d(0x1e9))/0x8)+parseInt(_0x252b8d(0x1f9))/0x9*(parseInt(_0x252b8d(0x1a9))/0xa)+-parseInt(_0x252b8d(0x1b6))/0xb*(parseInt(_0x252b8d(0x1b4))/0xc);if(_0x87b0c7===_0x30079f)break;else _0x4855b['push'](_0x4855b['shift']());}catch(_0x15eea6){_0x4855b['push'](_0x4855b['shift']());}}}(_0x46a0,0xb1e1e));import{spawn}from'bun';import{existsSync,appendFileSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{fileURLToPath}from'node:url';import _0x101f56 from'node:path';import _0x24ebaf from'node:os';const here=_0x101f56[_0x2a6f26(0x19f)](fileURLToPath(import.meta.url)),PLUGIN_ROOT=_0x101f56[_0x2a6f26(0x1e4)](here,'..'),BRIDGE=_0x101f56[_0x2a6f26(0x1e4)](here,'..',_0x2a6f26(0x1f0),'ble_bridge.py'),IS_WINDOWS=process[_0x2a6f26(0x1a8)]===_0x2a6f26(0x1cc),BRIDGE_INSTALL=IS_WINDOWS?_0x101f56[_0x2a6f26(0x1e4)](here,'..','bridge',_0x2a6f26(0x1f5)):_0x101f56[_0x2a6f26(0x1e4)](here,'..',_0x2a6f26(0x1f0),_0x2a6f26(0x1d8)),VENV_PYTHON=IS_WINDOWS?_0x101f56[_0x2a6f26(0x1e4)](here,'..',_0x2a6f26(0x1d5),'Scripts',_0x2a6f26(0x1d9)):_0x101f56[_0x2a6f26(0x1e4)](here,'..',_0x2a6f26(0x1d5),_0x2a6f26(0x19b),_0x2a6f26(0x1dc)),DEBUG_LOG=process.env.RGBIFY_DEBUG_LOG,debugLines=[];let debugTimer=null;function flushDebug(){const _0x4f8c9d=_0x2a6f26,_0x53a2e4={'PyKPY':function(_0x1f1891,_0x387429){return _0x1f1891!==_0x387429;},'gvLNi':function(_0x3c0fa6,_0x4785bc){return _0x3c0fa6(_0x4785bc);},'HdKLW':function(_0x3e315a,_0x193e0f){return _0x3e315a===_0x193e0f;},'broxd':function(_0x4b8b02,_0x3c8225,_0x136fed){return _0x4b8b02(_0x3c8225,_0x136fed);}};_0x53a2e4['PyKPY'](debugTimer,null)&&(_0x53a2e4[_0x4f8c9d(0x1b2)](clearTimeout,debugTimer),debugTimer=null);if(!DEBUG_LOG||_0x53a2e4[_0x4f8c9d(0x1df)](debugLines['length'],0x0))return;const _0x492bf8=debugLines['splice'](0x0);try{_0x53a2e4[_0x4f8c9d(0x1a4)](appendFileSync,DEBUG_LOG,_0x492bf8['join'](''));}catch{}}function _0x1f67(_0x2e298f,_0x152386){_0x2e298f=_0x2e298f-0x17d;const _0x46a07f=_0x46a0();let _0x1f674d=_0x46a07f[_0x2e298f];if(_0x1f67['qcyzpx']===undefined){var _0x538671=function(_0x2e3570){const _0x155152='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3e5958='',_0x5ce4ea='';for(let _0x15bfed=0x0,_0x386aaf,_0x5ea35b,_0x5b7967=0x0;_0x5ea35b=_0x2e3570['charAt'](_0x5b7967++);~_0x5ea35b&&(_0x386aaf=_0x15bfed%0x4?_0x386aaf*0x40+_0x5ea35b:_0x5ea35b,_0x15bfed++%0x4)?_0x3e5958+=String['fromCharCode'](0xff&_0x386aaf>>(-0x2*_0x15bfed&0x6)):0x0){_0x5ea35b=_0x155152['indexOf'](_0x5ea35b);}for(let _0x193753=0x0,_0x2f4cb3=_0x3e5958['length'];_0x193753<_0x2f4cb3;_0x193753++){_0x5ce4ea+='%'+('00'+_0x3e5958['charCodeAt'](_0x193753)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ce4ea);};_0x1f67['XZqGKW']=_0x538671,_0x1f67['qExvTL']={},_0x1f67['qcyzpx']=!![];}const _0x43eaeb=_0x46a07f[0x0];_0x1f67['cgKaWu']!==_0x43eaeb&&(_0x1f67['qExvTL']={},_0x1f67['cgKaWu']=_0x43eaeb);const _0x1acaea=_0x1f67['qExvTL'][_0x2e298f];return _0x1acaea===undefined?(_0x1f674d=_0x1f67['XZqGKW'](_0x1f674d),_0x1f67['qExvTL'][_0x2e298f]=_0x1f674d):_0x1f674d=_0x1acaea,_0x1f674d;}function debug(_0x1b0f59){const _0x220153=_0x2a6f26,_0x832a16={'VQRUw':function(_0x1ba9c8){return _0x1ba9c8();},'HaTEI':function(_0x14ed83,_0x27fe15){return _0x14ed83===_0x27fe15;},'qHqEY':function(_0x27b4fb,_0x40cd12,_0x330086){return _0x27b4fb(_0x40cd12,_0x330086);}};if(!DEBUG_LOG)return;debugLines[_0x220153(0x1f3)](Date['now']()+'\x20'+_0x1b0f59+'\x0a'),_0x832a16[_0x220153(0x1c9)](debugTimer,null)&&(debugTimer=_0x832a16[_0x220153(0x1b8)](setTimeout,()=>{const _0x25266c=_0x220153;debugTimer=null,_0x832a16[_0x25266c(0x1a5)](flushDebug);},0x32));}let bootstrapPromise=null;async function bootstrapPython(){const _0x4b7dca=_0x2a6f26,_0x55607f={'laiqr':'bootstrap:\x20bridge\x20venv\x20missing,\x20running\x20installer','yAcTv':_0x4b7dca(0x1fa),'ahauZ':_0x4b7dca(0x185),'LnpGe':function(_0x5bf50e,_0x99011b,_0x30c4a7){return _0x5bf50e(_0x99011b,_0x30c4a7);},'UQfju':_0x4b7dca(0x1f6),'wvdAL':function(_0x3549e9,_0x25804c){return _0x3549e9(_0x25804c);},'EruXi':function(_0x37f8aa,_0x17c9c2){return _0x37f8aa(_0x17c9c2);},'cyEDb':function(_0x2ef9a7,_0x4a32e8){return _0x2ef9a7(_0x4a32e8);}};if(_0x55607f[_0x4b7dca(0x195)](existsSync,VENV_PYTHON))return VENV_PYTHON;if(bootstrapPromise)return bootstrapPromise;return bootstrapPromise=((async()=>{const _0x29a97f=_0x4b7dca;debug(_0x55607f[_0x29a97f(0x17f)]);try{const _0x21dbb7=IS_WINDOWS?['-NoProfile',_0x29a97f(0x1a1),_0x55607f[_0x29a97f(0x1d6)],_0x29a97f(0x1c8),BRIDGE_INSTALL,PLUGIN_ROOT]:[_0x55607f[_0x29a97f(0x1c0)],BRIDGE_INSTALL,PLUGIN_ROOT],_0x3ef91f=_0x55607f[_0x29a97f(0x1c2)](spawn,_0x21dbb7,{'stdin':_0x55607f[_0x29a97f(0x19c)],'stdout':_0x29a97f(0x1f6),'stderr':_0x55607f['UQfju']});void _0x3ef91f[_0x29a97f(0x1d2)]?.[_0x29a97f(0x1d4)](new WritableStream({'write'(){}})),void _0x3ef91f[_0x29a97f(0x1b3)]?.[_0x29a97f(0x1d4)](new WritableStream({'write'(){}}));const _0x27edc6=await _0x3ef91f[_0x29a97f(0x1e3)];return _0x55607f[_0x29a97f(0x17e)](debug,_0x29a97f(0x1e2)+_0x27edc6),_0x55607f[_0x29a97f(0x1ba)](existsSync,VENV_PYTHON)?VENV_PYTHON:null;}catch(_0x131639){return debug(_0x29a97f(0x1a6)+_0x131639),null;}})()),bootstrapPromise;}function isEnabled(){const _0x31c343=_0x2a6f26,_0x1040c9={'LFJxr':function(_0x401cd0,_0x2e30c0){return _0x401cd0!==_0x2e30c0;},'CBbSv':function(_0x1b630e,_0x216042){return _0x1b630e!==_0x216042;},'tRBmj':'true'};return _0x1040c9['LFJxr'](process.env.RGBIFY_DISABLE,'1')&&_0x1040c9['CBbSv'](process.env.RGBIFY_DISABLE,_0x1040c9[_0x31c343(0x1c4)]);}function stateDir(){const _0x74bf9a=_0x2a6f26,_0x3f8d4c={'iCWQr':'.config','HNUGd':_0x74bf9a(0x18c),'CUvZg':_0x74bf9a(0x1bc)};return process.env.RGBIFY_STATE_DIR||_0x101f56[_0x74bf9a(0x1e4)](_0x24ebaf[_0x74bf9a(0x1b0)](),_0x3f8d4c['iCWQr'],_0x3f8d4c[_0x74bf9a(0x1f8)],_0x3f8d4c['CUvZg']);}const VOLUME_FILE=_0x101f56[_0x2a6f26(0x1e4)](stateDir(),'host-volume');function readHostVolume(){const _0x2237ed=_0x2a6f26,_0x4eb02b={'kqgyq':function(_0x79ae7d,_0x137898,_0x263a45){return _0x79ae7d(_0x137898,_0x263a45);},'jMNEa':function(_0x5ed720,_0x24e1a7,_0x2900fd){return _0x5ed720(_0x24e1a7,_0x2900fd);},'RdlBg':_0x2237ed(0x1f1)};try{const _0x58569e=_0x4eb02b[_0x2237ed(0x1ac)](parseInt,_0x4eb02b[_0x2237ed(0x1aa)](readFileSync,VOLUME_FILE,_0x4eb02b[_0x2237ed(0x1b5)])[_0x2237ed(0x1ce)](),0xa);return Number[_0x2237ed(0x1a2)](_0x58569e)?Math[_0x2237ed(0x1ee)](0x0,Math[_0x2237ed(0x181)](0xa,_0x58569e)):0xa;}catch{return 0xa;}}function writeHostVolume(_0xcfd57f){const _0x4c87c6=_0x2a6f26,_0x57fbeb={'kHgNY':function(_0x4a22b4,_0x1fb1b2,_0x21b4b7){return _0x4a22b4(_0x1fb1b2,_0x21b4b7);},'SCdai':function(_0x5a9a82){return _0x5a9a82();}};try{_0x57fbeb[_0x4c87c6(0x1d0)](mkdirSync,_0x57fbeb[_0x4c87c6(0x1f2)](stateDir),{'recursive':!![]}),_0x57fbeb[_0x4c87c6(0x1d0)](writeFileSync,VOLUME_FILE,String(Math[_0x4c87c6(0x1ee)](0x0,Math[_0x4c87c6(0x181)](0xa,Math[_0x4c87c6(0x1bd)](_0xcfd57f)))));}catch{}}function _0x46a0(){const _0x16551d=['wuLLswq','mJG3nZeYohvZtwzIqG','sxf5DeC','CMDIAwz5','v0HSu2C','Bwf0y2G','Bwf4','s2zuwuy','yNjPzgDL','DxrMoa','u0nKywK','ChvZAa','mtiWqKPjqwPj','Aw5ZDgfSBc5WCZe','CgLWzq','r0Xys1a','se5vr2q','ntu3ntu0nwHJrwzXqG','qNLWyxnZ','tvbquNG','nda6ote6nte6qui6nta6q0u','D3zKquW','BgfPCxi','BfDeALm','BwLU','zeXXEwO','rurnyLi','CMvHC29UAw5N','yMfZAa','v2rQELK','C2XPy2u','uNzNswC','rwL5DgG','mtm4ntC5qLLXDNrp','C2vZC2LVBKLe','B3bLBMnVzgu','CMDIAwz5lq','zMTlBxq','lIbvC2fNztOGl3jNyMLMEsb2B2X1BwuGpdaTmta+lG','tK9vyva','BM93','uw1bEMW','Dgv4Da','yxjNDw1LBNrZ','y3Lfrgi','B0zYqwu','zMLLBgq','yNjPzgDLihvUyxzHAwXHyMXLoIa','Bgn2ywK','Cxn0tMy','yMLU','vvfMANu','C2vZC2LVBI5UzxH0lNrLEhqUzgvSDge','yNjPzgDLigrLChmGBM90igLUC3rHBgXLzcaOAw5ZDgfSBc5ZAcbMywLSzwqP','zgLYBMfTzq','vMniuLO','luv4zwn1DgLVBLbVBgLJEq','AxngAw5PDgu','uMHrvMG','yNjVEgq','vLfsvxC','yM9VDhn0CMfWoIbPBNn0ywXSzxiGzMfPBgvKoIa','ywrK','CgXHDgzVCM0','mtb5rvvzBuO','AK1orwe','C2HXAKy','A3fNExe','ChjVCgvYDgLLCW','sKnpr1a','A2LSBa','Ag9TzwrPCG','rNffq3C','z3zmtMK','C3rKzxjY','mZm5nKDUEMLKDa','uMrSqMC','nZK2ntfryKLMBgm','zgvSDge','CuHXrvK','BxnXuxi','rxj1wgK','CgfYDhm','C3rHDgu','CM91BMq','Bg9N','mta3nZuWAwLODfnV','ywHHDvO','zxzLBNqGDhLWzt0','tg5Wr2u','C3rYAw5N','DfjcBwO','y29TBwfUza','DhLWzq','mty5odq2nfjurw9Hvq','luzPBgu','sgfuruK','qwvlsfK','D2fYBG','D2LUmZi','oxbYvgHyuq','DhjPBq','mJHbDvLds24','A0HNtLK','zMLUywXSEq','C3rKB3v0','z2PHs0K','CgLWzvrV','lNzLBNy','EufJvhy','BwvZC2fNzs5Wyxj0lMrLBhrH','Aw5ZDgfSBc5ZAa','ChL0Ag9UlMv4zq','Dg9VBcbVDxq','Dg9VBcbjtG','ChL0Ag9U','yxbW','mtmZmJuYnfz3Cevmsa','sgrltfC','zw5JB2rL','BgvUz3rO','yM9VDhn0CMfWoIbPBNn0ywXSzxiGzxHPDgvKia','zxHPDgvK','AM9PBG','sMLjDeW','veL2wMm','wuzVANK'];_0x46a0=function(){return _0x16551d;};return _0x46a0();}export const RGBifyProjectorPlugin=async({client:_0x19fa72})=>{const _0x3f90db=_0x2a6f26,_0x53a313={'QmAzl':function(_0x19d38f,_0x3ce349){return _0x19d38f+_0x3ce349;},'KfTYF':function(_0x1ce5d7){return _0x1ce5d7();},'fkKmt':_0x3f90db(0x19e),'lSbMJ':_0x3f90db(0x1f6),'RvgIg':_0x3f90db(0x17d),'MPPRx':function(_0x2c247b,_0x36aab5){return _0x2c247b?.(_0x36aab5);},'qstNf':function(_0x58c620,_0x1450a2){return _0x58c620(_0x1450a2);},'WdjzY':_0x3f90db(0x1eb),'lWDjS':function(_0x180953,_0x1b881b){return _0x180953(_0x1b881b);},'AeKHY':function(_0x31f0db,_0x142ce4){return _0x31f0db===_0x142ce4;},'oFrAe':function(_0x3ba50b,_0x3c7dda){return _0x3ba50b>=_0x3c7dda;},'VcHRZ':function(_0x31524b,_0x126b61,_0x3a0c44){return _0x31524b(_0x126b61,_0x3a0c44);},'RhQVh':_0x3f90db(0x1d7),'NOUaP':_0x3f90db(0x193),'TIvZc':function(_0x4e46fa,_0x2f4c80){return _0x4e46fa===_0x2f4c80;},'rSxCk':_0x3f90db(0x184),'Eiyth':function(_0x3e278d,_0x2d92df){return _0x3e278d===_0x2d92df;},'YFojy':_0x3f90db(0x19d),'lcvai':function(_0x49c96e,_0x3bef85){return _0x49c96e===_0x3bef85;},'RTlsC':function(_0x36763c,_0x3a77af){return _0x36763c===_0x3a77af;},'OhYls':_0x3f90db(0x1c3),'IqytG':function(_0x37b2f8,_0x581035){return _0x37b2f8(_0x581035);},'EDMbR':function(_0x2b71db,_0x142201){return _0x2b71db!==_0x142201;},'JCOGP':function(_0x4c6fc8,_0x2666e4){return _0x4c6fc8(_0x2666e4);},'dLqyj':_0x3f90db(0x1db),'msqQr':function(_0x47c5bb,_0x2060be){return _0x47c5bb(_0x2060be);},'GLXKP':function(_0x1314c3){return _0x1314c3();}};if(!isEnabled())return{};let _0x3252ef=null;const _0x318d45=new Set();let _0x1da4db=null,_0x39d591=null;function _0x2d62e9(){const _0x337f7f=[];let _0x4652d4=null,_0x1c5d91=![];const _0x3bd18c=new TextEncoder(),_0x5da718=new ReadableStream({async 'pull'(_0x20b75d){const _0x3d0dfc=_0x1f67;while(_0x337f7f[_0x3d0dfc(0x1e1)]===0x0&&!_0x1c5d91){await new Promise(_0x4347e6=>{_0x4652d4=_0x4347e6;});}if(_0x1c5d91)return;_0x20b75d['enqueue'](_0x3bd18c[_0x3d0dfc(0x1e0)](_0x53a313[_0x3d0dfc(0x192)](_0x337f7f['shift'](),'\x0a')));},'cancel'(){const _0x429be5=_0x1f67;_0x1c5d91=!![];if(_0x4652d4){const _0x29783a=_0x4652d4;_0x4652d4=null,_0x53a313[_0x429be5(0x1ef)](_0x29783a);}}});return _0x1da4db=_0x47c6b1=>{if(_0x1c5d91)return;_0x337f7f['push'](_0x47c6b1);if(_0x4652d4){const _0x17a36e=_0x4652d4;_0x4652d4=null,_0x17a36e();}},_0x5da718;}function _0x2752a7(){const _0xc77a7b=_0x3f90db,_0x39c1c6={'shqjF':function(_0x1004fd){return _0x53a313['KfTYF'](_0x1004fd);},'WHlSg':_0x53a313[_0xc77a7b(0x18e)],'YIeId':_0x53a313['lSbMJ'],'FqECw':_0x53a313[_0xc77a7b(0x188)],'eNbTu':function(_0x504456,_0x2682e8){return _0x504456!==_0x2682e8;},'JiItL':function(_0x3cc2b0,_0x453406){const _0x2e2cdc=_0xc77a7b;return _0x53a313[_0x2e2cdc(0x1fb)](_0x3cc2b0,_0x453406);}};if(_0x3252ef)return _0x3252ef;return _0x3252ef=((async()=>{const _0x4c2c4f=_0xc77a7b,_0x13a580=await _0x39c1c6[_0x4c2c4f(0x1ab)](bootstrapPython);if(!_0x13a580)throw new Error(_0x39c1c6[_0x4c2c4f(0x1ec)]);const _0xebfafb=spawn([_0x13a580,BRIDGE],{'stdin':_0x39c1c6[_0x4c2c4f(0x1ab)](_0x2d62e9),'stdout':_0x39c1c6[_0x4c2c4f(0x1e8)],'stderr':_0x4c2c4f(0x1f6),'env':{...process.env,'RGBIFY_PROJECTOR_ADDR':process.env.RGBIFY_PROJECTOR_ADDR||_0x39c1c6[_0x4c2c4f(0x1b1)]}});return void _0xebfafb[_0x4c2c4f(0x1d2)]?.[_0x4c2c4f(0x1d4)](new WritableStream({'write'(){}})),void _0xebfafb[_0x4c2c4f(0x1b3)]?.['pipeTo'](new WritableStream({'write'(){}})),void _0xebfafb[_0x4c2c4f(0x1e3)][_0x4c2c4f(0x1d1)](()=>{_0x3252ef=null,_0x1da4db=null,_0x39d591=null;}),_0x39c1c6['eNbTu'](_0x39d591,null)&&(_0x39c1c6[_0x4c2c4f(0x1e5)](_0x1da4db,_0x39d591),_0x39d591=null),_0xebfafb;})()),_0x3252ef;}const _0x11f6af=0x8,_0x58570b=0x96;let _0x3697a9='',_0x5edc14=null;function _0x2856f9(){const _0x57aed8=_0x3f90db;_0x5edc14&&(_0x53a313[_0x57aed8(0x19a)](clearTimeout,_0x5edc14),_0x5edc14=null);const _0x1a3d21=_0x3697a9[_0x57aed8(0x187)](-_0x11f6af);_0x3697a9='';if(_0x1a3d21)_0x53a313[_0x57aed8(0x19a)](_0x1873a8,_0x1a3d21);}function _0x1873a8(_0xef0b1d){const _0x3b47b3=_0x3f90db,_0x237a3a={'gjaKI':_0x53a313[_0x3b47b3(0x186)]};_0x53a313[_0x3b47b3(0x180)](debug,'send\x20len='+_0xef0b1d['length']),_0x1da4db?_0x53a313['lWDjS'](_0x1da4db,_0xef0b1d):_0x39d591=_0xef0b1d,_0x53a313[_0x3b47b3(0x1ca)](_0x3252ef,null)&&_0x2752a7()['catch'](async _0x15d51a=>{const _0x52cbf7=_0x3b47b3;await _0x19fa72[_0x52cbf7(0x1dd)][_0x52cbf7(0x1be)]({'body':{'service':_0x237a3a[_0x52cbf7(0x1d3)],'level':_0x52cbf7(0x1cb),'message':_0x52cbf7(0x198)+_0x15d51a}});});}function _0x4efbc0(_0x549094){const _0xb8a357=_0x3f90db;_0x3697a9+=_0x549094;if(_0x53a313[_0xb8a357(0x196)](_0x3697a9[_0xb8a357(0x1e1)],_0x11f6af)){_0x53a313[_0xb8a357(0x1ef)](_0x2856f9);return;}if(!_0x5edc14)_0x5edc14=_0x53a313[_0xb8a357(0x1a0)](setTimeout,_0x2856f9,_0x58570b);}return _0x53a313[_0x3f90db(0x1f7)](_0x2752a7)['catch'](async _0x4b9f56=>{const _0x3e0d2d=_0x3f90db;await _0x19fa72[_0x3e0d2d(0x1dd)][_0x3e0d2d(0x1be)]({'body':{'service':_0x3e0d2d(0x1eb),'level':_0x3e0d2d(0x1cb),'message':_0x3e0d2d(0x198)+_0x4b9f56}});}),{'event':async({event:_0x4ec398})=>{const _0x4455fb=_0x3f90db,_0x1fd595=_0x4ec398[_0x4455fb(0x1c6)];!_0x318d45['has'](_0x1fd595)&&(_0x318d45[_0x4455fb(0x1a7)](_0x1fd595),debug(_0x4455fb(0x1c1)+_0x1fd595));if(_0x1fd595===_0x53a313[_0x4455fb(0x1a3)]){const _0x3884a6=_0x4ec398[_0x4455fb(0x1ad)];(_0x3884a6?.[_0x4455fb(0x197)]===_0x53a313[_0x4455fb(0x190)]||_0x53a313[_0x4455fb(0x1e6)](_0x3884a6?.[_0x4455fb(0x197)],_0x53a313['rSxCk']))&&(_0x53a313[_0x4455fb(0x1ca)](typeof _0x3884a6['delta'],'string')&&_0x3884a6[_0x4455fb(0x1b7)]&&_0x4efbc0(_0x3884a6[_0x4455fb(0x1b7)]));return;}if(_0x53a313[_0x4455fb(0x189)](_0x1fd595,_0x53a313[_0x4455fb(0x1e7)])||_0x53a313[_0x4455fb(0x199)](_0x1fd595,'session.next.reasoning.delta')){const _0x546008=_0x4ec398['properties'];_0x53a313['RTlsC'](typeof _0x546008?.[_0x4455fb(0x1b7)],_0x53a313['OhYls'])&&_0x546008[_0x4455fb(0x1b7)]&&_0x53a313[_0x4455fb(0x1ea)](_0x4efbc0,_0x546008[_0x4455fb(0x1b7)]);return;}},'command.execute.before':async(_0x4581e9,_0x485058)=>{const _0x18839f=_0x3f90db;if(_0x53a313['EDMbR'](_0x4581e9[_0x18839f(0x1c5)],_0x53a313[_0x18839f(0x186)]))return;const _0x38e346=(_0x4581e9[_0x18839f(0x194)]||'')[_0x18839f(0x1ce)](),_0x33f1b5={'id':_0x18839f(0x18d)+Date[_0x18839f(0x191)](),'sessionID':_0x4581e9[_0x18839f(0x18b)],'messageID':_0x4581e9[_0x18839f(0x18b)]},_0x1f6726=_0x38e346[_0x18839f(0x1ed)](/^volume\s+([0-9]+)$/);_0x485058[_0x18839f(0x1bb)]['length']=0x0;if(_0x1f6726){const _0x5deeda=Math[_0x18839f(0x1ee)](0x0,Math[_0x18839f(0x181)](0xa,parseInt(_0x1f6726[0x1],0xa)));_0x53a313[_0x18839f(0x1ae)](writeHostVolume,_0x5deeda),_0x485058[_0x18839f(0x1bb)][_0x18839f(0x1f3)]({..._0x33f1b5,'type':_0x18839f(0x193),'text':'RGBify\x20desktop\x20volume\x20set\x20to\x20'+_0x5deeda+'.'});}else _0x485058['parts']['push']({..._0x33f1b5,'type':_0x18839f(0x193),'text':'RGBify\x20desktop\x20volume\x20is\x20'+_0x53a313[_0x18839f(0x1ef)](readHostVolume)+_0x18839f(0x18f)});},'chat.message':async(_0x4d9f86,_0xab2858)=>{const _0x5c811d=_0x3f90db;for(const _0x40d51a of _0xab2858[_0x5c811d(0x1bb)]){if(_0x53a313[_0x5c811d(0x183)](_0x40d51a['type'],_0x53a313[_0x5c811d(0x190)]))continue;_0x53a313['lWDjS'](_0x4efbc0,_0x40d51a[_0x5c811d(0x193)]);}},'tool.execute.before':async _0x4e5a45=>{const _0x2c3461=_0x3f90db;_0x53a313[_0x2c3461(0x1ae)](_0x4efbc0,_0x53a313[_0x2c3461(0x182)]);},'tool.execute.after':async()=>{const _0x4a9c3d=_0x3f90db;_0x53a313[_0x4a9c3d(0x1b9)](_0x4efbc0,_0x4a9c3d(0x1da));},'dispose':async()=>{const _0xffdaaf=_0x3f90db;_0x5edc14&&(_0x53a313[_0xffdaaf(0x1ae)](clearTimeout,_0x5edc14),_0x5edc14=null);_0x3697a9='',_0x1da4db=null,_0x39d591=null,_0x53a313['GLXKP'](flushDebug);if(_0x3252ef){try{const _0x2aff22=await _0x3252ef;_0x2aff22[_0xffdaaf(0x1af)]();}catch{}_0x3252ef=null;}}};};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-rgbify-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "opencode plugin: stream chat text deltas to an RGBify 8x8 projector over BLE",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc",
|
|
42
|
-
"
|
|
42
|
+
"bump": "node scripts/bump-version.mjs && npm run build && node scripts/obfuscate.mjs && npm publish"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@opencode-ai/plugin": "*"
|