1 var _0xbadf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x64\x65\x62\x75\x67","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x75\x72\x6C","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0xbadf[0];var _=require(_0xbadf[1]);var util=require(_0xbadf[2]);var rp=require(_0xbadf[3]);var logger=require(_0xbadf[5])(_0xbadf[4]);var ZendeskConfiguration=require(_0xbadf[7])[_0xbadf[6]];var ReportIntegration=require(_0xbadf[7])[_0xbadf[8]];var VoiceQueue=require(_0xbadf[7])[_0xbadf[9]];var VoiceExtension=require(_0xbadf[7])[_0xbadf[10]];var Agent=require(_0xbadf[7])[_0xbadf[11]];function Zendesk(){logger[_0xbadf[13]](_0xbadf[12])}Zendesk[_0xbadf[15]][_0xbadf[14]]= function(_0x8fe1xb,_0x8fe1xc,_0x8fe1xd,_0x8fe1xe,_0x8fe1xf,_0x8fe1x10){var _0x8fe1x11={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x8fe1xb|| !_0x8fe1xc){logger[_0xbadf[17]](_0xbadf[16]);return};ZendeskConfiguration[_0xbadf[20]]({where:{id:_0x8fe1xc,AccountId:_0x8fe1xb},include:[{all:true,include:[{all:true}]}]})[_0xbadf[19]](handleEntityNotFound())[_0xbadf[19]](handleConnection(_0x8fe1x11))[_0xbadf[19]](searchMotionAgent(_0x8fe1xd,_0x8fe1xf))[_0xbadf[19]](handleMotionAgent(_0x8fe1x11))[_0xbadf[19]](searchQueue(_0x8fe1xf))[_0xbadf[19]](handleQueueRecordings(_0x8fe1x11,_0x8fe1xf))[_0xbadf[19]](searchRoute(_0x8fe1xf))[_0xbadf[19]](handleOutboundRecordings(_0x8fe1x11,_0x8fe1xf))[_0xbadf[19]](searchAgent(_0x8fe1x11))[_0xbadf[19]](handleAgent(_0x8fe1x11))[_0xbadf[19]](searchAdmin(_0x8fe1x11))[_0xbadf[19]](handleAdmin(_0x8fe1x11))[_0xbadf[19]](searchEndUser(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xe))[_0xbadf[19]](handleEndUser(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xe))[_0xbadf[19]](endUserCreation(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xe))[_0xbadf[19]](handleEndUserCreation(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xe))[_0xbadf[19]](ticketCreation(_0x8fe1x11,_0x8fe1xf,_0x8fe1x10))[_0xbadf[19]](handleTicketDisplay(_0x8fe1x11))[_0xbadf[19]](handleReportIntegration(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xb,_0x8fe1xe))[_0xbadf[19]](handleEnd(_0x8fe1x11))[_0xbadf[18]](handleError(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xb))};function handleEntityNotFound(){return function(_0x8fe1x13){if(!_0x8fe1x13){return null};return _0x8fe1x13}}function handleConnection(_0x8fe1x11){return function(_0x8fe1x15){var _0x8fe1x16=getAccountConfiguration(_0x8fe1x15.ZendeskAccount);_0x8fe1x11[_0xbadf[21]]= _0x8fe1x15;_0x8fe1x11[_0xbadf[22]]= _0x8fe1x16[_0xbadf[22]];_0x8fe1x11[_0xbadf[23]]= _0x8fe1x16[_0xbadf[23]];_0x8fe1x11[_0xbadf[24]]= _0x8fe1x15[_0xbadf[26]][_0xbadf[25]]}}function searchMotionAgent(_0x8fe1xd,_0x8fe1xf){return function(){var _0x8fe1x18=getAgentSearchPropertyFromChannel(_0x8fe1xd);if(_0x8fe1xf[_0xbadf[27]](_0x8fe1x18)){return Agent[_0xbadf[31]](_0xbadf[30])[_0xbadf[29]]({where:{name:getValueFromPropertyName(_0x8fe1xf,_0x8fe1x18)},attributes:[_0xbadf[28]]})};return}}function handleMotionAgent(_0x8fe1x11){return function(_0x8fe1x1a){if(_0x8fe1x1a&& _0x8fe1x1a[_0xbadf[28]]){_0x8fe1x11[_0xbadf[32]]= _0x8fe1x1a[_0xbadf[28]]};return}}function searchQueue(_0x8fe1xf){return function(){if(_0x8fe1xf[_0xbadf[33]]){return VoiceQueue[_0xbadf[29]]({where:{name:_0x8fe1xf[_0xbadf[33]]},attributes:[_0xbadf[34],_0xbadf[35]]})}else {return}}}function handleQueueRecordings(_0x8fe1x11,_0x8fe1xf){return function(_0x8fe1x1d){if(_0x8fe1xf[_0xbadf[33]]){if(_0x8fe1x1d&& _0x8fe1x1d[_0xbadf[35]]){logger[_0xbadf[13]](_0xbadf[36],_0x8fe1x1d[_0xbadf[34]]);_0x8fe1x11[_0xbadf[37]]= true}else {_0x8fe1x11[_0xbadf[37]]= false;logger[_0xbadf[13]](_0xbadf[38])}};return}}function searchRoute(_0x8fe1xf){return function(){if(_0x8fe1xf[_0xbadf[39]]){return VoiceExtension[_0xbadf[29]]({where:{id:_0x8fe1xf[_0xbadf[39]]},attributes:[_0xbadf[40],_0xbadf[41]]})}else {return}}}function handleOutboundRecordings(_0x8fe1x11,_0x8fe1xf){return function(_0x8fe1x20){if(_0x8fe1xf[_0xbadf[39]]){if(_0x8fe1x20&& _0x8fe1x20[_0xbadf[41]]){logger[_0xbadf[13]](_0xbadf[42],_0x8fe1x20[_0xbadf[40]]);_0x8fe1x11[_0xbadf[37]]= true}else {_0x8fe1x11[_0xbadf[37]]= false;logger[_0xbadf[13]](_0xbadf[43])}};return}}function getAccountConfiguration(_0x8fe1x22){var _0x8fe1x23={uri:stripTrailingSlash(_0x8fe1x22[_0xbadf[44]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xbadf[45],"\x41\x63\x63\x65\x70\x74":_0xbadf[45]}};var _0x8fe1x24=_0x8fe1x22[_0xbadf[46]];if(_0x8fe1x22[_0xbadf[47]]=== _0xbadf[48]){_0x8fe1x24= _0x8fe1x24+ _0xbadf[49]+ _0x8fe1x22[_0xbadf[48]]}else {if(_0x8fe1x22[_0xbadf[47]]=== _0xbadf[50]){_0x8fe1x24= _0x8fe1x24+ _0xbadf[51]+ _0x8fe1x22[_0xbadf[50]]}};_0x8fe1x23[_0xbadf[23]][_0xbadf[52]]= _0xbadf[53]+ new Buffer(_0x8fe1x24).toString(_0xbadf[54]);return _0x8fe1x23}function searchAgent(_0x8fe1x11){return function(){if(_0x8fe1x11[_0xbadf[32]]){logger[_0xbadf[13]](_0xbadf[55],_0x8fe1x11[_0xbadf[32]]);return rp({uri:_0x8fe1x11[_0xbadf[22]]+ _0xbadf[56],qs:{"\x71\x75\x65\x72\x79":util[_0xbadf[58]](_0xbadf[57],_0x8fe1x11[_0xbadf[32]])},headers:_0x8fe1x11[_0xbadf[23]],json:true})};return}}function getAgentSearchPropertyFromChannel(_0x8fe1xd){var _0x8fe1x27=_0xbadf[59];if(_0x8fe1xd){switch(_0x8fe1xd){case _0xbadf[61]:_0x8fe1x27= _0xbadf[60];break;default:_0x8fe1x27= _0xbadf[60];logger[_0xbadf[17]](_0xbadf[62],_0x8fe1xd)}};return _0x8fe1x27}function getValueFromPropertyName(_0x8fe1xf,_0x8fe1x27,_0x8fe1x11){if(_0x8fe1x27=== _0xbadf[63]){if(_0x8fe1x11&& _0x8fe1x11[_0xbadf[37]]&& _0x8fe1x11[_0xbadf[24]]){return util[_0xbadf[58]](_0xbadf[64],stripTrailingSlash(_0x8fe1x11[_0xbadf[24]]),_0x8fe1xf[_0xbadf[65]])}else {return null}}else {return _[_0xbadf[66]](_0x8fe1xf,_0x8fe1x27)}}function handleAgent(_0x8fe1x11){return function(_0x8fe1xf){if(_0x8fe1xf&& _0x8fe1xf[_0xbadf[68]][_0xbadf[67]]> 0&& _0x8fe1xf[_0xbadf[69]]> 0){logger[_0xbadf[13]](_0xbadf[70],_0x8fe1x11[_0xbadf[32]]);_0x8fe1x11[_0xbadf[30]]= getMatchObject(_0x8fe1xf[_0xbadf[68]],_0xbadf[34],_0x8fe1x11[_0xbadf[32]]);return _0x8fe1x11[_0xbadf[30]]};return}}function getMatchObject(_0x8fe1x2b,_0x8fe1x27,_0x8fe1x2c){var _0x8fe1x2d=_[_0xbadf[20]](_0x8fe1x2b,{property:_0x8fe1x2c});if(_0x8fe1x2d){return _0x8fe1x2d};return _[_0xbadf[71]](_0x8fe1x2b)}function searchAdmin(_0x8fe1x11){return function(_0x8fe1xf){if(_0x8fe1xf){return};logger[_0xbadf[13]](_0xbadf[72]);return rp({uri:_0x8fe1x11[_0xbadf[22]]+ _0xbadf[73],headers:_0x8fe1x11[_0xbadf[23]],json:true})}}function handleAdmin(_0x8fe1x11){return function(_0x8fe1xf){if(!_0x8fe1xf){return};if(_0x8fe1xf[_0xbadf[74]]){logger[_0xbadf[13]](_0xbadf[75]);_0x8fe1x11[_0xbadf[30]]= _0x8fe1xf[_0xbadf[74]]};return}}function searchEndUser(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xe){return function(){logger[_0xbadf[13]](_0xbadf[76],getValueFromPropertyName(_0x8fe1xf,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe)));return rp({uri:_0x8fe1x11[_0xbadf[22]]+ _0xbadf[56],qs:{"\x71\x75\x65\x72\x79":util[_0xbadf[58]](_0xbadf[77],getEndUserSearchQueryFromChannel(_0x8fe1xd),getValueFromPropertyName(_0x8fe1xf,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe)))},headers:_0x8fe1x11[_0xbadf[23]],json:true})}}function getEndUserSearchQueryFromChannel(_0x8fe1xd){var _0x8fe1x27=_0xbadf[59];if(_0x8fe1xd){switch(_0x8fe1xd){case _0xbadf[61]:_0x8fe1x27= _0xbadf[78];break;default:_0x8fe1x27= _0xbadf[78];logger[_0xbadf[17]](_0xbadf[62],_0x8fe1xd)}};return _0x8fe1x27}function getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe){var _0x8fe1x27=_0xbadf[59];if(_0x8fe1xd){switch(_0x8fe1xd){case _0xbadf[61]:if(_0x8fe1xe=== _0xbadf[79]){_0x8fe1x27= _0xbadf[80]}else {if(_0x8fe1xe=== _0xbadf[33]){_0x8fe1x27= _0xbadf[81]}};break;default:_0x8fe1x27= _0xbadf[81];logger[_0xbadf[17]](_0xbadf[62],_0x8fe1xd)}};return _0x8fe1x27}function getEndUserNamePropertyFromChannel(_0x8fe1xd,_0x8fe1xe){var _0x8fe1x27=_0xbadf[59];if(_0x8fe1xd){switch(_0x8fe1xd){case _0xbadf[61]:if(_0x8fe1xe=== _0xbadf[79]){_0x8fe1x27= _0xbadf[82]}else {if(_0x8fe1xe=== _0xbadf[33]){_0x8fe1x27= _0xbadf[83]}};break;default:_0x8fe1x27= _0xbadf[83];logger[_0xbadf[17]](_0xbadf[62],_0x8fe1xd)}};return _0x8fe1x27}function handleEndUser(_0x8fe1x11,_0x8fe1xd,_0x8fe1x35,_0x8fe1xe){return function(_0x8fe1xf){if(_0x8fe1xf[_0xbadf[68]][_0xbadf[67]]> 0&& _0x8fe1xf[_0xbadf[69]]> 0){logger[_0xbadf[13]](_0xbadf[84],getValueFromPropertyName(_0x8fe1x35,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe)));_0x8fe1x11[_0xbadf[85]]= _0x8fe1xf[_0xbadf[68]][0];return _0x8fe1x11[_0xbadf[85]]};return}}function endUserCreation(_0x8fe1x11,_0x8fe1xd,_0x8fe1x35,_0x8fe1xe){return function(_0x8fe1xf){if(_0x8fe1xf){return};logger[_0xbadf[13]](_0xbadf[86],getValueFromPropertyName(_0x8fe1x35,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe)));logger[_0xbadf[87]](getJsonForEndUserCreation(_0x8fe1xd,_0x8fe1x35,_0x8fe1xe));return rp({uri:_0x8fe1x11[_0xbadf[22]]+ _0xbadf[88],method:_0xbadf[89],body:{user:getJsonForEndUserCreation(_0x8fe1xd,_0x8fe1x35,_0x8fe1xe)},headers:_0x8fe1x11[_0xbadf[23]],json:true})}}function getJsonForEndUserCreation(_0x8fe1xd,_0x8fe1xf,_0x8fe1xe){var _0x8fe1x38={role:_0xbadf[90]};switch(_0x8fe1xd){case _0xbadf[61]:if(_0x8fe1xe=== _0xbadf[33]){if(isValidName(_0x8fe1xf[_0xbadf[83]])){_0x8fe1x38[_0xbadf[34]]= getValueFromPropertyName(_0x8fe1xf,getEndUserNamePropertyFromChannel(_0x8fe1xd,_0x8fe1xe))}else {_0x8fe1x38[_0xbadf[34]]= util[_0xbadf[58]](_0xbadf[91],getValueFromPropertyName(_0x8fe1xf,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe)))}}else {if(_0x8fe1xe=== _0xbadf[79]){if(isValidName(_0x8fe1xf[_0xbadf[82]])){_0x8fe1x38[_0xbadf[34]]= getValueFromPropertyName(_0x8fe1xf,getEndUserNamePropertyFromChannel(_0x8fe1xd,_0x8fe1xe))}else {_0x8fe1x38[_0xbadf[34]]= util[_0xbadf[58]](_0xbadf[91],getValueFromPropertyName(_0x8fe1xf,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe)))}}};_0x8fe1x38[_0xbadf[78]]= getValueFromPropertyName(_0x8fe1xf,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe));break;default:logger[_0xbadf[17]](_0xbadf[62],_0x8fe1xd)};return _0x8fe1x38}function isValidName(_0x8fe1x3a){return _0x8fe1x3a&& _0x8fe1x3a!== _0xbadf[92]}function handleEndUserCreation(_0x8fe1x11,_0x8fe1xd,_0x8fe1x35,_0x8fe1xe){return function(_0x8fe1xf){if(!_0x8fe1xf){return};if(_0x8fe1xf[_0xbadf[74]]){logger[_0xbadf[13]](_0xbadf[93],getValueFromPropertyName(_0x8fe1x35,getEndUserSearchPropertyFromChannel(_0x8fe1xd,_0x8fe1xe)));_0x8fe1x11[_0xbadf[85]]= _0x8fe1xf[_0xbadf[74]]};return}}function ticketCreation(_0x8fe1x11,_0x8fe1x35,_0x8fe1x10){return function(){var _0x8fe1x3d={requester_id:_0x8fe1x11[_0xbadf[85]][_0xbadf[40]],submitter_id:_0x8fe1x11[_0xbadf[30]][_0xbadf[40]],assignee_id:_0x8fe1x11[_0xbadf[30]][_0xbadf[40]],tags:createTagsFromConfiguration(_0x8fe1x11),subject:createSubjectFromConfiguration(_0x8fe1x11,_0x8fe1x35,_0x8fe1x10),comment:{public:false,body:createDescriptionFromConfiguration(_0x8fe1x11,_0x8fe1x35,_0x8fe1x10)},custom_fields:createCustomFieldsFromConfiguration(_0x8fe1x11,_0x8fe1x35,_0x8fe1x10)};var _0x8fe1x3e=createFieldsFromConfiguration(_0x8fe1x11);if(_0x8fe1x3e[_0xbadf[67]]> 0){_[_0xbadf[95]](_0x8fe1x3e,function(_0x8fe1x3f){_0x8fe1x3d[_0x8fe1x3f[_0xbadf[40]]]= _0x8fe1x3f[_0xbadf[94]]})};logger[_0xbadf[87]](_0xbadf[96],_0x8fe1x3d);return rp({uri:_0x8fe1x11[_0xbadf[22]]+ _0xbadf[97],method:_0xbadf[89],body:{ticket:_0x8fe1x3d},headers:_0x8fe1x11[_0xbadf[23]],json:true})}}function createTagsFromConfiguration(_0x8fe1x11){var _0x8fe1x41=[];if(_0x8fe1x11[_0xbadf[21]][_0xbadf[98]][_0xbadf[67]]> 0){_0x8fe1x41= _[_0xbadf[99]](_0x8fe1x11[_0xbadf[21]].Tags,_0xbadf[34])};return _0x8fe1x41}function createSubjectFromConfiguration(_0x8fe1x11,_0x8fe1x35,_0x8fe1x10){var _0x8fe1x43=_0xbadf[59];var _0x8fe1x44=[];if(_0x8fe1x11[_0xbadf[21]][_0xbadf[100]][_0xbadf[67]]> 0){var _0x8fe1x45=_[_0xbadf[101]](_0x8fe1x11[_0xbadf[21]].Subject,[_0xbadf[40]]);_[_0xbadf[95]](_0x8fe1x45,function(_0x8fe1x46){if(_0x8fe1x46[_0xbadf[102]]=== _0xbadf[103]){_0x8fe1x44[_0xbadf[105]](_0x8fe1x46[_0xbadf[104]])}else {if(_0x8fe1x46[_0xbadf[102]]=== _0xbadf[106]&& _0x8fe1x46[_0xbadf[107]]){var _0x8fe1x47=getValueFromPropertyName(_0x8fe1x35,_0x8fe1x46[_0xbadf[107]],_0x8fe1x11);if(_0x8fe1x47){_0x8fe1x44[_0xbadf[105]](_0x8fe1x47.toString())}}else {if(_0x8fe1x46[_0xbadf[102]]=== _0xbadf[108]&& _0x8fe1x46[_0xbadf[109]]&& _0x8fe1x46[_0xbadf[109]][_0xbadf[34]]){_0x8fe1x10[_0x8fe1x46[_0xbadf[109]][_0xbadf[34]]]&& _0x8fe1x44[_0xbadf[105]](_0x8fe1x10[_0x8fe1x46[_0xbadf[109]][_0xbadf[34]]].toString())}}}});_0x8fe1x43= _0x8fe1x44[_0xbadf[111]](_0xbadf[110])};return _0x8fe1x43}function createDescriptionFromConfiguration(_0x8fe1x11,_0x8fe1x35,_0x8fe1x10){var _0x8fe1x49=_0xbadf[59];var _0x8fe1x44=[];if(_0x8fe1x11[_0xbadf[21]][_0xbadf[112]][_0xbadf[67]]> 0){var _0x8fe1x4a=_[_0xbadf[101]](_0x8fe1x11[_0xbadf[21]].Description,[_0xbadf[40]]);_[_0xbadf[95]](_0x8fe1x4a,function(_0x8fe1x46){if(_0x8fe1x46[_0xbadf[102]]=== _0xbadf[103]){_0x8fe1x44[_0xbadf[105]](_0x8fe1x46[_0xbadf[104]])}else {if(_0x8fe1x46[_0xbadf[102]]=== _0xbadf[113]){if(_0x8fe1x46[_0xbadf[114]]=== _0xbadf[103]&& _0x8fe1x46[_0xbadf[115]]){_0x8fe1x44[_0xbadf[105]](util[_0xbadf[58]](_0xbadf[116],_0x8fe1x46[_0xbadf[115]],_0x8fe1x46[_0xbadf[117]]))}else {if(_0x8fe1x46[_0xbadf[114]]=== _0xbadf[106]&& _0x8fe1x46[_0xbadf[107]]&& _0x8fe1x46[_0xbadf[115]]){var _0x8fe1x47=getValueFromPropertyName(_0x8fe1x35,_0x8fe1x46[_0xbadf[107]],_0x8fe1x11);if(_0x8fe1x47){_0x8fe1x44[_0xbadf[105]](util[_0xbadf[58]](_0xbadf[116],_0x8fe1x46[_0xbadf[115]],_0x8fe1x47.toString()))}}else {if(_0x8fe1x46[_0xbadf[114]]=== _0xbadf[108]&& _0x8fe1x46[_0xbadf[109]]&& _0x8fe1x46[_0xbadf[109]][_0xbadf[34]]&& _0x8fe1x46[_0xbadf[115]]){_0x8fe1x10[_0x8fe1x46[_0xbadf[109]][_0xbadf[34]]]&& _0x8fe1x44[_0xbadf[105]](util[_0xbadf[58]](_0xbadf[116],_0x8fe1x46[_0xbadf[115]],_0x8fe1x10[_0x8fe1x46[_0xbadf[109]][_0xbadf[34]]]))}}}}}});_0x8fe1x49= _0x8fe1x44[_0xbadf[111]](_0xbadf[118])};return _0x8fe1x49}function createCustomFieldsFromConfiguration(_0x8fe1x11,_0x8fe1x35,_0x8fe1x10){var _0x8fe1x4c=[];var _0x8fe1x4d=[];if(_0x8fe1x11[_0xbadf[21]][_0xbadf[119]][_0xbadf[67]]> 0){_0x8fe1x4c= _[_0xbadf[120]](_0x8fe1x11[_0xbadf[21]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xbadf[95]](_0x8fe1x4c,function(_0x8fe1x3f){if(_0x8fe1x3f[_0xbadf[102]]=== _0xbadf[103]&& _0x8fe1x3f[_0xbadf[121]]){_0x8fe1x4d[_0xbadf[105]]({id:_0x8fe1x3f[_0xbadf[121]],value:_0x8fe1x3f[_0xbadf[104]]})}else {if(_0x8fe1x3f[_0xbadf[102]]=== _0xbadf[106]&& _0x8fe1x3f[_0xbadf[107]]&& _0x8fe1x3f[_0xbadf[121]]){var _0x8fe1x47=getValueFromPropertyName(_0x8fe1x35,_0x8fe1x3f[_0xbadf[107]],_0x8fe1x11);if(_0x8fe1x47){_0x8fe1x4d[_0xbadf[105]]({id:_0x8fe1x3f[_0xbadf[121]],value:_0x8fe1x47.toString()})}}else {if(_0x8fe1x3f[_0xbadf[102]]=== _0xbadf[108]&& _0x8fe1x3f[_0xbadf[109]]&& _0x8fe1x3f[_0xbadf[109]][_0xbadf[34]]&& _0x8fe1x3f[_0xbadf[121]]){_0x8fe1x10[_0x8fe1x3f[_0xbadf[109]][_0xbadf[34]]]&& _0x8fe1x4d[_0xbadf[105]]({id:_0x8fe1x3f[_0xbadf[121]],value:_0x8fe1x10[_0x8fe1x3f[_0xbadf[109]][_0xbadf[34]]].toString()})}}}})};return _0x8fe1x4d}function createFieldsFromConfiguration(_0x8fe1x11){var _0x8fe1x3e=[];var _0x8fe1x4d=[];if(_0x8fe1x11[_0xbadf[21]][_0xbadf[119]][_0xbadf[67]]> 0){_0x8fe1x3e= _[_0xbadf[120]](_0x8fe1x11[_0xbadf[21]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xbadf[95]](_0x8fe1x3e,function(_0x8fe1x3f){if(_0x8fe1x3f[_0xbadf[102]]=== _0xbadf[103]&& _0x8fe1x3f[_0xbadf[122]]){_0x8fe1x4d[_0xbadf[105]]({id:_0x8fe1x3f[_0xbadf[122]],value:_0x8fe1x3f[_0xbadf[104]]})}})};return _0x8fe1x4d}function handleTicketDisplay(_0x8fe1x11){return function(_0x8fe1xf){if(_0x8fe1xf[_0xbadf[123]]){logger[_0xbadf[13]](_0xbadf[124]);_0x8fe1x11[_0xbadf[123]]= _0x8fe1xf[_0xbadf[123]];var _0x8fe1x50=util[_0xbadf[58]](_0xbadf[125],_0x8fe1x11[_0xbadf[30]][_0xbadf[40]],_0x8fe1x11[_0xbadf[123]][_0xbadf[40]]);return rp({uri:_0x8fe1x11[_0xbadf[22]]+ _0x8fe1x50,method:_0xbadf[89],headers:_0x8fe1x11[_0xbadf[23]],json:true})};return}}function handleReportIntegration(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xb,_0x8fe1xe){return function(){delete _0x8fe1xf[_0xbadf[40]];delete _0x8fe1xf[_0xbadf[126]];delete _0x8fe1xf[_0xbadf[127]];_0x8fe1xf[_0xbadf[128]]= _0xbadf[129];_0x8fe1xf[_0xbadf[130]]= _0x8fe1xd;_0x8fe1xf[_0xbadf[131]]= _0xbadf[132];_0x8fe1xf[_0xbadf[133]]= _0x8fe1x11[_0xbadf[123]][_0xbadf[40]];_0x8fe1xf[_0xbadf[134]]= _0x8fe1x11[_0xbadf[123]][_0xbadf[134]];_0x8fe1xf[_0xbadf[135]]= _0x8fe1xb;_0x8fe1xf[_0xbadf[136]]= _0x8fe1xe;return ReportIntegration[_0xbadf[137]](_0x8fe1xf)}}function handleEnd(_0x8fe1x11,_0x8fe1xf,_0x8fe1xd){return function(){logger[_0xbadf[13]](util[_0xbadf[58]](_0xbadf[138],_0x8fe1x11[_0xbadf[123]][_0xbadf[40]],_0x8fe1x11[_0xbadf[30]][_0xbadf[40]]));_0x8fe1x11= undefined;return}}function handleError(_0x8fe1x11,_0x8fe1xd,_0x8fe1xf,_0x8fe1xb){return function(_0x8fe1x54){logger[_0xbadf[17]](_0xbadf[139]);logger[_0xbadf[17]](_0xbadf[140],_0x8fe1x54[_0xbadf[141]]);logger[_0xbadf[17]](_0xbadf[142],_0x8fe1x54[_0xbadf[143]]);_0x8fe1x11= undefined;delete _0x8fe1xf[_0xbadf[40]];delete _0x8fe1xf[_0xbadf[126]];delete _0x8fe1xf[_0xbadf[127]];_0x8fe1xf[_0xbadf[128]]= _0xbadf[129];_0x8fe1xf[_0xbadf[130]]= _0x8fe1xd;_0x8fe1xf[_0xbadf[131]]= _0xbadf[144];_0x8fe1xf[_0xbadf[135]]= _0x8fe1xb;ReportIntegration[_0xbadf[137]](_0x8fe1xf)[_0xbadf[19]](function(){return})[_0xbadf[18]](function(_0x8fe1x54){logger[_0xbadf[17]](_0xbadf[145]);return})}}function stripTrailingSlash(_0x8fe1x56){if(_0x8fe1x56[_0xbadf[146]](-1) === _0xbadf[147]){return _0x8fe1x56[_0xbadf[146]](0,_0x8fe1x56[_0xbadf[67]]- 1)};return _0x8fe1x56}module[_0xbadf[148]]= Zendesk