1 var _0xfa0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x46\x61\x78\x52\x6F\x6F\x6D","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x4C\x69\x73\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x54\x61\x67","\x54\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x72\x65\x61\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x65\x78\x74\x72\x61\x63\x74\x41\x6C\x6C","\x69\x64","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x46\x69\x72\x73\x74\x20\x4E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x4C\x61\x73\x74\x20\x4E\x61\x6D\x65","\x74\x61\x67\x73","\x54\x61\x67\x73","\x73\x74\x72\x65\x65\x74","\x53\x74\x72\x65\x65\x74","\x70\x6F\x73\x74\x61\x6C\x43\x6F\x64\x65","\x50\x6F\x73\x74\x61\x6C\x20\x43\x6F\x64\x65","\x63\x69\x74\x79","\x43\x69\x74\x79","\x63\x6F\x75\x6E\x74\x72\x79","\x43\x6F\x75\x6E\x74\x72\x79","\x64\x61\x74\x65\x4F\x66\x42\x69\x72\x74\x68","\x44\x61\x74\x65\x20\x6F\x66\x20\x62\x69\x72\x74\x68","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x68\x6F\x6E\x65","\x50\x68\x6F\x6E\x65","\x6D\x6F\x62\x69\x6C\x65","\x4D\x6F\x62\x69\x6C\x65","\x66\x61\x78","\x46\x61\x78","\x65\x6D\x61\x69\x6C","\x45\x6D\x61\x69\x6C","\x75\x72\x6C","\x55\x52\x4C","\x72\x6F\x77\x73","\x6D\x65\x72\x67\x65","\x43\x6F\x6D\x70\x61\x6E\x79","\x6E\x61\x6D\x65","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x2C","\x6A\x6F\x69\x6E","\x20\x61\x73\x20\x27","\x61\x6C\x69\x61\x73","\x27","\x6D\x61\x70","\x53\x45\x4C\x45\x43\x54\x20\x69\x64\x2C\x25\x73\x20\x46\x52\x4F\x4D\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x27\x29\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73","\x6F\x72\x64\x65\x72","\x71\x75\x65\x72\x79","\x69\x64\x20\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x6B\x65\x79\x73","\x63\x66\x5F","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x66\x69\x6C\x74\x65\x72","\x4C\x69\x73\x74\x49\x64","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x63\x6F\x6E\x63\x61\x74","\x6D\x65\x72\x67\x65\x63\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6C\x69\x73\x74","\x63\x6F\x6D\x70\x61\x6E\x79","\x63\x6F\x6D\x70\x61\x6E\x79\x5F\x6C\x69\x73\x74\x5F\x66\x69\x6C\x74\x65\x72","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4C\x69\x73\x74\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x67\x65\x6E\x74","\x63\x6F\x75\x6E\x74","\x72\x6F\x6C\x65","\x67\x65\x74\x4C\x6F\x67","\x64\x65\x74\x61\x69\x6C","\x67\x65\x6E\x65\x72\x61\x6C","\x73\x68\x6F\x77","\x6C\x6F\x67\x54\x79\x70\x65","\x6A\x6F\x75\x72\x6E\x61\x6C","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x73\x6F\x75\x72\x63\x65","\x66\x72\x6F\x6D","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x6E\x74\x61\x63\x74","\x63\x68\x61\x74","\x73\x6D\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x71\x75\x65\x75\x65","\x70\x61\x72\x61\x6D\x73","\x6E\x75\x6C\x6C","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x62\x6F\x64\x79","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x72\x65\x61\x74\x65","\x4E\x61\x6D\x65\x20\x6F\x72\x20\x4C\x69\x73\x74\x49\x64\x20\x6D\x69\x73\x73\x69\x6E\x67\x20\x6F\x72\x20\x69\x6E\x76\x61\x6C\x69\x64\x21","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x55\x73\x65\x72\x49\x64","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x3B","\x3B\x27","\x70\x75\x73\x68","\x69\x73\x53\x74\x72\x69\x6E\x67","\x66\x6F\x72\x4F\x77\x6E","\x65\x72\x72\x6F\x72","\x69\x6E\x73\x65\x72\x74\x49\x64","\x49\x4E\x53\x45\x52\x54\x20\x49\x4E\x54\x4F\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x28\x25\x73\x29\x20\x56\x41\x4C\x55\x45\x53\x20\x28\x25\x73\x29","\x63\x6F\x70\x79","\x25\x73\x3D\x27\x25\x73\x27","\x55\x50\x44\x41\x54\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x53\x45\x54\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x63\x6C\x6F\x6E\x65","\x73\x70\x6C\x69\x74","\x70\x6F\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x63\x6B","\x61\x6C\x6C","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x75\x6E\x69\x6F\x6E","\x6B\x6F","\x66\x61\x69\x6C\x65\x64","\x6F\x6B","\x66\x6F\x72\x45\x61\x63\x68\x4F\x66","\x75\x70\x64\x61\x74\x65","\x6F\x6C\x64\x43\x6F\x6E\x74\x61\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x63\x6F\x6E\x74\x61\x63\x74\x2F\x75\x70\x64\x61\x74\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x63\x6F\x6E\x74\x61\x63\x74\x2F\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xfa0f[0];var _=require(_0xfa0f[1]);var moment=require(_0xfa0f[2]);var Contact=require(_0xfa0f[4])[_0xfa0f[3]];var User=require(_0xfa0f[4])[_0xfa0f[5]];var ContactPhone=require(_0xfa0f[4])[_0xfa0f[6]];var ContactEmail=require(_0xfa0f[4])[_0xfa0f[7]];var CustomField=require(_0xfa0f[4])[_0xfa0f[8]];var ReportCall=require(_0xfa0f[4])[_0xfa0f[9]];var ReportQueue=require(_0xfa0f[4])[_0xfa0f[10]];var ReportQueueHistory=require(_0xfa0f[4])[_0xfa0f[12]][_0xfa0f[11]];var ReportChatRoom=require(_0xfa0f[4])[_0xfa0f[13]];var ReportChatRoomHistory=require(_0xfa0f[4])[_0xfa0f[12]][_0xfa0f[14]];var ChatRoom=require(_0xfa0f[4])[_0xfa0f[15]];var FaxRoom=require(_0xfa0f[4])[_0xfa0f[16]];var SmsRoom=require(_0xfa0f[4])[_0xfa0f[17]];var ReportIntegration=require(_0xfa0f[4])[_0xfa0f[18]];var List=require(_0xfa0f[4])[_0xfa0f[19]];var ReportCallHistory=require(_0xfa0f[4])[_0xfa0f[12]][_0xfa0f[20]];var ReportMailSession=require(_0xfa0f[4])[_0xfa0f[21]];var MailRoom=require(_0xfa0f[4])[_0xfa0f[22]];var ReportMailSessionHistory=require(_0xfa0f[4])[_0xfa0f[12]][_0xfa0f[23]];var Tag=require(_0xfa0f[4])[_0xfa0f[24]];var TdUpdate=require(_0xfa0f[4])[_0xfa0f[25]];var stream=require(_0xfa0f[26]);var sequelize=require(_0xfa0f[4])[_0xfa0f[27]];var util=require(_0xfa0f[28]);var Util=require(_0xfa0f[29]);var Async=require(_0xfa0f[30]);var Promise=require(_0xfa0f[31]);exports[_0xfa0f[32]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){return Promise[_0xfa0f[37]]()[_0xfa0f[36]](getContacts(_0x64c3x1e))[_0xfa0f[36]](function(_0x64c3x22){_0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x22)})[_0xfa0f[33]](function(_0x64c3x21){return handleError(_0x64c3x1f,_0x64c3x21)})};exports[_0xfa0f[38]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){var _0x64c3x23=[_0xfa0f[39],[_0xfa0f[40],_0xfa0f[41]],[_0xfa0f[42],_0xfa0f[43]],[_0xfa0f[44],_0xfa0f[45]],[_0xfa0f[46],_0xfa0f[47]],[_0xfa0f[48],_0xfa0f[49]],[_0xfa0f[50],_0xfa0f[51]],[_0xfa0f[52],_0xfa0f[53]],[_0xfa0f[54],_0xfa0f[55]],[_0xfa0f[56],_0xfa0f[57]],[_0xfa0f[58],_0xfa0f[59]],[_0xfa0f[60],_0xfa0f[61]],[_0xfa0f[62],_0xfa0f[63]],[_0xfa0f[64],_0xfa0f[65]],[_0xfa0f[66],_0xfa0f[67]]];return Promise[_0xfa0f[37]]()[_0xfa0f[36]](getContacts(_0x64c3x1e,_0x64c3x23))[_0xfa0f[36]](function(_0x64c3x22){_0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x22)})[_0xfa0f[33]](function(_0x64c3x21){return handleError(_0x64c3x1f,_0x64c3x21)})};function getContacts(_0x64c3x1e,_0x64c3x23){return function(){var _0x64c3x25,_0x64c3x26,_0x64c3x27;switch(_0x64c3x1e[_0xfa0f[109]][_0xfa0f[113]]){case _0xfa0f[111]:return User[_0xfa0f[110]](_0x64c3x1e[_0xfa0f[109]][_0xfa0f[39]])[_0xfa0f[36]](function(_0x64c3x36){return _0x64c3x36[_0xfa0f[108]]()})[_0xfa0f[36]](function(_0x64c3x35){_0x64c3x26= _[_0xfa0f[79]](_0x64c3x35,_0xfa0f[39]);return List[_0xfa0f[96]]({where:{defaultEntry:true},attributes:[_0xfa0f[39]]})})[_0xfa0f[36]](function(_0x64c3x33){_0x64c3x27= {CompanyId:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[99]]|| null,ListId:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[93]]|| null};delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[99]];delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[93]];var _0x64c3x34=_0x64c3x27[_0xfa0f[93]]?{}:{ListId:{$in:_0x64c3x26[_0xfa0f[100]](_[_0xfa0f[79]](_0x64c3x33,_0xfa0f[39]))}};if(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[101]]){_0x64c3x34[_0xfa0f[39]]= {$ne:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[101]]};delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[101]]};return Contact[_0xfa0f[107]](_0xfa0f[104],_0xfa0f[105],{method:[_0xfa0f[106],_0x64c3x27]})[_0xfa0f[103]](Util[_0xfa0f[102]](_0x64c3x1e[_0xfa0f[84]],_0x64c3x34,{attributes:_0x64c3x23,order:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[83]]|| _0xfa0f[85]}))})[_0xfa0f[36]](function(_0x64c3x32){_0x64c3x25= {rows:_[_0xfa0f[79]](_0x64c3x32[_0xfa0f[68]],_0xfa0f[97]),count:_0x64c3x32[_0xfa0f[68]]};return Contact[_0xfa0f[98]]()})[_0xfa0f[36]](function(_0x64c3x2f){_0x64c3x2f= _[_0xfa0f[92]](_[_0xfa0f[89]](_0x64c3x2f),function(_0x64c3x30){return _[_0xfa0f[91]](_0x64c3x30,_0xfa0f[90])});var _0x64c3x31={where:{name:_0x64c3x2f}};_0x64c3x27[_0xfa0f[93]]&& (_0x64c3x31[_0xfa0f[95]][_0xfa0f[94]]= [{ListId:_0x64c3x27[_0xfa0f[93]]},{ListId:null}]);return CustomField[_0xfa0f[96]](_0x64c3x31)})[_0xfa0f[36]](function(_0x64c3x2c){if(_0x64c3x2c[_0xfa0f[73]]){var _0x64c3x2d=_[_0xfa0f[79]](_0x64c3x2c,function(_0x64c3x2e){return _0x64c3x2e[_0xfa0f[71]]+ _0xfa0f[76]+ _0x64c3x2e[_0xfa0f[77]]+ _0xfa0f[78]})[_0xfa0f[75]](_0xfa0f[74]);return sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[80]+ _[_0xfa0f[79]](_0x64c3x25[_0xfa0f[68]],_0xfa0f[39])[_0xfa0f[75]](_0xfa0f[81])+ _0xfa0f[82],_0x64c3x2d,_0x64c3x1e[_0xfa0f[84]][_0xfa0f[83]]|| _0xfa0f[85]),{type:sequelize[_0xfa0f[88]][_0xfa0f[87]]})}})[_0xfa0f[36]](function(_0x64c3x28){var _0x64c3x29;if(_0x64c3x28){_[_0xfa0f[72]](_0x64c3x25[_0xfa0f[68]],function(_0x64c3x2a,_0x64c3x2b){_[_0xfa0f[69]](_0x64c3x2a,_0x64c3x28[_0x64c3x2b]);if(_0x64c3x23){delete _0x64c3x2a[_0xfa0f[39]];_0x64c3x2a[_0xfa0f[70]]&& (_0x64c3x2a[_0xfa0f[70]]= _0x64c3x2a[_0xfa0f[70]][_0xfa0f[71]]);_0x64c3x2a[_0xfa0f[19]]&& (_0x64c3x2a[_0xfa0f[19]]= _0x64c3x2a[_0xfa0f[19]][_0xfa0f[71]])}})}else {if(_0x64c3x23){_[_0xfa0f[72]](_0x64c3x25[_0xfa0f[68]],function(_0x64c3x2a,_0x64c3x2b){delete _0x64c3x2a[_0xfa0f[39]];_0x64c3x2a[_0xfa0f[70]]&& (_0x64c3x2a[_0xfa0f[70]]= _0x64c3x2a[_0xfa0f[70]][_0xfa0f[71]]);_0x64c3x2a[_0xfa0f[19]]&& (_0x64c3x2a[_0xfa0f[19]]= _0x64c3x2a[_0xfa0f[19]][_0xfa0f[71]])})}};return _0x64c3x25})[_0xfa0f[36]](function(_0x64c3x22){return _0x64c3x22});default:_0x64c3x27= {CompanyId:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[99]]|| null,ListId:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[93]]|| null};delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[99]];delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[93]];var _0x64c3x34={};if(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[101]]){_0x64c3x34[_0xfa0f[39]]= {$ne:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[101]]};delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[101]]};return Contact[_0xfa0f[107]](_0xfa0f[104],_0xfa0f[105],{method:[_0xfa0f[106],_0x64c3x27]})[_0xfa0f[103]](Util[_0xfa0f[102]](_0x64c3x1e[_0xfa0f[84]],_0x64c3x34,{attributes:_0x64c3x23,order:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[83]]|| _0xfa0f[85]}))[_0xfa0f[36]](function(_0x64c3x32){_0x64c3x25= {rows:_[_0xfa0f[79]](_0x64c3x32[_0xfa0f[68]],_0xfa0f[97]),count:_0x64c3x32[_0xfa0f[112]]};return Contact[_0xfa0f[98]]()})[_0xfa0f[36]](function(_0x64c3x2f){_0x64c3x2f= _[_0xfa0f[92]](_[_0xfa0f[89]](_0x64c3x2f),function(_0x64c3x30){return _[_0xfa0f[91]](_0x64c3x30,_0xfa0f[90])});var _0x64c3x31={where:{name:_0x64c3x2f}};_0x64c3x27[_0xfa0f[93]]&& (_0x64c3x31[_0xfa0f[95]][_0xfa0f[94]]= [{ListId:_0x64c3x27[_0xfa0f[93]]},{ListId:null}]);return CustomField[_0xfa0f[96]](_0x64c3x31)})[_0xfa0f[36]](function(_0x64c3x2c){if(_0x64c3x25[_0xfa0f[68]][_0xfa0f[73]]&& _0x64c3x2c[_0xfa0f[73]]){var _0x64c3x2d=_[_0xfa0f[79]](_0x64c3x2c,function(_0x64c3x2e){return _0x64c3x2e[_0xfa0f[71]]+ _0xfa0f[76]+ _0x64c3x2e[_0xfa0f[77]]+ _0xfa0f[78]})[_0xfa0f[75]](_0xfa0f[74]);return sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[80]+ _[_0xfa0f[79]](_0x64c3x25[_0xfa0f[68]],_0xfa0f[39])[_0xfa0f[75]](_0xfa0f[81])+ _0xfa0f[82],_0x64c3x2d,_0x64c3x1e[_0xfa0f[84]][_0xfa0f[83]]|| _0xfa0f[85]),{type:sequelize[_0xfa0f[88]][_0xfa0f[87]]})}})[_0xfa0f[36]](function(_0x64c3x28){var _0x64c3x29;if(_0x64c3x28){_[_0xfa0f[72]](_0x64c3x25[_0xfa0f[68]],function(_0x64c3x2a,_0x64c3x2b){_[_0xfa0f[69]](_0x64c3x2a,_0x64c3x28[_0x64c3x2b]);if(_0x64c3x23){delete _0x64c3x2a[_0xfa0f[39]];_0x64c3x2a[_0xfa0f[70]]&& (_0x64c3x2a[_0xfa0f[70]]= _0x64c3x2a[_0xfa0f[70]][_0xfa0f[71]]);_0x64c3x2a[_0xfa0f[19]]&& (_0x64c3x2a[_0xfa0f[19]]= _0x64c3x2a[_0xfa0f[19]][_0xfa0f[71]])}})}else {if(_0x64c3x23){_[_0xfa0f[72]](_0x64c3x25[_0xfa0f[68]],function(_0x64c3x2a,_0x64c3x2b){delete _0x64c3x2a[_0xfa0f[39]];_0x64c3x2a[_0xfa0f[70]]&& (_0x64c3x2a[_0xfa0f[70]]= _0x64c3x2a[_0xfa0f[70]][_0xfa0f[71]]);_0x64c3x2a[_0xfa0f[19]]&& (_0x64c3x2a[_0xfa0f[19]]= _0x64c3x2a[_0xfa0f[19]][_0xfa0f[71]])})}};return _0x64c3x25})[_0xfa0f[36]](function(_0x64c3x22){return _0x64c3x22})}}}exports[_0xfa0f[98]]= function(_0x64c3x1e,_0x64c3x1f){return Contact[_0xfa0f[98]]()[_0xfa0f[36]](function(_0x64c3x2f){return _0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x2f)})[_0xfa0f[33]](function(_0x64c3x21){return handleError(_0x64c3x1f,_0x64c3x21)})};exports[_0xfa0f[114]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){_0x64c3x1e[_0xfa0f[84]][_0xfa0f[115]]= _0x64c3x1e[_0xfa0f[84]][_0xfa0f[115]]|| _0xfa0f[116];_0x64c3x1e[_0xfa0f[84]][_0xfa0f[117]]= _0x64c3x1e[_0xfa0f[84]][_0xfa0f[117]]|| _0xfa0f[58];_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]= _0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]|| _0xfa0f[119];_0x64c3x1e[_0xfa0f[84]][_0xfa0f[120]]= _0x64c3x1e[_0xfa0f[84]][_0xfa0f[120]]|| _0xfa0f[121];var _0x64c3x37,_0x64c3x38={};return Contact[_0xfa0f[110]](_0x64c3x1e[_0xfa0f[136]][_0xfa0f[39]])[_0xfa0f[36]](function(_0x64c3x39){if(!_0x64c3x39){return _0x64c3x1f[_0xfa0f[123]](404)};switch(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[115]]){case _0xfa0f[116]:switch(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[117]]){case _0xfa0f[58]:_0x64c3x37= (_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12])?ReportCallHistory:ReportCall;if(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[120]]=== _0xfa0f[124]){_0x64c3x38[_0xfa0f[125]]= [_0x64c3x39[_0xfa0f[58]],_0x64c3x39[_0xfa0f[60]]]}else {_0x64c3x38[_0xfa0f[126]]= [_0x64c3x39[_0xfa0f[58]],_0x64c3x39[_0xfa0f[60]]]};break;case _0xfa0f[64]:_0x64c3x37= MailRoom;_0x64c3x38[_0xfa0f[127]]= _0x64c3x39[_0xfa0f[64]];if(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12]){_0x64c3x38[_0xfa0f[128]]= {$lt:moment()[_0xfa0f[130]](_0xfa0f[129])}}else {_0x64c3x38[_0xfa0f[128]]= {$gte:moment()[_0xfa0f[130]](_0xfa0f[129])}};break;case _0xfa0f[132]:_0x64c3x37= ChatRoom;_0x64c3x38[_0xfa0f[131]]= _0x64c3x39[_0xfa0f[64]];if(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12]){_0x64c3x38[_0xfa0f[128]]= {$lt:moment()[_0xfa0f[130]](_0xfa0f[129])}}else {_0x64c3x38[_0xfa0f[128]]= {$gte:moment()[_0xfa0f[130]](_0xfa0f[129])}};break;case _0xfa0f[62]:_0x64c3x37= FaxRoom;_0x64c3x38[_0xfa0f[131]]= _0x64c3x39[_0xfa0f[62]];if(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12]){_0x64c3x38[_0xfa0f[128]]= {$lt:moment()[_0xfa0f[130]](_0xfa0f[129])}}else {_0x64c3x38[_0xfa0f[128]]= {$gte:moment()[_0xfa0f[130]](_0xfa0f[129])}};break;case _0xfa0f[133]:_0x64c3x37= SmsRoom;_0x64c3x38[_0xfa0f[131]]= [_0x64c3x39[_0xfa0f[58]],_0x64c3x39[_0xfa0f[60]]];if(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12]){_0x64c3x38[_0xfa0f[128]]= {$lt:moment()[_0xfa0f[130]](_0xfa0f[129])}}else {_0x64c3x38[_0xfa0f[128]]= {$gte:moment()[_0xfa0f[130]](_0xfa0f[129])}};break;default:_0x64c3x37= (_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12])?ReportCallHistory:ReportCall};break;case _0xfa0f[135]:switch(_0x64c3x1e[_0xfa0f[84]][_0xfa0f[117]]){case _0xfa0f[58]:_0x64c3x37= (_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12])?ReportQueueHistory:ReportQueue;_0x64c3x38[_0xfa0f[134]]= [_0x64c3x39[_0xfa0f[58]],_0x64c3x39[_0xfa0f[60]]];break;case _0xfa0f[64]:return _0x64c3x1f[_0xfa0f[123]](404);default:_0x64c3x37= (_0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]]=== _0xfa0f[12])?ReportQueueHistory:ReportQueue};break;default:_0x64c3x37= ReportCall};delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[115]];delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[117]];delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[118]];delete _0x64c3x1e[_0xfa0f[84]][_0xfa0f[120]];return _0x64c3x37[_0xfa0f[103]](Util[_0xfa0f[102]](_0x64c3x1e[_0xfa0f[84]],_0x64c3x38))})[_0xfa0f[36]](function(_0x64c3x22){_0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x22)})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21);return handleError(_0x64c3x1f,_0x64c3x21)})};exports[_0xfa0f[117]]= function(_0x64c3x1e,_0x64c3x1f){var _0x64c3x3a;return Contact[_0xfa0f[107]](_0xfa0f[104],_0xfa0f[109],_0xfa0f[105])[_0xfa0f[110]](_0x64c3x1e[_0xfa0f[136]][_0xfa0f[39]])[_0xfa0f[36]](function(_0x64c3x3f){if(!_0x64c3x3f){return _0x64c3x1f[_0xfa0f[123]](404)};_0x64c3x3a= _0x64c3x3f;return CustomField[_0xfa0f[96]]({where:{$or:[{ListId:_0x64c3x3a[_0xfa0f[93]]},{ListId:null}]}})})[_0xfa0f[36]](function(_0x64c3x2c){if(_0x64c3x2c[_0xfa0f[73]]){var _0x64c3x2d=_[_0xfa0f[79]](_0x64c3x2c,_0xfa0f[71])[_0xfa0f[75]](_0xfa0f[74]);return sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[138],_0x64c3x2d,_0x64c3x1e[_0xfa0f[136]][_0xfa0f[39]]),{type:sequelize[_0xfa0f[88]][_0xfa0f[87]]})}})[_0xfa0f[36]](function(_0x64c3x3b){if(_0x64c3x3b){_[_0xfa0f[72]](_0x64c3x3b[0],function(_0x64c3x3c,_0x64c3x3d,_0x64c3x3e){if(_0x64c3x3c=== _0xfa0f[137]){_0x64c3x3e[_0x64c3x3d]= null}});_[_0xfa0f[69]](_0x64c3x3a[_0xfa0f[97]],_0x64c3x3b[0])}})[_0xfa0f[36]](function(){return _0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x3a)})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21);return handleError(_0x64c3x1f,_0x64c3x21)})};exports[_0xfa0f[139]]= function(_0x64c3x1e,_0x64c3x1f){var _0x64c3x38={};switch(_0x64c3x1e[_0xfa0f[141]][_0xfa0f[145]]){case _0xfa0f[143]:if(_0x64c3x1e[_0xfa0f[141]][_0xfa0f[140]]=== _0xfa0f[135]){_0x64c3x38= {$or:{phone:_0x64c3x1e[_0xfa0f[141]][_0xfa0f[134]],mobile:_0x64c3x1e[_0xfa0f[141]][_0xfa0f[134]]}}}else {_0x64c3x38= {$or:{phone:_0x64c3x1e[_0xfa0f[141]][_0xfa0f[142]],mobile:_0x64c3x1e[_0xfa0f[141]][_0xfa0f[142]]}}};break;case _0xfa0f[144]:_0x64c3x38= {email:_0x64c3x1e[_0xfa0f[141]][_0xfa0f[127]]};break;default:_0x64c3x38= {}};var _0x64c3x40=_[_0xfa0f[79]](_[_0xfa0f[79]](_0x64c3x1e[_0xfa0f[109]].Lists,_0xfa0f[97]),_0xfa0f[39]);var _0x64c3x41;if(_0x64c3x1e[_0xfa0f[141]][_0xfa0f[93]]){_0x64c3x41= _[_0xfa0f[91]](_0x64c3x40,_0x64c3x1e[_0xfa0f[141]].ListId)?{id:_0x64c3x1e[_0xfa0f[141]][_0xfa0f[93]]}:null}else {_0x64c3x41= {$or:{id:_0x64c3x40,defaultEntry:true}}};return Promise[_0xfa0f[37]]()[_0xfa0f[36]](function(){if(_0x64c3x41){return Contact[_0xfa0f[103]]({where:_0x64c3x38,include:[{model:List,where:_0x64c3x41}]})};return null})[_0xfa0f[36]](function(_0x64c3x32){return _0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x32|| {count:0,rows:[]})})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21);return handleError(_0x64c3x1f,_0x64c3x21)})};exports[_0xfa0f[146]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){if(!_0x64c3x1e[_0xfa0f[141]][_0xfa0f[40]]|| !_0x64c3x1e[_0xfa0f[141]][_0xfa0f[93]]){return handleError(_0x64c3x1f,{message:_0xfa0f[147]})};var _0x64c3x3a,_0x64c3x42=moment()[_0xfa0f[86]](_0xfa0f[148]),_0x64c3x43=[],_0x64c3x44=[];_0x64c3x1e[_0xfa0f[141]][_0xfa0f[149]]= _0x64c3x1e[_0xfa0f[109]][_0xfa0f[39]];_0x64c3x1e[_0xfa0f[141]][_0xfa0f[128]]= _0x64c3x42;_0x64c3x1e[_0xfa0f[141]][_0xfa0f[150]]= _0x64c3x42;_[_0xfa0f[155]](_0x64c3x1e[_0xfa0f[141]],function(_0x64c3x3c,_0x64c3x3d){if(_0x64c3x3c){switch(_0x64c3x3d){case _0xfa0f[44]:if(_0x64c3x3c[_0xfa0f[73]]){_0x64c3x44[_0xfa0f[153]](_0xfa0f[78]+ _0x64c3x3c[_0xfa0f[75]](_0xfa0f[151])+ _0xfa0f[152]);_0x64c3x43[_0xfa0f[153]](_0x64c3x3d)};break;default:_0x64c3x43[_0xfa0f[153]](_0x64c3x3d);_0x64c3x44[_0xfa0f[153]](_[_0xfa0f[154]](_0x64c3x3c)?_0xfa0f[78]+ _0x64c3x3c+ _0xfa0f[78]:_0x64c3x3c)}}});return sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[158],_0x64c3x43[_0xfa0f[75]](_0xfa0f[74]),_0x64c3x44[_0xfa0f[75]](_0xfa0f[74])))[_0xfa0f[36]](function(_0x64c3x39){_0x64c3x1e[_0xfa0f[141]][_0xfa0f[39]]= _0x64c3x39[0][_0xfa0f[157]];return _0x64c3x1f[_0xfa0f[35]](201)[_0xfa0f[34]](_0x64c3x1e[_0xfa0f[141]])})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[156]](_0x64c3x21);return _0x64c3x20(_0x64c3x21)})};exports[_0xfa0f[159]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){var _0x64c3x3a,_0x64c3x45;return Contact[_0xfa0f[110]](_0x64c3x1e[_0xfa0f[136]][_0xfa0f[39]])[_0xfa0f[36]](function(_0x64c3x39){_0x64c3x3a= _0x64c3x39[_0xfa0f[97]];_0x64c3x45= _[_0xfa0f[162]](_0x64c3x39[_0xfa0f[97]]);delete _0x64c3x45[_0xfa0f[39]];_0x64c3x45[_0xfa0f[149]]= _0x64c3x1e[_0xfa0f[109]][_0xfa0f[39]];_0x64c3x45[_0xfa0f[93]]= _0x64c3x1e[_0xfa0f[141]][_0xfa0f[93]];_0x64c3x45[_0xfa0f[44]]= _0x64c3x45[_0xfa0f[44]]?_0x64c3x45[_0xfa0f[44]][_0xfa0f[163]](_0xfa0f[151]):[];if(_0x64c3x45[_0xfa0f[44]][_0xfa0f[73]]> 1){_0x64c3x45[_0xfa0f[44]][_0xfa0f[164]]()};return Contact[_0xfa0f[146]](_0x64c3x45)})[_0xfa0f[36]](function(_0x64c3x46){_0x64c3x45= _0x64c3x46;if(_0x64c3x3a[_0xfa0f[93]]=== _0x64c3x1e[_0xfa0f[141]][_0xfa0f[93]]){return CustomField[_0xfa0f[96]]({where:{$or:[{ListId:_0x64c3x3a[_0xfa0f[93]]},{ListId:null}]}})}})[_0xfa0f[36]](function(_0x64c3x2c){if(_0x64c3x2c&& _0x64c3x2c[_0xfa0f[73]]){var _0x64c3x2d=_[_0xfa0f[79]](_0x64c3x2c,_0xfa0f[71])[_0xfa0f[75]](_0xfa0f[74]);return sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[138],_0x64c3x2d,_0x64c3x3a[_0xfa0f[39]]),{type:sequelize[_0xfa0f[88]][_0xfa0f[87]]})}})[_0xfa0f[36]](function(_0x64c3x3b){if(_0x64c3x3b){var _0x64c3x2d=[];_[_0xfa0f[155]](_0x64c3x3b[0],function(_0x64c3x3c,_0x64c3x3d){_0x64c3x2d[_0xfa0f[153]](util[_0xfa0f[86]](_0xfa0f[160],_0x64c3x3d,_0x64c3x3c))});if(_0x64c3x2d[_0xfa0f[73]]){_0x64c3x2d= _0x64c3x2d[_0xfa0f[75]](_0xfa0f[74]);return sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[161],_0x64c3x2d,_0x64c3x45[_0xfa0f[39]]))}}})[_0xfa0f[36]](function(){return _0x64c3x1f[_0xfa0f[35]](201)[_0xfa0f[34]](_0x64c3x45)})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21);return _0x64c3x20(_0x64c3x21)})};exports[_0xfa0f[165]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){var _0x64c3x47=[],_0x64c3x42=moment()[_0xfa0f[86]](_0xfa0f[148]),_0x64c3x48=[],_0x64c3x43,_0x64c3x44,_0x64c3x49={ok:0,ko:0,failed:[]};return Tag[_0xfa0f[96]]()[_0xfa0f[36]](function(_0x64c3x4a){var _0x64c3x4b=[],_0x64c3x4c=[];var _0x64c3x4d=_[_0xfa0f[79]](_[_0xfa0f[79]](_0x64c3x4a,_0xfa0f[97]),_0xfa0f[71]);Async[_0xfa0f[173]](_0x64c3x1e[_0xfa0f[141]][_0xfa0f[168]],function(_0x64c3x39,_0x64c3x2b){if(_0x64c3x39[_0xfa0f[40]]&& _0x64c3x39[_0xfa0f[93]]){_0x64c3x39[_0xfa0f[149]]= _0x64c3x1e[_0xfa0f[109]][_0xfa0f[39]];_0x64c3x39[_0xfa0f[128]]= _0x64c3x42;_0x64c3x39[_0xfa0f[150]]= _0x64c3x42;_0x64c3x39[_0xfa0f[44]]&& (_0x64c3x4c= _[_0xfa0f[169]](_0x64c3x4c,_0x64c3x39[_0xfa0f[44]]));_0x64c3x43= [];_0x64c3x44= [];_[_0xfa0f[155]](_0x64c3x39,function(_0x64c3x3c,_0x64c3x3d){if(_0x64c3x3c){switch(_0x64c3x3d){case _0xfa0f[44]:if(_0x64c3x3c[_0xfa0f[73]]){_0x64c3x44[_0xfa0f[153]](_0xfa0f[78]+ _0x64c3x3c[_0xfa0f[75]](_0xfa0f[151])+ _0xfa0f[152]);_0x64c3x43[_0xfa0f[153]](_0x64c3x3d)};break;default:_0x64c3x43[_0xfa0f[153]](_0x64c3x3d);_0x64c3x44[_0xfa0f[153]](_[_0xfa0f[154]](_0x64c3x3c)?_0xfa0f[78]+ _0x64c3x3c+ _0xfa0f[78]:_0x64c3x3c)}}});_0x64c3x48[_0xfa0f[153]](sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[158],_0x64c3x43[_0xfa0f[75]](_0xfa0f[74]),_0x64c3x44[_0xfa0f[75]](_0xfa0f[74])))[_0xfa0f[36]](function(_0x64c3x46){_0x64c3x39[_0xfa0f[39]]= _0x64c3x46[_0xfa0f[39]];_0x64c3x47[_0xfa0f[153]](_0x64c3x39);_0x64c3x49[_0xfa0f[172]]++})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21[_0xfa0f[166]]);_0x64c3x49[_0xfa0f[170]]++;_0x64c3x49[_0xfa0f[171]][_0xfa0f[153]](_0x64c3x2b)}))}else {_0x64c3x49[_0xfa0f[170]]++;_0x64c3x49[_0xfa0f[171]][_0xfa0f[153]](_0x64c3x2b)}});_0x64c3x4c[_0xfa0f[73]]&& _[_0xfa0f[72]](_0x64c3x4c,function(_0x64c3x30){if(!_0x64c3x4d[_0xfa0f[73]]|| !_[_0xfa0f[91]](_0x64c3x4d,_0x64c3x30)){_0x64c3x4b[_0xfa0f[153]](Tag[_0xfa0f[146]]({name:_0x64c3x30}))}});return _0x64c3x4b})[_0xfa0f[167]]()[_0xfa0f[36]](function(){return _0x64c3x48})[_0xfa0f[167]]()[_0xfa0f[36]](function(){return _0x64c3x1f[_0xfa0f[35]](201)[_0xfa0f[34]](_0x64c3x49)})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[156]](_0x64c3x21[_0xfa0f[166]]);return _0x64c3x20(_0x64c3x21)})};exports[_0xfa0f[174]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){return Promise[_0xfa0f[167]]([])[_0xfa0f[36]](updateContact(_0x64c3x1e,_0x64c3x1f))[_0xfa0f[36]](function(_0x64c3x39){return _0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x39)})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21);return handleError(_0x64c3x1f,_0x64c3x21)})};exports[_0xfa0f[69]]= function(_0x64c3x1e,_0x64c3x1f,_0x64c3x20){var _0x64c3x3a;return Promise[_0xfa0f[167]]([])[_0xfa0f[36]](updateContact(_0x64c3x1e,_0x64c3x1f))[_0xfa0f[36]](function(_0x64c3x39){_0x64c3x3a= _0x64c3x39;if(_0x64c3x1e[_0xfa0f[141]][_0xfa0f[175]]){return Contact[_0xfa0f[176]]({where:{id:_0x64c3x1e[_0xfa0f[141]][_0xfa0f[175]]},individualHooks:true})}})[_0xfa0f[36]](function(){return _0x64c3x1f[_0xfa0f[35]](200)[_0xfa0f[34]](_0x64c3x3a)})[_0xfa0f[33]](function(_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21);return handleError(_0x64c3x1f,_0x64c3x21)})};function updateContact(_0x64c3x1e,_0x64c3x1f){return function(){var _0x64c3x3a;return Tag[_0xfa0f[96]]()[_0xfa0f[36]](function(_0x64c3x4a){var _0x64c3x4b=[];var _0x64c3x4d=_[_0xfa0f[79]](_[_0xfa0f[79]](_0x64c3x4a,_0xfa0f[97]),_0xfa0f[71]);if(_0x64c3x1e[_0xfa0f[141]][_0xfa0f[44]]){_0x64c3x1e[_0xfa0f[141]][_0xfa0f[44]][_0xfa0f[72]](function(_0x64c3x30){if(!_[_0xfa0f[91]](_0x64c3x4d,_0x64c3x30)){_0x64c3x4b[_0xfa0f[153]](Tag[_0xfa0f[146]]({name:_0x64c3x30}))}})};return _0x64c3x4b})[_0xfa0f[36]](function(){return Contact[_0xfa0f[110]](_0x64c3x1e[_0xfa0f[136]][_0xfa0f[39]])})[_0xfa0f[36]](function(_0x64c3x39){if(!_0x64c3x39){return _0x64c3x1f[_0xfa0f[123]](404)};delete _0x64c3x1e[_0xfa0f[141]][_0xfa0f[39]];return _0x64c3x39[_0xfa0f[179]](_0x64c3x1e[_0xfa0f[141]])})[_0xfa0f[36]](function(_0x64c3x39){_0x64c3x3a= _0x64c3x39;return CustomField[_0xfa0f[96]]({where:{$or:[{ListId:_0x64c3x3a[_0xfa0f[93]]},{ListId:null}]}})})[_0xfa0f[36]](function(_0x64c3x2c){if(_0x64c3x2c[_0xfa0f[73]]){var _0x64c3x2d=[];_0x64c3x2c[_0xfa0f[72]](function(_0x64c3x30){if(_0x64c3x1e[_0xfa0f[141]][_0xfa0f[178]](_0x64c3x30[_0xfa0f[71]])){_0x64c3x2d[_0xfa0f[153]](util[_0xfa0f[86]](_0xfa0f[160],_0x64c3x30[_0xfa0f[71]],_0x64c3x1e[_0xfa0f[141]][_0x64c3x30[_0xfa0f[71]]]))}});if(_0x64c3x2d[_0xfa0f[73]]){_0x64c3x2d= _0x64c3x2d[_0xfa0f[75]](_0xfa0f[74]);return sequelize[_0xfa0f[84]](util[_0xfa0f[86]](_0xfa0f[161],_0x64c3x2d,_0x64c3x3a[_0xfa0f[39]]))}}})[_0xfa0f[36]](function(){return TdUpdate[_0xfa0f[146]]({action:_0xfa0f[177],listId:_0x64c3x3a[_0xfa0f[93]],contactId:_0x64c3x3a[_0xfa0f[39]]})})[_0xfa0f[36]](function(){return _0x64c3x3a})}}exports[_0xfa0f[176]]= function(_0x64c3x1e,_0x64c3x1f){return Contact[_0xfa0f[110]](_0x64c3x1e[_0xfa0f[136]][_0xfa0f[39]])[_0xfa0f[36]](function(_0x64c3x3f){if(!_0x64c3x3f){return _0x64c3x1f[_0xfa0f[123]](404)};return _0x64c3x3f[_0xfa0f[176]]()})[_0xfa0f[36]](function(_0x64c3x39){return TdUpdate[_0xfa0f[146]]({action:_0xfa0f[180],listId:_0x64c3x39[_0xfa0f[93]],contactId:_0x64c3x39[_0xfa0f[39]]})})[_0xfa0f[36]](function(){return _0x64c3x1f[_0xfa0f[123]](204)})[_0xfa0f[33]](function(_0x64c3x21){return handleError(_0x64c3x1f,_0x64c3x21)})};exports[_0xfa0f[181]]= function(_0x64c3x1e,_0x64c3x1f){return Contact[_0xfa0f[96]]({where:{id:_0x64c3x1e[_0xfa0f[84]][_0xfa0f[182]]}})[_0xfa0f[36]](function(_0x64c3x32){var _0x64c3x4f=[];if(_0x64c3x32&& _0x64c3x32[_0xfa0f[73]]){_[_0xfa0f[72]](_0x64c3x32,function(_0x64c3x39){_0x64c3x4f[_0xfa0f[153]](_0x64c3x39[_0xfa0f[176]]());_0x64c3x4f[_0xfa0f[153]](TdUpdate[_0xfa0f[146]]({action:_0xfa0f[180],listId:_0x64c3x39[_0xfa0f[93]],contactId:_0x64c3x39[_0xfa0f[39]]}))})};return _0x64c3x4f})[_0xfa0f[167]]()[_0xfa0f[36]](function(){return _0x64c3x1f[_0xfa0f[123]](204)})[_0xfa0f[33]](function(_0x64c3x21){return handleError(_0x64c3x1f,_0x64c3x21)})};function handleError(_0x64c3x1f,_0x64c3x21){console[_0xfa0f[122]](_0x64c3x21[_0xfa0f[166]]);return _0x64c3x1f[_0xfa0f[35]](500)[_0xfa0f[34]](_0x64c3x21)}