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