Built motion from commit 645879c.|0.0.82
[motion.git] / server / config / integrations / index.js
index 3af6200..7874e10 100644 (file)
@@ -1 +1 @@
-var _0x8b39=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x54\x72\x69\x67\x67\x65\x72\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x76\x61\x72\x73\x65\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x6B\x65\x79\x73","\x68\x65\x61\x64","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x70\x75\x73\x68","\x6F\x6E","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x72\x65\x73\x75\x6C\x74","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x7A\x65\x6E\x64\x65\x73\x6B","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A\x20","\x73\x74\x61\x74\x65","\x6D\x61\x70","\x69\x6E\x64\x65\x78\x4F\x66","\x61\x63\x74\x69\x76\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x41\x66\x74\x65\x72\x20\x64\x65\x73\x74\x72\x6F\x79\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8b39[0];var _=require(_0x8b39[1]);var IntegrationModel=require(_0x8b39[3])[_0x8b39[2]];var Variable=require(_0x8b39[3])[_0x8b39[4]];var Zendesk=require(_0x8b39[5]);function Integration(_0x24f6x6){console[_0x8b39[7]](_0x8b39[6]);var _0x24f6x7= new Zendesk();var _0x24f6x8=[];var _0x24f6x9=[];var _0x24f6xa={};_0x24f6x6[_0x8b39[17]](_0x8b39[8],function(_0x24f6xb){if(!_0x24f6xa[_0x8b39[10]](_0x24f6xb[_0x8b39[9]])){_0x24f6xa[_0x24f6xb[_0x8b39[9]]]=[]};if(_0x24f6xb[_0x8b39[10]](_0x8b39[11])&&_0x24f6xb[_0x8b39[10]](_0x8b39[12])){var _0x24f6xc=_[_0x8b39[15]](_0x24f6x9,{"\x6E\x61\x6D\x65":_[_0x8b39[14]](_[_0x8b39[13]](_0x24f6xb[_0x8b39[11]]))});if(_0x24f6xc>=0){var _0x24f6xd={name:_[_0x8b39[14]](_[_0x8b39[13]](_0x24f6xb[_0x8b39[11]])),value:_0x24f6xb[_0x8b39[12]]};_0x24f6xa[_0x24f6xb[_0x8b39[9]]][_0x8b39[16]](_0x24f6xd)}}});Variable[_0x8b39[19]]()[_0x8b39[18]](function(_0x24f6xe){_0x24f6x9=_0x24f6xe;synchVariables(_0x24f6x9)});IntegrationModel[_0x8b39[19]]({where:{active:1}})[_0x8b39[18]](function(_0x24f6xf){_0x24f6x8=_0x24f6xf;synchIntegrations(_0x24f6x8)});this[_0x8b39[20]]=function(_0x24f6x10,_0x24f6x11,_0x24f6x12){console[_0x8b39[7]](_0x8b39[21]);if(integrationIsActive(_0x24f6x10[_0x8b39[22]],_0x24f6x8)){switch(_0x24f6x10[_0x8b39[22]]){case _0x8b39[27]:_0x24f6x7[_0x8b39[26]](_0x24f6x10[_0x8b39[23]],_0x24f6x10[_0x8b39[24]],_0x24f6x12,_0x24f6x11,_[_0x8b39[25]](_0x24f6xa,_0x24f6x11[_0x8b39[9]]));break;default:console[_0x8b39[7]](_0x8b39[28],_0x24f6x10[_0x8b39[22]])}}}}function integrationIsActive(_0x24f6x14,_0x24f6x15){var _0x24f6x16=_[_0x8b39[30]](_0x24f6x15,_0x8b39[29]);if(_[_0x8b39[31]](_0x24f6x16,_0x24f6x14)>=0){return true};return false}function synchIntegrations(_0x24f6x15){IntegrationModel[_0x8b39[37]](function(_0x24f6x11){if(_0x24f6x11[_0x8b39[32]]){updateCollection(_0x24f6x15,_0x24f6x11)}else {_[_0x8b39[34]](_0x24f6x15,{id:_0x24f6x11[_0x8b39[33]]})};console[_0x8b39[7]](_0x8b39[35],_0x24f6x15[_0x8b39[36]])})}function synchVariables(_0x24f6x15){Variable[_0x8b39[39]](function(_0x24f6x11){updateCollection(_0x24f6x15,_0x24f6x11);console[_0x8b39[7]](_0x8b39[38],_0x24f6x15[_0x8b39[36]])});Variable[_0x8b39[37]](function(_0x24f6x11){updateCollection(_0x24f6x15,_0x24f6x11);console[_0x8b39[7]](_0x8b39[40],_0x24f6x15[_0x8b39[36]])});Variable[_0x8b39[42]](function(_0x24f6x11){_[_0x8b39[34]](_0x24f6x15,{id:_0x24f6x11[_0x8b39[33]]});console[_0x8b39[7]](_0x8b39[41],_0x24f6x15[_0x8b39[36]])})}function updateCollection(_0x24f6x1a,_0x24f6x11){var _0x24f6x1b=_[_0x8b39[43]](_0x24f6x1a,{id:_0x24f6x11[_0x8b39[33]]});var _0x24f6xc=_0x24f6x1a[_0x8b39[31]](_0x24f6x1b);if(_0x24f6x1b){_[_0x8b39[44]](_0x24f6x1a[_0x24f6xc],_0x24f6x11)}else {_0x24f6x1a[_0x8b39[45]](_0x24f6x11)}}module[_0x8b39[46]]=Integration
\ No newline at end of file
+var _0x9ee4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x54\x72\x69\x67\x67\x65\x72\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x76\x61\x72\x73\x65\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x6B\x65\x79\x73","\x68\x65\x61\x64","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x70\x75\x73\x68","\x6F\x6E","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x72\x65\x73\x75\x6C\x74","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x7A\x65\x6E\x64\x65\x73\x6B","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A\x20","\x73\x74\x61\x74\x65","\x6D\x61\x70","\x69\x6E\x64\x65\x78\x4F\x66","\x61\x63\x74\x69\x76\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x41\x66\x74\x65\x72\x20\x64\x65\x73\x74\x72\x6F\x79\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9ee4[0];var _=require(_0x9ee4[1]);var IntegrationModel=require(_0x9ee4[3])[_0x9ee4[2]];var Variable=require(_0x9ee4[3])[_0x9ee4[4]];var Zendesk=require(_0x9ee4[5]);function Integration(_0x51cax6){console[_0x9ee4[7]](_0x9ee4[6]);var _0x51cax7= new Zendesk();var _0x51cax8=[];var _0x51cax9=[];var _0x51caxa={};_0x51cax6[_0x9ee4[17]](_0x9ee4[8],function(_0x51caxb){if(!_0x51caxa[_0x9ee4[10]](_0x51caxb[_0x9ee4[9]])){_0x51caxa[_0x51caxb[_0x9ee4[9]]]=[]};if(_0x51caxb[_0x9ee4[10]](_0x9ee4[11])&&_0x51caxb[_0x9ee4[10]](_0x9ee4[12])){var _0x51caxc=_[_0x9ee4[15]](_0x51cax9,{"\x6E\x61\x6D\x65":_[_0x9ee4[14]](_[_0x9ee4[13]](_0x51caxb[_0x9ee4[11]]))});if(_0x51caxc>=0){var _0x51caxd={name:_[_0x9ee4[14]](_[_0x9ee4[13]](_0x51caxb[_0x9ee4[11]])),value:_0x51caxb[_0x9ee4[12]]};_0x51caxa[_0x51caxb[_0x9ee4[9]]][_0x9ee4[16]](_0x51caxd)}}});Variable[_0x9ee4[19]]()[_0x9ee4[18]](function(_0x51caxe){_0x51cax9=_0x51caxe;synchVariables(_0x51cax9)});IntegrationModel[_0x9ee4[19]]({where:{active:1}})[_0x9ee4[18]](function(_0x51caxf){_0x51cax8=_0x51caxf;synchIntegrations(_0x51cax8)});this[_0x9ee4[20]]=function(_0x51cax10,_0x51cax11,_0x51cax12){console[_0x9ee4[7]](_0x9ee4[21]);if(integrationIsActive(_0x51cax10[_0x9ee4[22]],_0x51cax8)){switch(_0x51cax10[_0x9ee4[22]]){case _0x9ee4[27]:_0x51cax7[_0x9ee4[26]](_0x51cax10[_0x9ee4[23]],_0x51cax10[_0x9ee4[24]],_0x51cax12,_0x51cax11,_[_0x9ee4[25]](_0x51caxa,_0x51cax11[_0x9ee4[9]]));break;default:console[_0x9ee4[7]](_0x9ee4[28],_0x51cax10[_0x9ee4[22]])}}}}function integrationIsActive(_0x51cax14,_0x51cax15){var _0x51cax16=_[_0x9ee4[30]](_0x51cax15,_0x9ee4[29]);if(_[_0x9ee4[31]](_0x51cax16,_0x51cax14)>=0){return true};return false}function synchIntegrations(_0x51cax15){IntegrationModel[_0x9ee4[37]](function(_0x51cax11){if(_0x51cax11[_0x9ee4[32]]){updateCollection(_0x51cax15,_0x51cax11)}else {_[_0x9ee4[34]](_0x51cax15,{id:_0x51cax11[_0x9ee4[33]]})};console[_0x9ee4[7]](_0x9ee4[35],_0x51cax15[_0x9ee4[36]])})}function synchVariables(_0x51cax15){Variable[_0x9ee4[39]](function(_0x51cax11){updateCollection(_0x51cax15,_0x51cax11);console[_0x9ee4[7]](_0x9ee4[38],_0x51cax15[_0x9ee4[36]])});Variable[_0x9ee4[37]](function(_0x51cax11){updateCollection(_0x51cax15,_0x51cax11);console[_0x9ee4[7]](_0x9ee4[40],_0x51cax15[_0x9ee4[36]])});Variable[_0x9ee4[42]](function(_0x51cax11){_[_0x9ee4[34]](_0x51cax15,{id:_0x51cax11[_0x9ee4[33]]});console[_0x9ee4[7]](_0x9ee4[41],_0x51cax15[_0x9ee4[36]])})}function updateCollection(_0x51cax1a,_0x51cax11){var _0x51cax1b=_[_0x9ee4[43]](_0x51cax1a,{id:_0x51cax11[_0x9ee4[33]]});var _0x51caxc=_0x51cax1a[_0x9ee4[31]](_0x51cax1b);if(_0x51cax1b){_[_0x9ee4[44]](_0x51cax1a[_0x51caxc],_0x51cax11)}else {_0x51cax1a[_0x9ee4[45]](_0x51cax11)}}module[_0x9ee4[46]]=Integration
\ No newline at end of file