@naarang/ccc 1.2.0-beta.4 → 1.2.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/claude/manager.js +1 -1
- package/dist/claude/project-setup.js +1 -1
- package/dist/claude/session-manager.js +1 -1
- package/dist/claude/session-message-parser.js +1 -1
- package/dist/claude/session.js +1 -1
- package/dist/claude/stream-parser.js +1 -1
- package/dist/firebase/admin.js +1 -0
- package/dist/hooks/notification_hook.js +306 -0
- package/dist/index.js +1 -1
- package/dist/mdns/service.js +1 -1
- package/dist/mqtt/client.js +1 -1
- package/dist/mqtt-broker.js +1 -1
- package/dist/ngrok/manager.js +1 -1
- package/dist/notifications/handlers.js +1 -0
- package/dist/notifications/index.js +1 -0
- package/dist/notifications/manager.js +1 -0
- package/dist/notifications/preferences-manager.js +1 -0
- package/dist/notifications/preferences-storage.js +1 -0
- package/dist/notifications/sender.js +1 -0
- package/dist/notifications/storage.js +1 -0
- package/dist/notifications/types.js +1 -0
- package/dist/proxy/router.js +1 -1
- package/dist/qr/generator.js +1 -1
- package/dist/terminal/server.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/auto-update.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';(function(_0x467b12,_0x5631c7){const _0x55d28a={_0x587c6e:0x403,_0x13a30c:0x451,_0x1d9573:0x471,_0x16e88a:0x1e4,_0x1b1006:0x1e2,_0x4d957a:0x1cc,_0x460ebf:0x462,_0x4d7e19:0x443,_0xdb350a:0x43f,_0x147318:0x1c4,_0x5a0728:0x1a9,_0x5a3fca:0x18c,_0x586abc:0x16e,_0x1060ec:0x489,_0x22ac8d:0x493,_0x1d1b9e:0x473,_0x20bd3a:0x464,_0x627255:0x1d0,_0x5700ed:0x1ab,_0x38d421:0x1d0,_0x251269:0x19a,_0x2c08b0:0x184,_0xf218c8:0x1b2,_0x388eea:0x1d8,_0x508ae2:0x1c9,_0x1fc410:0x1ad,_0xee4c71:0x1f4,_0x5074f4:0x455,_0x49fb62:0x459,_0x5fe631:0x470,_0x4808c0:0x1d8,_0x1a1cf0:0x1d4,_0x4b6a61:0x1f7,_0x48bdec:0x201,_0x546c4c:0x1de,_0xf4cf6a:0x496,_0x400335:0x461};function _0x4e709a(_0x10bedc,_0x5e7773,_0x11754c,_0x11f946){return _0x3f9f(_0x10bedc-0x25e,_0x11f946);}function _0x399d25(_0x1569ec,_0x1feb26,_0x238769,_0x46fd8c){return _0x3f9f(_0x1feb26- -0x4e,_0x46fd8c);}const _0x1cac67=_0x467b12();while(!![]){try{const _0xc8cc80=parseInt(_0x4e709a(0x43d,_0x55d28a._0x587c6e,_0x55d28a._0x13a30c,_0x55d28a._0x1d9573))/(0x287*0x7+0x56a+0xb8d*-0x2)*(parseInt(_0x399d25(0x1d9,_0x55d28a._0x16e88a,_0x55d28a._0x1b1006,_0x55d28a._0x4d957a))/(-0xcca+0xdff*0x1+-0x133))+-parseInt(_0x4e709a(_0x55d28a._0x460ebf,_0x55d28a._0x4d7e19,0x452,_0x55d28a._0xdb350a))/(0x14e5+0x1a23*0x1+-0x2f05)*(-parseInt(_0x399d25(_0x55d28a._0x147318,_0x55d28a._0x5a0728,_0x55d28a._0x5a3fca,_0x55d28a._0x586abc))/(0x1bd*-0x3+0x13*-0x53+-0x2d9*-0x4))+-parseInt(_0x4e709a(_0x55d28a._0x1060ec,0x479,0x472,_0x55d28a._0x22ac8d))/(-0x454+-0x83d+0xc96)*(-parseInt(_0x4e709a(_0x55d28a._0x1d1b9e,0x4a3,_0x55d28a._0x20bd3a,0x43b))/(0x7*0xa7+0xa28+-0xeb3))+-parseInt(_0x399d25(_0x55d28a._0x627255,_0x55d28a._0x5700ed,_0x55d28a._0x38d421,_0x55d28a._0x251269))/(-0x2340+-0x671+0xde8*0x3)*(-parseInt(_0x399d25(_0x55d28a._0x2c08b0,0x1a0,_0x55d28a._0xf218c8,_0x55d28a._0x388eea))/(-0x109+0x22ca+-0x21b9))+parseInt(_0x399d25(0x191,_0x55d28a._0x508ae2,_0x55d28a._0x1fc410,_0x55d28a._0xee4c71))/(-0xa7e+-0x1*-0x246e+0x15d*-0x13)+-parseInt(_0x4e709a(0x43b,_0x55d28a._0x5074f4,_0x55d28a._0x49fb62,_0x55d28a._0x5fe631))/(0x3*-0x6f+0x25c7+-0x2470)*(-parseInt(_0x399d25(_0x55d28a._0x4808c0,_0x55d28a._0x1a1cf0,_0x55d28a._0x4b6a61,_0x55d28a._0x48bdec))/(-0x40*-0x94+-0xa99*-0x1+-0x17c7*0x2))+parseInt(_0x399d25(0x1d6,_0x55d28a._0xf218c8,_0x55d28a._0x2c08b0,_0x55d28a._0x546c4c))/(-0x19ca+-0x6e0+-0x4f*-0x6a)*(-parseInt(_0x4e709a(0x463,_0x55d28a._0xf4cf6a,0x485,_0x55d28a._0x400335))/(0x23db+0x1911+-0x1*0x3cdf));if(_0xc8cc80===_0x5631c7)break;else _0x1cac67['push'](_0x1cac67['shift']());}catch(_0x4071e3){_0x1cac67['push'](_0x1cac67['shift']());}}}(_0x5571,0x29e55*0x1+-0x7d7f2*0x2+0x166c51));function _0x1d237b(_0x5658c1,_0x19d2cb,_0xd21b6,_0x1a12d3){return _0x3f9f(_0x1a12d3-0x2d3,_0x19d2cb);}var __createBinding=this&&this[_0x1d237b(0x4c7,0x4cb,0x4a9,0x4ae)+_0x13425c(0x358,0x349,0x379,0x389)]||(Object[_0x13425c(0x35f,0x324,0x336,0x349)]?function(_0x3849c2,_0x17cfdb,_0x326622,_0x3f5626){const _0x362f96={_0xc4bed5:0x1e6,_0xe6b2b:0x1fc,_0x32e56d:0x185,_0x400639:0x1a2,_0xefaca3:0x187,_0x248c73:0x1b2,_0x1c38f1:0x1d2,_0x2fa1e4:0x1e3,_0x16c8c1:0x1c9,_0x3786a2:0x129,_0x2c8157:0x14d,_0xdbc615:0x15c,_0x274855:0x1a7,_0x421958:0x16d,_0x2f1ba9:0x183,_0x14bcd2:0x1a8,_0x42d94f:0x1b9,_0xe089da:0x197,_0x2d4670:0x16b,_0x40097f:0x164,_0x3da930:0x17d,_0x5eaf59:0x1a3,_0x1adc33:0x184,_0x277654:0x17b,_0x5b959d:0x12e,_0xc01e4d:0x152,_0x559171:0x15b,_0x1bb98f:0x1a0,_0x5886c3:0x1d9,_0x3d6281:0x1bc,_0x1e84b7:0x144,_0x7d15dd:0x150,_0x39c46f:0x1b1},_0x5e44b7={_0x4a4f04:0x20c,_0x3b749a:0x31},_0xad8580={_0xbae6ce:0x1c6,_0x1c4539:0x1a,_0xf7142d:0x32f},_0x88135={};_0x88135[_0x530301(_0x362f96._0xc4bed5,_0x362f96._0xe6b2b,0x1db,0x1c9)]=function(_0x3046ee,_0x53d89e){return _0x3046ee===_0x53d89e;},_0x88135[_0x530301(0x19a,_0x362f96._0x32e56d,_0x362f96._0x400639,_0x362f96._0xefaca3)]=function(_0x109f6b,_0x4af845){return _0x109f6b in _0x4af845;};function _0x530301(_0x3db153,_0x4f0058,_0x29cf07,_0x1238c8){return _0x1d237b(_0x3db153-_0xad8580._0xbae6ce,_0x4f0058,_0x29cf07-_0xad8580._0x1c4539,_0x29cf07- -_0xad8580._0xf7142d);}_0x88135['VtMhb']=_0x530301(_0x362f96._0x248c73,_0x362f96._0x1c38f1,_0x362f96._0x2fa1e4,_0x362f96._0x16c8c1);const _0x394d62=_0x88135;if(_0x394d62['isFhK'](_0x3f5626,undefined))_0x3f5626=_0x326622;function _0x4674c6(_0x80f09d,_0x2b21b8,_0xe0257f,_0x48d3b1){return _0x13425c(_0xe0257f- -_0x5e44b7._0x4a4f04,_0x80f09d,_0xe0257f-0x152,_0x48d3b1-_0x5e44b7._0x3b749a);}var _0x842453=Object[_0x4674c6(0x157,_0x362f96._0x3786a2,0x159,_0x362f96._0x2c8157)+_0x4674c6(_0x362f96._0xdbc615,_0x362f96._0x274855,_0x362f96._0x421958,_0x362f96._0x2f1ba9)+_0x4674c6(_0x362f96._0x14bcd2,_0x362f96._0x42d94f,0x19a,_0x362f96._0xe089da)](_0x17cfdb,_0x326622);if(!_0x842453||(_0x394d62[_0x4674c6(_0x362f96._0x2d4670,0x169,_0x362f96._0x40097f,_0x362f96._0x3da930)](_0x394d62[_0x530301(_0x362f96._0x5eaf59,0x196,_0x362f96._0x1adc33,0x1af)],_0x842453)?!_0x17cfdb['__esModule']:_0x842453[_0x4674c6(_0x362f96._0x277654,_0x362f96._0x5b959d,_0x362f96._0xc01e4d,_0x362f96._0x559171)]||_0x842453[_0x530301(_0x362f96._0x1bb98f,0x1a1,_0x362f96._0x5886c3,_0x362f96._0x3d6281)+'le'])){const _0x64609f={};_0x64609f['enumerable']=!![],_0x64609f['get']=function(){return _0x17cfdb[_0x326622];},_0x842453=_0x64609f;}Object[_0x4674c6(0x13e,_0x362f96._0x1e84b7,0x142,_0x362f96._0x7d15dd)+_0x530301(0x1ab,0x1aa,0x1a7,_0x362f96._0x39c46f)](_0x3849c2,_0x3f5626,_0x842453);}:function(_0x189ca4,_0x33a12b,_0x2aa717,_0x1da850){const _0x36007f={_0xb82049:0x25b,_0x1b5288:0x248,_0x20fe06:0x14b,_0x73ab13:0x183,_0x50c9f1:0x17d},_0x3e7674={_0x5800d0:0xfe,_0x1a83ff:0x655},_0x13504b={_0x53e9fd:0xec,_0x32f8c1:0x1b8,_0x230d6d:0x286};function _0x4708c2(_0x26f111,_0x156a9d,_0x4d2772,_0x1cf235){return _0x1d237b(_0x26f111-_0x13504b._0x53e9fd,_0x156a9d,_0x4d2772-_0x13504b._0x32f8c1,_0x26f111- -_0x13504b._0x230d6d);}const _0x28c8b={};_0x28c8b[_0x4708c2(0x24c,0x214,_0x36007f._0xb82049,_0x36007f._0x1b5288)]=function(_0x157582,_0x19347d){return _0x157582===_0x19347d;};function _0x5212e6(_0x2e7c9e,_0x1f160e,_0x2e88fe,_0x11d91){return _0x1d237b(_0x2e7c9e-_0x3e7674._0x5800d0,_0x11d91,_0x2e88fe-0x3e,_0x1f160e- -_0x3e7674._0x1a83ff);}const _0x5b55e6=_0x28c8b;if(_0x5b55e6[_0x5212e6(-_0x36007f._0x20fe06,-_0x36007f._0x73ab13,-_0x36007f._0x73ab13,-_0x36007f._0x50c9f1)](_0x1da850,undefined))_0x1da850=_0x2aa717;_0x189ca4[_0x1da850]=_0x33a12b[_0x2aa717];}),__setModuleDefault=this&&this['__setModul'+_0x1d237b(0x4e6,0x4f1,0x4ab,0x4d9)]||(Object[_0x1d237b(0x4b0,0x4a4,0x4d5,0x4c0)]?function(_0x1a55b3,_0x2524f8){const _0x5583bd={_0x135130:0x4d5,_0x1ce286:0x4e0,_0x4d1124:0x235,_0x2024e9:0x22d,_0x59dffa:0x264,_0x2fb1f8:0x1dd,_0x4d2f91:0x206,_0x1cc162:0x1e8,_0x180351:0x1f6,_0x2df900:0x1ef,_0x28af96:0x230,_0x756384:0x22b,_0x323a94:0x1d8,_0x3523cf:0x200,_0x270d5e:0x1fe},_0x45b722={_0x1cba1f:0x1a1,_0x4b960f:0x66},_0x5d9023={_0x4baf70:0xec,_0x1a4fb0:0x177,_0x1b50ac:0x2ab},_0x3fed5e={};_0x3fed5e[_0x468265(0x53c,_0x5583bd._0x135130,_0x5583bd._0x1ce286,0x50f)]=_0x32f033(0x292,_0x5583bd._0x4d1124,_0x5583bd._0x2024e9,_0x5583bd._0x59dffa);const _0x3b77c1=_0x3fed5e;function _0x32f033(_0x48950a,_0x105c26,_0x2191a,_0x11c656){return _0x1d237b(_0x48950a-_0x5d9023._0x4baf70,_0x48950a,_0x2191a-_0x5d9023._0x1a4fb0,_0x11c656- -_0x5d9023._0x1b50ac);}const _0x1d82bd={};_0x1d82bd[_0x32f033(_0x5583bd._0x2fb1f8,_0x5583bd._0x4d2f91,_0x5583bd._0x1cc162,_0x5583bd._0x180351)]=!![],_0x1d82bd['value']=_0x2524f8;function _0x468265(_0x12f5af,_0x39f2da,_0x2e850e,_0x109a29){return _0x1d237b(_0x12f5af-_0x45b722._0x1cba1f,_0x39f2da,_0x2e850e-0x140,_0x109a29-_0x45b722._0x4b960f);}Object['defineProp'+_0x32f033(_0x5583bd._0x2df900,_0x5583bd._0x180351,_0x5583bd._0x28af96,_0x5583bd._0x756384)](_0x1a55b3,_0x3b77c1[_0x32f033(_0x5583bd._0x323a94,_0x5583bd._0x3523cf,0x209,_0x5583bd._0x270d5e)],_0x1d82bd);}:function(_0x16024c,_0x3bb401){_0x16024c['default']=_0x3bb401;}),__importStar=this&&this[_0x13425c(0x38e,0x3ab,0x3a1,0x3b7)+'ar']||(function(){const _0x22ffaa={_0x5cfb58:0x1fb,_0x148c12:0x227,_0x409c94:0x1f7,_0x4fbf40:0x240,_0x514524:0x249,_0x5f66a7:0x20f,_0x51205c:0x1c6,_0x1b45e1:0x1ea,_0x351d0a:0x1f0,_0xafdb29:0x1d5,_0xb94019:0x210,_0x2f328c:0x233,_0xc8472b:0x250,_0xa53d05:0x1b4,_0x1f93c1:0x1ef,_0x5d684f:0x1e6,_0x37b106:0x36c,_0x91c58:0x3a5,_0xbacd9d:0x39b,_0x5a9aba:0x235,_0x35431e:0x21a,_0x106bce:0x21c,_0x1b559b:0x375,_0x5a854c:0x31a,_0x5e1d77:0x304,_0x2435b5:0x321,_0x5bfdc3:0x392,_0x3e9b63:0x37d,_0x289fcf:0x376,_0x5b9355:0x3b4,_0x291962:0x213,_0x4231ae:0x224,_0x5854bb:0x206,_0x2c5bb2:0x1f1,_0x3dc504:0x1f8,_0x2869a1:0x1e2},_0x9fbfda={_0x35ae3d:0xd,_0x197368:0x23,_0x59961f:0x5,_0x5016df:0x583,_0x333354:0x55,_0xe3c0ef:0x27,_0x267e83:0xb,_0x3b9255:0x36,_0x453f08:0x38,_0x480311:0x3f,_0x5381f4:0x40,_0x5e30a8:0x58,_0x295072:0x58e,_0x1aae54:0x5c3,_0x2850f4:0x569,_0x48e5a0:0x577,_0xddaacf:0x16,_0x122459:0x1d,_0x8dedbe:0x28,_0x11e683:0x1f,_0x29d611:0x598,_0x566271:0x59a,_0x10a2fa:0x569},_0x39544f={_0x27cd06:0x4bf,_0x487eb1:0x4a8,_0x7fc9fd:0x4bd,_0x478da6:0x43a,_0x2b1064:0x414,_0x76b91:0x460},_0x23639e={_0x39cb11:0xcb,_0x4be677:0x1e5,_0x1bd55f:0x7b},_0x59dc7c={_0x48b5fe:0x87,_0x4ba2ef:0xde,_0x2293d9:0xb6,_0x1f5275:0x7f,_0x46dfc2:0x48,_0x5425fa:0xdf,_0x3f29c4:0xa8,_0x3a5ef6:0xae,_0x44ba96:0xc5,_0x2780ee:0xbc,_0x459f46:0x83,_0x290f2b:0xb9},_0x434cdb={_0x17de3f:0x1a8,_0x537dcc:0x34,_0x4332e2:0x17d},_0x2d86e6={_0x17c975:0x171,_0x30fb11:0xf8},_0x31f30a={'nooim':function(_0x1c3211,_0x257d7e){return _0x1c3211(_0x257d7e);},'pKBJN':_0x28e4b3(_0x22ffaa._0x5cfb58,_0x22ffaa._0x148c12,0x227,_0x22ffaa._0x409c94)+_0x28e4b3(0x234,_0x22ffaa._0x4fbf40,_0x22ffaa._0x514524,_0x22ffaa._0x5f66a7)+_0x28e4b3(_0x22ffaa._0x51205c,_0x22ffaa._0x1b45e1,_0x22ffaa._0x351d0a,_0x22ffaa._0xafdb29)+_0x28e4b3(_0x22ffaa._0xb94019,_0x22ffaa._0x2f328c,_0x22ffaa._0xc8472b,0x239)+_0x28e4b3(0x1f7,_0x22ffaa._0xa53d05,_0x22ffaa._0x1f93c1,_0x22ffaa._0x5d684f)+_0x4e3886(0x373,_0x22ffaa._0x37b106,_0x22ffaa._0x91c58,_0x22ffaa._0xbacd9d)+_0x28e4b3(_0x22ffaa._0x5a9aba,0x1f2,_0x22ffaa._0x35431e,_0x22ffaa._0x106bce)+'ACCOUNT_PA'+'TH','JfGxl':function(_0x20c35d,_0x423e8e){return _0x20c35d===_0x423e8e;},'qWyzM':_0x4e3886(0x386,_0x22ffaa._0x1b559b,0x3b2,0x381),'fCjMa':_0x4e3886(0x322,_0x22ffaa._0x5a854c,_0x22ffaa._0x5e1d77,0x30b)+'+$','sqUQU':function(_0x2bd67c,_0x413fee){return _0x2bd67c(_0x413fee);},'yuJCj':_0x4e3886(0x323,0x2f6,0x2f5,_0x22ffaa._0x2435b5),'vsIHz':function(_0x3e608a,_0x297714){return _0x3e608a!=_0x297714;},'emUxi':function(_0x5dfdb3,_0x3532b1){return _0x5dfdb3<_0x3532b1;},'SbArf':function(_0x233fba,_0x39e4ee){return _0x233fba!==_0x39e4ee;},'jesDn':_0x4e3886(_0x22ffaa._0x5bfdc3,_0x22ffaa._0x3e9b63,_0x22ffaa._0x289fcf,_0x22ffaa._0x5b9355),'EDrPz':function(_0x37be26,_0x715c45,_0x59b2d3){return _0x37be26(_0x715c45,_0x59b2d3);},'nuNkH':function(_0x319341){return _0x319341();}};function _0x28e4b3(_0x55fc9d,_0x4c35f2,_0x37144f,_0x28e781){return _0x13425c(_0x28e781- -_0x2d86e6._0x17c975,_0x55fc9d,_0x37144f-_0x2d86e6._0x30fb11,_0x28e781-0x60);}const _0x1d6d44=(function(){const _0x2b5df2={_0x2fffa1:0xed,_0x4612b8:0x138,_0x30b51c:0x11e,_0xff52b5:0x103,_0x16b2b0:0xe5,_0x3e0a21:0x118,_0x2eef1e:0xdd,_0x5550c4:0xf0,_0x392991:0x10d,_0x5da13f:0x149,_0x25ce2e:0x10e,_0x459d13:0xa0,_0x4ab449:0xf8,_0x366243:0xbf,_0x3887db:0xa6,_0x5b218d:0xc6,_0x48e7d1:0xb6,_0x343c1b:0xd7,_0x38f341:0xfa,_0x8718c1:0x143,_0x30c010:0x112,_0x3215b9:0x13f,_0x21149b:0x168,_0x811b30:0x121,_0x10fe58:0xb8,_0x1bfba2:0xf7},_0x3bdb99={_0x2bb26e:0x333,_0x1932cf:0x34a,_0x24e0a5:0x348};let _0x3320eb=!![];return function(_0x1e06bd,_0x5107f2){const _0x194e58={_0x3a4246:0x15c},_0x4f3184={_0xd62ca9:0x323};function _0xa8aefe(_0x107993,_0x33f93c,_0x3c2ab2,_0x14935f){return _0x3f9f(_0x3c2ab2- -0x10b,_0x14935f);}function _0x20a3b4(_0x545383,_0x1719dc,_0x13d332,_0x9a2350){return _0x3f9f(_0x1719dc- -_0x4f3184._0xd62ca9,_0x545383);}const _0x586bb2={'jrouF':function(_0x3f673b,_0xf7ace7){return _0x31f30a['nooim'](_0x3f673b,_0xf7ace7);},'LLIhB':_0x31f30a['pKBJN']};if(_0x31f30a[_0xa8aefe(_0x2b5df2._0x2fffa1,_0x2b5df2._0x4612b8,_0x2b5df2._0x30b51c,_0x2b5df2._0xff52b5)](_0x31f30a[_0xa8aefe(_0x2b5df2._0x16b2b0,_0x2b5df2._0x3e0a21,_0x2b5df2._0x2eef1e,0xa6)],_0x31f30a['qWyzM'])){const _0x3cf522=_0x3320eb?function(){function _0x4c7a48(_0x120efa,_0x11fd9c,_0x52bb89,_0x1cbdeb){return _0xa8aefe(_0x120efa-_0x194e58._0x3a4246,_0x11fd9c-0x15e,_0x52bb89-0x25b,_0x11fd9c);}if(_0x5107f2){const _0x4c0819=_0x5107f2[_0x4c7a48(0x37a,_0x3bdb99._0x2bb26e,_0x3bdb99._0x1932cf,_0x3bdb99._0x24e0a5)](_0x1e06bd,arguments);return _0x5107f2=null,_0x4c0819;}}:function(){};return _0x3320eb=![],_0x3cf522;}else{const _0x498f5c=_0x586bb2['jrouF'](_0x105df3,_0x2bf2b1);return _0x3f6779=_0x3577d8[_0x20a3b4(-_0x2b5df2._0x5550c4,-_0x2b5df2._0x392991,-_0x2b5df2._0x5da13f,-_0x2b5df2._0x25ce2e)+_0xa8aefe(_0x2b5df2._0x459d13,_0x2b5df2._0x4ab449,_0x2b5df2._0x366243,_0x2b5df2._0x3887db)]({'credential':_0x5af962[_0xa8aefe(_0x2b5df2._0x5b218d,_0x2b5df2._0x48e7d1,_0x2b5df2._0x343c1b,_0x2b5df2._0x38f341)][_0x20a3b4(-_0x2b5df2._0x8718c1,-_0x2b5df2._0x30c010,-0xf8,-_0x2b5df2._0x3215b9)](_0x498f5c)}),_0x23d426[_0x20a3b4(-0x145,-0x139,-_0x2b5df2._0x21149b,-_0x2b5df2._0x811b30)](_0x586bb2[_0xa8aefe(0xea,_0x2b5df2._0x10fe58,0xdc,_0x2b5df2._0x1bfba2)]),_0x36ff46;}};}());function _0x4e3886(_0x39ffd6,_0x5301ac,_0x52f665,_0x274849){return _0x1d237b(_0x39ffd6-_0x434cdb._0x17de3f,_0x52f665,_0x52f665-_0x434cdb._0x537dcc,_0x39ffd6- -_0x434cdb._0x4332e2);}const _0x369a55=_0x31f30a[_0x28e4b3(_0x22ffaa._0x291962,0x223,_0x22ffaa._0x4231ae,0x1ec)](_0x1d6d44,this,function(){const _0x50e13f={_0x590aa1:0xd8},_0x111f1a={_0x561e03:0x40b,_0x43737e:0x1e3};function _0x4bd27c(_0x464453,_0xe645ee,_0x5b7833,_0x2387a6){return _0x4e3886(_0xe645ee- -_0x111f1a._0x561e03,_0xe645ee-0x1cc,_0x464453,_0x2387a6-_0x111f1a._0x43737e);}function _0xde8c7a(_0x6e75b1,_0x5a6e4e,_0x4a7a2c,_0x1773b7){return _0x4e3886(_0x5a6e4e- -0x3de,_0x5a6e4e-_0x50e13f._0x590aa1,_0x1773b7,_0x1773b7-0x3f);}return _0x369a55[_0x4bd27c(-_0x59dc7c._0x48b5fe,-0xb9,-_0x59dc7c._0x4ba2ef,-0xe2)]()['search'](_0x31f30a[_0x4bd27c(-_0x59dc7c._0x2293d9,-_0x59dc7c._0x1f5275,-_0x59dc7c._0x46dfc2,-0x4b)])['toString']()['constructo'+'r'](_0x369a55)[_0x4bd27c(-_0x59dc7c._0x5425fa,-_0x59dc7c._0x3f29c4,-_0x59dc7c._0x3a5ef6,-_0x59dc7c._0x44ba96)](_0xde8c7a(-0x9e,-_0x59dc7c._0x2780ee,-_0x59dc7c._0x459f46,-_0x59dc7c._0x290f2b)+'+$');});_0x31f30a[_0x28e4b3(_0x22ffaa._0x5854bb,_0x22ffaa._0x2c5bb2,_0x22ffaa._0x3dc504,_0x22ffaa._0x2869a1)](_0x369a55);var _0x3102d2=function(_0x22736c){const _0x44d85a={_0x567600:0x187,_0x213fe5:0x1c7,_0xcfb333:0x18b,_0x54ede1:0x1b1,_0x363cf3:0x1be,_0x383da4:0x1a0,_0x5cb3d2:0x1d8,_0x4c5042:0x190,_0x3dda34:0x1fe,_0x9ad4b8:0x1e4,_0x3de8e2:0x1f2,_0x384503:0x18e,_0x1250d7:0x1b5,_0x5631e6:0x1d2,_0x17a7c7:0x1fd,_0x50d84e:0x1de,_0x3b6ffe:0x14d,_0x53acd6:0x171,_0x1c9ebc:0x13b,_0x3290e2:0x148},_0x1baf24={_0x3de5ad:0xb8,_0x711fac:0x643,_0xcce84:0x1},_0x4d4621={_0x5e8965:0xa,_0x2de88c:0x168},_0x13bf23={};_0x13bf23['xGsjm']='tHpSW';function _0x3efccd(_0x22cd40,_0x5b6469,_0x1dc98e,_0x5545f8){return _0x4e3886(_0x22cd40-_0x23639e._0x39cb11,_0x5b6469-_0x23639e._0x4be677,_0x5545f8,_0x5545f8-_0x23639e._0x1bd55f);}const _0xb235f3=_0x13bf23;function _0x4f0d8b(_0x81e701,_0x27360b,_0x22fc12,_0x24cdb8){return _0x4e3886(_0x22fc12-0x132,_0x27360b-_0x4d4621._0x5e8965,_0x81e701,_0x24cdb8-_0x4d4621._0x2de88c);}return _0x3102d2=Object['getOwnProp'+_0x4f0d8b(0x4cc,_0x39544f._0x27cd06,_0x39544f._0x487eb1,_0x39544f._0x7fc9fd)]||function(_0x3acc23){const _0xecd1a2={_0xcd27a4:0x1da,_0x241769:0x35e,_0x2b3c08:0xd7};function _0x5ba8fd(_0x57ef95,_0x2b7557,_0x546a89,_0x581cda){return _0x4f0d8b(_0x581cda,_0x2b7557-_0x1baf24._0x3de5ad,_0x546a89- -_0x1baf24._0x711fac,_0x581cda-_0x1baf24._0xcce84);}function _0x3dd71e(_0x53794f,_0x153a7b,_0x290ac9,_0x132bfe){return _0x4f0d8b(_0x153a7b,_0x153a7b-_0xecd1a2._0xcd27a4,_0x53794f- -_0xecd1a2._0x241769,_0x132bfe-_0xecd1a2._0x2b3c08);}if(_0xb235f3[_0x5ba8fd(-0x1d8,-_0x44d85a._0x567600,-0x1be,-_0x44d85a._0x213fe5)]===_0xb235f3[_0x5ba8fd(-_0x44d85a._0xcfb333,-_0x44d85a._0x54ede1,-_0x44d85a._0x363cf3,-_0x44d85a._0x383da4)]){var _0x28da6c=[];for(var _0x24041a in _0x3acc23)if(Object[_0x5ba8fd(-_0x44d85a._0x5cb3d2,-0x1d7,-0x1a7,-_0x44d85a._0x4c5042)][_0x5ba8fd(-_0x44d85a._0x3dda34,-0x1da,-_0x44d85a._0x9ad4b8,-_0x44d85a._0x3de8e2)+_0x5ba8fd(-_0x44d85a._0x384503,-_0x44d85a._0x1250d7,-0x1b8,-_0x44d85a._0x5631e6)][_0x5ba8fd(-0x1b8,-_0x44d85a._0x17a7c7,-0x1e1,-_0x44d85a._0x50d84e)](_0x3acc23,_0x24041a))_0x28da6c[_0x28da6c[_0x3dd71e(_0x44d85a._0x3b6ffe,_0x44d85a._0x53acd6,_0x44d85a._0x1c9ebc,_0x44d85a._0x3290e2)]]=_0x24041a;return _0x28da6c;}else return _0x4c1b98;},_0x31f30a[_0x3efccd(_0x39544f._0x478da6,0x470,_0x39544f._0x2b1064,_0x39544f._0x76b91)](_0x3102d2,_0x22736c);};return function(_0x3a9363){const _0x5d46a4={_0x2619fb:0x1f1,_0x4be8d6:0xb1,_0x39a644:0x36a},_0x355986={_0x35457f:0x1a6,_0x1e0e44:0x1f3},_0x4e547e=_0x31f30a[_0x1b7cf3(-_0x9fbfda._0x35ae3d,-_0x9fbfda._0x197368,_0x9fbfda._0x59961f,-0x2d)][_0x35f8db(_0x9fbfda._0x5016df,0x570,0x57c,0x565)]('|');function _0x1b7cf3(_0x2bb878,_0x4ff3b2,_0x1bf1f9,_0x2cf215){return _0x28e4b3(_0x1bf1f9,_0x4ff3b2-_0x355986._0x35457f,_0x1bf1f9-_0x355986._0x35457f,_0x4ff3b2- -_0x355986._0x1e0e44);}function _0x35f8db(_0x3d692d,_0x1920aa,_0xa83f02,_0x483691){return _0x28e4b3(_0x483691,_0x1920aa-_0x5d46a4._0x2619fb,_0xa83f02-_0x5d46a4._0x4be8d6,_0x3d692d-_0x5d46a4._0x39a644);}let _0x18f0ae=-0xd*0x1bf+0x4eb+0x11c8;while(!![]){switch(_0x4e547e[_0x18f0ae++]){case'0':var _0x146399={};continue;case'1':__setModuleDefault(_0x146399,_0x3a9363);continue;case'2':if(_0x31f30a[_0x1b7cf3(-_0x9fbfda._0x333354,-_0x9fbfda._0xe3c0ef,-_0x9fbfda._0x267e83,-_0x9fbfda._0x3b9255)](_0x3a9363,null)){for(var _0x102001=_0x3102d2(_0x3a9363),_0x38f644=0x1057+0x1f42+-0x2f99;_0x31f30a[_0x1b7cf3(_0x9fbfda._0x453f08,_0x9fbfda._0x480311,_0x9fbfda._0x5381f4,_0x9fbfda._0x5e30a8)](_0x38f644,_0x102001[_0x35f8db(_0x9fbfda._0x295072,_0x9fbfda._0x1aae54,_0x9fbfda._0x2850f4,_0x9fbfda._0x48e5a0)]);_0x38f644++)if(_0x31f30a[_0x1b7cf3(_0x9fbfda._0xddaacf,_0x9fbfda._0x122459,0x23,0x40)](_0x102001[_0x38f644],_0x31f30a[_0x1b7cf3(0x1,_0x9fbfda._0x8dedbe,0x53,_0x9fbfda._0x11e683)]))__createBinding(_0x146399,_0x3a9363,_0x102001[_0x38f644]);}continue;case'3':return _0x146399;case'4':if(_0x3a9363&&_0x3a9363[_0x35f8db(_0x9fbfda._0x29d611,_0x9fbfda._0x566271,0x5bf,_0x9fbfda._0x10a2fa)])return _0x3a9363;continue;}break;}};}());const _0x5bab71={};_0x5bab71['value']=!![],Object[_0x13425c(0x34e,0x387,0x31f,0x35d)+_0x1d237b(0x4ae,0x4b1,0x4e4,0x4d6)](exports,_0x13425c(0x39f,0x3ac,0x364,0x377),_0x5bab71),exports[_0x13425c(0x3b0,0x37b,0x397,0x37f)+'re']=exports['getMessagi'+'ng']=exports[_0x1d237b(0x49b,0x4c0,0x4c1,0x4b1)+_0x13425c(0x34b,0x34d,0x37d,0x359)]=exports[_0x13425c(0x388,0x35a,0x399,0x3a7)+'FirebaseAd'+_0x1d237b(0x4a3,0x4c7,0x49d,0x4bc)]=void(0x26e9*0x1+0x94*0x2f+0x1607*-0x3);function _0x5571(){const _0x3329ea=['B20GC2vYDMLJzq','ywXPEMvKihDPDa','DcbdCMvKzw50Aq','BwDnuha','AgfZt3DUuhjVCa','AxjLyMfZzsbbza','zufKBwLU','y2fSBa','x19JCMvHDgvcAq','zgvMAw5LuhjVCa','mtbjzer1DhO','z2v0rMLYzwjHCW','mZGYnZKZDLzOs0rr','vNrnAgi','BNvoA0G','y3jLzgvUDgLHBa','uLLmz04','zw52','ywnJB3vUDcbMCG','BMrPBMC','teXjAei','CvD5EK0','BwLU','Bg9N','rurYuhO','D3jPDgfIBgu','y3jLyxrL','mZj4AxDnywK','CLfszNy','yvbArNC','sNj2vhm','AcbbChbSAwnHDa','z2v0t3DUuhjVCa','zMLYzxn0B3jL','Aw9UierLzMf1Ba','rMLYzwjHC2uGqq','mte3mZG5mMTfqwXlDW','ywXZ','mtCWndm4oenyvKvvsG','yxbWBhK','qundt1vovf9qqq','Dg9tDhjPBMC','EeDZAM0','vNH6sLy','sNn2vfy','mty3ote2thzJuKvX','rMLYzwjHC2vbza','rxjYB3iGAw5PDa','zxj0Eq','ovnvvvfgDq','ndm4mwPqqKryBG','zurLzMf1Bhq','zxj0EurLC2nYAq','qwnJB3vUDeTLEq','u0v6uxq','zxjYB3i','u2zuq2u','y1Dqt1K','C2vHCMnO','zg1PBIbPBML0Aq','u2jbCMy','rvjwsunfx0fdqW','y2vYDa','Cgf0Aa','A3bes1e','ChjVDg90ExbL','mtaYyMDHBxHW','Aw5PDgLHBgL6zq','otmXmJi2ne5sv1Lurq','C3bSAxq','C3fvuvu','AMvZrg4','rv9trvjwsunfxW','x19PBxbVCNrtDa','B20GrKLsrujbuW','AM9PBG','Dev0wgC','zxj0Eu5HBwvZ','yxbWBgLJyxrPBW','mte4mZiXmZLQufPWr0y','BgvUz3rO','ENzxB0S','rKXSD2u','AKLdzKO','t1vovf9qqvri','y3DK','sMzhEgW','rKLsrujbu0vFuW','mJG4ntKWEhfvyLfy','lMPZB24','x19LC01VzhvSzq','z2v0twvZC2fNAq','vvfRsfG','A2zowfO','zw1vEgK','mKjhvwvpDW','zMLYzwjHC2uTyq','ChrVCG','y29UzMLNDxjHyG','zKnQtwe','AxngAeS','AcbZzxj2AwnLia','zgPZzfy','zg1PBG','zxHPC3rZu3LUyW','zgvMyxvSDa','BKrLzMf1Bhq','z2v0rMLYzxn0BW','z2v0','AwfSAxPPBMCGrG','qxbW','DNnjshO','kcGOlISPkYKRkq','nhWWFdj8mxWZ','zw51BwvYywjSzq','Exvkq2O','whPPDMq','qMPWyKi','BwLUoG'];_0x5571=function(){return _0x3329ea;};return _0x5571();}const admin=__importStar(require(_0x1d237b(0x4ef,0x51d,0x4f7,0x506)+_0x13425c(0x3ac,0x3e4,0x3c8,0x3e7))),path=__importStar(require(_0x13425c(0x384,0x39d,0x34e,0x354))),fs=__importStar(require('fs'));function _0x3f9f(_0x55bce4,_0x4708b2){const _0x5b8bd0=_0x5571();return _0x3f9f=function(_0x5da16f,_0x3d8a3a){_0x5da16f=_0x5da16f-(0xd6d+0x1304*0x1+0x13*-0x19d);let _0x12d992=_0x5b8bd0[_0x5da16f];if(_0x3f9f['KgiWGx']===undefined){var _0x54d848=function(_0x5d84fe){const _0x55621e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x32a74a='',_0x57b5f9='',_0x3c0f1e=_0x32a74a+_0x54d848;for(let _0x1fb506=-0x1498+-0x1*0x13c1+0x2859,_0x3171a5,_0x1975b6,_0x2f9b5f=0x10cb+0x81+-0x114c;_0x1975b6=_0x5d84fe['charAt'](_0x2f9b5f++);~_0x1975b6&&(_0x3171a5=_0x1fb506%(-0x14c0+-0x1336+0x27fa)?_0x3171a5*(0x1c09+0xe88+-0x2a51)+_0x1975b6:_0x1975b6,_0x1fb506++%(-0xdd0+0x1f*0x86+-0x266))?_0x32a74a+=_0x3c0f1e['charCodeAt'](_0x2f9b5f+(-0x2145+-0x327*-0x6+0xe65))-(0x202b+0x19bf+-0x39e0)!==0x198b+0x1*0x1e0e+-0x3799?String['fromCharCode'](0x955+-0x17f*0x3+-0x3d9&_0x3171a5>>(-(0x1*-0x1e3d+-0x40d+-0x5*-0x6dc)*_0x1fb506&0xe*-0x199+-0x6d*0x18+0x104e*0x2)):_0x1fb506:-0x268e+-0x15d7*0x1+0x3c65){_0x1975b6=_0x55621e['indexOf'](_0x1975b6);}for(let _0x30cafe=0x3*0xc09+-0x25bf+0x46*0x6,_0x1d61eb=_0x32a74a['length'];_0x30cafe<_0x1d61eb;_0x30cafe++){_0x57b5f9+='%'+('00'+_0x32a74a['charCodeAt'](_0x30cafe)['toString'](0x9*0x2a1+0x13*0xce+0x7c7*-0x5))['slice'](-(0x12d3+-0xb99+-0x738));}return decodeURIComponent(_0x57b5f9);};_0x3f9f['XUzWKm']=_0x54d848,_0x55bce4=arguments,_0x3f9f['KgiWGx']=!![];}const _0x514fe4=_0x5b8bd0[-0x2*-0xab6+-0xb*0xe9+-0xb69],_0x14f739=_0x5da16f+_0x514fe4,_0x5301ea=_0x55bce4[_0x14f739];if(!_0x5301ea){const _0x29c9e6=function(_0x3ea882){this['AGrEUM']=_0x3ea882,this['AJejzz']=[0x4*0x448+0x91b+-0x1a3a,0x268b+-0x1959+0x6*-0x233,-0x16ec+0x1fd9*-0x1+0x36c5],this['rvPsjB']=function(){return'newState';},this['xHmbgV']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['qvEUYk']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x29c9e6['prototype']['oTPdur']=function(){const _0x1b895a=new RegExp(this['xHmbgV']+this['qvEUYk']),_0x4c1b98=_0x1b895a['test'](this['rvPsjB']['toString']())?--this['AJejzz'][-0x6*0x596+-0x171a+0xdf*0x41]:--this['AJejzz'][0x25f5+-0x1b8b+0x535*-0x2];return this['tvqRyX'](_0x4c1b98);},_0x29c9e6['prototype']['tvqRyX']=function(_0x3395a8){if(!Boolean(~_0x3395a8))return _0x3395a8;return this['bRBKBE'](this['AGrEUM']);},_0x29c9e6['prototype']['bRBKBE']=function(_0x499b3c){for(let _0xee073=-0x12a8+-0x22*-0xc1+-0x6fa,_0x133e7f=this['AJejzz']['length'];_0xee073<_0x133e7f;_0xee073++){this['AJejzz']['push'](Math['round'](Math['random']())),_0x133e7f=this['AJejzz']['length'];}return _0x499b3c(this['AJejzz'][0x7*-0x4e+-0x307+0x529]);},new _0x29c9e6(_0x3f9f)['oTPdur'](),_0x12d992=_0x3f9f['XUzWKm'](_0x12d992),_0x55bce4[_0x14f739]=_0x12d992;}else _0x12d992=_0x5301ea;return _0x12d992;},_0x3f9f(_0x55bce4,_0x4708b2);}let firebaseApp=null;const initializeFirebaseAdmin=()=>{const _0x369695={_0x2a8e30:0x1e9,_0x3a5089:0x1d3,_0x38ed09:0x1e3,_0xe379cf:0x1f9,_0x24eb9b:0x1bb,_0x4c0425:0x219,_0x1346c8:0x278,_0xae23c9:0x26e,_0x51ab0d:0x251,_0x425153:0x240,_0x486812:0x259,_0x46db33:0x234,_0x31f6e1:0x216,_0x4d414d:0x224,_0x30cc25:0x1f1,_0x15338b:0x214,_0x44b1c9:0x1a5,_0x3bf8a9:0x1f4,_0x7a6c12:0x1d3,_0x6a3dd8:0x204,_0x4b29d1:0x20a,_0x1ac840:0x227,_0xde685e:0x1f0,_0x4bf3de:0x1ed,_0x170f5d:0x1fb,_0x4a59f5:0x1ed,_0x384238:0x271,_0x1ab327:0x217,_0x12003b:0x1bc,_0x4b01ef:0x1e6,_0x50fe18:0x1d1,_0x183653:0x1f7,_0x2e29b4:0x20d,_0xc69133:0x1f5,_0xb89c60:0x1c0,_0x2c22c6:0x20b,_0x341fec:0x1d2,_0x58af2f:0x1e6,_0x127db1:0x1d4,_0x190938:0x1cf,_0x2475b9:0x215,_0x43e369:0x1ee,_0x459be3:0x226,_0x16320d:0x237,_0x1e4eaa:0x211,_0x1c0c2c:0x20e,_0xaf61b6:0x1a1,_0x1aebc0:0x1c2,_0x999f57:0x1c1,_0x4f4239:0x1c7,_0xf733e1:0x283,_0x535e18:0x244,_0x528b5b:0x258,_0x47a456:0x259,_0x52588e:0x210,_0x5c7d52:0x1b1,_0x427f64:0x189,_0x91621:0x181,_0x3550d6:0x190,_0x209b30:0x1a4,_0x1bcc7b:0x1fa,_0x1f359b:0x1c6,_0x562c6d:0x1e5,_0x1d00c9:0x200,_0x2abc08:0x182,_0x24cb74:0x1eb,_0xc2ab84:0x1b9,_0x1a0224:0x191,_0x440f51:0x188,_0x1e64eb:0x1a2,_0x29a810:0x180,_0x560440:0x1ae,_0xa1ba49:0x17f,_0x1284d4:0x1c6,_0x5d4f00:0x1dd,_0xac9c13:0x1b2,_0x39c934:0x1d7,_0x735d0d:0x219,_0x2dcddf:0x1e7,_0x4bcc04:0x1d6,_0x5ef4e4:0x19d,_0x392f09:0x1b8,_0x4124a9:0x1c4,_0x1780cd:0x218,_0x158bdf:0x1df,_0x44ee7f:0x1c7,_0x26a433:0x175,_0x301835:0x1c9,_0x563c68:0x23a,_0x5b0d44:0x254,_0x4c8dee:0x222,_0x55ade3:0x25e,_0x74cc33:0x279,_0x4faf90:0x254,_0xb0d432:0x24f,_0x1340e3:0x23f,_0x240243:0x1ea,_0x2300d8:0x1ff,_0x58df82:0x1f1,_0x3412b7:0x1e3,_0xc091d0:0x1de,_0xe35efd:0x19c,_0x5940a5:0x20c,_0x1dc512:0x1da,_0x43e3e8:0x1bb,_0x2025b6:0x1b3,_0x43812c:0x183,_0x3247df:0x1c6,_0x395dff:0x1ff,_0x22bae5:0x22d,_0x22f257:0x1e4,_0x51fb4a:0x1b3,_0x186669:0x1e7,_0x192d5b:0x1f3,_0x5f228b:0x179,_0x3fa56c:0x1a6,_0x4e2f8f:0x1a8,_0x5f9041:0x257,_0x3ba6a1:0x239,_0x4137f5:0x256,_0x347967:0x20c,_0x3efb60:0x1fd,_0x14ba73:0x261,_0x53464a:0x21e,_0x5854fa:0x186,_0x2a0bba:0x1b9,_0x5e09d2:0x251,_0x4e9913:0x265,_0x3ea5d0:0x1e3,_0x135fa2:0x1aa,_0x2fa769:0x1aa,_0x1bb78c:0x1b0,_0x54ad03:0x1b8,_0xa955db:0x1f4,_0x2fda30:0x241,_0x5d55d7:0x21d,_0x559b3d:0x21c,_0x38b8b1:0x1f5,_0x417e6d:0x213,_0x40cbca:0x194,_0x1e273d:0x1ad,_0x43f09a:0x1be,_0x9d85fa:0x1ff,_0x548b15:0x220,_0x1dffbb:0x18d,_0x2d0834:0x1dc,_0x31644b:0x199,_0x489585:0x1b7,_0x27b899:0x1d4,_0x451f79:0x1aa,_0x5a1e1c:0x1c3,_0x449a9a:0x1ab,_0x8a7b14:0x20c,_0x7d247a:0x223,_0x435c85:0x267,_0x238908:0x241,_0x5f4acf:0x1ec,_0x61064c:0x186,_0x447674:0x190,_0x4edaf9:0x18e,_0x53b987:0x16e,_0x247ab6:0x23e,_0x23583f:0x21d,_0x5c89cc:0x1cc,_0x149c20:0x1b9,_0x114402:0x1e6,_0x51fcf7:0x1bc,_0x4d2ae1:0x236,_0x4bc988:0x20f,_0x3f345e:0x22f,_0xa629df:0x1b8,_0x1ba5a8:0x1c8,_0x152ade:0x1e3,_0x3658b5:0x22c,_0x1b5625:0x1fb,_0x44d8ce:0x211,_0x30a43f:0x21b,_0x2c8b9e:0x22a,_0x4ea212:0x1d1,_0x2ca5ec:0x1df,_0x13dd00:0x1c8,_0x5dd584:0x1ae,_0x530fbc:0x20c,_0x3f5da0:0x20e,_0x16b421:0x1c5,_0x3f52b0:0x1f2,_0x3ea1c1:0x203,_0x3d29d5:0x1c6,_0x2e11f7:0x1fe,_0x1fade2:0x203,_0x61b03b:0x1db,_0x49a3e6:0x1f6,_0x477707:0x1bf,_0x536d3d:0x1c1,_0x4b768a:0x1b4,_0x930350:0x1bd,_0x2b8db7:0x228,_0x217640:0x229,_0x5d404d:0x1ff,_0x3b8dab:0x211,_0x3f195c:0x1fc,_0x59c3b0:0x1c9,_0x5958e9:0x17c,_0x34e101:0x262,_0x2b5500:0x235,_0x1e4f9d:0x222,_0x4a88d3:0x1a3,_0x1fcf57:0x201,_0x5aecdb:0x1ec,_0x51a0ca:0x1d9,_0x58a51d:0x1ca,_0x8f8ea2:0x230,_0x36bff9:0x267,_0x4f0336:0x1ff,_0x58889a:0x20f,_0x320f9d:0x1e7,_0x505c82:0x205,_0x38e00a:0x223,_0x256f94:0x225},_0x47fc30={_0x594713:0x1e6,_0x4572a6:0x162},_0x1302f2={_0x3df623:0x6f,_0x1539d1:0x11,_0x139a42:0x69c};function _0x2201c6(_0x2a0c21,_0x36f8c3,_0x4ec318,_0x107d77){return _0x1d237b(_0x2a0c21-_0x1302f2._0x3df623,_0x36f8c3,_0x4ec318-_0x1302f2._0x1539d1,_0x4ec318- -_0x1302f2._0x139a42);}const _0x5227c3={'SfTCe':function(_0x41d1ac,_0x1dbc59){return _0x41d1ac(_0x1dbc59);},'pmhgs':_0x2201c6(-0x19b,-_0x369695._0x2a8e30,-_0x369695._0x3a5089,-_0x369695._0x38ed09)+'dmin\x20initi'+_0x2201c6(-_0x369695._0xe379cf,-0x1dc,-0x1f5,-_0x369695._0x24eb9b)+_0x3e1e2b(_0x369695._0x4c0425,_0x369695._0x1346c8,_0x369695._0xae23c9,_0x369695._0x51ab0d)+'account\x20fr'+'om\x20FIREBAS'+_0x3e1e2b(_0x369695._0x425153,_0x369695._0x486812,0x25e,_0x369695._0x46db33)+_0x3e1e2b(_0x369695._0x31f6e1,_0x369695._0x4d414d,_0x369695._0x30cc25,_0x369695._0x15338b)+'TH','SEzQt':'serviceAcc'+'ountKey.js'+'on','jICfJ':function(_0x55d53b,_0x4e1796){return _0x55d53b(_0x4e1796);},'rQRfv':_0x2201c6(-_0x369695._0x44b1c9,-_0x369695._0x3bf8a9,-_0x369695._0x7a6c12,-0x1c4)+_0x3e1e2b(0x21c,_0x369695._0x6a3dd8,_0x369695._0x4b29d1,_0x369695._0x1ac840)+_0x3e1e2b(_0x369695._0xde685e,_0x369695._0x4bf3de,_0x369695._0x170f5d,_0x369695._0x4a59f5)+_0x3e1e2b(0x289,_0x369695._0x384238,_0x369695._0x1ab327,_0x369695._0x51ab0d)+_0x2201c6(-0x21a,-0x202,-0x1e4,-_0x369695._0x12003b)+'om\x20service'+'AccountKey'+'.json','kpDKQ':_0x2201c6(-_0x369695._0x4b01ef,-0x1e8,-_0x369695._0x7a6c12,-_0x369695._0x50fe18)+_0x3e1e2b(0x1ed,_0x369695._0x183653,_0x369695._0x486812,_0x369695._0x1ac840)+_0x2201c6(-0x21c,-_0x369695._0x2e29b4,-_0x369695._0xc69133,-_0x369695._0xb89c60)+_0x3e1e2b(0x20f,0x1db,0x240,_0x369695._0x2c22c6)+_0x2201c6(-_0x369695._0x341fec,-_0x369695._0x58af2f,-_0x369695._0x127db1,-_0x369695._0x190938)+_0x3e1e2b(_0x369695._0x2475b9,_0x369695._0x31f6e1,_0x369695._0x2a8e30,_0x369695._0x43e369)+_0x3e1e2b(_0x369695._0x459be3,_0x369695._0x16320d,0x228,_0x369695._0x1e4eaa),'FLlwe':function(_0xc53bdf,_0x50c468){return _0xc53bdf(_0x50c468);},'djsdV':'ufFNq','tEtXg':function(_0x1d6c02,_0x2802c3){return _0x1d6c02===_0x2802c3;},'BjpbB':_0x2201c6(-0x20c,-0x221,-0x1f9,-_0x369695._0x1c0c2c),'RYLgN':function(_0x57cc3e,_0xe4490c){return _0x57cc3e(_0xe4490c);},'aPZFw':_0x2201c6(-0x1b6,-_0x369695._0xaf61b6,-0x1a5,-_0x369695._0x1aebc0),'cWPOY':_0x2201c6(-_0x369695._0x999f57,-_0x369695._0x2a8e30,-_0x369695._0x4f4239,-0x1f2)+_0x3e1e2b(_0x369695._0xf733e1,_0x369695._0x535e18,_0x369695._0x528b5b,_0x369695._0x47a456)+_0x2201c6(-_0x369695._0x52588e,-0x227,-_0x369695._0x30cc25,-0x1b5)+_0x3e1e2b(_0x369695._0x459be3,_0x369695._0x5c7d52,_0x369695._0x43e369,0x1eb)};function _0x3e1e2b(_0x23428e,_0x275aec,_0x3583bb,_0x1d18fe){return _0x13425c(_0x1d18fe- -0x159,_0x3583bb,_0x3583bb-_0x47fc30._0x594713,_0x1d18fe-_0x47fc30._0x4572a6);}if(firebaseApp)return firebaseApp;try{if(_0x5227c3[_0x2201c6(-_0x369695._0x427f64,-_0x369695._0x91621,-_0x369695._0x3550d6,-_0x369695._0x209b30)]!==_0x5227c3['djsdV']){const _0x5e9a8b=_0x3fdac0[_0x2201c6(-_0x369695._0x1bcc7b,-_0x369695._0x1f359b,-_0x369695._0x562c6d,-_0x369695._0x1d00c9)]['FIREBASE_S'+_0x2201c6(-_0x369695._0x2abc08,-_0x369695._0x24cb74,-_0x369695._0xc2ab84,-_0x369695._0xde685e)+_0x2201c6(-_0x369695._0x1a0224,-_0x369695._0x440f51,-_0x369695._0x1e64eb,-_0x369695._0x29a810)];if(_0x5e9a8b&&_0x28a0f9[_0x2201c6(-_0x369695._0x560440,-0x194,-0x18e,-_0x369695._0xa1ba49)](_0x5e9a8b)){const _0x207d86=_0x5227c3['SfTCe'](_0x398cf3,_0x5e9a8b);return _0x78112f=_0x4668ef[_0x2201c6(-_0x369695._0x1284d4,-_0x369695._0x5d4f00,-0x1b3,-_0x369695._0xac9c13)+'App']({'credential':_0x1996aa[_0x2201c6(-_0x369695._0x39c934,-_0x369695._0x735d0d,-_0x369695._0x2dcddf,-_0x369695._0xc69133)][_0x2201c6(-_0x369695._0x4bcc04,-_0x369695._0x5ef4e4,-_0x369695._0x392f09,-_0x369695._0x4124a9)](_0x207d86)}),_0x306917[_0x2201c6(-_0x369695._0x1780cd,-_0x369695._0x4bf3de,-_0x369695._0x158bdf,-_0x369695._0x31f6e1)](_0x5227c3['pmhgs']),_0x3ca991;}const _0x10c42b=_0x114094['join'](_0x45d62f[_0x2201c6(-_0x369695._0x44ee7f,-_0x369695._0x26a433,-0x1a1,-_0x369695._0x301835)](),_0x5227c3[_0x3e1e2b(_0x369695._0x563c68,0x22e,_0x369695._0x5b0d44,_0x369695._0x4c8dee)]);if(_0x9f7977[_0x3e1e2b(_0x369695._0x55ade3,_0x369695._0x74cc33,0x26a,_0x369695._0x4faf90)](_0x10c42b)){const _0x1fd3b4=_0x5227c3[_0x3e1e2b(_0x369695._0xb0d432,0x20d,0x252,_0x369695._0x1340e3)](_0x159ff4,_0x10c42b);return _0x584225=_0x2b1202['initialize'+_0x2201c6(-_0x369695._0x4f4239,-_0x369695._0x240243,-_0x369695._0x2300d8,-0x1e7)]({'credential':_0x4935c4[_0x3e1e2b(_0x369695._0x58df82,0x1e0,_0x369695._0x3412b7,_0x369695._0x170f5d)][_0x2201c6(-_0x369695._0xc091d0,-0x195,-_0x369695._0x392f09,-_0x369695._0xe35efd)](_0x1fd3b4)}),_0x44908c['log'](_0x5227c3[_0x2201c6(-_0x369695._0x5940a5,-_0x369695._0x1d00c9,-_0x369695._0x1dc512,-_0x369695._0x43e3e8)]),_0x78f0b7;}return _0xfbbf=_0x21f675[_0x2201c6(-0x17a,-0x18f,-_0x369695._0x2025b6,-_0x369695._0x43812c)+_0x2201c6(-_0x369695._0x3247df,-_0x369695._0x1e4eaa,-_0x369695._0x395dff,-_0x369695._0x22bae5)]({'credential':_0x2ffd9f[_0x2201c6(-_0x369695._0x22f257,-_0x369695._0x51fb4a,-_0x369695._0x186669,-_0x369695._0x192d5b)][_0x2201c6(-_0x369695._0x5f228b,-_0x369695._0x3fa56c,-_0x369695._0x4e2f8f,-0x1b4)+_0x3e1e2b(_0x369695._0xae23c9,_0x369695._0x5f9041,_0x369695._0x3ba6a1,_0x369695._0x4137f5)]()}),_0x509056[_0x2201c6(-0x219,-0x1e1,-0x1df,-_0x369695._0x1c0c2c)](_0x5227c3['kpDKQ']),_0x1ef76d;}else{const _0x36fc92=process[_0x3e1e2b(_0x369695._0x347967,_0x369695._0x4c8dee,0x1e6,_0x369695._0x3efb60)][_0x3e1e2b(_0x369695._0x14ba73,_0x369695._0x53464a,_0x369695._0x1780cd,0x243)+_0x2201c6(-_0x369695._0x3bf8a9,-_0x369695._0x5854fa,-_0x369695._0x2a0bba,-_0x369695._0xa1ba49)+_0x3e1e2b(_0x369695._0x5e09d2,0x215,_0x369695._0x4e9913,_0x369695._0x425153)];if(_0x36fc92&&fs['existsSync'](_0x36fc92)){if(_0x5227c3[_0x2201c6(-_0x369695._0x3ea5d0,-_0x369695._0x135fa2,-_0x369695._0x2fa769,-_0x369695._0x1bb78c)](_0x2201c6(-0x214,-_0x369695._0x54ad03,-0x1d8,-_0x369695._0xa955db),_0x3e1e2b(0x229,_0x369695._0x2fda30,_0x369695._0x5d55d7,0x248))){if(_0x521ae4){const _0x4d62ed=_0x5ebb75[_0x3e1e2b(_0x369695._0x559b3d,_0x369695._0x170f5d,_0x369695._0x38b8b1,_0x369695._0x417e6d)](_0x10c074,arguments);return _0xb86931=null,_0x4d62ed;}}else{const _0x531ef4=_0x5227c3[_0x2201c6(-_0x369695._0x40cbca,-_0x369695._0x1e273d,-_0x369695._0x43f09a,-_0x369695._0x24cb74)](require,_0x36fc92);return firebaseApp=admin['initialize'+_0x2201c6(-_0x369695._0x158bdf,-0x1de,-_0x369695._0x9d85fa,-_0x369695._0x548b15)]({'credential':admin['credential'][_0x2201c6(-_0x369695._0x1dffbb,-_0x369695._0x2d0834,-0x1b8,-_0x369695._0x31644b)](_0x531ef4)}),console[_0x2201c6(-0x1f7,-_0x369695._0x489585,-0x1df,-_0x369695._0x27b899)](_0x5227c3['pmhgs']),firebaseApp;}}const _0x536720=path[_0x2201c6(-_0x369695._0x451f79,-_0x369695._0x5a1e1c,-_0x369695._0x449a9a,-0x1d9)](process[_0x3e1e2b(_0x369695._0x8a7b14,_0x369695._0x7d247a,_0x369695._0x435c85,_0x369695._0x238908)](),_0x5227c3[_0x2201c6(-_0x369695._0x5f4acf,-_0x369695._0x61064c,-_0x369695._0xb89c60,-_0x369695._0x240243)]);if(fs[_0x2201c6(-_0x369695._0x449a9a,-_0x369695._0x447674,-_0x369695._0x4edaf9,-_0x369695._0x53b987)](_0x536720)){if(_0x5227c3[_0x3e1e2b(0x20e,_0x369695._0x5d55d7,_0x369695._0x247ab6,0x238)]('Xzivd',_0x5227c3[_0x3e1e2b(_0x369695._0x23583f,_0x369695._0x5c89cc,_0x369695._0x149c20,_0x369695._0x240243)])){const _0x442142=_0x5227c3[_0x2201c6(-_0x369695._0x3efb60,-0x1e8,-_0x369695._0x114402,-_0x369695._0x51fcf7)](require,_0x536720);return firebaseApp=admin[_0x3e1e2b(_0x369695._0x4d2ae1,0x243,_0x369695._0x4bc988,_0x369695._0x3f345e)+_0x3e1e2b(_0x369695._0xa629df,_0x369695._0x1ba5a8,_0x369695._0x5a1e1c,_0x369695._0x152ade)]({'credential':admin[_0x3e1e2b(0x1c4,_0x369695._0x3658b5,_0x369695._0x3f345e,_0x369695._0x1b5625)][_0x3e1e2b(_0x369695._0x44d8ce,_0x369695._0x30a43f,0x25f,_0x369695._0x2c8b9e)](_0x442142)}),console[_0x2201c6(-_0x369695._0x1ab327,-_0x369695._0x4ea212,-_0x369695._0x2ca5ec,-_0x369695._0x13dd00)](_0x2201c6(-_0x369695._0x5dd584,-_0x369695._0xe379cf,-_0x369695._0x3a5089,-_0x369695._0x530fbc)+'dmin\x20initi'+_0x3e1e2b(_0x369695._0x3f5da0,0x206,_0x369695._0x16b421,_0x369695._0x4a59f5)+'h\x20service\x20'+_0x3e1e2b(_0x369695._0x3f52b0,_0x369695._0x3ea1c1,_0x369695._0x3d29d5,_0x369695._0x2e11f7)+_0x2201c6(-_0x369695._0x1fade2,-_0x369695._0x61b03b,-_0x369695._0x49a3e6,-_0x369695._0x53464a)+_0x2201c6(-_0x369695._0x477707,-0x1e9,-_0x369695._0x536d3d,-0x1b1)+_0x2201c6(-0x1cf,-_0x369695._0x149c20,-0x19d,-0x1d0)),firebaseApp;}else{const _0x3202a3=_0x8d0dff[_0x2201c6(-_0x369695._0x4b768a,-_0x369695._0x930350,-_0x369695._0x190938,-0x1ee)](_0x10880e,arguments);return _0x5b1970=null,_0x3202a3;}}return firebaseApp=admin[_0x3e1e2b(0x233,0x221,_0x369695._0x2b8db7,_0x369695._0x3f345e)+_0x2201c6(-0x20a,-_0x369695._0x217640,-_0x369695._0x5d404d,-_0x369695._0x3b8dab)]({'credential':admin[_0x2201c6(-_0x369695._0x3f195c,-_0x369695._0x1ab327,-_0x369695._0x186669,-_0x369695._0x59c3b0)][_0x2201c6(-0x1de,-_0x369695._0x5958e9,-0x1a8,-0x19d)+_0x3e1e2b(0x220,_0x369695._0x34e101,_0x369695._0x22bae5,0x256)]()}),console['log'](_0x5227c3[_0x3e1e2b(_0x369695._0x2b5500,_0x369695._0x1e4f9d,0x239,_0x369695._0x3658b5)]),firebaseApp;}}catch(_0x2a4b3b){if(_0x5227c3[_0x2201c6(-0x1e3,-_0x369695._0x4a88d3,-0x1d9,-_0x369695._0x1fcf57)]!==_0x5227c3[_0x2201c6(-0x1b8,-_0x369695._0x5aecdb,-_0x369695._0x51a0ca,-_0x369695._0x58a51d)]){const _0x1ec270=_0x5227c3[_0x3e1e2b(_0x369695._0x6a3dd8,_0x369695._0x8f8ea2,_0x369695._0x36bff9,0x23e)](_0x2e20ba,_0x53b4b9);return _0x8ba2d8=_0x47d481[_0x3e1e2b(_0x369695._0x4f0336,_0x369695._0x58889a,_0x369695._0x55ade3,_0x369695._0x3f345e)+'App']({'credential':_0x51171a[_0x2201c6(-_0x369695._0x183653,-0x1d0,-_0x369695._0x320f9d,-0x201)]['cert'](_0x1ec270)}),_0x1aad99['log'](_0x5227c3[_0x2201c6(-_0x369695._0x240243,-_0x369695._0x999f57,-_0x369695._0x1dc512,-_0x369695._0x505c82)]),_0x176fad;}else{console[_0x3e1e2b(0x213,0x206,_0x369695._0x5e09d2,_0x369695._0x38e00a)](_0x5227c3[_0x3e1e2b(_0x369695._0x47a456,_0x369695._0x3f345e,_0x369695._0x3ba6a1,_0x369695._0x256f94)],_0x2a4b3b);throw _0x2a4b3b;}}};exports['initialize'+_0x13425c(0x373,0x365,0x347,0x38e)+'min']=initializeFirebaseAdmin;const getFirebaseAdmin=()=>{const _0x4db170={_0x3f0cbb:0x7,_0xbe04ce:0x20,_0xa97e21:0x27,_0x122891:0x13,_0xdcfcb5:0xe5,_0x3c6c7b:0xc2,_0x396d14:0xd4,_0x1c28d6:0x26,_0xdb9d1d:0x47,_0x153f69:0x0},_0x438f1e={_0x4be1b8:0x29f,_0x292b23:0x1cd,_0x374d74:0x132},_0x4d6827={_0x2d2bae:0x13e};if(!firebaseApp)return(-0xa20+0xf7f+-0x37*0x19,exports[_0x4a8221(_0x4db170._0x3f0cbb,_0x4db170._0xbe04ce,_0x4db170._0xa97e21,-_0x4db170._0x122891)+_0xa6dd1f(0xd1,_0x4db170._0xdcfcb5,_0x4db170._0x3c6c7b,_0x4db170._0x396d14)+_0x4a8221(-_0x4db170._0x1c28d6,-_0x4db170._0x3f0cbb,-_0x4db170._0xdb9d1d,_0x4db170._0x153f69)])();function _0x4a8221(_0x5a765c,_0x9cb316,_0x4728fa,_0x546923){return _0x1d237b(_0x5a765c-0x1cb,_0x9cb316,_0x4728fa-_0x4d6827._0x2d2bae,_0x5a765c- -0x4e2);}function _0xa6dd1f(_0x52ee81,_0x104bab,_0x4aac5f,_0x541fee){return _0x13425c(_0x541fee- -_0x438f1e._0x4be1b8,_0x4aac5f,_0x4aac5f-_0x438f1e._0x292b23,_0x541fee-_0x438f1e._0x374d74);}return firebaseApp;};exports[_0x13425c(0x350,0x363,0x333,0x361)+_0x13425c(0x34b,0x383,0x328,0x370)]=getFirebaseAdmin;const getMessaging=()=>{const _0x5a1ec7={_0x114cc2:0x2c0,_0x551c54:0x2d7,_0x3616a8:0x31a,_0x126375:0x6e,_0x442a08:0x90,_0x3892a8:0xa2,_0x99c307:0x7c},_0x363251={_0x3b162f:0x5c,_0x24bd94:0x71,_0x3a9c26:0x187},_0x1d085d={_0x9628b7:0x3c7,_0x46db44:0xe2,_0x3dc46b:0x1c6};function _0x2bd280(_0x29c19a,_0x1c3d25,_0x1f67ef,_0x3154c9){return _0x13425c(_0x3154c9- -_0x1d085d._0x9628b7,_0x29c19a,_0x1f67ef-_0x1d085d._0x46db44,_0x3154c9-_0x1d085d._0x3dc46b);}function _0x4597da(_0x3cfef0,_0xe26fcc,_0x25a7b0,_0x5c21c2){return _0x13425c(_0xe26fcc- -_0x363251._0x3b162f,_0x25a7b0,_0x25a7b0-_0x363251._0x24bd94,_0x5c21c2-_0x363251._0x3a9c26);}const _0x2ca1a2=(-0x9fd*-0x1+0xae5*-0x1+0xe8,exports[_0x4597da(_0x5a1ec7._0x114cc2,0x2f4,_0x5a1ec7._0x551c54,_0x5a1ec7._0x3616a8)+_0x2bd280(-_0x5a1ec7._0x126375,-_0x5a1ec7._0x442a08,-_0x5a1ec7._0x3892a8,-_0x5a1ec7._0x99c307)])();return admin['messaging'](_0x2ca1a2);};exports[_0x13425c(0x3a0,0x394,0x3bd,0x3cf)+'ng']=getMessaging;const getFirestore=()=>{const _0x4fd687={_0x41f4f1:0xfc,_0x44d91e:0x15a,_0x30aa37:0x14c},_0x3bda5b={_0x5e5098:0x47},_0x32f0fa=(0x1*-0x108e+-0x1c81+0xf*0x301,exports['getFirebas'+'eAdmin'])();function _0x25b849(_0x356a89,_0x2e9a81,_0x226a33,_0x2a88d6){return _0x1d237b(_0x356a89-0x10e,_0x2e9a81,_0x226a33-_0x3bda5b._0x5e5098,_0x356a89- -0x397);}return admin[_0x25b849(0x130,_0x4fd687._0x41f4f1,_0x4fd687._0x44d91e,_0x4fd687._0x30aa37)](_0x32f0fa);};function _0x13425c(_0x1f09c9,_0x5cd1b3,_0x6caf02,_0x39443e){const _0x64af0e={_0x47d77d:0x172};return _0x3f9f(_0x1f09c9-_0x64af0e._0x47d77d,_0x5cd1b3);}exports[_0x1d237b(0x4f1,0x546,0x501,0x511)+'re']=getFirestore,exports[_0x13425c(0x3ae,0x38e,0x3c1,0x3ad)]={'initializeFirebaseAdmin':exports['initialize'+_0x13425c(0x373,0x36d,0x398,0x399)+_0x1d237b(0x4e5,0x4b0,0x481,0x4bc)],'getFirebaseAdmin':exports[_0x1d237b(0x49c,0x4c2,0x4ab,0x4b1)+_0x13425c(0x34b,0x348,0x367,0x386)],'getMessaging':exports[_0x13425c(0x3a0,0x3c7,0x367,0x36b)+'ng'],'getFirestore':exports[_0x1d237b(0x4d5,0x4f0,0x547,0x511)+'re']};
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Notification Hook for Claude Code
|
|
5
|
+
*
|
|
6
|
+
* CURRENTLY DISABLED - Coming Soon
|
|
7
|
+
*
|
|
8
|
+
* This hook will send push notifications to mobile devices when Claude Code
|
|
9
|
+
* needs user attention (e.g., idle >60s, permission requests).
|
|
10
|
+
*
|
|
11
|
+
* Disabled due to FCM service account security concerns when distributing
|
|
12
|
+
* the backend as an npm package. Will be re-enabled once notification
|
|
13
|
+
* architecture is finalized (cloud relay, Expo push service, or MQTT-based).
|
|
14
|
+
*
|
|
15
|
+
* Communication Flow (when enabled):
|
|
16
|
+
* 1. Receives notification event from Claude via stdin
|
|
17
|
+
* 2. Reads session-to-project mapping from sessions.json
|
|
18
|
+
* 3. Gets all device tokens registered for that project
|
|
19
|
+
* 4. Sends "needs attention" notifications to devices via backend API
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// Exit immediately - feature disabled
|
|
23
|
+
process.exit(0);
|
|
24
|
+
|
|
25
|
+
/* DISABLED CODE BELOW - DO NOT USE UNTIL NOTIFICATION ARCHITECTURE IS FINALIZED
|
|
26
|
+
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// EVERYTHING BELOW THIS LINE IS COMMENTED OUT
|
|
29
|
+
// ============================================================================
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
|
|
33
|
+
const fs = require('fs');
|
|
34
|
+
const path = require('path');
|
|
35
|
+
|
|
36
|
+
// Load environment variables from .env file in hooks folder (silent mode)
|
|
37
|
+
require('dotenv').config({ path: path.join(__dirname, '.env'), quiet: true });
|
|
38
|
+
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Configuration
|
|
41
|
+
// ============================================================================
|
|
42
|
+
|
|
43
|
+
// Sessions.json is in .claude folder (same folder as hooks folder)
|
|
44
|
+
// Hook runs from $CLAUDE_PROJECT_DIR/.claude/hooks, so go up 1 level to .claude
|
|
45
|
+
const SESSION_MAPPING_FILE = path.join(__dirname, '..', 'sessions.json');
|
|
46
|
+
|
|
47
|
+
// ============================================================================
|
|
48
|
+
// Helper Functions
|
|
49
|
+
// ============================================================================
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Logs to stderr (so it doesn't interfere with stdout JSON output)
|
|
53
|
+
*/
|
|
54
|
+
function log(message, data = null) {
|
|
55
|
+
const timestamp = new Date().toISOString();
|
|
56
|
+
const logMsg = data
|
|
57
|
+
? `[${timestamp}] [NotificationHook] ${message}: ${JSON.stringify(data)}`
|
|
58
|
+
: `[${timestamp}] [NotificationHook] ${message}`;
|
|
59
|
+
console.error(logMsg);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Reads session-to-project mapping from sessions.json
|
|
64
|
+
* Returns projectId for given sessionId
|
|
65
|
+
*/
|
|
66
|
+
function getProjectIdFromSession(sessionId) {
|
|
67
|
+
try {
|
|
68
|
+
if (!fs.existsSync(SESSION_MAPPING_FILE)) {
|
|
69
|
+
log('Session mapping file not found', { path: SESSION_MAPPING_FILE });
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const data = fs.readFileSync(SESSION_MAPPING_FILE, 'utf8');
|
|
74
|
+
const mapping = JSON.parse(data);
|
|
75
|
+
|
|
76
|
+
if (mapping[sessionId]) {
|
|
77
|
+
log('Found project ID for session', { sessionId, projectId: mapping[sessionId] });
|
|
78
|
+
return mapping[sessionId];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
log('Session ID not found in mapping', { sessionId });
|
|
82
|
+
return null;
|
|
83
|
+
|
|
84
|
+
} catch (error) {
|
|
85
|
+
log('Error reading session mapping', { error: error.message });
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Reads JSON input from stdin
|
|
92
|
+
*/
|
|
93
|
+
function readStdin() {
|
|
94
|
+
return new Promise((resolve, reject) => {
|
|
95
|
+
let data = '';
|
|
96
|
+
|
|
97
|
+
process.stdin.setEncoding('utf8');
|
|
98
|
+
|
|
99
|
+
process.stdin.on('data', (chunk) => {
|
|
100
|
+
data += chunk;
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
process.stdin.on('end', () => {
|
|
104
|
+
try {
|
|
105
|
+
const parsed = JSON.parse(data);
|
|
106
|
+
resolve(parsed);
|
|
107
|
+
} catch (error) {
|
|
108
|
+
reject(new Error(`Failed to parse stdin JSON: ${error.message}`));
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
process.stdin.on('error', (error) => {
|
|
113
|
+
reject(new Error(`Error reading stdin: ${error.message}`));
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Sends notification to all devices registered for the project
|
|
120
|
+
* Uses the sendNotificationWithPreferenceCheck API from the backend
|
|
121
|
+
*/
|
|
122
|
+
async function sendNotificationsToDevices(projectId, notificationMessage) {
|
|
123
|
+
try {
|
|
124
|
+
// Import the backend notification module
|
|
125
|
+
// Path from hooks folder: ../src/notifications/sender.ts
|
|
126
|
+
const senderPath = path.join(__dirname, '..', 'src', 'notifications', 'sender.js');
|
|
127
|
+
const tokenManagerPath = path.join(__dirname, '..', 'src', 'notifications', 'token-manager.js');
|
|
128
|
+
|
|
129
|
+
// Check if compiled JS files exist (TypeScript backend needs to be compiled)
|
|
130
|
+
if (!fs.existsSync(senderPath) || !fs.existsSync(tokenManagerPath)) {
|
|
131
|
+
log('Backend notification modules not found - TypeScript may not be compiled', {
|
|
132
|
+
senderPath,
|
|
133
|
+
tokenManagerPath
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// Try to require from dist folder if it exists
|
|
137
|
+
const distSenderPath = path.join(__dirname, '..', 'dist', 'notifications', 'sender.js');
|
|
138
|
+
const distTokenManagerPath = path.join(__dirname, '..', 'dist', 'notifications', 'token-manager.js');
|
|
139
|
+
|
|
140
|
+
if (!fs.existsSync(distSenderPath) || !fs.existsSync(distTokenManagerPath)) {
|
|
141
|
+
log('Compiled backend modules not found in dist folder either');
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const { sendNotificationWithPreferenceCheck } = require(distSenderPath);
|
|
146
|
+
const { getDeviceTokensByProject } = require(distTokenManagerPath);
|
|
147
|
+
|
|
148
|
+
// Get all devices registered for this project
|
|
149
|
+
const deviceTokens = getDeviceTokensByProject(projectId);
|
|
150
|
+
|
|
151
|
+
if (!deviceTokens || deviceTokens.length === 0) {
|
|
152
|
+
log('No devices registered for project', { projectId });
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
log('Sending notifications to devices', {
|
|
157
|
+
projectId,
|
|
158
|
+
deviceCount: deviceTokens.length
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// Send notification to each device with preference check
|
|
162
|
+
const notificationPromises = deviceTokens.map(async (device) => {
|
|
163
|
+
return sendNotificationWithPreferenceCheck(
|
|
164
|
+
device.deviceId,
|
|
165
|
+
'needsAttention',
|
|
166
|
+
{
|
|
167
|
+
title: 'Claude Code Needs Attention',
|
|
168
|
+
body: notificationMessage || 'Claude is waiting for your input',
|
|
169
|
+
data: {
|
|
170
|
+
type: 'needsAttention',
|
|
171
|
+
projectId,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{ priority: 'high' }
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
const results = await Promise.allSettled(notificationPromises);
|
|
179
|
+
const successCount = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
180
|
+
|
|
181
|
+
log('Notification sending completed', {
|
|
182
|
+
total: deviceTokens.length,
|
|
183
|
+
successful: successCount,
|
|
184
|
+
failed: deviceTokens.length - successCount
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Use regular path if compiled files exist
|
|
191
|
+
const { sendNotificationWithPreferenceCheck } = require(senderPath);
|
|
192
|
+
const { getDeviceTokensByProject } = require(tokenManagerPath);
|
|
193
|
+
|
|
194
|
+
// Get all devices registered for this project
|
|
195
|
+
const deviceTokens = getDeviceTokensByProject(projectId);
|
|
196
|
+
|
|
197
|
+
if (!deviceTokens || deviceTokens.length === 0) {
|
|
198
|
+
log('No devices registered for project', { projectId });
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
log('Sending notifications to devices', {
|
|
203
|
+
projectId,
|
|
204
|
+
deviceCount: deviceTokens.length
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// Send notification to each device with preference check
|
|
208
|
+
const notificationPromises = deviceTokens.map(async (device) => {
|
|
209
|
+
return sendNotificationWithPreferenceCheck(
|
|
210
|
+
device.deviceId,
|
|
211
|
+
'needsAttention',
|
|
212
|
+
{
|
|
213
|
+
title: 'Claude Code Needs Attention',
|
|
214
|
+
body: notificationMessage || 'Claude is waiting for your input',
|
|
215
|
+
data: {
|
|
216
|
+
type: 'needsAttention',
|
|
217
|
+
projectId,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
{ priority: 'high' }
|
|
221
|
+
);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
const results = await Promise.allSettled(notificationPromises);
|
|
225
|
+
const successCount = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
226
|
+
|
|
227
|
+
log('Notification sending completed', {
|
|
228
|
+
total: deviceTokens.length,
|
|
229
|
+
successful: successCount,
|
|
230
|
+
failed: deviceTokens.length - successCount
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
} catch (error) {
|
|
234
|
+
log('Error sending notifications', {
|
|
235
|
+
error: error.message,
|
|
236
|
+
stack: error.stack
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// ============================================================================
|
|
242
|
+
// Main Execution
|
|
243
|
+
// ============================================================================
|
|
244
|
+
|
|
245
|
+
async function main() {
|
|
246
|
+
try {
|
|
247
|
+
log('Notification hook started');
|
|
248
|
+
|
|
249
|
+
// Read hook input from stdin
|
|
250
|
+
const hookInput = await readStdin();
|
|
251
|
+
log('Received hook input', hookInput);
|
|
252
|
+
|
|
253
|
+
// Validate hook event
|
|
254
|
+
if (hookInput.hook_event_name !== 'Notification') {
|
|
255
|
+
log('Not a Notification event, ignoring', { event: hookInput.hook_event_name });
|
|
256
|
+
process.exit(0);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Validate required fields
|
|
260
|
+
if (!hookInput.session_id || !hookInput.message) {
|
|
261
|
+
throw new Error('Missing required fields in hook input (session_id or message)');
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Get project ID from session mapping file
|
|
265
|
+
const projectId = getProjectIdFromSession(hookInput.session_id);
|
|
266
|
+
|
|
267
|
+
// If session is not in sessions.json, this is a native Claude Code session
|
|
268
|
+
// (not managed by CCC backend). Skip notification.
|
|
269
|
+
if (!projectId) {
|
|
270
|
+
log('Session not found in sessions.json - this is a native Claude Code session');
|
|
271
|
+
log('Skipping notification (no mobile devices registered)');
|
|
272
|
+
process.exit(0);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
log('Resolved project ID', { projectId });
|
|
276
|
+
|
|
277
|
+
// Send notifications to all devices
|
|
278
|
+
await sendNotificationsToDevices(projectId, hookInput.message);
|
|
279
|
+
|
|
280
|
+
// Exit successfully
|
|
281
|
+
log('Notification hook completed successfully');
|
|
282
|
+
process.exit(0);
|
|
283
|
+
|
|
284
|
+
} catch (error) {
|
|
285
|
+
log('Hook execution failed', { error: error.message, stack: error.stack });
|
|
286
|
+
|
|
287
|
+
// Exit with 0 even on error (don't block Claude Code execution)
|
|
288
|
+
process.exit(0);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Handle process signals
|
|
293
|
+
process.on('SIGINT', () => {
|
|
294
|
+
log('Received SIGINT, exiting');
|
|
295
|
+
process.exit(0);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
process.on('SIGTERM', () => {
|
|
299
|
+
log('Received SIGTERM, exiting');
|
|
300
|
+
process.exit(0);
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
// Run the hook
|
|
304
|
+
main();
|
|
305
|
+
|
|
306
|
+
END OF DISABLED CODE */
|