Built motion from commit dbc832960.|1.0.25
[motion.git] / server / config / integrations / zendesk.js
index 702291a..206a2a9 100644 (file)
@@ -1 +1 @@
-var _0xf333=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x75\x72\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","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\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","\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","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\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","\x70\x61\x72\x73\x65","\x70\x61\x74\x68","\x73\x65\x61\x72\x63\x68","\x68\x72\x65\x66","\x71\x75\x65\x72\x79","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x74\x61\x62\x55\x72\x6C","\x25\x73\x2F\x61\x67\x65\x6E\x74\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x73","\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","\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","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x74\x6F","\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\x25\x73\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x6F\x70\x65\x6E\x65\x64","\x64\x69\x73\x70\x6C\x61\x79\x65\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"];_0xf333[0];var _=require(_0xf333[1]);var util=require(_0xf333[2]);var url=require(_0xf333[3]);var rp=require(_0xf333[4]);var logger=require(_0xf333[6])(_0xf333[5]);var ZendeskConfiguration=require(_0xf333[8])[_0xf333[7]];var ReportIntegration=require(_0xf333[8])[_0xf333[9]];var VoiceQueue=require(_0xf333[8])[_0xf333[10]];var VoiceExtension=require(_0xf333[8])[_0xf333[11]];var Agent=require(_0xf333[8])[_0xf333[12]];function Zendesk(){logger[_0xf333[14]](_0xf333[13])}Zendesk[_0xf333[16]][_0xf333[15]]= function(_0x895fxc,_0x895fxd,_0x895fxe,_0x895fxf,_0x895fx10,_0x895fx11,_0x895fx12){var _0x895fx13={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined,tabUrl:undefined};if(!_0x895fxc||  !_0x895fxd){logger[_0xf333[18]](_0xf333[17]);return};ZendeskConfiguration[_0xf333[21]]({where:{id:_0x895fxd,AccountId:_0x895fxc},include:[{all:true,include:[{all:true}]}]})[_0xf333[20]](handleEntityNotFound())[_0xf333[20]](handleConnection(_0x895fx13))[_0xf333[20]](searchMotionAgent(_0x895fxe,_0x895fx10))[_0xf333[20]](handleMotionAgent(_0x895fx13))[_0xf333[20]](searchQueue(_0x895fx10))[_0xf333[20]](handleQueueRecordings(_0x895fx13,_0x895fx10))[_0xf333[20]](searchRoute(_0x895fx10))[_0xf333[20]](handleOutboundRecordings(_0x895fx13,_0x895fx10))[_0xf333[20]](searchAgent(_0x895fx13))[_0xf333[20]](handleAgent(_0x895fx13))[_0xf333[20]](searchAdmin(_0x895fx13))[_0xf333[20]](handleAdmin(_0x895fx13))[_0xf333[20]](searchEndUser(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxf))[_0xf333[20]](handleEndUser(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxf))[_0xf333[20]](endUserCreation(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxf))[_0xf333[20]](handleEndUserCreation(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxf))[_0xf333[20]](ticketCreation(_0x895fx13,_0x895fx10,_0x895fx11))[_0xf333[20]](handleTicketDisplay(_0x895fx13))[_0xf333[20]](handleReportIntegration(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxc,_0x895fxf,_0x895fx12))[_0xf333[20]](handleEnd(_0x895fx13))[_0xf333[19]](handleError(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxc))};function handleEntityNotFound(){return function(_0x895fx15){if(!_0x895fx15){return null};return _0x895fx15}}function handleConnection(_0x895fx13){return function(_0x895fx17){var _0x895fx18=getAccountConfiguration(_0x895fx17.ZendeskAccount);_0x895fx13[_0xf333[22]]= _0x895fx17;_0x895fx13[_0xf333[23]]= _0x895fx18[_0xf333[23]];_0x895fx13[_0xf333[24]]= _0x895fx18[_0xf333[24]];_0x895fx13[_0xf333[25]]= _0x895fx17[_0xf333[27]][_0xf333[26]];_0x895fx13[_0xf333[28]]= _0x895fx17[_0xf333[27]][_0xf333[28]]}}function searchMotionAgent(_0x895fxe,_0x895fx10){return function(){var _0x895fx1a=getAgentSearchPropertyFromChannel(_0x895fxe);if(_0x895fx10[_0xf333[29]](_0x895fx1a)){return Agent[_0xf333[33]](_0xf333[32])[_0xf333[31]]({where:{name:getValueFromPropertyName(_0x895fx10,_0x895fx1a)},attributes:[_0xf333[30]]})};return}}function handleMotionAgent(_0x895fx13){return function(_0x895fx1c){if(_0x895fx1c&& _0x895fx1c[_0xf333[30]]){_0x895fx13[_0xf333[34]]= _0x895fx1c[_0xf333[30]]};return}}function searchQueue(_0x895fx10){return function(){if(_0x895fx10[_0xf333[35]]){return VoiceQueue[_0xf333[31]]({where:{name:_0x895fx10[_0xf333[35]]},attributes:[_0xf333[36],_0xf333[37]]})}else {return}}}function handleQueueRecordings(_0x895fx13,_0x895fx10){return function(_0x895fx1f){if(_0x895fx10[_0xf333[35]]){if(_0x895fx1f&& _0x895fx1f[_0xf333[37]]){logger[_0xf333[14]](_0xf333[38],_0x895fx1f[_0xf333[36]]);_0x895fx13[_0xf333[39]]= true}else {_0x895fx13[_0xf333[39]]= false;logger[_0xf333[14]](_0xf333[40])}};return}}function searchRoute(_0x895fx10){return function(){if(_0x895fx10[_0xf333[41]]){return VoiceExtension[_0xf333[31]]({where:{id:_0x895fx10[_0xf333[41]]},attributes:[_0xf333[42],_0xf333[43]]})}else {return}}}function handleOutboundRecordings(_0x895fx13,_0x895fx10){return function(_0x895fx22){if(_0x895fx10[_0xf333[41]]){if(_0x895fx22&& _0x895fx22[_0xf333[43]]){logger[_0xf333[14]](_0xf333[44],_0x895fx22[_0xf333[42]]);_0x895fx13[_0xf333[39]]= true}else {_0x895fx13[_0xf333[39]]= false;logger[_0xf333[14]](_0xf333[45])}};return}}function getAccountConfiguration(_0x895fx24){var _0x895fx25={uri:stripTrailingSlash(_0x895fx24[_0xf333[28]]),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":_0xf333[46],"\x41\x63\x63\x65\x70\x74":_0xf333[46]}};var _0x895fx26=_0x895fx24[_0xf333[47]];if(_0x895fx24[_0xf333[48]]=== _0xf333[49]){_0x895fx26= _0x895fx26+ _0xf333[50]+ _0x895fx24[_0xf333[49]]}else {if(_0x895fx24[_0xf333[48]]=== _0xf333[51]){_0x895fx26= _0x895fx26+ _0xf333[52]+ _0x895fx24[_0xf333[51]]}};_0x895fx25[_0xf333[24]][_0xf333[53]]= _0xf333[54]+  new Buffer(_0x895fx26).toString(_0xf333[55]);return _0x895fx25}function searchAgent(_0x895fx13){return function(){if(_0x895fx13[_0xf333[34]]){logger[_0xf333[14]](_0xf333[56],_0x895fx13[_0xf333[34]]);return rp({uri:_0x895fx13[_0xf333[23]]+ _0xf333[57],qs:{"\x71\x75\x65\x72\x79":util[_0xf333[59]](_0xf333[58],_0x895fx13[_0xf333[34]])},headers:_0x895fx13[_0xf333[24]],json:true})};return}}function getAgentSearchPropertyFromChannel(_0x895fxe){var _0x895fx29=_0xf333[60];if(_0x895fxe){switch(_0x895fxe){case _0xf333[62]:_0x895fx29= _0xf333[61];break;default:_0x895fx29= _0xf333[61];logger[_0xf333[18]](_0xf333[63],_0x895fxe)}};return _0x895fx29}function getValueFromPropertyName(_0x895fx10,_0x895fx29,_0x895fx13){if(_0x895fx29=== _0xf333[64]){if(_0x895fx13&& _0x895fx13[_0xf333[39]]&& _0x895fx13[_0xf333[25]]){return util[_0xf333[59]](_0xf333[65],stripTrailingSlash(_0x895fx13[_0xf333[25]]),_0x895fx10[_0xf333[66]])}else {return null}}else {return _[_0xf333[67]](_0x895fx10,_0x895fx29)}}function handleAgent(_0x895fx13){return function(_0x895fx10){if(_0x895fx10&& _0x895fx10[_0xf333[69]][_0xf333[68]]> 0&& _0x895fx10[_0xf333[70]]> 0){logger[_0xf333[14]](_0xf333[71],_0x895fx13[_0xf333[34]]);_0x895fx13[_0xf333[32]]= getMatchObject(_0x895fx10[_0xf333[69]],_0xf333[36],_0x895fx13[_0xf333[34]]);return _0x895fx13[_0xf333[32]]};return}}function getMatchObject(_0x895fx2d,_0x895fx29,_0x895fx2e){var _0x895fx2f=_[_0xf333[21]](_0x895fx2d,{property:_0x895fx2e});if(_0x895fx2f){return _0x895fx2f};return _[_0xf333[72]](_0x895fx2d)}function searchAdmin(_0x895fx13){return function(_0x895fx10){if(_0x895fx10){return};logger[_0xf333[14]](_0xf333[73]);return rp({uri:_0x895fx13[_0xf333[23]]+ _0xf333[74],headers:_0x895fx13[_0xf333[24]],json:true})}}function handleAdmin(_0x895fx13){return function(_0x895fx10){if(!_0x895fx10){return};if(_0x895fx10[_0xf333[75]]){logger[_0xf333[14]](_0xf333[76]);_0x895fx13[_0xf333[32]]= _0x895fx10[_0xf333[75]]};return}}function searchEndUser(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxf){return function(){logger[_0xf333[14]](_0xf333[77],getValueFromPropertyName(_0x895fx10,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf)));return rp({uri:_0x895fx13[_0xf333[23]]+ _0xf333[57],qs:{"\x71\x75\x65\x72\x79":util[_0xf333[59]](_0xf333[78],getEndUserSearchQueryFromChannel(_0x895fxe),getValueFromPropertyName(_0x895fx10,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf)))},headers:_0x895fx13[_0xf333[24]],json:true})}}function getEndUserSearchQueryFromChannel(_0x895fxe){var _0x895fx29=_0xf333[60];if(_0x895fxe){switch(_0x895fxe){case _0xf333[62]:_0x895fx29= _0xf333[79];break;default:_0x895fx29= _0xf333[79];logger[_0xf333[18]](_0xf333[63],_0x895fxe)}};return _0x895fx29}function getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf){var _0x895fx29=_0xf333[60];if(_0x895fxe){switch(_0x895fxe){case _0xf333[62]:if(_0x895fxf=== _0xf333[80]){_0x895fx29= _0xf333[81]}else {if(_0x895fxf=== _0xf333[35]){_0x895fx29= _0xf333[82]}};break;default:_0x895fx29= _0xf333[82];logger[_0xf333[18]](_0xf333[63],_0x895fxe)}};return _0x895fx29}function getEndUserNamePropertyFromChannel(_0x895fxe,_0x895fxf){var _0x895fx29=_0xf333[60];if(_0x895fxe){switch(_0x895fxe){case _0xf333[62]:if(_0x895fxf=== _0xf333[80]){_0x895fx29= _0xf333[83]}else {if(_0x895fxf=== _0xf333[35]){_0x895fx29= _0xf333[84]}};break;default:_0x895fx29= _0xf333[84];logger[_0xf333[18]](_0xf333[63],_0x895fxe)}};return _0x895fx29}function handleEndUser(_0x895fx13,_0x895fxe,_0x895fx37,_0x895fxf){return function(_0x895fx10){if(_0x895fx10[_0xf333[69]][_0xf333[68]]> 0&& _0x895fx10[_0xf333[70]]> 0){logger[_0xf333[14]](_0xf333[85],getValueFromPropertyName(_0x895fx37,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf)));_0x895fx13[_0xf333[86]]= _0x895fx10[_0xf333[69]][0];return _0x895fx13[_0xf333[86]]};return}}function endUserCreation(_0x895fx13,_0x895fxe,_0x895fx37,_0x895fxf){return function(_0x895fx10){if(_0x895fx10){return};logger[_0xf333[14]](_0xf333[87],getValueFromPropertyName(_0x895fx37,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf)));logger[_0xf333[88]](getJsonForEndUserCreation(_0x895fxe,_0x895fx37,_0x895fxf));return rp({uri:_0x895fx13[_0xf333[23]]+ _0xf333[89],method:_0xf333[90],body:{user:getJsonForEndUserCreation(_0x895fxe,_0x895fx37,_0x895fxf)},headers:_0x895fx13[_0xf333[24]],json:true})}}function getJsonForEndUserCreation(_0x895fxe,_0x895fx10,_0x895fxf){var _0x895fx3a={role:_0xf333[91]};switch(_0x895fxe){case _0xf333[62]:if(_0x895fxf=== _0xf333[35]){if(isValidName(_0x895fx10[_0xf333[84]])){_0x895fx3a[_0xf333[36]]= getValueFromPropertyName(_0x895fx10,getEndUserNamePropertyFromChannel(_0x895fxe,_0x895fxf))}else {_0x895fx3a[_0xf333[36]]= util[_0xf333[59]](_0xf333[92],getValueFromPropertyName(_0x895fx10,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf)))}}else {if(_0x895fxf=== _0xf333[80]){if(isValidName(_0x895fx10[_0xf333[83]])){_0x895fx3a[_0xf333[36]]= getValueFromPropertyName(_0x895fx10,getEndUserNamePropertyFromChannel(_0x895fxe,_0x895fxf))}else {_0x895fx3a[_0xf333[36]]= util[_0xf333[59]](_0xf333[92],getValueFromPropertyName(_0x895fx10,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf)))}}};_0x895fx3a[_0xf333[79]]= getValueFromPropertyName(_0x895fx10,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf));break;default:logger[_0xf333[18]](_0xf333[63],_0x895fxe)};return _0x895fx3a}function isValidName(_0x895fx3c){return _0x895fx3c&& _0x895fx3c!== _0xf333[93]}function handleEndUserCreation(_0x895fx13,_0x895fxe,_0x895fx37,_0x895fxf){return function(_0x895fx10){if(!_0x895fx10){return};if(_0x895fx10[_0xf333[75]]){logger[_0xf333[14]](_0xf333[94],getValueFromPropertyName(_0x895fx37,getEndUserSearchPropertyFromChannel(_0x895fxe,_0x895fxf)));_0x895fx13[_0xf333[86]]= _0x895fx10[_0xf333[75]]};return}}function ticketCreation(_0x895fx13,_0x895fx37,_0x895fx11){return function(){var _0x895fx3f={requester_id:_0x895fx13[_0xf333[86]][_0xf333[42]],submitter_id:_0x895fx13[_0xf333[32]][_0xf333[42]],assignee_id:_0x895fx13[_0xf333[32]][_0xf333[42]],tags:createTagsFromConfiguration(_0x895fx13),subject:createSubjectFromConfiguration(_0x895fx13,_0x895fx37,_0x895fx11),comment:{public:false,body:createDescriptionFromConfiguration(_0x895fx13,_0x895fx37,_0x895fx11)},custom_fields:createCustomFieldsFromConfiguration(_0x895fx13,_0x895fx37,_0x895fx11)};var _0x895fx40=createFieldsFromConfiguration(_0x895fx13);if(_0x895fx40[_0xf333[68]]> 0){_[_0xf333[96]](_0x895fx40,function(_0x895fx41){_0x895fx3f[_0x895fx41[_0xf333[42]]]= _0x895fx41[_0xf333[95]]})};logger[_0xf333[88]](_0xf333[97],_0x895fx3f);return rp({uri:_0x895fx13[_0xf333[23]]+ _0xf333[98],method:_0xf333[90],body:{ticket:_0x895fx3f},headers:_0x895fx13[_0xf333[24]],json:true})}}function createTagsFromConfiguration(_0x895fx13){var _0x895fx43=[];if(_0x895fx13[_0xf333[22]][_0xf333[99]][_0xf333[68]]> 0){_0x895fx43= _[_0xf333[100]](_0x895fx13[_0xf333[22]].Tags,_0xf333[36])};return _0x895fx43}function createSubjectFromConfiguration(_0x895fx13,_0x895fx37,_0x895fx11){var _0x895fx45=_0xf333[60];var _0x895fx46=[];if(_0x895fx13[_0xf333[22]][_0xf333[101]][_0xf333[68]]> 0){var _0x895fx47=_[_0xf333[102]](_0x895fx13[_0xf333[22]].Subject,[_0xf333[42]]);_[_0xf333[96]](_0x895fx47,function(_0x895fx48){if(_0x895fx48[_0xf333[103]]=== _0xf333[104]){_0x895fx46[_0xf333[106]](_0x895fx48[_0xf333[105]])}else {if(_0x895fx48[_0xf333[103]]=== _0xf333[107]&& _0x895fx48[_0xf333[108]]){var _0x895fx49=getValueFromPropertyName(_0x895fx37,_0x895fx48[_0xf333[108]],_0x895fx13);if(_0x895fx49){_0x895fx46[_0xf333[106]](_0x895fx49.toString())}}else {if(_0x895fx48[_0xf333[103]]=== _0xf333[109]&& _0x895fx48[_0xf333[110]]&& _0x895fx48[_0xf333[110]][_0xf333[36]]){_0x895fx11[_0x895fx48[_0xf333[110]][_0xf333[36]]]&& _0x895fx46[_0xf333[106]](_0x895fx11[_0x895fx48[_0xf333[110]][_0xf333[36]]].toString())}}}});_0x895fx45= _0x895fx46[_0xf333[112]](_0xf333[111])};return _0x895fx45}function createDescriptionFromConfiguration(_0x895fx13,_0x895fx37,_0x895fx11){var _0x895fx4b=_0xf333[60];var _0x895fx46=[];if(_0x895fx13[_0xf333[22]][_0xf333[113]][_0xf333[68]]> 0){var _0x895fx4c=_[_0xf333[102]](_0x895fx13[_0xf333[22]].Description,[_0xf333[42]]);_[_0xf333[96]](_0x895fx4c,function(_0x895fx48){if(_0x895fx48[_0xf333[103]]=== _0xf333[104]){_0x895fx46[_0xf333[106]](_0x895fx48[_0xf333[105]])}else {if(_0x895fx48[_0xf333[103]]=== _0xf333[114]){if(_0x895fx48[_0xf333[115]]=== _0xf333[104]&& _0x895fx48[_0xf333[116]]){_0x895fx46[_0xf333[106]](util[_0xf333[59]](_0xf333[117],_0x895fx48[_0xf333[116]],_0x895fx48[_0xf333[118]]))}else {if(_0x895fx48[_0xf333[115]]=== _0xf333[107]&& _0x895fx48[_0xf333[108]]&& _0x895fx48[_0xf333[116]]){var _0x895fx49=getValueFromPropertyName(_0x895fx37,_0x895fx48[_0xf333[108]],_0x895fx13);if(_0x895fx49){_0x895fx46[_0xf333[106]](util[_0xf333[59]](_0xf333[117],_0x895fx48[_0xf333[116]],_0x895fx49.toString()))}}else {if(_0x895fx48[_0xf333[115]]=== _0xf333[109]&& _0x895fx48[_0xf333[110]]&& _0x895fx48[_0xf333[110]][_0xf333[36]]&& _0x895fx48[_0xf333[116]]){_0x895fx11[_0x895fx48[_0xf333[110]][_0xf333[36]]]&& _0x895fx46[_0xf333[106]](util[_0xf333[59]](_0xf333[117],_0x895fx48[_0xf333[116]],_0x895fx11[_0x895fx48[_0xf333[110]][_0xf333[36]]]))}}}}}});_0x895fx4b= _0x895fx46[_0xf333[112]](_0xf333[119])};return _0x895fx4b}function createCustomFieldsFromConfiguration(_0x895fx13,_0x895fx37,_0x895fx11){var _0x895fx4e=[];var _0x895fx4f=[];if(_0x895fx13[_0xf333[22]][_0xf333[120]][_0xf333[68]]> 0){_0x895fx4e= _[_0xf333[121]](_0x895fx13[_0xf333[22]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xf333[96]](_0x895fx4e,function(_0x895fx41){if(_0x895fx41[_0xf333[103]]=== _0xf333[104]&& _0x895fx41[_0xf333[122]]){_0x895fx4f[_0xf333[106]]({id:_0x895fx41[_0xf333[122]],value:_0x895fx41[_0xf333[105]]})}else {if(_0x895fx41[_0xf333[103]]=== _0xf333[107]&& _0x895fx41[_0xf333[108]]&& _0x895fx41[_0xf333[122]]){var _0x895fx49=getValueFromPropertyName(_0x895fx37,_0x895fx41[_0xf333[108]],_0x895fx13);if(_0x895fx49){_0x895fx4f[_0xf333[106]]({id:_0x895fx41[_0xf333[122]],value:_0x895fx49.toString()})}}else {if(_0x895fx41[_0xf333[103]]=== _0xf333[109]&& _0x895fx41[_0xf333[110]]&& _0x895fx41[_0xf333[110]][_0xf333[36]]&& _0x895fx41[_0xf333[122]]){_0x895fx11[_0x895fx41[_0xf333[110]][_0xf333[36]]]&& _0x895fx4f[_0xf333[106]]({id:_0x895fx41[_0xf333[122]],value:_0x895fx11[_0x895fx41[_0xf333[110]][_0xf333[36]]].toString()})}}}})};return _0x895fx4f}function createFieldsFromConfiguration(_0x895fx13){var _0x895fx40=[];var _0x895fx4f=[];if(_0x895fx13[_0xf333[22]][_0xf333[120]][_0xf333[68]]> 0){_0x895fx40= _[_0xf333[121]](_0x895fx13[_0xf333[22]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xf333[96]](_0x895fx40,function(_0x895fx41){if(_0x895fx41[_0xf333[103]]=== _0xf333[104]&& _0x895fx41[_0xf333[123]]){_0x895fx4f[_0xf333[106]]({id:_0x895fx41[_0xf333[123]],value:_0x895fx41[_0xf333[105]]})}})};return _0x895fx4f}function handleTicketDisplay(_0x895fx13){return function(_0x895fx10){if(_0x895fx10[_0xf333[124]]){logger[_0xf333[14]](_0xf333[125]);_0x895fx13[_0xf333[124]]= _0x895fx10[_0xf333[124]];if(_0x895fx13[_0xf333[22]][_0xf333[27]][_0xf333[103]]=== _0xf333[126]){var _0x895fx52=util[_0xf333[59]](_0xf333[127],_0x895fx13[_0xf333[32]][_0xf333[42]],_0x895fx13[_0xf333[124]][_0xf333[42]]);return rp({uri:_0x895fx13[_0xf333[23]]+ _0x895fx52,method:_0xf333[90],headers:_0x895fx13[_0xf333[24]],json:true})}else {var _0x895fx53=url[_0xf333[128]](stripTrailingSlash(_0x895fx13[_0xf333[28]]));delete _0x895fx53[_0xf333[129]];delete _0x895fx53[_0xf333[130]];delete _0x895fx53[_0xf333[131]];delete _0x895fx53[_0xf333[132]];delete _0x895fx53[_0xf333[133]];if(_0x895fx53){_0x895fx13[_0xf333[134]]= util[_0xf333[59]](_0xf333[135],url[_0xf333[59]](_0x895fx53),_0x895fx10[_0xf333[124]][_0xf333[42]])}}};return}}function handleReportIntegration(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxc,_0x895fxf,_0x895fx12){return function(){delete _0x895fx10[_0xf333[42]];delete _0x895fx10[_0xf333[136]];delete _0x895fx10[_0xf333[137]];_0x895fx10[_0xf333[138]]= _0xf333[139];_0x895fx10[_0xf333[140]]= _0x895fxe;_0x895fx10[_0xf333[141]]= _0xf333[142];_0x895fx10[_0xf333[143]]= _0x895fx13[_0xf333[124]][_0xf333[42]];_0x895fx10[_0xf333[3]]= _0x895fx13[_0xf333[124]][_0xf333[3]];_0x895fx10[_0xf333[144]]= _0x895fxc;_0x895fx10[_0xf333[145]]= _0x895fxf;_0x895fx10[_0xf333[146]]= _0x895fx13[_0xf333[22]][_0xf333[27]][_0xf333[103]];if(_0x895fx13[_0xf333[134]]){_0x895fx10[_0xf333[3]]= _0x895fx13[_0xf333[134]];_0x895fx12[_0xf333[150]](util[_0xf333[59]](_0xf333[149],_0x895fx10[_0xf333[61]]))[_0xf333[148]](_0xf333[147],_0x895fx10)};return ReportIntegration[_0xf333[151]](_0x895fx10)}}function handleEnd(_0x895fx13,_0x895fx10,_0x895fxe){return function(){logger[_0xf333[14]](util[_0xf333[59]](_0xf333[152],_0x895fx13[_0xf333[124]][_0xf333[42]],_0x895fx13[_0xf333[134]]?_0xf333[153]:_0xf333[154],_0x895fx13[_0xf333[32]][_0xf333[42]]));_0x895fx13= undefined;return}}function handleError(_0x895fx13,_0x895fxe,_0x895fx10,_0x895fxc){return function(_0x895fx57){logger[_0xf333[18]](_0xf333[155]);logger[_0xf333[18]](_0xf333[156],_0x895fx57[_0xf333[157]]);logger[_0xf333[18]](_0xf333[158],_0x895fx57[_0xf333[159]]);_0x895fx13= undefined;delete _0x895fx10[_0xf333[42]];delete _0x895fx10[_0xf333[136]];delete _0x895fx10[_0xf333[137]];_0x895fx10[_0xf333[138]]= _0xf333[139];_0x895fx10[_0xf333[140]]= _0x895fxe;_0x895fx10[_0xf333[141]]= _0xf333[160];_0x895fx10[_0xf333[144]]= _0x895fxc;ReportIntegration[_0xf333[151]](_0x895fx10)[_0xf333[20]](function(){return})[_0xf333[19]](function(_0x895fx57){logger[_0xf333[18]](_0xf333[161]);return})}}function stripTrailingSlash(_0x895fx59){if(_0x895fx59[_0xf333[162]](-1) === _0xf333[163]){return _0x895fx59[_0xf333[162]](0,_0x895fx59[_0xf333[68]]- 1)};return _0x895fx59}module[_0xf333[164]]= Zendesk
\ No newline at end of file
+var _0x1055=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x75\x72\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","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\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","\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","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\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","\x70\x61\x72\x73\x65","\x70\x61\x74\x68","\x73\x65\x61\x72\x63\x68","\x68\x72\x65\x66","\x71\x75\x65\x72\x79","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x74\x61\x62\x55\x72\x6C","\x25\x73\x2F\x61\x67\x65\x6E\x74\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x73","\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","\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","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x74\x6F","\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\x25\x73\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x6F\x70\x65\x6E\x65\x64","\x64\x69\x73\x70\x6C\x61\x79\x65\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"];_0x1055[0];var _=require(_0x1055[1]);var util=require(_0x1055[2]);var url=require(_0x1055[3]);var rp=require(_0x1055[4]);var logger=require(_0x1055[6])(_0x1055[5]);var ZendeskConfiguration=require(_0x1055[8])[_0x1055[7]];var ReportIntegration=require(_0x1055[8])[_0x1055[9]];var VoiceQueue=require(_0x1055[8])[_0x1055[10]];var VoiceExtension=require(_0x1055[8])[_0x1055[11]];var Agent=require(_0x1055[8])[_0x1055[12]];function Zendesk(){logger[_0x1055[14]](_0x1055[13])}Zendesk[_0x1055[16]][_0x1055[15]]= function(_0x3a7dxc,_0x3a7dxd,_0x3a7dxe,_0x3a7dxf,_0x3a7dx10,_0x3a7dx11,_0x3a7dx12){var _0x3a7dx13={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined,tabUrl:undefined};if(!_0x3a7dxc||  !_0x3a7dxd){logger[_0x1055[18]](_0x1055[17]);return};ZendeskConfiguration[_0x1055[21]]({where:{id:_0x3a7dxd,AccountId:_0x3a7dxc},include:[{all:true,include:[{all:true}]}]})[_0x1055[20]](handleEntityNotFound())[_0x1055[20]](handleConnection(_0x3a7dx13))[_0x1055[20]](searchMotionAgent(_0x3a7dxe,_0x3a7dx10))[_0x1055[20]](handleMotionAgent(_0x3a7dx13))[_0x1055[20]](searchQueue(_0x3a7dx10))[_0x1055[20]](handleQueueRecordings(_0x3a7dx13,_0x3a7dx10))[_0x1055[20]](searchRoute(_0x3a7dx10))[_0x1055[20]](handleOutboundRecordings(_0x3a7dx13,_0x3a7dx10))[_0x1055[20]](searchAgent(_0x3a7dx13))[_0x1055[20]](handleAgent(_0x3a7dx13))[_0x1055[20]](searchAdmin(_0x3a7dx13))[_0x1055[20]](handleAdmin(_0x3a7dx13))[_0x1055[20]](searchEndUser(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxf))[_0x1055[20]](handleEndUser(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxf))[_0x1055[20]](endUserCreation(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxf))[_0x1055[20]](handleEndUserCreation(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxf))[_0x1055[20]](ticketCreation(_0x3a7dx13,_0x3a7dx10,_0x3a7dx11))[_0x1055[20]](handleTicketDisplay(_0x3a7dx13))[_0x1055[20]](handleReportIntegration(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxc,_0x3a7dxf,_0x3a7dx12))[_0x1055[20]](handleEnd(_0x3a7dx13))[_0x1055[19]](handleError(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxc))};function handleEntityNotFound(){return function(_0x3a7dx15){if(!_0x3a7dx15){return null};return _0x3a7dx15}}function handleConnection(_0x3a7dx13){return function(_0x3a7dx17){var _0x3a7dx18=getAccountConfiguration(_0x3a7dx17.ZendeskAccount);_0x3a7dx13[_0x1055[22]]= _0x3a7dx17;_0x3a7dx13[_0x1055[23]]= _0x3a7dx18[_0x1055[23]];_0x3a7dx13[_0x1055[24]]= _0x3a7dx18[_0x1055[24]];_0x3a7dx13[_0x1055[25]]= _0x3a7dx17[_0x1055[27]][_0x1055[26]];_0x3a7dx13[_0x1055[28]]= _0x3a7dx17[_0x1055[27]][_0x1055[28]]}}function searchMotionAgent(_0x3a7dxe,_0x3a7dx10){return function(){var _0x3a7dx1a=getAgentSearchPropertyFromChannel(_0x3a7dxe);if(_0x3a7dx10[_0x1055[29]](_0x3a7dx1a)){return Agent[_0x1055[33]](_0x1055[32])[_0x1055[31]]({where:{name:getValueFromPropertyName(_0x3a7dx10,_0x3a7dx1a)},attributes:[_0x1055[30]]})};return}}function handleMotionAgent(_0x3a7dx13){return function(_0x3a7dx1c){if(_0x3a7dx1c&& _0x3a7dx1c[_0x1055[30]]){_0x3a7dx13[_0x1055[34]]= _0x3a7dx1c[_0x1055[30]]};return}}function searchQueue(_0x3a7dx10){return function(){if(_0x3a7dx10[_0x1055[35]]){return VoiceQueue[_0x1055[31]]({where:{name:_0x3a7dx10[_0x1055[35]]},attributes:[_0x1055[36],_0x1055[37]]})}else {return}}}function handleQueueRecordings(_0x3a7dx13,_0x3a7dx10){return function(_0x3a7dx1f){if(_0x3a7dx10[_0x1055[35]]){if(_0x3a7dx1f&& _0x3a7dx1f[_0x1055[37]]){logger[_0x1055[14]](_0x1055[38],_0x3a7dx1f[_0x1055[36]]);_0x3a7dx13[_0x1055[39]]= true}else {_0x3a7dx13[_0x1055[39]]= false;logger[_0x1055[14]](_0x1055[40])}};return}}function searchRoute(_0x3a7dx10){return function(){if(_0x3a7dx10[_0x1055[41]]){return VoiceExtension[_0x1055[31]]({where:{id:_0x3a7dx10[_0x1055[41]]},attributes:[_0x1055[42],_0x1055[43]]})}else {return}}}function handleOutboundRecordings(_0x3a7dx13,_0x3a7dx10){return function(_0x3a7dx22){if(_0x3a7dx10[_0x1055[41]]){if(_0x3a7dx22&& _0x3a7dx22[_0x1055[43]]){logger[_0x1055[14]](_0x1055[44],_0x3a7dx22[_0x1055[42]]);_0x3a7dx13[_0x1055[39]]= true}else {_0x3a7dx13[_0x1055[39]]= false;logger[_0x1055[14]](_0x1055[45])}};return}}function getAccountConfiguration(_0x3a7dx24){var _0x3a7dx25={uri:stripTrailingSlash(_0x3a7dx24[_0x1055[28]]),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":_0x1055[46],"\x41\x63\x63\x65\x70\x74":_0x1055[46]}};var _0x3a7dx26=_0x3a7dx24[_0x1055[47]];if(_0x3a7dx24[_0x1055[48]]=== _0x1055[49]){_0x3a7dx26= _0x3a7dx26+ _0x1055[50]+ _0x3a7dx24[_0x1055[49]]}else {if(_0x3a7dx24[_0x1055[48]]=== _0x1055[51]){_0x3a7dx26= _0x3a7dx26+ _0x1055[52]+ _0x3a7dx24[_0x1055[51]]}};_0x3a7dx25[_0x1055[24]][_0x1055[53]]= _0x1055[54]+  new Buffer(_0x3a7dx26).toString(_0x1055[55]);return _0x3a7dx25}function searchAgent(_0x3a7dx13){return function(){if(_0x3a7dx13[_0x1055[34]]){logger[_0x1055[14]](_0x1055[56],_0x3a7dx13[_0x1055[34]]);return rp({uri:_0x3a7dx13[_0x1055[23]]+ _0x1055[57],qs:{"\x71\x75\x65\x72\x79":util[_0x1055[59]](_0x1055[58],_0x3a7dx13[_0x1055[34]])},headers:_0x3a7dx13[_0x1055[24]],json:true})};return}}function getAgentSearchPropertyFromChannel(_0x3a7dxe){var _0x3a7dx29=_0x1055[60];if(_0x3a7dxe){switch(_0x3a7dxe){case _0x1055[62]:_0x3a7dx29= _0x1055[61];break;default:_0x3a7dx29= _0x1055[61];logger[_0x1055[18]](_0x1055[63],_0x3a7dxe)}};return _0x3a7dx29}function getValueFromPropertyName(_0x3a7dx10,_0x3a7dx29,_0x3a7dx13){if(_0x3a7dx29=== _0x1055[64]){if(_0x3a7dx13&& _0x3a7dx13[_0x1055[39]]&& _0x3a7dx13[_0x1055[25]]){return util[_0x1055[59]](_0x1055[65],stripTrailingSlash(_0x3a7dx13[_0x1055[25]]),_0x3a7dx10[_0x1055[66]])}else {return null}}else {return _[_0x1055[67]](_0x3a7dx10,_0x3a7dx29)}}function handleAgent(_0x3a7dx13){return function(_0x3a7dx10){if(_0x3a7dx10&& _0x3a7dx10[_0x1055[69]][_0x1055[68]]> 0&& _0x3a7dx10[_0x1055[70]]> 0){logger[_0x1055[14]](_0x1055[71],_0x3a7dx13[_0x1055[34]]);_0x3a7dx13[_0x1055[32]]= getMatchObject(_0x3a7dx10[_0x1055[69]],_0x1055[36],_0x3a7dx13[_0x1055[34]]);return _0x3a7dx13[_0x1055[32]]};return}}function getMatchObject(_0x3a7dx2d,_0x3a7dx29,_0x3a7dx2e){var _0x3a7dx2f=_[_0x1055[21]](_0x3a7dx2d,{property:_0x3a7dx2e});if(_0x3a7dx2f){return _0x3a7dx2f};return _[_0x1055[72]](_0x3a7dx2d)}function searchAdmin(_0x3a7dx13){return function(_0x3a7dx10){if(_0x3a7dx10){return};logger[_0x1055[14]](_0x1055[73]);return rp({uri:_0x3a7dx13[_0x1055[23]]+ _0x1055[74],headers:_0x3a7dx13[_0x1055[24]],json:true})}}function handleAdmin(_0x3a7dx13){return function(_0x3a7dx10){if(!_0x3a7dx10){return};if(_0x3a7dx10[_0x1055[75]]){logger[_0x1055[14]](_0x1055[76]);_0x3a7dx13[_0x1055[32]]= _0x3a7dx10[_0x1055[75]]};return}}function searchEndUser(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxf){return function(){logger[_0x1055[14]](_0x1055[77],getValueFromPropertyName(_0x3a7dx10,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf)));return rp({uri:_0x3a7dx13[_0x1055[23]]+ _0x1055[57],qs:{"\x71\x75\x65\x72\x79":util[_0x1055[59]](_0x1055[78],getEndUserSearchQueryFromChannel(_0x3a7dxe),getValueFromPropertyName(_0x3a7dx10,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf)))},headers:_0x3a7dx13[_0x1055[24]],json:true})}}function getEndUserSearchQueryFromChannel(_0x3a7dxe){var _0x3a7dx29=_0x1055[60];if(_0x3a7dxe){switch(_0x3a7dxe){case _0x1055[62]:_0x3a7dx29= _0x1055[79];break;default:_0x3a7dx29= _0x1055[79];logger[_0x1055[18]](_0x1055[63],_0x3a7dxe)}};return _0x3a7dx29}function getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf){var _0x3a7dx29=_0x1055[60];if(_0x3a7dxe){switch(_0x3a7dxe){case _0x1055[62]:if(_0x3a7dxf=== _0x1055[80]){_0x3a7dx29= _0x1055[81]}else {if(_0x3a7dxf=== _0x1055[35]){_0x3a7dx29= _0x1055[82]}};break;default:_0x3a7dx29= _0x1055[82];logger[_0x1055[18]](_0x1055[63],_0x3a7dxe)}};return _0x3a7dx29}function getEndUserNamePropertyFromChannel(_0x3a7dxe,_0x3a7dxf){var _0x3a7dx29=_0x1055[60];if(_0x3a7dxe){switch(_0x3a7dxe){case _0x1055[62]:if(_0x3a7dxf=== _0x1055[80]){_0x3a7dx29= _0x1055[83]}else {if(_0x3a7dxf=== _0x1055[35]){_0x3a7dx29= _0x1055[84]}};break;default:_0x3a7dx29= _0x1055[84];logger[_0x1055[18]](_0x1055[63],_0x3a7dxe)}};return _0x3a7dx29}function handleEndUser(_0x3a7dx13,_0x3a7dxe,_0x3a7dx37,_0x3a7dxf){return function(_0x3a7dx10){if(_0x3a7dx10[_0x1055[69]][_0x1055[68]]> 0&& _0x3a7dx10[_0x1055[70]]> 0){logger[_0x1055[14]](_0x1055[85],getValueFromPropertyName(_0x3a7dx37,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf)));_0x3a7dx13[_0x1055[86]]= _0x3a7dx10[_0x1055[69]][0];return _0x3a7dx13[_0x1055[86]]};return}}function endUserCreation(_0x3a7dx13,_0x3a7dxe,_0x3a7dx37,_0x3a7dxf){return function(_0x3a7dx10){if(_0x3a7dx10){return};logger[_0x1055[14]](_0x1055[87],getValueFromPropertyName(_0x3a7dx37,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf)));logger[_0x1055[88]](getJsonForEndUserCreation(_0x3a7dxe,_0x3a7dx37,_0x3a7dxf));return rp({uri:_0x3a7dx13[_0x1055[23]]+ _0x1055[89],method:_0x1055[90],body:{user:getJsonForEndUserCreation(_0x3a7dxe,_0x3a7dx37,_0x3a7dxf)},headers:_0x3a7dx13[_0x1055[24]],json:true})}}function getJsonForEndUserCreation(_0x3a7dxe,_0x3a7dx10,_0x3a7dxf){var _0x3a7dx3a={role:_0x1055[91]};switch(_0x3a7dxe){case _0x1055[62]:if(_0x3a7dxf=== _0x1055[35]){if(isValidName(_0x3a7dx10[_0x1055[84]])){_0x3a7dx3a[_0x1055[36]]= getValueFromPropertyName(_0x3a7dx10,getEndUserNamePropertyFromChannel(_0x3a7dxe,_0x3a7dxf))}else {_0x3a7dx3a[_0x1055[36]]= util[_0x1055[59]](_0x1055[92],getValueFromPropertyName(_0x3a7dx10,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf)))}}else {if(_0x3a7dxf=== _0x1055[80]){if(isValidName(_0x3a7dx10[_0x1055[83]])){_0x3a7dx3a[_0x1055[36]]= getValueFromPropertyName(_0x3a7dx10,getEndUserNamePropertyFromChannel(_0x3a7dxe,_0x3a7dxf))}else {_0x3a7dx3a[_0x1055[36]]= util[_0x1055[59]](_0x1055[92],getValueFromPropertyName(_0x3a7dx10,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf)))}}};_0x3a7dx3a[_0x1055[79]]= getValueFromPropertyName(_0x3a7dx10,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf));break;default:logger[_0x1055[18]](_0x1055[63],_0x3a7dxe)};return _0x3a7dx3a}function isValidName(_0x3a7dx3c){return _0x3a7dx3c&& _0x3a7dx3c!== _0x1055[93]}function handleEndUserCreation(_0x3a7dx13,_0x3a7dxe,_0x3a7dx37,_0x3a7dxf){return function(_0x3a7dx10){if(!_0x3a7dx10){return};if(_0x3a7dx10[_0x1055[75]]){logger[_0x1055[14]](_0x1055[94],getValueFromPropertyName(_0x3a7dx37,getEndUserSearchPropertyFromChannel(_0x3a7dxe,_0x3a7dxf)));_0x3a7dx13[_0x1055[86]]= _0x3a7dx10[_0x1055[75]]};return}}function ticketCreation(_0x3a7dx13,_0x3a7dx37,_0x3a7dx11){return function(){var _0x3a7dx3f={requester_id:_0x3a7dx13[_0x1055[86]][_0x1055[42]],submitter_id:_0x3a7dx13[_0x1055[32]][_0x1055[42]],assignee_id:_0x3a7dx13[_0x1055[32]][_0x1055[42]],tags:createTagsFromConfiguration(_0x3a7dx13),subject:createSubjectFromConfiguration(_0x3a7dx13,_0x3a7dx37,_0x3a7dx11),comment:{public:false,body:createDescriptionFromConfiguration(_0x3a7dx13,_0x3a7dx37,_0x3a7dx11)},custom_fields:createCustomFieldsFromConfiguration(_0x3a7dx13,_0x3a7dx37,_0x3a7dx11)};var _0x3a7dx40=createFieldsFromConfiguration(_0x3a7dx13);if(_0x3a7dx40[_0x1055[68]]> 0){_[_0x1055[96]](_0x3a7dx40,function(_0x3a7dx41){_0x3a7dx3f[_0x3a7dx41[_0x1055[42]]]= _0x3a7dx41[_0x1055[95]]})};logger[_0x1055[88]](_0x1055[97],_0x3a7dx3f);return rp({uri:_0x3a7dx13[_0x1055[23]]+ _0x1055[98],method:_0x1055[90],body:{ticket:_0x3a7dx3f},headers:_0x3a7dx13[_0x1055[24]],json:true})}}function createTagsFromConfiguration(_0x3a7dx13){var _0x3a7dx43=[];if(_0x3a7dx13[_0x1055[22]][_0x1055[99]][_0x1055[68]]> 0){_0x3a7dx43= _[_0x1055[100]](_0x3a7dx13[_0x1055[22]].Tags,_0x1055[36])};return _0x3a7dx43}function createSubjectFromConfiguration(_0x3a7dx13,_0x3a7dx37,_0x3a7dx11){var _0x3a7dx45=_0x1055[60];var _0x3a7dx46=[];if(_0x3a7dx13[_0x1055[22]][_0x1055[101]][_0x1055[68]]> 0){var _0x3a7dx47=_[_0x1055[102]](_0x3a7dx13[_0x1055[22]].Subject,[_0x1055[42]]);_[_0x1055[96]](_0x3a7dx47,function(_0x3a7dx48){if(_0x3a7dx48[_0x1055[103]]=== _0x1055[104]){_0x3a7dx46[_0x1055[106]](_0x3a7dx48[_0x1055[105]])}else {if(_0x3a7dx48[_0x1055[103]]=== _0x1055[107]&& _0x3a7dx48[_0x1055[108]]){var _0x3a7dx49=getValueFromPropertyName(_0x3a7dx37,_0x3a7dx48[_0x1055[108]],_0x3a7dx13);if(_0x3a7dx49){_0x3a7dx46[_0x1055[106]](_0x3a7dx49.toString())}}else {if(_0x3a7dx48[_0x1055[103]]=== _0x1055[109]&& _0x3a7dx48[_0x1055[110]]&& _0x3a7dx48[_0x1055[110]][_0x1055[36]]){_0x3a7dx11[_0x3a7dx48[_0x1055[110]][_0x1055[36]]]&& _0x3a7dx46[_0x1055[106]](_0x3a7dx11[_0x3a7dx48[_0x1055[110]][_0x1055[36]]].toString())}}}});_0x3a7dx45= _0x3a7dx46[_0x1055[112]](_0x1055[111])};return _0x3a7dx45}function createDescriptionFromConfiguration(_0x3a7dx13,_0x3a7dx37,_0x3a7dx11){var _0x3a7dx4b=_0x1055[60];var _0x3a7dx46=[];if(_0x3a7dx13[_0x1055[22]][_0x1055[113]][_0x1055[68]]> 0){var _0x3a7dx4c=_[_0x1055[102]](_0x3a7dx13[_0x1055[22]].Description,[_0x1055[42]]);_[_0x1055[96]](_0x3a7dx4c,function(_0x3a7dx48){if(_0x3a7dx48[_0x1055[103]]=== _0x1055[104]){_0x3a7dx46[_0x1055[106]](_0x3a7dx48[_0x1055[105]])}else {if(_0x3a7dx48[_0x1055[103]]=== _0x1055[114]){if(_0x3a7dx48[_0x1055[115]]=== _0x1055[104]&& _0x3a7dx48[_0x1055[116]]){_0x3a7dx46[_0x1055[106]](util[_0x1055[59]](_0x1055[117],_0x3a7dx48[_0x1055[116]],_0x3a7dx48[_0x1055[118]]))}else {if(_0x3a7dx48[_0x1055[115]]=== _0x1055[107]&& _0x3a7dx48[_0x1055[108]]&& _0x3a7dx48[_0x1055[116]]){var _0x3a7dx49=getValueFromPropertyName(_0x3a7dx37,_0x3a7dx48[_0x1055[108]],_0x3a7dx13);if(_0x3a7dx49){_0x3a7dx46[_0x1055[106]](util[_0x1055[59]](_0x1055[117],_0x3a7dx48[_0x1055[116]],_0x3a7dx49.toString()))}}else {if(_0x3a7dx48[_0x1055[115]]=== _0x1055[109]&& _0x3a7dx48[_0x1055[110]]&& _0x3a7dx48[_0x1055[110]][_0x1055[36]]&& _0x3a7dx48[_0x1055[116]]){_0x3a7dx11[_0x3a7dx48[_0x1055[110]][_0x1055[36]]]&& _0x3a7dx46[_0x1055[106]](util[_0x1055[59]](_0x1055[117],_0x3a7dx48[_0x1055[116]],_0x3a7dx11[_0x3a7dx48[_0x1055[110]][_0x1055[36]]]))}}}}}});_0x3a7dx4b= _0x3a7dx46[_0x1055[112]](_0x1055[119])};return _0x3a7dx4b}function createCustomFieldsFromConfiguration(_0x3a7dx13,_0x3a7dx37,_0x3a7dx11){var _0x3a7dx4e=[];var _0x3a7dx4f=[];if(_0x3a7dx13[_0x1055[22]][_0x1055[120]][_0x1055[68]]> 0){_0x3a7dx4e= _[_0x1055[121]](_0x3a7dx13[_0x1055[22]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0x1055[96]](_0x3a7dx4e,function(_0x3a7dx41){if(_0x3a7dx41[_0x1055[103]]=== _0x1055[104]&& _0x3a7dx41[_0x1055[122]]){_0x3a7dx4f[_0x1055[106]]({id:_0x3a7dx41[_0x1055[122]],value:_0x3a7dx41[_0x1055[105]]})}else {if(_0x3a7dx41[_0x1055[103]]=== _0x1055[107]&& _0x3a7dx41[_0x1055[108]]&& _0x3a7dx41[_0x1055[122]]){var _0x3a7dx49=getValueFromPropertyName(_0x3a7dx37,_0x3a7dx41[_0x1055[108]],_0x3a7dx13);if(_0x3a7dx49){_0x3a7dx4f[_0x1055[106]]({id:_0x3a7dx41[_0x1055[122]],value:_0x3a7dx49.toString()})}}else {if(_0x3a7dx41[_0x1055[103]]=== _0x1055[109]&& _0x3a7dx41[_0x1055[110]]&& _0x3a7dx41[_0x1055[110]][_0x1055[36]]&& _0x3a7dx41[_0x1055[122]]){_0x3a7dx11[_0x3a7dx41[_0x1055[110]][_0x1055[36]]]&& _0x3a7dx4f[_0x1055[106]]({id:_0x3a7dx41[_0x1055[122]],value:_0x3a7dx11[_0x3a7dx41[_0x1055[110]][_0x1055[36]]].toString()})}}}})};return _0x3a7dx4f}function createFieldsFromConfiguration(_0x3a7dx13){var _0x3a7dx40=[];var _0x3a7dx4f=[];if(_0x3a7dx13[_0x1055[22]][_0x1055[120]][_0x1055[68]]> 0){_0x3a7dx40= _[_0x1055[121]](_0x3a7dx13[_0x1055[22]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0x1055[96]](_0x3a7dx40,function(_0x3a7dx41){if(_0x3a7dx41[_0x1055[103]]=== _0x1055[104]&& _0x3a7dx41[_0x1055[123]]){_0x3a7dx4f[_0x1055[106]]({id:_0x3a7dx41[_0x1055[123]],value:_0x3a7dx41[_0x1055[105]]})}})};return _0x3a7dx4f}function handleTicketDisplay(_0x3a7dx13){return function(_0x3a7dx10){if(_0x3a7dx10[_0x1055[124]]){logger[_0x1055[14]](_0x1055[125]);_0x3a7dx13[_0x1055[124]]= _0x3a7dx10[_0x1055[124]];if(_0x3a7dx13[_0x1055[22]][_0x1055[27]][_0x1055[103]]=== _0x1055[126]){var _0x3a7dx52=util[_0x1055[59]](_0x1055[127],_0x3a7dx13[_0x1055[32]][_0x1055[42]],_0x3a7dx13[_0x1055[124]][_0x1055[42]]);return rp({uri:_0x3a7dx13[_0x1055[23]]+ _0x3a7dx52,method:_0x1055[90],headers:_0x3a7dx13[_0x1055[24]],json:true})}else {var _0x3a7dx53=url[_0x1055[128]](stripTrailingSlash(_0x3a7dx13[_0x1055[28]]));delete _0x3a7dx53[_0x1055[129]];delete _0x3a7dx53[_0x1055[130]];delete _0x3a7dx53[_0x1055[131]];delete _0x3a7dx53[_0x1055[132]];delete _0x3a7dx53[_0x1055[133]];if(_0x3a7dx53){_0x3a7dx13[_0x1055[134]]= util[_0x1055[59]](_0x1055[135],url[_0x1055[59]](_0x3a7dx53),_0x3a7dx10[_0x1055[124]][_0x1055[42]])}}};return}}function handleReportIntegration(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxc,_0x3a7dxf,_0x3a7dx12){return function(){delete _0x3a7dx10[_0x1055[42]];delete _0x3a7dx10[_0x1055[136]];delete _0x3a7dx10[_0x1055[137]];_0x3a7dx10[_0x1055[138]]= _0x1055[139];_0x3a7dx10[_0x1055[140]]= _0x3a7dxe;_0x3a7dx10[_0x1055[141]]= _0x1055[142];_0x3a7dx10[_0x1055[143]]= _0x3a7dx13[_0x1055[124]][_0x1055[42]];_0x3a7dx10[_0x1055[3]]= _0x3a7dx13[_0x1055[124]][_0x1055[3]];_0x3a7dx10[_0x1055[144]]= _0x3a7dxc;_0x3a7dx10[_0x1055[145]]= _0x3a7dxf;_0x3a7dx10[_0x1055[146]]= _0x3a7dx13[_0x1055[22]][_0x1055[27]][_0x1055[103]];if(_0x3a7dx13[_0x1055[134]]){_0x3a7dx10[_0x1055[3]]= _0x3a7dx13[_0x1055[134]];_0x3a7dx12[_0x1055[150]](util[_0x1055[59]](_0x1055[149],_0x3a7dx10[_0x1055[61]]))[_0x1055[148]](_0x1055[147],_0x3a7dx10)};return ReportIntegration[_0x1055[151]](_0x3a7dx10)}}function handleEnd(_0x3a7dx13,_0x3a7dx10,_0x3a7dxe){return function(){logger[_0x1055[14]](util[_0x1055[59]](_0x1055[152],_0x3a7dx13[_0x1055[124]][_0x1055[42]],_0x3a7dx13[_0x1055[134]]?_0x1055[153]:_0x1055[154],_0x3a7dx13[_0x1055[32]][_0x1055[42]]));_0x3a7dx13= undefined;return}}function handleError(_0x3a7dx13,_0x3a7dxe,_0x3a7dx10,_0x3a7dxc){return function(_0x3a7dx57){logger[_0x1055[18]](_0x1055[155]);logger[_0x1055[18]](_0x1055[156],_0x3a7dx57[_0x1055[157]]);logger[_0x1055[18]](_0x1055[158],_0x3a7dx57[_0x1055[159]]);_0x3a7dx13= undefined;delete _0x3a7dx10[_0x1055[42]];delete _0x3a7dx10[_0x1055[136]];delete _0x3a7dx10[_0x1055[137]];_0x3a7dx10[_0x1055[138]]= _0x1055[139];_0x3a7dx10[_0x1055[140]]= _0x3a7dxe;_0x3a7dx10[_0x1055[141]]= _0x1055[160];_0x3a7dx10[_0x1055[144]]= _0x3a7dxc;ReportIntegration[_0x1055[151]](_0x3a7dx10)[_0x1055[20]](function(){return})[_0x1055[19]](function(_0x3a7dx57){logger[_0x1055[18]](_0x1055[161]);return})}}function stripTrailingSlash(_0x3a7dx59){if(_0x3a7dx59[_0x1055[162]](-1) === _0x1055[163]){return _0x3a7dx59[_0x1055[162]](0,_0x3a7dx59[_0x1055[68]]- 1)};return _0x3a7dx59}module[_0x1055[164]]= Zendesk
\ No newline at end of file