@snappy-stack/core 0.1.0 → 0.1.2

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.
@@ -1 +1 @@
1
- const a0_0x3f2d2b=a0_0x4ecb;(function(_0x16de9d,_0x78c661){const _0x364032=a0_0x4ecb,_0x322477=_0x16de9d();while(!![]){try{const _0x155822=parseInt(_0x364032(0xf3))/0x1*(parseInt(_0x364032(0x103))/0x2)+parseInt(_0x364032(0xb5))/0x3+parseInt(_0x364032(0xcb))/0x4+-parseInt(_0x364032(0x100))/0x5+parseInt(_0x364032(0xdd))/0x6*(-parseInt(_0x364032(0x107))/0x7)+-parseInt(_0x364032(0xc7))/0x8*(-parseInt(_0x364032(0xd6))/0x9)+-parseInt(_0x364032(0xda))/0xa*(-parseInt(_0x364032(0x10b))/0xb);if(_0x155822===_0x78c661)break;else _0x322477['push'](_0x322477['shift']());}catch(_0x154680){_0x322477['push'](_0x322477['shift']());}}}(a0_0x50f0,0xf3909));const a0_0x13ab5f=(function(){let _0x2258f3=!![];return function(_0x103624,_0x5efa70){const _0x64f275=_0x2258f3?function(){const _0x385a36=a0_0x4ecb;if(_0x5efa70){const _0x232072=_0x5efa70[_0x385a36(0xc4)](_0x103624,arguments);return _0x5efa70=null,_0x232072;}}:function(){};return _0x2258f3=![],_0x64f275;};}()),a0_0x43957f=a0_0x13ab5f(this,function(){const _0x2ed0cb=a0_0x4ecb;return a0_0x43957f[_0x2ed0cb(0xfc)]()[_0x2ed0cb(0xd2)](_0x2ed0cb(0xef))[_0x2ed0cb(0xfc)]()[_0x2ed0cb(0x106)](a0_0x43957f)[_0x2ed0cb(0xd2)](_0x2ed0cb(0xef));});a0_0x43957f();import a0_0x2efc43 from'fs';import a0_0x194616 from'path';import{Users}from'../collections/Users';import{LoginTokens}from'../collections/LoginTokens';function a0_0x4ecb(_0x1792c6,_0x8362ab){_0x1792c6=_0x1792c6-0xb2;const _0x4431e3=a0_0x50f0();let _0x43957f=_0x4431e3[_0x1792c6];return _0x43957f;}import{Branding}from'../globals/Branding';const API_PRODUCTION_URL=a0_0x3f2d2b(0xd3);export const __SECURITY_STATE__={'isValid':!![]};export const checkLicense=async()=>{const _0xa56a36=a0_0x3f2d2b,_0x4b513a=process.env.SNAPPY_LICENSE_TOKEN,_0x4f18a3=process.env.SNAPPY_API_URL||API_PRODUCTION_URL,_0x1bec68=process[_0xa56a36(0xea)](),_0x3d2085=a0_0x194616[_0xa56a36(0xc5)](_0x1bec68,_0xa56a36(0x102));let _0x16b575;try{a0_0x2efc43[_0xa56a36(0xee)](_0x3d2085)?_0x16b575=a0_0x2efc43[_0xa56a36(0xd5)](_0x3d2085,_0xa56a36(0xd0))[_0xa56a36(0xb2)]():(_0x16b575=Math[_0xa56a36(0xeb)]()[_0xa56a36(0xfc)](0x24)[_0xa56a36(0xbe)](0x2)+Date[_0xa56a36(0xf2)]()[_0xa56a36(0xfc)](0x24),a0_0x2efc43[_0xa56a36(0xbf)](_0x3d2085,_0x16b575));}catch(_0x12bc5f){_0x16b575=_0xa56a36(0xfb);}const _0x1e833c=process.env.VERCEL_URL||_0xa56a36(0xce),_0x4f0cec=_0x1e833c[_0xa56a36(0x109)](_0xa56a36(0xce))||_0x1e833c[_0xa56a36(0x109)](_0xa56a36(0xe7));if(!_0x4b513a){if(process.env.NODE_ENV===_0xa56a36(0xbd))console[_0xa56a36(0xd8)](_0xa56a36(0xe1)),process[_0xa56a36(0x108)](0x1);else{console[_0xa56a36(0xb6)](_0xa56a36(0xf1));return;}}try{const _0x34574b=await fetch(_0x4f18a3+_0xa56a36(0xdc),{'method':_0xa56a36(0xb8),'headers':{'Content-Type':_0xa56a36(0xf7)},'body':JSON[_0xa56a36(0xff)]({'token':_0x4b513a,'domain':_0x1e833c,'machineId':_0x16b575,'isLocal':_0x4f0cec,'version':_0xa56a36(0xe0)})}),_0x3dc881=await _0x34574b[_0xa56a36(0xdb)]();!_0x3dc881['ok']&&(_0x3dc881[_0xa56a36(0xf0)]===_0xa56a36(0xc0)?console[_0xa56a36(0xd8)](_0xa56a36(0xf5)+_0x3dc881[_0xa56a36(0xd8)]+_0xa56a36(0xc8)):console[_0xa56a36(0xd8)](_0xa56a36(0xbb)+(_0x3dc881[_0xa56a36(0xd8)]||_0xa56a36(0xfe))),process[_0xa56a36(0x108)](0x1)),(_0x3dc881[_0xa56a36(0xf0)]===_0xa56a36(0xe5)||_0x3dc881[_0xa56a36(0xf0)]===_0xa56a36(0xba))&&(console[_0xa56a36(0xd8)](_0xa56a36(0x105)+_0x3dc881[_0xa56a36(0xf0)][_0xa56a36(0x101)]()+_0xa56a36(0xe4)),process[_0xa56a36(0x108)](0x1)),console[_0xa56a36(0xbc)](_0xa56a36(0xd9)+_0x3dc881[_0xa56a36(0xf0)][_0xa56a36(0x101)]()+_0xa56a36(0xb3));}catch(_0x30edce){console[_0xa56a36(0xb6)](_0xa56a36(0xfa)+_0x30edce[_0xa56a36(0xb4)]+_0xa56a36(0xe3));}try{const _0x225358=Buffer[_0xa56a36(0xde)](_0xa56a36(0xb9),_0xa56a36(0xf4))[_0xa56a36(0xfc)](_0xa56a36(0xd0)),_0x57773d=Buffer[_0xa56a36(0xde)](_0xa56a36(0xed),_0xa56a36(0xf4))[_0xa56a36(0xfc)](_0xa56a36(0xd0)),_0xed05de=a0_0x194616[_0xa56a36(0xc5)](_0x1bec68,_0x225358),_0x4cd5ec=a0_0x194616[_0xa56a36(0xc5)](_0x1bec68,_0x57773d),_0x15e8cb=/^(?!.*\/\/.*<Credit).*<Credit/m;if(a0_0x2efc43[_0xa56a36(0xee)](_0xed05de)){const _0x2fded1=a0_0x2efc43[_0xa56a36(0xd5)](_0xed05de,_0xa56a36(0xd0));!_0x15e8cb[_0xa56a36(0xc1)](_0x2fded1)&&(console[_0xa56a36(0xd8)](_0xa56a36(0xc2)),process[_0xa56a36(0x108)](0x1));}if(a0_0x2efc43[_0xa56a36(0xee)](_0x4cd5ec)){const _0x30ec88=a0_0x2efc43[_0xa56a36(0xd5)](_0x4cd5ec,_0xa56a36(0xd0));!_0x15e8cb[_0xa56a36(0xc1)](_0x30ec88)&&(console[_0xa56a36(0xd8)](_0xa56a36(0xf9)),process[_0xa56a36(0x108)](0x1));}}catch(_0x12e88a){}};export const initializeSnappy=_0x79cfea=>{const _0x489eb1=a0_0x3f2d2b,_0x2d8677=_0x79cfea[_0x489eb1(0xe9)]||[],_0x366acf=_0x79cfea[_0x489eb1(0xc6)]||[],_0x149223=_0x2d8677[_0x489eb1(0x10a)](_0x52b653=>_0x52b653[_0x489eb1(0xd4)]!==_0x489eb1(0xd1)&&_0x52b653[_0x489eb1(0xd4)]!==_0x489eb1(0xe8)),_0x3940f5=_0x366acf[_0x489eb1(0x10a)](_0x3db380=>_0x3db380[_0x489eb1(0xd4)]!==_0x489eb1(0xca));return checkLicense(),{..._0x79cfea,'admin':{..._0x79cfea[_0x489eb1(0xc9)]||{},'disable':!![],'user':_0x489eb1(0xd1)},'collections':[..._0x149223,Users,LoginTokens],'globals':[..._0x3940f5,Branding]};};function a0_0x50f0(){const _0x42af41=['log','production','substring','writeFileSync','collision','test','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20Structural\x20Integrity\x20Compromised:\x20Credit\x20tag\x20missing\x20or\x20commented\x20out\x20in\x20DesktopFooter.','snappy-machine-id','apply','join','globals','5384AEQvHp','.\x20You\x20have\x20exceeded\x20your\x20Dev\x20Seat\x20limit.','admin','branding','6240724CMDZFE','getItem','innerHTML','localhost','location','utf-8','users','search','https://snappycore.wicky.id','slug','readFileSync','16209zwIKGI','SNAPPY_LICENSE_TOKEN','error','✅\x20[SNAPPY\x20CORE]\x20Engine\x20verified:\x20','190QqvBym','json','/api/heartbeat','11946QfZgWm','from','hostname','0.1.0-build','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20Missing\x20SNAPPY_LICENSE_TOKEN.\x20Production\x20builds\x20are\x20disabled\x20without\x20a\x20valid\x20license.','0.1.0-runtime','.\x20Running\x20in\x20offline\x20fallback\x20mode.',':\x20This\x20instance\x20has\x20been\x20remotely\x20deactivated.','suspended','br-','127.0.0.1','login-tokens','collections','cwd','random','undefined','c3JjL2NvbXBvbmVudHMvbGF5b3V0L3BhcnRzL01vYmlsZUZvb3Rlci50c3g=','existsSync','(((.+)+)+)+$','status','⚠️\x20[SNAPPY\x20CORE]\x20Missing\x20SNAPPY_LICENSE_TOKEN.\x20Development\x20mode\x20active.','now','6MKttpR','base64','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20License\x20Collision:\x20','setItem','application/json','body','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20Structural\x20Integrity\x20Compromised:\x20Credit\x20tag\x20missing\x20or\x20commented\x20out\x20in\x20MobileFooter.','⚠️\x20[SNAPPY\x20CORE]\x20License\x20server\x20unreachable:\x20','unknown-machine','toString','enforcement','Unknown\x20error','stringify','8653680yqcXFs','toUpperCase','.snappy-machine-id','105382prbGFb','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22background:#000;color:#fff;height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:sans-serif;text-align:center;padding:20px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22font-size:4rem;font-weight:900;letter-spacing:-0.05em;margin:0;\x22>ACCESS\x20DENIED</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20style=\x22opacity:0.5;max-width:400px;line-height:1.6;\x22>Your\x20SNAPPY\x20license\x20has\x20been\x20terminated.\x20Please\x20contact\x20support@wicky.id</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20License\x20','constructor','4235dbWVmc','exit','includes','filter','151965NIIyKl','trim','\x20mode.','message','1746141mzohXW','warn','isValid','POST','c3JjL2NvbXBvbmVudHMvbGF5b3V0L3BhcnRzL0Rlc2t0b3BGb290ZXIudHN4','terminated','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20License\x20Invalid:\x20'];a0_0x50f0=function(){return _0x42af41;};return a0_0x50f0();}export const runStickyHeartbeat=async _0x11b50a=>{const _0x1cb218=a0_0x3f2d2b;if(typeof window===_0x1cb218(0xec))return;try{const _0x55aab3=window[_0x1cb218(0xd7)]||process.env.NEXT_PUBLIC_SNAPPY_LICENSE_TOKEN,_0x27d645=process.env.NEXT_PUBLIC_SNAPPY_API_URL||API_PRODUCTION_URL;if(!_0x55aab3)return;const _0x26da28=localStorage[_0x1cb218(0xcc)](_0x1cb218(0xc3))||_0x1cb218(0xe6)+Math[_0x1cb218(0xeb)]()[_0x1cb218(0xfc)](0x24)[_0x1cb218(0xbe)](0x2)+Date[_0x1cb218(0xf2)]()[_0x1cb218(0xfc)](0x24);localStorage[_0x1cb218(0xf6)](_0x1cb218(0xc3),_0x26da28);const _0x2ed0d8=await fetch(_0x27d645+_0x1cb218(0xdc),{'method':_0x1cb218(0xb8),'headers':{'Content-Type':_0x1cb218(0xf7)},'body':JSON[_0x1cb218(0xff)]({'token':_0x55aab3,'domain':window[_0x1cb218(0xcf)][_0x1cb218(0xdf)],'machineId':_0x26da28,'isLocal':window[_0x1cb218(0xcf)][_0x1cb218(0xdf)]===_0x1cb218(0xce)||window[_0x1cb218(0xcf)][_0x1cb218(0xdf)]===_0x1cb218(0xe7),'version':_0x1cb218(0xe2)})}),_0x533f85=await _0x2ed0d8[_0x1cb218(0xdb)]();if(_0x533f85['ok']){_0x11b50a({'branding':_0x533f85[_0x1cb218(0xca)],'enforcement':_0x533f85[_0x1cb218(0xfd)],'status':_0x533f85[_0x1cb218(0xf0)]});if(_0x533f85[_0x1cb218(0xf0)]===_0x1cb218(0xba))__SECURITY_STATE__[_0x1cb218(0xb7)]=![],document[_0x1cb218(0xf8)][_0x1cb218(0xcd)]=_0x1cb218(0x104);else _0x533f85[_0x1cb218(0xf0)]===_0x1cb218(0xe5)?__SECURITY_STATE__[_0x1cb218(0xb7)]=![]:__SECURITY_STATE__[_0x1cb218(0xb7)]=!![];}else __SECURITY_STATE__[_0x1cb218(0xb7)]=![];}catch(_0x167998){__SECURITY_STATE__[_0x1cb218(0xb7)]=![];}};
1
+ const a0_0xec48e7=a0_0x5c8b;(function(_0x4a3b2a,_0x462704){const _0x248f98=a0_0x5c8b,_0x4483fc=_0x4a3b2a();while(!![]){try{const _0x550ccc=parseInt(_0x248f98(0xcd))/0x1*(-parseInt(_0x248f98(0xd4))/0x2)+-parseInt(_0x248f98(0xf6))/0x3*(parseInt(_0x248f98(0xf2))/0x4)+-parseInt(_0x248f98(0xd9))/0x5*(parseInt(_0x248f98(0x103))/0x6)+parseInt(_0x248f98(0x102))/0x7+-parseInt(_0x248f98(0x10b))/0x8*(-parseInt(_0x248f98(0xfd))/0x9)+parseInt(_0x248f98(0x10f))/0xa+parseInt(_0x248f98(0xda))/0xb;if(_0x550ccc===_0x462704)break;else _0x4483fc['push'](_0x4483fc['shift']());}catch(_0x4d98ec){_0x4483fc['push'](_0x4483fc['shift']());}}}(a0_0x182b,0x56688));function a0_0x182b(){const _0x45add7=['base64','from','0.1.0-build','5hdBPAE','5201306EQtpKt','now','filter','existsSync','innerHTML','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20Structural\x20Integrity\x20Compromised:\x20Credit\x20tag\x20missing\x20or\x20commented\x20out\x20in\x20DesktopFooter.','(((.+)+)+)+$','⚠️\x20[SNAPPY\x20CORE]\x20License\x20server\x20unreachable:\x20','hostname','toUpperCase','branding','undefined','✅\x20[SNAPPY\x20CORE]\x20Engine\x20verified:\x20','suspended','search','.\x20Running\x20in\x20offline\x20fallback\x20mode.','utf-8','cwd','unknown-machine','enforcement','includes','getItem','Unknown\x20error','snappy-machine-id','2148sujgWi','slug','.snappy-machine-id','error','1569wpLBTp','c3JjL2NvbXBvbmVudHMvbGF5b3V0L3BhcnRzL01vYmlsZUZvb3Rlci50c3g=','join','c3JjL2NvbXBvbmVudHMvbGF5b3V0L3BhcnRzL0Rlc2t0b3BGb290ZXIudHN4','message','apply','/api/heartbeat','20628YAkpKx','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20Structural\x20Integrity\x20Compromised:\x20Credit\x20tag\x20missing\x20or\x20commented\x20out\x20in\x20MobileFooter.','terminated','\x20mode.','127.0.0.1','4107747mpzOvo','3609858MwLDQP','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20License\x20','trim','admin','log','isValid','test','application/json','1464RuCjQZ','POST','body','production','4072810TzdAgU','location','.\x20You\x20have\x20exceeded\x20your\x20Dev\x20Seat\x20limit.','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20style=\x22background:#000;color:#fff;height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:sans-serif;text-align:center;padding:20px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22font-size:4rem;font-weight:900;letter-spacing:-0.05em;margin:0;\x22>ACCESS\x20DENIED</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20style=\x22opacity:0.5;max-width:400px;line-height:1.6;\x22>Your\x20SNAPPY\x20license\x20has\x20been\x20terminated.\x20Please\x20contact\x20support@wicky.id</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','random',':\x20This\x20instance\x20has\x20been\x20remotely\x20deactivated.','SNAPPY_LICENSE_TOKEN','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20License\x20Collision:\x20','warn','users','status','collision','https://snappycore.wicky.id','writeFileSync','readFileSync','constructor','substring','exit','0.1.0-runtime','json','login-tokens','localhost','br-','collections','3pzlfWa','⚠️\x20[SNAPPY\x20CORE]\x20Missing\x20SNAPPY_LICENSE_TOKEN.\x20Development\x20mode\x20active.','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20License\x20Invalid:\x20','setItem','stringify','globals','❌\x20[SNAPPY\x20CORE\x20FATAL]\x20Missing\x20SNAPPY_LICENSE_TOKEN.\x20Production\x20builds\x20are\x20disabled\x20without\x20a\x20valid\x20license.','433308ETeBJC','toString'];a0_0x182b=function(){return _0x45add7;};return a0_0x182b();}const a0_0x4cc3a1=(function(){let _0x1822f6=!![];return function(_0x1efeae,_0xa0e00a){const _0xc08d24=_0x1822f6?function(){const _0x7c019f=a0_0x5c8b;if(_0xa0e00a){const _0x117c53=_0xa0e00a[_0x7c019f(0xfb)](_0x1efeae,arguments);return _0xa0e00a=null,_0x117c53;}}:function(){};return _0x1822f6=![],_0xc08d24;};}()),a0_0x49bdbc=a0_0x4cc3a1(this,function(){const _0x228563=a0_0x5c8b;return a0_0x49bdbc[_0x228563(0xd5)]()[_0x228563(0xe8)](_0x228563(0xe0))[_0x228563(0xd5)]()[_0x228563(0xc4)](a0_0x49bdbc)[_0x228563(0xe8)](_0x228563(0xe0));});a0_0x49bdbc();import a0_0xdc37ac from'fs';import a0_0xa4ed89 from'path';import{Users}from'../collections/Users';function a0_0x5c8b(_0x405ba4,_0x5569a7){_0x405ba4=_0x405ba4-0xb6;const _0x42ddc3=a0_0x182b();let _0x49bdbc=_0x42ddc3[_0x405ba4];return _0x49bdbc;}import{LoginTokens}from'../collections/LoginTokens';import{Branding}from'../globals/Branding';const API_PRODUCTION_URL=a0_0xec48e7(0xc1);export const __SECURITY_STATE__={'isValid':!![]};export const checkLicense=async()=>{const _0x322c15=a0_0xec48e7,_0x13109c=process.env.SNAPPY_LICENSE_TOKEN,_0x199fb5=process.env.SNAPPY_API_URL||API_PRODUCTION_URL,_0x1bcbac=process[_0x322c15(0xeb)](),_0x47efb3=a0_0xa4ed89[_0x322c15(0xf8)](_0x1bcbac,_0x322c15(0xf4));let _0x3ba11a;try{a0_0xdc37ac[_0x322c15(0xdd)](_0x47efb3)?_0x3ba11a=a0_0xdc37ac[_0x322c15(0xc3)](_0x47efb3,_0x322c15(0xea))[_0x322c15(0x105)]():(_0x3ba11a=Math[_0x322c15(0xb9)]()[_0x322c15(0xd5)](0x24)[_0x322c15(0xc5)](0x2)+Date[_0x322c15(0xdb)]()[_0x322c15(0xd5)](0x24),a0_0xdc37ac[_0x322c15(0xc2)](_0x47efb3,_0x3ba11a));}catch(_0x5bfd24){_0x3ba11a=_0x322c15(0xec);}const _0x3d7e66=process.env.VERCEL_URL||_0x322c15(0xca),_0x277f1d=_0x3d7e66[_0x322c15(0xee)](_0x322c15(0xca))||_0x3d7e66[_0x322c15(0xee)](_0x322c15(0x101));if(!_0x13109c){if(process.env.NODE_ENV===_0x322c15(0x10e))console[_0x322c15(0xf5)](_0x322c15(0xd3)),process[_0x322c15(0xc6)](0x1);else{console[_0x322c15(0xbd)](_0x322c15(0xce));return;}}try{const _0x2ed655=await fetch(_0x199fb5+_0x322c15(0xfc),{'method':_0x322c15(0x10c),'headers':{'Content-Type':_0x322c15(0x10a)},'body':JSON[_0x322c15(0xd1)]({'token':_0x13109c,'domain':_0x3d7e66,'machineId':_0x3ba11a,'isLocal':_0x277f1d,'version':_0x322c15(0xd8)})}),_0x2b6d10=await _0x2ed655[_0x322c15(0xc8)]();!_0x2b6d10['ok']&&(_0x2b6d10[_0x322c15(0xbf)]===_0x322c15(0xc0)?console[_0x322c15(0xf5)](_0x322c15(0xbc)+_0x2b6d10[_0x322c15(0xf5)]+_0x322c15(0xb7)):console[_0x322c15(0xf5)](_0x322c15(0xcf)+(_0x2b6d10[_0x322c15(0xf5)]||_0x322c15(0xf0))),process[_0x322c15(0xc6)](0x1)),(_0x2b6d10[_0x322c15(0xbf)]===_0x322c15(0xe7)||_0x2b6d10[_0x322c15(0xbf)]===_0x322c15(0xff))&&(console[_0x322c15(0xf5)](_0x322c15(0x104)+_0x2b6d10[_0x322c15(0xbf)][_0x322c15(0xe3)]()+_0x322c15(0xba)),process[_0x322c15(0xc6)](0x1)),console[_0x322c15(0x107)](_0x322c15(0xe6)+_0x2b6d10[_0x322c15(0xbf)][_0x322c15(0xe3)]()+_0x322c15(0x100));}catch(_0x481f57){console[_0x322c15(0xbd)](_0x322c15(0xe1)+_0x481f57[_0x322c15(0xfa)]+_0x322c15(0xe9));}try{const _0x23cc9c=Buffer[_0x322c15(0xd7)](_0x322c15(0xf9),_0x322c15(0xd6))[_0x322c15(0xd5)](_0x322c15(0xea)),_0x50fca9=Buffer[_0x322c15(0xd7)](_0x322c15(0xf7),_0x322c15(0xd6))[_0x322c15(0xd5)](_0x322c15(0xea)),_0xda5d7f=a0_0xa4ed89[_0x322c15(0xf8)](_0x1bcbac,_0x23cc9c),_0x3c12bb=a0_0xa4ed89[_0x322c15(0xf8)](_0x1bcbac,_0x50fca9),_0x2c30e1=/^(?!.*\/\/.*<Credit).*<Credit/m;if(a0_0xdc37ac[_0x322c15(0xdd)](_0xda5d7f)){const _0xd5ff6d=a0_0xdc37ac[_0x322c15(0xc3)](_0xda5d7f,_0x322c15(0xea));!_0x2c30e1[_0x322c15(0x109)](_0xd5ff6d)&&(console[_0x322c15(0xf5)](_0x322c15(0xdf)),process[_0x322c15(0xc6)](0x1));}if(a0_0xdc37ac[_0x322c15(0xdd)](_0x3c12bb)){const _0x28e2de=a0_0xdc37ac[_0x322c15(0xc3)](_0x3c12bb,_0x322c15(0xea));!_0x2c30e1[_0x322c15(0x109)](_0x28e2de)&&(console[_0x322c15(0xf5)](_0x322c15(0xfe)),process[_0x322c15(0xc6)](0x1));}}catch(_0x2d1163){}};export const initializeSnappy=_0x2ddc2b=>{const _0x347260=a0_0xec48e7,_0x4b156c=_0x2ddc2b[_0x347260(0xcc)]||[],_0x1d4a9a=_0x2ddc2b[_0x347260(0xd2)]||[],_0x409408=_0x4b156c[_0x347260(0xdc)](_0x2377ee=>_0x2377ee[_0x347260(0xf3)]!==_0x347260(0xbe)&&_0x2377ee[_0x347260(0xf3)]!==_0x347260(0xc9)),_0x568d6=_0x1d4a9a[_0x347260(0xdc)](_0x585673=>_0x585673[_0x347260(0xf3)]!==_0x347260(0xe4));return checkLicense(),{..._0x2ddc2b,'admin':{..._0x2ddc2b[_0x347260(0x106)]||{},'disable':!![],'user':_0x347260(0xbe)},'collections':[..._0x409408,Users,LoginTokens],'globals':[..._0x568d6,Branding]};};export const runStickyHeartbeat=async _0x2abed6=>{const _0x20d1cc=a0_0xec48e7;if(typeof window===_0x20d1cc(0xe5))return;try{const _0x38807c=window[_0x20d1cc(0xbb)]||process.env.NEXT_PUBLIC_SNAPPY_LICENSE_TOKEN,_0x50c210=process.env.NEXT_PUBLIC_SNAPPY_API_URL||API_PRODUCTION_URL;if(!_0x38807c)return;const _0x3617c3=localStorage[_0x20d1cc(0xef)](_0x20d1cc(0xf1))||_0x20d1cc(0xcb)+Math[_0x20d1cc(0xb9)]()[_0x20d1cc(0xd5)](0x24)[_0x20d1cc(0xc5)](0x2)+Date[_0x20d1cc(0xdb)]()[_0x20d1cc(0xd5)](0x24);localStorage[_0x20d1cc(0xd0)](_0x20d1cc(0xf1),_0x3617c3);const _0x15838a=await fetch(_0x50c210+_0x20d1cc(0xfc),{'method':_0x20d1cc(0x10c),'headers':{'Content-Type':_0x20d1cc(0x10a)},'body':JSON[_0x20d1cc(0xd1)]({'token':_0x38807c,'domain':window[_0x20d1cc(0xb6)][_0x20d1cc(0xe2)],'machineId':_0x3617c3,'isLocal':window[_0x20d1cc(0xb6)][_0x20d1cc(0xe2)]===_0x20d1cc(0xca)||window[_0x20d1cc(0xb6)][_0x20d1cc(0xe2)]===_0x20d1cc(0x101),'version':_0x20d1cc(0xc7)})}),_0x39c68c=await _0x15838a[_0x20d1cc(0xc8)]();if(_0x39c68c['ok']){_0x2abed6({'branding':_0x39c68c[_0x20d1cc(0xe4)],'enforcement':_0x39c68c[_0x20d1cc(0xed)],'status':_0x39c68c[_0x20d1cc(0xbf)]});if(_0x39c68c[_0x20d1cc(0xbf)]===_0x20d1cc(0xff))__SECURITY_STATE__[_0x20d1cc(0x108)]=![],document[_0x20d1cc(0x10d)][_0x20d1cc(0xde)]=_0x20d1cc(0xb8);else _0x39c68c[_0x20d1cc(0xbf)]===_0x20d1cc(0xe7)?__SECURITY_STATE__[_0x20d1cc(0x108)]=![]:__SECURITY_STATE__[_0x20d1cc(0x108)]=!![];}else __SECURITY_STATE__[_0x20d1cc(0x108)]=![];}catch(_0x4c7ab6){__SECURITY_STATE__[_0x20d1cc(0x108)]=![];}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snappy-stack/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "The independent core engine for SNAPPY Stack projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",