1 var _0x1989=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x6D\x6F\x6D\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\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","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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","\x6C\x6F\x67","\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\x6E\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x65\x78\x65\x63\x75\x74\x65","\x55\x73\x65\x72","\x73\x6F\x62\x6A\x65\x63\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","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x61\x67\x65\x6E\x74","\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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","\x69\x64\x65\x6E\x74\x69\x74\x79","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x43\x6F\x6E\x74\x61\x63\x74","\x50\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x4C\x65\x61\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x2F\x4C\x65\x61\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x63\x72\x65\x61\x74\x65","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x4C\x61\x73\x74\x4E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x73\x75\x63\x63\x65\x73\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x49\x64","\x75\x74\x63","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x54\x61\x73\x6B","\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","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x69\x64\x46\x69\x65\x6C\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x61\x73\x6B\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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"];_0x1989[0];var _=require(_0x1989[1]);var util=require(_0x1989[2]);var jsforce=require(_0x1989[3]);var moment=require(_0x1989[4]);var SalesforceIntegration=require(_0x1989[6])[_0x1989[5]];var SalesforceConfiguration=require(_0x1989[6])[_0x1989[7]];var ReportIntegration=require(_0x1989[6])[_0x1989[8]];var VoiceQueue=require(_0x1989[6])[_0x1989[9]];var VoiceExtension=require(_0x1989[6])[_0x1989[10]];function Salesforce(){console[_0x1989[12]](_0x1989[11])}Salesforce[_0x1989[14]][_0x1989[13]]= function(_0x1061xb,_0x1061xc,_0x1061xd,_0x1061xe,_0x1061xf,_0x1061x10){var _0x1061x11={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined};if(!_0x1061xb|| !_0x1061xc){console[_0x1989[16]](_0x1989[15]);return};SalesforceConfiguration[_0x1989[19]]({where:{id:_0x1061xc,AccountId:_0x1061xb},include:[{all:true,include:[{all:true}]}]})[_0x1989[18]](handleEntityNotFound())[_0x1989[18]](handleConnection(_0x1061x11))[_0x1989[18]](searchQueue(_0x1061xf))[_0x1989[18]](handleQueueRecordings(_0x1061x11))[_0x1989[18]](searchRoute(_0x1061xf))[_0x1989[18]](handleOutboundRecordings(_0x1061x11))[_0x1989[18]](searchAgent(_0x1061x11,_0x1061xd,_0x1061xf))[_0x1989[18]](handleAgent(_0x1061x11,_0x1061xd,_0x1061xf))[_0x1989[18]](searchAdmin(_0x1061x11))[_0x1989[18]](handleAdmin(_0x1061x11))[_0x1989[18]](searchContact(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xe))[_0x1989[18]](handleContact(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xe))[_0x1989[18]](searchLead(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xe))[_0x1989[18]](handleLead(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xe))[_0x1989[18]](leadCreation(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xe))[_0x1989[18]](handleLeadCreation(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xe))[_0x1989[18]](taskCreation(_0x1061x11,_0x1061xf,_0x1061x10))[_0x1989[18]](handleTaskDisplay(_0x1061x11))[_0x1989[18]](handleReportIntegration(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xb))[_0x1989[18]](handleEnd(_0x1061x11))[_0x1989[17]](handleError(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xb))};function handleEntityNotFound(){return function(_0x1061x13){if(!_0x1061x13){return null};return _0x1061x13}}function handleConnection(_0x1061x11){return function(_0x1061x15){_0x1061x11[_0x1989[20]]= new jsforce.Connection({oauth2:{loginUrl:_0x1061x15[_0x1989[22]][_0x1989[21]]?_0x1061x15[_0x1989[22]][_0x1989[21]]:_0x1989[23],clientId:_0x1061x15[_0x1989[22]][_0x1989[24]],clientSecret:_0x1061x15[_0x1989[22]][_0x1989[25]]}});var _0x1061x16=_0x1061x15[_0x1989[22]][_0x1989[28]][_0x1989[27]](_0x1061x15[_0x1989[22]][_0x1989[26]]);_0x1061x11[_0x1989[29]]= _0x1061x15;_0x1061x11[_0x1989[30]]= _0x1061x15[_0x1989[22]][_0x1989[31]];return _0x1061x11[_0x1989[20]][_0x1989[33]](_0x1061x15[_0x1989[22]][_0x1989[32]],_0x1061x16)}}function searchQueue(_0x1061xf){return function(){if(_0x1061xf[_0x1989[34]]){return VoiceQueue[_0x1989[37]]({where:{name:_0x1061xf[_0x1989[34]]},attributes:[_0x1989[35],_0x1989[36]]})}else {return}}}function handleQueueRecordings(_0x1061x11){return function(_0x1061x19){if(_0x1061x19&& _0x1061x19[_0x1989[36]]){console[_0x1989[12]](_0x1989[38],_0x1061x19[_0x1989[35]]);_0x1061x11[_0x1989[39]]= true}else {_0x1061x11[_0x1989[39]]= false;console[_0x1989[12]](_0x1989[40]);return}}}function searchRoute(_0x1061xf){return function(){if(_0x1061xf[_0x1989[41]]){return VoiceExtension[_0x1989[37]]({where:{id:_0x1061xf[_0x1989[41]]},attributes:[_0x1989[42],_0x1989[43]]})}else {return}}}function handleOutboundRecordings(_0x1061x11){return function(_0x1061x1c){if(_0x1061x1c&& _0x1061x1c[_0x1989[43]]){console[_0x1989[12]](_0x1989[44],_0x1061x1c[_0x1989[42]]);_0x1061x11[_0x1989[39]]= true}else {_0x1061x11[_0x1989[39]]= false;console[_0x1989[12]](_0x1989[45]);return}}}function searchAgent(_0x1061x11,_0x1061xd,_0x1061xf){return function(){console[_0x1989[12]](_0x1989[46],getValueFromPropertyName(_0x1061xf,getAgentSearchPropertyFromChannel(_0x1061xd)));return _0x1061x11[_0x1989[20]][_0x1989[49]](_0x1989[48])[_0x1989[19]]({Name:getValueFromPropertyName(_0x1061xf,getAgentSearchPropertyFromChannel(_0x1061xd))},{Id:1,Username:1,Name:1})[_0x1989[47]]()}}function getAgentSearchPropertyFromChannel(_0x1061xd){var _0x1061x1f=_0x1989[50];if(_0x1061xd){switch(_0x1061xd){case _0x1989[52]:_0x1061x1f= _0x1989[51];break;default:_0x1061x1f= _0x1989[51];console[_0x1989[16]](_0x1989[53],_0x1061xd)}};return _0x1061x1f}function getValueFromPropertyName(_0x1061xf,_0x1061x1f,_0x1061x11){if(_0x1061x1f=== _0x1989[54]){if(_0x1061x11&& _0x1061x11[_0x1989[39]]&& _0x1061x11[_0x1989[30]]){return util[_0x1989[57]](_0x1989[55],stripTrailingSlash(_0x1061x11[_0x1989[30]]),_0x1061xf[_0x1989[56]])}else {return null}}else {return _[_0x1989[58]](_0x1061xf,_0x1061x1f)}}function handleAgent(_0x1061x11,_0x1061xd,_0x1061x22){return function(_0x1061xf){if(_0x1061xf[_0x1989[59]]> 0){console[_0x1989[12]](_0x1989[60],getValueFromPropertyName(_0x1061x22,getAgentSearchPropertyFromChannel(_0x1061xd)));_0x1061x11[_0x1989[61]]= getMatchObject(_0x1061xf,_0x1989[62],getValueFromPropertyName(_0x1061x22,getAgentSearchPropertyFromChannel(_0x1061xd)));return _0x1061x11[_0x1989[61]]};return}}function getMatchObject(_0x1061x24,_0x1061x1f,_0x1061x25){var _0x1061x26=_[_0x1989[19]](_0x1061x24,{property:_0x1061x25});if(_0x1061x26){return _0x1061x26};return _[_0x1989[63]](_0x1061x24)}function searchAdmin(_0x1061x11){return function(_0x1061xf){if(_0x1061xf){return};console[_0x1989[12]](_0x1989[64]);return _0x1061x11[_0x1989[20]][_0x1989[65]]()}}function handleAdmin(_0x1061x11){return function(_0x1061xf){if(!_0x1061xf){return};if(_0x1061xf){console[_0x1989[12]](_0x1989[66]);_0x1061x11[_0x1989[61]]= {Id:_0x1061xf[_0x1989[67]],Name:_0x1061xf[_0x1989[68]],Username:_0x1061xf[_0x1989[32]]}};return}}function searchContact(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xe){return function(){console[_0x1989[12]](_0x1989[69],getValueFromPropertyName(_0x1061xf,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)));var _0x1061x2a={};_0x1061x2a[getEndUserSearchQueryFromChannel(_0x1061xd)]= getValueFromPropertyName(_0x1061xf,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe));return _0x1061x11[_0x1989[20]][_0x1989[49]](_0x1989[70])[_0x1989[19]](_0x1061x2a,{Id:1,Name:1})[_0x1989[47]]()}}function getEndUserSearchQueryFromChannel(_0x1061xd){var _0x1061x1f=_0x1989[50];if(_0x1061xd){switch(_0x1061xd){case _0x1989[52]:_0x1061x1f= _0x1989[71];break;default:_0x1061x1f= _0x1989[71];console[_0x1989[16]](_0x1989[53],_0x1061xd)}};return _0x1061x1f}function getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe){var _0x1061x1f=_0x1989[50];if(_0x1061xd){switch(_0x1061xd){case _0x1989[52]:if(_0x1061xe=== _0x1989[72]){_0x1061x1f= _0x1989[73]}else {if(_0x1061xe=== _0x1989[34]){_0x1061x1f= _0x1989[74]}};break;default:_0x1061x1f= _0x1989[74];console[_0x1989[16]](_0x1989[53],_0x1061xd)}};return _0x1061x1f}function getEndUserNamePropertyFromChannel(_0x1061xd,_0x1061xe){var _0x1061x1f=_0x1989[50];if(_0x1061xd){switch(_0x1061xd){case _0x1989[52]:if(_0x1061xe=== _0x1989[72]){_0x1061x1f= _0x1989[75]}else {if(_0x1061xe=== _0x1989[34]){_0x1061x1f= _0x1989[76]}};break;default:_0x1061x1f= _0x1989[76];console[_0x1989[16]](_0x1989[53],_0x1061xd)}};return _0x1061x1f}function handleContact(_0x1061x11,_0x1061xd,_0x1061x22,_0x1061xe){return function(_0x1061xf){if(_0x1061xf[_0x1989[59]]> 0){console[_0x1989[12]](_0x1989[77],getValueFromPropertyName(_0x1061x22,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)));_0x1061x11[_0x1989[78]]= _0x1061xf[0];return _0x1061x11[_0x1989[78]]};console[_0x1989[12]](_0x1989[79],getValueFromPropertyName(_0x1061x22,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)));return}}function searchLead(_0x1061x11,_0x1061xd,_0x1061x22,_0x1061xe){return function(_0x1061xf){if(!_0x1061xf){console[_0x1989[12]](_0x1989[80],getValueFromPropertyName(_0x1061x22,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)));var _0x1061x2a={};_0x1061x2a[getEndUserSearchQueryFromChannel(_0x1061xd)]= getValueFromPropertyName(_0x1061x22,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe));return _0x1061x11[_0x1989[20]][_0x1989[49]](_0x1989[81])[_0x1989[19]](_0x1061x2a,{Id:1,Name:1})[_0x1989[47]]()};return}}function handleLead(_0x1061x11,_0x1061xd,_0x1061x22,_0x1061xe){return function(_0x1061xf){if(_0x1061xf&& _0x1061xf[_0x1989[59]]> 0){console[_0x1989[12]](_0x1989[82],getValueFromPropertyName(_0x1061x22,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)));_0x1061x11[_0x1989[78]]= _0x1061xf[0];return _0x1061x11[_0x1989[78]]};return}}function leadCreation(_0x1061x11,_0x1061xd,_0x1061x22,_0x1061xe){return function(_0x1061xf){if(_0x1061xf|| _0x1061x11[_0x1989[78]]){return};console[_0x1989[12]](_0x1989[83],getValueFromPropertyName(_0x1061x22,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)));return _0x1061x11[_0x1989[20]][_0x1989[49]](_0x1989[81])[_0x1989[84]](getJsonForEndUserCreation(_0x1061xd,_0x1061x22,_0x1061xe))}}function getJsonForEndUserCreation(_0x1061xd,_0x1061xf,_0x1061xe){var _0x1061x33={Company:_0x1989[85]};switch(_0x1061xd){case _0x1989[52]:if(_0x1061xe=== _0x1989[34]){if(isValidName(_0x1061xf[_0x1989[76]])){_0x1061x33[_0x1989[86]]= getValueFromPropertyName(_0x1061xf,getEndUserNamePropertyFromChannel(_0x1061xd,_0x1061xe))}else {_0x1061x33[_0x1989[86]]= util[_0x1989[57]](_0x1989[87],getValueFromPropertyName(_0x1061xf,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)))}}else {if(_0x1061xe=== _0x1989[72]){if(isValidName(_0x1061xf[_0x1989[75]])){_0x1061x33[_0x1989[86]]= getValueFromPropertyName(_0x1061xf,getEndUserNamePropertyFromChannel(_0x1061xd,_0x1061xe))}else {_0x1061x33[_0x1989[86]]= util[_0x1989[57]](_0x1989[87],getValueFromPropertyName(_0x1061xf,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)))}}};_0x1061x33[_0x1989[71]]= getValueFromPropertyName(_0x1061xf,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe));break;default:console[_0x1989[16]](_0x1989[53],_0x1061xd)};return _0x1061x33}function isValidName(_0x1061x35){return _0x1061x35&& _0x1061x35!== _0x1989[88]}function handleLeadCreation(_0x1061x11,_0x1061xd,_0x1061x22,_0x1061xe){return function(_0x1061xf){if(!_0x1061xf){return};if(_0x1061xf&& _0x1061xf[_0x1989[89]]){console[_0x1989[12]](_0x1989[90],getValueFromPropertyName(_0x1061x22,getEndUserSearchPropertyFromChannel(_0x1061xd,_0x1061xe)));_0x1061x11[_0x1989[78]]= {Id:_0x1061xf[_0x1989[42]]}};return}}function taskCreation(_0x1061x11,_0x1061x22,_0x1061x10){return function(){var _0x1061x38={WhoId:_0x1061x11[_0x1989[78]][_0x1989[91]],OwnerId:_0x1061x11[_0x1989[61]][_0x1989[91]],ActivityDate:moment[_0x1989[92]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x1061x11,_0x1061x22,_0x1061x10),Description:createDescriptionFromConfiguration(_0x1061x11,_0x1061x22,_0x1061x10)};var _0x1061x39=createCustomFieldsFromConfiguration(_0x1061x11,_0x1061x22,_0x1061x10);if(_0x1061x39[_0x1989[59]]> 0){_[_0x1989[94]](_0x1061x39,function(_0x1061x3a){_0x1061x38[_0x1061x3a[_0x1989[42]]]= _0x1061x3a[_0x1989[93]]})};return _0x1061x11[_0x1989[20]][_0x1989[49]](_0x1989[95])[_0x1989[84]](_0x1061x38)}}function createSubjectFromConfiguration(_0x1061x11,_0x1061x22,_0x1061x10){var _0x1061x3c=_0x1989[50];var _0x1061x3d=[];if(_0x1061x11[_0x1989[29]][_0x1989[96]][_0x1989[59]]> 0){var _0x1061x3e=_[_0x1989[97]](_0x1061x11[_0x1989[29]].Subject,[_0x1989[42]]);_[_0x1989[94]](_0x1061x3e,function(_0x1061x3f){if(_0x1061x3f[_0x1989[98]]=== _0x1989[99]){_0x1061x3d[_0x1989[101]](_0x1061x3f[_0x1989[100]])}else {if(_0x1061x3f[_0x1989[98]]=== _0x1989[102]&& _0x1061x3f[_0x1989[103]]){var _0x1061x40=getValueFromPropertyName(_0x1061x22,_0x1061x3f[_0x1989[103]],_0x1061x11);if(_0x1061x40){_0x1061x3d[_0x1989[101]](_0x1061x40.toString())}}else {if(_0x1061x3f[_0x1989[98]]=== _0x1989[104]){var _0x1061x41=_[_0x1989[19]](_0x1061x10,{"\x6E\x61\x6D\x65":_0x1061x3f[_0x1989[105]][_0x1989[35]]});if(_0x1061x41){_0x1061x3d[_0x1989[101]](_0x1061x41[_0x1989[93]].toString())}}}}});_0x1061x3c= _0x1061x3d[_0x1989[107]](_0x1989[106])};return _0x1061x3c}function createDescriptionFromConfiguration(_0x1061x11,_0x1061x22,_0x1061x10){var _0x1061x43=_0x1989[50];var _0x1061x3d=[];if(_0x1061x11[_0x1989[29]][_0x1989[108]][_0x1989[59]]> 0){var _0x1061x44=_[_0x1989[97]](_0x1061x11[_0x1989[29]].Description,[_0x1989[42]]);_[_0x1989[94]](_0x1061x44,function(_0x1061x3f){if(_0x1061x3f[_0x1989[98]]=== _0x1989[99]){_0x1061x3d[_0x1989[101]](_0x1061x3f[_0x1989[100]])}else {if(_0x1061x3f[_0x1989[98]]=== _0x1989[109]){if(_0x1061x3f[_0x1989[110]]=== _0x1989[99]){_0x1061x3d[_0x1989[101]](util[_0x1989[57]](_0x1989[111],_0x1061x3f[_0x1989[112]],_0x1061x3f[_0x1989[113]]))}else {if(_0x1061x3f[_0x1989[110]]=== _0x1989[102]&& _0x1061x3f[_0x1989[103]]){var _0x1061x40=getValueFromPropertyName(_0x1061x22,_0x1061x3f[_0x1989[103]],_0x1061x11);if(_0x1061x40){_0x1061x3d[_0x1989[101]](util[_0x1989[57]](_0x1989[111],_0x1061x3f[_0x1989[112]],_0x1061x40.toString()))}}else {if(_0x1061x3f[_0x1989[110]]=== _0x1989[104]){var _0x1061x41=_[_0x1989[19]](_0x1061x10,{"\x6E\x61\x6D\x65":_0x1061x3f[_0x1989[105]][_0x1989[35]]});if(_0x1061x41){_0x1061x3d[_0x1989[101]](util[_0x1989[57]](_0x1989[111],_0x1061x3f[_0x1989[112]],_0x1061x41[_0x1989[93]].toString()))}}}}}}});_0x1061x43= _0x1061x3d[_0x1989[107]](_0x1989[114])};return _0x1061x43}function createCustomFieldsFromConfiguration(_0x1061x11,_0x1061x22,_0x1061x10){var _0x1061x46=[];var _0x1061x47=[];if(_0x1061x11[_0x1989[29]][_0x1989[115]][_0x1989[59]]> 0){_0x1061x46= _0x1061x11[_0x1989[29]][_0x1989[115]];_[_0x1989[94]](_0x1061x46,function(_0x1061x3a){if(_0x1061x3a[_0x1989[98]]=== _0x1989[99]){_0x1061x47[_0x1989[101]]({id:_0x1061x3a[_0x1989[116]],value:_0x1061x3a[_0x1989[100]]})}else {if(_0x1061x3a[_0x1989[98]]=== _0x1989[102]){var _0x1061x40=getValueFromPropertyName(_0x1061x22,_0x1061x3a[_0x1989[103]],_0x1061x11);if(_0x1061x40){_0x1061x47[_0x1989[101]]({id:_0x1061x3a[_0x1989[116]],value:_0x1061x40.toString()})}}else {if(_0x1061x3a[_0x1989[98]]=== _0x1989[104]){var _0x1061x41=_[_0x1989[19]](_0x1061x10,{"\x6E\x61\x6D\x65":_0x1061x3a[_0x1989[105]][_0x1989[35]]});if(_0x1061x41){_0x1061x47[_0x1989[101]]({id:_0x1061x3a[_0x1989[116]],value:_0x1061x41[_0x1989[93]].toString()})}}}}})};return _0x1061x47}function handleTaskDisplay(_0x1061x11){return function(_0x1061xf){if(_0x1061xf&& _0x1061xf[_0x1989[89]]){console[_0x1989[12]](_0x1989[117],_0x1061xf[_0x1989[42]]);_0x1061x11[_0x1989[118]]= _0x1061xf[_0x1989[42]];return};return}}function handleReportIntegration(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xb){return function(){delete _0x1061xf[_0x1989[42]];_0x1061xf[_0x1989[119]]= _0x1989[120];_0x1061xf[_0x1989[121]]= _0x1061xd;_0x1061xf[_0x1989[122]]= _0x1989[89];_0x1061xf[_0x1989[123]]= _0x1061x11[_0x1989[118]];_0x1061xf[_0x1989[124]]= _0x1061xb;_0x1061xf[_0x1989[125]]= util[_0x1989[57]](_0x1989[126],_0x1061x11[_0x1989[20]][_0x1989[127]],_0x1061x11[_0x1989[118]]);return ReportIntegration[_0x1989[84]](_0x1061xf)}}function handleEnd(_0x1061x11,_0x1061xf,_0x1061xd){return function(){console[_0x1989[12]](util[_0x1989[57]](_0x1989[128],_0x1061x11[_0x1989[118]],_0x1061x11[_0x1989[61]].Id));_0x1061x11= undefined;return}}function handleError(_0x1061x11,_0x1061xd,_0x1061xf,_0x1061xb){return function(_0x1061x4c){console[_0x1989[16]](_0x1989[129]);console[_0x1989[16]](_0x1989[130],_0x1061x4c[_0x1989[131]]);console[_0x1989[16]](_0x1989[132],_0x1061x4c[_0x1989[133]]);_0x1061x11= undefined;delete _0x1061xf[_0x1989[42]];_0x1061xf[_0x1989[119]]= _0x1989[120];_0x1061xf[_0x1989[121]]= _0x1061xd;_0x1061xf[_0x1989[122]]= _0x1989[134];_0x1061xf[_0x1989[124]]= _0x1061xb;ReportIntegration[_0x1989[84]](_0x1061xf)[_0x1989[18]](function(){return})[_0x1989[17]](function(_0x1061x4c){console[_0x1989[16]](_0x1989[135]);return})}}function stripTrailingSlash(_0x1061x4e){if(_0x1061x4e[_0x1989[136]](-1) === _0x1989[137]){return _0x1061x4e[_0x1989[136]](0,_0x1061x4e[_0x1989[59]]- 1)};return _0x1061x4e}module[_0x1989[138]]= Salesforce