mongofire 6.5.2 → 6.5.5

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/src/utils.js CHANGED
@@ -1 +1 @@
1
- 'use strict';(function(_0x19d9b7,_0x3f17b8){const _0x371c75={_0x3f9dad:0x86,_0x290c17:0x2e,_0x14b360:0x51,_0x2b87d9:0x123,_0x3e6278:0x148,_0x5b0aa6:0x152,_0x272a47:0x112,_0x3cf408:0x12b,_0x58ecdf:0x130,_0xe8a700:0x159,_0x22a86d:0x1a,_0x46922b:0x4,_0x232fa3:0x37,_0x388d40:0x111,_0xc2e1cb:0x13c,_0x1945af:0x10f,_0x2f90c3:0x113,_0x3e28f9:0x17,_0x1919ed:0x1c,_0x3ce979:0xa2,_0x22c12b:0xdd},_0x232be5=_0x19d9b7();function _0x2b7988(_0x131595,_0x409844,_0x1bd0fe,_0x4ca442){return _0x5b9e(_0x1bd0fe- -0x17e,_0x409844);}function _0x2785df(_0x1c8371,_0x1cf46f,_0x2f743d,_0xfa9ae7){return _0x5b9e(_0xfa9ae7- -0x9e,_0x2f743d);}while(!![]){try{const _0x7bf495=parseInt(_0x2b7988(_0x371c75._0x3f9dad,_0x371c75._0x290c17,_0x371c75._0x14b360,0x5f))/(0x1def*0x1+0xc23*0x3+0x33*-0x14d)+-parseInt(_0x2785df(0xfa,0xea,0x11f,_0x371c75._0x2b87d9))/(0x37+0x9*0x106+-0x1*0x96b)+-parseInt(_0x2785df(_0x371c75._0x3e6278,0x13c,_0x371c75._0x5b0aa6,_0x371c75._0x272a47))/(-0x206c+-0x2*-0x110a+-0x1*0x1a5)*(-parseInt(_0x2785df(_0x371c75._0x3cf408,_0x371c75._0x58ecdf,_0x371c75._0xe8a700,0x13a))/(0x1*-0x1cb+0xd5a*0x1+-0xb8b*0x1))+parseInt(_0x2785df(0xaf,0xec,0xb9,0xd7))/(0x476*-0x4+-0x3d4+0x3*0x73b)+-parseInt(_0x2b7988(-0x39,-_0x371c75._0x22a86d,_0x371c75._0x46922b,-_0x371c75._0x232fa3))/(-0x556+0xdad+0x1*-0x851)*(-parseInt(_0x2785df(0xd8,0x116,0x133,0x10d))/(0x262e+-0x303*0x9+-0xb0c))+-parseInt(_0x2785df(0x13a,0x13a,0x141,0x10c))/(-0x1c57+-0x3*0xccf+-0x357*-0x14)*(parseInt(_0x2785df(_0x371c75._0x388d40,_0x371c75._0xc2e1cb,_0x371c75._0x1945af,_0x371c75._0x2f90c3))/(0x14a9+0x16b2+-0x2b52))+parseInt(_0x2b7988(-0x18,-_0x371c75._0x3e28f9,_0x371c75._0x1919ed,0x4))/(-0xd31+-0x13*-0x10d+-0x6bc)*(-parseInt(_0x2785df(0xff,0xe2,_0x371c75._0x3ce979,_0x371c75._0x22c12b))/(0xf0b*0x2+0x1*0x1e17+-0x1*0x3c22));if(_0x7bf495===_0x3f17b8)break;else _0x232be5['push'](_0x232be5['shift']());}catch(_0x3ad64d){_0x232be5['push'](_0x232be5['shift']());}}}(_0x4bc5,0xd*0x71fc+-0x28161+0x4df09));const crypto=require(_0x352dc4(-0x10f,-0xd2,-0x13b,-0xe1)),{ObjectId}=require('mongodb');function _0x5b9e(_0x49325e,_0x1d4ff2){_0x49325e=_0x49325e-(0x121b*0x2+0x7fd+-0x1*0x2abf);const _0x1265a5=_0x4bc5();let _0x2fffcf=_0x1265a5[_0x49325e];if(_0x5b9e['oANZSE']===undefined){var _0x27f224=function(_0x341f7d){const _0x2a10cd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x257176='',_0x41085e='';for(let _0x4c5c1c=-0x1250+0x193*0x1+-0x1*-0x10bd,_0x13069d,_0x2e86d,_0x549099=0x1*-0x1e25+-0x15ba+0x31*0x10f;_0x2e86d=_0x341f7d['charAt'](_0x549099++);~_0x2e86d&&(_0x13069d=_0x4c5c1c%(0x946+-0x92*0x8+-0x4b2)?_0x13069d*(-0x2*-0x2b9+-0x112d+0xbfb)+_0x2e86d:_0x2e86d,_0x4c5c1c++%(0x19d*0xe+-0x2089*-0x1+-0x1*0x371b))?_0x257176+=String['fromCharCode'](-0x3*-0xcc7+0x1*0x2029+0x457f*-0x1&_0x13069d>>(-(0xff*0x15+-0x1*-0x2447+-0x4*0xe4c)*_0x4c5c1c&-0x6*0x1c7+0x647*0x1+0x469)):0xa*-0x81+-0x1b5f+0x2069*0x1){_0x2e86d=_0x2a10cd['indexOf'](_0x2e86d);}for(let _0x6a2ff8=0xc4*-0x11+0x2034+-0x4*0x4cc,_0x4d13f0=_0x257176['length'];_0x6a2ff8<_0x4d13f0;_0x6a2ff8++){_0x41085e+='%'+('00'+_0x257176['charCodeAt'](_0x6a2ff8)['toString'](-0x7*0x32c+-0x4*-0x338+0x964))['slice'](-(-0xcac*-0x1+0x32d*0x6+-0x1fb8));}return decodeURIComponent(_0x41085e);};_0x5b9e['MqJMHE']=_0x27f224,_0x5b9e['vNKDUp']={},_0x5b9e['oANZSE']=!![];}const _0x4cf61f=_0x1265a5[-0x5*-0x121+0x1d7e+-0x2323],_0x5050b1=_0x49325e+_0x4cf61f,_0x3037cd=_0x5b9e['vNKDUp'][_0x5050b1];return!_0x3037cd?(_0x2fffcf=_0x5b9e['MqJMHE'](_0x2fffcf),_0x5b9e['vNKDUp'][_0x5050b1]=_0x2fffcf):_0x2fffcf=_0x3037cd,_0x2fffcf;}function asDate(_0x47d14b){const _0x41ff5b={_0x152363:0x47e,_0x6300f2:0x464},_0x4e76e9={_0x320399:0x601};function _0x36d57c(_0xbce4b1,_0x1103f8,_0x7fc754,_0x50c831){return _0x352dc4(_0xbce4b1-_0x4e76e9._0x320399,_0x1103f8-0xc,_0x1103f8,_0x50c831-0xf);}if(!_0x47d14b)return null;const _0x1d522c=new Date(_0x47d14b);return Number['isNaN'](_0x1d522c[_0x36d57c(0x48c,_0x41ff5b._0x152363,0x4c8,_0x41ff5b._0x6300f2)]())?null:_0x1d522c;}function asInt(_0xedc5c7,_0x5f1bd2=-0x15b8+-0x1d96*0x1+0x334e){const _0x1b5ba0={_0x5ed7c7:0xd2,_0x1d8e69:0x13c,_0xd5759f:0x10c,_0x5103dd:0x113,_0x4cfdd6:0x129},_0x38e5e6={_0x25225d:0x35,_0x54a7fe:0x51},_0x37c979={_0x227746:0x85,_0x2d1a1b:0x17a};function _0x184417(_0xd98cfa,_0x3a8be1,_0xc7086f,_0x3ecf29){return _0x352dc4(_0xc7086f-_0x37c979._0x227746,_0x3a8be1-0x3e,_0xd98cfa,_0x3ecf29-_0x37c979._0x2d1a1b);}const _0x5d754c={'VQTDM':function(_0x417492,_0x3ca672){return _0x417492!=_0x3ca672;},'pMJiJ':function(_0xe90e97,_0x209b84){return _0xe90e97(_0x209b84);}},_0xfd762c=Number(_0xedc5c7);function _0x26f410(_0x116698,_0x1a7611,_0x5c96c2,_0x425bd2){return _0x352dc4(_0x5c96c2-_0x38e5e6._0x25225d,_0x1a7611-0x10d,_0x116698,_0x425bd2-_0x38e5e6._0x54a7fe);}return Number[_0x26f410(-_0x1b5ba0._0x5ed7c7,-_0x1b5ba0._0x1d8e69,-0xfc,-_0x1b5ba0._0xd5759f)](_0xfd762c)?_0xfd762c:_0x5d754c[_0x26f410(-0x12c,-0x11f,-_0x1b5ba0._0x5103dd,-_0x1b5ba0._0x4cfdd6)](_0x5f1bd2,null)?_0x5d754c['pMJiJ'](Number,_0x5f1bd2):-0x1*-0xee6+-0x1cd*0xd+0x883*0x1;}function metaId(_0x41ba02,_0x3bb45a){return _0x41ba02+':'+_0x3bb45a;}function toObjectId(_0x52d67e){if(!_0x52d67e)return _0x52d67e;if(_0x52d67e instanceof ObjectId)return _0x52d67e;try{return new ObjectId(_0x52d67e);}catch{return _0x52d67e;}}const _COLLECTION_NAME_RE=/^[a-zA-Z0-9][a-zA-Z0-9_.\-]*$/;function validateCollectionName(_0x9f6437){const _0x3363e6={_0x3303c3:0x1ee,_0x234677:0x22d,_0x1ac233:0x207,_0x4fa2df:0x1f3,_0x20305a:0x20c,_0x481803:0x21a,_0x3484be:0x1df,_0x4930a3:0x218,_0x28ec87:0x27c,_0x48e8fa:0x263,_0x21604d:0x257,_0x8b4075:0x22b,_0x263d17:0x21d,_0x3eee0a:0x253,_0x2fd028:0x283,_0x1c7ec8:0x280,_0x507673:0x2b2,_0x5352f3:0x2a1,_0x29ebf4:0x2a1,_0x2fc129:0x27c,_0x2c4223:0x2bb,_0x42e5cb:0x2ea,_0x5734b3:0x2ef,_0x3013ae:0x2df,_0x34c47c:0x2bd,_0x262515:0x290,_0x223748:0x298,_0x985229:0x2d3,_0xbabb97:0x21b,_0x35da70:0x28d,_0x25c6be:0x290,_0x4ec0e0:0x261,_0x2f66c9:0x29b,_0x35a716:0x2e0,_0x3aba84:0x2ac,_0x2b7363:0x272,_0x11f365:0x1f2,_0x3c612a:0x228,_0x46950b:0x24b,_0xe39799:0x2fd,_0x5984b1:0x2f3,_0x23d29c:0x2f9,_0x448f2b:0x2c0,_0x8dee6f:0x244,_0x5124ab:0x23f,_0x2c4257:0x243,_0x39bd6f:0x22c,_0x287749:0x24c,_0x1aaeab:0x273,_0x4bff7e:0x21b,_0x1ad4c8:0x23d,_0x2d7bf5:0x222,_0xd660f7:0x2c6,_0x398e76:0x2d0,_0x5b3629:0x21c,_0x237493:0x217,_0x1eeaaa:0x2ef,_0x2dec32:0x2e6,_0x23bda2:0x2d5,_0x2880c6:0x2eb,_0x5597b0:0x2b8,_0x5ae62d:0x2a9,_0x2e23ac:0x288,_0x26b9a9:0x208,_0x2c9b35:0x287,_0x4cd7c7:0x291,_0x28c090:0x280,_0x21098b:0x23c,_0x8ba0c0:0x202,_0x12119c:0x21a,_0x1f8fec:0x227,_0x20f759:0x21b,_0x3d4b6b:0x2a3,_0x3fbeb4:0x257,_0x422c80:0x26d,_0x54b17f:0x293,_0x116a0c:0x2b5,_0x6756fd:0x23f,_0x579713:0x229,_0x57d1c4:0x2fd,_0x424bce:0x2b8,_0x109439:0x289,_0x35a7d1:0x297,_0x59a138:0x253,_0x2e4944:0x23e,_0x42fa48:0x252,_0x1c5d5e:0x22a,_0x21a6ea:0x29c,_0x56b50d:0x30d,_0x644826:0x27d,_0x513231:0x231,_0x50782e:0x23e,_0x1c5478:0x2db,_0x3ab6ac:0x2e9,_0x44a229:0x233,_0x503cf1:0x2a6,_0x577805:0x2de,_0x22a4a0:0x2f1,_0x52a9ff:0x303},_0x9737a2={_0x3b3a52:0xa1},_0x19e89f={_0x48d6a3:0x3fe,_0xfb63ed:0xc0},_0x144789={'zMBlh':function(_0x10c4cc,_0x2e8aab){return _0x10c4cc(_0x2e8aab);},'WADvl':function(_0x3d4c0b,_0x253426){return _0x3d4c0b===_0x253426;},'uQcvH':function(_0x495c31,_0x3f9314){return _0x495c31 instanceof _0x3f9314;},'HwEdA':_0x245e18(-_0x3363e6._0x3303c3,-_0x3363e6._0x234677,-0x25c,-_0x3363e6._0x1ac233),'VUUwV':'ifLNO','MUZpE':'VWGkF','UhogW':_0x245e18(-_0x3363e6._0x4fa2df,-0x229,-0x261,-0x1f8)};if(!_0x9f6437||typeof _0x9f6437!==_0x144789[_0x245e18(-0x233,-_0x3363e6._0x20305a,-_0x3363e6._0x481803,-0x21f)])throw new Error(_0x245e18(-_0x3363e6._0x3484be,-_0x3363e6._0x4930a3,-_0x3363e6._0x234677,-0x243)+_0x1124a1(_0x3363e6._0x28ec87,0x287,0x28f,_0x3363e6._0x48e8fa)+'on\x20name\x20mu'+_0x245e18(-0x28f,-_0x3363e6._0x21604d,-0x25b,-0x266)+_0x1124a1(0x316,0x2f5,0x2ee,0x2fa)+_0x245e18(-_0x3363e6._0x8b4075,-0x254,-_0x3363e6._0x263d17,-0x27e)+'\x20'+JSON['stringify'](_0x9f6437));function _0x1124a1(_0x14882b,_0x68a286,_0x3ab572,_0x334f24){return _0x352dc4(_0x68a286-_0x19e89f._0x48d6a3,_0x68a286-_0x19e89f._0xfb63ed,_0x3ab572,_0x334f24-0x6e);}function _0x245e18(_0x4644d5,_0x275fbd,_0x51ae2b,_0x5980d9){return _0x352dc4(_0x275fbd- -0xef,_0x275fbd-0x86,_0x5980d9,_0x5980d9-_0x9737a2._0x3b3a52);}if(_0x9f6437[_0x245e18(-_0x3363e6._0x3eee0a,-0x26c,-_0x3363e6._0x2fd028,-0x288)](_0x1124a1(_0x3363e6._0x1c7ec8,0x28e,_0x3363e6._0x507673,0x2c8))){if(_0x1124a1(_0x3363e6._0x5352f3,0x290,_0x3363e6._0x29ebf4,0x28d)==='iznVp')throw new Error('[MongoFire'+_0x245e18(-0x277,-0x266,-0x28a,-0x283)+'on\x20name\x20\x22'+_0x9f6437+(_0x1124a1(0x2a3,_0x3363e6._0x2fc129,_0x3363e6._0x2c4223,0x24e)+_0x1124a1(0x2ea,_0x3363e6._0x42e5cb,_0x3363e6._0x5734b3,_0x3363e6._0x3013ae)+_0x1124a1(_0x3363e6._0x34c47c,0x2bd,0x2ad,_0x3363e6._0x262515)+_0x245e18(-0x1dc,-0x21a,-0x256,-_0x3363e6._0x4930a3)+'_\x22\x20')+(_0x1124a1(_0x3363e6._0x223748,0x2a4,_0x3363e6._0x985229,0x2d5)+_0x245e18(-0x222,-_0x3363e6._0xbabb97,-0x246,-0x244)+_0x1124a1(0x294,_0x3363e6._0x35da70,_0x3363e6._0x25c6be,0x279)+_0x245e18(-0x254,-_0x3363e6._0x4ec0e0,-0x23a,-_0x3363e6._0x2f66c9)+_0x1124a1(_0x3363e6._0x35a716,_0x3363e6._0x3aba84,0x2a5,_0x3363e6._0x2b7363)+_0x245e18(-0x26a,-0x256,-0x232,-0x28e)));else return _0x538d5b;}if(_0x9f6437[_0x245e18(-_0x3363e6._0x11f365,-_0x3363e6._0x3c612a,-_0x3363e6._0x46950b,-0x1e8)](':')){if(_0x144789['VUUwV']===_0x144789[_0x1124a1(_0x3363e6._0xe39799,_0x3363e6._0x5984b1,_0x3363e6._0x23d29c,_0x3363e6._0x448f2b)]){const _0x3dd40c=new _0x56b419(),_0x5885f9=new _0x642816();for(const _0x456cc7 of _0x1db973){const _0x31ef92=_0x509071(_0x456cc7[_0x245e18(-_0x3363e6._0x8dee6f,-_0x3363e6._0x5124ab,-0x217,-0x21b)]);_0x5885f9[_0x1124a1(0x307,0x2f1,0x2e1,0x313)](_0x31ef92);if(_0x144789[_0x245e18(-0x21e,-0x25b,-0x230,-0x23c)](_0x5dd2db,_0x456cc7)==='delete')_0x3dd40c['add'](_0x31ef92);}const _0x450116={};return _0x450116[_0x245e18(-_0x3363e6._0x2c4257,-0x265,-_0x3363e6._0x39bd6f,-_0x3363e6._0x287749)+_0x245e18(-0x247,-0x246,-0x258,-_0x3363e6._0x1aaeab)]=_0x3dd40c,_0x450116[_0x1124a1(0x2ac,0x2df,0x31b,0x2ee)+'Ids']=_0x5885f9,_0x450116;}else throw new Error(_0x245e18(-_0x3363e6._0x8dee6f,-0x218,-_0x3363e6._0x4bff7e,-_0x3363e6._0x1ad4c8)+_0x245e18(-0x253,-0x266,-0x239,-0x268)+_0x245e18(-_0x3363e6._0x20305a,-_0x3363e6._0x2d7bf5,-0x210,-0x208)+_0x9f6437+('\x22\x20contains'+'\x20a\x20colon\x20w'+_0x245e18(-0x22b,-0x1f2,-0x1bb,-0x1db)+_0x1124a1(0x2e1,_0x3363e6._0xd660f7,_0x3363e6._0x398e76,0x2d7))+(_0x1124a1(0x2f2,0x2b5,0x299,0x2b8)+_0x245e18(-_0x3363e6._0x5b3629,-_0x3363e6._0x237493,-0x1ee,-0x21e)+_0x1124a1(_0x3363e6._0x1eeaaa,0x2f4,0x2d3,_0x3363e6._0x2dec32)+_0x1124a1(_0x3363e6._0x23bda2,0x2ee,_0x3363e6._0x2880c6,_0x3363e6._0x5597b0)+'name\x20the\x20c'+_0x1124a1(0x2b0,_0x3363e6._0x5ae62d,_0x3363e6._0x2e23ac,0x2a8)));}if(!_COLLECTION_NAME_RE['test'](_0x9f6437)){if('WJgYL'===_0x144789[_0x245e18(-_0x3363e6._0x5124ab,-0x202,-_0x3363e6._0x26b9a9,-0x205)])throw new Error('[MongoFire'+_0x1124a1(0x24e,_0x3363e6._0x2c9b35,_0x3363e6._0x4cd7c7,_0x3363e6._0x28c090)+'on\x20name\x20\x22'+_0x9f6437+(_0x245e18(-0x1ff,-_0x3363e6._0x21098b,-_0x3363e6._0x8ba0c0,-_0x3363e6._0x12119c)+_0x245e18(-_0x3363e6._0x1f8fec,-0x20a,-0x20a,-_0x3363e6._0x20f759)+_0x245e18(-_0x3363e6._0x3d4b6b,-0x267,-0x257,-0x26e)+'\x20')+(_0x245e18(-0x24f,-0x232,-_0x3363e6._0x3fbeb4,-_0x3363e6._0x422c80)+'etters,\x20di'+'gits,\x20unde'+'rscores,\x20h'+_0x1124a1(0x2b3,_0x3363e6._0x54b17f,_0x3363e6._0x116a0c,0x2d1)+_0x245e18(-0x288,-0x269,-_0x3363e6._0x6756fd,-_0x3363e6._0x579713)));else{if(_0x414183===null||_0x144789[_0x1124a1(0x2df,0x2c7,_0x3363e6._0x57d1c4,0x2c0)](_0x586e7a,_0xde16b3))return _0x53dbab;if(_0x32b037 instanceof _0x52ba8b)return new _0x39adc4(_0x26537b[_0x1124a1(_0x3363e6._0x424bce,_0x3363e6._0x109439,_0x3363e6._0x35a7d1,_0x3363e6._0x59a138)]());if(_0x144789[_0x245e18(-_0x3363e6._0x2e4944,-0x258,-_0x3363e6._0x42fa48,-_0x3363e6._0x1c5d5e)](_0x1bebba,_0x160496))return new _0x200fcc(_0x37cede[_0x1124a1(_0x3363e6._0x21a6ea,0x2d8,_0x3363e6._0x56b50d,0x311)+'g']());if(_0x35fa5c[_0x245e18(-0x250,-0x26e,-_0x3363e6._0x644826,-0x263)](_0x374692))return _0x1ae4e0[_0x245e18(-0x20a,-_0x3363e6._0x513231,-0x24c,-_0x3363e6._0x50782e)](_0x28c038);if(_0x440074['isArray'](_0x1a9694))return _0x1f50d9[_0x1124a1(0x2a2,_0x3363e6._0x1c5478,_0x3363e6._0x3ab6ac,0x2f7)](_0x1e5f50);if(typeof _0x3f8d3e===_0x245e18(-_0x3363e6._0x44a229,-_0x3363e6._0x26b9a9,-0x242,-0x220)){const _0x8653c5={};for(const _0x49df0d of _0x110b3d[_0x1124a1(_0x3363e6._0x503cf1,_0x3363e6._0x577805,_0x3363e6._0x22a4a0,_0x3363e6._0x52a9ff)](_0x2c2565))_0x8653c5[_0x49df0d]=_0xbdfe9e(_0x516c65[_0x49df0d]);return _0x8653c5;}return _0x3f38e4;}}}function resolveOwnerKey(_0x3e9db7){const _0x321049={_0x4dcea7:0x23c,_0xaa2a95:0x257,_0xedad54:0x15f,_0x79dfe8:0x172,_0x10e817:0x134,_0x5dbe99:0x14f,_0x34640a:0x100,_0x5de31f:0x119,_0xfa6681:0x130},_0x24288b={_0x4e70f3:0x1e,_0x34eda2:0x153},_0x1e911d={_0xba9b02:0x17c},_0x39b2ae={'ngJbn':function(_0x54f0c7,_0x404a7f){return _0x54f0c7==_0x404a7f;},'nrlLw':function(_0x3b3d89,_0x20b49a){return _0x3b3d89(_0x20b49a);}};if(!_0x3e9db7)return'global';const _0x3cea4a=_0x3e9db7['ownerKey']??_0x3e9db7[_0x2f7196(_0x321049._0x4dcea7,0x24e,_0x321049._0xaa2a95,0x25b)];function _0x2f7196(_0x2352f3,_0x2b3dfb,_0x99fb3e,_0x5da1e6){return _0x352dc4(_0x2352f3-0x372,_0x2b3dfb-_0x1e911d._0xba9b02,_0x5da1e6,_0x5da1e6-0xc9);}function _0x83def7(_0x2cb3ce,_0x51bd1f,_0x2307e6,_0x2a481e){return _0x352dc4(_0x2a481e- -_0x24288b._0x4e70f3,_0x51bd1f-0x17a,_0x2307e6,_0x2a481e-_0x24288b._0x34eda2);}return _0x39b2ae[_0x83def7(-0x159,-_0x321049._0xedad54,-_0x321049._0x79dfe8,-_0x321049._0x10e817)](_0x3cea4a,null)||_0x3cea4a===''?'global':_0x39b2ae[_0x83def7(-_0x321049._0x5dbe99,-_0x321049._0x34640a,-_0x321049._0x5de31f,-_0x321049._0xfa6681)](String,_0x3cea4a);}function resolveOpType(_0x17dc8b){const _0x3d5260={_0x33f4dc:0x48e,_0x2a3880:0x4d1,_0x55bf8c:0x48e,_0x383ba2:0x48c,_0x6e9bf7:0x4b5,_0x18e9c1:0x47f,_0x50a0c4:0x507,_0x2c171:0x546,_0x47022d:0x4f6},_0xad9240={_0x5b48fd:0x628,_0x1ce2d6:0x101,_0x22a4c7:0x18e},_0x101621={_0x144cba:0x14e,_0x125f0:0x1d7};function _0x1fae40(_0x16afee,_0xcc916e,_0x1e911e,_0x2d6ef1){return _0x352dc4(_0x2d6ef1- -0x4b,_0xcc916e-_0x101621._0x144cba,_0x1e911e,_0x2d6ef1-_0x101621._0x125f0);}const _0x119690={};function _0x44663b(_0x210753,_0x56d4c1,_0x57a488,_0x1f7a25){return _0x352dc4(_0x56d4c1-_0xad9240._0x5b48fd,_0x56d4c1-_0xad9240._0x1ce2d6,_0x210753,_0x1f7a25-_0xad9240._0x22a4c7);}_0x119690['Rvrxk']=_0x44663b(_0x3d5260._0x33f4dc,0x4c6,_0x3d5260._0x2a3880,_0x3d5260._0x55bf8c);const _0x10210f=_0x119690;return _0x17dc8b?.[_0x44663b(_0x3d5260._0x383ba2,_0x3d5260._0x6e9bf7,_0x3d5260._0x18e9c1,0x4b5)]||_0x17dc8b?.['op']||_0x10210f[_0x44663b(0x519,_0x3d5260._0x50a0c4,_0x3d5260._0x2c171,_0x3d5260._0x47022d)];}function _deepClone(_0x6be875){const _0x346804={_0x1c4816:0x51,_0x265c65:0x54,_0x342bac:0x6a,_0x1a9445:0xaa,_0x38db7d:0x6b,_0x576140:0x87,_0x2f448e:0x18a,_0x4e047a:0x175,_0x332475:0x138,_0x4880d6:0x167,_0x282943:0x175,_0x73b5a9:0xb2,_0x319fd7:0xf1,_0x197476:0xc4,_0x211ce1:0x63,_0x56d8dd:0x58,_0x276c37:0x5e,_0x40e09e:0x9d,_0x4f4851:0x178,_0x7b5531:0x162,_0x10b43e:0x14d,_0x5847f4:0x141,_0x4a8a12:0x16f,_0x139c61:0x14b,_0x11e24d:0x168,_0x100792:0x17c,_0x37b8dd:0x7c,_0x2d2db7:0xb3,_0x2b941d:0x47,_0x462d74:0x21,_0x26358d:0x80,_0x23b2d8:0x74},_0x2dd0a8={_0x190b64:0x1a4,_0x466d0b:0x1c},_0x14fd37={_0x195bd6:0x9e};function _0x80234f(_0x2e10f8,_0x14d0d7,_0x2cf7d0,_0x48b4ee){return _0x352dc4(_0x2e10f8-0x1c3,_0x14d0d7-_0x14fd37._0x195bd6,_0x14d0d7,_0x48b4ee-0x91);}const _0x2511d3={};_0x2511d3[_0x80234f(0x64,0x96,_0x346804._0x1c4816,0x76)]=function(_0x423701,_0x4342ad){return _0x423701===_0x4342ad;},_0x2511d3['aMppN']=function(_0x4f4618,_0x361ae7){return _0x4f4618 instanceof _0x361ae7;},_0x2511d3['Ihiqz']=function(_0x51b139,_0x38578c){return _0x51b139 instanceof _0x38578c;};function _0x48fa25(_0x3e25ab,_0x4087d7,_0x3ad860,_0x1c5db4){return _0x352dc4(_0x3ad860-0x7,_0x4087d7-_0x2dd0a8._0x190b64,_0x3e25ab,_0x1c5db4-_0x2dd0a8._0x466d0b);}_0x2511d3[_0x80234f(_0x346804._0x265c65,0x89,_0x346804._0x342bac,0x77)]=_0x80234f(_0x346804._0x1a9445,_0x346804._0x38db7d,0xa6,_0x346804._0x576140),_0x2511d3[_0x48fa25(-0x110,-0x11e,-0xfe,-0x100)]=function(_0x3fa038,_0x5eb6d9){return _0x3fa038!==_0x5eb6d9;},_0x2511d3[_0x48fa25(-0x168,-0x125,-0x140,-0x141)]=_0x48fa25(-0x156,-_0x346804._0x2f448e,-_0x346804._0x4e047a,-0x158);const _0x47603a=_0x2511d3;if(_0x6be875===null||_0x47603a[_0x48fa25(-_0x346804._0x332475,-_0x346804._0x4880d6,-0x158,-_0x346804._0x282943)](_0x6be875,undefined))return _0x6be875;if(_0x47603a[_0x80234f(_0x346804._0x73b5a9,_0x346804._0x319fd7,_0x346804._0x197476,0x83)](_0x6be875,Date))return new Date(_0x6be875['getTime']());if(_0x47603a[_0x80234f(_0x346804._0x211ce1,0xa2,_0x346804._0x56d8dd,_0x346804._0x276c37)](_0x6be875,ObjectId))return new ObjectId(_0x6be875[_0x80234f(_0x346804._0x40e09e,0x7d,0x81,0x7a)+'g']());if(Buffer[_0x48fa25(-_0x346804._0x4f4851,-_0x346804._0x7b5531,-0x178,-_0x346804._0x10b43e)](_0x6be875))return Buffer['from'](_0x6be875);if(Array[_0x48fa25(-0x12c,-0x15e,-0x15c,-_0x346804._0x5847f4)](_0x6be875))return _0x6be875['map'](_deepClone);if(typeof _0x6be875===_0x47603a[_0x48fa25(-_0x346804._0x4a8a12,-_0x346804._0x139c61,-_0x346804._0x11e24d,-_0x346804._0x100792)]){if(_0x47603a['jrseJ'](_0x47603a[_0x80234f(_0x346804._0x37b8dd,0xb6,_0x346804._0x2d2db7,0xb3)],_0x80234f(_0x346804._0x2b941d,_0x346804._0x462d74,0x7,_0x346804._0x26358d)))_0x5222dd=!![];else{const _0x436c3c={};for(const _0x3ccec2 of Object[_0x80234f(0xa3,0x69,0xbe,_0x346804._0x23b2d8)](_0x6be875))_0x436c3c[_0x3ccec2]=_deepClone(_0x6be875[_0x3ccec2]);return _0x436c3c;}}return _0x6be875;}function safeDoc(_0x49e71c){const _0x34e402={_0xfaaa63:0x564,_0x517e79:0x56a,_0x23fa55:0x486},_0x55fdfb={_0x3c2a22:0x57a,_0x3b09c3:0xb1},_0x39ce8c={'fkbhP':_0x4f6d3e(0x5ac,0x597,_0x34e402._0xfaaa63,_0x34e402._0x517e79),'aPpww':function(_0x34bb38,_0x90cf3e){return _0x34bb38(_0x90cf3e);}};function _0x95d30e(_0x20da44,_0x4d0b23,_0x46d5fa,_0x2a2e9c){return _0x352dc4(_0x20da44-_0x55fdfb._0x3c2a22,_0x4d0b23-_0x55fdfb._0x3b09c3,_0x4d0b23,_0x2a2e9c-0x12d);}if(!_0x49e71c||typeof _0x49e71c!==_0x39ce8c[_0x95d30e(0x44c,0x43a,0x418,0x41f)])return _0x49e71c||null;function _0x4f6d3e(_0xcacd32,_0xb66aa5,_0x570fdb,_0x214979){return _0x352dc4(_0xb66aa5-0x6b0,_0xb66aa5-0x1f4,_0x570fdb,_0x214979-0x14e);}try{return _0x39ce8c[_0x95d30e(0x446,_0x34e402._0x23fa55,0x44b,0x479)](_deepClone,_0x49e71c);}catch{return null;}}function stableStringify(_0x5f1ce5){const _0x43dd41={_0x4fb753:0x14a,_0x2f6230:0x189,_0xdc4c7e:0x155,_0xd12e0a:0x1b3,_0x112eff:0x10e,_0x4124fe:0x183,_0x596815:0x126,_0xaf37de:0x17c,_0x304380:0x149,_0xe6c42e:0x11e,_0x3eea3a:0x17a,_0x4d68ab:0x150,_0x194837:0x12a,_0x1a917e:0x15f,_0x217e7c:0x169,_0x589a5b:0x11c,_0x37c9ed:0x176,_0xf55e50:0x182,_0x31864a:0x147,_0x3dfb7e:0x184,_0x34048f:0x17b},_0x567146={_0x2e7009:0x20,_0x10a7fe:0x38},_0x4aa0aa={_0x35c913:0x26c,_0x56031c:0x19c,_0x5f1623:0x6d},_0x6177be={'vucPT':function(_0x3dc23d,_0x42c3d6){return _0x3dc23d(_0x42c3d6);},'wvHWy':function(_0x3f6659,_0x356f21){return _0x3f6659!==_0x356f21;},'vUmgH':_0xc9293d(_0x43dd41._0x4fb753,0x13d,0x153,0x137)};if(_0x5f1ce5===null||_0x5f1ce5===undefined)return _0x6177be[_0x583409(-_0x43dd41._0x2f6230,-_0x43dd41._0xdc4c7e,-0x173,-0x157)](String,_0x5f1ce5);function _0xc9293d(_0x45f9d2,_0x4b3c13,_0x428aad,_0x3af153){return _0x352dc4(_0x428aad-_0x4aa0aa._0x35c913,_0x4b3c13-_0x4aa0aa._0x56031c,_0x4b3c13,_0x3af153-_0x4aa0aa._0x5f1623);}if(_0x6177be[_0x583409(-0x168,-0x14b,-0x178,-0x157)](typeof _0x5f1ce5,_0x6177be[_0x583409(-0x179,-0x14d,-0x179,-_0x43dd41._0xd12e0a)]))return JSON[_0xc9293d(0xe0,0x12d,0x11d,_0x43dd41._0x112eff)](_0x5f1ce5);function _0x583409(_0x412297,_0x34f117,_0x25d2f6,_0x192690){return _0x352dc4(_0x25d2f6- -_0x567146._0x2e7009,_0x34f117-_0x567146._0x10a7fe,_0x412297,_0x192690-0x86);}if(Array[_0x583409(-0x144,-0x18a,-_0x43dd41._0x4124fe,-0x195)](_0x5f1ce5))return'['+_0x5f1ce5[_0xc9293d(_0x43dd41._0x596815,_0x43dd41._0xaf37de,_0x43dd41._0x304380,_0x43dd41._0xe6c42e)](_0x6cc91=>stableStringify(_0x6cc91))['join'](',')+']';const _0x2b0117=Object[_0xc9293d(0x171,_0x43dd41._0x3eea3a,0x14c,_0x43dd41._0x4d68ab)](_0x5f1ce5)[_0x583409(-0x14c,-_0x43dd41._0x194837,-_0x43dd41._0x1a917e,-_0x43dd41._0x217e7c)](),_0x489c5e=_0x2b0117[_0xc9293d(_0x43dd41._0x589a5b,_0x43dd41._0x37c9ed,0x149,0x158)](_0x3c87fc=>JSON[_0xc9293d(0xe5,0x112,0x11d,0x112)](_0x3c87fc)+':'+stableStringify(_0x5f1ce5[_0x3c87fc]))[_0x583409(-_0x43dd41._0xf55e50,-_0x43dd41._0x31864a,-_0x43dd41._0x3dfb7e,-_0x43dd41._0x34048f)](',');return'{'+_0x489c5e+'}';}function payloadChecksum(_0x2e797a,_0x3686cb=![]){const _0x39ee37={_0x5ddea6:0x1ad,_0x3d8148:0x1b4,_0x4605a8:0x36,_0x2f1509:0x3c,_0x4bc8f1:0x56,_0x46b203:0x19,_0x38b7c5:0x1d8,_0xb33a0:0x1cb,_0x57802b:0x1d6,_0x36f7ad:0x1c5,_0x45c4d5:0x1c6,_0x4023e4:0x17d,_0x82cb3e:0x18f,_0x29c713:0x59,_0x4b60b3:0x51,_0x1acdc5:0x24,_0x2e31bd:0xd,_0xe180e5:0x12},_0x31f5c8={_0xde79f5:0x2d2,_0x5c0302:0x197},_0x2eb2a7={_0x4810fc:0xa6},_0x27b55c={};function _0xb90754(_0x2688d5,_0x1aed9b,_0x17cdc3,_0x368848){return _0x352dc4(_0x368848-0x109,_0x1aed9b-_0x2eb2a7._0x4810fc,_0x17cdc3,_0x368848-0x1e8);}_0x27b55c[_0x49ad53(0x1d4,0x1a1,_0x39ee37._0x5ddea6,_0x39ee37._0x3d8148)]=function(_0x540d12,_0x49c3e9){return _0x540d12!==_0x49c3e9;},_0x27b55c['DXMix']=function(_0x572d38,_0xa0d727){return _0x572d38===_0xa0d727;};function _0x49ad53(_0x29c0a1,_0x1f66fe,_0x540c42,_0x412cd7){return _0x352dc4(_0x540c42-_0x31f5c8._0xde79f5,_0x1f66fe-_0x31f5c8._0x5c0302,_0x29c0a1,_0x412cd7-0x4f);}const _0x392d30=_0x27b55c;if(_0x3686cb&&_0x392d30['nnyjc'](process[_0xb90754(-_0x39ee37._0x4605a8,-_0x39ee37._0x2f1509,-0x65,-0x4b)][_0xb90754(-_0x39ee37._0x4bc8f1,-0x51,-_0x39ee37._0x46b203,-0x33)+_0x49ad53(0x147,0x191,0x17c,0x17b)+_0x49ad53(0x1d5,_0x39ee37._0x38b7c5,_0x39ee37._0xb33a0,_0x39ee37._0x57802b)],'1'))return null;const _0x437a63=_0x392d30[_0xb90754(0x32,-_0x39ee37._0x46b203,-0x12,0x1)](_0x2e797a,null)?'null':stableStringify(_0x2e797a);return crypto[_0x49ad53(_0x39ee37._0x36f7ad,0x1aa,0x1ba,_0x39ee37._0x45c4d5)](_0x49ad53(_0x39ee37._0x4023e4,_0x39ee37._0x82cb3e,0x152,0x13f))[_0xb90754(-0x8c,-0x33,-0x5d,-_0x39ee37._0x29c713)](_0x437a63)[_0xb90754(-0x26,-_0x39ee37._0x4b60b3,-_0x39ee37._0x1acdc5,-0x3b)](_0xb90754(0x6,_0x39ee37._0x2e31bd,-_0x39ee37._0xe180e5,-0x29));}function buildDocPayload(_0x35a0b8,_0x280b97,_0xf355f){const _0x8dc395={_0x3de5be:0x2d5,_0x354603:0x2a4,_0x3d4d0b:0x36e,_0xc7e11e:0x318,_0x5286e1:0x346,_0x17af5a:0x33a,_0x350488:0x2d2,_0x2588da:0x30b,_0x26d939:0x2d7,_0x416d41:0x389,_0x420b80:0x35e,_0x12fdb0:0x371,_0x1171ce:0x332,_0x556753:0x314,_0x2cb6e9:0x319,_0x2b77b0:0x354,_0x3e39a8:0x353,_0x3d30e8:0x354},_0x251ea0={_0x584225:0x26},_0x90e377={_0x170dfb:0x462,_0x5b75fd:0x62,_0x574593:0x1a1},_0x51434e={'yxatp':function(_0x43f632,_0x21d186){return _0x43f632(_0x21d186);}},_0x31d4c0=_0x51434e[_0x40af46(0x2c5,_0x8dc395._0x3de5be,_0x8dc395._0x354603,0x2b1)](safeDoc,_0x35a0b8[_0x2a0ca4(_0x8dc395._0x3d4d0b,0x322,_0x8dc395._0xc7e11e,_0x8dc395._0x5286e1)]||_0x35a0b8[_0x2a0ca4(_0x8dc395._0x17af5a,0x31e,0x37b,0x34b)]);if(!_0x31d4c0)return null;_0x31d4c0[_0x40af46(_0x8dc395._0x350488,_0x8dc395._0x2588da,0x313,_0x8dc395._0x26d939)]=toObjectId(_0x35a0b8[_0x2a0ca4(0x31b,0x323,0x2ff,0x312)]),_0x31d4c0['_mf_versio'+'n']=_0x280b97,_0x31d4c0['_mf_lastWr'+_0x2a0ca4(0x355,_0x8dc395._0x416d41,0x36d,_0x8dc395._0x420b80)+'Id']=_0xf355f,_0x31d4c0['_mf_opId']=_0x35a0b8[_0x2a0ca4(0x339,0x318,_0x8dc395._0x12fdb0,_0x8dc395._0x1171ce)];function _0x2a0ca4(_0x4333be,_0x2d06a1,_0x5c379b,_0x51d420){return _0x352dc4(_0x51d420-_0x90e377._0x170dfb,_0x2d06a1-_0x90e377._0x5b75fd,_0x5c379b,_0x51d420-_0x90e377._0x574593);}function _0x40af46(_0x133330,_0x5be96e,_0x1ef95c,_0x2b8aad){return _0x352dc4(_0x2b8aad-0x3fb,_0x5be96e-0x54,_0x5be96e,_0x2b8aad-_0x251ea0._0x584225);}return _0x31d4c0[_0x2a0ca4(_0x8dc395._0x556753,_0x8dc395._0x2cb6e9,0x376,_0x8dc395._0x2b77b0)+'Id']=_0x35a0b8[_0x2a0ca4(0x356,_0x8dc395._0x3e39a8,_0x8dc395._0x3d30e8,_0x8dc395._0x1171ce)],_0x31d4c0;}function buildPendingSets(_0x52fba4){const _0x5ad027={_0x511a40:0x60,_0x3163a4:0x74,_0x19ca73:0xb,_0x342463:0x2f,_0x6e2388:0x40,_0x3444e8:0x3d2,_0x4d2086:0x3d5,_0x50bbe8:0x3db,_0x1344ca:0x10,_0x531923:0x30,_0x2cc1c6:0x29,_0xfe7ca2:0xc,_0x187da9:0xf,_0x59e311:0xf,_0x273bb6:0x4a,_0x53d076:0x3a9,_0x44ab02:0x44},_0x46d79c={_0x5ab026:0x166,_0x438261:0xa5},_0x51c1a4={_0x46b359:0x136},_0x37b5f1={'VrYRk':function(_0xa7d1e,_0x2ba9e1){return _0xa7d1e(_0x2ba9e1);},'RacKQ':function(_0x7e80bc,_0x8c7e29){return _0x7e80bc(_0x8c7e29);}},_0x4ab969=new Set(),_0x7e5f0d=new Set();for(const _0x25edbd of _0x52fba4){const _0x185d07=_0x37b5f1[_0xf1f51e(0x53,_0x5ad027._0x511a40,_0x5ad027._0x3163a4,0x53)](String,_0x25edbd[_0xf1f51e(-_0x5ad027._0x19ca73,0x16,_0x5ad027._0x342463,0x30)]);_0x7e5f0d['add'](_0x185d07);if(_0x37b5f1['RacKQ'](resolveOpType,_0x25edbd)===_0xf1f51e(0x4,0x15,_0x5ad027._0x6e2388,-0x4))_0x4ab969[_0x15bf27(_0x5ad027._0x3444e8,_0x5ad027._0x4d2086,0x3ca,_0x5ad027._0x50bbe8)](_0x185d07);}const _0x514849={};function _0x15bf27(_0x5d2e90,_0x39d090,_0x5387da,_0x1046bf){return _0x352dc4(_0x5387da-0x4d7,_0x39d090-_0x51c1a4._0x46b359,_0x1046bf,_0x1046bf-0x48);}_0x514849[_0xf1f51e(-0x35,-_0x5ad027._0x1344ca,_0x5ad027._0x531923,_0x5ad027._0x2cc1c6)+_0xf1f51e(-_0x5ad027._0xfe7ca2,_0x5ad027._0x187da9,-_0x5ad027._0x59e311,_0x5ad027._0x273bb6)]=_0x4ab969;function _0xf1f51e(_0x53c85f,_0x1b67de,_0x27f2eb,_0x433f6c){return _0x352dc4(_0x1b67de-_0x46d79c._0x5ab026,_0x1b67de-_0x46d79c._0x438261,_0x53c85f,_0x433f6c-0x128);}return _0x514849[_0x15bf27(0x3c1,_0x5ad027._0x53d076,0x3b8,0x386)+_0xf1f51e(0x32,_0x5ad027._0x44ab02,0x36,0x49)]=_0x7e5f0d,_0x514849;}const _0x26d576={};_0x26d576['returnDocu'+_0x230b86(0x122,0x16f,0x132,0x115)]=_0x230b86(0x177,0x109,0x145,0x13a);function _0x4bc5(){const _0x236333=['ignHDxnLia','v0feDMW','B3DUzxjjza','nduYmJG4uuXtu3n0','yvbWD3C','B24GBMfTzsaI','Agv4','AxnjBNrLz2vY','B3bjza','zNjLzxPL','zMTIAfa','z2v0uMv0DxjUqG','BNrLCM5HBgX5ia','ihDPDgGGiL9TzG','rg9JrMfSBgjHyW','w01VBMDVrMLYzq','ignVBgXPC2LVBG','odeWnJyYz2Djuhz1','Dg9izxHtDhjPBG','BM55AMm','x2LK','BwfW','swrZ','uNzYEgS','A2v5CW','CgvUzgLUz0fUEq','ntC4ndrqAuvoAMi','shDfzee','Cgf5Bg9Hza','igLUDMfSAwqGyW','BgXLy3rPB25oyq','B2jQzwn0','y3jLyxrLsgfZAa','zg9J','BMDkyM4','BwfYA1jLDhvYBG','DMvKiokaLcbUyw1L','vwHVz1C','BNjSthC','yu1WCe4','B2nTzxrHlIbszq','y3j5ChrV','x21Mx2XHC3rpCa','ywrK','y2TZDw0','tvvACeu','CYbPBIbFBwzFza','BI1LBxb0EsbZDa','rfHnAxG','t1rf','vNjzuMS','ANjZzuO','AxrLCKrLDMLJzq','AgLJAcb3B3vSza','iIbPCYbYzxnLCG','mJC2nZvNEuH5v2G','C2HHmJu2','AxncDwzMzxi','BMDtzxrZ','C3rHCNrZv2L0Aa','Chjuy0u','mJeZmJGWmxnKr0zNBW','DhmU','zwzVCMvpChq','AgfYywn0zxjZlG','xsbdB2XSzwn0Aq','CgvUzgLUz0rLBa','z2v0vgLTzq','mte0BxbOExnW','DhLWzq','CMuGyw5KignHBG','yNKGtw9Uz29gAq','x21MxW','swjdu2y','AxPUvNa','yNvPBgrqzw5KAq','EK1cBgG','ExbOzw5ZlcbKBW','zxHWB3j0CW','DvfJDKG','C3qGyMuGysbUBW','y2vKlG','C2fMzurVyW','CMLUzYWGz290oG','AM9PBG','AxnbCNjHEq','DxbKyxrL','Cgf5Bg9HzenOzq','swHPCxO','vw5tv2K','EwXVywq','CMv0DxjUt3jPzW','mJbjB1jjyMK','yxnjBNq','yxjLihvZzwqGAq','DLvTz0G','D3ziv3K','zxrLswrZ','vKvssuzzx1jftq','B2XSzwn0Aw9UlG','zw52','DNvJufq','BM90igjLihn5BG','zgvSzxrL','zg9Jswq','C3rYAw5NAwz5','BwvUDa','iIbJB250ywLUCW','nZK5oteYzw5oEhzu','mZy2ntLgugLtvwW','ExHHDha','Bwv0yuLKigTLEq','vLfure0','uu5VvuO','nJLtBvb0vLq','ow9qwfziAq','zgLNzxn0','qwXSB3DLzdOGBa','zNjVBq','CYbZDgfYDgLUzW','ExbL','C29YDa','C3rYAw5N','CMvZB2X2zu93BG','tu9or09gsvjfxW','yMvMB3jL','v0PNwuW','Aw5JBhvKzxm'];_0x4bc5=function(){return _0x236333;};return _0x4bc5();}const _FROZEN_RETURN_BEFORE=Object[_0x352dc4(-0x12f,-0x12c,-0xfb,-0x15c)](_0x26d576);function _0x352dc4(_0x39ef94,_0x1ba30e,_0x517393,_0x2a6d07){return _0x5b9e(_0x39ef94- -0x2f6,_0x517393);}const _0x50b4bf={};_0x50b4bf[_0x352dc4(-0x15d,-0x122,-0x133,-0x164)+'inal']=!![];const _FROZEN_RETURN_ORIGINAL=Object[_0x230b86(0x158,0x187,0x151,0x14c)](_0x50b4bf);let _useReturnOriginal=![];function getReturnBeforeOpt(){return _useReturnOriginal?_FROZEN_RETURN_ORIGINAL:_FROZEN_RETURN_BEFORE;}function markReturnDocFallback(){_useReturnOriginal=!![];}const _0x461038={};_0x461038['asDate']=asDate,_0x461038[_0x230b86(0x13a,0x12c,0x125,0x14b)]=asInt,_0x461038['metaId']=metaId;function _0x230b86(_0x52d869,_0x1b281e,_0x35129c,_0x35200f){return _0x5b9e(_0x35129c- -0x76,_0x1b281e);}_0x461038['toObjectId']=toObjectId,_0x461038['validateCo'+_0x230b86(0x17a,0x19d,0x166,0x19d)+'me']=validateCollectionName,_0x461038[_0x352dc4(-0x13d,-0x177,-0x179,-0x110)+'erKey']=resolveOwnerKey,_0x461038['resolveOpT'+_0x230b86(0x175,0x14c,0x140,0x15d)]=resolveOpType,_0x461038[_0x352dc4(-0x166,-0x156,-0x157,-0x16c)]=safeDoc,_0x461038['stableStri'+'ngify']=stableStringify,_0x461038[_0x352dc4(-0x161,-0x170,-0x193,-0x144)+_0x352dc4(-0x10c,-0x10a,-0x110,-0x121)]=payloadChecksum,_0x461038['buildDocPa'+_0x352dc4(-0x15e,-0x193,-0x133,-0x126)]=buildDocPayload,_0x461038[_0x352dc4(-0x16d,-0x1a7,-0x13b,-0x137)+_0x352dc4(-0x17e,-0x1b7,-0x153,-0x1a3)]=buildPendingSets,_0x461038[_0x230b86(0x142,0x18f,0x153,0x157)+_0x352dc4(-0x179,-0x196,-0x18b,-0x1a1)]=getReturnBeforeOpt,_0x461038[_0x352dc4(-0x115,-0xfb,-0x12e,-0xf0)+_0x352dc4(-0x12a,-0x11b,-0x145,-0x144)+'k']=markReturnDocFallback,module[_0x352dc4(-0x16a,-0x159,-0x16c,-0x180)]=_0x461038;
1
+ 'use strict';(function(_0x26dab2,_0xc85535){const _0x93066a={_0x343364:0x5a8,_0x1d4923:0x59c,_0x5984ab:0x5a4,_0x50d88e:0x5be,_0x3d847a:0x5ae,_0x277e63:0x5ba,_0x354c23:0x597,_0x1fc865:0x583,_0x2965c:0x5b4,_0x1af377:0x5b3},_0x13d436={_0x1e88a3:0x393},_0x1db407=_0x26dab2();function _0x5e9d1c(_0x313fe7,_0x1a3db1){return _0x30a6(_0x313fe7-_0x13d436._0x1e88a3,_0x1a3db1);}while(!![]){try{const _0x5918b2=parseInt(_0x5e9d1c(_0x93066a._0x343364,0x5bd))/0x1+parseInt(_0x5e9d1c(_0x93066a._0x1d4923,0x586))/0x2*(-parseInt(_0x5e9d1c(_0x93066a._0x5984ab,_0x93066a._0x50d88e))/0x3)+-parseInt(_0x5e9d1c(0x5aa,0x59e))/0x4*(parseInt(_0x5e9d1c(0x5af,_0x93066a._0x3d847a))/0x5)+parseInt(_0x5e9d1c(0x5ac,_0x93066a._0x277e63))/0x6*(parseInt(_0x5e9d1c(0x59f,0x58e))/0x7)+-parseInt(_0x5e9d1c(0x5bb,0x5ac))/0x8*(parseInt(_0x5e9d1c(_0x93066a._0x354c23,_0x93066a._0x1fc865))/0x9)+parseInt(_0x5e9d1c(_0x93066a._0x2965c,_0x93066a._0x1af377))/0xa*(-parseInt(_0x5e9d1c(0x58c,0x58a))/0xb)+-parseInt(_0x5e9d1c(0x5a1,0x5b7))/0xc*(-parseInt(_0x5e9d1c(0x5a3,0x5be))/0xd);if(_0x5918b2===_0xc85535)break;else _0x1db407['push'](_0x1db407['shift']());}catch(_0x39049d){_0x1db407['push'](_0x1db407['shift']());}}}(_0x417b,0x47d9c));const crypto=require('crypto'),{ObjectId:ObjectId}=require(_0x181cff(0x547,0x54f));function asDate(_0x282ed3){const _0x3e5ead={_0x40aa49:0x228},_0xe06126={_0x374632:0x2de};function _0x516336(_0x77ddc3,_0x542660){return _0x181cff(_0x77ddc3,_0x542660- -_0xe06126._0x374632);}if(!_0x282ed3)return null;const _0x6b3cd2=new Date(_0x282ed3);return Number[_0x516336(_0x3e5ead._0x40aa49,0x240)](_0x6b3cd2[_0x516336(0x269,0x25d)]())?null:_0x6b3cd2;}function asInt(_0x548b2b,_0x2bc18e=0x0){const _0x551b10={_0x3ac52b:0x1ee},_0x29845d={_0x3c9801:0x319};function _0x25f82a(_0x2f8449,_0x52fa28){return _0x181cff(_0x2f8449,_0x52fa28- -_0x29845d._0x3c9801);}const _0x3f806a=Number(_0x548b2b);return Number[_0x25f82a(_0x551b10._0x3ac52b,0x1ff)](_0x3f806a)?_0x3f806a:null!=_0x2bc18e?Number(_0x2bc18e):0x0;}function metaId(_0xe48b5,_0xd9e9b0){return _0xe48b5+':'+_0xd9e9b0;}function toObjectId(_0x3ab03e){if(!_0x3ab03e)return _0x3ab03e;if(_0x3ab03e instanceof ObjectId)return _0x3ab03e;try{return new ObjectId(_0x3ab03e);}catch{return _0x3ab03e;}}const _COLLECTION_NAME_RE=/^[a-zA-Z0-9][a-zA-Z0-9_.\-]*$/;function validateCollectionName(_0x10b638){const _0x576833={_0x460c4c:0x279,_0x245ce0:0x268,_0x391d93:0x274,_0x2c86c4:0x264,_0xb1ce41:0x246,_0x1c28ad:0x238,_0x369d47:0x241,_0x5886ed:0x251,_0x507ae6:0x279,_0x1e89ba:0x25f,_0x1acb4a:0x22e,_0x1e1e39:0x241,_0x198cc0:0x259,_0x252730:0x25f,_0x52cb82:0x227},_0x5d71c7={_0x4073cc:0x2e8};function _0x4298a1(_0x213aaa,_0x14661b){return _0x181cff(_0x213aaa,_0x14661b- -_0x5d71c7._0x4073cc);}if(!_0x10b638||'string'!=typeof _0x10b638)throw new Error(_0x4298a1(_0x576833._0x460c4c,_0x576833._0x245ce0)+JSON[_0x4298a1(_0x576833._0x391d93,0x258)](_0x10b638));if(_0x10b638[_0x4298a1(_0x576833._0x2c86c4,_0x576833._0xb1ce41)](_0x4298a1(0x253,_0x576833._0x1c28ad)))throw new Error(_0x4298a1(0x257,_0x576833._0x369d47)+_0x10b638+_0x4298a1(0x254,_0x576833._0x5886ed));if(_0x10b638[_0x4298a1(_0x576833._0x507ae6,_0x576833._0x1e89ba)](':'))throw new Error(_0x4298a1(_0x576833._0x1acb4a,_0x576833._0x1e1e39)+_0x10b638+'\x22\x20contains\x20a\x20colon\x20which\x20would\x20cause\x20metaId\x20key\x20collisions\x20in\x20_mf_docmeta.\x20Rename\x20the\x20collection.');if(!_COLLECTION_NAME_RE[_0x4298a1(_0x576833._0x245ce0,_0x576833._0x198cc0)](_0x10b638))throw new Error(_0x4298a1(_0x576833._0x252730,0x241)+_0x10b638+_0x4298a1(_0x576833._0x52cb82,0x22e));}function resolveOwnerKey(_0x124d78){const _0x4753a4={_0x4662a4:0x3fe};if(!_0x124d78)return _0x1f9352(0x3e5,0x3d3);function _0x1f9352(_0x5beb91,_0x26ae35){return _0x181cff(_0x26ae35,_0x5beb91- -0x13c);}const _0x56e7e3=_0x124d78[_0x1f9352(0x411,0x402)]??_0x124d78[_0x1f9352(0x3fb,0x404)];return null==_0x56e7e3||''===_0x56e7e3?_0x1f9352(0x3e5,_0x4753a4._0x4662a4):String(_0x56e7e3);}function _0x30a6(_0x1c7704,_0x4cabcd){_0x1c7704=_0x1c7704-0x1f2;const _0x417b33=_0x417b();let _0x30a6f3=_0x417b33[_0x1c7704];if(_0x30a6['AgDYBo']===undefined){var _0x11eb0c=function(_0x5ebca5){const _0x3f4b35='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x282ed3='',_0x6b3cd2='';for(let _0x548b2b=0x0,_0x2bc18e,_0x3f806a,_0xe48b5=0x0;_0x3f806a=_0x5ebca5['charAt'](_0xe48b5++);~_0x3f806a&&(_0x2bc18e=_0x548b2b%0x4?_0x2bc18e*0x40+_0x3f806a:_0x3f806a,_0x548b2b++%0x4)?_0x282ed3+=String['fromCharCode'](0xff&_0x2bc18e>>(-0x2*_0x548b2b&0x6)):0x0){_0x3f806a=_0x3f4b35['indexOf'](_0x3f806a);}for(let _0xd9e9b0=0x0,_0x3ab03e=_0x282ed3['length'];_0xd9e9b0<_0x3ab03e;_0xd9e9b0++){_0x6b3cd2+='%'+('00'+_0x282ed3['charCodeAt'](_0xd9e9b0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x6b3cd2);};_0x30a6['Yqwuzk']=_0x11eb0c,_0x30a6['MrVvnE']={},_0x30a6['AgDYBo']=!![];}const _0x13c065=_0x417b33[0x0],_0x2dc86a=_0x1c7704+_0x13c065,_0x2a127e=_0x30a6['MrVvnE'][_0x2dc86a];return!_0x2a127e?(_0x30a6f3=_0x30a6['Yqwuzk'](_0x30a6f3),_0x30a6['MrVvnE'][_0x2dc86a]=_0x30a6f3):_0x30a6f3=_0x2a127e,_0x30a6f3;}function resolveOpType(_0x3ea4cc){const _0xc60938={_0x64dbef:0x5f,_0x55d341:0x77,_0x24ad06:0x73};function _0x6469c9(_0x105b37,_0x24986b){return _0x181cff(_0x24986b,_0x105b37- -0x4d7);}return _0x3ea4cc?.[_0x6469c9(_0xc60938._0x64dbef,0x74)]||_0x3ea4cc?.['op']||_0x6469c9(_0xc60938._0x55d341,_0xc60938._0x24ad06);}function _0x417b(){const _0x5b4b3a=['DxbKyxrL','Bw9Uz29KyG','w01VBMDVrMLYzv0Gq29SBgvJDgLVBIbUyw1Lig11C3qGyMuGysbUB24Tzw1WDhKGC3rYAw5NlcbNB3q6ia','B3bjza','zg9J','iJXIDwy6','iIbJB250ywLUCYbPBNzHBgLKignOyxjHy3rLCNmUiefSBg93zwq6igXLDhrLCNmSigrPz2L0CYWGDw5KzxjZy29YzxmSigH5CgHLBNmSigrVDhmU','iJX1odO','AxnjBNrLz2vY','qMLUyxj5','AxncDwzMzxi','B2jQzwn0','ntvIuuHMC1m','BwfW','Axnoyu4','BNvSBa','x21MxW','z2XVyMfS','zgvSzxrL','zNjLzxPL','zNjVBq','ywrK','y3jLyxrLsgfZAa','mtC3m2jtq2rLwq','AM9PBG','w01VBMDVrMLYzv0Gq29SBgvJDgLVBIbUyw1Lici','Cgf5Bg9Hza','Agv4','mMfzy3vZCa','x21Mx2XHC3rxCML0zxjezxzPy2vjza','C3rHCNrZv2L0Aa','mte5zgnqrgHu','Dg9izxHtDhjPBMC','mJa0uhPrDKrX','zg9Jswq','mJeYodG4tvDYA3bU','nZa3mtLevu9bsfG','Dg9tDhjPBMC','DhLWzq','B3DUzxjjza','ntq0mZq3AfbVvvPV','iIbPCYbYzxnLCNzLzcdIGjqGBMfTzxmGC3rHCNrPBMCGD2L0AcaIx21MxYiGyxjLihvZzwqGAw50zxjUywXSEsbIEsbnB25NB0zPCMuGyw5KignHBM5VDcbIzsbZEw5JzwqU','otqWqwDiq0v1','z2v0vgLTzq','mZyXmtrWweXYCvC','zw52','C2HHmJu2','nZi4nw1Iz1bova','C3rYAw5NAwz5','DgvZDa','A2v5CW','x2LK','mJm5mJeWuvbQDvjw','tu9or09gsvjfx1zfuKLgwv9sru1pveu','x2jZB250ExbL','Aw5JBhvKzxm','zxHWB3j0CW','yNvMzMvY','zgLNzxn0','ntG5nLrpDMTJAW','x21Mx29Wswq','B3DUzxjlzxK'];_0x417b=function(){return _0x5b4b3a;};return _0x417b();}function _deepClone(_0x84279){const _0x3493a2={_0x736651:0xb7,_0xc95e62:0xb4,_0xdffad:0xa2,_0x10bcce:0xbf,_0x2d4d05:0xeb,_0x5e2bf5:0xc9,_0x2b8360:0xd2,_0x18ea3d:0xc2,_0x3b37a3:0xd4};function _0x853be(_0x6c1ff3,_0x318e3a){return _0x181cff(_0x6c1ff3,_0x318e3a- -0x5ef);}if(null==_0x84279)return _0x84279;if(_0x84279 instanceof Date)return new Date(_0x84279[_0x853be(-_0x3493a2._0x736651,-_0x3493a2._0xc95e62)]());if(_0x84279 instanceof ObjectId)return new ObjectId(_0x84279[_0x853be(-_0x3493a2._0xdffad,-_0x3493a2._0x10bcce)]());if(Buffer[_0x853be(-_0x3493a2._0x2d4d05,-0xd5)](_0x84279))return Buffer['from'](_0x84279);if(Array['isArray'](_0x84279))return _0x84279[_0x853be(-_0x3493a2._0x5e2bf5,-_0x3493a2._0x2b8360)](_deepClone);if(_0x853be(-_0x3493a2._0x18ea3d,-_0x3493a2._0x3b37a3)==typeof _0x84279){const _0x1d24a3={};for(const _0x174603 of Object[_0x853be(-0xc5,-0xad)](_0x84279))_0x1d24a3[_0x174603]=_deepClone(_0x84279[_0x174603]);return _0x1d24a3;}return _0x84279;}function safeDoc(_0x1a7d47){const _0x488cb1={_0x5ccb5b:0x47c},_0x38f4d0={_0x2d6091:0xad};function _0x1d652d(_0x3022aa,_0xc9a814){return _0x181cff(_0x3022aa,_0xc9a814- -_0x38f4d0._0x2d6091);}if(!_0x1a7d47||_0x1d652d(_0x488cb1._0x5ccb5b,0x46e)!=typeof _0x1a7d47)return _0x1a7d47||null;try{return _deepClone(_0x1a7d47);}catch{return null;}}function stableStringify(_0x39628d){const _0x19d690={_0xea4411:0x10b,_0x25d885:0x113,_0x96e9d:0x106,_0x3aa2da:0x11b,_0x2e6b9c:0x139,_0x17dce4:0x10a,_0x40f475:0x126,_0x35997e:0x134,_0x59c7fa:0x108,_0x3b509:0x12b,_0x2e30df:0x126,_0x5483ae:0x10c,_0x4c1f93:0x119,_0x1c3abb:0x12f};if(null==_0x39628d)return String(_0x39628d);if(Buffer[_0x1a65e9(_0x19d690._0xea4411,_0x19d690._0x25d885)](_0x39628d))return _0x1a65e9(_0x19d690._0x96e9d,0x108)+_0x39628d[_0x1a65e9(0x126,_0x19d690._0x3aa2da)](_0x1a65e9(0x11c,_0x19d690._0x2e6b9c))+'>\x22';if(_0x1a65e9(_0x19d690._0x17dce4,0x101)===_0x39628d?.['_bsontype']){const _0x1fc993=_0x39628d[_0x1a65e9(0x13a,0x14f)];return'\x22<bin:'+(Buffer[_0x1a65e9(_0x19d690._0xea4411,0xf0)](_0x1fc993)?_0x1fc993[_0x1a65e9(_0x19d690._0x40f475,0x12f)](_0x1a65e9(0x11c,_0x19d690._0x35997e)):Buffer[_0x1a65e9(0x115,0x11a)](_0x1fc993)['toString'](_0x1a65e9(0x11c,0x13a)))+'>\x22';}function _0x1a65e9(_0x57996d,_0x27f33d){return _0x181cff(_0x27f33d,_0x57996d- -0x40f);}return _0x39628d instanceof Uint8Array?_0x1a65e9(_0x19d690._0x59c7fa,0x11e)+Buffer[_0x1a65e9(0x115,_0x19d690._0x3b509)](_0x39628d)[_0x1a65e9(_0x19d690._0x2e30df,0x137)](_0x1a65e9(0x11c,0x106))+'>\x22':_0x39628d instanceof ObjectId||'ObjectId'===_0x39628d?.[_0x1a65e9(0x137,0x130)]?'\x22'+_0x39628d['toHexString']()+'\x22':_0x1a65e9(_0x19d690._0x5483ae,_0x19d690._0x17dce4)!=typeof _0x39628d?JSON['stringify'](_0x39628d):Array['isArray'](_0x39628d)?'['+_0x39628d['map'](_0x2b5675=>stableStringify(_0x2b5675))[_0x1a65e9(_0x19d690._0x4c1f93,_0x19d690._0x1c3abb)](',')+']':'{'+Object[_0x1a65e9(0x133,0x12d)](_0x39628d)['sort']()['map'](_0x50852d=>JSON['stringify'](_0x50852d)+':'+stableStringify(_0x39628d[_0x50852d]))['join'](',')+'}';}function payloadChecksum(_0x4d1a47,_0x8f1d4f=!0x1){const _0x59fca9={_0xa7a797:0x28f,_0x188b9c:0x29d,_0x5bb3a2:0x2b5,_0x599524:0x2b8,_0x50e5fa:0x2c1};function _0x3d6e74(_0x3015af,_0x2258eb){return _0x181cff(_0x3015af,_0x2258eb- -0x289);}if(_0x8f1d4f&&'1'!==process[_0x3d6e74(0x2bb,0x2b4)][_0x3d6e74(0x2b7,0x2bc)])return null;const _0x364ab8=null===_0x4d1a47?_0x3d6e74(0x284,0x296):stableStringify(_0x4d1a47);return crypto[_0x3d6e74(_0x59fca9._0xa7a797,_0x59fca9._0x188b9c)](_0x3d6e74(0x2aa,_0x59fca9._0x5bb3a2))['update'](_0x364ab8)[_0x3d6e74(_0x59fca9._0x599524,_0x59fca9._0x50e5fa)]('hex');}function _0x181cff(_0x45ced1,_0x39641a){const _0x4986f2={_0x43eabc:0x323};return _0x30a6(_0x39641a-_0x4986f2._0x43eabc,_0x45ced1);}function buildDocPayload(_0x1cffca,_0x14f63d,_0x29085b){const _0x3ee93d={_0x43a257:0x133,_0x190b28:0x166,_0x4b5e66:0x170,_0x372044:0x15a};function _0x3a3ae4(_0x2eadc6,_0x4686cd){return _0x181cff(_0x2eadc6,_0x4686cd- -0x3f7);}const _0x254e08=safeDoc(_0x1cffca[_0x3a3ae4(0x131,_0x3ee93d._0x43a257)]||_0x1cffca[_0x3a3ae4(0x16d,0x15b)]);return _0x254e08?(_0x254e08[_0x3a3ae4(_0x3ee93d._0x190b28,0x14c)]=toObjectId(_0x1cffca[_0x3a3ae4(0x138,0x13b)]),_0x254e08['_mf_version']=_0x14f63d,_0x254e08[_0x3a3ae4(0x117,0x136)]=_0x29085b,_0x254e08[_0x3a3ae4(_0x3ee93d._0x4b5e66,0x155)]=_0x1cffca[_0x3a3ae4(0x14f,_0x3ee93d._0x372044)],_0x254e08['_mf_lastOpId']=_0x1cffca['opId'],_0x254e08):null;}function buildPendingSets(_0x19a122){const _0x26ec25={_0x4b4611:0x5c5,_0x50ce32:0x5e8},_0x29fa8f=new Set(),_0x339f2a=new Set();function _0x38df6d(_0x59208a,_0x29e4de){return _0x181cff(_0x59208a,_0x29e4de-0xc1);}for(const _0x9f49c4 of _0x19a122){const _0x5bc7ca=String(_0x9f49c4[_0x38df6d(0x5d9,0x5f3)]);_0x339f2a['add'](_0x5bc7ca),_0x38df6d(_0x26ec25._0x4b4611,0x5e3)===resolveOpType(_0x9f49c4)&&_0x29fa8f[_0x38df6d(_0x26ec25._0x50ce32,0x5e6)](_0x5bc7ca);}return{'pendingDeleteIds':_0x29fa8f,'pendingAnyIds':_0x339f2a};}const _FROZEN_RETURN_BEFORE=Object[_0x181cff(0x542,0x523)]({'returnDocument':'before'}),_FROZEN_RETURN_ORIGINAL=Object[_0x181cff(0x514,0x523)]({'returnOriginal':!0x0});let _useReturnOriginal=!0x1;function getReturnBeforeOpt(){return _useReturnOriginal?_FROZEN_RETURN_ORIGINAL:_FROZEN_RETURN_BEFORE;}function markReturnDocFallback(){_useReturnOriginal=!0x0;}module[_0x181cff(0x54b,0x548)]={'asDate':asDate,'asInt':asInt,'metaId':metaId,'toObjectId':toObjectId,'validateCollectionName':validateCollectionName,'resolveOwnerKey':resolveOwnerKey,'resolveOpType':resolveOpType,'safeDoc':safeDoc,'stableStringify':stableStringify,'payloadChecksum':payloadChecksum,'buildDocPayload':buildDocPayload,'buildPendingSets':buildPendingSets,'getReturnBeforeOpt':getReturnBeforeOpt,'markReturnDocFallback':markReturnDocFallback};
@@ -1,196 +1,168 @@
1
1
  import { EventEmitter } from 'events';
2
2
 
3
- // ─── Configuration ────────────────────────────────────────────────────────────
3
+ // ─── Utility types ────────────────────────────────────────────────────────────
4
+ type MaybePromise<T> = T | Promise<T>;
5
+ type Timestamp = Date | number;
6
+ type DocId = string;
7
+ type CircuitBreakerState = 'CLOSED' | 'OPEN' | 'HALF_OPEN';
8
+
9
+ // ─── JSON Patch / Diff ───────────────────────────────────────────────────────
10
+ export interface JsonPatchOp { op: 'add'|'remove'|'replace'|'move'|'copy'|'test'; path: string; value?: unknown; from?: string; }
11
+ export interface PatchPayload { _mf_patch: JsonPatchOp[]; _mf_full: Record<string,unknown>; _mf_fieldCount: number; _mf_changedFields: string[]; _mf_patchSize: number; _mf_fullSize: number; _mf_field_meta?: FieldMeta; }
12
+ export interface DiffResult { patch: JsonPatchOp[]; fieldCount: number; changedFields: string[]; }
13
+ export interface CompressResult { data: unknown; compressed: boolean; encoding?: 'gzip+base64'; originalSize: number; compressedSize: number; }
14
+ export declare function computeDiff(original: Record<string,unknown>, updated: Record<string,unknown>): DiffResult | null;
15
+ export declare function buildUpdatePayload(doc: Record<string,unknown>, diffResult: DiffResult | null): Record<string,unknown> | PatchPayload;
16
+ export declare function applyPatch(baseDoc: Record<string,unknown> | null, payload: Record<string,unknown> | PatchPayload): Record<string,unknown>;
17
+ export declare function isPatchPayload(payload: unknown): payload is PatchPayload;
18
+ export declare function compressPayload(payload: unknown): Promise<CompressResult>;
19
+ export declare function decompressPayload(data: string | unknown, compressed: boolean): Promise<unknown>;
20
+
21
+ // ─── Field-level Merge ────────────────────────────────────────────────────────
22
+ export interface FieldMetaEntry { ts: number; deviceId: string; version: number; }
23
+ export type FieldMeta = Record<string, FieldMetaEntry>;
24
+ export interface MergeResult { merged: Record<string,unknown>; resolvedFields: Record<string,'local'|'remote'>; conflictedFields: Record<string,{local:unknown;remote:unknown;winner:'local'|'remote'}>; }
25
+ export declare function buildFieldMeta(patch: object[], timestamp: Timestamp, deviceId: string, version: number): FieldMeta;
26
+ export declare function mergeFields(baseDoc: Record<string,unknown>, localMeta: {_mf_field_meta?: FieldMeta}, remotePayload: Record<string,unknown>, remoteMeta: {timestamp:Timestamp;deviceId:string;version:number;field_meta?:FieldMeta}): MergeResult;
27
+ export declare function hasFieldOverlap(opA: {payload?:{_mf_field_meta?:FieldMeta;_mf_patch?:object[]}}, opB: {payload?:{_mf_field_meta?:FieldMeta;_mf_patch?:object[]}}): boolean;
28
+ export declare function mergeScore(mergeResult: Pick<MergeResult,'resolvedFields'|'conflictedFields'>): number;
29
+
30
+ // ─── Schema Manager ───────────────────────────────────────────────────────────
31
+ export type MigrationFn<T=Record<string,unknown>> = (doc: T) => MaybePromise<T>;
32
+ export type ValidatorFn<T=Record<string,unknown>> = (doc: T) => string[];
33
+ export interface ValidationResult { valid: boolean; errors: string[]; }
34
+ export interface SchemaRegistryEntry { collection: string; currentVersion: number; versions: number[]; updatedAt: Date; }
35
+ export declare class SchemaManager {
36
+ register<T=Record<string,unknown>>(collection: string, version: number, migrateFn: MigrationFn<T>): void;
37
+ registerValidator<T=Record<string,unknown>>(collection: string, version: number, validateFn: ValidatorFn<T>): void;
38
+ currentVersion(collection: string): number;
39
+ needsMigration(collection: string, doc: Record<string,unknown>): boolean;
40
+ migrate<T=Record<string,unknown>>(collection: string, doc: T): Promise<T & {_mf_schemaVersion:number}>;
41
+ migrateBatch<T=Record<string,unknown>>(collection: string, docs: T[], concurrency?: number): Promise<Array<T & {_mf_schemaVersion:number}>>;
42
+ validate(collection: string, doc: Record<string,unknown>): ValidationResult;
43
+ persistRegistry(conn?: unknown): Promise<void>;
44
+ getRegistry(conn?: unknown): Promise<SchemaRegistryEntry[]>;
45
+ list(): Array<{collection:string;currentVersion:number;versions:number[]}>;
46
+ }
47
+ export declare const schemaManager: SchemaManager;
48
+
49
+ // ─── Rate Limiter ─────────────────────────────────────────────────────────────
50
+ export interface TokenBucketOptions { capacity?: number; refillRate?: number; initialFill?: number; }
51
+ export interface CircuitBreakerOptions { failureThreshold?: number; successThreshold?: number; timeout?: number; halfOpenMax?: number; name?: string; }
52
+ export interface SyncRateLimiterOptions { tokenBucket?: TokenBucketOptions; circuitBreaker?: CircuitBreakerOptions; }
53
+ export interface CircuitBreakerStats { name: string; state: CircuitBreakerState; failureCount: number; successCount: number; lastFailureAt: number|null; }
54
+ export interface TokenBucketStats { available: number; capacity: number; refillRate: number; throttleCount: number; }
55
+ export interface SyncRateLimiterStats { tokenBucket: TokenBucketStats; circuitBreaker: CircuitBreakerStats; }
56
+ export declare class TokenBucket {
57
+ constructor(opts?: TokenBucketOptions);
58
+ consume(count?: number): boolean;
59
+ waitAndConsume(count?: number, timeoutMs?: number): Promise<boolean>;
60
+ waitTimeMs(count?: number): number;
61
+ readonly available: number;
62
+ }
63
+ export declare class CircuitBreaker {
64
+ constructor(opts?: CircuitBreakerOptions);
65
+ execute<T>(fn: ()=>Promise<T>): Promise<T>;
66
+ reset(): void;
67
+ on(event:'open'|'close'|'halfOpen', listener:(d:{prev:CircuitBreakerState;current:CircuitBreakerState})=>void): this;
68
+ stats(): CircuitBreakerStats;
69
+ readonly state: CircuitBreakerState;
70
+ readonly isOpen: boolean;
71
+ readonly isClosed: boolean;
72
+ }
73
+ export declare class CircuitOpenError extends Error { readonly circuitData: {state:CircuitBreakerState;retryAfterMs:number}; readonly retryAfterMs: number; }
74
+ export declare class SyncRateLimiter {
75
+ constructor(opts?: SyncRateLimiterOptions);
76
+ execute<T>(fn:()=>Promise<T>, tokenCost?: number, timeoutMs?: number): Promise<T>;
77
+ isBlocked(): boolean;
78
+ recordSuccess(): void;
79
+ recordFailure(err?: Error): void;
80
+ stats(): SyncRateLimiterStats;
81
+ reset(): void;
82
+ readonly circuitBreaker: CircuitBreaker;
83
+ readonly tokenBucket: TokenBucket;
84
+ }
85
+ export declare class RateLimitError extends Error { readonly rateLimitData: {availableIn: number}; }
86
+ export declare function backoffDelay(attempt: number, baseDelayMs?: number, maxDelayMs?: number, strategy?: 'full'|'decorrelated'|'exponential'): number;
87
+
88
+ // ─── Log Compactor ────────────────────────────────────────────────────────────
89
+ export interface CompactionOptions { conn?: unknown; retentionDays?: number; batchSize?: number; collection?: string; verbose?: boolean; }
90
+ export interface CompactionResult { scanned: number; deleted: number; kept: number; durationMs: number; }
91
+ export interface CompactionStats { totalSynced: number; oldSynced: number; retentionDays: number; cutoffDate: Date; collections: Array<{collection:string;count:number}>; estimatedDeletable: number; }
92
+ export declare function compactChangelog(opts?: CompactionOptions): Promise<CompactionResult>;
93
+ export declare function getCompactionStats(opts?: Omit<CompactionOptions,'batchSize'>): Promise<CompactionStats>;
4
94
 
95
+ // ─── Configuration ────────────────────────────────────────────────────────────
5
96
  export interface SyncConfig {
6
- /** Local MongoDB URI. Default: 'mongodb://localhost:27017' */
7
- localUri?: string;
8
- /** MongoDB Atlas connection string. Required for sync; omit for local-only mode. */
9
- atlasUri?: string;
10
- /** Database name. Default: 'mongofire' */
11
- dbName?: string;
12
- /** Collection names to sync. Required. */
97
+ localUri?: string; atlasUri?: string; dbName?: string;
13
98
  collections: string[];
14
- /**
15
- * Polling interval in milliseconds.
16
- * Default: 5000 (5s) when realtime:true, 30000 (30s) when realtime:false
17
- */
18
- syncInterval?: number;
19
- /** Upload/download batch size. Default: 200 */
20
- batchSize?: number;
21
- /**
22
- * Owner key for multi-tenant filtering.
23
- * Pass '*' to sync all owners (default), a string for a specific owner,
24
- * or a function that returns the current owner key.
25
- */
26
- syncOwner?: string | (() => string);
27
- /**
28
- * Enable real-time sync via Atlas Change Streams.
29
- * Requires a MongoDB Atlas cluster or a local replica set.
30
- * Falls back to polling if unavailable.
31
- * Default: false
32
- */
99
+ syncInterval?: number; batchSize?: number;
100
+ syncOwner?: string | (()=>string);
33
101
  realtime?: boolean;
34
- /** Called after each successful sync cycle. */
35
102
  onSync?: (result: SyncResult) => void;
36
- /** Called when a sync cycle throws an unexpected error. */
37
103
  onError?: (err: Error) => void;
104
+ cleanDays?: number;
105
+ reconcileOnStart?: boolean; reconcileFullScan?: boolean;
106
+ rateLimiter?: SyncRateLimiterOptions;
107
+ schemaManager?: SchemaManager;
108
+ /** Enable per-field LWW merge. Firebase can't do this. Default: true */
109
+ fieldLevelMerge?: boolean;
110
+ autoCompact?: boolean; compactEvery?: number; compactRetentionDays?: number;
111
+ compression?: boolean;
38
112
  }
39
113
 
40
- // ─── Results ──────────────────────────────────────────────────────────────────
41
-
42
- export interface SyncResult {
43
- /** Docs downloaded from Atlas to local */
44
- downloaded: number;
45
- /** Docs uploaded from local to Atlas */
46
- uploaded: number;
47
- /** Delete operations applied */
48
- deleted: number;
49
- /** Operations that failed (network errors, etc.) */
50
- failed: number;
51
- /** Operations that produced a version conflict */
52
- conflicts: number;
53
- /** Upload attempts that were automatically retried */
54
- retried: number;
55
- /** Ops skipped via compression (offline create+delete, superseded updates) */
56
- skipped: number;
57
- }
58
-
59
- export interface SyncStatus {
60
- /** Whether Atlas is currently reachable */
61
- online: boolean;
62
- /** Total local ops not yet synced to Atlas */
63
- pending: number;
64
- /** Pending create operations */
65
- creates: number;
66
- /** Pending update operations */
67
- updates: number;
68
- /** Pending delete operations */
69
- deletes: number;
70
- /** Whether real-time change streams are active */
71
- realtime: boolean;
72
- }
73
-
74
- export interface OfflineResult {
75
- error: 'offline';
76
- pending: number;
77
- }
114
+ // ─── Results & Status ─────────────────────────────────────────────────────────
115
+ export interface SyncResult { downloaded: number; uploaded: number; deleted: number; failed: number; conflicts: number; retried: number; skipped: number; fieldMerged?: number; }
116
+ export interface SyncStatus { online: boolean; pending: number; creates: number; updates: number; deletes: number; realtime: boolean; circuitBreaker?: CircuitBreakerState; rateLimiter?: SyncRateLimiterStats; }
117
+ export interface OfflineResult { error: 'offline'; pending: number; }
118
+ export interface ConflictRecord { _id: unknown; opId: string; type: 'create'|'update'|'delete'; collection: string; docId: DocId; ownerKey: string; baseVersion: number; version: number; timestamp: Date; lastError?: string; retryCount: number; mergeAttempted?: boolean; }
119
+ export interface ReconcileCollectionResult { collection: string; phase1: {scanned:number;queued:number}; phase2: {scanned:number;queued:number}; totalQueued: number; replicaSet: boolean; error?: string; }
78
120
 
79
121
  // ─── Plugin ───────────────────────────────────────────────────────────────────
80
-
81
- export interface PluginOptions {
82
- /**
83
- * Dot-notation path to the field used as the owner key for multi-tenant
84
- * filtering. Example: 'userId' or 'org._id'.
85
- * Defaults to 'global' if not set.
86
- */
87
- ownerField?: string;
88
- /** Batch size for insertMany / updateMany / deleteMany hooks. Default: 200 */
89
- batchSize?: number;
90
- /** Concurrent recordChange calls per batch. Default: 4 */
91
- concurrency?: number;
92
- }
122
+ export interface PluginOptions { ownerField?: string; batchSize?: number; concurrency?: number; diffEnabled?: boolean; }
93
123
 
94
124
  // ─── Events ───────────────────────────────────────────────────────────────────
95
-
125
+ export interface ConflictData { collection: string; docId: DocId; opId: string; localVersion: number; remoteVersion: number; op: 'create'|'update'|'delete'; fieldMerge?: {attempted:boolean;resolvedFields:Record<string,'local'|'remote'>;conflictedFields:Record<string,{local:unknown;remote:unknown;winner:'local'|'remote'}>;score:number}; }
96
126
  export interface MongoFireEvents {
97
- /** Emitted once after start() completes successfully */
98
- ready: [];
99
- /** Emitted after each sync cycle with the result */
100
- sync: [result: SyncResult];
101
- /** Emitted when Atlas connection is (re)established */
102
- online: [];
103
- /** Emitted when Atlas becomes unreachable */
104
- offline: [];
105
- /** Emitted when real-time change streams activate */
106
- realtimeStarted: [];
107
- /** Emitted when real-time change streams are stopped */
108
- realtimeStopped: [];
109
- /** Emitted when stop() finishes */
110
- stopped: [];
111
- /** Emitted on unexpected sync errors */
112
- error: [err: Error];
113
- /**
114
- * Emitted when a version conflict is detected during upload.
115
- * The application should inspect conflictData and resolve manually
116
- * (e.g. fetch latest remote doc and re-apply changes).
117
- */
127
+ ready: []; sync: [result: SyncResult]; online: []; offline: [];
128
+ realtimeStarted: []; realtimeStopped: []; stopped: []; error: [err: Error];
118
129
  conflict: [data: ConflictData];
130
+ fieldMerged: [data: {collection:string;docId:DocId;opId:string;resolvedFields:Record<string,'local'|'remote'>;score:number}];
131
+ reconcileComplete: [result: {collections:ReconcileCollectionResult[];totalQueued:number}];
132
+ conflictResolved: [data: {opId:string;resolution:'retried'|'dismissed'}];
133
+ compacted: [result: CompactionResult];
134
+ circuitOpen: [data: {retryAfterMs:number}]; circuitClose: [];
135
+ migrated: [data: {collection:string;docId:DocId;fromVersion:number;toVersion:number}];
119
136
  }
120
137
 
121
- /** Structured data emitted with the 'conflict' event. */
122
- export interface ConflictData {
123
- /** Collection where the conflict occurred */
124
- collection: string;
125
- /** Document _id (as string) */
126
- docId: string;
127
- /** The opId of the conflicting local operation */
128
- opId: string;
129
- /** The local baseVersion that was expected on Atlas */
130
- localVersion: number;
131
- /** The actual version currently on Atlas */
132
- remoteVersion: number;
133
- /** Operation type: 'create' | 'update' | 'delete' */
134
- op: string;
135
- }
138
+ // ─── Internal document structure ──────────────────────────────────────────────
139
+ export interface MfDocFields { _mf_version: number; _mf_lastWriterDeviceId: string; _mf_opId: string; _mf_lastOpId: string; _mf_schemaVersion?: number; }
140
+ export interface ChangetrackRecord extends MfDocFields { _id: unknown; opId: string; type: 'create'|'update'|'delete'; collection: string; docId: DocId; payload: Record<string,unknown>|PatchPayload|null; ownerKey: string; deviceId: string; timestamp: Date; updatedAt: Date; baseVersion: number; version: number; lastWriterDeviceId: string; payloadChecksum: string|null; synced: boolean; ackState: 'pending'|'acked'|'verified'|'conflict'|'error'|'compressed'|'superseded'|'dismissed'; retryCount: number; createdAt: Date; syncedAt: Date|null; remoteAckAt: Date|null; checksumVerifiedAt: Date|null; lastError: string|null; applyStatus?: 'pending'|'applied'|'conflict'; }
141
+ export interface DocMetaRecord { _id: string; collection: string; docId: DocId; version: number; updatedAt: Date; lastWriterDeviceId: string; deleted: boolean; ownerKey: string; updatedByOpId: string|null; lastOpId: string|null; payloadChecksum: string|null; createdAt: Date; }
136
142
 
137
143
  // ─── Main class ───────────────────────────────────────────────────────────────
138
-
139
144
  export declare class MongoFire extends EventEmitter {
140
- /**
141
- * Connect to local and Atlas MongoDB, run an initial sync, and start
142
- * background polling. Concurrent calls share one init promise.
143
- */
144
145
  start(config: SyncConfig): Promise<this>;
145
-
146
- /**
147
- * Flush pending ops, wait for any active sync to finish, and close all
148
- * connections.
149
- * @param timeoutMs Max ms to wait for active sync. Default: 10000
150
- */
151
146
  stop(timeoutMs?: number): Promise<void>;
152
-
153
- /**
154
- * Manually trigger a sync cycle.
155
- * Returns an OfflineResult immediately if Atlas is unreachable.
156
- */
157
- sync(type?: 'required' | 'all'): Promise<SyncResult | OfflineResult>;
158
-
159
- /** Returns pending op counts and online status. */
147
+ sync(type?: 'required'|'all'): Promise<SyncResult|OfflineResult>;
160
148
  status(): Promise<SyncStatus>;
161
-
162
- /**
163
- * Delete synced changetrack records older than `days` days.
164
- * Default: 7 (matches Atlas TTL to keep both sides consistent)
165
- * @returns Number of records deleted
166
- */
167
- clean(days?: number): Promise<number>;
168
-
169
- /**
170
- * Returns a Mongoose schema plugin that tracks changes on the given collection.
171
- *
172
- * @example
173
- * import mongofire from 'mongofire';
174
- * userSchema.plugin(mongofire.plugin('users', { ownerField: 'userId' }));
175
- */
149
+ clean(days?: number, opts?: {conflictDays?:number}): Promise<number>;
150
+ conflicts(collection?: string): Promise<ConflictRecord[]>;
151
+ retryConflict(opId: string): Promise<void>;
152
+ dismissConflict(opId: string): Promise<void>;
176
153
  plugin(collectionName: string, options?: PluginOptions): (schema: import('mongoose').Schema) => void;
177
-
178
- /** Manually activate real-time sync (if Atlas is connected and supports change streams). */
179
154
  startRealtime(): Promise<boolean>;
180
-
181
- /** Stop real-time change stream (polling continues). */
182
155
  stopRealtime(): Promise<void>;
183
-
184
- /** Whether Atlas is currently reachable. */
156
+ reconcile(collectionOrOpts?: string|string[]|{fullScan?:boolean;verbose?:boolean}, opts?: {fullScan?:boolean;verbose?:boolean}): Promise<ReconcileCollectionResult[]>;
157
+ compact(opts?: CompactionOptions): Promise<CompactionResult>;
158
+ rateLimiterStats(): SyncRateLimiterStats | null;
159
+ resetCircuit(): void;
185
160
  readonly online: boolean;
186
- /** Whether start() has completed. */
187
161
  readonly started: boolean;
188
- /** Whether a sync cycle is currently running. */
189
162
  readonly syncing: boolean;
190
- /** Whether real-time change streams are active. */
191
163
  readonly realtimeActive: boolean;
192
-
193
- // ─── Typed event emitter overloads ────────────────────────────────────────
164
+ readonly schemaManager: SchemaManager | null;
165
+ readonly rateLimiter: SyncRateLimiter | null;
194
166
  on<K extends keyof MongoFireEvents>(event: K, listener: (...args: MongoFireEvents[K]) => void): this;
195
167
  once<K extends keyof MongoFireEvents>(event: K, listener: (...args: MongoFireEvents[K]) => void): this;
196
168
  emit<K extends keyof MongoFireEvents>(event: K, ...args: MongoFireEvents[K]): boolean;
@@ -198,27 +170,9 @@ export declare class MongoFire extends EventEmitter {
198
170
  }
199
171
 
200
172
  // ─── Direct plugin import ─────────────────────────────────────────────────────
201
-
202
- /**
203
- * Raw Mongoose plugin factory for direct schema.plugin() usage.
204
- * Equivalent to mongofire.plugin(name, opts) but requires `collection` in options.
205
- *
206
- * @example
207
- * import mongofirePlugin from 'mongofire/plugin';
208
- * userSchema.plugin(mongofirePlugin, { collection: 'users', ownerField: 'userId' });
209
- *
210
- * @example
211
- * // Or use the factory helper (matches instance.plugin() return shape):
212
- * import { factory } from 'mongofire/plugin';
213
- * userSchema.plugin(factory('users', { ownerField: 'userId' }));
214
- */
215
- export declare function mongofirePlugin(schema: import('mongoose').Schema, options?: PluginOptions & { collection?: string }): void;
216
- export declare namespace mongofirePlugin {
217
- function factory(collectionName: string, options?: PluginOptions): (schema: import('mongoose').Schema) => void;
218
- }
173
+ export declare function mongofirePlugin(schema: import('mongoose').Schema, options?: PluginOptions & {collection?: string}): void;
174
+ export declare namespace mongofirePlugin { function factory(collectionName: string, options?: PluginOptions): (schema: import('mongoose').Schema) => void; }
219
175
 
220
176
  // ─── Default export ───────────────────────────────────────────────────────────
221
-
222
- /** The default MongoFire singleton instance. */
223
- declare const mongofire: MongoFire & { MongoFire: typeof MongoFire };
177
+ declare const mongofire: MongoFire & { MongoFire: typeof MongoFire; schemaManager: SchemaManager; };
224
178
  export default mongofire;
package/index.cjs CHANGED
@@ -1,4 +1,2 @@
1
1
  'use strict';
2
- // Entry point → obfuscated dist/ (built by: npm run build)
3
- // Never edit this file — edit src/index.cjs instead
4
2
  module.exports = require('./dist/src/index.cjs');
package/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createRequire } from 'module';
2
2
  const require = createRequire(import.meta.url);
3
- // Entry point → obfuscated dist/ (built by: npm run build)
4
3
  const mf = require('./dist/src/index.cjs');
5
4
  export default mf;
6
5
  export const MongoFire = mf.MongoFire;
package/package.json CHANGED
@@ -1,19 +1,20 @@
1
1
  {
2
2
  "name": "mongofire",
3
- "version": "6.5.2",
4
- "description": "Offline-first MongoDB sync — Local + Atlas feel like ONE database. Automatic conflict resolution, Mongoose plugin, zero boilerplate.",
3
+ "version": "6.5.5",
4
+ "description": "Offline-first MongoDB sync — Local + Atlas feel like ONE database. Automatic conflict resolution, Mongoose plugin, interactive CLI, zero boilerplate.",
5
5
  "main": "./index.cjs",
6
6
  "types": "./dist/types/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
+ "types": "./dist/types/index.d.ts",
9
10
  "import": "./index.mjs",
10
11
  "require": "./index.cjs",
11
- "types": "./dist/types/index.d.ts",
12
12
  "default": "./index.cjs"
13
13
  },
14
14
  "./plugin": {
15
- "require": "./dist/src/plugin.js",
16
- "types": "./dist/types/index.d.ts"
15
+ "types": "./dist/types/index.d.ts",
16
+ "import": "./dist/src/plugin.mjs",
17
+ "require": "./dist/src/plugin.js"
17
18
  }
18
19
  },
19
20
  "bin": {
@@ -21,12 +22,13 @@
21
22
  },
22
23
  "scripts": {
23
24
  "build": "node scripts/build.js",
24
- "prepublishOnly": "npm run build",
25
+ "prepublishOnly": "npm run build && node test/smoke.test.js",
25
26
  "test": "node test/smoke.test.js",
26
27
  "verify": "npm pack --dry-run",
27
- "release:patch": "npm version patch && npm publish --access public",
28
- "release:minor": "npm version minor && npm publish --access public",
29
- "release:major": "npm version major && npm publish --access public"
28
+ "release": "bash scripts/release-dual.sh patch",
29
+ "release:patch": "bash scripts/release-dual.sh patch",
30
+ "release:minor": "bash scripts/release-dual.sh minor",
31
+ "release:major": "bash scripts/release-dual.sh major"
30
32
  },
31
33
  "files": [
32
34
  "dist/",
@@ -39,14 +41,14 @@
39
41
  "keywords": [
40
42
  "mongodb",
41
43
  "mongoose",
42
- "sync",
43
44
  "atlas",
45
+ "sync",
44
46
  "offline-first",
45
47
  "local-first",
46
- "conflict-resolution",
47
- "replication",
48
48
  "offline",
49
49
  "sync-engine",
50
+ "replication",
51
+ "conflict-resolution",
50
52
  "realtime",
51
53
  "change-streams",
52
54
  "typescript"
@@ -56,26 +58,31 @@
56
58
  "node": ">=18.0.0"
57
59
  },
58
60
  "dependencies": {
59
- "dotenv": "^16.0.0"
61
+ "@clack/prompts": "^1.1.0"
60
62
  },
61
63
  "devDependencies": {
62
- "javascript-obfuscator": "^4.1.1"
64
+ "javascript-obfuscator": "^4.1.1",
65
+ "terser": "^5.27.0"
63
66
  },
64
67
  "peerDependencies": {
68
+ "dotenv": ">=16.0.0",
65
69
  "mongodb": ">=4.0.0",
66
70
  "mongoose": ">=7.0.0"
67
71
  },
68
72
  "peerDependenciesMeta": {
69
73
  "mongoose": {
70
74
  "optional": true
75
+ },
76
+ "dotenv": {
77
+ "optional": true
71
78
  }
72
79
  },
73
80
  "repository": {
74
81
  "type": "git",
75
- "url": "https://github.com/Abid-Khan-Dev/mongofire.git"
82
+ "url": "git+https://github.com/Abid-Khan-Dev/mongofire.git"
76
83
  },
77
84
  "homepage": "https://github.com/Abid-Khan-Dev/mongofire#readme",
78
85
  "bugs": {
79
86
  "url": "https://github.com/Abid-Khan-Dev/mongofire/issues"
80
87
  }
81
- }
88
+ }