From 6d4107fbaf2f83beba73ec1e8d2332a02cb30b51 Mon Sep 17 00:00:00 2001
From: support
Date: Thu, 28 Apr 2022 06:38:20 +0000
Subject: [PATCH] Built motion from commit 2ff66822.|2.6.9
---
apidoc/api_project.js | 2 +-
apidoc/api_project.json | 2 +-
server/api/action/action.attributes.js | 2 +-
server/api/action/action.controller.js | 2 +-
server/api/action/action.model.js | 2 +-
server/api/action/action.rpc.js | 2 +-
server/api/action/index.js | 2 +-
.../analyticCustomReport.attributes.js | 2 +-
.../analyticCustomReport.controller.js | 2 +-
.../analyticCustomReport.model.js | 2 +-
.../analyticCustomReport.rpc.js | 2 +-
server/api/analyticCustomReport/index.js | 2 +-
.../analyticDefaultReport.attributes.js | 2 +-
.../analyticDefaultReport.controller.js | 2 +-
.../analyticDefaultReport.model.js | 2 +-
.../analyticDefaultReport.rpc.js | 2 +-
server/api/analyticDefaultReport/index.js | 2 +-
.../analyticExtractedReport.attributes.js | 2 +-
.../analyticExtractedReport.controller.js | 2 +-
.../analyticExtractedReport.model.js | 2 +-
.../analyticExtractedReport.rpc.js | 2 +-
server/api/analyticExtractedReport/index.js | 2 +-
.../analyticFieldReport.attributes.js | 2 +-
.../analyticFieldReport.controller.js | 2 +-
.../analyticFieldReport.model.js | 2 +-
.../analyticFieldReport/analyticFieldReport.rpc.js | 2 +-
server/api/analyticFieldReport/index.js | 2 +-
.../analyticMetric/analyticMetric.attributes.js | 2 +-
.../analyticMetric/analyticMetric.controller.js | 2 +-
server/api/analyticMetric/analyticMetric.model.js | 2 +-
server/api/analyticMetric/analyticMetric.rpc.js | 2 +-
server/api/analyticMetric/index.js | 2 +-
.../analyticTreeReport.attributes.js | 2 +-
.../analyticTreeReport.controller.js | 2 +-
.../analyticTreeReport/analyticTreeReport.model.js | 2 +-
.../analyticTreeReport/analyticTreeReport.rpc.js | 2 +-
server/api/analyticTreeReport/index.js | 2 +-
server/api/attachment/attachment.attributes.js | 2 +-
server/api/attachment/attachment.controller.js | 2 +-
server/api/attachment/attachment.model.js | 2 +-
server/api/attachment/attachment.rpc.js | 2 +-
server/api/attachment/index.js | 2 +-
.../authActiveDirectory.controller.js | 2 +-
server/api/authActiveDirectory/index.js | 2 +-
server/api/authGoogle/authGoogle.controller.js | 2 +-
server/api/authGoogle/index.js | 2 +-
server/api/authLocal/authLocal.controller.js | 2 +-
server/api/authLocal/index.js | 2 +-
server/api/automation/automation.attributes.js | 2 +-
server/api/automation/automation.controller.js | 2 +-
server/api/automation/automation.model.js | 2 +-
server/api/automation/automation.rpc.js | 2 +-
server/api/automation/index.js | 2 +-
server/api/campaign/campaign.attributes.js | 2 +-
server/api/campaign/campaign.controller.js | 2 +-
server/api/campaign/campaign.model.js | 2 +-
server/api/campaign/campaign.rpc.js | 2 +-
server/api/campaign/index.js | 2 +-
server/api/cannedAnswer/cannedAnswer.attributes.js | 2 +-
server/api/cannedAnswer/cannedAnswer.controller.js | 2 +-
server/api/cannedAnswer/cannedAnswer.model.js | 2 +-
server/api/cannedAnswer/cannedAnswer.rpc.js | 2 +-
server/api/cannedAnswer/index.js | 2 +-
server/api/cdr/cdr.attributes.js | 2 +-
server/api/cdr/cdr.controller.js | 2 +-
server/api/cdr/cdr.model.js | 2 +-
server/api/cdr/cdr.rpc.js | 2 +-
server/api/cdr/index.js | 2 +-
.../chatApplication/chatApplication.attributes.js | 2 +-
.../chatApplication/chatApplication.controller.js | 2 +-
.../api/chatApplication/chatApplication.model.js | 2 +-
server/api/chatApplication/chatApplication.rpc.js | 2 +-
server/api/chatApplication/index.js | 2 +-
server/api/chatGroup/chatGroup.attributes.js | 2 +-
server/api/chatGroup/chatGroup.controller.js | 2 +-
server/api/chatGroup/chatGroup.events.js | 2 +-
server/api/chatGroup/chatGroup.model.js | 2 +-
server/api/chatGroup/chatGroup.rpc.js | 2 +-
server/api/chatGroup/chatGroup.socket.js | 2 +-
server/api/chatGroup/index.js | 2 +-
.../chatInteraction/chatInteraction.attributes.js | 2 +-
.../chatInteraction/chatInteraction.controller.js | 2 +-
.../api/chatInteraction/chatInteraction.events.js | 2 +-
.../api/chatInteraction/chatInteraction.model.js | 2 +-
server/api/chatInteraction/chatInteraction.rpc.js | 2 +-
.../api/chatInteraction/chatInteraction.socket.js | 2 +-
server/api/chatInteraction/index.js | 2 +-
.../chatInternalMessage.attributes.js | 2 +-
.../chatInternalMessage.controller.js | 2 +-
.../chatInternalMessage.events.js | 2 +-
.../chatInternalMessage.model.js | 2 +-
.../chatInternalMessage/chatInternalMessage.rpc.js | 2 +-
.../chatInternalMessage.socket.js | 2 +-
server/api/chatInternalMessage/index.js | 2 +-
server/api/chatMessage/chatMessage.attributes.js | 2 +-
server/api/chatMessage/chatMessage.controller.js | 2 +-
server/api/chatMessage/chatMessage.events.js | 2 +-
server/api/chatMessage/chatMessage.model.js | 2 +-
server/api/chatMessage/chatMessage.rpc.js | 2 +-
server/api/chatMessage/chatMessage.socket.js | 2 +-
server/api/chatMessage/index.js | 2 +-
.../chatOfflineMessage.attributes.js | 2 +-
.../chatOfflineMessage.controller.js | 2 +-
.../chatOfflineMessage.events.js | 2 +-
.../chatOfflineMessage/chatOfflineMessage.model.js | 2 +-
.../chatOfflineMessage/chatOfflineMessage.rpc.js | 2 +-
server/api/chatOfflineMessage/index.js | 2 +-
.../chatProactiveAction.attributes.js | 2 +-
.../chatProactiveAction.controller.js | 2 +-
.../chatProactiveAction.model.js | 2 +-
.../chatProactiveAction/chatProactiveAction.rpc.js | 2 +-
server/api/chatProactiveAction/index.js | 2 +-
server/api/chatQueue/chatQueue.attributes.js | 2 +-
server/api/chatQueue/chatQueue.controller.js | 2 +-
server/api/chatQueue/chatQueue.events.js | 2 +-
server/api/chatQueue/chatQueue.model.js | 2 +-
server/api/chatQueue/chatQueue.rpc.js | 2 +-
server/api/chatQueue/chatQueue.socket.js | 2 +-
server/api/chatQueue/index.js | 2 +-
.../chatQueueReport/chatQueueReport.attributes.js | 2 +-
.../chatQueueReport/chatQueueReport.controller.js | 2 +-
.../api/chatQueueReport/chatQueueReport.model.js | 2 +-
server/api/chatQueueReport/chatQueueReport.rpc.js | 2 +-
server/api/chatQueueReport/index.js | 2 +-
.../chatTransferReport.attributes.js | 2 +-
.../chatTransferReport.controller.js | 2 +-
.../chatTransferReport/chatTransferReport.model.js | 2 +-
.../chatTransferReport/chatTransferReport.rpc.js | 2 +-
server/api/chatTransferReport/index.js | 2 +-
server/api/chatWebsite/chatWebsite.attributes.js | 2 +-
server/api/chatWebsite/chatWebsite.controller.js | 2 +-
server/api/chatWebsite/chatWebsite.events.js | 2 +-
server/api/chatWebsite/chatWebsite.model.js | 2 +-
server/api/chatWebsite/chatWebsite.rpc.js | 2 +-
server/api/chatWebsite/chatWebsite.socket.js | 2 +-
server/api/chatWebsite/index.js | 2 +-
server/api/client-side-logs.js | 2 +-
.../api/cloudProvider/cloudProvider.attributes.js | 2 +-
.../api/cloudProvider/cloudProvider.controller.js | 2 +-
server/api/cloudProvider/cloudProvider.model.js | 2 +-
server/api/cloudProvider/cloudProvider.oauth.js | 2 +-
server/api/cloudProvider/cloudProvider.rpc.js | 2 +-
server/api/cloudProvider/index.js | 2 +-
server/api/cmCompany/cmCompany.attributes.js | 2 +-
server/api/cmCompany/cmCompany.controller.js | 2 +-
server/api/cmCompany/cmCompany.model.js | 2 +-
server/api/cmCompany/cmCompany.rpc.js | 2 +-
server/api/cmCompany/index.js | 2 +-
server/api/cmContact/cmContact.attributes.js | 2 +-
server/api/cmContact/cmContact.controller.js | 2 +-
server/api/cmContact/cmContact.events.js | 2 +-
server/api/cmContact/cmContact.model.js | 2 +-
server/api/cmContact/cmContact.rpc.js | 2 +-
server/api/cmContact/cmContact.socket.js | 2 +-
server/api/cmContact/index.js | 2 +-
.../cmContactHasItem.attributes.js | 2 +-
.../cmContactHasItem.controller.js | 2 +-
.../api/cmContactHasItem/cmContactHasItem.model.js | 2 +-
.../api/cmContactHasItem/cmContactHasItem.rpc.js | 2 +-
server/api/cmContactHasItem/index.js | 2 +-
.../api/cmCustomField/cmCustomField.attributes.js | 2 +-
.../api/cmCustomField/cmCustomField.controller.js | 2 +-
server/api/cmCustomField/cmCustomField.model.js | 2 +-
server/api/cmCustomField/cmCustomField.rpc.js | 2 +-
server/api/cmCustomField/index.js | 2 +-
server/api/cmHopper/cmHopper.attributes.js | 2 +-
server/api/cmHopper/cmHopper.controller.js | 2 +-
server/api/cmHopper/cmHopper.model.js | 2 +-
server/api/cmHopper/cmHopper.rpc.js | 2 +-
server/api/cmHopper/index.js | 2 +-
.../cmHopperAdditionalPhone.attributes.js | 2 +-
.../cmHopperAdditionalPhone.controller.js | 2 +-
.../cmHopperAdditionalPhone.model.js | 2 +-
.../cmHopperAdditionalPhone.rpc.js | 2 +-
server/api/cmHopperAdditionalPhone/index.js | 2 +-
.../api/cmHopperBlack/cmHopperBlack.attributes.js | 2 +-
.../api/cmHopperBlack/cmHopperBlack.controller.js | 2 +-
server/api/cmHopperBlack/cmHopperBlack.model.js | 2 +-
server/api/cmHopperBlack/cmHopperBlack.rpc.js | 2 +-
server/api/cmHopperBlack/index.js | 2 +-
.../api/cmHopperFinal/cmHopperFinal.attributes.js | 2 +-
.../api/cmHopperFinal/cmHopperFinal.controller.js | 2 +-
server/api/cmHopperFinal/cmHopperFinal.model.js | 2 +-
server/api/cmHopperFinal/cmHopperFinal.rpc.js | 2 +-
server/api/cmHopperFinal/index.js | 2 +-
.../cmHopperHistory/cmHopperHistory.attributes.js | 2 +-
.../cmHopperHistory/cmHopperHistory.controller.js | 2 +-
.../api/cmHopperHistory/cmHopperHistory.model.js | 2 +-
server/api/cmHopperHistory/cmHopperHistory.rpc.js | 2 +-
server/api/cmHopperHistory/index.js | 2 +-
server/api/cmList/cmList.attributes.js | 2 +-
server/api/cmList/cmList.controller.js | 2 +-
server/api/cmList/cmList.events.js | 2 +-
server/api/cmList/cmList.model.js | 2 +-
server/api/cmList/cmList.rpc.js | 2 +-
server/api/cmList/cmList.socket.js | 2 +-
server/api/cmList/index.js | 2 +-
server/api/condition/condition.attributes.js | 2 +-
server/api/condition/condition.controller.js | 2 +-
server/api/condition/condition.model.js | 2 +-
server/api/condition/condition.rpc.js | 2 +-
server/api/condition/index.js | 2 +-
.../contactItemType/contactItemType.attributes.js | 2 +-
.../contactItemType/contactItemType.controller.js | 2 +-
.../api/contactItemType/contactItemType.model.js | 2 +-
server/api/contactItemType/contactItemType.rpc.js | 2 +-
server/api/contactItemType/index.js | 2 +-
server/api/dashboard/dashboard.attributes.js | 2 +-
server/api/dashboard/dashboard.controller.js | 2 +-
server/api/dashboard/dashboard.events.js | 2 +-
server/api/dashboard/dashboard.model.js | 2 +-
server/api/dashboard/dashboard.rpc.js | 2 +-
server/api/dashboard/dashboard.socket.js | 2 +-
server/api/dashboard/index.js | 2 +-
.../api/dashboardItem/dashboardItem.attributes.js | 2 +-
.../api/dashboardItem/dashboardItem.controller.js | 2 +-
server/api/dashboardItem/dashboardItem.events.js | 2 +-
server/api/dashboardItem/dashboardItem.model.js | 2 +-
server/api/dashboardItem/dashboardItem.rpc.js | 2 +-
server/api/dashboardItem/dashboardItem.socket.js | 2 +-
server/api/dashboardItem/index.js | 2 +-
server/api/disposition/disposition.attributes.js | 2 +-
server/api/disposition/disposition.controller.js | 2 +-
server/api/disposition/disposition.model.js | 2 +-
server/api/disposition/disposition.rpc.js | 2 +-
server/api/disposition/index.js | 2 +-
server/api/faxAccount/faxAccount.attributes.js | 2 +-
server/api/faxAccount/faxAccount.controller.js | 2 +-
server/api/faxAccount/faxAccount.events.js | 2 +-
server/api/faxAccount/faxAccount.model.js | 2 +-
server/api/faxAccount/faxAccount.rpc.js | 2 +-
server/api/faxAccount/faxAccount.socket.js | 2 +-
server/api/faxAccount/index.js | 2 +-
.../faxApplication/faxApplication.attributes.js | 2 +-
.../faxApplication/faxApplication.controller.js | 2 +-
server/api/faxApplication/faxApplication.model.js | 2 +-
server/api/faxApplication/faxApplication.rpc.js | 2 +-
server/api/faxApplication/index.js | 2 +-
.../faxInteraction/faxInteraction.attributes.js | 2 +-
.../faxInteraction/faxInteraction.controller.js | 2 +-
server/api/faxInteraction/faxInteraction.events.js | 2 +-
server/api/faxInteraction/faxInteraction.model.js | 2 +-
server/api/faxInteraction/faxInteraction.rpc.js | 2 +-
server/api/faxInteraction/faxInteraction.socket.js | 2 +-
server/api/faxInteraction/index.js | 2 +-
server/api/faxMessage/faxMessage.attributes.js | 2 +-
server/api/faxMessage/faxMessage.controller.js | 2 +-
server/api/faxMessage/faxMessage.events.js | 2 +-
server/api/faxMessage/faxMessage.model.js | 2 +-
server/api/faxMessage/faxMessage.rpc.js | 2 +-
server/api/faxMessage/faxMessage.socket.js | 2 +-
server/api/faxMessage/index.js | 2 +-
server/api/faxQueue/faxQueue.attributes.js | 2 +-
server/api/faxQueue/faxQueue.controller.js | 2 +-
server/api/faxQueue/faxQueue.events.js | 2 +-
server/api/faxQueue/faxQueue.model.js | 2 +-
server/api/faxQueue/faxQueue.rpc.js | 2 +-
server/api/faxQueue/faxQueue.socket.js | 2 +-
server/api/faxQueue/index.js | 2 +-
.../faxQueueReport/faxQueueReport.attributes.js | 2 +-
.../faxQueueReport/faxQueueReport.controller.js | 2 +-
server/api/faxQueueReport/faxQueueReport.model.js | 2 +-
server/api/faxQueueReport/faxQueueReport.rpc.js | 2 +-
server/api/faxQueueReport/index.js | 2 +-
.../faxTransferReport.attributes.js | 2 +-
.../faxTransferReport.controller.js | 2 +-
.../faxTransferReport/faxTransferReport.model.js | 2 +-
.../api/faxTransferReport/faxTransferReport.rpc.js | 2 +-
server/api/faxTransferReport/index.js | 2 +-
server/api/intDeskAccount/index.js | 2 +-
.../intDeskAccount/intDeskAccount.attributes.js | 2 +-
.../intDeskAccount/intDeskAccount.controller.js | 2 +-
server/api/intDeskAccount/intDeskAccount.model.js | 2 +-
server/api/intDeskAccount/intDeskAccount.rpc.js | 2 +-
server/api/intDeskConfiguration/index.js | 2 +-
.../intDeskConfiguration.attributes.js | 2 +-
.../intDeskConfiguration.controller.js | 2 +-
.../intDeskConfiguration.model.js | 2 +-
.../intDeskConfiguration.rpc.js | 2 +-
server/api/intDeskField/index.js | 2 +-
server/api/intDeskField/intDeskField.attributes.js | 2 +-
server/api/intDeskField/intDeskField.controller.js | 2 +-
server/api/intDeskField/intDeskField.model.js | 2 +-
server/api/intDeskField/intDeskField.rpc.js | 2 +-
server/api/intDynamics365Account/index.js | 2 +-
.../intDynamics365Account.attributes.js | 2 +-
.../intDynamics365Account.controller.js | 2 +-
.../intDynamics365Account.model.js | 2 +-
.../intDynamics365Account.rpc.js | 2 +-
server/api/intDynamics365Configuration/index.js | 2 +-
.../intDynamics365Configuration.attributes.js | 2 +-
.../intDynamics365Configuration.controller.js | 2 +-
.../intDynamics365Configuration.model.js | 2 +-
.../intDynamics365Configuration.rpc.js | 2 +-
server/api/intDynamics365Field/index.js | 2 +-
.../intDynamics365Field.attributes.js | 2 +-
.../intDynamics365Field.controller.js | 2 +-
.../intDynamics365Field.model.js | 2 +-
.../intDynamics365Field/intDynamics365Field.rpc.js | 2 +-
server/api/intFreshdeskAccount/index.js | 2 +-
.../intFreshdeskAccount.attributes.js | 2 +-
.../intFreshdeskAccount.controller.js | 2 +-
.../intFreshdeskAccount.model.js | 2 +-
.../intFreshdeskAccount/intFreshdeskAccount.rpc.js | 2 +-
server/api/intFreshdeskConfiguration/index.js | 2 +-
.../intFreshdeskConfiguration.attributes.js | 2 +-
.../intFreshdeskConfiguration.controller.js | 2 +-
.../intFreshdeskConfiguration.model.js | 2 +-
.../intFreshdeskConfiguration.rpc.js | 2 +-
server/api/intFreshdeskField/index.js | 2 +-
.../intFreshdeskField.attributes.js | 2 +-
.../intFreshdeskField.controller.js | 2 +-
.../intFreshdeskField/intFreshdeskField.model.js | 2 +-
.../api/intFreshdeskField/intFreshdeskField.rpc.js | 2 +-
server/api/intFreshsalesAccount/index.js | 2 +-
.../intFreshsalesAccount.attributes.js | 2 +-
.../intFreshsalesAccount.controller.js | 2 +-
.../intFreshsalesAccount.model.js | 2 +-
.../intFreshsalesAccount.rpc.js | 2 +-
server/api/intFreshsalesConfiguration/index.js | 2 +-
.../intFreshsalesConfiguration.attributes.js | 2 +-
.../intFreshsalesConfiguration.controller.js | 2 +-
.../intFreshsalesConfiguration.model.js | 2 +-
.../intFreshsalesConfiguration.rpc.js | 2 +-
server/api/intFreshsalesField/index.js | 2 +-
.../intFreshsalesField.attributes.js | 2 +-
.../intFreshsalesField.controller.js | 2 +-
.../intFreshsalesField/intFreshsalesField.model.js | 2 +-
.../intFreshsalesField/intFreshsalesField.rpc.js | 2 +-
server/api/intSalesforceAccount/index.js | 2 +-
.../intSalesforceAccount.attributes.js | 2 +-
.../intSalesforceAccount.controller.js | 2 +-
.../intSalesforceAccount.model.js | 2 +-
.../intSalesforceAccount.rpc.js | 2 +-
server/api/intSalesforceConfiguration/index.js | 2 +-
.../intSalesforceConfiguration.attributes.js | 2 +-
.../intSalesforceConfiguration.controller.js | 2 +-
.../intSalesforceConfiguration.model.js | 2 +-
.../intSalesforceConfiguration.rpc.js | 2 +-
server/api/intSalesforceField/index.js | 2 +-
.../intSalesforceField.attributes.js | 2 +-
.../intSalesforceField.controller.js | 2 +-
.../intSalesforceField/intSalesforceField.model.js | 2 +-
.../intSalesforceField/intSalesforceField.rpc.js | 2 +-
server/api/intServicenowAccount/index.js | 2 +-
.../intServicenowAccount.attributes.js | 2 +-
.../intServicenowAccount.controller.js | 2 +-
.../intServicenowAccount.model.js | 2 +-
.../intServicenowAccount.rpc.js | 2 +-
server/api/intServicenowConfiguration/index.js | 2 +-
.../intServicenowConfiguration.attributes.js | 2 +-
.../intServicenowConfiguration.controller.js | 2 +-
.../intServicenowConfiguration.model.js | 2 +-
.../intServicenowConfiguration.rpc.js | 2 +-
server/api/intServicenowField/index.js | 2 +-
.../intServicenowField.attributes.js | 2 +-
.../intServicenowField.controller.js | 2 +-
.../intServicenowField/intServicenowField.model.js | 2 +-
.../intServicenowField/intServicenowField.rpc.js | 2 +-
server/api/intSugarcrmAccount/index.js | 2 +-
.../intSugarcrmAccount.attributes.js | 2 +-
.../intSugarcrmAccount.controller.js | 2 +-
.../intSugarcrmAccount/intSugarcrmAccount.model.js | 2 +-
.../intSugarcrmAccount/intSugarcrmAccount.rpc.js | 2 +-
server/api/intSugarcrmConfiguration/index.js | 2 +-
.../intSugarcrmConfiguration.attributes.js | 2 +-
.../intSugarcrmConfiguration.controller.js | 2 +-
.../intSugarcrmConfiguration.model.js | 2 +-
.../intSugarcrmConfiguration.rpc.js | 2 +-
server/api/intSugarcrmField/index.js | 2 +-
.../intSugarcrmField.attributes.js | 2 +-
.../intSugarcrmField.controller.js | 2 +-
.../api/intSugarcrmField/intSugarcrmField.model.js | 2 +-
.../api/intSugarcrmField/intSugarcrmField.rpc.js | 2 +-
server/api/intVtigerAccount/index.js | 2 +-
.../intVtigerAccount.attributes.js | 2 +-
.../intVtigerAccount.controller.js | 2 +-
.../api/intVtigerAccount/intVtigerAccount.model.js | 2 +-
.../api/intVtigerAccount/intVtigerAccount.rpc.js | 2 +-
server/api/intVtigerConfiguration/index.js | 2 +-
.../intVtigerConfiguration.attributes.js | 2 +-
.../intVtigerConfiguration.controller.js | 2 +-
.../intVtigerConfiguration.model.js | 2 +-
.../intVtigerConfiguration.rpc.js | 2 +-
server/api/intVtigerField/index.js | 2 +-
.../intVtigerField/intVtigerField.attributes.js | 2 +-
.../intVtigerField/intVtigerField.controller.js | 2 +-
server/api/intVtigerField/intVtigerField.model.js | 2 +-
server/api/intVtigerField/intVtigerField.rpc.js | 2 +-
server/api/intZendeskAccount/index.js | 2 +-
.../intZendeskAccount.attributes.js | 2 +-
.../intZendeskAccount.controller.js | 2 +-
.../intZendeskAccount/intZendeskAccount.model.js | 2 +-
.../api/intZendeskAccount/intZendeskAccount.rpc.js | 2 +-
server/api/intZendeskConfiguration/index.js | 2 +-
.../intZendeskConfiguration.attributes.js | 2 +-
.../intZendeskConfiguration.controller.js | 2 +-
.../intZendeskConfiguration.model.js | 2 +-
.../intZendeskConfiguration.rpc.js | 2 +-
server/api/intZendeskField/index.js | 2 +-
.../intZendeskField/intZendeskField.attributes.js | 2 +-
.../intZendeskField/intZendeskField.controller.js | 2 +-
.../api/intZendeskField/intZendeskField.model.js | 2 +-
server/api/intZendeskField/intZendeskField.rpc.js | 2 +-
server/api/intZohoAccount/index.js | 2 +-
.../intZohoAccount/intZohoAccount.attributes.js | 2 +-
.../intZohoAccount/intZohoAccount.controller.js | 2 +-
server/api/intZohoAccount/intZohoAccount.model.js | 2 +-
server/api/intZohoAccount/intZohoAccount.rpc.js | 2 +-
server/api/intZohoConfiguration/index.js | 2 +-
.../intZohoConfiguration.attributes.js | 2 +-
.../intZohoConfiguration.controller.js | 2 +-
.../intZohoConfiguration.model.js | 2 +-
.../intZohoConfiguration.rpc.js | 2 +-
server/api/intZohoField/index.js | 2 +-
server/api/intZohoField/intZohoField.attributes.js | 2 +-
server/api/intZohoField/intZohoField.controller.js | 2 +-
server/api/intZohoField/intZohoField.model.js | 2 +-
server/api/intZohoField/intZohoField.rpc.js | 2 +-
server/api/integration/index.js | 2 +-
server/api/integration/integration.attributes.js | 2 +-
server/api/integration/integration.controller.js | 2 +-
server/api/integration/integration.model.js | 2 +-
server/api/integration/integration.rpc.js | 2 +-
server/api/integrationReport/index.js | 2 +-
.../integrationReport.attributes.js | 2 +-
.../integrationReport.controller.js | 2 +-
.../integrationReport/integrationReport.model.js | 2 +-
.../api/integrationReport/integrationReport.rpc.js | 2 +-
server/api/interval/index.js | 2 +-
server/api/interval/interval.attributes.js | 2 +-
server/api/interval/interval.controller.js | 2 +-
server/api/interval/interval.model.js | 2 +-
server/api/interval/interval.rpc.js | 2 +-
server/api/jira/index.js | 2 +-
server/api/jira/jira.controller.js | 2 +-
server/api/jscriptyAnswerReport/index.js | 2 +-
.../jscriptyAnswerReport.attributes.js | 2 +-
.../jscriptyAnswerReport.controller.js | 2 +-
.../jscriptyAnswerReport.model.js | 2 +-
.../jscriptyAnswerReport.rpc.js | 2 +-
server/api/jscriptyProject/index.js | 2 +-
.../jscriptyProject/jscriptyProject.attributes.js | 2 +-
.../jscriptyProject/jscriptyProject.controller.js | 2 +-
.../api/jscriptyProject/jscriptyProject.model.js | 2 +-
server/api/jscriptyProject/jscriptyProject.rpc.js | 2 +-
server/api/jscriptyQuestionReport/index.js | 2 +-
.../jscriptyQuestionReport.attributes.js | 2 +-
.../jscriptyQuestionReport.controller.js | 2 +-
.../jscriptyQuestionReport.model.js | 2 +-
.../jscriptyQuestionReport.rpc.js | 2 +-
server/api/jscriptySessionReport/index.js | 2 +-
.../jscriptySessionReport.attributes.js | 2 +-
.../jscriptySessionReport.controller.js | 2 +-
.../jscriptySessionReport.model.js | 2 +-
.../jscriptySessionReport.rpc.js | 2 +-
server/api/license/index.js | 2 +-
server/api/license/license.attributes.js | 2 +-
server/api/license/license.controller.js | 2 +-
server/api/license/license.model.js | 2 +-
server/api/license/license.rpc.js | 2 +-
server/api/mailAccount/index.js | 2 +-
server/api/mailAccount/mailAccount.attributes.js | 2 +-
server/api/mailAccount/mailAccount.controller.js | 2 +-
server/api/mailAccount/mailAccount.events.js | 2 +-
server/api/mailAccount/mailAccount.model.js | 2 +-
server/api/mailAccount/mailAccount.rpc.js | 2 +-
server/api/mailAccount/mailAccount.socket.js | 2 +-
server/api/mailApplication/index.js | 2 +-
.../mailApplication/mailApplication.attributes.js | 2 +-
.../mailApplication/mailApplication.controller.js | 2 +-
.../api/mailApplication/mailApplication.model.js | 2 +-
server/api/mailApplication/mailApplication.rpc.js | 2 +-
server/api/mailInteraction/index.js | 2 +-
.../mailInteraction/mailInteraction.attributes.js | 2 +-
.../mailInteraction/mailInteraction.controller.js | 2 +-
.../api/mailInteraction/mailInteraction.events.js | 2 +-
.../api/mailInteraction/mailInteraction.model.js | 2 +-
server/api/mailInteraction/mailInteraction.rpc.js | 2 +-
.../api/mailInteraction/mailInteraction.socket.js | 2 +-
server/api/mailMessage/index.js | 2 +-
server/api/mailMessage/mailMessage.attributes.js | 2 +-
server/api/mailMessage/mailMessage.controller.js | 2 +-
server/api/mailMessage/mailMessage.events.js | 2 +-
server/api/mailMessage/mailMessage.model.js | 2 +-
server/api/mailMessage/mailMessage.rpc.js | 2 +-
server/api/mailMessage/mailMessage.socket.js | 2 +-
server/api/mailQueue/index.js | 2 +-
server/api/mailQueue/mailQueue.attributes.js | 2 +-
server/api/mailQueue/mailQueue.controller.js | 2 +-
server/api/mailQueue/mailQueue.events.js | 2 +-
server/api/mailQueue/mailQueue.model.js | 2 +-
server/api/mailQueue/mailQueue.rpc.js | 2 +-
server/api/mailQueue/mailQueue.socket.js | 2 +-
server/api/mailQueueReport/index.js | 2 +-
.../mailQueueReport/mailQueueReport.attributes.js | 2 +-
.../mailQueueReport/mailQueueReport.controller.js | 2 +-
.../api/mailQueueReport/mailQueueReport.model.js | 2 +-
server/api/mailQueueReport/mailQueueReport.rpc.js | 2 +-
server/api/mailServerIn/index.js | 2 +-
server/api/mailServerIn/mailServerIn.attributes.js | 2 +-
server/api/mailServerIn/mailServerIn.model.js | 2 +-
server/api/mailServerIn/mailServerIn.rpc.js | 2 +-
server/api/mailServerOut/index.js | 2 +-
.../api/mailServerOut/mailServerOut.attributes.js | 2 +-
.../api/mailServerOut/mailServerOut.controller.js | 2 +-
server/api/mailServerOut/mailServerOut.model.js | 2 +-
server/api/mailServerOut/mailServerOut.rpc.js | 2 +-
server/api/mailSubstatus/index.js | 2 +-
.../api/mailSubstatus/mailSubstatus.attributes.js | 2 +-
.../api/mailSubstatus/mailSubstatus.controller.js | 2 +-
server/api/mailSubstatus/mailSubstatus.events.js | 2 +-
server/api/mailSubstatus/mailSubstatus.model.js | 2 +-
server/api/mailSubstatus/mailSubstatus.rpc.js | 2 +-
server/api/mailTransferReport/index.js | 2 +-
.../mailTransferReport.attributes.js | 2 +-
.../mailTransferReport.controller.js | 2 +-
.../mailTransferReport/mailTransferReport.model.js | 2 +-
.../mailTransferReport/mailTransferReport.rpc.js | 2 +-
server/api/memberReport/index.js | 2 +-
server/api/memberReport/memberReport.attributes.js | 2 +-
server/api/memberReport/memberReport.controller.js | 2 +-
server/api/memberReport/memberReport.model.js | 2 +-
server/api/memberReport/memberReport.rpc.js | 2 +-
server/api/migration/index.js | 2 +-
server/api/migration/migration.attributes.js | 2 +-
server/api/migration/migration.controller.js | 2 +-
server/api/migration/migration.model.js | 2 +-
server/api/migration/migration.rpc.js | 2 +-
server/api/network/index.js | 2 +-
server/api/network/network.attributes.js | 2 +-
server/api/network/network.controller.js | 2 +-
server/api/network/network.model.js | 2 +-
server/api/network/network.rpc.js | 2 +-
server/api/openchannelAccount/index.js | 2 +-
.../openchannelAccount.attributes.js | 2 +-
.../openchannelAccount.controller.js | 2 +-
.../openchannelAccount.events.js | 2 +-
.../openchannelAccount/openchannelAccount.model.js | 2 +-
.../openchannelAccount/openchannelAccount.rpc.js | 2 +-
.../openchannelAccount.socket.js | 2 +-
server/api/openchannelApplication/index.js | 2 +-
.../openchannelApplication.attributes.js | 2 +-
.../openchannelApplication.controller.js | 2 +-
.../openchannelApplication.model.js | 2 +-
.../openchannelApplication.rpc.js | 2 +-
server/api/openchannelInteraction/index.js | 2 +-
.../openchannelInteraction.attributes.js | 2 +-
.../openchannelInteraction.controller.js | 2 +-
.../openchannelInteraction.events.js | 2 +-
.../openchannelInteraction.model.js | 2 +-
.../openchannelInteraction.rpc.js | 2 +-
.../openchannelInteraction.socket.js | 2 +-
server/api/openchannelMessage/index.js | 2 +-
.../openchannelMessage.attributes.js | 2 +-
.../openchannelMessage.controller.js | 2 +-
.../openchannelMessage.events.js | 2 +-
.../openchannelMessage/openchannelMessage.model.js | 2 +-
.../openchannelMessage/openchannelMessage.rpc.js | 2 +-
.../openchannelMessage.socket.js | 2 +-
server/api/openchannelQueue/index.js | 2 +-
.../openchannelQueue.attributes.js | 2 +-
.../openchannelQueue.controller.js | 2 +-
.../openchannelQueue/openchannelQueue.events.js | 2 +-
.../api/openchannelQueue/openchannelQueue.model.js | 2 +-
.../api/openchannelQueue/openchannelQueue.rpc.js | 2 +-
.../openchannelQueue/openchannelQueue.socket.js | 2 +-
server/api/openchannelQueueReport/index.js | 2 +-
.../openchannelQueueReport.attributes.js | 2 +-
.../openchannelQueueReport.controller.js | 2 +-
.../openchannelQueueReport.model.js | 2 +-
.../openchannelQueueReport.rpc.js | 2 +-
server/api/openchannelTransferReport/index.js | 2 +-
.../openchannelTransferReport.attributes.js | 2 +-
.../openchannelTransferReport.controller.js | 2 +-
.../openchannelTransferReport.model.js | 2 +-
.../openchannelTransferReport.rpc.js | 2 +-
server/api/pause/index.js | 2 +-
server/api/pause/pause.attributes.js | 2 +-
server/api/pause/pause.controller.js | 2 +-
server/api/pause/pause.model.js | 2 +-
server/api/pause/pause.rpc.js | 2 +-
server/api/plugin/index.js | 2 +-
server/api/plugin/plugin.attributes.js | 2 +-
server/api/plugin/plugin.controller.js | 2 +-
server/api/plugin/plugin.events.js | 2 +-
server/api/plugin/plugin.model.js | 2 +-
server/api/plugin/plugin.rpc.js | 2 +-
server/api/plugin/plugin.socket.js | 2 +-
server/api/pm2/index.js | 2 +-
server/api/pm2/pm2.controller.js | 2 +-
server/api/realtime/index.js | 2 +-
server/api/realtime/realtime.controller.js | 2 +-
server/api/reportAgentPreview/index.js | 2 +-
.../reportAgentPreview.attributes.js | 2 +-
.../reportAgentPreview/reportAgentPreview.model.js | 2 +-
.../reportAgentPreview/reportAgentPreview.rpc.js | 2 +-
server/api/rpc/index.js | 2 +-
server/api/rpc/rpc.controller.js | 2 +-
server/api/schedule/index.js | 2 +-
server/api/schedule/schedule.attributes.js | 2 +-
server/api/schedule/schedule.controller.js | 2 +-
server/api/schedule/schedule.model.js | 2 +-
server/api/schedule/schedule.rpc.js | 2 +-
server/api/screenRecording/index.js | 2 +-
.../screenRecording/screenRecording.attributes.js | 2 +-
.../screenRecording/screenRecording.controller.js | 2 +-
.../api/screenRecording/screenRecording.model.js | 2 +-
server/api/screenRecording/screenRecording.rpc.js | 2 +-
server/api/setting/index.js | 2 +-
server/api/setting/setting.attributes.js | 2 +-
server/api/setting/setting.controller.js | 2 +-
server/api/setting/setting.model.js | 2 +-
server/api/setting/setting.rpc.js | 2 +-
server/api/smsAccount/index.js | 2 +-
server/api/smsAccount/smsAccount.attributes.js | 2 +-
server/api/smsAccount/smsAccount.controller.js | 2 +-
server/api/smsAccount/smsAccount.events.js | 2 +-
server/api/smsAccount/smsAccount.model.js | 2 +-
server/api/smsAccount/smsAccount.rpc.js | 2 +-
server/api/smsAccount/smsAccount.socket.js | 2 +-
server/api/smsApplication/index.js | 2 +-
.../smsApplication/smsApplication.attributes.js | 2 +-
.../smsApplication/smsApplication.controller.js | 2 +-
server/api/smsApplication/smsApplication.model.js | 2 +-
server/api/smsApplication/smsApplication.rpc.js | 2 +-
server/api/smsInteraction/index.js | 2 +-
.../smsInteraction/smsInteraction.attributes.js | 2 +-
.../smsInteraction/smsInteraction.controller.js | 2 +-
server/api/smsInteraction/smsInteraction.events.js | 2 +-
server/api/smsInteraction/smsInteraction.model.js | 2 +-
server/api/smsInteraction/smsInteraction.rpc.js | 2 +-
server/api/smsInteraction/smsInteraction.socket.js | 2 +-
server/api/smsMessage/index.js | 2 +-
server/api/smsMessage/smsMessage.attributes.js | 2 +-
server/api/smsMessage/smsMessage.controller.js | 2 +-
server/api/smsMessage/smsMessage.events.js | 2 +-
server/api/smsMessage/smsMessage.model.js | 2 +-
server/api/smsMessage/smsMessage.rpc.js | 2 +-
server/api/smsMessage/smsMessage.socket.js | 2 +-
server/api/smsQueue/index.js | 2 +-
server/api/smsQueue/smsQueue.attributes.js | 2 +-
server/api/smsQueue/smsQueue.controller.js | 2 +-
server/api/smsQueue/smsQueue.events.js | 2 +-
server/api/smsQueue/smsQueue.model.js | 2 +-
server/api/smsQueue/smsQueue.rpc.js | 2 +-
server/api/smsQueue/smsQueue.socket.js | 2 +-
server/api/smsQueueReport/index.js | 2 +-
.../smsQueueReport/smsQueueReport.attributes.js | 2 +-
.../smsQueueReport/smsQueueReport.controller.js | 2 +-
server/api/smsQueueReport/smsQueueReport.model.js | 2 +-
server/api/smsQueueReport/smsQueueReport.rpc.js | 2 +-
server/api/smsTransferReport/index.js | 2 +-
.../smsTransferReport.attributes.js | 2 +-
.../smsTransferReport.controller.js | 2 +-
.../smsTransferReport/smsTransferReport.model.js | 2 +-
.../api/smsTransferReport/smsTransferReport.rpc.js | 2 +-
server/api/sound/index.js | 2 +-
server/api/sound/sound.attributes.js | 2 +-
server/api/sound/sound.controller.js | 2 +-
server/api/sound/sound.model.js | 2 +-
server/api/sound/sound.rpc.js | 2 +-
server/api/squareMessage/index.js | 2 +-
.../api/squareMessage/squareMessage.attributes.js | 2 +-
.../api/squareMessage/squareMessage.controller.js | 2 +-
server/api/squareMessage/squareMessage.model.js | 2 +-
server/api/squareMessage/squareMessage.rpc.js | 2 +-
server/api/squareOdbc/index.js | 2 +-
server/api/squareOdbc/squareOdbc.attributes.js | 2 +-
server/api/squareOdbc/squareOdbc.controller.js | 2 +-
server/api/squareOdbc/squareOdbc.model.js | 2 +-
server/api/squareOdbc/squareOdbc.rpc.js | 2 +-
server/api/squareProject/index.js | 2 +-
.../api/squareProject/squareProject.attributes.js | 2 +-
.../api/squareProject/squareProject.controller.js | 2 +-
server/api/squareProject/squareProject.events.js | 2 +-
server/api/squareProject/squareProject.model.js | 2 +-
server/api/squareProject/squareProject.rpc.js | 2 +-
server/api/squareProject/squareProject.socket.js | 2 +-
server/api/squareRecording/index.js | 2 +-
.../squareRecording/squareRecording.attributes.js | 2 +-
.../squareRecording/squareRecording.controller.js | 2 +-
.../api/squareRecording/squareRecording.model.js | 2 +-
server/api/squareRecording/squareRecording.rpc.js | 2 +-
server/api/squareReport/index.js | 2 +-
server/api/squareReport/squareReport.attributes.js | 2 +-
server/api/squareReport/squareReport.controller.js | 2 +-
server/api/squareReport/squareReport.model.js | 2 +-
server/api/squareReport/squareReport.rpc.js | 2 +-
server/api/squareReportDetail/index.js | 2 +-
.../squareReportDetail.attributes.js | 2 +-
.../squareReportDetail.controller.js | 2 +-
.../squareReportDetail/squareReportDetail.model.js | 2 +-
.../squareReportDetail/squareReportDetail.rpc.js | 2 +-
server/api/system/index.js | 2 +-
server/api/system/system.controller.js | 2 +-
server/api/tag/index.js | 2 +-
server/api/tag/tag.attributes.js | 2 +-
server/api/tag/tag.controller.js | 2 +-
server/api/tag/tag.model.js | 2 +-
server/api/tag/tag.rpc.js | 2 +-
server/api/team/index.js | 2 +-
server/api/team/team.attributes.js | 2 +-
server/api/team/team.controller.js | 2 +-
server/api/team/team.events.js | 2 +-
server/api/team/team.model.js | 2 +-
server/api/team/team.rpc.js | 2 +-
server/api/team/team.socket.js | 2 +-
.../teamVoicePrefix/teamVoicePrefix.attributes.js | 2 +-
.../api/teamVoicePrefix/teamVoicePrefix.model.js | 2 +-
server/api/teamVoiceQueue/index.js | 2 +-
.../teamVoiceQueue/teamVoiceQueue.attributes.js | 2 +-
server/api/teamVoiceQueue/teamVoiceQueue.model.js | 2 +-
server/api/teamVoiceQueue/teamVoiceQueue.rpc.js | 2 +-
server/api/template/index.js | 2 +-
server/api/template/template.attributes.js | 2 +-
server/api/template/template.controller.js | 2 +-
server/api/template/template.model.js | 2 +-
server/api/template/template.rpc.js | 2 +-
server/api/trigger/index.js | 2 +-
server/api/trigger/trigger.attributes.js | 2 +-
server/api/trigger/trigger.controller.js | 2 +-
server/api/trigger/trigger.model.js | 2 +-
server/api/trigger/trigger.rpc.js | 2 +-
server/api/trunk/index.js | 2 +-
server/api/trunk/trunk.attributes.js | 2 +-
server/api/trunk/trunk.controller.js | 2 +-
server/api/trunk/trunk.model.js | 2 +-
server/api/trunk/trunk.rpc.js | 2 +-
server/api/user-setting/index.js | 2 +-
server/api/user-setting/user-setting.attributes.js | 2 +-
server/api/user-setting/user-setting.controller.js | 2 +-
server/api/user-setting/user-setting.events.js | 2 +-
server/api/user-setting/user-setting.model.js | 2 +-
server/api/user-setting/user-setting.socket.js | 2 +-
server/api/user/index.js | 2 +-
server/api/user/user.attributes.js | 2 +-
server/api/user/user.controller.js | 2 +-
server/api/user/user.events.js | 2 +-
server/api/user/user.model.js | 2 +-
server/api/user/user.rpc.js | 2 +-
server/api/user/user.socket.js | 2 +-
server/api/userChatQueue/index.js | 2 +-
.../api/userChatQueue/userChatQueue.attributes.js | 2 +-
server/api/userChatQueue/userChatQueue.model.js | 2 +-
server/api/userChatQueue/userChatQueue.rpc.js | 2 +-
server/api/userFaxQueue/index.js | 2 +-
server/api/userFaxQueue/userFaxQueue.attributes.js | 2 +-
server/api/userFaxQueue/userFaxQueue.model.js | 2 +-
server/api/userFaxQueue/userFaxQueue.rpc.js | 2 +-
server/api/userMailQueue/index.js | 2 +-
.../api/userMailQueue/userMailQueue.attributes.js | 2 +-
server/api/userMailQueue/userMailQueue.model.js | 2 +-
server/api/userMailQueue/userMailQueue.rpc.js | 2 +-
server/api/userNotification/index.js | 2 +-
.../userNotification.attributes.js | 2 +-
.../userNotification.controller.js | 2 +-
.../userNotification/userNotification.events.js | 2 +-
.../api/userNotification/userNotification.model.js | 2 +-
.../api/userNotification/userNotification.rpc.js | 2 +-
.../userNotification/userNotification.socket.js | 2 +-
server/api/userOpenchannelQueue/index.js | 2 +-
.../userOpenchannelQueue.attributes.js | 2 +-
.../userOpenchannelQueue.model.js | 2 +-
.../userOpenchannelQueue.rpc.js | 2 +-
server/api/userProfile/index.js | 2 +-
server/api/userProfile/userProfile.attributes.js | 2 +-
server/api/userProfile/userProfile.controller.js | 2 +-
server/api/userProfile/userProfile.events.js | 2 +-
server/api/userProfile/userProfile.model.js | 2 +-
server/api/userProfile/userProfile.rpc.js | 2 +-
server/api/userProfile/userProfile.socket.js | 2 +-
server/api/userProfileResource/index.js | 2 +-
.../userProfileResource.attributes.js | 2 +-
.../userProfileResource.controller.js | 2 +-
.../userProfileResource.model.js | 2 +-
.../userProfileResource/userProfileResource.rpc.js | 2 +-
server/api/userProfileSection/index.js | 2 +-
.../userProfileSection.attributes.js | 2 +-
.../userProfileSection.controller.js | 2 +-
.../userProfileSection/userProfileSection.model.js | 2 +-
.../userProfileSection/userProfileSection.rpc.js | 2 +-
server/api/userSmsQueue/index.js | 2 +-
server/api/userSmsQueue/userSmsQueue.attributes.js | 2 +-
server/api/userSmsQueue/userSmsQueue.model.js | 2 +-
server/api/userSmsQueue/userSmsQueue.rpc.js | 2 +-
.../userVoicePrefix/userVoicePrefix.attributes.js | 2 +-
.../api/userVoicePrefix/userVoicePrefix.model.js | 2 +-
server/api/userVoiceQueue/index.js | 2 +-
.../userVoiceQueue/userVoiceQueue.attributes.js | 2 +-
server/api/userVoiceQueue/userVoiceQueue.model.js | 2 +-
server/api/userVoiceQueue/userVoiceQueue.rpc.js | 2 +-
server/api/userVoiceQueueRt/index.js | 2 +-
.../userVoiceQueueRt.attributes.js | 2 +-
.../userVoiceQueueRt/userVoiceQueueRt.events.js | 2 +-
.../api/userVoiceQueueRt/userVoiceQueueRt.model.js | 2 +-
.../api/userVoiceQueueRt/userVoiceQueueRt.rpc.js | 2 +-
.../userVoiceQueueRt/userVoiceQueueRt.socket.js | 2 +-
server/api/userWhatsappQueue/index.js | 2 +-
.../userWhatsappQueue.attributes.js | 2 +-
.../userWhatsappQueue/userWhatsappQueue.model.js | 2 +-
.../api/userWhatsappQueue/userWhatsappQueue.rpc.js | 2 +-
server/api/variable/index.js | 2 +-
server/api/variable/variable.attributes.js | 2 +-
server/api/variable/variable.controller.js | 2 +-
server/api/variable/variable.model.js | 2 +-
server/api/variable/variable.rpc.js | 2 +-
server/api/version/index.js | 2 +-
server/api/version/version.controller.js | 2 +-
server/api/voiceAgentReport/index.js | 2 +-
.../voiceAgentReport.attributes.js | 2 +-
.../voiceAgentReport.controller.js | 2 +-
.../api/voiceAgentReport/voiceAgentReport.model.js | 2 +-
.../api/voiceAgentReport/voiceAgentReport.rpc.js | 2 +-
server/api/voiceCallReport/index.js | 2 +-
.../voiceCallReport/voiceCallReport.attributes.js | 2 +-
.../voiceCallReport/voiceCallReport.controller.js | 2 +-
.../api/voiceCallReport/voiceCallReport.model.js | 2 +-
server/api/voiceCallReport/voiceCallReport.rpc.js | 2 +-
server/api/voiceChanSpy/index.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.attributes.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.controller.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.model.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.rpc.js | 2 +-
server/api/voiceContext/index.js | 2 +-
server/api/voiceContext/voiceContext.attributes.js | 2 +-
server/api/voiceContext/voiceContext.controller.js | 2 +-
server/api/voiceContext/voiceContext.model.js | 2 +-
server/api/voiceContext/voiceContext.rpc.js | 2 +-
server/api/voiceDialReport/index.js | 2 +-
.../voiceDialReport/voiceDialReport.attributes.js | 2 +-
.../voiceDialReport/voiceDialReport.controller.js | 2 +-
.../api/voiceDialReport/voiceDialReport.model.js | 2 +-
server/api/voiceDialReport/voiceDialReport.rpc.js | 2 +-
server/api/voiceExtension/index.js | 2 +-
.../voiceExtension/voiceExtension.attributes.js | 2 +-
.../voiceExtension/voiceExtension.controller.js | 2 +-
server/api/voiceExtension/voiceExtension.events.js | 2 +-
server/api/voiceExtension/voiceExtension.model.js | 2 +-
server/api/voiceExtension/voiceExtension.rpc.js | 2 +-
server/api/voiceExtension/voiceExtension.socket.js | 2 +-
server/api/voiceMail/index.js | 2 +-
server/api/voiceMail/voiceMail.attributes.js | 2 +-
server/api/voiceMail/voiceMail.controller.js | 2 +-
server/api/voiceMail/voiceMail.model.js | 2 +-
server/api/voiceMail/voiceMail.rpc.js | 2 +-
server/api/voiceMailMessage/index.js | 2 +-
.../voiceMailMessage.attributes.js | 2 +-
.../voiceMailMessage.controller.js | 2 +-
.../api/voiceMailMessage/voiceMailMessage.model.js | 2 +-
.../api/voiceMailMessage/voiceMailMessage.rpc.js | 2 +-
server/api/voiceMusicOnHold/index.js | 2 +-
.../voiceMusicOnHold.attributes.js | 2 +-
.../voiceMusicOnHold.controller.js | 2 +-
.../api/voiceMusicOnHold/voiceMusicOnHold.model.js | 2 +-
.../api/voiceMusicOnHold/voiceMusicOnHold.rpc.js | 2 +-
server/api/voicePrefix/index.js | 2 +-
server/api/voicePrefix/voicePrefix.attributes.js | 2 +-
server/api/voicePrefix/voicePrefix.controller.js | 2 +-
server/api/voicePrefix/voicePrefix.events.js | 2 +-
server/api/voicePrefix/voicePrefix.model.js | 2 +-
server/api/voicePrefix/voicePrefix.rpc.js | 2 +-
server/api/voicePrefix/voicePrefix.socket.js | 2 +-
server/api/voiceQueue/index.js | 2 +-
server/api/voiceQueue/voiceQueue.attributes.js | 2 +-
server/api/voiceQueue/voiceQueue.controller.js | 2 +-
server/api/voiceQueue/voiceQueue.events.js | 2 +-
server/api/voiceQueue/voiceQueue.model.js | 2 +-
server/api/voiceQueue/voiceQueue.rpc.js | 2 +-
server/api/voiceQueue/voiceQueue.socket.js | 2 +-
server/api/voiceQueueReport/index.js | 2 +-
.../voiceQueueReport.attributes.js | 2 +-
.../voiceQueueReport.controller.js | 2 +-
.../voiceQueueReport/voiceQueueReport.events.js | 2 +-
.../api/voiceQueueReport/voiceQueueReport.model.js | 2 +-
.../api/voiceQueueReport/voiceQueueReport.rpc.js | 2 +-
.../voiceQueueReport/voiceQueueReport.socket.js | 2 +-
server/api/voiceQueuesLog/index.js | 2 +-
.../voiceQueuesLog/voiceQueuesLog.attributes.js | 2 +-
.../voiceQueuesLog/voiceQueuesLog.controller.js | 2 +-
server/api/voiceQueuesLog/voiceQueuesLog.model.js | 2 +-
server/api/voiceQueuesLog/voiceQueuesLog.rpc.js | 2 +-
server/api/voiceRecording/index.js | 2 +-
.../voiceRecording/voiceRecording.attributes.js | 2 +-
.../voiceRecording/voiceRecording.controller.js | 2 +-
server/api/voiceRecording/voiceRecording.model.js | 2 +-
server/api/voiceRecording/voiceRecording.rpc.js | 2 +-
server/api/voiceTransferReport/index.js | 2 +-
.../voiceTransferReport.attributes.js | 2 +-
.../voiceTransferReport.controller.js | 2 +-
.../voiceTransferReport.model.js | 2 +-
.../voiceTransferReport/voiceTransferReport.rpc.js | 2 +-
server/api/webbar/index.js | 2 +-
server/api/webbar/webbar.controller.js | 2 +-
server/api/whatsappAccount/index.js | 2 +-
.../whatsappAccount/whatsappAccount.attributes.js | 2 +-
.../whatsappAccount/whatsappAccount.controller.js | 2 +-
.../api/whatsappAccount/whatsappAccount.events.js | 2 +-
.../api/whatsappAccount/whatsappAccount.model.js | 2 +-
server/api/whatsappAccount/whatsappAccount.rpc.js | 2 +-
.../api/whatsappAccount/whatsappAccount.socket.js | 2 +-
server/api/whatsappApplication/index.js | 2 +-
.../whatsappApplication.attributes.js | 2 +-
.../whatsappApplication.controller.js | 2 +-
.../whatsappApplication.model.js | 2 +-
.../whatsappApplication/whatsappApplication.rpc.js | 2 +-
server/api/whatsappInteraction/index.js | 2 +-
.../whatsappInteraction.attributes.js | 2 +-
.../whatsappInteraction.controller.js | 2 +-
.../whatsappInteraction.events.js | 2 +-
.../whatsappInteraction.model.js | 2 +-
.../whatsappInteraction/whatsappInteraction.rpc.js | 2 +-
.../whatsappInteraction.socket.js | 2 +-
server/api/whatsappMessage/index.js | 2 +-
.../whatsappMessage/whatsappMessage.attributes.js | 2 +-
.../whatsappMessage/whatsappMessage.controller.js | 2 +-
.../api/whatsappMessage/whatsappMessage.events.js | 2 +-
.../api/whatsappMessage/whatsappMessage.model.js | 2 +-
server/api/whatsappMessage/whatsappMessage.rpc.js | 2 +-
.../api/whatsappMessage/whatsappMessage.socket.js | 2 +-
server/api/whatsappQueue/index.js | 2 +-
.../api/whatsappQueue/whatsappQueue.attributes.js | 2 +-
.../api/whatsappQueue/whatsappQueue.controller.js | 2 +-
server/api/whatsappQueue/whatsappQueue.events.js | 2 +-
server/api/whatsappQueue/whatsappQueue.model.js | 2 +-
server/api/whatsappQueue/whatsappQueue.rpc.js | 2 +-
server/api/whatsappQueue/whatsappQueue.socket.js | 2 +-
server/api/whatsappQueueReport/index.js | 2 +-
.../whatsappQueueReport.attributes.js | 2 +-
.../whatsappQueueReport.controller.js | 2 +-
.../whatsappQueueReport.model.js | 2 +-
.../whatsappQueueReport/whatsappQueueReport.rpc.js | 2 +-
server/api/whatsappTransferReport/index.js | 2 +-
.../whatsappTransferReport.attributes.js | 2 +-
.../whatsappTransferReport.controller.js | 2 +-
.../whatsappTransferReport.model.js | 2 +-
.../whatsappTransferReport.rpc.js | 2 +-
server/app.js | 2 +-
server/components/auth/service.js | 2 +-
server/components/contacts/index.js | 2 +-
server/components/contacts/sql-utils.js | 2 +-
server/components/encryptor/index.js | 2 +-
server/components/export/csv.js | 2 +-
server/components/export/pdf.js | 2 +-
server/components/export/xlsx.js | 2 +-
server/components/extensions/rewrite.js | 2 +-
server/components/import/cm/csv.js | 2 +-
server/components/import/cm/csv2.js | 2 +-
server/components/import/cm/csvUpdates.js | 2 +-
server/components/integrations/configuration.js | 2 +-
server/components/interaction/service.js | 2 +-
server/components/interaction/sql-utils.js | 2 +-
.../components/interaction/update-interaction.js | 2 +-
server/components/interaction/utils.js | 2 +-
server/components/license/service.js | 2 +-
server/components/parsers/advancedSearch.js | 2 +-
server/components/parsers/qs.js | 2 +-
server/components/realtime/agents.js | 2 +-
server/config/express.js | 2 +-
server/config/license/hardware.js | 2 +-
server/config/license/index.js | 2 +-
server/config/license/util.js | 2 +-
server/config/local.env.js | 2 +-
server/config/logger.js | 2 +-
server/config/pm2/config.js | 2 +-
server/config/pm2/index.js | 2 +-
server/config/schedule/chat.js | 2 +-
server/config/schedule/cloud-provider.js | 2 +-
server/config/schedule/index.js | 2 +-
server/config/schedule/transcribe.js | 2 +-
server/config/schedule/whatsapp.js | 2 +-
server/config/seedContact.js | 2 +-
server/config/seedUsers.js | 2 +-
server/config/socketio.js | 2 +-
server/config/triggers/index.js | 2 +-
server/config/utils.js | 2 +-
server/errors/api.js | 2 +-
server/errors/index.js | 2 +-
server/mysqldb/index.js | 2 +-
server/routes.js | 2 +-
server/rpc/index.js | 2 +-
server/services/agi/channel.js | 2 +-
server/services/agi/error.js | 2 +-
server/services/agi/events.js | 2 +-
server/services/agi/graph/index.js | 2 +-
server/services/agi/index.js | 2 +-
server/services/agi/mailRpc/index.js | 2 +-
server/services/agi/project.js | 2 +-
server/services/agi/reply.js | 2 +-
server/services/agi/rpc/index.js | 2 +-
server/services/agi/scripts/aws/index.js | 2 +-
server/services/agi/scripts/aws/lex/index.js | 2 +-
server/services/agi/scripts/aws/lex/lib/api.js | 2 +-
server/services/agi/scripts/aws/polly/index.js | 2 +-
server/services/agi/scripts/aws/polly/lib/api.js | 2 +-
server/services/agi/scripts/google/asr/index.js | 2 +-
server/services/agi/scripts/google/asr/lib/api.js | 2 +-
server/services/agi/scripts/google/index.js | 2 +-
server/services/agi/scripts/index.js | 2 +-
server/services/agi/scripts/sestek/index.js | 2 +-
server/services/agi/scripts/sestek/nda/index.js | 2 +-
server/services/agi/scripts/tilde/asr/index.js | 2 +-
server/services/agi/scripts/tilde/asr/lib/api.js | 2 +-
server/services/agi/scripts/tilde/index.js | 2 +-
server/services/agi/server.js | 2 +-
server/services/agi/vertices.js | 2 +-
server/services/ami/acw/index.js | 2 +-
server/services/ami/ami.js | 2 +-
server/services/ami/client.js | 2 +-
server/services/ami/dialer/action.js | 2 +-
server/services/ami/dialer/agentComplete.js | 2 +-
server/services/ami/dialer/final.js | 2 +-
server/services/ami/dialer/hangup.js | 2 +-
server/services/ami/dialer/history.js | 2 +-
server/services/ami/dialer/index.js | 2 +-
server/services/ami/dialer/queueCallerAbandon.js | 2 +-
server/services/ami/fax/action.js | 2 +-
server/services/ami/fax/index.js | 2 +-
server/services/ami/fax/rpcDb.js | 2 +-
server/services/ami/fax/util/gs.js | 2 +-
server/services/ami/fax/util/util.js | 2 +-
server/services/ami/index.js | 2 +-
server/services/ami/model/agent.js | 2 +-
server/services/ami/model/campaign.js | 2 +-
server/services/ami/model/channel.js | 2 +-
server/services/ami/model/deskAccount.js | 2 +-
server/services/ami/model/dynamics365Account.js | 2 +-
server/services/ami/model/faxAccount.js | 2 +-
server/services/ami/model/freshdeskAccount.js | 2 +-
server/services/ami/model/freshsalesAccount.js | 2 +-
server/services/ami/model/queueReport.js | 2 +-
server/services/ami/model/salesforceAccount.js | 2 +-
server/services/ami/model/servicenowAccount.js | 2 +-
server/services/ami/model/sugarcrmAccount.js | 2 +-
server/services/ami/model/telephone.js | 2 +-
server/services/ami/model/template.js | 2 +-
server/services/ami/model/trigger.js | 2 +-
server/services/ami/model/trunk.js | 2 +-
server/services/ami/model/voiceExtension.js | 2 +-
server/services/ami/model/voiceQueue.js | 2 +-
server/services/ami/model/vtigerAccount.js | 2 +-
server/services/ami/model/zendeskAccount.js | 2 +-
server/services/ami/model/zohoAccount.js | 2 +-
server/services/ami/preview/action.js | 2 +-
server/services/ami/preview/index.js | 2 +-
server/services/ami/preview/rpcDb.js | 2 +-
server/services/ami/preview/util/util.js | 2 +-
server/services/ami/properties.js | 2 +-
server/services/ami/realtime/index.js | 2 +-
server/services/ami/report/index.js | 2 +-
server/services/ami/report/userReport.js | 2 +-
server/services/ami/report/voiceAgentReport.js | 2 +-
server/services/ami/report/voiceCallReport.js | 2 +-
server/services/ami/report/voiceDialReport.js | 2 +-
server/services/ami/report/voiceQueueReport.js | 2 +-
server/services/ami/rpc/agentReportPreview.js | 2 +-
server/services/ami/rpc/attachment.js | 2 +-
server/services/ami/rpc/campaign.js | 2 +-
server/services/ami/rpc/cmContact.js | 2 +-
server/services/ami/rpc/cmHopper.js | 2 +-
server/services/ami/rpc/cmHopperAdditionalPhone.js | 2 +-
server/services/ami/rpc/cmHopperBlack.js | 2 +-
server/services/ami/rpc/cmHopperFinal.js | 2 +-
server/services/ami/rpc/cmHopperHistory.js | 2 +-
server/services/ami/rpc/faxAccount.js | 2 +-
server/services/ami/rpc/faxMessage.js | 2 +-
server/services/ami/rpc/integrations/desk.js | 2 +-
.../services/ami/rpc/integrations/dynamics365.js | 2 +-
server/services/ami/rpc/integrations/freshdesk.js | 2 +-
server/services/ami/rpc/integrations/freshsales.js | 2 +-
server/services/ami/rpc/integrations/salesforce.js | 2 +-
server/services/ami/rpc/integrations/servicenow.js | 2 +-
server/services/ami/rpc/integrations/sugarcrm.js | 2 +-
server/services/ami/rpc/integrations/vtiger.js | 2 +-
server/services/ami/rpc/integrations/zendesk.js | 2 +-
server/services/ami/rpc/integrations/zoho.js | 2 +-
server/services/ami/rpc/memberReport.js | 2 +-
server/services/ami/rpc/setting.js | 2 +-
server/services/ami/rpc/template.js | 2 +-
server/services/ami/rpc/trigger.js | 2 +-
server/services/ami/rpc/trunk.js | 2 +-
server/services/ami/rpc/user.js | 2 +-
server/services/ami/rpc/voiceAgentReport.js | 2 +-
server/services/ami/rpc/voiceCallReport.js | 2 +-
server/services/ami/rpc/voiceDialReport.js | 2 +-
server/services/ami/rpc/voiceExtension.js | 2 +-
server/services/ami/rpc/voiceQueue.js | 2 +-
server/services/ami/rpc/voiceQueueReport.js | 2 +-
server/services/ami/rpc/voiceQueueRt.js | 2 +-
server/services/ami/rpc/voiceRecording.js | 2 +-
server/services/ami/rpc/voiceTransferReport.js | 2 +-
server/services/ami/server/index.js | 2 +-
server/services/ami/trigger/cmContact/index.js | 2 +-
server/services/ami/trigger/index.js | 2 +-
server/services/ami/trigger/integration/desk.js | 2 +-
.../ami/trigger/integration/dynamics365.js | 2 +-
.../services/ami/trigger/integration/freshdesk.js | 2 +-
.../services/ami/trigger/integration/freshsales.js | 2 +-
server/services/ami/trigger/integration/index.js | 2 +-
.../services/ami/trigger/integration/salesforce.js | 2 +-
.../services/ami/trigger/integration/servicenow.js | 2 +-
.../services/ami/trigger/integration/sugarcrm.js | 2 +-
server/services/ami/trigger/integration/util.js | 2 +-
server/services/ami/trigger/integration/vtiger.js | 2 +-
server/services/ami/trigger/integration/zendesk.js | 2 +-
server/services/ami/trigger/integration/zoho.js | 2 +-
server/services/ami/trigger/script/index.js | 2 +-
server/services/ami/trigger/urlforward/index.js | 2 +-
server/services/email/client.js | 2 +-
server/services/email/index.js | 2 +-
server/services/email/lib/email.js | 2 +-
server/services/email/lib/imap.js | 2 +-
server/services/email/lib/smtp.js | 2 +-
server/services/email/lib/utils.js | 2 +-
server/services/email/model/mailAccount.js | 2 +-
server/services/email/realtime/index.js | 2 +-
server/services/email/rpc/mailAccount.js | 2 +-
server/services/email/rpc/setting.js | 2 +-
server/services/email/server/index.js | 2 +-
server/services/express/index.js | 2 +-
server/services/routing/client.js | 2 +-
server/services/routing/index.js | 2 +-
server/services/routing/lib/rule-engine.js | 2 +-
server/services/routing/mailRpc/index.js | 2 +-
server/services/routing/model/agent.js | 2 +-
server/services/routing/model/chatQueue.js | 2 +-
server/services/routing/model/faxQueue.js | 2 +-
server/services/routing/model/interval.js | 2 +-
server/services/routing/model/mailQueue.js | 2 +-
server/services/routing/model/openchannelQueue.js | 2 +-
server/services/routing/model/smsQueue.js | 2 +-
server/services/routing/model/whatsappQueue.js | 2 +-
server/services/routing/realtime/index.js | 2 +-
server/services/routing/rpc/chatInteraction.js | 2 +-
server/services/routing/rpc/chatMessage.js | 2 +-
server/services/routing/rpc/chatQueue.js | 2 +-
server/services/routing/rpc/chatQueueReport.js | 2 +-
server/services/routing/rpc/faxInteraction.js | 2 +-
server/services/routing/rpc/faxMessage.js | 2 +-
server/services/routing/rpc/faxQueue.js | 2 +-
server/services/routing/rpc/faxQueueReport.js | 2 +-
server/services/routing/rpc/interval.js | 2 +-
server/services/routing/rpc/mailInteraction.js | 2 +-
server/services/routing/rpc/mailMessage.js | 2 +-
server/services/routing/rpc/mailQueue.js | 2 +-
server/services/routing/rpc/mailQueueReport.js | 2 +-
.../services/routing/rpc/openchannelInteraction.js | 2 +-
server/services/routing/rpc/openchannelMessage.js | 2 +-
server/services/routing/rpc/openchannelQueue.js | 2 +-
.../services/routing/rpc/openchannelQueueReport.js | 2 +-
server/services/routing/rpc/smsInteraction.js | 2 +-
server/services/routing/rpc/smsMessage.js | 2 +-
server/services/routing/rpc/smsQueue.js | 2 +-
server/services/routing/rpc/smsQueueReport.js | 2 +-
server/services/routing/rpc/user.js | 2 +-
server/services/routing/rpc/whatsappInteraction.js | 2 +-
server/services/routing/rpc/whatsappMessage.js | 2 +-
server/services/routing/rpc/whatsappQueue.js | 2 +-
server/services/routing/rpc/whatsappQueueReport.js | 2 +-
.../services/routing/server/applications/agent.js | 2 +-
.../routing/server/applications/amazonlex.js | 2 +-
.../routing/server/applications/autoreply.js | 2 +-
.../services/routing/server/applications/close.js | 2 +-
.../routing/server/applications/dialogflow.js | 2 +-
.../routing/server/applications/dialogflowV2.js | 2 +-
.../services/routing/server/applications/gotoif.js | 2 +-
.../services/routing/server/applications/gotop.js | 2 +-
.../routing/server/applications/message.js | 2 +-
.../services/routing/server/applications/noop.js | 2 +-
.../services/routing/server/applications/queue.js | 2 +-
.../routing/server/applications/strategy/agent.js | 2 +-
.../server/applications/strategy/beepall.js | 2 +-
.../routing/server/applications/strategy/index.js | 2 +-
.../server/applications/strategy/rrmemory.js | 2 +-
.../routing/server/applications/strategy/util.js | 2 +-
.../services/routing/server/applications/system.js | 2 +-
server/services/routing/server/applications/tag.js | 2 +-
.../services/routing/server/applications/tvox.js | 2 +-
.../services/routing/server/applications/utils.js | 2 +-
server/services/routing/server/index.js | 2 +-
server/services/routing/server/interval.js | 2 +-
server/services/xdr/agents.controller.js | 2 +-
server/services/xdr/calls.controller.js | 2 +-
server/services/xdr/core.controller.js | 2 +-
server/services/xdr/dials.controller.js | 2 +-
server/services/xdr/index.js | 2 +-
server/services/xdr/members.controller.js | 2 +-
server/services/xdr/queues.controller.js | 2 +-
server/services/xdr/recordings.controller.js | 2 +-
server/services/xdr/transfers.controller.js | 2 +-
server/services/xdr/utils.js | 2 +-
server/utils/client-side-logger.js | 2 +-
server/utils/loggers.js | 2 +-
server/utils/mask-sensitive-data.js | 2 +-
server/utils/safe-template.js | 2 +-
1195 files changed, 1195 insertions(+), 1195 deletions(-)
diff --git a/apidoc/api_project.js b/apidoc/api_project.js
index cfa2c8b..6b146aa 100644
--- a/apidoc/api_project.js
+++ b/apidoc/api_project.js
@@ -17,7 +17,7 @@ define({
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2022-04-27T16:06:29.519Z",
+ "time": "2022-04-28T06:30:29.800Z",
"url": "http://apidocjs.com",
"version": "0.24.0"
}
diff --git a/apidoc/api_project.json b/apidoc/api_project.json
index c2625f7..d2d527f 100644
--- a/apidoc/api_project.json
+++ b/apidoc/api_project.json
@@ -17,7 +17,7 @@
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2022-04-27T16:06:29.519Z",
+ "time": "2022-04-28T06:30:29.800Z",
"url": "http://apidocjs.com",
"version": "0.24.0"
}
diff --git a/server/api/action/action.attributes.js b/server/api/action/action.attributes.js
index ce7211b..aae8254 100644
--- a/server/api/action/action.attributes.js
+++ b/server/api/action/action.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1b19=['jscripty','urlForward','bot','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]','contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','TEXT','exports','VIRTUAL','getDataValue','STRING','contactManager','motionbar'];(function(_0x33b93e,_0x1d19e3){var _0x1bc54e=function(_0x7e0970){while(--_0x7e0970){_0x33b93e['push'](_0x33b93e['shift']());}};_0x1bc54e(++_0x1d19e3);}(_0x1b19,0x1ca));var _0x91b1=function(_0x28ff84,_0x2db9c3){_0x28ff84=_0x28ff84-0x0;var _0x27d56b=_0x1b19[_0x28ff84];return _0x27d56b;};'use strict';var Sequelize=require('sequelize');module[_0x91b1('0x0')]={'name':{'type':Sequelize[_0x91b1('0x1')],'get':function(_0x40efbb){return this[_0x91b1('0x2')]('action');}},'action':{'type':Sequelize[_0x91b1('0x3')],'allowNull':![],'validate':{'isIn':{'args':[[_0x91b1('0x4'),'integration',_0x91b1('0x5'),_0x91b1('0x6'),_0x91b1('0x7'),'browser',_0x91b1('0x8'),_0x91b1('0x9')]],'msg':_0x91b1('0xa')}},'comment':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'},'data1':{'type':Sequelize[_0x91b1('0x3')](0x1000),'comment':_0x91b1('0xb')},'data2':{'type':Sequelize[_0x91b1('0x3')](0x1000),'comment':_0x91b1('0xc')},'data3':{'type':Sequelize[_0x91b1('0x3')](0x1000),'comment':_0x91b1('0xd')},'data4':{'type':Sequelize[_0x91b1('0x3')](0x1000),'comments':_0x91b1('0xe')},'data5':{'type':Sequelize[_0x91b1('0x3')](0x1000),'comments':'urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]'},'data6':{'type':Sequelize[_0x91b1('0x3')],'comments':'urlForward[headers],\x20browser[wsindowHeight]'},'data7':{'type':Sequelize[_0x91b1('0xf')],'comments':'urlForward[body]'}};
\ No newline at end of file
+var _0xe50a=['sequelize','exports','VIRTUAL','getDataValue','action','STRING','contactManager','integration','jscripty','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','urlForward[headers],\x20browser[wsindowHeight]','TEXT','urlForward[body]'];(function(_0xbec2cd,_0xcf1938){var _0x38142e=function(_0x2abf51){while(--_0x2abf51){_0xbec2cd['push'](_0xbec2cd['shift']());}};_0x38142e(++_0xcf1938);}(_0xe50a,0x1c2));var _0xae50=function(_0x4c7fb5,_0x2548ef){_0x4c7fb5=_0x4c7fb5-0x0;var _0x2e10ac=_0xe50a[_0x4c7fb5];return _0x2e10ac;};'use strict';var Sequelize=require(_0xae50('0x0'));module[_0xae50('0x1')]={'name':{'type':Sequelize[_0xae50('0x2')],'get':function(_0x393ff8){return this[_0xae50('0x3')](_0xae50('0x4'));}},'action':{'type':Sequelize[_0xae50('0x5')],'allowNull':![],'validate':{'isIn':{'args':[[_0xae50('0x6'),_0xae50('0x7'),'motionbar',_0xae50('0x8'),'urlForward','browser','bot',_0xae50('0x9')]],'msg':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'}},'comment':_0xae50('0xa')},'data1':{'type':Sequelize[_0xae50('0x5')](0x1000),'comment':_0xae50('0xb')},'data2':{'type':Sequelize[_0xae50('0x5')](0x1000),'comment':'contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]'},'data3':{'type':Sequelize[_0xae50('0x5')](0x1000),'comment':_0xae50('0xc')},'data4':{'type':Sequelize[_0xae50('0x5')](0x1000),'comments':_0xae50('0xd')},'data5':{'type':Sequelize['STRING'](0x1000),'comments':_0xae50('0xe')},'data6':{'type':Sequelize[_0xae50('0x5')],'comments':_0xae50('0xf')},'data7':{'type':Sequelize[_0xae50('0x10')],'comments':_0xae50('0x11')}};
\ No newline at end of file
diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js
index 10f1e82..23c78eb 100644
--- a/server/api/action/action.controller.js
+++ b/server/api/action/action.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9ca5=['error','stack','name','body','Action','find','params','catch','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','offset','undefined','count','limit','set','json','apply','reject','save','then','destroy'];(function(_0x28ae71,_0x956d7d){var _0x43a1e3=function(_0x7bea5){while(--_0x7bea5){_0x28ae71['push'](_0x28ae71['shift']());}};_0x43a1e3(++_0x956d7d);}(_0x9ca5,0xdf));var _0x59ca=function(_0x3b154f,_0x14fd22){_0x3b154f=_0x3b154f-0x0;var _0xe53d42=_0x9ca5[_0x3b154f];return _0xe53d42;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x59ca('0x0'));var zipdir=require(_0x59ca('0x1'));var jsonpatch=require(_0x59ca('0x2'));var rp=require(_0x59ca('0x3'));var moment=require(_0x59ca('0x4'));var BPromise=require(_0x59ca('0x5'));var Mustache=require('mustache');var util=require(_0x59ca('0x6'));var path=require(_0x59ca('0x7'));var sox=require('sox');var csv=require(_0x59ca('0x8'));var ejs=require(_0x59ca('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x59ca('0xa'));var squel=require('squel');var crypto=require(_0x59ca('0xb'));var jsforce=require(_0x59ca('0xc'));var deskjs=require(_0x59ca('0xd'));var toCsv=require(_0x59ca('0x8'));var querystring=require('querystring');var Papa=require(_0x59ca('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x59ca('0xf'));var hardwareService=require(_0x59ca('0x10'));var logger=require(_0x59ca('0x11'))(_0x59ca('0x12'));var utils=require(_0x59ca('0x13'));var config=require(_0x59ca('0x14'));var licenseUtil=require(_0x59ca('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x203909,_0x24ac5c){_0x24ac5c=_0x24ac5c||0xcc;return function(_0x1acf98){if(_0x1acf98){return _0x203909['sendStatus'](_0x24ac5c);}return _0x203909[_0x59ca('0x16')](_0x24ac5c)[_0x59ca('0x17')]();};}function respondWithResult(_0x289c35,_0x4279cc){_0x4279cc=_0x4279cc||0xc8;return function(_0x1f8fae){if(_0x1f8fae){return _0x289c35['status'](_0x4279cc)['json'](_0x1f8fae);}};}function respondWithFilteredResult(_0x4f85e9,_0x73d6a1){return function(_0x47d22b){if(_0x47d22b){var _0x25ef25=typeof _0x73d6a1[_0x59ca('0x18')]==='undefined'&&typeof _0x73d6a1['limit']===_0x59ca('0x19');var _0x1c51da=_0x47d22b[_0x59ca('0x1a')];var _0x2acb08=_0x25ef25?0x0:_0x73d6a1[_0x59ca('0x18')];var _0x335df2=_0x25ef25?_0x47d22b[_0x59ca('0x1a')]:_0x73d6a1[_0x59ca('0x18')]+_0x73d6a1[_0x59ca('0x1b')];var _0x5ef81d;if(_0x335df2>=_0x1c51da){_0x335df2=_0x1c51da;_0x5ef81d=0xc8;}else{_0x5ef81d=0xce;}_0x4f85e9[_0x59ca('0x16')](_0x5ef81d);return _0x4f85e9[_0x59ca('0x1c')]('Content-Range',_0x2acb08+'-'+_0x335df2+'/'+_0x1c51da)[_0x59ca('0x1d')](_0x47d22b);}return null;};}function patchUpdates(_0x469142){return function(_0x18473f){try{jsonpatch[_0x59ca('0x1e')](_0x18473f,_0x469142,!![]);}catch(_0x2c695b){return BPromise[_0x59ca('0x1f')](_0x2c695b);}return _0x18473f[_0x59ca('0x20')]();};}function saveUpdates(_0x448a98,_0x592270){return function(_0x1dd560){if(_0x1dd560){return _0x1dd560['update'](_0x448a98)[_0x59ca('0x21')](function(_0x4adc6d){return _0x4adc6d;});}return null;};}function removeEntity(_0x2b1f15,_0x503409){return function(_0x2ed513){if(_0x2ed513){return _0x2ed513[_0x59ca('0x22')]()['then'](function(){_0x2b1f15[_0x59ca('0x16')](0xcc)[_0x59ca('0x17')]();});}};}function handleEntityNotFound(_0x57a649,_0x3fa428){return function(_0x584032){if(!_0x584032){_0x57a649['sendStatus'](0x194);}return _0x584032;};}function handleError(_0x3d33ed,_0x16f9dc){_0x16f9dc=_0x16f9dc||0x1f4;return function(_0x1469d1){logger[_0x59ca('0x23')](_0x1469d1[_0x59ca('0x24')]);if(_0x1469d1[_0x59ca('0x25')]){delete _0x1469d1[_0x59ca('0x25')];}_0x3d33ed['status'](_0x16f9dc)['send'](_0x1469d1);};}exports['update']=function(_0x4d5296,_0x279a7c){if(_0x4d5296[_0x59ca('0x26')]['id']){delete _0x4d5296['body']['id'];}return db[_0x59ca('0x27')][_0x59ca('0x28')]({'where':{'id':_0x4d5296[_0x59ca('0x29')]['id']}})[_0x59ca('0x21')](handleEntityNotFound(_0x279a7c,null))[_0x59ca('0x21')](saveUpdates(_0x4d5296[_0x59ca('0x26')],null))[_0x59ca('0x21')](respondWithResult(_0x279a7c,null))[_0x59ca('0x2a')](handleError(_0x279a7c,null));};exports[_0x59ca('0x22')]=function(_0x1ddf40,_0xb1e5ac){return db['Action'][_0x59ca('0x28')]({'where':{'id':_0x1ddf40['params']['id']}})[_0x59ca('0x21')](handleEntityNotFound(_0xb1e5ac,null))['then'](removeEntity(_0xb1e5ac,null))['catch'](handleError(_0xb1e5ac,null));};
\ No newline at end of file
+var _0x2a56=['lodash','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','update','then','destroy','end','error','stack','name','body','Action','find','params','catch','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','ejs','fs-extra'];(function(_0x503ffd,_0x8ecde){var _0x160437=function(_0x2d45dd){while(--_0x2d45dd){_0x503ffd['push'](_0x503ffd['shift']());}};_0x160437(++_0x8ecde);}(_0x2a56,0x186));var _0x62a5=function(_0x3fb56f,_0x2eeb34){_0x3fb56f=_0x3fb56f-0x0;var _0x4098fa=_0x2a56[_0x3fb56f];return _0x4098fa;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x62a5('0x0'));var zipdir=require(_0x62a5('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x62a5('0x2'));var moment=require(_0x62a5('0x3'));var BPromise=require(_0x62a5('0x4'));var Mustache=require(_0x62a5('0x5'));var util=require('util');var path=require(_0x62a5('0x6'));var sox=require(_0x62a5('0x7'));var csv=require('to-csv');var ejs=require(_0x62a5('0x8'));var fs=require('fs');var fs_extra=require(_0x62a5('0x9'));var _=require(_0x62a5('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x62a5('0xb'));var deskjs=require(_0x62a5('0xc'));var toCsv=require(_0x62a5('0xd'));var querystring=require(_0x62a5('0xe'));var Papa=require(_0x62a5('0xf'));var Redis=require(_0x62a5('0x10'));var authService=require(_0x62a5('0x11'));var qs=require(_0x62a5('0x12'));var as=require(_0x62a5('0x13'));var hardwareService=require(_0x62a5('0x14'));var logger=require(_0x62a5('0x15'))(_0x62a5('0x16'));var utils=require(_0x62a5('0x17'));var config=require(_0x62a5('0x18'));var licenseUtil=require(_0x62a5('0x19'));var db=require(_0x62a5('0x1a'))['db'];function respondWithStatusCode(_0x10aaa2,_0x77c4f6){_0x77c4f6=_0x77c4f6||0xcc;return function(_0x27350a){if(_0x27350a){return _0x10aaa2[_0x62a5('0x1b')](_0x77c4f6);}return _0x10aaa2[_0x62a5('0x1c')](_0x77c4f6)['end']();};}function respondWithResult(_0x331bcc,_0x1e29c5){_0x1e29c5=_0x1e29c5||0xc8;return function(_0x13bcb0){if(_0x13bcb0){return _0x331bcc[_0x62a5('0x1c')](_0x1e29c5)[_0x62a5('0x1d')](_0x13bcb0);}};}function respondWithFilteredResult(_0x9954bd,_0x109e4a){return function(_0x1dc8f5){if(_0x1dc8f5){var _0x1eae31=typeof _0x109e4a[_0x62a5('0x1e')]==='undefined'&&typeof _0x109e4a[_0x62a5('0x1f')]===_0x62a5('0x20');var _0x495eb3=_0x1dc8f5[_0x62a5('0x21')];var _0x481a49=_0x1eae31?0x0:_0x109e4a[_0x62a5('0x1e')];var _0xcab835=_0x1eae31?_0x1dc8f5[_0x62a5('0x21')]:_0x109e4a[_0x62a5('0x1e')]+_0x109e4a[_0x62a5('0x1f')];var _0x85eb68;if(_0xcab835>=_0x495eb3){_0xcab835=_0x495eb3;_0x85eb68=0xc8;}else{_0x85eb68=0xce;}_0x9954bd[_0x62a5('0x1c')](_0x85eb68);return _0x9954bd[_0x62a5('0x22')](_0x62a5('0x23'),_0x481a49+'-'+_0xcab835+'/'+_0x495eb3)[_0x62a5('0x1d')](_0x1dc8f5);}return null;};}function patchUpdates(_0x20b9a8){return function(_0x58fe0f){try{jsonpatch[_0x62a5('0x24')](_0x58fe0f,_0x20b9a8,!![]);}catch(_0x3333af){return BPromise[_0x62a5('0x25')](_0x3333af);}return _0x58fe0f['save']();};}function saveUpdates(_0x59efe4,_0x206396){return function(_0x201e78){if(_0x201e78){return _0x201e78[_0x62a5('0x26')](_0x59efe4)[_0x62a5('0x27')](function(_0x2f72df){return _0x2f72df;});}return null;};}function removeEntity(_0x504fdc,_0x48c5dc){return function(_0x47a4b4){if(_0x47a4b4){return _0x47a4b4[_0x62a5('0x28')]()[_0x62a5('0x27')](function(){_0x504fdc[_0x62a5('0x1c')](0xcc)[_0x62a5('0x29')]();});}};}function handleEntityNotFound(_0x5ca681,_0x17e5ae){return function(_0x19a87b){if(!_0x19a87b){_0x5ca681[_0x62a5('0x1b')](0x194);}return _0x19a87b;};}function handleError(_0x3d19d2,_0x4220f1){_0x4220f1=_0x4220f1||0x1f4;return function(_0x3e8c22){logger[_0x62a5('0x2a')](_0x3e8c22[_0x62a5('0x2b')]);if(_0x3e8c22[_0x62a5('0x2c')]){delete _0x3e8c22[_0x62a5('0x2c')];}_0x3d19d2[_0x62a5('0x1c')](_0x4220f1)['send'](_0x3e8c22);};}exports[_0x62a5('0x26')]=function(_0xd76a5f,_0xe61402){if(_0xd76a5f[_0x62a5('0x2d')]['id']){delete _0xd76a5f[_0x62a5('0x2d')]['id'];}return db[_0x62a5('0x2e')][_0x62a5('0x2f')]({'where':{'id':_0xd76a5f[_0x62a5('0x30')]['id']}})[_0x62a5('0x27')](handleEntityNotFound(_0xe61402,null))[_0x62a5('0x27')](saveUpdates(_0xd76a5f['body'],null))[_0x62a5('0x27')](respondWithResult(_0xe61402,null))['catch'](handleError(_0xe61402,null));};exports[_0x62a5('0x28')]=function(_0x4674d4,_0x583fce){return db['Action']['find']({'where':{'id':_0x4674d4[_0x62a5('0x30')]['id']}})['then'](handleEntityNotFound(_0x583fce,null))[_0x62a5('0x27')](removeEntity(_0x583fce,null))[_0x62a5('0x31')](handleError(_0x583fce,null));};
\ No newline at end of file
diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js
index 95aec9c..dcb227a 100644
--- a/server/api/action/action.model.js
+++ b/server/api/action/action.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf4f5=['bluebird','path','rimraf','../../config/environment','./action.attributes','Action','tools_actions','lodash','util','api'];(function(_0x44015d,_0x3f5c3a){var _0x2cb51a=function(_0x2f369c){while(--_0x2f369c){_0x44015d['push'](_0x44015d['shift']());}};_0x2cb51a(++_0x3f5c3a);}(_0xf4f5,0x89));var _0x5f4f=function(_0x5b5377,_0x504a69){_0x5b5377=_0x5b5377-0x0;var _0x53445f=_0xf4f5[_0x5b5377];return _0x53445f;};'use strict';var _=require(_0x5f4f('0x0'));var util=require(_0x5f4f('0x1'));var logger=require('../../config/logger')(_0x5f4f('0x2'));var moment=require('moment');var BPromise=require(_0x5f4f('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5f4f('0x4'));var rimraf=require(_0x5f4f('0x5'));var config=require(_0x5f4f('0x6'));var attributes=require(_0x5f4f('0x7'));module['exports']=function(_0x18efa9,_0x5934cd){return _0x18efa9['define'](_0x5f4f('0x8'),attributes,{'tableName':_0x5f4f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8fa1=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','define','tools_actions','lodash','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8fa1,0x15e));var _0x18fa=function(_0x1e9706,_0x13d7f8){_0x1e9706=_0x1e9706-0x0;var _0x724a9c=_0x8fa1[_0x1e9706];return _0x724a9c;};'use strict';var _=require(_0x18fa('0x0'));var util=require('util');var logger=require(_0x18fa('0x1'))(_0x18fa('0x2'));var moment=require(_0x18fa('0x3'));var BPromise=require(_0x18fa('0x4'));var rp=require(_0x18fa('0x5'));var fs=require('fs');var path=require(_0x18fa('0x6'));var rimraf=require(_0x18fa('0x7'));var config=require(_0x18fa('0x8'));var attributes=require('./action.attributes');module['exports']=function(_0xc23704,_0x403ed1){return _0xc23704[_0x18fa('0x9')]('Action',attributes,{'tableName':_0x18fa('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/action/action.rpc.js b/server/api/action/action.rpc.js
index 3769070..e73a727 100644
--- a/server/api/action/action.rpc.js
+++ b/server/api/action/action.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5fc3=['../../config/environment','jayson/promise','request','then','info','request\x20sent','debug','stringify','error','code','message','Action,\x20%s,\x20%s','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x3c34a1,_0xc35f37){var _0x5a92bc=function(_0xec8c5f){while(--_0xec8c5f){_0x3c34a1['push'](_0x3c34a1['shift']());}};_0x5a92bc(++_0xc35f37);}(_0x5fc3,0xa8));var _0x35fc=function(_0x5a19fc,_0x58f9f4){_0x5a19fc=_0x5a19fc-0x0;var _0x34b413=_0x5fc3[_0x5a19fc];return _0x34b413;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('Action,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('Action,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('Action,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});}
\ No newline at end of file
+var _0x53ec=['error','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','request','then','info','Action,\x20%s,\x20%s','request\x20sent','debug','stringify','code'];(function(_0x45b034,_0x3a57dd){var _0x509cb0=function(_0x3a89d5){while(--_0x3a89d5){_0x45b034['push'](_0x45b034['shift']());}};_0x509cb0(++_0x3a57dd);}(_0x53ec,0x192));var _0xc53e=function(_0x170362,_0x1bf09a){_0x170362=_0x170362-0x0;var _0x2fd172=_0x53ec[_0x170362];return _0x2fd172;};'use strict';var _=require(_0xc53e('0x0'));var util=require(_0xc53e('0x1'));var moment=require(_0xc53e('0x2'));var BPromise=require(_0xc53e('0x3'));var rs=require(_0xc53e('0x4'));var fs=require('fs');var Redis=require(_0xc53e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xc53e('0x6'));var logger=require('../../config/logger')(_0xc53e('0x7'));var config=require(_0xc53e('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xc53e('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x41a9e8,_0x2de88b,_0x5d3b28){return new BPromise(function(_0x1616ac,_0x1ac6c0){return client[_0xc53e('0xa')](_0x41a9e8,_0x5d3b28)[_0xc53e('0xb')](function(_0xd9612){logger[_0xc53e('0xc')](_0xc53e('0xd'),_0x2de88b,_0xc53e('0xe'));logger[_0xc53e('0xf')]('Action,\x20%s,\x20%s,\x20%s',_0x2de88b,'request\x20sent',JSON[_0xc53e('0x10')](_0xd9612));if(_0xd9612['error']){if(_0xd9612['error'][_0xc53e('0x11')]===0x1f4){logger[_0xc53e('0x12')](_0xc53e('0xd'),_0x2de88b,_0xd9612[_0xc53e('0x12')]['message']);return _0x1ac6c0(_0xd9612['error'][_0xc53e('0x13')]);}logger[_0xc53e('0x12')](_0xc53e('0xd'),_0x2de88b,_0xd9612[_0xc53e('0x12')][_0xc53e('0x13')]);return _0x1616ac(_0xd9612[_0xc53e('0x12')][_0xc53e('0x13')]);}else{logger[_0xc53e('0xc')](_0xc53e('0xd'),_0x2de88b,_0xc53e('0xe'));_0x1616ac(_0xd9612['result'][_0xc53e('0x13')]);}})[_0xc53e('0x14')](function(_0x535cd4){logger[_0xc53e('0x12')](_0xc53e('0xd'),_0x2de88b,_0x535cd4);_0x1ac6c0(_0x535cd4);});});}
\ No newline at end of file
diff --git a/server/api/action/index.js b/server/api/action/index.js
index e63024e..55bd89f 100644
--- a/server/api/action/index.js
+++ b/server/api/action/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x59ee=['destroy','exports','multer','util','path','express','Router','../../components/auth/service','put','/:id','update','delete','isAuthenticated'];(function(_0x187ee1,_0x3fd1e6){var _0x388160=function(_0x542dd2){while(--_0x542dd2){_0x187ee1['push'](_0x187ee1['shift']());}};_0x388160(++_0x3fd1e6);}(_0x59ee,0x154));var _0xe59e=function(_0x2eb47c,_0x43bdf3){_0x2eb47c=_0x2eb47c-0x0;var _0x13097b=_0x59ee[_0x2eb47c];return _0x13097b;};'use strict';var multer=require(_0xe59e('0x0'));var util=require(_0xe59e('0x1'));var path=require(_0xe59e('0x2'));var timeout=require('connect-timeout');var express=require(_0xe59e('0x3'));var router=express[_0xe59e('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xe59e('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./action.controller');router[_0xe59e('0x6')](_0xe59e('0x7'),auth['isAuthenticated'](),controller[_0xe59e('0x8')]);router[_0xe59e('0x9')](_0xe59e('0x7'),auth[_0xe59e('0xa')](),controller[_0xe59e('0xb')]);module[_0xe59e('0xc')]=router;
\ No newline at end of file
+var _0xe0c9=['delete','/:id','destroy','exports','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./action.controller','put','isAuthenticated','update'];(function(_0x156e99,_0x2bf27e){var _0x18870e=function(_0x3e6c3b){while(--_0x3e6c3b){_0x156e99['push'](_0x156e99['shift']());}};_0x18870e(++_0x2bf27e);}(_0xe0c9,0xa9));var _0x9e0c=function(_0x171d6d,_0x5aef21){_0x171d6d=_0x171d6d-0x0;var _0x3f8c6e=_0xe0c9[_0x171d6d];return _0x3f8c6e;};'use strict';var multer=require('multer');var util=require(_0x9e0c('0x0'));var path=require(_0x9e0c('0x1'));var timeout=require(_0x9e0c('0x2'));var express=require(_0x9e0c('0x3'));var router=express[_0x9e0c('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x9e0c('0x5'));var config=require(_0x9e0c('0x6'));var controller=require(_0x9e0c('0x7'));router[_0x9e0c('0x8')]('/:id',auth[_0x9e0c('0x9')](),controller[_0x9e0c('0xa')]);router[_0x9e0c('0xb')](_0x9e0c('0xc'),auth['isAuthenticated'](),controller[_0x9e0c('0xd')]);module[_0x9e0c('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.attributes.js b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
index 484f337..1b57f31 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.attributes.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb4c7=['STRING','TEXT','sequelize','exports'];(function(_0x188703,_0x596b26){var _0x1a0c81=function(_0x1cd22d){while(--_0x1cd22d){_0x188703['push'](_0x188703['shift']());}};_0x1a0c81(++_0x596b26);}(_0xb4c7,0x1ea));var _0x7b4c=function(_0xecb298,_0x214007){_0xecb298=_0xecb298-0x0;var _0x5759d5=_0xb4c7[_0xecb298];return _0x5759d5;};'use strict';var Sequelize=require(_0x7b4c('0x0'));module[_0x7b4c('0x1')]={'name':{'type':Sequelize[_0x7b4c('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x7b4c('0x2')]},'parent':{'type':Sequelize[_0x7b4c('0x2')]},'table':{'type':Sequelize['STRING']},'conditions':{'type':Sequelize[_0x7b4c('0x3')]},'joins':{'type':Sequelize[_0x7b4c('0x3')]}};
\ No newline at end of file
+var _0xeec6=['STRING','TEXT','sequelize','exports'];(function(_0x46d242,_0x24d12e){var _0x585083=function(_0x460a09){while(--_0x460a09){_0x46d242['push'](_0x46d242['shift']());}};_0x585083(++_0x24d12e);}(_0xeec6,0x1c2));var _0x6eec=function(_0x2c9b79,_0x7cf58b){_0x2c9b79=_0x2c9b79-0x0;var _0x265032=_0xeec6[_0x2c9b79];return _0x265032;};'use strict';var Sequelize=require(_0x6eec('0x0'));module[_0x6eec('0x1')]={'name':{'type':Sequelize[_0x6eec('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x6eec('0x2')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0x6eec('0x2')]},'conditions':{'type':Sequelize[_0x6eec('0x3')]},'joins':{'type':Sequelize[_0x6eec('0x3')]}};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js
index f7ad793..25286b8 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.controller.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7bb9=['lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','dbH','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','get','CustomReports','UserProfileResource','stack','name','send','index','AnalyticCustomReport','rawAttributes','type','map','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','options','include','rows','catch','show','params','keys','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','group','field','condition','value','getFields','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','findAll','keyBy','select','from','MetricId','metric','function','replace','format','groupBy','orderBy','alias','joins','includes','foreignKey','foreignTable','%s.%s\x20=\x20%s.%s','table','conditions','parse','clone','Limited\x20Query:','sequelize','toString','QueryTypes','SELECT','join','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','operator','Sequelize','DESC','parentKey','output','web','%s-%s.%s','randomstring','generate','csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','info','Run\x20Query:','child_process','../../components/export/','savename','countTable','COUNT(*)','run','runReport','MIN(%s)','IS\x20NOT\x20NULL','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','sox','to-csv','ejs','fs-extra'];(function(_0x1eb374,_0x38c789){var _0x7ac296=function(_0x546649){while(--_0x546649){_0x1eb374['push'](_0x1eb374['shift']());}};_0x7ac296(++_0x38c789);}(_0x7bb9,0x1eb));var _0x97bb=function(_0x42bdad,_0x12836c){_0x42bdad=_0x42bdad-0x0;var _0x122626=_0x7bb9[_0x42bdad];return _0x122626;};'use strict';var emlformat=require(_0x97bb('0x0'));var rimraf=require(_0x97bb('0x1'));var zipdir=require(_0x97bb('0x2'));var jsonpatch=require(_0x97bb('0x3'));var rp=require(_0x97bb('0x4'));var moment=require('moment');var BPromise=require(_0x97bb('0x5'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x97bb('0x6'));var csv=require(_0x97bb('0x7'));var ejs=require(_0x97bb('0x8'));var fs=require('fs');var fs_extra=require(_0x97bb('0x9'));var _=require(_0x97bb('0xa'));var squel=require(_0x97bb('0xb'));var crypto=require(_0x97bb('0xc'));var jsforce=require(_0x97bb('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x97bb('0x7'));var querystring=require(_0x97bb('0xe'));var Papa=require(_0x97bb('0xf'));var Redis=require(_0x97bb('0x10'));var authService=require(_0x97bb('0x11'));var qs=require(_0x97bb('0x12'));var as=require(_0x97bb('0x13'));var hardwareService=require(_0x97bb('0x14'));var logger=require(_0x97bb('0x15'))(_0x97bb('0x16'));var utils=require(_0x97bb('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x97bb('0x18'));var db=require('../../mysqldb')['db'];var dbH=require(_0x97bb('0x19'))[_0x97bb('0x1a')];function respondWithStatusCode(_0x3ea5f1,_0x13365c){_0x13365c=_0x13365c||0xcc;return function(_0x2a2631){if(_0x2a2631){return _0x3ea5f1[_0x97bb('0x1b')](_0x13365c);}return _0x3ea5f1[_0x97bb('0x1c')](_0x13365c)[_0x97bb('0x1d')]();};}function respondWithResult(_0x16d843,_0x174093){_0x174093=_0x174093||0xc8;return function(_0x227562){if(_0x227562){return _0x16d843[_0x97bb('0x1c')](_0x174093)[_0x97bb('0x1e')](_0x227562);}};}function respondWithFilteredResult(_0x5dbbd9,_0x149bfe){return function(_0x308a77){if(_0x308a77){var _0x4f8506=typeof _0x149bfe[_0x97bb('0x1f')]===_0x97bb('0x20')&&typeof _0x149bfe[_0x97bb('0x21')]===_0x97bb('0x20');var _0xecc171=_0x308a77[_0x97bb('0x22')];var _0x235d12=_0x4f8506?0x0:_0x149bfe[_0x97bb('0x1f')];var _0x1b7515=_0x4f8506?_0x308a77[_0x97bb('0x22')]:_0x149bfe[_0x97bb('0x1f')]+_0x149bfe[_0x97bb('0x21')];var _0x293c69;if(_0x1b7515>=_0xecc171){_0x1b7515=_0xecc171;_0x293c69=0xc8;}else{_0x293c69=0xce;}_0x5dbbd9['status'](_0x293c69);return _0x5dbbd9[_0x97bb('0x23')](_0x97bb('0x24'),_0x235d12+'-'+_0x1b7515+'/'+_0xecc171)[_0x97bb('0x1e')](_0x308a77);}return null;};}function patchUpdates(_0x2b89b2){return function(_0x34c278){try{jsonpatch[_0x97bb('0x25')](_0x34c278,_0x2b89b2,!![]);}catch(_0x5537b0){return BPromise[_0x97bb('0x26')](_0x5537b0);}return _0x34c278[_0x97bb('0x27')]();};}function saveUpdates(_0x5dc8e3,_0x274be2){return function(_0xc6707){if(_0xc6707){return _0xc6707[_0x97bb('0x28')](_0x5dc8e3)[_0x97bb('0x29')](function(_0x2ab133){return _0x2ab133;});}return null;};}function removeEntity(_0xbecd0f,_0x5a969a){return function(_0x1dea61){if(_0x1dea61){return _0x1dea61[_0x97bb('0x2a')]()[_0x97bb('0x29')](function(){var _0x5eeb10=_0x1dea61[_0x97bb('0x2b')]({'plain':!![]});var _0x4e4701=_0x97bb('0x2c');return db[_0x97bb('0x2d')]['destroy']({'where':{'type':_0x4e4701,'resourceId':_0x5eeb10['id']}})[_0x97bb('0x29')](function(){return _0x1dea61;});})['then'](function(){_0xbecd0f['status'](0xcc)[_0x97bb('0x1d')]();});}};}function handleEntityNotFound(_0x3145bd,_0x4494a8){return function(_0x2ed467){if(!_0x2ed467){_0x3145bd['sendStatus'](0x194);}return _0x2ed467;};}function handleError(_0x2c1d70,_0xe3aa4e){_0xe3aa4e=_0xe3aa4e||0x1f4;return function(_0x568c3d){logger['error'](_0x568c3d[_0x97bb('0x2e')]);if(_0x568c3d[_0x97bb('0x2f')]){delete _0x568c3d[_0x97bb('0x2f')];}_0x2c1d70[_0x97bb('0x1c')](_0xe3aa4e)[_0x97bb('0x30')](_0x568c3d);};}exports[_0x97bb('0x31')]=function(_0x294504,_0xc803e5){var _0x58fc13={},_0x462c6a={},_0x5cd733={'count':0x0,'rows':[]};var _0x5ed08d=_['map'](db[_0x97bb('0x32')][_0x97bb('0x33')],function(_0x53cc9f){return{'name':_0x53cc9f['fieldName'],'type':_0x53cc9f[_0x97bb('0x34')]['key']};});_0x462c6a['model']=_[_0x97bb('0x35')](_0x5ed08d,'name');_0x462c6a[_0x97bb('0x36')]=_['keys'](_0x294504[_0x97bb('0x36')]);_0x462c6a[_0x97bb('0x37')]=_[_0x97bb('0x38')](_0x462c6a[_0x97bb('0x39')],_0x462c6a[_0x97bb('0x36')]);_0x58fc13[_0x97bb('0x3a')]=_[_0x97bb('0x38')](_0x462c6a[_0x97bb('0x39')],qs['fields'](_0x294504[_0x97bb('0x36')][_0x97bb('0x3b')]));_0x58fc13[_0x97bb('0x3a')]=_0x58fc13[_0x97bb('0x3a')][_0x97bb('0x3c')]?_0x58fc13[_0x97bb('0x3a')]:_0x462c6a['model'];if(!_0x294504['query'][_0x97bb('0x3d')]('nolimit')){_0x58fc13['limit']=qs[_0x97bb('0x21')](_0x294504[_0x97bb('0x36')][_0x97bb('0x21')]);_0x58fc13[_0x97bb('0x1f')]=qs[_0x97bb('0x1f')](_0x294504[_0x97bb('0x36')][_0x97bb('0x1f')]);}_0x58fc13[_0x97bb('0x3e')]=qs[_0x97bb('0x3f')](_0x294504[_0x97bb('0x36')][_0x97bb('0x3f')]);_0x58fc13[_0x97bb('0x40')]=qs[_0x97bb('0x37')](_[_0x97bb('0x41')](_0x294504['query'],_0x462c6a['filters']),_0x5ed08d);if(_0x294504[_0x97bb('0x36')][_0x97bb('0x42')]){_0x58fc13[_0x97bb('0x40')]=_[_0x97bb('0x43')](_0x58fc13[_0x97bb('0x40')],{'$or':_[_0x97bb('0x35')](_0x5ed08d,function(_0x91df73){if(_0x91df73[_0x97bb('0x34')]!=='VIRTUAL'){var _0x3fab5f={};_0x3fab5f[_0x91df73['name']]={'$like':'%'+_0x294504[_0x97bb('0x36')][_0x97bb('0x42')]+'%'};return _0x3fab5f;}})});}_0x58fc13=_[_0x97bb('0x43')]({},_0x58fc13,_0x294504[_0x97bb('0x44')]);var _0x123d11={'where':_0x58fc13[_0x97bb('0x40')]};return db[_0x97bb('0x32')][_0x97bb('0x22')](_0x123d11)[_0x97bb('0x29')](function(_0x54e4e9){_0x5cd733[_0x97bb('0x22')]=_0x54e4e9;if(_0x294504['query']['includeAll']){_0x58fc13[_0x97bb('0x45')]=[{'all':!![]}];}return db['AnalyticCustomReport']['findAll'](_0x58fc13);})['then'](function(_0x247144){_0x5cd733[_0x97bb('0x46')]=_0x247144;return _0x5cd733;})['then'](respondWithFilteredResult(_0xc803e5,_0x58fc13))[_0x97bb('0x47')](handleError(_0xc803e5,null));};exports[_0x97bb('0x48')]=function(_0x328815,_0x19bf65){var _0x1171dd={'raw':![],'where':{'id':_0x328815[_0x97bb('0x49')]['id']}},_0x34155f={};_0x34155f[_0x97bb('0x39')]=_[_0x97bb('0x4a')](db[_0x97bb('0x32')][_0x97bb('0x33')]);_0x34155f[_0x97bb('0x36')]=_[_0x97bb('0x4a')](_0x328815['query']);_0x34155f[_0x97bb('0x37')]=_[_0x97bb('0x38')](_0x34155f[_0x97bb('0x39')],_0x34155f[_0x97bb('0x36')]);_0x1171dd['attributes']=_[_0x97bb('0x38')](_0x34155f[_0x97bb('0x39')],qs[_0x97bb('0x3b')](_0x328815[_0x97bb('0x36')][_0x97bb('0x3b')]));_0x1171dd['attributes']=_0x1171dd[_0x97bb('0x3a')][_0x97bb('0x3c')]?_0x1171dd[_0x97bb('0x3a')]:_0x34155f['model'];if(_0x328815[_0x97bb('0x36')][_0x97bb('0x4b')]){_0x1171dd[_0x97bb('0x45')]=[{'all':!![]}];}_0x1171dd=_['merge']({},_0x1171dd,_0x328815['options']);return db[_0x97bb('0x32')][_0x97bb('0x4c')](_0x1171dd)[_0x97bb('0x29')](handleEntityNotFound(_0x19bf65,null))['then'](respondWithResult(_0x19bf65,null))[_0x97bb('0x47')](handleError(_0x19bf65,null));};exports[_0x97bb('0x4d')]=function(_0x5f3a73,_0x271053){return db['AnalyticCustomReport'][_0x97bb('0x4d')](_0x5f3a73[_0x97bb('0x4e')],{})['then'](function(_0x37c351){var _0x757b7c=_0x5f3a73[_0x97bb('0x4f')][_0x97bb('0x2b')]({'plain':!![]});if(!_0x757b7c)throw new Error(_0x97bb('0x50'));if(_0x757b7c[_0x97bb('0x51')]===_0x97bb('0x4f')){var _0x5c658c=_0x37c351['get']({'plain':!![]});var _0x353866='Reports';return db[_0x97bb('0x52')][_0x97bb('0x4c')]({'where':{'name':_0x353866,'userProfileId':_0x757b7c[_0x97bb('0x53')]},'raw':!![]})['then'](function(_0x7aad3){if(_0x7aad3&&_0x7aad3['autoAssociation']===0x0){return db[_0x97bb('0x2d')][_0x97bb('0x4d')]({'name':_0x5c658c[_0x97bb('0x2f')],'resourceId':_0x5c658c['id'],'type':_0x97bb('0x2c'),'sectionId':_0x7aad3['id']},{})[_0x97bb('0x29')](function(){return _0x37c351;});}else{return _0x37c351;}})[_0x97bb('0x47')](function(_0x468d60){logger['error'](_0x97bb('0x54'),_0x468d60);throw _0x468d60;});}return _0x37c351;})[_0x97bb('0x29')](respondWithResult(_0x271053,0xc9))[_0x97bb('0x47')](handleError(_0x271053,null));};exports[_0x97bb('0x28')]=function(_0x22653d,_0x3f4c4d){if(_0x22653d[_0x97bb('0x4e')]['id']){delete _0x22653d[_0x97bb('0x4e')]['id'];}return db[_0x97bb('0x32')][_0x97bb('0x4c')]({'where':{'id':_0x22653d[_0x97bb('0x49')]['id']}})[_0x97bb('0x29')](handleEntityNotFound(_0x3f4c4d,null))[_0x97bb('0x29')](saveUpdates(_0x22653d['body'],null))['then'](respondWithResult(_0x3f4c4d,null))['catch'](handleError(_0x3f4c4d,null));};exports[_0x97bb('0x2a')]=function(_0x35b63b,_0xd7ef5d){return db[_0x97bb('0x32')][_0x97bb('0x4c')]({'where':{'id':_0x35b63b['params']['id']}})[_0x97bb('0x29')](handleEntityNotFound(_0xd7ef5d,null))[_0x97bb('0x29')](removeEntity(_0xd7ef5d,null))[_0x97bb('0x47')](handleError(_0xd7ef5d,null));};exports[_0x97bb('0x55')]=function(_0x2b0c1e,_0x413c29){var _0x4f8a1d=0xa;var _0x12c307=['join',_0x97bb('0x56'),_0x97bb('0x57'),_0x97bb('0x58')];var _0x75a2d7={'SUM':_0x97bb('0x59'),'COUNT':_0x97bb('0x5a'),'COUNT DISTINCT':_0x97bb('0x5b'),'MAX':_0x97bb('0x5c'),'MIN':'MIN(%s)','AVG':_0x97bb('0x5d'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x97bb('0x5e'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x381417={'SEC_TO_TIME':_0x97bb('0x5f'),'DATE':_0x97bb('0x60'),'HOUR':_0x97bb('0x61'),'ROUND':_0x97bb('0x62'),'UNIX_TIMESTAMP':_0x97bb('0x63')};var _0xd20ebb=function(_0x18b807){return!_['includes']([_0x97bb('0x64'),'IS\x20NOT\x20NULL',_0x97bb('0x65'),_0x97bb('0x66')],_0x18b807);};var _0x593172=function(_0x251c5a){if(!_0x251c5a||!_0x251c5a[_0x97bb('0x67')][_0x97bb('0x3c')]){return'';}for(var _0x4228f0='(',_0x1ba83f=0x0;_0x1ba83f<_0x251c5a[_0x97bb('0x67')][_0x97bb('0x3c')];_0x1ba83f+=0x1){_0x1ba83f>0x0&&(_0x4228f0+='\x20'+_0x251c5a['operator']+'\x20');_0x4228f0+=_0x251c5a[_0x97bb('0x67')][_0x1ba83f][_0x97bb('0x68')]?_0x593172(_0x251c5a['rules'][_0x1ba83f][_0x97bb('0x68')]):_0x251c5a[_0x97bb('0x67')][_0x1ba83f][_0x97bb('0x69')]+'\x20'+_0x251c5a[_0x97bb('0x67')][_0x1ba83f][_0x97bb('0x6a')]+(_0xd20ebb(_0x251c5a[_0x97bb('0x67')][_0x1ba83f][_0x97bb('0x6a')])?'\x20'+_0x251c5a[_0x97bb('0x67')][_0x1ba83f][_0x97bb('0x6b')]:'');}return _0x4228f0+')';};var _0x104315={'where':{'id':_0x2b0c1e[_0x97bb('0x49')]['id']}},_0x359175,_0x7ca099,_0xa6bf7a,_0x441c1f,_0x310d5a;_0x104315=_['merge']({},_0x104315,_0x2b0c1e['options']);return db[_0x97bb('0x32')][_0x97bb('0x4c')](_0x104315)['then'](function(_0x946eb2){if(_0x946eb2){_0x359175=_0x946eb2;return _0x946eb2[_0x97bb('0x6c')]();}return null;})['then'](function(_0x4de7d5){if(_0x4de7d5){if(!_0x4de7d5[_0x97bb('0x3c')]){throw new db['Sequelize'][(_0x97bb('0x6d'))](_0x97bb('0x6e'),0x193);}_0x7ca099=_0x4de7d5;return db[_0x97bb('0x6f')][_0x97bb('0x70')]({'raw':!![]});}return null;})[_0x97bb('0x29')](function(_0x42397e){if(_0x42397e){_0xa6bf7a=_[_0x97bb('0x71')](_0x42397e,'id');var _0x40553e;var _0x2ed187=squel[_0x97bb('0x72')]();_0x2ed187[_0x97bb('0x73')](_0x359175['table']);for(var _0x54aea7=0x0;_0x54aea7<_0x7ca099[_0x97bb('0x3c')];_0x54aea7+=0x1){_0x40553e=_0x7ca099[_0x54aea7][_0x97bb('0x74')]?_0xa6bf7a[_0x7ca099[_0x54aea7][_0x97bb('0x74')]][_0x97bb('0x75')]:_0x7ca099[_0x54aea7][_0x97bb('0x69')];_0x40553e=_0x7ca099[_0x54aea7][_0x97bb('0x76')]?_[_0x97bb('0x77')](_0x75a2d7[_0x7ca099[_0x54aea7]['function']],'%s',_0x40553e):_0x40553e;_0x40553e=_0x7ca099[_0x54aea7]['format']?_[_0x97bb('0x77')](_0x381417[_0x7ca099[_0x54aea7][_0x97bb('0x78')]],'%s',_0x40553e):_0x40553e;if(_0x7ca099[_0x54aea7][_0x97bb('0x79')]){_0x2ed187['group'](_0x40553e);}_0x7ca099[_0x54aea7][_0x97bb('0x7a')]&&_0x2ed187[_0x97bb('0x3e')](_0x40553e,_0x7ca099[_0x54aea7]['orderBy']==='DESC'?![]:!![]);_0x2ed187[_0x97bb('0x69')](_0x40553e,_0x7ca099[_0x54aea7][_0x97bb('0x7b')]||_0x40553e);}if(_0x359175[_0x97bb('0x7c')]){_0x359175['joins']=JSON['parse'](_0x359175[_0x97bb('0x7c')]);for(var _0x210773=0x0;_0x210773<_0x359175[_0x97bb('0x7c')]['length'];_0x210773+=0x1){if(_0x359175[_0x97bb('0x7c')][_0x210773][_0x97bb('0x34')]&&_[_0x97bb('0x7d')](_0x12c307,_0x359175['joins'][_0x210773][_0x97bb('0x34')])&&_0x359175[_0x97bb('0x7c')][_0x210773]['parentKey']&&_0x359175[_0x97bb('0x7c')][_0x210773]['foreignTable']&&_0x359175['joins'][_0x210773][_0x97bb('0x7e')]){_0x2ed187[_0x359175[_0x97bb('0x7c')][_0x210773][_0x97bb('0x34')]](_0x359175[_0x97bb('0x7c')][_0x210773][_0x97bb('0x7f')],null,util[_0x97bb('0x78')](_0x97bb('0x80'),_0x359175[_0x97bb('0x81')],_0x359175['joins'][_0x210773]['parentKey'],_0x359175[_0x97bb('0x7c')][_0x210773]['foreignTable'],_0x359175['joins'][_0x210773][_0x97bb('0x7e')]));}}}if(_0x359175[_0x97bb('0x82')]){_0x359175[_0x97bb('0x82')]=JSON[_0x97bb('0x83')](_0x359175['conditions']);_0x2ed187[_0x97bb('0x40')](_0x593172(_0x359175[_0x97bb('0x82')]['group']));}_0x310d5a=_0x2ed187[_0x97bb('0x84')]();_0x2ed187[_0x97bb('0x21')](_0x4f8a1d);_0x2ed187[_0x97bb('0x1f')](0x0);logger['debug'](_0x97bb('0x85'),_0x2ed187['toString']());return dbH[_0x97bb('0x86')]['query'](_0x2ed187[_0x97bb('0x87')](),{'type':dbH[_0x97bb('0x86')][_0x97bb('0x88')][_0x97bb('0x89')]});}})[_0x97bb('0x29')](respondWithResult(_0x413c29,null))[_0x97bb('0x47')](handleError(_0x413c29,null));};function runReport(_0x397c02,_0x39d58e,_0x1bb6d9){var _0x2cc26e=_0x39d58e[_0x97bb('0x2f')];var _0x217943=0xa;var _0x503e94=[_0x97bb('0x8a'),_0x97bb('0x56'),_0x97bb('0x57'),_0x97bb('0x58')];var _0xe74439={'SUM':_0x97bb('0x59'),'COUNT':_0x97bb('0x5a'),'COUNT DISTINCT':_0x97bb('0x5b'),'MAX':_0x97bb('0x5c'),'MIN':'MIN(%s)','AVG':_0x97bb('0x5d'),'GROUP_CONCAT':_0x97bb('0x8b'),'GROUP_CONCAT ASC':_0x97bb('0x5e'),'GROUP_CONCAT DESC':_0x97bb('0x8c')};var _0xf65bac={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x97bb('0x60'),'HOUR':_0x97bb('0x61'),'ROUND':_0x97bb('0x62'),'UNIX_TIMESTAMP':_0x97bb('0x63')};var _0x38c036=function(_0x19eb00){return!_[_0x97bb('0x7d')]([_0x97bb('0x64'),'IS\x20NOT\x20NULL',_0x97bb('0x65'),'IS\x20NOT\x20EMPTY'],_0x19eb00);};var _0xb486fa=function(_0x2dcf85){if(!_0x2dcf85||!_0x2dcf85[_0x97bb('0x67')]['length']){return'';}for(var _0x18981c='(',_0x24683f=0x0;_0x24683f<_0x2dcf85['rules'][_0x97bb('0x3c')];_0x24683f+=0x1){_0x24683f>0x0&&(_0x18981c+='\x20'+_0x2dcf85[_0x97bb('0x8d')]+'\x20');_0x18981c+=_0x2dcf85[_0x97bb('0x67')][_0x24683f][_0x97bb('0x68')]?_0xb486fa(_0x2dcf85[_0x97bb('0x67')][_0x24683f]['group']):_0x2dcf85[_0x97bb('0x67')][_0x24683f][_0x97bb('0x69')]+'\x20'+_0x2dcf85['rules'][_0x24683f][_0x97bb('0x6a')]+(_0x38c036(_0x2dcf85[_0x97bb('0x67')][_0x24683f][_0x97bb('0x6a')])?'\x20'+_0x2dcf85[_0x97bb('0x67')][_0x24683f]['value']:'');}return _0x18981c+')';};var _0x23ff11={'where':{'id':_0x397c02['id']}},_0x216df3,_0x2a8475,_0x25dba9,_0xe9d971,_0x4d672b;_0x23ff11=_['merge']({},_0x23ff11,_0x1bb6d9);return db[_0x97bb('0x32')][_0x97bb('0x4c')](_0x23ff11)[_0x97bb('0x29')](function(_0x344d90){if(_0x344d90){_0x216df3=_0x344d90;return _0x344d90[_0x97bb('0x6c')]();}return null;})['then'](function(_0x1bc257){if(_0x1bc257){if(!_0x1bc257[_0x97bb('0x3c')]){throw new db[(_0x97bb('0x8e'))]['ValidationErrorItem'](_0x97bb('0x6e'),0x193);}_0x2a8475=_0x1bc257;return db[_0x97bb('0x6f')][_0x97bb('0x70')]({'raw':!![]});}return null;})[_0x97bb('0x29')](function(_0x1626db){if(_0x1626db){_0x25dba9=_['keyBy'](_0x1626db,'id');var _0x4229e8;var _0x180b23=squel[_0x97bb('0x72')]();_0x180b23[_0x97bb('0x73')](_0x216df3[_0x97bb('0x81')]);for(var _0x3dc9f8=0x0;_0x3dc9f8<_0x2a8475[_0x97bb('0x3c')];_0x3dc9f8+=0x1){_0x4229e8=_0x2a8475[_0x3dc9f8][_0x97bb('0x74')]?_0x25dba9[_0x2a8475[_0x3dc9f8]['MetricId']][_0x97bb('0x75')]:_0x2a8475[_0x3dc9f8][_0x97bb('0x69')];_0x4229e8=_0x2a8475[_0x3dc9f8][_0x97bb('0x76')]?_[_0x97bb('0x77')](_0xe74439[_0x2a8475[_0x3dc9f8]['function']],'%s',_0x4229e8):_0x4229e8;_0x4229e8=_0x2a8475[_0x3dc9f8]['format']?_[_0x97bb('0x77')](_0xf65bac[_0x2a8475[_0x3dc9f8]['format']],'%s',_0x4229e8):_0x4229e8;if(_0x2a8475[_0x3dc9f8]['groupBy']){_0x180b23['group'](_0x4229e8);}_0x2a8475[_0x3dc9f8][_0x97bb('0x7a')]&&_0x180b23[_0x97bb('0x3e')](_0x4229e8,_0x2a8475[_0x3dc9f8][_0x97bb('0x7a')]===_0x97bb('0x8f')?![]:!![]);_0x180b23[_0x97bb('0x69')](_0x4229e8,_0x2a8475[_0x3dc9f8][_0x97bb('0x7b')]||_0x4229e8);}if(_0x216df3['joins']){_0x216df3['joins']=JSON[_0x97bb('0x83')](_0x216df3[_0x97bb('0x7c')]);for(var _0x15e31a=0x0;_0x15e31a<_0x216df3['joins'][_0x97bb('0x3c')];_0x15e31a+=0x1){if(_0x216df3[_0x97bb('0x7c')][_0x15e31a]['type']&&_[_0x97bb('0x7d')](_0x503e94,_0x216df3[_0x97bb('0x7c')][_0x15e31a][_0x97bb('0x34')])&&_0x216df3[_0x97bb('0x7c')][_0x15e31a][_0x97bb('0x90')]&&_0x216df3[_0x97bb('0x7c')][_0x15e31a]['foreignTable']&&_0x216df3[_0x97bb('0x7c')][_0x15e31a][_0x97bb('0x7e')]){_0x180b23[_0x216df3[_0x97bb('0x7c')][_0x15e31a][_0x97bb('0x34')]](_0x216df3[_0x97bb('0x7c')][_0x15e31a][_0x97bb('0x7f')],null,util[_0x97bb('0x78')]('%s.%s\x20=\x20%s.%s',_0x216df3['table'],_0x216df3['joins'][_0x15e31a][_0x97bb('0x90')],_0x216df3['joins'][_0x15e31a][_0x97bb('0x7f')],_0x216df3[_0x97bb('0x7c')][_0x15e31a]['foreignKey']));}}}if(_0x216df3['conditions']){_0x216df3[_0x97bb('0x82')]=JSON[_0x97bb('0x83')](_0x216df3[_0x97bb('0x82')]);_0x180b23[_0x97bb('0x40')](_0xb486fa(_0x216df3['conditions'][_0x97bb('0x68')]));}_0x4d672b=_0x180b23[_0x97bb('0x84')]();_0x180b23['limit'](_0x217943);_0x180b23[_0x97bb('0x1f')](0x0);return;}})[_0x97bb('0x29')](function(){if(_0x39d58e[_0x97bb('0x91')]===_0x97bb('0x92')){return null;}var _0x3870e8=_[_0x97bb('0x43')](_0x39d58e,{'name':_0x39d58e['fullPath']||_0x39d58e[_0x97bb('0x2f')]||_0x216df3[_0x97bb('0x2f')],'basename':_0x2cc26e,'savename':util[_0x97bb('0x78')](_0x97bb('0x93'),_0x39d58e[_0x97bb('0x2f')]||_0x216df3[_0x97bb('0x2f')],require(_0x97bb('0x94'))[_0x97bb('0x95')](0x4),_0x39d58e[_0x97bb('0x91')]||_0x97bb('0x96')),'reportId':_0x216df3['id'],'reportType':'custom'});return db[_0x97bb('0x97')][_0x97bb('0x4d')](_0x3870e8,{'raw':!![]});})['then'](function(_0x2280cc){if(_0x216df3['table']===_0x97bb('0x98')){_0x4d672b[_0x97bb('0x40')](_0x216df3[_0x97bb('0x81')]+_0x97bb('0x99'),_0x39d58e[_0x97bb('0x9a')],_0x39d58e[_0x97bb('0x9b')]);}else{_0x4d672b[_0x97bb('0x40')](_0x216df3['table']+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x39d58e['startDate'],_0x39d58e[_0x97bb('0x9b')]);}if(_0x2280cc){logger[_0x97bb('0x9c')](_0x97bb('0x9d'),_0x4d672b['toString']());require(_0x97bb('0x9e'))['fork'](path[_0x97bb('0x8a')](__dirname,_0x97bb('0x9f'),_0x2280cc[_0x97bb('0x91')]),[_0x2280cc['id'],_0x4d672b[_0x97bb('0x87')](),path[_0x97bb('0x8a')](__dirname,'../../files/reports',_0x2280cc[_0x97bb('0xa0')]),_0x2cc26e]);return _0x2280cc;}else{var _0x343117=squel[_0x97bb('0x72')]();_0x343117[_0x97bb('0x73')]('('+_0x4d672b[_0x97bb('0x87')]()+')',_0x97bb('0xa1'));_0x343117[_0x97bb('0x69')](_0x97bb('0xa2'),_0x97bb('0x22'));_0x4d672b[_0x97bb('0x21')](_0x39d58e['limit']||_0x217943);_0x4d672b[_0x97bb('0x1f')](_0x39d58e[_0x97bb('0x1f')]||0x0);return dbH[_0x97bb('0x86')][_0x97bb('0x36')](_0x343117[_0x97bb('0x87')](),{'type':dbH[_0x97bb('0x86')]['QueryTypes'][_0x97bb('0x89')]})['then'](function(_0x3349b9){if(!_0x3349b9[_0x97bb('0x3c')]){_0xe9d971=0x0;}else{_0xe9d971=_0x3349b9[0x0][_0x97bb('0x22')]||0x0;}return dbH[_0x97bb('0x86')][_0x97bb('0x36')](_0x4d672b[_0x97bb('0x87')](),{'type':dbH['sequelize'][_0x97bb('0x88')]['SELECT']});})[_0x97bb('0x29')](function(_0x91ed5b){return{'rows':_0x91ed5b||[],'count':_0xe9d971};});}});}exports[_0x97bb('0xa3')]=function(_0x3284b7,_0x2714fa){return runReport(_0x3284b7[_0x97bb('0x49')],_0x3284b7[_0x97bb('0x36')],_0x3284b7[_0x97bb('0x44')])['then'](respondWithResult(_0x2714fa,null))[_0x97bb('0x47')](handleError(_0x2714fa,null));};exports[_0x97bb('0xa4')]=runReport;exports[_0x97bb('0x36')]=function(_0x424dee,_0x3a4557){var _0x1ba653=0xa;var _0x4c8ac7=[_0x97bb('0x8a'),_0x97bb('0x56'),_0x97bb('0x57'),_0x97bb('0x58')];var _0x41a4a0={'SUM':_0x97bb('0x59'),'COUNT':_0x97bb('0x5a'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x97bb('0x5c'),'MIN':_0x97bb('0xa5'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x97bb('0x8b'),'GROUP_CONCAT ASC':_0x97bb('0x5e'),'GROUP_CONCAT DESC':_0x97bb('0x8c')};var _0x5aca94={'SEC_TO_TIME':_0x97bb('0x5f'),'DATE':_0x97bb('0x60'),'HOUR':_0x97bb('0x61'),'ROUND':_0x97bb('0x62'),'UNIX_TIMESTAMP':_0x97bb('0x63')};var _0x26a318=function(_0x3fb0f0){return!_[_0x97bb('0x7d')](['IS\x20NULL',_0x97bb('0xa6'),_0x97bb('0x65'),_0x97bb('0x66')],_0x3fb0f0);};var _0x2813d4=function(_0x414620){if(!_0x414620||!_0x414620[_0x97bb('0x67')][_0x97bb('0x3c')]){return'';}for(var _0x19c77e='(',_0x170940=0x0;_0x170940<_0x414620[_0x97bb('0x67')]['length'];_0x170940+=0x1){_0x170940>0x0&&(_0x19c77e+='\x20'+_0x414620[_0x97bb('0x8d')]+'\x20');_0x19c77e+=_0x414620[_0x97bb('0x67')][_0x170940][_0x97bb('0x68')]?_0x2813d4(_0x414620[_0x97bb('0x67')][_0x170940][_0x97bb('0x68')]):_0x414620[_0x97bb('0x67')][_0x170940][_0x97bb('0x69')]+'\x20'+_0x414620[_0x97bb('0x67')][_0x170940][_0x97bb('0x6a')]+(_0x26a318(_0x414620['rules'][_0x170940][_0x97bb('0x6a')])?'\x20'+_0x414620[_0x97bb('0x67')][_0x170940]['value']:'');}return _0x19c77e+')';};var _0x5081ce={'where':{'id':_0x424dee[_0x97bb('0x49')]['id']}},_0x3870a7,_0x3ab834,_0x2fcd32,_0x585075,_0x50b498;_0x5081ce=_['merge']({},_0x5081ce,_0x424dee[_0x97bb('0x44')]);return db[_0x97bb('0x32')]['find'](_0x5081ce)[_0x97bb('0x29')](function(_0x10567b){if(_0x10567b){_0x3870a7=_0x10567b;return _0x10567b[_0x97bb('0x6c')]();}return null;})[_0x97bb('0x29')](function(_0x3a7621){if(_0x3a7621){if(!_0x3a7621['length']){throw new db[(_0x97bb('0x8e'))][(_0x97bb('0x6d'))](_0x97bb('0x6e'),0x193);}_0x3ab834=_0x3a7621;return db[_0x97bb('0x6f')][_0x97bb('0x70')]({'raw':!![]});}return null;})[_0x97bb('0x29')](function(_0x3373f8){if(_0x3373f8){_0x2fcd32=_['keyBy'](_0x3373f8,'id');var _0x539110;var _0x14f187=squel[_0x97bb('0x72')]();_0x14f187[_0x97bb('0x73')](_0x3870a7[_0x97bb('0x81')]);for(var _0x226515=0x0;_0x226515<_0x3ab834['length'];_0x226515+=0x1){_0x539110=_0x3ab834[_0x226515]['MetricId']?_0x2fcd32[_0x3ab834[_0x226515][_0x97bb('0x74')]]['metric']:_0x3ab834[_0x226515][_0x97bb('0x69')];_0x539110=_0x3ab834[_0x226515][_0x97bb('0x76')]?_[_0x97bb('0x77')](_0x41a4a0[_0x3ab834[_0x226515][_0x97bb('0x76')]],'%s',_0x539110):_0x539110;_0x539110=_0x3ab834[_0x226515][_0x97bb('0x78')]?_[_0x97bb('0x77')](_0x5aca94[_0x3ab834[_0x226515][_0x97bb('0x78')]],'%s',_0x539110):_0x539110;if(_0x3ab834[_0x226515][_0x97bb('0x79')]){_0x14f187['group'](_0x539110);}_0x3ab834[_0x226515][_0x97bb('0x7a')]&&_0x14f187[_0x97bb('0x3e')](_0x539110,_0x3ab834[_0x226515][_0x97bb('0x7a')]===_0x97bb('0x8f')?![]:!![]);_0x14f187[_0x97bb('0x69')](_0x539110,_0x3ab834[_0x226515][_0x97bb('0x7b')]||_0x539110);}if(_0x3870a7[_0x97bb('0x7c')]){_0x3870a7[_0x97bb('0x7c')]=JSON['parse'](_0x3870a7[_0x97bb('0x7c')]);for(var _0x244a4f=0x0;_0x244a4f<_0x3870a7[_0x97bb('0x7c')][_0x97bb('0x3c')];_0x244a4f+=0x1){if(_0x3870a7['joins'][_0x244a4f][_0x97bb('0x34')]&&_[_0x97bb('0x7d')](_0x4c8ac7,_0x3870a7['joins'][_0x244a4f][_0x97bb('0x34')])&&_0x3870a7[_0x97bb('0x7c')][_0x244a4f][_0x97bb('0x90')]&&_0x3870a7['joins'][_0x244a4f]['foreignTable']&&_0x3870a7[_0x97bb('0x7c')][_0x244a4f][_0x97bb('0x7e')]){_0x14f187[_0x3870a7[_0x97bb('0x7c')][_0x244a4f]['type']](_0x3870a7[_0x97bb('0x7c')][_0x244a4f][_0x97bb('0x7f')],null,util[_0x97bb('0x78')](_0x97bb('0x80'),_0x3870a7['table'],_0x3870a7[_0x97bb('0x7c')][_0x244a4f]['parentKey'],_0x3870a7[_0x97bb('0x7c')][_0x244a4f][_0x97bb('0x7f')],_0x3870a7[_0x97bb('0x7c')][_0x244a4f][_0x97bb('0x7e')]));}}}if(_0x3870a7[_0x97bb('0x82')]){_0x3870a7[_0x97bb('0x82')]=JSON['parse'](_0x3870a7[_0x97bb('0x82')]);_0x14f187[_0x97bb('0x40')](_0x2813d4(_0x3870a7[_0x97bb('0x82')][_0x97bb('0x68')]));}_0x50b498=_0x14f187[_0x97bb('0x84')]();_0x14f187[_0x97bb('0x21')](_0x1ba653);_0x14f187[_0x97bb('0x1f')](0x0);logger['debug']('Limited\x20Query:',_0x14f187[_0x97bb('0x87')]());return dbH[_0x97bb('0x86')][_0x97bb('0x36')](_0x14f187[_0x97bb('0x87')](),{'type':dbH[_0x97bb('0x86')]['QueryTypes'][_0x97bb('0x89')]});}})['then'](function(){return{'sql':_0x50b498['toString']()};})[_0x97bb('0x29')](respondWithResult(_0x3a4557,null))[_0x97bb('0x47')](handleError(_0x3a4557,null));};
\ No newline at end of file
+var _0xd7a5=['show','params','keys','includeAll','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','join','left_join','right_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MIN(%s)','AVG(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','rules','group','getFields','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','select','from','table','MetricId','metric','field','function','replace','format','groupBy','orderBy','alias','joins','parse','parentKey','foreignTable','foreignKey','conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','cross_join','MAX(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','includes','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','operator','value','ValidationErrorItem','AnalyticMetric','keyBy','output','fullPath','generate','csv','custom','AnalyticExtractedReport','cdr','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','runReport','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','condition','%s.%s\x20=\x20%s.%s','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','dbH','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','get','UserProfileResource','destroy','error','name','index','AnalyticCustomReport','rawAttributes','fieldName','type','key','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','map','options','include','findAll','rows'];(function(_0x2fcf3d,_0x21ea27){var _0x4834c3=function(_0x3bb741){while(--_0x3bb741){_0x2fcf3d['push'](_0x2fcf3d['shift']());}};_0x4834c3(++_0x21ea27);}(_0xd7a5,0x1ad));var _0x5d7a=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0xd7a5[_0x1caf6a];return _0x1bf493;};'use strict';var emlformat=require(_0x5d7a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5d7a('0x1'));var jsonpatch=require(_0x5d7a('0x2'));var rp=require('request-promise');var moment=require(_0x5d7a('0x3'));var BPromise=require(_0x5d7a('0x4'));var Mustache=require(_0x5d7a('0x5'));var util=require(_0x5d7a('0x6'));var path=require(_0x5d7a('0x7'));var sox=require(_0x5d7a('0x8'));var csv=require(_0x5d7a('0x9'));var ejs=require(_0x5d7a('0xa'));var fs=require('fs');var fs_extra=require(_0x5d7a('0xb'));var _=require(_0x5d7a('0xc'));var squel=require('squel');var crypto=require(_0x5d7a('0xd'));var jsforce=require(_0x5d7a('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5d7a('0x9'));var querystring=require(_0x5d7a('0xf'));var Papa=require(_0x5d7a('0x10'));var Redis=require(_0x5d7a('0x11'));var authService=require(_0x5d7a('0x12'));var qs=require(_0x5d7a('0x13'));var as=require(_0x5d7a('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5d7a('0x15'))(_0x5d7a('0x16'));var utils=require(_0x5d7a('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x5d7a('0x18'))['db'];var dbH=require(_0x5d7a('0x18'))[_0x5d7a('0x19')];function respondWithStatusCode(_0x29ddd4,_0x3fef30){_0x3fef30=_0x3fef30||0xcc;return function(_0x1e6a5a){if(_0x1e6a5a){return _0x29ddd4[_0x5d7a('0x1a')](_0x3fef30);}return _0x29ddd4[_0x5d7a('0x1b')](_0x3fef30)[_0x5d7a('0x1c')]();};}function respondWithResult(_0x287f0b,_0x59eeb8){_0x59eeb8=_0x59eeb8||0xc8;return function(_0x307803){if(_0x307803){return _0x287f0b[_0x5d7a('0x1b')](_0x59eeb8)[_0x5d7a('0x1d')](_0x307803);}};}function respondWithFilteredResult(_0x4a508c,_0xa34b97){return function(_0x392943){if(_0x392943){var _0xb4b3c4=typeof _0xa34b97[_0x5d7a('0x1e')]===_0x5d7a('0x1f')&&typeof _0xa34b97[_0x5d7a('0x20')]==='undefined';var _0x5a2362=_0x392943['count'];var _0x459292=_0xb4b3c4?0x0:_0xa34b97['offset'];var _0xe19b1=_0xb4b3c4?_0x392943[_0x5d7a('0x21')]:_0xa34b97['offset']+_0xa34b97[_0x5d7a('0x20')];var _0x3f080a;if(_0xe19b1>=_0x5a2362){_0xe19b1=_0x5a2362;_0x3f080a=0xc8;}else{_0x3f080a=0xce;}_0x4a508c[_0x5d7a('0x1b')](_0x3f080a);return _0x4a508c[_0x5d7a('0x22')](_0x5d7a('0x23'),_0x459292+'-'+_0xe19b1+'/'+_0x5a2362)[_0x5d7a('0x1d')](_0x392943);}return null;};}function patchUpdates(_0x481670){return function(_0x3965af){try{jsonpatch[_0x5d7a('0x24')](_0x3965af,_0x481670,!![]);}catch(_0x1abf79){return BPromise[_0x5d7a('0x25')](_0x1abf79);}return _0x3965af[_0x5d7a('0x26')]();};}function saveUpdates(_0x10b83c,_0x1dfe7c){return function(_0x57a196){if(_0x57a196){return _0x57a196[_0x5d7a('0x27')](_0x10b83c)[_0x5d7a('0x28')](function(_0x1d6670){return _0x1d6670;});}return null;};}function removeEntity(_0x459844,_0x552c08){return function(_0x4029fc){if(_0x4029fc){return _0x4029fc['destroy']()['then'](function(){var _0x14f7db=_0x4029fc[_0x5d7a('0x29')]({'plain':!![]});var _0x586e5a='CustomReports';return db[_0x5d7a('0x2a')][_0x5d7a('0x2b')]({'where':{'type':_0x586e5a,'resourceId':_0x14f7db['id']}})[_0x5d7a('0x28')](function(){return _0x4029fc;});})[_0x5d7a('0x28')](function(){_0x459844[_0x5d7a('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5f4911,_0x2dca36){return function(_0x842a3a){if(!_0x842a3a){_0x5f4911['sendStatus'](0x194);}return _0x842a3a;};}function handleError(_0x3bfa2b,_0x1eeca4){_0x1eeca4=_0x1eeca4||0x1f4;return function(_0x4cbe9e){logger[_0x5d7a('0x2c')](_0x4cbe9e['stack']);if(_0x4cbe9e[_0x5d7a('0x2d')]){delete _0x4cbe9e[_0x5d7a('0x2d')];}_0x3bfa2b[_0x5d7a('0x1b')](_0x1eeca4)['send'](_0x4cbe9e);};}exports[_0x5d7a('0x2e')]=function(_0x402a36,_0x1b5f83){var _0x1551ad={},_0x9059ca={},_0x14c02e={'count':0x0,'rows':[]};var _0xd92ed9=_['map'](db[_0x5d7a('0x2f')][_0x5d7a('0x30')],function(_0x186321){return{'name':_0x186321[_0x5d7a('0x31')],'type':_0x186321[_0x5d7a('0x32')][_0x5d7a('0x33')]};});_0x9059ca['model']=_['map'](_0xd92ed9,_0x5d7a('0x2d'));_0x9059ca[_0x5d7a('0x34')]=_['keys'](_0x402a36[_0x5d7a('0x34')]);_0x9059ca[_0x5d7a('0x35')]=_[_0x5d7a('0x36')](_0x9059ca['model'],_0x9059ca['query']);_0x1551ad[_0x5d7a('0x37')]=_['intersection'](_0x9059ca[_0x5d7a('0x38')],qs[_0x5d7a('0x39')](_0x402a36['query'][_0x5d7a('0x39')]));_0x1551ad[_0x5d7a('0x37')]=_0x1551ad[_0x5d7a('0x37')][_0x5d7a('0x3a')]?_0x1551ad['attributes']:_0x9059ca['model'];if(!_0x402a36['query'][_0x5d7a('0x3b')](_0x5d7a('0x3c'))){_0x1551ad[_0x5d7a('0x20')]=qs[_0x5d7a('0x20')](_0x402a36['query'][_0x5d7a('0x20')]);_0x1551ad['offset']=qs[_0x5d7a('0x1e')](_0x402a36[_0x5d7a('0x34')]['offset']);}_0x1551ad[_0x5d7a('0x3d')]=qs[_0x5d7a('0x3e')](_0x402a36[_0x5d7a('0x34')][_0x5d7a('0x3e')]);_0x1551ad['where']=qs[_0x5d7a('0x35')](_[_0x5d7a('0x3f')](_0x402a36[_0x5d7a('0x34')],_0x9059ca[_0x5d7a('0x35')]),_0xd92ed9);if(_0x402a36[_0x5d7a('0x34')][_0x5d7a('0x40')]){_0x1551ad[_0x5d7a('0x41')]=_[_0x5d7a('0x42')](_0x1551ad[_0x5d7a('0x41')],{'$or':_[_0x5d7a('0x43')](_0xd92ed9,function(_0x169e08){if(_0x169e08['type']!=='VIRTUAL'){var _0x34179e={};_0x34179e[_0x169e08[_0x5d7a('0x2d')]]={'$like':'%'+_0x402a36['query'][_0x5d7a('0x40')]+'%'};return _0x34179e;}})});}_0x1551ad=_[_0x5d7a('0x42')]({},_0x1551ad,_0x402a36[_0x5d7a('0x44')]);var _0x5ea56c={'where':_0x1551ad[_0x5d7a('0x41')]};return db[_0x5d7a('0x2f')][_0x5d7a('0x21')](_0x5ea56c)[_0x5d7a('0x28')](function(_0x550986){_0x14c02e[_0x5d7a('0x21')]=_0x550986;if(_0x402a36[_0x5d7a('0x34')]['includeAll']){_0x1551ad[_0x5d7a('0x45')]=[{'all':!![]}];}return db[_0x5d7a('0x2f')][_0x5d7a('0x46')](_0x1551ad);})['then'](function(_0x4e7932){_0x14c02e[_0x5d7a('0x47')]=_0x4e7932;return _0x14c02e;})[_0x5d7a('0x28')](respondWithFilteredResult(_0x1b5f83,_0x1551ad))['catch'](handleError(_0x1b5f83,null));};exports[_0x5d7a('0x48')]=function(_0x280641,_0x5e0fd1){var _0x228310={'raw':![],'where':{'id':_0x280641[_0x5d7a('0x49')]['id']}},_0x247b8b={};_0x247b8b[_0x5d7a('0x38')]=_[_0x5d7a('0x4a')](db[_0x5d7a('0x2f')][_0x5d7a('0x30')]);_0x247b8b[_0x5d7a('0x34')]=_[_0x5d7a('0x4a')](_0x280641[_0x5d7a('0x34')]);_0x247b8b['filters']=_[_0x5d7a('0x36')](_0x247b8b['model'],_0x247b8b[_0x5d7a('0x34')]);_0x228310[_0x5d7a('0x37')]=_[_0x5d7a('0x36')](_0x247b8b[_0x5d7a('0x38')],qs[_0x5d7a('0x39')](_0x280641[_0x5d7a('0x34')][_0x5d7a('0x39')]));_0x228310['attributes']=_0x228310[_0x5d7a('0x37')]['length']?_0x228310[_0x5d7a('0x37')]:_0x247b8b[_0x5d7a('0x38')];if(_0x280641[_0x5d7a('0x34')][_0x5d7a('0x4b')]){_0x228310['include']=[{'all':!![]}];}_0x228310=_[_0x5d7a('0x42')]({},_0x228310,_0x280641[_0x5d7a('0x44')]);return db[_0x5d7a('0x2f')][_0x5d7a('0x4c')](_0x228310)['then'](handleEntityNotFound(_0x5e0fd1,null))[_0x5d7a('0x28')](respondWithResult(_0x5e0fd1,null))[_0x5d7a('0x4d')](handleError(_0x5e0fd1,null));};exports[_0x5d7a('0x4e')]=function(_0x293622,_0x3d3040){return db[_0x5d7a('0x2f')]['create'](_0x293622[_0x5d7a('0x4f')],{})[_0x5d7a('0x28')](function(_0x3821ed){var _0x22da5e=_0x293622[_0x5d7a('0x50')]['get']({'plain':!![]});if(!_0x22da5e)throw new Error(_0x5d7a('0x51'));if(_0x22da5e[_0x5d7a('0x52')]===_0x5d7a('0x50')){var _0x527dd5=_0x3821ed[_0x5d7a('0x29')]({'plain':!![]});var _0x592312='Reports';return db[_0x5d7a('0x53')][_0x5d7a('0x4c')]({'where':{'name':_0x592312,'userProfileId':_0x22da5e[_0x5d7a('0x54')]},'raw':!![]})['then'](function(_0x2ab139){if(_0x2ab139&&_0x2ab139[_0x5d7a('0x55')]===0x0){return db['UserProfileResource'][_0x5d7a('0x4e')]({'name':_0x527dd5[_0x5d7a('0x2d')],'resourceId':_0x527dd5['id'],'type':'CustomReports','sectionId':_0x2ab139['id']},{})['then'](function(){return _0x3821ed;});}else{return _0x3821ed;}})['catch'](function(_0x465d8c){logger[_0x5d7a('0x2c')](_0x5d7a('0x56'),_0x465d8c);throw _0x465d8c;});}return _0x3821ed;})[_0x5d7a('0x28')](respondWithResult(_0x3d3040,0xc9))[_0x5d7a('0x4d')](handleError(_0x3d3040,null));};exports[_0x5d7a('0x27')]=function(_0x227a98,_0xff0892){if(_0x227a98[_0x5d7a('0x4f')]['id']){delete _0x227a98[_0x5d7a('0x4f')]['id'];}return db['AnalyticCustomReport'][_0x5d7a('0x4c')]({'where':{'id':_0x227a98[_0x5d7a('0x49')]['id']}})[_0x5d7a('0x28')](handleEntityNotFound(_0xff0892,null))[_0x5d7a('0x28')](saveUpdates(_0x227a98[_0x5d7a('0x4f')],null))[_0x5d7a('0x28')](respondWithResult(_0xff0892,null))[_0x5d7a('0x4d')](handleError(_0xff0892,null));};exports[_0x5d7a('0x2b')]=function(_0x3104ba,_0x5df0c0){return db[_0x5d7a('0x2f')][_0x5d7a('0x4c')]({'where':{'id':_0x3104ba[_0x5d7a('0x49')]['id']}})[_0x5d7a('0x28')](handleEntityNotFound(_0x5df0c0,null))[_0x5d7a('0x28')](removeEntity(_0x5df0c0,null))[_0x5d7a('0x4d')](handleError(_0x5df0c0,null));};exports['preview']=function(_0x5173e6,_0x5bf2da){var _0x539377=0xa;var _0x2ea408=[_0x5d7a('0x57'),_0x5d7a('0x58'),_0x5d7a('0x59'),'cross_join'];var _0x2981bd={'SUM':_0x5d7a('0x5a'),'COUNT':_0x5d7a('0x5b'),'COUNT DISTINCT':_0x5d7a('0x5c'),'MAX':'MAX(%s)','MIN':_0x5d7a('0x5d'),'AVG':_0x5d7a('0x5e'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x40e815={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x5d7a('0x5f'),'HOUR':_0x5d7a('0x60'),'ROUND':_0x5d7a('0x61'),'UNIX_TIMESTAMP':_0x5d7a('0x62')};var _0x1d73ac=function(_0x3a1775){return!_['includes']([_0x5d7a('0x63'),'IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0x3a1775);};var _0xf91f7a=function(_0x57af10){if(!_0x57af10||!_0x57af10[_0x5d7a('0x64')][_0x5d7a('0x3a')]){return'';}for(var _0x534ef9='(',_0x40e9ef=0x0;_0x40e9ef<_0x57af10[_0x5d7a('0x64')][_0x5d7a('0x3a')];_0x40e9ef+=0x1){_0x40e9ef>0x0&&(_0x534ef9+='\x20'+_0x57af10['operator']+'\x20');_0x534ef9+=_0x57af10[_0x5d7a('0x64')][_0x40e9ef][_0x5d7a('0x65')]?_0xf91f7a(_0x57af10[_0x5d7a('0x64')][_0x40e9ef][_0x5d7a('0x65')]):_0x57af10[_0x5d7a('0x64')][_0x40e9ef]['field']+'\x20'+_0x57af10[_0x5d7a('0x64')][_0x40e9ef]['condition']+(_0x1d73ac(_0x57af10[_0x5d7a('0x64')][_0x40e9ef]['condition'])?'\x20'+_0x57af10[_0x5d7a('0x64')][_0x40e9ef]['value']:'');}return _0x534ef9+')';};var _0x2fc89a={'where':{'id':_0x5173e6[_0x5d7a('0x49')]['id']}},_0xec9e8c,_0x4ab95e,_0x3d7165,_0x54976d,_0x436d86;_0x2fc89a=_[_0x5d7a('0x42')]({},_0x2fc89a,_0x5173e6[_0x5d7a('0x44')]);return db[_0x5d7a('0x2f')][_0x5d7a('0x4c')](_0x2fc89a)[_0x5d7a('0x28')](function(_0x2ea609){if(_0x2ea609){_0xec9e8c=_0x2ea609;return _0x2ea609[_0x5d7a('0x66')]();}return null;})[_0x5d7a('0x28')](function(_0x562dbf){if(_0x562dbf){if(!_0x562dbf[_0x5d7a('0x3a')]){throw new db[(_0x5d7a('0x67'))]['ValidationErrorItem'](_0x5d7a('0x68'),0x193);}_0x4ab95e=_0x562dbf;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})['then'](function(_0x2ef81c){if(_0x2ef81c){_0x3d7165=_['keyBy'](_0x2ef81c,'id');var _0x514353;var _0x42524d=squel[_0x5d7a('0x69')]();_0x42524d[_0x5d7a('0x6a')](_0xec9e8c[_0x5d7a('0x6b')]);for(var _0x4f22bb=0x0;_0x4f22bb<_0x4ab95e[_0x5d7a('0x3a')];_0x4f22bb+=0x1){_0x514353=_0x4ab95e[_0x4f22bb][_0x5d7a('0x6c')]?_0x3d7165[_0x4ab95e[_0x4f22bb][_0x5d7a('0x6c')]][_0x5d7a('0x6d')]:_0x4ab95e[_0x4f22bb][_0x5d7a('0x6e')];_0x514353=_0x4ab95e[_0x4f22bb][_0x5d7a('0x6f')]?_[_0x5d7a('0x70')](_0x2981bd[_0x4ab95e[_0x4f22bb][_0x5d7a('0x6f')]],'%s',_0x514353):_0x514353;_0x514353=_0x4ab95e[_0x4f22bb][_0x5d7a('0x71')]?_[_0x5d7a('0x70')](_0x40e815[_0x4ab95e[_0x4f22bb][_0x5d7a('0x71')]],'%s',_0x514353):_0x514353;if(_0x4ab95e[_0x4f22bb][_0x5d7a('0x72')]){_0x42524d['group'](_0x514353);}_0x4ab95e[_0x4f22bb][_0x5d7a('0x73')]&&_0x42524d[_0x5d7a('0x3d')](_0x514353,_0x4ab95e[_0x4f22bb][_0x5d7a('0x73')]==='DESC'?![]:!![]);_0x42524d['field'](_0x514353,_0x4ab95e[_0x4f22bb][_0x5d7a('0x74')]||_0x514353);}if(_0xec9e8c[_0x5d7a('0x75')]){_0xec9e8c[_0x5d7a('0x75')]=JSON[_0x5d7a('0x76')](_0xec9e8c[_0x5d7a('0x75')]);for(var _0x101fb3=0x0;_0x101fb3<_0xec9e8c[_0x5d7a('0x75')]['length'];_0x101fb3+=0x1){if(_0xec9e8c['joins'][_0x101fb3][_0x5d7a('0x32')]&&_['includes'](_0x2ea408,_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x32')])&&_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x77')]&&_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x78')]&&_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x79')]){_0x42524d[_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x32')]](_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x78')],null,util[_0x5d7a('0x71')]('%s.%s\x20=\x20%s.%s',_0xec9e8c[_0x5d7a('0x6b')],_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x77')],_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x78')],_0xec9e8c[_0x5d7a('0x75')][_0x101fb3][_0x5d7a('0x79')]));}}}if(_0xec9e8c[_0x5d7a('0x7a')]){_0xec9e8c[_0x5d7a('0x7a')]=JSON[_0x5d7a('0x76')](_0xec9e8c[_0x5d7a('0x7a')]);_0x42524d['where'](_0xf91f7a(_0xec9e8c[_0x5d7a('0x7a')][_0x5d7a('0x65')]));}_0x436d86=_0x42524d[_0x5d7a('0x7b')]();_0x42524d[_0x5d7a('0x20')](_0x539377);_0x42524d[_0x5d7a('0x1e')](0x0);logger[_0x5d7a('0x7c')](_0x5d7a('0x7d'),_0x42524d[_0x5d7a('0x7e')]());return dbH[_0x5d7a('0x7f')]['query'](_0x42524d[_0x5d7a('0x7e')](),{'type':dbH[_0x5d7a('0x7f')][_0x5d7a('0x80')][_0x5d7a('0x81')]});}})[_0x5d7a('0x28')](respondWithResult(_0x5bf2da,null))[_0x5d7a('0x4d')](handleError(_0x5bf2da,null));};function runReport(_0x10b68b,_0x5c4c13,_0x23e9d1){var _0x35016b=_0x5c4c13[_0x5d7a('0x2d')];var _0x49583f=0xa;var _0x2b2ab8=['join',_0x5d7a('0x58'),_0x5d7a('0x59'),_0x5d7a('0x82')];var _0x4f51ce={'SUM':_0x5d7a('0x5a'),'COUNT':_0x5d7a('0x5b'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x5d7a('0x83'),'MIN':_0x5d7a('0x5d'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x5d7a('0x84'),'GROUP_CONCAT ASC':_0x5d7a('0x85'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x529bf2={'SEC_TO_TIME':_0x5d7a('0x86'),'DATE':_0x5d7a('0x5f'),'HOUR':_0x5d7a('0x60'),'ROUND':_0x5d7a('0x61'),'UNIX_TIMESTAMP':_0x5d7a('0x62')};var _0x1b8e41=function(_0x36b1e9){return!_[_0x5d7a('0x87')]([_0x5d7a('0x63'),_0x5d7a('0x88'),_0x5d7a('0x89'),_0x5d7a('0x8a')],_0x36b1e9);};var _0x2ffb5c=function(_0x456f85){if(!_0x456f85||!_0x456f85['rules'][_0x5d7a('0x3a')]){return'';}for(var _0x3aaded='(',_0x1f9d1c=0x0;_0x1f9d1c<_0x456f85[_0x5d7a('0x64')][_0x5d7a('0x3a')];_0x1f9d1c+=0x1){_0x1f9d1c>0x0&&(_0x3aaded+='\x20'+_0x456f85[_0x5d7a('0x8b')]+'\x20');_0x3aaded+=_0x456f85['rules'][_0x1f9d1c][_0x5d7a('0x65')]?_0x2ffb5c(_0x456f85[_0x5d7a('0x64')][_0x1f9d1c][_0x5d7a('0x65')]):_0x456f85[_0x5d7a('0x64')][_0x1f9d1c][_0x5d7a('0x6e')]+'\x20'+_0x456f85[_0x5d7a('0x64')][_0x1f9d1c]['condition']+(_0x1b8e41(_0x456f85[_0x5d7a('0x64')][_0x1f9d1c]['condition'])?'\x20'+_0x456f85[_0x5d7a('0x64')][_0x1f9d1c][_0x5d7a('0x8c')]:'');}return _0x3aaded+')';};var _0x1d9b19={'where':{'id':_0x10b68b['id']}},_0x3ac02c,_0x3635c6,_0x2019b2,_0xe3a563,_0x2cddb4;_0x1d9b19=_[_0x5d7a('0x42')]({},_0x1d9b19,_0x23e9d1);return db[_0x5d7a('0x2f')][_0x5d7a('0x4c')](_0x1d9b19)[_0x5d7a('0x28')](function(_0x258a7d){if(_0x258a7d){_0x3ac02c=_0x258a7d;return _0x258a7d[_0x5d7a('0x66')]();}return null;})[_0x5d7a('0x28')](function(_0x186545){if(_0x186545){if(!_0x186545['length']){throw new db[(_0x5d7a('0x67'))][(_0x5d7a('0x8d'))](_0x5d7a('0x68'),0x193);}_0x3635c6=_0x186545;return db[_0x5d7a('0x8e')][_0x5d7a('0x46')]({'raw':!![]});}return null;})['then'](function(_0x371d69){if(_0x371d69){_0x2019b2=_[_0x5d7a('0x8f')](_0x371d69,'id');var _0x5c6447;var _0x10ba5b=squel[_0x5d7a('0x69')]();_0x10ba5b[_0x5d7a('0x6a')](_0x3ac02c['table']);for(var _0x30faf8=0x0;_0x30faf8<_0x3635c6[_0x5d7a('0x3a')];_0x30faf8+=0x1){_0x5c6447=_0x3635c6[_0x30faf8][_0x5d7a('0x6c')]?_0x2019b2[_0x3635c6[_0x30faf8][_0x5d7a('0x6c')]]['metric']:_0x3635c6[_0x30faf8][_0x5d7a('0x6e')];_0x5c6447=_0x3635c6[_0x30faf8]['function']?_[_0x5d7a('0x70')](_0x4f51ce[_0x3635c6[_0x30faf8][_0x5d7a('0x6f')]],'%s',_0x5c6447):_0x5c6447;_0x5c6447=_0x3635c6[_0x30faf8][_0x5d7a('0x71')]?_['replace'](_0x529bf2[_0x3635c6[_0x30faf8][_0x5d7a('0x71')]],'%s',_0x5c6447):_0x5c6447;if(_0x3635c6[_0x30faf8][_0x5d7a('0x72')]){_0x10ba5b[_0x5d7a('0x65')](_0x5c6447);}_0x3635c6[_0x30faf8][_0x5d7a('0x73')]&&_0x10ba5b[_0x5d7a('0x3d')](_0x5c6447,_0x3635c6[_0x30faf8]['orderBy']==='DESC'?![]:!![]);_0x10ba5b[_0x5d7a('0x6e')](_0x5c6447,_0x3635c6[_0x30faf8][_0x5d7a('0x74')]||_0x5c6447);}if(_0x3ac02c[_0x5d7a('0x75')]){_0x3ac02c[_0x5d7a('0x75')]=JSON[_0x5d7a('0x76')](_0x3ac02c['joins']);for(var _0x45fcdc=0x0;_0x45fcdc<_0x3ac02c[_0x5d7a('0x75')][_0x5d7a('0x3a')];_0x45fcdc+=0x1){if(_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc][_0x5d7a('0x32')]&&_[_0x5d7a('0x87')](_0x2b2ab8,_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc][_0x5d7a('0x32')])&&_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc]['parentKey']&&_0x3ac02c['joins'][_0x45fcdc][_0x5d7a('0x78')]&&_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc][_0x5d7a('0x79')]){_0x10ba5b[_0x3ac02c['joins'][_0x45fcdc][_0x5d7a('0x32')]](_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc][_0x5d7a('0x78')],null,util[_0x5d7a('0x71')]('%s.%s\x20=\x20%s.%s',_0x3ac02c[_0x5d7a('0x6b')],_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc][_0x5d7a('0x77')],_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc][_0x5d7a('0x78')],_0x3ac02c[_0x5d7a('0x75')][_0x45fcdc][_0x5d7a('0x79')]));}}}if(_0x3ac02c['conditions']){_0x3ac02c[_0x5d7a('0x7a')]=JSON[_0x5d7a('0x76')](_0x3ac02c[_0x5d7a('0x7a')]);_0x10ba5b[_0x5d7a('0x41')](_0x2ffb5c(_0x3ac02c[_0x5d7a('0x7a')][_0x5d7a('0x65')]));}_0x2cddb4=_0x10ba5b[_0x5d7a('0x7b')]();_0x10ba5b[_0x5d7a('0x20')](_0x49583f);_0x10ba5b[_0x5d7a('0x1e')](0x0);return;}})['then'](function(){if(_0x5c4c13[_0x5d7a('0x90')]==='web'){return null;}var _0x16e322=_['merge'](_0x5c4c13,{'name':_0x5c4c13[_0x5d7a('0x91')]||_0x5c4c13[_0x5d7a('0x2d')]||_0x3ac02c[_0x5d7a('0x2d')],'basename':_0x35016b,'savename':util[_0x5d7a('0x71')]('%s-%s.%s',_0x5c4c13[_0x5d7a('0x2d')]||_0x3ac02c[_0x5d7a('0x2d')],require('randomstring')[_0x5d7a('0x92')](0x4),_0x5c4c13[_0x5d7a('0x90')]||_0x5d7a('0x93')),'reportId':_0x3ac02c['id'],'reportType':_0x5d7a('0x94')});return db[_0x5d7a('0x95')][_0x5d7a('0x4e')](_0x16e322,{'raw':!![]});})['then'](function(_0x1bac66){if(_0x3ac02c[_0x5d7a('0x6b')]===_0x5d7a('0x96')){_0x2cddb4['where'](_0x3ac02c[_0x5d7a('0x6b')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x5c4c13[_0x5d7a('0x97')],_0x5c4c13[_0x5d7a('0x98')]);}else{_0x2cddb4[_0x5d7a('0x41')](_0x3ac02c['table']+_0x5d7a('0x99'),_0x5c4c13[_0x5d7a('0x97')],_0x5c4c13[_0x5d7a('0x98')]);}if(_0x1bac66){logger[_0x5d7a('0x9a')](_0x5d7a('0x9b'),_0x2cddb4['toString']());require('child_process')[_0x5d7a('0x9c')](path['join'](__dirname,_0x5d7a('0x9d'),_0x1bac66[_0x5d7a('0x90')]),[_0x1bac66['id'],_0x2cddb4[_0x5d7a('0x7e')](),path[_0x5d7a('0x57')](__dirname,_0x5d7a('0x9e'),_0x1bac66[_0x5d7a('0x9f')]),_0x35016b]);return _0x1bac66;}else{var _0x4aedca=squel[_0x5d7a('0x69')]();_0x4aedca['from']('('+_0x2cddb4[_0x5d7a('0x7e')]()+')',_0x5d7a('0xa0'));_0x4aedca[_0x5d7a('0x6e')](_0x5d7a('0xa1'),_0x5d7a('0x21'));_0x2cddb4[_0x5d7a('0x20')](_0x5c4c13[_0x5d7a('0x20')]||_0x49583f);_0x2cddb4[_0x5d7a('0x1e')](_0x5c4c13['offset']||0x0);return dbH['sequelize'][_0x5d7a('0x34')](_0x4aedca['toString'](),{'type':dbH[_0x5d7a('0x7f')]['QueryTypes']['SELECT']})[_0x5d7a('0x28')](function(_0x574d6b){if(!_0x574d6b['length']){_0xe3a563=0x0;}else{_0xe3a563=_0x574d6b[0x0]['count']||0x0;}return dbH[_0x5d7a('0x7f')][_0x5d7a('0x34')](_0x2cddb4[_0x5d7a('0x7e')](),{'type':dbH[_0x5d7a('0x7f')][_0x5d7a('0x80')][_0x5d7a('0x81')]});})['then'](function(_0x2d8402){return{'rows':_0x2d8402||[],'count':_0xe3a563};});}});}exports[_0x5d7a('0xa2')]=function(_0x260601,_0x26539b){return runReport(_0x260601[_0x5d7a('0x49')],_0x260601[_0x5d7a('0x34')],_0x260601[_0x5d7a('0x44')])[_0x5d7a('0x28')](respondWithResult(_0x26539b,null))[_0x5d7a('0x4d')](handleError(_0x26539b,null));};exports[_0x5d7a('0xa3')]=runReport;exports[_0x5d7a('0x34')]=function(_0x4179c1,_0x1e4921){var _0x18239b=0xa;var _0xe168c9=['join','left_join',_0x5d7a('0x59'),'cross_join'];var _0x4ab8c0={'SUM':_0x5d7a('0x5a'),'COUNT':_0x5d7a('0x5b'),'COUNT DISTINCT':_0x5d7a('0x5c'),'MAX':_0x5d7a('0x83'),'MIN':_0x5d7a('0x5d'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x5d7a('0x84'),'GROUP_CONCAT ASC':_0x5d7a('0x85'),'GROUP_CONCAT DESC':_0x5d7a('0xa4')};var _0x146f88={'SEC_TO_TIME':_0x5d7a('0x86'),'DATE':_0x5d7a('0x5f'),'HOUR':'HOUR(%s)','ROUND':_0x5d7a('0x61'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0xf3acd9=function(_0x47bac0){return!_[_0x5d7a('0x87')]([_0x5d7a('0x63'),_0x5d7a('0x88'),_0x5d7a('0x89'),_0x5d7a('0x8a')],_0x47bac0);};var _0x2a0a8f=function(_0x51e907){if(!_0x51e907||!_0x51e907[_0x5d7a('0x64')][_0x5d7a('0x3a')]){return'';}for(var _0x39aec3='(',_0x2d466c=0x0;_0x2d466c<_0x51e907['rules'][_0x5d7a('0x3a')];_0x2d466c+=0x1){_0x2d466c>0x0&&(_0x39aec3+='\x20'+_0x51e907[_0x5d7a('0x8b')]+'\x20');_0x39aec3+=_0x51e907[_0x5d7a('0x64')][_0x2d466c][_0x5d7a('0x65')]?_0x2a0a8f(_0x51e907[_0x5d7a('0x64')][_0x2d466c][_0x5d7a('0x65')]):_0x51e907['rules'][_0x2d466c]['field']+'\x20'+_0x51e907[_0x5d7a('0x64')][_0x2d466c]['condition']+(_0xf3acd9(_0x51e907[_0x5d7a('0x64')][_0x2d466c][_0x5d7a('0xa5')])?'\x20'+_0x51e907[_0x5d7a('0x64')][_0x2d466c][_0x5d7a('0x8c')]:'');}return _0x39aec3+')';};var _0x32b54f={'where':{'id':_0x4179c1['params']['id']}},_0x431a23,_0x462456,_0x2db95e,_0x37fc56,_0x5a9a60;_0x32b54f=_[_0x5d7a('0x42')]({},_0x32b54f,_0x4179c1['options']);return db[_0x5d7a('0x2f')][_0x5d7a('0x4c')](_0x32b54f)[_0x5d7a('0x28')](function(_0x5b4ef3){if(_0x5b4ef3){_0x431a23=_0x5b4ef3;return _0x5b4ef3[_0x5d7a('0x66')]();}return null;})[_0x5d7a('0x28')](function(_0x4505b9){if(_0x4505b9){if(!_0x4505b9[_0x5d7a('0x3a')]){throw new db['Sequelize']['ValidationErrorItem'](_0x5d7a('0x68'),0x193);}_0x462456=_0x4505b9;return db['AnalyticMetric'][_0x5d7a('0x46')]({'raw':!![]});}return null;})[_0x5d7a('0x28')](function(_0x28833a){if(_0x28833a){_0x2db95e=_[_0x5d7a('0x8f')](_0x28833a,'id');var _0x53a62e;var _0x42ea24=squel[_0x5d7a('0x69')]();_0x42ea24[_0x5d7a('0x6a')](_0x431a23['table']);for(var _0x265bd2=0x0;_0x265bd2<_0x462456['length'];_0x265bd2+=0x1){_0x53a62e=_0x462456[_0x265bd2][_0x5d7a('0x6c')]?_0x2db95e[_0x462456[_0x265bd2][_0x5d7a('0x6c')]][_0x5d7a('0x6d')]:_0x462456[_0x265bd2][_0x5d7a('0x6e')];_0x53a62e=_0x462456[_0x265bd2][_0x5d7a('0x6f')]?_['replace'](_0x4ab8c0[_0x462456[_0x265bd2][_0x5d7a('0x6f')]],'%s',_0x53a62e):_0x53a62e;_0x53a62e=_0x462456[_0x265bd2][_0x5d7a('0x71')]?_[_0x5d7a('0x70')](_0x146f88[_0x462456[_0x265bd2][_0x5d7a('0x71')]],'%s',_0x53a62e):_0x53a62e;if(_0x462456[_0x265bd2][_0x5d7a('0x72')]){_0x42ea24[_0x5d7a('0x65')](_0x53a62e);}_0x462456[_0x265bd2][_0x5d7a('0x73')]&&_0x42ea24['order'](_0x53a62e,_0x462456[_0x265bd2]['orderBy']==='DESC'?![]:!![]);_0x42ea24[_0x5d7a('0x6e')](_0x53a62e,_0x462456[_0x265bd2]['alias']||_0x53a62e);}if(_0x431a23['joins']){_0x431a23['joins']=JSON[_0x5d7a('0x76')](_0x431a23[_0x5d7a('0x75')]);for(var _0x33b9e7=0x0;_0x33b9e7<_0x431a23['joins']['length'];_0x33b9e7+=0x1){if(_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x32')]&&_[_0x5d7a('0x87')](_0xe168c9,_0x431a23[_0x5d7a('0x75')][_0x33b9e7]['type'])&&_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x77')]&&_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x78')]&&_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x79')]){_0x42ea24[_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x32')]](_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x78')],null,util['format'](_0x5d7a('0xa6'),_0x431a23['table'],_0x431a23[_0x5d7a('0x75')][_0x33b9e7]['parentKey'],_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x78')],_0x431a23[_0x5d7a('0x75')][_0x33b9e7][_0x5d7a('0x79')]));}}}if(_0x431a23[_0x5d7a('0x7a')]){_0x431a23[_0x5d7a('0x7a')]=JSON['parse'](_0x431a23[_0x5d7a('0x7a')]);_0x42ea24[_0x5d7a('0x41')](_0x2a0a8f(_0x431a23[_0x5d7a('0x7a')][_0x5d7a('0x65')]));}_0x5a9a60=_0x42ea24[_0x5d7a('0x7b')]();_0x42ea24[_0x5d7a('0x20')](_0x18239b);_0x42ea24[_0x5d7a('0x1e')](0x0);logger[_0x5d7a('0x7c')](_0x5d7a('0x7d'),_0x42ea24[_0x5d7a('0x7e')]());return dbH['sequelize'][_0x5d7a('0x34')](_0x42ea24[_0x5d7a('0x7e')](),{'type':dbH['sequelize']['QueryTypes'][_0x5d7a('0x81')]});}})['then'](function(){return{'sql':_0x5a9a60[_0x5d7a('0x7e')]()};})['then'](respondWithResult(_0x1e4921,null))[_0x5d7a('0x4d')](handleError(_0x1e4921,null));};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js
index 5c00118..a10b95b 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.model.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfb00=['path','rimraf','./analyticCustomReport.attributes','exports','define','AnalyticCustomReport','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x27c5f4,_0x3bf1f5){var _0x157e82=function(_0x53a1f5){while(--_0x53a1f5){_0x27c5f4['push'](_0x27c5f4['shift']());}};_0x157e82(++_0x3bf1f5);}(_0xfb00,0x8a));var _0x0fb0=function(_0x3c8838,_0x48bb83){_0x3c8838=_0x3c8838-0x0;var _0x35ba4d=_0xfb00[_0x3c8838];return _0x35ba4d;};'use strict';var _=require('lodash');var util=require(_0x0fb0('0x0'));var logger=require(_0x0fb0('0x1'))(_0x0fb0('0x2'));var moment=require(_0x0fb0('0x3'));var BPromise=require(_0x0fb0('0x4'));var rp=require(_0x0fb0('0x5'));var fs=require('fs');var path=require(_0x0fb0('0x6'));var rimraf=require(_0x0fb0('0x7'));var config=require('../../config/environment');var attributes=require(_0x0fb0('0x8'));module[_0x0fb0('0x9')]=function(_0xd96799,_0x3ad993){return _0xd96799[_0x0fb0('0xa')](_0x0fb0('0xb'),attributes,{'tableName':'analytics_custom_reports','paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x01e0=['moment','request-promise','path','rimraf','./analyticCustomReport.attributes','exports','define','AnalyticCustomReport','analytics_custom_reports','lodash','util','../../config/logger'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x01e0,0x1a1));var _0x001e=function(_0x205328,_0x12c15a){_0x205328=_0x205328-0x0;var _0x4a30eb=_0x01e0[_0x205328];return _0x4a30eb;};'use strict';var _=require(_0x001e('0x0'));var util=require(_0x001e('0x1'));var logger=require(_0x001e('0x2'))('api');var moment=require(_0x001e('0x3'));var BPromise=require('bluebird');var rp=require(_0x001e('0x4'));var fs=require('fs');var path=require(_0x001e('0x5'));var rimraf=require(_0x001e('0x6'));var config=require('../../config/environment');var attributes=require(_0x001e('0x7'));module[_0x001e('0x8')]=function(_0x48c785,_0x3541a2){return _0x48c785[_0x001e('0x9')](_0x001e('0xa'),attributes,{'tableName':_0x001e('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.rpc.js b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
index bc7ef34..5316861 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.rpc.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb1ca=['../../config/utils','rpc','jayson/promise','client','http','then','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x4e0300,_0x3f1ea5){var _0x6a4ba8=function(_0x3a818c){while(--_0x3a818c){_0x4e0300['push'](_0x4e0300['shift']());}};_0x6a4ba8(++_0x3f1ea5);}(_0xb1ca,0x94));var _0xab1c=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0xb1ca[_0x1cc8fe];return _0x230054;};'use strict';var _=require(_0xab1c('0x0'));var util=require('util');var moment=require(_0xab1c('0x1'));var BPromise=require(_0xab1c('0x2'));var rs=require(_0xab1c('0x3'));var fs=require('fs');var Redis=require(_0xab1c('0x4'));var db=require(_0xab1c('0x5'))['db'];var utils=require(_0xab1c('0x6'));var logger=require('../../config/logger')(_0xab1c('0x7'));var config=require('../../config/environment');var jayson=require(_0xab1c('0x8'));var client=jayson[_0xab1c('0x9')][_0xab1c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3f4d98,_0x5d94e2,_0x1c9001){return new BPromise(function(_0x4f0cdb,_0x2597d2){return client['request'](_0x3f4d98,_0x1c9001)[_0xab1c('0xb')](function(_0x58aa71){logger[_0xab1c('0xc')](_0xab1c('0xd'),_0x5d94e2,_0xab1c('0xe'));logger[_0xab1c('0xf')](_0xab1c('0x10'),_0x5d94e2,_0xab1c('0xe'),JSON[_0xab1c('0x11')](_0x58aa71));if(_0x58aa71[_0xab1c('0x12')]){if(_0x58aa71[_0xab1c('0x12')]['code']===0x1f4){logger['error'](_0xab1c('0xd'),_0x5d94e2,_0x58aa71[_0xab1c('0x12')][_0xab1c('0x13')]);return _0x2597d2(_0x58aa71[_0xab1c('0x12')][_0xab1c('0x13')]);}logger[_0xab1c('0x12')](_0xab1c('0xd'),_0x5d94e2,_0x58aa71[_0xab1c('0x12')][_0xab1c('0x13')]);return _0x4f0cdb(_0x58aa71[_0xab1c('0x12')][_0xab1c('0x13')]);}else{logger[_0xab1c('0xc')]('AnalyticCustomReport,\x20%s,\x20%s',_0x5d94e2,'request\x20sent');_0x4f0cdb(_0x58aa71[_0xab1c('0x14')]['message']);}})[_0xab1c('0x15')](function(_0x48723f){logger[_0xab1c('0x12')](_0xab1c('0xd'),_0x5d94e2,_0x48723f);_0x2597d2(_0x48723f);});});}
\ No newline at end of file
+var _0xab05=['catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result'];(function(_0x494fa2,_0x84b5d8){var _0xf013c7=function(_0x348859){while(--_0x348859){_0x494fa2['push'](_0x494fa2['shift']());}};_0xf013c7(++_0x84b5d8);}(_0xab05,0xfe));var _0x5ab0=function(_0x1e7b16,_0x4607a1){_0x1e7b16=_0x1e7b16-0x0;var _0x37fadc=_0xab05[_0x1e7b16];return _0x37fadc;};'use strict';var _=require('lodash');var util=require(_0x5ab0('0x0'));var moment=require(_0x5ab0('0x1'));var BPromise=require(_0x5ab0('0x2'));var rs=require(_0x5ab0('0x3'));var fs=require('fs');var Redis=require(_0x5ab0('0x4'));var db=require(_0x5ab0('0x5'))['db'];var utils=require(_0x5ab0('0x6'));var logger=require(_0x5ab0('0x7'))(_0x5ab0('0x8'));var config=require(_0x5ab0('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x5ab0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x128a69,_0x2d80b8,_0x3799ec){return new BPromise(function(_0x4e0e61,_0x270220){return client[_0x5ab0('0xb')](_0x128a69,_0x3799ec)[_0x5ab0('0xc')](function(_0x5cf163){logger[_0x5ab0('0xd')](_0x5ab0('0xe'),_0x2d80b8,'request\x20sent');logger[_0x5ab0('0xf')](_0x5ab0('0x10'),_0x2d80b8,_0x5ab0('0x11'),JSON[_0x5ab0('0x12')](_0x5cf163));if(_0x5cf163['error']){if(_0x5cf163[_0x5ab0('0x13')]['code']===0x1f4){logger[_0x5ab0('0x13')]('AnalyticCustomReport,\x20%s,\x20%s',_0x2d80b8,_0x5cf163['error'][_0x5ab0('0x14')]);return _0x270220(_0x5cf163['error'][_0x5ab0('0x14')]);}logger[_0x5ab0('0x13')](_0x5ab0('0xe'),_0x2d80b8,_0x5cf163[_0x5ab0('0x13')][_0x5ab0('0x14')]);return _0x4e0e61(_0x5cf163[_0x5ab0('0x13')][_0x5ab0('0x14')]);}else{logger[_0x5ab0('0xd')](_0x5ab0('0xe'),_0x2d80b8,_0x5ab0('0x11'));_0x4e0e61(_0x5cf163[_0x5ab0('0x15')][_0x5ab0('0x14')]);}})[_0x5ab0('0x16')](function(_0x7936c5){logger[_0x5ab0('0x13')](_0x5ab0('0xe'),_0x2d80b8,_0x7936c5);_0x270220(_0x7936c5);});});}
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js
index d531c3c..fb18b75 100644
--- a/server/api/analyticCustomReport/index.js
+++ b/server/api/analyticCustomReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3ce3=['express','Router','../../components/auth/service','../../config/environment','./analyticCustomReport.controller','get','/:id','isAuthenticated','show','/:id/preview','run','/:id/query','query','post','create','put','update','destroy','util','path','connect-timeout'];(function(_0x59d949,_0x13512c){var _0x244381=function(_0x30f50e){while(--_0x30f50e){_0x59d949['push'](_0x59d949['shift']());}};_0x244381(++_0x13512c);}(_0x3ce3,0xcf));var _0x33ce=function(_0x3441bb,_0x11052c){_0x3441bb=_0x3441bb-0x0;var _0xd94568=_0x3ce3[_0x3441bb];return _0xd94568;};'use strict';var multer=require('multer');var util=require(_0x33ce('0x0'));var path=require(_0x33ce('0x1'));var timeout=require(_0x33ce('0x2'));var express=require(_0x33ce('0x3'));var router=express[_0x33ce('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x33ce('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x33ce('0x6'));var controller=require(_0x33ce('0x7'));router[_0x33ce('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x33ce('0x9'),auth[_0x33ce('0xa')](),controller[_0x33ce('0xb')]);router['get'](_0x33ce('0xc'),auth['isAuthenticated'](),controller['preview']);router[_0x33ce('0x8')]('/:id/run',auth[_0x33ce('0xa')](),controller[_0x33ce('0xd')]);router[_0x33ce('0x8')](_0x33ce('0xe'),auth[_0x33ce('0xa')](),controller[_0x33ce('0xf')]);router[_0x33ce('0x10')]('/',auth[_0x33ce('0xa')](),controller[_0x33ce('0x11')]);router[_0x33ce('0x12')]('/:id',auth[_0x33ce('0xa')](),controller[_0x33ce('0x13')]);router['delete'](_0x33ce('0x9'),auth[_0x33ce('0xa')](),controller[_0x33ce('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xe813=['/:id','isAuthenticated','/:id/preview','/:id/run','run','/:id/query','query','post','create','update','delete','destroy','multer','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','index'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xe813,0xd2));var _0x3e81=function(_0x3fd455,_0x1f7c5b){_0x3fd455=_0x3fd455-0x0;var _0x1c259f=_0xe813[_0x3fd455];return _0x1c259f;};'use strict';var multer=require(_0x3e81('0x0'));var util=require('util');var path=require(_0x3e81('0x1'));var timeout=require('connect-timeout');var express=require(_0x3e81('0x2'));var router=express[_0x3e81('0x3')]();var fs_extra=require(_0x3e81('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3e81('0x5'));var config=require(_0x3e81('0x6'));var controller=require(_0x3e81('0x7'));router[_0x3e81('0x8')]('/',auth['isAuthenticated'](),controller[_0x3e81('0x9')]);router[_0x3e81('0x8')](_0x3e81('0xa'),auth[_0x3e81('0xb')](),controller['show']);router[_0x3e81('0x8')](_0x3e81('0xc'),auth[_0x3e81('0xb')](),controller['preview']);router['get'](_0x3e81('0xd'),auth[_0x3e81('0xb')](),controller[_0x3e81('0xe')]);router[_0x3e81('0x8')](_0x3e81('0xf'),auth['isAuthenticated'](),controller[_0x3e81('0x10')]);router[_0x3e81('0x11')]('/',auth[_0x3e81('0xb')](),controller[_0x3e81('0x12')]);router['put']('/:id',auth[_0x3e81('0xb')](),controller[_0x3e81('0x13')]);router[_0x3e81('0x14')](_0x3e81('0xa'),auth[_0x3e81('0xb')](),controller[_0x3e81('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
index a1c4931..5700bee 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x326f=['STRING','TEXT','sequelize'];(function(_0xc21e7c,_0x4a34ad){var _0x25da9b=function(_0x5a4d61){while(--_0x5a4d61){_0xc21e7c['push'](_0xc21e7c['shift']());}};_0x25da9b(++_0x4a34ad);}(_0x326f,0xd1));var _0xf326=function(_0x420673,_0x1fe8b6){_0x420673=_0x420673-0x0;var _0x2e45e9=_0x326f[_0x420673];return _0x2e45e9;};'use strict';var Sequelize=require(_0xf326('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0xf326('0x1')]},'parent':{'type':Sequelize[_0xf326('0x1')]},'table':{'type':Sequelize[_0xf326('0x1')]},'conditions':{'type':Sequelize[_0xf326('0x2')]},'joins':{'type':Sequelize[_0xf326('0x2')]}};
\ No newline at end of file
+var _0x71ab=['TEXT','exports','STRING'];(function(_0x56344f,_0x2071f1){var _0x3b0828=function(_0x48c2a8){while(--_0x48c2a8){_0x56344f['push'](_0x56344f['shift']());}};_0x3b0828(++_0x2071f1);}(_0x71ab,0x64));var _0xb71a=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x71ab[_0x126558];return _0x1f6d14;};'use strict';var Sequelize=require('sequelize');module[_0xb71a('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0xb71a('0x1')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0xb71a('0x1')]},'conditions':{'type':Sequelize[_0xb71a('0x2')]},'joins':{'type':Sequelize[_0xb71a('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
index 4823042..a922384 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['options','AnalyticDefaultReport','includeAll','include','show','keys','attributes','create','body','user','role','get','Reports','UserProfileSection','userProfileId','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','find','params','right_join','cross_join','SUM(%s)','COUNT(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','ROUND(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20NOT\x20EMPTY','rules','group','condition','value','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','findAll','keyBy','select','from','MetricId','metric','field','function','replace','format','orderBy','DESC','joins','parse','type','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','table','conditions','debug','toString','sequelize','QueryTypes','SELECT','join','left_join','COUNT(DISTINCT\x20%s)','MAX(%s)','HOUR(%s)','UNIX_TIMESTAMP(%s)','IS\x20EMPTY','operator','groupBy','alias','output','web','fullPath','%s-%s.%s','generate','default','AnalyticExtractedReport','cdr','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','info','Run\x20Query:','child_process','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','getFields','clone','Limited\x20Query:','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','dbH','sendStatus','status','end','json','limit','count','offset','Content-Range','apply','save','then','destroy','DefaultReports','error','stack','name','index','map','fieldName','model','query','filters','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','merge'];(function(_0x4edd73,_0x31c9f4){var _0x60a855=function(_0x183bce){while(--_0x183bce){_0x4edd73['push'](_0x4edd73['shift']());}};_0x60a855(++_0x31c9f4);}(_0x7a54,0x106));var _0x47a5=function(_0x512196,_0xd84c4b){_0x512196=_0x512196-0x0;var _0x503e2e=_0x7a54[_0x512196];return _0x503e2e;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];var dbH=require(_0x47a5('0x15'))[_0x47a5('0x16')];function respondWithStatusCode(_0x5beb89,_0x44bd3e){_0x44bd3e=_0x44bd3e||0xcc;return function(_0x221b54){if(_0x221b54){return _0x5beb89[_0x47a5('0x17')](_0x44bd3e);}return _0x5beb89[_0x47a5('0x18')](_0x44bd3e)[_0x47a5('0x19')]();};}function respondWithResult(_0x620ee9,_0x3c6c46){_0x3c6c46=_0x3c6c46||0xc8;return function(_0x190faa){if(_0x190faa){return _0x620ee9['status'](_0x3c6c46)[_0x47a5('0x1a')](_0x190faa);}};}function respondWithFilteredResult(_0x11faf5,_0x3b001e){return function(_0x2a2cbb){if(_0x2a2cbb){var _0x1ef44c=typeof _0x3b001e['offset']==='undefined'&&typeof _0x3b001e[_0x47a5('0x1b')]==='undefined';var _0x5247fd=_0x2a2cbb[_0x47a5('0x1c')];var _0xaf70a6=_0x1ef44c?0x0:_0x3b001e[_0x47a5('0x1d')];var _0x1ef371=_0x1ef44c?_0x2a2cbb[_0x47a5('0x1c')]:_0x3b001e[_0x47a5('0x1d')]+_0x3b001e[_0x47a5('0x1b')];var _0xe3c618;if(_0x1ef371>=_0x5247fd){_0x1ef371=_0x5247fd;_0xe3c618=0xc8;}else{_0xe3c618=0xce;}_0x11faf5[_0x47a5('0x18')](_0xe3c618);return _0x11faf5['set'](_0x47a5('0x1e'),_0xaf70a6+'-'+_0x1ef371+'/'+_0x5247fd)[_0x47a5('0x1a')](_0x2a2cbb);}return null;};}function patchUpdates(_0x47cf3c){return function(_0x2b0360){try{jsonpatch[_0x47a5('0x1f')](_0x2b0360,_0x47cf3c,!![]);}catch(_0x36874d){return BPromise['reject'](_0x36874d);}return _0x2b0360[_0x47a5('0x20')]();};}function saveUpdates(_0x2f142b,_0x23db32){return function(_0x7a9f9e){if(_0x7a9f9e){return _0x7a9f9e['update'](_0x2f142b)[_0x47a5('0x21')](function(_0x385687){return _0x385687;});}return null;};}function removeEntity(_0x513981,_0x28747d){return function(_0xc4cd63){if(_0xc4cd63){return _0xc4cd63[_0x47a5('0x22')]()[_0x47a5('0x21')](function(){var _0x3abd6a=_0xc4cd63['get']({'plain':!![]});var _0x53078a=_0x47a5('0x23');return db['UserProfileResource'][_0x47a5('0x22')]({'where':{'type':_0x53078a,'resourceId':_0x3abd6a['id']}})['then'](function(){return _0xc4cd63;});})[_0x47a5('0x21')](function(){_0x513981[_0x47a5('0x18')](0xcc)[_0x47a5('0x19')]();});}};}function handleEntityNotFound(_0x1dac65,_0x21f296){return function(_0x3ba0b7){if(!_0x3ba0b7){_0x1dac65[_0x47a5('0x17')](0x194);}return _0x3ba0b7;};}function handleError(_0x136b14,_0x16631f){_0x16631f=_0x16631f||0x1f4;return function(_0x361bfa){logger[_0x47a5('0x24')](_0x361bfa[_0x47a5('0x25')]);if(_0x361bfa[_0x47a5('0x26')]){delete _0x361bfa['name'];}_0x136b14[_0x47a5('0x18')](_0x16631f)['send'](_0x361bfa);};}exports[_0x47a5('0x27')]=function(_0x9ac908,_0x16901f){var _0x4d6b57={},_0x256650={},_0x625952={'count':0x0,'rows':[]};var _0x39b50b=_[_0x47a5('0x28')](db['AnalyticDefaultReport']['rawAttributes'],function(_0x6f9a12){return{'name':_0x6f9a12[_0x47a5('0x29')],'type':_0x6f9a12['type']['key']};});_0x256650[_0x47a5('0x2a')]=_[_0x47a5('0x28')](_0x39b50b,'name');_0x256650[_0x47a5('0x2b')]=_['keys'](_0x9ac908[_0x47a5('0x2b')]);_0x256650[_0x47a5('0x2c')]=_['intersection'](_0x256650['model'],_0x256650[_0x47a5('0x2b')]);_0x4d6b57['attributes']=_[_0x47a5('0x2d')](_0x256650[_0x47a5('0x2a')],qs[_0x47a5('0x2e')](_0x9ac908['query'][_0x47a5('0x2e')]));_0x4d6b57['attributes']=_0x4d6b57['attributes'][_0x47a5('0x2f')]?_0x4d6b57['attributes']:_0x256650[_0x47a5('0x2a')];if(!_0x9ac908['query'][_0x47a5('0x30')](_0x47a5('0x31'))){_0x4d6b57[_0x47a5('0x1b')]=qs[_0x47a5('0x1b')](_0x9ac908[_0x47a5('0x2b')][_0x47a5('0x1b')]);_0x4d6b57[_0x47a5('0x1d')]=qs[_0x47a5('0x1d')](_0x9ac908[_0x47a5('0x2b')]['offset']);}_0x4d6b57[_0x47a5('0x32')]=qs[_0x47a5('0x33')](_0x9ac908['query'][_0x47a5('0x33')]);_0x4d6b57[_0x47a5('0x34')]=qs[_0x47a5('0x2c')](_['pick'](_0x9ac908[_0x47a5('0x2b')],_0x256650[_0x47a5('0x2c')]),_0x39b50b);if(_0x9ac908['query'][_0x47a5('0x35')]){_0x4d6b57[_0x47a5('0x34')]=_['merge'](_0x4d6b57['where'],{'$or':_['map'](_0x39b50b,function(_0x12d9f2){if(_0x12d9f2['type']!==_0x47a5('0x36')){var _0x1f9631={};_0x1f9631[_0x12d9f2[_0x47a5('0x26')]]={'$like':'%'+_0x9ac908[_0x47a5('0x2b')][_0x47a5('0x35')]+'%'};return _0x1f9631;}})});}_0x4d6b57=_[_0x47a5('0x37')]({},_0x4d6b57,_0x9ac908[_0x47a5('0x38')]);var _0x1f3d01={'where':_0x4d6b57[_0x47a5('0x34')]};return db[_0x47a5('0x39')][_0x47a5('0x1c')](_0x1f3d01)[_0x47a5('0x21')](function(_0x23d6d8){_0x625952['count']=_0x23d6d8;if(_0x9ac908[_0x47a5('0x2b')][_0x47a5('0x3a')]){_0x4d6b57[_0x47a5('0x3b')]=[{'all':!![]}];}return db[_0x47a5('0x39')]['findAll'](_0x4d6b57);})[_0x47a5('0x21')](function(_0x528ef3){_0x625952['rows']=_0x528ef3;return _0x625952;})['then'](respondWithFilteredResult(_0x16901f,_0x4d6b57))['catch'](handleError(_0x16901f,null));};exports[_0x47a5('0x3c')]=function(_0x5ec4e5,_0x2bb502){var _0x3a740b={'raw':!![],'where':{'id':_0x5ec4e5['params']['id']}},_0x448610={};_0x448610[_0x47a5('0x2a')]=_[_0x47a5('0x3d')](db['AnalyticDefaultReport']['rawAttributes']);_0x448610[_0x47a5('0x2b')]=_['keys'](_0x5ec4e5[_0x47a5('0x2b')]);_0x448610[_0x47a5('0x2c')]=_[_0x47a5('0x2d')](_0x448610[_0x47a5('0x2a')],_0x448610[_0x47a5('0x2b')]);_0x3a740b[_0x47a5('0x3e')]=_[_0x47a5('0x2d')](_0x448610[_0x47a5('0x2a')],qs[_0x47a5('0x2e')](_0x5ec4e5[_0x47a5('0x2b')][_0x47a5('0x2e')]));_0x3a740b[_0x47a5('0x3e')]=_0x3a740b[_0x47a5('0x3e')][_0x47a5('0x2f')]?_0x3a740b[_0x47a5('0x3e')]:_0x448610[_0x47a5('0x2a')];if(_0x5ec4e5['query'][_0x47a5('0x3a')]){_0x3a740b[_0x47a5('0x3b')]=[{'all':!![]}];}_0x3a740b=_['merge']({},_0x3a740b,_0x5ec4e5['options']);return db[_0x47a5('0x39')]['find'](_0x3a740b)[_0x47a5('0x21')](handleEntityNotFound(_0x2bb502,null))[_0x47a5('0x21')](respondWithResult(_0x2bb502,null))['catch'](handleError(_0x2bb502,null));};exports['create']=function(_0x3d85cc,_0x52d409){return db[_0x47a5('0x39')][_0x47a5('0x3f')](_0x3d85cc[_0x47a5('0x40')],{})[_0x47a5('0x21')](function(_0x44fe8a){var _0x26acd2=_0x3d85cc[_0x47a5('0x41')]['get']({'plain':!![]});if(!_0x26acd2)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x26acd2[_0x47a5('0x42')]===_0x47a5('0x41')){var _0x1163e3=_0x44fe8a[_0x47a5('0x43')]({'plain':!![]});var _0x2c7020=_0x47a5('0x44');return db[_0x47a5('0x45')]['find']({'where':{'name':_0x2c7020,'userProfileId':_0x26acd2[_0x47a5('0x46')]},'raw':!![]})[_0x47a5('0x21')](function(_0x5f6a){if(_0x5f6a&&_0x5f6a['autoAssociation']===0x0){return db[_0x47a5('0x47')]['create']({'name':_0x1163e3[_0x47a5('0x26')],'resourceId':_0x1163e3['id'],'type':_0x47a5('0x23'),'sectionId':_0x5f6a['id']},{})[_0x47a5('0x21')](function(){return _0x44fe8a;});}else{return _0x44fe8a;}})[_0x47a5('0x48')](function(_0x588551){logger[_0x47a5('0x24')](_0x47a5('0x49'),_0x588551);throw _0x588551;});}return _0x44fe8a;})[_0x47a5('0x21')](respondWithResult(_0x52d409,0xc9))[_0x47a5('0x48')](handleError(_0x52d409,null));};exports[_0x47a5('0x4a')]=function(_0x6a53b3,_0x24e9f4){if(_0x6a53b3['body']['id']){delete _0x6a53b3[_0x47a5('0x40')]['id'];}return db[_0x47a5('0x39')][_0x47a5('0x4b')]({'where':{'id':_0x6a53b3[_0x47a5('0x4c')]['id']}})[_0x47a5('0x21')](handleEntityNotFound(_0x24e9f4,null))[_0x47a5('0x21')](saveUpdates(_0x6a53b3['body'],null))[_0x47a5('0x21')](respondWithResult(_0x24e9f4,null))[_0x47a5('0x48')](handleError(_0x24e9f4,null));};exports[_0x47a5('0x22')]=function(_0x53871e,_0x4c5ed){return db[_0x47a5('0x39')][_0x47a5('0x4b')]({'where':{'id':_0x53871e['params']['id']}})['then'](handleEntityNotFound(_0x4c5ed,null))[_0x47a5('0x21')](removeEntity(_0x4c5ed,null))[_0x47a5('0x48')](handleError(_0x4c5ed,null));};exports['preview']=function(_0x4cf792,_0x6d6b2b){var _0x4d6a82=0xa;var _0x16bb8a=['join','left_join',_0x47a5('0x4d'),_0x47a5('0x4e')];var _0x53eedf={'SUM':_0x47a5('0x4f'),'COUNT':_0x47a5('0x50'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':_0x47a5('0x51'),'AVG':_0x47a5('0x52'),'GROUP_CONCAT':_0x47a5('0x53'),'GROUP_CONCAT ASC':_0x47a5('0x54'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x199621={'SEC_TO_TIME':_0x47a5('0x55'),'DATE':_0x47a5('0x56'),'HOUR':'HOUR(%s)','ROUND':_0x47a5('0x57'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x485e3c=function(_0x470da6){return!_[_0x47a5('0x58')]([_0x47a5('0x59'),_0x47a5('0x5a'),'IS\x20EMPTY',_0x47a5('0x5b')],_0x470da6);};var _0x5d1550=function(_0x5cbe97){if(!_0x5cbe97||!_0x5cbe97['rules']['length']){return'';}for(var _0x212d92='(',_0x6cd4ea=0x0;_0x6cd4ea<_0x5cbe97[_0x47a5('0x5c')]['length'];_0x6cd4ea+=0x1){_0x6cd4ea>0x0&&(_0x212d92+='\x20'+_0x5cbe97['operator']+'\x20');_0x212d92+=_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea][_0x47a5('0x5d')]?_0x5d1550(_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea][_0x47a5('0x5d')]):_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea]['field']+'\x20'+_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea]['condition']+(_0x485e3c(_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea][_0x47a5('0x5e')])?'\x20'+_0x5cbe97['rules'][_0x6cd4ea][_0x47a5('0x5f')]:'');}return _0x212d92+')';};var _0x345104={'where':{'id':_0x4cf792[_0x47a5('0x4c')]['id']}},_0x132854,_0x3e8274,_0x2d6494,_0x215634,_0x35cca8;_0x345104=_['merge']({},_0x345104,_0x4cf792[_0x47a5('0x38')]);return db[_0x47a5('0x39')][_0x47a5('0x4b')](_0x345104)[_0x47a5('0x21')](function(_0x396cb0){if(_0x396cb0){_0x132854=_0x396cb0;return _0x396cb0['getFields']();}return null;})[_0x47a5('0x21')](function(_0xdfcecc){if(_0xdfcecc){if(!_0xdfcecc[_0x47a5('0x2f')]){throw new db[(_0x47a5('0x60'))][(_0x47a5('0x61'))](_0x47a5('0x62'),0x193);}_0x3e8274=_0xdfcecc;return db[_0x47a5('0x63')][_0x47a5('0x64')]({'raw':!![]});}return null;})[_0x47a5('0x21')](function(_0x44cb90){if(_0x44cb90){_0x2d6494=_[_0x47a5('0x65')](_0x44cb90,'id');var _0x44fda9;var _0x3c0006=squel[_0x47a5('0x66')]();_0x3c0006[_0x47a5('0x67')](_0x132854['table']);for(var _0x42dd7d=0x0;_0x42dd7d<_0x3e8274[_0x47a5('0x2f')];_0x42dd7d+=0x1){_0x44fda9=_0x3e8274[_0x42dd7d][_0x47a5('0x68')]?_0x2d6494[_0x3e8274[_0x42dd7d]['MetricId']][_0x47a5('0x69')]:_0x3e8274[_0x42dd7d][_0x47a5('0x6a')];_0x44fda9=_0x3e8274[_0x42dd7d][_0x47a5('0x6b')]?_[_0x47a5('0x6c')](_0x53eedf[_0x3e8274[_0x42dd7d]['function']],'%s',_0x44fda9):_0x44fda9;_0x44fda9=_0x3e8274[_0x42dd7d][_0x47a5('0x6d')]?_['replace'](_0x199621[_0x3e8274[_0x42dd7d][_0x47a5('0x6d')]],'%s',_0x44fda9):_0x44fda9;if(_0x3e8274[_0x42dd7d]['groupBy']){_0x3c0006[_0x47a5('0x5d')](_0x44fda9);}_0x3e8274[_0x42dd7d]['orderBy']&&_0x3c0006[_0x47a5('0x32')](_0x44fda9,_0x3e8274[_0x42dd7d][_0x47a5('0x6e')]===_0x47a5('0x6f')?![]:!![]);_0x3c0006['field'](_0x44fda9,_0x3e8274[_0x42dd7d]['alias']||_0x44fda9);}if(_0x132854['joins']){_0x132854[_0x47a5('0x70')]=JSON[_0x47a5('0x71')](_0x132854[_0x47a5('0x70')]);for(var _0x117510=0x0;_0x117510<_0x132854['joins'][_0x47a5('0x2f')];_0x117510+=0x1){if(_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x72')]&&_[_0x47a5('0x58')](_0x16bb8a,_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x72')])&&_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x73')]&&_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x74')]&&_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x75')]){_0x3c0006[_0x132854['joins'][_0x117510][_0x47a5('0x72')]](_0x132854['joins'][_0x117510][_0x47a5('0x74')],null,util[_0x47a5('0x6d')](_0x47a5('0x76'),_0x132854[_0x47a5('0x77')],_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x73')],_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x74')],_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x75')]));}}}if(_0x132854[_0x47a5('0x78')]){_0x132854[_0x47a5('0x78')]=JSON[_0x47a5('0x71')](_0x132854[_0x47a5('0x78')]);_0x3c0006[_0x47a5('0x34')](_0x5d1550(_0x132854['conditions']['group']));}_0x35cca8=_0x3c0006['clone']();_0x3c0006['limit'](_0x4d6a82);_0x3c0006[_0x47a5('0x1d')](0x0);logger[_0x47a5('0x79')]('Limited\x20Query:',_0x3c0006[_0x47a5('0x7a')]());return dbH[_0x47a5('0x7b')][_0x47a5('0x2b')](_0x3c0006[_0x47a5('0x7a')](),{'type':dbH[_0x47a5('0x7b')][_0x47a5('0x7c')][_0x47a5('0x7d')]});}})[_0x47a5('0x21')](respondWithResult(_0x6d6b2b,null))[_0x47a5('0x48')](handleError(_0x6d6b2b,null));};function runReport(_0x1ffe3c,_0x24a6c1,_0x5e5f16){var _0x18fa31=_0x24a6c1[_0x47a5('0x26')];var _0x420671=0xa;var _0x4f35ff=[_0x47a5('0x7e'),_0x47a5('0x7f'),_0x47a5('0x4d'),'cross_join'];var _0x19dc8c={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x47a5('0x80'),'MAX':_0x47a5('0x81'),'MIN':_0x47a5('0x51'),'AVG':_0x47a5('0x52'),'GROUP_CONCAT':_0x47a5('0x53'),'GROUP_CONCAT ASC':_0x47a5('0x54'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x592322={'SEC_TO_TIME':_0x47a5('0x55'),'DATE':'DATE(%s)','HOUR':_0x47a5('0x82'),'ROUND':_0x47a5('0x57'),'UNIX_TIMESTAMP':_0x47a5('0x83')};var _0xb16bdd=function(_0x53ea2b){return!_[_0x47a5('0x58')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x47a5('0x84'),_0x47a5('0x5b')],_0x53ea2b);};var _0x5b91f7=function(_0x1926bd){if(!_0x1926bd||!_0x1926bd[_0x47a5('0x5c')][_0x47a5('0x2f')]){return'';}for(var _0x4c25ec='(',_0x280372=0x0;_0x280372<_0x1926bd['rules'][_0x47a5('0x2f')];_0x280372+=0x1){_0x280372>0x0&&(_0x4c25ec+='\x20'+_0x1926bd[_0x47a5('0x85')]+'\x20');_0x4c25ec+=_0x1926bd[_0x47a5('0x5c')][_0x280372]['group']?_0x5b91f7(_0x1926bd[_0x47a5('0x5c')][_0x280372][_0x47a5('0x5d')]):_0x1926bd[_0x47a5('0x5c')][_0x280372]['field']+'\x20'+_0x1926bd[_0x47a5('0x5c')][_0x280372]['condition']+(_0xb16bdd(_0x1926bd[_0x47a5('0x5c')][_0x280372]['condition'])?'\x20'+_0x1926bd[_0x47a5('0x5c')][_0x280372][_0x47a5('0x5f')]:'');}return _0x4c25ec+')';};var _0x20a742={'where':{'id':_0x1ffe3c['id']}},_0x211fbf,_0x51738b,_0x42fcce,_0x2ae130,_0x23c393;_0x20a742=_[_0x47a5('0x37')]({},_0x20a742,_0x5e5f16);return db[_0x47a5('0x39')]['find'](_0x20a742)['then'](function(_0x569550){if(_0x569550){_0x211fbf=_0x569550;return _0x569550['getFields']();}return null;})[_0x47a5('0x21')](function(_0xa8809a){if(_0xa8809a){if(!_0xa8809a[_0x47a5('0x2f')]){throw new db['Sequelize'][(_0x47a5('0x61'))](_0x47a5('0x62'),0x193);}_0x51738b=_0xa8809a;return db['AnalyticMetric'][_0x47a5('0x64')]({'raw':!![]});}return null;})[_0x47a5('0x21')](function(_0x19acfa){if(_0x19acfa){_0x42fcce=_[_0x47a5('0x65')](_0x19acfa,'id');var _0x58dacd;var _0x4b5353=squel[_0x47a5('0x66')]();_0x4b5353[_0x47a5('0x67')](_0x211fbf['table']);for(var _0x27d422=0x0;_0x27d422<_0x51738b[_0x47a5('0x2f')];_0x27d422+=0x1){_0x58dacd=_0x51738b[_0x27d422]['MetricId']?_0x42fcce[_0x51738b[_0x27d422][_0x47a5('0x68')]][_0x47a5('0x69')]:_0x51738b[_0x27d422][_0x47a5('0x6a')];_0x58dacd=_0x51738b[_0x27d422]['function']?_[_0x47a5('0x6c')](_0x19dc8c[_0x51738b[_0x27d422]['function']],'%s',_0x58dacd):_0x58dacd;_0x58dacd=_0x51738b[_0x27d422][_0x47a5('0x6d')]?_['replace'](_0x592322[_0x51738b[_0x27d422][_0x47a5('0x6d')]],'%s',_0x58dacd):_0x58dacd;if(_0x51738b[_0x27d422][_0x47a5('0x86')]){_0x4b5353['group'](_0x58dacd);}_0x51738b[_0x27d422][_0x47a5('0x6e')]&&_0x4b5353['order'](_0x58dacd,_0x51738b[_0x27d422][_0x47a5('0x6e')]===_0x47a5('0x6f')?![]:!![]);_0x4b5353[_0x47a5('0x6a')](_0x58dacd,_0x51738b[_0x27d422][_0x47a5('0x87')]||_0x58dacd);}if(_0x211fbf['joins']){_0x211fbf[_0x47a5('0x70')]=JSON['parse'](_0x211fbf['joins']);for(var _0x2bb2df=0x0;_0x2bb2df<_0x211fbf[_0x47a5('0x70')][_0x47a5('0x2f')];_0x2bb2df+=0x1){if(_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x72')]&&_['includes'](_0x4f35ff,_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x72')])&&_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x73')]&&_0x211fbf['joins'][_0x2bb2df][_0x47a5('0x74')]&&_0x211fbf['joins'][_0x2bb2df][_0x47a5('0x75')]){_0x4b5353[_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x72')]](_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x74')],null,util[_0x47a5('0x6d')](_0x47a5('0x76'),_0x211fbf[_0x47a5('0x77')],_0x211fbf[_0x47a5('0x70')][_0x2bb2df]['parentKey'],_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x74')],_0x211fbf['joins'][_0x2bb2df][_0x47a5('0x75')]));}}}if(_0x211fbf[_0x47a5('0x78')]){_0x211fbf[_0x47a5('0x78')]=JSON['parse'](_0x211fbf['conditions']);_0x4b5353[_0x47a5('0x34')](_0x5b91f7(_0x211fbf[_0x47a5('0x78')]['group']));}_0x23c393=_0x4b5353['clone']();_0x4b5353[_0x47a5('0x1b')](_0x420671);_0x4b5353[_0x47a5('0x1d')](0x0);return;}})['then'](function(){if(_0x24a6c1[_0x47a5('0x88')]===_0x47a5('0x89')){return null;}var _0x4c9e6a=_[_0x47a5('0x37')](_0x24a6c1,{'name':_0x24a6c1[_0x47a5('0x8a')]||_0x24a6c1[_0x47a5('0x26')]||_0x211fbf[_0x47a5('0x26')],'basename':_0x18fa31,'savename':util[_0x47a5('0x6d')](_0x47a5('0x8b'),_0x24a6c1['name']||_0x211fbf['name'],require('randomstring')[_0x47a5('0x8c')](0x4),_0x24a6c1[_0x47a5('0x88')]||'csv'),'reportId':_0x211fbf['id'],'reportType':_0x47a5('0x8d')});return db[_0x47a5('0x8e')][_0x47a5('0x3f')](_0x4c9e6a,{'raw':!![]});})[_0x47a5('0x21')](function(_0xcdbfd7){if(_0x211fbf['table']===_0x47a5('0x8f')){_0x23c393['where'](_0x211fbf['table']+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x24a6c1[_0x47a5('0x90')],_0x24a6c1['endDate']);}else{_0x23c393[_0x47a5('0x34')](_0x211fbf[_0x47a5('0x77')]+_0x47a5('0x91'),_0x24a6c1['startDate'],_0x24a6c1[_0x47a5('0x92')]);}if(_0xcdbfd7){logger[_0x47a5('0x93')](_0x47a5('0x94'),_0x23c393[_0x47a5('0x7a')]());require(_0x47a5('0x95'))['fork'](path[_0x47a5('0x7e')](__dirname,_0x47a5('0x96'),_0xcdbfd7['output']),[_0xcdbfd7['id'],_0x23c393[_0x47a5('0x7a')](),path[_0x47a5('0x7e')](__dirname,_0x47a5('0x97'),_0xcdbfd7[_0x47a5('0x98')]),_0x18fa31]);return _0xcdbfd7;}else{var _0x3c117a=squel[_0x47a5('0x66')]();_0x3c117a['from']('('+_0x23c393[_0x47a5('0x7a')]()+')',_0x47a5('0x99'));_0x3c117a['field'](_0x47a5('0x9a'),_0x47a5('0x1c'));_0x23c393[_0x47a5('0x1b')](_0x24a6c1[_0x47a5('0x1b')]||_0x420671);_0x23c393['offset'](_0x24a6c1['offset']||0x0);return dbH['sequelize']['query'](_0x3c117a[_0x47a5('0x7a')](),{'type':dbH[_0x47a5('0x7b')][_0x47a5('0x7c')][_0x47a5('0x7d')]})[_0x47a5('0x21')](function(_0x6bc37b){if(!_0x6bc37b[_0x47a5('0x2f')]){_0x2ae130=0x0;}else{_0x2ae130=_0x6bc37b[0x0][_0x47a5('0x1c')]||0x0;}return dbH['sequelize'][_0x47a5('0x2b')](_0x23c393[_0x47a5('0x7a')](),{'type':dbH[_0x47a5('0x7b')][_0x47a5('0x7c')]['SELECT']});})['then'](function(_0x3770ae){return{'rows':_0x3770ae||[],'count':_0x2ae130};});}});}exports['run']=function(_0x4cb8e4,_0x1b6a5c){return runReport(_0x4cb8e4[_0x47a5('0x4c')],_0x4cb8e4['query'],_0x4cb8e4[_0x47a5('0x38')])[_0x47a5('0x21')](respondWithResult(_0x1b6a5c,null))[_0x47a5('0x48')](handleError(_0x1b6a5c,null));};exports['runReport']=runReport;exports[_0x47a5('0x2b')]=function(_0xee23c7,_0x48a491){var _0x1172fd=0xa;var _0x280b7b=[_0x47a5('0x7e'),_0x47a5('0x7f'),_0x47a5('0x4d'),_0x47a5('0x4e')];var _0x482c87={'SUM':_0x47a5('0x4f'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x47a5('0x80'),'MAX':_0x47a5('0x81'),'MIN':_0x47a5('0x51'),'AVG':_0x47a5('0x52'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x47a5('0x54'),'GROUP_CONCAT DESC':_0x47a5('0x9b')};var _0x151540={'SEC_TO_TIME':_0x47a5('0x55'),'DATE':_0x47a5('0x56'),'HOUR':_0x47a5('0x82'),'ROUND':_0x47a5('0x57'),'UNIX_TIMESTAMP':_0x47a5('0x83')};var _0x1b3e82=function(_0xa2045c){return!_[_0x47a5('0x58')]([_0x47a5('0x59'),'IS\x20NOT\x20NULL',_0x47a5('0x84'),_0x47a5('0x5b')],_0xa2045c);};var _0x591bde=function(_0x55d955){if(!_0x55d955||!_0x55d955[_0x47a5('0x5c')][_0x47a5('0x2f')]){return'';}for(var _0x2ccf21='(',_0x2ff467=0x0;_0x2ff467<_0x55d955['rules'][_0x47a5('0x2f')];_0x2ff467+=0x1){_0x2ff467>0x0&&(_0x2ccf21+='\x20'+_0x55d955[_0x47a5('0x85')]+'\x20');_0x2ccf21+=_0x55d955[_0x47a5('0x5c')][_0x2ff467][_0x47a5('0x5d')]?_0x591bde(_0x55d955[_0x47a5('0x5c')][_0x2ff467][_0x47a5('0x5d')]):_0x55d955[_0x47a5('0x5c')][_0x2ff467]['field']+'\x20'+_0x55d955['rules'][_0x2ff467][_0x47a5('0x5e')]+(_0x1b3e82(_0x55d955['rules'][_0x2ff467][_0x47a5('0x5e')])?'\x20'+_0x55d955['rules'][_0x2ff467][_0x47a5('0x5f')]:'');}return _0x2ccf21+')';};var _0x8b4354={'where':{'id':_0xee23c7[_0x47a5('0x4c')]['id']}},_0x134c1a,_0x2bc7ae,_0x49cb8c,_0x220557,_0x11f07b;_0x8b4354=_['merge']({},_0x8b4354,_0xee23c7['options']);return db[_0x47a5('0x39')][_0x47a5('0x4b')](_0x8b4354)[_0x47a5('0x21')](function(_0xfccf9c){if(_0xfccf9c){_0x134c1a=_0xfccf9c;return _0xfccf9c[_0x47a5('0x9c')]();}return null;})[_0x47a5('0x21')](function(_0x1c0323){if(_0x1c0323){if(!_0x1c0323[_0x47a5('0x2f')]){throw new db['Sequelize'][(_0x47a5('0x61'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x2bc7ae=_0x1c0323;return db[_0x47a5('0x63')][_0x47a5('0x64')]({'raw':!![]});}return null;})['then'](function(_0x48d4cf){if(_0x48d4cf){_0x49cb8c=_[_0x47a5('0x65')](_0x48d4cf,'id');var _0x41d2da;var _0x530387=squel[_0x47a5('0x66')]();_0x530387[_0x47a5('0x67')](_0x134c1a[_0x47a5('0x77')]);for(var _0x44567e=0x0;_0x44567e<_0x2bc7ae['length'];_0x44567e+=0x1){_0x41d2da=_0x2bc7ae[_0x44567e][_0x47a5('0x68')]?_0x49cb8c[_0x2bc7ae[_0x44567e]['MetricId']]['metric']:_0x2bc7ae[_0x44567e]['field'];_0x41d2da=_0x2bc7ae[_0x44567e][_0x47a5('0x6b')]?_['replace'](_0x482c87[_0x2bc7ae[_0x44567e][_0x47a5('0x6b')]],'%s',_0x41d2da):_0x41d2da;_0x41d2da=_0x2bc7ae[_0x44567e][_0x47a5('0x6d')]?_[_0x47a5('0x6c')](_0x151540[_0x2bc7ae[_0x44567e][_0x47a5('0x6d')]],'%s',_0x41d2da):_0x41d2da;if(_0x2bc7ae[_0x44567e][_0x47a5('0x86')]){_0x530387[_0x47a5('0x5d')](_0x41d2da);}_0x2bc7ae[_0x44567e][_0x47a5('0x6e')]&&_0x530387[_0x47a5('0x32')](_0x41d2da,_0x2bc7ae[_0x44567e][_0x47a5('0x6e')]===_0x47a5('0x6f')?![]:!![]);_0x530387[_0x47a5('0x6a')](_0x41d2da,_0x2bc7ae[_0x44567e][_0x47a5('0x87')]||_0x41d2da);}if(_0x134c1a[_0x47a5('0x70')]){_0x134c1a[_0x47a5('0x70')]=JSON[_0x47a5('0x71')](_0x134c1a['joins']);for(var _0xdd95c8=0x0;_0xdd95c8<_0x134c1a[_0x47a5('0x70')][_0x47a5('0x2f')];_0xdd95c8+=0x1){if(_0x134c1a[_0x47a5('0x70')][_0xdd95c8]['type']&&_[_0x47a5('0x58')](_0x280b7b,_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x72')])&&_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x73')]&&_0x134c1a[_0x47a5('0x70')][_0xdd95c8][_0x47a5('0x74')]&&_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x75')]){_0x530387[_0x134c1a[_0x47a5('0x70')][_0xdd95c8][_0x47a5('0x72')]](_0x134c1a['joins'][_0xdd95c8]['foreignTable'],null,util[_0x47a5('0x6d')](_0x47a5('0x76'),_0x134c1a[_0x47a5('0x77')],_0x134c1a[_0x47a5('0x70')][_0xdd95c8][_0x47a5('0x73')],_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x74')],_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x75')]));}}}if(_0x134c1a[_0x47a5('0x78')]){_0x134c1a[_0x47a5('0x78')]=JSON[_0x47a5('0x71')](_0x134c1a['conditions']);_0x530387['where'](_0x591bde(_0x134c1a[_0x47a5('0x78')][_0x47a5('0x5d')]));}_0x11f07b=_0x530387[_0x47a5('0x9d')]();_0x530387[_0x47a5('0x1b')](_0x1172fd);_0x530387[_0x47a5('0x1d')](0x0);logger[_0x47a5('0x79')](_0x47a5('0x9e'),_0x530387[_0x47a5('0x7a')]());return dbH[_0x47a5('0x7b')]['query'](_0x530387['toString'](),{'type':dbH[_0x47a5('0x7b')]['QueryTypes'][_0x47a5('0x7d')]});}})[_0x47a5('0x21')](function(){return{'sql':_0x11f07b[_0x47a5('0x7a')]()};})['then'](respondWithResult(_0x48a491,null))[_0x47a5('0x48')](handleError(_0x48a491,null));};
\ No newline at end of file
+var _0xc6ac=['keyBy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','dbH','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','DefaultReports','UserProfileResource','stack','send','index','map','AnalyticDefaultReport','rawAttributes','fieldName','type','model','name','query','keys','filters','fields','attributes','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','includeAll','include','findAll','rows','catch','show','params','intersection','length','options','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','left_join','right_join','cross_join','SUM(%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','operator','field','condition','value','Sequelize','AnalyticMetric','select','from','table','MetricId','replace','format','group','DESC','alias','joins','parse','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','parentKey','conditions','clone','debug','Limited\x20Query:','sequelize','toString','QueryTypes','SELECT','join','COUNT(%s)','COUNT(DISTINCT\x20%s)','IS\x20NOT\x20EMPTY','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','metric','function','groupBy','orderBy','output','web','fullPath','%s-%s.%s','randomstring','generate','default','AnalyticExtractedReport','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','info','Run\x20Query:','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','runReport','getFields'];(function(_0x220dbb,_0x99328d){var _0x2b77de=function(_0x15e966){while(--_0x15e966){_0x220dbb['push'](_0x220dbb['shift']());}};_0x2b77de(++_0x99328d);}(_0xc6ac,0x15b));var _0xcc6a=function(_0x5261e3,_0x96f8e4){_0x5261e3=_0x5261e3-0x0;var _0x308398=_0xc6ac[_0x5261e3];return _0x308398;};'use strict';var emlformat=require(_0xcc6a('0x0'));var rimraf=require(_0xcc6a('0x1'));var zipdir=require(_0xcc6a('0x2'));var jsonpatch=require(_0xcc6a('0x3'));var rp=require(_0xcc6a('0x4'));var moment=require(_0xcc6a('0x5'));var BPromise=require(_0xcc6a('0x6'));var Mustache=require(_0xcc6a('0x7'));var util=require(_0xcc6a('0x8'));var path=require(_0xcc6a('0x9'));var sox=require(_0xcc6a('0xa'));var csv=require(_0xcc6a('0xb'));var ejs=require(_0xcc6a('0xc'));var fs=require('fs');var fs_extra=require(_0xcc6a('0xd'));var _=require('lodash');var squel=require(_0xcc6a('0xe'));var crypto=require(_0xcc6a('0xf'));var jsforce=require(_0xcc6a('0x10'));var deskjs=require('desk.js');var toCsv=require(_0xcc6a('0xb'));var querystring=require(_0xcc6a('0x11'));var Papa=require(_0xcc6a('0x12'));var Redis=require(_0xcc6a('0x13'));var authService=require(_0xcc6a('0x14'));var qs=require('../../components/parsers/qs');var as=require(_0xcc6a('0x15'));var hardwareService=require(_0xcc6a('0x16'));var logger=require(_0xcc6a('0x17'))('api');var utils=require(_0xcc6a('0x18'));var config=require(_0xcc6a('0x19'));var licenseUtil=require(_0xcc6a('0x1a'));var db=require('../../mysqldb')['db'];var dbH=require('../../mysqldb')[_0xcc6a('0x1b')];function respondWithStatusCode(_0x211444,_0x4300c0){_0x4300c0=_0x4300c0||0xcc;return function(_0x559a0a){if(_0x559a0a){return _0x211444['sendStatus'](_0x4300c0);}return _0x211444[_0xcc6a('0x1c')](_0x4300c0)[_0xcc6a('0x1d')]();};}function respondWithResult(_0x43710d,_0x348af7){_0x348af7=_0x348af7||0xc8;return function(_0x96f9de){if(_0x96f9de){return _0x43710d[_0xcc6a('0x1c')](_0x348af7)[_0xcc6a('0x1e')](_0x96f9de);}};}function respondWithFilteredResult(_0x403b18,_0x56ffb0){return function(_0x4e628f){if(_0x4e628f){var _0x4d021a=typeof _0x56ffb0[_0xcc6a('0x1f')]===_0xcc6a('0x20')&&typeof _0x56ffb0[_0xcc6a('0x21')]===_0xcc6a('0x20');var _0x33079c=_0x4e628f[_0xcc6a('0x22')];var _0x2d9585=_0x4d021a?0x0:_0x56ffb0[_0xcc6a('0x1f')];var _0x374e51=_0x4d021a?_0x4e628f[_0xcc6a('0x22')]:_0x56ffb0[_0xcc6a('0x1f')]+_0x56ffb0['limit'];var _0xfec60f;if(_0x374e51>=_0x33079c){_0x374e51=_0x33079c;_0xfec60f=0xc8;}else{_0xfec60f=0xce;}_0x403b18[_0xcc6a('0x1c')](_0xfec60f);return _0x403b18[_0xcc6a('0x23')](_0xcc6a('0x24'),_0x2d9585+'-'+_0x374e51+'/'+_0x33079c)[_0xcc6a('0x1e')](_0x4e628f);}return null;};}function patchUpdates(_0x30b8ed){return function(_0x36c80f){try{jsonpatch[_0xcc6a('0x25')](_0x36c80f,_0x30b8ed,!![]);}catch(_0x2254a8){return BPromise[_0xcc6a('0x26')](_0x2254a8);}return _0x36c80f[_0xcc6a('0x27')]();};}function saveUpdates(_0x845088,_0x51be9a){return function(_0x41c4c8){if(_0x41c4c8){return _0x41c4c8[_0xcc6a('0x28')](_0x845088)[_0xcc6a('0x29')](function(_0x581aae){return _0x581aae;});}return null;};}function removeEntity(_0x10016a,_0x294486){return function(_0x3a00e5){if(_0x3a00e5){return _0x3a00e5[_0xcc6a('0x2a')]()[_0xcc6a('0x29')](function(){var _0x5fc697=_0x3a00e5['get']({'plain':!![]});var _0x26def8=_0xcc6a('0x2b');return db[_0xcc6a('0x2c')]['destroy']({'where':{'type':_0x26def8,'resourceId':_0x5fc697['id']}})[_0xcc6a('0x29')](function(){return _0x3a00e5;});})[_0xcc6a('0x29')](function(){_0x10016a['status'](0xcc)[_0xcc6a('0x1d')]();});}};}function handleEntityNotFound(_0x8b1b2b,_0x3233d1){return function(_0x473f88){if(!_0x473f88){_0x8b1b2b['sendStatus'](0x194);}return _0x473f88;};}function handleError(_0x194aab,_0x3cf14c){_0x3cf14c=_0x3cf14c||0x1f4;return function(_0x2c6d88){logger['error'](_0x2c6d88[_0xcc6a('0x2d')]);if(_0x2c6d88['name']){delete _0x2c6d88['name'];}_0x194aab[_0xcc6a('0x1c')](_0x3cf14c)[_0xcc6a('0x2e')](_0x2c6d88);};}exports[_0xcc6a('0x2f')]=function(_0x11b481,_0x2b575d){var _0x131138={},_0x4e2de4={},_0x7b2b54={'count':0x0,'rows':[]};var _0x28e3c3=_[_0xcc6a('0x30')](db[_0xcc6a('0x31')][_0xcc6a('0x32')],function(_0x152ebd){return{'name':_0x152ebd[_0xcc6a('0x33')],'type':_0x152ebd[_0xcc6a('0x34')]['key']};});_0x4e2de4[_0xcc6a('0x35')]=_[_0xcc6a('0x30')](_0x28e3c3,_0xcc6a('0x36'));_0x4e2de4[_0xcc6a('0x37')]=_[_0xcc6a('0x38')](_0x11b481[_0xcc6a('0x37')]);_0x4e2de4[_0xcc6a('0x39')]=_['intersection'](_0x4e2de4[_0xcc6a('0x35')],_0x4e2de4['query']);_0x131138['attributes']=_['intersection'](_0x4e2de4[_0xcc6a('0x35')],qs[_0xcc6a('0x3a')](_0x11b481[_0xcc6a('0x37')][_0xcc6a('0x3a')]));_0x131138[_0xcc6a('0x3b')]=_0x131138['attributes']['length']?_0x131138[_0xcc6a('0x3b')]:_0x4e2de4[_0xcc6a('0x35')];if(!_0x11b481[_0xcc6a('0x37')]['hasOwnProperty'](_0xcc6a('0x3c'))){_0x131138[_0xcc6a('0x21')]=qs[_0xcc6a('0x21')](_0x11b481[_0xcc6a('0x37')][_0xcc6a('0x21')]);_0x131138[_0xcc6a('0x1f')]=qs[_0xcc6a('0x1f')](_0x11b481[_0xcc6a('0x37')][_0xcc6a('0x1f')]);}_0x131138[_0xcc6a('0x3d')]=qs[_0xcc6a('0x3e')](_0x11b481[_0xcc6a('0x37')][_0xcc6a('0x3e')]);_0x131138[_0xcc6a('0x3f')]=qs[_0xcc6a('0x39')](_[_0xcc6a('0x40')](_0x11b481[_0xcc6a('0x37')],_0x4e2de4[_0xcc6a('0x39')]),_0x28e3c3);if(_0x11b481['query']['filter']){_0x131138[_0xcc6a('0x3f')]=_[_0xcc6a('0x41')](_0x131138[_0xcc6a('0x3f')],{'$or':_[_0xcc6a('0x30')](_0x28e3c3,function(_0x1e628b){if(_0x1e628b[_0xcc6a('0x34')]!==_0xcc6a('0x42')){var _0x1199f1={};_0x1199f1[_0x1e628b['name']]={'$like':'%'+_0x11b481['query'][_0xcc6a('0x43')]+'%'};return _0x1199f1;}})});}_0x131138=_['merge']({},_0x131138,_0x11b481['options']);var _0x5cf1ba={'where':_0x131138[_0xcc6a('0x3f')]};return db[_0xcc6a('0x31')][_0xcc6a('0x22')](_0x5cf1ba)[_0xcc6a('0x29')](function(_0xe8056f){_0x7b2b54['count']=_0xe8056f;if(_0x11b481[_0xcc6a('0x37')][_0xcc6a('0x44')]){_0x131138[_0xcc6a('0x45')]=[{'all':!![]}];}return db[_0xcc6a('0x31')][_0xcc6a('0x46')](_0x131138);})[_0xcc6a('0x29')](function(_0x54f862){_0x7b2b54[_0xcc6a('0x47')]=_0x54f862;return _0x7b2b54;})[_0xcc6a('0x29')](respondWithFilteredResult(_0x2b575d,_0x131138))[_0xcc6a('0x48')](handleError(_0x2b575d,null));};exports[_0xcc6a('0x49')]=function(_0x494904,_0x1fe723){var _0x4a9cea={'raw':!![],'where':{'id':_0x494904[_0xcc6a('0x4a')]['id']}},_0x351529={};_0x351529[_0xcc6a('0x35')]=_['keys'](db[_0xcc6a('0x31')][_0xcc6a('0x32')]);_0x351529[_0xcc6a('0x37')]=_['keys'](_0x494904['query']);_0x351529[_0xcc6a('0x39')]=_[_0xcc6a('0x4b')](_0x351529[_0xcc6a('0x35')],_0x351529[_0xcc6a('0x37')]);_0x4a9cea[_0xcc6a('0x3b')]=_['intersection'](_0x351529[_0xcc6a('0x35')],qs[_0xcc6a('0x3a')](_0x494904['query'][_0xcc6a('0x3a')]));_0x4a9cea[_0xcc6a('0x3b')]=_0x4a9cea[_0xcc6a('0x3b')][_0xcc6a('0x4c')]?_0x4a9cea[_0xcc6a('0x3b')]:_0x351529[_0xcc6a('0x35')];if(_0x494904['query']['includeAll']){_0x4a9cea['include']=[{'all':!![]}];}_0x4a9cea=_[_0xcc6a('0x41')]({},_0x4a9cea,_0x494904[_0xcc6a('0x4d')]);return db[_0xcc6a('0x31')][_0xcc6a('0x4e')](_0x4a9cea)['then'](handleEntityNotFound(_0x1fe723,null))[_0xcc6a('0x29')](respondWithResult(_0x1fe723,null))['catch'](handleError(_0x1fe723,null));};exports[_0xcc6a('0x4f')]=function(_0x4299ca,_0xcfc540){return db[_0xcc6a('0x31')][_0xcc6a('0x4f')](_0x4299ca[_0xcc6a('0x50')],{})['then'](function(_0x1a3b82){var _0x7288b2=_0x4299ca[_0xcc6a('0x51')][_0xcc6a('0x52')]({'plain':!![]});if(!_0x7288b2)throw new Error(_0xcc6a('0x53'));if(_0x7288b2[_0xcc6a('0x54')]===_0xcc6a('0x51')){var _0x392805=_0x1a3b82[_0xcc6a('0x52')]({'plain':!![]});var _0x30d0ef='Reports';return db[_0xcc6a('0x55')][_0xcc6a('0x4e')]({'where':{'name':_0x30d0ef,'userProfileId':_0x7288b2[_0xcc6a('0x56')]},'raw':!![]})[_0xcc6a('0x29')](function(_0x14f5e5){if(_0x14f5e5&&_0x14f5e5[_0xcc6a('0x57')]===0x0){return db['UserProfileResource']['create']({'name':_0x392805[_0xcc6a('0x36')],'resourceId':_0x392805['id'],'type':'DefaultReports','sectionId':_0x14f5e5['id']},{})[_0xcc6a('0x29')](function(){return _0x1a3b82;});}else{return _0x1a3b82;}})[_0xcc6a('0x48')](function(_0x2b5782){logger[_0xcc6a('0x58')](_0xcc6a('0x59'),_0x2b5782);throw _0x2b5782;});}return _0x1a3b82;})[_0xcc6a('0x29')](respondWithResult(_0xcfc540,0xc9))[_0xcc6a('0x48')](handleError(_0xcfc540,null));};exports[_0xcc6a('0x28')]=function(_0x68b823,_0x27b074){if(_0x68b823[_0xcc6a('0x50')]['id']){delete _0x68b823['body']['id'];}return db[_0xcc6a('0x31')]['find']({'where':{'id':_0x68b823[_0xcc6a('0x4a')]['id']}})[_0xcc6a('0x29')](handleEntityNotFound(_0x27b074,null))[_0xcc6a('0x29')](saveUpdates(_0x68b823['body'],null))[_0xcc6a('0x29')](respondWithResult(_0x27b074,null))['catch'](handleError(_0x27b074,null));};exports[_0xcc6a('0x2a')]=function(_0x5db3b5,_0x3c0b1c){return db[_0xcc6a('0x31')][_0xcc6a('0x4e')]({'where':{'id':_0x5db3b5[_0xcc6a('0x4a')]['id']}})[_0xcc6a('0x29')](handleEntityNotFound(_0x3c0b1c,null))[_0xcc6a('0x29')](removeEntity(_0x3c0b1c,null))[_0xcc6a('0x48')](handleError(_0x3c0b1c,null));};exports[_0xcc6a('0x5a')]=function(_0x506311,_0x14d3ff){var _0x56d512=0xa;var _0x3a6b7e=['join',_0xcc6a('0x5b'),_0xcc6a('0x5c'),_0xcc6a('0x5d')];var _0x586789={'SUM':_0xcc6a('0x5e'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xcc6a('0x5f'),'MIN':_0xcc6a('0x60'),'AVG':_0xcc6a('0x61'),'GROUP_CONCAT':_0xcc6a('0x62'),'GROUP_CONCAT ASC':_0xcc6a('0x63'),'GROUP_CONCAT DESC':_0xcc6a('0x64')};var _0x389e5f={'SEC_TO_TIME':_0xcc6a('0x65'),'DATE':_0xcc6a('0x66'),'HOUR':_0xcc6a('0x67'),'ROUND':_0xcc6a('0x68'),'UNIX_TIMESTAMP':_0xcc6a('0x69')};var _0x2cc561=function(_0x483aa4){return!_[_0xcc6a('0x6a')]([_0xcc6a('0x6b'),_0xcc6a('0x6c'),_0xcc6a('0x6d'),'IS\x20NOT\x20EMPTY'],_0x483aa4);};var _0x46d93b=function(_0x4ed702){if(!_0x4ed702||!_0x4ed702[_0xcc6a('0x6e')][_0xcc6a('0x4c')]){return'';}for(var _0x20a16b='(',_0x19a578=0x0;_0x19a578<_0x4ed702[_0xcc6a('0x6e')][_0xcc6a('0x4c')];_0x19a578+=0x1){_0x19a578>0x0&&(_0x20a16b+='\x20'+_0x4ed702[_0xcc6a('0x6f')]+'\x20');_0x20a16b+=_0x4ed702[_0xcc6a('0x6e')][_0x19a578]['group']?_0x46d93b(_0x4ed702['rules'][_0x19a578]['group']):_0x4ed702[_0xcc6a('0x6e')][_0x19a578][_0xcc6a('0x70')]+'\x20'+_0x4ed702[_0xcc6a('0x6e')][_0x19a578]['condition']+(_0x2cc561(_0x4ed702[_0xcc6a('0x6e')][_0x19a578][_0xcc6a('0x71')])?'\x20'+_0x4ed702[_0xcc6a('0x6e')][_0x19a578][_0xcc6a('0x72')]:'');}return _0x20a16b+')';};var _0x5e1c69={'where':{'id':_0x506311['params']['id']}},_0x481d25,_0xaec5e8,_0x41527b,_0x4403d3,_0x386a74;_0x5e1c69=_[_0xcc6a('0x41')]({},_0x5e1c69,_0x506311[_0xcc6a('0x4d')]);return db[_0xcc6a('0x31')][_0xcc6a('0x4e')](_0x5e1c69)[_0xcc6a('0x29')](function(_0x55d129){if(_0x55d129){_0x481d25=_0x55d129;return _0x55d129['getFields']();}return null;})[_0xcc6a('0x29')](function(_0xd1a27b){if(_0xd1a27b){if(!_0xd1a27b[_0xcc6a('0x4c')]){throw new db[(_0xcc6a('0x73'))]['ValidationErrorItem']('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0xaec5e8=_0xd1a27b;return db[_0xcc6a('0x74')][_0xcc6a('0x46')]({'raw':!![]});}return null;})[_0xcc6a('0x29')](function(_0x421d0b){if(_0x421d0b){_0x41527b=_['keyBy'](_0x421d0b,'id');var _0x4a8863;var _0x58e6b4=squel[_0xcc6a('0x75')]();_0x58e6b4[_0xcc6a('0x76')](_0x481d25[_0xcc6a('0x77')]);for(var _0x729b2=0x0;_0x729b2<_0xaec5e8['length'];_0x729b2+=0x1){_0x4a8863=_0xaec5e8[_0x729b2][_0xcc6a('0x78')]?_0x41527b[_0xaec5e8[_0x729b2][_0xcc6a('0x78')]]['metric']:_0xaec5e8[_0x729b2][_0xcc6a('0x70')];_0x4a8863=_0xaec5e8[_0x729b2]['function']?_[_0xcc6a('0x79')](_0x586789[_0xaec5e8[_0x729b2]['function']],'%s',_0x4a8863):_0x4a8863;_0x4a8863=_0xaec5e8[_0x729b2][_0xcc6a('0x7a')]?_[_0xcc6a('0x79')](_0x389e5f[_0xaec5e8[_0x729b2][_0xcc6a('0x7a')]],'%s',_0x4a8863):_0x4a8863;if(_0xaec5e8[_0x729b2]['groupBy']){_0x58e6b4[_0xcc6a('0x7b')](_0x4a8863);}_0xaec5e8[_0x729b2]['orderBy']&&_0x58e6b4[_0xcc6a('0x3d')](_0x4a8863,_0xaec5e8[_0x729b2]['orderBy']===_0xcc6a('0x7c')?![]:!![]);_0x58e6b4[_0xcc6a('0x70')](_0x4a8863,_0xaec5e8[_0x729b2][_0xcc6a('0x7d')]||_0x4a8863);}if(_0x481d25[_0xcc6a('0x7e')]){_0x481d25[_0xcc6a('0x7e')]=JSON[_0xcc6a('0x7f')](_0x481d25['joins']);for(var _0x18f5dc=0x0;_0x18f5dc<_0x481d25[_0xcc6a('0x7e')][_0xcc6a('0x4c')];_0x18f5dc+=0x1){if(_0x481d25[_0xcc6a('0x7e')][_0x18f5dc][_0xcc6a('0x34')]&&_['includes'](_0x3a6b7e,_0x481d25[_0xcc6a('0x7e')][_0x18f5dc][_0xcc6a('0x34')])&&_0x481d25['joins'][_0x18f5dc]['parentKey']&&_0x481d25[_0xcc6a('0x7e')][_0x18f5dc][_0xcc6a('0x80')]&&_0x481d25[_0xcc6a('0x7e')][_0x18f5dc][_0xcc6a('0x81')]){_0x58e6b4[_0x481d25[_0xcc6a('0x7e')][_0x18f5dc][_0xcc6a('0x34')]](_0x481d25['joins'][_0x18f5dc][_0xcc6a('0x80')],null,util[_0xcc6a('0x7a')](_0xcc6a('0x82'),_0x481d25[_0xcc6a('0x77')],_0x481d25[_0xcc6a('0x7e')][_0x18f5dc][_0xcc6a('0x83')],_0x481d25['joins'][_0x18f5dc]['foreignTable'],_0x481d25[_0xcc6a('0x7e')][_0x18f5dc][_0xcc6a('0x81')]));}}}if(_0x481d25[_0xcc6a('0x84')]){_0x481d25[_0xcc6a('0x84')]=JSON[_0xcc6a('0x7f')](_0x481d25[_0xcc6a('0x84')]);_0x58e6b4[_0xcc6a('0x3f')](_0x46d93b(_0x481d25['conditions'][_0xcc6a('0x7b')]));}_0x386a74=_0x58e6b4[_0xcc6a('0x85')]();_0x58e6b4[_0xcc6a('0x21')](_0x56d512);_0x58e6b4[_0xcc6a('0x1f')](0x0);logger[_0xcc6a('0x86')](_0xcc6a('0x87'),_0x58e6b4['toString']());return dbH[_0xcc6a('0x88')][_0xcc6a('0x37')](_0x58e6b4[_0xcc6a('0x89')](),{'type':dbH['sequelize'][_0xcc6a('0x8a')][_0xcc6a('0x8b')]});}})[_0xcc6a('0x29')](respondWithResult(_0x14d3ff,null))[_0xcc6a('0x48')](handleError(_0x14d3ff,null));};function runReport(_0x2a25df,_0x1f1ff7,_0x565bcd){var _0x45c45f=_0x1f1ff7[_0xcc6a('0x36')];var _0x58cd56=0xa;var _0x1848dd=[_0xcc6a('0x8c'),_0xcc6a('0x5b'),_0xcc6a('0x5c'),_0xcc6a('0x5d')];var _0x5abd5c={'SUM':_0xcc6a('0x5e'),'COUNT':_0xcc6a('0x8d'),'COUNT DISTINCT':_0xcc6a('0x8e'),'MAX':_0xcc6a('0x5f'),'MIN':_0xcc6a('0x60'),'AVG':_0xcc6a('0x61'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xcc6a('0x64')};var _0x5be65b={'SEC_TO_TIME':_0xcc6a('0x65'),'DATE':_0xcc6a('0x66'),'HOUR':_0xcc6a('0x67'),'ROUND':_0xcc6a('0x68'),'UNIX_TIMESTAMP':_0xcc6a('0x69')};var _0x2b5c15=function(_0x3207b2){return!_[_0xcc6a('0x6a')]([_0xcc6a('0x6b'),_0xcc6a('0x6c'),_0xcc6a('0x6d'),_0xcc6a('0x8f')],_0x3207b2);};var _0x58fdb3=function(_0xb4b2b4){if(!_0xb4b2b4||!_0xb4b2b4[_0xcc6a('0x6e')][_0xcc6a('0x4c')]){return'';}for(var _0x275e15='(',_0x53b419=0x0;_0x53b419<_0xb4b2b4[_0xcc6a('0x6e')]['length'];_0x53b419+=0x1){_0x53b419>0x0&&(_0x275e15+='\x20'+_0xb4b2b4[_0xcc6a('0x6f')]+'\x20');_0x275e15+=_0xb4b2b4[_0xcc6a('0x6e')][_0x53b419][_0xcc6a('0x7b')]?_0x58fdb3(_0xb4b2b4[_0xcc6a('0x6e')][_0x53b419][_0xcc6a('0x7b')]):_0xb4b2b4[_0xcc6a('0x6e')][_0x53b419][_0xcc6a('0x70')]+'\x20'+_0xb4b2b4['rules'][_0x53b419][_0xcc6a('0x71')]+(_0x2b5c15(_0xb4b2b4[_0xcc6a('0x6e')][_0x53b419][_0xcc6a('0x71')])?'\x20'+_0xb4b2b4[_0xcc6a('0x6e')][_0x53b419][_0xcc6a('0x72')]:'');}return _0x275e15+')';};var _0x4473ab={'where':{'id':_0x2a25df['id']}},_0x558e2f,_0x14a957,_0x350766,_0x589bff,_0x5661b5;_0x4473ab=_[_0xcc6a('0x41')]({},_0x4473ab,_0x565bcd);return db[_0xcc6a('0x31')][_0xcc6a('0x4e')](_0x4473ab)[_0xcc6a('0x29')](function(_0x2f0b79){if(_0x2f0b79){_0x558e2f=_0x2f0b79;return _0x2f0b79['getFields']();}return null;})[_0xcc6a('0x29')](function(_0x4a268b){if(_0x4a268b){if(!_0x4a268b[_0xcc6a('0x4c')]){throw new db[(_0xcc6a('0x73'))][(_0xcc6a('0x90'))](_0xcc6a('0x91'),0x193);}_0x14a957=_0x4a268b;return db[_0xcc6a('0x74')][_0xcc6a('0x46')]({'raw':!![]});}return null;})[_0xcc6a('0x29')](function(_0x1f4c4e){if(_0x1f4c4e){_0x350766=_['keyBy'](_0x1f4c4e,'id');var _0x312431;var _0x2a850c=squel[_0xcc6a('0x75')]();_0x2a850c['from'](_0x558e2f[_0xcc6a('0x77')]);for(var _0xd5b9f3=0x0;_0xd5b9f3<_0x14a957[_0xcc6a('0x4c')];_0xd5b9f3+=0x1){_0x312431=_0x14a957[_0xd5b9f3][_0xcc6a('0x78')]?_0x350766[_0x14a957[_0xd5b9f3][_0xcc6a('0x78')]][_0xcc6a('0x92')]:_0x14a957[_0xd5b9f3][_0xcc6a('0x70')];_0x312431=_0x14a957[_0xd5b9f3]['function']?_[_0xcc6a('0x79')](_0x5abd5c[_0x14a957[_0xd5b9f3][_0xcc6a('0x93')]],'%s',_0x312431):_0x312431;_0x312431=_0x14a957[_0xd5b9f3][_0xcc6a('0x7a')]?_[_0xcc6a('0x79')](_0x5be65b[_0x14a957[_0xd5b9f3][_0xcc6a('0x7a')]],'%s',_0x312431):_0x312431;if(_0x14a957[_0xd5b9f3][_0xcc6a('0x94')]){_0x2a850c[_0xcc6a('0x7b')](_0x312431);}_0x14a957[_0xd5b9f3][_0xcc6a('0x95')]&&_0x2a850c['order'](_0x312431,_0x14a957[_0xd5b9f3]['orderBy']===_0xcc6a('0x7c')?![]:!![]);_0x2a850c['field'](_0x312431,_0x14a957[_0xd5b9f3][_0xcc6a('0x7d')]||_0x312431);}if(_0x558e2f[_0xcc6a('0x7e')]){_0x558e2f[_0xcc6a('0x7e')]=JSON[_0xcc6a('0x7f')](_0x558e2f[_0xcc6a('0x7e')]);for(var _0x1f7ee5=0x0;_0x1f7ee5<_0x558e2f[_0xcc6a('0x7e')]['length'];_0x1f7ee5+=0x1){if(_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5]['type']&&_['includes'](_0x1848dd,_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5]['type'])&&_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5][_0xcc6a('0x83')]&&_0x558e2f['joins'][_0x1f7ee5]['foreignTable']&&_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5]['foreignKey']){_0x2a850c[_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5][_0xcc6a('0x34')]](_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5][_0xcc6a('0x80')],null,util[_0xcc6a('0x7a')](_0xcc6a('0x82'),_0x558e2f['table'],_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5][_0xcc6a('0x83')],_0x558e2f[_0xcc6a('0x7e')][_0x1f7ee5][_0xcc6a('0x80')],_0x558e2f['joins'][_0x1f7ee5][_0xcc6a('0x81')]));}}}if(_0x558e2f[_0xcc6a('0x84')]){_0x558e2f[_0xcc6a('0x84')]=JSON[_0xcc6a('0x7f')](_0x558e2f[_0xcc6a('0x84')]);_0x2a850c[_0xcc6a('0x3f')](_0x58fdb3(_0x558e2f[_0xcc6a('0x84')]['group']));}_0x5661b5=_0x2a850c[_0xcc6a('0x85')]();_0x2a850c[_0xcc6a('0x21')](_0x58cd56);_0x2a850c['offset'](0x0);return;}})[_0xcc6a('0x29')](function(){if(_0x1f1ff7[_0xcc6a('0x96')]===_0xcc6a('0x97')){return null;}var _0x2297ea=_[_0xcc6a('0x41')](_0x1f1ff7,{'name':_0x1f1ff7[_0xcc6a('0x98')]||_0x1f1ff7[_0xcc6a('0x36')]||_0x558e2f[_0xcc6a('0x36')],'basename':_0x45c45f,'savename':util[_0xcc6a('0x7a')](_0xcc6a('0x99'),_0x1f1ff7[_0xcc6a('0x36')]||_0x558e2f[_0xcc6a('0x36')],require(_0xcc6a('0x9a'))[_0xcc6a('0x9b')](0x4),_0x1f1ff7['output']||'csv'),'reportId':_0x558e2f['id'],'reportType':_0xcc6a('0x9c')});return db[_0xcc6a('0x9d')]['create'](_0x2297ea,{'raw':!![]});})[_0xcc6a('0x29')](function(_0x1e74a4){if(_0x558e2f[_0xcc6a('0x77')]==='cdr'){_0x5661b5[_0xcc6a('0x3f')](_0x558e2f['table']+_0xcc6a('0x9e'),_0x1f1ff7[_0xcc6a('0x9f')],_0x1f1ff7['endDate']);}else{_0x5661b5[_0xcc6a('0x3f')](_0x558e2f['table']+_0xcc6a('0xa0'),_0x1f1ff7[_0xcc6a('0x9f')],_0x1f1ff7[_0xcc6a('0xa1')]);}if(_0x1e74a4){logger[_0xcc6a('0xa2')](_0xcc6a('0xa3'),_0x5661b5[_0xcc6a('0x89')]());require('child_process')['fork'](path[_0xcc6a('0x8c')](__dirname,_0xcc6a('0xa4'),_0x1e74a4[_0xcc6a('0x96')]),[_0x1e74a4['id'],_0x5661b5['toString'](),path[_0xcc6a('0x8c')](__dirname,_0xcc6a('0xa5'),_0x1e74a4[_0xcc6a('0xa6')]),_0x45c45f]);return _0x1e74a4;}else{var _0x3b7b43=squel['select']();_0x3b7b43[_0xcc6a('0x76')]('('+_0x5661b5[_0xcc6a('0x89')]()+')',_0xcc6a('0xa7'));_0x3b7b43['field'](_0xcc6a('0xa8'),'count');_0x5661b5[_0xcc6a('0x21')](_0x1f1ff7[_0xcc6a('0x21')]||_0x58cd56);_0x5661b5['offset'](_0x1f1ff7[_0xcc6a('0x1f')]||0x0);return dbH[_0xcc6a('0x88')][_0xcc6a('0x37')](_0x3b7b43[_0xcc6a('0x89')](),{'type':dbH[_0xcc6a('0x88')][_0xcc6a('0x8a')][_0xcc6a('0x8b')]})[_0xcc6a('0x29')](function(_0x25ba57){if(!_0x25ba57[_0xcc6a('0x4c')]){_0x589bff=0x0;}else{_0x589bff=_0x25ba57[0x0][_0xcc6a('0x22')]||0x0;}return dbH['sequelize']['query'](_0x5661b5[_0xcc6a('0x89')](),{'type':dbH['sequelize'][_0xcc6a('0x8a')]['SELECT']});})['then'](function(_0x32ced0){return{'rows':_0x32ced0||[],'count':_0x589bff};});}});}exports[_0xcc6a('0xa9')]=function(_0xc638ae,_0x3367e8){return runReport(_0xc638ae['params'],_0xc638ae[_0xcc6a('0x37')],_0xc638ae['options'])['then'](respondWithResult(_0x3367e8,null))[_0xcc6a('0x48')](handleError(_0x3367e8,null));};exports[_0xcc6a('0xaa')]=runReport;exports[_0xcc6a('0x37')]=function(_0x38d805,_0x3f5f97){var _0x399eb6=0xa;var _0x2ae391=['join',_0xcc6a('0x5b'),_0xcc6a('0x5c'),_0xcc6a('0x5d')];var _0x50b948={'SUM':_0xcc6a('0x5e'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0xcc6a('0x8e'),'MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':_0xcc6a('0x61'),'GROUP_CONCAT':_0xcc6a('0x62'),'GROUP_CONCAT ASC':_0xcc6a('0x63'),'GROUP_CONCAT DESC':_0xcc6a('0x64')};var _0x1d2ae0={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':_0xcc6a('0x68'),'UNIX_TIMESTAMP':_0xcc6a('0x69')};var _0x41d17b=function(_0x1827e6){return!_[_0xcc6a('0x6a')]([_0xcc6a('0x6b'),'IS\x20NOT\x20NULL',_0xcc6a('0x6d'),'IS\x20NOT\x20EMPTY'],_0x1827e6);};var _0xa70fa=function(_0x33ec76){if(!_0x33ec76||!_0x33ec76[_0xcc6a('0x6e')][_0xcc6a('0x4c')]){return'';}for(var _0x30162c='(',_0x48746a=0x0;_0x48746a<_0x33ec76['rules'][_0xcc6a('0x4c')];_0x48746a+=0x1){_0x48746a>0x0&&(_0x30162c+='\x20'+_0x33ec76[_0xcc6a('0x6f')]+'\x20');_0x30162c+=_0x33ec76['rules'][_0x48746a][_0xcc6a('0x7b')]?_0xa70fa(_0x33ec76[_0xcc6a('0x6e')][_0x48746a][_0xcc6a('0x7b')]):_0x33ec76[_0xcc6a('0x6e')][_0x48746a][_0xcc6a('0x70')]+'\x20'+_0x33ec76[_0xcc6a('0x6e')][_0x48746a]['condition']+(_0x41d17b(_0x33ec76[_0xcc6a('0x6e')][_0x48746a][_0xcc6a('0x71')])?'\x20'+_0x33ec76[_0xcc6a('0x6e')][_0x48746a]['value']:'');}return _0x30162c+')';};var _0x54f0e4={'where':{'id':_0x38d805[_0xcc6a('0x4a')]['id']}},_0x559f4f,_0x545b15,_0x17a4e1,_0x5a7da7,_0x434c8b;_0x54f0e4=_['merge']({},_0x54f0e4,_0x38d805[_0xcc6a('0x4d')]);return db['AnalyticDefaultReport'][_0xcc6a('0x4e')](_0x54f0e4)[_0xcc6a('0x29')](function(_0xe9231f){if(_0xe9231f){_0x559f4f=_0xe9231f;return _0xe9231f[_0xcc6a('0xab')]();}return null;})[_0xcc6a('0x29')](function(_0x197961){if(_0x197961){if(!_0x197961[_0xcc6a('0x4c')]){throw new db[(_0xcc6a('0x73'))][(_0xcc6a('0x90'))](_0xcc6a('0x91'),0x193);}_0x545b15=_0x197961;return db[_0xcc6a('0x74')][_0xcc6a('0x46')]({'raw':!![]});}return null;})[_0xcc6a('0x29')](function(_0x171a2a){if(_0x171a2a){_0x17a4e1=_[_0xcc6a('0xac')](_0x171a2a,'id');var _0x13860b;var _0x3b52f7=squel[_0xcc6a('0x75')]();_0x3b52f7[_0xcc6a('0x76')](_0x559f4f[_0xcc6a('0x77')]);for(var _0x319f4a=0x0;_0x319f4a<_0x545b15[_0xcc6a('0x4c')];_0x319f4a+=0x1){_0x13860b=_0x545b15[_0x319f4a]['MetricId']?_0x17a4e1[_0x545b15[_0x319f4a][_0xcc6a('0x78')]][_0xcc6a('0x92')]:_0x545b15[_0x319f4a][_0xcc6a('0x70')];_0x13860b=_0x545b15[_0x319f4a]['function']?_[_0xcc6a('0x79')](_0x50b948[_0x545b15[_0x319f4a][_0xcc6a('0x93')]],'%s',_0x13860b):_0x13860b;_0x13860b=_0x545b15[_0x319f4a]['format']?_[_0xcc6a('0x79')](_0x1d2ae0[_0x545b15[_0x319f4a][_0xcc6a('0x7a')]],'%s',_0x13860b):_0x13860b;if(_0x545b15[_0x319f4a]['groupBy']){_0x3b52f7[_0xcc6a('0x7b')](_0x13860b);}_0x545b15[_0x319f4a][_0xcc6a('0x95')]&&_0x3b52f7[_0xcc6a('0x3d')](_0x13860b,_0x545b15[_0x319f4a][_0xcc6a('0x95')]===_0xcc6a('0x7c')?![]:!![]);_0x3b52f7[_0xcc6a('0x70')](_0x13860b,_0x545b15[_0x319f4a]['alias']||_0x13860b);}if(_0x559f4f['joins']){_0x559f4f[_0xcc6a('0x7e')]=JSON[_0xcc6a('0x7f')](_0x559f4f['joins']);for(var _0x154885=0x0;_0x154885<_0x559f4f['joins'][_0xcc6a('0x4c')];_0x154885+=0x1){if(_0x559f4f['joins'][_0x154885][_0xcc6a('0x34')]&&_[_0xcc6a('0x6a')](_0x2ae391,_0x559f4f[_0xcc6a('0x7e')][_0x154885]['type'])&&_0x559f4f[_0xcc6a('0x7e')][_0x154885][_0xcc6a('0x83')]&&_0x559f4f[_0xcc6a('0x7e')][_0x154885]['foreignTable']&&_0x559f4f['joins'][_0x154885]['foreignKey']){_0x3b52f7[_0x559f4f[_0xcc6a('0x7e')][_0x154885][_0xcc6a('0x34')]](_0x559f4f[_0xcc6a('0x7e')][_0x154885][_0xcc6a('0x80')],null,util[_0xcc6a('0x7a')](_0xcc6a('0x82'),_0x559f4f[_0xcc6a('0x77')],_0x559f4f[_0xcc6a('0x7e')][_0x154885][_0xcc6a('0x83')],_0x559f4f[_0xcc6a('0x7e')][_0x154885][_0xcc6a('0x80')],_0x559f4f[_0xcc6a('0x7e')][_0x154885]['foreignKey']));}}}if(_0x559f4f[_0xcc6a('0x84')]){_0x559f4f[_0xcc6a('0x84')]=JSON[_0xcc6a('0x7f')](_0x559f4f['conditions']);_0x3b52f7[_0xcc6a('0x3f')](_0xa70fa(_0x559f4f[_0xcc6a('0x84')][_0xcc6a('0x7b')]));}_0x434c8b=_0x3b52f7['clone']();_0x3b52f7[_0xcc6a('0x21')](_0x399eb6);_0x3b52f7[_0xcc6a('0x1f')](0x0);logger[_0xcc6a('0x86')](_0xcc6a('0x87'),_0x3b52f7['toString']());return dbH[_0xcc6a('0x88')]['query'](_0x3b52f7['toString'](),{'type':dbH['sequelize'][_0xcc6a('0x8a')]['SELECT']});}})['then'](function(){return{'sql':_0x434c8b[_0xcc6a('0x89')]()};})[_0xcc6a('0x29')](respondWithResult(_0x3f5f97,null))[_0xcc6a('0x48')](handleError(_0x3f5f97,null));};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
index ab9c5e3..2a20bd8 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.model.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4db7=['./analyticDefaultReport.attributes','define','AnalyticDefaultReport','analytics_default_reports','lodash','util','../../config/logger','api','path','rimraf','../../config/environment'];(function(_0x1b91ea,_0x2be1bb){var _0x13625f=function(_0x5d1f75){while(--_0x5d1f75){_0x1b91ea['push'](_0x1b91ea['shift']());}};_0x13625f(++_0x2be1bb);}(_0x4db7,0x12d));var _0x74db=function(_0x1f9f37,_0x18776e){_0x1f9f37=_0x1f9f37-0x0;var _0x21c080=_0x4db7[_0x1f9f37];return _0x21c080;};'use strict';var _=require(_0x74db('0x0'));var util=require(_0x74db('0x1'));var logger=require(_0x74db('0x2'))(_0x74db('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x74db('0x4'));var rimraf=require(_0x74db('0x5'));var config=require(_0x74db('0x6'));var attributes=require(_0x74db('0x7'));module['exports']=function(_0x48d912,_0x56563e){return _0x48d912[_0x74db('0x8')](_0x74db('0x9'),attributes,{'tableName':_0x74db('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf68c=['util','api','moment','request-promise','path','rimraf','../../config/environment','./analyticDefaultReport.attributes','AnalyticDefaultReport','analytics_default_reports','lodash'];(function(_0x50a8ca,_0x43aa15){var _0x2ef4d4=function(_0x359a8a){while(--_0x359a8a){_0x50a8ca['push'](_0x50a8ca['shift']());}};_0x2ef4d4(++_0x43aa15);}(_0xf68c,0x107));var _0xcf68=function(_0x67a262,_0x115e6d){_0x67a262=_0x67a262-0x0;var _0x5835ff=_0xf68c[_0x67a262];return _0x5835ff;};'use strict';var _=require(_0xcf68('0x0'));var util=require(_0xcf68('0x1'));var logger=require('../../config/logger')(_0xcf68('0x2'));var moment=require(_0xcf68('0x3'));var BPromise=require('bluebird');var rp=require(_0xcf68('0x4'));var fs=require('fs');var path=require(_0xcf68('0x5'));var rimraf=require(_0xcf68('0x6'));var config=require(_0xcf68('0x7'));var attributes=require(_0xcf68('0x8'));module['exports']=function(_0x444052,_0x12914b){return _0x444052['define'](_0xcf68('0x9'),attributes,{'tableName':_0xcf68('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
index fbf484d..fe87fbc 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8ce2=['message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','then','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error','code','AnalyticDefaultReport,\x20%s,\x20%s'];(function(_0x30c901,_0x119390){var _0x4d50fc=function(_0x3b0b58){while(--_0x3b0b58){_0x30c901['push'](_0x30c901['shift']());}};_0x4d50fc(++_0x119390);}(_0x8ce2,0x1a7));var _0x28ce=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x8ce2[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x28ce('0x0'));var util=require(_0x28ce('0x1'));var moment=require(_0x28ce('0x2'));var BPromise=require('bluebird');var rs=require(_0x28ce('0x3'));var fs=require('fs');var Redis=require(_0x28ce('0x4'));var db=require(_0x28ce('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x28ce('0x6'))(_0x28ce('0x7'));var config=require('../../config/environment');var jayson=require(_0x28ce('0x8'));var client=jayson['client'][_0x28ce('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xf10467,_0x32355e,_0x2904ce){return new BPromise(function(_0x155b02,_0xce727c){return client['request'](_0xf10467,_0x2904ce)[_0x28ce('0xa')](function(_0x431e0f){logger['info']('AnalyticDefaultReport,\x20%s,\x20%s',_0x32355e,_0x28ce('0xb'));logger[_0x28ce('0xc')](_0x28ce('0xd'),_0x32355e,_0x28ce('0xb'),JSON[_0x28ce('0xe')](_0x431e0f));if(_0x431e0f[_0x28ce('0xf')]){if(_0x431e0f['error'][_0x28ce('0x10')]===0x1f4){logger[_0x28ce('0xf')](_0x28ce('0x11'),_0x32355e,_0x431e0f[_0x28ce('0xf')][_0x28ce('0x12')]);return _0xce727c(_0x431e0f['error']['message']);}logger[_0x28ce('0xf')](_0x28ce('0x11'),_0x32355e,_0x431e0f[_0x28ce('0xf')][_0x28ce('0x12')]);return _0x155b02(_0x431e0f[_0x28ce('0xf')]['message']);}else{logger['info'](_0x28ce('0x11'),_0x32355e,_0x28ce('0xb'));_0x155b02(_0x431e0f[_0x28ce('0x13')]['message']);}})[_0x28ce('0x14')](function(_0x4acb0a){logger[_0x28ce('0xf')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x32355e,_0x4acb0a);_0xce727c(_0x4acb0a);});});}
\ No newline at end of file
+var _0x2610=['debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error','code','AnalyticDefaultReport,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','then','info','request\x20sent'];(function(_0x104a84,_0x285970){var _0x4973ff=function(_0x5064e7){while(--_0x5064e7){_0x104a84['push'](_0x104a84['shift']());}};_0x4973ff(++_0x285970);}(_0x2610,0x106));var _0x0261=function(_0x4f6faf,_0x148286){_0x4f6faf=_0x4f6faf-0x0;var _0xb9736b=_0x2610[_0x4f6faf];return _0xb9736b;};'use strict';var _=require(_0x0261('0x0'));var util=require('util');var moment=require(_0x0261('0x1'));var BPromise=require(_0x0261('0x2'));var rs=require(_0x0261('0x3'));var fs=require('fs');var Redis=require(_0x0261('0x4'));var db=require(_0x0261('0x5'))['db'];var utils=require(_0x0261('0x6'));var logger=require(_0x0261('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x0261('0x8'));var client=jayson[_0x0261('0x9')][_0x0261('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5454fa,_0x568fb8,_0x46948c){return new BPromise(function(_0x6b174c,_0x1af16a){return client['request'](_0x5454fa,_0x46948c)[_0x0261('0xb')](function(_0x46ce7e){logger[_0x0261('0xc')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x568fb8,_0x0261('0xd'));logger[_0x0261('0xe')](_0x0261('0xf'),_0x568fb8,_0x0261('0xd'),JSON[_0x0261('0x10')](_0x46ce7e));if(_0x46ce7e['error']){if(_0x46ce7e[_0x0261('0x11')][_0x0261('0x12')]===0x1f4){logger[_0x0261('0x11')](_0x0261('0x13'),_0x568fb8,_0x46ce7e[_0x0261('0x11')][_0x0261('0x14')]);return _0x1af16a(_0x46ce7e[_0x0261('0x11')][_0x0261('0x14')]);}logger['error'](_0x0261('0x13'),_0x568fb8,_0x46ce7e[_0x0261('0x11')][_0x0261('0x14')]);return _0x6b174c(_0x46ce7e[_0x0261('0x11')]['message']);}else{logger[_0x0261('0xc')](_0x0261('0x13'),_0x568fb8,_0x0261('0xd'));_0x6b174c(_0x46ce7e[_0x0261('0x15')][_0x0261('0x14')]);}})[_0x0261('0x16')](function(_0x4d9b02){logger[_0x0261('0x11')](_0x0261('0x13'),_0x568fb8,_0x4d9b02);_0x1af16a(_0x4d9b02);});});}
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js
index e782483..9e12bf9 100644
--- a/server/api/analyticDefaultReport/index.js
+++ b/server/api/analyticDefaultReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x857d=['express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','index','show','preview','/:id/run','isAuthenticated','run','/:id/query','query','create','/:id','delete','destroy','exports','multer','util','connect-timeout'];(function(_0x3daa8c,_0x388a87){var _0x2b1bd7=function(_0xdb2963){while(--_0xdb2963){_0x3daa8c['push'](_0x3daa8c['shift']());}};_0x2b1bd7(++_0x388a87);}(_0x857d,0x15d));var _0xd857=function(_0x5b09b1,_0x3887e9){_0x5b09b1=_0x5b09b1-0x0;var _0xe9e254=_0x857d[_0x5b09b1];return _0xe9e254;};'use strict';var multer=require(_0xd857('0x0'));var util=require(_0xd857('0x1'));var path=require('path');var timeout=require(_0xd857('0x2'));var express=require(_0xd857('0x3'));var router=express[_0xd857('0x4')]();var fs_extra=require(_0xd857('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xd857('0x6'));var config=require(_0xd857('0x7'));var controller=require('./analyticDefaultReport.controller');router[_0xd857('0x8')]('/',auth['isAuthenticated'](),controller[_0xd857('0x9')]);router[_0xd857('0x8')]('/:id',auth['isAuthenticated'](),controller[_0xd857('0xa')]);router[_0xd857('0x8')]('/:id/preview',auth['isAuthenticated'](),controller[_0xd857('0xb')]);router[_0xd857('0x8')](_0xd857('0xc'),auth[_0xd857('0xd')](),controller[_0xd857('0xe')]);router[_0xd857('0x8')](_0xd857('0xf'),auth[_0xd857('0xd')](),controller[_0xd857('0x10')]);router['post']('/',auth[_0xd857('0xd')](),controller[_0xd857('0x11')]);router['put'](_0xd857('0x12'),auth[_0xd857('0xd')](),controller['update']);router[_0xd857('0x13')](_0xd857('0x12'),auth['isAuthenticated'](),controller[_0xd857('0x14')]);module[_0xd857('0x15')]=router;
\ No newline at end of file
+var _0x84d6=['preview','/:id/run','run','/:id/query','create','put','delete','/:id','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','get','isAuthenticated','index','show','/:id/preview'];(function(_0x433d00,_0x118c3b){var _0x2de080=function(_0x34c71d){while(--_0x34c71d){_0x433d00['push'](_0x433d00['shift']());}};_0x2de080(++_0x118c3b);}(_0x84d6,0x180));var _0x684d=function(_0x16115d,_0x58f185){_0x16115d=_0x16115d-0x0;var _0x10d5da=_0x84d6[_0x16115d];return _0x10d5da;};'use strict';var multer=require(_0x684d('0x0'));var util=require(_0x684d('0x1'));var path=require(_0x684d('0x2'));var timeout=require(_0x684d('0x3'));var express=require(_0x684d('0x4'));var router=express[_0x684d('0x5')]();var fs_extra=require(_0x684d('0x6'));var auth=require(_0x684d('0x7'));var interaction=require(_0x684d('0x8'));var config=require(_0x684d('0x9'));var controller=require(_0x684d('0xa'));router[_0x684d('0xb')]('/',auth[_0x684d('0xc')](),controller[_0x684d('0xd')]);router['get']('/:id',auth[_0x684d('0xc')](),controller[_0x684d('0xe')]);router[_0x684d('0xb')](_0x684d('0xf'),auth[_0x684d('0xc')](),controller[_0x684d('0x10')]);router['get'](_0x684d('0x11'),auth[_0x684d('0xc')](),controller[_0x684d('0x12')]);router[_0x684d('0xb')](_0x684d('0x13'),auth[_0x684d('0xc')](),controller['query']);router['post']('/',auth[_0x684d('0xc')](),controller[_0x684d('0x14')]);router[_0x684d('0x15')]('/:id',auth[_0x684d('0xc')](),controller['update']);router[_0x684d('0x16')](_0x684d('0x17'),auth[_0x684d('0xc')](),controller[_0x684d('0x18')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
index a5ce30f..b7a909b 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3527=['moment','exports','STRING','ENUM','csv','pdf','xlsx','DATE','manual','scheduled','INTEGER','UNSIGNED'];(function(_0x259d17,_0x220710){var _0x407535=function(_0x49bc38){while(--_0x49bc38){_0x259d17['push'](_0x259d17['shift']());}};_0x407535(++_0x220710);}(_0x3527,0x12c));var _0x7352=function(_0x79b649,_0x2115b3){_0x79b649=_0x79b649-0x0;var _0x1af9b1=_0x3527[_0x79b649];return _0x1af9b1;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x7352('0x0'));module[_0x7352('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0x7352('0x2')],'allowNull':![]},'output':{'type':Sequelize[_0x7352('0x3')](_0x7352('0x4'),_0x7352('0x5'),_0x7352('0x6')),'allowNull':![],'defaultValue':_0x7352('0x4')},'savename':{'type':Sequelize['STRING'],'allowNull':![]},'startDate':{'type':Sequelize[_0x7352('0x7')]},'endDate':{'type':Sequelize[_0x7352('0x7')]},'status':{'type':Sequelize[_0x7352('0x2')],'defaultValue':'Loading'},'type':{'type':Sequelize[_0x7352('0x3')](_0x7352('0x8'),_0x7352('0x9')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0x7352('0xa')](0xb)[_0x7352('0xb')]},'reportType':{'type':Sequelize[_0x7352('0x2')]}};
\ No newline at end of file
+var _0x7dbe=['scheduled','INTEGER','UNSIGNED','sequelize','moment','exports','STRING','ENUM','csv','pdf','xlsx','DATE','Loading','manual'];(function(_0x135b35,_0x47d562){var _0x59d690=function(_0x4f7f35){while(--_0x4f7f35){_0x135b35['push'](_0x135b35['shift']());}};_0x59d690(++_0x47d562);}(_0x7dbe,0xc7));var _0xe7db=function(_0x32d97c,_0xd5f165){_0x32d97c=_0x32d97c-0x0;var _0x35e602=_0x7dbe[_0x32d97c];return _0x35e602;};'use strict';var Sequelize=require(_0xe7db('0x0'));var moment=require(_0xe7db('0x1'));module[_0xe7db('0x2')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0xe7db('0x3')],'allowNull':![]},'output':{'type':Sequelize[_0xe7db('0x4')](_0xe7db('0x5'),_0xe7db('0x6'),_0xe7db('0x7')),'allowNull':![],'defaultValue':'csv'},'savename':{'type':Sequelize[_0xe7db('0x3')],'allowNull':![]},'startDate':{'type':Sequelize[_0xe7db('0x8')]},'endDate':{'type':Sequelize[_0xe7db('0x8')]},'status':{'type':Sequelize[_0xe7db('0x3')],'defaultValue':_0xe7db('0x9')},'type':{'type':Sequelize[_0xe7db('0x4')](_0xe7db('0xa'),_0xe7db('0xb')),'allowNull':![],'defaultValue':_0xe7db('0xa')},'reportId':{'type':Sequelize[_0xe7db('0xc')](0xb)[_0xe7db('0xd')]},'reportType':{'type':Sequelize[_0xe7db('0x3')]}};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
index f091783..96567c0 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcd59=['findAll','show','params','options','find','create','body','role','user','get','ExtractedReports','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','catch','download','output','join','server/files/reports','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','root','savename','format','%s.%s','toLowerCase','rimraf','zip-dir','moment','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','UserProfileResource','error','stack','name','send','index','map','AnalyticExtractedReport','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','include'];(function(_0xea8947,_0x1b573d){var _0x2455e9=function(_0x18771e){while(--_0x18771e){_0xea8947['push'](_0xea8947['shift']());}};_0x2455e9(++_0x1b573d);}(_0xcd59,0x7b));var _0x9cd5=function(_0x12b830,_0xd66540){_0x12b830=_0x12b830-0x0;var _0x261dc4=_0xcd59[_0x12b830];return _0x261dc4;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9cd5('0x0'));var zipdir=require(_0x9cd5('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x9cd5('0x2'));var BPromise=require(_0x9cd5('0x3'));var Mustache=require(_0x9cd5('0x4'));var util=require('util');var path=require(_0x9cd5('0x5'));var sox=require(_0x9cd5('0x6'));var csv=require(_0x9cd5('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9cd5('0x8'));var _=require(_0x9cd5('0x9'));var squel=require(_0x9cd5('0xa'));var crypto=require(_0x9cd5('0xb'));var jsforce=require(_0x9cd5('0xc'));var deskjs=require(_0x9cd5('0xd'));var toCsv=require(_0x9cd5('0x7'));var querystring=require(_0x9cd5('0xe'));var Papa=require(_0x9cd5('0xf'));var Redis=require(_0x9cd5('0x10'));var authService=require(_0x9cd5('0x11'));var qs=require(_0x9cd5('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9cd5('0x13'));var logger=require(_0x9cd5('0x14'))(_0x9cd5('0x15'));var utils=require(_0x9cd5('0x16'));var config=require(_0x9cd5('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x9cd5('0x18'))['db'];function respondWithStatusCode(_0x3e0f30,_0x5378ef){_0x5378ef=_0x5378ef||0xcc;return function(_0x259472){if(_0x259472){return _0x3e0f30[_0x9cd5('0x19')](_0x5378ef);}return _0x3e0f30['status'](_0x5378ef)[_0x9cd5('0x1a')]();};}function respondWithResult(_0x286f57,_0x35a102){_0x35a102=_0x35a102||0xc8;return function(_0x4a25d2){if(_0x4a25d2){return _0x286f57[_0x9cd5('0x1b')](_0x35a102)[_0x9cd5('0x1c')](_0x4a25d2);}};}function respondWithFilteredResult(_0x4b7976,_0x5c0da3){return function(_0x182bb5){if(_0x182bb5){var _0x372ecc=typeof _0x5c0da3[_0x9cd5('0x1d')]===_0x9cd5('0x1e')&&typeof _0x5c0da3[_0x9cd5('0x1f')]===_0x9cd5('0x1e');var _0x4efc10=_0x182bb5['count'];var _0x3f458f=_0x372ecc?0x0:_0x5c0da3[_0x9cd5('0x1d')];var _0x5dae19=_0x372ecc?_0x182bb5[_0x9cd5('0x20')]:_0x5c0da3[_0x9cd5('0x1d')]+_0x5c0da3[_0x9cd5('0x1f')];var _0x24bc7a;if(_0x5dae19>=_0x4efc10){_0x5dae19=_0x4efc10;_0x24bc7a=0xc8;}else{_0x24bc7a=0xce;}_0x4b7976[_0x9cd5('0x1b')](_0x24bc7a);return _0x4b7976[_0x9cd5('0x21')](_0x9cd5('0x22'),_0x3f458f+'-'+_0x5dae19+'/'+_0x4efc10)[_0x9cd5('0x1c')](_0x182bb5);}return null;};}function patchUpdates(_0x4937dc){return function(_0x2681f8){try{jsonpatch[_0x9cd5('0x23')](_0x2681f8,_0x4937dc,!![]);}catch(_0x47e229){return BPromise['reject'](_0x47e229);}return _0x2681f8[_0x9cd5('0x24')]();};}function saveUpdates(_0x2511f7,_0xfbaa19){return function(_0x3d0be0){if(_0x3d0be0){return _0x3d0be0[_0x9cd5('0x25')](_0x2511f7)[_0x9cd5('0x26')](function(_0x28ed21){return _0x28ed21;});}return null;};}function removeEntity(_0x5c125f,_0x2ca470){return function(_0x4e1d0f){if(_0x4e1d0f){return _0x4e1d0f[_0x9cd5('0x27')]()[_0x9cd5('0x26')](function(){var _0x3e1bf7=_0x4e1d0f['get']({'plain':!![]});var _0x468a64='ExtractedReports';return db[_0x9cd5('0x28')][_0x9cd5('0x27')]({'where':{'type':_0x468a64,'resourceId':_0x3e1bf7['id']}})[_0x9cd5('0x26')](function(){return _0x4e1d0f;});})[_0x9cd5('0x26')](function(){_0x5c125f[_0x9cd5('0x1b')](0xcc)[_0x9cd5('0x1a')]();});}};}function handleEntityNotFound(_0x2ad283,_0xfcdce4){return function(_0x4ff0f1){if(!_0x4ff0f1){_0x2ad283[_0x9cd5('0x19')](0x194);}return _0x4ff0f1;};}function handleError(_0x4b3bbc,_0xb1a923){_0xb1a923=_0xb1a923||0x1f4;return function(_0x44bb13){logger[_0x9cd5('0x29')](_0x44bb13[_0x9cd5('0x2a')]);if(_0x44bb13[_0x9cd5('0x2b')]){delete _0x44bb13['name'];}_0x4b3bbc[_0x9cd5('0x1b')](_0xb1a923)[_0x9cd5('0x2c')](_0x44bb13);};}exports[_0x9cd5('0x2d')]=function(_0x4b043e,_0x12c76b){var _0x5d4402={},_0x305ffe={},_0x2ed04f={'count':0x0,'rows':[]};var _0x520275=_[_0x9cd5('0x2e')](db[_0x9cd5('0x2f')][_0x9cd5('0x30')],function(_0x4d9387){return{'name':_0x4d9387[_0x9cd5('0x31')],'type':_0x4d9387[_0x9cd5('0x32')]['key']};});_0x305ffe[_0x9cd5('0x33')]=_['map'](_0x520275,_0x9cd5('0x2b'));_0x305ffe[_0x9cd5('0x34')]=_[_0x9cd5('0x35')](_0x4b043e['query']);_0x305ffe[_0x9cd5('0x36')]=_[_0x9cd5('0x37')](_0x305ffe['model'],_0x305ffe[_0x9cd5('0x34')]);_0x5d4402[_0x9cd5('0x38')]=_[_0x9cd5('0x37')](_0x305ffe[_0x9cd5('0x33')],qs[_0x9cd5('0x39')](_0x4b043e[_0x9cd5('0x34')][_0x9cd5('0x39')]));_0x5d4402['attributes']=_0x5d4402['attributes'][_0x9cd5('0x3a')]?_0x5d4402[_0x9cd5('0x38')]:_0x305ffe[_0x9cd5('0x33')];if(!_0x4b043e[_0x9cd5('0x34')]['hasOwnProperty'](_0x9cd5('0x3b'))){_0x5d4402[_0x9cd5('0x1f')]=qs[_0x9cd5('0x1f')](_0x4b043e[_0x9cd5('0x34')][_0x9cd5('0x1f')]);_0x5d4402[_0x9cd5('0x1d')]=qs[_0x9cd5('0x1d')](_0x4b043e[_0x9cd5('0x34')][_0x9cd5('0x1d')]);}_0x5d4402[_0x9cd5('0x3c')]=qs[_0x9cd5('0x3d')](_0x4b043e[_0x9cd5('0x34')][_0x9cd5('0x3d')]);_0x5d4402['where']=qs['filters'](_[_0x9cd5('0x3e')](_0x4b043e[_0x9cd5('0x34')],_0x305ffe[_0x9cd5('0x36')]),_0x520275);if(_0x4b043e[_0x9cd5('0x34')][_0x9cd5('0x3f')]){_0x5d4402[_0x9cd5('0x40')]=_[_0x9cd5('0x41')](_0x5d4402['where'],{'$or':_[_0x9cd5('0x2e')](_0x520275,function(_0x362c73){if(_0x362c73[_0x9cd5('0x32')]!==_0x9cd5('0x42')){var _0x2df700={};_0x2df700[_0x362c73[_0x9cd5('0x2b')]]={'$like':'%'+_0x4b043e[_0x9cd5('0x34')][_0x9cd5('0x3f')]+'%'};return _0x2df700;}})});}_0x5d4402=_[_0x9cd5('0x41')]({},_0x5d4402,_0x4b043e['options']);var _0x179e27={'where':_0x5d4402['where']};return db['AnalyticExtractedReport'][_0x9cd5('0x20')](_0x179e27)['then'](function(_0x1f3e91){_0x2ed04f[_0x9cd5('0x20')]=_0x1f3e91;if(_0x4b043e[_0x9cd5('0x34')][_0x9cd5('0x43')]){_0x5d4402[_0x9cd5('0x44')]=[{'all':!![]}];}return db[_0x9cd5('0x2f')][_0x9cd5('0x45')](_0x5d4402);})['then'](function(_0x280093){_0x2ed04f['rows']=_0x280093;return _0x2ed04f;})[_0x9cd5('0x26')](respondWithFilteredResult(_0x12c76b,_0x5d4402))['catch'](handleError(_0x12c76b,null));};exports[_0x9cd5('0x46')]=function(_0x29a960,_0x1c00bb){var _0x589aaf={'raw':!![],'where':{'id':_0x29a960[_0x9cd5('0x47')]['id']}},_0x1d2480={};_0x1d2480['model']=_[_0x9cd5('0x35')](db['AnalyticExtractedReport'][_0x9cd5('0x30')]);_0x1d2480[_0x9cd5('0x34')]=_[_0x9cd5('0x35')](_0x29a960[_0x9cd5('0x34')]);_0x1d2480[_0x9cd5('0x36')]=_[_0x9cd5('0x37')](_0x1d2480[_0x9cd5('0x33')],_0x1d2480['query']);_0x589aaf[_0x9cd5('0x38')]=_[_0x9cd5('0x37')](_0x1d2480[_0x9cd5('0x33')],qs[_0x9cd5('0x39')](_0x29a960[_0x9cd5('0x34')][_0x9cd5('0x39')]));_0x589aaf[_0x9cd5('0x38')]=_0x589aaf[_0x9cd5('0x38')][_0x9cd5('0x3a')]?_0x589aaf[_0x9cd5('0x38')]:_0x1d2480[_0x9cd5('0x33')];if(_0x29a960['query'][_0x9cd5('0x43')]){_0x589aaf['include']=[{'all':!![]}];}_0x589aaf=_[_0x9cd5('0x41')]({},_0x589aaf,_0x29a960[_0x9cd5('0x48')]);return db[_0x9cd5('0x2f')][_0x9cd5('0x49')](_0x589aaf)[_0x9cd5('0x26')](handleEntityNotFound(_0x1c00bb,null))['then'](respondWithResult(_0x1c00bb,null))['catch'](handleError(_0x1c00bb,null));};exports[_0x9cd5('0x4a')]=function(_0x10a292,_0x25502d){return db[_0x9cd5('0x2f')][_0x9cd5('0x4a')](_0x10a292[_0x9cd5('0x4b')],{})['then'](function(_0x89abbd){var _0x6d36bb=_0x10a292['user']['get']({'plain':!![]});if(!_0x6d36bb)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x6d36bb[_0x9cd5('0x4c')]===_0x9cd5('0x4d')){var _0xea6b4=_0x89abbd[_0x9cd5('0x4e')]({'plain':!![]});var _0x448b7a=_0x9cd5('0x4f');return db['UserProfileSection'][_0x9cd5('0x49')]({'where':{'name':_0x448b7a,'userProfileId':_0x6d36bb[_0x9cd5('0x50')]},'raw':!![]})[_0x9cd5('0x26')](function(_0xf81099){if(_0xf81099&&_0xf81099['autoAssociation']===0x0){return db[_0x9cd5('0x28')][_0x9cd5('0x4a')]({'name':_0xea6b4[_0x9cd5('0x2b')],'resourceId':_0xea6b4['id'],'type':_0xf81099[_0x9cd5('0x2b')],'sectionId':_0xf81099['id']},{})[_0x9cd5('0x26')](function(){return _0x89abbd;});}else{return _0x89abbd;}})['catch'](function(_0x502ace){logger[_0x9cd5('0x29')](_0x9cd5('0x51'),_0x502ace);throw _0x502ace;});}return _0x89abbd;})[_0x9cd5('0x26')](respondWithResult(_0x25502d,0xc9))[_0x9cd5('0x52')](handleError(_0x25502d,null));};exports[_0x9cd5('0x25')]=function(_0x501ee3,_0x270375){if(_0x501ee3[_0x9cd5('0x4b')]['id']){delete _0x501ee3['body']['id'];}return db['AnalyticExtractedReport'][_0x9cd5('0x49')]({'where':{'id':_0x501ee3[_0x9cd5('0x47')]['id']}})[_0x9cd5('0x26')](handleEntityNotFound(_0x270375,null))[_0x9cd5('0x26')](saveUpdates(_0x501ee3['body'],null))['then'](respondWithResult(_0x270375,null))[_0x9cd5('0x52')](handleError(_0x270375,null));};exports[_0x9cd5('0x27')]=function(_0x5c9bcd,_0x3406de){return db[_0x9cd5('0x2f')][_0x9cd5('0x49')]({'where':{'id':_0x5c9bcd['params']['id']}})[_0x9cd5('0x26')](handleEntityNotFound(_0x3406de,null))[_0x9cd5('0x26')](removeEntity(_0x3406de,null))[_0x9cd5('0x52')](handleError(_0x3406de,null));};exports[_0x9cd5('0x53')]=function(_0x13a77b,_0x481536,_0x443597){return db[_0x9cd5('0x2f')][_0x9cd5('0x49')]({'where':{'id':_0x13a77b[_0x9cd5('0x47')]['id']},'attributes':[_0x9cd5('0x2b'),'basename','savename',_0x9cd5('0x54')],'raw':!![]})[_0x9cd5('0x26')](handleEntityNotFound(_0x481536,null))[_0x9cd5('0x26')](function(_0x4aa88e){if(_0x4aa88e){if(!fs['existsSync'](path[_0x9cd5('0x55')](config['root'],_0x9cd5('0x56'),_0x4aa88e['savename']))){throw new db[(_0x9cd5('0x57'))][(_0x9cd5('0x58'))](_0x9cd5('0x59'));}if(_0x13a77b[_0x9cd5('0x34')][_0x9cd5('0x5a')]){return _0x481536[_0x9cd5('0x19')](0xc8);}return _0x481536[_0x9cd5('0x53')](path[_0x9cd5('0x55')](config[_0x9cd5('0x5b')],_0x9cd5('0x56'),_0x4aa88e[_0x9cd5('0x5c')]),util[_0x9cd5('0x5d')](_0x9cd5('0x5e'),_0x4aa88e['basename']||_0x4aa88e[_0x9cd5('0x2b')],_0x4aa88e[_0x9cd5('0x54')][_0x9cd5('0x5f')]()));}})[_0x9cd5('0x52')](handleError(_0x481536,null));};
\ No newline at end of file
+var _0x187f=['bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','save','update','then','destroy','get','stack','name','index','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','options','AnalyticExtractedReport','includeAll','include','findAll','show','rawAttributes','find','catch','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','ExtractedReports','autoAssociation','params','basename','root','server/files/reports','savename','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','download','join','format','%s.%s','output','eml-format','rimraf','zip-dir','request-promise','moment'];(function(_0x235497,_0x80e756){var _0x5a1967=function(_0x20c5b1){while(--_0x20c5b1){_0x235497['push'](_0x235497['shift']());}};_0x5a1967(++_0x80e756);}(_0x187f,0xb7));var _0xf187=function(_0x5ae35f,_0x1300c3){_0x5ae35f=_0x5ae35f-0x0;var _0x4835ad=_0x187f[_0x5ae35f];return _0x4835ad;};'use strict';var emlformat=require(_0xf187('0x0'));var rimraf=require(_0xf187('0x1'));var zipdir=require(_0xf187('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf187('0x3'));var moment=require(_0xf187('0x4'));var BPromise=require(_0xf187('0x5'));var Mustache=require(_0xf187('0x6'));var util=require(_0xf187('0x7'));var path=require(_0xf187('0x8'));var sox=require('sox');var csv=require(_0xf187('0x9'));var ejs=require(_0xf187('0xa'));var fs=require('fs');var fs_extra=require(_0xf187('0xb'));var _=require(_0xf187('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xf187('0xd'));var deskjs=require(_0xf187('0xe'));var toCsv=require(_0xf187('0x9'));var querystring=require('querystring');var Papa=require(_0xf187('0xf'));var Redis=require('ioredis');var authService=require(_0xf187('0x10'));var qs=require(_0xf187('0x11'));var as=require(_0xf187('0x12'));var hardwareService=require(_0xf187('0x13'));var logger=require(_0xf187('0x14'))(_0xf187('0x15'));var utils=require(_0xf187('0x16'));var config=require(_0xf187('0x17'));var licenseUtil=require(_0xf187('0x18'));var db=require(_0xf187('0x19'))['db'];function respondWithStatusCode(_0x12ff73,_0x48847f){_0x48847f=_0x48847f||0xcc;return function(_0x587e38){if(_0x587e38){return _0x12ff73[_0xf187('0x1a')](_0x48847f);}return _0x12ff73[_0xf187('0x1b')](_0x48847f)[_0xf187('0x1c')]();};}function respondWithResult(_0x112724,_0x40e1e7){_0x40e1e7=_0x40e1e7||0xc8;return function(_0xfe31cc){if(_0xfe31cc){return _0x112724['status'](_0x40e1e7)['json'](_0xfe31cc);}};}function respondWithFilteredResult(_0x4ba852,_0x34a809){return function(_0x59a5a3){if(_0x59a5a3){var _0x4d75f8=typeof _0x34a809[_0xf187('0x1d')]===_0xf187('0x1e')&&typeof _0x34a809[_0xf187('0x1f')]===_0xf187('0x1e');var _0x442b15=_0x59a5a3['count'];var _0x55e721=_0x4d75f8?0x0:_0x34a809[_0xf187('0x1d')];var _0x22f4bd=_0x4d75f8?_0x59a5a3[_0xf187('0x20')]:_0x34a809['offset']+_0x34a809[_0xf187('0x1f')];var _0x3a4f96;if(_0x22f4bd>=_0x442b15){_0x22f4bd=_0x442b15;_0x3a4f96=0xc8;}else{_0x3a4f96=0xce;}_0x4ba852[_0xf187('0x1b')](_0x3a4f96);return _0x4ba852[_0xf187('0x21')]('Content-Range',_0x55e721+'-'+_0x22f4bd+'/'+_0x442b15)[_0xf187('0x22')](_0x59a5a3);}return null;};}function patchUpdates(_0x2af176){return function(_0x3b7baf){try{jsonpatch[_0xf187('0x23')](_0x3b7baf,_0x2af176,!![]);}catch(_0x5c17e3){return BPromise[_0xf187('0x24')](_0x5c17e3);}return _0x3b7baf[_0xf187('0x25')]();};}function saveUpdates(_0x4b39c3,_0x3f3df0){return function(_0xbdd6f6){if(_0xbdd6f6){return _0xbdd6f6[_0xf187('0x26')](_0x4b39c3)[_0xf187('0x27')](function(_0x2f97a4){return _0x2f97a4;});}return null;};}function removeEntity(_0x34b907,_0x37585f){return function(_0x4ddae0){if(_0x4ddae0){return _0x4ddae0[_0xf187('0x28')]()['then'](function(){var _0x3ea0e0=_0x4ddae0[_0xf187('0x29')]({'plain':!![]});var _0xdbe279='ExtractedReports';return db['UserProfileResource'][_0xf187('0x28')]({'where':{'type':_0xdbe279,'resourceId':_0x3ea0e0['id']}})[_0xf187('0x27')](function(){return _0x4ddae0;});})[_0xf187('0x27')](function(){_0x34b907[_0xf187('0x1b')](0xcc)[_0xf187('0x1c')]();});}};}function handleEntityNotFound(_0x13e57b,_0x5175d3){return function(_0x141bcd){if(!_0x141bcd){_0x13e57b['sendStatus'](0x194);}return _0x141bcd;};}function handleError(_0x128923,_0x394e13){_0x394e13=_0x394e13||0x1f4;return function(_0x2a47a8){logger['error'](_0x2a47a8[_0xf187('0x2a')]);if(_0x2a47a8[_0xf187('0x2b')]){delete _0x2a47a8[_0xf187('0x2b')];}_0x128923[_0xf187('0x1b')](_0x394e13)['send'](_0x2a47a8);};}exports[_0xf187('0x2c')]=function(_0x4916f9,_0x242b6f){var _0x1d057e={},_0x2478b3={},_0x2935b0={'count':0x0,'rows':[]};var _0x326220=_[_0xf187('0x2d')](db['AnalyticExtractedReport']['rawAttributes'],function(_0x5f1eca){return{'name':_0x5f1eca[_0xf187('0x2e')],'type':_0x5f1eca[_0xf187('0x2f')][_0xf187('0x30')]};});_0x2478b3[_0xf187('0x31')]=_[_0xf187('0x2d')](_0x326220,_0xf187('0x2b'));_0x2478b3[_0xf187('0x32')]=_[_0xf187('0x33')](_0x4916f9[_0xf187('0x32')]);_0x2478b3[_0xf187('0x34')]=_[_0xf187('0x35')](_0x2478b3[_0xf187('0x31')],_0x2478b3[_0xf187('0x32')]);_0x1d057e[_0xf187('0x36')]=_[_0xf187('0x35')](_0x2478b3[_0xf187('0x31')],qs['fields'](_0x4916f9[_0xf187('0x32')][_0xf187('0x37')]));_0x1d057e[_0xf187('0x36')]=_0x1d057e[_0xf187('0x36')][_0xf187('0x38')]?_0x1d057e['attributes']:_0x2478b3[_0xf187('0x31')];if(!_0x4916f9[_0xf187('0x32')]['hasOwnProperty'](_0xf187('0x39'))){_0x1d057e['limit']=qs[_0xf187('0x1f')](_0x4916f9[_0xf187('0x32')]['limit']);_0x1d057e[_0xf187('0x1d')]=qs[_0xf187('0x1d')](_0x4916f9[_0xf187('0x32')][_0xf187('0x1d')]);}_0x1d057e[_0xf187('0x3a')]=qs[_0xf187('0x3b')](_0x4916f9[_0xf187('0x32')]['sort']);_0x1d057e[_0xf187('0x3c')]=qs[_0xf187('0x34')](_[_0xf187('0x3d')](_0x4916f9[_0xf187('0x32')],_0x2478b3[_0xf187('0x34')]),_0x326220);if(_0x4916f9[_0xf187('0x32')][_0xf187('0x3e')]){_0x1d057e['where']=_[_0xf187('0x3f')](_0x1d057e[_0xf187('0x3c')],{'$or':_[_0xf187('0x2d')](_0x326220,function(_0x2c482a){if(_0x2c482a[_0xf187('0x2f')]!=='VIRTUAL'){var _0x248097={};_0x248097[_0x2c482a[_0xf187('0x2b')]]={'$like':'%'+_0x4916f9['query'][_0xf187('0x3e')]+'%'};return _0x248097;}})});}_0x1d057e=_[_0xf187('0x3f')]({},_0x1d057e,_0x4916f9[_0xf187('0x40')]);var _0xbc6049={'where':_0x1d057e[_0xf187('0x3c')]};return db[_0xf187('0x41')][_0xf187('0x20')](_0xbc6049)[_0xf187('0x27')](function(_0x2341c9){_0x2935b0[_0xf187('0x20')]=_0x2341c9;if(_0x4916f9[_0xf187('0x32')][_0xf187('0x42')]){_0x1d057e[_0xf187('0x43')]=[{'all':!![]}];}return db[_0xf187('0x41')][_0xf187('0x44')](_0x1d057e);})['then'](function(_0x5d3875){_0x2935b0['rows']=_0x5d3875;return _0x2935b0;})[_0xf187('0x27')](respondWithFilteredResult(_0x242b6f,_0x1d057e))['catch'](handleError(_0x242b6f,null));};exports[_0xf187('0x45')]=function(_0x1222d8,_0x2b0366){var _0x49d58d={'raw':!![],'where':{'id':_0x1222d8['params']['id']}},_0x10086f={};_0x10086f[_0xf187('0x31')]=_[_0xf187('0x33')](db[_0xf187('0x41')][_0xf187('0x46')]);_0x10086f[_0xf187('0x32')]=_[_0xf187('0x33')](_0x1222d8[_0xf187('0x32')]);_0x10086f[_0xf187('0x34')]=_['intersection'](_0x10086f[_0xf187('0x31')],_0x10086f[_0xf187('0x32')]);_0x49d58d[_0xf187('0x36')]=_[_0xf187('0x35')](_0x10086f[_0xf187('0x31')],qs[_0xf187('0x37')](_0x1222d8[_0xf187('0x32')][_0xf187('0x37')]));_0x49d58d[_0xf187('0x36')]=_0x49d58d[_0xf187('0x36')]['length']?_0x49d58d[_0xf187('0x36')]:_0x10086f[_0xf187('0x31')];if(_0x1222d8[_0xf187('0x32')]['includeAll']){_0x49d58d[_0xf187('0x43')]=[{'all':!![]}];}_0x49d58d=_[_0xf187('0x3f')]({},_0x49d58d,_0x1222d8['options']);return db[_0xf187('0x41')][_0xf187('0x47')](_0x49d58d)[_0xf187('0x27')](handleEntityNotFound(_0x2b0366,null))['then'](respondWithResult(_0x2b0366,null))[_0xf187('0x48')](handleError(_0x2b0366,null));};exports[_0xf187('0x49')]=function(_0x2f12ed,_0x2927ce){return db['AnalyticExtractedReport'][_0xf187('0x49')](_0x2f12ed[_0xf187('0x4a')],{})[_0xf187('0x27')](function(_0xd7f0e7){var _0x37711e=_0x2f12ed['user'][_0xf187('0x29')]({'plain':!![]});if(!_0x37711e)throw new Error(_0xf187('0x4b'));if(_0x37711e[_0xf187('0x4c')]===_0xf187('0x4d')){var _0x373da1=_0xd7f0e7[_0xf187('0x29')]({'plain':!![]});var _0x5deac7=_0xf187('0x4e');return db['UserProfileSection'][_0xf187('0x47')]({'where':{'name':_0x5deac7,'userProfileId':_0x37711e['userProfileId']},'raw':!![]})[_0xf187('0x27')](function(_0x121390){if(_0x121390&&_0x121390[_0xf187('0x4f')]===0x0){return db['UserProfileResource'][_0xf187('0x49')]({'name':_0x373da1[_0xf187('0x2b')],'resourceId':_0x373da1['id'],'type':_0x121390[_0xf187('0x2b')],'sectionId':_0x121390['id']},{})[_0xf187('0x27')](function(){return _0xd7f0e7;});}else{return _0xd7f0e7;}})[_0xf187('0x48')](function(_0x5010b0){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5010b0);throw _0x5010b0;});}return _0xd7f0e7;})['then'](respondWithResult(_0x2927ce,0xc9))['catch'](handleError(_0x2927ce,null));};exports[_0xf187('0x26')]=function(_0x5123ca,_0x1ec704){if(_0x5123ca[_0xf187('0x4a')]['id']){delete _0x5123ca['body']['id'];}return db[_0xf187('0x41')]['find']({'where':{'id':_0x5123ca['params']['id']}})[_0xf187('0x27')](handleEntityNotFound(_0x1ec704,null))[_0xf187('0x27')](saveUpdates(_0x5123ca[_0xf187('0x4a')],null))[_0xf187('0x27')](respondWithResult(_0x1ec704,null))['catch'](handleError(_0x1ec704,null));};exports['destroy']=function(_0x441f9f,_0x415eab){return db[_0xf187('0x41')][_0xf187('0x47')]({'where':{'id':_0x441f9f[_0xf187('0x50')]['id']}})[_0xf187('0x27')](handleEntityNotFound(_0x415eab,null))[_0xf187('0x27')](removeEntity(_0x415eab,null))[_0xf187('0x48')](handleError(_0x415eab,null));};exports['download']=function(_0xc23e09,_0x20f364,_0x541c7e){return db[_0xf187('0x41')][_0xf187('0x47')]({'where':{'id':_0xc23e09[_0xf187('0x50')]['id']},'attributes':[_0xf187('0x2b'),_0xf187('0x51'),'savename','output'],'raw':!![]})[_0xf187('0x27')](handleEntityNotFound(_0x20f364,null))[_0xf187('0x27')](function(_0x440420){if(_0x440420){if(!fs['existsSync'](path['join'](config[_0xf187('0x52')],_0xf187('0x53'),_0x440420[_0xf187('0x54')]))){throw new db[(_0xf187('0x55'))][(_0xf187('0x56'))](_0xf187('0x57'));}if(_0xc23e09[_0xf187('0x32')][_0xf187('0x58')]){return _0x20f364['sendStatus'](0xc8);}return _0x20f364[_0xf187('0x59')](path[_0xf187('0x5a')](config['root'],_0xf187('0x53'),_0x440420[_0xf187('0x54')]),util[_0xf187('0x5b')](_0xf187('0x5c'),_0x440420[_0xf187('0x51')]||_0x440420[_0xf187('0x2b')],_0x440420[_0xf187('0x5d')]['toLowerCase']()));}})['catch'](handleError(_0x20f364,null));};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
index 9e479c2..7a6c317 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.model.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd5f2=['util','api','moment','bluebird','path','../../config/environment','./analyticExtractedReport.attributes','AnalyticExtractedReport','analytics_extracted_reports','lodash'];(function(_0x243217,_0x522951){var _0x478029=function(_0x18d053){while(--_0x18d053){_0x243217['push'](_0x243217['shift']());}};_0x478029(++_0x522951);}(_0xd5f2,0x1f3));var _0x2d5f=function(_0x9dfc10,_0x19c2d5){_0x9dfc10=_0x9dfc10-0x0;var _0x4f938a=_0xd5f2[_0x9dfc10];return _0x4f938a;};'use strict';var _=require(_0x2d5f('0x0'));var util=require(_0x2d5f('0x1'));var logger=require('../../config/logger')(_0x2d5f('0x2'));var moment=require(_0x2d5f('0x3'));var BPromise=require(_0x2d5f('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2d5f('0x5'));var rimraf=require('rimraf');var config=require(_0x2d5f('0x6'));var attributes=require(_0x2d5f('0x7'));module['exports']=function(_0x5c43d3,_0x3d25c1){return _0x5c43d3['define'](_0x2d5f('0x8'),attributes,{'tableName':_0x2d5f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xeb97=['define','analytics_extracted_reports','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticExtractedReport.attributes','exports'];(function(_0x500785,_0x15e5ff){var _0x1f8bcc=function(_0x406983){while(--_0x406983){_0x500785['push'](_0x500785['shift']());}};_0x1f8bcc(++_0x15e5ff);}(_0xeb97,0x147));var _0x7eb9=function(_0xc6bd09,_0x5e7c1b){_0xc6bd09=_0xc6bd09-0x0;var _0x27afaa=_0xeb97[_0xc6bd09];return _0x27afaa;};'use strict';var _=require(_0x7eb9('0x0'));var util=require('util');var logger=require(_0x7eb9('0x1'))(_0x7eb9('0x2'));var moment=require(_0x7eb9('0x3'));var BPromise=require(_0x7eb9('0x4'));var rp=require(_0x7eb9('0x5'));var fs=require('fs');var path=require(_0x7eb9('0x6'));var rimraf=require(_0x7eb9('0x7'));var config=require(_0x7eb9('0x8'));var attributes=require(_0x7eb9('0x9'));module[_0x7eb9('0xa')]=function(_0x3257fb,_0x2dba32){return _0x3257fb[_0x7eb9('0xb')]('AnalyticExtractedReport',attributes,{'tableName':_0x7eb9('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
index 72132c6..656654f 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa28a=['util','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch'];(function(_0xabec85,_0x87a702){var _0x26a624=function(_0x4be093){while(--_0x4be093){_0xabec85['push'](_0xabec85['shift']());}};_0x26a624(++_0x87a702);}(_0xa28a,0x130));var _0xaa28=function(_0xd8e9f5,_0x29df60){_0xd8e9f5=_0xd8e9f5-0x0;var _0x4b915e=_0xa28a[_0xd8e9f5];return _0x4b915e;};'use strict';var _=require('lodash');var util=require(_0xaa28('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xaa28('0x1'));var fs=require('fs');var Redis=require(_0xaa28('0x2'));var db=require(_0xaa28('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xaa28('0x4'));var config=require(_0xaa28('0x5'));var jayson=require(_0xaa28('0x6'));var client=jayson['client'][_0xaa28('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2c6fdd,_0x406265,_0x333fba){return new BPromise(function(_0x49a443,_0x483dfa){return client[_0xaa28('0x8')](_0x2c6fdd,_0x333fba)[_0xaa28('0x9')](function(_0x4eaf96){logger[_0xaa28('0xa')](_0xaa28('0xb'),_0x406265,_0xaa28('0xc'));logger['debug'](_0xaa28('0xd'),_0x406265,_0xaa28('0xc'),JSON['stringify'](_0x4eaf96));if(_0x4eaf96['error']){if(_0x4eaf96[_0xaa28('0xe')][_0xaa28('0xf')]===0x1f4){logger[_0xaa28('0xe')](_0xaa28('0xb'),_0x406265,_0x4eaf96[_0xaa28('0xe')][_0xaa28('0x10')]);return _0x483dfa(_0x4eaf96[_0xaa28('0xe')][_0xaa28('0x10')]);}logger[_0xaa28('0xe')](_0xaa28('0xb'),_0x406265,_0x4eaf96['error'][_0xaa28('0x10')]);return _0x49a443(_0x4eaf96['error'][_0xaa28('0x10')]);}else{logger[_0xaa28('0xa')](_0xaa28('0xb'),_0x406265,_0xaa28('0xc'));_0x49a443(_0x4eaf96[_0xaa28('0x11')][_0xaa28('0x10')]);}})[_0xaa28('0x12')](function(_0x328c6c){logger[_0xaa28('0xe')](_0xaa28('0xb'),_0x406265,_0x328c6c);_0x483dfa(_0x328c6c);});});}
\ No newline at end of file
+var _0x022b=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','AnalyticExtractedReport,\x20%s,\x20%s','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','util','moment','bluebird'];(function(_0x3e4bb1,_0x3e28ec){var _0x5677ed=function(_0x552544){while(--_0x552544){_0x3e4bb1['push'](_0x3e4bb1['shift']());}};_0x5677ed(++_0x3e28ec);}(_0x022b,0x1cb));var _0xb022=function(_0x3dcfed,_0x7366d0){_0x3dcfed=_0x3dcfed-0x0;var _0x11208a=_0x022b[_0x3dcfed];return _0x11208a;};'use strict';var _=require('lodash');var util=require(_0xb022('0x0'));var moment=require(_0xb022('0x1'));var BPromise=require(_0xb022('0x2'));var rs=require(_0xb022('0x3'));var fs=require('fs');var Redis=require(_0xb022('0x4'));var db=require(_0xb022('0x5'))['db'];var utils=require(_0xb022('0x6'));var logger=require(_0xb022('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xb022('0x8'));var client=jayson[_0xb022('0x9')][_0xb022('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x570f47,_0x3e10b4,_0x38a7fe){return new BPromise(function(_0x216672,_0x3c00e7){return client[_0xb022('0xb')](_0x570f47,_0x38a7fe)[_0xb022('0xc')](function(_0x24c0fd){logger['info'](_0xb022('0xd'),_0x3e10b4,'request\x20sent');logger['debug'](_0xb022('0xe'),_0x3e10b4,_0xb022('0xf'),JSON[_0xb022('0x10')](_0x24c0fd));if(_0x24c0fd['error']){if(_0x24c0fd[_0xb022('0x11')]['code']===0x1f4){logger[_0xb022('0x11')](_0xb022('0xd'),_0x3e10b4,_0x24c0fd['error'][_0xb022('0x12')]);return _0x3c00e7(_0x24c0fd[_0xb022('0x11')]['message']);}logger[_0xb022('0x11')](_0xb022('0xd'),_0x3e10b4,_0x24c0fd[_0xb022('0x11')][_0xb022('0x12')]);return _0x216672(_0x24c0fd['error'][_0xb022('0x12')]);}else{logger[_0xb022('0x13')](_0xb022('0xd'),_0x3e10b4,_0xb022('0xf'));_0x216672(_0x24c0fd[_0xb022('0x14')]['message']);}})['catch'](function(_0x584b49){logger[_0xb022('0x11')](_0xb022('0xd'),_0x3e10b4,_0x584b49);_0x3c00e7(_0x584b49);});});}
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js
index b4c02d2..47bc4fe 100644
--- a/server/api/analyticExtractedReport/index.js
+++ b/server/api/analyticExtractedReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5e3b=['download','create','put','update','delete','destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./analyticExtractedReport.controller','index','/:id','isAuthenticated','show','get','/:id/download'];(function(_0x90aedd,_0x58d687){var _0x3a574f=function(_0x4cdd0e){while(--_0x4cdd0e){_0x90aedd['push'](_0x90aedd['shift']());}};_0x3a574f(++_0x58d687);}(_0x5e3b,0xae));var _0xb5e3=function(_0x48bc12,_0x556fdd){_0x48bc12=_0x48bc12-0x0;var _0x453254=_0x5e3b[_0x48bc12];return _0x453254;};'use strict';var multer=require(_0xb5e3('0x0'));var util=require(_0xb5e3('0x1'));var path=require(_0xb5e3('0x2'));var timeout=require('connect-timeout');var express=require(_0xb5e3('0x3'));var router=express[_0xb5e3('0x4')]();var fs_extra=require(_0xb5e3('0x5'));var auth=require(_0xb5e3('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xb5e3('0x7'));var controller=require(_0xb5e3('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0xb5e3('0x9')]);router['get'](_0xb5e3('0xa'),auth[_0xb5e3('0xb')](),controller[_0xb5e3('0xc')]);router[_0xb5e3('0xd')](_0xb5e3('0xe'),auth[_0xb5e3('0xb')](),controller[_0xb5e3('0xf')]);router['post']('/',auth[_0xb5e3('0xb')](),controller[_0xb5e3('0x10')]);router[_0xb5e3('0x11')](_0xb5e3('0xa'),auth[_0xb5e3('0xb')](),controller[_0xb5e3('0x12')]);router[_0xb5e3('0x13')](_0xb5e3('0xa'),auth['isAuthenticated'](),controller[_0xb5e3('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0x33bd=['/:id','/:id/download','download','create','put','update','delete','destroy','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','get','isAuthenticated','index'];(function(_0x70841e,_0x1e002d){var _0x4f15a8=function(_0x3cc940){while(--_0x3cc940){_0x70841e['push'](_0x70841e['shift']());}};_0x4f15a8(++_0x1e002d);}(_0x33bd,0xa8));var _0xd33b=function(_0x266a87,_0xf35432){_0x266a87=_0x266a87-0x0;var _0x1d7b6b=_0x33bd[_0x266a87];return _0x1d7b6b;};'use strict';var multer=require(_0xd33b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xd33b('0x1'));var express=require(_0xd33b('0x2'));var router=express[_0xd33b('0x3')]();var fs_extra=require(_0xd33b('0x4'));var auth=require(_0xd33b('0x5'));var interaction=require(_0xd33b('0x6'));var config=require(_0xd33b('0x7'));var controller=require(_0xd33b('0x8'));router[_0xd33b('0x9')]('/',auth[_0xd33b('0xa')](),controller[_0xd33b('0xb')]);router[_0xd33b('0x9')](_0xd33b('0xc'),auth[_0xd33b('0xa')](),controller['show']);router['get'](_0xd33b('0xd'),auth['isAuthenticated'](),controller[_0xd33b('0xe')]);router['post']('/',auth[_0xd33b('0xa')](),controller[_0xd33b('0xf')]);router[_0xd33b('0x10')](_0xd33b('0xc'),auth[_0xd33b('0xa')](),controller[_0xd33b('0x11')]);router[_0xd33b('0x12')](_0xd33b('0xc'),auth[_0xd33b('0xa')](),controller[_0xd33b('0x13')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
index f4edbe6..8cc2057 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.attributes.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8ca2=['TEXT','STRING','BOOLEAN','sequelize','exports'];(function(_0x3de873,_0x174b5f){var _0x380b8c=function(_0x313dea){while(--_0x313dea){_0x3de873['push'](_0x3de873['shift']());}};_0x380b8c(++_0x174b5f);}(_0x8ca2,0x10c));var _0x28ca=function(_0x49ca18,_0x5e6d05){_0x49ca18=_0x49ca18-0x0;var _0x145d54=_0x8ca2[_0x49ca18];return _0x145d54;};'use strict';var Sequelize=require(_0x28ca('0x0'));module[_0x28ca('0x1')]={'field':{'type':Sequelize[_0x28ca('0x2')]},'alias':{'type':Sequelize[_0x28ca('0x3')]},'function':{'type':Sequelize[_0x28ca('0x3')]},'format':{'type':Sequelize[_0x28ca('0x3')]},'groupBy':{'type':Sequelize[_0x28ca('0x4')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x28ca('0x3')]},'custom':{'type':Sequelize[_0x28ca('0x4')],'defaultValue':![]}};
\ No newline at end of file
+var _0x78e9=['STRING','BOOLEAN','sequelize','exports'];(function(_0x26c812,_0x1ff16c){var _0x4c497d=function(_0x9628de){while(--_0x9628de){_0x26c812['push'](_0x26c812['shift']());}};_0x4c497d(++_0x1ff16c);}(_0x78e9,0xf6));var _0x978e=function(_0x24b231,_0x3a95da){_0x24b231=_0x24b231-0x0;var _0x1fdc5b=_0x78e9[_0x24b231];return _0x1fdc5b;};'use strict';var Sequelize=require(_0x978e('0x0'));module[_0x978e('0x1')]={'field':{'type':Sequelize['TEXT']},'alias':{'type':Sequelize[_0x978e('0x2')]},'function':{'type':Sequelize[_0x978e('0x2')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize[_0x978e('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x978e('0x2')]},'custom':{'type':Sequelize[_0x978e('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js
index e7f3902..adf6113 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.controller.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf489=['addFields','AnalyticCustomReport','findOne','params','sequelize','CustomReportId','bulkCreate','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','papaparse','ioredis','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','reject','save','update','then','destroy','error','stack','name','send','map','AnalyticFieldReport','rawAttributes','fieldName','key','model','query','keys','intersection','fields','attributes','hasOwnProperty','order','sort','where','filters','pick','merge','type','VIRTUAL','filter','includeAll','include','findAll','rows','catch','show','length','options','find','body','ids'];(function(_0x15b962,_0x4bd809){var _0xe4676b=function(_0x3b7e44){while(--_0x3b7e44){_0x15b962['push'](_0x15b962['shift']());}};_0xe4676b(++_0x4bd809);}(_0xf489,0x17e));var _0x9f48=function(_0xadf978,_0x1835dc){_0xadf978=_0xadf978-0x0;var _0x56bb0d=_0xf489[_0xadf978];return _0x56bb0d;};'use strict';var emlformat=require(_0x9f48('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x9f48('0x1'));var jsonpatch=require(_0x9f48('0x2'));var rp=require(_0x9f48('0x3'));var moment=require('moment');var BPromise=require(_0x9f48('0x4'));var Mustache=require(_0x9f48('0x5'));var util=require(_0x9f48('0x6'));var path=require(_0x9f48('0x7'));var sox=require(_0x9f48('0x8'));var csv=require(_0x9f48('0x9'));var ejs=require(_0x9f48('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9f48('0xb'));var squel=require(_0x9f48('0xc'));var crypto=require('crypto');var jsforce=require(_0x9f48('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x9f48('0xe'));var Redis=require(_0x9f48('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x9f48('0x10'));var config=require(_0x9f48('0x11'));var licenseUtil=require(_0x9f48('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2a6b41,_0x2c2f21){_0x2c2f21=_0x2c2f21||0xcc;return function(_0x21739a){if(_0x21739a){return _0x2a6b41[_0x9f48('0x13')](_0x2c2f21);}return _0x2a6b41[_0x9f48('0x14')](_0x2c2f21)[_0x9f48('0x15')]();};}function respondWithResult(_0x502308,_0x1ac4a0){_0x1ac4a0=_0x1ac4a0||0xc8;return function(_0x2492a2){if(_0x2492a2){return _0x502308[_0x9f48('0x14')](_0x1ac4a0)[_0x9f48('0x16')](_0x2492a2);}};}function respondWithFilteredResult(_0x17c1f2,_0x2947a0){return function(_0x36c483){if(_0x36c483){var _0x118777=typeof _0x2947a0[_0x9f48('0x17')]==='undefined'&&typeof _0x2947a0['limit']===_0x9f48('0x18');var _0x4a0c43=_0x36c483[_0x9f48('0x19')];var _0x49a00e=_0x118777?0x0:_0x2947a0[_0x9f48('0x17')];var _0x3d350c=_0x118777?_0x36c483[_0x9f48('0x19')]:_0x2947a0[_0x9f48('0x17')]+_0x2947a0[_0x9f48('0x1a')];var _0x5e34eb;if(_0x3d350c>=_0x4a0c43){_0x3d350c=_0x4a0c43;_0x5e34eb=0xc8;}else{_0x5e34eb=0xce;}_0x17c1f2[_0x9f48('0x14')](_0x5e34eb);return _0x17c1f2['set']('Content-Range',_0x49a00e+'-'+_0x3d350c+'/'+_0x4a0c43)[_0x9f48('0x16')](_0x36c483);}return null;};}function patchUpdates(_0x83d211){return function(_0xae480e){try{jsonpatch['apply'](_0xae480e,_0x83d211,!![]);}catch(_0x1bf920){return BPromise[_0x9f48('0x1b')](_0x1bf920);}return _0xae480e[_0x9f48('0x1c')]();};}function saveUpdates(_0x522b18,_0x454ae6){return function(_0x32af5b){if(_0x32af5b){return _0x32af5b[_0x9f48('0x1d')](_0x522b18)[_0x9f48('0x1e')](function(_0x5bf0c5){return _0x5bf0c5;});}return null;};}function removeEntity(_0x57116d,_0x2be76c){return function(_0x3c64de){if(_0x3c64de){return _0x3c64de[_0x9f48('0x1f')]()[_0x9f48('0x1e')](function(){_0x57116d['status'](0xcc)[_0x9f48('0x15')]();});}};}function handleEntityNotFound(_0x25862c,_0x453aa0){return function(_0xcd46d){if(!_0xcd46d){_0x25862c[_0x9f48('0x13')](0x194);}return _0xcd46d;};}function handleError(_0x5ca6b3,_0x5a803d){_0x5a803d=_0x5a803d||0x1f4;return function(_0x93f55f){logger[_0x9f48('0x20')](_0x93f55f[_0x9f48('0x21')]);if(_0x93f55f['name']){delete _0x93f55f[_0x9f48('0x22')];}_0x5ca6b3['status'](_0x5a803d)[_0x9f48('0x23')](_0x93f55f);};}exports['index']=function(_0x3b8fc9,_0x3977f5){var _0x1e41c9={},_0x811843={},_0xc707d8={'count':0x0,'rows':[]};var _0x5d211c=_[_0x9f48('0x24')](db[_0x9f48('0x25')][_0x9f48('0x26')],function(_0x466da2){return{'name':_0x466da2[_0x9f48('0x27')],'type':_0x466da2['type'][_0x9f48('0x28')]};});_0x811843[_0x9f48('0x29')]=_[_0x9f48('0x24')](_0x5d211c,_0x9f48('0x22'));_0x811843[_0x9f48('0x2a')]=_[_0x9f48('0x2b')](_0x3b8fc9[_0x9f48('0x2a')]);_0x811843['filters']=_[_0x9f48('0x2c')](_0x811843[_0x9f48('0x29')],_0x811843['query']);_0x1e41c9['attributes']=_[_0x9f48('0x2c')](_0x811843['model'],qs[_0x9f48('0x2d')](_0x3b8fc9[_0x9f48('0x2a')][_0x9f48('0x2d')]));_0x1e41c9['attributes']=_0x1e41c9['attributes']['length']?_0x1e41c9[_0x9f48('0x2e')]:_0x811843[_0x9f48('0x29')];if(!_0x3b8fc9[_0x9f48('0x2a')][_0x9f48('0x2f')]('nolimit')){_0x1e41c9[_0x9f48('0x1a')]=qs[_0x9f48('0x1a')](_0x3b8fc9['query']['limit']);_0x1e41c9['offset']=qs[_0x9f48('0x17')](_0x3b8fc9['query'][_0x9f48('0x17')]);}_0x1e41c9[_0x9f48('0x30')]=qs['sort'](_0x3b8fc9[_0x9f48('0x2a')][_0x9f48('0x31')]);_0x1e41c9[_0x9f48('0x32')]=qs[_0x9f48('0x33')](_[_0x9f48('0x34')](_0x3b8fc9['query'],_0x811843[_0x9f48('0x33')]),_0x5d211c);if(_0x3b8fc9[_0x9f48('0x2a')]['filter']){_0x1e41c9[_0x9f48('0x32')]=_[_0x9f48('0x35')](_0x1e41c9[_0x9f48('0x32')],{'$or':_[_0x9f48('0x24')](_0x5d211c,function(_0x58686d){if(_0x58686d[_0x9f48('0x36')]!==_0x9f48('0x37')){var _0x4b2b37={};_0x4b2b37[_0x58686d[_0x9f48('0x22')]]={'$like':'%'+_0x3b8fc9['query'][_0x9f48('0x38')]+'%'};return _0x4b2b37;}})});}_0x1e41c9=_['merge']({},_0x1e41c9,_0x3b8fc9['options']);var _0xfa5f5f={'where':_0x1e41c9[_0x9f48('0x32')]};return db[_0x9f48('0x25')][_0x9f48('0x19')](_0xfa5f5f)[_0x9f48('0x1e')](function(_0x54cd12){_0xc707d8[_0x9f48('0x19')]=_0x54cd12;if(_0x3b8fc9[_0x9f48('0x2a')][_0x9f48('0x39')]){_0x1e41c9[_0x9f48('0x3a')]=[{'all':!![]}];}return db['AnalyticFieldReport'][_0x9f48('0x3b')](_0x1e41c9);})[_0x9f48('0x1e')](function(_0x1fa5e2){_0xc707d8[_0x9f48('0x3c')]=_0x1fa5e2;return _0xc707d8;})[_0x9f48('0x1e')](respondWithFilteredResult(_0x3977f5,_0x1e41c9))[_0x9f48('0x3d')](handleError(_0x3977f5,null));};exports[_0x9f48('0x3e')]=function(_0x3737b0,_0x4a6026){var _0x149fb3={'raw':![],'where':{'id':_0x3737b0['params']['id']}},_0x11a575={};_0x11a575[_0x9f48('0x29')]=_['keys'](db['AnalyticFieldReport'][_0x9f48('0x26')]);_0x11a575[_0x9f48('0x2a')]=_[_0x9f48('0x2b')](_0x3737b0[_0x9f48('0x2a')]);_0x11a575['filters']=_[_0x9f48('0x2c')](_0x11a575['model'],_0x11a575[_0x9f48('0x2a')]);_0x149fb3[_0x9f48('0x2e')]=_[_0x9f48('0x2c')](_0x11a575[_0x9f48('0x29')],qs[_0x9f48('0x2d')](_0x3737b0[_0x9f48('0x2a')][_0x9f48('0x2d')]));_0x149fb3[_0x9f48('0x2e')]=_0x149fb3[_0x9f48('0x2e')][_0x9f48('0x3f')]?_0x149fb3[_0x9f48('0x2e')]:_0x11a575[_0x9f48('0x29')];if(_0x3737b0[_0x9f48('0x2a')]['includeAll']){_0x149fb3['include']=[{'all':!![]}];}_0x149fb3=_[_0x9f48('0x35')]({},_0x149fb3,_0x3737b0[_0x9f48('0x40')]);return db[_0x9f48('0x25')][_0x9f48('0x41')](_0x149fb3)[_0x9f48('0x1e')](handleEntityNotFound(_0x4a6026,null))['then'](respondWithResult(_0x4a6026,null))[_0x9f48('0x3d')](handleError(_0x4a6026,null));};exports['create']=function(_0x16d757,_0xb3cbb3){return db[_0x9f48('0x25')]['create'](_0x16d757[_0x9f48('0x42')],{})[_0x9f48('0x1e')](respondWithResult(_0xb3cbb3,0xc9))['catch'](handleError(_0xb3cbb3,null));};exports['bulkCreate']=function(_0x550d5e,_0x791d7c){return db[_0x9f48('0x25')]['bulkCreate'](_0x550d5e[_0x9f48('0x42')],{'raw':![],'individualHooks':!![]})[_0x9f48('0x1e')](respondWithResult(_0x791d7c,0xc9))[_0x9f48('0x3d')](handleError(_0x791d7c,null));};exports[_0x9f48('0x1d')]=function(_0x187d9c,_0x2d4018){if(_0x187d9c[_0x9f48('0x42')]['id']){delete _0x187d9c[_0x9f48('0x42')]['id'];}return db[_0x9f48('0x25')][_0x9f48('0x41')]({'where':{'id':_0x187d9c['params']['id']}})[_0x9f48('0x1e')](handleEntityNotFound(_0x2d4018,null))[_0x9f48('0x1e')](saveUpdates(_0x187d9c['body'],null))[_0x9f48('0x1e')](respondWithResult(_0x2d4018,null))[_0x9f48('0x3d')](handleError(_0x2d4018,null));};exports[_0x9f48('0x1f')]=function(_0x10d31d,_0x571c87){return db[_0x9f48('0x25')][_0x9f48('0x41')]({'where':{'id':_0x10d31d['params']['id']}})[_0x9f48('0x1e')](handleEntityNotFound(_0x571c87,null))[_0x9f48('0x1e')](removeEntity(_0x571c87,null))[_0x9f48('0x3d')](handleError(_0x571c87,null));};exports['bulkDestroy']=function(_0x566777,_0x31a802){return db[_0x9f48('0x25')][_0x9f48('0x1f')]({'where':{'id':_0x566777[_0x9f48('0x2a')][_0x9f48('0x43')]||[]},'raw':![],'individualHooks':!![]})[_0x9f48('0x1e')](respondWithResult(_0x31a802,0xcc))[_0x9f48('0x3d')](handleError(_0x31a802,null));};exports[_0x9f48('0x44')]=function(_0x2c79b7,_0x39c17a,_0x27f4a5){return db[_0x9f48('0x45')][_0x9f48('0x46')]({'where':{'id':_0x2c79b7[_0x9f48('0x47')]['id']}})[_0x9f48('0x1e')](handleEntityNotFound(_0x39c17a,null))[_0x9f48('0x1e')](function(_0x5253cd){if(_0x5253cd){return db[_0x9f48('0x48')]['transaction'](function(_0x77fab8){return db[_0x9f48('0x25')][_0x9f48('0x1f')]({'where':{'CustomReportId':_0x2c79b7[_0x9f48('0x47')]['id']},'transaction':_0x77fab8})[_0x9f48('0x1e')](function(_0x267197){var _0x5a8c99=_['map'](_0x2c79b7['body'],function(_0x2b3cfb){delete _0x2b3cfb['id'];_0x2b3cfb[_0x9f48('0x49')]=_0x2c79b7[_0x9f48('0x47')]['id'];return _0x2b3cfb;});return db[_0x9f48('0x25')][_0x9f48('0x4a')](_0x5a8c99,{'transaction':_0x77fab8});});})['then'](function(){return db[_0x9f48('0x25')][_0x9f48('0x3b')]({'where':{'CustomReportId':_0x2c79b7[_0x9f48('0x47')]['id']}});});}})[_0x9f48('0x1e')](respondWithResult(_0x39c17a,null))[_0x9f48('0x3d')](handleError(_0x39c17a,null));};
\ No newline at end of file
+var _0xe50a=['../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','json','apply','save','update','destroy','stack','name','send','map','AnalyticFieldReport','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','options','then','includeAll','findAll','rows','catch','show','params','keys','include','create','body','find','bulkDestroy','findOne','sequelize','transaction','CustomReportId','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x13d229,_0x1b97fd){var _0x400f61=function(_0x151373){while(--_0x151373){_0x13d229['push'](_0x13d229['shift']());}};_0x400f61(++_0x1b97fd);}(_0xe50a,0x1c2));var _0xae50=function(_0x37e886,_0x17d0ad){_0x37e886=_0x37e886-0x0;var _0x57c5cd=_0xe50a[_0x37e886];return _0x57c5cd;};'use strict';var emlformat=require(_0xae50('0x0'));var rimraf=require(_0xae50('0x1'));var zipdir=require(_0xae50('0x2'));var jsonpatch=require(_0xae50('0x3'));var rp=require(_0xae50('0x4'));var moment=require(_0xae50('0x5'));var BPromise=require(_0xae50('0x6'));var Mustache=require(_0xae50('0x7'));var util=require(_0xae50('0x8'));var path=require('path');var sox=require(_0xae50('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xae50('0xa'));var squel=require('squel');var crypto=require(_0xae50('0xb'));var jsforce=require(_0xae50('0xc'));var deskjs=require(_0xae50('0xd'));var toCsv=require(_0xae50('0xe'));var querystring=require('querystring');var Papa=require(_0xae50('0xf'));var Redis=require(_0xae50('0x10'));var authService=require(_0xae50('0x11'));var qs=require(_0xae50('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xae50('0x13'));var logger=require(_0xae50('0x14'))(_0xae50('0x15'));var utils=require(_0xae50('0x16'));var config=require(_0xae50('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xae50('0x18'))['db'];function respondWithStatusCode(_0x112174,_0x3fb581){_0x3fb581=_0x3fb581||0xcc;return function(_0x7f95f8){if(_0x7f95f8){return _0x112174[_0xae50('0x19')](_0x3fb581);}return _0x112174[_0xae50('0x1a')](_0x3fb581)[_0xae50('0x1b')]();};}function respondWithResult(_0x1e596a,_0x52c460){_0x52c460=_0x52c460||0xc8;return function(_0x5e972e){if(_0x5e972e){return _0x1e596a[_0xae50('0x1a')](_0x52c460)['json'](_0x5e972e);}};}function respondWithFilteredResult(_0x156853,_0x2394f0){return function(_0x4cbcff){if(_0x4cbcff){var _0x5393e5=typeof _0x2394f0[_0xae50('0x1c')]==='undefined'&&typeof _0x2394f0[_0xae50('0x1d')]===_0xae50('0x1e');var _0x46fe66=_0x4cbcff[_0xae50('0x1f')];var _0x44b274=_0x5393e5?0x0:_0x2394f0[_0xae50('0x1c')];var _0x4f3555=_0x5393e5?_0x4cbcff[_0xae50('0x1f')]:_0x2394f0[_0xae50('0x1c')]+_0x2394f0[_0xae50('0x1d')];var _0x46eacd;if(_0x4f3555>=_0x46fe66){_0x4f3555=_0x46fe66;_0x46eacd=0xc8;}else{_0x46eacd=0xce;}_0x156853[_0xae50('0x1a')](_0x46eacd);return _0x156853['set']('Content-Range',_0x44b274+'-'+_0x4f3555+'/'+_0x46fe66)[_0xae50('0x20')](_0x4cbcff);}return null;};}function patchUpdates(_0x11e3f9){return function(_0x40326b){try{jsonpatch[_0xae50('0x21')](_0x40326b,_0x11e3f9,!![]);}catch(_0x4dca0a){return BPromise['reject'](_0x4dca0a);}return _0x40326b[_0xae50('0x22')]();};}function saveUpdates(_0x54020c,_0x337909){return function(_0xbebb6e){if(_0xbebb6e){return _0xbebb6e[_0xae50('0x23')](_0x54020c)['then'](function(_0x2ecb07){return _0x2ecb07;});}return null;};}function removeEntity(_0x50a889,_0x482737){return function(_0x4b1d03){if(_0x4b1d03){return _0x4b1d03[_0xae50('0x24')]()['then'](function(){_0x50a889['status'](0xcc)[_0xae50('0x1b')]();});}};}function handleEntityNotFound(_0x5a7c7e,_0x1f4a86){return function(_0x510198){if(!_0x510198){_0x5a7c7e['sendStatus'](0x194);}return _0x510198;};}function handleError(_0x4da521,_0x5aa9ff){_0x5aa9ff=_0x5aa9ff||0x1f4;return function(_0x4460df){logger['error'](_0x4460df[_0xae50('0x25')]);if(_0x4460df[_0xae50('0x26')]){delete _0x4460df['name'];}_0x4da521['status'](_0x5aa9ff)[_0xae50('0x27')](_0x4460df);};}exports['index']=function(_0x46282b,_0x123ca1){var _0x5c22e6={},_0x1f0d2a={},_0x185daf={'count':0x0,'rows':[]};var _0x2ea1b3=_[_0xae50('0x28')](db[_0xae50('0x29')][_0xae50('0x2a')],function(_0x361094){return{'name':_0x361094[_0xae50('0x2b')],'type':_0x361094[_0xae50('0x2c')][_0xae50('0x2d')]};});_0x1f0d2a['model']=_[_0xae50('0x28')](_0x2ea1b3,_0xae50('0x26'));_0x1f0d2a[_0xae50('0x2e')]=_['keys'](_0x46282b['query']);_0x1f0d2a[_0xae50('0x2f')]=_[_0xae50('0x30')](_0x1f0d2a[_0xae50('0x31')],_0x1f0d2a[_0xae50('0x2e')]);_0x5c22e6[_0xae50('0x32')]=_['intersection'](_0x1f0d2a['model'],qs[_0xae50('0x33')](_0x46282b[_0xae50('0x2e')][_0xae50('0x33')]));_0x5c22e6[_0xae50('0x32')]=_0x5c22e6['attributes'][_0xae50('0x34')]?_0x5c22e6[_0xae50('0x32')]:_0x1f0d2a[_0xae50('0x31')];if(!_0x46282b[_0xae50('0x2e')][_0xae50('0x35')](_0xae50('0x36'))){_0x5c22e6[_0xae50('0x1d')]=qs[_0xae50('0x1d')](_0x46282b['query'][_0xae50('0x1d')]);_0x5c22e6[_0xae50('0x1c')]=qs[_0xae50('0x1c')](_0x46282b[_0xae50('0x2e')][_0xae50('0x1c')]);}_0x5c22e6[_0xae50('0x37')]=qs[_0xae50('0x38')](_0x46282b[_0xae50('0x2e')][_0xae50('0x38')]);_0x5c22e6['where']=qs[_0xae50('0x2f')](_[_0xae50('0x39')](_0x46282b['query'],_0x1f0d2a['filters']),_0x2ea1b3);if(_0x46282b[_0xae50('0x2e')][_0xae50('0x3a')]){_0x5c22e6[_0xae50('0x3b')]=_[_0xae50('0x3c')](_0x5c22e6[_0xae50('0x3b')],{'$or':_[_0xae50('0x28')](_0x2ea1b3,function(_0x64cfb7){if(_0x64cfb7[_0xae50('0x2c')]!=='VIRTUAL'){var _0xb515b9={};_0xb515b9[_0x64cfb7[_0xae50('0x26')]]={'$like':'%'+_0x46282b['query'][_0xae50('0x3a')]+'%'};return _0xb515b9;}})});}_0x5c22e6=_['merge']({},_0x5c22e6,_0x46282b[_0xae50('0x3d')]);var _0x492a29={'where':_0x5c22e6[_0xae50('0x3b')]};return db[_0xae50('0x29')][_0xae50('0x1f')](_0x492a29)[_0xae50('0x3e')](function(_0x41bb26){_0x185daf[_0xae50('0x1f')]=_0x41bb26;if(_0x46282b[_0xae50('0x2e')][_0xae50('0x3f')]){_0x5c22e6['include']=[{'all':!![]}];}return db[_0xae50('0x29')][_0xae50('0x40')](_0x5c22e6);})[_0xae50('0x3e')](function(_0x37f61d){_0x185daf[_0xae50('0x41')]=_0x37f61d;return _0x185daf;})[_0xae50('0x3e')](respondWithFilteredResult(_0x123ca1,_0x5c22e6))[_0xae50('0x42')](handleError(_0x123ca1,null));};exports[_0xae50('0x43')]=function(_0x71c201,_0x1ceb2f){var _0x4135c3={'raw':![],'where':{'id':_0x71c201[_0xae50('0x44')]['id']}},_0x3aaf1f={};_0x3aaf1f['model']=_[_0xae50('0x45')](db[_0xae50('0x29')][_0xae50('0x2a')]);_0x3aaf1f[_0xae50('0x2e')]=_[_0xae50('0x45')](_0x71c201[_0xae50('0x2e')]);_0x3aaf1f[_0xae50('0x2f')]=_[_0xae50('0x30')](_0x3aaf1f['model'],_0x3aaf1f[_0xae50('0x2e')]);_0x4135c3[_0xae50('0x32')]=_[_0xae50('0x30')](_0x3aaf1f[_0xae50('0x31')],qs[_0xae50('0x33')](_0x71c201[_0xae50('0x2e')][_0xae50('0x33')]));_0x4135c3[_0xae50('0x32')]=_0x4135c3[_0xae50('0x32')][_0xae50('0x34')]?_0x4135c3['attributes']:_0x3aaf1f[_0xae50('0x31')];if(_0x71c201[_0xae50('0x2e')][_0xae50('0x3f')]){_0x4135c3[_0xae50('0x46')]=[{'all':!![]}];}_0x4135c3=_[_0xae50('0x3c')]({},_0x4135c3,_0x71c201['options']);return db['AnalyticFieldReport']['find'](_0x4135c3)[_0xae50('0x3e')](handleEntityNotFound(_0x1ceb2f,null))['then'](respondWithResult(_0x1ceb2f,null))[_0xae50('0x42')](handleError(_0x1ceb2f,null));};exports[_0xae50('0x47')]=function(_0x39f8c3,_0x5897d9){return db[_0xae50('0x29')][_0xae50('0x47')](_0x39f8c3[_0xae50('0x48')],{})[_0xae50('0x3e')](respondWithResult(_0x5897d9,0xc9))['catch'](handleError(_0x5897d9,null));};exports['bulkCreate']=function(_0x45dcfc,_0xa0966c){return db[_0xae50('0x29')]['bulkCreate'](_0x45dcfc[_0xae50('0x48')],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0xa0966c,0xc9))[_0xae50('0x42')](handleError(_0xa0966c,null));};exports[_0xae50('0x23')]=function(_0x2715b0,_0x298b58){if(_0x2715b0[_0xae50('0x48')]['id']){delete _0x2715b0['body']['id'];}return db[_0xae50('0x29')][_0xae50('0x49')]({'where':{'id':_0x2715b0[_0xae50('0x44')]['id']}})['then'](handleEntityNotFound(_0x298b58,null))['then'](saveUpdates(_0x2715b0['body'],null))[_0xae50('0x3e')](respondWithResult(_0x298b58,null))['catch'](handleError(_0x298b58,null));};exports[_0xae50('0x24')]=function(_0x1ba142,_0x309d8a){return db['AnalyticFieldReport'][_0xae50('0x49')]({'where':{'id':_0x1ba142[_0xae50('0x44')]['id']}})[_0xae50('0x3e')](handleEntityNotFound(_0x309d8a,null))['then'](removeEntity(_0x309d8a,null))[_0xae50('0x42')](handleError(_0x309d8a,null));};exports[_0xae50('0x4a')]=function(_0x525606,_0x10d03c){return db[_0xae50('0x29')][_0xae50('0x24')]({'where':{'id':_0x525606[_0xae50('0x2e')]['ids']||[]},'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x10d03c,0xcc))['catch'](handleError(_0x10d03c,null));};exports['addFields']=function(_0x4eb21d,_0x7bea9f,_0x6e6436){return db['AnalyticCustomReport'][_0xae50('0x4b')]({'where':{'id':_0x4eb21d['params']['id']}})['then'](handleEntityNotFound(_0x7bea9f,null))['then'](function(_0x59fa35){if(_0x59fa35){return db[_0xae50('0x4c')][_0xae50('0x4d')](function(_0x408b13){return db[_0xae50('0x29')][_0xae50('0x24')]({'where':{'CustomReportId':_0x4eb21d[_0xae50('0x44')]['id']},'transaction':_0x408b13})['then'](function(_0x57d968){var _0x566bdb=_[_0xae50('0x28')](_0x4eb21d[_0xae50('0x48')],function(_0x5982d0){delete _0x5982d0['id'];_0x5982d0[_0xae50('0x4e')]=_0x4eb21d[_0xae50('0x44')]['id'];return _0x5982d0;});return db['AnalyticFieldReport']['bulkCreate'](_0x566bdb,{'transaction':_0x408b13});});})['then'](function(){return db[_0xae50('0x29')][_0xae50('0x40')]({'where':{'CustomReportId':_0x4eb21d[_0xae50('0x44')]['id']}});});}})[_0xae50('0x3e')](respondWithResult(_0x7bea9f,null))[_0xae50('0x42')](handleError(_0x7bea9f,null));};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js
index ac6b132..ef9e257 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.model.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcc81=['define','AnalyticFieldReport','analytics_report_fields','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./analyticFieldReport.attributes','exports'];(function(_0x1f4e23,_0x3115f8){var _0x402870=function(_0xfee0d8){while(--_0xfee0d8){_0x1f4e23['push'](_0x1f4e23['shift']());}};_0x402870(++_0x3115f8);}(_0xcc81,0x16b));var _0x1cc8=function(_0x17df16,_0x84c577){_0x17df16=_0x17df16-0x0;var _0x1ba549=_0xcc81[_0x17df16];return _0x1ba549;};'use strict';var _=require('lodash');var util=require(_0x1cc8('0x0'));var logger=require(_0x1cc8('0x1'))(_0x1cc8('0x2'));var moment=require(_0x1cc8('0x3'));var BPromise=require(_0x1cc8('0x4'));var rp=require(_0x1cc8('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1cc8('0x6'));var config=require('../../config/environment');var attributes=require(_0x1cc8('0x7'));module[_0x1cc8('0x8')]=function(_0x4b20c1,_0x21e5fa){return _0x4b20c1[_0x1cc8('0x9')](_0x1cc8('0xa'),attributes,{'tableName':_0x1cc8('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb4aa=['lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./analyticFieldReport.attributes','analytics_report_fields'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xb4aa,0x12c));var _0xab4a=function(_0x502642,_0x5988bb){_0x502642=_0x502642-0x0;var _0x109b0f=_0xb4aa[_0x502642];return _0x109b0f;};'use strict';var _=require(_0xab4a('0x0'));var util=require('util');var logger=require(_0xab4a('0x1'))(_0xab4a('0x2'));var moment=require('moment');var BPromise=require(_0xab4a('0x3'));var rp=require(_0xab4a('0x4'));var fs=require('fs');var path=require(_0xab4a('0x5'));var rimraf=require(_0xab4a('0x6'));var config=require(_0xab4a('0x7'));var attributes=require(_0xab4a('0x8'));module['exports']=function(_0x5d5d28,_0x1d42c7){return _0x5d5d28['define']('AnalyticFieldReport',attributes,{'tableName':_0xab4a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.rpc.js b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
index 9659f11..90f382f 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.rpc.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x42e5=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x3ff4a3,_0xa5bfa6){var _0x38676f=function(_0x3ab2b1){while(--_0x3ab2b1){_0x3ff4a3['push'](_0x3ff4a3['shift']());}};_0x38676f(++_0xa5bfa6);}(_0x42e5,0xa9));var _0x542e=function(_0x70a4e2,_0x1b833a){_0x70a4e2=_0x70a4e2-0x0;var _0x4d1d1e=_0x42e5[_0x70a4e2];return _0x4d1d1e;};'use strict';var _=require(_0x542e('0x0'));var util=require(_0x542e('0x1'));var moment=require(_0x542e('0x2'));var BPromise=require(_0x542e('0x3'));var rs=require(_0x542e('0x4'));var fs=require('fs');var Redis=require(_0x542e('0x5'));var db=require(_0x542e('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x542e('0x7'))(_0x542e('0x8'));var config=require(_0x542e('0x9'));var jayson=require(_0x542e('0xa'));var client=jayson[_0x542e('0xb')][_0x542e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x517227,_0x4f334d,_0x43d194){return new BPromise(function(_0x360481,_0x71c894){return client[_0x542e('0xd')](_0x517227,_0x43d194)[_0x542e('0xe')](function(_0x29d13e){logger[_0x542e('0xf')](_0x542e('0x10'),_0x4f334d,'request\x20sent');logger[_0x542e('0x11')](_0x542e('0x12'),_0x4f334d,_0x542e('0x13'),JSON[_0x542e('0x14')](_0x29d13e));if(_0x29d13e['error']){if(_0x29d13e[_0x542e('0x15')]['code']===0x1f4){logger[_0x542e('0x15')](_0x542e('0x10'),_0x4f334d,_0x29d13e[_0x542e('0x15')][_0x542e('0x16')]);return _0x71c894(_0x29d13e['error'][_0x542e('0x16')]);}logger['error'](_0x542e('0x10'),_0x4f334d,_0x29d13e[_0x542e('0x15')][_0x542e('0x16')]);return _0x360481(_0x29d13e[_0x542e('0x15')][_0x542e('0x16')]);}else{logger[_0x542e('0xf')](_0x542e('0x10'),_0x4f334d,_0x542e('0x13'));_0x360481(_0x29d13e[_0x542e('0x17')][_0x542e('0x16')]);}})[_0x542e('0x18')](function(_0x229242){logger[_0x542e('0x15')](_0x542e('0x10'),_0x4f334d,_0x229242);_0x71c894(_0x229242);});});}
\ No newline at end of file
+var _0x71c0=['error','code','message','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x4f53a6,_0x582ff5){var _0x30e4b7=function(_0x1aaf04){while(--_0x1aaf04){_0x4f53a6['push'](_0x4f53a6['shift']());}};_0x30e4b7(++_0x582ff5);}(_0x71c0,0x118));var _0x071c=function(_0x24abec,_0x30ff71){_0x24abec=_0x24abec-0x0;var _0x132716=_0x71c0[_0x24abec];return _0x132716;};'use strict';var _=require(_0x071c('0x0'));var util=require(_0x071c('0x1'));var moment=require(_0x071c('0x2'));var BPromise=require(_0x071c('0x3'));var rs=require(_0x071c('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x071c('0x5'))['db'];var utils=require(_0x071c('0x6'));var logger=require(_0x071c('0x7'))(_0x071c('0x8'));var config=require(_0x071c('0x9'));var jayson=require(_0x071c('0xa'));var client=jayson['client'][_0x071c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x12cf52,_0x4ccd7e,_0x522107){return new BPromise(function(_0x111f03,_0x41d46c){return client['request'](_0x12cf52,_0x522107)[_0x071c('0xc')](function(_0x134f12){logger[_0x071c('0xd')](_0x071c('0xe'),_0x4ccd7e,_0x071c('0xf'));logger[_0x071c('0x10')](_0x071c('0x11'),_0x4ccd7e,'request\x20sent',JSON[_0x071c('0x12')](_0x134f12));if(_0x134f12[_0x071c('0x13')]){if(_0x134f12['error'][_0x071c('0x14')]===0x1f4){logger[_0x071c('0x13')]('AnalyticFieldReport,\x20%s,\x20%s',_0x4ccd7e,_0x134f12[_0x071c('0x13')][_0x071c('0x15')]);return _0x41d46c(_0x134f12[_0x071c('0x13')][_0x071c('0x15')]);}logger[_0x071c('0x13')](_0x071c('0xe'),_0x4ccd7e,_0x134f12[_0x071c('0x13')][_0x071c('0x15')]);return _0x111f03(_0x134f12[_0x071c('0x13')]['message']);}else{logger['info'](_0x071c('0xe'),_0x4ccd7e,_0x071c('0xf'));_0x111f03(_0x134f12['result'][_0x071c('0x15')]);}})[_0x071c('0x16')](function(_0xdc5c4d){logger[_0x071c('0x13')](_0x071c('0xe'),_0x4ccd7e,_0xdc5c4d);_0x41d46c(_0xdc5c4d);});});}
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js
index 69a8ac5..bf9556e 100644
--- a/server/api/analyticFieldReport/index.js
+++ b/server/api/analyticFieldReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0x2aa05a,_0x3ed849){var _0x56e0a2=function(_0x556233){while(--_0x556233){_0x2aa05a['push'](_0x2aa05a['shift']());}};_0x56e0a2(++_0x3ed849);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0xa9e0[_0x2f3848];return _0x102668;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router;
\ No newline at end of file
+var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0x5aee33,_0x40d82e){var _0x1f35d4=function(_0x46f266){while(--_0x46f266){_0x5aee33['push'](_0x5aee33['shift']());}};_0x1f35d4(++_0x40d82e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1b828b,_0x344400){_0x1b828b=_0x1b828b-0x0;var _0x98da1a=_0xa9e0[_0x1b828b];return _0x98da1a;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.attributes.js b/server/api/analyticMetric/analyticMetric.attributes.js
index 1d5a911..b986f3d 100644
--- a/server/api/analyticMetric/analyticMetric.attributes.js
+++ b/server/api/analyticMetric/analyticMetric.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0427=['name','TEXT','STRING'];(function(_0x14faf6,_0x4ad659){var _0x5e34c0=function(_0x55f1e6){while(--_0x55f1e6){_0x14faf6['push'](_0x14faf6['shift']());}};_0x5e34c0(++_0x4ad659);}(_0x0427,0x137));var _0x7042=function(_0x1064b8,_0x32e8ac){_0x1064b8=_0x1064b8-0x0;var _0x4a53bd=_0x0427[_0x1064b8];return _0x4a53bd;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x7042('0x0')],'allowNull':![],'unique':_0x7042('0x1')},'table':{'type':Sequelize['STRING']},'metric':{'type':Sequelize[_0x7042('0x2')]},'description':{'type':Sequelize[_0x7042('0x0')]}};
\ No newline at end of file
+var _0x9354=['exports','STRING','TEXT'];(function(_0x424a9a,_0x2dd9af){var _0xa7831c=function(_0x512534){while(--_0x512534){_0x424a9a['push'](_0x424a9a['shift']());}};_0xa7831c(++_0x2dd9af);}(_0x9354,0x96));var _0x4935=function(_0x381d3c,_0x4bc7d0){_0x381d3c=_0x381d3c-0x0;var _0x12542e=_0x9354[_0x381d3c];return _0x12542e;};'use strict';var Sequelize=require('sequelize');module[_0x4935('0x0')]={'name':{'type':Sequelize[_0x4935('0x1')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0x4935('0x1')]},'metric':{'type':Sequelize[_0x4935('0x2')]},'description':{'type':Sequelize[_0x4935('0x1')]}};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js
index ca82f39..4ee9e3a 100644
--- a/server/api/analyticMetric/analyticMetric.controller.js
+++ b/server/api/analyticMetric/analyticMetric.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1cb9=['user','Unable\x20to\x20retrieve\x20the\x20current\x20user','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','Content-Range','json','reject','save','update','then','destroy','get','Metrics','error','stack','name','send','index','map','AnalyticMetric','rawAttributes','fieldName','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','filter','options','includeAll','include','findAll','show','params','keys','length','find','catch'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1cb9,0x14e));var _0x91cb=function(_0x183d81,_0x571915){_0x183d81=_0x183d81-0x0;var _0x14963b=_0x1cb9[_0x183d81];return _0x14963b;};'use strict';var emlformat=require(_0x91cb('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x91cb('0x1'));var jsonpatch=require(_0x91cb('0x2'));var rp=require(_0x91cb('0x3'));var moment=require(_0x91cb('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x91cb('0x5'));var util=require(_0x91cb('0x6'));var path=require('path');var sox=require(_0x91cb('0x7'));var csv=require(_0x91cb('0x8'));var ejs=require(_0x91cb('0x9'));var fs=require('fs');var fs_extra=require(_0x91cb('0xa'));var _=require(_0x91cb('0xb'));var squel=require(_0x91cb('0xc'));var crypto=require('crypto');var jsforce=require(_0x91cb('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x91cb('0x8'));var querystring=require('querystring');var Papa=require(_0x91cb('0xe'));var Redis=require(_0x91cb('0xf'));var authService=require(_0x91cb('0x10'));var qs=require(_0x91cb('0x11'));var as=require(_0x91cb('0x12'));var hardwareService=require(_0x91cb('0x13'));var logger=require(_0x91cb('0x14'))(_0x91cb('0x15'));var utils=require(_0x91cb('0x16'));var config=require(_0x91cb('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x91cb('0x18'))['db'];function respondWithStatusCode(_0x366f09,_0x4ba2f2){_0x4ba2f2=_0x4ba2f2||0xcc;return function(_0x20e6e0){if(_0x20e6e0){return _0x366f09[_0x91cb('0x19')](_0x4ba2f2);}return _0x366f09[_0x91cb('0x1a')](_0x4ba2f2)[_0x91cb('0x1b')]();};}function respondWithResult(_0x4a7d45,_0x4cc6ef){_0x4cc6ef=_0x4cc6ef||0xc8;return function(_0x4aae25){if(_0x4aae25){return _0x4a7d45[_0x91cb('0x1a')](_0x4cc6ef)['json'](_0x4aae25);}};}function respondWithFilteredResult(_0x528f73,_0x576369){return function(_0xc3629e){if(_0xc3629e){var _0x347980=typeof _0x576369['offset']===_0x91cb('0x1c')&&typeof _0x576369[_0x91cb('0x1d')]==='undefined';var _0xc594e3=_0xc3629e[_0x91cb('0x1e')];var _0x1cd34b=_0x347980?0x0:_0x576369[_0x91cb('0x1f')];var _0x5cc1c3=_0x347980?_0xc3629e[_0x91cb('0x1e')]:_0x576369[_0x91cb('0x1f')]+_0x576369['limit'];var _0x123847;if(_0x5cc1c3>=_0xc594e3){_0x5cc1c3=_0xc594e3;_0x123847=0xc8;}else{_0x123847=0xce;}_0x528f73['status'](_0x123847);return _0x528f73['set'](_0x91cb('0x20'),_0x1cd34b+'-'+_0x5cc1c3+'/'+_0xc594e3)[_0x91cb('0x21')](_0xc3629e);}return null;};}function patchUpdates(_0x56e409){return function(_0x51a1d5){try{jsonpatch['apply'](_0x51a1d5,_0x56e409,!![]);}catch(_0x438162){return BPromise[_0x91cb('0x22')](_0x438162);}return _0x51a1d5[_0x91cb('0x23')]();};}function saveUpdates(_0x1dbee2,_0x5c6a15){return function(_0x45c4b3){if(_0x45c4b3){return _0x45c4b3[_0x91cb('0x24')](_0x1dbee2)[_0x91cb('0x25')](function(_0x55fa78){return _0x55fa78;});}return null;};}function removeEntity(_0x26f18f,_0x1a7a54){return function(_0x2447e7){if(_0x2447e7){return _0x2447e7[_0x91cb('0x26')]()[_0x91cb('0x25')](function(){var _0x7ad361=_0x2447e7[_0x91cb('0x27')]({'plain':!![]});var _0x423c4f=_0x91cb('0x28');return db['UserProfileResource']['destroy']({'where':{'type':_0x423c4f,'resourceId':_0x7ad361['id']}})[_0x91cb('0x25')](function(){return _0x2447e7;});})['then'](function(){_0x26f18f[_0x91cb('0x1a')](0xcc)[_0x91cb('0x1b')]();});}};}function handleEntityNotFound(_0x318031,_0x5595c5){return function(_0x9b26a6){if(!_0x9b26a6){_0x318031['sendStatus'](0x194);}return _0x9b26a6;};}function handleError(_0x4572f6,_0x308e8c){_0x308e8c=_0x308e8c||0x1f4;return function(_0x3b3ee6){logger[_0x91cb('0x29')](_0x3b3ee6[_0x91cb('0x2a')]);if(_0x3b3ee6['name']){delete _0x3b3ee6[_0x91cb('0x2b')];}_0x4572f6['status'](_0x308e8c)[_0x91cb('0x2c')](_0x3b3ee6);};}exports[_0x91cb('0x2d')]=function(_0x445fe1,_0x4944bd){var _0x775c25={},_0x146e1f={},_0x25bbf9={'count':0x0,'rows':[]};var _0x361e4c=_[_0x91cb('0x2e')](db[_0x91cb('0x2f')][_0x91cb('0x30')],function(_0x3bbde3){return{'name':_0x3bbde3[_0x91cb('0x31')],'type':_0x3bbde3['type'][_0x91cb('0x32')]};});_0x146e1f[_0x91cb('0x33')]=_[_0x91cb('0x2e')](_0x361e4c,_0x91cb('0x2b'));_0x146e1f[_0x91cb('0x34')]=_['keys'](_0x445fe1[_0x91cb('0x34')]);_0x146e1f[_0x91cb('0x35')]=_[_0x91cb('0x36')](_0x146e1f[_0x91cb('0x33')],_0x146e1f[_0x91cb('0x34')]);_0x775c25['attributes']=_[_0x91cb('0x36')](_0x146e1f['model'],qs['fields'](_0x445fe1['query'][_0x91cb('0x37')]));_0x775c25['attributes']=_0x775c25[_0x91cb('0x38')]['length']?_0x775c25['attributes']:_0x146e1f[_0x91cb('0x33')];if(!_0x445fe1[_0x91cb('0x34')][_0x91cb('0x39')](_0x91cb('0x3a'))){_0x775c25[_0x91cb('0x1d')]=qs['limit'](_0x445fe1[_0x91cb('0x34')][_0x91cb('0x1d')]);_0x775c25[_0x91cb('0x1f')]=qs[_0x91cb('0x1f')](_0x445fe1['query']['offset']);}_0x775c25[_0x91cb('0x3b')]=qs[_0x91cb('0x3c')](_0x445fe1['query'][_0x91cb('0x3c')]);_0x775c25[_0x91cb('0x3d')]=qs['filters'](_[_0x91cb('0x3e')](_0x445fe1[_0x91cb('0x34')],_0x146e1f['filters']),_0x361e4c);if(_0x445fe1[_0x91cb('0x34')]['filter']){_0x775c25[_0x91cb('0x3d')]=_[_0x91cb('0x3f')](_0x775c25[_0x91cb('0x3d')],{'$or':_[_0x91cb('0x2e')](_0x361e4c,function(_0x51d0ea){if(_0x51d0ea[_0x91cb('0x40')]!=='VIRTUAL'){var _0xa90111={};_0xa90111[_0x51d0ea[_0x91cb('0x2b')]]={'$like':'%'+_0x445fe1['query'][_0x91cb('0x41')]+'%'};return _0xa90111;}})});}_0x775c25=_['merge']({},_0x775c25,_0x445fe1[_0x91cb('0x42')]);var _0x2eac87={'where':_0x775c25[_0x91cb('0x3d')]};return db[_0x91cb('0x2f')]['count'](_0x2eac87)[_0x91cb('0x25')](function(_0x5af0e6){_0x25bbf9[_0x91cb('0x1e')]=_0x5af0e6;if(_0x445fe1[_0x91cb('0x34')][_0x91cb('0x43')]){_0x775c25[_0x91cb('0x44')]=[{'all':!![]}];}return db[_0x91cb('0x2f')][_0x91cb('0x45')](_0x775c25);})[_0x91cb('0x25')](function(_0x3cc4c1){_0x25bbf9['rows']=_0x3cc4c1;return _0x25bbf9;})[_0x91cb('0x25')](respondWithFilteredResult(_0x4944bd,_0x775c25))['catch'](handleError(_0x4944bd,null));};exports[_0x91cb('0x46')]=function(_0x5537a0,_0x335879){var _0x52e82c={'raw':!![],'where':{'id':_0x5537a0[_0x91cb('0x47')]['id']}},_0x138f48={};_0x138f48[_0x91cb('0x33')]=_[_0x91cb('0x48')](db['AnalyticMetric'][_0x91cb('0x30')]);_0x138f48[_0x91cb('0x34')]=_['keys'](_0x5537a0[_0x91cb('0x34')]);_0x138f48[_0x91cb('0x35')]=_[_0x91cb('0x36')](_0x138f48[_0x91cb('0x33')],_0x138f48[_0x91cb('0x34')]);_0x52e82c[_0x91cb('0x38')]=_[_0x91cb('0x36')](_0x138f48[_0x91cb('0x33')],qs[_0x91cb('0x37')](_0x5537a0['query'][_0x91cb('0x37')]));_0x52e82c[_0x91cb('0x38')]=_0x52e82c[_0x91cb('0x38')][_0x91cb('0x49')]?_0x52e82c[_0x91cb('0x38')]:_0x138f48[_0x91cb('0x33')];if(_0x5537a0[_0x91cb('0x34')][_0x91cb('0x43')]){_0x52e82c['include']=[{'all':!![]}];}_0x52e82c=_[_0x91cb('0x3f')]({},_0x52e82c,_0x5537a0[_0x91cb('0x42')]);return db[_0x91cb('0x2f')][_0x91cb('0x4a')](_0x52e82c)['then'](handleEntityNotFound(_0x335879,null))[_0x91cb('0x25')](respondWithResult(_0x335879,null))[_0x91cb('0x4b')](handleError(_0x335879,null));};exports['create']=function(_0x212473,_0x47cdb7){return db[_0x91cb('0x2f')]['create'](_0x212473['body'],{})['then'](function(_0x98245b){var _0xff3d11=_0x212473[_0x91cb('0x4c')][_0x91cb('0x27')]({'plain':!![]});if(!_0xff3d11)throw new Error(_0x91cb('0x4d'));if(_0xff3d11['role']==='user'){var _0x1d26b8=_0x98245b[_0x91cb('0x27')]({'plain':!![]});var _0x140994=_0x91cb('0x28');return db['UserProfileSection']['find']({'where':{'name':_0x140994,'userProfileId':_0xff3d11['userProfileId']},'raw':!![]})[_0x91cb('0x25')](function(_0x490417){if(_0x490417&&_0x490417[_0x91cb('0x4e')]===0x0){return db['UserProfileResource'][_0x91cb('0x4f')]({'name':_0x1d26b8[_0x91cb('0x2b')],'resourceId':_0x1d26b8['id'],'type':_0x490417[_0x91cb('0x2b')],'sectionId':_0x490417['id']},{})[_0x91cb('0x25')](function(){return _0x98245b;});}else{return _0x98245b;}})[_0x91cb('0x4b')](function(_0x362532){logger[_0x91cb('0x29')](_0x91cb('0x50'),_0x362532);throw _0x362532;});}return _0x98245b;})[_0x91cb('0x25')](respondWithResult(_0x47cdb7,0xc9))[_0x91cb('0x4b')](handleError(_0x47cdb7,null));};exports[_0x91cb('0x24')]=function(_0x5752ed,_0x1e445a){if(_0x5752ed[_0x91cb('0x51')]['id']){delete _0x5752ed['body']['id'];}return db[_0x91cb('0x2f')][_0x91cb('0x4a')]({'where':{'id':_0x5752ed['params']['id']}})[_0x91cb('0x25')](handleEntityNotFound(_0x1e445a,null))[_0x91cb('0x25')](saveUpdates(_0x5752ed[_0x91cb('0x51')],null))[_0x91cb('0x25')](respondWithResult(_0x1e445a,null))[_0x91cb('0x4b')](handleError(_0x1e445a,null));};exports[_0x91cb('0x26')]=function(_0x1d4b96,_0x274fff){return db[_0x91cb('0x2f')][_0x91cb('0x4a')]({'where':{'id':_0x1d4b96[_0x91cb('0x47')]['id']}})['then'](handleEntityNotFound(_0x274fff,null))[_0x91cb('0x25')](removeEntity(_0x274fff,null))['catch'](handleError(_0x274fff,null));};
\ No newline at end of file
+var _0xdbf5=['../../components/parsers/advancedSearch','api','../../config/license/util','sendStatus','status','json','offset','undefined','count','set','Content-Range','save','update','then','destroy','get','Metrics','UserProfileResource','end','error','name','send','index','rawAttributes','fieldName','type','key','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','map','VIRTUAL','AnalyticMetric','includeAll','include','findAll','rows','catch','show','keys','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service'];(function(_0x5a103c,_0x17693f){var _0x31a685=function(_0x3ac647){while(--_0x3ac647){_0x5a103c['push'](_0x5a103c['shift']());}};_0x31a685(++_0x17693f);}(_0xdbf5,0x18c));var _0x5dbf=function(_0xa410cc,_0x4c49e2){_0xa410cc=_0xa410cc-0x0;var _0x2d615c=_0xdbf5[_0xa410cc];return _0x2d615c;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5dbf('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x5dbf('0x1'));var moment=require(_0x5dbf('0x2'));var BPromise=require(_0x5dbf('0x3'));var Mustache=require(_0x5dbf('0x4'));var util=require(_0x5dbf('0x5'));var path=require(_0x5dbf('0x6'));var sox=require(_0x5dbf('0x7'));var csv=require(_0x5dbf('0x8'));var ejs=require(_0x5dbf('0x9'));var fs=require('fs');var fs_extra=require(_0x5dbf('0xa'));var _=require(_0x5dbf('0xb'));var squel=require(_0x5dbf('0xc'));var crypto=require(_0x5dbf('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x5dbf('0xe'));var toCsv=require('to-csv');var querystring=require(_0x5dbf('0xf'));var Papa=require(_0x5dbf('0x10'));var Redis=require(_0x5dbf('0x11'));var authService=require(_0x5dbf('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x5dbf('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x5dbf('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x5dbf('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x182cec,_0x2bb7ed){_0x2bb7ed=_0x2bb7ed||0xcc;return function(_0x1453a9){if(_0x1453a9){return _0x182cec[_0x5dbf('0x16')](_0x2bb7ed);}return _0x182cec[_0x5dbf('0x17')](_0x2bb7ed)['end']();};}function respondWithResult(_0x4803ca,_0x2b4e1c){_0x2b4e1c=_0x2b4e1c||0xc8;return function(_0x3480c8){if(_0x3480c8){return _0x4803ca['status'](_0x2b4e1c)[_0x5dbf('0x18')](_0x3480c8);}};}function respondWithFilteredResult(_0x248e3c,_0x23f763){return function(_0x2dfa44){if(_0x2dfa44){var _0x181816=typeof _0x23f763[_0x5dbf('0x19')]===_0x5dbf('0x1a')&&typeof _0x23f763['limit']==='undefined';var _0x16dc82=_0x2dfa44[_0x5dbf('0x1b')];var _0x39c7aa=_0x181816?0x0:_0x23f763[_0x5dbf('0x19')];var _0x20c2b0=_0x181816?_0x2dfa44['count']:_0x23f763[_0x5dbf('0x19')]+_0x23f763['limit'];var _0x565efa;if(_0x20c2b0>=_0x16dc82){_0x20c2b0=_0x16dc82;_0x565efa=0xc8;}else{_0x565efa=0xce;}_0x248e3c['status'](_0x565efa);return _0x248e3c[_0x5dbf('0x1c')](_0x5dbf('0x1d'),_0x39c7aa+'-'+_0x20c2b0+'/'+_0x16dc82)[_0x5dbf('0x18')](_0x2dfa44);}return null;};}function patchUpdates(_0x2ab57c){return function(_0x1e3cce){try{jsonpatch['apply'](_0x1e3cce,_0x2ab57c,!![]);}catch(_0x2764ea){return BPromise['reject'](_0x2764ea);}return _0x1e3cce[_0x5dbf('0x1e')]();};}function saveUpdates(_0x11cc67,_0x14d133){return function(_0x43a612){if(_0x43a612){return _0x43a612[_0x5dbf('0x1f')](_0x11cc67)[_0x5dbf('0x20')](function(_0x58085e){return _0x58085e;});}return null;};}function removeEntity(_0x4027c3,_0x3e3a2d){return function(_0x2d3e1b){if(_0x2d3e1b){return _0x2d3e1b[_0x5dbf('0x21')]()[_0x5dbf('0x20')](function(){var _0x226b93=_0x2d3e1b[_0x5dbf('0x22')]({'plain':!![]});var _0x20ab1b=_0x5dbf('0x23');return db[_0x5dbf('0x24')][_0x5dbf('0x21')]({'where':{'type':_0x20ab1b,'resourceId':_0x226b93['id']}})[_0x5dbf('0x20')](function(){return _0x2d3e1b;});})[_0x5dbf('0x20')](function(){_0x4027c3[_0x5dbf('0x17')](0xcc)[_0x5dbf('0x25')]();});}};}function handleEntityNotFound(_0x17f135,_0x466985){return function(_0x3f8341){if(!_0x3f8341){_0x17f135[_0x5dbf('0x16')](0x194);}return _0x3f8341;};}function handleError(_0x22ec42,_0x6a9757){_0x6a9757=_0x6a9757||0x1f4;return function(_0x471027){logger[_0x5dbf('0x26')](_0x471027['stack']);if(_0x471027[_0x5dbf('0x27')]){delete _0x471027[_0x5dbf('0x27')];}_0x22ec42[_0x5dbf('0x17')](_0x6a9757)[_0x5dbf('0x28')](_0x471027);};}exports[_0x5dbf('0x29')]=function(_0x6a276d,_0x2a65c5){var _0x31d57a={},_0x406ce6={},_0x273b63={'count':0x0,'rows':[]};var _0x294dd7=_['map'](db['AnalyticMetric'][_0x5dbf('0x2a')],function(_0x19015a){return{'name':_0x19015a[_0x5dbf('0x2b')],'type':_0x19015a[_0x5dbf('0x2c')][_0x5dbf('0x2d')]};});_0x406ce6['model']=_['map'](_0x294dd7,_0x5dbf('0x27'));_0x406ce6[_0x5dbf('0x2e')]=_['keys'](_0x6a276d[_0x5dbf('0x2e')]);_0x406ce6[_0x5dbf('0x2f')]=_[_0x5dbf('0x30')](_0x406ce6[_0x5dbf('0x31')],_0x406ce6[_0x5dbf('0x2e')]);_0x31d57a['attributes']=_[_0x5dbf('0x30')](_0x406ce6[_0x5dbf('0x31')],qs[_0x5dbf('0x32')](_0x6a276d[_0x5dbf('0x2e')][_0x5dbf('0x32')]));_0x31d57a['attributes']=_0x31d57a[_0x5dbf('0x33')][_0x5dbf('0x34')]?_0x31d57a[_0x5dbf('0x33')]:_0x406ce6[_0x5dbf('0x31')];if(!_0x6a276d['query'][_0x5dbf('0x35')](_0x5dbf('0x36'))){_0x31d57a[_0x5dbf('0x37')]=qs[_0x5dbf('0x37')](_0x6a276d[_0x5dbf('0x2e')][_0x5dbf('0x37')]);_0x31d57a[_0x5dbf('0x19')]=qs[_0x5dbf('0x19')](_0x6a276d[_0x5dbf('0x2e')][_0x5dbf('0x19')]);}_0x31d57a[_0x5dbf('0x38')]=qs['sort'](_0x6a276d[_0x5dbf('0x2e')][_0x5dbf('0x39')]);_0x31d57a[_0x5dbf('0x3a')]=qs['filters'](_[_0x5dbf('0x3b')](_0x6a276d[_0x5dbf('0x2e')],_0x406ce6[_0x5dbf('0x2f')]),_0x294dd7);if(_0x6a276d['query'][_0x5dbf('0x3c')]){_0x31d57a[_0x5dbf('0x3a')]=_[_0x5dbf('0x3d')](_0x31d57a['where'],{'$or':_[_0x5dbf('0x3e')](_0x294dd7,function(_0x29a62d){if(_0x29a62d[_0x5dbf('0x2c')]!==_0x5dbf('0x3f')){var _0x10537d={};_0x10537d[_0x29a62d[_0x5dbf('0x27')]]={'$like':'%'+_0x6a276d[_0x5dbf('0x2e')][_0x5dbf('0x3c')]+'%'};return _0x10537d;}})});}_0x31d57a=_['merge']({},_0x31d57a,_0x6a276d['options']);var _0x57ee72={'where':_0x31d57a['where']};return db[_0x5dbf('0x40')][_0x5dbf('0x1b')](_0x57ee72)['then'](function(_0x3ef0eb){_0x273b63[_0x5dbf('0x1b')]=_0x3ef0eb;if(_0x6a276d['query'][_0x5dbf('0x41')]){_0x31d57a[_0x5dbf('0x42')]=[{'all':!![]}];}return db[_0x5dbf('0x40')][_0x5dbf('0x43')](_0x31d57a);})[_0x5dbf('0x20')](function(_0x7c390d){_0x273b63[_0x5dbf('0x44')]=_0x7c390d;return _0x273b63;})[_0x5dbf('0x20')](respondWithFilteredResult(_0x2a65c5,_0x31d57a))[_0x5dbf('0x45')](handleError(_0x2a65c5,null));};exports[_0x5dbf('0x46')]=function(_0x50ac70,_0x78aef3){var _0x22f958={'raw':!![],'where':{'id':_0x50ac70['params']['id']}},_0xec1d28={};_0xec1d28[_0x5dbf('0x31')]=_[_0x5dbf('0x47')](db[_0x5dbf('0x40')][_0x5dbf('0x2a')]);_0xec1d28['query']=_[_0x5dbf('0x47')](_0x50ac70['query']);_0xec1d28[_0x5dbf('0x2f')]=_[_0x5dbf('0x30')](_0xec1d28[_0x5dbf('0x31')],_0xec1d28[_0x5dbf('0x2e')]);_0x22f958['attributes']=_['intersection'](_0xec1d28[_0x5dbf('0x31')],qs[_0x5dbf('0x32')](_0x50ac70[_0x5dbf('0x2e')]['fields']));_0x22f958[_0x5dbf('0x33')]=_0x22f958['attributes']['length']?_0x22f958['attributes']:_0xec1d28['model'];if(_0x50ac70[_0x5dbf('0x2e')][_0x5dbf('0x41')]){_0x22f958['include']=[{'all':!![]}];}_0x22f958=_[_0x5dbf('0x3d')]({},_0x22f958,_0x50ac70[_0x5dbf('0x48')]);return db['AnalyticMetric'][_0x5dbf('0x49')](_0x22f958)[_0x5dbf('0x20')](handleEntityNotFound(_0x78aef3,null))['then'](respondWithResult(_0x78aef3,null))[_0x5dbf('0x45')](handleError(_0x78aef3,null));};exports['create']=function(_0x5ab862,_0x337897){return db[_0x5dbf('0x40')][_0x5dbf('0x4a')](_0x5ab862['body'],{})['then'](function(_0x442a43){var _0x3e8612=_0x5ab862[_0x5dbf('0x4b')][_0x5dbf('0x22')]({'plain':!![]});if(!_0x3e8612)throw new Error(_0x5dbf('0x4c'));if(_0x3e8612[_0x5dbf('0x4d')]===_0x5dbf('0x4b')){var _0x319906=_0x442a43['get']({'plain':!![]});var _0x3f38a0=_0x5dbf('0x23');return db[_0x5dbf('0x4e')][_0x5dbf('0x49')]({'where':{'name':_0x3f38a0,'userProfileId':_0x3e8612[_0x5dbf('0x4f')]},'raw':!![]})[_0x5dbf('0x20')](function(_0x328dc5){if(_0x328dc5&&_0x328dc5['autoAssociation']===0x0){return db[_0x5dbf('0x24')]['create']({'name':_0x319906[_0x5dbf('0x27')],'resourceId':_0x319906['id'],'type':_0x328dc5[_0x5dbf('0x27')],'sectionId':_0x328dc5['id']},{})[_0x5dbf('0x20')](function(){return _0x442a43;});}else{return _0x442a43;}})[_0x5dbf('0x45')](function(_0x78ab84){logger[_0x5dbf('0x26')](_0x5dbf('0x50'),_0x78ab84);throw _0x78ab84;});}return _0x442a43;})['then'](respondWithResult(_0x337897,0xc9))['catch'](handleError(_0x337897,null));};exports['update']=function(_0x1e1876,_0xfdacc7){if(_0x1e1876[_0x5dbf('0x51')]['id']){delete _0x1e1876['body']['id'];}return db['AnalyticMetric'][_0x5dbf('0x49')]({'where':{'id':_0x1e1876[_0x5dbf('0x52')]['id']}})[_0x5dbf('0x20')](handleEntityNotFound(_0xfdacc7,null))['then'](saveUpdates(_0x1e1876[_0x5dbf('0x51')],null))['then'](respondWithResult(_0xfdacc7,null))[_0x5dbf('0x45')](handleError(_0xfdacc7,null));};exports[_0x5dbf('0x21')]=function(_0x2145ea,_0x5da14b){return db['AnalyticMetric'][_0x5dbf('0x49')]({'where':{'id':_0x2145ea[_0x5dbf('0x52')]['id']}})[_0x5dbf('0x20')](handleEntityNotFound(_0x5da14b,null))[_0x5dbf('0x20')](removeEntity(_0x5da14b,null))['catch'](handleError(_0x5da14b,null));};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js
index 436d3a3..4a10732 100644
--- a/server/api/analyticMetric/analyticMetric.model.js
+++ b/server/api/analyticMetric/analyticMetric.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbd0a=['analytics_metrics','lodash','../../config/logger','request-promise','path','rimraf','../../config/environment','./analyticMetric.attributes','exports','define'];(function(_0x340380,_0x4bd2a8){var _0x49ce1c=function(_0x4cb9e2){while(--_0x4cb9e2){_0x340380['push'](_0x340380['shift']());}};_0x49ce1c(++_0x4bd2a8);}(_0xbd0a,0x1b9));var _0xabd0=function(_0xcc314d,_0x14c072){_0xcc314d=_0xcc314d-0x0;var _0x1e4ede=_0xbd0a[_0xcc314d];return _0x1e4ede;};'use strict';var _=require(_0xabd0('0x0'));var util=require('util');var logger=require(_0xabd0('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xabd0('0x2'));var fs=require('fs');var path=require(_0xabd0('0x3'));var rimraf=require(_0xabd0('0x4'));var config=require(_0xabd0('0x5'));var attributes=require(_0xabd0('0x6'));module[_0xabd0('0x7')]=function(_0x221368,_0xb41697){return _0x221368[_0xabd0('0x8')]('AnalyticMetric',attributes,{'tableName':_0xabd0('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3595=['define','AnalyticMetric','analytics_metrics','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x4e36e5,_0x5c2728){var _0x23cb91=function(_0x4740b5){while(--_0x4740b5){_0x4e36e5['push'](_0x4e36e5['shift']());}};_0x23cb91(++_0x5c2728);}(_0x3595,0x147));var _0x5359=function(_0x33501a,_0x110e40){_0x33501a=_0x33501a-0x0;var _0x3fb639=_0x3595[_0x33501a];return _0x3fb639;};'use strict';var _=require(_0x5359('0x0'));var util=require(_0x5359('0x1'));var logger=require(_0x5359('0x2'))('api');var moment=require(_0x5359('0x3'));var BPromise=require(_0x5359('0x4'));var rp=require(_0x5359('0x5'));var fs=require('fs');var path=require(_0x5359('0x6'));var rimraf=require(_0x5359('0x7'));var config=require(_0x5359('0x8'));var attributes=require('./analyticMetric.attributes');module['exports']=function(_0x1cb891,_0x24545a){return _0x1cb891[_0x5359('0x9')](_0x5359('0xa'),attributes,{'tableName':_0x5359('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.rpc.js b/server/api/analyticMetric/analyticMetric.rpc.js
index e52c53a..ba9fc87 100644
--- a/server/api/analyticMetric/analyticMetric.rpc.js
+++ b/server/api/analyticMetric/analyticMetric.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1242=['../../config/environment','request','then','info','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','AnalyticMetric,\x20%s,\x20%s','message','catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x5503a0,_0xf122bf){var _0x4b29ca=function(_0x2a35dd){while(--_0x2a35dd){_0x5503a0['push'](_0x5503a0['shift']());}};_0x4b29ca(++_0xf122bf);}(_0x1242,0x1c6));var _0x2124=function(_0x4f3dcf,_0x5326f4){_0x4f3dcf=_0x4f3dcf-0x0;var _0x13ed0c=_0x1242[_0x4f3dcf];return _0x13ed0c;};'use strict';var _=require(_0x2124('0x0'));var util=require('util');var moment=require(_0x2124('0x1'));var BPromise=require(_0x2124('0x2'));var rs=require(_0x2124('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2124('0x4'))['db'];var utils=require(_0x2124('0x5'));var logger=require(_0x2124('0x6'))(_0x2124('0x7'));var config=require(_0x2124('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x38e23f,_0x319cbf,_0x50f442){return new BPromise(function(_0x48e3a7,_0x4c16ae){return client[_0x2124('0x9')](_0x38e23f,_0x50f442)[_0x2124('0xa')](function(_0x3b3e2e){logger[_0x2124('0xb')]('AnalyticMetric,\x20%s,\x20%s',_0x319cbf,_0x2124('0xc'));logger[_0x2124('0xd')](_0x2124('0xe'),_0x319cbf,_0x2124('0xc'),JSON[_0x2124('0xf')](_0x3b3e2e));if(_0x3b3e2e[_0x2124('0x10')]){if(_0x3b3e2e['error'][_0x2124('0x11')]===0x1f4){logger[_0x2124('0x10')](_0x2124('0x12'),_0x319cbf,_0x3b3e2e['error']['message']);return _0x4c16ae(_0x3b3e2e[_0x2124('0x10')][_0x2124('0x13')]);}logger[_0x2124('0x10')](_0x2124('0x12'),_0x319cbf,_0x3b3e2e['error']['message']);return _0x48e3a7(_0x3b3e2e[_0x2124('0x10')][_0x2124('0x13')]);}else{logger[_0x2124('0xb')](_0x2124('0x12'),_0x319cbf,_0x2124('0xc'));_0x48e3a7(_0x3b3e2e['result']['message']);}})[_0x2124('0x14')](function(_0x2df3e3){logger[_0x2124('0x10')]('AnalyticMetric,\x20%s,\x20%s',_0x319cbf,_0x2df3e3);_0x4c16ae(_0x2df3e3);});});}
\ No newline at end of file
+var _0xe42b=['lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','code','error','message','AnalyticMetric,\x20%s,\x20%s','catch'];(function(_0x3cbd99,_0x2ac2c3){var _0x54de8d=function(_0x2cbaaf){while(--_0x2cbaaf){_0x3cbd99['push'](_0x3cbd99['shift']());}};_0x54de8d(++_0x2ac2c3);}(_0xe42b,0x12b));var _0xbe42=function(_0x1e21bc,_0x5a5e48){_0x1e21bc=_0x1e21bc-0x0;var _0x53d0df=_0xe42b[_0x1e21bc];return _0x53d0df;};'use strict';var _=require(_0xbe42('0x0'));var util=require(_0xbe42('0x1'));var moment=require(_0xbe42('0x2'));var BPromise=require(_0xbe42('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbe42('0x4'));var db=require(_0xbe42('0x5'))['db'];var utils=require(_0xbe42('0x6'));var logger=require(_0xbe42('0x7'))(_0xbe42('0x8'));var config=require(_0xbe42('0x9'));var jayson=require(_0xbe42('0xa'));var client=jayson[_0xbe42('0xb')][_0xbe42('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x551ea8,_0x529aa8,_0x2099ce){return new BPromise(function(_0x30c133,_0x2fdd51){return client[_0xbe42('0xd')](_0x551ea8,_0x2099ce)['then'](function(_0x56b7d8){logger[_0xbe42('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0x529aa8,_0xbe42('0xf'));logger['debug'](_0xbe42('0x10'),_0x529aa8,_0xbe42('0xf'),JSON[_0xbe42('0x11')](_0x56b7d8));if(_0x56b7d8['error']){if(_0x56b7d8['error'][_0xbe42('0x12')]===0x1f4){logger[_0xbe42('0x13')]('AnalyticMetric,\x20%s,\x20%s',_0x529aa8,_0x56b7d8[_0xbe42('0x13')][_0xbe42('0x14')]);return _0x2fdd51(_0x56b7d8[_0xbe42('0x13')]['message']);}logger['error'](_0xbe42('0x15'),_0x529aa8,_0x56b7d8[_0xbe42('0x13')][_0xbe42('0x14')]);return _0x30c133(_0x56b7d8['error']['message']);}else{logger[_0xbe42('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0x529aa8,_0xbe42('0xf'));_0x30c133(_0x56b7d8['result']['message']);}})[_0xbe42('0x16')](function(_0x59751e){logger[_0xbe42('0x13')](_0xbe42('0x15'),_0x529aa8,_0x59751e);_0x2fdd51(_0x59751e);});});}
\ No newline at end of file
diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js
index 8f4da31..96356f1 100644
--- a/server/api/analyticMetric/index.js
+++ b/server/api/analyticMetric/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x737d=['index','/:id','show','post','put','update','delete','destroy','multer','util','fs-extra','../../components/interaction/service','./analyticMetric.controller','get','isAuthenticated'];(function(_0x388a71,_0x425a15){var _0x28c528=function(_0x5f3d54){while(--_0x5f3d54){_0x388a71['push'](_0x388a71['shift']());}};_0x28c528(++_0x425a15);}(_0x737d,0xbc));var _0xd737=function(_0x207f01,_0x4b3b74){_0x207f01=_0x207f01-0x0;var _0x37ff88=_0x737d[_0x207f01];return _0x37ff88;};'use strict';var multer=require(_0xd737('0x0'));var util=require(_0xd737('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xd737('0x2'));var auth=require('../../components/auth/service');var interaction=require(_0xd737('0x3'));var config=require('../../config/environment');var controller=require(_0xd737('0x4'));router[_0xd737('0x5')]('/',auth[_0xd737('0x6')](),controller[_0xd737('0x7')]);router[_0xd737('0x5')](_0xd737('0x8'),auth[_0xd737('0x6')](),controller[_0xd737('0x9')]);router[_0xd737('0xa')]('/',auth[_0xd737('0x6')](),controller['create']);router[_0xd737('0xb')](_0xd737('0x8'),auth['isAuthenticated'](),controller[_0xd737('0xc')]);router[_0xd737('0xd')]('/:id',auth[_0xd737('0x6')](),controller[_0xd737('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0x4813=['fs-extra','../../components/interaction/service','../../config/environment','./analyticMetric.controller','get','isAuthenticated','/:id','show','post','destroy','exports','multer','util','path','connect-timeout','express','Router'];(function(_0xd5f3e7,_0x10b90d){var _0x85fd74=function(_0x122e6d){while(--_0x122e6d){_0xd5f3e7['push'](_0xd5f3e7['shift']());}};_0x85fd74(++_0x10b90d);}(_0x4813,0x14e));var _0x3481=function(_0xafd2b1,_0x10daef){_0xafd2b1=_0xafd2b1-0x0;var _0x439546=_0x4813[_0xafd2b1];return _0x439546;};'use strict';var multer=require(_0x3481('0x0'));var util=require(_0x3481('0x1'));var path=require(_0x3481('0x2'));var timeout=require(_0x3481('0x3'));var express=require(_0x3481('0x4'));var router=express[_0x3481('0x5')]();var fs_extra=require(_0x3481('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x3481('0x7'));var config=require(_0x3481('0x8'));var controller=require(_0x3481('0x9'));router[_0x3481('0xa')]('/',auth[_0x3481('0xb')](),controller['index']);router['get'](_0x3481('0xc'),auth['isAuthenticated'](),controller[_0x3481('0xd')]);router[_0x3481('0xe')]('/',auth[_0x3481('0xb')](),controller['create']);router['put']('/:id',auth[_0x3481('0xb')](),controller['update']);router['delete'](_0x3481('0xc'),auth[_0x3481('0xb')](),controller[_0x3481('0xf')]);module[_0x3481('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
index a031820..c576237 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.attributes.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xae16=['exports','sequelize'];(function(_0x51bc14,_0x3ee2c6){var _0x469aa3=function(_0x43b32d){while(--_0x43b32d){_0x51bc14['push'](_0x51bc14['shift']());}};_0x469aa3(++_0x3ee2c6);}(_0xae16,0x1c5));var _0x6ae1=function(_0x416c00,_0x24d9f2){_0x416c00=_0x416c00-0x0;var _0x221442=_0xae16[_0x416c00];return _0x221442;};'use strict';var Sequelize=require(_0x6ae1('0x0'));module[_0x6ae1('0x1')]={'tree':{'type':Sequelize['TEXT'],'allowNull':![]}};
\ No newline at end of file
+var _0xdf63=['exports','TEXT'];(function(_0x39f291,_0x669b41){var _0xec9552=function(_0x1f9cd4){while(--_0x1f9cd4){_0x39f291['push'](_0x39f291['shift']());}};_0xec9552(++_0x669b41);}(_0xdf63,0x1ec));var _0x3df6=function(_0x2b68fc,_0x10362e){_0x2b68fc=_0x2b68fc-0x0;var _0x2e3490=_0xdf63[_0x2b68fc];return _0x2e3490;};'use strict';var Sequelize=require('sequelize');module[_0x3df6('0x0')]={'tree':{'type':Sequelize[_0x3df6('0x1')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.controller.js b/server/api/analyticTreeReport/analyticTreeReport.controller.js
index 8e9c1f0..4262d64 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.controller.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd7c4=['path','sox','to-csv','ejs','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','send','index','map','AnalyticTreeReport','rawAttributes','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','includeAll','include','findAll','rows','catch','params','options','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util'];(function(_0xca1acb,_0x3963e8){var _0x1dded7=function(_0x17f78e){while(--_0x17f78e){_0xca1acb['push'](_0xca1acb['shift']());}};_0x1dded7(++_0x3963e8);}(_0xd7c4,0x91));var _0x4d7c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd7c4[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x4d7c('0x0'));var rimraf=require(_0x4d7c('0x1'));var zipdir=require(_0x4d7c('0x2'));var jsonpatch=require(_0x4d7c('0x3'));var rp=require(_0x4d7c('0x4'));var moment=require('moment');var BPromise=require(_0x4d7c('0x5'));var Mustache=require('mustache');var util=require(_0x4d7c('0x6'));var path=require(_0x4d7c('0x7'));var sox=require(_0x4d7c('0x8'));var csv=require(_0x4d7c('0x9'));var ejs=require(_0x4d7c('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4d7c('0xb'));var squel=require('squel');var crypto=require(_0x4d7c('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x4d7c('0x9'));var querystring=require(_0x4d7c('0xd'));var Papa=require(_0x4d7c('0xe'));var Redis=require(_0x4d7c('0xf'));var authService=require(_0x4d7c('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x4d7c('0x11'));var hardwareService=require(_0x4d7c('0x12'));var logger=require(_0x4d7c('0x13'))(_0x4d7c('0x14'));var utils=require(_0x4d7c('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x4d7c('0x16'));var db=require(_0x4d7c('0x17'))['db'];function respondWithStatusCode(_0x4a3da0,_0x262cbc){_0x262cbc=_0x262cbc||0xcc;return function(_0x20e08c){if(_0x20e08c){return _0x4a3da0[_0x4d7c('0x18')](_0x262cbc);}return _0x4a3da0[_0x4d7c('0x19')](_0x262cbc)[_0x4d7c('0x1a')]();};}function respondWithResult(_0xeb4116,_0x44d27e){_0x44d27e=_0x44d27e||0xc8;return function(_0x40cf40){if(_0x40cf40){return _0xeb4116[_0x4d7c('0x19')](_0x44d27e)[_0x4d7c('0x1b')](_0x40cf40);}};}function respondWithFilteredResult(_0x1962f4,_0x18cc06){return function(_0x51af15){if(_0x51af15){var _0x29c1e0=typeof _0x18cc06['offset']==='undefined'&&typeof _0x18cc06['limit']===_0x4d7c('0x1c');var _0x7a5fc8=_0x51af15[_0x4d7c('0x1d')];var _0x3cbed7=_0x29c1e0?0x0:_0x18cc06[_0x4d7c('0x1e')];var _0x5a418f=_0x29c1e0?_0x51af15[_0x4d7c('0x1d')]:_0x18cc06[_0x4d7c('0x1e')]+_0x18cc06[_0x4d7c('0x1f')];var _0x16d174;if(_0x5a418f>=_0x7a5fc8){_0x5a418f=_0x7a5fc8;_0x16d174=0xc8;}else{_0x16d174=0xce;}_0x1962f4[_0x4d7c('0x19')](_0x16d174);return _0x1962f4[_0x4d7c('0x20')](_0x4d7c('0x21'),_0x3cbed7+'-'+_0x5a418f+'/'+_0x7a5fc8)[_0x4d7c('0x1b')](_0x51af15);}return null;};}function patchUpdates(_0x151daf){return function(_0x354e25){try{jsonpatch[_0x4d7c('0x22')](_0x354e25,_0x151daf,!![]);}catch(_0x3d6fdc){return BPromise[_0x4d7c('0x23')](_0x3d6fdc);}return _0x354e25[_0x4d7c('0x24')]();};}function saveUpdates(_0x555bb2,_0x361e84){return function(_0x2be66e){if(_0x2be66e){return _0x2be66e[_0x4d7c('0x25')](_0x555bb2)[_0x4d7c('0x26')](function(_0x955c61){return _0x955c61;});}return null;};}function removeEntity(_0x40a55f,_0x522579){return function(_0x3ef888){if(_0x3ef888){return _0x3ef888[_0x4d7c('0x27')]()[_0x4d7c('0x26')](function(){_0x40a55f[_0x4d7c('0x19')](0xcc)[_0x4d7c('0x1a')]();});}};}function handleEntityNotFound(_0x13d47a,_0x4c05d7){return function(_0x4a7752){if(!_0x4a7752){_0x13d47a['sendStatus'](0x194);}return _0x4a7752;};}function handleError(_0x96a51c,_0x41dbaa){_0x41dbaa=_0x41dbaa||0x1f4;return function(_0x648163){logger['error'](_0x648163[_0x4d7c('0x28')]);if(_0x648163[_0x4d7c('0x29')]){delete _0x648163[_0x4d7c('0x29')];}_0x96a51c[_0x4d7c('0x19')](_0x41dbaa)[_0x4d7c('0x2a')](_0x648163);};}exports[_0x4d7c('0x2b')]=function(_0x252009,_0x4f4b07){var _0x15bb38={},_0x250c26={},_0x5ad024={'count':0x0,'rows':[]};var _0x328bdb=_[_0x4d7c('0x2c')](db[_0x4d7c('0x2d')][_0x4d7c('0x2e')],function(_0xbf727a){return{'name':_0xbf727a['fieldName'],'type':_0xbf727a[_0x4d7c('0x2f')][_0x4d7c('0x30')]};});_0x250c26[_0x4d7c('0x31')]=_[_0x4d7c('0x2c')](_0x328bdb,_0x4d7c('0x29'));_0x250c26['query']=_[_0x4d7c('0x32')](_0x252009[_0x4d7c('0x33')]);_0x250c26[_0x4d7c('0x34')]=_[_0x4d7c('0x35')](_0x250c26['model'],_0x250c26[_0x4d7c('0x33')]);_0x15bb38[_0x4d7c('0x36')]=_[_0x4d7c('0x35')](_0x250c26[_0x4d7c('0x31')],qs[_0x4d7c('0x37')](_0x252009['query'][_0x4d7c('0x37')]));_0x15bb38[_0x4d7c('0x36')]=_0x15bb38[_0x4d7c('0x36')][_0x4d7c('0x38')]?_0x15bb38['attributes']:_0x250c26['model'];if(!_0x252009[_0x4d7c('0x33')][_0x4d7c('0x39')](_0x4d7c('0x3a'))){_0x15bb38['limit']=qs[_0x4d7c('0x1f')](_0x252009[_0x4d7c('0x33')][_0x4d7c('0x1f')]);_0x15bb38[_0x4d7c('0x1e')]=qs[_0x4d7c('0x1e')](_0x252009['query']['offset']);}_0x15bb38[_0x4d7c('0x3b')]=qs['sort'](_0x252009[_0x4d7c('0x33')][_0x4d7c('0x3c')]);_0x15bb38[_0x4d7c('0x3d')]=qs['filters'](_[_0x4d7c('0x3e')](_0x252009[_0x4d7c('0x33')],_0x250c26[_0x4d7c('0x34')]),_0x328bdb);if(_0x252009[_0x4d7c('0x33')][_0x4d7c('0x3f')]){_0x15bb38['where']=_['merge'](_0x15bb38[_0x4d7c('0x3d')],{'$or':_[_0x4d7c('0x2c')](_0x328bdb,function(_0x2d2ada){if(_0x2d2ada[_0x4d7c('0x2f')]!==_0x4d7c('0x40')){var _0x4090d6={};_0x4090d6[_0x2d2ada[_0x4d7c('0x29')]]={'$like':'%'+_0x252009[_0x4d7c('0x33')][_0x4d7c('0x3f')]+'%'};return _0x4090d6;}})});}_0x15bb38=_[_0x4d7c('0x41')]({},_0x15bb38,_0x252009['options']);var _0x436f6a={'where':_0x15bb38[_0x4d7c('0x3d')]};return db[_0x4d7c('0x2d')][_0x4d7c('0x1d')](_0x436f6a)[_0x4d7c('0x26')](function(_0x217665){_0x5ad024[_0x4d7c('0x1d')]=_0x217665;if(_0x252009[_0x4d7c('0x33')][_0x4d7c('0x42')]){_0x15bb38[_0x4d7c('0x43')]=[{'all':!![]}];}return db[_0x4d7c('0x2d')][_0x4d7c('0x44')](_0x15bb38);})['then'](function(_0x4fa31a){_0x5ad024[_0x4d7c('0x45')]=_0x4fa31a;return _0x5ad024;})[_0x4d7c('0x26')](respondWithFilteredResult(_0x4f4b07,_0x15bb38))[_0x4d7c('0x46')](handleError(_0x4f4b07,null));};exports['show']=function(_0x5d6026,_0x54066e){var _0xe327ac={'raw':!![],'where':{'id':_0x5d6026[_0x4d7c('0x47')]['id']}},_0x3f494e={};_0x3f494e[_0x4d7c('0x31')]=_[_0x4d7c('0x32')](db[_0x4d7c('0x2d')][_0x4d7c('0x2e')]);_0x3f494e[_0x4d7c('0x33')]=_[_0x4d7c('0x32')](_0x5d6026[_0x4d7c('0x33')]);_0x3f494e['filters']=_['intersection'](_0x3f494e[_0x4d7c('0x31')],_0x3f494e[_0x4d7c('0x33')]);_0xe327ac[_0x4d7c('0x36')]=_['intersection'](_0x3f494e[_0x4d7c('0x31')],qs[_0x4d7c('0x37')](_0x5d6026['query'][_0x4d7c('0x37')]));_0xe327ac[_0x4d7c('0x36')]=_0xe327ac[_0x4d7c('0x36')][_0x4d7c('0x38')]?_0xe327ac[_0x4d7c('0x36')]:_0x3f494e[_0x4d7c('0x31')];if(_0x5d6026[_0x4d7c('0x33')]['includeAll']){_0xe327ac[_0x4d7c('0x43')]=[{'all':!![]}];}_0xe327ac=_[_0x4d7c('0x41')]({},_0xe327ac,_0x5d6026[_0x4d7c('0x48')]);return db[_0x4d7c('0x2d')][_0x4d7c('0x49')](_0xe327ac)[_0x4d7c('0x26')](handleEntityNotFound(_0x54066e,null))[_0x4d7c('0x26')](respondWithResult(_0x54066e,null))['catch'](handleError(_0x54066e,null));};exports[_0x4d7c('0x4a')]=function(_0xeff4b7,_0x402124){return db[_0x4d7c('0x2d')][_0x4d7c('0x4a')](_0xeff4b7[_0x4d7c('0x4b')],{})['then'](respondWithResult(_0x402124,0xc9))[_0x4d7c('0x46')](handleError(_0x402124,null));};exports[_0x4d7c('0x25')]=function(_0x5f4be7,_0xfd2560){if(_0x5f4be7['body']['id']){delete _0x5f4be7['body']['id'];}return db[_0x4d7c('0x2d')][_0x4d7c('0x49')]({'where':{'id':_0x5f4be7[_0x4d7c('0x47')]['id']}})['then'](handleEntityNotFound(_0xfd2560,null))[_0x4d7c('0x26')](saveUpdates(_0x5f4be7['body'],null))['then'](respondWithResult(_0xfd2560,null))['catch'](handleError(_0xfd2560,null));};exports['destroy']=function(_0x58175a,_0x37af7b){return db[_0x4d7c('0x2d')][_0x4d7c('0x49')]({'where':{'id':_0x58175a[_0x4d7c('0x47')]['id']}})[_0x4d7c('0x26')](handleEntityNotFound(_0x37af7b,null))[_0x4d7c('0x26')](removeEntity(_0x37af7b,null))[_0x4d7c('0x46')](handleError(_0x37af7b,null));};
\ No newline at end of file
+var _0x8855=['then','sendStatus','error','stack','name','send','index','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','find','create','body','params','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','count','limit','set','apply','reject','update','destroy'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x8855,0x102));var _0x5885=function(_0xc7ad0b,_0x16e54e){_0xc7ad0b=_0xc7ad0b-0x0;var _0x51fe7e=_0x8855[_0xc7ad0b];return _0x51fe7e;};'use strict';var emlformat=require(_0x5885('0x0'));var rimraf=require(_0x5885('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5885('0x2'));var rp=require(_0x5885('0x3'));var moment=require(_0x5885('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x5885('0x5'));var util=require(_0x5885('0x6'));var path=require(_0x5885('0x7'));var sox=require(_0x5885('0x8'));var csv=require(_0x5885('0x9'));var ejs=require(_0x5885('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5885('0xb'));var squel=require(_0x5885('0xc'));var crypto=require(_0x5885('0xd'));var jsforce=require(_0x5885('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5885('0x9'));var querystring=require(_0x5885('0xf'));var Papa=require(_0x5885('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x5885('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5885('0x12'));var logger=require(_0x5885('0x13'))('api');var utils=require(_0x5885('0x14'));var config=require(_0x5885('0x15'));var licenseUtil=require(_0x5885('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4bf1d4,_0xa0b703){_0xa0b703=_0xa0b703||0xcc;return function(_0x9a8e69){if(_0x9a8e69){return _0x4bf1d4['sendStatus'](_0xa0b703);}return _0x4bf1d4[_0x5885('0x17')](_0xa0b703)[_0x5885('0x18')]();};}function respondWithResult(_0x265ac7,_0x29921d){_0x29921d=_0x29921d||0xc8;return function(_0x5a59c5){if(_0x5a59c5){return _0x265ac7[_0x5885('0x17')](_0x29921d)[_0x5885('0x19')](_0x5a59c5);}};}function respondWithFilteredResult(_0x3bd224,_0x49d078){return function(_0x595eb3){if(_0x595eb3){var _0x389427=typeof _0x49d078[_0x5885('0x1a')]==='undefined'&&typeof _0x49d078['limit']==='undefined';var _0x42f253=_0x595eb3[_0x5885('0x1b')];var _0x338f03=_0x389427?0x0:_0x49d078['offset'];var _0x46a627=_0x389427?_0x595eb3[_0x5885('0x1b')]:_0x49d078['offset']+_0x49d078[_0x5885('0x1c')];var _0xdf4150;if(_0x46a627>=_0x42f253){_0x46a627=_0x42f253;_0xdf4150=0xc8;}else{_0xdf4150=0xce;}_0x3bd224['status'](_0xdf4150);return _0x3bd224[_0x5885('0x1d')]('Content-Range',_0x338f03+'-'+_0x46a627+'/'+_0x42f253)[_0x5885('0x19')](_0x595eb3);}return null;};}function patchUpdates(_0x355978){return function(_0x1fd148){try{jsonpatch[_0x5885('0x1e')](_0x1fd148,_0x355978,!![]);}catch(_0x697421){return BPromise[_0x5885('0x1f')](_0x697421);}return _0x1fd148['save']();};}function saveUpdates(_0x4db3b9,_0x4ebc4e){return function(_0x5ed64f){if(_0x5ed64f){return _0x5ed64f[_0x5885('0x20')](_0x4db3b9)['then'](function(_0x4b8956){return _0x4b8956;});}return null;};}function removeEntity(_0x1c7c87,_0x15cc31){return function(_0x35f898){if(_0x35f898){return _0x35f898[_0x5885('0x21')]()[_0x5885('0x22')](function(){_0x1c7c87[_0x5885('0x17')](0xcc)[_0x5885('0x18')]();});}};}function handleEntityNotFound(_0x1542d7,_0x5333cd){return function(_0x496c5c){if(!_0x496c5c){_0x1542d7[_0x5885('0x23')](0x194);}return _0x496c5c;};}function handleError(_0x4e4ad6,_0x9983d0){_0x9983d0=_0x9983d0||0x1f4;return function(_0x45a58a){logger[_0x5885('0x24')](_0x45a58a[_0x5885('0x25')]);if(_0x45a58a[_0x5885('0x26')]){delete _0x45a58a[_0x5885('0x26')];}_0x4e4ad6[_0x5885('0x17')](_0x9983d0)[_0x5885('0x27')](_0x45a58a);};}exports[_0x5885('0x28')]=function(_0x1cdac7,_0x3ba7c3){var _0x10d990={},_0x255ea2={},_0x440c7b={'count':0x0,'rows':[]};var _0x137b83=_[_0x5885('0x29')](db[_0x5885('0x2a')][_0x5885('0x2b')],function(_0x4b944a){return{'name':_0x4b944a[_0x5885('0x2c')],'type':_0x4b944a[_0x5885('0x2d')][_0x5885('0x2e')]};});_0x255ea2[_0x5885('0x2f')]=_['map'](_0x137b83,_0x5885('0x26'));_0x255ea2[_0x5885('0x30')]=_[_0x5885('0x31')](_0x1cdac7[_0x5885('0x30')]);_0x255ea2[_0x5885('0x32')]=_[_0x5885('0x33')](_0x255ea2[_0x5885('0x2f')],_0x255ea2[_0x5885('0x30')]);_0x10d990[_0x5885('0x34')]=_[_0x5885('0x33')](_0x255ea2[_0x5885('0x2f')],qs[_0x5885('0x35')](_0x1cdac7[_0x5885('0x30')][_0x5885('0x35')]));_0x10d990[_0x5885('0x34')]=_0x10d990[_0x5885('0x34')][_0x5885('0x36')]?_0x10d990['attributes']:_0x255ea2[_0x5885('0x2f')];if(!_0x1cdac7[_0x5885('0x30')][_0x5885('0x37')]('nolimit')){_0x10d990[_0x5885('0x1c')]=qs['limit'](_0x1cdac7['query']['limit']);_0x10d990[_0x5885('0x1a')]=qs[_0x5885('0x1a')](_0x1cdac7['query'][_0x5885('0x1a')]);}_0x10d990[_0x5885('0x38')]=qs['sort'](_0x1cdac7[_0x5885('0x30')][_0x5885('0x39')]);_0x10d990[_0x5885('0x3a')]=qs['filters'](_[_0x5885('0x3b')](_0x1cdac7[_0x5885('0x30')],_0x255ea2[_0x5885('0x32')]),_0x137b83);if(_0x1cdac7[_0x5885('0x30')][_0x5885('0x3c')]){_0x10d990[_0x5885('0x3a')]=_[_0x5885('0x3d')](_0x10d990[_0x5885('0x3a')],{'$or':_['map'](_0x137b83,function(_0x301fc0){if(_0x301fc0['type']!==_0x5885('0x3e')){var _0x5bfd7f={};_0x5bfd7f[_0x301fc0[_0x5885('0x26')]]={'$like':'%'+_0x1cdac7[_0x5885('0x30')][_0x5885('0x3c')]+'%'};return _0x5bfd7f;}})});}_0x10d990=_[_0x5885('0x3d')]({},_0x10d990,_0x1cdac7[_0x5885('0x3f')]);var _0x3a5f87={'where':_0x10d990['where']};return db['AnalyticTreeReport']['count'](_0x3a5f87)[_0x5885('0x22')](function(_0x12e4db){_0x440c7b['count']=_0x12e4db;if(_0x1cdac7[_0x5885('0x30')][_0x5885('0x40')]){_0x10d990[_0x5885('0x41')]=[{'all':!![]}];}return db['AnalyticTreeReport']['findAll'](_0x10d990);})[_0x5885('0x22')](function(_0x353016){_0x440c7b[_0x5885('0x42')]=_0x353016;return _0x440c7b;})[_0x5885('0x22')](respondWithFilteredResult(_0x3ba7c3,_0x10d990))[_0x5885('0x43')](handleError(_0x3ba7c3,null));};exports[_0x5885('0x44')]=function(_0x2d187b,_0x506b7f){var _0x41712f={'raw':!![],'where':{'id':_0x2d187b['params']['id']}},_0x6f1b3c={};_0x6f1b3c[_0x5885('0x2f')]=_[_0x5885('0x31')](db[_0x5885('0x2a')]['rawAttributes']);_0x6f1b3c[_0x5885('0x30')]=_[_0x5885('0x31')](_0x2d187b[_0x5885('0x30')]);_0x6f1b3c[_0x5885('0x32')]=_[_0x5885('0x33')](_0x6f1b3c['model'],_0x6f1b3c[_0x5885('0x30')]);_0x41712f[_0x5885('0x34')]=_[_0x5885('0x33')](_0x6f1b3c[_0x5885('0x2f')],qs[_0x5885('0x35')](_0x2d187b[_0x5885('0x30')][_0x5885('0x35')]));_0x41712f[_0x5885('0x34')]=_0x41712f[_0x5885('0x34')][_0x5885('0x36')]?_0x41712f[_0x5885('0x34')]:_0x6f1b3c['model'];if(_0x2d187b[_0x5885('0x30')]['includeAll']){_0x41712f[_0x5885('0x41')]=[{'all':!![]}];}_0x41712f=_[_0x5885('0x3d')]({},_0x41712f,_0x2d187b[_0x5885('0x3f')]);return db[_0x5885('0x2a')][_0x5885('0x45')](_0x41712f)[_0x5885('0x22')](handleEntityNotFound(_0x506b7f,null))[_0x5885('0x22')](respondWithResult(_0x506b7f,null))[_0x5885('0x43')](handleError(_0x506b7f,null));};exports[_0x5885('0x46')]=function(_0x40fbb3,_0x4815b7){return db[_0x5885('0x2a')][_0x5885('0x46')](_0x40fbb3[_0x5885('0x47')],{})['then'](respondWithResult(_0x4815b7,0xc9))[_0x5885('0x43')](handleError(_0x4815b7,null));};exports[_0x5885('0x20')]=function(_0x2eb85a,_0x2c8d1e){if(_0x2eb85a[_0x5885('0x47')]['id']){delete _0x2eb85a['body']['id'];}return db['AnalyticTreeReport'][_0x5885('0x45')]({'where':{'id':_0x2eb85a[_0x5885('0x48')]['id']}})[_0x5885('0x22')](handleEntityNotFound(_0x2c8d1e,null))['then'](saveUpdates(_0x2eb85a['body'],null))['then'](respondWithResult(_0x2c8d1e,null))[_0x5885('0x43')](handleError(_0x2c8d1e,null));};exports[_0x5885('0x21')]=function(_0x721473,_0xf515a7){return db[_0x5885('0x2a')][_0x5885('0x45')]({'where':{'id':_0x721473[_0x5885('0x48')]['id']}})[_0x5885('0x22')](handleEntityNotFound(_0xf515a7,null))[_0x5885('0x22')](removeEntity(_0xf515a7,null))['catch'](handleError(_0xf515a7,null));};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js
index 687f75e..3395dbf 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.model.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1218=['define','AnalyticTreeReport','analytics_report_trees','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticTreeReport.attributes'];(function(_0x1dec2b,_0x37c45e){var _0x3d6d2d=function(_0x16c2e0){while(--_0x16c2e0){_0x1dec2b['push'](_0x1dec2b['shift']());}};_0x3d6d2d(++_0x37c45e);}(_0x1218,0xea));var _0x8121=function(_0xb0f11f,_0x22ec3a){_0xb0f11f=_0xb0f11f-0x0;var _0x339748=_0x1218[_0xb0f11f];return _0x339748;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x8121('0x0'));var moment=require(_0x8121('0x1'));var BPromise=require(_0x8121('0x2'));var rp=require(_0x8121('0x3'));var fs=require('fs');var path=require(_0x8121('0x4'));var rimraf=require(_0x8121('0x5'));var config=require(_0x8121('0x6'));var attributes=require(_0x8121('0x7'));module['exports']=function(_0x29e495,_0x5f291b){return _0x29e495[_0x8121('0x8')](_0x8121('0x9'),attributes,{'tableName':_0x8121('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x430d=['path','exports','define','lodash','moment','bluebird','request-promise'];(function(_0x215105,_0x5ed0cd){var _0x1beba1=function(_0x55380e){while(--_0x55380e){_0x215105['push'](_0x215105['shift']());}};_0x1beba1(++_0x5ed0cd);}(_0x430d,0x1ed));var _0xd430=function(_0x2cf94d,_0x224ff6){_0x2cf94d=_0x2cf94d-0x0;var _0xd8ac22=_0x430d[_0x2cf94d];return _0xd8ac22;};'use strict';var _=require(_0xd430('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xd430('0x1'));var BPromise=require(_0xd430('0x2'));var rp=require(_0xd430('0x3'));var fs=require('fs');var path=require(_0xd430('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./analyticTreeReport.attributes');module[_0xd430('0x5')]=function(_0x3a77ce,_0x45d627){return _0x3a77ce[_0xd430('0x6')]('AnalyticTreeReport',attributes,{'tableName':'analytics_report_trees','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.rpc.js b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
index 3daa5f5..3013a80 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.rpc.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f66=['../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','stringify','code','message','error','info','catch','util','bluebird','randomstring','ioredis'];(function(_0x4dcb59,_0x4de1f0){var _0x241074=function(_0x43e939){while(--_0x43e939){_0x4dcb59['push'](_0x4dcb59['shift']());}};_0x241074(++_0x4de1f0);}(_0x5f66,0x1a0));var _0x65f6=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x5f66[_0x126558];return _0x1f6d14;};'use strict';var _=require('lodash');var util=require(_0x65f6('0x0'));var moment=require('moment');var BPromise=require(_0x65f6('0x1'));var rs=require(_0x65f6('0x2'));var fs=require('fs');var Redis=require(_0x65f6('0x3'));var db=require(_0x65f6('0x4'))['db'];var utils=require(_0x65f6('0x5'));var logger=require('../../config/logger')(_0x65f6('0x6'));var config=require('../../config/environment');var jayson=require(_0x65f6('0x7'));var client=jayson[_0x65f6('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4ed98f,_0x1c0e12,_0x2c6571){return new BPromise(function(_0x112079,_0x8f6451){return client[_0x65f6('0x9')](_0x4ed98f,_0x2c6571)[_0x65f6('0xa')](function(_0x48d85c){logger['info'](_0x65f6('0xb'),_0x1c0e12,_0x65f6('0xc'));logger[_0x65f6('0xd')](_0x65f6('0xe'),_0x1c0e12,'request\x20sent',JSON[_0x65f6('0xf')](_0x48d85c));if(_0x48d85c['error']){if(_0x48d85c['error'][_0x65f6('0x10')]===0x1f4){logger['error'](_0x65f6('0xb'),_0x1c0e12,_0x48d85c['error'][_0x65f6('0x11')]);return _0x8f6451(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);return _0x112079(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}else{logger[_0x65f6('0x13')]('AnalyticTreeReport,\x20%s,\x20%s',_0x1c0e12,_0x65f6('0xc'));_0x112079(_0x48d85c['result']['message']);}})[_0x65f6('0x14')](function(_0x5c69f8){logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x5c69f8);_0x8f6451(_0x5c69f8);});});}
\ No newline at end of file
+var _0xdb28=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','lodash','util'];(function(_0x2ca671,_0x316ea4){var _0x3d0348=function(_0x23cce0){while(--_0x23cce0){_0x2ca671['push'](_0x2ca671['shift']());}};_0x3d0348(++_0x316ea4);}(_0xdb28,0x106));var _0x8db2=function(_0x477906,_0x4ffa55){_0x477906=_0x477906-0x0;var _0x3ad34e=_0xdb28[_0x477906];return _0x3ad34e;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});}
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js
index 45818f6..93359c5 100644
--- a/server/api/analyticTreeReport/index.js
+++ b/server/api/analyticTreeReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x32ad=['get','isAuthenticated','index','show','post','create','put','/:id','update','destroy','exports','multer','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticTreeReport.controller'];(function(_0x4d0b5b,_0xf881c4){var _0x521856=function(_0x2e5d01){while(--_0x2e5d01){_0x4d0b5b['push'](_0x4d0b5b['shift']());}};_0x521856(++_0xf881c4);}(_0x32ad,0x1cd));var _0xd32a=function(_0x42fa1f,_0x1abc4b){_0x42fa1f=_0x42fa1f-0x0;var _0x1d70e6=_0x32ad[_0x42fa1f];return _0x1d70e6;};'use strict';var multer=require(_0xd32a('0x0'));var util=require('util');var path=require(_0xd32a('0x1'));var timeout=require(_0xd32a('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xd32a('0x3'));var interaction=require(_0xd32a('0x4'));var config=require(_0xd32a('0x5'));var controller=require(_0xd32a('0x6'));router[_0xd32a('0x7')]('/',auth[_0xd32a('0x8')](),controller[_0xd32a('0x9')]);router[_0xd32a('0x7')]('/:id',auth[_0xd32a('0x8')](),controller[_0xd32a('0xa')]);router[_0xd32a('0xb')]('/',auth[_0xd32a('0x8')](),controller[_0xd32a('0xc')]);router[_0xd32a('0xd')](_0xd32a('0xe'),auth[_0xd32a('0x8')](),controller[_0xd32a('0xf')]);router['delete'](_0xd32a('0xe'),auth[_0xd32a('0x8')](),controller[_0xd32a('0x10')]);module[_0xd32a('0x11')]=router;
\ No newline at end of file
+var _0x988a=['index','/:id','show','post','create','destroy','exports','multer','path','express','fs-extra','../../components/auth/service','../../config/environment','isAuthenticated'];(function(_0x24dfb7,_0x2bf1bf){var _0x525851=function(_0xa8a946){while(--_0xa8a946){_0x24dfb7['push'](_0x24dfb7['shift']());}};_0x525851(++_0x2bf1bf);}(_0x988a,0x1ab));var _0xa988=function(_0x19a616,_0x4c5fba){_0x19a616=_0x19a616-0x0;var _0x3e92ee=_0x988a[_0x19a616];return _0x3e92ee;};'use strict';var multer=require(_0xa988('0x0'));var util=require('util');var path=require(_0xa988('0x1'));var timeout=require('connect-timeout');var express=require(_0xa988('0x2'));var router=express['Router']();var fs_extra=require(_0xa988('0x3'));var auth=require(_0xa988('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xa988('0x5'));var controller=require('./analyticTreeReport.controller');router['get']('/',auth[_0xa988('0x6')](),controller[_0xa988('0x7')]);router['get'](_0xa988('0x8'),auth['isAuthenticated'](),controller[_0xa988('0x9')]);router[_0xa988('0xa')]('/',auth['isAuthenticated'](),controller[_0xa988('0xb')]);router['put']('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0xa988('0x8'),auth[_0xa988('0x6')](),controller[_0xa988('0xc')]);module[_0xa988('0xd')]=router;
\ No newline at end of file
diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js
index b33fb60..0ed3206 100644
--- a/server/api/attachment/attachment.attributes.js
+++ b/server/api/attachment/attachment.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x86dd=['exports','STRING'];(function(_0x36f419,_0x3119dc){var _0x586722=function(_0xc58a17){while(--_0xc58a17){_0x36f419['push'](_0x36f419['shift']());}};_0x586722(++_0x3119dc);}(_0x86dd,0x1ee));var _0xd86d=function(_0x512adf,_0x2b206d){_0x512adf=_0x512adf-0x0;var _0x2f7646=_0x86dd[_0x512adf];return _0x2f7646;};'use strict';var Sequelize=require('sequelize');module[_0xd86d('0x0')]={'name':{'type':Sequelize['STRING']},'basename':{'type':Sequelize[_0xd86d('0x1')]},'type':{'type':Sequelize[_0xd86d('0x1')]}};
\ No newline at end of file
+var _0x3098=['exports','STRING','sequelize'];(function(_0x163691,_0x3d10c4){var _0x543ae5=function(_0x4af2ea){while(--_0x4af2ea){_0x163691['push'](_0x163691['shift']());}};_0x543ae5(++_0x3d10c4);}(_0x3098,0x86));var _0x8309=function(_0x400322,_0x4353a8){_0x400322=_0x400322-0x0;var _0xfdd597=_0x3098[_0x400322];return _0xfdd597;};'use strict';var Sequelize=require(_0x8309('0x0'));module[_0x8309('0x1')]={'name':{'type':Sequelize[_0x8309('0x2')]},'basename':{'type':Sequelize[_0x8309('0x2')]},'type':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js
index 9a9e26e..50dae33 100644
--- a/server/api/attachment/attachment.controller.js
+++ b/server/api/attachment/attachment.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x03dc=['server/files/attachments/','offline-chat/','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','status','end','offset','undefined','limit','set','json','save','update','then','destroy','sendStatus','error','name','send','map','Attachment','fieldName','type','model','keys','query','filters','attributes','intersection','fields','nolimit','order','sort','filter','where','merge','count','findAll','catch','params','rawAttributes','length','options','includeAll','include','find','get','omit','createdAt','updatedAt','body','create','originalname','basename','filename','mimetype','ChatOfflineMessageId','join','root'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x03dc,0x1ee));var _0xc03d=function(_0x52dbd6,_0x4034f1){_0x52dbd6=_0x52dbd6-0x0;var _0x4d046d=_0x03dc[_0x52dbd6];return _0x4d046d;};'use strict';var emlformat=require(_0xc03d('0x0'));var rimraf=require(_0xc03d('0x1'));var zipdir=require(_0xc03d('0x2'));var jsonpatch=require(_0xc03d('0x3'));var rp=require('request-promise');var moment=require(_0xc03d('0x4'));var BPromise=require(_0xc03d('0x5'));var Mustache=require(_0xc03d('0x6'));var util=require('util');var path=require('path');var sox=require(_0xc03d('0x7'));var csv=require(_0xc03d('0x8'));var ejs=require(_0xc03d('0x9'));var fs=require('fs');var fs_extra=require(_0xc03d('0xa'));var _=require(_0xc03d('0xb'));var squel=require(_0xc03d('0xc'));var crypto=require(_0xc03d('0xd'));var jsforce=require(_0xc03d('0xe'));var deskjs=require(_0xc03d('0xf'));var toCsv=require(_0xc03d('0x8'));var querystring=require(_0xc03d('0x10'));var Papa=require(_0xc03d('0x11'));var Redis=require(_0xc03d('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xc03d('0x13'));var as=require(_0xc03d('0x14'));var hardwareService=require(_0xc03d('0x15'));var logger=require(_0xc03d('0x16'))('api');var utils=require('../../config/utils');var config=require(_0xc03d('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xc03d('0x18'))['db'];function respondWithStatusCode(_0x138bb2,_0x332ddc){_0x332ddc=_0x332ddc||0xcc;return function(_0x441bb1){if(_0x441bb1){return _0x138bb2['sendStatus'](_0x332ddc);}return _0x138bb2[_0xc03d('0x19')](_0x332ddc)[_0xc03d('0x1a')]();};}function respondWithResult(_0x4ec1f6,_0x50b69a){_0x50b69a=_0x50b69a||0xc8;return function(_0xf384f1){if(_0xf384f1){return _0x4ec1f6['status'](_0x50b69a)['json'](_0xf384f1);}};}function respondWithFilteredResult(_0x31db0a,_0x3f0da5){return function(_0x273dd5){if(_0x273dd5){var _0x344f90=typeof _0x3f0da5[_0xc03d('0x1b')]===_0xc03d('0x1c')&&typeof _0x3f0da5[_0xc03d('0x1d')]===_0xc03d('0x1c');var _0x23ad59=_0x273dd5['count'];var _0xe57ece=_0x344f90?0x0:_0x3f0da5[_0xc03d('0x1b')];var _0x4a4a9c=_0x344f90?_0x273dd5['count']:_0x3f0da5[_0xc03d('0x1b')]+_0x3f0da5[_0xc03d('0x1d')];var _0x4aa250;if(_0x4a4a9c>=_0x23ad59){_0x4a4a9c=_0x23ad59;_0x4aa250=0xc8;}else{_0x4aa250=0xce;}_0x31db0a[_0xc03d('0x19')](_0x4aa250);return _0x31db0a[_0xc03d('0x1e')]('Content-Range',_0xe57ece+'-'+_0x4a4a9c+'/'+_0x23ad59)[_0xc03d('0x1f')](_0x273dd5);}return null;};}function patchUpdates(_0x1b67d9){return function(_0x392eac){try{jsonpatch['apply'](_0x392eac,_0x1b67d9,!![]);}catch(_0x8c265){return BPromise['reject'](_0x8c265);}return _0x392eac[_0xc03d('0x20')]();};}function saveUpdates(_0x38ea15,_0x5d85ee){return function(_0x243321){if(_0x243321){return _0x243321[_0xc03d('0x21')](_0x38ea15)[_0xc03d('0x22')](function(_0x2a9629){return _0x2a9629;});}return null;};}function removeEntity(_0x5c2adf,_0xb6fb62){return function(_0x1b457c){if(_0x1b457c){return _0x1b457c[_0xc03d('0x23')]()[_0xc03d('0x22')](function(){_0x5c2adf['status'](0xcc)[_0xc03d('0x1a')]();});}};}function handleEntityNotFound(_0xc5e7ac,_0x355ec8){return function(_0x362d7c){if(!_0x362d7c){_0xc5e7ac[_0xc03d('0x24')](0x194);}return _0x362d7c;};}function handleError(_0x14c7ef,_0x43a899){_0x43a899=_0x43a899||0x1f4;return function(_0x3b4bbb){logger[_0xc03d('0x25')](_0x3b4bbb['stack']);if(_0x3b4bbb[_0xc03d('0x26')]){delete _0x3b4bbb['name'];}_0x14c7ef['status'](_0x43a899)[_0xc03d('0x27')](_0x3b4bbb);};}exports['index']=function(_0x18b558,_0x1371dd){var _0x3ca393={},_0x27a8f7={},_0x3cb37c={'count':0x0,'rows':[]};var _0x431a9d=_[_0xc03d('0x28')](db[_0xc03d('0x29')]['rawAttributes'],function(_0x3a78ef){return{'name':_0x3a78ef[_0xc03d('0x2a')],'type':_0x3a78ef[_0xc03d('0x2b')]['key']};});_0x27a8f7[_0xc03d('0x2c')]=_[_0xc03d('0x28')](_0x431a9d,_0xc03d('0x26'));_0x27a8f7['query']=_[_0xc03d('0x2d')](_0x18b558[_0xc03d('0x2e')]);_0x27a8f7[_0xc03d('0x2f')]=_['intersection'](_0x27a8f7['model'],_0x27a8f7[_0xc03d('0x2e')]);_0x3ca393[_0xc03d('0x30')]=_[_0xc03d('0x31')](_0x27a8f7['model'],qs[_0xc03d('0x32')](_0x18b558[_0xc03d('0x2e')]['fields']));_0x3ca393[_0xc03d('0x30')]=_0x3ca393[_0xc03d('0x30')]['length']?_0x3ca393[_0xc03d('0x30')]:_0x27a8f7[_0xc03d('0x2c')];if(!_0x18b558['query']['hasOwnProperty'](_0xc03d('0x33'))){_0x3ca393['limit']=qs['limit'](_0x18b558['query'][_0xc03d('0x1d')]);_0x3ca393['offset']=qs[_0xc03d('0x1b')](_0x18b558[_0xc03d('0x2e')][_0xc03d('0x1b')]);}_0x3ca393[_0xc03d('0x34')]=qs[_0xc03d('0x35')](_0x18b558[_0xc03d('0x2e')][_0xc03d('0x35')]);_0x3ca393['where']=qs[_0xc03d('0x2f')](_['pick'](_0x18b558[_0xc03d('0x2e')],_0x27a8f7['filters']),_0x431a9d);if(_0x18b558[_0xc03d('0x2e')][_0xc03d('0x36')]){_0x3ca393[_0xc03d('0x37')]=_[_0xc03d('0x38')](_0x3ca393[_0xc03d('0x37')],{'$or':_['map'](_0x431a9d,function(_0xd6d553){if(_0xd6d553['type']!=='VIRTUAL'){var _0x32e283={};_0x32e283[_0xd6d553[_0xc03d('0x26')]]={'$like':'%'+_0x18b558[_0xc03d('0x2e')][_0xc03d('0x36')]+'%'};return _0x32e283;}})});}_0x3ca393=_[_0xc03d('0x38')]({},_0x3ca393,_0x18b558['options']);var _0x437724={'where':_0x3ca393[_0xc03d('0x37')]};return db['Attachment'][_0xc03d('0x39')](_0x437724)[_0xc03d('0x22')](function(_0x37322a){_0x3cb37c['count']=_0x37322a;if(_0x18b558[_0xc03d('0x2e')]['includeAll']){_0x3ca393['include']=[{'all':!![]}];}return db[_0xc03d('0x29')][_0xc03d('0x3a')](_0x3ca393);})[_0xc03d('0x22')](function(_0x20e066){_0x3cb37c['rows']=_0x20e066;return _0x3cb37c;})[_0xc03d('0x22')](respondWithFilteredResult(_0x1371dd,_0x3ca393))[_0xc03d('0x3b')](handleError(_0x1371dd,null));};exports['show']=function(_0x3070a9,_0x2e7295){var _0x1ced1f={'raw':!![],'where':{'id':_0x3070a9[_0xc03d('0x3c')]['id']}},_0x3f8c4f={};_0x3f8c4f['model']=_[_0xc03d('0x2d')](db[_0xc03d('0x29')][_0xc03d('0x3d')]);_0x3f8c4f[_0xc03d('0x2e')]=_[_0xc03d('0x2d')](_0x3070a9[_0xc03d('0x2e')]);_0x3f8c4f[_0xc03d('0x2f')]=_[_0xc03d('0x31')](_0x3f8c4f['model'],_0x3f8c4f['query']);_0x1ced1f[_0xc03d('0x30')]=_[_0xc03d('0x31')](_0x3f8c4f[_0xc03d('0x2c')],qs[_0xc03d('0x32')](_0x3070a9[_0xc03d('0x2e')][_0xc03d('0x32')]));_0x1ced1f[_0xc03d('0x30')]=_0x1ced1f['attributes'][_0xc03d('0x3e')]?_0x1ced1f[_0xc03d('0x30')]:_0x3f8c4f[_0xc03d('0x2c')];if(_0x3070a9[_0xc03d('0x2e')]['includeAll']){_0x1ced1f['include']=[{'all':!![]}];}_0x1ced1f=_[_0xc03d('0x38')]({},_0x1ced1f,_0x3070a9[_0xc03d('0x3f')]);return db[_0xc03d('0x29')]['find'](_0x1ced1f)[_0xc03d('0x22')](handleEntityNotFound(_0x2e7295,null))['then'](respondWithResult(_0x2e7295,null))[_0xc03d('0x3b')](handleError(_0x2e7295,null));};exports['clone']=function(_0x2dfee3,_0x8c0e1c){var _0x1c237e={'where':{'id':_0x2dfee3[_0xc03d('0x3c')]['id']}},_0x4736c6={};_0x4736c6[_0xc03d('0x2c')]=_['keys'](db[_0xc03d('0x29')][_0xc03d('0x3d')]);_0x1c237e['attributes']=_[_0xc03d('0x31')](_0x4736c6['model'],qs[_0xc03d('0x32')](_0x2dfee3['query'][_0xc03d('0x32')]));_0x1c237e[_0xc03d('0x30')]=_0x1c237e['attributes'][_0xc03d('0x3e')]?_0x1c237e['attributes']:_0x4736c6['model'];if(_0x2dfee3[_0xc03d('0x2e')][_0xc03d('0x40')]){_0x1c237e[_0xc03d('0x41')]=[{'all':!![]}];}_0x1c237e=_[_0xc03d('0x38')]({},_0x1c237e,_0x2dfee3[_0xc03d('0x3f')]);return db[_0xc03d('0x29')][_0xc03d('0x42')](_0x1c237e)[_0xc03d('0x22')](handleEntityNotFound(_0x8c0e1c,null))['then'](function(_0x8e338){if(_0x8e338){var _0x1d8c49=_0x8e338[_0xc03d('0x43')]({'plain':!![]});_0x1d8c49=qs[_0xc03d('0x44')](_0x1d8c49,['id',_0xc03d('0x45'),_0xc03d('0x46')]);_0x2dfee3['body']=_[_0xc03d('0x44')](_0x2dfee3[_0xc03d('0x47')],['id',_0xc03d('0x45'),_0xc03d('0x46')]);return db[_0xc03d('0x29')][_0xc03d('0x48')](_[_0xc03d('0x38')](_0x1d8c49,_0x2dfee3['body']),{'include':_0x2dfee3[_0xc03d('0x2e')][_0xc03d('0x40')]?[{'all':!![]}]:undefined});}})['then'](respondWithResult(_0x8c0e1c,0xc9))[_0xc03d('0x3b')](handleError(_0x8c0e1c,null));};exports[_0xc03d('0x21')]=function(_0x326270,_0x4101f6){if(_0x326270[_0xc03d('0x47')]['id']){delete _0x326270[_0xc03d('0x47')]['id'];}return db['Attachment']['find']({'where':{'id':_0x326270['params']['id']}})[_0xc03d('0x22')](handleEntityNotFound(_0x4101f6,null))[_0xc03d('0x22')](saveUpdates(_0x326270[_0xc03d('0x47')],null))['then'](respondWithResult(_0x4101f6,null))[_0xc03d('0x3b')](handleError(_0x4101f6,null));};exports['destroy']=function(_0x36bea9,_0x1cfa0d){return db[_0xc03d('0x29')][_0xc03d('0x42')]({'where':{'id':_0x36bea9[_0xc03d('0x3c')]['id']}})['then'](handleEntityNotFound(_0x1cfa0d,null))[_0xc03d('0x22')](removeEntity(_0x1cfa0d,null))['catch'](handleError(_0x1cfa0d,null));};exports[_0xc03d('0x48')]=function(_0x1f6eac,_0x1a1648,_0x3caf16){_0x1f6eac[_0xc03d('0x47')]['name']=_0x1f6eac['file'][_0xc03d('0x49')];_0x1f6eac[_0xc03d('0x47')][_0xc03d('0x4a')]=_0x1f6eac['file'][_0xc03d('0x4b')];_0x1f6eac[_0xc03d('0x47')][_0xc03d('0x2b')]=_0x1f6eac['file'][_0xc03d('0x4c')];return db[_0xc03d('0x29')][_0xc03d('0x48')](_0x1f6eac[_0xc03d('0x47')])[_0xc03d('0x22')](respondWithResult(_0x1a1648,0xc9))['catch'](handleError(_0x1a1648,null));};exports['download']=function(_0x425cd7,_0x3d4a6e,_0x2bdf97){return db[_0xc03d('0x29')]['findOne']({'where':{'id':_0x425cd7[_0xc03d('0x3c')]['id']},'raw':!![]})[_0xc03d('0x22')](handleEntityNotFound(_0x3d4a6e,null))['then'](function(_0x5966ff){if(_0x5966ff){var _0x438e2f=_0x5966ff[_0xc03d('0x4d')]!==null;var _0x82934d=path[_0xc03d('0x4e')](config[_0xc03d('0x4f')],_0xc03d('0x50'));if(_0x438e2f){_0x82934d=path[_0xc03d('0x4e')](_0x82934d,_0xc03d('0x51'));}var _0x24aa83=path[_0xc03d('0x4e')](_0x82934d,_0x5966ff[_0xc03d('0x4a')]);return _0x3d4a6e['download'](_0x24aa83);}})[_0xc03d('0x3b')](handleError(_0x3d4a6e,null));};
\ No newline at end of file
+var _0xb635=['body','createdAt','create','destroy','originalname','basename','file','filename','mimetype','download','findOne','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','eml-format','zip-dir','moment','bluebird','util','path','sox','to-csv','ejs','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','undefined','limit','count','offset','set','Content-Range','json','save','update','then','error','stack','name','send','index','map','Attachment','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','find','catch','params','get','omit','updatedAt'];(function(_0x53ad58,_0x3fb489){var _0x554b03=function(_0x5769ba){while(--_0x5769ba){_0x53ad58['push'](_0x53ad58['shift']());}};_0x554b03(++_0x3fb489);}(_0xb635,0x115));var _0x5b63=function(_0x438523,_0x5da095){_0x438523=_0x438523-0x0;var _0x588edf=_0xb635[_0x438523];return _0x588edf;};'use strict';var emlformat=require(_0x5b63('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5b63('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x5b63('0x2'));var BPromise=require(_0x5b63('0x3'));var Mustache=require('mustache');var util=require(_0x5b63('0x4'));var path=require(_0x5b63('0x5'));var sox=require(_0x5b63('0x6'));var csv=require(_0x5b63('0x7'));var ejs=require(_0x5b63('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x5b63('0x9'));var deskjs=require(_0x5b63('0xa'));var toCsv=require(_0x5b63('0x7'));var querystring=require(_0x5b63('0xb'));var Papa=require(_0x5b63('0xc'));var Redis=require('ioredis');var authService=require(_0x5b63('0xd'));var qs=require(_0x5b63('0xe'));var as=require(_0x5b63('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x5b63('0x10'));var config=require(_0x5b63('0x11'));var licenseUtil=require(_0x5b63('0x12'));var db=require(_0x5b63('0x13'))['db'];function respondWithStatusCode(_0x1074ee,_0x51a326){_0x51a326=_0x51a326||0xcc;return function(_0x1247cb){if(_0x1247cb){return _0x1074ee['sendStatus'](_0x51a326);}return _0x1074ee[_0x5b63('0x14')](_0x51a326)[_0x5b63('0x15')]();};}function respondWithResult(_0x51c062,_0x37bf83){_0x37bf83=_0x37bf83||0xc8;return function(_0x4e4f86){if(_0x4e4f86){return _0x51c062[_0x5b63('0x14')](_0x37bf83)['json'](_0x4e4f86);}};}function respondWithFilteredResult(_0x4bc095,_0x1c4087){return function(_0x2b0760){if(_0x2b0760){var _0x1a2aea=typeof _0x1c4087['offset']===_0x5b63('0x16')&&typeof _0x1c4087[_0x5b63('0x17')]==='undefined';var _0xe83b22=_0x2b0760[_0x5b63('0x18')];var _0x446ed3=_0x1a2aea?0x0:_0x1c4087['offset'];var _0x3fd823=_0x1a2aea?_0x2b0760[_0x5b63('0x18')]:_0x1c4087[_0x5b63('0x19')]+_0x1c4087[_0x5b63('0x17')];var _0x3adbf9;if(_0x3fd823>=_0xe83b22){_0x3fd823=_0xe83b22;_0x3adbf9=0xc8;}else{_0x3adbf9=0xce;}_0x4bc095[_0x5b63('0x14')](_0x3adbf9);return _0x4bc095[_0x5b63('0x1a')](_0x5b63('0x1b'),_0x446ed3+'-'+_0x3fd823+'/'+_0xe83b22)[_0x5b63('0x1c')](_0x2b0760);}return null;};}function patchUpdates(_0x946f3e){return function(_0x16806e){try{jsonpatch['apply'](_0x16806e,_0x946f3e,!![]);}catch(_0x165608){return BPromise['reject'](_0x165608);}return _0x16806e[_0x5b63('0x1d')]();};}function saveUpdates(_0x559bc3,_0x5ebe8a){return function(_0x2ed6f8){if(_0x2ed6f8){return _0x2ed6f8[_0x5b63('0x1e')](_0x559bc3)[_0x5b63('0x1f')](function(_0x4229dd){return _0x4229dd;});}return null;};}function removeEntity(_0x3ecdac,_0x558e9f){return function(_0x57b6b3){if(_0x57b6b3){return _0x57b6b3['destroy']()[_0x5b63('0x1f')](function(){_0x3ecdac[_0x5b63('0x14')](0xcc)[_0x5b63('0x15')]();});}};}function handleEntityNotFound(_0x185f66,_0x221e54){return function(_0x46f4d0){if(!_0x46f4d0){_0x185f66['sendStatus'](0x194);}return _0x46f4d0;};}function handleError(_0x2c9041,_0x347dcf){_0x347dcf=_0x347dcf||0x1f4;return function(_0x5bffc0){logger[_0x5b63('0x20')](_0x5bffc0[_0x5b63('0x21')]);if(_0x5bffc0[_0x5b63('0x22')]){delete _0x5bffc0[_0x5b63('0x22')];}_0x2c9041[_0x5b63('0x14')](_0x347dcf)[_0x5b63('0x23')](_0x5bffc0);};}exports[_0x5b63('0x24')]=function(_0x1f275d,_0x47118d){var _0x359ee6={},_0x5539c0={},_0x10041b={'count':0x0,'rows':[]};var _0x7c1419=_[_0x5b63('0x25')](db[_0x5b63('0x26')][_0x5b63('0x27')],function(_0x1af5cb){return{'name':_0x1af5cb[_0x5b63('0x28')],'type':_0x1af5cb[_0x5b63('0x29')][_0x5b63('0x2a')]};});_0x5539c0[_0x5b63('0x2b')]=_[_0x5b63('0x25')](_0x7c1419,_0x5b63('0x22'));_0x5539c0[_0x5b63('0x2c')]=_[_0x5b63('0x2d')](_0x1f275d[_0x5b63('0x2c')]);_0x5539c0[_0x5b63('0x2e')]=_[_0x5b63('0x2f')](_0x5539c0[_0x5b63('0x2b')],_0x5539c0[_0x5b63('0x2c')]);_0x359ee6['attributes']=_[_0x5b63('0x2f')](_0x5539c0['model'],qs['fields'](_0x1f275d['query'][_0x5b63('0x30')]));_0x359ee6[_0x5b63('0x31')]=_0x359ee6[_0x5b63('0x31')][_0x5b63('0x32')]?_0x359ee6[_0x5b63('0x31')]:_0x5539c0['model'];if(!_0x1f275d[_0x5b63('0x2c')][_0x5b63('0x33')]('nolimit')){_0x359ee6[_0x5b63('0x17')]=qs[_0x5b63('0x17')](_0x1f275d[_0x5b63('0x2c')][_0x5b63('0x17')]);_0x359ee6[_0x5b63('0x19')]=qs['offset'](_0x1f275d[_0x5b63('0x2c')][_0x5b63('0x19')]);}_0x359ee6[_0x5b63('0x34')]=qs[_0x5b63('0x35')](_0x1f275d[_0x5b63('0x2c')][_0x5b63('0x35')]);_0x359ee6[_0x5b63('0x36')]=qs[_0x5b63('0x2e')](_[_0x5b63('0x37')](_0x1f275d[_0x5b63('0x2c')],_0x5539c0[_0x5b63('0x2e')]),_0x7c1419);if(_0x1f275d[_0x5b63('0x2c')][_0x5b63('0x38')]){_0x359ee6['where']=_[_0x5b63('0x39')](_0x359ee6[_0x5b63('0x36')],{'$or':_[_0x5b63('0x25')](_0x7c1419,function(_0x24beba){if(_0x24beba['type']!==_0x5b63('0x3a')){var _0x3d80dd={};_0x3d80dd[_0x24beba[_0x5b63('0x22')]]={'$like':'%'+_0x1f275d[_0x5b63('0x2c')][_0x5b63('0x38')]+'%'};return _0x3d80dd;}})});}_0x359ee6=_[_0x5b63('0x39')]({},_0x359ee6,_0x1f275d[_0x5b63('0x3b')]);var _0x196dc9={'where':_0x359ee6[_0x5b63('0x36')]};return db['Attachment'][_0x5b63('0x18')](_0x196dc9)['then'](function(_0x285c75){_0x10041b[_0x5b63('0x18')]=_0x285c75;if(_0x1f275d['query'][_0x5b63('0x3c')]){_0x359ee6[_0x5b63('0x3d')]=[{'all':!![]}];}return db[_0x5b63('0x26')][_0x5b63('0x3e')](_0x359ee6);})['then'](function(_0x50c0eb){_0x10041b[_0x5b63('0x3f')]=_0x50c0eb;return _0x10041b;})[_0x5b63('0x1f')](respondWithFilteredResult(_0x47118d,_0x359ee6))['catch'](handleError(_0x47118d,null));};exports[_0x5b63('0x40')]=function(_0x5f15d0,_0x4d9b2a){var _0x4c46be={'raw':!![],'where':{'id':_0x5f15d0['params']['id']}},_0x2eeaf5={};_0x2eeaf5['model']=_[_0x5b63('0x2d')](db[_0x5b63('0x26')][_0x5b63('0x27')]);_0x2eeaf5[_0x5b63('0x2c')]=_[_0x5b63('0x2d')](_0x5f15d0[_0x5b63('0x2c')]);_0x2eeaf5['filters']=_['intersection'](_0x2eeaf5['model'],_0x2eeaf5['query']);_0x4c46be[_0x5b63('0x31')]=_[_0x5b63('0x2f')](_0x2eeaf5[_0x5b63('0x2b')],qs[_0x5b63('0x30')](_0x5f15d0[_0x5b63('0x2c')][_0x5b63('0x30')]));_0x4c46be[_0x5b63('0x31')]=_0x4c46be[_0x5b63('0x31')][_0x5b63('0x32')]?_0x4c46be['attributes']:_0x2eeaf5['model'];if(_0x5f15d0['query'][_0x5b63('0x3c')]){_0x4c46be['include']=[{'all':!![]}];}_0x4c46be=_[_0x5b63('0x39')]({},_0x4c46be,_0x5f15d0['options']);return db[_0x5b63('0x26')][_0x5b63('0x41')](_0x4c46be)[_0x5b63('0x1f')](handleEntityNotFound(_0x4d9b2a,null))['then'](respondWithResult(_0x4d9b2a,null))[_0x5b63('0x42')](handleError(_0x4d9b2a,null));};exports['clone']=function(_0x41f819,_0xbb4a2d){var _0x594fa={'where':{'id':_0x41f819[_0x5b63('0x43')]['id']}},_0x2e5f6d={};_0x2e5f6d['model']=_[_0x5b63('0x2d')](db[_0x5b63('0x26')]['rawAttributes']);_0x594fa[_0x5b63('0x31')]=_[_0x5b63('0x2f')](_0x2e5f6d[_0x5b63('0x2b')],qs[_0x5b63('0x30')](_0x41f819[_0x5b63('0x2c')][_0x5b63('0x30')]));_0x594fa[_0x5b63('0x31')]=_0x594fa['attributes'][_0x5b63('0x32')]?_0x594fa[_0x5b63('0x31')]:_0x2e5f6d[_0x5b63('0x2b')];if(_0x41f819['query'][_0x5b63('0x3c')]){_0x594fa['include']=[{'all':!![]}];}_0x594fa=_[_0x5b63('0x39')]({},_0x594fa,_0x41f819[_0x5b63('0x3b')]);return db['Attachment'][_0x5b63('0x41')](_0x594fa)['then'](handleEntityNotFound(_0xbb4a2d,null))['then'](function(_0x279a04){if(_0x279a04){var _0x14892c=_0x279a04[_0x5b63('0x44')]({'plain':!![]});_0x14892c=qs[_0x5b63('0x45')](_0x14892c,['id','createdAt',_0x5b63('0x46')]);_0x41f819[_0x5b63('0x47')]=_[_0x5b63('0x45')](_0x41f819['body'],['id',_0x5b63('0x48'),_0x5b63('0x46')]);return db[_0x5b63('0x26')][_0x5b63('0x49')](_[_0x5b63('0x39')](_0x14892c,_0x41f819[_0x5b63('0x47')]),{'include':_0x41f819[_0x5b63('0x2c')][_0x5b63('0x3c')]?[{'all':!![]}]:undefined});}})[_0x5b63('0x1f')](respondWithResult(_0xbb4a2d,0xc9))[_0x5b63('0x42')](handleError(_0xbb4a2d,null));};exports[_0x5b63('0x1e')]=function(_0x1336b3,_0x433ace){if(_0x1336b3[_0x5b63('0x47')]['id']){delete _0x1336b3[_0x5b63('0x47')]['id'];}return db[_0x5b63('0x26')]['find']({'where':{'id':_0x1336b3[_0x5b63('0x43')]['id']}})['then'](handleEntityNotFound(_0x433ace,null))['then'](saveUpdates(_0x1336b3[_0x5b63('0x47')],null))[_0x5b63('0x1f')](respondWithResult(_0x433ace,null))[_0x5b63('0x42')](handleError(_0x433ace,null));};exports[_0x5b63('0x4a')]=function(_0x35c716,_0x487c7a){return db[_0x5b63('0x26')]['find']({'where':{'id':_0x35c716[_0x5b63('0x43')]['id']}})[_0x5b63('0x1f')](handleEntityNotFound(_0x487c7a,null))[_0x5b63('0x1f')](removeEntity(_0x487c7a,null))[_0x5b63('0x42')](handleError(_0x487c7a,null));};exports[_0x5b63('0x49')]=function(_0x2cdbfd,_0x16c0fe,_0x25c102){_0x2cdbfd[_0x5b63('0x47')]['name']=_0x2cdbfd['file'][_0x5b63('0x4b')];_0x2cdbfd[_0x5b63('0x47')][_0x5b63('0x4c')]=_0x2cdbfd[_0x5b63('0x4d')][_0x5b63('0x4e')];_0x2cdbfd[_0x5b63('0x47')][_0x5b63('0x29')]=_0x2cdbfd[_0x5b63('0x4d')][_0x5b63('0x4f')];return db[_0x5b63('0x26')][_0x5b63('0x49')](_0x2cdbfd[_0x5b63('0x47')])[_0x5b63('0x1f')](respondWithResult(_0x16c0fe,0xc9))[_0x5b63('0x42')](handleError(_0x16c0fe,null));};exports[_0x5b63('0x50')]=function(_0x3b4d1f,_0x1a0a07,_0x1f36f8){return db[_0x5b63('0x26')][_0x5b63('0x51')]({'where':{'id':_0x3b4d1f[_0x5b63('0x43')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x1a0a07,null))[_0x5b63('0x1f')](function(_0x14386e){if(_0x14386e){var _0x1a33f5=_0x14386e[_0x5b63('0x52')]!==null;var _0x17e46a=path[_0x5b63('0x53')](config[_0x5b63('0x54')],_0x5b63('0x55'));if(_0x1a33f5){_0x17e46a=path[_0x5b63('0x53')](_0x17e46a,_0x5b63('0x56'));}var _0x1a3cf2=path[_0x5b63('0x53')](_0x17e46a,_0x14386e[_0x5b63('0x4c')]);return _0x1a0a07[_0x5b63('0x50')](_0x1a3cf2);}})[_0x5b63('0x42')](handleError(_0x1a0a07,null));};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js
index 8a924b8..037c66f 100644
--- a/server/api/attachment/attachment.model.js
+++ b/server/api/attachment/attachment.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3f3b=['exports','Attachment','lodash','../../config/logger','moment','bluebird','request-promise','../../config/environment','./attachment.attributes'];(function(_0x30fea4,_0x166fde){var _0x428d17=function(_0x37bc52){while(--_0x37bc52){_0x30fea4['push'](_0x30fea4['shift']());}};_0x428d17(++_0x166fde);}(_0x3f3b,0x16a));var _0xb3f3=function(_0x1c351a,_0x5f4b94){_0x1c351a=_0x1c351a-0x0;var _0x88f4c5=_0x3f3b[_0x1c351a];return _0x88f4c5;};'use strict';var _=require(_0xb3f3('0x0'));var util=require('util');var logger=require(_0xb3f3('0x1'))('api');var moment=require(_0xb3f3('0x2'));var BPromise=require(_0xb3f3('0x3'));var rp=require(_0xb3f3('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xb3f3('0x5'));var attributes=require(_0xb3f3('0x6'));module[_0xb3f3('0x7')]=function(_0x9fd66,_0x5bbd4c){return _0x9fd66['define'](_0xb3f3('0x8'),attributes,{'tableName':'attachments','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x721f=['exports','define','Attachment','attachments','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./attachment.attributes'];(function(_0x41a4a0,_0x5b750a){var _0x3ed060=function(_0x4a8d95){while(--_0x4a8d95){_0x41a4a0['push'](_0x41a4a0['shift']());}};_0x3ed060(++_0x5b750a);}(_0x721f,0x12a));var _0xf721=function(_0x2f094d,_0x32a89c){_0x2f094d=_0x2f094d-0x0;var _0x32478b=_0x721f[_0x2f094d];return _0x32478b;};'use strict';var _=require(_0xf721('0x0'));var util=require(_0xf721('0x1'));var logger=require(_0xf721('0x2'))(_0xf721('0x3'));var moment=require(_0xf721('0x4'));var BPromise=require(_0xf721('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf721('0x6'));var rimraf=require(_0xf721('0x7'));var config=require(_0xf721('0x8'));var attributes=require(_0xf721('0x9'));module[_0xf721('0xa')]=function(_0x3b008d,_0x537fa8){return _0x3b008d[_0xf721('0xb')](_0xf721('0xc'),attributes,{'tableName':_0xf721('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.rpc.js b/server/api/attachment/attachment.rpc.js
index 25237ca..f8b5e5b 100644
--- a/server/api/attachment/attachment.rpc.js
+++ b/server/api/attachment/attachment.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2c54=['options','raw','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','request','then','info','Attachment,\x20%s,\x20%s','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateAttachment','Attachment','create','body'];(function(_0x5f20e0,_0x179500){var _0x3ac112=function(_0x1ea44d){while(--_0x1ea44d){_0x5f20e0['push'](_0x5f20e0['shift']());}};_0x3ac112(++_0x179500);}(_0x2c54,0x136));var _0x42c5=function(_0x2ef57c,_0x32cfd6){_0x2ef57c=_0x2ef57c-0x0;var _0x3ce380=_0x2c54[_0x2ef57c];return _0x3ce380;};'use strict';var _=require(_0x42c5('0x0'));var util=require(_0x42c5('0x1'));var moment=require(_0x42c5('0x2'));var BPromise=require('bluebird');var rs=require(_0x42c5('0x3'));var fs=require('fs');var Redis=require(_0x42c5('0x4'));var db=require(_0x42c5('0x5'))['db'];var utils=require(_0x42c5('0x6'));var logger=require(_0x42c5('0x7'))(_0x42c5('0x8'));var config=require('../../config/environment');var jayson=require(_0x42c5('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1959c1,_0x44516e,_0x38d528){return new BPromise(function(_0x134cb6,_0x14538f){return client[_0x42c5('0xa')](_0x1959c1,_0x38d528)[_0x42c5('0xb')](function(_0x3ca4de){logger[_0x42c5('0xc')](_0x42c5('0xd'),_0x44516e,_0x42c5('0xe'));logger[_0x42c5('0xf')](_0x42c5('0x10'),_0x44516e,_0x42c5('0xe'),JSON[_0x42c5('0x11')](_0x3ca4de));if(_0x3ca4de[_0x42c5('0x12')]){if(_0x3ca4de[_0x42c5('0x12')][_0x42c5('0x13')]===0x1f4){logger[_0x42c5('0x12')](_0x42c5('0xd'),_0x44516e,_0x3ca4de[_0x42c5('0x12')][_0x42c5('0x14')]);return _0x14538f(_0x3ca4de['error']['message']);}logger[_0x42c5('0x12')](_0x42c5('0xd'),_0x44516e,_0x3ca4de[_0x42c5('0x12')][_0x42c5('0x14')]);return _0x134cb6(_0x3ca4de['error'][_0x42c5('0x14')]);}else{logger[_0x42c5('0xc')](_0x42c5('0xd'),_0x44516e,'request\x20sent');_0x134cb6(_0x3ca4de[_0x42c5('0x15')]['message']);}})['catch'](function(_0x466b47){logger['error']('Attachment,\x20%s,\x20%s',_0x44516e,_0x466b47);_0x14538f(_0x466b47);});});}exports[_0x42c5('0x16')]=function(_0x3a2115){var _0x10e31e=this;return new Promise(function(_0x3f4172,_0x431f4e){return db[_0x42c5('0x17')][_0x42c5('0x18')](_0x3a2115[_0x42c5('0x19')],{'raw':_0x3a2115[_0x42c5('0x1a')]?_0x3a2115[_0x42c5('0x1a')][_0x42c5('0x1b')]===undefined?!![]:![]:!![]})[_0x42c5('0xb')](function(_0x11c6e8){logger[_0x42c5('0xc')]('CreateAttachment',_0x3a2115);logger[_0x42c5('0xf')](_0x42c5('0x16'),_0x3a2115,JSON[_0x42c5('0x11')](_0x11c6e8));_0x3f4172(_0x11c6e8);})['catch'](function(_0x245e72){logger[_0x42c5('0x12')]('CreateAttachment',_0x245e72[_0x42c5('0x14')],_0x3a2115);_0x431f4e(_0x10e31e[_0x42c5('0x12')](0x1f4,_0x245e72[_0x42c5('0x14')]));});});};
\ No newline at end of file
+var _0xf25a=['Attachment','create','body','options','debug','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','http','then','info','Attachment,\x20%s,\x20%s','request\x20sent','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','CreateAttachment'];(function(_0x343e44,_0x519af9){var _0xa5130e=function(_0xae1fa0){while(--_0xae1fa0){_0x343e44['push'](_0x343e44['shift']());}};_0xa5130e(++_0x519af9);}(_0xf25a,0x195));var _0xaf25=function(_0x392e3d,_0x5cb742){_0x392e3d=_0x392e3d-0x0;var _0x24d2d9=_0xf25a[_0x392e3d];return _0x24d2d9;};'use strict';var _=require(_0xaf25('0x0'));var util=require(_0xaf25('0x1'));var moment=require(_0xaf25('0x2'));var BPromise=require('bluebird');var rs=require(_0xaf25('0x3'));var fs=require('fs');var Redis=require(_0xaf25('0x4'));var db=require(_0xaf25('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xaf25('0x6'))(_0xaf25('0x7'));var config=require(_0xaf25('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xaf25('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x48c6e6,_0x4b7258,_0x457ba5){return new BPromise(function(_0x41b3cd,_0x61e8d){return client['request'](_0x48c6e6,_0x457ba5)[_0xaf25('0xa')](function(_0x24ac0a){logger[_0xaf25('0xb')](_0xaf25('0xc'),_0x4b7258,_0xaf25('0xd'));logger['debug'](_0xaf25('0xe'),_0x4b7258,_0xaf25('0xd'),JSON[_0xaf25('0xf')](_0x24ac0a));if(_0x24ac0a[_0xaf25('0x10')]){if(_0x24ac0a['error']['code']===0x1f4){logger[_0xaf25('0x10')](_0xaf25('0xc'),_0x4b7258,_0x24ac0a[_0xaf25('0x10')][_0xaf25('0x11')]);return _0x61e8d(_0x24ac0a[_0xaf25('0x10')]['message']);}logger['error'](_0xaf25('0xc'),_0x4b7258,_0x24ac0a['error'][_0xaf25('0x11')]);return _0x41b3cd(_0x24ac0a[_0xaf25('0x10')][_0xaf25('0x11')]);}else{logger[_0xaf25('0xb')]('Attachment,\x20%s,\x20%s',_0x4b7258,_0xaf25('0xd'));_0x41b3cd(_0x24ac0a['result']['message']);}})[_0xaf25('0x12')](function(_0x4b396d){logger[_0xaf25('0x10')](_0xaf25('0xc'),_0x4b7258,_0x4b396d);_0x61e8d(_0x4b396d);});});}exports[_0xaf25('0x13')]=function(_0x2c815a){var _0x28bb0e=this;return new Promise(function(_0x10ed9a,_0x615537){return db[_0xaf25('0x14')][_0xaf25('0x15')](_0x2c815a[_0xaf25('0x16')],{'raw':_0x2c815a['options']?_0x2c815a[_0xaf25('0x17')]['raw']===undefined?!![]:![]:!![]})[_0xaf25('0xa')](function(_0x396af4){logger[_0xaf25('0xb')](_0xaf25('0x13'),_0x2c815a);logger[_0xaf25('0x18')](_0xaf25('0x13'),_0x2c815a,JSON[_0xaf25('0xf')](_0x396af4));_0x10ed9a(_0x396af4);})[_0xaf25('0x12')](function(_0x2d8b66){logger[_0xaf25('0x10')](_0xaf25('0x13'),_0x2d8b66[_0xaf25('0x11')],_0x2c815a);_0x615537(_0x28bb0e[_0xaf25('0x10')](0x1f4,_0x2d8b66[_0xaf25('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js
index 2dd1215..58efbc5 100644
--- a/server/api/attachment/index.js
+++ b/server/api/attachment/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdb28=['path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','download','/:id/clone','clone','join','root','server/files/attachments/','%s-%s','now','originalname','replace','post','single','file','create','put','update','delete','destroy','exports','multer','util'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xdb28,0x106));var _0x8db2=function(_0x225aa6,_0x20aee5){_0x225aa6=_0x225aa6-0x0;var _0x2ec135=_0xdb28[_0x225aa6];return _0x2ec135;};'use strict';var multer=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var path=require(_0x8db2('0x2'));var timeout=require(_0x8db2('0x3'));var express=require('express');var router=express[_0x8db2('0x4')]();var fs_extra=require(_0x8db2('0x5'));var auth=require(_0x8db2('0x6'));var interaction=require(_0x8db2('0x7'));var config=require(_0x8db2('0x8'));var controller=require('./attachment.controller');router[_0x8db2('0x9')]('/',auth[_0x8db2('0xa')](),controller['index']);router['get'](_0x8db2('0xb'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xc')]);router[_0x8db2('0x9')](_0x8db2('0xd'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xe')]);router['post'](_0x8db2('0xf'),auth[_0x8db2('0xa')](),controller[_0x8db2('0x10')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1d9371,_0x150942,_0x576475){_0x576475(null,path[_0x8db2('0x11')](config[_0x8db2('0x12')],_0x8db2('0x13')));},'filename':function(_0x204f49,_0x37d017,_0x559fb1){_0x559fb1(null,util['format'](_0x8db2('0x14'),Date[_0x8db2('0x15')](),_0x37d017[_0x8db2('0x16')][_0x8db2('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x8db2('0x18')]('/',upload[_0x8db2('0x19')](_0x8db2('0x1a')),controller[_0x8db2('0x1b')]);router[_0x8db2('0x1c')](_0x8db2('0xb'),auth['isAuthenticated'](),controller[_0x8db2('0x1d')]);router[_0x8db2('0x1e')]('/:id',auth[_0x8db2('0xa')](),controller[_0x8db2('0x1f')]);module[_0x8db2('0x20')]=router;
\ No newline at end of file
+var _0xadb5=['root','format','%s-%s','originalname','replace','file','put','update','delete','destroy','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/download','download','post','/:id/clone'];(function(_0x2252fc,_0x1bab36){var _0x578bd8=function(_0x2f9025){while(--_0x2f9025){_0x2252fc['push'](_0x2252fc['shift']());}};_0x578bd8(++_0x1bab36);}(_0xadb5,0xad));var _0x5adb=function(_0x4880d6,_0x2aa208){_0x4880d6=_0x4880d6-0x0;var _0x5448fe=_0xadb5[_0x4880d6];return _0x5448fe;};'use strict';var multer=require('multer');var util=require(_0x5adb('0x0'));var path=require('path');var timeout=require(_0x5adb('0x1'));var express=require(_0x5adb('0x2'));var router=express[_0x5adb('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x5adb('0x4'));var interaction=require(_0x5adb('0x5'));var config=require(_0x5adb('0x6'));var controller=require('./attachment.controller');router[_0x5adb('0x7')]('/',auth[_0x5adb('0x8')](),controller[_0x5adb('0x9')]);router[_0x5adb('0x7')](_0x5adb('0xa'),auth[_0x5adb('0x8')](),controller[_0x5adb('0xb')]);router[_0x5adb('0x7')](_0x5adb('0xc'),auth[_0x5adb('0x8')](),controller[_0x5adb('0xd')]);router[_0x5adb('0xe')](_0x5adb('0xf'),auth[_0x5adb('0x8')](),controller['clone']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1a8f66,_0x1ea238,_0x82e67e){_0x82e67e(null,path['join'](config[_0x5adb('0x10')],'server/files/attachments/'));},'filename':function(_0x2a0b70,_0x5433bf,_0x8cfcc6){_0x8cfcc6(null,util[_0x5adb('0x11')](_0x5adb('0x12'),Date['now'](),_0x5433bf[_0x5adb('0x13')][_0x5adb('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x5adb('0xe')]('/',upload['single'](_0x5adb('0x15')),controller['create']);router[_0x5adb('0x16')](_0x5adb('0xa'),auth[_0x5adb('0x8')](),controller[_0x5adb('0x17')]);router[_0x5adb('0x18')](_0x5adb('0xa'),auth[_0x5adb('0x8')](),controller[_0x5adb('0x19')]);module[_0x5adb('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/authActiveDirectory.controller.js b/server/api/authActiveDirectory/authActiveDirectory.controller.js
index 2b46f27..9739381 100644
--- a/server/api/authActiveDirectory/authActiveDirectory.controller.js
+++ b/server/api/authActiveDirectory/authActiveDirectory.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf513=['send','message','login','role','signToken','json','online','use','User','passport','passport-local','Strategy','moment','activedirectory2','bluebird','../../mysqldb','../../components/auth/service','../../config/utils','../../config/environment','../../config/logger','activedirectory','baseDN','url','domain','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','error','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','findOne','adSsoEnabled','blockDuration','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','password','salt','blockedAt','admin','agent','disabled','add','minutes','getLicense','catch','status'];(function(_0x588102,_0x238290){var _0x506043=function(_0x4117bd){while(--_0x4117bd){_0x588102['push'](_0x588102['shift']());}};_0x506043(++_0x238290);}(_0xf513,0x181));var _0x3f51=function(_0x4c9a33,_0xbb4131){_0x4c9a33=_0x4c9a33-0x0;var _0x410e91=_0xf513[_0x4c9a33];return _0x410e91;};'use strict';var passport=require(_0x3f51('0x0'));var LocalStrategy=require(_0x3f51('0x1'))[_0x3f51('0x2')];var moment=require(_0x3f51('0x3'));var ActiveDirectory=require(_0x3f51('0x4'));var BPromise=require(_0x3f51('0x5'));var util=require('util');var db=require(_0x3f51('0x6'))['db'];var authService=require(_0x3f51('0x7'));var utils=require(_0x3f51('0x8'));var config=require(_0x3f51('0x9'));var logger=require(_0x3f51('0xa'))('api');function isActiveDirectoryConfigured(_0xdc7974){var _0x39fcac=![];if(typeof _0xdc7974[_0x3f51('0xb')]!=='undefined'){_0x39fcac=_0xdc7974[_0x3f51('0xb')][_0x3f51('0xc')]&&_0xdc7974['activedirectory'][_0x3f51('0xd')]&&_0xdc7974[_0x3f51('0xb')][_0x3f51('0xe')];}return _0x39fcac;}function adAuthenticate(_0x47e8ff,_0x37ff17,_0x27e32b){return new BPromise(function(_0x56ffbd,_0x4087e1){try{var _0x3ea6d5=new ActiveDirectory(_0x47e8ff);_0x3ea6d5['authenticate'](_0x37ff17,_0x27e32b,function(_0x595072,_0x4d18b5){if(_0x595072){logger['error'](_0x3f51('0xf'),_0x37ff17,util[_0x3f51('0x10')](_0x595072,{'showHidden':![],'depth':null}));_0x4087e1(_0x3f51('0x11'));}else if(!_0x4d18b5){logger['error'](_0x3f51('0x12'),_0x37ff17);_0x4087e1(_0x3f51('0x11'));}else{_0x56ffbd(_0x4d18b5);}});}catch(_0x58551f){_0x4087e1(_0x58551f);}});}function ActiveDirectoryAuthenticate(_0x19f66f,_0x3a3f99,_0x390659,_0x433d16){var _0x465fc8,_0x402833;if(!isActiveDirectoryConfigured(config)){logger[_0x3f51('0x13')](_0x3f51('0x14'),_0x3a3f99);return _0x433d16(null,![],{'message':_0x3f51('0x11')});}return db['Setting'][_0x3f51('0x15')]({'where':{'id':0x1},'attributes':[_0x3f51('0x16'),_0x3f51('0x17')],'raw':!![]})[_0x3f51('0x18')](function(_0x5d7298){_0x465fc8=_0x5d7298;if(!_0x465fc8['adSsoEnabled']){logger['error'](_0x3f51('0x19'),_0x3a3f99);throw new Error(_0x3f51('0x11'));}return _0x19f66f[_0x3f51('0x15')]({'attributes':['id',_0x3f51('0x1a'),_0x3f51('0x1b'),_0x3f51('0x1c'),'role','disabled','blocked',_0x3f51('0x1d'),'online'],'where':{'name':_0x3a3f99,'role':{'$or':[_0x3f51('0x1e'),'user',_0x3f51('0x1f')]},'adSsoEnabled':!![]}});})[_0x3f51('0x18')](function(_0x36aefa){if(!_0x36aefa||_0x36aefa&&_0x36aefa[_0x3f51('0x1a')]!==_0x3a3f99){throw new Error(_0x3f51('0x11'));}_0x402833=_0x36aefa;var _0xcedb0d=_0x402833['name']+'@'+config[_0x3f51('0xb')]['domain'];return adAuthenticate(config[_0x3f51('0xb')],_0xcedb0d,_0x390659);})[_0x3f51('0x18')](function(_0x563232){if(_0x402833[_0x3f51('0x20')]){throw new Error(_0x3f51('0x11'));}if(_0x465fc8[_0x3f51('0x17')]>0x0){if(_0x402833['blocked']){if(moment(_0x402833[_0x3f51('0x1d')])[_0x3f51('0x21')](_0x465fc8['blockDuration'],_0x3f51('0x22'))>moment()){throw new Error(_0x3f51('0x11'));}return utils['clearBlockUser'](_0x402833,0x0,![],null)[_0x3f51('0x18')](function(){return utils[_0x3f51('0x23')](_0x402833);})['then'](function(){return _0x433d16(null,_0x402833);});}else{return utils[_0x3f51('0x23')](_0x402833)[_0x3f51('0x18')](function(){return _0x433d16(null,_0x402833);});}}else{return utils[_0x3f51('0x23')](_0x402833)[_0x3f51('0x18')](function(){return _0x433d16(null,_0x402833);});}})[_0x3f51('0x24')](function(_0x1b954f){return _0x433d16(null,![],_0x1b954f);});}function handleError(_0x2942c0,_0x4096b4,_0x3d0fee){return _0x2942c0[_0x3f51('0x25')](_0x4096b4||0x1f4)[_0x3f51('0x26')]({'message':_0x3d0fee?_0x3d0fee[_0x3f51('0x27')]||_0x3d0fee:''});}exports[_0x3f51('0x28')]=function(_0x51fd9f,_0x1c858d,_0x4b7ec4){passport['authenticate']('ad-login',function(_0x2ec8a8,_0x525ec1,_0x5ccf89){var _0x4a8654=_0x2ec8a8||_0x5ccf89;if(_0x4a8654){return handleError(_0x1c858d,0x191,_0x4a8654);}if(!_0x525ec1){return handleError(_0x1c858d,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x298964={'payload':{'id':_0x525ec1['id'],'role':_0x525ec1[_0x3f51('0x29')]},'options':{'expiresIn':0x15180}};return authService[_0x3f51('0x2a')](_0x298964)[_0x3f51('0x18')](function(_0xe997d0){_0x1c858d[_0x3f51('0x2b')]({'id':_0x525ec1['id'],'token':_0xe997d0,'statusCall':'','isAlreadyLogged':_0x525ec1[_0x3f51('0x2c')]});});}})(_0x51fd9f,_0x1c858d,_0x4b7ec4);};passport[_0x3f51('0x2d')]('ad-login',new LocalStrategy({'usernameField':_0x3f51('0x1a'),'passwordField':_0x3f51('0x1b')},function(_0x374aa2,_0x2cbfc5,_0x236e2a){return ActiveDirectoryAuthenticate(db[_0x3f51('0x2e')],_0x374aa2,_0x2cbfc5,_0x236e2a);}));
\ No newline at end of file
+var _0x8167=['ad-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','use','User','passport','passport-local','Strategy','moment','activedirectory2','util','../../mysqldb','../../components/auth/service','../../config/utils','../../config/environment','../../config/logger','api','undefined','activedirectory','baseDN','domain','authenticate','error','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Setting','findOne','adSsoEnabled','blockDuration','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','password','salt','role','disabled','blocked','blockedAt','online','admin','user','add','minutes','clearBlockUser','getLicense','status','login'];(function(_0x34941e,_0x22e889){var _0x43c927=function(_0x3e6489){while(--_0x3e6489){_0x34941e['push'](_0x34941e['shift']());}};_0x43c927(++_0x22e889);}(_0x8167,0x164));var _0x7816=function(_0x21e480,_0xe09b61){_0x21e480=_0x21e480-0x0;var _0x14528e=_0x8167[_0x21e480];return _0x14528e;};'use strict';var passport=require(_0x7816('0x0'));var LocalStrategy=require(_0x7816('0x1'))[_0x7816('0x2')];var moment=require(_0x7816('0x3'));var ActiveDirectory=require(_0x7816('0x4'));var BPromise=require('bluebird');var util=require(_0x7816('0x5'));var db=require(_0x7816('0x6'))['db'];var authService=require(_0x7816('0x7'));var utils=require(_0x7816('0x8'));var config=require(_0x7816('0x9'));var logger=require(_0x7816('0xa'))(_0x7816('0xb'));function isActiveDirectoryConfigured(_0x3fdee2){var _0x1ea627=![];if(typeof _0x3fdee2['activedirectory']!==_0x7816('0xc')){_0x1ea627=_0x3fdee2[_0x7816('0xd')][_0x7816('0xe')]&&_0x3fdee2[_0x7816('0xd')]['url']&&_0x3fdee2[_0x7816('0xd')][_0x7816('0xf')];}return _0x1ea627;}function adAuthenticate(_0xca2be6,_0x384544,_0x26891f){return new BPromise(function(_0x39df2d,_0x5df1bd){try{var _0x72a109=new ActiveDirectory(_0xca2be6);_0x72a109[_0x7816('0x10')](_0x384544,_0x26891f,function(_0xce8854,_0x100402){if(_0xce8854){logger[_0x7816('0x11')](_0x7816('0x12'),_0x384544,util[_0x7816('0x13')](_0xce8854,{'showHidden':![],'depth':null}));_0x5df1bd(_0x7816('0x14'));}else if(!_0x100402){logger[_0x7816('0x11')](_0x7816('0x15'),_0x384544);_0x5df1bd(_0x7816('0x14'));}else{_0x39df2d(_0x100402);}});}catch(_0x515a62){_0x5df1bd(_0x515a62);}});}function ActiveDirectoryAuthenticate(_0x4d08f4,_0x56d9c0,_0x2fdb20,_0x145a09){var _0x20df9f,_0x774ccd;if(!isActiveDirectoryConfigured(config)){logger[_0x7816('0x11')]('Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured',_0x56d9c0);return _0x145a09(null,![],{'message':_0x7816('0x14')});}return db[_0x7816('0x16')][_0x7816('0x17')]({'where':{'id':0x1},'attributes':[_0x7816('0x18'),_0x7816('0x19')],'raw':!![]})[_0x7816('0x1a')](function(_0x13389b){_0x20df9f=_0x13389b;if(!_0x20df9f[_0x7816('0x18')]){logger[_0x7816('0x11')](_0x7816('0x1b'),_0x56d9c0);throw new Error(_0x7816('0x14'));}return _0x4d08f4[_0x7816('0x17')]({'attributes':['id',_0x7816('0x1c'),_0x7816('0x1d'),_0x7816('0x1e'),_0x7816('0x1f'),_0x7816('0x20'),_0x7816('0x21'),_0x7816('0x22'),_0x7816('0x23')],'where':{'name':_0x56d9c0,'role':{'$or':[_0x7816('0x24'),_0x7816('0x25'),'agent']},'adSsoEnabled':!![]}});})[_0x7816('0x1a')](function(_0x4c9340){if(!_0x4c9340||_0x4c9340&&_0x4c9340[_0x7816('0x1c')]!==_0x56d9c0){throw new Error(_0x7816('0x14'));}_0x774ccd=_0x4c9340;var _0x1ad25e=_0x774ccd[_0x7816('0x1c')]+'@'+config[_0x7816('0xd')][_0x7816('0xf')];return adAuthenticate(config[_0x7816('0xd')],_0x1ad25e,_0x2fdb20);})['then'](function(_0x13e09e){if(_0x774ccd['disabled']){throw new Error(_0x7816('0x14'));}if(_0x20df9f[_0x7816('0x19')]>0x0){if(_0x774ccd['blocked']){if(moment(_0x774ccd['blockedAt'])[_0x7816('0x26')](_0x20df9f[_0x7816('0x19')],_0x7816('0x27'))>moment()){throw new Error(_0x7816('0x14'));}return utils[_0x7816('0x28')](_0x774ccd,0x0,![],null)[_0x7816('0x1a')](function(){return utils['getLicense'](_0x774ccd);})['then'](function(){return _0x145a09(null,_0x774ccd);});}else{return utils['getLicense'](_0x774ccd)['then'](function(){return _0x145a09(null,_0x774ccd);});}}else{return utils[_0x7816('0x29')](_0x774ccd)[_0x7816('0x1a')](function(){return _0x145a09(null,_0x774ccd);});}})['catch'](function(_0x586f0b){return _0x145a09(null,![],_0x586f0b);});}function handleError(_0x513e0e,_0x2e9b4c,_0x97cf9a){return _0x513e0e[_0x7816('0x2a')](_0x2e9b4c||0x1f4)['send']({'message':_0x97cf9a?_0x97cf9a['message']||_0x97cf9a:''});}exports[_0x7816('0x2b')]=function(_0xcbe5a4,_0x49c042,_0x5184ea){passport[_0x7816('0x10')](_0x7816('0x2c'),function(_0x40e609,_0x57255c,_0x5093a3){var _0x3513a2=_0x40e609||_0x5093a3;if(_0x3513a2){return handleError(_0x49c042,0x191,_0x3513a2);}if(!_0x57255c){return handleError(_0x49c042,0x194,{'message':_0x7816('0x2d')});}else{var _0x190811={'payload':{'id':_0x57255c['id'],'role':_0x57255c['role']},'options':{'expiresIn':0x15180}};return authService[_0x7816('0x2e')](_0x190811)[_0x7816('0x1a')](function(_0x1cf2ac){_0x49c042[_0x7816('0x2f')]({'id':_0x57255c['id'],'token':_0x1cf2ac,'statusCall':'','isAlreadyLogged':_0x57255c[_0x7816('0x23')]});});}})(_0xcbe5a4,_0x49c042,_0x5184ea);};passport[_0x7816('0x30')](_0x7816('0x2c'),new LocalStrategy({'usernameField':_0x7816('0x1c'),'passwordField':_0x7816('0x1d')},function(_0x30cb43,_0x342f8a,_0x559238){return ActiveDirectoryAuthenticate(db[_0x7816('0x31')],_0x30cb43,_0x342f8a,_0x559238);}));
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/index.js b/server/api/authActiveDirectory/index.js
index ff53cac..0306a5d 100644
--- a/server/api/authActiveDirectory/index.js
+++ b/server/api/authActiveDirectory/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x899a=['./authActiveDirectory.controller','login','exports','express','Router'];(function(_0x26b817,_0x4b84b8){var _0x1f1ad5=function(_0x5192dc){while(--_0x5192dc){_0x26b817['push'](_0x26b817['shift']());}};_0x1f1ad5(++_0x4b84b8);}(_0x899a,0x184));var _0xa899=function(_0x3a2255,_0x230b4d){_0x3a2255=_0x3a2255-0x0;var _0x291af5=_0x899a[_0x3a2255];return _0x291af5;};'use strict';var express=require(_0xa899('0x0'));var router=express[_0xa899('0x1')]();var controller=require(_0xa899('0x2'));router['post']('/',controller[_0xa899('0x3')]);module[_0xa899('0x4')]=router;
\ No newline at end of file
+var _0x167f=['post','login','exports','./authActiveDirectory.controller'];(function(_0xbce22a,_0x3b32f4){var _0x2e0203=function(_0x1b97bd){while(--_0x1b97bd){_0xbce22a['push'](_0xbce22a['shift']());}};_0x2e0203(++_0x3b32f4);}(_0x167f,0x1cb));var _0xf167=function(_0x5b78e8,_0x55096b){_0x5b78e8=_0x5b78e8-0x0;var _0xf2c321=_0x167f[_0x5b78e8];return _0xf2c321;};'use strict';var express=require('express');var router=express['Router']();var controller=require(_0xf167('0x0'));router[_0xf167('0x1')]('/',controller[_0xf167('0x2')]);module[_0xf167('0x3')]=router;
\ No newline at end of file
diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js
index 9a0a816..1039ed7 100644
--- a/server/api/authGoogle/authGoogle.controller.js
+++ b/server/api/authGoogle/authGoogle.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9957=['../../config/environment','../../config/utils','login','google','/login','profile','email','callback','authenticate','use','clientID','clientSecret','secret','callbackURL','Setting','findOne','allowedLoginAttempts','User','find','map','emails','value','admin','user','then','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','blockedAt','add','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','../../mysqldb'];(function(_0x4bbf24,_0x27bfec){var _0x3de35d=function(_0x115a42){while(--_0x115a42){_0x4bbf24['push'](_0x4bbf24['shift']());}};_0x3de35d(++_0x27bfec);}(_0x9957,0x93));var _0x7995=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x9957[_0x2f5ac5];return _0x37c9a8;};'use strict';var _=require(_0x7995('0x0'));var passport=require(_0x7995('0x1'));var GoogleStrategy=require(_0x7995('0x2'))[_0x7995('0x3')];var moment=require('moment');var db=require(_0x7995('0x4'))['db'];var config=require(_0x7995('0x5'));var utils=require(_0x7995('0x6'));exports[_0x7995('0x7')]=passport['authenticate'](_0x7995('0x8'),{'failureRedirect':_0x7995('0x9'),'scope':[_0x7995('0xa'),_0x7995('0xb')],'session':![]});exports[_0x7995('0xc')]=passport[_0x7995('0xd')]('google',{'failureRedirect':_0x7995('0x9'),'session':![]});passport[_0x7995('0xe')](new GoogleStrategy({'clientID':config['google']?config[_0x7995('0x8')][_0x7995('0xf')]:'id','clientSecret':config[_0x7995('0x8')]?config[_0x7995('0x8')][_0x7995('0x10')]:_0x7995('0x11'),'callbackURL':config[_0x7995('0x8')]?config['google'][_0x7995('0x12')]:''},function(_0x41c652,_0x581f22,_0xb0c872,_0x2cb37a){var _0x19a27e,_0x385f00;return db[_0x7995('0x13')][_0x7995('0x14')]({'where':{'id':0x1},'attributes':[_0x7995('0x15'),'blockDuration'],'raw':!![]})['then'](function(_0x2b4e94){_0x19a27e=_0x2b4e94;return db[_0x7995('0x16')][_0x7995('0x17')]({'where':{'email':_[_0x7995('0x18')](_0xb0c872[_0x7995('0x19')],_0x7995('0x1a')),'role':{'$or':[_0x7995('0x1b'),_0x7995('0x1c'),'agent']}}});})[_0x7995('0x1d')](function(_0x565d97){_0x385f00=_0x565d97;if(_0x385f00){if(_0x385f00[_0x7995('0x1e')]){return _0x2cb37a(_0x7995('0x1f'));}else if(_0x19a27e[_0x7995('0x20')]>0x0){if(_0x385f00[_0x7995('0x21')]){if(moment(_0x385f00[_0x7995('0x22')])[_0x7995('0x23')](_0x19a27e['blockDuration'],'minutes')>moment()){return _0x2cb37a(_0x7995('0x1f'));}else{return utils['clearBlockUser'](_0x385f00,0x0,![],null)['then'](function(){return utils[_0x7995('0x24')](_0x385f00);})[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)['then'](function(){return _0x2cb37a(null,_0x385f00);});}}return _0x2cb37a(_0x7995('0x1f'));})[_0x7995('0x25')](function(_0x350fd9){_0x2cb37a(_0x350fd9);});}));
\ No newline at end of file
+var _0x9957=['../../config/environment','../../config/utils','login','google','/login','profile','email','callback','authenticate','use','clientID','clientSecret','secret','callbackURL','Setting','findOne','allowedLoginAttempts','User','find','map','emails','value','admin','user','then','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','blockedAt','add','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','../../mysqldb'];(function(_0x5b3b5c,_0x888ee5){var _0x56d39b=function(_0x2effc2){while(--_0x2effc2){_0x5b3b5c['push'](_0x5b3b5c['shift']());}};_0x56d39b(++_0x888ee5);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var _=require(_0x7995('0x0'));var passport=require(_0x7995('0x1'));var GoogleStrategy=require(_0x7995('0x2'))[_0x7995('0x3')];var moment=require('moment');var db=require(_0x7995('0x4'))['db'];var config=require(_0x7995('0x5'));var utils=require(_0x7995('0x6'));exports[_0x7995('0x7')]=passport['authenticate'](_0x7995('0x8'),{'failureRedirect':_0x7995('0x9'),'scope':[_0x7995('0xa'),_0x7995('0xb')],'session':![]});exports[_0x7995('0xc')]=passport[_0x7995('0xd')]('google',{'failureRedirect':_0x7995('0x9'),'session':![]});passport[_0x7995('0xe')](new GoogleStrategy({'clientID':config['google']?config[_0x7995('0x8')][_0x7995('0xf')]:'id','clientSecret':config[_0x7995('0x8')]?config[_0x7995('0x8')][_0x7995('0x10')]:_0x7995('0x11'),'callbackURL':config[_0x7995('0x8')]?config['google'][_0x7995('0x12')]:''},function(_0x41c652,_0x581f22,_0xb0c872,_0x2cb37a){var _0x19a27e,_0x385f00;return db[_0x7995('0x13')][_0x7995('0x14')]({'where':{'id':0x1},'attributes':[_0x7995('0x15'),'blockDuration'],'raw':!![]})['then'](function(_0x2b4e94){_0x19a27e=_0x2b4e94;return db[_0x7995('0x16')][_0x7995('0x17')]({'where':{'email':_[_0x7995('0x18')](_0xb0c872[_0x7995('0x19')],_0x7995('0x1a')),'role':{'$or':[_0x7995('0x1b'),_0x7995('0x1c'),'agent']}}});})[_0x7995('0x1d')](function(_0x565d97){_0x385f00=_0x565d97;if(_0x385f00){if(_0x385f00[_0x7995('0x1e')]){return _0x2cb37a(_0x7995('0x1f'));}else if(_0x19a27e[_0x7995('0x20')]>0x0){if(_0x385f00[_0x7995('0x21')]){if(moment(_0x385f00[_0x7995('0x22')])[_0x7995('0x23')](_0x19a27e['blockDuration'],'minutes')>moment()){return _0x2cb37a(_0x7995('0x1f'));}else{return utils['clearBlockUser'](_0x385f00,0x0,![],null)['then'](function(){return utils[_0x7995('0x24')](_0x385f00);})[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)['then'](function(){return _0x2cb37a(null,_0x385f00);});}}return _0x2cb37a(_0x7995('0x1f'));})[_0x7995('0x25')](function(_0x350fd9){_0x2cb37a(_0x350fd9);});}));
\ No newline at end of file
diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js
index 1593e19..b159939 100644
--- a/server/api/authGoogle/index.js
+++ b/server/api/authGoogle/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc4dd=['exports','passport','Router','./authGoogle.controller','../../components/auth/service','get','login','/callback','callback','setTokenCookie'];(function(_0x16151b,_0x1b89ff){var _0x285555=function(_0x432f56){while(--_0x432f56){_0x16151b['push'](_0x16151b['shift']());}};_0x285555(++_0x1b89ff);}(_0xc4dd,0x1cd));var _0xdc4d=function(_0x57d72f,_0xf27a3c){_0x57d72f=_0x57d72f-0x0;var _0x3c439e=_0xc4dd[_0x57d72f];return _0x3c439e;};'use strict';var express=require('express');var passport=require(_0xdc4d('0x0'));var router=express[_0xdc4d('0x1')]();var controller=require(_0xdc4d('0x2'));var userController=require('../user/user.controller.js');var authService=require(_0xdc4d('0x3'));router[_0xdc4d('0x4')]('/',controller[_0xdc4d('0x5')]);router[_0xdc4d('0x4')](_0xdc4d('0x6'),controller[_0xdc4d('0x7')],authService['isMiddleware'],userController['login'],authService[_0xdc4d('0x8')]);module[_0xdc4d('0x9')]=router;
\ No newline at end of file
+var _0x7698=['./authGoogle.controller','login','callback','isMiddleware','setTokenCookie','exports','express','passport','Router'];(function(_0x36b037,_0x2b234e){var _0x409194=function(_0xddc9dc){while(--_0xddc9dc){_0x36b037['push'](_0x36b037['shift']());}};_0x409194(++_0x2b234e);}(_0x7698,0x7b));var _0x8769=function(_0x4458f6,_0x3c0532){_0x4458f6=_0x4458f6-0x0;var _0x24432f=_0x7698[_0x4458f6];return _0x24432f;};'use strict';var express=require(_0x8769('0x0'));var passport=require(_0x8769('0x1'));var router=express[_0x8769('0x2')]();var controller=require(_0x8769('0x3'));var userController=require('../user/user.controller.js');var authService=require('../../components/auth/service');router['get']('/',controller[_0x8769('0x4')]);router['get']('/callback',controller[_0x8769('0x5')],authService[_0x8769('0x6')],userController[_0x8769('0x4')],authService[_0x8769('0x7')]);module[_0x8769('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js
index 04393e6..382506a 100644
--- a/server/api/authLocal/authLocal.controller.js
+++ b/server/api/authLocal/authLocal.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd150=['request','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','stringify','login','local-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','forgot','body','Email\x20parameter\x20is\x20missing','trim','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','https://','host','/reset/','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','status','Reset\x20Email\x20sent!','catch','reset','params','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','enforcePasswordHistory','validatePasswordPattern','previousPasswords','validatePasswordHistory','passwordHistoryLimit','resetPasswordToken','send','use','util','Strategy','jayson/promise','lodash','moment','../../mysqldb','../../config/utils','client','http','Setting','findOne','blockDuration','then','password','role','disabled','blocked','blockedAt','loginAttempts','admin','user','agent','authenticate','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','allowedLoginAttempts','add','clearBlockUser','minutes','getLicense','MailAccount','find','name','email','MailServerOut','Smtp','CloudProvider','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions','merge','format','\x22%s\x22\x20<%s>'];(function(_0x1b62b8,_0x3e78d9){var _0x47a5a0=function(_0x479a5b){while(--_0x479a5b){_0x1b62b8['push'](_0x1b62b8['shift']());}};_0x47a5a0(++_0x3e78d9);}(_0xd150,0xd6));var _0x0d15=function(_0x53f264,_0x1f69e8){_0x53f264=_0x53f264-0x0;var _0x18c742=_0xd150[_0x53f264];return _0x18c742;};'use strict';var util=require(_0x0d15('0x0'));var passport=require('passport');var LocalStrategy=require('passport-local')[_0x0d15('0x1')];var jayson=require(_0x0d15('0x2'));var _=require(_0x0d15('0x3'));var rs=require('randomstring');var moment=require(_0x0d15('0x4'));var db=require(_0x0d15('0x5'))['db'];var authService=require('../../components/auth/service');var utils=require(_0x0d15('0x6'));var client=jayson[_0x0d15('0x7')][_0x0d15('0x8')]({'port':0x232b});function localAuthenticate(_0x472ff9,_0x34c8fb,_0x264a75,_0xd9ab3a){var _0x1a2452,_0x2dc6a0;return db[_0x0d15('0x9')][_0x0d15('0xa')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x0d15('0xb')],'raw':!![]})[_0x0d15('0xc')](function(_0x123767){_0x1a2452=_0x123767;return _0x472ff9[_0x0d15('0xa')]({'attributes':['id','name',_0x0d15('0xd'),'salt',_0x0d15('0xe'),_0x0d15('0xf'),_0x0d15('0x10'),_0x0d15('0x11'),_0x0d15('0x12')],'where':{'name':_0x34c8fb,'role':{'$or':[_0x0d15('0x13'),_0x0d15('0x14'),_0x0d15('0x15')]}}});})[_0x0d15('0xc')](function(_0x4cc1b5){if(!_0x4cc1b5||_0x4cc1b5&&_0x4cc1b5['name']!==_0x34c8fb){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x2dc6a0=_0x4cc1b5;return _0x2dc6a0;}})[_0x0d15('0xc')](function(){_0x2dc6a0[_0x0d15('0x16')](_0x264a75,function(_0x1011c0,_0x405223){var _0x80ff08=_0x2dc6a0['loginAttempts']+0x1;if(_0x1011c0){return _0xd9ab3a(_0x1011c0);}else if(!_0x405223){if(_0x2dc6a0['disabled']){return _0xd9ab3a(null,![],{'message':_0x0d15('0x17')});}else if(_0x1a2452[_0x0d15('0x18')]>0x0){if(_0x2dc6a0[_0x0d15('0x10')]){if(_0x1a2452['blockDuration']>0x0){if(moment(_0x2dc6a0[_0x0d15('0x11')])[_0x0d15('0x19')](_0x1a2452[_0x0d15('0xb')],'minutes')>moment()){return _0xd9ab3a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x0d15('0x1a')](_0x2dc6a0,_0x80ff08,![],null)[_0x0d15('0xc')](function(){return _0xd9ab3a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}else{return _0xd9ab3a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x80ff08>=_0x1a2452[_0x0d15('0x18')]){return utils[_0x0d15('0x1a')](_0x2dc6a0,0x0,!![],moment())[_0x0d15('0xc')](function(){return _0xd9ab3a(null,![],{'message':_0x0d15('0x17')});});}else{return utils['clearBlockUser'](_0x2dc6a0,_0x80ff08,![],null)[_0x0d15('0xc')](function(){return _0xd9ab3a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0xd9ab3a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x2dc6a0['disabled']){return _0xd9ab3a(null,![],{'message':_0x0d15('0x17')});}else if(_0x1a2452[_0x0d15('0x18')]>0x0){if(_0x2dc6a0[_0x0d15('0x10')]){if(_0x1a2452[_0x0d15('0xb')]>0x0){if(moment(_0x2dc6a0[_0x0d15('0x11')])[_0x0d15('0x19')](_0x1a2452[_0x0d15('0xb')],_0x0d15('0x1b'))>moment()){return _0xd9ab3a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils['clearBlockUser'](_0x2dc6a0,0x0,![],null)[_0x0d15('0xc')](function(){return utils[_0x0d15('0x1c')](_0x2dc6a0);})[_0x0d15('0xc')](function(){return _0xd9ab3a(null,_0x2dc6a0);});}}else{return _0xd9ab3a(null,![],{'message':_0x0d15('0x17')});}}else{return utils['clearBlockUser'](_0x2dc6a0,0x0,![],null)['then'](function(){return utils[_0x0d15('0x1c')](_0x2dc6a0);})[_0x0d15('0xc')](function(){return _0xd9ab3a(null,_0x2dc6a0);})['catch'](function(_0x258b8e){return _0xd9ab3a(null,![],_0x258b8e);});}}else{if(_0x2dc6a0[_0x0d15('0x10')]){return _0xd9ab3a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x0d15('0x1c')](_0x2dc6a0)[_0x0d15('0xc')](function(){return _0xd9ab3a(null,_0x2dc6a0);});}}}});})['catch'](function(_0x3a3696){return _0xd9ab3a(null,![],_0x3a3696);});}function sendServiceMail(_0x280080){return db[_0x0d15('0x1d')][_0x0d15('0x1e')]({'where':{'service':!![]},'attributes':['id',_0x0d15('0x1f'),_0x0d15('0x20')],'include':[{'model':db[_0x0d15('0x21')],'as':_0x0d15('0x22'),'include':[{'model':db[_0x0d15('0x23')],'as':_0x0d15('0x23')}]}]})[_0x0d15('0xc')](function(_0x20a856){if(!_0x20a856){throw new Error(_0x0d15('0x24'));}var _0x4d9c79=_0x20a856[_0x0d15('0x25')]();var _0x362401={'account':_0x4d9c79,'message':_[_0x0d15('0x26')]({'from':util[_0x0d15('0x27')](_0x0d15('0x28'),_0x20a856[_0x0d15('0x1f')],_0x20a856[_0x0d15('0x20')]||_0x20a856[_0x0d15('0x22')][_0x0d15('0x14')])},_0x280080)};return client[_0x0d15('0x29')]('SendMail',_0x362401);})[_0x0d15('0xc')](function(_0x5a3d07){if(_0x5a3d07[_0x0d15('0x2a')]){throw new Error(util[_0x0d15('0x27')](_0x0d15('0x2b'),_0x5a3d07[_0x0d15('0x2a')][_0x0d15('0x2c')]||JSON[_0x0d15('0x2d')](_0x5a3d07[_0x0d15('0x2a')])));}return!![];});}function handleError(_0x28c70f,_0x240040,_0x2deea4){return _0x28c70f['status'](_0x240040||0x1f4)['send']({'message':_0x2deea4?_0x2deea4[_0x0d15('0x2c')]||_0x2deea4:''});}exports[_0x0d15('0x2e')]=function(_0x49d55f,_0x5661d9,_0x3e1c42){passport['authenticate'](_0x0d15('0x2f'),function(_0x1d9a4d,_0x45218d,_0x3b4644){var _0x5dbe7b=_0x1d9a4d||_0x3b4644;if(_0x5dbe7b){return handleError(_0x5661d9,0x191,_0x5dbe7b);}if(!_0x45218d){return handleError(_0x5661d9,0x194,{'message':_0x0d15('0x30')});}else{var _0x30c388={'payload':{'id':_0x45218d['id'],'role':_0x45218d['role']},'options':{'expiresIn':0x15180}};return authService[_0x0d15('0x31')](_0x30c388)[_0x0d15('0xc')](function(_0x1c68f1){_0x5661d9[_0x0d15('0x32')]({'id':_0x45218d['id'],'token':_0x1c68f1,'statusCall':'','isAlreadyLogged':_0x45218d['online']});});}})(_0x49d55f,_0x5661d9,_0x3e1c42);};exports[_0x0d15('0x33')]=function(_0x355f21,_0x36fcec){if(!_0x355f21[_0x0d15('0x34')][_0x0d15('0x20')]){return handleError(_0x36fcec,0x1f4,{'message':_0x0d15('0x35')});}var _0x3578b4=rs['generate']();_0x355f21[_0x0d15('0x34')][_0x0d15('0x20')]=_0x355f21[_0x0d15('0x34')]['email'][_0x0d15('0x36')]()['toLowerCase']();var _0x1c4150;return db['Setting'][_0x0d15('0xa')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts','blockDuration'],'raw':!![]})[_0x0d15('0xc')](function(_0x2fc4c4){_0x1c4150=_0x2fc4c4;return db[_0x0d15('0x37')][_0x0d15('0x1e')]({'where':{'email':_0x355f21[_0x0d15('0x34')][_0x0d15('0x20')]}});})[_0x0d15('0xc')](function(_0x4a0b5c){if(!_0x4a0b5c){throw new Error(_0x0d15('0x38'));}if(_0x4a0b5c[_0x0d15('0xf')]){throw new Error(_0x0d15('0x39'));}if(_0x4a0b5c[_0x0d15('0x10')]){if(moment(_0x4a0b5c[_0x0d15('0x11')])[_0x0d15('0x19')](_0x1c4150[_0x0d15('0xb')],_0x0d15('0x1b'))>moment()){throw new Error(_0x0d15('0x3a'));}else{_0x4a0b5c[_0x0d15('0x10')]=![];_0x4a0b5c[_0x0d15('0x11')]=null;}}_0x4a0b5c['resetPasswordToken']=_0x3578b4;_0x4a0b5c[_0x0d15('0x3b')]=Date[_0x0d15('0x3c')]()+0x36ee80;return _0x4a0b5c[_0x0d15('0x3d')]();})[_0x0d15('0xc')](function(){return sendServiceMail({'to':_0x355f21[_0x0d15('0x34')][_0x0d15('0x20')],'subject':_0x0d15('0x3e'),'text':_0x0d15('0x3f')+_0x0d15('0x40')+_0x0d15('0x41')+_0x355f21['headers'][_0x0d15('0x42')]+_0x0d15('0x43')+_0x3578b4+'\x0a\x0a'+_0x0d15('0x44')});})[_0x0d15('0xc')](function(){_0x36fcec[_0x0d15('0x45')](0xc8)['send']({'message':_0x0d15('0x46')});})[_0x0d15('0x47')](function(_0x4cf1fc){return handleError(_0x36fcec,0x1f4,_0x4cf1fc);});};exports[_0x0d15('0x48')]=function(_0xbb6e1b,_0x4605b3){return db['User']['find']({'where':{'resetPasswordToken':_0xbb6e1b[_0x0d15('0x49')][_0x0d15('0x4a')],'resetPasswordExpires':{'$gt':Date[_0x0d15('0x3c')]()}}})['then'](function(_0x387764){if(!_0x387764){throw new Error(_0x0d15('0x4b'));}return db[_0x0d15('0x9')][_0x0d15('0xa')]({'attributes':['id',_0x0d15('0x4c'),_0x0d15('0x4d'),'passwordHistoryLimit']})[_0x0d15('0xc')](function(_0x111e5f){if(_0x111e5f['securePassword'])authService[_0x0d15('0x4e')](_0xbb6e1b['body'][_0x0d15('0xd')]);if(!_0x111e5f[_0x0d15('0x4d')]||!_0x387764[_0x0d15('0x4f')])return _0x387764;authService[_0x0d15('0x50')](_0xbb6e1b['body'][_0x0d15('0xd')],_0x387764[_0x0d15('0x4f')],_0x111e5f[_0x0d15('0x51')]);return _0x387764;})['then'](function(){_0x387764['password']=_0xbb6e1b['body'][_0x0d15('0xd')];_0x387764[_0x0d15('0x52')]=null;_0x387764[_0x0d15('0x3b')]=null;return _0x387764[_0x0d15('0x3d')]();});})[_0x0d15('0xc')](function(){_0x4605b3[_0x0d15('0x45')](0xc8)[_0x0d15('0x53')]({'message':'Password\x20reset!'});})[_0x0d15('0x47')](function(_0x305b6c){return handleError(_0x4605b3,0x1f4,_0x305b6c);});};passport[_0x0d15('0x54')]('local-login',new LocalStrategy({'usernameField':_0x0d15('0x1f'),'passwordField':_0x0d15('0xd')},function(_0x2ddfbf,_0x3a0772,_0x402090){return localAuthenticate(db['User'],_0x2ddfbf,_0x3a0772,_0x402090);}));
\ No newline at end of file
+var _0x3c14=['merge','format','\x22%s\x22\x20<%s>','request','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','status','send','login','local-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','online','forgot','body','generate','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','save','xCally\x20Motion\x20Password\x20Reset','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','https://','headers','host','/reset/','Reset\x20Email\x20sent!','params','token','now','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','validatePasswordPattern','password','enforcePasswordHistory','previousPasswords','validatePasswordHistory','passwordHistoryLimit','use','util','passport','Strategy','randomstring','moment','../../mysqldb','../../components/auth/service','../../config/utils','client','http','Setting','findOne','then','name','salt','role','disabled','blocked','blockedAt','loginAttempts','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','blockDuration','add','minutes','clearBlockUser','allowedLoginAttempts','getLicense','catch','MailAccount','find','email','MailServerOut','Smtp','CloudProvider','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions'];(function(_0x4bdc6a,_0x50ffb7){var _0x3857ff=function(_0x18f64f){while(--_0x18f64f){_0x4bdc6a['push'](_0x4bdc6a['shift']());}};_0x3857ff(++_0x50ffb7);}(_0x3c14,0x1d6));var _0x43c1=function(_0x307d86,_0x9264f2){_0x307d86=_0x307d86-0x0;var _0x361745=_0x3c14[_0x307d86];return _0x361745;};'use strict';var util=require(_0x43c1('0x0'));var passport=require(_0x43c1('0x1'));var LocalStrategy=require('passport-local')[_0x43c1('0x2')];var jayson=require('jayson/promise');var _=require('lodash');var rs=require(_0x43c1('0x3'));var moment=require(_0x43c1('0x4'));var db=require(_0x43c1('0x5'))['db'];var authService=require(_0x43c1('0x6'));var utils=require(_0x43c1('0x7'));var client=jayson[_0x43c1('0x8')][_0x43c1('0x9')]({'port':0x232b});function localAuthenticate(_0x5d852b,_0x295bba,_0xd3ba6,_0x3e460e){var _0x2a4d65,_0x8499f6;return db[_0x43c1('0xa')][_0x43c1('0xb')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts','blockDuration'],'raw':!![]})[_0x43c1('0xc')](function(_0x44fac4){_0x2a4d65=_0x44fac4;return _0x5d852b[_0x43c1('0xb')]({'attributes':['id',_0x43c1('0xd'),'password',_0x43c1('0xe'),_0x43c1('0xf'),_0x43c1('0x10'),_0x43c1('0x11'),_0x43c1('0x12'),_0x43c1('0x13')],'where':{'name':_0x295bba,'role':{'$or':[_0x43c1('0x14'),_0x43c1('0x15'),_0x43c1('0x16')]}}});})[_0x43c1('0xc')](function(_0x57b582){if(!_0x57b582||_0x57b582&&_0x57b582[_0x43c1('0xd')]!==_0x295bba){throw new Error(_0x43c1('0x17'));}else{_0x8499f6=_0x57b582;return _0x8499f6;}})[_0x43c1('0xc')](function(){_0x8499f6[_0x43c1('0x18')](_0xd3ba6,function(_0x348f96,_0x2bb723){var _0x357c13=_0x8499f6[_0x43c1('0x13')]+0x1;if(_0x348f96){return _0x3e460e(_0x348f96);}else if(!_0x2bb723){if(_0x8499f6[_0x43c1('0x10')]){return _0x3e460e(null,![],{'message':_0x43c1('0x17')});}else if(_0x2a4d65['allowedLoginAttempts']>0x0){if(_0x8499f6[_0x43c1('0x11')]){if(_0x2a4d65[_0x43c1('0x19')]>0x0){if(moment(_0x8499f6['blockedAt'])[_0x43c1('0x1a')](_0x2a4d65[_0x43c1('0x19')],_0x43c1('0x1b'))>moment()){return _0x3e460e(null,![],{'message':_0x43c1('0x17')});}else{return utils[_0x43c1('0x1c')](_0x8499f6,_0x357c13,![],null)['then'](function(){return _0x3e460e(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}else{return _0x3e460e(null,![],{'message':_0x43c1('0x17')});}}else{if(_0x357c13>=_0x2a4d65[_0x43c1('0x1d')]){return utils[_0x43c1('0x1c')](_0x8499f6,0x0,!![],moment())['then'](function(){return _0x3e460e(null,![],{'message':_0x43c1('0x17')});});}else{return utils[_0x43c1('0x1c')](_0x8499f6,_0x357c13,![],null)[_0x43c1('0xc')](function(){return _0x3e460e(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0x3e460e(null,![],{'message':_0x43c1('0x17')});}}else{if(_0x8499f6['disabled']){return _0x3e460e(null,![],{'message':_0x43c1('0x17')});}else if(_0x2a4d65[_0x43c1('0x1d')]>0x0){if(_0x8499f6['blocked']){if(_0x2a4d65[_0x43c1('0x19')]>0x0){if(moment(_0x8499f6[_0x43c1('0x12')])[_0x43c1('0x1a')](_0x2a4d65[_0x43c1('0x19')],_0x43c1('0x1b'))>moment()){return _0x3e460e(null,![],{'message':_0x43c1('0x17')});}else{return utils[_0x43c1('0x1c')](_0x8499f6,0x0,![],null)[_0x43c1('0xc')](function(){return utils[_0x43c1('0x1e')](_0x8499f6);})[_0x43c1('0xc')](function(){return _0x3e460e(null,_0x8499f6);});}}else{return _0x3e460e(null,![],{'message':_0x43c1('0x17')});}}else{return utils[_0x43c1('0x1c')](_0x8499f6,0x0,![],null)[_0x43c1('0xc')](function(){return utils[_0x43c1('0x1e')](_0x8499f6);})['then'](function(){return _0x3e460e(null,_0x8499f6);})[_0x43c1('0x1f')](function(_0x20f99b){return _0x3e460e(null,![],_0x20f99b);});}}else{if(_0x8499f6[_0x43c1('0x11')]){return _0x3e460e(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x43c1('0x1e')](_0x8499f6)[_0x43c1('0xc')](function(){return _0x3e460e(null,_0x8499f6);});}}}});})[_0x43c1('0x1f')](function(_0x48a5e4){return _0x3e460e(null,![],_0x48a5e4);});}function sendServiceMail(_0x24287f){return db[_0x43c1('0x20')][_0x43c1('0x21')]({'where':{'service':!![]},'attributes':['id',_0x43c1('0xd'),_0x43c1('0x22')],'include':[{'model':db[_0x43c1('0x23')],'as':_0x43c1('0x24'),'include':[{'model':db[_0x43c1('0x25')],'as':_0x43c1('0x25')}]}]})['then'](function(_0x1aed29){if(!_0x1aed29){throw new Error(_0x43c1('0x26'));}var _0x2c647a=_0x1aed29[_0x43c1('0x27')]();var _0x110cc0={'account':_0x2c647a,'message':_[_0x43c1('0x28')]({'from':util[_0x43c1('0x29')](_0x43c1('0x2a'),_0x1aed29[_0x43c1('0xd')],_0x1aed29[_0x43c1('0x22')]||_0x1aed29[_0x43c1('0x24')][_0x43c1('0x15')])},_0x24287f)};return client[_0x43c1('0x2b')]('SendMail',_0x110cc0);})[_0x43c1('0xc')](function(_0x1b9f8b){if(_0x1b9f8b[_0x43c1('0x2c')]){throw new Error(util[_0x43c1('0x29')](_0x43c1('0x2d'),_0x1b9f8b['error'][_0x43c1('0x2e')]||JSON['stringify'](_0x1b9f8b[_0x43c1('0x2c')])));}return!![];});}function handleError(_0x1c3041,_0x5856ca,_0x5f0b0e){return _0x1c3041[_0x43c1('0x2f')](_0x5856ca||0x1f4)[_0x43c1('0x30')]({'message':_0x5f0b0e?_0x5f0b0e['message']||_0x5f0b0e:''});}exports[_0x43c1('0x31')]=function(_0x51ad9b,_0x1b23d4,_0x2b9e00){passport[_0x43c1('0x18')](_0x43c1('0x32'),function(_0x2a0e48,_0x54bb0e,_0x413dd9){var _0x131198=_0x2a0e48||_0x413dd9;if(_0x131198){return handleError(_0x1b23d4,0x191,_0x131198);}if(!_0x54bb0e){return handleError(_0x1b23d4,0x194,{'message':_0x43c1('0x33')});}else{var _0x51b4f6={'payload':{'id':_0x54bb0e['id'],'role':_0x54bb0e[_0x43c1('0xf')]},'options':{'expiresIn':0x15180}};return authService[_0x43c1('0x34')](_0x51b4f6)['then'](function(_0x40517c){_0x1b23d4[_0x43c1('0x35')]({'id':_0x54bb0e['id'],'token':_0x40517c,'statusCall':'','isAlreadyLogged':_0x54bb0e[_0x43c1('0x36')]});});}})(_0x51ad9b,_0x1b23d4,_0x2b9e00);};exports[_0x43c1('0x37')]=function(_0xa9ee48,_0x4ddf13){if(!_0xa9ee48[_0x43c1('0x38')]['email']){return handleError(_0x4ddf13,0x1f4,{'message':'Email\x20parameter\x20is\x20missing'});}var _0x3742fa=rs[_0x43c1('0x39')]();_0xa9ee48[_0x43c1('0x38')]['email']=_0xa9ee48[_0x43c1('0x38')]['email']['trim']()[_0x43c1('0x3a')]();var _0x5a4bd1;return db[_0x43c1('0xa')][_0x43c1('0xb')]({'where':{'id':0x1},'attributes':[_0x43c1('0x1d'),_0x43c1('0x19')],'raw':!![]})['then'](function(_0x2d5fa8){_0x5a4bd1=_0x2d5fa8;return db[_0x43c1('0x3b')][_0x43c1('0x21')]({'where':{'email':_0xa9ee48[_0x43c1('0x38')]['email']}});})['then'](function(_0xc0d5dc){if(!_0xc0d5dc){throw new Error(_0x43c1('0x3c'));}if(_0xc0d5dc[_0x43c1('0x10')]){throw new Error(_0x43c1('0x3d'));}if(_0xc0d5dc[_0x43c1('0x11')]){if(moment(_0xc0d5dc['blockedAt'])[_0x43c1('0x1a')](_0x5a4bd1[_0x43c1('0x19')],_0x43c1('0x1b'))>moment()){throw new Error(_0x43c1('0x3e'));}else{_0xc0d5dc['blocked']=![];_0xc0d5dc[_0x43c1('0x12')]=null;}}_0xc0d5dc[_0x43c1('0x3f')]=_0x3742fa;_0xc0d5dc[_0x43c1('0x40')]=Date['now']()+0x36ee80;return _0xc0d5dc[_0x43c1('0x41')]();})['then'](function(){return sendServiceMail({'to':_0xa9ee48[_0x43c1('0x38')][_0x43c1('0x22')],'subject':_0x43c1('0x42'),'text':'You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a'+_0x43c1('0x43')+_0x43c1('0x44')+_0xa9ee48[_0x43c1('0x45')][_0x43c1('0x46')]+_0x43c1('0x47')+_0x3742fa+'\x0a\x0a'+'If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a'});})[_0x43c1('0xc')](function(){_0x4ddf13[_0x43c1('0x2f')](0xc8)[_0x43c1('0x30')]({'message':_0x43c1('0x48')});})[_0x43c1('0x1f')](function(_0x87fcca){return handleError(_0x4ddf13,0x1f4,_0x87fcca);});};exports['reset']=function(_0x19387d,_0x350587){return db[_0x43c1('0x3b')][_0x43c1('0x21')]({'where':{'resetPasswordToken':_0x19387d[_0x43c1('0x49')][_0x43c1('0x4a')],'resetPasswordExpires':{'$gt':Date[_0x43c1('0x4b')]()}}})[_0x43c1('0xc')](function(_0x3f981b){if(!_0x3f981b){throw new Error(_0x43c1('0x4c'));}return db[_0x43c1('0xa')]['findOne']({'attributes':['id',_0x43c1('0x4d'),'enforcePasswordHistory','passwordHistoryLimit']})[_0x43c1('0xc')](function(_0x313fea){if(_0x313fea[_0x43c1('0x4d')])authService[_0x43c1('0x4e')](_0x19387d[_0x43c1('0x38')][_0x43c1('0x4f')]);if(!_0x313fea[_0x43c1('0x50')]||!_0x3f981b[_0x43c1('0x51')])return _0x3f981b;authService[_0x43c1('0x52')](_0x19387d[_0x43c1('0x38')][_0x43c1('0x4f')],_0x3f981b[_0x43c1('0x51')],_0x313fea[_0x43c1('0x53')]);return _0x3f981b;})['then'](function(){_0x3f981b[_0x43c1('0x4f')]=_0x19387d[_0x43c1('0x38')][_0x43c1('0x4f')];_0x3f981b[_0x43c1('0x3f')]=null;_0x3f981b[_0x43c1('0x40')]=null;return _0x3f981b[_0x43c1('0x41')]();});})[_0x43c1('0xc')](function(){_0x350587[_0x43c1('0x2f')](0xc8)[_0x43c1('0x30')]({'message':'Password\x20reset!'});})['catch'](function(_0x4bf04d){return handleError(_0x350587,0x1f4,_0x4bf04d);});};passport[_0x43c1('0x54')](_0x43c1('0x32'),new LocalStrategy({'usernameField':_0x43c1('0xd'),'passwordField':_0x43c1('0x4f')},function(_0x331254,_0x4bd451,_0x5b3955){return localAuthenticate(db[_0x43c1('0x3b')],_0x331254,_0x4bd451,_0x5b3955);}));
\ No newline at end of file
diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js
index 6282f89..9af9b1f 100644
--- a/server/api/authLocal/index.js
+++ b/server/api/authLocal/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x67db=['exports','express','Router','post','login','/forgot','forgot'];(function(_0xbacfad,_0x52a356){var _0x32c2f9=function(_0x4fabec){while(--_0x4fabec){_0xbacfad['push'](_0xbacfad['shift']());}};_0x32c2f9(++_0x52a356);}(_0x67db,0x8d));var _0xb67d=function(_0x47aa64,_0xfb8a07){_0x47aa64=_0x47aa64-0x0;var _0x549c7a=_0x67db[_0x47aa64];return _0x549c7a;};'use strict';var express=require(_0xb67d('0x0'));var router=express[_0xb67d('0x1')]();var controller=require('./authLocal.controller');router[_0xb67d('0x2')]('/',controller[_0xb67d('0x3')]);router[_0xb67d('0x2')](_0xb67d('0x4'),controller[_0xb67d('0x5')]);router[_0xb67d('0x2')]('/reset/:token',controller['reset']);module[_0xb67d('0x6')]=router;
\ No newline at end of file
+var _0xbb11=['express','Router','./authLocal.controller','post','login','/forgot','/reset/:token','reset','exports'];(function(_0x404b9a,_0xca0480){var _0x30ba61=function(_0x1cdde1){while(--_0x1cdde1){_0x404b9a['push'](_0x404b9a['shift']());}};_0x30ba61(++_0xca0480);}(_0xbb11,0x120));var _0x1bb1=function(_0x251d9c,_0x10858a){_0x251d9c=_0x251d9c-0x0;var _0x42f7c7=_0xbb11[_0x251d9c];return _0x42f7c7;};'use strict';var express=require(_0x1bb1('0x0'));var router=express[_0x1bb1('0x1')]();var controller=require(_0x1bb1('0x2'));router[_0x1bb1('0x3')]('/',controller[_0x1bb1('0x4')]);router[_0x1bb1('0x3')](_0x1bb1('0x5'),controller['forgot']);router[_0x1bb1('0x3')](_0x1bb1('0x6'),controller[_0x1bb1('0x7')]);module[_0x1bb1('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js
index 579983e..4ddfd49 100644
--- a/server/api/automation/automation.attributes.js
+++ b/server/api/automation/automation.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcb7f=['sequelize','exports','STRING'];(function(_0x1da7f8,_0x3f70aa){var _0x1b11e3=function(_0x1f21e9){while(--_0x1f21e9){_0x1da7f8['push'](_0x1da7f8['shift']());}};_0x1b11e3(++_0x3f70aa);}(_0xcb7f,0x7b));var _0xfcb7=function(_0x5737df,_0x49e164){_0x5737df=_0x5737df-0x0;var _0x2456c6=_0xcb7f[_0x5737df];return _0x2456c6;};'use strict';var Sequelize=require(_0xfcb7('0x0'));module[_0xfcb7('0x1')]={'name':{'type':Sequelize[_0xfcb7('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0xfcb7('0x2')]},'description':{'type':Sequelize['STRING']},'status':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'timeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa}};
\ No newline at end of file
+var _0xec91=['exports','STRING','BOOLEAN','INTEGER'];(function(_0x44380e,_0x317271){var _0x5ac419=function(_0x2005aa){while(--_0x2005aa){_0x44380e['push'](_0x44380e['shift']());}};_0x5ac419(++_0x317271);}(_0xec91,0xb0));var _0x1ec9=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0xec91[_0x18ab2a];return _0x16dcee;};'use strict';var Sequelize=require('sequelize');module[_0x1ec9('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'channel':{'type':Sequelize[_0x1ec9('0x1')]},'description':{'type':Sequelize[_0x1ec9('0x1')]},'status':{'type':Sequelize[_0x1ec9('0x2')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x1ec9('0x3')],'defaultValue':0xa}};
\ No newline at end of file
diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js
index d12e282..3c199dc 100644
--- a/server/api/automation/automation.controller.js
+++ b/server/api/automation/automation.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xba17=['count','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','index','map','Automation','fieldName','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','order','sort','where','pick','filter','merge','type','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','length','create','body','find','addConditions','ids','omit','getConditions','Condition','nolimit','addActions','getActions','findOne','Action','options','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','offset'];(function(_0xa5013c,_0x120b02){var _0x22555a=function(_0x23a518){while(--_0x23a518){_0xa5013c['push'](_0xa5013c['shift']());}};_0x22555a(++_0x120b02);}(_0xba17,0x18b));var _0x7ba1=function(_0x3737ee,_0x28571e){_0x3737ee=_0x3737ee-0x0;var _0x19edba=_0xba17[_0x3737ee];return _0x19edba;};'use strict';var emlformat=require(_0x7ba1('0x0'));var rimraf=require(_0x7ba1('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x7ba1('0x2'));var rp=require(_0x7ba1('0x3'));var moment=require(_0x7ba1('0x4'));var BPromise=require(_0x7ba1('0x5'));var Mustache=require(_0x7ba1('0x6'));var util=require(_0x7ba1('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x7ba1('0x8'));var fs=require('fs');var fs_extra=require(_0x7ba1('0x9'));var _=require('lodash');var squel=require(_0x7ba1('0xa'));var crypto=require(_0x7ba1('0xb'));var jsforce=require(_0x7ba1('0xc'));var deskjs=require(_0x7ba1('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x7ba1('0xe'));var Redis=require(_0x7ba1('0xf'));var authService=require(_0x7ba1('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x7ba1('0x11'));var hardwareService=require(_0x7ba1('0x12'));var logger=require(_0x7ba1('0x13'))('api');var utils=require(_0x7ba1('0x14'));var config=require(_0x7ba1('0x15'));var licenseUtil=require(_0x7ba1('0x16'));var db=require(_0x7ba1('0x17'))['db'];function respondWithStatusCode(_0xbca935,_0x2ce06c){_0x2ce06c=_0x2ce06c||0xcc;return function(_0x364e66){if(_0x364e66){return _0xbca935[_0x7ba1('0x18')](_0x2ce06c);}return _0xbca935[_0x7ba1('0x19')](_0x2ce06c)['end']();};}function respondWithResult(_0x315ab1,_0x5aa13e){_0x5aa13e=_0x5aa13e||0xc8;return function(_0x2dfa8b){if(_0x2dfa8b){return _0x315ab1[_0x7ba1('0x19')](_0x5aa13e)[_0x7ba1('0x1a')](_0x2dfa8b);}};}function respondWithFilteredResult(_0x2a4ac5,_0x2eafd9){return function(_0x497869){if(_0x497869){var _0x2c6bbc=typeof _0x2eafd9['offset']===_0x7ba1('0x1b')&&typeof _0x2eafd9[_0x7ba1('0x1c')]===_0x7ba1('0x1b');var _0x296b7e=_0x497869['count'];var _0x1cdf86=_0x2c6bbc?0x0:_0x2eafd9[_0x7ba1('0x1d')];var _0x4afc36=_0x2c6bbc?_0x497869[_0x7ba1('0x1e')]:_0x2eafd9['offset']+_0x2eafd9[_0x7ba1('0x1c')];var _0x3974df;if(_0x4afc36>=_0x296b7e){_0x4afc36=_0x296b7e;_0x3974df=0xc8;}else{_0x3974df=0xce;}_0x2a4ac5[_0x7ba1('0x19')](_0x3974df);return _0x2a4ac5['set'](_0x7ba1('0x1f'),_0x1cdf86+'-'+_0x4afc36+'/'+_0x296b7e)[_0x7ba1('0x1a')](_0x497869);}return null;};}function patchUpdates(_0x295d31){return function(_0x305b0b){try{jsonpatch[_0x7ba1('0x20')](_0x305b0b,_0x295d31,!![]);}catch(_0x3569b9){return BPromise[_0x7ba1('0x21')](_0x3569b9);}return _0x305b0b[_0x7ba1('0x22')]();};}function saveUpdates(_0x4918b7,_0x34d328){return function(_0x4a88f4){if(_0x4a88f4){return _0x4a88f4[_0x7ba1('0x23')](_0x4918b7)[_0x7ba1('0x24')](function(_0x29df6c){return _0x29df6c;});}return null;};}function removeEntity(_0x21b0a0,_0x4be7a3){return function(_0x44ce0c){if(_0x44ce0c){return _0x44ce0c[_0x7ba1('0x25')]()[_0x7ba1('0x24')](function(){_0x21b0a0[_0x7ba1('0x19')](0xcc)[_0x7ba1('0x26')]();});}};}function handleEntityNotFound(_0x521f2a,_0x27b26a){return function(_0x374be3){if(!_0x374be3){_0x521f2a[_0x7ba1('0x18')](0x194);}return _0x374be3;};}function handleError(_0x4485f4,_0x45d480){_0x45d480=_0x45d480||0x1f4;return function(_0x3a9ebe){logger[_0x7ba1('0x27')](_0x3a9ebe[_0x7ba1('0x28')]);if(_0x3a9ebe[_0x7ba1('0x29')]){delete _0x3a9ebe[_0x7ba1('0x29')];}_0x4485f4[_0x7ba1('0x19')](_0x45d480)['send'](_0x3a9ebe);};}exports[_0x7ba1('0x2a')]=function(_0x295aa7,_0x1ce15b){var _0x3dcae4={},_0x3045d5={},_0x217ff5={'count':0x0,'rows':[]};var _0xb8e424=_[_0x7ba1('0x2b')](db[_0x7ba1('0x2c')]['rawAttributes'],function(_0x4fdead){return{'name':_0x4fdead[_0x7ba1('0x2d')],'type':_0x4fdead['type'][_0x7ba1('0x2e')]};});_0x3045d5[_0x7ba1('0x2f')]=_[_0x7ba1('0x2b')](_0xb8e424,_0x7ba1('0x29'));_0x3045d5[_0x7ba1('0x30')]=_['keys'](_0x295aa7[_0x7ba1('0x30')]);_0x3045d5[_0x7ba1('0x31')]=_[_0x7ba1('0x32')](_0x3045d5['model'],_0x3045d5[_0x7ba1('0x30')]);_0x3dcae4['attributes']=_[_0x7ba1('0x32')](_0x3045d5['model'],qs[_0x7ba1('0x33')](_0x295aa7[_0x7ba1('0x30')]['fields']));_0x3dcae4[_0x7ba1('0x34')]=_0x3dcae4[_0x7ba1('0x34')]['length']?_0x3dcae4[_0x7ba1('0x34')]:_0x3045d5[_0x7ba1('0x2f')];if(!_0x295aa7[_0x7ba1('0x30')][_0x7ba1('0x35')]('nolimit')){_0x3dcae4['limit']=qs[_0x7ba1('0x1c')](_0x295aa7[_0x7ba1('0x30')][_0x7ba1('0x1c')]);_0x3dcae4['offset']=qs[_0x7ba1('0x1d')](_0x295aa7[_0x7ba1('0x30')][_0x7ba1('0x1d')]);}_0x3dcae4[_0x7ba1('0x36')]=qs[_0x7ba1('0x37')](_0x295aa7[_0x7ba1('0x30')][_0x7ba1('0x37')]);_0x3dcae4[_0x7ba1('0x38')]=qs['filters'](_[_0x7ba1('0x39')](_0x295aa7['query'],_0x3045d5[_0x7ba1('0x31')]),_0xb8e424);if(_0x295aa7[_0x7ba1('0x30')][_0x7ba1('0x3a')]){_0x3dcae4[_0x7ba1('0x38')]=_[_0x7ba1('0x3b')](_0x3dcae4[_0x7ba1('0x38')],{'$or':_[_0x7ba1('0x2b')](_0xb8e424,function(_0x55e3a1){if(_0x55e3a1[_0x7ba1('0x3c')]!=='VIRTUAL'){var _0x276c08={};_0x276c08[_0x55e3a1['name']]={'$like':'%'+_0x295aa7['query'][_0x7ba1('0x3a')]+'%'};return _0x276c08;}})});}_0x3dcae4=_['merge']({},_0x3dcae4,_0x295aa7['options']);var _0x267b52={'where':_0x3dcae4[_0x7ba1('0x38')]};return db[_0x7ba1('0x2c')][_0x7ba1('0x1e')](_0x267b52)[_0x7ba1('0x24')](function(_0x195a31){_0x217ff5[_0x7ba1('0x1e')]=_0x195a31;if(_0x295aa7[_0x7ba1('0x30')][_0x7ba1('0x3d')]){_0x3dcae4[_0x7ba1('0x3e')]=[{'all':!![]}];}return db[_0x7ba1('0x2c')][_0x7ba1('0x3f')](_0x3dcae4);})[_0x7ba1('0x24')](function(_0xd701b7){_0x217ff5[_0x7ba1('0x40')]=_0xd701b7;return _0x217ff5;})[_0x7ba1('0x24')](respondWithFilteredResult(_0x1ce15b,_0x3dcae4))[_0x7ba1('0x41')](handleError(_0x1ce15b,null));};exports[_0x7ba1('0x42')]=function(_0x1abfce,_0x5c352c){var _0x29f16b={'raw':![],'where':{'id':_0x1abfce[_0x7ba1('0x43')]['id']}},_0x52e4be={};_0x52e4be[_0x7ba1('0x2f')]=_[_0x7ba1('0x44')](db[_0x7ba1('0x2c')][_0x7ba1('0x45')]);_0x52e4be[_0x7ba1('0x30')]=_[_0x7ba1('0x44')](_0x1abfce[_0x7ba1('0x30')]);_0x52e4be[_0x7ba1('0x31')]=_[_0x7ba1('0x32')](_0x52e4be['model'],_0x52e4be[_0x7ba1('0x30')]);_0x29f16b[_0x7ba1('0x34')]=_[_0x7ba1('0x32')](_0x52e4be[_0x7ba1('0x2f')],qs[_0x7ba1('0x33')](_0x1abfce[_0x7ba1('0x30')][_0x7ba1('0x33')]));_0x29f16b[_0x7ba1('0x34')]=_0x29f16b[_0x7ba1('0x34')][_0x7ba1('0x46')]?_0x29f16b['attributes']:_0x52e4be[_0x7ba1('0x2f')];if(_0x1abfce[_0x7ba1('0x30')]['includeAll']){_0x29f16b[_0x7ba1('0x3e')]=[{'all':!![]}];}_0x29f16b=_[_0x7ba1('0x3b')]({},_0x29f16b,_0x1abfce['options']);return db['Automation']['find'](_0x29f16b)['then'](handleEntityNotFound(_0x5c352c,null))[_0x7ba1('0x24')](respondWithResult(_0x5c352c,null))[_0x7ba1('0x41')](handleError(_0x5c352c,null));};exports['create']=function(_0x3851eb,_0x5143bb){return db['Automation'][_0x7ba1('0x47')](_0x3851eb[_0x7ba1('0x48')],{})[_0x7ba1('0x24')](respondWithResult(_0x5143bb,0xc9))[_0x7ba1('0x41')](handleError(_0x5143bb,null));};exports['update']=function(_0x415ed6,_0x3c80c5){if(_0x415ed6[_0x7ba1('0x48')]['id']){delete _0x415ed6[_0x7ba1('0x48')]['id'];}return db['Automation'][_0x7ba1('0x49')]({'where':{'id':_0x415ed6[_0x7ba1('0x43')]['id']}})['then'](handleEntityNotFound(_0x3c80c5,null))[_0x7ba1('0x24')](saveUpdates(_0x415ed6['body'],null))[_0x7ba1('0x24')](respondWithResult(_0x3c80c5,null))['catch'](handleError(_0x3c80c5,null));};exports[_0x7ba1('0x25')]=function(_0x286db4,_0x1f426a){return db[_0x7ba1('0x2c')][_0x7ba1('0x49')]({'where':{'id':_0x286db4[_0x7ba1('0x43')]['id']}})[_0x7ba1('0x24')](handleEntityNotFound(_0x1f426a,null))['then'](removeEntity(_0x1f426a,null))['catch'](handleError(_0x1f426a,null));};exports[_0x7ba1('0x4a')]=function(_0x2d2a87,_0x1d44aa,_0x48c6c4){return db['Condition'][_0x7ba1('0x49')]({'where':{'id':_0x2d2a87[_0x7ba1('0x43')]['id']}})[_0x7ba1('0x24')](handleEntityNotFound(_0x1d44aa,null))[_0x7ba1('0x24')](function(_0xdd7a91){if(_0xdd7a91){return _0xdd7a91[_0x7ba1('0x4a')](_0x2d2a87[_0x7ba1('0x48')][_0x7ba1('0x4b')],_[_0x7ba1('0x4c')](_0x2d2a87['body'],[_0x7ba1('0x4b'),'id'])||{});}})[_0x7ba1('0x24')](respondWithResult(_0x1d44aa,null))[_0x7ba1('0x41')](handleError(_0x1d44aa,null));};exports[_0x7ba1('0x4d')]=function(_0x12c961,_0x3ef5d8,_0x59f585){var _0x384e89={};var _0x178ebc={};var _0x1dda8c;var _0xf1585f;return db['Automation']['findOne']({'where':{'id':_0x12c961[_0x7ba1('0x43')]['id']}})[_0x7ba1('0x24')](handleEntityNotFound(_0x3ef5d8,null))[_0x7ba1('0x24')](function(_0x59ca97){if(_0x59ca97){_0x1dda8c=_0x59ca97;_0x178ebc[_0x7ba1('0x2f')]=_[_0x7ba1('0x44')](db[_0x7ba1('0x4e')][_0x7ba1('0x45')]);_0x178ebc[_0x7ba1('0x30')]=_['keys'](_0x12c961['query']);_0x178ebc['filters']=_[_0x7ba1('0x32')](_0x178ebc[_0x7ba1('0x2f')],_0x178ebc['query']);_0x384e89[_0x7ba1('0x34')]=_[_0x7ba1('0x32')](_0x178ebc[_0x7ba1('0x2f')],qs[_0x7ba1('0x33')](_0x12c961[_0x7ba1('0x30')][_0x7ba1('0x33')]));_0x384e89[_0x7ba1('0x34')]=_0x384e89[_0x7ba1('0x34')][_0x7ba1('0x46')]?_0x384e89[_0x7ba1('0x34')]:_0x178ebc[_0x7ba1('0x2f')];_0x384e89[_0x7ba1('0x36')]=qs[_0x7ba1('0x37')](_0x12c961['query'][_0x7ba1('0x37')]);_0x384e89['where']=qs[_0x7ba1('0x31')](_[_0x7ba1('0x39')](_0x12c961[_0x7ba1('0x30')],_0x178ebc['filters']));if(_0x12c961[_0x7ba1('0x30')][_0x7ba1('0x3a')]){_0x384e89[_0x7ba1('0x38')]=_[_0x7ba1('0x3b')](_0x384e89[_0x7ba1('0x38')],{'$or':_['map'](_0x384e89[_0x7ba1('0x34')],function(_0x834f7a){var _0x40e0cf={};_0x40e0cf[_0x834f7a]={'$like':'%'+_0x12c961[_0x7ba1('0x30')][_0x7ba1('0x3a')]+'%'};return _0x40e0cf;})});}_0x384e89=_[_0x7ba1('0x3b')]({},_0x384e89,_0x12c961['options']);return _0x1dda8c['getConditions'](_0x384e89);}})['then'](function(_0x1a3a12){if(_0x1a3a12){_0xf1585f=_0x1a3a12[_0x7ba1('0x46')];if(!_0x12c961[_0x7ba1('0x30')]['hasOwnProperty'](_0x7ba1('0x4f'))){_0x384e89[_0x7ba1('0x1c')]=qs[_0x7ba1('0x1c')](_0x12c961[_0x7ba1('0x30')]['limit']);_0x384e89[_0x7ba1('0x1d')]=qs['offset'](_0x12c961[_0x7ba1('0x30')][_0x7ba1('0x1d')]);}return _0x1dda8c[_0x7ba1('0x4d')](_0x384e89);}})['then'](function(_0x41df6d){if(_0x41df6d){return _0x41df6d?{'count':_0xf1585f,'rows':_0x41df6d}:null;}})[_0x7ba1('0x24')](respondWithResult(_0x3ef5d8,null))['catch'](handleError(_0x3ef5d8,null));};exports[_0x7ba1('0x50')]=function(_0x2e9c07,_0x1f218b,_0x3dc6f8){return db['Action']['find']({'where':{'id':_0x2e9c07['params']['id']}})['then'](handleEntityNotFound(_0x1f218b,null))[_0x7ba1('0x24')](function(_0x21b049){if(_0x21b049){return _0x21b049[_0x7ba1('0x50')](_0x2e9c07['body'][_0x7ba1('0x4b')],_[_0x7ba1('0x4c')](_0x2e9c07[_0x7ba1('0x48')],['ids','id'])||{});}})[_0x7ba1('0x24')](respondWithResult(_0x1f218b,null))[_0x7ba1('0x41')](handleError(_0x1f218b,null));};exports[_0x7ba1('0x51')]=function(_0x545e32,_0x9fab0b,_0x387daa){var _0x25e9ff={};var _0x42e2f6={};var _0x112215;var _0x202d3b;return db['Automation'][_0x7ba1('0x52')]({'where':{'id':_0x545e32['params']['id']}})[_0x7ba1('0x24')](handleEntityNotFound(_0x9fab0b,null))[_0x7ba1('0x24')](function(_0x4083c1){if(_0x4083c1){_0x112215=_0x4083c1;_0x42e2f6[_0x7ba1('0x2f')]=_['keys'](db[_0x7ba1('0x53')][_0x7ba1('0x45')]);_0x42e2f6[_0x7ba1('0x30')]=_['keys'](_0x545e32[_0x7ba1('0x30')]);_0x42e2f6[_0x7ba1('0x31')]=_[_0x7ba1('0x32')](_0x42e2f6['model'],_0x42e2f6['query']);_0x25e9ff['attributes']=_[_0x7ba1('0x32')](_0x42e2f6[_0x7ba1('0x2f')],qs[_0x7ba1('0x33')](_0x545e32[_0x7ba1('0x30')][_0x7ba1('0x33')]));_0x25e9ff[_0x7ba1('0x34')]=_0x25e9ff[_0x7ba1('0x34')][_0x7ba1('0x46')]?_0x25e9ff[_0x7ba1('0x34')]:_0x42e2f6[_0x7ba1('0x2f')];_0x25e9ff['order']=qs[_0x7ba1('0x37')](_0x545e32[_0x7ba1('0x30')][_0x7ba1('0x37')]);_0x25e9ff[_0x7ba1('0x38')]=qs[_0x7ba1('0x31')](_[_0x7ba1('0x39')](_0x545e32[_0x7ba1('0x30')],_0x42e2f6['filters']));if(_0x545e32[_0x7ba1('0x30')][_0x7ba1('0x3a')]){_0x25e9ff['where']=_[_0x7ba1('0x3b')](_0x25e9ff[_0x7ba1('0x38')],{'$or':_['map'](_0x25e9ff[_0x7ba1('0x34')],function(_0x9700b2){var _0xc67df9={};_0xc67df9[_0x9700b2]={'$like':'%'+_0x545e32[_0x7ba1('0x30')]['filter']+'%'};return _0xc67df9;})});}_0x25e9ff=_['merge']({},_0x25e9ff,_0x545e32[_0x7ba1('0x54')]);return _0x112215[_0x7ba1('0x51')](_0x25e9ff);}})[_0x7ba1('0x24')](function(_0x293bf1){if(_0x293bf1){_0x202d3b=_0x293bf1[_0x7ba1('0x46')];if(!_0x545e32['query'][_0x7ba1('0x35')](_0x7ba1('0x4f'))){_0x25e9ff[_0x7ba1('0x1c')]=qs[_0x7ba1('0x1c')](_0x545e32['query'][_0x7ba1('0x1c')]);_0x25e9ff[_0x7ba1('0x1d')]=qs['offset'](_0x545e32[_0x7ba1('0x30')][_0x7ba1('0x1d')]);}return _0x112215[_0x7ba1('0x51')](_0x25e9ff);}})[_0x7ba1('0x24')](function(_0x42d74d){if(_0x42d74d){return _0x42d74d?{'count':_0x202d3b,'rows':_0x42d74d}:null;}})[_0x7ba1('0x24')](respondWithResult(_0x9fab0b,null))[_0x7ba1('0x41')](handleError(_0x9fab0b,null));};
\ No newline at end of file
+var _0x3ac5=['fs-extra','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','then','destroy','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','nolimit','order','sort','where','pick','VIRTUAL','merge','include','findAll','rows','catch','show','params','keys','Automation','includeAll','options','create','body','update','find','Condition','addConditions','ids','omit','getConditions','findOne','filter','Action','getActions','rimraf','request-promise','moment','util','path','sox','ejs'];(function(_0x2c751b,_0xc274fc){var _0xfe04b8=function(_0x15c001){while(--_0x15c001){_0x2c751b['push'](_0x2c751b['shift']());}};_0xfe04b8(++_0xc274fc);}(_0x3ac5,0xf2));var _0x53ac=function(_0x53a2e9,_0x360496){_0x53a2e9=_0x53a2e9-0x0;var _0x42f6b2=_0x3ac5[_0x53a2e9];return _0x42f6b2;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x53ac('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x53ac('0x1'));var moment=require(_0x53ac('0x2'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x53ac('0x3'));var path=require(_0x53ac('0x4'));var sox=require(_0x53ac('0x5'));var csv=require('to-csv');var ejs=require(_0x53ac('0x6'));var fs=require('fs');var fs_extra=require(_0x53ac('0x7'));var _=require('lodash');var squel=require(_0x53ac('0x8'));var crypto=require(_0x53ac('0x9'));var jsforce=require(_0x53ac('0xa'));var deskjs=require(_0x53ac('0xb'));var toCsv=require(_0x53ac('0xc'));var querystring=require(_0x53ac('0xd'));var Papa=require(_0x53ac('0xe'));var Redis=require('ioredis');var authService=require(_0x53ac('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x53ac('0x10'));var hardwareService=require(_0x53ac('0x11'));var logger=require(_0x53ac('0x12'))(_0x53ac('0x13'));var utils=require(_0x53ac('0x14'));var config=require(_0x53ac('0x15'));var licenseUtil=require(_0x53ac('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x32a714,_0x1ed0c3){_0x1ed0c3=_0x1ed0c3||0xcc;return function(_0x1b81b3){if(_0x1b81b3){return _0x32a714['sendStatus'](_0x1ed0c3);}return _0x32a714[_0x53ac('0x17')](_0x1ed0c3)[_0x53ac('0x18')]();};}function respondWithResult(_0x1ff8f3,_0x5a5c54){_0x5a5c54=_0x5a5c54||0xc8;return function(_0x579216){if(_0x579216){return _0x1ff8f3[_0x53ac('0x17')](_0x5a5c54)[_0x53ac('0x19')](_0x579216);}};}function respondWithFilteredResult(_0x5021ea,_0x3ae7be){return function(_0x92c422){if(_0x92c422){var _0x1b8bf4=typeof _0x3ae7be[_0x53ac('0x1a')]===_0x53ac('0x1b')&&typeof _0x3ae7be[_0x53ac('0x1c')]==='undefined';var _0x28303b=_0x92c422['count'];var _0x303c36=_0x1b8bf4?0x0:_0x3ae7be['offset'];var _0x1af8b8=_0x1b8bf4?_0x92c422[_0x53ac('0x1d')]:_0x3ae7be[_0x53ac('0x1a')]+_0x3ae7be[_0x53ac('0x1c')];var _0x42bc52;if(_0x1af8b8>=_0x28303b){_0x1af8b8=_0x28303b;_0x42bc52=0xc8;}else{_0x42bc52=0xce;}_0x5021ea[_0x53ac('0x17')](_0x42bc52);return _0x5021ea[_0x53ac('0x1e')](_0x53ac('0x1f'),_0x303c36+'-'+_0x1af8b8+'/'+_0x28303b)[_0x53ac('0x19')](_0x92c422);}return null;};}function patchUpdates(_0x345d06){return function(_0x516ca7){try{jsonpatch['apply'](_0x516ca7,_0x345d06,!![]);}catch(_0x8e1a5c){return BPromise[_0x53ac('0x20')](_0x8e1a5c);}return _0x516ca7['save']();};}function saveUpdates(_0x3cb12a,_0x118c26){return function(_0x577284){if(_0x577284){return _0x577284['update'](_0x3cb12a)[_0x53ac('0x21')](function(_0x218b81){return _0x218b81;});}return null;};}function removeEntity(_0x36f133,_0x5e026b){return function(_0x5be0b3){if(_0x5be0b3){return _0x5be0b3[_0x53ac('0x22')]()['then'](function(){_0x36f133[_0x53ac('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x429e56,_0x129edf){return function(_0x5e187d){if(!_0x5e187d){_0x429e56[_0x53ac('0x23')](0x194);}return _0x5e187d;};}function handleError(_0x21e03f,_0x28a839){_0x28a839=_0x28a839||0x1f4;return function(_0xf21c43){logger[_0x53ac('0x24')](_0xf21c43[_0x53ac('0x25')]);if(_0xf21c43['name']){delete _0xf21c43[_0x53ac('0x26')];}_0x21e03f[_0x53ac('0x17')](_0x28a839)[_0x53ac('0x27')](_0xf21c43);};}exports[_0x53ac('0x28')]=function(_0x4afc84,_0x58e3cb){var _0x4a7042={},_0x2b9338={},_0x1e96a5={'count':0x0,'rows':[]};var _0x573490=_[_0x53ac('0x29')](db['Automation'][_0x53ac('0x2a')],function(_0x3341a9){return{'name':_0x3341a9[_0x53ac('0x2b')],'type':_0x3341a9[_0x53ac('0x2c')][_0x53ac('0x2d')]};});_0x2b9338[_0x53ac('0x2e')]=_[_0x53ac('0x29')](_0x573490,_0x53ac('0x26'));_0x2b9338['query']=_['keys'](_0x4afc84[_0x53ac('0x2f')]);_0x2b9338[_0x53ac('0x30')]=_[_0x53ac('0x31')](_0x2b9338['model'],_0x2b9338[_0x53ac('0x2f')]);_0x4a7042['attributes']=_['intersection'](_0x2b9338[_0x53ac('0x2e')],qs[_0x53ac('0x32')](_0x4afc84[_0x53ac('0x2f')][_0x53ac('0x32')]));_0x4a7042[_0x53ac('0x33')]=_0x4a7042[_0x53ac('0x33')][_0x53ac('0x34')]?_0x4a7042[_0x53ac('0x33')]:_0x2b9338[_0x53ac('0x2e')];if(!_0x4afc84[_0x53ac('0x2f')]['hasOwnProperty'](_0x53ac('0x35'))){_0x4a7042[_0x53ac('0x1c')]=qs[_0x53ac('0x1c')](_0x4afc84[_0x53ac('0x2f')][_0x53ac('0x1c')]);_0x4a7042[_0x53ac('0x1a')]=qs['offset'](_0x4afc84[_0x53ac('0x2f')]['offset']);}_0x4a7042[_0x53ac('0x36')]=qs[_0x53ac('0x37')](_0x4afc84['query'][_0x53ac('0x37')]);_0x4a7042[_0x53ac('0x38')]=qs[_0x53ac('0x30')](_[_0x53ac('0x39')](_0x4afc84['query'],_0x2b9338[_0x53ac('0x30')]),_0x573490);if(_0x4afc84['query']['filter']){_0x4a7042[_0x53ac('0x38')]=_['merge'](_0x4a7042['where'],{'$or':_[_0x53ac('0x29')](_0x573490,function(_0x15d890){if(_0x15d890['type']!==_0x53ac('0x3a')){var _0x150886={};_0x150886[_0x15d890[_0x53ac('0x26')]]={'$like':'%'+_0x4afc84[_0x53ac('0x2f')]['filter']+'%'};return _0x150886;}})});}_0x4a7042=_[_0x53ac('0x3b')]({},_0x4a7042,_0x4afc84['options']);var _0x49cac9={'where':_0x4a7042['where']};return db['Automation'][_0x53ac('0x1d')](_0x49cac9)['then'](function(_0x16d3a0){_0x1e96a5[_0x53ac('0x1d')]=_0x16d3a0;if(_0x4afc84[_0x53ac('0x2f')]['includeAll']){_0x4a7042[_0x53ac('0x3c')]=[{'all':!![]}];}return db['Automation'][_0x53ac('0x3d')](_0x4a7042);})['then'](function(_0x4a7502){_0x1e96a5[_0x53ac('0x3e')]=_0x4a7502;return _0x1e96a5;})[_0x53ac('0x21')](respondWithFilteredResult(_0x58e3cb,_0x4a7042))[_0x53ac('0x3f')](handleError(_0x58e3cb,null));};exports[_0x53ac('0x40')]=function(_0x39f8dd,_0x2cc091){var _0xc69c24={'raw':![],'where':{'id':_0x39f8dd[_0x53ac('0x41')]['id']}},_0x31612c={};_0x31612c[_0x53ac('0x2e')]=_[_0x53ac('0x42')](db[_0x53ac('0x43')][_0x53ac('0x2a')]);_0x31612c[_0x53ac('0x2f')]=_[_0x53ac('0x42')](_0x39f8dd[_0x53ac('0x2f')]);_0x31612c[_0x53ac('0x30')]=_[_0x53ac('0x31')](_0x31612c[_0x53ac('0x2e')],_0x31612c[_0x53ac('0x2f')]);_0xc69c24[_0x53ac('0x33')]=_[_0x53ac('0x31')](_0x31612c['model'],qs[_0x53ac('0x32')](_0x39f8dd[_0x53ac('0x2f')][_0x53ac('0x32')]));_0xc69c24[_0x53ac('0x33')]=_0xc69c24[_0x53ac('0x33')][_0x53ac('0x34')]?_0xc69c24[_0x53ac('0x33')]:_0x31612c[_0x53ac('0x2e')];if(_0x39f8dd[_0x53ac('0x2f')][_0x53ac('0x44')]){_0xc69c24[_0x53ac('0x3c')]=[{'all':!![]}];}_0xc69c24=_[_0x53ac('0x3b')]({},_0xc69c24,_0x39f8dd[_0x53ac('0x45')]);return db[_0x53ac('0x43')]['find'](_0xc69c24)[_0x53ac('0x21')](handleEntityNotFound(_0x2cc091,null))[_0x53ac('0x21')](respondWithResult(_0x2cc091,null))[_0x53ac('0x3f')](handleError(_0x2cc091,null));};exports['create']=function(_0x4ae90d,_0x5c4c23){return db[_0x53ac('0x43')][_0x53ac('0x46')](_0x4ae90d[_0x53ac('0x47')],{})[_0x53ac('0x21')](respondWithResult(_0x5c4c23,0xc9))[_0x53ac('0x3f')](handleError(_0x5c4c23,null));};exports[_0x53ac('0x48')]=function(_0x483e36,_0xe1a2d){if(_0x483e36[_0x53ac('0x47')]['id']){delete _0x483e36[_0x53ac('0x47')]['id'];}return db[_0x53ac('0x43')][_0x53ac('0x49')]({'where':{'id':_0x483e36[_0x53ac('0x41')]['id']}})[_0x53ac('0x21')](handleEntityNotFound(_0xe1a2d,null))[_0x53ac('0x21')](saveUpdates(_0x483e36['body'],null))['then'](respondWithResult(_0xe1a2d,null))[_0x53ac('0x3f')](handleError(_0xe1a2d,null));};exports[_0x53ac('0x22')]=function(_0x5db0a0,_0x34b114){return db[_0x53ac('0x43')][_0x53ac('0x49')]({'where':{'id':_0x5db0a0['params']['id']}})[_0x53ac('0x21')](handleEntityNotFound(_0x34b114,null))[_0x53ac('0x21')](removeEntity(_0x34b114,null))['catch'](handleError(_0x34b114,null));};exports['addConditions']=function(_0x201fc4,_0x5349f6,_0x172249){return db[_0x53ac('0x4a')][_0x53ac('0x49')]({'where':{'id':_0x201fc4[_0x53ac('0x41')]['id']}})['then'](handleEntityNotFound(_0x5349f6,null))['then'](function(_0x2e8c32){if(_0x2e8c32){return _0x2e8c32[_0x53ac('0x4b')](_0x201fc4[_0x53ac('0x47')][_0x53ac('0x4c')],_[_0x53ac('0x4d')](_0x201fc4[_0x53ac('0x47')],[_0x53ac('0x4c'),'id'])||{});}})[_0x53ac('0x21')](respondWithResult(_0x5349f6,null))[_0x53ac('0x3f')](handleError(_0x5349f6,null));};exports[_0x53ac('0x4e')]=function(_0x3b9035,_0x27b2a6,_0x379ed1){var _0x3eee76={};var _0x191fa3={};var _0x230882;var _0x2faf97;return db[_0x53ac('0x43')][_0x53ac('0x4f')]({'where':{'id':_0x3b9035[_0x53ac('0x41')]['id']}})[_0x53ac('0x21')](handleEntityNotFound(_0x27b2a6,null))[_0x53ac('0x21')](function(_0x540369){if(_0x540369){_0x230882=_0x540369;_0x191fa3[_0x53ac('0x2e')]=_['keys'](db[_0x53ac('0x4a')]['rawAttributes']);_0x191fa3[_0x53ac('0x2f')]=_['keys'](_0x3b9035[_0x53ac('0x2f')]);_0x191fa3[_0x53ac('0x30')]=_[_0x53ac('0x31')](_0x191fa3[_0x53ac('0x2e')],_0x191fa3[_0x53ac('0x2f')]);_0x3eee76[_0x53ac('0x33')]=_[_0x53ac('0x31')](_0x191fa3['model'],qs[_0x53ac('0x32')](_0x3b9035[_0x53ac('0x2f')][_0x53ac('0x32')]));_0x3eee76[_0x53ac('0x33')]=_0x3eee76[_0x53ac('0x33')][_0x53ac('0x34')]?_0x3eee76[_0x53ac('0x33')]:_0x191fa3[_0x53ac('0x2e')];_0x3eee76['order']=qs['sort'](_0x3b9035['query'][_0x53ac('0x37')]);_0x3eee76['where']=qs['filters'](_[_0x53ac('0x39')](_0x3b9035[_0x53ac('0x2f')],_0x191fa3[_0x53ac('0x30')]));if(_0x3b9035['query'][_0x53ac('0x50')]){_0x3eee76[_0x53ac('0x38')]=_[_0x53ac('0x3b')](_0x3eee76[_0x53ac('0x38')],{'$or':_[_0x53ac('0x29')](_0x3eee76[_0x53ac('0x33')],function(_0x1cec80){var _0x22442f={};_0x22442f[_0x1cec80]={'$like':'%'+_0x3b9035[_0x53ac('0x2f')][_0x53ac('0x50')]+'%'};return _0x22442f;})});}_0x3eee76=_[_0x53ac('0x3b')]({},_0x3eee76,_0x3b9035[_0x53ac('0x45')]);return _0x230882[_0x53ac('0x4e')](_0x3eee76);}})['then'](function(_0xeac279){if(_0xeac279){_0x2faf97=_0xeac279[_0x53ac('0x34')];if(!_0x3b9035[_0x53ac('0x2f')]['hasOwnProperty'](_0x53ac('0x35'))){_0x3eee76['limit']=qs[_0x53ac('0x1c')](_0x3b9035[_0x53ac('0x2f')]['limit']);_0x3eee76[_0x53ac('0x1a')]=qs[_0x53ac('0x1a')](_0x3b9035[_0x53ac('0x2f')][_0x53ac('0x1a')]);}return _0x230882[_0x53ac('0x4e')](_0x3eee76);}})['then'](function(_0x780ff5){if(_0x780ff5){return _0x780ff5?{'count':_0x2faf97,'rows':_0x780ff5}:null;}})[_0x53ac('0x21')](respondWithResult(_0x27b2a6,null))[_0x53ac('0x3f')](handleError(_0x27b2a6,null));};exports['addActions']=function(_0x4d69c8,_0x2d44da,_0x5d3373){return db[_0x53ac('0x51')][_0x53ac('0x49')]({'where':{'id':_0x4d69c8[_0x53ac('0x41')]['id']}})[_0x53ac('0x21')](handleEntityNotFound(_0x2d44da,null))['then'](function(_0x15b6c0){if(_0x15b6c0){return _0x15b6c0['addActions'](_0x4d69c8['body']['ids'],_['omit'](_0x4d69c8[_0x53ac('0x47')],[_0x53ac('0x4c'),'id'])||{});}})[_0x53ac('0x21')](respondWithResult(_0x2d44da,null))['catch'](handleError(_0x2d44da,null));};exports['getActions']=function(_0x1c4325,_0x102b06,_0x3d0c71){var _0x382e51={};var _0x50dc41={};var _0x45ce8d;var _0x1dc1dd;return db[_0x53ac('0x43')][_0x53ac('0x4f')]({'where':{'id':_0x1c4325[_0x53ac('0x41')]['id']}})[_0x53ac('0x21')](handleEntityNotFound(_0x102b06,null))[_0x53ac('0x21')](function(_0xa34d4f){if(_0xa34d4f){_0x45ce8d=_0xa34d4f;_0x50dc41[_0x53ac('0x2e')]=_[_0x53ac('0x42')](db[_0x53ac('0x51')][_0x53ac('0x2a')]);_0x50dc41[_0x53ac('0x2f')]=_['keys'](_0x1c4325[_0x53ac('0x2f')]);_0x50dc41[_0x53ac('0x30')]=_[_0x53ac('0x31')](_0x50dc41[_0x53ac('0x2e')],_0x50dc41['query']);_0x382e51[_0x53ac('0x33')]=_['intersection'](_0x50dc41[_0x53ac('0x2e')],qs[_0x53ac('0x32')](_0x1c4325[_0x53ac('0x2f')][_0x53ac('0x32')]));_0x382e51['attributes']=_0x382e51[_0x53ac('0x33')]['length']?_0x382e51[_0x53ac('0x33')]:_0x50dc41[_0x53ac('0x2e')];_0x382e51[_0x53ac('0x36')]=qs['sort'](_0x1c4325[_0x53ac('0x2f')][_0x53ac('0x37')]);_0x382e51[_0x53ac('0x38')]=qs[_0x53ac('0x30')](_['pick'](_0x1c4325[_0x53ac('0x2f')],_0x50dc41[_0x53ac('0x30')]));if(_0x1c4325['query'][_0x53ac('0x50')]){_0x382e51['where']=_[_0x53ac('0x3b')](_0x382e51['where'],{'$or':_['map'](_0x382e51[_0x53ac('0x33')],function(_0x47d6fb){var _0x8d2f7b={};_0x8d2f7b[_0x47d6fb]={'$like':'%'+_0x1c4325[_0x53ac('0x2f')][_0x53ac('0x50')]+'%'};return _0x8d2f7b;})});}_0x382e51=_[_0x53ac('0x3b')]({},_0x382e51,_0x1c4325[_0x53ac('0x45')]);return _0x45ce8d['getActions'](_0x382e51);}})[_0x53ac('0x21')](function(_0x9ad9ec){if(_0x9ad9ec){_0x1dc1dd=_0x9ad9ec[_0x53ac('0x34')];if(!_0x1c4325[_0x53ac('0x2f')]['hasOwnProperty'](_0x53ac('0x35'))){_0x382e51[_0x53ac('0x1c')]=qs['limit'](_0x1c4325[_0x53ac('0x2f')]['limit']);_0x382e51[_0x53ac('0x1a')]=qs['offset'](_0x1c4325[_0x53ac('0x2f')][_0x53ac('0x1a')]);}return _0x45ce8d[_0x53ac('0x52')](_0x382e51);}})[_0x53ac('0x21')](function(_0xc42434){if(_0xc42434){return _0xc42434?{'count':_0x1dc1dd,'rows':_0xc42434}:null;}})[_0x53ac('0x21')](respondWithResult(_0x102b06,null))['catch'](handleError(_0x102b06,null));};
\ No newline at end of file
diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js
index c4a7c6e..c08e188 100644
--- a/server/api/automation/automation.model.js
+++ b/server/api/automation/automation.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x76da=['request-promise','path','rimraf','define','Automation','tools_automations','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x1b39bb,_0xc99414){var _0x1bf082=function(_0x9db8b3){while(--_0x9db8b3){_0x1b39bb['push'](_0x1b39bb['shift']());}};_0x1bf082(++_0xc99414);}(_0x76da,0x1b6));var _0xa76d=function(_0x38221a,_0x565fce){_0x38221a=_0x38221a-0x0;var _0x2a8a7a=_0x76da[_0x38221a];return _0x2a8a7a;};'use strict';var _=require(_0xa76d('0x0'));var util=require(_0xa76d('0x1'));var logger=require(_0xa76d('0x2'))(_0xa76d('0x3'));var moment=require(_0xa76d('0x4'));var BPromise=require(_0xa76d('0x5'));var rp=require(_0xa76d('0x6'));var fs=require('fs');var path=require(_0xa76d('0x7'));var rimraf=require(_0xa76d('0x8'));var config=require('../../config/environment');var attributes=require('./automation.attributes');module['exports']=function(_0x2bf840,_0xbb83c1){return _0x2bf840[_0xa76d('0x9')](_0xa76d('0xa'),attributes,{'tableName':_0xa76d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xce7e=['Automation','tools_automations','util','api','moment','bluebird','request-promise','path','rimraf','exports','define'];(function(_0x52a01f,_0x476c6a){var _0x37748f=function(_0x51ab39){while(--_0x51ab39){_0x52a01f['push'](_0x52a01f['shift']());}};_0x37748f(++_0x476c6a);}(_0xce7e,0x10a));var _0xece7=function(_0x494b57,_0x34c8e8){_0x494b57=_0x494b57-0x0;var _0x267d16=_0xce7e[_0x494b57];return _0x267d16;};'use strict';var _=require('lodash');var util=require(_0xece7('0x0'));var logger=require('../../config/logger')(_0xece7('0x1'));var moment=require(_0xece7('0x2'));var BPromise=require(_0xece7('0x3'));var rp=require(_0xece7('0x4'));var fs=require('fs');var path=require(_0xece7('0x5'));var rimraf=require(_0xece7('0x6'));var config=require('../../config/environment');var attributes=require('./automation.attributes');module[_0xece7('0x7')]=function(_0x102118,_0x84ca6f){return _0x102118[_0xece7('0x8')](_0xece7('0x9'),attributes,{'tableName':_0xece7('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/automation/automation.rpc.js b/server/api/automation/automation.rpc.js
index 6cdc69d..1b6dcc6 100644
--- a/server/api/automation/automation.rpc.js
+++ b/server/api/automation/automation.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaa5e=['stringify','error','code','message','info','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','Automation,\x20%s,\x20%s','request\x20sent','Automation,\x20%s,\x20%s,\x20%s'];(function(_0x351082,_0x5a4f8f){var _0x2b83bf=function(_0x3ffcf3){while(--_0x3ffcf3){_0x351082['push'](_0x351082['shift']());}};_0x2b83bf(++_0x5a4f8f);}(_0xaa5e,0xa5));var _0xeaa5=function(_0xa8131,_0x713286){_0xa8131=_0xa8131-0x0;var _0x566f86=_0xaa5e[_0xa8131];return _0x566f86;};'use strict';var _=require(_0xeaa5('0x0'));var util=require(_0xeaa5('0x1'));var moment=require('moment');var BPromise=require(_0xeaa5('0x2'));var rs=require(_0xeaa5('0x3'));var fs=require('fs');var Redis=require(_0xeaa5('0x4'));var db=require(_0xeaa5('0x5'))['db'];var utils=require(_0xeaa5('0x6'));var logger=require('../../config/logger')(_0xeaa5('0x7'));var config=require(_0xeaa5('0x8'));var jayson=require(_0xeaa5('0x9'));var client=jayson[_0xeaa5('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4d405e,_0x2f9041,_0x2c9696){return new BPromise(function(_0x50cb62,_0x2e35c3){return client[_0xeaa5('0xb')](_0x4d405e,_0x2c9696)['then'](function(_0x2e9ca6){logger['info'](_0xeaa5('0xc'),_0x2f9041,_0xeaa5('0xd'));logger['debug'](_0xeaa5('0xe'),_0x2f9041,_0xeaa5('0xd'),JSON[_0xeaa5('0xf')](_0x2e9ca6));if(_0x2e9ca6[_0xeaa5('0x10')]){if(_0x2e9ca6[_0xeaa5('0x10')][_0xeaa5('0x11')]===0x1f4){logger[_0xeaa5('0x10')](_0xeaa5('0xc'),_0x2f9041,_0x2e9ca6[_0xeaa5('0x10')]['message']);return _0x2e35c3(_0x2e9ca6[_0xeaa5('0x10')][_0xeaa5('0x12')]);}logger[_0xeaa5('0x10')](_0xeaa5('0xc'),_0x2f9041,_0x2e9ca6[_0xeaa5('0x10')]['message']);return _0x50cb62(_0x2e9ca6[_0xeaa5('0x10')]['message']);}else{logger[_0xeaa5('0x13')](_0xeaa5('0xc'),_0x2f9041,_0xeaa5('0xd'));_0x50cb62(_0x2e9ca6['result'][_0xeaa5('0x12')]);}})['catch'](function(_0x44e4b4){logger[_0xeaa5('0x10')](_0xeaa5('0xc'),_0x2f9041,_0x44e4b4);_0x2e35c3(_0x44e4b4);});});}
\ No newline at end of file
+var _0x689b=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','request\x20sent','Automation,\x20%s,\x20%s,\x20%s','stringify','error','code','Automation,\x20%s,\x20%s','message','lodash','moment'];(function(_0x580576,_0x2f107d){var _0x3f55a0=function(_0x2e180b){while(--_0x2e180b){_0x580576['push'](_0x580576['shift']());}};_0x3f55a0(++_0x2f107d);}(_0x689b,0x142));var _0xb689=function(_0x2e73ab,_0x4fbbdc){_0x2e73ab=_0x2e73ab-0x0;var _0x1756eb=_0x689b[_0x2e73ab];return _0x1756eb;};'use strict';var _=require(_0xb689('0x0'));var util=require('util');var moment=require(_0xb689('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb689('0x2'));var db=require(_0xb689('0x3'))['db'];var utils=require(_0xb689('0x4'));var logger=require(_0xb689('0x5'))(_0xb689('0x6'));var config=require(_0xb689('0x7'));var jayson=require(_0xb689('0x8'));var client=jayson['client'][_0xb689('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5ee263,_0x47752c,_0x56c6ba){return new BPromise(function(_0x6eaf58,_0x1cad3e){return client[_0xb689('0xa')](_0x5ee263,_0x56c6ba)['then'](function(_0x14ef33){logger['info']('Automation,\x20%s,\x20%s',_0x47752c,_0xb689('0xb'));logger['debug'](_0xb689('0xc'),_0x47752c,'request\x20sent',JSON[_0xb689('0xd')](_0x14ef33));if(_0x14ef33[_0xb689('0xe')]){if(_0x14ef33[_0xb689('0xe')][_0xb689('0xf')]===0x1f4){logger[_0xb689('0xe')](_0xb689('0x10'),_0x47752c,_0x14ef33[_0xb689('0xe')][_0xb689('0x11')]);return _0x1cad3e(_0x14ef33[_0xb689('0xe')]['message']);}logger[_0xb689('0xe')](_0xb689('0x10'),_0x47752c,_0x14ef33[_0xb689('0xe')][_0xb689('0x11')]);return _0x6eaf58(_0x14ef33[_0xb689('0xe')][_0xb689('0x11')]);}else{logger['info'](_0xb689('0x10'),_0x47752c,_0xb689('0xb'));_0x6eaf58(_0x14ef33['result'][_0xb689('0x11')]);}})['catch'](function(_0xf950eb){logger['error']('Automation,\x20%s,\x20%s',_0x47752c,_0xf950eb);_0x1cad3e(_0xf950eb);});});}
\ No newline at end of file
diff --git a/server/api/automation/index.js b/server/api/automation/index.js
index f683e03..3a5f76a 100644
--- a/server/api/automation/index.js
+++ b/server/api/automation/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70e9=['/:id/conditions','getConditions','/:id/actions','getActions','post','create','addConditions','addActions','put','delete','destroy','exports','util','path','express','Router','../../components/auth/service','../../config/environment','./automation.controller','get','isAuthenticated','index','/:id'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x70e9,0x193));var _0x970e=function(_0x4246fd,_0x30d0c4){_0x4246fd=_0x4246fd-0x0;var _0x4e8971=_0x70e9[_0x4246fd];return _0x4e8971;};'use strict';var multer=require('multer');var util=require(_0x970e('0x0'));var path=require(_0x970e('0x1'));var timeout=require('connect-timeout');var express=require(_0x970e('0x2'));var router=express[_0x970e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x970e('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x970e('0x5'));var controller=require(_0x970e('0x6'));router[_0x970e('0x7')]('/',auth[_0x970e('0x8')](),controller[_0x970e('0x9')]);router[_0x970e('0x7')](_0x970e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x970e('0x7')](_0x970e('0xb'),auth['isAuthenticated'](),controller[_0x970e('0xc')]);router[_0x970e('0x7')](_0x970e('0xd'),auth['isAuthenticated'](),controller[_0x970e('0xe')]);router[_0x970e('0xf')]('/',auth[_0x970e('0x8')](),controller[_0x970e('0x10')]);router[_0x970e('0xf')](_0x970e('0xb'),auth['isAuthenticated'](),controller[_0x970e('0x11')]);router[_0x970e('0xf')](_0x970e('0xd'),auth[_0x970e('0x8')](),controller[_0x970e('0x12')]);router[_0x970e('0x13')](_0x970e('0xa'),auth[_0x970e('0x8')](),controller['update']);router[_0x970e('0x14')](_0x970e('0xa'),auth['isAuthenticated'](),controller[_0x970e('0x15')]);module[_0x970e('0x16')]=router;
\ No newline at end of file
+var _0x8832=['addActions','put','/:id','delete','destroy','exports','multer','util','express','Router','fs-extra','../../components/interaction/service','./automation.controller','get','isAuthenticated','show','getConditions','/:id/actions','post'];(function(_0x18972d,_0x4e867d){var _0x450f72=function(_0x521d7b){while(--_0x521d7b){_0x18972d['push'](_0x18972d['shift']());}};_0x450f72(++_0x4e867d);}(_0x8832,0x1f4));var _0x2883=function(_0x13bdfb,_0x41772f){_0x13bdfb=_0x13bdfb-0x0;var _0x10d3a7=_0x8832[_0x13bdfb];return _0x10d3a7;};'use strict';var multer=require(_0x2883('0x0'));var util=require(_0x2883('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x2883('0x2'));var router=express[_0x2883('0x3')]();var fs_extra=require(_0x2883('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x2883('0x5'));var config=require('../../config/environment');var controller=require(_0x2883('0x6'));router[_0x2883('0x7')]('/',auth[_0x2883('0x8')](),controller['index']);router[_0x2883('0x7')]('/:id',auth[_0x2883('0x8')](),controller[_0x2883('0x9')]);router['get']('/:id/conditions',auth[_0x2883('0x8')](),controller[_0x2883('0xa')]);router[_0x2883('0x7')](_0x2883('0xb'),auth[_0x2883('0x8')](),controller['getActions']);router['post']('/',auth[_0x2883('0x8')](),controller['create']);router['post']('/:id/conditions',auth[_0x2883('0x8')](),controller['addConditions']);router[_0x2883('0xc')](_0x2883('0xb'),auth[_0x2883('0x8')](),controller[_0x2883('0xd')]);router[_0x2883('0xe')](_0x2883('0xf'),auth['isAuthenticated'](),controller['update']);router[_0x2883('0x10')](_0x2883('0xf'),auth['isAuthenticated'](),controller[_0x2883('0x11')]);module[_0x2883('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js
index ef066bc..882cf53 100644
--- a/server/api/campaign/campaign.attributes.js
+++ b/server/api/campaign/campaign.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3442=['#Abandoned\x20Retry\x20(min:1,\x20max:999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','exports','STRING','name','ENUM','ivr','Active/Disactive\x20Campaign','INTEGER','Max\x20200\x20calls.','UNSIGNED','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0x3442,0x15a));var _0x2344=function(_0x2018c6,_0x2c7b8d){_0x2018c6=_0x2018c6-0x0;var _0x43c516=_0x3442[_0x2018c6];return _0x43c516;};'use strict';var Sequelize=require('sequelize');module[_0x2344('0x0')]={'name':{'type':Sequelize[_0x2344('0x1')],'unique':_0x2344('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x2344('0x3')](_0x2344('0x4')),'allowNull':![],'defaultValue':_0x2344('0x4')},'description':{'type':Sequelize[_0x2344('0x1')]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x2344('0x5')},'limitCalls':{'type':Sequelize[_0x2344('0x6')](0x4)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x2344('0x7')},'dialOriginateCallerIdName':{'type':Sequelize[_0x2344('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x2344('0x1')]},'dialOriginateTimeout':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2344('0x9')},'dialCongestionMaxRetry':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2344('0xa')},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x2344('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x2344('0xb')},'dialBusyMaxRetry':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2344('0xc')},'dialBusyRetryFrequency':{'type':Sequelize[_0x2344('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x2344('0xd')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'defaultValue':0x3,'comment':_0x2344('0xe')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x2344('0x6')](0x5)[_0x2344('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x2344('0xf')},'dialTimezone':{'type':Sequelize[_0x2344('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x2344('0x1')],'defaultValue':_0x2344('0x10')},'dialCheckDuplicateType':{'type':Sequelize[_0x2344('0x3')](_0x2344('0x11'),'never','onlyIfOpen'),'defaultValue':'always'},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x2344('0x6')](0x9)[_0x2344('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x2344('0x12')},'dialAMDGreeting':{'type':Sequelize[_0x2344('0x6')](0x9)[_0x2344('0x8')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x2344('0x13')},'dialAMDAfterGreetingSilence':{'type':Sequelize['INTEGER'](0x9)[_0x2344('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x2344('0x14')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0x2344('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0x2344('0x6')](0x9)[_0x2344('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x2344('0x15')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x2344('0x6')](0x9)[_0x2344('0x8')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x2344('0x16')},'dialAMDMaximumNumberOfWords':{'type':Sequelize['INTEGER'](0x9)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x2344('0x17')},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)[_0x2344('0x8')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x2344('0x18')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x2344('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x2344('0x19')},'dialOrderByScheduledAt':{'type':Sequelize['ENUM'](_0x2344('0x1a'),_0x2344('0x1b')),'defaultValue':_0x2344('0x1a')},'dialPrefix':{'type':Sequelize[_0x2344('0x1')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x2344('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x2344('0x1c')},'dialCutDigit':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x2344('0x1d')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2344('0x1e')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x2344('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x2344('0x1f')},'dialDropMaxRetry':{'type':Sequelize[_0x2344('0x6')](0x3)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2344('0x20')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x2344('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x2344('0x21')},'dialAbandonedMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2344('0x22')},'dialAbandonedRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x2344('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2344('0x23')},'dialMachineRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x2344('0x24')},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x2344('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x2344('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x2344('0x25')}};
\ No newline at end of file
+var _0xff33=['#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','exports','STRING','name','ivr','BOOLEAN','INTEGER','UNSIGNED','Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','#Busy\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','ENUM','always','never','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence'];(function(_0x1c6920,_0x355c87){var _0x3007c8=function(_0x17986b){while(--_0x17986b){_0x1c6920['push'](_0x1c6920['shift']());}};_0x3007c8(++_0x355c87);}(_0xff33,0x17a));var _0x3ff3=function(_0x23a79e,_0x235f89){_0x23a79e=_0x23a79e-0x0;var _0x3dab57=_0xff33[_0x23a79e];return _0x3dab57;};'use strict';var Sequelize=require('sequelize');module[_0x3ff3('0x0')]={'name':{'type':Sequelize[_0x3ff3('0x1')],'unique':_0x3ff3('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM'](_0x3ff3('0x3')),'allowNull':![],'defaultValue':_0x3ff3('0x3')},'description':{'type':Sequelize[_0x3ff3('0x1')]},'active':{'type':Sequelize[_0x3ff3('0x4')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'limitCalls':{'type':Sequelize[_0x3ff3('0x5')](0x4)[_0x3ff3('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x3ff3('0x7')},'dialOriginateCallerIdName':{'type':Sequelize[_0x3ff3('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize['INTEGER'](0x3)[_0x3ff3('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3ff3('0x8')},'dialCongestionMaxRetry':{'type':Sequelize[_0x3ff3('0x5')](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3ff3('0x9')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x3ff3('0x5')](0x5)[_0x3ff3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialBusyMaxRetry':{'type':Sequelize[_0x3ff3('0x5')](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3ff3('0xa')},'dialBusyRetryFrequency':{'type':Sequelize[_0x3ff3('0x5')](0x5)[_0x3ff3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x3ff3('0x5')](0x5)[_0x3ff3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3ff3('0xb')},'dialGlobalMaxRetry':{'type':Sequelize[_0x3ff3('0x5')](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x3ff3('0xc')},'dialTimezone':{'type':Sequelize[_0x3ff3('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x3ff3('0x1')],'defaultValue':'07:00-22:00,*,*,*'},'dialCheckDuplicateType':{'type':Sequelize[_0x3ff3('0xd')](_0x3ff3('0xe'),_0x3ff3('0xf'),'onlyIfOpen'),'defaultValue':_0x3ff3('0xe')},'dialAMDActive':{'type':Sequelize[_0x3ff3('0x4')],'defaultValue':0x0,'comment':_0x3ff3('0x10')},'dialAMDInitialSilence':{'type':Sequelize[_0x3ff3('0x5')](0x9)[_0x3ff3('0x6')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x3ff3('0x11')},'dialAMDGreeting':{'type':Sequelize[_0x3ff3('0x5')](0x9)[_0x3ff3('0x6')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x3ff3('0x12')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x3ff3('0x5')](0x9)[_0x3ff3('0x6')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x3ff3('0x13')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x3ff3('0x5')](0x9)[_0x3ff3('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x3ff3('0x14')},'dialAMDMinWordLength':{'type':Sequelize[_0x3ff3('0x5')](0x9)[_0x3ff3('0x6')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x3ff3('0x15')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x3ff3('0x5')](0x9)[_0x3ff3('0x6')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize[_0x3ff3('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x3ff3('0x16')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x3ff3('0x5')](0x9)[_0x3ff3('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x3ff3('0x17')},'dialOrderByScheduledAt':{'type':Sequelize[_0x3ff3('0xd')]('DESC','ASC'),'defaultValue':'DESC'},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x3ff3('0x5')](0x3)[_0x3ff3('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Random\x20Last\x20Digit\x20(min:1,\x20max:15)'},'dialCutDigit':{'type':Sequelize[_0x3ff3('0x5')](0x3)[_0x3ff3('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x3ff3('0x18')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x3ff3('0x5')](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3ff3('0x19')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x3ff3('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize[_0x3ff3('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3ff3('0x1a')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x3ff3('0x5')](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3ff3('0x1b')},'dialAbandonedRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3ff3('0x1c')},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3ff3('0x1d')},'dialMachineRetryFrequency':{'type':Sequelize[_0x3ff3('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3ff3('0x1e')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x3ff3('0x5')](0x3)[_0x3ff3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x3ff3('0x1f')},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x3ff3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x3ff3('0x20')}};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js
index 136a70b..8c8c4c5 100644
--- a/server/api/campaign/campaign.controller.js
+++ b/server/api/campaign/campaign.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4024=['rimraf','fast-json-patch','request-promise','bluebird','util','path','ejs','fs-extra','lodash','crypto','to-csv','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','save','update','then','destroy','get','IvrCampaigns','UserProfileResource','error','name','index','map','Campaign','rawAttributes','type','model','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filter','VIRTUAL','merge','include','findAll','rows','catch','show','params','intersection','includeAll','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','omit','createdAt','updatedAt','role','getHoppers','findOne','CmHopper','order','CampaignId','getHopperHistories','CmHopperHistory','pick','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','CmList','format','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','ListId','select','field','phone','NOW()','toString','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','from','cm_hopper_final','COALESCE(phone,\x27\x27)','CmListId','CampaignId\x20=\x20?','cm_hopper_additional_phones','cmHopperId','OrderBy','h.id','ci.OrderBY','join','h.ContactId\x20=\x20ci.CmContactId','h.ListId\x20=\x20?','h.CampaignId=?','h.createdAt\x20=\x20?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','eml-format'];(function(_0x10207b,_0x4b71fc){var _0x1f944d=function(_0x905f5c){while(--_0x905f5c){_0x10207b['push'](_0x10207b['shift']());}};_0x1f944d(++_0x4b71fc);}(_0x4024,0x89));var _0x4402=function(_0x5e33c6,_0x4611e0){_0x5e33c6=_0x5e33c6-0x0;var _0x23d965=_0x4024[_0x5e33c6];return _0x23d965;};'use strict';var emlformat=require(_0x4402('0x0'));var rimraf=require(_0x4402('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4402('0x2'));var rp=require(_0x4402('0x3'));var moment=require('moment');var BPromise=require(_0x4402('0x4'));var Mustache=require('mustache');var util=require(_0x4402('0x5'));var path=require(_0x4402('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x4402('0x7'));var fs=require('fs');var fs_extra=require(_0x4402('0x8'));var _=require(_0x4402('0x9'));var squel=require('squel');var crypto=require(_0x4402('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x4402('0xb'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x4402('0xc'));var authService=require('../../components/auth/service');var qs=require(_0x4402('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4402('0xe'));var logger=require('../../config/logger')(_0x4402('0xf'));var utils=require(_0x4402('0x10'));var config=require('../../config/environment');var licenseUtil=require(_0x4402('0x11'));var db=require(_0x4402('0x12'))['db'];function respondWithStatusCode(_0xa819e9,_0x4c9032){_0x4c9032=_0x4c9032||0xcc;return function(_0x7e4475){if(_0x7e4475){return _0xa819e9[_0x4402('0x13')](_0x4c9032);}return _0xa819e9[_0x4402('0x14')](_0x4c9032)[_0x4402('0x15')]();};}function respondWithResult(_0x248ad9,_0x31710c){_0x31710c=_0x31710c||0xc8;return function(_0x18c7a8){if(_0x18c7a8){return _0x248ad9[_0x4402('0x14')](_0x31710c)[_0x4402('0x16')](_0x18c7a8);}};}function respondWithFilteredResult(_0x263a57,_0x375166){return function(_0xc03f65){if(_0xc03f65){var _0x2a2ce8=typeof _0x375166[_0x4402('0x17')]===_0x4402('0x18')&&typeof _0x375166[_0x4402('0x19')]===_0x4402('0x18');var _0x25e88b=_0xc03f65[_0x4402('0x1a')];var _0x231382=_0x2a2ce8?0x0:_0x375166['offset'];var _0x494389=_0x2a2ce8?_0xc03f65[_0x4402('0x1a')]:_0x375166[_0x4402('0x17')]+_0x375166['limit'];var _0x756962;if(_0x494389>=_0x25e88b){_0x494389=_0x25e88b;_0x756962=0xc8;}else{_0x756962=0xce;}_0x263a57[_0x4402('0x14')](_0x756962);return _0x263a57['set'](_0x4402('0x1b'),_0x231382+'-'+_0x494389+'/'+_0x25e88b)['json'](_0xc03f65);}return null;};}function patchUpdates(_0x55cc8c){return function(_0x1b9599){try{jsonpatch[_0x4402('0x1c')](_0x1b9599,_0x55cc8c,!![]);}catch(_0x28f44b){return BPromise['reject'](_0x28f44b);}return _0x1b9599[_0x4402('0x1d')]();};}function saveUpdates(_0x57a25e,_0x47ab54){return function(_0x6f1f72){if(_0x6f1f72){return _0x6f1f72[_0x4402('0x1e')](_0x57a25e)[_0x4402('0x1f')](function(_0xc583b){return _0xc583b;});}return null;};}function removeEntity(_0x258d10,_0x2e6fee){return function(_0x289a3e){if(_0x289a3e){return _0x289a3e[_0x4402('0x20')]()[_0x4402('0x1f')](function(){var _0x4d6846=_0x289a3e[_0x4402('0x21')]({'plain':!![]});var _0x4e1c04=_0x4402('0x22');return db[_0x4402('0x23')][_0x4402('0x20')]({'where':{'type':_0x4e1c04,'resourceId':_0x4d6846['id']}})[_0x4402('0x1f')](function(){return _0x289a3e;});})['then'](function(){_0x258d10[_0x4402('0x14')](0xcc)['end']();});}};}function handleEntityNotFound(_0x59d52f,_0x1be54d){return function(_0x395e49){if(!_0x395e49){_0x59d52f[_0x4402('0x13')](0x194);}return _0x395e49;};}function handleError(_0xabf61b,_0x3eb796){_0x3eb796=_0x3eb796||0x1f4;return function(_0x514e41){logger[_0x4402('0x24')](_0x514e41['stack']);if(_0x514e41[_0x4402('0x25')]){delete _0x514e41[_0x4402('0x25')];}_0xabf61b[_0x4402('0x14')](_0x3eb796)['send'](_0x514e41);};}exports[_0x4402('0x26')]=function(_0x6c87f6,_0x316239){var _0x3f4bcb={},_0x2526d1={},_0x605702={'count':0x0,'rows':[]};var _0x1189b8=_[_0x4402('0x27')](db[_0x4402('0x28')][_0x4402('0x29')],function(_0xcea26b){return{'name':_0xcea26b['fieldName'],'type':_0xcea26b[_0x4402('0x2a')]['key']};});_0x2526d1[_0x4402('0x2b')]=_['map'](_0x1189b8,_0x4402('0x25'));_0x2526d1[_0x4402('0x2c')]=_[_0x4402('0x2d')](_0x6c87f6[_0x4402('0x2c')]);_0x2526d1[_0x4402('0x2e')]=_['intersection'](_0x2526d1[_0x4402('0x2b')],_0x2526d1[_0x4402('0x2c')]);_0x3f4bcb[_0x4402('0x2f')]=_['intersection'](_0x2526d1[_0x4402('0x2b')],qs[_0x4402('0x30')](_0x6c87f6['query'][_0x4402('0x30')]));_0x3f4bcb[_0x4402('0x2f')]=_0x3f4bcb[_0x4402('0x2f')][_0x4402('0x31')]?_0x3f4bcb[_0x4402('0x2f')]:_0x2526d1[_0x4402('0x2b')];if(!_0x6c87f6[_0x4402('0x2c')][_0x4402('0x32')](_0x4402('0x33'))){_0x3f4bcb['limit']=qs[_0x4402('0x19')](_0x6c87f6[_0x4402('0x2c')][_0x4402('0x19')]);_0x3f4bcb['offset']=qs[_0x4402('0x17')](_0x6c87f6[_0x4402('0x2c')]['offset']);}_0x3f4bcb['order']=qs[_0x4402('0x34')](_0x6c87f6[_0x4402('0x2c')][_0x4402('0x34')]);_0x3f4bcb[_0x4402('0x35')]=qs['filters'](_['pick'](_0x6c87f6['query'],_0x2526d1[_0x4402('0x2e')]),_0x1189b8);if(_0x6c87f6[_0x4402('0x2c')][_0x4402('0x36')]){_0x3f4bcb[_0x4402('0x35')]=_['merge'](_0x3f4bcb[_0x4402('0x35')],{'$or':_[_0x4402('0x27')](_0x1189b8,function(_0x35f877){if(_0x35f877['type']!==_0x4402('0x37')){var _0x5aca7b={};_0x5aca7b[_0x35f877[_0x4402('0x25')]]={'$like':'%'+_0x6c87f6[_0x4402('0x2c')]['filter']+'%'};return _0x5aca7b;}})});}_0x3f4bcb=_[_0x4402('0x38')]({},_0x3f4bcb,_0x6c87f6['options']);var _0x423628={'where':_0x3f4bcb[_0x4402('0x35')]};return db['Campaign'][_0x4402('0x1a')](_0x423628)[_0x4402('0x1f')](function(_0x250f09){_0x605702[_0x4402('0x1a')]=_0x250f09;if(_0x6c87f6['query']['includeAll']){_0x3f4bcb[_0x4402('0x39')]=[{'all':!![]}];}return db['Campaign'][_0x4402('0x3a')](_0x3f4bcb);})[_0x4402('0x1f')](function(_0xb9cf85){_0x605702[_0x4402('0x3b')]=_0xb9cf85;return _0x605702;})[_0x4402('0x1f')](respondWithFilteredResult(_0x316239,_0x3f4bcb))[_0x4402('0x3c')](handleError(_0x316239,null));};exports[_0x4402('0x3d')]=function(_0x390169,_0x1f9b3e){var _0x42812b={'raw':![],'where':{'id':_0x390169[_0x4402('0x3e')]['id']}},_0x486e43={};_0x486e43[_0x4402('0x2b')]=_['keys'](db[_0x4402('0x28')][_0x4402('0x29')]);_0x486e43['query']=_[_0x4402('0x2d')](_0x390169[_0x4402('0x2c')]);_0x486e43[_0x4402('0x2e')]=_[_0x4402('0x3f')](_0x486e43[_0x4402('0x2b')],_0x486e43['query']);_0x42812b[_0x4402('0x2f')]=_[_0x4402('0x3f')](_0x486e43[_0x4402('0x2b')],qs[_0x4402('0x30')](_0x390169[_0x4402('0x2c')][_0x4402('0x30')]));_0x42812b[_0x4402('0x2f')]=_0x42812b[_0x4402('0x2f')][_0x4402('0x31')]?_0x42812b[_0x4402('0x2f')]:_0x486e43[_0x4402('0x2b')];if(_0x390169['query'][_0x4402('0x40')]){_0x42812b['include']=[{'all':!![]}];}_0x42812b=_[_0x4402('0x38')]({},_0x42812b,_0x390169[_0x4402('0x41')]);return db['Campaign'][_0x4402('0x42')](_0x42812b)[_0x4402('0x1f')](handleEntityNotFound(_0x1f9b3e,null))[_0x4402('0x1f')](respondWithResult(_0x1f9b3e,null))[_0x4402('0x3c')](handleError(_0x1f9b3e,null));};exports[_0x4402('0x43')]=function(_0x2503eb,_0x5b094b){return db[_0x4402('0x28')][_0x4402('0x43')](_0x2503eb[_0x4402('0x44')],{})[_0x4402('0x1f')](function(_0x2b2ed3){var _0x24d51c=_0x2503eb[_0x4402('0x45')][_0x4402('0x21')]({'plain':!![]});if(!_0x24d51c)throw new Error(_0x4402('0x46'));if(_0x24d51c['role']==='user'){var _0x5ab12b=_0x2b2ed3['get']({'plain':!![]});var _0x257010=_0x4402('0x22');return db[_0x4402('0x47')][_0x4402('0x42')]({'where':{'name':_0x257010,'userProfileId':_0x24d51c['userProfileId']},'raw':!![]})[_0x4402('0x1f')](function(_0x12d6de){if(_0x12d6de&&_0x12d6de[_0x4402('0x48')]===0x0){return db[_0x4402('0x23')][_0x4402('0x43')]({'name':_0x5ab12b[_0x4402('0x25')],'resourceId':_0x5ab12b['id'],'type':_0x12d6de[_0x4402('0x25')],'sectionId':_0x12d6de['id']},{})['then'](function(){return _0x2b2ed3;});}else{return _0x2b2ed3;}})[_0x4402('0x3c')](function(_0x2a8085){logger[_0x4402('0x24')](_0x4402('0x49'),_0x2a8085);throw _0x2a8085;});}return _0x2b2ed3;})[_0x4402('0x1f')](respondWithResult(_0x5b094b,0xc9))[_0x4402('0x3c')](handleError(_0x5b094b,null));};exports['clone']=function(_0xe8a8e9,_0x642ab4){var _0x3f45c3={'where':{'id':_0xe8a8e9[_0x4402('0x3e')]['id']}},_0x295c9b={};_0x295c9b[_0x4402('0x2b')]=_[_0x4402('0x2d')](db['Campaign']['rawAttributes']);_0x3f45c3[_0x4402('0x2f')]=_[_0x4402('0x3f')](_0x295c9b[_0x4402('0x2b')],qs['fields'](_0xe8a8e9['query'][_0x4402('0x30')]));_0x3f45c3[_0x4402('0x2f')]=_0x3f45c3[_0x4402('0x2f')][_0x4402('0x31')]?_0x3f45c3[_0x4402('0x2f')]:_0x295c9b[_0x4402('0x2b')];if(_0xe8a8e9[_0x4402('0x2c')][_0x4402('0x40')]){_0x3f45c3[_0x4402('0x39')]=[{'all':!![]}];}_0x3f45c3=_[_0x4402('0x38')]({},_0x3f45c3,_0xe8a8e9[_0x4402('0x41')]);return db[_0x4402('0x28')][_0x4402('0x42')](_0x3f45c3)['then'](handleEntityNotFound(_0x642ab4,null))[_0x4402('0x1f')](function(_0x4b7057){if(_0x4b7057){var _0xe4530a=_0x4b7057['get']({'plain':!![]});_0xe4530a=qs[_0x4402('0x4a')](_0xe4530a,['id',_0x4402('0x4b'),_0x4402('0x4c')]);_0xe8a8e9[_0x4402('0x44')]=_[_0x4402('0x4a')](_0xe8a8e9[_0x4402('0x44')],['id','createdAt',_0x4402('0x4c')]);return db[_0x4402('0x28')][_0x4402('0x43')](_[_0x4402('0x38')](_0xe4530a,_0xe8a8e9[_0x4402('0x44')]),{'include':_0xe8a8e9['query'][_0x4402('0x40')]?[{'all':!![]}]:undefined})[_0x4402('0x1f')](function(_0x474b04){var _0xc15c0b=_0xe8a8e9[_0x4402('0x45')][_0x4402('0x21')]({'plain':!![]});if(!_0xc15c0b)throw new Error(_0x4402('0x46'));if(_0xc15c0b[_0x4402('0x4d')]==='user'){var _0x11c1b8=_0x474b04[_0x4402('0x21')]({'plain':!![]});var _0x53a9f3=_0x4402('0x22');return db[_0x4402('0x47')]['find']({'where':{'name':_0x53a9f3,'userProfileId':_0xc15c0b['userProfileId']},'raw':!![]})[_0x4402('0x1f')](function(_0x1746c6){if(_0x1746c6&&_0x1746c6[_0x4402('0x48')]===0x0){return db['UserProfileResource'][_0x4402('0x43')]({'name':_0x11c1b8[_0x4402('0x25')],'resourceId':_0x11c1b8['id'],'type':_0x1746c6[_0x4402('0x25')],'sectionId':_0x1746c6['id']},{})['then'](function(){return _0x474b04;});}else{return _0x474b04;}})[_0x4402('0x3c')](function(_0x41a2c6){logger[_0x4402('0x24')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x41a2c6);throw _0x41a2c6;});}return _0x474b04;});}})[_0x4402('0x1f')](respondWithResult(_0x642ab4,0xc9))[_0x4402('0x3c')](handleError(_0x642ab4,null));};exports['update']=function(_0x5cef56,_0x40869c){if(_0x5cef56['body']['id']){delete _0x5cef56[_0x4402('0x44')]['id'];}return db[_0x4402('0x28')]['find']({'where':{'id':_0x5cef56['params']['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x40869c,null))[_0x4402('0x1f')](saveUpdates(_0x5cef56[_0x4402('0x44')],null))[_0x4402('0x1f')](respondWithResult(_0x40869c,null))['catch'](handleError(_0x40869c,null));};exports[_0x4402('0x20')]=function(_0x30e5d5,_0x22ed41){return db[_0x4402('0x28')][_0x4402('0x42')]({'where':{'id':_0x30e5d5[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x22ed41,null))['then'](removeEntity(_0x22ed41,null))[_0x4402('0x3c')](handleError(_0x22ed41,null));};exports[_0x4402('0x4e')]=function(_0x559d1c,_0x508111,_0x2bee9d){var _0x4aaa60={'raw':!![],'where':{}};var _0x30569e={};var _0x586689={'count':0x0,'rows':[]};return db[_0x4402('0x28')][_0x4402('0x4f')]({'where':{'id':_0x559d1c[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x508111,null))[_0x4402('0x1f')](function(_0x1c1857){if(_0x1c1857){_0x30569e[_0x4402('0x2b')]=_[_0x4402('0x2d')](db[_0x4402('0x50')][_0x4402('0x29')]);_0x30569e[_0x4402('0x2c')]=_[_0x4402('0x2d')](_0x559d1c[_0x4402('0x2c')]);_0x30569e[_0x4402('0x2e')]=_[_0x4402('0x3f')](_0x30569e[_0x4402('0x2b')],_0x30569e['query']);_0x4aaa60[_0x4402('0x2f')]=_[_0x4402('0x3f')](_0x30569e[_0x4402('0x2b')],qs['fields'](_0x559d1c[_0x4402('0x2c')]['fields']));_0x4aaa60[_0x4402('0x2f')]=_0x4aaa60[_0x4402('0x2f')][_0x4402('0x31')]?_0x4aaa60[_0x4402('0x2f')]:_0x30569e['model'];if(!_0x559d1c[_0x4402('0x2c')]['hasOwnProperty'](_0x4402('0x33'))){_0x4aaa60[_0x4402('0x19')]=qs[_0x4402('0x19')](_0x559d1c['query'][_0x4402('0x19')]);_0x4aaa60['offset']=qs[_0x4402('0x17')](_0x559d1c[_0x4402('0x2c')][_0x4402('0x17')]);}_0x4aaa60[_0x4402('0x51')]=qs[_0x4402('0x34')](_0x559d1c[_0x4402('0x2c')][_0x4402('0x34')]);_0x4aaa60[_0x4402('0x35')]=qs[_0x4402('0x2e')](_['pick'](_0x559d1c[_0x4402('0x2c')],_0x30569e[_0x4402('0x2e')]));_0x4aaa60[_0x4402('0x35')][_0x4402('0x52')]=_0x1c1857['id'];if(_0x559d1c[_0x4402('0x2c')][_0x4402('0x36')]){_0x4aaa60[_0x4402('0x35')]=_[_0x4402('0x38')](_0x4aaa60[_0x4402('0x35')],{'$or':_['map'](_0x4aaa60[_0x4402('0x2f')],function(_0x2a6dc1){var _0x2eae1c={};_0x2eae1c[_0x2a6dc1]={'$like':'%'+_0x559d1c['query'][_0x4402('0x36')]+'%'};return _0x2eae1c;})});}_0x4aaa60=_['merge']({},_0x4aaa60,_0x559d1c[_0x4402('0x41')]);return db['CmHopper'][_0x4402('0x1a')]({'where':_0x4aaa60[_0x4402('0x35')]})['then'](function(_0x43b4aa){_0x586689['count']=_0x43b4aa;if(_0x559d1c[_0x4402('0x2c')][_0x4402('0x40')]){_0x4aaa60['include']=[{'all':!![]}];}return db[_0x4402('0x50')][_0x4402('0x3a')](_0x4aaa60);})['then'](function(_0x189259){_0x586689[_0x4402('0x3b')]=_0x189259;return _0x586689;});}})['then'](respondWithFilteredResult(_0x508111,_0x4aaa60))[_0x4402('0x3c')](handleError(_0x508111,null));};exports[_0x4402('0x53')]=function(_0x1a9163,_0x12b834,_0x439e95){var _0x17b133={'raw':!![],'where':{}};var _0x7f28d3={};var _0x370493={'count':0x0,'rows':[]};return db[_0x4402('0x28')][_0x4402('0x4f')]({'where':{'id':_0x1a9163[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x12b834,null))[_0x4402('0x1f')](function(_0x2dd4b7){if(_0x2dd4b7){_0x7f28d3['model']=_[_0x4402('0x2d')](db[_0x4402('0x54')]['rawAttributes']);_0x7f28d3[_0x4402('0x2c')]=_['keys'](_0x1a9163[_0x4402('0x2c')]);_0x7f28d3[_0x4402('0x2e')]=_[_0x4402('0x3f')](_0x7f28d3['model'],_0x7f28d3[_0x4402('0x2c')]);_0x17b133[_0x4402('0x2f')]=_[_0x4402('0x3f')](_0x7f28d3['model'],qs[_0x4402('0x30')](_0x1a9163[_0x4402('0x2c')][_0x4402('0x30')]));_0x17b133[_0x4402('0x2f')]=_0x17b133['attributes'][_0x4402('0x31')]?_0x17b133[_0x4402('0x2f')]:_0x7f28d3[_0x4402('0x2b')];if(!_0x1a9163[_0x4402('0x2c')][_0x4402('0x32')](_0x4402('0x33'))){_0x17b133[_0x4402('0x19')]=qs[_0x4402('0x19')](_0x1a9163[_0x4402('0x2c')][_0x4402('0x19')]);_0x17b133[_0x4402('0x17')]=qs[_0x4402('0x17')](_0x1a9163[_0x4402('0x2c')]['offset']);}_0x17b133[_0x4402('0x51')]=qs[_0x4402('0x34')](_0x1a9163[_0x4402('0x2c')][_0x4402('0x34')]);_0x17b133['where']=qs['filters'](_[_0x4402('0x55')](_0x1a9163[_0x4402('0x2c')],_0x7f28d3[_0x4402('0x2e')]));_0x17b133[_0x4402('0x35')]['CampaignId']=_0x2dd4b7['id'];if(_0x1a9163[_0x4402('0x2c')][_0x4402('0x36')]){_0x17b133['where']=_[_0x4402('0x38')](_0x17b133[_0x4402('0x35')],{'$or':_[_0x4402('0x27')](_0x17b133[_0x4402('0x2f')],function(_0x297884){var _0x5f5945={};_0x5f5945[_0x297884]={'$like':'%'+_0x1a9163[_0x4402('0x2c')][_0x4402('0x36')]+'%'};return _0x5f5945;})});}_0x17b133=_[_0x4402('0x38')]({},_0x17b133,_0x1a9163[_0x4402('0x41')]);return db[_0x4402('0x54')][_0x4402('0x1a')]({'where':_0x17b133[_0x4402('0x35')]})['then'](function(_0x218640){_0x370493[_0x4402('0x1a')]=_0x218640;if(_0x1a9163[_0x4402('0x2c')][_0x4402('0x40')]){_0x17b133[_0x4402('0x39')]=[{'all':!![]}];}return db['CmHopperHistory'][_0x4402('0x3a')](_0x17b133);})[_0x4402('0x1f')](function(_0x572e21){_0x370493[_0x4402('0x3b')]=_0x572e21;return _0x370493;});}})['then'](respondWithFilteredResult(_0x12b834,_0x17b133))['catch'](handleError(_0x12b834,null));};exports[_0x4402('0x56')]=function(_0x505a13,_0x32be98,_0x520907){var _0x51e85d={'raw':!![],'where':{}};var _0x16af14={};var _0x7adf6d={'count':0x0,'rows':[]};return db[_0x4402('0x28')][_0x4402('0x4f')]({'where':{'id':_0x505a13[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x32be98,null))['then'](function(_0x596499){if(_0x596499){_0x16af14[_0x4402('0x2b')]=_['keys'](db[_0x4402('0x57')]['rawAttributes']);_0x16af14['query']=_[_0x4402('0x2d')](_0x505a13['query']);_0x16af14[_0x4402('0x2e')]=_[_0x4402('0x3f')](_0x16af14[_0x4402('0x2b')],_0x16af14[_0x4402('0x2c')]);_0x51e85d[_0x4402('0x2f')]=_['intersection'](_0x16af14['model'],qs[_0x4402('0x30')](_0x505a13[_0x4402('0x2c')]['fields']));_0x51e85d[_0x4402('0x2f')]=_0x51e85d[_0x4402('0x2f')][_0x4402('0x31')]?_0x51e85d[_0x4402('0x2f')]:_0x16af14[_0x4402('0x2b')];if(!_0x505a13[_0x4402('0x2c')]['hasOwnProperty']('nolimit')){_0x51e85d[_0x4402('0x19')]=qs[_0x4402('0x19')](_0x505a13[_0x4402('0x2c')][_0x4402('0x19')]);_0x51e85d[_0x4402('0x17')]=qs[_0x4402('0x17')](_0x505a13['query'][_0x4402('0x17')]);}_0x51e85d[_0x4402('0x51')]=qs[_0x4402('0x34')](_0x505a13[_0x4402('0x2c')][_0x4402('0x34')]);_0x51e85d['where']=qs[_0x4402('0x2e')](_[_0x4402('0x55')](_0x505a13[_0x4402('0x2c')],_0x16af14[_0x4402('0x2e')]));_0x51e85d[_0x4402('0x35')][_0x4402('0x52')]=_0x596499['id'];if(_0x505a13['query']['filter']){_0x51e85d[_0x4402('0x35')]=_['merge'](_0x51e85d[_0x4402('0x35')],{'$or':_[_0x4402('0x27')](_0x51e85d[_0x4402('0x2f')],function(_0x3eb7f0){var _0x3636e9={};_0x3636e9[_0x3eb7f0]={'$like':'%'+_0x505a13[_0x4402('0x2c')][_0x4402('0x36')]+'%'};return _0x3636e9;})});}_0x51e85d=_[_0x4402('0x38')]({},_0x51e85d,_0x505a13[_0x4402('0x41')]);return db[_0x4402('0x57')][_0x4402('0x1a')]({'where':_0x51e85d[_0x4402('0x35')]})[_0x4402('0x1f')](function(_0x372c6e){_0x7adf6d[_0x4402('0x1a')]=_0x372c6e;if(_0x505a13[_0x4402('0x2c')][_0x4402('0x40')]){_0x51e85d[_0x4402('0x39')]=[{'all':!![]}];}return db[_0x4402('0x57')][_0x4402('0x3a')](_0x51e85d);})[_0x4402('0x1f')](function(_0x385b8e){_0x7adf6d[_0x4402('0x3b')]=_0x385b8e;return _0x7adf6d;});}})['then'](respondWithFilteredResult(_0x32be98,_0x51e85d))[_0x4402('0x3c')](handleError(_0x32be98,null));};exports[_0x4402('0x58')]=function(_0x3a3734,_0x2631bc,_0x98b130){var _0x3511f6={'raw':!![],'where':{}};var _0x5dfe53={};var _0x4ed2fa={'count':0x0,'rows':[]};return db[_0x4402('0x28')][_0x4402('0x4f')]({'where':{'id':_0x3a3734[_0x4402('0x3e')]['id']}})['then'](handleEntityNotFound(_0x2631bc,null))['then'](function(_0x54fee3){if(_0x54fee3){_0x5dfe53['model']=_[_0x4402('0x2d')](db[_0x4402('0x59')][_0x4402('0x29')]);_0x5dfe53['query']=_[_0x4402('0x2d')](_0x3a3734[_0x4402('0x2c')]);_0x5dfe53[_0x4402('0x2e')]=_['intersection'](_0x5dfe53[_0x4402('0x2b')],_0x5dfe53['query']);_0x3511f6[_0x4402('0x2f')]=_[_0x4402('0x3f')](_0x5dfe53[_0x4402('0x2b')],qs[_0x4402('0x30')](_0x3a3734[_0x4402('0x2c')][_0x4402('0x30')]));_0x3511f6['attributes']=_0x3511f6[_0x4402('0x2f')][_0x4402('0x31')]?_0x3511f6[_0x4402('0x2f')]:_0x5dfe53['model'];if(!_0x3a3734[_0x4402('0x2c')]['hasOwnProperty'](_0x4402('0x33'))){_0x3511f6[_0x4402('0x19')]=qs[_0x4402('0x19')](_0x3a3734[_0x4402('0x2c')]['limit']);_0x3511f6[_0x4402('0x17')]=qs[_0x4402('0x17')](_0x3a3734[_0x4402('0x2c')][_0x4402('0x17')]);}_0x3511f6[_0x4402('0x51')]=qs['sort'](_0x3a3734[_0x4402('0x2c')][_0x4402('0x34')]);_0x3511f6['where']=qs['filters'](_['pick'](_0x3a3734[_0x4402('0x2c')],_0x5dfe53[_0x4402('0x2e')]));_0x3511f6[_0x4402('0x35')][_0x4402('0x52')]=_0x54fee3['id'];if(_0x3a3734['query'][_0x4402('0x36')]){_0x3511f6[_0x4402('0x35')]=_[_0x4402('0x38')](_0x3511f6[_0x4402('0x35')],{'$or':_['map'](_0x3511f6[_0x4402('0x2f')],function(_0x2949ce){var _0x30f26a={};_0x30f26a[_0x2949ce]={'$like':'%'+_0x3a3734['query']['filter']+'%'};return _0x30f26a;})});}_0x3511f6=_['merge']({},_0x3511f6,_0x3a3734[_0x4402('0x41')]);return db['CmHopperBlack'][_0x4402('0x1a')]({'where':_0x3511f6[_0x4402('0x35')]})[_0x4402('0x1f')](function(_0x117911){_0x4ed2fa[_0x4402('0x1a')]=_0x117911;if(_0x3a3734[_0x4402('0x2c')][_0x4402('0x40')]){_0x3511f6[_0x4402('0x39')]=[{'all':!![]}];}return db[_0x4402('0x59')][_0x4402('0x3a')](_0x3511f6);})[_0x4402('0x1f')](function(_0x329b60){_0x4ed2fa[_0x4402('0x3b')]=_0x329b60;return _0x4ed2fa;});}})[_0x4402('0x1f')](respondWithFilteredResult(_0x2631bc,_0x3511f6))['catch'](handleError(_0x2631bc,null));};exports[_0x4402('0x5a')]=function(_0x26f5a9,_0x4cc170,_0x5563e6){var _0x57fd83={};var _0x1aacd7={};var _0x5a3ec8;var _0x47aa8b;return db[_0x4402('0x28')][_0x4402('0x4f')]({'where':{'id':_0x26f5a9['params']['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x4cc170,null))[_0x4402('0x1f')](function(_0x541cd0){if(_0x541cd0){_0x5a3ec8=_0x541cd0;_0x1aacd7[_0x4402('0x2b')]=_['keys'](db[_0x4402('0x5b')][_0x4402('0x29')]);_0x1aacd7[_0x4402('0x2c')]=_[_0x4402('0x2d')](_0x26f5a9[_0x4402('0x2c')]);_0x1aacd7[_0x4402('0x2e')]=_[_0x4402('0x3f')](_0x1aacd7[_0x4402('0x2b')],_0x1aacd7[_0x4402('0x2c')]);_0x57fd83['attributes']=_[_0x4402('0x3f')](_0x1aacd7[_0x4402('0x2b')],qs[_0x4402('0x30')](_0x26f5a9[_0x4402('0x2c')]['fields']));_0x57fd83[_0x4402('0x2f')]=_0x57fd83['attributes'][_0x4402('0x31')]?_0x57fd83[_0x4402('0x2f')]:_0x1aacd7['model'];_0x57fd83['order']=qs[_0x4402('0x34')](_0x26f5a9[_0x4402('0x2c')][_0x4402('0x34')]);_0x57fd83[_0x4402('0x35')]=qs[_0x4402('0x2e')](_[_0x4402('0x55')](_0x26f5a9['query'],_0x1aacd7['filters']));if(_0x26f5a9[_0x4402('0x2c')][_0x4402('0x36')]){_0x57fd83[_0x4402('0x35')]=_[_0x4402('0x38')](_0x57fd83[_0x4402('0x35')],{'$or':_[_0x4402('0x27')](_0x57fd83['attributes'],function(_0x28720c){var _0x3e00bf={};_0x3e00bf[_0x28720c]={'$like':'%'+_0x26f5a9[_0x4402('0x2c')][_0x4402('0x36')]+'%'};return _0x3e00bf;})});}_0x57fd83=_[_0x4402('0x38')]({},_0x57fd83,_0x26f5a9[_0x4402('0x41')]);return _0x5a3ec8['getLists'](_0x57fd83);}})['then'](function(_0x1a3393){if(_0x1a3393){_0x47aa8b=_0x1a3393['length'];if(!_0x26f5a9[_0x4402('0x2c')][_0x4402('0x32')]('nolimit')){_0x57fd83[_0x4402('0x19')]=qs['limit'](_0x26f5a9[_0x4402('0x2c')][_0x4402('0x19')]);_0x57fd83[_0x4402('0x17')]=qs['offset'](_0x26f5a9[_0x4402('0x2c')]['offset']);}return _0x5a3ec8[_0x4402('0x5a')](_0x57fd83);}})[_0x4402('0x1f')](function(_0x206058){if(_0x206058){return _0x206058?{'count':_0x47aa8b,'rows':_0x206058}:null;}})[_0x4402('0x1f')](respondWithResult(_0x4cc170,null))[_0x4402('0x3c')](handleError(_0x4cc170,null));};exports['addLists']=function(_0x4b999c,_0x135fac,_0x5c1e8e){var _0x2bc5a3,_0x38009f;var _0x559802=[];var _0x50d453=moment()[_0x4402('0x5c')](_0x4402('0x5d'));return db[_0x4402('0x28')][_0x4402('0x42')]({'where':{'id':_0x4b999c[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x135fac,null))[_0x4402('0x1f')](function(_0x93b7b4){if(_0x93b7b4){_0x38009f=_0x93b7b4;return _0x93b7b4['addLists'](_0x4b999c['body'][_0x4402('0x5e')],_[_0x4402('0x4a')](_0x4b999c[_0x4402('0x44')],['ids','id'])||{});}return null;})[_0x4402('0x5f')](function(_0x5ef261){var _0x224182;var _0x1237a3;_0x2bc5a3=_0x5ef261||[];var _0x364423=[];if(_0x5ef261){for(var _0x4a0fd9=0x0;_0x4a0fd9<_0x5ef261[_0x4402('0x31')];_0x4a0fd9+=0x1){var _0x12569b=_0x5ef261[_0x4a0fd9]['get']({'plain':!![]});_0x38009f[_0x4402('0x60')]=_0x4b999c[_0x4402('0x44')][_0x4402('0x60')]?_0x4b999c[_0x4402('0x44')][_0x4402('0x60')]:_0x38009f[_0x4402('0x60')];switch(_0x38009f[_0x4402('0x60')]){case _0x4402('0x61'):_0x224182=squel[_0x4402('0x62')]()[_0x4402('0x63')](_0x4402('0x64'))[_0x4402('0x65')](['phone',_0x4402('0x66'),_0x4402('0x67'),_0x4402('0x68'),_0x4402('0x52'),_0x4402('0x4b'),_0x4402('0x4c')],squel[_0x4402('0x69')]()[_0x4402('0x6a')](_0x4402('0x6b'),'phone')[_0x4402('0x6a')](_0x4402('0x6c'),_0x4402('0x66'))['field']('id',_0x4402('0x67'))[_0x4402('0x6a')](_0x12569b['CmListId'][_0x4402('0x6d')](),_0x4402('0x68'))['field'](_0x4b999c['params']['id'][_0x4402('0x6d')](),_0x4402('0x52'))[_0x4402('0x6a')]('\x27'+_0x50d453+'\x27',_0x4402('0x4b'))['field']('\x27'+_0x50d453+'\x27',_0x4402('0x4c'))['from'](_0x4402('0x6e'))[_0x4402('0x35')](_0x4402('0x6f'))[_0x4402('0x35')](_0x4402('0x70'),_0x12569b['CmListId'][_0x4402('0x6d')]())[_0x4402('0x35')](_0x4402('0x71'))[_0x4402('0x35')](_0x4402('0x72'),squel[_0x4402('0x69')]()[_0x4402('0x6a')](_0x4402('0x73'))[_0x4402('0x74')](_0x4402('0x75'))[_0x4402('0x35')]('CampaignId\x20=\x20?',_0x4b999c[_0x4402('0x3e')]['id'][_0x4402('0x6d')]()))[_0x4402('0x35')](_0x4402('0x72'),squel[_0x4402('0x69')]()[_0x4402('0x6a')](_0x4402('0x76'))[_0x4402('0x74')](_0x4402('0x64'))[_0x4402('0x35')]('CampaignId\x20=\x20?',_0x4b999c[_0x4402('0x3e')]['id'][_0x4402('0x6d')]())))[_0x4402('0x6d')]();break;case'onlyIfOpen':_0x224182=squel[_0x4402('0x62')]()[_0x4402('0x63')]('cm_hopper')[_0x4402('0x65')]([_0x4402('0x6b'),_0x4402('0x66'),_0x4402('0x67'),_0x4402('0x68'),_0x4402('0x52'),_0x4402('0x4b'),_0x4402('0x4c')],squel[_0x4402('0x69')]()[_0x4402('0x6a')](_0x4402('0x6b'),'phone')[_0x4402('0x6a')](_0x4402('0x6c'),_0x4402('0x66'))[_0x4402('0x6a')]('id',_0x4402('0x67'))[_0x4402('0x6a')](_0x12569b[_0x4402('0x77')][_0x4402('0x6d')](),_0x4402('0x68'))['field'](_0x4b999c[_0x4402('0x3e')]['id']['toString'](),_0x4402('0x52'))[_0x4402('0x6a')]('\x27'+_0x50d453+'\x27',_0x4402('0x4b'))[_0x4402('0x6a')]('\x27'+_0x50d453+'\x27',_0x4402('0x4c'))[_0x4402('0x74')](_0x4402('0x6e'))[_0x4402('0x35')](_0x4402('0x6f'))['where'](_0x4402('0x70'),_0x12569b['CmListId'][_0x4402('0x6d')]())[_0x4402('0x35')](_0x4402('0x71'))[_0x4402('0x35')](_0x4402('0x72'),squel[_0x4402('0x69')]()['field'](_0x4402('0x76'))['from'](_0x4402('0x64'))['where'](_0x4402('0x78'),_0x4b999c[_0x4402('0x3e')]['id'][_0x4402('0x6d')]())))[_0x4402('0x6d')]();break;default:_0x224182=squel[_0x4402('0x62')]()[_0x4402('0x63')](_0x4402('0x64'))[_0x4402('0x65')]([_0x4402('0x6b'),'scheduledAt',_0x4402('0x67'),'ListId','CampaignId','createdAt',_0x4402('0x4c')],squel[_0x4402('0x69')]()[_0x4402('0x6a')]('phone',_0x4402('0x6b'))[_0x4402('0x6a')](_0x4402('0x6c'),_0x4402('0x66'))[_0x4402('0x6a')]('id',_0x4402('0x67'))[_0x4402('0x6a')](_0x12569b[_0x4402('0x77')][_0x4402('0x6d')](),_0x4402('0x68'))[_0x4402('0x6a')](_0x4b999c['params']['id']['toString'](),_0x4402('0x52'))[_0x4402('0x6a')]('\x27'+_0x50d453+'\x27',_0x4402('0x4b'))[_0x4402('0x6a')]('\x27'+_0x50d453+'\x27',_0x4402('0x4c'))['from']('cm_contacts')[_0x4402('0x35')](_0x4402('0x6f'))[_0x4402('0x35')](_0x4402('0x70'),_0x12569b[_0x4402('0x77')][_0x4402('0x6d')]())[_0x4402('0x35')](_0x4402('0x71')))[_0x4402('0x6d')]();}_0x1237a3=squel[_0x4402('0x62')]()[_0x4402('0x63')](_0x4402('0x79'))[_0x4402('0x65')]([_0x4402('0x7a'),_0x4402('0x66'),_0x4402('0x6b'),_0x4402('0x7b'),_0x4402('0x4b'),_0x4402('0x4c')],squel[_0x4402('0x69')]()[_0x4402('0x6a')](_0x4402('0x7c'),'id')[_0x4402('0x6a')](_0x4402('0x6c'),_0x4402('0x66'))[_0x4402('0x6a')]('ci.item',_0x4402('0x6b'))[_0x4402('0x6a')](_0x4402('0x7d'),_0x4402('0x7b'))[_0x4402('0x6a')]('\x27'+_0x50d453+'\x27',_0x4402('0x4b'))[_0x4402('0x6a')]('\x27'+_0x50d453+'\x27',_0x4402('0x4c'))[_0x4402('0x74')]('cm_contact_has_items','ci')[_0x4402('0x7e')](_0x4402('0x64'),'h',_0x4402('0x7f'))[_0x4402('0x35')](_0x4402('0x80'),_0x12569b[_0x4402('0x77')][_0x4402('0x6d')]())[_0x4402('0x35')](_0x4402('0x81'),_0x4b999c['params']['id'][_0x4402('0x6d')]())[_0x4402('0x35')](_0x4402('0x82'),_0x50d453))[_0x4402('0x6d')]();_0x364423[_0x4402('0x83')](db[_0x4402('0x84')][_0x4402('0x2c')](_0x224182));_0x559802['push'](db[_0x4402('0x84')][_0x4402('0x2c')](_0x1237a3));}return BPromise['all'](_0x364423);}})[_0x4402('0x1f')](function(){return BPromise[_0x4402('0x85')](_0x559802);})[_0x4402('0x1f')](function(){return _0x2bc5a3;})[_0x4402('0x1f')](respondWithResult(_0x135fac,null))[_0x4402('0x3c')](handleError(_0x135fac,null));};exports[_0x4402('0x86')]=function(_0x2433a1,_0x4069cf,_0x7be513){return db[_0x4402('0x28')][_0x4402('0x42')]({'where':{'id':_0x2433a1[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x4069cf,null))[_0x4402('0x1f')](function(_0x1f2219){if(_0x1f2219){return _0x1f2219[_0x4402('0x86')](_0x2433a1[_0x4402('0x2c')][_0x4402('0x5e')]);}})[_0x4402('0x1f')](function(_0x2ecd1f){if(_0x2ecd1f){return db[_0x4402('0x50')][_0x4402('0x20')]({'where':{'ListId':_0x2433a1[_0x4402('0x2c')][_0x4402('0x5e')],'CampaignId':_0x2433a1[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](function(){return _0x2ecd1f;});}})[_0x4402('0x1f')](respondWithStatusCode(_0x4069cf,null))[_0x4402('0x3c')](handleError(_0x4069cf,null));};exports[_0x4402('0x87')]=function(_0x3f7f24,_0x24797a,_0x544a09){var _0x3ae530={};var _0x55efac={};var _0x53c06a;var _0x404464;return db[_0x4402('0x28')][_0x4402('0x4f')]({'where':{'id':_0x3f7f24[_0x4402('0x3e')]['id']}})[_0x4402('0x1f')](handleEntityNotFound(_0x24797a,null))['then'](function(_0x2b5efe){if(_0x2b5efe){_0x53c06a=_0x2b5efe;_0x55efac[_0x4402('0x2b')]=_[_0x4402('0x2d')](db['CmList'][_0x4402('0x29')]);_0x55efac[_0x4402('0x2c')]=_[_0x4402('0x2d')](_0x3f7f24[_0x4402('0x2c')]);_0x55efac['filters']=_[_0x4402('0x3f')](_0x55efac[_0x4402('0x2b')],_0x55efac['query']);_0x3ae530['attributes']=_['intersection'](_0x55efac['model'],qs[_0x4402('0x30')](_0x3f7f24[_0x4402('0x2c')][_0x4402('0x30')]));_0x3ae530['attributes']=_0x3ae530[_0x4402('0x2f')][_0x4402('0x31')]?_0x3ae530[_0x4402('0x2f')]:_0x55efac['model'];_0x3ae530[_0x4402('0x51')]=qs[_0x4402('0x34')](_0x3f7f24[_0x4402('0x2c')][_0x4402('0x34')]);_0x3ae530[_0x4402('0x35')]=qs[_0x4402('0x2e')](_['pick'](_0x3f7f24[_0x4402('0x2c')],_0x55efac[_0x4402('0x2e')]));if(_0x3f7f24[_0x4402('0x2c')][_0x4402('0x36')]){_0x3ae530['where']=_[_0x4402('0x38')](_0x3ae530['where'],{'$or':_[_0x4402('0x27')](_0x3ae530['attributes'],function(_0x57bce0){var _0x4331a9={};_0x4331a9[_0x57bce0]={'$like':'%'+_0x3f7f24[_0x4402('0x2c')][_0x4402('0x36')]+'%'};return _0x4331a9;})});}_0x3ae530=_[_0x4402('0x38')]({},_0x3ae530,_0x3f7f24[_0x4402('0x41')]);return _0x53c06a[_0x4402('0x87')](_0x3ae530);}})[_0x4402('0x1f')](function(_0x87e1c){if(_0x87e1c){_0x404464=_0x87e1c['length'];if(!_0x3f7f24[_0x4402('0x2c')][_0x4402('0x32')](_0x4402('0x33'))){_0x3ae530[_0x4402('0x19')]=qs[_0x4402('0x19')](_0x3f7f24['query'][_0x4402('0x19')]);_0x3ae530['offset']=qs[_0x4402('0x17')](_0x3f7f24[_0x4402('0x2c')][_0x4402('0x17')]);}return _0x53c06a['getBlackLists'](_0x3ae530);}})[_0x4402('0x1f')](function(_0x284292){if(_0x284292){return _0x284292?{'count':_0x404464,'rows':_0x284292}:null;}})['then'](respondWithResult(_0x24797a,null))[_0x4402('0x3c')](handleError(_0x24797a,null));};exports[_0x4402('0x88')]=function(_0x1ad7ff,_0x19993b,_0x241a20){var _0x460e17,_0x44b691;var _0xe8f398=[];var _0x1e625b=moment()[_0x4402('0x5c')](_0x4402('0x5d'));return db[_0x4402('0x28')][_0x4402('0x42')]({'where':{'id':_0x1ad7ff[_0x4402('0x3e')]['id']}})['then'](handleEntityNotFound(_0x19993b,null))[_0x4402('0x1f')](function(_0x1223ad){if(_0x1223ad){_0x44b691=_0x1223ad;return _0x1223ad[_0x4402('0x88')](_0x1ad7ff[_0x4402('0x44')][_0x4402('0x5e')],_[_0x4402('0x4a')](_0x1ad7ff[_0x4402('0x44')],[_0x4402('0x5e'),'id'])||{});}return null;})['spread'](function(_0x319331){var _0x268d01;var _0x45080b;_0x460e17=_0x319331||[];var _0x4ff63e=[];if(_0x319331){for(var _0x48121f=0x0;_0x48121f<_0x319331[_0x4402('0x31')];_0x48121f+=0x1){var _0x114ee0=_0x319331[_0x48121f][_0x4402('0x21')]({'plain':!![]});_0x268d01=squel[_0x4402('0x62')]()[_0x4402('0x63')](_0x4402('0x89'))['fromQuery'](['phone',_0x4402('0x67'),_0x4402('0x68'),_0x4402('0x52'),_0x4402('0x4b'),_0x4402('0x4c')],squel['select']()[_0x4402('0x6a')](_0x4402('0x6b'),_0x4402('0x6b'))['field']('id',_0x4402('0x67'))['field'](_0x114ee0[_0x4402('0x77')][_0x4402('0x6d')](),_0x4402('0x68'))[_0x4402('0x6a')](_0x1ad7ff['params']['id'][_0x4402('0x6d')](),_0x4402('0x52'))[_0x4402('0x6a')](_0x4402('0x6c'),_0x4402('0x4b'))[_0x4402('0x6a')](_0x4402('0x6c'),'updatedAt')['from'](_0x4402('0x6e'))[_0x4402('0x35')](_0x4402('0x6f'))['where'](_0x4402('0x70'),_0x114ee0[_0x4402('0x77')][_0x4402('0x6d')]())['where'](_0x4402('0x71')))['toString']();_0x4ff63e[_0x4402('0x83')](db[_0x4402('0x84')][_0x4402('0x2c')](_0x268d01));}return BPromise['all'](_0x4ff63e);}})[_0x4402('0x1f')](function(){return _0x460e17;})[_0x4402('0x1f')](respondWithResult(_0x19993b,null))['catch'](handleError(_0x19993b,null));};exports['removeBlackLists']=function(_0x4bd840,_0x4b64a3,_0x1815d7){return db['Campaign']['find']({'where':{'id':_0x4bd840[_0x4402('0x3e')]['id']}})['then'](handleEntityNotFound(_0x4b64a3,null))[_0x4402('0x1f')](function(_0x27c329){if(_0x27c329){return _0x27c329['removeBlackLists'](_0x4bd840[_0x4402('0x2c')][_0x4402('0x5e')]);}})[_0x4402('0x1f')](function(_0x5ebf6d){if(_0x5ebf6d){return db[_0x4402('0x59')]['destroy']({'where':{'ListId':_0x4bd840['query'][_0x4402('0x5e')],'CampaignId':_0x4bd840['params']['id']}})[_0x4402('0x1f')](function(){return _0x5ebf6d;});}})['then'](respondWithStatusCode(_0x4b64a3,null))[_0x4402('0x3c')](handleError(_0x4b64a3,null));};
\ No newline at end of file
+var _0x3276=['hasOwnProperty','CampaignId','CmHopper','getHopperHistories','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','CmList','addLists','format','ids','spread','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ListId','field','NOW()','CmListId','toString','from','cm_contacts','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','CampaignId\x20=\x20?','select','onlyIfOpen','ContactId','deletedAt\x20IS\x20NULL','cm_hopper_additional_phones','OrderBy','ci.OrderBY','cm_contact_has_items','join','h.ListId\x20=\x20?','h.CampaignId=?','h.createdAt\x20=\x20?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','ListId\x20=\x20?','removeBlackLists','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','IvrCampaigns','error','stack','name','send','Campaign','rawAttributes','fieldName','key','query','keys','intersection','model','attributes','fields','length','nolimit','order','sort','pick','filters','filter','merge','where','map','type','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','omit','updatedAt','createdAt','getHoppers','findOne'];(function(_0x408758,_0x548c1f){var _0x2e25ae=function(_0x48ae5d){while(--_0x48ae5d){_0x408758['push'](_0x408758['shift']());}};_0x2e25ae(++_0x548c1f);}(_0x3276,0xc7));var _0x6327=function(_0x422f60,_0x377c70){_0x422f60=_0x422f60-0x0;var _0x141c68=_0x3276[_0x422f60];return _0x141c68;};'use strict';var emlformat=require(_0x6327('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x6327('0x1'));var rp=require(_0x6327('0x2'));var moment=require(_0x6327('0x3'));var BPromise=require(_0x6327('0x4'));var Mustache=require(_0x6327('0x5'));var util=require(_0x6327('0x6'));var path=require(_0x6327('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6327('0x8'));var fs=require('fs');var fs_extra=require(_0x6327('0x9'));var _=require(_0x6327('0xa'));var squel=require('squel');var crypto=require(_0x6327('0xb'));var jsforce=require(_0x6327('0xc'));var deskjs=require(_0x6327('0xd'));var toCsv=require(_0x6327('0xe'));var querystring=require('querystring');var Papa=require(_0x6327('0xf'));var Redis=require(_0x6327('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x6327('0x11'));var as=require(_0x6327('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6327('0x13'))(_0x6327('0x14'));var utils=require(_0x6327('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x6327('0x16'));var db=require(_0x6327('0x17'))['db'];function respondWithStatusCode(_0xb6de72,_0x32408c){_0x32408c=_0x32408c||0xcc;return function(_0x3ff61b){if(_0x3ff61b){return _0xb6de72[_0x6327('0x18')](_0x32408c);}return _0xb6de72[_0x6327('0x19')](_0x32408c)[_0x6327('0x1a')]();};}function respondWithResult(_0x576b1c,_0x306095){_0x306095=_0x306095||0xc8;return function(_0x48eb75){if(_0x48eb75){return _0x576b1c[_0x6327('0x19')](_0x306095)['json'](_0x48eb75);}};}function respondWithFilteredResult(_0x441ff9,_0x1e850c){return function(_0x43186f){if(_0x43186f){var _0x4e9741=typeof _0x1e850c[_0x6327('0x1b')]===_0x6327('0x1c')&&typeof _0x1e850c[_0x6327('0x1d')]===_0x6327('0x1c');var _0x3ea016=_0x43186f[_0x6327('0x1e')];var _0x341a51=_0x4e9741?0x0:_0x1e850c[_0x6327('0x1b')];var _0x287899=_0x4e9741?_0x43186f[_0x6327('0x1e')]:_0x1e850c[_0x6327('0x1b')]+_0x1e850c[_0x6327('0x1d')];var _0x55cf65;if(_0x287899>=_0x3ea016){_0x287899=_0x3ea016;_0x55cf65=0xc8;}else{_0x55cf65=0xce;}_0x441ff9[_0x6327('0x19')](_0x55cf65);return _0x441ff9[_0x6327('0x1f')](_0x6327('0x20'),_0x341a51+'-'+_0x287899+'/'+_0x3ea016)[_0x6327('0x21')](_0x43186f);}return null;};}function patchUpdates(_0x4cbc80){return function(_0x56249b){try{jsonpatch[_0x6327('0x22')](_0x56249b,_0x4cbc80,!![]);}catch(_0x700766){return BPromise[_0x6327('0x23')](_0x700766);}return _0x56249b[_0x6327('0x24')]();};}function saveUpdates(_0x3078c5,_0x76c718){return function(_0x5754e1){if(_0x5754e1){return _0x5754e1[_0x6327('0x25')](_0x3078c5)[_0x6327('0x26')](function(_0x2f153c){return _0x2f153c;});}return null;};}function removeEntity(_0x1c3d7f,_0x302b3f){return function(_0x254c2f){if(_0x254c2f){return _0x254c2f[_0x6327('0x27')]()[_0x6327('0x26')](function(){var _0x10e312=_0x254c2f['get']({'plain':!![]});var _0x51dbe9=_0x6327('0x28');return db['UserProfileResource'][_0x6327('0x27')]({'where':{'type':_0x51dbe9,'resourceId':_0x10e312['id']}})['then'](function(){return _0x254c2f;});})[_0x6327('0x26')](function(){_0x1c3d7f['status'](0xcc)[_0x6327('0x1a')]();});}};}function handleEntityNotFound(_0x1eae65,_0x486f8e){return function(_0x44caac){if(!_0x44caac){_0x1eae65[_0x6327('0x18')](0x194);}return _0x44caac;};}function handleError(_0x14b41b,_0x2540bf){_0x2540bf=_0x2540bf||0x1f4;return function(_0x894157){logger[_0x6327('0x29')](_0x894157[_0x6327('0x2a')]);if(_0x894157[_0x6327('0x2b')]){delete _0x894157['name'];}_0x14b41b[_0x6327('0x19')](_0x2540bf)[_0x6327('0x2c')](_0x894157);};}exports['index']=function(_0x269c33,_0x40e927){var _0x5e8ff5={},_0x43bcd0={},_0x41ecd5={'count':0x0,'rows':[]};var _0x330471=_['map'](db[_0x6327('0x2d')][_0x6327('0x2e')],function(_0x1066d9){return{'name':_0x1066d9[_0x6327('0x2f')],'type':_0x1066d9['type'][_0x6327('0x30')]};});_0x43bcd0['model']=_['map'](_0x330471,_0x6327('0x2b'));_0x43bcd0[_0x6327('0x31')]=_[_0x6327('0x32')](_0x269c33[_0x6327('0x31')]);_0x43bcd0['filters']=_[_0x6327('0x33')](_0x43bcd0[_0x6327('0x34')],_0x43bcd0[_0x6327('0x31')]);_0x5e8ff5[_0x6327('0x35')]=_['intersection'](_0x43bcd0[_0x6327('0x34')],qs[_0x6327('0x36')](_0x269c33[_0x6327('0x31')]['fields']));_0x5e8ff5[_0x6327('0x35')]=_0x5e8ff5[_0x6327('0x35')][_0x6327('0x37')]?_0x5e8ff5['attributes']:_0x43bcd0['model'];if(!_0x269c33[_0x6327('0x31')]['hasOwnProperty'](_0x6327('0x38'))){_0x5e8ff5['limit']=qs[_0x6327('0x1d')](_0x269c33[_0x6327('0x31')][_0x6327('0x1d')]);_0x5e8ff5[_0x6327('0x1b')]=qs[_0x6327('0x1b')](_0x269c33[_0x6327('0x31')]['offset']);}_0x5e8ff5[_0x6327('0x39')]=qs[_0x6327('0x3a')](_0x269c33[_0x6327('0x31')][_0x6327('0x3a')]);_0x5e8ff5['where']=qs['filters'](_[_0x6327('0x3b')](_0x269c33[_0x6327('0x31')],_0x43bcd0[_0x6327('0x3c')]),_0x330471);if(_0x269c33[_0x6327('0x31')][_0x6327('0x3d')]){_0x5e8ff5['where']=_[_0x6327('0x3e')](_0x5e8ff5[_0x6327('0x3f')],{'$or':_[_0x6327('0x40')](_0x330471,function(_0x10b988){if(_0x10b988[_0x6327('0x41')]!=='VIRTUAL'){var _0x49a887={};_0x49a887[_0x10b988[_0x6327('0x2b')]]={'$like':'%'+_0x269c33['query'][_0x6327('0x3d')]+'%'};return _0x49a887;}})});}_0x5e8ff5=_[_0x6327('0x3e')]({},_0x5e8ff5,_0x269c33[_0x6327('0x42')]);var _0x46b813={'where':_0x5e8ff5['where']};return db[_0x6327('0x2d')][_0x6327('0x1e')](_0x46b813)[_0x6327('0x26')](function(_0x592f0e){_0x41ecd5[_0x6327('0x1e')]=_0x592f0e;if(_0x269c33[_0x6327('0x31')]['includeAll']){_0x5e8ff5[_0x6327('0x43')]=[{'all':!![]}];}return db[_0x6327('0x2d')][_0x6327('0x44')](_0x5e8ff5);})[_0x6327('0x26')](function(_0xab88fb){_0x41ecd5[_0x6327('0x45')]=_0xab88fb;return _0x41ecd5;})[_0x6327('0x26')](respondWithFilteredResult(_0x40e927,_0x5e8ff5))[_0x6327('0x46')](handleError(_0x40e927,null));};exports[_0x6327('0x47')]=function(_0xc73e4a,_0x446f7c){var _0x3550c9={'raw':![],'where':{'id':_0xc73e4a[_0x6327('0x48')]['id']}},_0x115ed4={};_0x115ed4[_0x6327('0x34')]=_[_0x6327('0x32')](db[_0x6327('0x2d')][_0x6327('0x2e')]);_0x115ed4['query']=_[_0x6327('0x32')](_0xc73e4a[_0x6327('0x31')]);_0x115ed4['filters']=_['intersection'](_0x115ed4['model'],_0x115ed4[_0x6327('0x31')]);_0x3550c9[_0x6327('0x35')]=_['intersection'](_0x115ed4[_0x6327('0x34')],qs[_0x6327('0x36')](_0xc73e4a[_0x6327('0x31')][_0x6327('0x36')]));_0x3550c9[_0x6327('0x35')]=_0x3550c9[_0x6327('0x35')][_0x6327('0x37')]?_0x3550c9[_0x6327('0x35')]:_0x115ed4[_0x6327('0x34')];if(_0xc73e4a['query'][_0x6327('0x49')]){_0x3550c9[_0x6327('0x43')]=[{'all':!![]}];}_0x3550c9=_[_0x6327('0x3e')]({},_0x3550c9,_0xc73e4a['options']);return db[_0x6327('0x2d')][_0x6327('0x4a')](_0x3550c9)[_0x6327('0x26')](handleEntityNotFound(_0x446f7c,null))[_0x6327('0x26')](respondWithResult(_0x446f7c,null))['catch'](handleError(_0x446f7c,null));};exports[_0x6327('0x4b')]=function(_0x317edf,_0x3fc622){return db[_0x6327('0x2d')][_0x6327('0x4b')](_0x317edf[_0x6327('0x4c')],{})[_0x6327('0x26')](function(_0x33e8d3){var _0x11030e=_0x317edf[_0x6327('0x4d')][_0x6327('0x4e')]({'plain':!![]});if(!_0x11030e)throw new Error(_0x6327('0x4f'));if(_0x11030e[_0x6327('0x50')]===_0x6327('0x4d')){var _0x5e664d=_0x33e8d3['get']({'plain':!![]});var _0x1f95b6=_0x6327('0x28');return db[_0x6327('0x51')][_0x6327('0x4a')]({'where':{'name':_0x1f95b6,'userProfileId':_0x11030e[_0x6327('0x52')]},'raw':!![]})[_0x6327('0x26')](function(_0xc07c32){if(_0xc07c32&&_0xc07c32[_0x6327('0x53')]===0x0){return db[_0x6327('0x54')][_0x6327('0x4b')]({'name':_0x5e664d[_0x6327('0x2b')],'resourceId':_0x5e664d['id'],'type':_0xc07c32[_0x6327('0x2b')],'sectionId':_0xc07c32['id']},{})[_0x6327('0x26')](function(){return _0x33e8d3;});}else{return _0x33e8d3;}})[_0x6327('0x46')](function(_0x5daaed){logger[_0x6327('0x29')](_0x6327('0x55'),_0x5daaed);throw _0x5daaed;});}return _0x33e8d3;})[_0x6327('0x26')](respondWithResult(_0x3fc622,0xc9))[_0x6327('0x46')](handleError(_0x3fc622,null));};exports['clone']=function(_0x3e2b4f,_0x2ad46b){var _0x12862d={'where':{'id':_0x3e2b4f[_0x6327('0x48')]['id']}},_0x1bf90e={};_0x1bf90e['model']=_[_0x6327('0x32')](db['Campaign'][_0x6327('0x2e')]);_0x12862d[_0x6327('0x35')]=_[_0x6327('0x33')](_0x1bf90e[_0x6327('0x34')],qs[_0x6327('0x36')](_0x3e2b4f[_0x6327('0x31')]['fields']));_0x12862d[_0x6327('0x35')]=_0x12862d[_0x6327('0x35')]['length']?_0x12862d[_0x6327('0x35')]:_0x1bf90e[_0x6327('0x34')];if(_0x3e2b4f[_0x6327('0x31')][_0x6327('0x49')]){_0x12862d[_0x6327('0x43')]=[{'all':!![]}];}_0x12862d=_[_0x6327('0x3e')]({},_0x12862d,_0x3e2b4f[_0x6327('0x42')]);return db[_0x6327('0x2d')]['find'](_0x12862d)[_0x6327('0x26')](handleEntityNotFound(_0x2ad46b,null))[_0x6327('0x26')](function(_0x46c6bd){if(_0x46c6bd){var _0x2188c2=_0x46c6bd[_0x6327('0x4e')]({'plain':!![]});_0x2188c2=qs[_0x6327('0x56')](_0x2188c2,['id','createdAt',_0x6327('0x57')]);_0x3e2b4f['body']=_[_0x6327('0x56')](_0x3e2b4f[_0x6327('0x4c')],['id',_0x6327('0x58'),_0x6327('0x57')]);return db[_0x6327('0x2d')][_0x6327('0x4b')](_[_0x6327('0x3e')](_0x2188c2,_0x3e2b4f[_0x6327('0x4c')]),{'include':_0x3e2b4f[_0x6327('0x31')][_0x6327('0x49')]?[{'all':!![]}]:undefined})[_0x6327('0x26')](function(_0x36f28a){var _0x3f0115=_0x3e2b4f['user'][_0x6327('0x4e')]({'plain':!![]});if(!_0x3f0115)throw new Error(_0x6327('0x4f'));if(_0x3f0115[_0x6327('0x50')]==='user'){var _0xbf5d09=_0x36f28a[_0x6327('0x4e')]({'plain':!![]});var _0x57ca83='IvrCampaigns';return db['UserProfileSection']['find']({'where':{'name':_0x57ca83,'userProfileId':_0x3f0115[_0x6327('0x52')]},'raw':!![]})[_0x6327('0x26')](function(_0x36f8c2){if(_0x36f8c2&&_0x36f8c2[_0x6327('0x53')]===0x0){return db[_0x6327('0x54')]['create']({'name':_0xbf5d09['name'],'resourceId':_0xbf5d09['id'],'type':_0x36f8c2[_0x6327('0x2b')],'sectionId':_0x36f8c2['id']},{})[_0x6327('0x26')](function(){return _0x36f28a;});}else{return _0x36f28a;}})['catch'](function(_0x28f13e){logger[_0x6327('0x29')](_0x6327('0x55'),_0x28f13e);throw _0x28f13e;});}return _0x36f28a;});}})[_0x6327('0x26')](respondWithResult(_0x2ad46b,0xc9))[_0x6327('0x46')](handleError(_0x2ad46b,null));};exports[_0x6327('0x25')]=function(_0x4b4031,_0x5446db){if(_0x4b4031['body']['id']){delete _0x4b4031[_0x6327('0x4c')]['id'];}return db[_0x6327('0x2d')]['find']({'where':{'id':_0x4b4031['params']['id']}})['then'](handleEntityNotFound(_0x5446db,null))[_0x6327('0x26')](saveUpdates(_0x4b4031[_0x6327('0x4c')],null))[_0x6327('0x26')](respondWithResult(_0x5446db,null))[_0x6327('0x46')](handleError(_0x5446db,null));};exports['destroy']=function(_0x3e66b5,_0x276fe1){return db[_0x6327('0x2d')]['find']({'where':{'id':_0x3e66b5['params']['id']}})['then'](handleEntityNotFound(_0x276fe1,null))[_0x6327('0x26')](removeEntity(_0x276fe1,null))[_0x6327('0x46')](handleError(_0x276fe1,null));};exports[_0x6327('0x59')]=function(_0x4c9e12,_0x513e06,_0x54326a){var _0x17b571={'raw':!![],'where':{}};var _0x5bbc4a={};var _0x1e2376={'count':0x0,'rows':[]};return db['Campaign'][_0x6327('0x5a')]({'where':{'id':_0x4c9e12[_0x6327('0x48')]['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x513e06,null))['then'](function(_0x4bdeab){if(_0x4bdeab){_0x5bbc4a[_0x6327('0x34')]=_[_0x6327('0x32')](db['CmHopper'][_0x6327('0x2e')]);_0x5bbc4a[_0x6327('0x31')]=_[_0x6327('0x32')](_0x4c9e12['query']);_0x5bbc4a[_0x6327('0x3c')]=_['intersection'](_0x5bbc4a[_0x6327('0x34')],_0x5bbc4a[_0x6327('0x31')]);_0x17b571[_0x6327('0x35')]=_[_0x6327('0x33')](_0x5bbc4a[_0x6327('0x34')],qs[_0x6327('0x36')](_0x4c9e12[_0x6327('0x31')][_0x6327('0x36')]));_0x17b571['attributes']=_0x17b571[_0x6327('0x35')][_0x6327('0x37')]?_0x17b571[_0x6327('0x35')]:_0x5bbc4a[_0x6327('0x34')];if(!_0x4c9e12['query'][_0x6327('0x5b')](_0x6327('0x38'))){_0x17b571[_0x6327('0x1d')]=qs[_0x6327('0x1d')](_0x4c9e12['query'][_0x6327('0x1d')]);_0x17b571[_0x6327('0x1b')]=qs['offset'](_0x4c9e12[_0x6327('0x31')][_0x6327('0x1b')]);}_0x17b571['order']=qs[_0x6327('0x3a')](_0x4c9e12['query'][_0x6327('0x3a')]);_0x17b571[_0x6327('0x3f')]=qs[_0x6327('0x3c')](_['pick'](_0x4c9e12[_0x6327('0x31')],_0x5bbc4a['filters']));_0x17b571['where'][_0x6327('0x5c')]=_0x4bdeab['id'];if(_0x4c9e12['query'][_0x6327('0x3d')]){_0x17b571[_0x6327('0x3f')]=_[_0x6327('0x3e')](_0x17b571[_0x6327('0x3f')],{'$or':_[_0x6327('0x40')](_0x17b571[_0x6327('0x35')],function(_0x1b3a5e){var _0x29ee0f={};_0x29ee0f[_0x1b3a5e]={'$like':'%'+_0x4c9e12[_0x6327('0x31')][_0x6327('0x3d')]+'%'};return _0x29ee0f;})});}_0x17b571=_['merge']({},_0x17b571,_0x4c9e12[_0x6327('0x42')]);return db[_0x6327('0x5d')][_0x6327('0x1e')]({'where':_0x17b571['where']})['then'](function(_0x55645d){_0x1e2376['count']=_0x55645d;if(_0x4c9e12[_0x6327('0x31')][_0x6327('0x49')]){_0x17b571[_0x6327('0x43')]=[{'all':!![]}];}return db['CmHopper']['findAll'](_0x17b571);})[_0x6327('0x26')](function(_0x45bc3d){_0x1e2376[_0x6327('0x45')]=_0x45bc3d;return _0x1e2376;});}})[_0x6327('0x26')](respondWithFilteredResult(_0x513e06,_0x17b571))['catch'](handleError(_0x513e06,null));};exports[_0x6327('0x5e')]=function(_0x7d3f15,_0x4346b8,_0x3973dd){var _0x188557={'raw':!![],'where':{}};var _0x33b36f={};var _0x3ecb75={'count':0x0,'rows':[]};return db['Campaign'][_0x6327('0x5a')]({'where':{'id':_0x7d3f15['params']['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x4346b8,null))[_0x6327('0x26')](function(_0x101a46){if(_0x101a46){_0x33b36f['model']=_[_0x6327('0x32')](db[_0x6327('0x5f')][_0x6327('0x2e')]);_0x33b36f[_0x6327('0x31')]=_[_0x6327('0x32')](_0x7d3f15['query']);_0x33b36f['filters']=_[_0x6327('0x33')](_0x33b36f[_0x6327('0x34')],_0x33b36f[_0x6327('0x31')]);_0x188557['attributes']=_[_0x6327('0x33')](_0x33b36f[_0x6327('0x34')],qs[_0x6327('0x36')](_0x7d3f15[_0x6327('0x31')]['fields']));_0x188557['attributes']=_0x188557[_0x6327('0x35')][_0x6327('0x37')]?_0x188557['attributes']:_0x33b36f['model'];if(!_0x7d3f15[_0x6327('0x31')][_0x6327('0x5b')](_0x6327('0x38'))){_0x188557[_0x6327('0x1d')]=qs[_0x6327('0x1d')](_0x7d3f15[_0x6327('0x31')][_0x6327('0x1d')]);_0x188557[_0x6327('0x1b')]=qs['offset'](_0x7d3f15['query'][_0x6327('0x1b')]);}_0x188557[_0x6327('0x39')]=qs[_0x6327('0x3a')](_0x7d3f15['query']['sort']);_0x188557['where']=qs[_0x6327('0x3c')](_['pick'](_0x7d3f15[_0x6327('0x31')],_0x33b36f['filters']));_0x188557['where']['CampaignId']=_0x101a46['id'];if(_0x7d3f15[_0x6327('0x31')]['filter']){_0x188557[_0x6327('0x3f')]=_[_0x6327('0x3e')](_0x188557[_0x6327('0x3f')],{'$or':_[_0x6327('0x40')](_0x188557['attributes'],function(_0x2936da){var _0x5e721b={};_0x5e721b[_0x2936da]={'$like':'%'+_0x7d3f15[_0x6327('0x31')][_0x6327('0x3d')]+'%'};return _0x5e721b;})});}_0x188557=_[_0x6327('0x3e')]({},_0x188557,_0x7d3f15[_0x6327('0x42')]);return db[_0x6327('0x5f')][_0x6327('0x1e')]({'where':_0x188557[_0x6327('0x3f')]})[_0x6327('0x26')](function(_0x52b63f){_0x3ecb75['count']=_0x52b63f;if(_0x7d3f15[_0x6327('0x31')][_0x6327('0x49')]){_0x188557[_0x6327('0x43')]=[{'all':!![]}];}return db[_0x6327('0x5f')][_0x6327('0x44')](_0x188557);})[_0x6327('0x26')](function(_0x561b1a){_0x3ecb75[_0x6327('0x45')]=_0x561b1a;return _0x3ecb75;});}})[_0x6327('0x26')](respondWithFilteredResult(_0x4346b8,_0x188557))[_0x6327('0x46')](handleError(_0x4346b8,null));};exports['getHopperFinals']=function(_0x59a5cc,_0x15a1dc,_0x424e54){var _0x35477c={'raw':!![],'where':{}};var _0x1193c5={};var _0x12726d={'count':0x0,'rows':[]};return db[_0x6327('0x2d')]['findOne']({'where':{'id':_0x59a5cc[_0x6327('0x48')]['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x15a1dc,null))[_0x6327('0x26')](function(_0x40019b){if(_0x40019b){_0x1193c5[_0x6327('0x34')]=_[_0x6327('0x32')](db[_0x6327('0x60')]['rawAttributes']);_0x1193c5[_0x6327('0x31')]=_[_0x6327('0x32')](_0x59a5cc[_0x6327('0x31')]);_0x1193c5[_0x6327('0x3c')]=_[_0x6327('0x33')](_0x1193c5['model'],_0x1193c5['query']);_0x35477c[_0x6327('0x35')]=_[_0x6327('0x33')](_0x1193c5[_0x6327('0x34')],qs[_0x6327('0x36')](_0x59a5cc[_0x6327('0x31')][_0x6327('0x36')]));_0x35477c['attributes']=_0x35477c[_0x6327('0x35')][_0x6327('0x37')]?_0x35477c[_0x6327('0x35')]:_0x1193c5['model'];if(!_0x59a5cc[_0x6327('0x31')][_0x6327('0x5b')](_0x6327('0x38'))){_0x35477c[_0x6327('0x1d')]=qs['limit'](_0x59a5cc[_0x6327('0x31')][_0x6327('0x1d')]);_0x35477c[_0x6327('0x1b')]=qs[_0x6327('0x1b')](_0x59a5cc[_0x6327('0x31')][_0x6327('0x1b')]);}_0x35477c[_0x6327('0x39')]=qs[_0x6327('0x3a')](_0x59a5cc[_0x6327('0x31')]['sort']);_0x35477c[_0x6327('0x3f')]=qs['filters'](_[_0x6327('0x3b')](_0x59a5cc[_0x6327('0x31')],_0x1193c5['filters']));_0x35477c[_0x6327('0x3f')]['CampaignId']=_0x40019b['id'];if(_0x59a5cc[_0x6327('0x31')]['filter']){_0x35477c[_0x6327('0x3f')]=_['merge'](_0x35477c[_0x6327('0x3f')],{'$or':_['map'](_0x35477c[_0x6327('0x35')],function(_0xb46760){var _0x173560={};_0x173560[_0xb46760]={'$like':'%'+_0x59a5cc['query']['filter']+'%'};return _0x173560;})});}_0x35477c=_[_0x6327('0x3e')]({},_0x35477c,_0x59a5cc[_0x6327('0x42')]);return db['CmHopperFinal'][_0x6327('0x1e')]({'where':_0x35477c[_0x6327('0x3f')]})[_0x6327('0x26')](function(_0x5d6a16){_0x12726d[_0x6327('0x1e')]=_0x5d6a16;if(_0x59a5cc[_0x6327('0x31')]['includeAll']){_0x35477c['include']=[{'all':!![]}];}return db[_0x6327('0x60')][_0x6327('0x44')](_0x35477c);})[_0x6327('0x26')](function(_0x3f23c4){_0x12726d['rows']=_0x3f23c4;return _0x12726d;});}})[_0x6327('0x26')](respondWithFilteredResult(_0x15a1dc,_0x35477c))[_0x6327('0x46')](handleError(_0x15a1dc,null));};exports[_0x6327('0x61')]=function(_0x48645b,_0xf25a85,_0x18cba6){var _0x6c8c4c={'raw':!![],'where':{}};var _0x1b6b96={};var _0x254fdc={'count':0x0,'rows':[]};return db[_0x6327('0x2d')][_0x6327('0x5a')]({'where':{'id':_0x48645b[_0x6327('0x48')]['id']}})[_0x6327('0x26')](handleEntityNotFound(_0xf25a85,null))[_0x6327('0x26')](function(_0x43eae1){if(_0x43eae1){_0x1b6b96['model']=_[_0x6327('0x32')](db['CmHopperBlack'][_0x6327('0x2e')]);_0x1b6b96[_0x6327('0x31')]=_[_0x6327('0x32')](_0x48645b[_0x6327('0x31')]);_0x1b6b96[_0x6327('0x3c')]=_['intersection'](_0x1b6b96[_0x6327('0x34')],_0x1b6b96['query']);_0x6c8c4c[_0x6327('0x35')]=_[_0x6327('0x33')](_0x1b6b96[_0x6327('0x34')],qs[_0x6327('0x36')](_0x48645b[_0x6327('0x31')][_0x6327('0x36')]));_0x6c8c4c[_0x6327('0x35')]=_0x6c8c4c[_0x6327('0x35')][_0x6327('0x37')]?_0x6c8c4c[_0x6327('0x35')]:_0x1b6b96[_0x6327('0x34')];if(!_0x48645b[_0x6327('0x31')][_0x6327('0x5b')]('nolimit')){_0x6c8c4c[_0x6327('0x1d')]=qs['limit'](_0x48645b['query'][_0x6327('0x1d')]);_0x6c8c4c[_0x6327('0x1b')]=qs[_0x6327('0x1b')](_0x48645b[_0x6327('0x31')]['offset']);}_0x6c8c4c[_0x6327('0x39')]=qs['sort'](_0x48645b['query']['sort']);_0x6c8c4c['where']=qs[_0x6327('0x3c')](_['pick'](_0x48645b[_0x6327('0x31')],_0x1b6b96[_0x6327('0x3c')]));_0x6c8c4c[_0x6327('0x3f')]['CampaignId']=_0x43eae1['id'];if(_0x48645b[_0x6327('0x31')][_0x6327('0x3d')]){_0x6c8c4c[_0x6327('0x3f')]=_['merge'](_0x6c8c4c[_0x6327('0x3f')],{'$or':_[_0x6327('0x40')](_0x6c8c4c[_0x6327('0x35')],function(_0x267bdc){var _0x30e33c={};_0x30e33c[_0x267bdc]={'$like':'%'+_0x48645b[_0x6327('0x31')][_0x6327('0x3d')]+'%'};return _0x30e33c;})});}_0x6c8c4c=_[_0x6327('0x3e')]({},_0x6c8c4c,_0x48645b[_0x6327('0x42')]);return db[_0x6327('0x62')][_0x6327('0x1e')]({'where':_0x6c8c4c['where']})['then'](function(_0x2a225b){_0x254fdc[_0x6327('0x1e')]=_0x2a225b;if(_0x48645b[_0x6327('0x31')]['includeAll']){_0x6c8c4c['include']=[{'all':!![]}];}return db['CmHopperBlack'][_0x6327('0x44')](_0x6c8c4c);})['then'](function(_0x43381e){_0x254fdc[_0x6327('0x45')]=_0x43381e;return _0x254fdc;});}})['then'](respondWithFilteredResult(_0xf25a85,_0x6c8c4c))[_0x6327('0x46')](handleError(_0xf25a85,null));};exports[_0x6327('0x63')]=function(_0x2bb6e5,_0x59b7f0,_0x1c9921){var _0x3fed01={};var _0x345f6c={};var _0xd091e1;var _0x9f1c8d;return db[_0x6327('0x2d')][_0x6327('0x5a')]({'where':{'id':_0x2bb6e5['params']['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x59b7f0,null))[_0x6327('0x26')](function(_0x27e847){if(_0x27e847){_0xd091e1=_0x27e847;_0x345f6c[_0x6327('0x34')]=_[_0x6327('0x32')](db[_0x6327('0x64')][_0x6327('0x2e')]);_0x345f6c['query']=_[_0x6327('0x32')](_0x2bb6e5[_0x6327('0x31')]);_0x345f6c[_0x6327('0x3c')]=_[_0x6327('0x33')](_0x345f6c[_0x6327('0x34')],_0x345f6c[_0x6327('0x31')]);_0x3fed01[_0x6327('0x35')]=_[_0x6327('0x33')](_0x345f6c[_0x6327('0x34')],qs[_0x6327('0x36')](_0x2bb6e5[_0x6327('0x31')][_0x6327('0x36')]));_0x3fed01[_0x6327('0x35')]=_0x3fed01['attributes']['length']?_0x3fed01[_0x6327('0x35')]:_0x345f6c[_0x6327('0x34')];_0x3fed01[_0x6327('0x39')]=qs[_0x6327('0x3a')](_0x2bb6e5[_0x6327('0x31')][_0x6327('0x3a')]);_0x3fed01[_0x6327('0x3f')]=qs[_0x6327('0x3c')](_[_0x6327('0x3b')](_0x2bb6e5[_0x6327('0x31')],_0x345f6c['filters']));if(_0x2bb6e5[_0x6327('0x31')][_0x6327('0x3d')]){_0x3fed01[_0x6327('0x3f')]=_[_0x6327('0x3e')](_0x3fed01[_0x6327('0x3f')],{'$or':_[_0x6327('0x40')](_0x3fed01[_0x6327('0x35')],function(_0x13abc5){var _0x518315={};_0x518315[_0x13abc5]={'$like':'%'+_0x2bb6e5[_0x6327('0x31')][_0x6327('0x3d')]+'%'};return _0x518315;})});}_0x3fed01=_[_0x6327('0x3e')]({},_0x3fed01,_0x2bb6e5['options']);return _0xd091e1[_0x6327('0x63')](_0x3fed01);}})[_0x6327('0x26')](function(_0x42d4ff){if(_0x42d4ff){_0x9f1c8d=_0x42d4ff[_0x6327('0x37')];if(!_0x2bb6e5[_0x6327('0x31')][_0x6327('0x5b')](_0x6327('0x38'))){_0x3fed01[_0x6327('0x1d')]=qs[_0x6327('0x1d')](_0x2bb6e5[_0x6327('0x31')]['limit']);_0x3fed01[_0x6327('0x1b')]=qs[_0x6327('0x1b')](_0x2bb6e5[_0x6327('0x31')][_0x6327('0x1b')]);}return _0xd091e1[_0x6327('0x63')](_0x3fed01);}})['then'](function(_0x48888c){if(_0x48888c){return _0x48888c?{'count':_0x9f1c8d,'rows':_0x48888c}:null;}})['then'](respondWithResult(_0x59b7f0,null))[_0x6327('0x46')](handleError(_0x59b7f0,null));};exports[_0x6327('0x65')]=function(_0x3f1526,_0x3cd50a,_0x718062){var _0x132990,_0x486571;var _0x56c2b0=[];var _0x364719=moment()[_0x6327('0x66')]('YYYY-MM-DD\x20HH:mm:ss');return db['Campaign'][_0x6327('0x4a')]({'where':{'id':_0x3f1526[_0x6327('0x48')]['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x3cd50a,null))[_0x6327('0x26')](function(_0x594fb3){if(_0x594fb3){_0x486571=_0x594fb3;return _0x594fb3[_0x6327('0x65')](_0x3f1526[_0x6327('0x4c')][_0x6327('0x67')],_[_0x6327('0x56')](_0x3f1526[_0x6327('0x4c')],[_0x6327('0x67'),'id'])||{});}return null;})[_0x6327('0x68')](function(_0x9e2e85){var _0x4174e4;var _0x4fa038;_0x132990=_0x9e2e85||[];var _0x570605=[];if(_0x9e2e85){for(var _0x1aa3ba=0x0;_0x1aa3ba<_0x9e2e85[_0x6327('0x37')];_0x1aa3ba+=0x1){var _0x3534a9=_0x9e2e85[_0x1aa3ba]['get']({'plain':!![]});_0x486571['dialCheckDuplicateType']=_0x3f1526[_0x6327('0x4c')]['dialCheckDuplicateType']?_0x3f1526[_0x6327('0x4c')][_0x6327('0x69')]:_0x486571[_0x6327('0x69')];switch(_0x486571[_0x6327('0x69')]){case _0x6327('0x6a'):_0x4174e4=squel[_0x6327('0x6b')]()[_0x6327('0x6c')](_0x6327('0x6d'))[_0x6327('0x6e')]([_0x6327('0x6f'),_0x6327('0x70'),'ContactId',_0x6327('0x71'),_0x6327('0x5c'),_0x6327('0x58'),_0x6327('0x57')],squel['select']()[_0x6327('0x72')](_0x6327('0x6f'),_0x6327('0x6f'))[_0x6327('0x72')](_0x6327('0x73'),_0x6327('0x70'))[_0x6327('0x72')]('id','ContactId')[_0x6327('0x72')](_0x3534a9[_0x6327('0x74')][_0x6327('0x75')](),'ListId')[_0x6327('0x72')](_0x3f1526['params']['id'][_0x6327('0x75')](),_0x6327('0x5c'))[_0x6327('0x72')]('\x27'+_0x364719+'\x27','createdAt')[_0x6327('0x72')]('\x27'+_0x364719+'\x27',_0x6327('0x57'))[_0x6327('0x76')](_0x6327('0x77'))[_0x6327('0x3f')]('deletedAt\x20IS\x20NULL')[_0x6327('0x3f')]('ListId\x20=\x20?',_0x3534a9[_0x6327('0x74')][_0x6327('0x75')]())[_0x6327('0x3f')](_0x6327('0x78'))[_0x6327('0x3f')](_0x6327('0x79'),squel['select']()['field'](_0x6327('0x7a'))['from'](_0x6327('0x7b'))[_0x6327('0x3f')](_0x6327('0x7c'),_0x3f1526[_0x6327('0x48')]['id'][_0x6327('0x75')]()))[_0x6327('0x3f')]('phone\x20NOT\x20IN\x20(?)',squel[_0x6327('0x7d')]()['field']('COALESCE(phone,\x27\x27)')['from'](_0x6327('0x6d'))[_0x6327('0x3f')]('CampaignId\x20=\x20?',_0x3f1526[_0x6327('0x48')]['id'][_0x6327('0x75')]())))['toString']();break;case _0x6327('0x7e'):_0x4174e4=squel[_0x6327('0x6b')]()[_0x6327('0x6c')](_0x6327('0x6d'))[_0x6327('0x6e')]([_0x6327('0x6f'),_0x6327('0x70'),_0x6327('0x7f'),_0x6327('0x71'),_0x6327('0x5c'),_0x6327('0x58'),_0x6327('0x57')],squel[_0x6327('0x7d')]()[_0x6327('0x72')](_0x6327('0x6f'),_0x6327('0x6f'))[_0x6327('0x72')]('NOW()',_0x6327('0x70'))[_0x6327('0x72')]('id',_0x6327('0x7f'))[_0x6327('0x72')](_0x3534a9[_0x6327('0x74')][_0x6327('0x75')](),_0x6327('0x71'))[_0x6327('0x72')](_0x3f1526[_0x6327('0x48')]['id']['toString'](),_0x6327('0x5c'))[_0x6327('0x72')]('\x27'+_0x364719+'\x27','createdAt')[_0x6327('0x72')]('\x27'+_0x364719+'\x27','updatedAt')[_0x6327('0x76')](_0x6327('0x77'))[_0x6327('0x3f')]('deletedAt\x20IS\x20NULL')[_0x6327('0x3f')]('ListId\x20=\x20?',_0x3534a9[_0x6327('0x74')][_0x6327('0x75')]())[_0x6327('0x3f')]('phone\x20IS\x20NOT\x20NULL')[_0x6327('0x3f')](_0x6327('0x79'),squel[_0x6327('0x7d')]()[_0x6327('0x72')]('COALESCE(phone,\x27\x27)')['from']('cm_hopper')[_0x6327('0x3f')]('CampaignId\x20=\x20?',_0x3f1526['params']['id'][_0x6327('0x75')]())))[_0x6327('0x75')]();break;default:_0x4174e4=squel[_0x6327('0x6b')]()[_0x6327('0x6c')]('cm_hopper')['fromQuery']([_0x6327('0x6f'),'scheduledAt',_0x6327('0x7f'),_0x6327('0x71'),'CampaignId',_0x6327('0x58'),'updatedAt'],squel[_0x6327('0x7d')]()['field'](_0x6327('0x6f'),'phone')[_0x6327('0x72')](_0x6327('0x73'),_0x6327('0x70'))[_0x6327('0x72')]('id',_0x6327('0x7f'))[_0x6327('0x72')](_0x3534a9['CmListId'][_0x6327('0x75')](),_0x6327('0x71'))['field'](_0x3f1526['params']['id']['toString'](),_0x6327('0x5c'))['field']('\x27'+_0x364719+'\x27',_0x6327('0x58'))[_0x6327('0x72')]('\x27'+_0x364719+'\x27',_0x6327('0x57'))['from']('cm_contacts')['where'](_0x6327('0x80'))[_0x6327('0x3f')]('ListId\x20=\x20?',_0x3534a9['CmListId'][_0x6327('0x75')]())[_0x6327('0x3f')](_0x6327('0x78')))['toString']();}_0x4fa038=squel[_0x6327('0x6b')]()[_0x6327('0x6c')](_0x6327('0x81'))['fromQuery'](['cmHopperId',_0x6327('0x70'),_0x6327('0x6f'),_0x6327('0x82'),'createdAt','updatedAt'],squel[_0x6327('0x7d')]()[_0x6327('0x72')]('h.id','id')[_0x6327('0x72')](_0x6327('0x73'),'scheduledAt')[_0x6327('0x72')]('ci.item','phone')[_0x6327('0x72')](_0x6327('0x83'),_0x6327('0x82'))[_0x6327('0x72')]('\x27'+_0x364719+'\x27',_0x6327('0x58'))[_0x6327('0x72')]('\x27'+_0x364719+'\x27',_0x6327('0x57'))[_0x6327('0x76')](_0x6327('0x84'),'ci')[_0x6327('0x85')](_0x6327('0x6d'),'h','h.ContactId\x20=\x20ci.CmContactId')[_0x6327('0x3f')](_0x6327('0x86'),_0x3534a9[_0x6327('0x74')][_0x6327('0x75')]())[_0x6327('0x3f')](_0x6327('0x87'),_0x3f1526[_0x6327('0x48')]['id'][_0x6327('0x75')]())[_0x6327('0x3f')](_0x6327('0x88'),_0x364719))[_0x6327('0x75')]();_0x570605[_0x6327('0x89')](db[_0x6327('0x8a')]['query'](_0x4174e4));_0x56c2b0[_0x6327('0x89')](db[_0x6327('0x8a')][_0x6327('0x31')](_0x4fa038));}return BPromise[_0x6327('0x8b')](_0x570605);}})['then'](function(){return BPromise[_0x6327('0x8b')](_0x56c2b0);})[_0x6327('0x26')](function(){return _0x132990;})[_0x6327('0x26')](respondWithResult(_0x3cd50a,null))[_0x6327('0x46')](handleError(_0x3cd50a,null));};exports[_0x6327('0x8c')]=function(_0x1a719a,_0x13a38c,_0x457343){return db[_0x6327('0x2d')][_0x6327('0x4a')]({'where':{'id':_0x1a719a[_0x6327('0x48')]['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x13a38c,null))[_0x6327('0x26')](function(_0xdad37e){if(_0xdad37e){return _0xdad37e[_0x6327('0x8c')](_0x1a719a[_0x6327('0x31')][_0x6327('0x67')]);}})[_0x6327('0x26')](function(_0x1f4b95){if(_0x1f4b95){return db[_0x6327('0x5d')][_0x6327('0x27')]({'where':{'ListId':_0x1a719a[_0x6327('0x31')][_0x6327('0x67')],'CampaignId':_0x1a719a[_0x6327('0x48')]['id']}})[_0x6327('0x26')](function(){return _0x1f4b95;});}})[_0x6327('0x26')](respondWithStatusCode(_0x13a38c,null))[_0x6327('0x46')](handleError(_0x13a38c,null));};exports[_0x6327('0x8d')]=function(_0x49975c,_0x6546a9,_0x526d09){var _0x26582e={};var _0x4f0579={};var _0x4ec482;var _0xf593bf;return db[_0x6327('0x2d')][_0x6327('0x5a')]({'where':{'id':_0x49975c[_0x6327('0x48')]['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x6546a9,null))[_0x6327('0x26')](function(_0xaee17e){if(_0xaee17e){_0x4ec482=_0xaee17e;_0x4f0579[_0x6327('0x34')]=_[_0x6327('0x32')](db[_0x6327('0x64')][_0x6327('0x2e')]);_0x4f0579[_0x6327('0x31')]=_[_0x6327('0x32')](_0x49975c[_0x6327('0x31')]);_0x4f0579['filters']=_[_0x6327('0x33')](_0x4f0579[_0x6327('0x34')],_0x4f0579[_0x6327('0x31')]);_0x26582e['attributes']=_['intersection'](_0x4f0579['model'],qs['fields'](_0x49975c[_0x6327('0x31')][_0x6327('0x36')]));_0x26582e[_0x6327('0x35')]=_0x26582e['attributes'][_0x6327('0x37')]?_0x26582e[_0x6327('0x35')]:_0x4f0579[_0x6327('0x34')];_0x26582e[_0x6327('0x39')]=qs[_0x6327('0x3a')](_0x49975c[_0x6327('0x31')][_0x6327('0x3a')]);_0x26582e[_0x6327('0x3f')]=qs[_0x6327('0x3c')](_[_0x6327('0x3b')](_0x49975c[_0x6327('0x31')],_0x4f0579[_0x6327('0x3c')]));if(_0x49975c[_0x6327('0x31')][_0x6327('0x3d')]){_0x26582e[_0x6327('0x3f')]=_[_0x6327('0x3e')](_0x26582e[_0x6327('0x3f')],{'$or':_[_0x6327('0x40')](_0x26582e[_0x6327('0x35')],function(_0x3d7eea){var _0x30f233={};_0x30f233[_0x3d7eea]={'$like':'%'+_0x49975c[_0x6327('0x31')][_0x6327('0x3d')]+'%'};return _0x30f233;})});}_0x26582e=_[_0x6327('0x3e')]({},_0x26582e,_0x49975c[_0x6327('0x42')]);return _0x4ec482[_0x6327('0x8d')](_0x26582e);}})[_0x6327('0x26')](function(_0x21df66){if(_0x21df66){_0xf593bf=_0x21df66[_0x6327('0x37')];if(!_0x49975c[_0x6327('0x31')][_0x6327('0x5b')]('nolimit')){_0x26582e['limit']=qs[_0x6327('0x1d')](_0x49975c[_0x6327('0x31')]['limit']);_0x26582e[_0x6327('0x1b')]=qs['offset'](_0x49975c[_0x6327('0x31')]['offset']);}return _0x4ec482[_0x6327('0x8d')](_0x26582e);}})[_0x6327('0x26')](function(_0x52c67a){if(_0x52c67a){return _0x52c67a?{'count':_0xf593bf,'rows':_0x52c67a}:null;}})['then'](respondWithResult(_0x6546a9,null))[_0x6327('0x46')](handleError(_0x6546a9,null));};exports[_0x6327('0x8e')]=function(_0x4e7082,_0x497d7f,_0x3f5ddc){var _0x40047b,_0xf8d14c;var _0x431412=[];var _0x3f1690=moment()[_0x6327('0x66')]('YYYY-MM-DD\x20HH:mm:ss');return db[_0x6327('0x2d')][_0x6327('0x4a')]({'where':{'id':_0x4e7082[_0x6327('0x48')]['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x497d7f,null))[_0x6327('0x26')](function(_0x4bf469){if(_0x4bf469){_0xf8d14c=_0x4bf469;return _0x4bf469['addBlackLists'](_0x4e7082['body'][_0x6327('0x67')],_['omit'](_0x4e7082[_0x6327('0x4c')],['ids','id'])||{});}return null;})[_0x6327('0x68')](function(_0x2e28c7){var _0x464324;var _0x86039;_0x40047b=_0x2e28c7||[];var _0x2980d1=[];if(_0x2e28c7){for(var _0x589d31=0x0;_0x589d31<_0x2e28c7[_0x6327('0x37')];_0x589d31+=0x1){var _0x2d6ed2=_0x2e28c7[_0x589d31][_0x6327('0x4e')]({'plain':!![]});_0x464324=squel[_0x6327('0x6b')]()['into']('cm_hopper_black')[_0x6327('0x6e')]([_0x6327('0x6f'),_0x6327('0x7f'),_0x6327('0x71'),_0x6327('0x5c'),_0x6327('0x58'),_0x6327('0x57')],squel['select']()[_0x6327('0x72')](_0x6327('0x6f'),_0x6327('0x6f'))['field']('id','ContactId')[_0x6327('0x72')](_0x2d6ed2[_0x6327('0x74')][_0x6327('0x75')](),'ListId')['field'](_0x4e7082[_0x6327('0x48')]['id'][_0x6327('0x75')](),'CampaignId')[_0x6327('0x72')](_0x6327('0x73'),'createdAt')[_0x6327('0x72')](_0x6327('0x73'),_0x6327('0x57'))[_0x6327('0x76')](_0x6327('0x77'))[_0x6327('0x3f')](_0x6327('0x80'))[_0x6327('0x3f')](_0x6327('0x8f'),_0x2d6ed2[_0x6327('0x74')][_0x6327('0x75')]())[_0x6327('0x3f')](_0x6327('0x78')))[_0x6327('0x75')]();_0x2980d1[_0x6327('0x89')](db[_0x6327('0x8a')][_0x6327('0x31')](_0x464324));}return BPromise[_0x6327('0x8b')](_0x2980d1);}})['then'](function(){return _0x40047b;})[_0x6327('0x26')](respondWithResult(_0x497d7f,null))['catch'](handleError(_0x497d7f,null));};exports['removeBlackLists']=function(_0x458d83,_0x440bb7,_0xb44077){return db[_0x6327('0x2d')]['find']({'where':{'id':_0x458d83['params']['id']}})[_0x6327('0x26')](handleEntityNotFound(_0x440bb7,null))[_0x6327('0x26')](function(_0x1dc095){if(_0x1dc095){return _0x1dc095[_0x6327('0x90')](_0x458d83['query'][_0x6327('0x67')]);}})[_0x6327('0x26')](function(_0x593782){if(_0x593782){return db['CmHopperBlack']['destroy']({'where':{'ListId':_0x458d83[_0x6327('0x31')][_0x6327('0x67')],'CampaignId':_0x458d83[_0x6327('0x48')]['id']}})[_0x6327('0x26')](function(){return _0x593782;});}})[_0x6327('0x26')](respondWithStatusCode(_0x440bb7,null))[_0x6327('0x46')](handleError(_0x440bb7,null));};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js
index fc3bd09..72ed81b 100644
--- a/server/api/campaign/campaign.model.js
+++ b/server/api/campaign/campaign.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./campaign.attributes','exports','Campaign','campaigns','lodash','util'];(function(_0x493030,_0x29ec7e){var _0x56f5e4=function(_0xb929a1){while(--_0xb929a1){_0x493030['push'](_0x493030['shift']());}};_0x56f5e4(++_0x29ec7e);}(_0x7a54,0x106));var _0x47a5=function(_0x885728,_0x55483b){_0x885728=_0x885728-0x0;var _0x26a1c6=_0x7a54[_0x885728];return _0x26a1c6;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9957=['exports','define','Campaign','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./campaign.attributes'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0x9957,0x93));var _0x7995=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9957[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'campaigns','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.rpc.js b/server/api/campaign/campaign.rpc.js
index 9591368..ba19c48 100644
--- a/server/api/campaign/campaign.rpc.js
+++ b/server/api/campaign/campaign.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x49e9=['raw','where','attributes','limit','map','model','include','lodash','util','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','code','Campaign,\x20%s,\x20%s','message','result','catch','GetCampaign','Campaign','findAll','options'];(function(_0x3d9156,_0x51a71f){var _0x3e3b2e=function(_0xc2e17b){while(--_0xc2e17b){_0x3d9156['push'](_0x3d9156['shift']());}};_0x3e3b2e(++_0x51a71f);}(_0x49e9,0x10f));var _0x949e=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x49e9[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x949e('0x0'));var util=require(_0x949e('0x1'));var moment=require('moment');var BPromise=require(_0x949e('0x2'));var rs=require(_0x949e('0x3'));var fs=require('fs');var Redis=require(_0x949e('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x949e('0x5'))('rpc');var config=require(_0x949e('0x6'));var jayson=require(_0x949e('0x7'));var client=jayson[_0x949e('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x17f649,_0x16c669,_0xfc4f8a){return new BPromise(function(_0x34ee57,_0x40d442){return client[_0x949e('0x9')](_0x17f649,_0xfc4f8a)[_0x949e('0xa')](function(_0x56e31d){logger[_0x949e('0xb')]('Campaign,\x20%s,\x20%s',_0x16c669,_0x949e('0xc'));logger[_0x949e('0xd')](_0x949e('0xe'),_0x16c669,'request\x20sent',JSON[_0x949e('0xf')](_0x56e31d));if(_0x56e31d[_0x949e('0x10')]){if(_0x56e31d[_0x949e('0x10')][_0x949e('0x11')]===0x1f4){logger[_0x949e('0x10')](_0x949e('0x12'),_0x16c669,_0x56e31d[_0x949e('0x10')][_0x949e('0x13')]);return _0x40d442(_0x56e31d[_0x949e('0x10')][_0x949e('0x13')]);}logger[_0x949e('0x10')](_0x949e('0x12'),_0x16c669,_0x56e31d[_0x949e('0x10')][_0x949e('0x13')]);return _0x34ee57(_0x56e31d[_0x949e('0x10')]['message']);}else{logger[_0x949e('0xb')](_0x949e('0x12'),_0x16c669,_0x949e('0xc'));_0x34ee57(_0x56e31d[_0x949e('0x14')]['message']);}})[_0x949e('0x15')](function(_0x441b80){logger['error'](_0x949e('0x12'),_0x16c669,_0x441b80);_0x40d442(_0x441b80);});});}exports[_0x949e('0x16')]=function(_0x43498d){var _0x868913=this;return new Promise(function(_0x20333c,_0x5caac9){return db[_0x949e('0x17')][_0x949e('0x18')]({'raw':_0x43498d[_0x949e('0x19')]?_0x43498d[_0x949e('0x19')][_0x949e('0x1a')]===undefined?!![]:![]:!![],'where':_0x43498d[_0x949e('0x19')]?_0x43498d[_0x949e('0x19')][_0x949e('0x1b')]||null:null,'attributes':_0x43498d[_0x949e('0x19')]?_0x43498d[_0x949e('0x19')][_0x949e('0x1c')]||null:null,'limit':_0x43498d[_0x949e('0x19')]?_0x43498d[_0x949e('0x19')][_0x949e('0x1d')]||null:null,'include':_0x43498d[_0x949e('0x19')]?_0x43498d[_0x949e('0x19')]['include']?_[_0x949e('0x1e')](_0x43498d[_0x949e('0x19')]['include'],function(_0x48a1d1){return{'model':db[_0x48a1d1[_0x949e('0x1f')]],'as':_0x48a1d1['as'],'attributes':_0x48a1d1[_0x949e('0x1c')],'include':_0x48a1d1[_0x949e('0x20')]?_[_0x949e('0x1e')](_0x48a1d1[_0x949e('0x20')],function(_0x1185b3){return{'model':db[_0x1185b3[_0x949e('0x1f')]],'as':_0x1185b3['as'],'attributes':_0x1185b3[_0x949e('0x1c')],'include':_0x1185b3[_0x949e('0x20')]?_[_0x949e('0x1e')](_0x1185b3['include'],function(_0x212224){return{'model':db[_0x212224[_0x949e('0x1f')]],'as':_0x212224['as'],'attributes':_0x212224['attributes']};}):[]};}):[]};}):[]:[]})[_0x949e('0xa')](function(_0x20061d){logger['info'](_0x949e('0x16'),_0x43498d);logger[_0x949e('0xd')]('GetCampaign',_0x43498d,JSON[_0x949e('0xf')](_0x20061d));_0x20333c(_0x20061d);})['catch'](function(_0x5e6e34){logger[_0x949e('0x10')]('GetCampaign',_0x5e6e34['message'],_0x43498d);_0x5caac9(_0x868913[_0x949e('0x10')](0x1f4,_0x5e6e34[_0x949e('0x13')]));});});};
\ No newline at end of file
+var _0x5cd8=['http','request','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetCampaign','Campaign','findAll','options','raw','where','include','map','model','attributes','stringify','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client'];(function(_0x5c5818,_0x427193){var _0x4e55fe=function(_0x2183f9){while(--_0x2183f9){_0x5c5818['push'](_0x5c5818['shift']());}};_0x4e55fe(++_0x427193);}(_0x5cd8,0x1d2));var _0x85cd=function(_0x281d70,_0x4919ca){_0x281d70=_0x281d70-0x0;var _0x1bf726=_0x5cd8[_0x281d70];return _0x1bf726;};'use strict';var _=require(_0x85cd('0x0'));var util=require('util');var moment=require(_0x85cd('0x1'));var BPromise=require(_0x85cd('0x2'));var rs=require(_0x85cd('0x3'));var fs=require('fs');var Redis=require(_0x85cd('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x85cd('0x5'));var logger=require('../../config/logger')(_0x85cd('0x6'));var config=require(_0x85cd('0x7'));var jayson=require(_0x85cd('0x8'));var client=jayson[_0x85cd('0x9')][_0x85cd('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x598ab6,_0x1a8619,_0x1a69c4){return new BPromise(function(_0x5aa3c3,_0x1e002d){return client[_0x85cd('0xb')](_0x598ab6,_0x1a69c4)[_0x85cd('0xc')](function(_0x30204b){logger[_0x85cd('0xd')](_0x85cd('0xe'),_0x1a8619,_0x85cd('0xf'));logger[_0x85cd('0x10')](_0x85cd('0x11'),_0x1a8619,'request\x20sent',JSON['stringify'](_0x30204b));if(_0x30204b[_0x85cd('0x12')]){if(_0x30204b[_0x85cd('0x12')][_0x85cd('0x13')]===0x1f4){logger[_0x85cd('0x12')]('Campaign,\x20%s,\x20%s',_0x1a8619,_0x30204b[_0x85cd('0x12')][_0x85cd('0x14')]);return _0x1e002d(_0x30204b[_0x85cd('0x12')][_0x85cd('0x14')]);}logger[_0x85cd('0x12')](_0x85cd('0xe'),_0x1a8619,_0x30204b[_0x85cd('0x12')][_0x85cd('0x14')]);return _0x5aa3c3(_0x30204b['error'][_0x85cd('0x14')]);}else{logger[_0x85cd('0xd')](_0x85cd('0xe'),_0x1a8619,_0x85cd('0xf'));_0x5aa3c3(_0x30204b[_0x85cd('0x15')]['message']);}})[_0x85cd('0x16')](function(_0x5164e8){logger[_0x85cd('0x12')]('Campaign,\x20%s,\x20%s',_0x1a8619,_0x5164e8);_0x1e002d(_0x5164e8);});});}exports[_0x85cd('0x17')]=function(_0x4d9c64){var _0x40e2e5=this;return new Promise(function(_0x11292e,_0x238799){return db[_0x85cd('0x18')][_0x85cd('0x19')]({'raw':_0x4d9c64[_0x85cd('0x1a')]?_0x4d9c64[_0x85cd('0x1a')][_0x85cd('0x1b')]===undefined?!![]:![]:!![],'where':_0x4d9c64['options']?_0x4d9c64[_0x85cd('0x1a')][_0x85cd('0x1c')]||null:null,'attributes':_0x4d9c64['options']?_0x4d9c64['options']['attributes']||null:null,'limit':_0x4d9c64['options']?_0x4d9c64[_0x85cd('0x1a')]['limit']||null:null,'include':_0x4d9c64[_0x85cd('0x1a')]?_0x4d9c64[_0x85cd('0x1a')][_0x85cd('0x1d')]?_[_0x85cd('0x1e')](_0x4d9c64['options'][_0x85cd('0x1d')],function(_0x2b00a8){return{'model':db[_0x2b00a8[_0x85cd('0x1f')]],'as':_0x2b00a8['as'],'attributes':_0x2b00a8[_0x85cd('0x20')],'include':_0x2b00a8[_0x85cd('0x1d')]?_[_0x85cd('0x1e')](_0x2b00a8['include'],function(_0xb3500f){return{'model':db[_0xb3500f[_0x85cd('0x1f')]],'as':_0xb3500f['as'],'attributes':_0xb3500f[_0x85cd('0x20')],'include':_0xb3500f[_0x85cd('0x1d')]?_['map'](_0xb3500f[_0x85cd('0x1d')],function(_0x43a062){return{'model':db[_0x43a062[_0x85cd('0x1f')]],'as':_0x43a062['as'],'attributes':_0x43a062['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2ea68b){logger['info'](_0x85cd('0x17'),_0x4d9c64);logger[_0x85cd('0x10')](_0x85cd('0x17'),_0x4d9c64,JSON[_0x85cd('0x21')](_0x2ea68b));_0x11292e(_0x2ea68b);})['catch'](function(_0x225802){logger[_0x85cd('0x12')](_0x85cd('0x17'),_0x225802[_0x85cd('0x14')],_0x4d9c64);_0x238799(_0x40e2e5['error'](0x1f4,_0x225802[_0x85cd('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js
index cb0272e..c507292 100644
--- a/server/api/campaign/index.js
+++ b/server/api/campaign/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1d50=['addBlackLists','put','update','delete','destroy','removeLists','exports','multer','util','fs-extra','../../components/auth/service','../../components/interaction/service','./campaign.controller','get','isAuthenticated','index','/:id','show','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','getHopperFinals','getHopperBlacks','/:id/lists','getLists','/:id/blacklists','getBlackLists','create','post','/:id/clone','addLists'];(function(_0x1c88f9,_0x211646){var _0x1779f7=function(_0x1dc48e){while(--_0x1dc48e){_0x1c88f9['push'](_0x1c88f9['shift']());}};_0x1779f7(++_0x211646);}(_0x1d50,0x1c7));var _0x01d5=function(_0x1a4d23,_0x3e9f58){_0x1a4d23=_0x1a4d23-0x0;var _0x53e632=_0x1d50[_0x1a4d23];return _0x53e632;};'use strict';var multer=require(_0x01d5('0x0'));var util=require(_0x01d5('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x01d5('0x2'));var auth=require(_0x01d5('0x3'));var interaction=require(_0x01d5('0x4'));var config=require('../../config/environment');var controller=require(_0x01d5('0x5'));router[_0x01d5('0x6')]('/',auth[_0x01d5('0x7')](),controller[_0x01d5('0x8')]);router[_0x01d5('0x6')](_0x01d5('0x9'),auth['isAuthenticated'](),controller[_0x01d5('0xa')]);router[_0x01d5('0x6')]('/:id/hoppers',auth['isAuthenticated'](),controller[_0x01d5('0xb')]);router['get'](_0x01d5('0xc'),auth[_0x01d5('0x7')](),controller[_0x01d5('0xd')]);router['get'](_0x01d5('0xe'),auth[_0x01d5('0x7')](),controller[_0x01d5('0xf')]);router['get']('/:id/hopper_black',auth[_0x01d5('0x7')](),controller[_0x01d5('0x10')]);router[_0x01d5('0x6')](_0x01d5('0x11'),auth[_0x01d5('0x7')](),controller[_0x01d5('0x12')]);router[_0x01d5('0x6')](_0x01d5('0x13'),auth[_0x01d5('0x7')](),controller[_0x01d5('0x14')]);router['post']('/',auth[_0x01d5('0x7')](),controller[_0x01d5('0x15')]);router[_0x01d5('0x16')](_0x01d5('0x17'),auth['isAuthenticated'](),controller['clone']);router[_0x01d5('0x16')]('/:id/lists',auth[_0x01d5('0x7')](),controller[_0x01d5('0x18')]);router['post'](_0x01d5('0x13'),auth[_0x01d5('0x7')](),controller[_0x01d5('0x19')]);router[_0x01d5('0x1a')](_0x01d5('0x9'),auth[_0x01d5('0x7')](),controller[_0x01d5('0x1b')]);router[_0x01d5('0x1c')](_0x01d5('0x9'),auth[_0x01d5('0x7')](),controller[_0x01d5('0x1d')]);router['delete'](_0x01d5('0x11'),auth[_0x01d5('0x7')](),controller[_0x01d5('0x1e')]);router[_0x01d5('0x1c')]('/:id/blacklists',auth[_0x01d5('0x7')](),controller['removeBlackLists']);module[_0x01d5('0x1f')]=router;
\ No newline at end of file
+var _0xd691=['removeLists','removeBlackLists','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','index','/:id','isAuthenticated','/:id/hoppers','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','getHopperBlacks','getLists','getBlackLists','post','/:id/clone','clone','/:id/lists','addLists','/:id/blacklists','addBlackLists','update','delete'];(function(_0x304993,_0x4b16eb){var _0x192983=function(_0x4bc97f){while(--_0x4bc97f){_0x304993['push'](_0x304993['shift']());}};_0x192983(++_0x4b16eb);}(_0xd691,0x182));var _0x1d69=function(_0xd6ab42,_0x4a76f8){_0xd6ab42=_0xd6ab42-0x0;var _0x445960=_0xd691[_0xd6ab42];return _0x445960;};'use strict';var multer=require('multer');var util=require(_0x1d69('0x0'));var path=require(_0x1d69('0x1'));var timeout=require(_0x1d69('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x1d69('0x3'));var interaction=require(_0x1d69('0x4'));var config=require(_0x1d69('0x5'));var controller=require(_0x1d69('0x6'));router[_0x1d69('0x7')]('/',auth['isAuthenticated'](),controller[_0x1d69('0x8')]);router['get'](_0x1d69('0x9'),auth[_0x1d69('0xa')](),controller['show']);router['get'](_0x1d69('0xb'),auth[_0x1d69('0xa')](),controller[_0x1d69('0xc')]);router[_0x1d69('0x7')](_0x1d69('0xd'),auth['isAuthenticated'](),controller[_0x1d69('0xe')]);router[_0x1d69('0x7')](_0x1d69('0xf'),auth[_0x1d69('0xa')](),controller[_0x1d69('0x10')]);router[_0x1d69('0x7')](_0x1d69('0x11'),auth[_0x1d69('0xa')](),controller[_0x1d69('0x12')]);router[_0x1d69('0x7')]('/:id/lists',auth[_0x1d69('0xa')](),controller[_0x1d69('0x13')]);router['get']('/:id/blacklists',auth[_0x1d69('0xa')](),controller[_0x1d69('0x14')]);router[_0x1d69('0x15')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x1d69('0x16'),auth['isAuthenticated'](),controller[_0x1d69('0x17')]);router[_0x1d69('0x15')](_0x1d69('0x18'),auth[_0x1d69('0xa')](),controller[_0x1d69('0x19')]);router[_0x1d69('0x15')](_0x1d69('0x1a'),auth['isAuthenticated'](),controller[_0x1d69('0x1b')]);router['put'](_0x1d69('0x9'),auth[_0x1d69('0xa')](),controller[_0x1d69('0x1c')]);router[_0x1d69('0x1d')](_0x1d69('0x9'),auth[_0x1d69('0xa')](),controller['destroy']);router[_0x1d69('0x1d')](_0x1d69('0x18'),auth[_0x1d69('0xa')](),controller[_0x1d69('0x1e')]);router[_0x1d69('0x1d')](_0x1d69('0x1a'),auth[_0x1d69('0xa')](),controller[_0x1d69('0x1f')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js
index 5e39a84..79aedd9 100644
--- a/server/api/cannedAnswer/cannedAnswer.attributes.js
+++ b/server/api/cannedAnswer/cannedAnswer.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7ae0=['sequelize','exports','STRING','TEXT','VIRTUAL','getDataValue','key'];(function(_0x577077,_0x52f056){var _0x370769=function(_0x34d109){while(--_0x34d109){_0x577077['push'](_0x577077['shift']());}};_0x370769(++_0x52f056);}(_0x7ae0,0x1e3));var _0x07ae=function(_0x320d83,_0x1cdad3){_0x320d83=_0x320d83-0x0;var _0x5e8c27=_0x7ae0[_0x320d83];return _0x5e8c27;};'use strict';var Sequelize=require(_0x07ae('0x0'));module[_0x07ae('0x1')]={'key':{'type':Sequelize[_0x07ae('0x2')],'allowNull':![]},'value':{'type':Sequelize[_0x07ae('0x3')],'allowNull':![]},'description':{'type':Sequelize[_0x07ae('0x2')]},'name':{'type':Sequelize[_0x07ae('0x4')],'get':function(){return this[_0x07ae('0x5')](_0x07ae('0x6'));}}};
\ No newline at end of file
+var _0x9669=['getDataValue','key','STRING','VIRTUAL'];(function(_0x42d54d,_0x142106){var _0x5ef4f2=function(_0x2e2a92){while(--_0x2e2a92){_0x42d54d['push'](_0x42d54d['shift']());}};_0x5ef4f2(++_0x142106);}(_0x9669,0x9a));var _0x9966=function(_0x47805f,_0x41097a){_0x47805f=_0x47805f-0x0;var _0x479c85=_0x9669[_0x47805f];return _0x479c85;};'use strict';var Sequelize=require('sequelize');module['exports']={'key':{'type':Sequelize[_0x9966('0x0')],'allowNull':![]},'value':{'type':Sequelize['TEXT'],'allowNull':![]},'description':{'type':Sequelize[_0x9966('0x0')]},'name':{'type':Sequelize[_0x9966('0x1')],'get':function(){return this[_0x9966('0x2')](_0x9966('0x3'));}}};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js
index b18cc20..55f7eba 100644
--- a/server/api/cannedAnswer/cannedAnswer.controller.js
+++ b/server/api/cannedAnswer/cannedAnswer.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0245=['../../config/environment','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','get','CannedAnswers','end','error','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','includeAll','CannedAnswer','findAll','rows','catch','show','params','include','find','body','create','key','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','path','sox','ejs','lodash','squel','crypto','jsforce','to-csv','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x15b5a4,_0x12b5fc){var _0x487f43=function(_0x2e953e){while(--_0x2e953e){_0x15b5a4['push'](_0x15b5a4['shift']());}};_0x487f43(++_0x12b5fc);}(_0x0245,0xf6));var _0x5024=function(_0x4a1e65,_0x8deb5e){_0x4a1e65=_0x4a1e65-0x0;var _0x20c1f1=_0x0245[_0x4a1e65];return _0x20c1f1;};'use strict';var emlformat=require(_0x5024('0x0'));var rimraf=require(_0x5024('0x1'));var zipdir=require(_0x5024('0x2'));var jsonpatch=require(_0x5024('0x3'));var rp=require('request-promise');var moment=require(_0x5024('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x5024('0x5'));var util=require('util');var path=require(_0x5024('0x6'));var sox=require(_0x5024('0x7'));var csv=require('to-csv');var ejs=require(_0x5024('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5024('0x9'));var squel=require(_0x5024('0xa'));var crypto=require(_0x5024('0xb'));var jsforce=require(_0x5024('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x5024('0xd'));var querystring=require('querystring');var Papa=require(_0x5024('0xe'));var Redis=require(_0x5024('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x5024('0x10'));var hardwareService=require(_0x5024('0x11'));var logger=require(_0x5024('0x12'))(_0x5024('0x13'));var utils=require(_0x5024('0x14'));var config=require(_0x5024('0x15'));var licenseUtil=require(_0x5024('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x44a92f,_0x5782dd){_0x5782dd=_0x5782dd||0xcc;return function(_0x6762cf){if(_0x6762cf){return _0x44a92f[_0x5024('0x17')](_0x5782dd);}return _0x44a92f[_0x5024('0x18')](_0x5782dd)['end']();};}function respondWithResult(_0x35b802,_0x416c7d){_0x416c7d=_0x416c7d||0xc8;return function(_0x33144a){if(_0x33144a){return _0x35b802[_0x5024('0x18')](_0x416c7d)[_0x5024('0x19')](_0x33144a);}};}function respondWithFilteredResult(_0x24b39b,_0x2d1ddf){return function(_0x2c3faa){if(_0x2c3faa){var _0x34cfa9=typeof _0x2d1ddf[_0x5024('0x1a')]===_0x5024('0x1b')&&typeof _0x2d1ddf[_0x5024('0x1c')]==='undefined';var _0x543439=_0x2c3faa[_0x5024('0x1d')];var _0x28db94=_0x34cfa9?0x0:_0x2d1ddf[_0x5024('0x1a')];var _0x5bc0ed=_0x34cfa9?_0x2c3faa[_0x5024('0x1d')]:_0x2d1ddf[_0x5024('0x1a')]+_0x2d1ddf[_0x5024('0x1c')];var _0x41deff;if(_0x5bc0ed>=_0x543439){_0x5bc0ed=_0x543439;_0x41deff=0xc8;}else{_0x41deff=0xce;}_0x24b39b['status'](_0x41deff);return _0x24b39b[_0x5024('0x1e')](_0x5024('0x1f'),_0x28db94+'-'+_0x5bc0ed+'/'+_0x543439)['json'](_0x2c3faa);}return null;};}function patchUpdates(_0x40aac1){return function(_0x20a407){try{jsonpatch[_0x5024('0x20')](_0x20a407,_0x40aac1,!![]);}catch(_0x31d2c2){return BPromise['reject'](_0x31d2c2);}return _0x20a407[_0x5024('0x21')]();};}function saveUpdates(_0x140da3,_0x3445a7){return function(_0x2a1e63){if(_0x2a1e63){return _0x2a1e63[_0x5024('0x22')](_0x140da3)[_0x5024('0x23')](function(_0x2d90a1){return _0x2d90a1;});}return null;};}function removeEntity(_0xe92376,_0x345c9){return function(_0x4da102){if(_0x4da102){return _0x4da102[_0x5024('0x24')]()[_0x5024('0x23')](function(){var _0x17ff6b=_0x4da102[_0x5024('0x25')]({'plain':!![]});var _0x509de5=_0x5024('0x26');return db['UserProfileResource'][_0x5024('0x24')]({'where':{'type':_0x509de5,'resourceId':_0x17ff6b['id']}})[_0x5024('0x23')](function(){return _0x4da102;});})[_0x5024('0x23')](function(){_0xe92376['status'](0xcc)[_0x5024('0x27')]();});}};}function handleEntityNotFound(_0xfbd017,_0xe2c473){return function(_0x217fd9){if(!_0x217fd9){_0xfbd017[_0x5024('0x17')](0x194);}return _0x217fd9;};}function handleError(_0x5ea2d2,_0x10530c){_0x10530c=_0x10530c||0x1f4;return function(_0x50425c){logger[_0x5024('0x28')](_0x50425c[_0x5024('0x29')]);if(_0x50425c['name']){delete _0x50425c[_0x5024('0x2a')];}_0x5ea2d2[_0x5024('0x18')](_0x10530c)[_0x5024('0x2b')](_0x50425c);};}exports[_0x5024('0x2c')]=function(_0x3a3f57,_0xefd743){var _0x25c860={},_0x3ab1ce={},_0x1e66f4={'count':0x0,'rows':[]};var _0x34627b=_[_0x5024('0x2d')](db['CannedAnswer'][_0x5024('0x2e')],function(_0x2f33bb){return{'name':_0x2f33bb[_0x5024('0x2f')],'type':_0x2f33bb[_0x5024('0x30')]['key']};});_0x3ab1ce[_0x5024('0x31')]=_['map'](_0x34627b,_0x5024('0x2a'));_0x3ab1ce[_0x5024('0x32')]=_[_0x5024('0x33')](_0x3a3f57[_0x5024('0x32')]);_0x3ab1ce[_0x5024('0x34')]=_[_0x5024('0x35')](_0x3ab1ce[_0x5024('0x31')],_0x3ab1ce[_0x5024('0x32')]);_0x25c860[_0x5024('0x36')]=_[_0x5024('0x35')](_0x3ab1ce[_0x5024('0x31')],qs[_0x5024('0x37')](_0x3a3f57['query']['fields']));_0x25c860[_0x5024('0x36')]=_0x25c860[_0x5024('0x36')][_0x5024('0x38')]?_0x25c860['attributes']:_0x3ab1ce['model'];if(!_0x3a3f57[_0x5024('0x32')][_0x5024('0x39')](_0x5024('0x3a'))){_0x25c860[_0x5024('0x1c')]=qs['limit'](_0x3a3f57[_0x5024('0x32')][_0x5024('0x1c')]);_0x25c860[_0x5024('0x1a')]=qs['offset'](_0x3a3f57[_0x5024('0x32')][_0x5024('0x1a')]);}_0x25c860[_0x5024('0x3b')]=qs['sort'](_0x3a3f57[_0x5024('0x32')][_0x5024('0x3c')]);_0x25c860[_0x5024('0x3d')]=qs[_0x5024('0x34')](_['pick'](_0x3a3f57[_0x5024('0x32')],_0x3ab1ce['filters']),_0x34627b);if(_0x3a3f57[_0x5024('0x32')][_0x5024('0x3e')]){_0x25c860['where']=_['merge'](_0x25c860[_0x5024('0x3d')],{'$or':[{'key':{'$like':'%'+_0x3a3f57[_0x5024('0x32')][_0x5024('0x3e')]+'%'}},{'value':{'$like':'%'+_0x3a3f57[_0x5024('0x32')][_0x5024('0x3e')]+'%'}}]});}_0x25c860=_[_0x5024('0x3f')]({},_0x25c860,_0x3a3f57[_0x5024('0x40')]);var _0x29beb1={'where':_0x25c860[_0x5024('0x3d')]};return db['CannedAnswer'][_0x5024('0x1d')](_0x29beb1)[_0x5024('0x23')](function(_0x57c3c5){_0x1e66f4['count']=_0x57c3c5;if(_0x3a3f57['query'][_0x5024('0x41')]){_0x25c860['include']=[{'all':!![]}];}return db[_0x5024('0x42')][_0x5024('0x43')](_0x25c860);})['then'](function(_0x1ca648){_0x1e66f4[_0x5024('0x44')]=_0x1ca648;return _0x1e66f4;})[_0x5024('0x23')](respondWithFilteredResult(_0xefd743,_0x25c860))[_0x5024('0x45')](handleError(_0xefd743,null));};exports[_0x5024('0x46')]=function(_0x42bc04,_0x2659f4){var _0xcef566={'raw':!![],'where':{'id':_0x42bc04[_0x5024('0x47')]['id']}},_0x4247ce={};_0x4247ce['model']=_['keys'](db[_0x5024('0x42')][_0x5024('0x2e')]);_0x4247ce[_0x5024('0x32')]=_[_0x5024('0x33')](_0x42bc04[_0x5024('0x32')]);_0x4247ce[_0x5024('0x34')]=_[_0x5024('0x35')](_0x4247ce[_0x5024('0x31')],_0x4247ce['query']);_0xcef566['attributes']=_[_0x5024('0x35')](_0x4247ce['model'],qs[_0x5024('0x37')](_0x42bc04[_0x5024('0x32')][_0x5024('0x37')]));_0xcef566[_0x5024('0x36')]=_0xcef566[_0x5024('0x36')]['length']?_0xcef566[_0x5024('0x36')]:_0x4247ce['model'];if(_0x42bc04['query'][_0x5024('0x41')]){_0xcef566[_0x5024('0x48')]=[{'all':!![]}];}_0xcef566=_[_0x5024('0x3f')]({},_0xcef566,_0x42bc04[_0x5024('0x40')]);return db[_0x5024('0x42')][_0x5024('0x49')](_0xcef566)[_0x5024('0x23')](handleEntityNotFound(_0x2659f4,null))[_0x5024('0x23')](respondWithResult(_0x2659f4,null))[_0x5024('0x45')](handleError(_0x2659f4,null));};exports['update']=function(_0x507a4c,_0x5626df){if(_0x507a4c[_0x5024('0x4a')]['id']){delete _0x507a4c[_0x5024('0x4a')]['id'];}return db['CannedAnswer'][_0x5024('0x49')]({'where':{'id':_0x507a4c[_0x5024('0x47')]['id']}})[_0x5024('0x23')](handleEntityNotFound(_0x5626df,null))[_0x5024('0x23')](saveUpdates(_0x507a4c[_0x5024('0x4a')],null))[_0x5024('0x23')](respondWithResult(_0x5626df,null))['catch'](handleError(_0x5626df,null));};exports[_0x5024('0x24')]=function(_0x27f1b2,_0x2a0cff){return db['CannedAnswer'][_0x5024('0x49')]({'where':{'id':_0x27f1b2[_0x5024('0x47')]['id']}})[_0x5024('0x23')](handleEntityNotFound(_0x2a0cff,null))[_0x5024('0x23')](removeEntity(_0x2a0cff,null))[_0x5024('0x45')](handleError(_0x2a0cff,null));};exports[_0x5024('0x4b')]=function(_0x3798bf,_0x36f405){var _0x2d6115={'key':_0x3798bf[_0x5024('0x4a')][_0x5024('0x4c')]};if(_0x3798bf[_0x5024('0x4a')][_0x5024('0x4d')]){_0x2d6115[_0x5024('0x4d')]=_0x3798bf[_0x5024('0x4a')][_0x5024('0x4d')];}else if(_0x3798bf[_0x5024('0x4a')][_0x5024('0x4e')]){_0x2d6115[_0x5024('0x4e')]=_0x3798bf['body'][_0x5024('0x4e')];}else if(_0x3798bf['body'][_0x5024('0x4f')]){_0x2d6115[_0x5024('0x4f')]=_0x3798bf['body'][_0x5024('0x4f')];}else if(_0x3798bf[_0x5024('0x4a')][_0x5024('0x50')]){_0x2d6115[_0x5024('0x50')]=_0x3798bf[_0x5024('0x4a')]['ChatWebsiteId'];}return db[_0x5024('0x42')][_0x5024('0x49')]({'where':_0x2d6115})[_0x5024('0x23')](function(_0x297860){if(_0x297860){throw new db['Sequelize'][(_0x5024('0x51'))](_0x5024('0x52'));}return db[_0x5024('0x42')][_0x5024('0x4b')](_0x3798bf['body']);})[_0x5024('0x23')](function(_0x51df94){var _0x3e5c0f=_0x3798bf[_0x5024('0x53')][_0x5024('0x25')]({'plain':!![]});if(!_0x3e5c0f)throw new Error(_0x5024('0x54'));if(_0x3e5c0f[_0x5024('0x55')]===_0x5024('0x53')){var _0x21f3b7=_0x51df94['get']({'plain':!![]});return db['UserProfileSection'][_0x5024('0x49')]({'where':{'name':_0x5024('0x26'),'userProfileId':_0x3e5c0f[_0x5024('0x56')]},'raw':!![]})[_0x5024('0x23')](function(_0x521661){if(_0x521661&&_0x521661[_0x5024('0x57')]===0x0){return db['UserProfileResource'][_0x5024('0x4b')]({'name':_0x21f3b7[_0x5024('0x2a')],'resourceId':_0x21f3b7['id'],'type':_0x521661[_0x5024('0x2a')],'sectionId':_0x521661['id']},{})[_0x5024('0x23')](function(){return _0x51df94;});}else{return _0x51df94;}})['catch'](function(_0x238795){logger['error'](_0x5024('0x58'),_0x238795);throw _0x238795;});}return _0x51df94;})[_0x5024('0x23')](respondWithResult(_0x36f405,0xc9))[_0x5024('0x45')](handleError(_0x36f405,null));};
\ No newline at end of file
+var _0x6c65=['limit','count','apply','reject','save','destroy','then','get','CannedAnswers','stack','name','index','CannedAnswer','rawAttributes','fieldName','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','filter','merge','includeAll','include','findAll','rows','catch','show','params','keys','options','find','body','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','The\x20inserted\x20key\x20already\x20exists.','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined'];(function(_0xb2881e,_0x49ef92){var _0x3abeda=function(_0x423bfa){while(--_0x423bfa){_0xb2881e['push'](_0xb2881e['shift']());}};_0x3abeda(++_0x49ef92);}(_0x6c65,0x8f));var _0x56c6=function(_0xef3c80,_0x36164f){_0xef3c80=_0xef3c80-0x0;var _0x27f054=_0x6c65[_0xef3c80];return _0x27f054;};'use strict';var emlformat=require(_0x56c6('0x0'));var rimraf=require(_0x56c6('0x1'));var zipdir=require(_0x56c6('0x2'));var jsonpatch=require(_0x56c6('0x3'));var rp=require(_0x56c6('0x4'));var moment=require(_0x56c6('0x5'));var BPromise=require(_0x56c6('0x6'));var Mustache=require(_0x56c6('0x7'));var util=require(_0x56c6('0x8'));var path=require(_0x56c6('0x9'));var sox=require(_0x56c6('0xa'));var csv=require(_0x56c6('0xb'));var ejs=require(_0x56c6('0xc'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x56c6('0xd'));var crypto=require('crypto');var jsforce=require(_0x56c6('0xe'));var deskjs=require(_0x56c6('0xf'));var toCsv=require('to-csv');var querystring=require(_0x56c6('0x10'));var Papa=require(_0x56c6('0x11'));var Redis=require(_0x56c6('0x12'));var authService=require(_0x56c6('0x13'));var qs=require(_0x56c6('0x14'));var as=require(_0x56c6('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x56c6('0x16'))(_0x56c6('0x17'));var utils=require(_0x56c6('0x18'));var config=require(_0x56c6('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x56c6('0x1a'))['db'];function respondWithStatusCode(_0x32f53b,_0x4f54ce){_0x4f54ce=_0x4f54ce||0xcc;return function(_0x55ed95){if(_0x55ed95){return _0x32f53b[_0x56c6('0x1b')](_0x4f54ce);}return _0x32f53b[_0x56c6('0x1c')](_0x4f54ce)[_0x56c6('0x1d')]();};}function respondWithResult(_0x577ee2,_0x12e0d6){_0x12e0d6=_0x12e0d6||0xc8;return function(_0x2155d2){if(_0x2155d2){return _0x577ee2[_0x56c6('0x1c')](_0x12e0d6)[_0x56c6('0x1e')](_0x2155d2);}};}function respondWithFilteredResult(_0x39f80f,_0x47bd65){return function(_0x37bf8b){if(_0x37bf8b){var _0x3da8f1=typeof _0x47bd65[_0x56c6('0x1f')]===_0x56c6('0x20')&&typeof _0x47bd65[_0x56c6('0x21')]==='undefined';var _0x242c41=_0x37bf8b[_0x56c6('0x22')];var _0x46b824=_0x3da8f1?0x0:_0x47bd65[_0x56c6('0x1f')];var _0x5ba445=_0x3da8f1?_0x37bf8b['count']:_0x47bd65[_0x56c6('0x1f')]+_0x47bd65[_0x56c6('0x21')];var _0x2bad22;if(_0x5ba445>=_0x242c41){_0x5ba445=_0x242c41;_0x2bad22=0xc8;}else{_0x2bad22=0xce;}_0x39f80f['status'](_0x2bad22);return _0x39f80f['set']('Content-Range',_0x46b824+'-'+_0x5ba445+'/'+_0x242c41)[_0x56c6('0x1e')](_0x37bf8b);}return null;};}function patchUpdates(_0x2c74ad){return function(_0x4331c2){try{jsonpatch[_0x56c6('0x23')](_0x4331c2,_0x2c74ad,!![]);}catch(_0x3df7a5){return BPromise[_0x56c6('0x24')](_0x3df7a5);}return _0x4331c2[_0x56c6('0x25')]();};}function saveUpdates(_0xd98c4a,_0x315ced){return function(_0x2e8023){if(_0x2e8023){return _0x2e8023['update'](_0xd98c4a)['then'](function(_0x10ae9f){return _0x10ae9f;});}return null;};}function removeEntity(_0x4fce6a,_0x4c1cb1){return function(_0xcde422){if(_0xcde422){return _0xcde422[_0x56c6('0x26')]()[_0x56c6('0x27')](function(){var _0x47bebc=_0xcde422[_0x56c6('0x28')]({'plain':!![]});var _0x42e326=_0x56c6('0x29');return db['UserProfileResource'][_0x56c6('0x26')]({'where':{'type':_0x42e326,'resourceId':_0x47bebc['id']}})['then'](function(){return _0xcde422;});})['then'](function(){_0x4fce6a[_0x56c6('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x44ca5d,_0x453ca3){return function(_0x2f5c8e){if(!_0x2f5c8e){_0x44ca5d['sendStatus'](0x194);}return _0x2f5c8e;};}function handleError(_0x518b53,_0x345838){_0x345838=_0x345838||0x1f4;return function(_0x1514ad){logger['error'](_0x1514ad[_0x56c6('0x2a')]);if(_0x1514ad[_0x56c6('0x2b')]){delete _0x1514ad['name'];}_0x518b53[_0x56c6('0x1c')](_0x345838)['send'](_0x1514ad);};}exports[_0x56c6('0x2c')]=function(_0x559f1d,_0x1f9d9e){var _0x5c9cb1={},_0x505470={},_0x26ec5e={'count':0x0,'rows':[]};var _0xc80393=_['map'](db[_0x56c6('0x2d')][_0x56c6('0x2e')],function(_0x13cfb){return{'name':_0x13cfb[_0x56c6('0x2f')],'type':_0x13cfb['type'][_0x56c6('0x30')]};});_0x505470[_0x56c6('0x31')]=_[_0x56c6('0x32')](_0xc80393,'name');_0x505470[_0x56c6('0x33')]=_['keys'](_0x559f1d['query']);_0x505470[_0x56c6('0x34')]=_[_0x56c6('0x35')](_0x505470[_0x56c6('0x31')],_0x505470[_0x56c6('0x33')]);_0x5c9cb1[_0x56c6('0x36')]=_[_0x56c6('0x35')](_0x505470[_0x56c6('0x31')],qs[_0x56c6('0x37')](_0x559f1d[_0x56c6('0x33')]['fields']));_0x5c9cb1[_0x56c6('0x36')]=_0x5c9cb1[_0x56c6('0x36')][_0x56c6('0x38')]?_0x5c9cb1['attributes']:_0x505470[_0x56c6('0x31')];if(!_0x559f1d[_0x56c6('0x33')][_0x56c6('0x39')]('nolimit')){_0x5c9cb1[_0x56c6('0x21')]=qs[_0x56c6('0x21')](_0x559f1d[_0x56c6('0x33')][_0x56c6('0x21')]);_0x5c9cb1[_0x56c6('0x1f')]=qs[_0x56c6('0x1f')](_0x559f1d[_0x56c6('0x33')][_0x56c6('0x1f')]);}_0x5c9cb1['order']=qs[_0x56c6('0x3a')](_0x559f1d[_0x56c6('0x33')]['sort']);_0x5c9cb1[_0x56c6('0x3b')]=qs[_0x56c6('0x34')](_['pick'](_0x559f1d['query'],_0x505470['filters']),_0xc80393);if(_0x559f1d['query'][_0x56c6('0x3c')]){_0x5c9cb1[_0x56c6('0x3b')]=_[_0x56c6('0x3d')](_0x5c9cb1[_0x56c6('0x3b')],{'$or':[{'key':{'$like':'%'+_0x559f1d[_0x56c6('0x33')][_0x56c6('0x3c')]+'%'}},{'value':{'$like':'%'+_0x559f1d[_0x56c6('0x33')]['filter']+'%'}}]});}_0x5c9cb1=_[_0x56c6('0x3d')]({},_0x5c9cb1,_0x559f1d['options']);var _0x5e8617={'where':_0x5c9cb1[_0x56c6('0x3b')]};return db[_0x56c6('0x2d')]['count'](_0x5e8617)[_0x56c6('0x27')](function(_0x40c31f){_0x26ec5e['count']=_0x40c31f;if(_0x559f1d[_0x56c6('0x33')][_0x56c6('0x3e')]){_0x5c9cb1[_0x56c6('0x3f')]=[{'all':!![]}];}return db[_0x56c6('0x2d')][_0x56c6('0x40')](_0x5c9cb1);})[_0x56c6('0x27')](function(_0x4724fc){_0x26ec5e[_0x56c6('0x41')]=_0x4724fc;return _0x26ec5e;})[_0x56c6('0x27')](respondWithFilteredResult(_0x1f9d9e,_0x5c9cb1))[_0x56c6('0x42')](handleError(_0x1f9d9e,null));};exports[_0x56c6('0x43')]=function(_0x383bcc,_0x608898){var _0x321162={'raw':!![],'where':{'id':_0x383bcc[_0x56c6('0x44')]['id']}},_0x263e9c={};_0x263e9c[_0x56c6('0x31')]=_['keys'](db[_0x56c6('0x2d')][_0x56c6('0x2e')]);_0x263e9c[_0x56c6('0x33')]=_[_0x56c6('0x45')](_0x383bcc[_0x56c6('0x33')]);_0x263e9c[_0x56c6('0x34')]=_[_0x56c6('0x35')](_0x263e9c['model'],_0x263e9c[_0x56c6('0x33')]);_0x321162[_0x56c6('0x36')]=_[_0x56c6('0x35')](_0x263e9c[_0x56c6('0x31')],qs[_0x56c6('0x37')](_0x383bcc[_0x56c6('0x33')][_0x56c6('0x37')]));_0x321162[_0x56c6('0x36')]=_0x321162[_0x56c6('0x36')][_0x56c6('0x38')]?_0x321162[_0x56c6('0x36')]:_0x263e9c['model'];if(_0x383bcc[_0x56c6('0x33')][_0x56c6('0x3e')]){_0x321162['include']=[{'all':!![]}];}_0x321162=_['merge']({},_0x321162,_0x383bcc[_0x56c6('0x46')]);return db[_0x56c6('0x2d')][_0x56c6('0x47')](_0x321162)[_0x56c6('0x27')](handleEntityNotFound(_0x608898,null))[_0x56c6('0x27')](respondWithResult(_0x608898,null))[_0x56c6('0x42')](handleError(_0x608898,null));};exports['update']=function(_0xacaa7b,_0x2859ef){if(_0xacaa7b[_0x56c6('0x48')]['id']){delete _0xacaa7b[_0x56c6('0x48')]['id'];}return db[_0x56c6('0x2d')][_0x56c6('0x47')]({'where':{'id':_0xacaa7b[_0x56c6('0x44')]['id']}})[_0x56c6('0x27')](handleEntityNotFound(_0x2859ef,null))['then'](saveUpdates(_0xacaa7b['body'],null))[_0x56c6('0x27')](respondWithResult(_0x2859ef,null))['catch'](handleError(_0x2859ef,null));};exports[_0x56c6('0x26')]=function(_0xcf4257,_0x2a7ef4){return db[_0x56c6('0x2d')][_0x56c6('0x47')]({'where':{'id':_0xcf4257[_0x56c6('0x44')]['id']}})[_0x56c6('0x27')](handleEntityNotFound(_0x2a7ef4,null))[_0x56c6('0x27')](removeEntity(_0x2a7ef4,null))[_0x56c6('0x42')](handleError(_0x2a7ef4,null));};exports[_0x56c6('0x49')]=function(_0x375453,_0x2fb378){var _0x226088={'key':_0x375453[_0x56c6('0x48')]['key']};if(_0x375453['body']['MailAccountId']){_0x226088[_0x56c6('0x4a')]=_0x375453['body'][_0x56c6('0x4a')];}else if(_0x375453[_0x56c6('0x48')][_0x56c6('0x4b')]){_0x226088[_0x56c6('0x4b')]=_0x375453[_0x56c6('0x48')][_0x56c6('0x4b')];}else if(_0x375453[_0x56c6('0x48')][_0x56c6('0x4c')]){_0x226088['OpenchannelAccountId']=_0x375453['body'][_0x56c6('0x4c')];}else if(_0x375453[_0x56c6('0x48')][_0x56c6('0x4d')]){_0x226088[_0x56c6('0x4d')]=_0x375453[_0x56c6('0x48')][_0x56c6('0x4d')];}return db[_0x56c6('0x2d')][_0x56c6('0x47')]({'where':_0x226088})[_0x56c6('0x27')](function(_0x507244){if(_0x507244){throw new db[(_0x56c6('0x4e'))]['ValidationError'](_0x56c6('0x4f'));}return db[_0x56c6('0x2d')][_0x56c6('0x49')](_0x375453['body']);})[_0x56c6('0x27')](function(_0x54febb){var _0x46e023=_0x375453['user'][_0x56c6('0x28')]({'plain':!![]});if(!_0x46e023)throw new Error(_0x56c6('0x50'));if(_0x46e023[_0x56c6('0x51')]===_0x56c6('0x52')){var _0x5e211d=_0x54febb[_0x56c6('0x28')]({'plain':!![]});return db[_0x56c6('0x53')][_0x56c6('0x47')]({'where':{'name':_0x56c6('0x29'),'userProfileId':_0x46e023[_0x56c6('0x54')]},'raw':!![]})[_0x56c6('0x27')](function(_0x4d32b6){if(_0x4d32b6&&_0x4d32b6[_0x56c6('0x55')]===0x0){return db['UserProfileResource'][_0x56c6('0x49')]({'name':_0x5e211d[_0x56c6('0x2b')],'resourceId':_0x5e211d['id'],'type':_0x4d32b6[_0x56c6('0x2b')],'sectionId':_0x4d32b6['id']},{})['then'](function(){return _0x54febb;});}else{return _0x54febb;}})[_0x56c6('0x42')](function(_0x59cedd){logger[_0x56c6('0x56')](_0x56c6('0x57'),_0x59cedd);throw _0x59cedd;});}return _0x54febb;})['then'](respondWithResult(_0x2fb378,0xc9))['catch'](handleError(_0x2fb378,null));};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js
index a2a1a41..ca40766 100644
--- a/server/api/cannedAnswer/cannedAnswer.model.js
+++ b/server/api/cannedAnswer/cannedAnswer.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe613=['moment','bluebird','request-promise','path','rimraf','./cannedAnswer.attributes','exports','define','CannedAnswer','utf8mb4','lodash','../../config/logger','api'];(function(_0x3516e3,_0x37061e){var _0x5054e0=function(_0xa3df88){while(--_0xa3df88){_0x3516e3['push'](_0x3516e3['shift']());}};_0x5054e0(++_0x37061e);}(_0xe613,0x128));var _0x3e61=function(_0x308881,_0x3d8420){_0x308881=_0x308881-0x0;var _0x5cade8=_0xe613[_0x308881];return _0x5cade8;};'use strict';var _=require(_0x3e61('0x0'));var util=require('util');var logger=require(_0x3e61('0x1'))(_0x3e61('0x2'));var moment=require(_0x3e61('0x3'));var BPromise=require(_0x3e61('0x4'));var rp=require(_0x3e61('0x5'));var fs=require('fs');var path=require(_0x3e61('0x6'));var rimraf=require(_0x3e61('0x7'));var config=require('../../config/environment');var attributes=require(_0x3e61('0x8'));module[_0x3e61('0x9')]=function(_0x5cb627,_0x2cd559){return _0x5cb627[_0x3e61('0xa')](_0x3e61('0xb'),attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x3e61('0xc'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x8ec3=['exports','define','CannedAnswer','tools_canned_answers','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment'];(function(_0x44bcb0,_0x235aa9){var _0xfaf881=function(_0x25d81d){while(--_0x25d81d){_0x44bcb0['push'](_0x44bcb0['shift']());}};_0xfaf881(++_0x235aa9);}(_0x8ec3,0x19c));var _0x38ec=function(_0x221552,_0x5c88d2){_0x221552=_0x221552-0x0;var _0x8ce807=_0x8ec3[_0x221552];return _0x8ce807;};'use strict';var _=require(_0x38ec('0x0'));var util=require('util');var logger=require(_0x38ec('0x1'))(_0x38ec('0x2'));var moment=require(_0x38ec('0x3'));var BPromise=require(_0x38ec('0x4'));var rp=require(_0x38ec('0x5'));var fs=require('fs');var path=require(_0x38ec('0x6'));var rimraf=require('rimraf');var config=require(_0x38ec('0x7'));var attributes=require('./cannedAnswer.attributes');module[_0x38ec('0x8')]=function(_0x3cff07,_0x314dc2){return _0x3cff07[_0x38ec('0x9')](_0x38ec('0xa'),attributes,{'tableName':_0x38ec('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x38ec('0xc'),'collate':_0x38ec('0xd')});};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js
index 7161788..9acc006 100644
--- a/server/api/cannedAnswer/cannedAnswer.rpc.js
+++ b/server/api/cannedAnswer/cannedAnswer.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x2d168f,_0x3efb39){var _0x1c4b25=function(_0x442948){while(--_0x442948){_0x2d168f['push'](_0x2d168f['shift']());}};_0x1c4b25(++_0x3efb39);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf71120,_0x25b7f9){_0xf71120=_0xf71120-0x0;var _0xbe2fd3=_0xa9e0[_0xf71120];return _0xbe2fd3;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x31b138,_0x2160c9){var _0x9cc8af=function(_0x397d25){while(--_0x397d25){_0x31b138['push'](_0x31b138['shift']());}};_0x9cc8af(++_0x2160c9);}(_0xa9e0,0x123));var _0x0a9e=function(_0x40ac5e,_0x2de228){_0x40ac5e=_0x40ac5e-0x0;var _0x2839d6=_0xa9e0[_0x40ac5e];return _0x2839d6;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
diff --git a/server/api/cannedAnswer/index.js b/server/api/cannedAnswer/index.js
index e48c252..85c04e1 100644
--- a/server/api/cannedAnswer/index.js
+++ b/server/api/cannedAnswer/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x545b=['/:id','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./cannedAnswer.controller','get','isAuthenticated','index'];(function(_0x5c31d1,_0x248ff7){var _0x3f1ab1=function(_0x400795){while(--_0x400795){_0x5c31d1['push'](_0x5c31d1['shift']());}};_0x3f1ab1(++_0x248ff7);}(_0x545b,0xd0));var _0xb545=function(_0x36115d,_0x4071a1){_0x36115d=_0x36115d-0x0;var _0x58cd1f=_0x545b[_0x36115d];return _0x58cd1f;};'use strict';var multer=require(_0xb545('0x0'));var util=require('util');var path=require(_0xb545('0x1'));var timeout=require(_0xb545('0x2'));var express=require(_0xb545('0x3'));var router=express[_0xb545('0x4')]();var fs_extra=require(_0xb545('0x5'));var auth=require(_0xb545('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xb545('0x7'));var controller=require(_0xb545('0x8'));router[_0xb545('0x9')]('/',auth[_0xb545('0xa')](),controller[_0xb545('0xb')]);router[_0xb545('0x9')](_0xb545('0xc'),auth['isAuthenticated'](),controller['show']);router[_0xb545('0xd')]('/',auth[_0xb545('0xa')](),controller[_0xb545('0xe')]);router[_0xb545('0xf')](_0xb545('0xc'),auth['isAuthenticated'](),controller[_0xb545('0x10')]);router[_0xb545('0x11')]('/:id',auth['isAuthenticated'](),controller[_0xb545('0x12')]);module[_0xb545('0x13')]=router;
\ No newline at end of file
+var _0x8525=['../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id','post','put','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x31520d,_0x50046a){var _0x4d0d26=function(_0x187fe0){while(--_0x187fe0){_0x31520d['push'](_0x31520d['shift']());}};_0x4d0d26(++_0x50046a);}(_0x8525,0x12b));var _0x5852=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x8525[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x5852('0x0'));var util=require(_0x5852('0x1'));var path=require('path');var timeout=require(_0x5852('0x2'));var express=require(_0x5852('0x3'));var router=express[_0x5852('0x4')]();var fs_extra=require(_0x5852('0x5'));var auth=require(_0x5852('0x6'));var interaction=require(_0x5852('0x7'));var config=require(_0x5852('0x8'));var controller=require('./cannedAnswer.controller');router['get']('/',auth[_0x5852('0x9')](),controller[_0x5852('0xa')]);router[_0x5852('0xb')](_0x5852('0xc'),auth[_0x5852('0x9')](),controller['show']);router[_0x5852('0xd')]('/',auth[_0x5852('0x9')](),controller['create']);router[_0x5852('0xe')]('/:id',auth[_0x5852('0x9')](),controller['update']);router[_0x5852('0xf')](_0x5852('0xc'),auth[_0x5852('0x9')](),controller[_0x5852('0x10')]);module[_0x5852('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js
index 99964d2..3990e9c 100644
--- a/server/api/cdr/cdr.attributes.js
+++ b/server/api/cdr/cdr.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbf04=['INTEGER','sequelize','exports','DATE','1970-01-01\x2000:00:01','STRING'];(function(_0x401ec9,_0x77c73f){var _0x8ef3a1=function(_0x171c3c){while(--_0x171c3c){_0x401ec9['push'](_0x401ec9['shift']());}};_0x8ef3a1(++_0x77c73f);}(_0xbf04,0xc1));var _0x4bf0=function(_0x4140a6,_0x493bb2){_0x4140a6=_0x4140a6-0x0;var _0x202fee=_0xbf04[_0x4140a6];return _0x202fee;};'use strict';var Sequelize=require(_0x4bf0('0x0'));module[_0x4bf0('0x1')]={'calldate':{'type':Sequelize[_0x4bf0('0x2')],'allowNull':![],'defaultValue':_0x4bf0('0x3')},'clid':{'type':Sequelize['STRING']},'src':{'type':Sequelize[_0x4bf0('0x4')]},'dst':{'type':Sequelize[_0x4bf0('0x4')]},'dcontext':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize[_0x4bf0('0x4')]},'lastapp':{'type':Sequelize[_0x4bf0('0x4')]},'lastdata':{'type':Sequelize['STRING']},'duration':{'type':Sequelize[_0x4bf0('0x5')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x4bf0('0x5')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x4bf0('0x4')]},'amaflags':{'type':Sequelize[_0x4bf0('0x5')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize[_0x4bf0('0x4')]},'uniqueid':{'type':Sequelize[_0x4bf0('0x4')]},'linkedid':{'type':Sequelize[_0x4bf0('0x4')]},'sequence':{'type':Sequelize[_0x4bf0('0x4')]},'peeraccount':{'type':Sequelize[_0x4bf0('0x4')]},'type':{'type':Sequelize['STRING']},'tag':{'type':Sequelize[_0x4bf0('0x4')]}};
\ No newline at end of file
+var _0xd85c=['INTEGER','sequelize','exports','DATE','1970-01-01\x2000:00:01','STRING'];(function(_0x20f4ff,_0x1bbe89){var _0x17687b=function(_0x572d13){while(--_0x572d13){_0x20f4ff['push'](_0x20f4ff['shift']());}};_0x17687b(++_0x1bbe89);}(_0xd85c,0xb5));var _0xcd85=function(_0x3846dc,_0x3dd50f){_0x3846dc=_0x3846dc-0x0;var _0x3c2cae=_0xd85c[_0x3846dc];return _0x3c2cae;};'use strict';var Sequelize=require(_0xcd85('0x0'));module[_0xcd85('0x1')]={'calldate':{'type':Sequelize[_0xcd85('0x2')],'allowNull':![],'defaultValue':_0xcd85('0x3')},'clid':{'type':Sequelize[_0xcd85('0x4')]},'src':{'type':Sequelize[_0xcd85('0x4')]},'dst':{'type':Sequelize[_0xcd85('0x4')]},'dcontext':{'type':Sequelize[_0xcd85('0x4')]},'channel':{'type':Sequelize[_0xcd85('0x4')]},'dstchannel':{'type':Sequelize[_0xcd85('0x4')]},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0xcd85('0x4')]},'duration':{'type':Sequelize[_0xcd85('0x5')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0xcd85('0x5')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xcd85('0x4')]},'amaflags':{'type':Sequelize[_0xcd85('0x5')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xcd85('0x4')]},'userfield':{'type':Sequelize[_0xcd85('0x4')]},'uniqueid':{'type':Sequelize[_0xcd85('0x4')]},'linkedid':{'type':Sequelize[_0xcd85('0x4')]},'sequence':{'type':Sequelize[_0xcd85('0x4')]},'peeraccount':{'type':Sequelize[_0xcd85('0x4')]},'type':{'type':Sequelize['STRING']},'tag':{'type':Sequelize[_0xcd85('0x4')]}};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js
index 8e3b1fa..dbf1e64 100644
--- a/server/api/cdr/cdr.controller.js
+++ b/server/api/cdr/cdr.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x038b=['lodash','squel','crypto','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','json','reject','save','update','then','error','name','index','map','Cdr','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','findAll','catch','show','length','include','options','create','body','find','params','destroy','describe','rimraf','zip-dir','fast-json-patch','moment','mustache','util','sox','to-csv'];(function(_0x3358ba,_0x24c5fc){var _0x296e73=function(_0x843ff3){while(--_0x843ff3){_0x3358ba['push'](_0x3358ba['shift']());}};_0x296e73(++_0x24c5fc);}(_0x038b,0x114));var _0xb038=function(_0x1f7276,_0x7f7dbe){_0x1f7276=_0x1f7276-0x0;var _0x4fef7a=_0x038b[_0x1f7276];return _0x4fef7a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb038('0x0'));var zipdir=require(_0xb038('0x1'));var jsonpatch=require(_0xb038('0x2'));var rp=require('request-promise');var moment=require(_0xb038('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xb038('0x4'));var util=require(_0xb038('0x5'));var path=require('path');var sox=require(_0xb038('0x6'));var csv=require(_0xb038('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb038('0x8'));var squel=require(_0xb038('0x9'));var crypto=require(_0xb038('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xb038('0x7'));var querystring=require(_0xb038('0xb'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xb038('0xc'));var qs=require(_0xb038('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb038('0xe'));var logger=require(_0xb038('0xf'))(_0xb038('0x10'));var utils=require(_0xb038('0x11'));var config=require(_0xb038('0x12'));var licenseUtil=require(_0xb038('0x13'));var db=require(_0xb038('0x14'))['db'];function respondWithStatusCode(_0x439751,_0x16e4a3){_0x16e4a3=_0x16e4a3||0xcc;return function(_0x57acd8){if(_0x57acd8){return _0x439751[_0xb038('0x15')](_0x16e4a3);}return _0x439751[_0xb038('0x16')](_0x16e4a3)[_0xb038('0x17')]();};}function respondWithResult(_0x3cc717,_0x3a71a6){_0x3a71a6=_0x3a71a6||0xc8;return function(_0x13acc7){if(_0x13acc7){return _0x3cc717[_0xb038('0x16')](_0x3a71a6)['json'](_0x13acc7);}};}function respondWithFilteredResult(_0xe8aa7c,_0x26e4f2){return function(_0x183141){if(_0x183141){var _0x39323e=typeof _0x26e4f2[_0xb038('0x18')]===_0xb038('0x19')&&typeof _0x26e4f2['limit']===_0xb038('0x19');var _0x3039b0=_0x183141[_0xb038('0x1a')];var _0x3b095a=_0x39323e?0x0:_0x26e4f2['offset'];var _0x49b237=_0x39323e?_0x183141[_0xb038('0x1a')]:_0x26e4f2[_0xb038('0x18')]+_0x26e4f2[_0xb038('0x1b')];var _0x31c348;if(_0x49b237>=_0x3039b0){_0x49b237=_0x3039b0;_0x31c348=0xc8;}else{_0x31c348=0xce;}_0xe8aa7c['status'](_0x31c348);return _0xe8aa7c[_0xb038('0x1c')](_0xb038('0x1d'),_0x3b095a+'-'+_0x49b237+'/'+_0x3039b0)[_0xb038('0x1e')](_0x183141);}return null;};}function patchUpdates(_0x33a377){return function(_0xc6cd61){try{jsonpatch['apply'](_0xc6cd61,_0x33a377,!![]);}catch(_0x2e0369){return BPromise[_0xb038('0x1f')](_0x2e0369);}return _0xc6cd61[_0xb038('0x20')]();};}function saveUpdates(_0x87b899,_0x5f123d){return function(_0x2812c9){if(_0x2812c9){return _0x2812c9[_0xb038('0x21')](_0x87b899)['then'](function(_0x1eb9cd){return _0x1eb9cd;});}return null;};}function removeEntity(_0x43d403,_0x573f93){return function(_0x241329){if(_0x241329){return _0x241329['destroy']()[_0xb038('0x22')](function(){_0x43d403[_0xb038('0x16')](0xcc)[_0xb038('0x17')]();});}};}function handleEntityNotFound(_0x1df7c4,_0x5d4343){return function(_0xe4ceda){if(!_0xe4ceda){_0x1df7c4[_0xb038('0x15')](0x194);}return _0xe4ceda;};}function handleError(_0x576be5,_0xb6d93f){_0xb6d93f=_0xb6d93f||0x1f4;return function(_0x33cf3c){logger[_0xb038('0x23')](_0x33cf3c['stack']);if(_0x33cf3c[_0xb038('0x24')]){delete _0x33cf3c[_0xb038('0x24')];}_0x576be5[_0xb038('0x16')](_0xb6d93f)['send'](_0x33cf3c);};}exports[_0xb038('0x25')]=function(_0x2855a6,_0x28a6a9){var _0x12b3b6={},_0xc387d={},_0x551b55={'count':0x0,'rows':[]};var _0x1783d4=_[_0xb038('0x26')](db[_0xb038('0x27')][_0xb038('0x28')],function(_0x1abe23){return{'name':_0x1abe23[_0xb038('0x29')],'type':_0x1abe23[_0xb038('0x2a')][_0xb038('0x2b')]};});_0xc387d[_0xb038('0x2c')]=_[_0xb038('0x26')](_0x1783d4,_0xb038('0x24'));_0xc387d[_0xb038('0x2d')]=_[_0xb038('0x2e')](_0x2855a6['query']);_0xc387d[_0xb038('0x2f')]=_['intersection'](_0xc387d[_0xb038('0x2c')],_0xc387d[_0xb038('0x2d')]);_0x12b3b6[_0xb038('0x30')]=_[_0xb038('0x31')](_0xc387d[_0xb038('0x2c')],qs[_0xb038('0x32')](_0x2855a6[_0xb038('0x2d')][_0xb038('0x32')]));_0x12b3b6[_0xb038('0x30')]=_0x12b3b6[_0xb038('0x30')]['length']?_0x12b3b6[_0xb038('0x30')]:_0xc387d[_0xb038('0x2c')];if(!_0x2855a6[_0xb038('0x2d')]['hasOwnProperty']('nolimit')){_0x12b3b6['limit']=qs[_0xb038('0x1b')](_0x2855a6[_0xb038('0x2d')][_0xb038('0x1b')]);_0x12b3b6[_0xb038('0x18')]=qs[_0xb038('0x18')](_0x2855a6[_0xb038('0x2d')]['offset']);}_0x12b3b6[_0xb038('0x33')]=qs[_0xb038('0x34')](_0x2855a6[_0xb038('0x2d')][_0xb038('0x34')]);_0x12b3b6['where']=qs[_0xb038('0x2f')](_[_0xb038('0x35')](_0x2855a6['query'],_0xc387d['filters']),_0x1783d4);if(_0x2855a6[_0xb038('0x2d')][_0xb038('0x36')]){_0x12b3b6[_0xb038('0x37')]=_[_0xb038('0x38')](_0x12b3b6[_0xb038('0x37')],{'$or':_['map'](_0x1783d4,function(_0x404f82){if(_0x404f82[_0xb038('0x2a')]!==_0xb038('0x39')){var _0x2d1e57={};_0x2d1e57[_0x404f82['name']]={'$like':'%'+_0x2855a6[_0xb038('0x2d')][_0xb038('0x36')]+'%'};return _0x2d1e57;}})});}_0x12b3b6=_[_0xb038('0x38')]({},_0x12b3b6,_0x2855a6['options']);var _0x412d71={'where':_0x12b3b6['where']};return db[_0xb038('0x27')][_0xb038('0x1a')](_0x412d71)[_0xb038('0x22')](function(_0x5ce40c){_0x551b55[_0xb038('0x1a')]=_0x5ce40c;if(_0x2855a6[_0xb038('0x2d')][_0xb038('0x3a')]){_0x12b3b6['include']=[{'all':!![]}];}return db[_0xb038('0x27')][_0xb038('0x3b')](_0x12b3b6);})[_0xb038('0x22')](function(_0x3c291e){_0x551b55['rows']=_0x3c291e;return _0x551b55;})[_0xb038('0x22')](respondWithFilteredResult(_0x28a6a9,_0x12b3b6))[_0xb038('0x3c')](handleError(_0x28a6a9,null));};exports[_0xb038('0x3d')]=function(_0x2a0436,_0x52e1d6){var _0x19dc7b={'raw':!![],'where':{'id':_0x2a0436['params']['id']}},_0x269c7d={};_0x269c7d[_0xb038('0x2c')]=_[_0xb038('0x2e')](db[_0xb038('0x27')]['rawAttributes']);_0x269c7d[_0xb038('0x2d')]=_[_0xb038('0x2e')](_0x2a0436['query']);_0x269c7d['filters']=_[_0xb038('0x31')](_0x269c7d[_0xb038('0x2c')],_0x269c7d[_0xb038('0x2d')]);_0x19dc7b[_0xb038('0x30')]=_[_0xb038('0x31')](_0x269c7d[_0xb038('0x2c')],qs[_0xb038('0x32')](_0x2a0436[_0xb038('0x2d')]['fields']));_0x19dc7b['attributes']=_0x19dc7b['attributes'][_0xb038('0x3e')]?_0x19dc7b[_0xb038('0x30')]:_0x269c7d['model'];if(_0x2a0436[_0xb038('0x2d')][_0xb038('0x3a')]){_0x19dc7b[_0xb038('0x3f')]=[{'all':!![]}];}_0x19dc7b=_['merge']({},_0x19dc7b,_0x2a0436[_0xb038('0x40')]);return db['Cdr']['find'](_0x19dc7b)[_0xb038('0x22')](handleEntityNotFound(_0x52e1d6,null))[_0xb038('0x22')](respondWithResult(_0x52e1d6,null))[_0xb038('0x3c')](handleError(_0x52e1d6,null));};exports[_0xb038('0x41')]=function(_0x304515,_0x3b09e3){return db[_0xb038('0x27')][_0xb038('0x41')](_0x304515[_0xb038('0x42')],{})[_0xb038('0x22')](respondWithResult(_0x3b09e3,0xc9))['catch'](handleError(_0x3b09e3,null));};exports[_0xb038('0x21')]=function(_0x3ed968,_0x5c11d7){if(_0x3ed968[_0xb038('0x42')]['id']){delete _0x3ed968[_0xb038('0x42')]['id'];}return db['Cdr'][_0xb038('0x43')]({'where':{'id':_0x3ed968[_0xb038('0x44')]['id']}})[_0xb038('0x22')](handleEntityNotFound(_0x5c11d7,null))[_0xb038('0x22')](saveUpdates(_0x3ed968[_0xb038('0x42')],null))[_0xb038('0x22')](respondWithResult(_0x5c11d7,null))[_0xb038('0x3c')](handleError(_0x5c11d7,null));};exports[_0xb038('0x45')]=function(_0x3a291d,_0x54a826){return db[_0xb038('0x27')][_0xb038('0x43')]({'where':{'id':_0x3a291d[_0xb038('0x44')]['id']}})[_0xb038('0x22')](handleEntityNotFound(_0x54a826,null))[_0xb038('0x22')](removeEntity(_0x54a826,null))[_0xb038('0x3c')](handleError(_0x54a826,null));};exports['describe']=function(_0x1f4997,_0x2f3622){return db[_0xb038('0x27')][_0xb038('0x46')]()[_0xb038('0x22')](respondWithResult(_0x2f3622,null))[_0xb038('0x3c')](handleError(_0x2f3622,null));};
\ No newline at end of file
+var _0xc21e=['length','hasOwnProperty','nolimit','where','pick','filter','VIRTUAL','options','includeAll','include','findAll','rows','catch','keys','merge','find','create','body','params','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','reject','save','update','destroy','then','end','error','stack','name','index','map','Cdr','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes'];(function(_0x3ee8d5,_0x3770b4){var _0x37a82d=function(_0x1a0523){while(--_0x1a0523){_0x3ee8d5['push'](_0x3ee8d5['shift']());}};_0x37a82d(++_0x3770b4);}(_0xc21e,0x1ca));var _0xec21=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xc21e[_0x59ee6f];return _0x4c0979;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xec21('0x0'));var zipdir=require(_0xec21('0x1'));var jsonpatch=require(_0xec21('0x2'));var rp=require(_0xec21('0x3'));var moment=require(_0xec21('0x4'));var BPromise=require(_0xec21('0x5'));var Mustache=require('mustache');var util=require(_0xec21('0x6'));var path=require(_0xec21('0x7'));var sox=require(_0xec21('0x8'));var csv=require(_0xec21('0x9'));var ejs=require(_0xec21('0xa'));var fs=require('fs');var fs_extra=require(_0xec21('0xb'));var _=require(_0xec21('0xc'));var squel=require(_0xec21('0xd'));var crypto=require('crypto');var jsforce=require(_0xec21('0xe'));var deskjs=require(_0xec21('0xf'));var toCsv=require(_0xec21('0x9'));var querystring=require(_0xec21('0x10'));var Papa=require(_0xec21('0x11'));var Redis=require('ioredis');var authService=require(_0xec21('0x12'));var qs=require(_0xec21('0x13'));var as=require(_0xec21('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xec21('0x15'));var utils=require(_0xec21('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xec21('0x17'));var db=require(_0xec21('0x18'))['db'];function respondWithStatusCode(_0xd9232e,_0x3a6e6a){_0x3a6e6a=_0x3a6e6a||0xcc;return function(_0xc1cca0){if(_0xc1cca0){return _0xd9232e['sendStatus'](_0x3a6e6a);}return _0xd9232e[_0xec21('0x19')](_0x3a6e6a)['end']();};}function respondWithResult(_0x3ea83f,_0x1987f4){_0x1987f4=_0x1987f4||0xc8;return function(_0x34e6af){if(_0x34e6af){return _0x3ea83f['status'](_0x1987f4)[_0xec21('0x1a')](_0x34e6af);}};}function respondWithFilteredResult(_0x3ee6f7,_0x3838c3){return function(_0x2c3124){if(_0x2c3124){var _0x324853=typeof _0x3838c3[_0xec21('0x1b')]===_0xec21('0x1c')&&typeof _0x3838c3[_0xec21('0x1d')]==='undefined';var _0x398c29=_0x2c3124[_0xec21('0x1e')];var _0x2fcbcc=_0x324853?0x0:_0x3838c3[_0xec21('0x1b')];var _0x3ab226=_0x324853?_0x2c3124[_0xec21('0x1e')]:_0x3838c3[_0xec21('0x1b')]+_0x3838c3[_0xec21('0x1d')];var _0x3c790e;if(_0x3ab226>=_0x398c29){_0x3ab226=_0x398c29;_0x3c790e=0xc8;}else{_0x3c790e=0xce;}_0x3ee6f7[_0xec21('0x19')](_0x3c790e);return _0x3ee6f7['set']('Content-Range',_0x2fcbcc+'-'+_0x3ab226+'/'+_0x398c29)[_0xec21('0x1a')](_0x2c3124);}return null;};}function patchUpdates(_0x2f4ef9){return function(_0x5ab97e){try{jsonpatch['apply'](_0x5ab97e,_0x2f4ef9,!![]);}catch(_0x176b59){return BPromise[_0xec21('0x1f')](_0x176b59);}return _0x5ab97e[_0xec21('0x20')]();};}function saveUpdates(_0x5dff00,_0x17d1ac){return function(_0x1f86d2){if(_0x1f86d2){return _0x1f86d2[_0xec21('0x21')](_0x5dff00)['then'](function(_0x20ede9){return _0x20ede9;});}return null;};}function removeEntity(_0x454d31,_0x2d521a){return function(_0x46fd9e){if(_0x46fd9e){return _0x46fd9e[_0xec21('0x22')]()[_0xec21('0x23')](function(){_0x454d31['status'](0xcc)[_0xec21('0x24')]();});}};}function handleEntityNotFound(_0x26cdae,_0x4cd699){return function(_0x19b556){if(!_0x19b556){_0x26cdae['sendStatus'](0x194);}return _0x19b556;};}function handleError(_0x27e2d,_0x49fd27){_0x49fd27=_0x49fd27||0x1f4;return function(_0x4ef840){logger[_0xec21('0x25')](_0x4ef840[_0xec21('0x26')]);if(_0x4ef840[_0xec21('0x27')]){delete _0x4ef840[_0xec21('0x27')];}_0x27e2d[_0xec21('0x19')](_0x49fd27)['send'](_0x4ef840);};}exports[_0xec21('0x28')]=function(_0x592971,_0x343f4f){var _0x233bf9={},_0x116a23={},_0x35b2bf={'count':0x0,'rows':[]};var _0x4dd56b=_[_0xec21('0x29')](db[_0xec21('0x2a')][_0xec21('0x2b')],function(_0x233231){return{'name':_0x233231[_0xec21('0x2c')],'type':_0x233231[_0xec21('0x2d')][_0xec21('0x2e')]};});_0x116a23[_0xec21('0x2f')]=_[_0xec21('0x29')](_0x4dd56b,_0xec21('0x27'));_0x116a23[_0xec21('0x30')]=_['keys'](_0x592971[_0xec21('0x30')]);_0x116a23[_0xec21('0x31')]=_[_0xec21('0x32')](_0x116a23[_0xec21('0x2f')],_0x116a23[_0xec21('0x30')]);_0x233bf9['attributes']=_[_0xec21('0x32')](_0x116a23['model'],qs['fields'](_0x592971['query'][_0xec21('0x33')]));_0x233bf9[_0xec21('0x34')]=_0x233bf9[_0xec21('0x34')][_0xec21('0x35')]?_0x233bf9[_0xec21('0x34')]:_0x116a23[_0xec21('0x2f')];if(!_0x592971[_0xec21('0x30')][_0xec21('0x36')](_0xec21('0x37'))){_0x233bf9[_0xec21('0x1d')]=qs[_0xec21('0x1d')](_0x592971[_0xec21('0x30')]['limit']);_0x233bf9[_0xec21('0x1b')]=qs[_0xec21('0x1b')](_0x592971['query'][_0xec21('0x1b')]);}_0x233bf9['order']=qs['sort'](_0x592971[_0xec21('0x30')]['sort']);_0x233bf9[_0xec21('0x38')]=qs['filters'](_[_0xec21('0x39')](_0x592971[_0xec21('0x30')],_0x116a23['filters']),_0x4dd56b);if(_0x592971[_0xec21('0x30')][_0xec21('0x3a')]){_0x233bf9[_0xec21('0x38')]=_['merge'](_0x233bf9[_0xec21('0x38')],{'$or':_[_0xec21('0x29')](_0x4dd56b,function(_0xcce304){if(_0xcce304['type']!==_0xec21('0x3b')){var _0x2cf43b={};_0x2cf43b[_0xcce304[_0xec21('0x27')]]={'$like':'%'+_0x592971[_0xec21('0x30')][_0xec21('0x3a')]+'%'};return _0x2cf43b;}})});}_0x233bf9=_['merge']({},_0x233bf9,_0x592971[_0xec21('0x3c')]);var _0xc36cc2={'where':_0x233bf9['where']};return db[_0xec21('0x2a')]['count'](_0xc36cc2)[_0xec21('0x23')](function(_0x18e20d){_0x35b2bf[_0xec21('0x1e')]=_0x18e20d;if(_0x592971['query'][_0xec21('0x3d')]){_0x233bf9[_0xec21('0x3e')]=[{'all':!![]}];}return db[_0xec21('0x2a')][_0xec21('0x3f')](_0x233bf9);})['then'](function(_0x575e99){_0x35b2bf[_0xec21('0x40')]=_0x575e99;return _0x35b2bf;})['then'](respondWithFilteredResult(_0x343f4f,_0x233bf9))[_0xec21('0x41')](handleError(_0x343f4f,null));};exports['show']=function(_0x16a794,_0x52e024){var _0x46d4f4={'raw':!![],'where':{'id':_0x16a794['params']['id']}},_0x3510dd={};_0x3510dd[_0xec21('0x2f')]=_[_0xec21('0x42')](db['Cdr'][_0xec21('0x2b')]);_0x3510dd[_0xec21('0x30')]=_[_0xec21('0x42')](_0x16a794[_0xec21('0x30')]);_0x3510dd[_0xec21('0x31')]=_[_0xec21('0x32')](_0x3510dd[_0xec21('0x2f')],_0x3510dd[_0xec21('0x30')]);_0x46d4f4[_0xec21('0x34')]=_['intersection'](_0x3510dd['model'],qs[_0xec21('0x33')](_0x16a794[_0xec21('0x30')][_0xec21('0x33')]));_0x46d4f4['attributes']=_0x46d4f4[_0xec21('0x34')][_0xec21('0x35')]?_0x46d4f4[_0xec21('0x34')]:_0x3510dd['model'];if(_0x16a794['query']['includeAll']){_0x46d4f4[_0xec21('0x3e')]=[{'all':!![]}];}_0x46d4f4=_[_0xec21('0x43')]({},_0x46d4f4,_0x16a794[_0xec21('0x3c')]);return db[_0xec21('0x2a')][_0xec21('0x44')](_0x46d4f4)[_0xec21('0x23')](handleEntityNotFound(_0x52e024,null))[_0xec21('0x23')](respondWithResult(_0x52e024,null))['catch'](handleError(_0x52e024,null));};exports[_0xec21('0x45')]=function(_0x21fe90,_0x2edf34){return db[_0xec21('0x2a')][_0xec21('0x45')](_0x21fe90[_0xec21('0x46')],{})[_0xec21('0x23')](respondWithResult(_0x2edf34,0xc9))[_0xec21('0x41')](handleError(_0x2edf34,null));};exports['update']=function(_0x4204d7,_0x21e67f){if(_0x4204d7[_0xec21('0x46')]['id']){delete _0x4204d7['body']['id'];}return db['Cdr']['find']({'where':{'id':_0x4204d7[_0xec21('0x47')]['id']}})[_0xec21('0x23')](handleEntityNotFound(_0x21e67f,null))['then'](saveUpdates(_0x4204d7[_0xec21('0x46')],null))[_0xec21('0x23')](respondWithResult(_0x21e67f,null))[_0xec21('0x41')](handleError(_0x21e67f,null));};exports['destroy']=function(_0x2d6426,_0x5e90eb){return db[_0xec21('0x2a')]['find']({'where':{'id':_0x2d6426[_0xec21('0x47')]['id']}})[_0xec21('0x23')](handleEntityNotFound(_0x5e90eb,null))[_0xec21('0x23')](removeEntity(_0x5e90eb,null))[_0xec21('0x41')](handleError(_0x5e90eb,null));};exports[_0xec21('0x48')]=function(_0x5c994d,_0x157d42){return db['Cdr'][_0xec21('0x48')]()['then'](respondWithResult(_0x157d42,null))[_0xec21('0x41')](handleError(_0x157d42,null));};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js
index 909038a..1798af1 100644
--- a/server/api/cdr/cdr.model.js
+++ b/server/api/cdr/cdr.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['Cdr','cdr','accountcode','disposition','dst','src','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports'];(function(_0x12cd9b,_0x32e030){var _0x56891f=function(_0x1a7cdb){while(--_0x1a7cdb){_0x12cd9b['push'](_0x12cd9b['shift']());}};_0x56891f(++_0x32e030);}(_0x7a54,0x106));var _0x47a5=function(_0x49b3e0,_0x4d6d9c){_0x49b3e0=_0x49b3e0-0x0;var _0x4dfd4b=_0x7a54[_0x49b3e0];return _0x4dfd4b;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'accountcode','fields':[_0x47a5('0xc')]},{'name':'calldate','fields':['calldate']},{'name':'disposition','fields':[_0x47a5('0xd')]},{'name':_0x47a5('0xe'),'fields':['dst']},{'name':_0x47a5('0xf'),'fields':['src']},{'name':'uniqueid','fields':[_0x47a5('0x10')]}],'timestamps':![]});};
\ No newline at end of file
+var _0x7a54=['Cdr','cdr','accountcode','disposition','dst','src','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports'];(function(_0x1b305a,_0xbf1573){var _0x58292e=function(_0x133034){while(--_0x133034){_0x1b305a['push'](_0x1b305a['shift']());}};_0x58292e(++_0xbf1573);}(_0x7a54,0x106));var _0x47a5=function(_0xfba768,_0x298617){_0xfba768=_0xfba768-0x0;var _0x2b36de=_0x7a54[_0xfba768];return _0x2b36de;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'accountcode','fields':[_0x47a5('0xc')]},{'name':'calldate','fields':['calldate']},{'name':'disposition','fields':[_0x47a5('0xd')]},{'name':_0x47a5('0xe'),'fields':['dst']},{'name':_0x47a5('0xf'),'fields':['src']},{'name':'uniqueid','fields':[_0x47a5('0x10')]}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js
index 1c5c036..2df8120 100644
--- a/server/api/cdr/cdr.rpc.js
+++ b/server/api/cdr/cdr.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7731=['result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','message'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x7731,0x120));var _0x1773=function(_0x3090e2,_0x3a1dbf){_0x3090e2=_0x3090e2-0x0;var _0x53fa59=_0x7731[_0x3090e2];return _0x53fa59;};'use strict';var _=require('lodash');var util=require(_0x1773('0x0'));var moment=require('moment');var BPromise=require(_0x1773('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1773('0x2'));var db=require(_0x1773('0x3'))['db'];var utils=require(_0x1773('0x4'));var logger=require('../../config/logger')(_0x1773('0x5'));var config=require(_0x1773('0x6'));var jayson=require(_0x1773('0x7'));var client=jayson[_0x1773('0x8')][_0x1773('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x67106c,_0x4e0487,_0x209515){return new BPromise(function(_0x18e4c4,_0x2434b5){return client[_0x1773('0xa')](_0x67106c,_0x209515)[_0x1773('0xb')](function(_0x91d79c){logger[_0x1773('0xc')](_0x1773('0xd'),_0x4e0487,_0x1773('0xe'));logger[_0x1773('0xf')](_0x1773('0x10'),_0x4e0487,_0x1773('0xe'),JSON[_0x1773('0x11')](_0x91d79c));if(_0x91d79c[_0x1773('0x12')]){if(_0x91d79c['error']['code']===0x1f4){logger[_0x1773('0x12')](_0x1773('0xd'),_0x4e0487,_0x91d79c['error'][_0x1773('0x13')]);return _0x2434b5(_0x91d79c[_0x1773('0x12')]['message']);}logger[_0x1773('0x12')](_0x1773('0xd'),_0x4e0487,_0x91d79c['error'][_0x1773('0x13')]);return _0x18e4c4(_0x91d79c['error'][_0x1773('0x13')]);}else{logger[_0x1773('0xc')](_0x1773('0xd'),_0x4e0487,_0x1773('0xe'));_0x18e4c4(_0x91d79c[_0x1773('0x14')][_0x1773('0x13')]);}})[_0x1773('0x15')](function(_0x28bf7d){logger[_0x1773('0x12')]('Cdr,\x20%s,\x20%s',_0x4e0487,_0x28bf7d);_0x2434b5(_0x28bf7d);});});}
\ No newline at end of file
+var _0xd440=['ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x495954,_0x40c155){var _0x70c551=function(_0xeb8f2d){while(--_0xeb8f2d){_0x495954['push'](_0x495954['shift']());}};_0x70c551(++_0x40c155);}(_0xd440,0x14b));var _0x0d44=function(_0x5ea956,_0x4ddb8a){_0x5ea956=_0x5ea956-0x0;var _0x24567e=_0xd440[_0x5ea956];return _0x24567e;};'use strict';var _=require(_0x0d44('0x0'));var util=require(_0x0d44('0x1'));var moment=require(_0x0d44('0x2'));var BPromise=require(_0x0d44('0x3'));var rs=require(_0x0d44('0x4'));var fs=require('fs');var Redis=require(_0x0d44('0x5'));var db=require(_0x0d44('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x0d44('0x7'))(_0x0d44('0x8'));var config=require(_0x0d44('0x9'));var jayson=require(_0x0d44('0xa'));var client=jayson['client'][_0x0d44('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1c6eb2,_0x509bf0,_0x25f9b5){return new BPromise(function(_0x338cb9,_0x25a2ab){return client[_0x0d44('0xc')](_0x1c6eb2,_0x25f9b5)[_0x0d44('0xd')](function(_0x376f40){logger[_0x0d44('0xe')](_0x0d44('0xf'),_0x509bf0,_0x0d44('0x10'));logger[_0x0d44('0x11')]('Cdr,\x20%s,\x20%s,\x20%s',_0x509bf0,_0x0d44('0x10'),JSON[_0x0d44('0x12')](_0x376f40));if(_0x376f40[_0x0d44('0x13')]){if(_0x376f40[_0x0d44('0x13')][_0x0d44('0x14')]===0x1f4){logger['error'](_0x0d44('0xf'),_0x509bf0,_0x376f40['error'][_0x0d44('0x15')]);return _0x25a2ab(_0x376f40[_0x0d44('0x13')][_0x0d44('0x15')]);}logger['error']('Cdr,\x20%s,\x20%s',_0x509bf0,_0x376f40[_0x0d44('0x13')][_0x0d44('0x15')]);return _0x338cb9(_0x376f40[_0x0d44('0x13')]['message']);}else{logger[_0x0d44('0xe')](_0x0d44('0xf'),_0x509bf0,_0x0d44('0x10'));_0x338cb9(_0x376f40[_0x0d44('0x16')][_0x0d44('0x15')]);}})[_0x0d44('0x17')](function(_0x182850){logger[_0x0d44('0x13')](_0x0d44('0xf'),_0x509bf0,_0x182850);_0x25a2ab(_0x182850);});});}
\ No newline at end of file
diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js
index 1bf1627..98428ef 100644
--- a/server/api/cdr/index.js
+++ b/server/api/cdr/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['isAuthenticated','create','put','/:id','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cdr.controller','get','index','/describe','show','post'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x55f8b4,_0x43f30d){_0x55f8b4=_0x55f8b4-0x0;var _0x2475f9=_0xa9e0[_0x55f8b4];return _0x2475f9;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0xc')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')](_0x0a9e('0x10'),auth['isAuthenticated'](),controller['update']);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);module[_0x0a9e('0x12')]=router;
\ No newline at end of file
+var _0xb10b=['../../components/interaction/service','../../config/environment','./cdr.controller','get','index','isAuthenticated','describe','/:id','show','post','update','destroy','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service'];(function(_0x92a313,_0x2e1397){var _0x37c946=function(_0xa8c4f2){while(--_0xa8c4f2){_0x92a313['push'](_0x92a313['shift']());}};_0x37c946(++_0x2e1397);}(_0xb10b,0x12a));var _0xbb10=function(_0x114adc,_0x1b1c55){_0x114adc=_0x114adc-0x0;var _0x19199a=_0xb10b[_0x114adc];return _0x19199a;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var fs_extra=require(_0xbb10('0x4'));var auth=require(_0xbb10('0x5'));var interaction=require(_0xbb10('0x6'));var config=require(_0xbb10('0x7'));var controller=require(_0xbb10('0x8'));router[_0xbb10('0x9')]('/',auth['isAuthenticated'](),controller[_0xbb10('0xa')]);router[_0xbb10('0x9')]('/describe',auth[_0xbb10('0xb')](),controller[_0xbb10('0xc')]);router[_0xbb10('0x9')](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0xe')]);router[_0xbb10('0xf')]('/',auth[_0xbb10('0xb')](),controller['create']);router['put'](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x10')]);router['delete'](_0xbb10('0xd'),auth['isAuthenticated'](),controller[_0xbb10('0x11')]);module[_0xbb10('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.attributes.js b/server/api/chatApplication/chatApplication.attributes.js
index 87bdb8b..b01642d 100644
--- a/server/api/chatApplication/chatApplication.attributes.js
+++ b/server/api/chatApplication/chatApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2ed9=['TEXT','*,*,*,*','sequelize','exports','INTEGER','STRING','noop'];(function(_0x5447fd,_0x52a6b5){var _0x15b28a=function(_0x370d4f){while(--_0x370d4f){_0x5447fd['push'](_0x5447fd['shift']());}};_0x15b28a(++_0x52a6b5);}(_0x2ed9,0x1de));var _0x92ed=function(_0x58b900,_0x4067f4){_0x58b900=_0x58b900-0x0;var _0x142565=_0x2ed9[_0x58b900];return _0x142565;};'use strict';var Sequelize=require(_0x92ed('0x0'));module[_0x92ed('0x1')]={'priority':{'type':Sequelize[_0x92ed('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x92ed('0x3')],'allowNull':![],'defaultValue':_0x92ed('0x4')},'appdata':{'type':Sequelize[_0x92ed('0x5')]()},'description':{'type':Sequelize[_0x92ed('0x3')]},'interval':{'type':Sequelize[_0x92ed('0x3')],'defaultValue':_0x92ed('0x6')}};
\ No newline at end of file
+var _0x0b73=['*,*,*,*','sequelize','INTEGER','STRING','noop'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x0b73,0xba));var _0x30b7=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x0b73[_0x2c91e9];return _0x13f0ff;};'use strict';var Sequelize=require(_0x30b7('0x0'));module['exports']={'priority':{'type':Sequelize[_0x30b7('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x30b7('0x2')],'allowNull':![],'defaultValue':_0x30b7('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x30b7('0x2')],'defaultValue':_0x30b7('0x4')}};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js
index 98b67b6..9db0662 100644
--- a/server/api/chatApplication/chatApplication.controller.js
+++ b/server/api/chatApplication/chatApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x657b=['save','update','then','sendStatus','error','stack','name','send','show','params','model','keys','ChatApplication','rawAttributes','query','filters','attributes','intersection','fields','includeAll','include','options','find','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count'];(function(_0x5ae1e2,_0x29ee5c){var _0x2fc7f3=function(_0x318f2f){while(--_0x318f2f){_0x5ae1e2['push'](_0x5ae1e2['shift']());}};_0x2fc7f3(++_0x29ee5c);}(_0x657b,0x131));var _0xb657=function(_0x1065bc,_0x25b539){_0x1065bc=_0x1065bc-0x0;var _0x1525fa=_0x657b[_0x1065bc];return _0x1525fa;};'use strict';var emlformat=require(_0xb657('0x0'));var rimraf=require(_0xb657('0x1'));var zipdir=require(_0xb657('0x2'));var jsonpatch=require(_0xb657('0x3'));var rp=require(_0xb657('0x4'));var moment=require('moment');var BPromise=require(_0xb657('0x5'));var Mustache=require(_0xb657('0x6'));var util=require('util');var path=require(_0xb657('0x7'));var sox=require(_0xb657('0x8'));var csv=require(_0xb657('0x9'));var ejs=require(_0xb657('0xa'));var fs=require('fs');var fs_extra=require(_0xb657('0xb'));var _=require('lodash');var squel=require(_0xb657('0xc'));var crypto=require('crypto');var jsforce=require(_0xb657('0xd'));var deskjs=require(_0xb657('0xe'));var toCsv=require(_0xb657('0x9'));var querystring=require('querystring');var Papa=require(_0xb657('0xf'));var Redis=require('ioredis');var authService=require(_0xb657('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xb657('0x11'));var hardwareService=require(_0xb657('0x12'));var logger=require(_0xb657('0x13'))('api');var utils=require(_0xb657('0x14'));var config=require(_0xb657('0x15'));var licenseUtil=require(_0xb657('0x16'));var db=require(_0xb657('0x17'))['db'];function respondWithStatusCode(_0x51228b,_0x3e1ea1){_0x3e1ea1=_0x3e1ea1||0xcc;return function(_0x3ebcc2){if(_0x3ebcc2){return _0x51228b['sendStatus'](_0x3e1ea1);}return _0x51228b[_0xb657('0x18')](_0x3e1ea1)[_0xb657('0x19')]();};}function respondWithResult(_0xf04de9,_0x3ca0b4){_0x3ca0b4=_0x3ca0b4||0xc8;return function(_0x4aedb7){if(_0x4aedb7){return _0xf04de9[_0xb657('0x18')](_0x3ca0b4)[_0xb657('0x1a')](_0x4aedb7);}};}function respondWithFilteredResult(_0x511057,_0x4d253b){return function(_0x144eaf){if(_0x144eaf){var _0xbde891=typeof _0x4d253b[_0xb657('0x1b')]===_0xb657('0x1c')&&typeof _0x4d253b[_0xb657('0x1d')]===_0xb657('0x1c');var _0x20919b=_0x144eaf[_0xb657('0x1e')];var _0x9e98be=_0xbde891?0x0:_0x4d253b[_0xb657('0x1b')];var _0x2f0ba0=_0xbde891?_0x144eaf['count']:_0x4d253b[_0xb657('0x1b')]+_0x4d253b[_0xb657('0x1d')];var _0x21474b;if(_0x2f0ba0>=_0x20919b){_0x2f0ba0=_0x20919b;_0x21474b=0xc8;}else{_0x21474b=0xce;}_0x511057[_0xb657('0x18')](_0x21474b);return _0x511057['set']('Content-Range',_0x9e98be+'-'+_0x2f0ba0+'/'+_0x20919b)[_0xb657('0x1a')](_0x144eaf);}return null;};}function patchUpdates(_0x926b57){return function(_0xee3c7e){try{jsonpatch['apply'](_0xee3c7e,_0x926b57,!![]);}catch(_0x19f1e9){return BPromise['reject'](_0x19f1e9);}return _0xee3c7e[_0xb657('0x1f')]();};}function saveUpdates(_0x466a42,_0x2895ab){return function(_0x12fd7d){if(_0x12fd7d){return _0x12fd7d[_0xb657('0x20')](_0x466a42)['then'](function(_0x3de4eb){return _0x3de4eb;});}return null;};}function removeEntity(_0x13cea8,_0x38b4a0){return function(_0xfdd680){if(_0xfdd680){return _0xfdd680['destroy']()[_0xb657('0x21')](function(){_0x13cea8['status'](0xcc)[_0xb657('0x19')]();});}};}function handleEntityNotFound(_0x4e8587,_0x221794){return function(_0x4fe1c5){if(!_0x4fe1c5){_0x4e8587[_0xb657('0x22')](0x194);}return _0x4fe1c5;};}function handleError(_0x154f83,_0x5d4b01){_0x5d4b01=_0x5d4b01||0x1f4;return function(_0x241301){logger[_0xb657('0x23')](_0x241301[_0xb657('0x24')]);if(_0x241301['name']){delete _0x241301[_0xb657('0x25')];}_0x154f83[_0xb657('0x18')](_0x5d4b01)[_0xb657('0x26')](_0x241301);};}exports[_0xb657('0x27')]=function(_0x37a5af,_0xba9c05){var _0x66d5af={'raw':!![],'where':{'id':_0x37a5af[_0xb657('0x28')]['id']}},_0x3be5de={};_0x3be5de[_0xb657('0x29')]=_[_0xb657('0x2a')](db[_0xb657('0x2b')][_0xb657('0x2c')]);_0x3be5de[_0xb657('0x2d')]=_[_0xb657('0x2a')](_0x37a5af[_0xb657('0x2d')]);_0x3be5de[_0xb657('0x2e')]=_['intersection'](_0x3be5de[_0xb657('0x29')],_0x3be5de['query']);_0x66d5af[_0xb657('0x2f')]=_[_0xb657('0x30')](_0x3be5de['model'],qs[_0xb657('0x31')](_0x37a5af[_0xb657('0x2d')][_0xb657('0x31')]));_0x66d5af[_0xb657('0x2f')]=_0x66d5af[_0xb657('0x2f')]['length']?_0x66d5af[_0xb657('0x2f')]:_0x3be5de[_0xb657('0x29')];if(_0x37a5af[_0xb657('0x2d')][_0xb657('0x32')]){_0x66d5af[_0xb657('0x33')]=[{'all':!![]}];}_0x66d5af=_['merge']({},_0x66d5af,_0x37a5af[_0xb657('0x34')]);return db[_0xb657('0x2b')][_0xb657('0x35')](_0x66d5af)['then'](handleEntityNotFound(_0xba9c05,null))[_0xb657('0x21')](respondWithResult(_0xba9c05,null))['catch'](handleError(_0xba9c05,null));};exports[_0xb657('0x20')]=function(_0x461f65,_0x14021f){if(_0x461f65[_0xb657('0x36')]['id']){delete _0x461f65[_0xb657('0x36')]['id'];}return db[_0xb657('0x2b')][_0xb657('0x35')]({'where':{'id':_0x461f65[_0xb657('0x28')]['id']}})[_0xb657('0x21')](handleEntityNotFound(_0x14021f,null))[_0xb657('0x21')](saveUpdates(_0x461f65[_0xb657('0x36')],null))['then'](respondWithResult(_0x14021f,null))['catch'](handleError(_0x14021f,null));};exports[_0xb657('0x37')]=function(_0x1878e5,_0x22f93b){return db[_0xb657('0x2b')][_0xb657('0x35')]({'where':{'id':_0x1878e5[_0xb657('0x28')]['id']}})['then'](handleEntityNotFound(_0x22f93b,null))[_0xb657('0x21')](removeEntity(_0x22f93b,null))['catch'](handleError(_0x22f93b,null));};
\ No newline at end of file
+var _0x18e0=['moment','mustache','sox','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','send','params','model','keys','ChatApplication','rawAttributes','query','intersection','attributes','fields','include','merge','options','find','catch','body','rimraf','fast-json-patch','request-promise'];(function(_0x59d9c3,_0x1cb588){var _0x152d4c=function(_0x24d68e){while(--_0x24d68e){_0x59d9c3['push'](_0x59d9c3['shift']());}};_0x152d4c(++_0x1cb588);}(_0x18e0,0xa2));var _0x018e=function(_0x56916d,_0x37b935){_0x56916d=_0x56916d-0x0;var _0x2b7f1f=_0x18e0[_0x56916d];return _0x2b7f1f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x018e('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x018e('0x1'));var rp=require(_0x018e('0x2'));var moment=require(_0x018e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x018e('0x4'));var util=require('util');var path=require('path');var sox=require(_0x018e('0x5'));var csv=require(_0x018e('0x6'));var ejs=require(_0x018e('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x018e('0x8'));var crypto=require(_0x018e('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x018e('0xa'));var toCsv=require(_0x018e('0x6'));var querystring=require(_0x018e('0xb'));var Papa=require(_0x018e('0xc'));var Redis=require(_0x018e('0xd'));var authService=require(_0x018e('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x018e('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x018e('0x10'));var config=require(_0x018e('0x11'));var licenseUtil=require(_0x018e('0x12'));var db=require(_0x018e('0x13'))['db'];function respondWithStatusCode(_0x167572,_0xd16776){_0xd16776=_0xd16776||0xcc;return function(_0xc940bb){if(_0xc940bb){return _0x167572[_0x018e('0x14')](_0xd16776);}return _0x167572[_0x018e('0x15')](_0xd16776)['end']();};}function respondWithResult(_0xec531a,_0x3b1e5e){_0x3b1e5e=_0x3b1e5e||0xc8;return function(_0x2d6aa0){if(_0x2d6aa0){return _0xec531a[_0x018e('0x15')](_0x3b1e5e)[_0x018e('0x16')](_0x2d6aa0);}};}function respondWithFilteredResult(_0x5bfd6e,_0x275c21){return function(_0x142f1e){if(_0x142f1e){var _0x41cbd8=typeof _0x275c21[_0x018e('0x17')]==='undefined'&&typeof _0x275c21[_0x018e('0x18')]===_0x018e('0x19');var _0x4d46aa=_0x142f1e[_0x018e('0x1a')];var _0x237ba1=_0x41cbd8?0x0:_0x275c21[_0x018e('0x17')];var _0xdf15f8=_0x41cbd8?_0x142f1e[_0x018e('0x1a')]:_0x275c21['offset']+_0x275c21[_0x018e('0x18')];var _0x421942;if(_0xdf15f8>=_0x4d46aa){_0xdf15f8=_0x4d46aa;_0x421942=0xc8;}else{_0x421942=0xce;}_0x5bfd6e[_0x018e('0x15')](_0x421942);return _0x5bfd6e[_0x018e('0x1b')](_0x018e('0x1c'),_0x237ba1+'-'+_0xdf15f8+'/'+_0x4d46aa)[_0x018e('0x16')](_0x142f1e);}return null;};}function patchUpdates(_0x15c3fa){return function(_0x4f59e7){try{jsonpatch[_0x018e('0x1d')](_0x4f59e7,_0x15c3fa,!![]);}catch(_0x213989){return BPromise[_0x018e('0x1e')](_0x213989);}return _0x4f59e7[_0x018e('0x1f')]();};}function saveUpdates(_0x23ef86,_0x5d9fef){return function(_0x5cffe9){if(_0x5cffe9){return _0x5cffe9[_0x018e('0x20')](_0x23ef86)[_0x018e('0x21')](function(_0x2c813e){return _0x2c813e;});}return null;};}function removeEntity(_0x1e3106,_0x2ef801){return function(_0x198b0b){if(_0x198b0b){return _0x198b0b[_0x018e('0x22')]()[_0x018e('0x21')](function(){_0x1e3106[_0x018e('0x15')](0xcc)[_0x018e('0x23')]();});}};}function handleEntityNotFound(_0x35f9a3,_0x7596f4){return function(_0x4e7d9a){if(!_0x4e7d9a){_0x35f9a3[_0x018e('0x14')](0x194);}return _0x4e7d9a;};}function handleError(_0x289931,_0x176822){_0x176822=_0x176822||0x1f4;return function(_0x344e2b){logger[_0x018e('0x24')](_0x344e2b[_0x018e('0x25')]);if(_0x344e2b[_0x018e('0x26')]){delete _0x344e2b[_0x018e('0x26')];}_0x289931[_0x018e('0x15')](_0x176822)[_0x018e('0x27')](_0x344e2b);};}exports['show']=function(_0x29455a,_0x1a4726){var _0x4af339={'raw':!![],'where':{'id':_0x29455a[_0x018e('0x28')]['id']}},_0xac43bc={};_0xac43bc[_0x018e('0x29')]=_[_0x018e('0x2a')](db[_0x018e('0x2b')][_0x018e('0x2c')]);_0xac43bc['query']=_[_0x018e('0x2a')](_0x29455a[_0x018e('0x2d')]);_0xac43bc['filters']=_[_0x018e('0x2e')](_0xac43bc[_0x018e('0x29')],_0xac43bc[_0x018e('0x2d')]);_0x4af339[_0x018e('0x2f')]=_[_0x018e('0x2e')](_0xac43bc['model'],qs[_0x018e('0x30')](_0x29455a[_0x018e('0x2d')][_0x018e('0x30')]));_0x4af339['attributes']=_0x4af339[_0x018e('0x2f')]['length']?_0x4af339[_0x018e('0x2f')]:_0xac43bc[_0x018e('0x29')];if(_0x29455a['query']['includeAll']){_0x4af339[_0x018e('0x31')]=[{'all':!![]}];}_0x4af339=_[_0x018e('0x32')]({},_0x4af339,_0x29455a[_0x018e('0x33')]);return db[_0x018e('0x2b')][_0x018e('0x34')](_0x4af339)['then'](handleEntityNotFound(_0x1a4726,null))[_0x018e('0x21')](respondWithResult(_0x1a4726,null))[_0x018e('0x35')](handleError(_0x1a4726,null));};exports[_0x018e('0x20')]=function(_0x55dbda,_0x5a2741){if(_0x55dbda[_0x018e('0x36')]['id']){delete _0x55dbda[_0x018e('0x36')]['id'];}return db[_0x018e('0x2b')][_0x018e('0x34')]({'where':{'id':_0x55dbda[_0x018e('0x28')]['id']}})[_0x018e('0x21')](handleEntityNotFound(_0x5a2741,null))['then'](saveUpdates(_0x55dbda[_0x018e('0x36')],null))[_0x018e('0x21')](respondWithResult(_0x5a2741,null))['catch'](handleError(_0x5a2741,null));};exports['destroy']=function(_0x5c34c9,_0x3b6e6a){return db[_0x018e('0x2b')][_0x018e('0x34')]({'where':{'id':_0x5c34c9[_0x018e('0x28')]['id']}})[_0x018e('0x21')](handleEntityNotFound(_0x3b6e6a,null))['then'](removeEntity(_0x3b6e6a,null))[_0x018e('0x35')](handleError(_0x3b6e6a,null));};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js
index b652cb7..72d5a35 100644
--- a/server/api/chatApplication/chatApplication.model.js
+++ b/server/api/chatApplication/chatApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5078=['path','rimraf','./chatApplication.attributes','exports','ChatApplication','chat_applications','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x4d82e1,_0x5ac72b){var _0x5f3bd9=function(_0x5380db){while(--_0x5380db){_0x4d82e1['push'](_0x4d82e1['shift']());}};_0x5f3bd9(++_0x5ac72b);}(_0x5078,0x126));var _0x8507=function(_0x40042d,_0x3ce810){_0x40042d=_0x40042d-0x0;var _0x3889a1=_0x5078[_0x40042d];return _0x3889a1;};'use strict';var _=require(_0x8507('0x0'));var util=require(_0x8507('0x1'));var logger=require(_0x8507('0x2'))('api');var moment=require(_0x8507('0x3'));var BPromise=require(_0x8507('0x4'));var rp=require(_0x8507('0x5'));var fs=require('fs');var path=require(_0x8507('0x6'));var rimraf=require(_0x8507('0x7'));var config=require('../../config/environment');var attributes=require(_0x8507('0x8'));module[_0x8507('0x9')]=function(_0x3b2e94,_0x2ba5c4){return _0x3b2e94['define'](_0x8507('0xa'),attributes,{'tableName':_0x8507('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x5f96=['exports','define','chat_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./chatApplication.attributes'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x5f96,0x75));var _0x65f9=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0x5f96[_0x413feb];return _0x40ee88;};'use strict';var _=require(_0x65f9('0x0'));var util=require(_0x65f9('0x1'));var logger=require(_0x65f9('0x2'))(_0x65f9('0x3'));var moment=require(_0x65f9('0x4'));var BPromise=require(_0x65f9('0x5'));var rp=require(_0x65f9('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x65f9('0x7'));var config=require('../../config/environment');var attributes=require(_0x65f9('0x8'));module[_0x65f9('0x9')]=function(_0x5607f5,_0x41efdb){return _0x5607f5[_0x65f9('0xa')]('ChatApplication',attributes,{'tableName':_0x65f9('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x65f9('0xc'),'collate':_0x65f9('0xd')});};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js
index 3034c33..10b0e63 100644
--- a/server/api/chatApplication/chatApplication.rpc.js
+++ b/server/api/chatApplication/chatApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x21ee=['code','ChatApplication,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','then','info','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x211b69,_0x310c1c){var _0x55b330=function(_0x5bad6c){while(--_0x5bad6c){_0x211b69['push'](_0x211b69['shift']());}};_0x55b330(++_0x310c1c);}(_0x21ee,0xb5));var _0xe21e=function(_0x3a8db5,_0x29cfa6){_0x3a8db5=_0x3a8db5-0x0;var _0x3169d1=_0x21ee[_0x3a8db5];return _0x3169d1;};'use strict';var _=require(_0xe21e('0x0'));var util=require(_0xe21e('0x1'));var moment=require(_0xe21e('0x2'));var BPromise=require(_0xe21e('0x3'));var rs=require(_0xe21e('0x4'));var fs=require('fs');var Redis=require(_0xe21e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xe21e('0x6'));var logger=require('../../config/logger')(_0xe21e('0x7'));var config=require(_0xe21e('0x8'));var jayson=require(_0xe21e('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x187c08,_0x18dfd4,_0x3fe2e9){return new BPromise(function(_0x4dfb22,_0x581e00){return client['request'](_0x187c08,_0x3fe2e9)[_0xe21e('0xa')](function(_0x4329b6){logger[_0xe21e('0xb')]('ChatApplication,\x20%s,\x20%s',_0x18dfd4,_0xe21e('0xc'));logger[_0xe21e('0xd')](_0xe21e('0xe'),_0x18dfd4,_0xe21e('0xc'),JSON[_0xe21e('0xf')](_0x4329b6));if(_0x4329b6[_0xe21e('0x10')]){if(_0x4329b6[_0xe21e('0x10')][_0xe21e('0x11')]===0x1f4){logger['error'](_0xe21e('0x12'),_0x18dfd4,_0x4329b6['error'][_0xe21e('0x13')]);return _0x581e00(_0x4329b6[_0xe21e('0x10')]['message']);}logger['error']('ChatApplication,\x20%s,\x20%s',_0x18dfd4,_0x4329b6[_0xe21e('0x10')]['message']);return _0x4dfb22(_0x4329b6[_0xe21e('0x10')]['message']);}else{logger['info'](_0xe21e('0x12'),_0x18dfd4,_0xe21e('0xc'));_0x4dfb22(_0x4329b6[_0xe21e('0x14')][_0xe21e('0x13')]);}})[_0xe21e('0x15')](function(_0x17371d){logger[_0xe21e('0x10')](_0xe21e('0x12'),_0x18dfd4,_0x17371d);_0x581e00(_0x17371d);});});}
\ No newline at end of file
+var _0x69e1=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','ChatApplication,\x20%s,\x20%s','message','info','result','catch'];(function(_0x3ba04b,_0x305c47){var _0x2e2597=function(_0x11e5c3){while(--_0x11e5c3){_0x3ba04b['push'](_0x3ba04b['shift']());}};_0x2e2597(++_0x305c47);}(_0x69e1,0x187));var _0x169e=function(_0x5412b7,_0x25b015){_0x5412b7=_0x5412b7-0x0;var _0x12215f=_0x69e1[_0x5412b7];return _0x12215f;};'use strict';var _=require(_0x169e('0x0'));var util=require(_0x169e('0x1'));var moment=require(_0x169e('0x2'));var BPromise=require(_0x169e('0x3'));var rs=require(_0x169e('0x4'));var fs=require('fs');var Redis=require(_0x169e('0x5'));var db=require(_0x169e('0x6'))['db'];var utils=require(_0x169e('0x7'));var logger=require(_0x169e('0x8'))(_0x169e('0x9'));var config=require(_0x169e('0xa'));var jayson=require(_0x169e('0xb'));var client=jayson[_0x169e('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x27f353,_0x202784,_0x3a8c47){return new BPromise(function(_0x43f5f1,_0x4e30c1){return client['request'](_0x27f353,_0x3a8c47)['then'](function(_0x1911bf){logger['info']('ChatApplication,\x20%s,\x20%s',_0x202784,_0x169e('0xd'));logger[_0x169e('0xe')](_0x169e('0xf'),_0x202784,_0x169e('0xd'),JSON[_0x169e('0x10')](_0x1911bf));if(_0x1911bf[_0x169e('0x11')]){if(_0x1911bf[_0x169e('0x11')]['code']===0x1f4){logger[_0x169e('0x11')](_0x169e('0x12'),_0x202784,_0x1911bf['error'][_0x169e('0x13')]);return _0x4e30c1(_0x1911bf[_0x169e('0x11')]['message']);}logger[_0x169e('0x11')]('ChatApplication,\x20%s,\x20%s',_0x202784,_0x1911bf[_0x169e('0x11')][_0x169e('0x13')]);return _0x43f5f1(_0x1911bf[_0x169e('0x11')][_0x169e('0x13')]);}else{logger[_0x169e('0x14')](_0x169e('0x12'),_0x202784,'request\x20sent');_0x43f5f1(_0x1911bf[_0x169e('0x15')][_0x169e('0x13')]);}})[_0x169e('0x16')](function(_0x2a4331){logger['error']('ChatApplication,\x20%s,\x20%s',_0x202784,_0x2a4331);_0x4e30c1(_0x2a4331);});});}
\ No newline at end of file
diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js
index 2c1f4d5..398814a 100644
--- a/server/api/chatApplication/index.js
+++ b/server/api/chatApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaf1f=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','get','/:id','isAuthenticated','show','put','update','delete','destroy','multer','path','express','Router'];(function(_0x39377d,_0x12bd88){var _0x1d589f=function(_0x1b3c4d){while(--_0x1b3c4d){_0x39377d['push'](_0x39377d['shift']());}};_0x1d589f(++_0x12bd88);}(_0xaf1f,0x161));var _0xfaf1=function(_0x33ffb9,_0x57cfa7){_0x33ffb9=_0x33ffb9-0x0;var _0x39a3d8=_0xaf1f[_0x33ffb9];return _0x39a3d8;};'use strict';var multer=require(_0xfaf1('0x0'));var util=require('util');var path=require(_0xfaf1('0x1'));var timeout=require('connect-timeout');var express=require(_0xfaf1('0x2'));var router=express[_0xfaf1('0x3')]();var fs_extra=require(_0xfaf1('0x4'));var auth=require(_0xfaf1('0x5'));var interaction=require(_0xfaf1('0x6'));var config=require(_0xfaf1('0x7'));var controller=require(_0xfaf1('0x8'));router[_0xfaf1('0x9')](_0xfaf1('0xa'),auth[_0xfaf1('0xb')](),controller[_0xfaf1('0xc')]);router[_0xfaf1('0xd')](_0xfaf1('0xa'),auth['isAuthenticated'](),controller[_0xfaf1('0xe')]);router[_0xfaf1('0xf')](_0xfaf1('0xa'),auth[_0xfaf1('0xb')](),controller[_0xfaf1('0x10')]);module['exports']=router;
\ No newline at end of file
+var _0xd5e5=['/:id','isAuthenticated','show','put','update','delete','destroy','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller'];(function(_0x5c2e3e,_0x26ecd3){var _0x53f64a=function(_0x2b5df8){while(--_0x2b5df8){_0x5c2e3e['push'](_0x5c2e3e['shift']());}};_0x53f64a(++_0x26ecd3);}(_0xd5e5,0x117));var _0x5d5e=function(_0x1df4a9,_0x52a221){_0x1df4a9=_0x1df4a9-0x0;var _0x77192d=_0xd5e5[_0x1df4a9];return _0x77192d;};'use strict';var multer=require(_0x5d5e('0x0'));var util=require('util');var path=require(_0x5d5e('0x1'));var timeout=require(_0x5d5e('0x2'));var express=require('express');var router=express[_0x5d5e('0x3')]();var fs_extra=require(_0x5d5e('0x4'));var auth=require(_0x5d5e('0x5'));var interaction=require(_0x5d5e('0x6'));var config=require(_0x5d5e('0x7'));var controller=require(_0x5d5e('0x8'));router['get'](_0x5d5e('0x9'),auth[_0x5d5e('0xa')](),controller[_0x5d5e('0xb')]);router[_0x5d5e('0xc')](_0x5d5e('0x9'),auth[_0x5d5e('0xa')](),controller[_0x5d5e('0xd')]);router[_0x5d5e('0xe')]('/:id',auth[_0x5d5e('0xa')](),controller[_0x5d5e('0xf')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.attributes.js b/server/api/chatGroup/chatGroup.attributes.js
index 87f8b3b..6292fea 100644
--- a/server/api/chatGroup/chatGroup.attributes.js
+++ b/server/api/chatGroup/chatGroup.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x51a8=['sequelize','STRING','BOOLEAN'];(function(_0x13a209,_0x25d901){var _0x367942=function(_0x470830){while(--_0x470830){_0x13a209['push'](_0x13a209['shift']());}};_0x367942(++_0x25d901);}(_0x51a8,0x186));var _0x851a=function(_0x9e9e24,_0x43f9e3){_0x9e9e24=_0x9e9e24-0x0;var _0x4b22ba=_0x51a8[_0x9e9e24];return _0x4b22ba;};'use strict';var Sequelize=require(_0x851a('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x851a('0x1')]},'write':{'type':Sequelize[_0x851a('0x2')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x6636=['BOOLEAN','sequelize','exports','STRING'];(function(_0x11ce46,_0x177a85){var _0x368a1e=function(_0x425454){while(--_0x425454){_0x11ce46['push'](_0x11ce46['shift']());}};_0x368a1e(++_0x177a85);}(_0x6636,0x119));var _0x6663=function(_0x48716,_0x2aa61f){_0x48716=_0x48716-0x0;var _0x827e30=_0x6636[_0x48716];return _0x827e30;};'use strict';var Sequelize=require(_0x6663('0x0'));module[_0x6663('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x6663('0x2')]},'write':{'type':Sequelize[_0x6663('0x3')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js
index ce6518a..86b4ce1 100644
--- a/server/api/chatGroup/chatGroup.controller.js
+++ b/server/api/chatGroup/chatGroup.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6228=['catch','show','params','rawAttributes','keys','length','includeAll','include','find','create','body','describe','getUnread','ChatInternalMessage','user','addMembers','ids','omit','getMembers','findOne','User','ChatGroupId','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','getMessages','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','socket.io-emitter','./chatGroup.socket','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','index','map','ChatGroup','fieldName','type','key','model','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','findAll','rows'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6228,0x147));var _0x8622=function(_0x3a1535,_0x4d0d5a){_0x3a1535=_0x3a1535-0x0;var _0x3fa8f1=_0x6228[_0x3a1535];return _0x3fa8f1;};'use strict';var emlformat=require(_0x8622('0x0'));var rimraf=require(_0x8622('0x1'));var zipdir=require(_0x8622('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8622('0x3'));var moment=require(_0x8622('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x8622('0x5'));var util=require(_0x8622('0x6'));var path=require(_0x8622('0x7'));var sox=require(_0x8622('0x8'));var csv=require(_0x8622('0x9'));var ejs=require(_0x8622('0xa'));var fs=require('fs');var fs_extra=require(_0x8622('0xb'));var _=require(_0x8622('0xc'));var squel=require(_0x8622('0xd'));var crypto=require(_0x8622('0xe'));var jsforce=require(_0x8622('0xf'));var deskjs=require(_0x8622('0x10'));var toCsv=require(_0x8622('0x9'));var querystring=require(_0x8622('0x11'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x8622('0x12'));var qs=require(_0x8622('0x13'));var as=require(_0x8622('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8622('0x15'))(_0x8622('0x16'));var utils=require(_0x8622('0x17'));var config=require(_0x8622('0x18'));var licenseUtil=require(_0x8622('0x19'));var db=require('../../mysqldb')['db'];config[_0x8622('0x1a')]=_[_0x8622('0x1b')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x8622('0x1c'))(new Redis(config[_0x8622('0x1a')]));require(_0x8622('0x1d'))['register'](socket);function respondWithStatusCode(_0x449881,_0x93232e){_0x93232e=_0x93232e||0xcc;return function(_0x8a8434){if(_0x8a8434){return _0x449881[_0x8622('0x1e')](_0x93232e);}return _0x449881[_0x8622('0x1f')](_0x93232e)[_0x8622('0x20')]();};}function respondWithResult(_0x400ab7,_0x114eef){_0x114eef=_0x114eef||0xc8;return function(_0x17540e){if(_0x17540e){return _0x400ab7[_0x8622('0x1f')](_0x114eef)[_0x8622('0x21')](_0x17540e);}};}function respondWithFilteredResult(_0x585fbc,_0x449588){return function(_0x34028a){if(_0x34028a){var _0x5e2fc5=typeof _0x449588['offset']===_0x8622('0x22')&&typeof _0x449588[_0x8622('0x23')]==='undefined';var _0x4de237=_0x34028a[_0x8622('0x24')];var _0x16856d=_0x5e2fc5?0x0:_0x449588['offset'];var _0x37855e=_0x5e2fc5?_0x34028a[_0x8622('0x24')]:_0x449588[_0x8622('0x25')]+_0x449588[_0x8622('0x23')];var _0xc74f97;if(_0x37855e>=_0x4de237){_0x37855e=_0x4de237;_0xc74f97=0xc8;}else{_0xc74f97=0xce;}_0x585fbc[_0x8622('0x1f')](_0xc74f97);return _0x585fbc[_0x8622('0x26')](_0x8622('0x27'),_0x16856d+'-'+_0x37855e+'/'+_0x4de237)['json'](_0x34028a);}return null;};}function patchUpdates(_0x2ef05b){return function(_0x397038){try{jsonpatch[_0x8622('0x28')](_0x397038,_0x2ef05b,!![]);}catch(_0x420514){return BPromise[_0x8622('0x29')](_0x420514);}return _0x397038['save']();};}function saveUpdates(_0x418a10,_0x3fe258){return function(_0xf76ecd){if(_0xf76ecd){return _0xf76ecd[_0x8622('0x2a')](_0x418a10)[_0x8622('0x2b')](function(_0x1fe2c0){return _0x1fe2c0;});}return null;};}function removeEntity(_0x2887de,_0x292be7){return function(_0x3d7f3b){if(_0x3d7f3b){return _0x3d7f3b[_0x8622('0x2c')]()['then'](function(){_0x2887de[_0x8622('0x1f')](0xcc)[_0x8622('0x20')]();});}};}function handleEntityNotFound(_0x91608c,_0x2b6521){return function(_0x22c72d){if(!_0x22c72d){_0x91608c[_0x8622('0x1e')](0x194);}return _0x22c72d;};}function handleError(_0x512ad5,_0x174e73){_0x174e73=_0x174e73||0x1f4;return function(_0x30fbc3){logger[_0x8622('0x2d')](_0x30fbc3[_0x8622('0x2e')]);if(_0x30fbc3[_0x8622('0x2f')]){delete _0x30fbc3[_0x8622('0x2f')];}_0x512ad5[_0x8622('0x1f')](_0x174e73)[_0x8622('0x30')](_0x30fbc3);};}exports[_0x8622('0x31')]=function(_0xba2dd3,_0xe32bf){var _0x1d2c95={},_0x214972={},_0x3555e4={'count':0x0,'rows':[]};var _0x4e2dc6=_[_0x8622('0x32')](db[_0x8622('0x33')]['rawAttributes'],function(_0x1303c9){return{'name':_0x1303c9[_0x8622('0x34')],'type':_0x1303c9[_0x8622('0x35')][_0x8622('0x36')]};});_0x214972[_0x8622('0x37')]=_[_0x8622('0x32')](_0x4e2dc6,'name');_0x214972['query']=_['keys'](_0xba2dd3[_0x8622('0x38')]);_0x214972['filters']=_[_0x8622('0x39')](_0x214972[_0x8622('0x37')],_0x214972[_0x8622('0x38')]);_0x1d2c95[_0x8622('0x3a')]=_[_0x8622('0x39')](_0x214972[_0x8622('0x37')],qs['fields'](_0xba2dd3[_0x8622('0x38')][_0x8622('0x3b')]));_0x1d2c95[_0x8622('0x3a')]=_0x1d2c95[_0x8622('0x3a')]['length']?_0x1d2c95[_0x8622('0x3a')]:_0x214972[_0x8622('0x37')];if(!_0xba2dd3[_0x8622('0x38')][_0x8622('0x3c')](_0x8622('0x3d'))){_0x1d2c95[_0x8622('0x23')]=qs[_0x8622('0x23')](_0xba2dd3['query'][_0x8622('0x23')]);_0x1d2c95[_0x8622('0x25')]=qs[_0x8622('0x25')](_0xba2dd3[_0x8622('0x38')][_0x8622('0x25')]);}_0x1d2c95[_0x8622('0x3e')]=qs['sort'](_0xba2dd3[_0x8622('0x38')][_0x8622('0x3f')]);_0x1d2c95[_0x8622('0x40')]=qs[_0x8622('0x41')](_[_0x8622('0x42')](_0xba2dd3['query'],_0x214972['filters']),_0x4e2dc6);if(_0xba2dd3[_0x8622('0x38')][_0x8622('0x43')]){_0x1d2c95[_0x8622('0x40')]=_[_0x8622('0x44')](_0x1d2c95[_0x8622('0x40')],{'$or':_['map'](_0x4e2dc6,function(_0x1e0e01){if(_0x1e0e01[_0x8622('0x35')]!==_0x8622('0x45')){var _0x15b764={};_0x15b764[_0x1e0e01['name']]={'$like':'%'+_0xba2dd3[_0x8622('0x38')][_0x8622('0x43')]+'%'};return _0x15b764;}})});}_0x1d2c95=_[_0x8622('0x44')]({},_0x1d2c95,_0xba2dd3[_0x8622('0x46')]);var _0x808108={'where':_0x1d2c95['where']};return db[_0x8622('0x33')][_0x8622('0x24')](_0x808108)['then'](function(_0x4f145c){_0x3555e4[_0x8622('0x24')]=_0x4f145c;if(_0xba2dd3[_0x8622('0x38')]['includeAll']){_0x1d2c95['include']=[{'all':!![]}];}return db[_0x8622('0x33')][_0x8622('0x47')](_0x1d2c95);})[_0x8622('0x2b')](function(_0x4e8fae){_0x3555e4[_0x8622('0x48')]=_0x4e8fae;return _0x3555e4;})[_0x8622('0x2b')](respondWithFilteredResult(_0xe32bf,_0x1d2c95))[_0x8622('0x49')](handleError(_0xe32bf,null));};exports[_0x8622('0x4a')]=function(_0x2f3a13,_0x1b833b){var _0x180666={'raw':!![],'where':{'id':_0x2f3a13[_0x8622('0x4b')]['id']}},_0x3e13a0={};_0x3e13a0[_0x8622('0x37')]=_['keys'](db[_0x8622('0x33')][_0x8622('0x4c')]);_0x3e13a0[_0x8622('0x38')]=_[_0x8622('0x4d')](_0x2f3a13[_0x8622('0x38')]);_0x3e13a0[_0x8622('0x41')]=_[_0x8622('0x39')](_0x3e13a0[_0x8622('0x37')],_0x3e13a0[_0x8622('0x38')]);_0x180666[_0x8622('0x3a')]=_[_0x8622('0x39')](_0x3e13a0[_0x8622('0x37')],qs[_0x8622('0x3b')](_0x2f3a13[_0x8622('0x38')][_0x8622('0x3b')]));_0x180666[_0x8622('0x3a')]=_0x180666['attributes'][_0x8622('0x4e')]?_0x180666[_0x8622('0x3a')]:_0x3e13a0[_0x8622('0x37')];if(_0x2f3a13[_0x8622('0x38')][_0x8622('0x4f')]){_0x180666[_0x8622('0x50')]=[{'all':!![]}];}_0x180666=_[_0x8622('0x44')]({},_0x180666,_0x2f3a13[_0x8622('0x46')]);return db[_0x8622('0x33')][_0x8622('0x51')](_0x180666)[_0x8622('0x2b')](handleEntityNotFound(_0x1b833b,null))['then'](respondWithResult(_0x1b833b,null))[_0x8622('0x49')](handleError(_0x1b833b,null));};exports[_0x8622('0x52')]=function(_0xb61ab0,_0x28c0db){return db['ChatGroup'][_0x8622('0x52')](_0xb61ab0[_0x8622('0x53')],{})[_0x8622('0x2b')](respondWithResult(_0x28c0db,0xc9))['catch'](handleError(_0x28c0db,null));};exports[_0x8622('0x2a')]=function(_0x51d5f5,_0x3419ca){if(_0x51d5f5['body']['id']){delete _0x51d5f5[_0x8622('0x53')]['id'];}return db[_0x8622('0x33')][_0x8622('0x51')]({'where':{'id':_0x51d5f5[_0x8622('0x4b')]['id']}})[_0x8622('0x2b')](handleEntityNotFound(_0x3419ca,null))['then'](saveUpdates(_0x51d5f5['body'],null))[_0x8622('0x2b')](respondWithResult(_0x3419ca,null))[_0x8622('0x49')](handleError(_0x3419ca,null));};exports[_0x8622('0x2c')]=function(_0x5ec7f2,_0x4d5c16){return db[_0x8622('0x33')][_0x8622('0x51')]({'where':{'id':_0x5ec7f2[_0x8622('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4d5c16,null))['then'](removeEntity(_0x4d5c16,null))[_0x8622('0x49')](handleError(_0x4d5c16,null));};exports[_0x8622('0x54')]=function(_0x2688ae,_0x8f1d2){return db['ChatGroup'][_0x8622('0x54')]()['then'](respondWithResult(_0x8f1d2,null))[_0x8622('0x49')](handleError(_0x8f1d2,null));};exports[_0x8622('0x55')]=function(_0x48eeed,_0x4f491e,_0x24bd21){return db[_0x8622('0x56')][_0x8622('0x24')]({'where':{'ChatGroupId':_0x48eeed[_0x8622('0x4b')]['id'],'ToId':_0x48eeed[_0x8622('0x57')]['id'],'read':![]}})[_0x8622('0x2b')](function(_0x18b362){return{'id':_['toInteger'](_0x48eeed['params']['id']),'count':_0x18b362};})[_0x8622('0x2b')](respondWithResult(_0x4f491e,null))[_0x8622('0x49')](handleError(_0x4f491e,null));};exports[_0x8622('0x58')]=function(_0x1f39fa,_0x38b719,_0x47b31a){return db[_0x8622('0x33')][_0x8622('0x51')]({'where':{'id':_0x1f39fa[_0x8622('0x4b')]['id']}})[_0x8622('0x2b')](handleEntityNotFound(_0x38b719,null))[_0x8622('0x2b')](function(_0x504a4c){if(_0x504a4c){return _0x504a4c['addMembers'](_0x1f39fa[_0x8622('0x53')][_0x8622('0x59')],_[_0x8622('0x5a')](_0x1f39fa[_0x8622('0x53')],[_0x8622('0x59'),'id'])||{});}})['then'](respondWithResult(_0x38b719,null))[_0x8622('0x49')](handleError(_0x38b719,null));};exports[_0x8622('0x5b')]=function(_0x11d0e4,_0x3b3544,_0x1290e4){var _0x5d0516={};var _0x508ae4={};var _0x1ca6c4;var _0x5c5b81;return db[_0x8622('0x33')][_0x8622('0x5c')]({'where':{'id':_0x11d0e4[_0x8622('0x4b')]['id']}})[_0x8622('0x2b')](handleEntityNotFound(_0x3b3544,null))['then'](function(_0x7b67bf){if(_0x7b67bf){_0x1ca6c4=_0x7b67bf;_0x508ae4['model']=_['keys'](db[_0x8622('0x5d')][_0x8622('0x4c')]);_0x508ae4[_0x8622('0x38')]=_['keys'](_0x11d0e4[_0x8622('0x38')]);_0x508ae4[_0x8622('0x41')]=_['intersection'](_0x508ae4[_0x8622('0x37')],_0x508ae4[_0x8622('0x38')]);_0x5d0516[_0x8622('0x3a')]=_['intersection'](_0x508ae4[_0x8622('0x37')],qs[_0x8622('0x3b')](_0x11d0e4[_0x8622('0x38')][_0x8622('0x3b')]));_0x5d0516['attributes']=_0x5d0516[_0x8622('0x3a')][_0x8622('0x4e')]?_0x5d0516[_0x8622('0x3a')]:_0x508ae4[_0x8622('0x37')];_0x5d0516[_0x8622('0x3e')]=qs['sort'](_0x11d0e4[_0x8622('0x38')][_0x8622('0x3f')]);_0x5d0516[_0x8622('0x40')]=qs[_0x8622('0x41')](_[_0x8622('0x42')](_0x11d0e4[_0x8622('0x38')],_0x508ae4[_0x8622('0x41')]));if(_0x11d0e4[_0x8622('0x38')][_0x8622('0x43')]){_0x5d0516['where']=_[_0x8622('0x44')](_0x5d0516['where'],{'$or':_['map'](_0x5d0516[_0x8622('0x3a')],function(_0x31a44d){var _0x239ae1={};_0x239ae1[_0x31a44d]={'$like':'%'+_0x11d0e4[_0x8622('0x38')]['filter']+'%'};return _0x239ae1;})});}_0x5d0516=_[_0x8622('0x44')]({},_0x5d0516,_0x11d0e4[_0x8622('0x46')]);return _0x1ca6c4[_0x8622('0x5b')](_0x5d0516);}})[_0x8622('0x2b')](function(_0x2b2dac){if(_0x2b2dac){_0x5c5b81=_0x2b2dac[_0x8622('0x4e')];if(!_0x11d0e4[_0x8622('0x38')][_0x8622('0x3c')](_0x8622('0x3d'))){_0x5d0516[_0x8622('0x23')]=qs[_0x8622('0x23')](_0x11d0e4['query']['limit']);_0x5d0516[_0x8622('0x25')]=qs[_0x8622('0x25')](_0x11d0e4['query'][_0x8622('0x25')]);}return _0x1ca6c4[_0x8622('0x5b')](_0x5d0516);}})[_0x8622('0x2b')](function(_0x48fd34){if(_0x48fd34){return _0x48fd34?{'count':_0x5c5b81,'rows':_0x48fd34}:null;}})[_0x8622('0x2b')](respondWithResult(_0x3b3544,null))[_0x8622('0x49')](handleError(_0x3b3544,null));};exports['removeMembers']=function(_0x24cb18,_0x3f065d,_0x2558c5){return db[_0x8622('0x33')][_0x8622('0x51')]({'where':{'id':_0x24cb18[_0x8622('0x4b')]['id']}})[_0x8622('0x2b')](handleEntityNotFound(_0x3f065d,null))[_0x8622('0x2b')](function(_0x2d1da0){if(_0x2d1da0){return _0x2d1da0['removeMembers'](_0x24cb18[_0x8622('0x38')]['ids']);}})[_0x8622('0x2b')](respondWithStatusCode(_0x3f065d,null))[_0x8622('0x49')](handleError(_0x3f065d,null));};exports['addMessage']=function(_0x4f9172,_0x4ea215,_0x13ef19){if(_0x4f9172[_0x8622('0x53')]['id']){delete _0x4f9172['body']['id'];}return db[_0x8622('0x33')][_0x8622('0x51')]({'where':{'id':_0x4f9172['params']['id']}})[_0x8622('0x2b')](handleEntityNotFound(_0x4ea215,null))[_0x8622('0x2b')](function(_0x1d514b){if(_0x1d514b){_0x4f9172[_0x8622('0x53')][_0x8622('0x5e')]=_0x1d514b['id'];return db[_0x8622('0x56')][_0x8622('0x52')](_0x4f9172['body']);}})['then'](respondWithResult(_0x4ea215,null))['catch'](handleError(_0x4ea215,null));};exports['getMessages']=function(_0xfbbcda,_0x505d43,_0x50ba11){var _0x195996={};var _0x21c7fb={};var _0x42014f;var _0xa95130;return db[_0x8622('0x33')][_0x8622('0x5c')]({'where':{'id':_0xfbbcda[_0x8622('0x4b')]['id']}})[_0x8622('0x2b')](handleEntityNotFound(_0x505d43,null))[_0x8622('0x2b')](function(_0x4d4f15){if(_0x4d4f15){_0x42014f=_0x4d4f15;_0x21c7fb[_0x8622('0x37')]=_[_0x8622('0x4d')](db[_0x8622('0x56')]['rawAttributes']);_0x21c7fb[_0x8622('0x38')]=_[_0x8622('0x4d')](_0xfbbcda[_0x8622('0x38')]);_0x21c7fb['filters']=_['intersection'](_0x21c7fb[_0x8622('0x37')],_0x21c7fb[_0x8622('0x38')]);_0x195996[_0x8622('0x3a')]=_['intersection'](_0x21c7fb[_0x8622('0x37')],qs[_0x8622('0x3b')](_0xfbbcda['query'][_0x8622('0x3b')]));_0x195996[_0x8622('0x3a')]=_0x195996[_0x8622('0x3a')]['length']?_0x195996[_0x8622('0x3a')]:_0x21c7fb[_0x8622('0x37')];_0x195996[_0x8622('0x3e')]=qs['sort'](_0xfbbcda[_0x8622('0x38')]['sort']);_0x195996[_0x8622('0x40')]=qs['filters'](_[_0x8622('0x42')](_0xfbbcda['query'],_0x21c7fb[_0x8622('0x41')]));if(_0xfbbcda['query'][_0x8622('0x43')]){_0x195996['where']=_[_0x8622('0x44')](_0x195996[_0x8622('0x40')],{'$or':_['map'](_0x195996[_0x8622('0x3a')],function(_0xc65ce9){var _0x5f3cca={};_0x5f3cca[_0xc65ce9]={'$like':'%'+_0xfbbcda[_0x8622('0x38')][_0x8622('0x43')]+'%'};return _0x5f3cca;})});}if(_0xfbbcda[_0x8622('0x38')][_0x8622('0x5f')]){var _0x4772a3=_0xfbbcda['query'][_0x8622('0x5f')][_0x8622('0x60')](',');var _0x2ae055={};_0x2ae055[_0x4772a3[0x0]]={'$gte':moment(_0x4772a3[0x1])[_0x8622('0x61')](_0x8622('0x62'))};_0x195996[_0x8622('0x40')]=_[_0x8622('0x44')](_0x195996[_0x8622('0x40')],_0x2ae055);}_0x195996=_[_0x8622('0x44')]({},_0x195996,_0xfbbcda['options']);return _0x42014f[_0x8622('0x63')](_0x195996);}})['then'](function(_0x39eac9){if(_0x39eac9){_0xa95130=_0x39eac9[_0x8622('0x4e')];if(!_0xfbbcda[_0x8622('0x38')][_0x8622('0x3c')](_0x8622('0x3d'))){_0x195996[_0x8622('0x23')]=qs[_0x8622('0x23')](_0xfbbcda[_0x8622('0x38')][_0x8622('0x23')]);_0x195996[_0x8622('0x25')]=qs[_0x8622('0x25')](_0xfbbcda['query'][_0x8622('0x25')]);}return _0x42014f['getMessages'](_0x195996);}})[_0x8622('0x2b')](function(_0x521be2){if(_0x521be2){return _0x521be2?{'count':_0xa95130,'rows':_0x521be2}:null;}})[_0x8622('0x2b')](respondWithResult(_0x505d43,null))[_0x8622('0x49')](handleError(_0x505d43,null));};
\ No newline at end of file
+var _0xc5ad=['Content-Range','reject','save','update','then','destroy','end','error','stack','name','send','rawAttributes','type','key','model','map','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','ChatGroup','includeAll','include','findAll','rows','catch','params','find','body','describe','getUnread','toInteger','addMembers','ids','getMembers','findOne','removeMembers','addMessage','ChatGroupId','ChatInternalMessage','create','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','./chatGroup.socket','register','sendStatus','status','offset','undefined','limit','count','set'];(function(_0x41731e,_0x1bcb53){var _0x1140dd=function(_0x2298d9){while(--_0x2298d9){_0x41731e['push'](_0x41731e['shift']());}};_0x1140dd(++_0x1bcb53);}(_0xc5ad,0x15b));var _0xdc5a=function(_0x372bd7,_0xdf818b){_0x372bd7=_0x372bd7-0x0;var _0x296670=_0xc5ad[_0x372bd7];return _0x296670;};'use strict';var emlformat=require(_0xdc5a('0x0'));var rimraf=require(_0xdc5a('0x1'));var zipdir=require(_0xdc5a('0x2'));var jsonpatch=require(_0xdc5a('0x3'));var rp=require('request-promise');var moment=require(_0xdc5a('0x4'));var BPromise=require(_0xdc5a('0x5'));var Mustache=require(_0xdc5a('0x6'));var util=require(_0xdc5a('0x7'));var path=require(_0xdc5a('0x8'));var sox=require(_0xdc5a('0x9'));var csv=require(_0xdc5a('0xa'));var ejs=require(_0xdc5a('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xdc5a('0xc'));var crypto=require('crypto');var jsforce=require(_0xdc5a('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xdc5a('0xe'));var Papa=require(_0xdc5a('0xf'));var Redis=require(_0xdc5a('0x10'));var authService=require(_0xdc5a('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xdc5a('0x12'));var hardwareService=require(_0xdc5a('0x13'));var logger=require(_0xdc5a('0x14'))(_0xdc5a('0x15'));var utils=require('../../config/utils');var config=require(_0xdc5a('0x16'));var licenseUtil=require(_0xdc5a('0x17'));var db=require(_0xdc5a('0x18'))['db'];config[_0xdc5a('0x19')]=_[_0xdc5a('0x1a')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xdc5a('0x1b'))(new Redis(config[_0xdc5a('0x19')]));require(_0xdc5a('0x1c'))[_0xdc5a('0x1d')](socket);function respondWithStatusCode(_0x3ac9b5,_0x4f946e){_0x4f946e=_0x4f946e||0xcc;return function(_0x8b5e09){if(_0x8b5e09){return _0x3ac9b5[_0xdc5a('0x1e')](_0x4f946e);}return _0x3ac9b5[_0xdc5a('0x1f')](_0x4f946e)['end']();};}function respondWithResult(_0x19ecd1,_0x1f8223){_0x1f8223=_0x1f8223||0xc8;return function(_0x368e77){if(_0x368e77){return _0x19ecd1[_0xdc5a('0x1f')](_0x1f8223)['json'](_0x368e77);}};}function respondWithFilteredResult(_0x56308d,_0x1f70ad){return function(_0x5f269b){if(_0x5f269b){var _0x78fe50=typeof _0x1f70ad[_0xdc5a('0x20')]===_0xdc5a('0x21')&&typeof _0x1f70ad[_0xdc5a('0x22')]==='undefined';var _0x4ac4f5=_0x5f269b[_0xdc5a('0x23')];var _0x406098=_0x78fe50?0x0:_0x1f70ad[_0xdc5a('0x20')];var _0x59674=_0x78fe50?_0x5f269b['count']:_0x1f70ad[_0xdc5a('0x20')]+_0x1f70ad[_0xdc5a('0x22')];var _0x22032c;if(_0x59674>=_0x4ac4f5){_0x59674=_0x4ac4f5;_0x22032c=0xc8;}else{_0x22032c=0xce;}_0x56308d['status'](_0x22032c);return _0x56308d[_0xdc5a('0x24')](_0xdc5a('0x25'),_0x406098+'-'+_0x59674+'/'+_0x4ac4f5)['json'](_0x5f269b);}return null;};}function patchUpdates(_0x3677bd){return function(_0x1e578f){try{jsonpatch['apply'](_0x1e578f,_0x3677bd,!![]);}catch(_0x48ed8a){return BPromise[_0xdc5a('0x26')](_0x48ed8a);}return _0x1e578f[_0xdc5a('0x27')]();};}function saveUpdates(_0x56770b,_0x46a88a){return function(_0x30e7bd){if(_0x30e7bd){return _0x30e7bd[_0xdc5a('0x28')](_0x56770b)[_0xdc5a('0x29')](function(_0x1efa88){return _0x1efa88;});}return null;};}function removeEntity(_0x4c1641,_0x3bbadd){return function(_0x1dc4d7){if(_0x1dc4d7){return _0x1dc4d7[_0xdc5a('0x2a')]()[_0xdc5a('0x29')](function(){_0x4c1641['status'](0xcc)[_0xdc5a('0x2b')]();});}};}function handleEntityNotFound(_0x3db36d,_0x410de5){return function(_0x5aa8b8){if(!_0x5aa8b8){_0x3db36d[_0xdc5a('0x1e')](0x194);}return _0x5aa8b8;};}function handleError(_0x3e8c23,_0x1da42b){_0x1da42b=_0x1da42b||0x1f4;return function(_0x24f32d){logger[_0xdc5a('0x2c')](_0x24f32d[_0xdc5a('0x2d')]);if(_0x24f32d[_0xdc5a('0x2e')]){delete _0x24f32d[_0xdc5a('0x2e')];}_0x3e8c23[_0xdc5a('0x1f')](_0x1da42b)[_0xdc5a('0x2f')](_0x24f32d);};}exports['index']=function(_0x4ebc1b,_0x126d2d){var _0x80fa15={},_0x50a16d={},_0x41016c={'count':0x0,'rows':[]};var _0x238a55=_['map'](db['ChatGroup'][_0xdc5a('0x30')],function(_0x181d44){return{'name':_0x181d44['fieldName'],'type':_0x181d44[_0xdc5a('0x31')][_0xdc5a('0x32')]};});_0x50a16d[_0xdc5a('0x33')]=_[_0xdc5a('0x34')](_0x238a55,'name');_0x50a16d[_0xdc5a('0x35')]=_[_0xdc5a('0x36')](_0x4ebc1b[_0xdc5a('0x35')]);_0x50a16d['filters']=_[_0xdc5a('0x37')](_0x50a16d[_0xdc5a('0x33')],_0x50a16d[_0xdc5a('0x35')]);_0x80fa15['attributes']=_['intersection'](_0x50a16d[_0xdc5a('0x33')],qs[_0xdc5a('0x38')](_0x4ebc1b[_0xdc5a('0x35')][_0xdc5a('0x38')]));_0x80fa15['attributes']=_0x80fa15[_0xdc5a('0x39')][_0xdc5a('0x3a')]?_0x80fa15[_0xdc5a('0x39')]:_0x50a16d[_0xdc5a('0x33')];if(!_0x4ebc1b['query'][_0xdc5a('0x3b')](_0xdc5a('0x3c'))){_0x80fa15[_0xdc5a('0x22')]=qs[_0xdc5a('0x22')](_0x4ebc1b[_0xdc5a('0x35')]['limit']);_0x80fa15[_0xdc5a('0x20')]=qs[_0xdc5a('0x20')](_0x4ebc1b[_0xdc5a('0x35')][_0xdc5a('0x20')]);}_0x80fa15[_0xdc5a('0x3d')]=qs[_0xdc5a('0x3e')](_0x4ebc1b[_0xdc5a('0x35')][_0xdc5a('0x3e')]);_0x80fa15[_0xdc5a('0x3f')]=qs[_0xdc5a('0x40')](_[_0xdc5a('0x41')](_0x4ebc1b['query'],_0x50a16d[_0xdc5a('0x40')]),_0x238a55);if(_0x4ebc1b[_0xdc5a('0x35')][_0xdc5a('0x42')]){_0x80fa15[_0xdc5a('0x3f')]=_[_0xdc5a('0x43')](_0x80fa15[_0xdc5a('0x3f')],{'$or':_['map'](_0x238a55,function(_0x43a4c9){if(_0x43a4c9[_0xdc5a('0x31')]!==_0xdc5a('0x44')){var _0x5a802e={};_0x5a802e[_0x43a4c9[_0xdc5a('0x2e')]]={'$like':'%'+_0x4ebc1b[_0xdc5a('0x35')]['filter']+'%'};return _0x5a802e;}})});}_0x80fa15=_[_0xdc5a('0x43')]({},_0x80fa15,_0x4ebc1b[_0xdc5a('0x45')]);var _0x55b1e4={'where':_0x80fa15['where']};return db[_0xdc5a('0x46')]['count'](_0x55b1e4)[_0xdc5a('0x29')](function(_0x59b399){_0x41016c['count']=_0x59b399;if(_0x4ebc1b[_0xdc5a('0x35')][_0xdc5a('0x47')]){_0x80fa15[_0xdc5a('0x48')]=[{'all':!![]}];}return db['ChatGroup'][_0xdc5a('0x49')](_0x80fa15);})['then'](function(_0x1b1b3e){_0x41016c[_0xdc5a('0x4a')]=_0x1b1b3e;return _0x41016c;})['then'](respondWithFilteredResult(_0x126d2d,_0x80fa15))[_0xdc5a('0x4b')](handleError(_0x126d2d,null));};exports['show']=function(_0x5d9d08,_0x49ad58){var _0x19cc2a={'raw':!![],'where':{'id':_0x5d9d08[_0xdc5a('0x4c')]['id']}},_0x38e1e3={};_0x38e1e3[_0xdc5a('0x33')]=_[_0xdc5a('0x36')](db[_0xdc5a('0x46')][_0xdc5a('0x30')]);_0x38e1e3[_0xdc5a('0x35')]=_['keys'](_0x5d9d08[_0xdc5a('0x35')]);_0x38e1e3[_0xdc5a('0x40')]=_[_0xdc5a('0x37')](_0x38e1e3['model'],_0x38e1e3['query']);_0x19cc2a[_0xdc5a('0x39')]=_[_0xdc5a('0x37')](_0x38e1e3['model'],qs[_0xdc5a('0x38')](_0x5d9d08[_0xdc5a('0x35')][_0xdc5a('0x38')]));_0x19cc2a['attributes']=_0x19cc2a[_0xdc5a('0x39')][_0xdc5a('0x3a')]?_0x19cc2a['attributes']:_0x38e1e3[_0xdc5a('0x33')];if(_0x5d9d08[_0xdc5a('0x35')][_0xdc5a('0x47')]){_0x19cc2a[_0xdc5a('0x48')]=[{'all':!![]}];}_0x19cc2a=_[_0xdc5a('0x43')]({},_0x19cc2a,_0x5d9d08['options']);return db[_0xdc5a('0x46')][_0xdc5a('0x4d')](_0x19cc2a)[_0xdc5a('0x29')](handleEntityNotFound(_0x49ad58,null))['then'](respondWithResult(_0x49ad58,null))[_0xdc5a('0x4b')](handleError(_0x49ad58,null));};exports['create']=function(_0x549594,_0x9204ea){return db[_0xdc5a('0x46')]['create'](_0x549594[_0xdc5a('0x4e')],{})[_0xdc5a('0x29')](respondWithResult(_0x9204ea,0xc9))[_0xdc5a('0x4b')](handleError(_0x9204ea,null));};exports[_0xdc5a('0x28')]=function(_0x5494b3,_0x573547){if(_0x5494b3[_0xdc5a('0x4e')]['id']){delete _0x5494b3[_0xdc5a('0x4e')]['id'];}return db[_0xdc5a('0x46')][_0xdc5a('0x4d')]({'where':{'id':_0x5494b3[_0xdc5a('0x4c')]['id']}})['then'](handleEntityNotFound(_0x573547,null))[_0xdc5a('0x29')](saveUpdates(_0x5494b3[_0xdc5a('0x4e')],null))[_0xdc5a('0x29')](respondWithResult(_0x573547,null))[_0xdc5a('0x4b')](handleError(_0x573547,null));};exports[_0xdc5a('0x2a')]=function(_0x20d278,_0x5c033d){return db[_0xdc5a('0x46')][_0xdc5a('0x4d')]({'where':{'id':_0x20d278[_0xdc5a('0x4c')]['id']}})[_0xdc5a('0x29')](handleEntityNotFound(_0x5c033d,null))[_0xdc5a('0x29')](removeEntity(_0x5c033d,null))['catch'](handleError(_0x5c033d,null));};exports[_0xdc5a('0x4f')]=function(_0xbf06b1,_0x5b66de){return db[_0xdc5a('0x46')][_0xdc5a('0x4f')]()['then'](respondWithResult(_0x5b66de,null))[_0xdc5a('0x4b')](handleError(_0x5b66de,null));};exports[_0xdc5a('0x50')]=function(_0x1a9664,_0x1f1579,_0x1e00ba){return db['ChatInternalMessage']['count']({'where':{'ChatGroupId':_0x1a9664[_0xdc5a('0x4c')]['id'],'ToId':_0x1a9664['user']['id'],'read':![]}})[_0xdc5a('0x29')](function(_0x5ae618){return{'id':_[_0xdc5a('0x51')](_0x1a9664['params']['id']),'count':_0x5ae618};})['then'](respondWithResult(_0x1f1579,null))[_0xdc5a('0x4b')](handleError(_0x1f1579,null));};exports[_0xdc5a('0x52')]=function(_0x2fb19a,_0x141c98,_0x3d3226){return db[_0xdc5a('0x46')][_0xdc5a('0x4d')]({'where':{'id':_0x2fb19a[_0xdc5a('0x4c')]['id']}})['then'](handleEntityNotFound(_0x141c98,null))[_0xdc5a('0x29')](function(_0x649085){if(_0x649085){return _0x649085[_0xdc5a('0x52')](_0x2fb19a[_0xdc5a('0x4e')][_0xdc5a('0x53')],_['omit'](_0x2fb19a[_0xdc5a('0x4e')],[_0xdc5a('0x53'),'id'])||{});}})[_0xdc5a('0x29')](respondWithResult(_0x141c98,null))[_0xdc5a('0x4b')](handleError(_0x141c98,null));};exports[_0xdc5a('0x54')]=function(_0x3974eb,_0x512930,_0xc62f3e){var _0x3c700c={};var _0x37445c={};var _0x324c44;var _0x470a8d;return db[_0xdc5a('0x46')][_0xdc5a('0x55')]({'where':{'id':_0x3974eb[_0xdc5a('0x4c')]['id']}})[_0xdc5a('0x29')](handleEntityNotFound(_0x512930,null))[_0xdc5a('0x29')](function(_0x37da87){if(_0x37da87){_0x324c44=_0x37da87;_0x37445c['model']=_[_0xdc5a('0x36')](db['User'][_0xdc5a('0x30')]);_0x37445c[_0xdc5a('0x35')]=_[_0xdc5a('0x36')](_0x3974eb[_0xdc5a('0x35')]);_0x37445c[_0xdc5a('0x40')]=_['intersection'](_0x37445c['model'],_0x37445c[_0xdc5a('0x35')]);_0x3c700c[_0xdc5a('0x39')]=_[_0xdc5a('0x37')](_0x37445c[_0xdc5a('0x33')],qs[_0xdc5a('0x38')](_0x3974eb[_0xdc5a('0x35')]['fields']));_0x3c700c[_0xdc5a('0x39')]=_0x3c700c[_0xdc5a('0x39')]['length']?_0x3c700c[_0xdc5a('0x39')]:_0x37445c[_0xdc5a('0x33')];_0x3c700c[_0xdc5a('0x3d')]=qs[_0xdc5a('0x3e')](_0x3974eb['query'][_0xdc5a('0x3e')]);_0x3c700c['where']=qs[_0xdc5a('0x40')](_[_0xdc5a('0x41')](_0x3974eb[_0xdc5a('0x35')],_0x37445c[_0xdc5a('0x40')]));if(_0x3974eb[_0xdc5a('0x35')]['filter']){_0x3c700c[_0xdc5a('0x3f')]=_[_0xdc5a('0x43')](_0x3c700c[_0xdc5a('0x3f')],{'$or':_[_0xdc5a('0x34')](_0x3c700c['attributes'],function(_0xc7f225){var _0x1e0f0c={};_0x1e0f0c[_0xc7f225]={'$like':'%'+_0x3974eb[_0xdc5a('0x35')][_0xdc5a('0x42')]+'%'};return _0x1e0f0c;})});}_0x3c700c=_[_0xdc5a('0x43')]({},_0x3c700c,_0x3974eb[_0xdc5a('0x45')]);return _0x324c44['getMembers'](_0x3c700c);}})['then'](function(_0x13a30b){if(_0x13a30b){_0x470a8d=_0x13a30b['length'];if(!_0x3974eb[_0xdc5a('0x35')][_0xdc5a('0x3b')](_0xdc5a('0x3c'))){_0x3c700c[_0xdc5a('0x22')]=qs[_0xdc5a('0x22')](_0x3974eb[_0xdc5a('0x35')]['limit']);_0x3c700c[_0xdc5a('0x20')]=qs['offset'](_0x3974eb[_0xdc5a('0x35')][_0xdc5a('0x20')]);}return _0x324c44[_0xdc5a('0x54')](_0x3c700c);}})[_0xdc5a('0x29')](function(_0x424401){if(_0x424401){return _0x424401?{'count':_0x470a8d,'rows':_0x424401}:null;}})[_0xdc5a('0x29')](respondWithResult(_0x512930,null))[_0xdc5a('0x4b')](handleError(_0x512930,null));};exports['removeMembers']=function(_0x978f88,_0x1703ee,_0x1655c2){return db[_0xdc5a('0x46')][_0xdc5a('0x4d')]({'where':{'id':_0x978f88[_0xdc5a('0x4c')]['id']}})[_0xdc5a('0x29')](handleEntityNotFound(_0x1703ee,null))[_0xdc5a('0x29')](function(_0x23802d){if(_0x23802d){return _0x23802d[_0xdc5a('0x56')](_0x978f88['query'][_0xdc5a('0x53')]);}})['then'](respondWithStatusCode(_0x1703ee,null))[_0xdc5a('0x4b')](handleError(_0x1703ee,null));};exports[_0xdc5a('0x57')]=function(_0x2c2d48,_0x57db90,_0xa12005){if(_0x2c2d48[_0xdc5a('0x4e')]['id']){delete _0x2c2d48[_0xdc5a('0x4e')]['id'];}return db['ChatGroup'][_0xdc5a('0x4d')]({'where':{'id':_0x2c2d48[_0xdc5a('0x4c')]['id']}})['then'](handleEntityNotFound(_0x57db90,null))['then'](function(_0x50acbd){if(_0x50acbd){_0x2c2d48[_0xdc5a('0x4e')][_0xdc5a('0x58')]=_0x50acbd['id'];return db[_0xdc5a('0x59')][_0xdc5a('0x5a')](_0x2c2d48[_0xdc5a('0x4e')]);}})[_0xdc5a('0x29')](respondWithResult(_0x57db90,null))['catch'](handleError(_0x57db90,null));};exports[_0xdc5a('0x5b')]=function(_0x34a3b1,_0x2d8faf,_0x2bfa7c){var _0x2aa673={};var _0x43c8b4={};var _0x1043d6;var _0x14b8eb;return db['ChatGroup'][_0xdc5a('0x55')]({'where':{'id':_0x34a3b1[_0xdc5a('0x4c')]['id']}})[_0xdc5a('0x29')](handleEntityNotFound(_0x2d8faf,null))[_0xdc5a('0x29')](function(_0x41b166){if(_0x41b166){_0x1043d6=_0x41b166;_0x43c8b4[_0xdc5a('0x33')]=_[_0xdc5a('0x36')](db[_0xdc5a('0x59')][_0xdc5a('0x30')]);_0x43c8b4['query']=_[_0xdc5a('0x36')](_0x34a3b1[_0xdc5a('0x35')]);_0x43c8b4[_0xdc5a('0x40')]=_[_0xdc5a('0x37')](_0x43c8b4[_0xdc5a('0x33')],_0x43c8b4[_0xdc5a('0x35')]);_0x2aa673[_0xdc5a('0x39')]=_[_0xdc5a('0x37')](_0x43c8b4[_0xdc5a('0x33')],qs[_0xdc5a('0x38')](_0x34a3b1[_0xdc5a('0x35')][_0xdc5a('0x38')]));_0x2aa673[_0xdc5a('0x39')]=_0x2aa673[_0xdc5a('0x39')][_0xdc5a('0x3a')]?_0x2aa673['attributes']:_0x43c8b4['model'];_0x2aa673[_0xdc5a('0x3d')]=qs[_0xdc5a('0x3e')](_0x34a3b1[_0xdc5a('0x35')][_0xdc5a('0x3e')]);_0x2aa673[_0xdc5a('0x3f')]=qs['filters'](_[_0xdc5a('0x41')](_0x34a3b1['query'],_0x43c8b4[_0xdc5a('0x40')]));if(_0x34a3b1[_0xdc5a('0x35')][_0xdc5a('0x42')]){_0x2aa673[_0xdc5a('0x3f')]=_[_0xdc5a('0x43')](_0x2aa673[_0xdc5a('0x3f')],{'$or':_[_0xdc5a('0x34')](_0x2aa673['attributes'],function(_0xfea31e){var _0x438354={};_0x438354[_0xfea31e]={'$like':'%'+_0x34a3b1[_0xdc5a('0x35')][_0xdc5a('0x42')]+'%'};return _0x438354;})});}if(_0x34a3b1['query'][_0xdc5a('0x5c')]){var _0x51e21f=_0x34a3b1[_0xdc5a('0x35')]['$gte'][_0xdc5a('0x5d')](',');var _0x1c6a88={};_0x1c6a88[_0x51e21f[0x0]]={'$gte':moment(_0x51e21f[0x1])[_0xdc5a('0x5e')](_0xdc5a('0x5f'))};_0x2aa673[_0xdc5a('0x3f')]=_['merge'](_0x2aa673['where'],_0x1c6a88);}_0x2aa673=_['merge']({},_0x2aa673,_0x34a3b1[_0xdc5a('0x45')]);return _0x1043d6[_0xdc5a('0x5b')](_0x2aa673);}})[_0xdc5a('0x29')](function(_0x1d6d70){if(_0x1d6d70){_0x14b8eb=_0x1d6d70[_0xdc5a('0x3a')];if(!_0x34a3b1[_0xdc5a('0x35')]['hasOwnProperty'](_0xdc5a('0x3c'))){_0x2aa673[_0xdc5a('0x22')]=qs[_0xdc5a('0x22')](_0x34a3b1['query'][_0xdc5a('0x22')]);_0x2aa673[_0xdc5a('0x20')]=qs[_0xdc5a('0x20')](_0x34a3b1[_0xdc5a('0x35')][_0xdc5a('0x20')]);}return _0x1043d6[_0xdc5a('0x5b')](_0x2aa673);}})[_0xdc5a('0x29')](function(_0x46b2a6){if(_0x46b2a6){return _0x46b2a6?{'count':_0x14b8eb,'rows':_0x46b2a6}:null;}})[_0xdc5a('0x29')](respondWithResult(_0x2d8faf,null))[_0xdc5a('0x4b')](handleError(_0x2d8faf,null));};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js
index e8214ee..ebfbda9 100644
--- a/server/api/chatGroup/chatGroup.events.js
+++ b/server/api/chatGroup/chatGroup.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5078=['ChatGroup','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x46b793,_0x16f01d){var _0x4d471a=function(_0x28f651){while(--_0x28f651){_0x46b793['push'](_0x46b793['shift']());}};_0x4d471a(++_0x16f01d);}(_0x5078,0x148));var _0x8507=function(_0x352061,_0x176667){_0x352061=_0x352061-0x0;var _0x2cae8d=_0x5078[_0x352061];return _0x2cae8d;};'use strict';var EventEmitter=require(_0x8507('0x0'));var ChatGroup=require(_0x8507('0x1'))['db'][_0x8507('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x8507('0x3')](0x0);var events={'afterCreate':_0x8507('0x4'),'afterUpdate':_0x8507('0x5'),'afterDestroy':_0x8507('0x6')};function emitEvent(_0x20608d){return function(_0x1a4930,_0x239a82,_0x2aa379){ChatGroupEvents[_0x8507('0x7')](_0x20608d+':'+_0x1a4930['id'],_0x1a4930);ChatGroupEvents[_0x8507('0x7')](_0x20608d,_0x1a4930);_0x2aa379(null);};}for(var e in events){if(events[_0x8507('0x8')](e)){var event=events[e];ChatGroup[_0x8507('0x9')](e,emitEvent(event));}}module[_0x8507('0xa')]=ChatGroupEvents;
\ No newline at end of file
+var _0xa5c9=['emit','hasOwnProperty','hook','events','../../mysqldb','ChatGroup','setMaxListeners','remove'];(function(_0x530c40,_0x2deb61){var _0x14e864=function(_0x82d44c){while(--_0x82d44c){_0x530c40['push'](_0x530c40['shift']());}};_0x14e864(++_0x2deb61);}(_0xa5c9,0x143));var _0x9a5c=function(_0x11005e,_0x20c3d2){_0x11005e=_0x11005e-0x0;var _0x29338f=_0xa5c9[_0x11005e];return _0x29338f;};'use strict';var EventEmitter=require(_0x9a5c('0x0'));var ChatGroup=require(_0x9a5c('0x1'))['db'][_0x9a5c('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x9a5c('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x9a5c('0x4')};function emitEvent(_0x1d80b0){return function(_0x55bcf5,_0x5f1811,_0x54c477){ChatGroupEvents[_0x9a5c('0x5')](_0x1d80b0+':'+_0x55bcf5['id'],_0x55bcf5);ChatGroupEvents[_0x9a5c('0x5')](_0x1d80b0,_0x55bcf5);_0x54c477(null);};}for(var e in events){if(events[_0x9a5c('0x6')](e)){var event=events[e];ChatGroup[_0x9a5c('0x7')](e,emitEvent(event));}}module['exports']=ChatGroupEvents;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js
index e8ae3d3..47acaca 100644
--- a/server/api/chatGroup/chatGroup.model.js
+++ b/server/api/chatGroup/chatGroup.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6bb3=['request-promise','path','rimraf','./chatGroup.attributes','exports','define','ChatGroup','chat_groups','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x12c2ed,_0x40708b){var _0xc2ee5d=function(_0x1e014a){while(--_0x1e014a){_0x12c2ed['push'](_0x12c2ed['shift']());}};_0xc2ee5d(++_0x40708b);}(_0x6bb3,0xbe));var _0x36bb=function(_0x250bfb,_0x183c55){_0x250bfb=_0x250bfb-0x0;var _0x2fa5d0=_0x6bb3[_0x250bfb];return _0x2fa5d0;};'use strict';var _=require(_0x36bb('0x0'));var util=require(_0x36bb('0x1'));var logger=require(_0x36bb('0x2'))(_0x36bb('0x3'));var moment=require(_0x36bb('0x4'));var BPromise=require(_0x36bb('0x5'));var rp=require(_0x36bb('0x6'));var fs=require('fs');var path=require(_0x36bb('0x7'));var rimraf=require(_0x36bb('0x8'));var config=require('../../config/environment');var attributes=require(_0x36bb('0x9'));module[_0x36bb('0xa')]=function(_0x49635c,_0x55167a){return _0x49635c[_0x36bb('0xb')](_0x36bb('0xc'),attributes,{'tableName':_0x36bb('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe447=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./chatGroup.attributes','define','lodash'];(function(_0x49ca6b,_0x3ba842){var _0x1d957f=function(_0x12ef94){while(--_0x12ef94){_0x49ca6b['push'](_0x49ca6b['shift']());}};_0x1d957f(++_0x3ba842);}(_0xe447,0x1d5));var _0x7e44=function(_0x358806,_0x322b66){_0x358806=_0x358806-0x0;var _0x19fdcb=_0xe447[_0x358806];return _0x19fdcb;};'use strict';var _=require(_0x7e44('0x0'));var util=require('util');var logger=require(_0x7e44('0x1'))(_0x7e44('0x2'));var moment=require(_0x7e44('0x3'));var BPromise=require(_0x7e44('0x4'));var rp=require(_0x7e44('0x5'));var fs=require('fs');var path=require(_0x7e44('0x6'));var rimraf=require(_0x7e44('0x7'));var config=require('../../config/environment');var attributes=require(_0x7e44('0x8'));module['exports']=function(_0x38db02,_0xa5af13){return _0x38db02[_0x7e44('0x9')]('ChatGroup',attributes,{'tableName':'chat_groups','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.rpc.js b/server/api/chatGroup/chatGroup.rpc.js
index 32ac637..9e685ff 100644
--- a/server/api/chatGroup/chatGroup.rpc.js
+++ b/server/api/chatGroup/chatGroup.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6873=['info','request\x20sent','debug','stringify','error','code','ChatGroup,\x20%s,\x20%s','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatGroup.socket','register','request','then'];(function(_0x243b2f,_0x30aa15){var _0xcb3c2d=function(_0x213bb2){while(--_0x213bb2){_0x243b2f['push'](_0x243b2f['shift']());}};_0xcb3c2d(++_0x30aa15);}(_0x6873,0xac));var _0x3687=function(_0x5e2751,_0x518a55){_0x5e2751=_0x5e2751-0x0;var _0x139a39=_0x6873[_0x5e2751];return _0x139a39;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3687('0x0'));var BPromise=require(_0x3687('0x1'));var rs=require(_0x3687('0x2'));var fs=require('fs');var Redis=require(_0x3687('0x3'));var db=require(_0x3687('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3687('0x5'))('rpc');var config=require(_0x3687('0x6'));var jayson=require(_0x3687('0x7'));var client=jayson['client'][_0x3687('0x8')]({'port':0x232a});config[_0x3687('0x9')]=_[_0x3687('0xa')](config[_0x3687('0x9')],{'host':_0x3687('0xb'),'port':0x18eb});var socket=require(_0x3687('0xc'))(new Redis(config[_0x3687('0x9')]));require(_0x3687('0xd'))[_0x3687('0xe')](socket);function respondWithRpcPromise(_0x4feba8,_0x32c490,_0x9d2c00){return new BPromise(function(_0x48e991,_0x3e81c1){return client[_0x3687('0xf')](_0x4feba8,_0x9d2c00)[_0x3687('0x10')](function(_0x3decbe){logger[_0x3687('0x11')]('ChatGroup,\x20%s,\x20%s',_0x32c490,_0x3687('0x12'));logger[_0x3687('0x13')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x32c490,_0x3687('0x12'),JSON[_0x3687('0x14')](_0x3decbe));if(_0x3decbe[_0x3687('0x15')]){if(_0x3decbe[_0x3687('0x15')][_0x3687('0x16')]===0x1f4){logger[_0x3687('0x15')](_0x3687('0x17'),_0x32c490,_0x3decbe[_0x3687('0x15')][_0x3687('0x18')]);return _0x3e81c1(_0x3decbe['error'][_0x3687('0x18')]);}logger[_0x3687('0x15')](_0x3687('0x17'),_0x32c490,_0x3decbe['error']['message']);return _0x48e991(_0x3decbe[_0x3687('0x15')][_0x3687('0x18')]);}else{logger[_0x3687('0x11')](_0x3687('0x17'),_0x32c490,_0x3687('0x12'));_0x48e991(_0x3decbe[_0x3687('0x19')]['message']);}})[_0x3687('0x1a')](function(_0x149320){logger[_0x3687('0x15')](_0x3687('0x17'),_0x32c490,_0x149320);_0x3e81c1(_0x149320);});});}
\ No newline at end of file
+var _0x45d1=['client','http','redis','defaults','./chatGroup.socket','register','request','then','ChatGroup,\x20%s,\x20%s','request\x20sent','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x16adf1,_0x1273a5){var _0xc13362=function(_0x35e767){while(--_0x35e767){_0x16adf1['push'](_0x16adf1['shift']());}};_0xc13362(++_0x1273a5);}(_0x45d1,0x1cb));var _0x145d=function(_0x2b3478,_0x58afd7){_0x2b3478=_0x2b3478-0x0;var _0x1c106f=_0x45d1[_0x2b3478];return _0x1c106f;};'use strict';var _=require(_0x145d('0x0'));var util=require(_0x145d('0x1'));var moment=require('moment');var BPromise=require(_0x145d('0x2'));var rs=require(_0x145d('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x145d('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x145d('0x5'))(_0x145d('0x6'));var config=require(_0x145d('0x7'));var jayson=require(_0x145d('0x8'));var client=jayson[_0x145d('0x9')][_0x145d('0xa')]({'port':0x232a});config[_0x145d('0xb')]=_[_0x145d('0xc')](config[_0x145d('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x145d('0xd'))[_0x145d('0xe')](socket);function respondWithRpcPromise(_0xf4d6db,_0x583865,_0x94b991){return new BPromise(function(_0x5d2b97,_0x3543c3){return client[_0x145d('0xf')](_0xf4d6db,_0x94b991)[_0x145d('0x10')](function(_0x31dd6f){logger['info'](_0x145d('0x11'),_0x583865,_0x145d('0x12'));logger['debug'](_0x145d('0x13'),_0x583865,_0x145d('0x12'),JSON[_0x145d('0x14')](_0x31dd6f));if(_0x31dd6f[_0x145d('0x15')]){if(_0x31dd6f['error']['code']===0x1f4){logger[_0x145d('0x15')](_0x145d('0x11'),_0x583865,_0x31dd6f[_0x145d('0x15')]['message']);return _0x3543c3(_0x31dd6f[_0x145d('0x15')][_0x145d('0x16')]);}logger[_0x145d('0x15')](_0x145d('0x11'),_0x583865,_0x31dd6f[_0x145d('0x15')]['message']);return _0x5d2b97(_0x31dd6f[_0x145d('0x15')][_0x145d('0x16')]);}else{logger[_0x145d('0x17')]('ChatGroup,\x20%s,\x20%s',_0x583865,_0x145d('0x12'));_0x5d2b97(_0x31dd6f[_0x145d('0x18')][_0x145d('0x16')]);}})[_0x145d('0x19')](function(_0x49d27b){logger[_0x145d('0x15')](_0x145d('0x11'),_0x583865,_0x49d27b);_0x3543c3(_0x49d27b);});});}
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js
index 161b9c0..a880ad5 100644
--- a/server/api/chatGroup/chatGroup.socket.js
+++ b/server/api/chatGroup/chatGroup.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc550=['./chatGroup.events','save','emit','removeListener','register','chatGroup:'];(function(_0x5ce34a,_0x57887e){var _0x309350=function(_0x52a947){while(--_0x52a947){_0x5ce34a['push'](_0x5ce34a['shift']());}};_0x309350(++_0x57887e);}(_0xc550,0xfc));var _0x0c55=function(_0x3c2666,_0x15fd23){_0x3c2666=_0x3c2666-0x0;var _0x10c814=_0xc550[_0x3c2666];return _0x10c814;};'use strict';var ChatGroupEvents=require(_0x0c55('0x0'));var events=[_0x0c55('0x1'),'remove','update'];function createListener(_0x110367,_0x16cedc){return function(_0x5225b2){_0x16cedc[_0x0c55('0x2')](_0x110367,_0x5225b2);};}function removeListener(_0x3122b9,_0x4d9866){return function(){ChatGroupEvents[_0x0c55('0x3')](_0x3122b9,_0x4d9866);};}exports[_0x0c55('0x4')]=function(_0x18548b){for(var _0x5ecb3c=0x0,_0x3d9a6b=events['length'];_0x5ecb3c<_0x3d9a6b;_0x5ecb3c++){var _0x10c449=events[_0x5ecb3c];var _0x159f0f=createListener(_0x0c55('0x5')+_0x10c449,_0x18548b);ChatGroupEvents['on'](_0x10c449,_0x159f0f);}};
\ No newline at end of file
+var _0xfb07=['register','./chatGroup.events','save','emit','removeListener'];(function(_0x2a1b33,_0x409f50){var _0x4c50e7=function(_0x13e16d){while(--_0x13e16d){_0x2a1b33['push'](_0x2a1b33['shift']());}};_0x4c50e7(++_0x409f50);}(_0xfb07,0xa6));var _0x7fb0=function(_0x13ddaf,_0x2b8572){_0x13ddaf=_0x13ddaf-0x0;var _0x1d75ff=_0xfb07[_0x13ddaf];return _0x1d75ff;};'use strict';var ChatGroupEvents=require(_0x7fb0('0x0'));var events=[_0x7fb0('0x1'),'remove','update'];function createListener(_0x11b555,_0x3eba4e){return function(_0x4d7f29){_0x3eba4e[_0x7fb0('0x2')](_0x11b555,_0x4d7f29);};}function removeListener(_0x5241fe,_0x549223){return function(){ChatGroupEvents[_0x7fb0('0x3')](_0x5241fe,_0x549223);};}exports[_0x7fb0('0x4')]=function(_0x7317ff){for(var _0x317e9a=0x0,_0x101033=events['length'];_0x317e9a<_0x101033;_0x317e9a++){var _0x384417=events[_0x317e9a];var _0x376258=createListener('chatGroup:'+_0x384417,_0x7317ff);ChatGroupEvents['on'](_0x384417,_0x376258);}};
\ No newline at end of file
diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js
index 3c937a3..d81f864 100644
--- a/server/api/chatGroup/index.js
+++ b/server/api/chatGroup/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe2f1=['/:id/members','getMembers','/:id/messages','getMessages','post','addMessage','put','update','/:id','destroy','delete','exports','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatGroup.controller','get','isAuthenticated','/describe','show','/:id/unread','getUnread'];(function(_0x208711,_0x344b5d){var _0x2f5c95=function(_0x339454){while(--_0x339454){_0x208711['push'](_0x208711['shift']());}};_0x2f5c95(++_0x344b5d);}(_0xe2f1,0x183));var _0x1e2f=function(_0x5a26f5,_0x196300){_0x5a26f5=_0x5a26f5-0x0;var _0x2e9ef7=_0xe2f1[_0x5a26f5];return _0x2e9ef7;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1e2f('0x0'));var timeout=require(_0x1e2f('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x1e2f('0x2'));var auth=require(_0x1e2f('0x3'));var interaction=require(_0x1e2f('0x4'));var config=require(_0x1e2f('0x5'));var controller=require(_0x1e2f('0x6'));router[_0x1e2f('0x7')]('/',auth[_0x1e2f('0x8')](),controller['index']);router['get'](_0x1e2f('0x9'),auth['isAuthenticated'](),controller['describe']);router[_0x1e2f('0x7')]('/:id',auth['isAuthenticated'](),controller[_0x1e2f('0xa')]);router['get'](_0x1e2f('0xb'),auth[_0x1e2f('0x8')](),controller[_0x1e2f('0xc')]);router[_0x1e2f('0x7')](_0x1e2f('0xd'),auth[_0x1e2f('0x8')](),controller[_0x1e2f('0xe')]);router[_0x1e2f('0x7')](_0x1e2f('0xf'),auth[_0x1e2f('0x8')](),controller[_0x1e2f('0x10')]);router[_0x1e2f('0x11')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x1e2f('0xd'),auth[_0x1e2f('0x8')](),controller['addMembers']);router['post']('/:id/messages',auth['isAuthenticated'](),controller[_0x1e2f('0x12')]);router[_0x1e2f('0x13')]('/:id',auth[_0x1e2f('0x8')](),controller[_0x1e2f('0x14')]);router['delete'](_0x1e2f('0x15'),auth[_0x1e2f('0x8')](),controller[_0x1e2f('0x16')]);router[_0x1e2f('0x17')](_0x1e2f('0xd'),auth['isAuthenticated'](),controller['removeMembers']);module[_0x1e2f('0x18')]=router;
\ No newline at end of file
+var _0x1b65=['../../config/environment','get','isAuthenticated','index','describe','/:id','show','/:id/unread','getUnread','/:id/members','/:id/messages','getMessages','post','create','addMessage','update','delete','destroy','removeMembers','multer','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x6aecf2,_0x242a26){var _0x550c47=function(_0x1f3d31){while(--_0x1f3d31){_0x6aecf2['push'](_0x6aecf2['shift']());}};_0x550c47(++_0x242a26);}(_0x1b65,0x165));var _0x51b6=function(_0x471669,_0x1198de){_0x471669=_0x471669-0x0;var _0x3ecc95=_0x1b65[_0x471669];return _0x3ecc95;};'use strict';var multer=require(_0x51b6('0x0'));var util=require(_0x51b6('0x1'));var path=require('path');var timeout=require(_0x51b6('0x2'));var express=require('express');var router=express[_0x51b6('0x3')]();var fs_extra=require(_0x51b6('0x4'));var auth=require(_0x51b6('0x5'));var interaction=require(_0x51b6('0x6'));var config=require(_0x51b6('0x7'));var controller=require('./chatGroup.controller');router[_0x51b6('0x8')]('/',auth[_0x51b6('0x9')](),controller[_0x51b6('0xa')]);router[_0x51b6('0x8')]('/describe',auth[_0x51b6('0x9')](),controller[_0x51b6('0xb')]);router['get'](_0x51b6('0xc'),auth[_0x51b6('0x9')](),controller[_0x51b6('0xd')]);router['get'](_0x51b6('0xe'),auth[_0x51b6('0x9')](),controller[_0x51b6('0xf')]);router[_0x51b6('0x8')](_0x51b6('0x10'),auth[_0x51b6('0x9')](),controller['getMembers']);router[_0x51b6('0x8')](_0x51b6('0x11'),auth[_0x51b6('0x9')](),controller[_0x51b6('0x12')]);router[_0x51b6('0x13')]('/',auth['isAuthenticated'](),controller[_0x51b6('0x14')]);router[_0x51b6('0x13')](_0x51b6('0x10'),auth['isAuthenticated'](),controller['addMembers']);router[_0x51b6('0x13')](_0x51b6('0x11'),auth[_0x51b6('0x9')](),controller[_0x51b6('0x15')]);router['put'](_0x51b6('0xc'),auth[_0x51b6('0x9')](),controller[_0x51b6('0x16')]);router[_0x51b6('0x17')]('/:id',auth[_0x51b6('0x9')](),controller[_0x51b6('0x18')]);router['delete']('/:id/members',auth[_0x51b6('0x9')](),controller[_0x51b6('0x19')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js
index c3f200d..4c88647 100644
--- a/server/api/chatInteraction/chatInteraction.attributes.js
+++ b/server/api/chatInteraction/chatInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1752=['TEXT','STRING','DATE','exports','BOOLEAN','INTEGER','ENUM','star','thumb'];(function(_0x170ca3,_0x8bd32d){var _0x11c4bf=function(_0x48f647){while(--_0x48f647){_0x170ca3['push'](_0x170ca3['shift']());}};_0x11c4bf(++_0x8bd32d);}(_0x1752,0xa5));var _0x2175=function(_0x577a0d,_0x394368){_0x577a0d=_0x577a0d-0x0;var _0x3ce9ee=_0x1752[_0x577a0d];return _0x3ce9ee;};'use strict';var Sequelize=require('sequelize');module[_0x2175('0x0')]={'closed':{'type':Sequelize[_0x2175('0x1')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x2175('0x2')]},'ratingType':{'type':Sequelize[_0x2175('0x3')](_0x2175('0x4'),_0x2175('0x5')),'defaultValue':'star'},'ratingMessage':{'type':Sequelize[_0x2175('0x6')]},'pathTranscript':{'type':Sequelize[_0x2175('0x6')]},'mailTranscript':{'type':Sequelize[_0x2175('0x7')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x2175('0x8')]},'disposition':{'type':Sequelize[_0x2175('0x7')]},'secondDisposition':{'type':Sequelize[_0x2175('0x7')]},'thirdDisposition':{'type':Sequelize[_0x2175('0x7')]},'note':{'type':Sequelize[_0x2175('0x7')]},'browserName':{'type':Sequelize[_0x2175('0x7')]},'browserVersion':{'type':Sequelize[_0x2175('0x7')]},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize[_0x2175('0x7')]},'deviceModel':{'type':Sequelize[_0x2175('0x7')]},'deviceVendor':{'type':Sequelize[_0x2175('0x7')]},'deviceType':{'type':Sequelize[_0x2175('0x7')]},'referer':{'type':Sequelize[_0x2175('0x6')]},'customerIp':{'type':Sequelize['STRING']},'formData':{'type':Sequelize['TEXT']('long')},'read1stAt':{'type':Sequelize[_0x2175('0x8')]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize['ENUM']('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize['STRING']},'customerPort':{'type':Sequelize[_0x2175('0x7')]},'vidaooSessionId':{'type':Sequelize['TEXT']},'autoreplyExecuted':{'type':Sequelize[_0x2175('0x1')],'defaultValue':![]}};
\ No newline at end of file
+var _0x8eba=['thumb','TEXT','STRING','DATE','long','out','sequelize','exports','star'];(function(_0x200a6e,_0x2ff002){var _0x41a89b=function(_0xb83f87){while(--_0xb83f87){_0x200a6e['push'](_0x200a6e['shift']());}};_0x41a89b(++_0x2ff002);}(_0x8eba,0xc3));var _0xa8eb=function(_0x421263,_0x18187d){_0x421263=_0x421263-0x0;var _0x34e4b5=_0x8eba[_0x421263];return _0x34e4b5;};'use strict';var Sequelize=require(_0xa8eb('0x0'));module[_0xa8eb('0x1')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize['INTEGER']},'ratingType':{'type':Sequelize['ENUM'](_0xa8eb('0x2'),_0xa8eb('0x3')),'defaultValue':_0xa8eb('0x2')},'ratingMessage':{'type':Sequelize[_0xa8eb('0x4')]},'pathTranscript':{'type':Sequelize['TEXT']},'mailTranscript':{'type':Sequelize[_0xa8eb('0x5')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0xa8eb('0x6')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0xa8eb('0x5')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xa8eb('0x5')]},'browserName':{'type':Sequelize[_0xa8eb('0x5')]},'browserVersion':{'type':Sequelize[_0xa8eb('0x5')]},'osName':{'type':Sequelize[_0xa8eb('0x5')]},'osVersion':{'type':Sequelize['STRING']},'deviceModel':{'type':Sequelize[_0xa8eb('0x5')]},'deviceVendor':{'type':Sequelize[_0xa8eb('0x5')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize[_0xa8eb('0x4')]},'customerIp':{'type':Sequelize[_0xa8eb('0x5')]},'formData':{'type':Sequelize[_0xa8eb('0x4')](_0xa8eb('0x7'))},'read1stAt':{'type':Sequelize['DATE']},'lastMsgAt':{'type':Sequelize[_0xa8eb('0x6')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0xa8eb('0x8')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize['STRING']},'customerPort':{'type':Sequelize[_0xa8eb('0x5')]},'vidaooSessionId':{'type':Sequelize[_0xa8eb('0x4')]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js
index a24467e..5ba9bb8 100644
--- a/server/api/chatInteraction/chatInteraction.controller.js
+++ b/server/api/chatInteraction/chatInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc744=['ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','abandon','entity\x20not\x20found','UserId','ValidationError','closed','AbandonInteraction','attachmentUpload','file','filename','Attachment','attachmentDownload','attachId','ChatOfflineMessageId','server/files/attachments/','join','offline-chat/','basename','download','close','mailTranscript','root','server/files/chat/upload/','transcript-%s.txt','now','pathTranscript','Messages','User','ChatWebsite','ContactId','length','format','System','customer','Visitor','agentIdentifier','website_alias','%s%d','agent_alias','alias','agent_fullname','[%s]\x20%s:\x20%s\x0a','direction','appendFileSync','MailAccount','Smtp','CloudProvider','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','addMessage','ids','omit','getMessages','hasOwnProperty','order','sort','where','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','rows','getMyMessages','pick','secret','includeAgent','push','addTags','setTags','spread','Tag','color','chatInteractionTags:save','removeTags','toString','server','files','tmp','attachments','transcript-%d-%s.zip','firstName','lastName','createdAt','read','Account','Owner','get','N.A.','closedAt','browserName','osName','customerIp','customerPort','tail','existsSync','createReadStream','Contact','value','renderFile','transcript-','.pdf','createPdfFromHTML','err','unlinkSync','rimraf','zip-dir','moment','mustache','util','path','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','register','client','http','then','ChatInteraction,\x20%s,\x20%s','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','sendStatus','status','offset','undefined','limit','count','set','Content-Range','json','update','destroy','stack','name','send','merge','body','contact','interaction','account','index','map','ChatInteraction','rawAttributes','fieldName','type','key','getOptions','findAll','chat','query','params','model','keys','filters','intersection','attributes','fields','includeAll','include','options','create','find','describe','createVidaooSession','findOne','ChatWebsiteId','vidaooApiKey','vidaooEscalation','vidaooTopic','vidaooNote','vidaooMetadata','user','fullname','email','POST','https://api-vidaoo.xcally.com/api/v1/meetings','isNull','follow','parse','Sequelize','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','out'];(function(_0x4fb74e,_0x1a3a82){var _0x33da5d=function(_0x5d4705){while(--_0x5d4705){_0x4fb74e['push'](_0x4fb74e['shift']());}};_0x33da5d(++_0x1a3a82);}(_0xc744,0x6e));var _0x4c74=function(_0x3c8b68,_0x17c252){_0x3c8b68=_0x3c8b68-0x0;var _0x1f4482=_0xc744[_0x3c8b68];return _0x1f4482;};'use strict';var rimraf=require(_0x4c74('0x0'));var zipdir=require(_0x4c74('0x1'));var rp=require('request-promise');var moment=require(_0x4c74('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x4c74('0x3'));var util=require(_0x4c74('0x4'));var path=require(_0x4c74('0x5'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x4c74('0x6'));var Redis=require(_0x4c74('0x7'));var interaction=require(_0x4c74('0x8'));var qs=require(_0x4c74('0x9'));var pdf=require(_0x4c74('0xa'));var logger=require('../../config/logger')(_0x4c74('0xb'));var config=require(_0x4c74('0xc'));var db=require(_0x4c74('0xd'))['db'];config[_0x4c74('0xe')]=_[_0x4c74('0xf')](config[_0x4c74('0xe')],{'host':_0x4c74('0x10'),'port':0x18eb});var socket=require(_0x4c74('0x11'))(new Redis(config['redis']));require(_0x4c74('0x12'))[_0x4c74('0x13')](socket);var jayson=require('jayson/promise');var client=jayson[_0x4c74('0x14')]['http']({'port':0x232b});var client9004=jayson[_0x4c74('0x14')][_0x4c74('0x15')]({'port':0x232c});function respondWithRpcPromise(_0x89a9c9,_0x5a7376,_0x31fb11,_0x14ab4f){return new BPromise(function(_0x1acd04,_0x345257){var _0x18ac32=_0x14ab4f||client;return _0x18ac32['request'](_0x89a9c9,_0x31fb11)[_0x4c74('0x16')](function(_0x31b9e6){logger['info'](_0x4c74('0x17'),_0x5a7376,'request\x20sent');logger[_0x4c74('0x18')](_0x4c74('0x19'),_0x5a7376,_0x4c74('0x1a'),JSON[_0x4c74('0x1b')](_0x31b9e6));if(_0x31b9e6[_0x4c74('0x1c')]){if(_0x31b9e6[_0x4c74('0x1c')][_0x4c74('0x1d')]===0x1f4){logger['error'](_0x4c74('0x17'),_0x5a7376,_0x31b9e6['error']['message']);return _0x345257(_0x31b9e6['error'][_0x4c74('0x1e')]);}logger[_0x4c74('0x1c')](_0x4c74('0x17'),_0x5a7376,_0x31b9e6[_0x4c74('0x1c')][_0x4c74('0x1e')]);return _0x1acd04(_0x31b9e6[_0x4c74('0x1c')][_0x4c74('0x1e')]);}else{logger[_0x4c74('0x1f')](_0x4c74('0x17'),_0x5a7376,'request\x20sent');_0x1acd04(_0x31b9e6[_0x4c74('0x20')]['message']);}})[_0x4c74('0x21')](function(_0x3dccfb){logger['error'](_0x4c74('0x17'),_0x5a7376,_0x3dccfb);_0x345257(_0x3dccfb);});});}function respondWithStatusCode(_0x2d2ea8,_0x17028f){_0x17028f=_0x17028f||0xcc;return function(_0x230817){if(_0x230817){return _0x2d2ea8[_0x4c74('0x22')](_0x17028f);}return _0x2d2ea8[_0x4c74('0x23')](_0x17028f)['end']();};}function respondWithResult(_0xd250b2,_0x17979d){_0x17979d=_0x17979d||0xc8;return function(_0x35de6b){if(_0x35de6b){return _0xd250b2[_0x4c74('0x23')](_0x17979d)['json'](_0x35de6b);}};}function respondWithFilteredResult(_0x2c204b,_0x2fbef9){return function(_0x3b8f2c){if(_0x3b8f2c){var _0xc222e4=typeof _0x2fbef9[_0x4c74('0x24')]===_0x4c74('0x25')&&typeof _0x2fbef9[_0x4c74('0x26')]===_0x4c74('0x25');var _0xb00019=_0x3b8f2c[_0x4c74('0x27')];var _0x6e1bac=_0xc222e4?0x0:_0x2fbef9[_0x4c74('0x24')];var _0x55a6f0=_0xc222e4?_0x3b8f2c[_0x4c74('0x27')]:_0x2fbef9[_0x4c74('0x24')]+_0x2fbef9[_0x4c74('0x26')];var _0x5efd62;if(_0x55a6f0>=_0xb00019){_0x55a6f0=_0xb00019;_0x5efd62=0xc8;}else{_0x5efd62=0xce;}_0x2c204b['status'](_0x5efd62);return _0x2c204b[_0x4c74('0x28')](_0x4c74('0x29'),_0x6e1bac+'-'+_0x55a6f0+'/'+_0xb00019)[_0x4c74('0x2a')](_0x3b8f2c);}return null;};}function saveUpdates(_0x1f1e43){return function(_0x22ba1c){if(_0x22ba1c){return _0x22ba1c[_0x4c74('0x2b')](_0x1f1e43)[_0x4c74('0x16')](function(_0x134c68){return _0x134c68;});}return null;};}function removeEntity(_0x166fa8){return function(_0xd425f2){if(_0xd425f2){return _0xd425f2[_0x4c74('0x2c')]()['then'](function(){_0x166fa8[_0x4c74('0x23')](0xcc)['end']();});}};}function handleEntityNotFound(_0x9b9e57){return function(_0x13ce50){if(!_0x13ce50){_0x9b9e57['sendStatus'](0x194);}return _0x13ce50;};}function handleError(_0x2e2029,_0x3f7057){_0x3f7057=_0x3f7057||0x1f4;return function(_0x83d299){logger['error'](_0x83d299[_0x4c74('0x2d')]);if(_0x83d299[_0x4c74('0x2e')]){delete _0x83d299[_0x4c74('0x2e')];}_0x2e2029[_0x4c74('0x23')](_0x3f7057)[_0x4c74('0x2f')](_0x83d299);};}function getMustacheRender(_0x3bbb08,_0xa4d413){return Mustache['render'](_0x3bbb08,_[_0x4c74('0x30')](_0xa4d413[_0x4c74('0x31')],{'contact':_0xa4d413[_0x4c74('0x32')],'message':_0xa4d413['message'],'agent':_0xa4d413['agent'],'interaction':_0xa4d413[_0x4c74('0x33')],'account':_0xa4d413[_0x4c74('0x34')]}))||'';}exports[_0x4c74('0x35')]=function(_0x6e58c1,_0x25890a){var _0x4fb83e={};var _0x1272b1=_[_0x4c74('0x36')](db[_0x4c74('0x37')][_0x4c74('0x38')],function(_0x130a9b){return{'name':_0x130a9b[_0x4c74('0x39')],'type':_0x130a9b[_0x4c74('0x3a')][_0x4c74('0x3b')]};});_0x4fb83e=qs[_0x4c74('0x3c')](_0x1272b1,_0x6e58c1);return interaction[_0x4c74('0x3d')](_0x4c74('0x3e'),_0x6e58c1[_0x4c74('0x3f')],_0x6e58c1['user'],_0x4fb83e,_0x1272b1)[_0x4c74('0x16')](respondWithFilteredResult(_0x25890a,_0x4fb83e))[_0x4c74('0x21')](handleError(_0x25890a,null));};exports['show']=function(_0x542f80,_0x3dfc81){var _0xaec59={'raw':![],'where':{'id':_0x542f80[_0x4c74('0x40')]['id']}},_0x490482={};_0x490482[_0x4c74('0x41')]=_[_0x4c74('0x42')](db[_0x4c74('0x37')][_0x4c74('0x38')]);_0x490482[_0x4c74('0x3f')]=_[_0x4c74('0x42')](_0x542f80[_0x4c74('0x3f')]);_0x490482[_0x4c74('0x43')]=_[_0x4c74('0x44')](_0x490482[_0x4c74('0x41')],_0x490482[_0x4c74('0x3f')]);_0xaec59[_0x4c74('0x45')]=_[_0x4c74('0x44')](_0x490482[_0x4c74('0x41')],qs[_0x4c74('0x46')](_0x542f80[_0x4c74('0x3f')][_0x4c74('0x46')]));_0xaec59[_0x4c74('0x45')]=_0xaec59[_0x4c74('0x45')]['length']?_0xaec59[_0x4c74('0x45')]:_0x490482[_0x4c74('0x41')];if(_0x542f80[_0x4c74('0x3f')][_0x4c74('0x47')]){_0xaec59[_0x4c74('0x48')]=[{'all':!![]}];}_0xaec59=_['merge']({},_0xaec59,_0x542f80[_0x4c74('0x49')]);return db['ChatInteraction']['find'](_0xaec59)[_0x4c74('0x16')](handleEntityNotFound(_0x3dfc81,null))[_0x4c74('0x16')](respondWithResult(_0x3dfc81,null))[_0x4c74('0x21')](handleError(_0x3dfc81,null));};exports[_0x4c74('0x4a')]=function(_0x3d16c3,_0x1db5dc){return db['ChatInteraction'][_0x4c74('0x4a')](_0x3d16c3[_0x4c74('0x31')],{})[_0x4c74('0x16')](respondWithResult(_0x1db5dc,0xc9))['catch'](handleError(_0x1db5dc,null));};exports[_0x4c74('0x2b')]=function(_0x32b11d,_0x224593){if(_0x32b11d['body']['id']){delete _0x32b11d[_0x4c74('0x31')]['id'];}return db[_0x4c74('0x37')][_0x4c74('0x4b')]({'where':{'id':_0x32b11d[_0x4c74('0x40')]['id']}})[_0x4c74('0x16')](handleEntityNotFound(_0x224593,null))[_0x4c74('0x16')](saveUpdates(_0x32b11d['body'],null))['then'](respondWithResult(_0x224593,null))['catch'](handleError(_0x224593,null));};exports['destroy']=function(_0xde8850,_0xed7c5f){return db[_0x4c74('0x37')][_0x4c74('0x4b')]({'where':{'id':_0xde8850[_0x4c74('0x40')]['id']}})[_0x4c74('0x16')](handleEntityNotFound(_0xed7c5f,null))[_0x4c74('0x16')](removeEntity(_0xed7c5f,null))[_0x4c74('0x21')](handleError(_0xed7c5f,null));};exports[_0x4c74('0x4c')]=function(_0x4acb8e,_0x57b2d3){return db[_0x4c74('0x37')][_0x4c74('0x4c')]()[_0x4c74('0x16')](respondWithResult(_0x57b2d3,null))['catch'](handleError(_0x57b2d3,null));};exports[_0x4c74('0x4d')]=function(_0x417651,_0x46cc10){var _0x2dfb43=_0x417651[_0x4c74('0x40')]['id'];var _0x9ef80b;var _0x316b98;var _0x445a65;return db['ChatInteraction'][_0x4c74('0x4e')]({'where':{'id':_0x2dfb43}})['then'](function(_0x2e7a37){_0x9ef80b=_0x2e7a37;return db['ChatWebsite']['findOne']({'where':{'id':_0x2e7a37[_0x4c74('0x4f')]},'attributes':['id',_0x4c74('0x50'),_0x4c74('0x51'),_0x4c74('0x52'),_0x4c74('0x53'),_0x4c74('0x54')],'raw':!![]});})[_0x4c74('0x16')](function(_0x45c0e9){if(_0x45c0e9&&_0x45c0e9[_0x4c74('0x50')]&&_0x45c0e9['vidaooEscalation']){_0x316b98=_0x45c0e9;var _0x319115={'interaction':{'id':_0x2dfb43},'agent':{'id':_0x417651[_0x4c74('0x55')]['id'],'name':_0x417651[_0x4c74('0x55')]['name'],'fullname':_0x417651[_0x4c74('0x55')][_0x4c74('0x56')],'email':_0x417651[_0x4c74('0x55')][_0x4c74('0x57')]},'contact':_0x417651[_0x4c74('0x31')][_0x4c74('0x32')],'account':_0x417651[_0x4c74('0x31')][_0x4c74('0x34')]};var _0x719805={'rejectUnauthorized':![],'method':_0x4c74('0x58'),'url':_0x4c74('0x59'),'headers':{'X-APIKEY':_0x45c0e9[_0x4c74('0x50')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x417651['user'][_0x4c74('0x57')]],'buttons':null,'topic':_0x316b98[_0x4c74('0x52')],'note':_[_0x4c74('0x5a')](_0x316b98[_0x4c74('0x53')])?null:getMustacheRender(_0x316b98[_0x4c74('0x53')],_0x319115),'metadata':null},'redirect':_0x4c74('0x5b'),'json':!![]};try{if(!_[_0x4c74('0x5a')](_0x316b98[_0x4c74('0x54')])){var _0x2ad627=getMustacheRender(_0x316b98[_0x4c74('0x54')],_0x319115);var _0x3ec78e=JSON[_0x4c74('0x5c')](_0x2ad627);_0x719805[_0x4c74('0x31')]['metadata']=_0x3ec78e;}}catch(_0x5a7757){throw new db[(_0x4c74('0x5d'))]['ValidationError'](_0x4c74('0x5e'));}return rp(_0x719805);}else{throw new db[(_0x4c74('0x5d'))]['ValidationError'](_0x4c74('0x5f'));}})[_0x4c74('0x16')](function(_0x4e0038){_0x445a65=_0x4e0038;if(_0x445a65['id']){var _0x597b8e={'body':_0x445a65['join_url'],'ChatWebsiteId':_0x316b98['id'],'ChatInteractionId':_0x9ef80b['id'],'direction':_0x4c74('0x60'),'UserId':_0x417651[_0x4c74('0x55')]['id']};return db[_0x4c74('0x61')]['create'](_0x597b8e,{});}else{throw new db[(_0x4c74('0x5d'))]['ValidationError'](_0x4c74('0x62'));}})[_0x4c74('0x16')](function(){return _0x9ef80b[_0x4c74('0x63')]({'vidaooSessionId':_0x445a65['id']});})[_0x4c74('0x16')](respondWithResult(_0x46cc10,null))[_0x4c74('0x21')](handleError(_0x46cc10,null));};exports[_0x4c74('0x64')]=function(_0x59e41d,_0x2ede8f){if(_0x59e41d[_0x4c74('0x31')]['id']){delete _0x59e41d[_0x4c74('0x31')]['id'];}return db[_0x4c74('0x37')]['find']({'where':{'id':_0x59e41d[_0x4c74('0x40')]['id']},'include':[{'model':db[_0x4c74('0x65')],'as':'Contact'}]})['then'](handleEntityNotFound(_0x2ede8f,null))[_0x4c74('0x16')](saveUpdates(_0x59e41d['body'],null))[_0x4c74('0x16')](respondWithResult(_0x2ede8f,null))[_0x4c74('0x21')](handleError(_0x2ede8f,null));};exports['abandon']=function(_0x20870b,_0x52c09b){if(_0x20870b['body']['id']){delete _0x20870b[_0x4c74('0x31')]['id'];}return db[_0x4c74('0x37')][_0x4c74('0x4b')]({'where':{'id':_0x20870b[_0x4c74('0x40')]['id']}})[_0x4c74('0x16')](function(_0x1042a6){if(!_0x1042a6){logger['error']('abandonInteraction,\x20%s,\x20%s,\x20%s',_0x4c74('0x66'),0x194,_0x4c74('0x67'));_0x52c09b[_0x4c74('0x22')](0x194);}else{if(_0x1042a6[_0x4c74('0x68')]){throw new db[(_0x4c74('0x5d'))][(_0x4c74('0x69'))]('Interaction\x20already\x20assigned');}}return _0x1042a6;})[_0x4c74('0x16')](function(_0x3a2633){if(_0x3a2633){return _0x3a2633[_0x4c74('0x2b')]({'closed':_0x20870b[_0x4c74('0x31')][_0x4c74('0x6a')],'disposition':_0x20870b[_0x4c74('0x31')]['disposition']})[_0x4c74('0x16')](function(_0x3e08fb){return _0x3e08fb;});}})['then'](function(){return respondWithRpcPromise(_0x4c74('0x6b'),_0x4c74('0x66'),_0x20870b['body'],client9004);})[_0x4c74('0x16')](respondWithResult(_0x52c09b,null))[_0x4c74('0x21')](handleError(_0x52c09b,null));};exports[_0x4c74('0x6c')]=function(_0x5ecbc3,_0x53b5de){_0x5ecbc3['body']['name']=_0x5ecbc3[_0x4c74('0x6d')]['originalname'];_0x5ecbc3[_0x4c74('0x31')]['basename']=_0x5ecbc3[_0x4c74('0x6d')][_0x4c74('0x6e')];_0x5ecbc3[_0x4c74('0x31')][_0x4c74('0x3a')]=_0x5ecbc3[_0x4c74('0x6d')]['mimetype'];return db[_0x4c74('0x6f')]['create'](_0x5ecbc3[_0x4c74('0x31')])[_0x4c74('0x16')](respondWithResult(_0x53b5de,0xc9))[_0x4c74('0x21')](handleError(_0x53b5de,null));};exports[_0x4c74('0x70')]=function(_0x19be80,_0x18cded){return db['ChatInteraction']['findOne']({'where':{'id':_0x19be80[_0x4c74('0x40')]['id']},'raw':!![]})[_0x4c74('0x16')](handleEntityNotFound(_0x18cded,null))['then'](function(_0x37e5fd){if(_0x37e5fd){if(_0x37e5fd[_0x4c74('0x6a')]){return _0x18cded[_0x4c74('0x23')](0x193)[_0x4c74('0x2a')]({'status':0x193,'message':'Unauthorized'});}return db[_0x4c74('0x6f')][_0x4c74('0x4e')]({'where':{'id':_0x19be80[_0x4c74('0x3f')][_0x4c74('0x71')]},'raw':!![]})[_0x4c74('0x16')](handleEntityNotFound(_0x18cded,null));}})[_0x4c74('0x16')](function(_0x339b27){if(_0x339b27){var _0x1c6232=_0x339b27[_0x4c74('0x72')]!==null;var _0x37b7b4=path['join'](config['root'],_0x4c74('0x73'));if(_0x1c6232){_0x37b7b4=path[_0x4c74('0x74')](_0x37b7b4,_0x4c74('0x75'));}var _0x5a41a9=path[_0x4c74('0x74')](_0x37b7b4,_0x339b27[_0x4c74('0x76')]);return _0x18cded[_0x4c74('0x77')](_0x5a41a9);}})[_0x4c74('0x21')](handleError(_0x18cded,null));};exports[_0x4c74('0x78')]=function(_0x89e0a6,_0xc1a229){var _0x4b5f18=null;var _0xe67d59=null;var _0xd2d7a3=null;if(_0x89e0a6[_0x4c74('0x31')]['id']){delete _0x89e0a6[_0x4c74('0x31')]['id'];}if(_0x89e0a6['body'][_0x4c74('0x79')]){_0xd2d7a3=path[_0x4c74('0x74')](config[_0x4c74('0x7a')],_0x4c74('0x7b'),util['format'](_0x4c74('0x7c'),Date[_0x4c74('0x7d')]()));_0x89e0a6[_0x4c74('0x31')][_0x4c74('0x7e')]=_0xd2d7a3;}return db[_0x4c74('0x37')][_0x4c74('0x4b')]({'where':{'id':_0x89e0a6[_0x4c74('0x40')]['id']},'include':[{'model':db[_0x4c74('0x61')],'as':_0x4c74('0x7f'),'include':[{'model':db[_0x4c74('0x80')],'as':'User'}]}]})['then'](handleEntityNotFound(_0xc1a229,null))['then'](saveUpdates(_0x89e0a6[_0x4c74('0x31')],null))[_0x4c74('0x16')](function(_0x586e71){if(_0x586e71){_0x4b5f18=_0x586e71;return db[_0x4c74('0x81')][_0x4c74('0x4b')]({'where':{'id':_0x4b5f18[_0x4c74('0x4f')]}});}})[_0x4c74('0x16')](function(_0x2ecc8){if(_0x2ecc8){_0xe67d59=_0x2ecc8;return db[_0x4c74('0x65')][_0x4c74('0x4b')]({'where':{'id':_0x4b5f18[_0x4c74('0x82')]}});}})[_0x4c74('0x16')](function(_0x545a5e){if(_0x545a5e){if(_0xd2d7a3){var _0xa7f8c1=null;for(var _0x411dd2=0x1;_0x411dd2<_0x4b5f18[_0x4c74('0x7f')][_0x4c74('0x83')];++_0x411dd2){_0xa7f8c1=_0x4b5f18['Messages'][_0x411dd2];var _0x226069=_0xa7f8c1['UserId']?util[_0x4c74('0x84')]('%s%d',_0xe67d59['agentAlias'],_0xa7f8c1[_0x4c74('0x68')]):_0x4c74('0x85');var _0x98f00=_0x89e0a6[_0x4c74('0x31')][_0x4c74('0x86')]||util[_0x4c74('0x84')]('%s%d',_0x4c74('0x87'),_0xa7f8c1[_0x4c74('0x82')]);switch(_0xe67d59[_0x4c74('0x88')]){case _0x4c74('0x89'):_0x226069=_0xa7f8c1['UserId']?util['format'](_0x4c74('0x8a'),_0xe67d59['agentAlias'],_0xa7f8c1[_0x4c74('0x68')]):_0x4c74('0x85');break;case _0x4c74('0x8b'):_0x226069=_0xa7f8c1[_0x4c74('0x68')]?_0xa7f8c1[_0x4c74('0x80')][_0x4c74('0x8c')]||_0xa7f8c1['User'][_0x4c74('0x56')]:_0x4c74('0x85');break;case _0x4c74('0x8d'):_0x226069=_0xa7f8c1[_0x4c74('0x68')]?_0xa7f8c1['User'][_0x4c74('0x56')]:_0x4c74('0x85');break;default:_0x226069=_0xa7f8c1['UserId']?util[_0x4c74('0x84')]('%s%d',_0xe67d59['agentAlias'],_0xa7f8c1[_0x4c74('0x68')]):'System';}var _0x270170=util[_0x4c74('0x84')](_0x4c74('0x8e'),moment(_0xa7f8c1['createdAt'])[_0x4c74('0x84')]('MM/DD/YYYY\x20HH:mm:ss'),_0xa7f8c1[_0x4c74('0x8f')]==='in'?_0x98f00:_0x226069,_0xa7f8c1[_0x4c74('0x31')]);if(!_0xa7f8c1['secret']){fs[_0x4c74('0x90')](_0xd2d7a3,_0x270170);}}return db[_0x4c74('0x91')][_0x4c74('0x4e')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':_0x4c74('0x92'),'raw':!![],'include':[{'model':db[_0x4c74('0x93')],'as':_0x4c74('0x93'),'raw':!![]}]}]});}}})[_0x4c74('0x16')](function(_0x29e147){if(!_0x29e147||!_0x29e147[_0x4c74('0x92')]||!_0x89e0a6['body'])return _0x4b5f18;var _0x179ab0=_0x29e147[_0x4c74('0x94')]();return respondWithRpcPromise(_0x4c74('0x95'),_0x4c74('0x96'),{'account':_0x179ab0,'message':{'from':util[_0x4c74('0x84')](_0x4c74('0x97'),_0x29e147[_0x4c74('0x2e')],_0x29e147[_0x4c74('0x57')]||_0x29e147[_0x4c74('0x92')]['user']),'to':_0x89e0a6[_0x4c74('0x31')]['mailTranscript'],'subject':'Mail\x20Transcript','text':util[_0x4c74('0x84')]('Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a',_0x89e0a6[_0x4c74('0x31')][_0x4c74('0x79')]),'attachments':[{'path':_0xd2d7a3}]}})[_0x4c74('0x16')](function(){return _0x4b5f18;})['catch'](function(_0x522904){logger['error'](_0x522904);});})['then'](respondWithStatusCode(_0xc1a229,0xc8))[_0x4c74('0x21')](handleError(_0xc1a229,null));};exports[_0x4c74('0x98')]=function(_0xad299b,_0x5e9836){return db[_0x4c74('0x61')]['find']({'where':{'id':_0xad299b[_0x4c74('0x40')]['id']}})[_0x4c74('0x16')](handleEntityNotFound(_0x5e9836,null))['then'](function(_0x139a6f){if(_0x139a6f){return _0x139a6f['addMessage'](_0xad299b[_0x4c74('0x31')][_0x4c74('0x99')],_[_0x4c74('0x9a')](_0xad299b[_0x4c74('0x31')],[_0x4c74('0x99'),'id'])||{});}})[_0x4c74('0x16')](respondWithResult(_0x5e9836,null))[_0x4c74('0x21')](handleError(_0x5e9836,null));};exports[_0x4c74('0x9b')]=function(_0x549974,_0x4417f7){var _0x2336a7={'raw':![],'where':{}};var _0x1d9b69={};var _0x1c35ff={'count':0x0,'rows':[]};return db[_0x4c74('0x37')]['findOne']({'where':{'id':_0x549974[_0x4c74('0x40')]['id']}})['then'](handleEntityNotFound(_0x4417f7,null))['then'](function(_0x51af22){if(_0x51af22){_0x1d9b69['model']=_[_0x4c74('0x42')](db[_0x4c74('0x61')]['rawAttributes']);_0x1d9b69[_0x4c74('0x3f')]=_[_0x4c74('0x42')](_0x549974[_0x4c74('0x3f')]);_0x1d9b69[_0x4c74('0x43')]=_[_0x4c74('0x44')](_0x1d9b69[_0x4c74('0x41')],_0x1d9b69[_0x4c74('0x3f')]);_0x2336a7[_0x4c74('0x45')]=_[_0x4c74('0x44')](_0x1d9b69['model'],qs['fields'](_0x549974[_0x4c74('0x3f')][_0x4c74('0x46')]));_0x2336a7['attributes']=_0x2336a7[_0x4c74('0x45')]['length']?_0x2336a7[_0x4c74('0x45')]:_0x1d9b69['model'];if(!_0x549974[_0x4c74('0x3f')][_0x4c74('0x9c')]('nolimit')){_0x2336a7[_0x4c74('0x26')]=qs[_0x4c74('0x26')](_0x549974[_0x4c74('0x3f')][_0x4c74('0x26')]);_0x2336a7[_0x4c74('0x24')]=qs[_0x4c74('0x24')](_0x549974[_0x4c74('0x3f')][_0x4c74('0x24')]);}_0x2336a7[_0x4c74('0x9d')]=qs['sort'](_0x549974[_0x4c74('0x3f')][_0x4c74('0x9e')]);_0x2336a7[_0x4c74('0x9f')]=qs['filters'](_['pick'](_0x549974[_0x4c74('0x3f')],_0x1d9b69[_0x4c74('0x43')]));_0x2336a7['where']['ChatInteractionId']=_0x51af22['id'];if(_0x549974['query'][_0x4c74('0xa0')]){_0x2336a7[_0x4c74('0x9f')]=_[_0x4c74('0x30')](_0x2336a7[_0x4c74('0x9f')],{'$or':_['map'](_0x2336a7[_0x4c74('0x45')],function(_0x5c8a5c){var _0x3692d5={};_0x3692d5[_0x5c8a5c]={'$like':'%'+_0x549974['query'][_0x4c74('0xa0')]+'%'};return _0x3692d5;})});}if(_0x549974[_0x4c74('0x3f')][_0x4c74('0xa1')]){var _0x4ff25e=_0x549974[_0x4c74('0x3f')][_0x4c74('0xa1')][_0x4c74('0xa2')](',');var _0x59171b={};_0x59171b[_0x4ff25e[0x0]]={'$gte':moment(_0x4ff25e[0x1])[_0x4c74('0x84')](_0x4c74('0xa3'))};_0x2336a7[_0x4c74('0x9f')]=_[_0x4c74('0x30')](_0x2336a7['where'],_0x59171b);}_0x2336a7=_[_0x4c74('0x30')]({},_0x2336a7,_0x549974[_0x4c74('0x49')]);return db['ChatMessage'][_0x4c74('0x27')]({'where':_0x2336a7[_0x4c74('0x9f')]})[_0x4c74('0x16')](function(_0x41cf4a){_0x1c35ff[_0x4c74('0x27')]=_0x41cf4a;if(_0x549974[_0x4c74('0x3f')][_0x4c74('0x47')]){_0x2336a7['include']=[{'all':!![]}];}return db[_0x4c74('0x61')][_0x4c74('0x3d')](_0x2336a7);})[_0x4c74('0x16')](function(_0x3a6fd1){_0x1c35ff[_0x4c74('0xa4')]=_0x3a6fd1;return _0x1c35ff;});}})['then'](respondWithFilteredResult(_0x4417f7,_0x2336a7))['catch'](handleError(_0x4417f7,null));};exports[_0x4c74('0xa5')]=function(_0x20d78d,_0x481c77){var _0x3d43b2={'where':{}},_0x26ecbd={},_0x4b6f58={'count':0x0,'rows':[]};return db[_0x4c74('0x37')][_0x4c74('0x4e')]({'where':{'id':_0x20d78d[_0x4c74('0x40')]['id']}})[_0x4c74('0x16')](handleEntityNotFound(_0x481c77,null))[_0x4c74('0x16')](function(_0xee2812){if(_0xee2812){_0x26ecbd[_0x4c74('0x41')]=_[_0x4c74('0x42')](db[_0x4c74('0x61')][_0x4c74('0x38')]);_0x26ecbd[_0x4c74('0x3f')]=_[_0x4c74('0x42')](_0x20d78d[_0x4c74('0x3f')]);_0x26ecbd[_0x4c74('0x43')]=_['intersection'](_0x26ecbd[_0x4c74('0x41')],_0x26ecbd[_0x4c74('0x3f')]);_0x3d43b2[_0x4c74('0x45')]=_['intersection'](_0x26ecbd[_0x4c74('0x41')],qs['fields'](_0x20d78d[_0x4c74('0x3f')][_0x4c74('0x46')]));_0x3d43b2['attributes']=_0x3d43b2[_0x4c74('0x45')][_0x4c74('0x83')]?_0x3d43b2[_0x4c74('0x45')]:_0x26ecbd[_0x4c74('0x41')];if(!_0x20d78d[_0x4c74('0x3f')][_0x4c74('0x9c')]('nolimit')){_0x3d43b2[_0x4c74('0x26')]=qs[_0x4c74('0x26')](_0x20d78d[_0x4c74('0x3f')][_0x4c74('0x26')]);_0x3d43b2[_0x4c74('0x24')]=qs[_0x4c74('0x24')](_0x20d78d['query'][_0x4c74('0x24')]);}_0x3d43b2[_0x4c74('0x9d')]=qs[_0x4c74('0x9e')](_0x20d78d[_0x4c74('0x3f')][_0x4c74('0x9e')]);_0x3d43b2[_0x4c74('0x9f')]=qs[_0x4c74('0x43')](_[_0x4c74('0xa6')](_0x20d78d[_0x4c74('0x3f')],_0x26ecbd['filters']));_0x3d43b2[_0x4c74('0x9f')]['ChatInteractionId']=_0xee2812['id'];if(_0x20d78d[_0x4c74('0x3f')][_0x4c74('0xa0')]){_0x3d43b2['where']=_['merge'](_0x3d43b2[_0x4c74('0x9f')],{'$or':_[_0x4c74('0x36')](_0x3d43b2[_0x4c74('0x45')],function(_0x31a071){var _0x13b33b={};_0x13b33b[_0x31a071]={'$like':'%'+_0x20d78d[_0x4c74('0x3f')][_0x4c74('0xa0')]+'%'};return _0x13b33b;})});}_0x3d43b2[_0x4c74('0x9f')][_0x4c74('0xa7')]=![];if(_0x20d78d[_0x4c74('0x3f')]['id']){_0x3d43b2[_0x4c74('0x9f')]['id']={'$gt':_0x20d78d[_0x4c74('0x3f')]['id']};}_0x3d43b2=_[_0x4c74('0x30')]({},_0x3d43b2,_0x20d78d[_0x4c74('0x49')]);return db['ChatMessage'][_0x4c74('0x27')]({'where':_0x3d43b2[_0x4c74('0x9f')]})[_0x4c74('0x16')](function(_0x184a31){_0x4b6f58[_0x4c74('0x27')]=_0x184a31;_0x3d43b2[_0x4c74('0x48')]=[];if(_0x20d78d[_0x4c74('0x3f')][_0x4c74('0xa8')]){_0x3d43b2[_0x4c74('0x48')][_0x4c74('0xa9')]({'model':db[_0x4c74('0x80')],'as':_0x4c74('0x80'),'attributes':['id',_0x4c74('0x56'),_0x4c74('0x8c')]});}if(_0x20d78d[_0x4c74('0x3f')][_0x4c74('0x47')]){_0x3d43b2[_0x4c74('0x48')]=[{'all':!![]}];}return db[_0x4c74('0x61')][_0x4c74('0x3d')](_0x3d43b2);})[_0x4c74('0x16')](function(_0x560307){_0x4b6f58['rows']=_0x560307;return _0x4b6f58;});}})['then'](respondWithFilteredResult(_0x481c77,_0x3d43b2))[_0x4c74('0x21')](handleError(_0x481c77,null));};exports[_0x4c74('0xaa')]=function(_0x3bdcfd,_0x685c11){return db[_0x4c74('0x37')]['find']({'where':{'id':_0x3bdcfd[_0x4c74('0x40')]['id']}})[_0x4c74('0x16')](handleEntityNotFound(_0x685c11,null))['then'](function(_0x1ae273){if(_0x1ae273){return _0x1ae273[_0x4c74('0xab')](_0x3bdcfd[_0x4c74('0x31')]['ids'],_[_0x4c74('0x9a')](_0x3bdcfd[_0x4c74('0x31')],[_0x4c74('0x99'),'id'])||{})[_0x4c74('0xac')](function(){return db[_0x4c74('0xad')][_0x4c74('0x3d')]({'attributes':['id',_0x4c74('0x2e'),_0x4c74('0xae')],'where':{'id':_0x3bdcfd['body']['ids']}});})['then'](function(_0x3d98da){socket['emit'](_0x4c74('0xaf'),{'id':Number(_0x3bdcfd[_0x4c74('0x40')]['id']),'tags':_0x3d98da||[]});return{'id':Number(_0x3bdcfd[_0x4c74('0x40')]['id']),'tags':_0x3d98da||[]};});}})[_0x4c74('0x16')](respondWithResult(_0x685c11,null))['catch'](handleError(_0x685c11,null));};exports[_0x4c74('0xb0')]=function(_0x674365,_0x43f99d){return db[_0x4c74('0x37')][_0x4c74('0x4b')]({'where':{'id':_0x674365[_0x4c74('0x40')]['id']}})[_0x4c74('0x16')](handleEntityNotFound(_0x43f99d,null))[_0x4c74('0x16')](function(_0x49556c){if(_0x49556c){return _0x49556c[_0x4c74('0xb0')](_0x674365[_0x4c74('0x3f')][_0x4c74('0x99')]);}})['then'](respondWithStatusCode(_0x43f99d,null))[_0x4c74('0x21')](handleError(_0x43f99d,null));};exports['download']=function(_0x56ba93,_0x874866){var _0x321259=moment()['unix']()[_0x4c74('0xb1')]();var _0x534bee=path[_0x4c74('0x74')](config[_0x4c74('0x7a')],_0x4c74('0xb2'),_0x4c74('0xb3'),_0x4c74('0xb4'));var _0x58a048=path['join'](config['root'],_0x4c74('0xb2'),_0x4c74('0xb3'),_0x4c74('0xb5'));var _0x453c0d=path[_0x4c74('0x74')](_0x534bee,_0x321259);var _0x344f5e=util['format'](_0x4c74('0xb6'),_0x56ba93[_0x4c74('0x40')]['id'],_0x321259);var _0x43f710=path[_0x4c74('0x74')](_0x534bee,_0x344f5e);var _0x5a0e83=[];_0x5a0e83[_0x4c74('0xa9')]({'model':db[_0x4c74('0x80')],'as':_0x4c74('0x80'),'attributes':['id',_0x4c74('0x56')],'raw':!![]});_0x5a0e83[_0x4c74('0xa9')]({'model':db['CmContact'],'as':'Contact','attributes':['id',_0x4c74('0xb7'),_0x4c74('0xb8')],'raw':!![]});if(_0x56ba93[_0x4c74('0x3f')][_0x4c74('0xb5')]){_0x5a0e83[_0x4c74('0xa9')]({'model':db[_0x4c74('0x6f')],'as':_0x4c74('0x6f'),'raw':!![]});}var _0x40715a=[{'model':db[_0x4c74('0x61')],'as':_0x4c74('0x7f'),'attributes':['id',_0x4c74('0x31'),_0x4c74('0xb9'),_0x4c74('0x8f'),_0x4c74('0xa7'),_0x4c74('0xba')],'include':_0x5a0e83}];_0x40715a[_0x4c74('0xa9')]({'model':db[_0x4c74('0x81')],'as':_0x4c74('0xbb'),'attributes':['id',_0x4c74('0x2e')]});_0x40715a['push']({'model':db[_0x4c74('0x80')],'as':_0x4c74('0xbc'),'attributes':['id',_0x4c74('0x56')]});return db[_0x4c74('0x37')][_0x4c74('0x4b')]({'where':{'id':_0x56ba93[_0x4c74('0x40')]['id']},'include':_0x40715a})[_0x4c74('0x16')](handleEntityNotFound(_0x874866,null))[_0x4c74('0x16')](function(_0x429657){if(_0x429657){var _0x2d32da=_0x429657[_0x4c74('0xbd')]({'plain':!![]});fs['mkdirSync'](_0x453c0d);var _0x5579ec={'channel':'Chat','account':_0x2d32da[_0x4c74('0xbb')][_0x4c74('0x2e')],'agent':_0x2d32da['Owner']?_0x2d32da[_0x4c74('0xbc')][_0x4c74('0x56')]:_0x4c74('0xbe'),'createdAt':moment(_0x2d32da[_0x4c74('0xb9')])[_0x4c74('0x84')]('YYYY-MM-DD\x20HH:mm:ss')[_0x4c74('0xb1')](),'closedAt':_0x2d32da['closed']?moment(_0x2d32da[_0x4c74('0xbf')])[_0x4c74('0x84')]('YYYY-MM-DD\x20HH:mm:ss')[_0x4c74('0xb1')]():'','disposition':_0x2d32da['disposition'],'chatInfo':{'browser':_0x2d32da[_0x4c74('0xc0')],'os':_0x2d32da[_0x4c74('0xc1')],'referer':_0x2d32da['referer'],'customerIp':_0x2d32da[_0x4c74('0xc2')],'customerPort':_0x2d32da[_0x4c74('0xc3')]?_0x2d32da[_0x4c74('0xc3')]:'N.A.'},'messages':_(_0x2d32da['Messages'])[_0x4c74('0xc4')]()['filter']({'secret':![]})[_0x4c74('0x36')](function(_0x3661e9){if(_0x3661e9['Attachment']){var _0x57fd4e=path[_0x4c74('0x74')](_0x58a048,_0x3661e9[_0x4c74('0x6f')]['basename']);if(fs[_0x4c74('0xc5')](_0x57fd4e)){fs[_0x4c74('0xc6')](_0x57fd4e)['pipe'](fs['createWriteStream'](path['join'](_0x453c0d,_0x3661e9[_0x4c74('0x6f')][_0x4c74('0x76')])));}}return{'date':moment(_0x3661e9[_0x4c74('0xb9')])[_0x4c74('0x84')](_0x4c74('0xa3'))[_0x4c74('0xb1')](),'sender':_0x3661e9[_0x4c74('0x8f')]==='out'?_0x3661e9[_0x4c74('0x80')]?_0x3661e9[_0x4c74('0x80')][_0x4c74('0x56')]:'System':_0x3661e9[_0x4c74('0xc7')][_0x4c74('0xb7')]+(_0x3661e9['Contact'][_0x4c74('0xb8')]?'\x20'+_0x3661e9[_0x4c74('0xc7')][_0x4c74('0xb8')]:''),'body':_0x3661e9[_0x4c74('0x6f')]?_0x3661e9[_0x4c74('0x6f')][_0x4c74('0x76')]:_0x3661e9[_0x4c74('0x31')],'direction':_0x3661e9[_0x4c74('0x8f')]==='out'?'A':'C','secret':_0x3661e9[_0x4c74('0xa7')],'read':_0x3661e9[_0x4c74('0xba')],'attachment':_0x3661e9[_0x4c74('0x6f')]};})[_0x4c74('0xc8')]()};return ejs[_0x4c74('0xc9')](path[_0x4c74('0x74')](config[_0x4c74('0x7a')],_0x4c74('0xb2'),'views','downloadInteraction.ejs'),{'interaction':_0x5579ec})[_0x4c74('0x16')](function(_0x29868e){var _0xa1d7a3=path[_0x4c74('0x74')](_0x453c0d,_0x4c74('0xca')+_0x2d32da['id']+'-'+_0x321259+_0x4c74('0xcb'));var _0xdf2ee1={'path':_0xa1d7a3,'channel':'Chat','interactionId':_0x2d32da['id']};return pdf[_0x4c74('0xcc')](_0x29868e,_0xdf2ee1);})['then'](function(){return new Promise(function(_0x585e98,_0x390e8b){zipdir(_0x453c0d,{'saveTo':_0x43f710},function(_0x461bae,_0x26375b){if(_0x461bae)return _0x390e8b(_0x461bae);return _0x585e98(_0x26375b);});})['then'](function(){return new BPromise(function(_0x4e4c5f,_0x3605a1){rimraf(_0x453c0d,function(_0x562749){if(_0x562749)_0x3605a1(_0x562749);return _0x4e4c5f();});});})[_0x4c74('0x16')](function(){return _0x874866[_0x4c74('0x77')](_0x43f710,_0x344f5e,function(_0x1af125){if(_0x1af125){logger[_0x4c74('0x1c')](_0x4c74('0xcd'),_0x1af125);}else{fs[_0x4c74('0xce')](_0x43f710);}});});});}else{return _0x874866['sendStatus'](0xc8);}})[_0x4c74('0x21')](handleError(_0x874866,null));};
\ No newline at end of file
+var _0x7b95=['name','render','merge','body','contact','agent','interaction','account','index','map','rawAttributes','type','key','findAll','chat','query','user','show','params','model','keys','ChatInteraction','filters','intersection','attributes','fields','length','includeAll','options','find','create','update','describe','createVidaooSession','ChatWebsite','findOne','ChatWebsiteId','vidaooEscalation','vidaooTopic','vidaooNote','vidaooApiKey','email','POST','https://api-vidaoo.xcally.com/api/v1/meetings','follow','isNull','vidaooMetadata','parse','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','join_url','out','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','CmContact','Contact','abandonInteraction,\x20%s,\x20%s,\x20%s','UserId','Interaction\x20already\x20assigned','closed','AbandonInteraction','abandon','attachmentUpload','originalname','basename','file','filename','mimetype','attachmentDownload','Attachment','join','root','server/files/attachments/','offline-chat/','download','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','now','pathTranscript','Messages','User','ContactId','%s%d','agentAlias','System','customer','Visitor','website_alias','agent_alias','alias','fullname','agent_fullname','[%s]\x20%s:\x20%s\x0a','createdAt','MM/DD/YYYY\x20HH:mm:ss','direction','secret','MailServerOut','Smtp','CloudProvider','getSmtpOptions','sendMail','\x22%s\x22\x20<%s>','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ChatMessage','ids','omit','hasOwnProperty','order','sort','where','pick','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','include','rows','getMyMessages','includeAgent','push','addTags','Tag','color','emit','chatInteractionTags:save','removeTags','unix','toString','files','tmp','server','transcript-%d-%s.zip','firstName','attachments','read','Owner','get','mkdirSync','Account','N.A.','closedAt','osName','referer','customerIp','customerPort','existsSync','pipe','lastName','renderFile','transcript-','.pdf','Chat','createPdfFromHTML','err','unlinkSync','rimraf','request-promise','moment','mustache','util','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../mysqldb','redis','socket.io-emitter','./chatInteraction.socket','register','jayson/promise','client','http','request','then','info','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInteraction,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','offset','limit','count','set','Content-Range','destroy','stack'];(function(_0x2f0056,_0x3df793){var _0x40a158=function(_0xe870fe){while(--_0xe870fe){_0x2f0056['push'](_0x2f0056['shift']());}};_0x40a158(++_0x3df793);}(_0x7b95,0xa3));var _0x57b9=function(_0x47b971,_0x45e644){_0x47b971=_0x47b971-0x0;var _0x52b2bc=_0x7b95[_0x47b971];return _0x52b2bc;};'use strict';var rimraf=require(_0x57b9('0x0'));var zipdir=require('zip-dir');var rp=require(_0x57b9('0x1'));var moment=require(_0x57b9('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x57b9('0x3'));var util=require(_0x57b9('0x4'));var path=require('path');var ejs=require(_0x57b9('0x5'));var fs=require('fs');var _=require(_0x57b9('0x6'));var Redis=require(_0x57b9('0x7'));var interaction=require(_0x57b9('0x8'));var qs=require(_0x57b9('0x9'));var pdf=require(_0x57b9('0xa'));var logger=require(_0x57b9('0xb'))(_0x57b9('0xc'));var config=require('../../config/environment');var db=require(_0x57b9('0xd'))['db'];config[_0x57b9('0xe')]=_['defaults'](config[_0x57b9('0xe')],{'host':'localhost','port':0x18eb});var socket=require(_0x57b9('0xf'))(new Redis(config[_0x57b9('0xe')]));require(_0x57b9('0x10'))[_0x57b9('0x11')](socket);var jayson=require(_0x57b9('0x12'));var client=jayson[_0x57b9('0x13')][_0x57b9('0x14')]({'port':0x232b});var client9004=jayson[_0x57b9('0x13')][_0x57b9('0x14')]({'port':0x232c});function respondWithRpcPromise(_0x309d73,_0x28c0fc,_0x30af43,_0x3cb12f){return new BPromise(function(_0x419cde,_0x2bd958){var _0x4ed184=_0x3cb12f||client;return _0x4ed184[_0x57b9('0x15')](_0x309d73,_0x30af43)[_0x57b9('0x16')](function(_0x38314e){logger[_0x57b9('0x17')]('ChatInteraction,\x20%s,\x20%s',_0x28c0fc,_0x57b9('0x18'));logger[_0x57b9('0x19')](_0x57b9('0x1a'),_0x28c0fc,_0x57b9('0x18'),JSON[_0x57b9('0x1b')](_0x38314e));if(_0x38314e['error']){if(_0x38314e[_0x57b9('0x1c')][_0x57b9('0x1d')]===0x1f4){logger[_0x57b9('0x1c')](_0x57b9('0x1e'),_0x28c0fc,_0x38314e['error'][_0x57b9('0x1f')]);return _0x2bd958(_0x38314e['error'][_0x57b9('0x1f')]);}logger[_0x57b9('0x1c')](_0x57b9('0x1e'),_0x28c0fc,_0x38314e[_0x57b9('0x1c')]['message']);return _0x419cde(_0x38314e[_0x57b9('0x1c')][_0x57b9('0x1f')]);}else{logger['info']('ChatInteraction,\x20%s,\x20%s',_0x28c0fc,_0x57b9('0x18'));_0x419cde(_0x38314e[_0x57b9('0x20')][_0x57b9('0x1f')]);}})[_0x57b9('0x21')](function(_0x4be8d1){logger[_0x57b9('0x1c')]('ChatInteraction,\x20%s,\x20%s',_0x28c0fc,_0x4be8d1);_0x2bd958(_0x4be8d1);});});}function respondWithStatusCode(_0x2a4cc3,_0x29cacd){_0x29cacd=_0x29cacd||0xcc;return function(_0x146219){if(_0x146219){return _0x2a4cc3[_0x57b9('0x22')](_0x29cacd);}return _0x2a4cc3[_0x57b9('0x23')](_0x29cacd)[_0x57b9('0x24')]();};}function respondWithResult(_0x390339,_0x2b37a9){_0x2b37a9=_0x2b37a9||0xc8;return function(_0x39a73a){if(_0x39a73a){return _0x390339['status'](_0x2b37a9)['json'](_0x39a73a);}};}function respondWithFilteredResult(_0x4d2aba,_0x39730e){return function(_0x396679){if(_0x396679){var _0x58c41f=typeof _0x39730e[_0x57b9('0x25')]==='undefined'&&typeof _0x39730e[_0x57b9('0x26')]==='undefined';var _0x375997=_0x396679[_0x57b9('0x27')];var _0x4afea3=_0x58c41f?0x0:_0x39730e[_0x57b9('0x25')];var _0x536e68=_0x58c41f?_0x396679[_0x57b9('0x27')]:_0x39730e[_0x57b9('0x25')]+_0x39730e[_0x57b9('0x26')];var _0x7a6572;if(_0x536e68>=_0x375997){_0x536e68=_0x375997;_0x7a6572=0xc8;}else{_0x7a6572=0xce;}_0x4d2aba[_0x57b9('0x23')](_0x7a6572);return _0x4d2aba[_0x57b9('0x28')](_0x57b9('0x29'),_0x4afea3+'-'+_0x536e68+'/'+_0x375997)['json'](_0x396679);}return null;};}function saveUpdates(_0x1755f7){return function(_0x531ec8){if(_0x531ec8){return _0x531ec8['update'](_0x1755f7)[_0x57b9('0x16')](function(_0x12d405){return _0x12d405;});}return null;};}function removeEntity(_0x57c087){return function(_0xb859f0){if(_0xb859f0){return _0xb859f0[_0x57b9('0x2a')]()['then'](function(){_0x57c087['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x21e152){return function(_0x52b437){if(!_0x52b437){_0x21e152[_0x57b9('0x22')](0x194);}return _0x52b437;};}function handleError(_0xfa2068,_0x3ac0ac){_0x3ac0ac=_0x3ac0ac||0x1f4;return function(_0x14f3b7){logger[_0x57b9('0x1c')](_0x14f3b7[_0x57b9('0x2b')]);if(_0x14f3b7[_0x57b9('0x2c')]){delete _0x14f3b7[_0x57b9('0x2c')];}_0xfa2068['status'](_0x3ac0ac)['send'](_0x14f3b7);};}function getMustacheRender(_0x2ddf8d,_0x53fa5d){return Mustache[_0x57b9('0x2d')](_0x2ddf8d,_[_0x57b9('0x2e')](_0x53fa5d[_0x57b9('0x2f')],{'contact':_0x53fa5d[_0x57b9('0x30')],'message':_0x53fa5d[_0x57b9('0x1f')],'agent':_0x53fa5d[_0x57b9('0x31')],'interaction':_0x53fa5d[_0x57b9('0x32')],'account':_0x53fa5d[_0x57b9('0x33')]}))||'';}exports[_0x57b9('0x34')]=function(_0x31ee16,_0x4d43df){var _0x660a80={};var _0xf33812=_[_0x57b9('0x35')](db['ChatInteraction'][_0x57b9('0x36')],function(_0x2ec6f6){return{'name':_0x2ec6f6['fieldName'],'type':_0x2ec6f6[_0x57b9('0x37')][_0x57b9('0x38')]};});_0x660a80=qs['getOptions'](_0xf33812,_0x31ee16);return interaction[_0x57b9('0x39')](_0x57b9('0x3a'),_0x31ee16[_0x57b9('0x3b')],_0x31ee16[_0x57b9('0x3c')],_0x660a80,_0xf33812)[_0x57b9('0x16')](respondWithFilteredResult(_0x4d43df,_0x660a80))['catch'](handleError(_0x4d43df,null));};exports[_0x57b9('0x3d')]=function(_0x149836,_0x12acd2){var _0x1b5b47={'raw':![],'where':{'id':_0x149836[_0x57b9('0x3e')]['id']}},_0x3d9d50={};_0x3d9d50[_0x57b9('0x3f')]=_[_0x57b9('0x40')](db[_0x57b9('0x41')][_0x57b9('0x36')]);_0x3d9d50[_0x57b9('0x3b')]=_[_0x57b9('0x40')](_0x149836[_0x57b9('0x3b')]);_0x3d9d50[_0x57b9('0x42')]=_[_0x57b9('0x43')](_0x3d9d50[_0x57b9('0x3f')],_0x3d9d50[_0x57b9('0x3b')]);_0x1b5b47[_0x57b9('0x44')]=_['intersection'](_0x3d9d50[_0x57b9('0x3f')],qs[_0x57b9('0x45')](_0x149836[_0x57b9('0x3b')]['fields']));_0x1b5b47[_0x57b9('0x44')]=_0x1b5b47[_0x57b9('0x44')][_0x57b9('0x46')]?_0x1b5b47[_0x57b9('0x44')]:_0x3d9d50[_0x57b9('0x3f')];if(_0x149836[_0x57b9('0x3b')][_0x57b9('0x47')]){_0x1b5b47['include']=[{'all':!![]}];}_0x1b5b47=_[_0x57b9('0x2e')]({},_0x1b5b47,_0x149836[_0x57b9('0x48')]);return db[_0x57b9('0x41')][_0x57b9('0x49')](_0x1b5b47)[_0x57b9('0x16')](handleEntityNotFound(_0x12acd2,null))['then'](respondWithResult(_0x12acd2,null))[_0x57b9('0x21')](handleError(_0x12acd2,null));};exports[_0x57b9('0x4a')]=function(_0x3b2db1,_0x2c7b41){return db[_0x57b9('0x41')]['create'](_0x3b2db1[_0x57b9('0x2f')],{})[_0x57b9('0x16')](respondWithResult(_0x2c7b41,0xc9))[_0x57b9('0x21')](handleError(_0x2c7b41,null));};exports[_0x57b9('0x4b')]=function(_0x269575,_0x1cc75c){if(_0x269575['body']['id']){delete _0x269575[_0x57b9('0x2f')]['id'];}return db[_0x57b9('0x41')][_0x57b9('0x49')]({'where':{'id':_0x269575['params']['id']}})['then'](handleEntityNotFound(_0x1cc75c,null))[_0x57b9('0x16')](saveUpdates(_0x269575[_0x57b9('0x2f')],null))[_0x57b9('0x16')](respondWithResult(_0x1cc75c,null))[_0x57b9('0x21')](handleError(_0x1cc75c,null));};exports['destroy']=function(_0xe004d0,_0x4a9fd1){return db[_0x57b9('0x41')][_0x57b9('0x49')]({'where':{'id':_0xe004d0[_0x57b9('0x3e')]['id']}})[_0x57b9('0x16')](handleEntityNotFound(_0x4a9fd1,null))[_0x57b9('0x16')](removeEntity(_0x4a9fd1,null))[_0x57b9('0x21')](handleError(_0x4a9fd1,null));};exports['describe']=function(_0x263c23,_0x285414){return db['ChatInteraction'][_0x57b9('0x4c')]()[_0x57b9('0x16')](respondWithResult(_0x285414,null))['catch'](handleError(_0x285414,null));};exports[_0x57b9('0x4d')]=function(_0x29cccc,_0x17ceaa){var _0x3a625d=_0x29cccc[_0x57b9('0x3e')]['id'];var _0x407dcc;var _0x16136c;var _0x2b33ea;return db[_0x57b9('0x41')]['findOne']({'where':{'id':_0x3a625d}})['then'](function(_0x1e1fc1){_0x407dcc=_0x1e1fc1;return db[_0x57b9('0x4e')][_0x57b9('0x4f')]({'where':{'id':_0x1e1fc1[_0x57b9('0x50')]},'attributes':['id','vidaooApiKey',_0x57b9('0x51'),_0x57b9('0x52'),_0x57b9('0x53'),'vidaooMetadata'],'raw':!![]});})['then'](function(_0x343563){if(_0x343563&&_0x343563[_0x57b9('0x54')]&&_0x343563[_0x57b9('0x51')]){_0x16136c=_0x343563;var _0x6939f5={'interaction':{'id':_0x3a625d},'agent':{'id':_0x29cccc[_0x57b9('0x3c')]['id'],'name':_0x29cccc[_0x57b9('0x3c')][_0x57b9('0x2c')],'fullname':_0x29cccc['user']['fullname'],'email':_0x29cccc[_0x57b9('0x3c')][_0x57b9('0x55')]},'contact':_0x29cccc[_0x57b9('0x2f')]['contact'],'account':_0x29cccc[_0x57b9('0x2f')][_0x57b9('0x33')]};var _0x276fce={'rejectUnauthorized':![],'method':_0x57b9('0x56'),'url':_0x57b9('0x57'),'headers':{'X-APIKEY':_0x343563['vidaooApiKey']},'body':{'duration':null,'scheduledAt':null,'participants':[_0x29cccc[_0x57b9('0x3c')][_0x57b9('0x55')]],'buttons':null,'topic':_0x16136c[_0x57b9('0x52')],'note':_['isNull'](_0x16136c[_0x57b9('0x53')])?null:getMustacheRender(_0x16136c[_0x57b9('0x53')],_0x6939f5),'metadata':null},'redirect':_0x57b9('0x58'),'json':!![]};try{if(!_[_0x57b9('0x59')](_0x16136c[_0x57b9('0x5a')])){var _0x809849=getMustacheRender(_0x16136c[_0x57b9('0x5a')],_0x6939f5);var _0x482554=JSON[_0x57b9('0x5b')](_0x809849);_0x276fce['body'][_0x57b9('0x5c')]=_0x482554;}}catch(_0x694d4a){throw new db[(_0x57b9('0x5d'))][(_0x57b9('0x5e'))](_0x57b9('0x5f'));}return rp(_0x276fce);}else{throw new db[(_0x57b9('0x5d'))][(_0x57b9('0x5e'))](_0x57b9('0x60'));}})[_0x57b9('0x16')](function(_0x3c1fb5){_0x2b33ea=_0x3c1fb5;if(_0x2b33ea['id']){var _0x3bfc5b={'body':_0x2b33ea[_0x57b9('0x61')],'ChatWebsiteId':_0x16136c['id'],'ChatInteractionId':_0x407dcc['id'],'direction':_0x57b9('0x62'),'UserId':_0x29cccc[_0x57b9('0x3c')]['id']};return db['ChatMessage'][_0x57b9('0x4a')](_0x3bfc5b,{});}else{throw new db[(_0x57b9('0x5d'))][(_0x57b9('0x5e'))](_0x57b9('0x63'));}})[_0x57b9('0x16')](function(){return _0x407dcc[_0x57b9('0x64')]({'vidaooSessionId':_0x2b33ea['id']});})['then'](respondWithResult(_0x17ceaa,null))['catch'](handleError(_0x17ceaa,null));};exports['customUpdate']=function(_0x308bbc,_0x35082a){if(_0x308bbc[_0x57b9('0x2f')]['id']){delete _0x308bbc[_0x57b9('0x2f')]['id'];}return db[_0x57b9('0x41')][_0x57b9('0x49')]({'where':{'id':_0x308bbc[_0x57b9('0x3e')]['id']},'include':[{'model':db[_0x57b9('0x65')],'as':_0x57b9('0x66')}]})[_0x57b9('0x16')](handleEntityNotFound(_0x35082a,null))['then'](saveUpdates(_0x308bbc['body'],null))['then'](respondWithResult(_0x35082a,null))[_0x57b9('0x21')](handleError(_0x35082a,null));};exports['abandon']=function(_0x174e00,_0x317ff5){if(_0x174e00[_0x57b9('0x2f')]['id']){delete _0x174e00[_0x57b9('0x2f')]['id'];}return db[_0x57b9('0x41')][_0x57b9('0x49')]({'where':{'id':_0x174e00[_0x57b9('0x3e')]['id']}})[_0x57b9('0x16')](function(_0x31b845){if(!_0x31b845){logger[_0x57b9('0x1c')](_0x57b9('0x67'),'abandon',0x194,'entity\x20not\x20found');_0x317ff5[_0x57b9('0x22')](0x194);}else{if(_0x31b845[_0x57b9('0x68')]){throw new db['Sequelize'][(_0x57b9('0x5e'))](_0x57b9('0x69'));}}return _0x31b845;})[_0x57b9('0x16')](function(_0x4a552d){if(_0x4a552d){return _0x4a552d[_0x57b9('0x4b')]({'closed':_0x174e00[_0x57b9('0x2f')][_0x57b9('0x6a')],'disposition':_0x174e00['body']['disposition']})[_0x57b9('0x16')](function(_0x175c81){return _0x175c81;});}})[_0x57b9('0x16')](function(){return respondWithRpcPromise(_0x57b9('0x6b'),_0x57b9('0x6c'),_0x174e00[_0x57b9('0x2f')],client9004);})['then'](respondWithResult(_0x317ff5,null))[_0x57b9('0x21')](handleError(_0x317ff5,null));};exports[_0x57b9('0x6d')]=function(_0x22bba4,_0x487ce1){_0x22bba4[_0x57b9('0x2f')]['name']=_0x22bba4['file'][_0x57b9('0x6e')];_0x22bba4['body'][_0x57b9('0x6f')]=_0x22bba4[_0x57b9('0x70')][_0x57b9('0x71')];_0x22bba4[_0x57b9('0x2f')][_0x57b9('0x37')]=_0x22bba4[_0x57b9('0x70')][_0x57b9('0x72')];return db['Attachment']['create'](_0x22bba4[_0x57b9('0x2f')])[_0x57b9('0x16')](respondWithResult(_0x487ce1,0xc9))[_0x57b9('0x21')](handleError(_0x487ce1,null));};exports[_0x57b9('0x73')]=function(_0x68a26f,_0x56f9a2){return db[_0x57b9('0x41')][_0x57b9('0x4f')]({'where':{'id':_0x68a26f[_0x57b9('0x3e')]['id']},'raw':!![]})[_0x57b9('0x16')](handleEntityNotFound(_0x56f9a2,null))[_0x57b9('0x16')](function(_0x3dbbb3){if(_0x3dbbb3){if(_0x3dbbb3[_0x57b9('0x6a')]){return _0x56f9a2['status'](0x193)['json']({'status':0x193,'message':'Unauthorized'});}return db[_0x57b9('0x74')][_0x57b9('0x4f')]({'where':{'id':_0x68a26f[_0x57b9('0x3b')]['attachId']},'raw':!![]})[_0x57b9('0x16')](handleEntityNotFound(_0x56f9a2,null));}})[_0x57b9('0x16')](function(_0x44b0be){if(_0x44b0be){var _0xa94129=_0x44b0be['ChatOfflineMessageId']!==null;var _0x252ce4=path[_0x57b9('0x75')](config[_0x57b9('0x76')],_0x57b9('0x77'));if(_0xa94129){_0x252ce4=path['join'](_0x252ce4,_0x57b9('0x78'));}var _0x309da1=path[_0x57b9('0x75')](_0x252ce4,_0x44b0be['basename']);return _0x56f9a2[_0x57b9('0x79')](_0x309da1);}})['catch'](handleError(_0x56f9a2,null));};exports[_0x57b9('0x7a')]=function(_0x489bb4,_0x95d0fc){var _0x1893c1=null;var _0x5e8dbc=null;var _0x216c39=null;if(_0x489bb4['body']['id']){delete _0x489bb4[_0x57b9('0x2f')]['id'];}if(_0x489bb4[_0x57b9('0x2f')][_0x57b9('0x7b')]){_0x216c39=path['join'](config[_0x57b9('0x76')],_0x57b9('0x7c'),util[_0x57b9('0x7d')](_0x57b9('0x7e'),Date[_0x57b9('0x7f')]()));_0x489bb4[_0x57b9('0x2f')][_0x57b9('0x80')]=_0x216c39;}return db[_0x57b9('0x41')][_0x57b9('0x49')]({'where':{'id':_0x489bb4[_0x57b9('0x3e')]['id']},'include':[{'model':db['ChatMessage'],'as':_0x57b9('0x81'),'include':[{'model':db[_0x57b9('0x82')],'as':_0x57b9('0x82')}]}]})['then'](handleEntityNotFound(_0x95d0fc,null))['then'](saveUpdates(_0x489bb4[_0x57b9('0x2f')],null))[_0x57b9('0x16')](function(_0x2cca5c){if(_0x2cca5c){_0x1893c1=_0x2cca5c;return db[_0x57b9('0x4e')][_0x57b9('0x49')]({'where':{'id':_0x1893c1[_0x57b9('0x50')]}});}})['then'](function(_0x42773a){if(_0x42773a){_0x5e8dbc=_0x42773a;return db[_0x57b9('0x65')][_0x57b9('0x49')]({'where':{'id':_0x1893c1[_0x57b9('0x83')]}});}})[_0x57b9('0x16')](function(_0x5f2671){if(_0x5f2671){if(_0x216c39){var _0xa64ee4=null;for(var _0x225ec0=0x1;_0x225ec0<_0x1893c1[_0x57b9('0x81')][_0x57b9('0x46')];++_0x225ec0){_0xa64ee4=_0x1893c1['Messages'][_0x225ec0];var _0x91dbd0=_0xa64ee4[_0x57b9('0x68')]?util[_0x57b9('0x7d')](_0x57b9('0x84'),_0x5e8dbc[_0x57b9('0x85')],_0xa64ee4[_0x57b9('0x68')]):_0x57b9('0x86');var _0x4f6629=_0x489bb4[_0x57b9('0x2f')][_0x57b9('0x87')]||util['format']('%s%d',_0x57b9('0x88'),_0xa64ee4[_0x57b9('0x83')]);switch(_0x5e8dbc['agentIdentifier']){case _0x57b9('0x89'):_0x91dbd0=_0xa64ee4['UserId']?util[_0x57b9('0x7d')]('%s%d',_0x5e8dbc['agentAlias'],_0xa64ee4[_0x57b9('0x68')]):_0x57b9('0x86');break;case _0x57b9('0x8a'):_0x91dbd0=_0xa64ee4['UserId']?_0xa64ee4[_0x57b9('0x82')][_0x57b9('0x8b')]||_0xa64ee4['User'][_0x57b9('0x8c')]:_0x57b9('0x86');break;case _0x57b9('0x8d'):_0x91dbd0=_0xa64ee4['UserId']?_0xa64ee4[_0x57b9('0x82')][_0x57b9('0x8c')]:_0x57b9('0x86');break;default:_0x91dbd0=_0xa64ee4['UserId']?util['format'](_0x57b9('0x84'),_0x5e8dbc[_0x57b9('0x85')],_0xa64ee4[_0x57b9('0x68')]):_0x57b9('0x86');}var _0x3289ff=util[_0x57b9('0x7d')](_0x57b9('0x8e'),moment(_0xa64ee4[_0x57b9('0x8f')])[_0x57b9('0x7d')](_0x57b9('0x90')),_0xa64ee4[_0x57b9('0x91')]==='in'?_0x4f6629:_0x91dbd0,_0xa64ee4[_0x57b9('0x2f')]);if(!_0xa64ee4[_0x57b9('0x92')]){fs['appendFileSync'](_0x216c39,_0x3289ff);}}return db['MailAccount']['findOne']({'where':{'service':!![]},'include':[{'model':db[_0x57b9('0x93')],'as':_0x57b9('0x94'),'raw':!![],'include':[{'model':db[_0x57b9('0x95')],'as':_0x57b9('0x95'),'raw':!![]}]}]});}}})[_0x57b9('0x16')](function(_0x3c60d5){if(!_0x3c60d5||!_0x3c60d5[_0x57b9('0x94')]||!_0x489bb4[_0x57b9('0x2f')])return _0x1893c1;var _0xd9bbf2=_0x3c60d5[_0x57b9('0x96')]();return respondWithRpcPromise('SendMail',_0x57b9('0x97'),{'account':_0xd9bbf2,'message':{'from':util['format'](_0x57b9('0x98'),_0x3c60d5[_0x57b9('0x2c')],_0x3c60d5[_0x57b9('0x55')]||_0x3c60d5['Smtp'][_0x57b9('0x3c')]),'to':_0x489bb4[_0x57b9('0x2f')][_0x57b9('0x7b')],'subject':'Mail\x20Transcript','text':util[_0x57b9('0x7d')](_0x57b9('0x99'),_0x489bb4[_0x57b9('0x2f')][_0x57b9('0x7b')]),'attachments':[{'path':_0x216c39}]}})[_0x57b9('0x16')](function(){return _0x1893c1;})[_0x57b9('0x21')](function(_0x10da0f){logger['error'](_0x10da0f);});})[_0x57b9('0x16')](respondWithStatusCode(_0x95d0fc,0xc8))[_0x57b9('0x21')](handleError(_0x95d0fc,null));};exports[_0x57b9('0x9a')]=function(_0x77ee2e,_0x50dd47){return db[_0x57b9('0x9b')]['find']({'where':{'id':_0x77ee2e[_0x57b9('0x3e')]['id']}})[_0x57b9('0x16')](handleEntityNotFound(_0x50dd47,null))[_0x57b9('0x16')](function(_0x1924b9){if(_0x1924b9){return _0x1924b9[_0x57b9('0x9a')](_0x77ee2e['body'][_0x57b9('0x9c')],_[_0x57b9('0x9d')](_0x77ee2e['body'],[_0x57b9('0x9c'),'id'])||{});}})[_0x57b9('0x16')](respondWithResult(_0x50dd47,null))[_0x57b9('0x21')](handleError(_0x50dd47,null));};exports['getMessages']=function(_0x34add7,_0x532158){var _0x1cba97={'raw':![],'where':{}};var _0x12ba3f={};var _0x48ccc1={'count':0x0,'rows':[]};return db[_0x57b9('0x41')]['findOne']({'where':{'id':_0x34add7['params']['id']}})[_0x57b9('0x16')](handleEntityNotFound(_0x532158,null))[_0x57b9('0x16')](function(_0x265734){if(_0x265734){_0x12ba3f[_0x57b9('0x3f')]=_[_0x57b9('0x40')](db[_0x57b9('0x9b')]['rawAttributes']);_0x12ba3f[_0x57b9('0x3b')]=_[_0x57b9('0x40')](_0x34add7[_0x57b9('0x3b')]);_0x12ba3f[_0x57b9('0x42')]=_[_0x57b9('0x43')](_0x12ba3f['model'],_0x12ba3f[_0x57b9('0x3b')]);_0x1cba97['attributes']=_['intersection'](_0x12ba3f[_0x57b9('0x3f')],qs[_0x57b9('0x45')](_0x34add7[_0x57b9('0x3b')]['fields']));_0x1cba97['attributes']=_0x1cba97[_0x57b9('0x44')]['length']?_0x1cba97['attributes']:_0x12ba3f['model'];if(!_0x34add7[_0x57b9('0x3b')][_0x57b9('0x9e')]('nolimit')){_0x1cba97[_0x57b9('0x26')]=qs['limit'](_0x34add7['query']['limit']);_0x1cba97[_0x57b9('0x25')]=qs[_0x57b9('0x25')](_0x34add7[_0x57b9('0x3b')][_0x57b9('0x25')]);}_0x1cba97[_0x57b9('0x9f')]=qs[_0x57b9('0xa0')](_0x34add7[_0x57b9('0x3b')][_0x57b9('0xa0')]);_0x1cba97[_0x57b9('0xa1')]=qs[_0x57b9('0x42')](_[_0x57b9('0xa2')](_0x34add7[_0x57b9('0x3b')],_0x12ba3f['filters']));_0x1cba97[_0x57b9('0xa1')]['ChatInteractionId']=_0x265734['id'];if(_0x34add7[_0x57b9('0x3b')][_0x57b9('0xa3')]){_0x1cba97['where']=_[_0x57b9('0x2e')](_0x1cba97[_0x57b9('0xa1')],{'$or':_[_0x57b9('0x35')](_0x1cba97['attributes'],function(_0x227d84){var _0x59090d={};_0x59090d[_0x227d84]={'$like':'%'+_0x34add7['query'][_0x57b9('0xa3')]+'%'};return _0x59090d;})});}if(_0x34add7[_0x57b9('0x3b')][_0x57b9('0xa4')]){var _0x270904=_0x34add7[_0x57b9('0x3b')][_0x57b9('0xa4')][_0x57b9('0xa5')](',');var _0x15f5ee={};_0x15f5ee[_0x270904[0x0]]={'$gte':moment(_0x270904[0x1])[_0x57b9('0x7d')](_0x57b9('0xa6'))};_0x1cba97['where']=_['merge'](_0x1cba97['where'],_0x15f5ee);}_0x1cba97=_[_0x57b9('0x2e')]({},_0x1cba97,_0x34add7['options']);return db[_0x57b9('0x9b')][_0x57b9('0x27')]({'where':_0x1cba97['where']})['then'](function(_0x45340c){_0x48ccc1[_0x57b9('0x27')]=_0x45340c;if(_0x34add7[_0x57b9('0x3b')][_0x57b9('0x47')]){_0x1cba97[_0x57b9('0xa7')]=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x1cba97);})[_0x57b9('0x16')](function(_0x413306){_0x48ccc1[_0x57b9('0xa8')]=_0x413306;return _0x48ccc1;});}})[_0x57b9('0x16')](respondWithFilteredResult(_0x532158,_0x1cba97))['catch'](handleError(_0x532158,null));};exports[_0x57b9('0xa9')]=function(_0x48ed27,_0xebfdff){var _0x5d289f={'where':{}},_0x2e2ad7={},_0x1166d9={'count':0x0,'rows':[]};return db[_0x57b9('0x41')][_0x57b9('0x4f')]({'where':{'id':_0x48ed27['params']['id']}})['then'](handleEntityNotFound(_0xebfdff,null))[_0x57b9('0x16')](function(_0x270bef){if(_0x270bef){_0x2e2ad7[_0x57b9('0x3f')]=_[_0x57b9('0x40')](db[_0x57b9('0x9b')][_0x57b9('0x36')]);_0x2e2ad7[_0x57b9('0x3b')]=_[_0x57b9('0x40')](_0x48ed27[_0x57b9('0x3b')]);_0x2e2ad7[_0x57b9('0x42')]=_[_0x57b9('0x43')](_0x2e2ad7[_0x57b9('0x3f')],_0x2e2ad7[_0x57b9('0x3b')]);_0x5d289f['attributes']=_[_0x57b9('0x43')](_0x2e2ad7[_0x57b9('0x3f')],qs[_0x57b9('0x45')](_0x48ed27[_0x57b9('0x3b')][_0x57b9('0x45')]));_0x5d289f[_0x57b9('0x44')]=_0x5d289f['attributes'][_0x57b9('0x46')]?_0x5d289f[_0x57b9('0x44')]:_0x2e2ad7[_0x57b9('0x3f')];if(!_0x48ed27[_0x57b9('0x3b')][_0x57b9('0x9e')]('nolimit')){_0x5d289f[_0x57b9('0x26')]=qs[_0x57b9('0x26')](_0x48ed27[_0x57b9('0x3b')][_0x57b9('0x26')]);_0x5d289f[_0x57b9('0x25')]=qs[_0x57b9('0x25')](_0x48ed27['query'][_0x57b9('0x25')]);}_0x5d289f[_0x57b9('0x9f')]=qs[_0x57b9('0xa0')](_0x48ed27[_0x57b9('0x3b')][_0x57b9('0xa0')]);_0x5d289f['where']=qs[_0x57b9('0x42')](_[_0x57b9('0xa2')](_0x48ed27[_0x57b9('0x3b')],_0x2e2ad7[_0x57b9('0x42')]));_0x5d289f['where']['ChatInteractionId']=_0x270bef['id'];if(_0x48ed27[_0x57b9('0x3b')][_0x57b9('0xa3')]){_0x5d289f[_0x57b9('0xa1')]=_[_0x57b9('0x2e')](_0x5d289f[_0x57b9('0xa1')],{'$or':_[_0x57b9('0x35')](_0x5d289f['attributes'],function(_0x3d87a9){var _0x3f7830={};_0x3f7830[_0x3d87a9]={'$like':'%'+_0x48ed27[_0x57b9('0x3b')][_0x57b9('0xa3')]+'%'};return _0x3f7830;})});}_0x5d289f[_0x57b9('0xa1')][_0x57b9('0x92')]=![];if(_0x48ed27['query']['id']){_0x5d289f[_0x57b9('0xa1')]['id']={'$gt':_0x48ed27[_0x57b9('0x3b')]['id']};}_0x5d289f=_[_0x57b9('0x2e')]({},_0x5d289f,_0x48ed27[_0x57b9('0x48')]);return db['ChatMessage'][_0x57b9('0x27')]({'where':_0x5d289f[_0x57b9('0xa1')]})[_0x57b9('0x16')](function(_0xa94f0b){_0x1166d9[_0x57b9('0x27')]=_0xa94f0b;_0x5d289f[_0x57b9('0xa7')]=[];if(_0x48ed27['query'][_0x57b9('0xaa')]){_0x5d289f[_0x57b9('0xa7')][_0x57b9('0xab')]({'model':db[_0x57b9('0x82')],'as':_0x57b9('0x82'),'attributes':['id',_0x57b9('0x8c'),_0x57b9('0x8b')]});}if(_0x48ed27['query'][_0x57b9('0x47')]){_0x5d289f[_0x57b9('0xa7')]=[{'all':!![]}];}return db[_0x57b9('0x9b')]['findAll'](_0x5d289f);})[_0x57b9('0x16')](function(_0x5d4784){_0x1166d9[_0x57b9('0xa8')]=_0x5d4784;return _0x1166d9;});}})[_0x57b9('0x16')](respondWithFilteredResult(_0xebfdff,_0x5d289f))[_0x57b9('0x21')](handleError(_0xebfdff,null));};exports[_0x57b9('0xac')]=function(_0x1628ea,_0x53a267){return db['ChatInteraction'][_0x57b9('0x49')]({'where':{'id':_0x1628ea['params']['id']}})['then'](handleEntityNotFound(_0x53a267,null))[_0x57b9('0x16')](function(_0x46be87){if(_0x46be87){return _0x46be87['setTags'](_0x1628ea['body'][_0x57b9('0x9c')],_['omit'](_0x1628ea[_0x57b9('0x2f')],[_0x57b9('0x9c'),'id'])||{})['spread'](function(){return db[_0x57b9('0xad')][_0x57b9('0x39')]({'attributes':['id',_0x57b9('0x2c'),_0x57b9('0xae')],'where':{'id':_0x1628ea[_0x57b9('0x2f')][_0x57b9('0x9c')]}});})[_0x57b9('0x16')](function(_0x2d31f3){socket[_0x57b9('0xaf')](_0x57b9('0xb0'),{'id':Number(_0x1628ea[_0x57b9('0x3e')]['id']),'tags':_0x2d31f3||[]});return{'id':Number(_0x1628ea[_0x57b9('0x3e')]['id']),'tags':_0x2d31f3||[]};});}})['then'](respondWithResult(_0x53a267,null))[_0x57b9('0x21')](handleError(_0x53a267,null));};exports[_0x57b9('0xb1')]=function(_0x254d3d,_0x373a54){return db['ChatInteraction'][_0x57b9('0x49')]({'where':{'id':_0x254d3d[_0x57b9('0x3e')]['id']}})[_0x57b9('0x16')](handleEntityNotFound(_0x373a54,null))[_0x57b9('0x16')](function(_0x594773){if(_0x594773){return _0x594773['removeTags'](_0x254d3d[_0x57b9('0x3b')][_0x57b9('0x9c')]);}})[_0x57b9('0x16')](respondWithStatusCode(_0x373a54,null))[_0x57b9('0x21')](handleError(_0x373a54,null));};exports[_0x57b9('0x79')]=function(_0xeea04e,_0x70bed7){var _0x5d2548=moment()[_0x57b9('0xb2')]()[_0x57b9('0xb3')]();var _0x48bd2c=path[_0x57b9('0x75')](config['root'],'server',_0x57b9('0xb4'),_0x57b9('0xb5'));var _0x192ad0=path['join'](config[_0x57b9('0x76')],_0x57b9('0xb6'),'files','attachments');var _0x1ec351=path['join'](_0x48bd2c,_0x5d2548);var _0x15778f=util[_0x57b9('0x7d')](_0x57b9('0xb7'),_0xeea04e['params']['id'],_0x5d2548);var _0x287b24=path['join'](_0x48bd2c,_0x15778f);var _0x54165b=[];_0x54165b[_0x57b9('0xab')]({'model':db[_0x57b9('0x82')],'as':'User','attributes':['id',_0x57b9('0x8c')],'raw':!![]});_0x54165b[_0x57b9('0xab')]({'model':db[_0x57b9('0x65')],'as':_0x57b9('0x66'),'attributes':['id',_0x57b9('0xb8'),'lastName'],'raw':!![]});if(_0xeea04e['query'][_0x57b9('0xb9')]){_0x54165b['push']({'model':db[_0x57b9('0x74')],'as':_0x57b9('0x74'),'raw':!![]});}var _0xda3a9f=[{'model':db[_0x57b9('0x9b')],'as':_0x57b9('0x81'),'attributes':['id',_0x57b9('0x2f'),'createdAt','direction',_0x57b9('0x92'),_0x57b9('0xba')],'include':_0x54165b}];_0xda3a9f[_0x57b9('0xab')]({'model':db[_0x57b9('0x4e')],'as':'Account','attributes':['id',_0x57b9('0x2c')]});_0xda3a9f[_0x57b9('0xab')]({'model':db['User'],'as':_0x57b9('0xbb'),'attributes':['id',_0x57b9('0x8c')]});return db['ChatInteraction']['find']({'where':{'id':_0xeea04e[_0x57b9('0x3e')]['id']},'include':_0xda3a9f})[_0x57b9('0x16')](handleEntityNotFound(_0x70bed7,null))[_0x57b9('0x16')](function(_0x1db8b1){if(_0x1db8b1){var _0x26f3fd=_0x1db8b1[_0x57b9('0xbc')]({'plain':!![]});fs[_0x57b9('0xbd')](_0x1ec351);var _0x4180ae={'channel':'Chat','account':_0x26f3fd[_0x57b9('0xbe')]['name'],'agent':_0x26f3fd[_0x57b9('0xbb')]?_0x26f3fd[_0x57b9('0xbb')][_0x57b9('0x8c')]:_0x57b9('0xbf'),'createdAt':moment(_0x26f3fd[_0x57b9('0x8f')])['format'](_0x57b9('0xa6'))[_0x57b9('0xb3')](),'closedAt':_0x26f3fd[_0x57b9('0x6a')]?moment(_0x26f3fd[_0x57b9('0xc0')])['format'](_0x57b9('0xa6'))['toString']():'','disposition':_0x26f3fd['disposition'],'chatInfo':{'browser':_0x26f3fd['browserName'],'os':_0x26f3fd[_0x57b9('0xc1')],'referer':_0x26f3fd[_0x57b9('0xc2')],'customerIp':_0x26f3fd[_0x57b9('0xc3')],'customerPort':_0x26f3fd[_0x57b9('0xc4')]?_0x26f3fd[_0x57b9('0xc4')]:_0x57b9('0xbf')},'messages':_(_0x26f3fd['Messages'])['tail']()[_0x57b9('0xa3')]({'secret':![]})[_0x57b9('0x35')](function(_0x55009d){if(_0x55009d['Attachment']){var _0xbe5ec1=path['join'](_0x192ad0,_0x55009d[_0x57b9('0x74')][_0x57b9('0x6f')]);if(fs[_0x57b9('0xc5')](_0xbe5ec1)){fs['createReadStream'](_0xbe5ec1)[_0x57b9('0xc6')](fs['createWriteStream'](path[_0x57b9('0x75')](_0x1ec351,_0x55009d[_0x57b9('0x74')]['basename'])));}}return{'date':moment(_0x55009d['createdAt'])[_0x57b9('0x7d')](_0x57b9('0xa6'))[_0x57b9('0xb3')](),'sender':_0x55009d[_0x57b9('0x91')]===_0x57b9('0x62')?_0x55009d[_0x57b9('0x82')]?_0x55009d['User'][_0x57b9('0x8c')]:_0x57b9('0x86'):_0x55009d[_0x57b9('0x66')][_0x57b9('0xb8')]+(_0x55009d[_0x57b9('0x66')][_0x57b9('0xc7')]?'\x20'+_0x55009d[_0x57b9('0x66')][_0x57b9('0xc7')]:''),'body':_0x55009d['Attachment']?_0x55009d[_0x57b9('0x74')][_0x57b9('0x6f')]:_0x55009d['body'],'direction':_0x55009d[_0x57b9('0x91')]===_0x57b9('0x62')?'A':'C','secret':_0x55009d[_0x57b9('0x92')],'read':_0x55009d[_0x57b9('0xba')],'attachment':_0x55009d[_0x57b9('0x74')]};})['value']()};return ejs[_0x57b9('0xc8')](path['join'](config[_0x57b9('0x76')],_0x57b9('0xb6'),'views','downloadInteraction.ejs'),{'interaction':_0x4180ae})['then'](function(_0x16ddcf){var _0x523af6=path[_0x57b9('0x75')](_0x1ec351,_0x57b9('0xc9')+_0x26f3fd['id']+'-'+_0x5d2548+_0x57b9('0xca'));var _0x5cfcbb={'path':_0x523af6,'channel':_0x57b9('0xcb'),'interactionId':_0x26f3fd['id']};return pdf[_0x57b9('0xcc')](_0x16ddcf,_0x5cfcbb);})[_0x57b9('0x16')](function(){return new Promise(function(_0xf0eaf7,_0x441de8){zipdir(_0x1ec351,{'saveTo':_0x287b24},function(_0x1e33f3,_0x3a5577){if(_0x1e33f3)return _0x441de8(_0x1e33f3);return _0xf0eaf7(_0x3a5577);});})[_0x57b9('0x16')](function(){return new BPromise(function(_0x1f2e02,_0x30ac50){rimraf(_0x1ec351,function(_0x211f1b){if(_0x211f1b)_0x30ac50(_0x211f1b);return _0x1f2e02();});});})[_0x57b9('0x16')](function(){return _0x70bed7['download'](_0x287b24,_0x15778f,function(_0x37d42f){if(_0x37d42f){logger[_0x57b9('0x1c')](_0x57b9('0xcd'),_0x37d42f);}else{fs[_0x57b9('0xce')](_0x287b24);}});});});}else{return _0x70bed7[_0x57b9('0x22')](0xc8);}})[_0x57b9('0x21')](handleError(_0x70bed7,null));};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js
index b2545cf..26379e0 100644
--- a/server/api/chatInteraction/chatInteraction.events.js
+++ b/server/api/chatInteraction/chatInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7b43=['catch','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','update','remove','getUsers','then','setDataValue','Users','map','findAll','unreadMessages','length','emit'];(function(_0x42b030,_0x252cb6){var _0x112303=function(_0x261838){while(--_0x261838){_0x42b030['push'](_0x42b030['shift']());}};_0x112303(++_0x252cb6);}(_0x7b43,0x1ea));var _0x37b4=function(_0xf0884,_0x436054){_0xf0884=_0xf0884-0x0;var _0x1be9a8=_0x7b43[_0xf0884];return _0x1be9a8;};'use strict';var EventEmitter=require(_0x37b4('0x0'));var ChatInteraction=require(_0x37b4('0x1'))['db']['ChatInteraction'];var ChatMessage=require(_0x37b4('0x1'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x37b4('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x37b4('0x3'),'afterDestroy':_0x37b4('0x4')};function emitEvent(_0x2167b2){return function(_0x513005,_0x4b08b7,_0x5767e2){_0x513005[_0x37b4('0x5')]({'attributes':['id'],'raw':!![]})[_0x37b4('0x6')](function(_0x3f238f){_0x513005[_0x37b4('0x7')](_0x37b4('0x8'),_0x3f238f[_0x37b4('0x9')](function(_0x5b2ce4){return{'id':_0x5b2ce4['id']};}));return ChatMessage[_0x37b4('0xa')]({'where':{'ChatInteractionId':_0x513005['id'],'direction':'in','read':![]},'raw':!![]});})[_0x37b4('0x6')](function(_0x2e2e1e){_0x513005['setDataValue'](_0x37b4('0xb'),_0x2e2e1e[_0x37b4('0xc')]);ChatInteractionEvents['emit'](_0x2167b2+':'+_0x513005['id'],_0x513005);ChatInteractionEvents[_0x37b4('0xd')](_0x2167b2,_0x513005);_0x5767e2(null);})[_0x37b4('0xe')](_0x5767e2(null));};}for(var e in events){if(events[_0x37b4('0xf')](e)){var event=events[e];ChatInteraction[_0x37b4('0x10')](e,emitEvent(event));}}module[_0x37b4('0x11')]=ChatInteractionEvents;
\ No newline at end of file
+var _0x1948=['update','remove','getUsers','then','setDataValue','Users','map','unreadMessages','emit','catch','events','../../mysqldb','ChatInteraction','ChatMessage','setMaxListeners','save'];(function(_0x102e37,_0x14a181){var _0x35a07c=function(_0x16577f){while(--_0x16577f){_0x102e37['push'](_0x102e37['shift']());}};_0x35a07c(++_0x14a181);}(_0x1948,0x17a));var _0x8194=function(_0xb7334f,_0x1daeef){_0xb7334f=_0xb7334f-0x0;var _0x20b2ae=_0x1948[_0xb7334f];return _0x20b2ae;};'use strict';var EventEmitter=require(_0x8194('0x0'));var ChatInteraction=require(_0x8194('0x1'))['db'][_0x8194('0x2')];var ChatMessage=require(_0x8194('0x1'))['db'][_0x8194('0x3')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x8194('0x4')](0x0);var events={'afterCreate':_0x8194('0x5'),'afterUpdate':_0x8194('0x6'),'afterDestroy':_0x8194('0x7')};function emitEvent(_0x4660bc){return function(_0xeef6eb,_0x5980e2,_0x30236b){_0xeef6eb[_0x8194('0x8')]({'attributes':['id'],'raw':!![]})[_0x8194('0x9')](function(_0x2b95cf){_0xeef6eb[_0x8194('0xa')](_0x8194('0xb'),_0x2b95cf[_0x8194('0xc')](function(_0x355a25){return{'id':_0x355a25['id']};}));return ChatMessage['findAll']({'where':{'ChatInteractionId':_0xeef6eb['id'],'direction':'in','read':![]},'raw':!![]});})[_0x8194('0x9')](function(_0x489a41){_0xeef6eb['setDataValue'](_0x8194('0xd'),_0x489a41['length']);ChatInteractionEvents['emit'](_0x4660bc+':'+_0xeef6eb['id'],_0xeef6eb);ChatInteractionEvents[_0x8194('0xe')](_0x4660bc,_0xeef6eb);_0x30236b(null);})[_0x8194('0xf')](_0x30236b(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInteraction['hook'](e,emitEvent(event));}}module['exports']=ChatInteractionEvents;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js
index ac49887..e8c63c5 100644
--- a/server/api/chatInteraction/chatInteraction.model.js
+++ b/server/api/chatInteraction/chatInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe971=['YYYY-MM-DD\x20HH:mm:ss','utf8mb4_unicode_ci','util','moment','bluebird','request-promise','path','rimraf','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','closed','format'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0xe971,0x197));var _0x1e97=function(_0x1eb357,_0x1d140a){_0x1eb357=_0x1eb357-0x0;var _0xf94da=_0xe971[_0x1eb357];return _0xf94da;};'use strict';var _=require('lodash');var util=require(_0x1e97('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x1e97('0x1'));var BPromise=require(_0x1e97('0x2'));var rp=require(_0x1e97('0x3'));var fs=require('fs');var path=require(_0x1e97('0x4'));var rimraf=require(_0x1e97('0x5'));var config=require('../../config/environment');var attributes=require(_0x1e97('0x6'));module[_0x1e97('0x7')]=function(_0x39a150,_0x4fc255){return _0x39a150[_0x1e97('0x8')](_0x1e97('0x9'),attributes,{'tableName':_0x1e97('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4e1e6e,_0x4fb987,_0x202c32){if(_0x4e1e6e['changed'](_0x1e97('0xb'))){_0x4e1e6e['closedAt']=moment()[_0x1e97('0xc')](_0x1e97('0xd'));}_0x202c32(null,_0x4e1e6e);}},'charset':'utf8mb4','collate':_0x1e97('0xe')});};
\ No newline at end of file
+var _0x5206=['chat_interactions','closed','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./chatInteraction.attributes','exports'];(function(_0xa9eaa0,_0x4ba2b4){var _0x30897a=function(_0x2caa01){while(--_0x2caa01){_0xa9eaa0['push'](_0xa9eaa0['shift']());}};_0x30897a(++_0x4ba2b4);}(_0x5206,0xb9));var _0x6520=function(_0x368b57,_0x4a1b39){_0x368b57=_0x368b57-0x0;var _0x4e480c=_0x5206[_0x368b57];return _0x4e480c;};'use strict';var _=require(_0x6520('0x0'));var util=require(_0x6520('0x1'));var logger=require(_0x6520('0x2'))(_0x6520('0x3'));var moment=require(_0x6520('0x4'));var BPromise=require(_0x6520('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6520('0x6'));var rimraf=require(_0x6520('0x7'));var config=require(_0x6520('0x8'));var attributes=require(_0x6520('0x9'));module[_0x6520('0xa')]=function(_0x2a52d3,_0x400f72){return _0x2a52d3['define']('ChatInteraction',attributes,{'tableName':_0x6520('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x546d7d,_0xdc74bd,_0xc998e){if(_0x546d7d['changed'](_0x6520('0xc'))){_0x546d7d['closedAt']=moment()['format'](_0x6520('0xd'));}_0xc998e(null,_0x546d7d);}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js
index e78de79..695ad26 100644
--- a/server/api/chatInteraction/chatInteraction.rpc.js
+++ b/server/api/chatInteraction/chatInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0b76=['addTags','ids','spread','AddTags','lodash','util','moment','bluebird','ioredis','../../config/utils','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','UpdateChatInteraction','ChatInteraction','body','options','raw','where','attributes','limit','AddTagsToChatInteraction','find'];(function(_0x28689b,_0x2cbbcf){var _0x104f1c=function(_0x25279a){while(--_0x25279a){_0x28689b['push'](_0x28689b['shift']());}};_0x104f1c(++_0x2cbbcf);}(_0x0b76,0x7c));var _0x60b7=function(_0x645a1f,_0x1443fe){_0x645a1f=_0x645a1f-0x0;var _0xb3e120=_0x0b76[_0x645a1f];return _0xb3e120;};'use strict';var _=require(_0x60b7('0x0'));var util=require(_0x60b7('0x1'));var moment=require(_0x60b7('0x2'));var BPromise=require(_0x60b7('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x60b7('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x60b7('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x60b7('0x6'));var client=jayson[_0x60b7('0x7')][_0x60b7('0x8')]({'port':0x232a});config[_0x60b7('0x9')]=_[_0x60b7('0xa')](config[_0x60b7('0x9')],{'host':_0x60b7('0xb'),'port':0x18eb});var socket=require(_0x60b7('0xc'))(new Redis(config[_0x60b7('0x9')]));require('./chatInteraction.socket')[_0x60b7('0xd')](socket);function respondWithRpcPromise(_0x5093fc,_0x3b91ed,_0x40009c){return new BPromise(function(_0x4896a0,_0x35f93b){return client[_0x60b7('0xe')](_0x5093fc,_0x40009c)[_0x60b7('0xf')](function(_0x544681){logger[_0x60b7('0x10')](_0x60b7('0x11'),_0x3b91ed,_0x60b7('0x12'));logger[_0x60b7('0x13')]('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x3b91ed,_0x60b7('0x12'),JSON[_0x60b7('0x14')](_0x544681));if(_0x544681[_0x60b7('0x15')]){if(_0x544681[_0x60b7('0x15')][_0x60b7('0x16')]===0x1f4){logger[_0x60b7('0x15')](_0x60b7('0x11'),_0x3b91ed,_0x544681[_0x60b7('0x15')][_0x60b7('0x17')]);return _0x35f93b(_0x544681[_0x60b7('0x15')][_0x60b7('0x17')]);}logger[_0x60b7('0x15')]('ChatInteraction,\x20%s,\x20%s',_0x3b91ed,_0x544681[_0x60b7('0x15')][_0x60b7('0x17')]);return _0x4896a0(_0x544681['error'][_0x60b7('0x17')]);}else{logger[_0x60b7('0x10')](_0x60b7('0x11'),_0x3b91ed,'request\x20sent');_0x4896a0(_0x544681[_0x60b7('0x18')][_0x60b7('0x17')]);}})[_0x60b7('0x19')](function(_0x47f50b){logger[_0x60b7('0x15')]('ChatInteraction,\x20%s,\x20%s',_0x3b91ed,_0x47f50b);_0x35f93b(_0x47f50b);});});}exports[_0x60b7('0x1a')]=function(_0x42aeed){var _0x108777=this;return new Promise(function(_0x315d50,_0x56da52){return db[_0x60b7('0x1b')]['update'](_0x42aeed[_0x60b7('0x1c')],{'raw':_0x42aeed[_0x60b7('0x1d')]?_0x42aeed[_0x60b7('0x1d')][_0x60b7('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x42aeed['options']?_0x42aeed[_0x60b7('0x1d')][_0x60b7('0x1f')]||null:null,'attributes':_0x42aeed[_0x60b7('0x1d')]?_0x42aeed[_0x60b7('0x1d')][_0x60b7('0x20')]||null:null,'limit':_0x42aeed[_0x60b7('0x1d')]?_0x42aeed['options'][_0x60b7('0x21')]||null:null})[_0x60b7('0xf')](function(_0x1db8bf){logger[_0x60b7('0x10')](_0x60b7('0x1a'),_0x42aeed);logger[_0x60b7('0x13')](_0x60b7('0x1a'),_0x42aeed,JSON[_0x60b7('0x14')](_0x1db8bf));_0x315d50(_0x1db8bf);})[_0x60b7('0x19')](function(_0x66cd3c){logger[_0x60b7('0x15')]('UpdateChatInteraction',_0x66cd3c[_0x60b7('0x17')],_0x42aeed);_0x56da52(_0x108777[_0x60b7('0x15')](0x1f4,_0x66cd3c['message']));});});};exports[_0x60b7('0x22')]=function(_0x424c01){return new Promise(function(_0x353619,_0x5ebf01){return db['ChatInteraction'][_0x60b7('0x23')]({'where':_0x424c01[_0x60b7('0x1d')]?_0x424c01['options']['where']||null:null})[_0x60b7('0xf')](function(_0x320748){if(_0x320748){return _0x320748[_0x60b7('0x24')](_0x424c01[_0x60b7('0x1c')][_0x60b7('0x25')],_['omit'](_0x424c01[_0x60b7('0x1c')],['ids','id'])||{});}})[_0x60b7('0x26')](function(_0x50abd6){logger[_0x60b7('0x10')](_0x60b7('0x27'),_0x424c01);logger[_0x60b7('0x13')](_0x60b7('0x27'),_0x424c01,JSON[_0x60b7('0x14')](_0x50abd6));_0x353619(_0x50abd6);})['catch'](function(_0x4abf0b){logger[_0x60b7('0x15')](_0x60b7('0x27'),_0x4abf0b[_0x60b7('0x17')],_0x424c01);_0x5ebf01(_this[_0x60b7('0x15')](0x1f4,_0x4abf0b['message']));});});};
\ No newline at end of file
+var _0x2add=['../../config/environment','client','http','redis','localhost','socket.io-emitter','./chatInteraction.socket','register','request','then','info','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInteraction,\x20%s,\x20%s','message','catch','UpdateChatInteraction','ChatInteraction','update','body','options','raw','where','attributes','limit','AddTagsToChatInteraction','find','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x34d917,_0x5332ea){var _0x220cf5=function(_0x41b60b){while(--_0x41b60b){_0x34d917['push'](_0x34d917['shift']());}};_0x220cf5(++_0x5332ea);}(_0x2add,0x132));var _0xd2ad=function(_0x313675,_0x23c8b2){_0x313675=_0x313675-0x0;var _0x4051fd=_0x2add[_0x313675];return _0x4051fd;};'use strict';var _=require(_0xd2ad('0x0'));var util=require(_0xd2ad('0x1'));var moment=require(_0xd2ad('0x2'));var BPromise=require(_0xd2ad('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd2ad('0x4'));var db=require(_0xd2ad('0x5'))['db'];var utils=require(_0xd2ad('0x6'));var logger=require(_0xd2ad('0x7'))(_0xd2ad('0x8'));var config=require(_0xd2ad('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xd2ad('0xa')][_0xd2ad('0xb')]({'port':0x232a});config[_0xd2ad('0xc')]=_['defaults'](config[_0xd2ad('0xc')],{'host':_0xd2ad('0xd'),'port':0x18eb});var socket=require(_0xd2ad('0xe'))(new Redis(config[_0xd2ad('0xc')]));require(_0xd2ad('0xf'))[_0xd2ad('0x10')](socket);function respondWithRpcPromise(_0x55d349,_0x40bdf9,_0x43b1fc){return new BPromise(function(_0x14faec,_0x23f4fd){return client[_0xd2ad('0x11')](_0x55d349,_0x43b1fc)[_0xd2ad('0x12')](function(_0x3adf9c){logger[_0xd2ad('0x13')]('ChatInteraction,\x20%s,\x20%s',_0x40bdf9,_0xd2ad('0x14'));logger[_0xd2ad('0x15')](_0xd2ad('0x16'),_0x40bdf9,_0xd2ad('0x14'),JSON[_0xd2ad('0x17')](_0x3adf9c));if(_0x3adf9c[_0xd2ad('0x18')]){if(_0x3adf9c[_0xd2ad('0x18')][_0xd2ad('0x19')]===0x1f4){logger['error'](_0xd2ad('0x1a'),_0x40bdf9,_0x3adf9c[_0xd2ad('0x18')][_0xd2ad('0x1b')]);return _0x23f4fd(_0x3adf9c['error']['message']);}logger[_0xd2ad('0x18')](_0xd2ad('0x1a'),_0x40bdf9,_0x3adf9c['error'][_0xd2ad('0x1b')]);return _0x14faec(_0x3adf9c[_0xd2ad('0x18')][_0xd2ad('0x1b')]);}else{logger[_0xd2ad('0x13')](_0xd2ad('0x1a'),_0x40bdf9,_0xd2ad('0x14'));_0x14faec(_0x3adf9c['result'][_0xd2ad('0x1b')]);}})[_0xd2ad('0x1c')](function(_0x57f325){logger['error'](_0xd2ad('0x1a'),_0x40bdf9,_0x57f325);_0x23f4fd(_0x57f325);});});}exports[_0xd2ad('0x1d')]=function(_0x3d9002){var _0x55a48b=this;return new Promise(function(_0x29b544,_0x4f790c){return db[_0xd2ad('0x1e')][_0xd2ad('0x1f')](_0x3d9002[_0xd2ad('0x20')],{'raw':_0x3d9002[_0xd2ad('0x21')]?_0x3d9002[_0xd2ad('0x21')][_0xd2ad('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3d9002['options']?_0x3d9002[_0xd2ad('0x21')][_0xd2ad('0x23')]||null:null,'attributes':_0x3d9002[_0xd2ad('0x21')]?_0x3d9002[_0xd2ad('0x21')][_0xd2ad('0x24')]||null:null,'limit':_0x3d9002[_0xd2ad('0x21')]?_0x3d9002[_0xd2ad('0x21')][_0xd2ad('0x25')]||null:null})['then'](function(_0xd71759){logger['info'](_0xd2ad('0x1d'),_0x3d9002);logger[_0xd2ad('0x15')](_0xd2ad('0x1d'),_0x3d9002,JSON[_0xd2ad('0x17')](_0xd71759));_0x29b544(_0xd71759);})[_0xd2ad('0x1c')](function(_0x2e610c){logger[_0xd2ad('0x18')](_0xd2ad('0x1d'),_0x2e610c[_0xd2ad('0x1b')],_0x3d9002);_0x4f790c(_0x55a48b['error'](0x1f4,_0x2e610c[_0xd2ad('0x1b')]));});});};exports[_0xd2ad('0x26')]=function(_0x31421e){return new Promise(function(_0x9592b1,_0x7e57b6){return db[_0xd2ad('0x1e')][_0xd2ad('0x27')]({'where':_0x31421e[_0xd2ad('0x21')]?_0x31421e[_0xd2ad('0x21')]['where']||null:null})[_0xd2ad('0x12')](function(_0x364f45){if(_0x364f45){return _0x364f45[_0xd2ad('0x28')](_0x31421e[_0xd2ad('0x20')][_0xd2ad('0x29')],_[_0xd2ad('0x2a')](_0x31421e['body'],[_0xd2ad('0x29'),'id'])||{});}})[_0xd2ad('0x2b')](function(_0x5d4a9c){logger[_0xd2ad('0x13')](_0xd2ad('0x2c'),_0x31421e);logger[_0xd2ad('0x15')]('AddTags',_0x31421e,JSON['stringify'](_0x5d4a9c));_0x9592b1(_0x5d4a9c);})['catch'](function(_0x10fc70){logger[_0xd2ad('0x18')](_0xd2ad('0x2c'),_0x10fc70['message'],_0x31421e);_0x7e57b6(_this[_0xd2ad('0x18')](0x1f4,_0x10fc70['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js
index 37c1407..bff6550 100644
--- a/server/api/chatInteraction/chatInteraction.socket.js
+++ b/server/api/chatInteraction/chatInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7056=['chatInteraction:','remove','emit','removeListener','register','length'];(function(_0x518c55,_0x133a5c){var _0x11c781=function(_0x123faf){while(--_0x123faf){_0x518c55['push'](_0x518c55['shift']());}};_0x11c781(++_0x133a5c);}(_0x7056,0x1f3));var _0x6705=function(_0x376761,_0xda556b){_0x376761=_0x376761-0x0;var _0xb883bf=_0x7056[_0x376761];return _0xb883bf;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=['save',_0x6705('0x0'),'update'];function createListener(_0x197327,_0xbd2009){return function(_0x14f496){_0xbd2009[_0x6705('0x1')](_0x197327,_0x14f496);};}function removeListener(_0x2c3ff8,_0x4f22a8){return function(){ChatInteractionEvents[_0x6705('0x2')](_0x2c3ff8,_0x4f22a8);};}exports[_0x6705('0x3')]=function(_0x1fca84){for(var _0x5d898e=0x0,_0x214ae2=events[_0x6705('0x4')];_0x5d898e<_0x214ae2;_0x5d898e++){var _0xa862b1=events[_0x5d898e];var _0xd0ae8e=createListener(_0x6705('0x5')+_0xa862b1,_0x1fca84);ChatInteractionEvents['on'](_0xa862b1,_0xd0ae8e);}};
\ No newline at end of file
+var _0x2c8e=['save','remove','update','emit','removeListener','length','chatInteraction:','./chatInteraction.events'];(function(_0x5abcef,_0x3d6067){var _0x425b2c=function(_0x356225){while(--_0x356225){_0x5abcef['push'](_0x5abcef['shift']());}};_0x425b2c(++_0x3d6067);}(_0x2c8e,0x1a7));var _0xe2c8=function(_0x2dfbf2,_0x5d3380){_0x2dfbf2=_0x2dfbf2-0x0;var _0x175e67=_0x2c8e[_0x2dfbf2];return _0x175e67;};'use strict';var ChatInteractionEvents=require(_0xe2c8('0x0'));var events=[_0xe2c8('0x1'),_0xe2c8('0x2'),_0xe2c8('0x3')];function createListener(_0x35ebbd,_0x3a0e3a){return function(_0x49758c){_0x3a0e3a[_0xe2c8('0x4')](_0x35ebbd,_0x49758c);};}function removeListener(_0x210587,_0x35c735){return function(){ChatInteractionEvents[_0xe2c8('0x5')](_0x210587,_0x35c735);};}exports['register']=function(_0x42a4e3){for(var _0x257206=0x0,_0x275add=events[_0xe2c8('0x6')];_0x257206<_0x275add;_0x257206++){var _0x3530bb=events[_0x257206];var _0x4eaef1=createListener(_0xe2c8('0x7')+_0x3530bb,_0x42a4e3);ChatInteractionEvents['on'](_0x3530bb,_0x4eaef1);}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js
index 66caa55..c5e7a3c 100644
--- a/server/api/chatInteraction/index.js
+++ b/server/api/chatInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa7d8=['/:id/download','download','post','create','/:id/vidaoo','createVidaooSession','diskStorage','join','%s-%s','originalname','file','addMessage','/:id/tags','tracked','chat','chatinteraction:addtags','put','update','/:id/custom_update','customUpdate','/:id/abandon','abandon','/:id/close','delete','chatinteraction:destroy','destroy','removeTags','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./chatInteraction.controller','isAuthenticated','index','describe','get','/:id','isChatInteractionAuthorized','show','/:id/attachment_download','/:id/messages','getMessages','/:id/my_messages','getMyMessages'];(function(_0x44776f,_0x198ac7){var _0x379bbd=function(_0x523ffb){while(--_0x523ffb){_0x44776f['push'](_0x44776f['shift']());}};_0x379bbd(++_0x198ac7);}(_0xa7d8,0xaf));var _0x8a7d=function(_0x521aa7,_0x38a57a){_0x521aa7=_0x521aa7-0x0;var _0x3c0b72=_0xa7d8[_0x521aa7];return _0x3c0b72;};'use strict';var multer=require(_0x8a7d('0x0'));var util=require(_0x8a7d('0x1'));var path=require(_0x8a7d('0x2'));var timeout=require(_0x8a7d('0x3'));var express=require(_0x8a7d('0x4'));var router=express[_0x8a7d('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x8a7d('0x6'));var config=require(_0x8a7d('0x7'));var controller=require(_0x8a7d('0x8'));router['get']('/',auth[_0x8a7d('0x9')](),controller[_0x8a7d('0xa')]);router['get']('/describe',auth[_0x8a7d('0x9')](),controller[_0x8a7d('0xb')]);router[_0x8a7d('0xc')](_0x8a7d('0xd'),auth[_0x8a7d('0xe')](),controller[_0x8a7d('0xf')]);router['get'](_0x8a7d('0x10'),auth[_0x8a7d('0xe')](),controller['attachmentDownload']);router[_0x8a7d('0xc')](_0x8a7d('0x11'),auth[_0x8a7d('0x9')](),controller[_0x8a7d('0x12')]);router['get'](_0x8a7d('0x13'),auth[_0x8a7d('0xe')](),controller[_0x8a7d('0x14')]);router[_0x8a7d('0xc')](_0x8a7d('0x15'),auth['isAuthenticated'](),controller[_0x8a7d('0x16')]);router[_0x8a7d('0x17')]('/',auth[_0x8a7d('0x9')](),controller[_0x8a7d('0x18')]);router[_0x8a7d('0x17')](_0x8a7d('0x19'),auth['isAuthenticated'](),controller[_0x8a7d('0x1a')]);var upload=multer({'storage':multer[_0x8a7d('0x1b')]({'destination':function(_0x248ad6,_0x5c9abe,_0x4a91ec){_0x4a91ec(null,path[_0x8a7d('0x1c')](config['root'],'server/files/attachments/'));},'filename':function(_0x3c9f8a,_0x18f4eb,_0x5b2cb3){_0x5b2cb3(null,util['format'](_0x8a7d('0x1d'),Date['now'](),_0x18f4eb[_0x8a7d('0x1e')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x8a7d('0x17')]('/:id/attachment_upload',upload['single'](_0x8a7d('0x1f')),controller['attachmentUpload']);router[_0x8a7d('0x17')](_0x8a7d('0x11'),auth[_0x8a7d('0xe')](),controller[_0x8a7d('0x20')]);router[_0x8a7d('0x17')](_0x8a7d('0x21'),auth[_0x8a7d('0x9')](),interaction[_0x8a7d('0x22')](_0x8a7d('0x23'),_0x8a7d('0x24')),controller['addTags']);router[_0x8a7d('0x25')](_0x8a7d('0xd'),auth[_0x8a7d('0x9')](),interaction[_0x8a7d('0x22')](_0x8a7d('0x23'),'chatinteraction:update'),controller[_0x8a7d('0x26')]);router[_0x8a7d('0x25')](_0x8a7d('0x27'),controller[_0x8a7d('0x28')]);router['put'](_0x8a7d('0x29'),auth[_0x8a7d('0xe')](),controller[_0x8a7d('0x2a')]);router[_0x8a7d('0x25')](_0x8a7d('0x2b'),controller['close']);router[_0x8a7d('0x2c')]('/:id',auth[_0x8a7d('0x9')](),interaction['tracked'](_0x8a7d('0x23'),_0x8a7d('0x2d')),controller[_0x8a7d('0x2e')]);router[_0x8a7d('0x2c')](_0x8a7d('0x21'),auth[_0x8a7d('0x9')](),controller[_0x8a7d('0x2f')]);module[_0x8a7d('0x30')]=router;
\ No newline at end of file
+var _0xfd3b=['chatinteraction:update','/:id/custom_update','customUpdate','/:id/abandon','abandon','close','delete','chatinteraction:destroy','destroy','exports','multer','util','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInteraction.controller','isAuthenticated','index','get','/describe','describe','/:id','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','/:id/my_messages','getMyMessages','download','create','post','/:id/vidaoo','createVidaooSession','diskStorage','join','root','server/files/attachments/','%s-%s','replace','/:id/attachment_upload','file','addMessage','/:id/tags','tracked','chat','put'];(function(_0x152c9e,_0x50f7de){var _0x14b99c=function(_0x428e9d){while(--_0x428e9d){_0x152c9e['push'](_0x152c9e['shift']());}};_0x14b99c(++_0x50f7de);}(_0xfd3b,0xff));var _0xbfd3=function(_0x303701,_0x4289fc){_0x303701=_0x303701-0x0;var _0x27e60b=_0xfd3b[_0x303701];return _0x27e60b;};'use strict';var multer=require(_0xbfd3('0x0'));var util=require(_0xbfd3('0x1'));var path=require('path');var timeout=require(_0xbfd3('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xbfd3('0x3'));var interaction=require(_0xbfd3('0x4'));var config=require(_0xbfd3('0x5'));var controller=require(_0xbfd3('0x6'));router['get']('/',auth[_0xbfd3('0x7')](),controller[_0xbfd3('0x8')]);router[_0xbfd3('0x9')](_0xbfd3('0xa'),auth[_0xbfd3('0x7')](),controller[_0xbfd3('0xb')]);router[_0xbfd3('0x9')](_0xbfd3('0xc'),auth[_0xbfd3('0xd')](),controller[_0xbfd3('0xe')]);router[_0xbfd3('0x9')](_0xbfd3('0xf'),auth[_0xbfd3('0xd')](),controller[_0xbfd3('0x10')]);router['get'](_0xbfd3('0x11'),auth[_0xbfd3('0x7')](),controller[_0xbfd3('0x12')]);router[_0xbfd3('0x9')](_0xbfd3('0x13'),auth[_0xbfd3('0xd')](),controller[_0xbfd3('0x14')]);router[_0xbfd3('0x9')]('/:id/download',auth[_0xbfd3('0x7')](),controller[_0xbfd3('0x15')]);router['post']('/',auth['isAuthenticated'](),controller[_0xbfd3('0x16')]);router[_0xbfd3('0x17')](_0xbfd3('0x18'),auth[_0xbfd3('0x7')](),controller[_0xbfd3('0x19')]);var upload=multer({'storage':multer[_0xbfd3('0x1a')]({'destination':function(_0x31ca22,_0x36f76f,_0x18a462){_0x18a462(null,path[_0xbfd3('0x1b')](config[_0xbfd3('0x1c')],_0xbfd3('0x1d')));},'filename':function(_0x3b4b31,_0x5e5d69,_0x4b95ab){_0x4b95ab(null,util['format'](_0xbfd3('0x1e'),Date['now'](),_0x5e5d69['originalname'][_0xbfd3('0x1f')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xbfd3('0x17')](_0xbfd3('0x20'),upload['single'](_0xbfd3('0x21')),controller['attachmentUpload']);router[_0xbfd3('0x17')]('/:id/messages',auth[_0xbfd3('0xd')](),controller[_0xbfd3('0x22')]);router[_0xbfd3('0x17')](_0xbfd3('0x23'),auth[_0xbfd3('0x7')](),interaction[_0xbfd3('0x24')](_0xbfd3('0x25'),'chatinteraction:addtags'),controller['addTags']);router[_0xbfd3('0x26')](_0xbfd3('0xc'),auth[_0xbfd3('0x7')](),interaction['tracked'](_0xbfd3('0x25'),_0xbfd3('0x27')),controller['update']);router[_0xbfd3('0x26')](_0xbfd3('0x28'),controller[_0xbfd3('0x29')]);router[_0xbfd3('0x26')](_0xbfd3('0x2a'),auth[_0xbfd3('0xd')](),controller[_0xbfd3('0x2b')]);router[_0xbfd3('0x26')]('/:id/close',controller[_0xbfd3('0x2c')]);router[_0xbfd3('0x2d')]('/:id',auth['isAuthenticated'](),interaction[_0xbfd3('0x24')](_0xbfd3('0x25'),_0xbfd3('0x2e')),controller[_0xbfd3('0x2f')]);router[_0xbfd3('0x2d')](_0xbfd3('0x23'),auth['isAuthenticated'](),controller['removeTags']);module[_0xbfd3('0x30')]=router;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.attributes.js b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
index 0ffb3cf..c765325 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.attributes.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd7a2=['INTEGER','sequelize','exports','TEXT','medium','BOOLEAN'];(function(_0x3d73bb,_0x533136){var _0x1345f6=function(_0x4d91c3){while(--_0x4d91c3){_0x3d73bb['push'](_0x3d73bb['shift']());}};_0x1345f6(++_0x533136);}(_0xd7a2,0x12d));var _0x2d7a=function(_0x24b852,_0x2bad67){_0x24b852=_0x24b852-0x0;var _0x180ad2=_0xd7a2[_0x24b852];return _0x180ad2;};'use strict';var Sequelize=require(_0x2d7a('0x0'));module[_0x2d7a('0x1')]={'body':{'type':Sequelize[_0x2d7a('0x2')](_0x2d7a('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x2d7a('0x4')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x2d7a('0x5')]}};
\ No newline at end of file
+var _0x4bcc=['sequelize','exports','TEXT','medium','BOOLEAN'];(function(_0x3a9661,_0x530b12){var _0x5bb119=function(_0x1278f){while(--_0x1278f){_0x3a9661['push'](_0x3a9661['shift']());}};_0x5bb119(++_0x530b12);}(_0x4bcc,0x1e5));var _0xc4bc=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x4bcc[_0x6c993a];return _0x27f547;};'use strict';var Sequelize=require(_0xc4bc('0x0'));module[_0xc4bc('0x1')]={'body':{'type':Sequelize[_0xc4bc('0x2')](_0xc4bc('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0xc4bc('0x4')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js
index b9b19e6..8ee7625 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.controller.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xca78=['socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','destroy','stack','name','send','index','ChatInternalMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','includeAll','include','findAll','catch','show','params','find','create','body','describe','get','messages','createdAt','lastMessage','YYYY-MM-DD\x20HH:mm:ss','getUsers','User','agent','admin','fullname','userpic','lastLoginAt','showWebBar','-online','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','autoAssociation','UserProfileResource','isEmpty','role','length','push','FromId','ToId','all','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost'];(function(_0x11b3fd,_0x296963){var _0x27e29c=function(_0x4678ec){while(--_0x4678ec){_0x11b3fd['push'](_0x11b3fd['shift']());}};_0x27e29c(++_0x296963);}(_0xca78,0xbf));var _0x8ca7=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0xca78[_0x46e363];return _0x3fb059;};'use strict';var emlformat=require(_0x8ca7('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8ca7('0x1'));var jsonpatch=require(_0x8ca7('0x2'));var rp=require(_0x8ca7('0x3'));var moment=require('moment');var BPromise=require(_0x8ca7('0x4'));var Mustache=require(_0x8ca7('0x5'));var util=require(_0x8ca7('0x6'));var path=require(_0x8ca7('0x7'));var sox=require(_0x8ca7('0x8'));var csv=require(_0x8ca7('0x9'));var ejs=require(_0x8ca7('0xa'));var fs=require('fs');var fs_extra=require(_0x8ca7('0xb'));var _=require(_0x8ca7('0xc'));var squel=require(_0x8ca7('0xd'));var crypto=require(_0x8ca7('0xe'));var jsforce=require(_0x8ca7('0xf'));var deskjs=require(_0x8ca7('0x10'));var toCsv=require(_0x8ca7('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x8ca7('0x11'));var authService=require(_0x8ca7('0x12'));var qs=require(_0x8ca7('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8ca7('0x14'));var logger=require(_0x8ca7('0x15'))(_0x8ca7('0x16'));var utils=require(_0x8ca7('0x17'));var config=require(_0x8ca7('0x18'));var licenseUtil=require(_0x8ca7('0x19'));var db=require(_0x8ca7('0x1a'))['db'];config[_0x8ca7('0x1b')]=_['defaults'](config[_0x8ca7('0x1b')],{'host':_0x8ca7('0x1c'),'port':0x18eb});var socket=require(_0x8ca7('0x1d'))(new Redis(config['redis']));require(_0x8ca7('0x1e'))[_0x8ca7('0x1f')](socket);function respondWithStatusCode(_0x4643ef,_0x429872){_0x429872=_0x429872||0xcc;return function(_0x5a669d){if(_0x5a669d){return _0x4643ef[_0x8ca7('0x20')](_0x429872);}return _0x4643ef[_0x8ca7('0x21')](_0x429872)[_0x8ca7('0x22')]();};}function respondWithResult(_0x7c8ffb,_0x5aa2b6){_0x5aa2b6=_0x5aa2b6||0xc8;return function(_0x3cf3b6){if(_0x3cf3b6){return _0x7c8ffb[_0x8ca7('0x21')](_0x5aa2b6)[_0x8ca7('0x23')](_0x3cf3b6);}};}function respondWithFilteredResult(_0x3c3c56,_0x2c7714){return function(_0x31ed37){if(_0x31ed37){var _0x180fab=typeof _0x2c7714[_0x8ca7('0x24')]===_0x8ca7('0x25')&&typeof _0x2c7714[_0x8ca7('0x26')]==='undefined';var _0x171979=_0x31ed37[_0x8ca7('0x27')];var _0x587f58=_0x180fab?0x0:_0x2c7714['offset'];var _0x64e02f=_0x180fab?_0x31ed37[_0x8ca7('0x27')]:_0x2c7714[_0x8ca7('0x24')]+_0x2c7714[_0x8ca7('0x26')];var _0x3d4395;if(_0x64e02f>=_0x171979){_0x64e02f=_0x171979;_0x3d4395=0xc8;}else{_0x3d4395=0xce;}_0x3c3c56[_0x8ca7('0x21')](_0x3d4395);return _0x3c3c56[_0x8ca7('0x28')](_0x8ca7('0x29'),_0x587f58+'-'+_0x64e02f+'/'+_0x171979)[_0x8ca7('0x23')](_0x31ed37);}return null;};}function patchUpdates(_0x39666c){return function(_0x1e4f60){try{jsonpatch[_0x8ca7('0x2a')](_0x1e4f60,_0x39666c,!![]);}catch(_0x2e451c){return BPromise['reject'](_0x2e451c);}return _0x1e4f60['save']();};}function saveUpdates(_0x2e1cb0,_0x43c51e){return function(_0x313da5){if(_0x313da5){return _0x313da5[_0x8ca7('0x2b')](_0x2e1cb0)[_0x8ca7('0x2c')](function(_0x292fe2){return _0x292fe2;});}return null;};}function removeEntity(_0x3d2319,_0x5835b5){return function(_0x3c608a){if(_0x3c608a){return _0x3c608a[_0x8ca7('0x2d')]()[_0x8ca7('0x2c')](function(){_0x3d2319[_0x8ca7('0x21')](0xcc)[_0x8ca7('0x22')]();});}};}function handleEntityNotFound(_0x3f0d8d,_0x6d88da){return function(_0x35eb24){if(!_0x35eb24){_0x3f0d8d[_0x8ca7('0x20')](0x194);}return _0x35eb24;};}function handleError(_0x30e2f4,_0x1bb7bb){_0x1bb7bb=_0x1bb7bb||0x1f4;return function(_0xba8944){logger['error'](_0xba8944[_0x8ca7('0x2e')]);if(_0xba8944[_0x8ca7('0x2f')]){delete _0xba8944[_0x8ca7('0x2f')];}_0x30e2f4['status'](_0x1bb7bb)[_0x8ca7('0x30')](_0xba8944);};}exports[_0x8ca7('0x31')]=function(_0x15f10f,_0x53cc0b){var _0x36112f={},_0x164222={},_0x5dffd6={'count':0x0,'rows':[]};var _0x1d6af5=_['map'](db[_0x8ca7('0x32')][_0x8ca7('0x33')],function(_0x2abd4d){return{'name':_0x2abd4d[_0x8ca7('0x34')],'type':_0x2abd4d[_0x8ca7('0x35')][_0x8ca7('0x36')]};});_0x164222[_0x8ca7('0x37')]=_['map'](_0x1d6af5,_0x8ca7('0x2f'));_0x164222[_0x8ca7('0x38')]=_[_0x8ca7('0x39')](_0x15f10f[_0x8ca7('0x38')]);_0x164222[_0x8ca7('0x3a')]=_[_0x8ca7('0x3b')](_0x164222['model'],_0x164222[_0x8ca7('0x38')]);_0x36112f[_0x8ca7('0x3c')]=_['intersection'](_0x164222[_0x8ca7('0x37')],qs[_0x8ca7('0x3d')](_0x15f10f['query']['fields']));_0x36112f[_0x8ca7('0x3c')]=_0x36112f['attributes']['length']?_0x36112f[_0x8ca7('0x3c')]:_0x164222[_0x8ca7('0x37')];if(!_0x15f10f['query'][_0x8ca7('0x3e')](_0x8ca7('0x3f'))){_0x36112f[_0x8ca7('0x26')]=qs[_0x8ca7('0x26')](_0x15f10f[_0x8ca7('0x38')][_0x8ca7('0x26')]);_0x36112f[_0x8ca7('0x24')]=qs[_0x8ca7('0x24')](_0x15f10f[_0x8ca7('0x38')]['offset']);}_0x36112f[_0x8ca7('0x40')]=qs['sort'](_0x15f10f[_0x8ca7('0x38')][_0x8ca7('0x41')]);_0x36112f[_0x8ca7('0x42')]=qs[_0x8ca7('0x3a')](_[_0x8ca7('0x43')](_0x15f10f[_0x8ca7('0x38')],_0x164222['filters']),_0x1d6af5);if(_0x15f10f['query'][_0x8ca7('0x44')]){_0x36112f['where']=_[_0x8ca7('0x45')](_0x36112f[_0x8ca7('0x42')],{'$or':_[_0x8ca7('0x46')](_0x1d6af5,function(_0x53906f){if(_0x53906f[_0x8ca7('0x35')]!==_0x8ca7('0x47')){var _0x1a2537={};_0x1a2537[_0x53906f[_0x8ca7('0x2f')]]={'$like':'%'+_0x15f10f[_0x8ca7('0x38')][_0x8ca7('0x44')]+'%'};return _0x1a2537;}})});}_0x36112f=_[_0x8ca7('0x45')]({},_0x36112f,_0x15f10f['options']);var _0x10e926={'where':_0x36112f[_0x8ca7('0x42')]};return db[_0x8ca7('0x32')][_0x8ca7('0x27')](_0x10e926)[_0x8ca7('0x2c')](function(_0x164959){_0x5dffd6[_0x8ca7('0x27')]=_0x164959;if(_0x15f10f[_0x8ca7('0x38')][_0x8ca7('0x48')]){_0x36112f[_0x8ca7('0x49')]=[{'all':!![]}];}return db[_0x8ca7('0x32')][_0x8ca7('0x4a')](_0x36112f);})[_0x8ca7('0x2c')](function(_0x925ad9){_0x5dffd6['rows']=_0x925ad9;return _0x5dffd6;})['then'](respondWithFilteredResult(_0x53cc0b,_0x36112f))[_0x8ca7('0x4b')](handleError(_0x53cc0b,null));};exports[_0x8ca7('0x4c')]=function(_0x45d170,_0x1aff88){var _0x4e0591={'raw':!![],'where':{'id':_0x45d170[_0x8ca7('0x4d')]['id']}},_0x2fbdfa={};_0x2fbdfa['model']=_[_0x8ca7('0x39')](db['ChatInternalMessage'][_0x8ca7('0x33')]);_0x2fbdfa['query']=_['keys'](_0x45d170[_0x8ca7('0x38')]);_0x2fbdfa[_0x8ca7('0x3a')]=_['intersection'](_0x2fbdfa[_0x8ca7('0x37')],_0x2fbdfa[_0x8ca7('0x38')]);_0x4e0591[_0x8ca7('0x3c')]=_[_0x8ca7('0x3b')](_0x2fbdfa[_0x8ca7('0x37')],qs[_0x8ca7('0x3d')](_0x45d170['query']['fields']));_0x4e0591[_0x8ca7('0x3c')]=_0x4e0591[_0x8ca7('0x3c')]['length']?_0x4e0591[_0x8ca7('0x3c')]:_0x2fbdfa['model'];if(_0x45d170['query'][_0x8ca7('0x48')]){_0x4e0591['include']=[{'all':!![]}];}_0x4e0591=_[_0x8ca7('0x45')]({},_0x4e0591,_0x45d170['options']);return db['ChatInternalMessage'][_0x8ca7('0x4e')](_0x4e0591)[_0x8ca7('0x2c')](handleEntityNotFound(_0x1aff88,null))[_0x8ca7('0x2c')](respondWithResult(_0x1aff88,null))[_0x8ca7('0x4b')](handleError(_0x1aff88,null));};exports[_0x8ca7('0x4f')]=function(_0x5d6063,_0x2efe62){return db[_0x8ca7('0x32')][_0x8ca7('0x4f')](_0x5d6063[_0x8ca7('0x50')],{})[_0x8ca7('0x2c')](respondWithResult(_0x2efe62,0xc9))[_0x8ca7('0x4b')](handleError(_0x2efe62,null));};exports[_0x8ca7('0x2b')]=function(_0x1e7219,_0x5ce6f4){if(_0x1e7219[_0x8ca7('0x50')]['id']){delete _0x1e7219['body']['id'];}return db[_0x8ca7('0x32')][_0x8ca7('0x4e')]({'where':{'id':_0x1e7219[_0x8ca7('0x4d')]['id']}})[_0x8ca7('0x2c')](handleEntityNotFound(_0x5ce6f4,null))[_0x8ca7('0x2c')](saveUpdates(_0x1e7219['body'],null))[_0x8ca7('0x2c')](respondWithResult(_0x5ce6f4,null))[_0x8ca7('0x4b')](handleError(_0x5ce6f4,null));};exports['destroy']=function(_0xe9e1d3,_0x4ad208){return db[_0x8ca7('0x32')][_0x8ca7('0x4e')]({'where':{'id':_0xe9e1d3[_0x8ca7('0x4d')]['id']}})[_0x8ca7('0x2c')](handleEntityNotFound(_0x4ad208,null))[_0x8ca7('0x2c')](removeEntity(_0x4ad208,null))[_0x8ca7('0x4b')](handleError(_0x4ad208,null));};exports[_0x8ca7('0x51')]=function(_0x26eb9c,_0x5526a4){return db['ChatInternalMessage'][_0x8ca7('0x51')]()['then'](respondWithResult(_0x5526a4,null))[_0x8ca7('0x4b')](handleError(_0x5526a4,null));};function wrapUser(_0x24f6b3){return function(_0x158e96){var _0x38c563=_0x24f6b3[_0x8ca7('0x52')]({'plain':!![]});_0x38c563[_0x8ca7('0x53')]=[];if(_0x158e96){_0x38c563['lastMessageAt']=_0x158e96[_0x8ca7('0x54')];_0x38c563[_0x8ca7('0x55')]=_0x158e96;}else{_0x38c563['lastMessageAt']=moment(0x0)['format'](_0x8ca7('0x56'));_0x38c563[_0x8ca7('0x55')]={};}return _0x38c563;};}exports[_0x8ca7('0x57')]=function(_0x5a6f29,_0x2a6ba5,_0x204b27){var _0x418b05=[];return db[_0x8ca7('0x58')]['findAll']({'where':{'role':[_0x8ca7('0x59'),_0x8ca7('0x5a'),'user']},'attributes':['id',_0x8ca7('0x5b'),_0x8ca7('0x2f'),'role',_0x8ca7('0x5c'),'internal','online',_0x8ca7('0x5d'),'allowmessenger',_0x8ca7('0x5e')],'order':qs['sort'](_0x8ca7('0x5f')),'include':[{'model':db[_0x8ca7('0x60')],'as':_0x8ca7('0x61'),'attributes':['id',_0x8ca7('0x2f'),_0x8ca7('0x35')],'through':{'attributes':[]}}]})['then'](function(_0x2603ec){if(_0x2603ec){var _0x2c526c=_0x5a6f29['user'][_0x8ca7('0x52')]({'plain':!![]});if(!_0x2c526c)throw new Error(_0x8ca7('0x62'));if(_0x2c526c['role']===_0x8ca7('0x63')){return db[_0x8ca7('0x64')][_0x8ca7('0x4e')]({'where':{'name':'Agents','userProfileId':_0x2c526c['userProfileId']},'raw':!![]})[_0x8ca7('0x2c')](function(_0x1ad706){if(_0x1ad706){if(_0x1ad706[_0x8ca7('0x65')]===0x0){return db[_0x8ca7('0x66')][_0x8ca7('0x4a')]({'where':{'sectionId':_0x1ad706['id']},'raw':!![]})[_0x8ca7('0x2c')](function(_0x4761b6){var _0x4beb1e=[];if(_[_0x8ca7('0x67')](_0x4761b6)){_0x4beb1e=_[_0x8ca7('0x44')](_0x2603ec,function(_0x475024){if(_0x475024[_0x8ca7('0x68')]!==_0x8ca7('0x59')){return _0x475024;}});return _0x4beb1e;}else{for(var _0x174929=0x0;_0x174929<_0x2603ec[_0x8ca7('0x69')];_0x174929++){var _0x101c7e=_0x2603ec[_0x174929];if(_0x101c7e['role']===_0x8ca7('0x59')){var _0x1f30d4=_[_0x8ca7('0x4e')](_0x4761b6,function(_0xf65857){return _0xf65857['resourceId']===_0x101c7e['id'];});if(_0x1f30d4)_0x4beb1e['push'](_0x101c7e);}else{_0x4beb1e[_0x8ca7('0x6a')](_0x101c7e);}}return _0x4beb1e;}});}else{return _0x2603ec;}}else{var _0x593b34=_[_0x8ca7('0x44')](_0x2603ec,function(_0x146c53){if(_0x146c53[_0x8ca7('0x68')]!==_0x8ca7('0x59')){return _0x146c53;}});return _0x593b34;}});}else{return _0x2603ec;}}})[_0x8ca7('0x2c')](function(_0x20522d){var _0x3c55f8=[];if(_0x20522d){_0x418b05=_0x20522d;for(var _0x3a4286=0x0;_0x3a4286<_0x20522d[_0x8ca7('0x69')];_0x3a4286+=0x1){_0x418b05[_0x3a4286][_0x8ca7('0x53')]=[];_0x3c55f8[_0x8ca7('0x6a')](db['ChatInternalMessage'][_0x8ca7('0x4e')]({'where':{'FromId':[_0x5a6f29[_0x8ca7('0x63')]['id'],_0x20522d[_0x3a4286]['id']],'ToId':[_0x5a6f29['user']['id'],_0x20522d[_0x3a4286]['id']],'ChatGroupId':null},'attributes':['id',_0x8ca7('0x54'),_0x8ca7('0x6b'),_0x8ca7('0x6c'),'read',_0x8ca7('0x50')],'order':qs[_0x8ca7('0x41')]('-createdAt'),'limit':0x1,'offset':0x0,'raw':!![]})[_0x8ca7('0x2c')](wrapUser(_0x20522d[_0x3a4286])));}return BPromise[_0x8ca7('0x6d')](_0x3c55f8);}return[];})[_0x8ca7('0x2c')](function(_0xba5843){return{'rows':_0xba5843,'count':_0xba5843[_0x8ca7('0x69')]};})[_0x8ca7('0x2c')](respondWithResult(_0x2a6ba5,null))[_0x8ca7('0x4b')](handleError(_0x2a6ba5,null));};
\ No newline at end of file
+var _0x7b33=['User','findAll','agent','admin','user','fullname','role','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar','-online','VoiceQueue','VoiceQueues','UserProfileSection','Agents','userProfileId','autoAssociation','UserProfileResource','isEmpty','resourceId','push','messages','FromId','-createdAt','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','register','sendStatus','status','end','json','limit','undefined','offset','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','map','rawAttributes','fieldName','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','order','sort','where','pick','merge','type','filter','options','ChatInternalMessage','include','rows','catch','show','params','keys','create','body','find','get','lastMessageAt','createdAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','getUsers'];(function(_0x4c2623,_0x4838bb){var _0x2be431=function(_0x55829d){while(--_0x55829d){_0x4c2623['push'](_0x4c2623['shift']());}};_0x2be431(++_0x4838bb);}(_0x7b33,0x16e));var _0x37b3=function(_0x50ea94,_0x4cc586){_0x50ea94=_0x50ea94-0x0;var _0x5ca25e=_0x7b33[_0x50ea94];return _0x5ca25e;};'use strict';var emlformat=require(_0x37b3('0x0'));var rimraf=require(_0x37b3('0x1'));var zipdir=require(_0x37b3('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x37b3('0x3'));var BPromise=require(_0x37b3('0x4'));var Mustache=require(_0x37b3('0x5'));var util=require(_0x37b3('0x6'));var path=require(_0x37b3('0x7'));var sox=require(_0x37b3('0x8'));var csv=require(_0x37b3('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x37b3('0xa'));var _=require(_0x37b3('0xb'));var squel=require(_0x37b3('0xc'));var crypto=require('crypto');var jsforce=require(_0x37b3('0xd'));var deskjs=require(_0x37b3('0xe'));var toCsv=require(_0x37b3('0x9'));var querystring=require(_0x37b3('0xf'));var Papa=require(_0x37b3('0x10'));var Redis=require(_0x37b3('0x11'));var authService=require(_0x37b3('0x12'));var qs=require(_0x37b3('0x13'));var as=require(_0x37b3('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x37b3('0x15'))(_0x37b3('0x16'));var utils=require(_0x37b3('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x37b3('0x18'));var db=require(_0x37b3('0x19'))['db'];config[_0x37b3('0x1a')]=_[_0x37b3('0x1b')](config['redis'],{'host':_0x37b3('0x1c'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x37b3('0x1a')]));require('./chatInternalMessage.socket')[_0x37b3('0x1d')](socket);function respondWithStatusCode(_0xaf18c7,_0x5573be){_0x5573be=_0x5573be||0xcc;return function(_0x3bda54){if(_0x3bda54){return _0xaf18c7[_0x37b3('0x1e')](_0x5573be);}return _0xaf18c7[_0x37b3('0x1f')](_0x5573be)[_0x37b3('0x20')]();};}function respondWithResult(_0x14d6bb,_0x10a102){_0x10a102=_0x10a102||0xc8;return function(_0x2d87ed){if(_0x2d87ed){return _0x14d6bb[_0x37b3('0x1f')](_0x10a102)[_0x37b3('0x21')](_0x2d87ed);}};}function respondWithFilteredResult(_0x7ffb72,_0x14e4e2){return function(_0x592a97){if(_0x592a97){var _0x278c2a=typeof _0x14e4e2['offset']==='undefined'&&typeof _0x14e4e2[_0x37b3('0x22')]===_0x37b3('0x23');var _0x233376=_0x592a97['count'];var _0x635776=_0x278c2a?0x0:_0x14e4e2[_0x37b3('0x24')];var _0x40ed82=_0x278c2a?_0x592a97[_0x37b3('0x25')]:_0x14e4e2[_0x37b3('0x24')]+_0x14e4e2[_0x37b3('0x22')];var _0xbcbcca;if(_0x40ed82>=_0x233376){_0x40ed82=_0x233376;_0xbcbcca=0xc8;}else{_0xbcbcca=0xce;}_0x7ffb72[_0x37b3('0x1f')](_0xbcbcca);return _0x7ffb72[_0x37b3('0x26')](_0x37b3('0x27'),_0x635776+'-'+_0x40ed82+'/'+_0x233376)[_0x37b3('0x21')](_0x592a97);}return null;};}function patchUpdates(_0x44f73f){return function(_0x34683f){try{jsonpatch[_0x37b3('0x28')](_0x34683f,_0x44f73f,!![]);}catch(_0x179503){return BPromise[_0x37b3('0x29')](_0x179503);}return _0x34683f[_0x37b3('0x2a')]();};}function saveUpdates(_0x53d7ab,_0x3eccc2){return function(_0x1b8b59){if(_0x1b8b59){return _0x1b8b59[_0x37b3('0x2b')](_0x53d7ab)[_0x37b3('0x2c')](function(_0x5218a5){return _0x5218a5;});}return null;};}function removeEntity(_0x2c5f39,_0x434335){return function(_0x54bf19){if(_0x54bf19){return _0x54bf19[_0x37b3('0x2d')]()[_0x37b3('0x2c')](function(){_0x2c5f39[_0x37b3('0x1f')](0xcc)[_0x37b3('0x20')]();});}};}function handleEntityNotFound(_0x30e11f,_0x571195){return function(_0x4efb02){if(!_0x4efb02){_0x30e11f[_0x37b3('0x1e')](0x194);}return _0x4efb02;};}function handleError(_0x43bfc8,_0x5c9126){_0x5c9126=_0x5c9126||0x1f4;return function(_0x4a7d44){logger[_0x37b3('0x2e')](_0x4a7d44[_0x37b3('0x2f')]);if(_0x4a7d44[_0x37b3('0x30')]){delete _0x4a7d44[_0x37b3('0x30')];}_0x43bfc8[_0x37b3('0x1f')](_0x5c9126)[_0x37b3('0x31')](_0x4a7d44);};}exports['index']=function(_0x806ffb,_0x270fdd){var _0x30fa3e={},_0x327d5e={},_0x2a837a={'count':0x0,'rows':[]};var _0x470366=_[_0x37b3('0x32')](db['ChatInternalMessage'][_0x37b3('0x33')],function(_0x1b4936){return{'name':_0x1b4936[_0x37b3('0x34')],'type':_0x1b4936['type']['key']};});_0x327d5e['model']=_[_0x37b3('0x32')](_0x470366,_0x37b3('0x30'));_0x327d5e[_0x37b3('0x35')]=_['keys'](_0x806ffb[_0x37b3('0x35')]);_0x327d5e[_0x37b3('0x36')]=_[_0x37b3('0x37')](_0x327d5e['model'],_0x327d5e[_0x37b3('0x35')]);_0x30fa3e[_0x37b3('0x38')]=_['intersection'](_0x327d5e[_0x37b3('0x39')],qs['fields'](_0x806ffb[_0x37b3('0x35')][_0x37b3('0x3a')]));_0x30fa3e[_0x37b3('0x38')]=_0x30fa3e[_0x37b3('0x38')][_0x37b3('0x3b')]?_0x30fa3e[_0x37b3('0x38')]:_0x327d5e[_0x37b3('0x39')];if(!_0x806ffb[_0x37b3('0x35')][_0x37b3('0x3c')]('nolimit')){_0x30fa3e[_0x37b3('0x22')]=qs[_0x37b3('0x22')](_0x806ffb[_0x37b3('0x35')]['limit']);_0x30fa3e['offset']=qs[_0x37b3('0x24')](_0x806ffb[_0x37b3('0x35')]['offset']);}_0x30fa3e[_0x37b3('0x3d')]=qs[_0x37b3('0x3e')](_0x806ffb[_0x37b3('0x35')][_0x37b3('0x3e')]);_0x30fa3e[_0x37b3('0x3f')]=qs[_0x37b3('0x36')](_[_0x37b3('0x40')](_0x806ffb[_0x37b3('0x35')],_0x327d5e[_0x37b3('0x36')]),_0x470366);if(_0x806ffb[_0x37b3('0x35')]['filter']){_0x30fa3e['where']=_[_0x37b3('0x41')](_0x30fa3e[_0x37b3('0x3f')],{'$or':_[_0x37b3('0x32')](_0x470366,function(_0x3dcedf){if(_0x3dcedf[_0x37b3('0x42')]!=='VIRTUAL'){var _0x3feca7={};_0x3feca7[_0x3dcedf[_0x37b3('0x30')]]={'$like':'%'+_0x806ffb[_0x37b3('0x35')][_0x37b3('0x43')]+'%'};return _0x3feca7;}})});}_0x30fa3e=_[_0x37b3('0x41')]({},_0x30fa3e,_0x806ffb[_0x37b3('0x44')]);var _0x4e9585={'where':_0x30fa3e[_0x37b3('0x3f')]};return db[_0x37b3('0x45')]['count'](_0x4e9585)[_0x37b3('0x2c')](function(_0x418d01){_0x2a837a['count']=_0x418d01;if(_0x806ffb[_0x37b3('0x35')]['includeAll']){_0x30fa3e[_0x37b3('0x46')]=[{'all':!![]}];}return db[_0x37b3('0x45')]['findAll'](_0x30fa3e);})[_0x37b3('0x2c')](function(_0x431304){_0x2a837a[_0x37b3('0x47')]=_0x431304;return _0x2a837a;})[_0x37b3('0x2c')](respondWithFilteredResult(_0x270fdd,_0x30fa3e))[_0x37b3('0x48')](handleError(_0x270fdd,null));};exports[_0x37b3('0x49')]=function(_0x58a3f2,_0x2204ce){var _0x508230={'raw':!![],'where':{'id':_0x58a3f2[_0x37b3('0x4a')]['id']}},_0x4df74d={};_0x4df74d[_0x37b3('0x39')]=_[_0x37b3('0x4b')](db[_0x37b3('0x45')][_0x37b3('0x33')]);_0x4df74d[_0x37b3('0x35')]=_[_0x37b3('0x4b')](_0x58a3f2[_0x37b3('0x35')]);_0x4df74d[_0x37b3('0x36')]=_[_0x37b3('0x37')](_0x4df74d[_0x37b3('0x39')],_0x4df74d[_0x37b3('0x35')]);_0x508230[_0x37b3('0x38')]=_[_0x37b3('0x37')](_0x4df74d[_0x37b3('0x39')],qs['fields'](_0x58a3f2[_0x37b3('0x35')]['fields']));_0x508230[_0x37b3('0x38')]=_0x508230[_0x37b3('0x38')][_0x37b3('0x3b')]?_0x508230[_0x37b3('0x38')]:_0x4df74d[_0x37b3('0x39')];if(_0x58a3f2[_0x37b3('0x35')]['includeAll']){_0x508230['include']=[{'all':!![]}];}_0x508230=_[_0x37b3('0x41')]({},_0x508230,_0x58a3f2['options']);return db[_0x37b3('0x45')]['find'](_0x508230)[_0x37b3('0x2c')](handleEntityNotFound(_0x2204ce,null))[_0x37b3('0x2c')](respondWithResult(_0x2204ce,null))['catch'](handleError(_0x2204ce,null));};exports[_0x37b3('0x4c')]=function(_0x14f05b,_0x31ad34){return db['ChatInternalMessage'][_0x37b3('0x4c')](_0x14f05b[_0x37b3('0x4d')],{})[_0x37b3('0x2c')](respondWithResult(_0x31ad34,0xc9))[_0x37b3('0x48')](handleError(_0x31ad34,null));};exports['update']=function(_0xc07757,_0x1ea3fe){if(_0xc07757[_0x37b3('0x4d')]['id']){delete _0xc07757['body']['id'];}return db[_0x37b3('0x45')][_0x37b3('0x4e')]({'where':{'id':_0xc07757[_0x37b3('0x4a')]['id']}})['then'](handleEntityNotFound(_0x1ea3fe,null))['then'](saveUpdates(_0xc07757[_0x37b3('0x4d')],null))[_0x37b3('0x2c')](respondWithResult(_0x1ea3fe,null))[_0x37b3('0x48')](handleError(_0x1ea3fe,null));};exports[_0x37b3('0x2d')]=function(_0x52bdd7,_0x5b5d34){return db[_0x37b3('0x45')][_0x37b3('0x4e')]({'where':{'id':_0x52bdd7[_0x37b3('0x4a')]['id']}})['then'](handleEntityNotFound(_0x5b5d34,null))[_0x37b3('0x2c')](removeEntity(_0x5b5d34,null))['catch'](handleError(_0x5b5d34,null));};exports['describe']=function(_0x3b6453,_0x30eed8){return db[_0x37b3('0x45')]['describe']()[_0x37b3('0x2c')](respondWithResult(_0x30eed8,null))[_0x37b3('0x48')](handleError(_0x30eed8,null));};function wrapUser(_0x33b9ab){return function(_0x5013bb){var _0x444e14=_0x33b9ab[_0x37b3('0x4f')]({'plain':!![]});_0x444e14['messages']=[];if(_0x5013bb){_0x444e14[_0x37b3('0x50')]=_0x5013bb[_0x37b3('0x51')];_0x444e14[_0x37b3('0x52')]=_0x5013bb;}else{_0x444e14['lastMessageAt']=moment(0x0)[_0x37b3('0x53')](_0x37b3('0x54'));_0x444e14['lastMessage']={};}return _0x444e14;};}exports[_0x37b3('0x55')]=function(_0xfa622,_0x5cafa4,_0x2633f6){var _0x2ccbb2=[];return db[_0x37b3('0x56')][_0x37b3('0x57')]({'where':{'role':[_0x37b3('0x58'),_0x37b3('0x59'),_0x37b3('0x5a')]},'attributes':['id',_0x37b3('0x5b'),'name',_0x37b3('0x5c'),_0x37b3('0x5d'),_0x37b3('0x5e'),_0x37b3('0x5f'),_0x37b3('0x60'),_0x37b3('0x61'),_0x37b3('0x62')],'order':qs[_0x37b3('0x3e')](_0x37b3('0x63')),'include':[{'model':db[_0x37b3('0x64')],'as':_0x37b3('0x65'),'attributes':['id','name','type'],'through':{'attributes':[]}}]})['then'](function(_0x3b0457){if(_0x3b0457){var _0x4bf146=_0xfa622[_0x37b3('0x5a')][_0x37b3('0x4f')]({'plain':!![]});if(!_0x4bf146)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4bf146[_0x37b3('0x5c')]==='user'){return db[_0x37b3('0x66')]['find']({'where':{'name':_0x37b3('0x67'),'userProfileId':_0x4bf146[_0x37b3('0x68')]},'raw':!![]})[_0x37b3('0x2c')](function(_0x33152c){if(_0x33152c){if(_0x33152c[_0x37b3('0x69')]===0x0){return db[_0x37b3('0x6a')][_0x37b3('0x57')]({'where':{'sectionId':_0x33152c['id']},'raw':!![]})['then'](function(_0x1da0db){var _0x18040c=[];if(_[_0x37b3('0x6b')](_0x1da0db)){_0x18040c=_['filter'](_0x3b0457,function(_0x32f710){if(_0x32f710[_0x37b3('0x5c')]!=='agent'){return _0x32f710;}});return _0x18040c;}else{for(var _0x1e0e30=0x0;_0x1e0e30<_0x3b0457[_0x37b3('0x3b')];_0x1e0e30++){var _0x4650b7=_0x3b0457[_0x1e0e30];if(_0x4650b7['role']===_0x37b3('0x58')){var _0x5951ad=_[_0x37b3('0x4e')](_0x1da0db,function(_0x279c11){return _0x279c11[_0x37b3('0x6c')]===_0x4650b7['id'];});if(_0x5951ad)_0x18040c[_0x37b3('0x6d')](_0x4650b7);}else{_0x18040c['push'](_0x4650b7);}}return _0x18040c;}});}else{return _0x3b0457;}}else{var _0x45070f=_['filter'](_0x3b0457,function(_0x1e6dc8){if(_0x1e6dc8[_0x37b3('0x5c')]!==_0x37b3('0x58')){return _0x1e6dc8;}});return _0x45070f;}});}else{return _0x3b0457;}}})[_0x37b3('0x2c')](function(_0x46073c){var _0x38dfc5=[];if(_0x46073c){_0x2ccbb2=_0x46073c;for(var _0x4de8e4=0x0;_0x4de8e4<_0x46073c[_0x37b3('0x3b')];_0x4de8e4+=0x1){_0x2ccbb2[_0x4de8e4][_0x37b3('0x6e')]=[];_0x38dfc5[_0x37b3('0x6d')](db[_0x37b3('0x45')][_0x37b3('0x4e')]({'where':{'FromId':[_0xfa622[_0x37b3('0x5a')]['id'],_0x46073c[_0x4de8e4]['id']],'ToId':[_0xfa622[_0x37b3('0x5a')]['id'],_0x46073c[_0x4de8e4]['id']],'ChatGroupId':null},'attributes':['id',_0x37b3('0x51'),_0x37b3('0x6f'),'ToId','read',_0x37b3('0x4d')],'order':qs[_0x37b3('0x3e')](_0x37b3('0x70')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x37b3('0x2c')](wrapUser(_0x46073c[_0x4de8e4])));}return BPromise['all'](_0x38dfc5);}return[];})['then'](function(_0x499bbb){return{'rows':_0x499bbb,'count':_0x499bbb[_0x37b3('0x3b')]};})[_0x37b3('0x2c')](respondWithResult(_0x5cafa4,null))[_0x37b3('0x48')](handleError(_0x5cafa4,null));};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js
index 099d88e..1817e30 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.events.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x13c4=['exports','../../mysqldb','ChatInternalMessage','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x59bcb1,_0x5a4b6c){var _0x4a737f=function(_0x546a49){while(--_0x546a49){_0x59bcb1['push'](_0x59bcb1['shift']());}};_0x4a737f(++_0x5a4b6c);}(_0x13c4,0x121));var _0x413c=function(_0x43c92a,_0x1c4901){_0x43c92a=_0x43c92a-0x0;var _0x5ebfe9=_0x13c4[_0x43c92a];return _0x5ebfe9;};'use strict';var EventEmitter=require('events');var ChatInternalMessage=require(_0x413c('0x0'))['db'][_0x413c('0x1')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x413c('0x2'),'afterUpdate':_0x413c('0x3'),'afterDestroy':_0x413c('0x4')};function emitEvent(_0x194db4){return function(_0x5492e4,_0xd3c2f2,_0x124738){ChatInternalMessageEvents[_0x413c('0x5')](_0x194db4+':'+_0x5492e4['id'],_0x5492e4);ChatInternalMessageEvents[_0x413c('0x5')](_0x194db4,_0x5492e4);_0x124738(null);};}for(var e in events){if(events[_0x413c('0x6')](e)){var event=events[e];ChatInternalMessage[_0x413c('0x7')](e,emitEvent(event));}}module[_0x413c('0x8')]=ChatInternalMessageEvents;
\ No newline at end of file
+var _0x4477=['exports','events','../../mysqldb','ChatInternalMessage','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x448c2e,_0x3d1d3a){var _0x68f4d4=function(_0x3ed7c0){while(--_0x3ed7c0){_0x448c2e['push'](_0x448c2e['shift']());}};_0x68f4d4(++_0x3d1d3a);}(_0x4477,0xb1));var _0x7447=function(_0x7507b3,_0x4cad44){_0x7507b3=_0x7507b3-0x0;var _0xad7bd3=_0x4477[_0x7507b3];return _0xad7bd3;};'use strict';var EventEmitter=require(_0x7447('0x0'));var ChatInternalMessage=require(_0x7447('0x1'))['db'][_0x7447('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x7447('0x3')](0x0);var events={'afterCreate':_0x7447('0x4'),'afterUpdate':_0x7447('0x5'),'afterDestroy':_0x7447('0x6')};function emitEvent(_0x2c0145){return function(_0x170034,_0x4cb560,_0xd1146c){ChatInternalMessageEvents[_0x7447('0x7')](_0x2c0145+':'+_0x170034['id'],_0x170034);ChatInternalMessageEvents[_0x7447('0x7')](_0x2c0145,_0x170034);_0xd1146c(null);};}for(var e in events){if(events[_0x7447('0x8')](e)){var event=events[e];ChatInternalMessage[_0x7447('0x9')](e,emitEvent(event));}}module[_0x7447('0xa')]=ChatInternalMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js
index 2fe02c7..455770c 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.model.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x29a3=['request-promise','path','rimraf','./chatInternalMessage.attributes','exports','ChatInternalMessage','chat_internal_messages','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment'];(function(_0x1a9b87,_0x4b9987){var _0x3e5a50=function(_0x488ffa){while(--_0x488ffa){_0x1a9b87['push'](_0x1a9b87['shift']());}};_0x3e5a50(++_0x4b9987);}(_0x29a3,0xa3));var _0x329a=function(_0x18c58e,_0x12e86e){_0x18c58e=_0x18c58e-0x0;var _0x5ec2e9=_0x29a3[_0x18c58e];return _0x5ec2e9;};'use strict';var _=require(_0x329a('0x0'));var util=require(_0x329a('0x1'));var logger=require(_0x329a('0x2'))(_0x329a('0x3'));var moment=require(_0x329a('0x4'));var BPromise=require('bluebird');var rp=require(_0x329a('0x5'));var fs=require('fs');var path=require(_0x329a('0x6'));var rimraf=require(_0x329a('0x7'));var config=require('../../config/environment');var attributes=require(_0x329a('0x8'));module[_0x329a('0x9')]=function(_0x146b18,_0x445b99){return _0x146b18['define'](_0x329a('0xa'),attributes,{'tableName':_0x329a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x329a('0xc'),'collate':_0x329a('0xd')});};
\ No newline at end of file
+var _0x2edc=['utf8mb4','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./chatInternalMessage.attributes','exports','define','ChatInternalMessage'];(function(_0x47a7d0,_0x4e182d){var _0xb9bd08=function(_0x588ee2){while(--_0x588ee2){_0x47a7d0['push'](_0x47a7d0['shift']());}};_0xb9bd08(++_0x4e182d);}(_0x2edc,0x83));var _0xc2ed=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2edc[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xc2ed('0x0'));var util=require(_0xc2ed('0x1'));var logger=require(_0xc2ed('0x2'))(_0xc2ed('0x3'));var moment=require(_0xc2ed('0x4'));var BPromise=require(_0xc2ed('0x5'));var rp=require(_0xc2ed('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc2ed('0x7'));var config=require('../../config/environment');var attributes=require(_0xc2ed('0x8'));module[_0xc2ed('0x9')]=function(_0x53ee81,_0x25401b){return _0x53ee81[_0xc2ed('0xa')](_0xc2ed('0xb'),attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xc2ed('0xc'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
index f3a2b5f..8c623f0 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.rpc.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1cc7=['result','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','client','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','request','then','ChatInternalMessage,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info'];(function(_0xbb091,_0x3fe7ee){var _0x467a04=function(_0x3a978d){while(--_0x3a978d){_0xbb091['push'](_0xbb091['shift']());}};_0x467a04(++_0x3fe7ee);}(_0x1cc7,0x15a));var _0x71cc=function(_0x26396e,_0x39b837){_0x26396e=_0x26396e-0x0;var _0x1c237b=_0x1cc7[_0x26396e];return _0x1c237b;};'use strict';var _=require(_0x71cc('0x0'));var util=require(_0x71cc('0x1'));var moment=require(_0x71cc('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x71cc('0x3'))['db'];var utils=require(_0x71cc('0x4'));var logger=require(_0x71cc('0x5'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x71cc('0x6')]['http']({'port':0x232a});config[_0x71cc('0x7')]=_[_0x71cc('0x8')](config[_0x71cc('0x7')],{'host':_0x71cc('0x9'),'port':0x18eb});var socket=require(_0x71cc('0xa'))(new Redis(config['redis']));require(_0x71cc('0xb'))[_0x71cc('0xc')](socket);function respondWithRpcPromise(_0x47759a,_0x5ae8e7,_0x554044){return new BPromise(function(_0x50a7b7,_0x4b7514){return client[_0x71cc('0xd')](_0x47759a,_0x554044)[_0x71cc('0xe')](function(_0x37e34b){logger['info'](_0x71cc('0xf'),_0x5ae8e7,'request\x20sent');logger[_0x71cc('0x10')]('ChatInternalMessage,\x20%s,\x20%s,\x20%s',_0x5ae8e7,_0x71cc('0x11'),JSON['stringify'](_0x37e34b));if(_0x37e34b[_0x71cc('0x12')]){if(_0x37e34b[_0x71cc('0x12')][_0x71cc('0x13')]===0x1f4){logger[_0x71cc('0x12')](_0x71cc('0xf'),_0x5ae8e7,_0x37e34b['error'][_0x71cc('0x14')]);return _0x4b7514(_0x37e34b[_0x71cc('0x12')][_0x71cc('0x14')]);}logger[_0x71cc('0x12')](_0x71cc('0xf'),_0x5ae8e7,_0x37e34b[_0x71cc('0x12')][_0x71cc('0x14')]);return _0x50a7b7(_0x37e34b['error'][_0x71cc('0x14')]);}else{logger[_0x71cc('0x15')](_0x71cc('0xf'),_0x5ae8e7,_0x71cc('0x11'));_0x50a7b7(_0x37e34b[_0x71cc('0x16')][_0x71cc('0x14')]);}})['catch'](function(_0x366690){logger[_0x71cc('0x12')]('ChatInternalMessage,\x20%s,\x20%s',_0x5ae8e7,_0x366690);_0x4b7514(_0x366690);});});}
\ No newline at end of file
+var _0x2657=['jayson/promise','client','http','redis','defaults','socket.io-emitter','request','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x392346,_0x20be0d){var _0x194cad=function(_0x114201){while(--_0x114201){_0x392346['push'](_0x392346['shift']());}};_0x194cad(++_0x20be0d);}(_0x2657,0x103));var _0x7265=function(_0x198e84,_0x369f60){_0x198e84=_0x198e84-0x0;var _0x4e4a19=_0x2657[_0x198e84];return _0x4e4a19;};'use strict';var _=require(_0x7265('0x0'));var util=require(_0x7265('0x1'));var moment=require(_0x7265('0x2'));var BPromise=require(_0x7265('0x3'));var rs=require(_0x7265('0x4'));var fs=require('fs');var Redis=require(_0x7265('0x5'));var db=require(_0x7265('0x6'))['db'];var utils=require(_0x7265('0x7'));var logger=require(_0x7265('0x8'))(_0x7265('0x9'));var config=require(_0x7265('0xa'));var jayson=require(_0x7265('0xb'));var client=jayson[_0x7265('0xc')][_0x7265('0xd')]({'port':0x232a});config[_0x7265('0xe')]=_[_0x7265('0xf')](config[_0x7265('0xe')],{'host':'localhost','port':0x18eb});var socket=require(_0x7265('0x10'))(new Redis(config['redis']));require('./chatInternalMessage.socket')['register'](socket);function respondWithRpcPromise(_0xe63c4b,_0x4f5dc0,_0x3bf3b6){return new BPromise(function(_0x146a3c,_0x767ea1){return client[_0x7265('0x11')](_0xe63c4b,_0x3bf3b6)[_0x7265('0x12')](function(_0x20b253){logger[_0x7265('0x13')](_0x7265('0x14'),_0x4f5dc0,_0x7265('0x15'));logger[_0x7265('0x16')](_0x7265('0x17'),_0x4f5dc0,_0x7265('0x15'),JSON[_0x7265('0x18')](_0x20b253));if(_0x20b253[_0x7265('0x19')]){if(_0x20b253[_0x7265('0x19')][_0x7265('0x1a')]===0x1f4){logger[_0x7265('0x19')](_0x7265('0x14'),_0x4f5dc0,_0x20b253['error']['message']);return _0x767ea1(_0x20b253[_0x7265('0x19')][_0x7265('0x1b')]);}logger[_0x7265('0x19')]('ChatInternalMessage,\x20%s,\x20%s',_0x4f5dc0,_0x20b253['error'][_0x7265('0x1b')]);return _0x146a3c(_0x20b253['error'][_0x7265('0x1b')]);}else{logger['info'](_0x7265('0x14'),_0x4f5dc0,'request\x20sent');_0x146a3c(_0x20b253[_0x7265('0x1c')][_0x7265('0x1b')]);}})[_0x7265('0x1d')](function(_0x2c852b){logger[_0x7265('0x19')](_0x7265('0x14'),_0x4f5dc0,_0x2c852b);_0x767ea1(_0x2c852b);});});}
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js
index e2a5e6e..8c1d6d3 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.socket.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe0ae=['save','remove','emit','removeListener','length','chatInternalMessage:'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0xe0ae,0x174));var _0xee0a=function(_0x43aee5,_0x11268b){_0x43aee5=_0x43aee5-0x0;var _0x76d1d0=_0xe0ae[_0x43aee5];return _0x76d1d0;};'use strict';var ChatInternalMessageEvents=require('./chatInternalMessage.events');var events=[_0xee0a('0x0'),_0xee0a('0x1'),'update'];function createListener(_0x540c67,_0x38c5fb){return function(_0x592b37){_0x38c5fb[_0xee0a('0x2')](_0x540c67,_0x592b37);};}function removeListener(_0x22dbb2,_0x20b2b7){return function(){ChatInternalMessageEvents[_0xee0a('0x3')](_0x22dbb2,_0x20b2b7);};}exports['register']=function(_0x4180aa){for(var _0x402528=0x0,_0x1df3f3=events[_0xee0a('0x4')];_0x402528<_0x1df3f3;_0x402528++){var _0x2e3836=events[_0x402528];var _0x338fb2=createListener(_0xee0a('0x5')+_0x2e3836,_0x4180aa);ChatInternalMessageEvents['on'](_0x2e3836,_0x338fb2);}};
\ No newline at end of file
+var _0x17ef=['length','chatInternalMessage:','./chatInternalMessage.events','save','update','emit','removeListener'];(function(_0x24d56e,_0x390aa9){var _0x2e1318=function(_0x2c09ba){while(--_0x2c09ba){_0x24d56e['push'](_0x24d56e['shift']());}};_0x2e1318(++_0x390aa9);}(_0x17ef,0x1d0));var _0xf17e=function(_0x300433,_0x449f10){_0x300433=_0x300433-0x0;var _0x59699f=_0x17ef[_0x300433];return _0x59699f;};'use strict';var ChatInternalMessageEvents=require(_0xf17e('0x0'));var events=[_0xf17e('0x1'),'remove',_0xf17e('0x2')];function createListener(_0x22b021,_0x5c25d5){return function(_0x4a10ce){_0x5c25d5[_0xf17e('0x3')](_0x22b021,_0x4a10ce);};}function removeListener(_0x34a076,_0x4db343){return function(){ChatInternalMessageEvents[_0xf17e('0x4')](_0x34a076,_0x4db343);};}exports['register']=function(_0x34a97a){for(var _0x1cb107=0x0,_0x3669d4=events[_0xf17e('0x5')];_0x1cb107<_0x3669d4;_0x1cb107++){var _0x8e5655=events[_0x1cb107];var _0x2a760f=createListener(_0xf17e('0x6')+_0x8e5655,_0x34a97a);ChatInternalMessageEvents['on'](_0x8e5655,_0x2a760f);}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js
index 74d0d80..ba935cc 100644
--- a/server/api/chatInternalMessage/index.js
+++ b/server/api/chatInternalMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd7bf=['/describe','describe','getUsers','/:id','show','create','update','delete','destroy','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','isAuthenticated','index','get'];(function(_0x1cb71d,_0x2a1e34){var _0x2ec379=function(_0x2dc9f2){while(--_0x2dc9f2){_0x1cb71d['push'](_0x1cb71d['shift']());}};_0x2ec379(++_0x2a1e34);}(_0xd7bf,0xba));var _0xfd7b=function(_0x3ba97b,_0x1dadac){_0x3ba97b=_0x3ba97b-0x0;var _0x15b712=_0xd7bf[_0x3ba97b];return _0x15b712;};'use strict';var multer=require(_0xfd7b('0x0'));var util=require(_0xfd7b('0x1'));var path=require(_0xfd7b('0x2'));var timeout=require('connect-timeout');var express=require(_0xfd7b('0x3'));var router=express['Router']();var fs_extra=require(_0xfd7b('0x4'));var auth=require(_0xfd7b('0x5'));var interaction=require(_0xfd7b('0x6'));var config=require(_0xfd7b('0x7'));var controller=require(_0xfd7b('0x8'));router['get']('/',auth[_0xfd7b('0x9')](),controller[_0xfd7b('0xa')]);router[_0xfd7b('0xb')](_0xfd7b('0xc'),auth[_0xfd7b('0x9')](),controller[_0xfd7b('0xd')]);router[_0xfd7b('0xb')]('/users',auth[_0xfd7b('0x9')](),controller[_0xfd7b('0xe')]);router[_0xfd7b('0xb')](_0xfd7b('0xf'),auth['isAuthenticated'](),controller[_0xfd7b('0x10')]);router['post']('/',auth[_0xfd7b('0x9')](),controller[_0xfd7b('0x11')]);router['put'](_0xfd7b('0xf'),controller[_0xfd7b('0x12')]);router[_0xfd7b('0x13')](_0xfd7b('0xf'),auth[_0xfd7b('0x9')](),controller[_0xfd7b('0x14')]);module[_0xfd7b('0x15')]=router;
\ No newline at end of file
+var _0xcbb7=['multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','isAuthenticated','index','/describe','describe','get','getUsers','create','put','/:id','update','destroy','exports'];(function(_0x19da85,_0x3d9414){var _0x4bf105=function(_0x45b5a4){while(--_0x45b5a4){_0x19da85['push'](_0x19da85['shift']());}};_0x4bf105(++_0x3d9414);}(_0xcbb7,0x11e));var _0x7cbb=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0xcbb7[_0x432682];return _0x463d05;};'use strict';var multer=require(_0x7cbb('0x0'));var util=require(_0x7cbb('0x1'));var path=require(_0x7cbb('0x2'));var timeout=require(_0x7cbb('0x3'));var express=require(_0x7cbb('0x4'));var router=express[_0x7cbb('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x7cbb('0x6'));var interaction=require(_0x7cbb('0x7'));var config=require(_0x7cbb('0x8'));var controller=require(_0x7cbb('0x9'));router['get']('/',auth[_0x7cbb('0xa')](),controller[_0x7cbb('0xb')]);router['get'](_0x7cbb('0xc'),auth[_0x7cbb('0xa')](),controller[_0x7cbb('0xd')]);router[_0x7cbb('0xe')]('/users',auth[_0x7cbb('0xa')](),controller[_0x7cbb('0xf')]);router[_0x7cbb('0xe')]('/:id',auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x7cbb('0xa')](),controller[_0x7cbb('0x10')]);router[_0x7cbb('0x11')](_0x7cbb('0x12'),controller[_0x7cbb('0x13')]);router['delete'](_0x7cbb('0x12'),auth['isAuthenticated'](),controller[_0x7cbb('0x14')]);module[_0x7cbb('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js
index 8095227..4ae8f2e 100644
--- a/server/api/chatMessage/chatMessage.attributes.js
+++ b/server/api/chatMessage/chatMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9ccd=['TEXT','medium','ENUM','out','DATE','STRING','sequelize'];(function(_0x3ff6c1,_0x1cf211){var _0x4c4d19=function(_0x205718){while(--_0x205718){_0x3ff6c1['push'](_0x3ff6c1['shift']());}};_0x4c4d19(++_0x1cf211);}(_0x9ccd,0x1a3));var _0xd9cc=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9ccd[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require(_0xd9cc('0x0'));module['exports']={'body':{'type':Sequelize[_0xd9cc('0x1')](_0xd9cc('0x2')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xd9cc('0x3')]('in','out'),'defaultValue':_0xd9cc('0x4'),'allowNull':![]},'readAt':{'type':Sequelize[_0xd9cc('0x5')]},'providerName':{'type':Sequelize[_0xd9cc('0x6')]},'providerResponse':{'type':Sequelize[_0xd9cc('0x1')]}};
\ No newline at end of file
+var _0x9a2d=['out','DATE','STRING','TEXT','BOOLEAN','ENUM'];(function(_0xf13ffb,_0xfa33a){var _0x403925=function(_0x132d66){while(--_0x132d66){_0xf13ffb['push'](_0xf13ffb['shift']());}};_0x403925(++_0xfa33a);}(_0x9a2d,0x123));var _0xd9a2=function(_0xfc367,_0xb9daa5){_0xfc367=_0xfc367-0x0;var _0x5224f6=_0x9a2d[_0xfc367];return _0x5224f6;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize[_0xd9a2('0x0')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xd9a2('0x1')],'defaultValue':![]},'secret':{'type':Sequelize[_0xd9a2('0x1')],'defaultValue':![]},'direction':{'type':Sequelize[_0xd9a2('0x2')]('in',_0xd9a2('0x3')),'defaultValue':_0xd9a2('0x3'),'allowNull':![]},'readAt':{'type':Sequelize[_0xd9a2('0x4')]},'providerName':{'type':Sequelize[_0xd9a2('0x5')]},'providerResponse':{'type':Sequelize[_0xd9a2('0x0')]}};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js
index 8724192..fc4d437 100644
--- a/server/api/chatMessage/chatMessage.controller.js
+++ b/server/api/chatMessage/chatMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3789=['crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','socket.io-emitter','register','jayson/promise','client','http','request','info','ChatMessage,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','sendStatus','end','status','json','offset','limit','undefined','count','Content-Range','apply','reject','save','update','then','destroy','stack','name','index','ChatMessage','rawAttributes','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','show','params','find','create','body','describe','chat-interactions','accept','chat','read','format','UserId','user','agent','get','ChatInteraction','ChatInteractionId','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','role','null','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','User','fullname','email','internal','interface','channel','motionChannel','event','EventManager','acceptmessage','parse','formData','RejectMessage','rejectMessage','contact','SIP/%s','rejectmessage','eml-format','rimraf','zip-dir','util','path','sox','ejs','fs-extra','lodash','squel'];(function(_0x1c5202,_0x5bc415){var _0xae684b=function(_0x3b2c80){while(--_0x3b2c80){_0x1c5202['push'](_0x1c5202['shift']());}};_0xae684b(++_0x5bc415);}(_0x3789,0x7a));var _0x9378=function(_0x1b2594,_0x2cc023){_0x1b2594=_0x1b2594-0x0;var _0x3c2509=_0x3789[_0x1b2594];return _0x3c2509;};'use strict';var emlformat=require(_0x9378('0x0'));var rimraf=require(_0x9378('0x1'));var zipdir=require(_0x9378('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x9378('0x3'));var path=require(_0x9378('0x4'));var sox=require(_0x9378('0x5'));var csv=require('to-csv');var ejs=require(_0x9378('0x6'));var fs=require('fs');var fs_extra=require(_0x9378('0x7'));var _=require(_0x9378('0x8'));var squel=require(_0x9378('0x9'));var crypto=require(_0x9378('0xa'));var jsforce=require(_0x9378('0xb'));var deskjs=require(_0x9378('0xc'));var toCsv=require(_0x9378('0xd'));var querystring=require(_0x9378('0xe'));var Papa=require(_0x9378('0xf'));var Redis=require(_0x9378('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x9378('0x11'));var as=require(_0x9378('0x12'));var hardwareService=require(_0x9378('0x13'));var logger=require(_0x9378('0x14'))(_0x9378('0x15'));var utils=require(_0x9378('0x16'));var config=require(_0x9378('0x17'));var licenseUtil=require(_0x9378('0x18'));var db=require('../../mysqldb')['db'];config[_0x9378('0x19')]=_[_0x9378('0x1a')](config[_0x9378('0x19')],{'host':'localhost','port':0x18eb});var socket=require(_0x9378('0x1b'))(new Redis(config[_0x9378('0x19')]));require('./chatMessage.socket')[_0x9378('0x1c')](socket);var jayson=require(_0x9378('0x1d'));var client=jayson[_0x9378('0x1e')][_0x9378('0x1f')]({'port':0x232c});var client9002=jayson['client'][_0x9378('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x2d6af4,_0x39f451,_0x484deb,_0x1d24ff){return new BPromise(function(_0x289b1f,_0x51a8ca){var _0x2c42f0=_0x1d24ff||client;return _0x2c42f0[_0x9378('0x20')](_0x2d6af4,_0x484deb)['then'](function(_0x2f2931){logger[_0x9378('0x21')](_0x9378('0x22'),_0x39f451,'request\x20sent');logger['debug']('ChatMessage,\x20%s,\x20%s,\x20%s',_0x39f451,_0x9378('0x23'),JSON[_0x9378('0x24')](_0x2f2931));if(_0x2f2931[_0x9378('0x25')]){if(_0x2f2931[_0x9378('0x25')]['code']===0x1f4){logger[_0x9378('0x25')](_0x9378('0x22'),_0x39f451,_0x2f2931[_0x9378('0x25')][_0x9378('0x26')]);return _0x51a8ca(_0x2f2931['error'][_0x9378('0x26')]);}logger[_0x9378('0x25')]('ChatMessage,\x20%s,\x20%s',_0x39f451,_0x2f2931[_0x9378('0x25')]['message']);return _0x289b1f(_0x2f2931[_0x9378('0x25')][_0x9378('0x26')]);}else{logger['info'](_0x9378('0x22'),_0x39f451,'request\x20sent');_0x289b1f(_0x2f2931[_0x9378('0x27')]['message']);}})[_0x9378('0x28')](function(_0x3221ba){logger[_0x9378('0x25')](_0x9378('0x22'),_0x39f451,_0x3221ba);_0x51a8ca(_0x3221ba);});});}function respondWithStatusCode(_0x3fafdd,_0x1c1bcb){_0x1c1bcb=_0x1c1bcb||0xcc;return function(_0x35288b){if(_0x35288b){return _0x3fafdd[_0x9378('0x29')](_0x1c1bcb);}return _0x3fafdd['status'](_0x1c1bcb)[_0x9378('0x2a')]();};}function respondWithResult(_0x393e8b,_0x34e037){_0x34e037=_0x34e037||0xc8;return function(_0x139380){if(_0x139380){return _0x393e8b[_0x9378('0x2b')](_0x34e037)[_0x9378('0x2c')](_0x139380);}};}function respondWithFilteredResult(_0xdbec54,_0x40dec1){return function(_0x3731c1){if(_0x3731c1){var _0x540559=typeof _0x40dec1[_0x9378('0x2d')]==='undefined'&&typeof _0x40dec1[_0x9378('0x2e')]===_0x9378('0x2f');var _0x173841=_0x3731c1[_0x9378('0x30')];var _0xfbe322=_0x540559?0x0:_0x40dec1[_0x9378('0x2d')];var _0x1eb513=_0x540559?_0x3731c1[_0x9378('0x30')]:_0x40dec1[_0x9378('0x2d')]+_0x40dec1[_0x9378('0x2e')];var _0x5bc112;if(_0x1eb513>=_0x173841){_0x1eb513=_0x173841;_0x5bc112=0xc8;}else{_0x5bc112=0xce;}_0xdbec54[_0x9378('0x2b')](_0x5bc112);return _0xdbec54['set'](_0x9378('0x31'),_0xfbe322+'-'+_0x1eb513+'/'+_0x173841)[_0x9378('0x2c')](_0x3731c1);}return null;};}function patchUpdates(_0x20e056){return function(_0x28f6cc){try{jsonpatch[_0x9378('0x32')](_0x28f6cc,_0x20e056,!![]);}catch(_0x3c6e49){return BPromise[_0x9378('0x33')](_0x3c6e49);}return _0x28f6cc[_0x9378('0x34')]();};}function saveUpdates(_0x4181cd,_0x152848){return function(_0x40f551){if(_0x40f551){return _0x40f551[_0x9378('0x35')](_0x4181cd)[_0x9378('0x36')](function(_0x52da8a){return _0x52da8a;});}return null;};}function removeEntity(_0x5c933b,_0x42a0c7){return function(_0x48e0c4){if(_0x48e0c4){return _0x48e0c4[_0x9378('0x37')]()[_0x9378('0x36')](function(){_0x5c933b[_0x9378('0x2b')](0xcc)[_0x9378('0x2a')]();});}};}function handleEntityNotFound(_0x1920bf,_0x4f7b56){return function(_0x581487){if(!_0x581487){_0x1920bf[_0x9378('0x29')](0x194);}return _0x581487;};}function handleError(_0x20f688,_0xa0ad27){_0xa0ad27=_0xa0ad27||0x1f4;return function(_0x16d6af){logger[_0x9378('0x25')](_0x16d6af[_0x9378('0x38')]);if(_0x16d6af[_0x9378('0x39')]){delete _0x16d6af['name'];}_0x20f688['status'](_0xa0ad27)['send'](_0x16d6af);};}exports[_0x9378('0x3a')]=function(_0xd4f63,_0x1d3771){var _0x1ec6ff={},_0xcb4d2f={},_0x5c8946={'count':0x0,'rows':[]};var _0x5badf7=_['map'](db[_0x9378('0x3b')][_0x9378('0x3c')],function(_0x3e17d3){return{'name':_0x3e17d3['fieldName'],'type':_0x3e17d3['type'][_0x9378('0x3d')]};});_0xcb4d2f[_0x9378('0x3e')]=_[_0x9378('0x3f')](_0x5badf7,_0x9378('0x39'));_0xcb4d2f[_0x9378('0x40')]=_[_0x9378('0x41')](_0xd4f63[_0x9378('0x40')]);_0xcb4d2f[_0x9378('0x42')]=_[_0x9378('0x43')](_0xcb4d2f['model'],_0xcb4d2f[_0x9378('0x40')]);_0x1ec6ff[_0x9378('0x44')]=_[_0x9378('0x43')](_0xcb4d2f[_0x9378('0x3e')],qs[_0x9378('0x45')](_0xd4f63['query'][_0x9378('0x45')]));_0x1ec6ff['attributes']=_0x1ec6ff[_0x9378('0x44')][_0x9378('0x46')]?_0x1ec6ff[_0x9378('0x44')]:_0xcb4d2f['model'];if(!_0xd4f63[_0x9378('0x40')][_0x9378('0x47')](_0x9378('0x48'))){_0x1ec6ff[_0x9378('0x2e')]=qs[_0x9378('0x2e')](_0xd4f63[_0x9378('0x40')][_0x9378('0x2e')]);_0x1ec6ff[_0x9378('0x2d')]=qs[_0x9378('0x2d')](_0xd4f63[_0x9378('0x40')][_0x9378('0x2d')]);}_0x1ec6ff[_0x9378('0x49')]=qs[_0x9378('0x4a')](_0xd4f63[_0x9378('0x40')][_0x9378('0x4a')]);_0x1ec6ff[_0x9378('0x4b')]=qs['filters'](_[_0x9378('0x4c')](_0xd4f63[_0x9378('0x40')],_0xcb4d2f[_0x9378('0x42')]),_0x5badf7);if(_0xd4f63[_0x9378('0x40')][_0x9378('0x4d')]){_0x1ec6ff[_0x9378('0x4b')]=_[_0x9378('0x4e')](_0x1ec6ff[_0x9378('0x4b')],{'$or':_[_0x9378('0x3f')](_0x5badf7,function(_0x496b87){if(_0x496b87[_0x9378('0x4f')]!==_0x9378('0x50')){var _0x2f7940={};_0x2f7940[_0x496b87['name']]={'$like':'%'+_0xd4f63[_0x9378('0x40')][_0x9378('0x4d')]+'%'};return _0x2f7940;}})});}_0x1ec6ff=_[_0x9378('0x4e')]({},_0x1ec6ff,_0xd4f63[_0x9378('0x51')]);var _0x109e30={'where':_0x1ec6ff[_0x9378('0x4b')]};return db[_0x9378('0x3b')][_0x9378('0x30')](_0x109e30)[_0x9378('0x36')](function(_0x295515){_0x5c8946[_0x9378('0x30')]=_0x295515;if(_0xd4f63[_0x9378('0x40')][_0x9378('0x52')]){_0x1ec6ff[_0x9378('0x53')]=[{'all':!![]}];}return db[_0x9378('0x3b')][_0x9378('0x54')](_0x1ec6ff);})[_0x9378('0x36')](function(_0x4219d0){_0x5c8946[_0x9378('0x55')]=_0x4219d0;return _0x5c8946;})[_0x9378('0x36')](respondWithFilteredResult(_0x1d3771,_0x1ec6ff))['catch'](handleError(_0x1d3771,null));};exports[_0x9378('0x56')]=function(_0xc14be8,_0x3f48a3){var _0x28150d={'raw':!![],'where':{'id':_0xc14be8[_0x9378('0x57')]['id']}},_0x413898={};_0x413898['model']=_[_0x9378('0x41')](db['ChatMessage'][_0x9378('0x3c')]);_0x413898['query']=_[_0x9378('0x41')](_0xc14be8[_0x9378('0x40')]);_0x413898[_0x9378('0x42')]=_[_0x9378('0x43')](_0x413898['model'],_0x413898['query']);_0x28150d['attributes']=_['intersection'](_0x413898[_0x9378('0x3e')],qs[_0x9378('0x45')](_0xc14be8['query']['fields']));_0x28150d[_0x9378('0x44')]=_0x28150d[_0x9378('0x44')][_0x9378('0x46')]?_0x28150d[_0x9378('0x44')]:_0x413898[_0x9378('0x3e')];if(_0xc14be8[_0x9378('0x40')][_0x9378('0x52')]){_0x28150d[_0x9378('0x53')]=[{'all':!![]}];}_0x28150d=_['merge']({},_0x28150d,_0xc14be8[_0x9378('0x51')]);return db[_0x9378('0x3b')][_0x9378('0x58')](_0x28150d)[_0x9378('0x36')](handleEntityNotFound(_0x3f48a3,null))[_0x9378('0x36')](respondWithResult(_0x3f48a3,null))[_0x9378('0x28')](handleError(_0x3f48a3,null));};exports['create']=function(_0x36c436,_0x33ff1f){return db[_0x9378('0x3b')][_0x9378('0x59')](_0x36c436[_0x9378('0x5a')],{})[_0x9378('0x36')](respondWithResult(_0x33ff1f,0xc9))[_0x9378('0x28')](handleError(_0x33ff1f,null));};exports[_0x9378('0x35')]=function(_0x593a09,_0x3b31c3){if(_0x593a09[_0x9378('0x5a')]['id']){delete _0x593a09[_0x9378('0x5a')]['id'];}return db['ChatMessage'][_0x9378('0x58')]({'where':{'id':_0x593a09['params']['id']}})[_0x9378('0x36')](handleEntityNotFound(_0x3b31c3,null))[_0x9378('0x36')](saveUpdates(_0x593a09[_0x9378('0x5a')],null))['then'](respondWithResult(_0x3b31c3,null))[_0x9378('0x28')](handleError(_0x3b31c3,null));};exports[_0x9378('0x37')]=function(_0x4d7464,_0x4b6bd3){return db[_0x9378('0x3b')]['find']({'where':{'id':_0x4d7464[_0x9378('0x57')]['id']}})[_0x9378('0x36')](handleEntityNotFound(_0x4b6bd3,null))['then'](removeEntity(_0x4b6bd3,null))[_0x9378('0x28')](handleError(_0x4b6bd3,null));};exports['describe']=function(_0x31c578,_0x3835ad){return db[_0x9378('0x3b')][_0x9378('0x5b')]()[_0x9378('0x36')](respondWithResult(_0x3835ad,null))[_0x9378('0x28')](handleError(_0x3835ad,null));};var interaction_log=require(_0x9378('0x14'))(_0x9378('0x5c'));exports[_0x9378('0x5d')]=function(_0x773679,_0x5e8130,_0x31c61f){var _0x20563f={'agent':{},'channel':_0x9378('0x5e')};if(_0x773679[_0x9378('0x5a')]['id']){delete _0x773679['body']['id'];}_0x773679['body'][_0x9378('0x5f')]=!![];_0x773679['body']['readAt']=moment()[_0x9378('0x60')]('YYYY-MM-DD\x20HH:mm:ss');_0x773679['body']['UserId']=_0x773679[_0x9378('0x5a')][_0x9378('0x61')]||_0x773679[_0x9378('0x62')]['id'];_0x20563f[_0x9378('0x63')]['id']=_0x773679[_0x9378('0x5a')][_0x9378('0x61')];return db[_0x9378('0x3b')]['find']({'where':{'id':_0x773679[_0x9378('0x57')]['id'],'UserId':null}})[_0x9378('0x36')](handleEntityNotFound(_0x5e8130,null))['then'](saveUpdates(_0x773679[_0x9378('0x5a')],null))[_0x9378('0x36')](function(_0x201a70){if(_0x201a70){_0x20563f['message']=_0x201a70[_0x9378('0x64')]({'plain':!![]});return db[_0x9378('0x65')][_0x9378('0x58')]({'where':{'id':_0x201a70[_0x9378('0x66')]}});}return null;})[_0x9378('0x36')](handleEntityNotFound(_0x5e8130,null))[_0x9378('0x36')](function(_0x46f4cd){if(_0x46f4cd){return _0x46f4cd[_0x9378('0x35')]({'UserId':_0x773679[_0x9378('0x5a')][_0x9378('0x61')],'read1stAt':_['isNil'](_0x46f4cd[_0x9378('0x67')])?moment()[_0x9378('0x60')](_0x9378('0x68')):undefined});}return null;})[_0x9378('0x36')](function(_0x470adc){if(_0x470adc){_0x20563f[_0x9378('0x69')]=_0x470adc['get']({'plain':!![]});interaction_log[_0x9378('0x21')]('[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x773679['user']['id'],_0x773679[_0x9378('0x62')][_0x9378('0x39')],_0x773679[_0x9378('0x62')][_0x9378('0x6a')],_0x20563f[_0x9378('0x69')]['id'],_0x773679[_0x9378('0x5a')]?JSON[_0x9378('0x24')](_0x773679[_0x9378('0x5a')]):_0x9378('0x6b'));return respondWithRpcPromise('AcceptMessage',_0x9378('0x6c'),_0x20563f);}return null;})[_0x9378('0x36')](function(_0x36e5f4){var _0x41be97=_0x9378('0x6d')+_0x36e5f4['message'][_0x9378('0x6e')];return db[_0x9378('0x6f')][_0x9378('0x40')](_0x41be97,{'type':db[_0x9378('0x70')][_0x9378('0x71')][_0x9378('0x72')],'raw':!![]})[_0x9378('0x36')](function(_0x27d20a){return _0x27d20a;});})[_0x9378('0x36')](function(_0x1222e0){if(_0x1222e0){_0x20563f[_0x9378('0x26')]['contact']=_0x1222e0[0x0];if(!_0x773679[_0x9378('0x5a')][_0x9378('0x61')])return;return db[_0x9378('0x73')][_0x9378('0x58')]({'where':{'id':_0x773679[_0x9378('0x5a')]['UserId'],'role':_0x9378('0x63')},'attributes':['id',_0x9378('0x39'),_0x9378('0x74'),_0x9378('0x75'),_0x9378('0x76')],'raw':!![]});}return null;})[_0x9378('0x36')](function(_0x5e3289){if(!_0x5e3289)return null;_0x20563f['message'][_0x9378('0x63')]=_0x5e3289;return _0x20563f;})[_0x9378('0x36')](function(_0x250921){if(_0x250921){if(_0x773679[_0x9378('0x5a')]['manual']){_0x20563f[_0x9378('0x26')][_0x9378('0x77')]=util['format']('SIP/%s',_0x773679[_0x9378('0x62')]['name']);_0x20563f[_0x9378('0x26')][_0x9378('0x78')]=_0x20563f['channel'];_0x20563f[_0x9378('0x26')][_0x9378('0x79')]=_0x20563f[_0x9378('0x78')];_0x20563f['message'][_0x9378('0x7a')]='accept';return respondWithRpcPromise(_0x9378('0x7b'),_0x9378('0x7b'),{'event':_0x9378('0x7c'),'message':_['merge'](_0x20563f[_0x9378('0x26')],JSON[_0x9378('0x7d')](_0x20563f[_0x9378('0x69')][_0x9378('0x7e')]))},client9002)['then'](function(){return _0x20563f;});}return _0x20563f;}return null;})[_0x9378('0x36')](respondWithResult(_0x5e8130,null))[_0x9378('0x28')](handleError(_0x5e8130,null));};var interaction_log=require(_0x9378('0x14'))(_0x9378('0x5c'));exports[_0x9378('0x33')]=function(_0x53b851,_0x52712b,_0x2b0904){var _0x22c93c={'agent':{},'channel':_0x9378('0x5e')};if(_0x53b851[_0x9378('0x5a')]['id']){delete _0x53b851['body']['id'];}_0x53b851[_0x9378('0x5a')][_0x9378('0x61')]=_0x53b851[_0x9378('0x5a')][_0x9378('0x61')]||_0x53b851['user']['id'];_0x22c93c[_0x9378('0x63')]['id']=_0x53b851[_0x9378('0x5a')][_0x9378('0x61')];return db[_0x9378('0x3b')][_0x9378('0x58')]({'where':{'id':_0x53b851[_0x9378('0x57')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x52712b,null))[_0x9378('0x36')](function(_0x1952d4){if(_0x1952d4){_0x22c93c[_0x9378('0x26')]=_0x1952d4[_0x9378('0x64')]({'plain':!![]});return db[_0x9378('0x65')][_0x9378('0x58')]({'where':{'id':_0x1952d4['ChatInteractionId']}});}return null;})[_0x9378('0x36')](handleEntityNotFound(_0x52712b,null))[_0x9378('0x36')](function(_0x1d842c){if(_0x1d842c){_0x22c93c[_0x9378('0x69')]=_0x1d842c[_0x9378('0x64')]({'plain':!![]});interaction_log['info']('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x53b851[_0x9378('0x62')]['id'],_0x53b851['user'][_0x9378('0x39')],_0x53b851[_0x9378('0x62')][_0x9378('0x6a')],_0x22c93c['interaction']['id'],_0x53b851[_0x9378('0x5a')]?JSON[_0x9378('0x24')](_0x53b851[_0x9378('0x5a')]):_0x9378('0x6b'));return respondWithRpcPromise(_0x9378('0x7f'),_0x9378('0x80'),_0x22c93c);}return null;})[_0x9378('0x36')](function(_0x1e545f){var _0x5d37b1=_0x9378('0x6d')+_0x1e545f[_0x9378('0x26')]['ContactId'];return db['sequelize']['query'](_0x5d37b1,{'type':db[_0x9378('0x70')][_0x9378('0x71')][_0x9378('0x72')],'raw':!![]})[_0x9378('0x36')](function(_0x3b9f2e){return _0x3b9f2e;});})[_0x9378('0x36')](function(_0x404dd8){if(_0x404dd8){_0x22c93c['message'][_0x9378('0x81')]=_0x404dd8[0x0];if(!_0x53b851[_0x9378('0x5a')][_0x9378('0x61')])return;return db['User'][_0x9378('0x58')]({'where':{'id':_0x53b851[_0x9378('0x5a')][_0x9378('0x61')],'role':_0x9378('0x63')},'attributes':['id',_0x9378('0x39'),_0x9378('0x74'),'email',_0x9378('0x76')],'raw':!![]});}return null;})[_0x9378('0x36')](function(_0x315997){if(!_0x315997)return null;_0x22c93c[_0x9378('0x26')][_0x9378('0x63')]=_0x315997;return _0x22c93c;})[_0x9378('0x36')](function(_0x64a2bf){if(_0x64a2bf){_0x64a2bf['message'][_0x9378('0x77')]=util[_0x9378('0x60')](_0x9378('0x82'),_0x53b851[_0x9378('0x62')]['name']);_0x64a2bf[_0x9378('0x26')]['channel']=_0x22c93c[_0x9378('0x78')];_0x64a2bf['message'][_0x9378('0x79')]=_0x22c93c['channel'];_0x64a2bf[_0x9378('0x26')][_0x9378('0x7a')]=_0x9378('0x33');respondWithRpcPromise(_0x9378('0x7b'),'EventManager',{'event':_0x9378('0x83'),'message':_[_0x9378('0x4e')](_0x22c93c[_0x9378('0x26')],JSON[_0x9378('0x7d')](_0x22c93c['interaction'][_0x9378('0x7e')]))},client9002);return _0x22c93c;}return null;})[_0x9378('0x36')](respondWithResult(_0x52712b,null))[_0x9378('0x28')](handleError(_0x52712b,null));};
\ No newline at end of file
+var _0x9674=['set','apply','save','update','end','name','send','index','ChatMessage','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','nolimit','order','sort','where','filter','merge','map','VIRTUAL','options','count','includeAll','include','rows','show','params','keys','find','create','body','destroy','describe','chat-interactions','accept','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','user','agent','UserId','get','ChatInteraction','ChatInteractionId','isNil','read1stAt','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','AcceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','User','fullname','internal','manual','interface','motionChannel','channel','event','EventManager','acceptmessage','parse','../../config/logger','chat','interaction','null','RejectMessage','rejectMessage','SELECT','contact','email','SIP/%s','reject','rejectmessage','formData','eml-format','rimraf','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','jayson/promise','http','client','request','then','info','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatMessage,\x20%s,\x20%s','message','catch','sendStatus','json','offset','limit','status'];(function(_0x44a518,_0x413a2d){var _0x4a3cdf=function(_0x268625){while(--_0x268625){_0x44a518['push'](_0x44a518['shift']());}};_0x4a3cdf(++_0x413a2d);}(_0x9674,0xde));var _0x4967=function(_0x41bbd7,_0x3041f8){_0x41bbd7=_0x41bbd7-0x0;var _0x116b13=_0x9674[_0x41bbd7];return _0x116b13;};'use strict';var emlformat=require(_0x4967('0x0'));var rimraf=require(_0x4967('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4967('0x2'));var rp=require(_0x4967('0x3'));var moment=require(_0x4967('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x4967('0x5'));var path=require(_0x4967('0x6'));var sox=require(_0x4967('0x7'));var csv=require(_0x4967('0x8'));var ejs=require(_0x4967('0x9'));var fs=require('fs');var fs_extra=require(_0x4967('0xa'));var _=require(_0x4967('0xb'));var squel=require(_0x4967('0xc'));var crypto=require(_0x4967('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x4967('0x8'));var querystring=require(_0x4967('0xe'));var Papa=require(_0x4967('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x4967('0x10'));var as=require(_0x4967('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x4967('0x12'));var utils=require(_0x4967('0x13'));var config=require(_0x4967('0x14'));var licenseUtil=require(_0x4967('0x15'));var db=require(_0x4967('0x16'))['db'];config[_0x4967('0x17')]=_[_0x4967('0x18')](config['redis'],{'host':_0x4967('0x19'),'port':0x18eb});var socket=require(_0x4967('0x1a'))(new Redis(config[_0x4967('0x17')]));require(_0x4967('0x1b'))['register'](socket);var jayson=require(_0x4967('0x1c'));var client=jayson['client'][_0x4967('0x1d')]({'port':0x232c});var client9002=jayson[_0x4967('0x1e')]['http']({'port':0x232a});function respondWithRpcPromise(_0x35d96d,_0x2f8831,_0x3fc540,_0x1fad16){return new BPromise(function(_0x1a5a1c,_0x6fd354){var _0x5a3966=_0x1fad16||client;return _0x5a3966[_0x4967('0x1f')](_0x35d96d,_0x3fc540)[_0x4967('0x20')](function(_0x3d1460){logger[_0x4967('0x21')]('ChatMessage,\x20%s,\x20%s',_0x2f8831,_0x4967('0x22'));logger[_0x4967('0x23')](_0x4967('0x24'),_0x2f8831,_0x4967('0x22'),JSON[_0x4967('0x25')](_0x3d1460));if(_0x3d1460[_0x4967('0x26')]){if(_0x3d1460[_0x4967('0x26')][_0x4967('0x27')]===0x1f4){logger[_0x4967('0x26')](_0x4967('0x28'),_0x2f8831,_0x3d1460[_0x4967('0x26')][_0x4967('0x29')]);return _0x6fd354(_0x3d1460[_0x4967('0x26')][_0x4967('0x29')]);}logger[_0x4967('0x26')]('ChatMessage,\x20%s,\x20%s',_0x2f8831,_0x3d1460[_0x4967('0x26')][_0x4967('0x29')]);return _0x1a5a1c(_0x3d1460['error'][_0x4967('0x29')]);}else{logger['info']('ChatMessage,\x20%s,\x20%s',_0x2f8831,_0x4967('0x22'));_0x1a5a1c(_0x3d1460['result'][_0x4967('0x29')]);}})[_0x4967('0x2a')](function(_0x586bc2){logger[_0x4967('0x26')]('ChatMessage,\x20%s,\x20%s',_0x2f8831,_0x586bc2);_0x6fd354(_0x586bc2);});});}function respondWithStatusCode(_0xccc50c,_0x23610f){_0x23610f=_0x23610f||0xcc;return function(_0x33ad0b){if(_0x33ad0b){return _0xccc50c[_0x4967('0x2b')](_0x23610f);}return _0xccc50c['status'](_0x23610f)['end']();};}function respondWithResult(_0xa07ea7,_0x2b8b46){_0x2b8b46=_0x2b8b46||0xc8;return function(_0x2caf1d){if(_0x2caf1d){return _0xa07ea7['status'](_0x2b8b46)[_0x4967('0x2c')](_0x2caf1d);}};}function respondWithFilteredResult(_0x5d9e1d,_0x5e817b){return function(_0x29503d){if(_0x29503d){var _0x5711e2=typeof _0x5e817b[_0x4967('0x2d')]==='undefined'&&typeof _0x5e817b['limit']==='undefined';var _0x369311=_0x29503d['count'];var _0x590b92=_0x5711e2?0x0:_0x5e817b[_0x4967('0x2d')];var _0x10e084=_0x5711e2?_0x29503d['count']:_0x5e817b[_0x4967('0x2d')]+_0x5e817b[_0x4967('0x2e')];var _0x4d7fa8;if(_0x10e084>=_0x369311){_0x10e084=_0x369311;_0x4d7fa8=0xc8;}else{_0x4d7fa8=0xce;}_0x5d9e1d[_0x4967('0x2f')](_0x4d7fa8);return _0x5d9e1d[_0x4967('0x30')]('Content-Range',_0x590b92+'-'+_0x10e084+'/'+_0x369311)[_0x4967('0x2c')](_0x29503d);}return null;};}function patchUpdates(_0x22d71d){return function(_0x31600c){try{jsonpatch[_0x4967('0x31')](_0x31600c,_0x22d71d,!![]);}catch(_0x351bc3){return BPromise['reject'](_0x351bc3);}return _0x31600c[_0x4967('0x32')]();};}function saveUpdates(_0x6fa9be,_0xc4b792){return function(_0xb5df7){if(_0xb5df7){return _0xb5df7[_0x4967('0x33')](_0x6fa9be)[_0x4967('0x20')](function(_0xff9887){return _0xff9887;});}return null;};}function removeEntity(_0xa192bc,_0x5e9ec9){return function(_0xda9b0a){if(_0xda9b0a){return _0xda9b0a['destroy']()[_0x4967('0x20')](function(){_0xa192bc[_0x4967('0x2f')](0xcc)[_0x4967('0x34')]();});}};}function handleEntityNotFound(_0x6e06f,_0xa61e73){return function(_0x5df43c){if(!_0x5df43c){_0x6e06f['sendStatus'](0x194);}return _0x5df43c;};}function handleError(_0x13c507,_0x1b114a){_0x1b114a=_0x1b114a||0x1f4;return function(_0x37af17){logger[_0x4967('0x26')](_0x37af17['stack']);if(_0x37af17[_0x4967('0x35')]){delete _0x37af17[_0x4967('0x35')];}_0x13c507[_0x4967('0x2f')](_0x1b114a)[_0x4967('0x36')](_0x37af17);};}exports[_0x4967('0x37')]=function(_0x5ab5a8,_0x53baa3){var _0x327111={},_0x1543f6={},_0x2cd652={'count':0x0,'rows':[]};var _0x1da636=_['map'](db[_0x4967('0x38')][_0x4967('0x39')],function(_0x5be442){return{'name':_0x5be442[_0x4967('0x3a')],'type':_0x5be442[_0x4967('0x3b')][_0x4967('0x3c')]};});_0x1543f6[_0x4967('0x3d')]=_['map'](_0x1da636,_0x4967('0x35'));_0x1543f6[_0x4967('0x3e')]=_['keys'](_0x5ab5a8[_0x4967('0x3e')]);_0x1543f6[_0x4967('0x3f')]=_[_0x4967('0x40')](_0x1543f6['model'],_0x1543f6[_0x4967('0x3e')]);_0x327111['attributes']=_['intersection'](_0x1543f6[_0x4967('0x3d')],qs[_0x4967('0x41')](_0x5ab5a8[_0x4967('0x3e')][_0x4967('0x41')]));_0x327111[_0x4967('0x42')]=_0x327111[_0x4967('0x42')][_0x4967('0x43')]?_0x327111['attributes']:_0x1543f6['model'];if(!_0x5ab5a8[_0x4967('0x3e')]['hasOwnProperty'](_0x4967('0x44'))){_0x327111[_0x4967('0x2e')]=qs[_0x4967('0x2e')](_0x5ab5a8[_0x4967('0x3e')][_0x4967('0x2e')]);_0x327111[_0x4967('0x2d')]=qs[_0x4967('0x2d')](_0x5ab5a8[_0x4967('0x3e')][_0x4967('0x2d')]);}_0x327111[_0x4967('0x45')]=qs[_0x4967('0x46')](_0x5ab5a8[_0x4967('0x3e')]['sort']);_0x327111[_0x4967('0x47')]=qs[_0x4967('0x3f')](_['pick'](_0x5ab5a8[_0x4967('0x3e')],_0x1543f6[_0x4967('0x3f')]),_0x1da636);if(_0x5ab5a8['query'][_0x4967('0x48')]){_0x327111[_0x4967('0x47')]=_[_0x4967('0x49')](_0x327111[_0x4967('0x47')],{'$or':_[_0x4967('0x4a')](_0x1da636,function(_0x2c962f){if(_0x2c962f[_0x4967('0x3b')]!==_0x4967('0x4b')){var _0x22979f={};_0x22979f[_0x2c962f[_0x4967('0x35')]]={'$like':'%'+_0x5ab5a8[_0x4967('0x3e')]['filter']+'%'};return _0x22979f;}})});}_0x327111=_[_0x4967('0x49')]({},_0x327111,_0x5ab5a8[_0x4967('0x4c')]);var _0x18e706={'where':_0x327111[_0x4967('0x47')]};return db['ChatMessage'][_0x4967('0x4d')](_0x18e706)[_0x4967('0x20')](function(_0x55c761){_0x2cd652[_0x4967('0x4d')]=_0x55c761;if(_0x5ab5a8[_0x4967('0x3e')][_0x4967('0x4e')]){_0x327111[_0x4967('0x4f')]=[{'all':!![]}];}return db[_0x4967('0x38')]['findAll'](_0x327111);})['then'](function(_0x2c925c){_0x2cd652[_0x4967('0x50')]=_0x2c925c;return _0x2cd652;})['then'](respondWithFilteredResult(_0x53baa3,_0x327111))[_0x4967('0x2a')](handleError(_0x53baa3,null));};exports[_0x4967('0x51')]=function(_0x13ce4e,_0x589a9e){var _0x2d1498={'raw':!![],'where':{'id':_0x13ce4e[_0x4967('0x52')]['id']}},_0x1a3ec9={};_0x1a3ec9[_0x4967('0x3d')]=_[_0x4967('0x53')](db['ChatMessage'][_0x4967('0x39')]);_0x1a3ec9[_0x4967('0x3e')]=_[_0x4967('0x53')](_0x13ce4e[_0x4967('0x3e')]);_0x1a3ec9['filters']=_[_0x4967('0x40')](_0x1a3ec9[_0x4967('0x3d')],_0x1a3ec9[_0x4967('0x3e')]);_0x2d1498[_0x4967('0x42')]=_[_0x4967('0x40')](_0x1a3ec9[_0x4967('0x3d')],qs[_0x4967('0x41')](_0x13ce4e['query'][_0x4967('0x41')]));_0x2d1498[_0x4967('0x42')]=_0x2d1498[_0x4967('0x42')][_0x4967('0x43')]?_0x2d1498['attributes']:_0x1a3ec9[_0x4967('0x3d')];if(_0x13ce4e[_0x4967('0x3e')][_0x4967('0x4e')]){_0x2d1498[_0x4967('0x4f')]=[{'all':!![]}];}_0x2d1498=_[_0x4967('0x49')]({},_0x2d1498,_0x13ce4e[_0x4967('0x4c')]);return db[_0x4967('0x38')][_0x4967('0x54')](_0x2d1498)['then'](handleEntityNotFound(_0x589a9e,null))[_0x4967('0x20')](respondWithResult(_0x589a9e,null))[_0x4967('0x2a')](handleError(_0x589a9e,null));};exports[_0x4967('0x55')]=function(_0x1b86fe,_0x224dec){return db['ChatMessage']['create'](_0x1b86fe[_0x4967('0x56')],{})[_0x4967('0x20')](respondWithResult(_0x224dec,0xc9))[_0x4967('0x2a')](handleError(_0x224dec,null));};exports['update']=function(_0x19298c,_0x2df84f){if(_0x19298c[_0x4967('0x56')]['id']){delete _0x19298c['body']['id'];}return db['ChatMessage'][_0x4967('0x54')]({'where':{'id':_0x19298c[_0x4967('0x52')]['id']}})['then'](handleEntityNotFound(_0x2df84f,null))[_0x4967('0x20')](saveUpdates(_0x19298c[_0x4967('0x56')],null))['then'](respondWithResult(_0x2df84f,null))[_0x4967('0x2a')](handleError(_0x2df84f,null));};exports[_0x4967('0x57')]=function(_0x560309,_0x3b7176){return db['ChatMessage'][_0x4967('0x54')]({'where':{'id':_0x560309[_0x4967('0x52')]['id']}})[_0x4967('0x20')](handleEntityNotFound(_0x3b7176,null))[_0x4967('0x20')](removeEntity(_0x3b7176,null))['catch'](handleError(_0x3b7176,null));};exports[_0x4967('0x58')]=function(_0x55e1e8,_0x2a7c63){return db['ChatMessage'][_0x4967('0x58')]()[_0x4967('0x20')](respondWithResult(_0x2a7c63,null))[_0x4967('0x2a')](handleError(_0x2a7c63,null));};var interaction_log=require('../../config/logger')(_0x4967('0x59'));exports[_0x4967('0x5a')]=function(_0x4563a4,_0x56fb37,_0x328648){var _0x519b3a={'agent':{},'channel':'chat'};if(_0x4563a4[_0x4967('0x56')]['id']){delete _0x4563a4[_0x4967('0x56')]['id'];}_0x4563a4[_0x4967('0x56')][_0x4967('0x5b')]=!![];_0x4563a4['body'][_0x4967('0x5c')]=moment()[_0x4967('0x5d')](_0x4967('0x5e'));_0x4563a4[_0x4967('0x56')]['UserId']=_0x4563a4['body']['UserId']||_0x4563a4[_0x4967('0x5f')]['id'];_0x519b3a[_0x4967('0x60')]['id']=_0x4563a4[_0x4967('0x56')][_0x4967('0x61')];return db[_0x4967('0x38')][_0x4967('0x54')]({'where':{'id':_0x4563a4['params']['id'],'UserId':null}})[_0x4967('0x20')](handleEntityNotFound(_0x56fb37,null))[_0x4967('0x20')](saveUpdates(_0x4563a4['body'],null))[_0x4967('0x20')](function(_0x1ff13e){if(_0x1ff13e){_0x519b3a['message']=_0x1ff13e[_0x4967('0x62')]({'plain':!![]});return db[_0x4967('0x63')][_0x4967('0x54')]({'where':{'id':_0x1ff13e[_0x4967('0x64')]}});}return null;})[_0x4967('0x20')](handleEntityNotFound(_0x56fb37,null))[_0x4967('0x20')](function(_0x26aadd){if(_0x26aadd){return _0x26aadd[_0x4967('0x33')]({'UserId':_0x4563a4['body'][_0x4967('0x61')],'read1stAt':_[_0x4967('0x65')](_0x26aadd[_0x4967('0x66')])?moment()['format'](_0x4967('0x5e')):undefined});}return null;})[_0x4967('0x20')](function(_0x5377e4){if(_0x5377e4){_0x519b3a['interaction']=_0x5377e4[_0x4967('0x62')]({'plain':!![]});interaction_log[_0x4967('0x21')](_0x4967('0x67'),_0x4563a4[_0x4967('0x5f')]['id'],_0x4563a4[_0x4967('0x5f')][_0x4967('0x35')],_0x4563a4[_0x4967('0x5f')][_0x4967('0x68')],_0x519b3a['interaction']['id'],_0x4563a4[_0x4967('0x56')]?JSON['stringify'](_0x4563a4['body']):'null');return respondWithRpcPromise(_0x4967('0x69'),'acceptMessage',_0x519b3a);}return null;})[_0x4967('0x20')](function(_0x17f79a){var _0x4b49e9=_0x4967('0x6a')+_0x17f79a['message'][_0x4967('0x6b')];return db[_0x4967('0x6c')][_0x4967('0x3e')](_0x4b49e9,{'type':db[_0x4967('0x6d')][_0x4967('0x6e')]['SELECT'],'raw':!![]})[_0x4967('0x20')](function(_0x574491){return _0x574491;});})['then'](function(_0x1cd021){if(_0x1cd021){_0x519b3a[_0x4967('0x29')]['contact']=_0x1cd021[0x0];if(!_0x4563a4['body'][_0x4967('0x61')])return;return db[_0x4967('0x6f')][_0x4967('0x54')]({'where':{'id':_0x4563a4[_0x4967('0x56')][_0x4967('0x61')],'role':_0x4967('0x60')},'attributes':['id',_0x4967('0x35'),_0x4967('0x70'),'email',_0x4967('0x71')],'raw':!![]});}return null;})[_0x4967('0x20')](function(_0x1e5d78){if(!_0x1e5d78)return null;_0x519b3a[_0x4967('0x29')][_0x4967('0x60')]=_0x1e5d78;return _0x519b3a;})['then'](function(_0x52154b){if(_0x52154b){if(_0x4563a4['body'][_0x4967('0x72')]){_0x519b3a[_0x4967('0x29')][_0x4967('0x73')]=util[_0x4967('0x5d')]('SIP/%s',_0x4563a4[_0x4967('0x5f')][_0x4967('0x35')]);_0x519b3a['message']['channel']=_0x519b3a['channel'];_0x519b3a['message'][_0x4967('0x74')]=_0x519b3a[_0x4967('0x75')];_0x519b3a[_0x4967('0x29')][_0x4967('0x76')]='accept';return respondWithRpcPromise(_0x4967('0x77'),_0x4967('0x77'),{'event':_0x4967('0x78'),'message':_[_0x4967('0x49')](_0x519b3a[_0x4967('0x29')],JSON[_0x4967('0x79')](_0x519b3a['interaction']['formData']))},client9002)[_0x4967('0x20')](function(){return _0x519b3a;});}return _0x519b3a;}return null;})[_0x4967('0x20')](respondWithResult(_0x56fb37,null))[_0x4967('0x2a')](handleError(_0x56fb37,null));};var interaction_log=require(_0x4967('0x7a'))(_0x4967('0x59'));exports['reject']=function(_0x5d4ac5,_0x7b0920,_0x23645e){var _0x8926dd={'agent':{},'channel':_0x4967('0x7b')};if(_0x5d4ac5[_0x4967('0x56')]['id']){delete _0x5d4ac5[_0x4967('0x56')]['id'];}_0x5d4ac5[_0x4967('0x56')][_0x4967('0x61')]=_0x5d4ac5[_0x4967('0x56')][_0x4967('0x61')]||_0x5d4ac5[_0x4967('0x5f')]['id'];_0x8926dd[_0x4967('0x60')]['id']=_0x5d4ac5[_0x4967('0x56')][_0x4967('0x61')];return db[_0x4967('0x38')][_0x4967('0x54')]({'where':{'id':_0x5d4ac5[_0x4967('0x52')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x7b0920,null))[_0x4967('0x20')](function(_0x2b17da){if(_0x2b17da){_0x8926dd['message']=_0x2b17da['get']({'plain':!![]});return db['ChatInteraction'][_0x4967('0x54')]({'where':{'id':_0x2b17da[_0x4967('0x64')]}});}return null;})[_0x4967('0x20')](handleEntityNotFound(_0x7b0920,null))['then'](function(_0x1d4f69){if(_0x1d4f69){_0x8926dd[_0x4967('0x7c')]=_0x1d4f69[_0x4967('0x62')]({'plain':!![]});interaction_log[_0x4967('0x21')]('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x5d4ac5[_0x4967('0x5f')]['id'],_0x5d4ac5['user'][_0x4967('0x35')],_0x5d4ac5[_0x4967('0x5f')][_0x4967('0x68')],_0x8926dd['interaction']['id'],_0x5d4ac5[_0x4967('0x56')]?JSON[_0x4967('0x25')](_0x5d4ac5[_0x4967('0x56')]):_0x4967('0x7d'));return respondWithRpcPromise(_0x4967('0x7e'),_0x4967('0x7f'),_0x8926dd);}return null;})['then'](function(_0x538298){var _0x2e61cf=_0x4967('0x6a')+_0x538298[_0x4967('0x29')][_0x4967('0x6b')];return db[_0x4967('0x6c')][_0x4967('0x3e')](_0x2e61cf,{'type':db[_0x4967('0x6d')]['QueryTypes'][_0x4967('0x80')],'raw':!![]})['then'](function(_0x1c4fb8){return _0x1c4fb8;});})[_0x4967('0x20')](function(_0x35c2f0){if(_0x35c2f0){_0x8926dd['message'][_0x4967('0x81')]=_0x35c2f0[0x0];if(!_0x5d4ac5[_0x4967('0x56')]['UserId'])return;return db[_0x4967('0x6f')][_0x4967('0x54')]({'where':{'id':_0x5d4ac5[_0x4967('0x56')][_0x4967('0x61')],'role':_0x4967('0x60')},'attributes':['id',_0x4967('0x35'),_0x4967('0x70'),_0x4967('0x82'),_0x4967('0x71')],'raw':!![]});}return null;})[_0x4967('0x20')](function(_0xa4ee65){if(!_0xa4ee65)return null;_0x8926dd[_0x4967('0x29')]['agent']=_0xa4ee65;return _0x8926dd;})[_0x4967('0x20')](function(_0x872709){if(_0x872709){_0x872709[_0x4967('0x29')][_0x4967('0x73')]=util[_0x4967('0x5d')](_0x4967('0x83'),_0x5d4ac5[_0x4967('0x5f')]['name']);_0x872709['message'][_0x4967('0x75')]=_0x8926dd[_0x4967('0x75')];_0x872709[_0x4967('0x29')][_0x4967('0x74')]=_0x8926dd['channel'];_0x872709['message'][_0x4967('0x76')]=_0x4967('0x84');respondWithRpcPromise('EventManager','EventManager',{'event':_0x4967('0x85'),'message':_[_0x4967('0x49')](_0x8926dd[_0x4967('0x29')],JSON['parse'](_0x8926dd[_0x4967('0x7c')][_0x4967('0x86')]))},client9002);return _0x8926dd;}return null;})[_0x4967('0x20')](respondWithResult(_0x7b0920,null))['catch'](handleError(_0x7b0920,null));};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.events.js b/server/api/chatMessage/chatMessage.events.js
index 9ff5b3c..298d6c9 100644
--- a/server/api/chatMessage/chatMessage.events.js
+++ b/server/api/chatMessage/chatMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x933a=['events','../../mysqldb','ChatMessage','setMaxListeners','save','update','emit','hasOwnProperty','exports'];(function(_0x2c4d31,_0x21f3a8){var _0x3a9785=function(_0x1fb5b8){while(--_0x1fb5b8){_0x2c4d31['push'](_0x2c4d31['shift']());}};_0x3a9785(++_0x21f3a8);}(_0x933a,0x10e));var _0xa933=function(_0x57e0ca,_0x596976){_0x57e0ca=_0x57e0ca-0x0;var _0x310a0a=_0x933a[_0x57e0ca];return _0x310a0a;};'use strict';var EventEmitter=require(_0xa933('0x0'));var ChatMessage=require(_0xa933('0x1'))['db'][_0xa933('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0xa933('0x3')](0x0);var events={'afterCreate':_0xa933('0x4'),'afterUpdate':_0xa933('0x5'),'afterDestroy':'remove'};function emitEvent(_0x1bd700){return function(_0x2f2870,_0x19634e,_0x3eda65){ChatMessageEvents[_0xa933('0x6')](_0x1bd700+':'+_0x2f2870['id'],_0x2f2870);ChatMessageEvents[_0xa933('0x6')](_0x1bd700,_0x2f2870);_0x3eda65(null);};}for(var e in events){if(events[_0xa933('0x7')](e)){var event=events[e];ChatMessage['hook'](e,emitEvent(event));}}module[_0xa933('0x8')]=ChatMessageEvents;
\ No newline at end of file
+var _0xb2b7=['exports','events','../../mysqldb','setMaxListeners','save','remove','emit','hook'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb2b7,0x139));var _0x7b2b=function(_0x31d512,_0x1eede5){_0x31d512=_0x31d512-0x0;var _0x30b8d7=_0xb2b7[_0x31d512];return _0x30b8d7;};'use strict';var EventEmitter=require(_0x7b2b('0x0'));var ChatMessage=require(_0x7b2b('0x1'))['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x7b2b('0x2')](0x0);var events={'afterCreate':_0x7b2b('0x3'),'afterUpdate':'update','afterDestroy':_0x7b2b('0x4')};function emitEvent(_0x4d66dc){return function(_0xc34c0f,_0x41c7bb,_0x36f509){ChatMessageEvents[_0x7b2b('0x5')](_0x4d66dc+':'+_0xc34c0f['id'],_0xc34c0f);ChatMessageEvents['emit'](_0x4d66dc,_0xc34c0f);_0x36f509(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatMessage[_0x7b2b('0x6')](e,emitEvent(event));}}module[_0x7b2b('0x7')]=ChatMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.model.js b/server/api/chatMessage/chatMessage.model.js
index 51ccb15..c1a6dd0 100644
--- a/server/api/chatMessage/chatMessage.model.js
+++ b/server/api/chatMessage/chatMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd3fe=['findOne','ChatInteractionId','then','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatMessage.attributes','exports','define','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','ChatInteraction'];(function(_0xe8c105,_0x2ed540){var _0x27f9ab=function(_0x1199b0){while(--_0x1199b0){_0xe8c105['push'](_0xe8c105['shift']());}};_0x27f9ab(++_0x2ed540);}(_0xd3fe,0xb2));var _0xed3f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd3fe[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xed3f('0x0'));var logger=require(_0xed3f('0x1'))(_0xed3f('0x2'));var moment=require(_0xed3f('0x3'));var BPromise=require(_0xed3f('0x4'));var rp=require(_0xed3f('0x5'));var fs=require('fs');var path=require(_0xed3f('0x6'));var rimraf=require(_0xed3f('0x7'));var config=require(_0xed3f('0x8'));var attributes=require(_0xed3f('0x9'));module[_0xed3f('0xa')]=function(_0xe6f2d6,_0x5b42ee){return _0xe6f2d6[_0xed3f('0xb')](_0xed3f('0xc'),attributes,{'tableName':_0xed3f('0xd'),'paranoid':![],'indexes':[{'name':_0xed3f('0xe'),'fields':[_0xed3f('0xf')],'type':_0xed3f('0x10')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1bfa6c,_0x71e089,_0x3989e8){var _0x29e571=_0xe6f2d6[_0xed3f('0x11')];var _0xcc1f13=_0x1bfa6c[_0xed3f('0x12')]({'plain':!![]});if(_0xcc1f13[_0xed3f('0x13')][_0xed3f('0x14')]()==='in'||_0xcc1f13[_0xed3f('0x13')][_0xed3f('0x14')]()===_0xed3f('0x15')&&!_0xcc1f13[_0xed3f('0x16')]&&!_[_0xed3f('0x17')](_0xcc1f13[_0xed3f('0x18')])){_0x29e571[_0xed3f('0x19')][_0xed3f('0x1a')]({'where':{'id':_0xcc1f13[_0xed3f('0x1b')]}})[_0xed3f('0x1c')](function(_0x3fbe29){if(_0x3fbe29){_0x3fbe29['update']({'lastMsgAt':_0xcc1f13[_0xed3f('0x1d')],'lastMsgDirection':_0xcc1f13[_0xed3f('0x13')][_0xed3f('0x14')]()});}})[_0xed3f('0x1e')](function(_0xa2ec97){console[_0xed3f('0x1f')](_0xa2ec97);});}_0x3989e8();}},'charset':_0xed3f('0x20'),'collate':_0xed3f('0x21')});};
\ No newline at end of file
+var _0x1d88=['utf8mb4_unicode_ci','lodash','moment','request-promise','path','rimraf','../../config/environment','./chatMessage.attributes','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','models','direction','toLowerCase','isNil','UserId','ChatInteraction','findOne','ChatInteractionId','then','update','catch','utf8mb4'];(function(_0x1c7889,_0x24cd26){var _0x2f14e5=function(_0x9ae1b1){while(--_0x9ae1b1){_0x1c7889['push'](_0x1c7889['shift']());}};_0x2f14e5(++_0x24cd26);}(_0x1d88,0x65));var _0x81d8=function(_0x12c271,_0x5dc611){_0x12c271=_0x12c271-0x0;var _0x202a3b=_0x1d88[_0x12c271];return _0x202a3b;};'use strict';var _=require(_0x81d8('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x81d8('0x1'));var BPromise=require('bluebird');var rp=require(_0x81d8('0x2'));var fs=require('fs');var path=require(_0x81d8('0x3'));var rimraf=require(_0x81d8('0x4'));var config=require(_0x81d8('0x5'));var attributes=require(_0x81d8('0x6'));module['exports']=function(_0x402af,_0x54335f){return _0x402af['define'](_0x81d8('0x7'),attributes,{'tableName':_0x81d8('0x8'),'paranoid':![],'indexes':[{'name':_0x81d8('0x9'),'fields':[_0x81d8('0xa')],'type':_0x81d8('0xb')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x5533df,_0x2bae1d,_0x29d9a7){var _0xf20338=_0x402af[_0x81d8('0xc')];var _0xf78d5f=_0x5533df['get']({'plain':!![]});if(_0xf78d5f[_0x81d8('0xd')][_0x81d8('0xe')]()==='in'||_0xf78d5f[_0x81d8('0xd')]['toLowerCase']()==='out'&&!_0xf78d5f['secret']&&!_[_0x81d8('0xf')](_0xf78d5f[_0x81d8('0x10')])){_0xf20338[_0x81d8('0x11')][_0x81d8('0x12')]({'where':{'id':_0xf78d5f[_0x81d8('0x13')]}})[_0x81d8('0x14')](function(_0x2fdd83){if(_0x2fdd83){_0x2fdd83[_0x81d8('0x15')]({'lastMsgAt':_0xf78d5f['createdAt'],'lastMsgDirection':_0xf78d5f[_0x81d8('0xd')]['toLowerCase']()});}})[_0x81d8('0x16')](function(_0x2ef405){console['error'](_0x2ef405);});}_0x29d9a7();}},'charset':_0x81d8('0x17'),'collate':_0x81d8('0x18')});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.rpc.js b/server/api/chatMessage/chatMessage.rpc.js
index 759c8d5..74fe174 100644
--- a/server/api/chatMessage/chatMessage.rpc.js
+++ b/server/api/chatMessage/chatMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc6a7=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','./chatMessage.socket','request','info','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatMessage,\x20%s,\x20%s','message','catch','CreateChatMessage','ChatMessage','body','options','raw','then','moment'];(function(_0x3826ad,_0x49a30d){var _0x17b900=function(_0x38474f){while(--_0x38474f){_0x3826ad['push'](_0x3826ad['shift']());}};_0x17b900(++_0x49a30d);}(_0xc6a7,0x192));var _0x7c6a=function(_0x47fd36,_0x41535d){_0x47fd36=_0x47fd36-0x0;var _0x21a0fc=_0xc6a7[_0x47fd36];return _0x21a0fc;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7c6a('0x0'));var BPromise=require(_0x7c6a('0x1'));var rs=require(_0x7c6a('0x2'));var fs=require('fs');var Redis=require(_0x7c6a('0x3'));var db=require(_0x7c6a('0x4'))['db'];var utils=require(_0x7c6a('0x5'));var logger=require(_0x7c6a('0x6'))(_0x7c6a('0x7'));var config=require(_0x7c6a('0x8'));var jayson=require(_0x7c6a('0x9'));var client=jayson[_0x7c6a('0xa')][_0x7c6a('0xb')]({'port':0x232a});config[_0x7c6a('0xc')]=_['defaults'](config[_0x7c6a('0xc')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7c6a('0xc')]));require(_0x7c6a('0xd'))['register'](socket);function respondWithRpcPromise(_0xc2ec8a,_0x275baf,_0x56255d){return new BPromise(function(_0x50ea36,_0x4c9376){return client[_0x7c6a('0xe')](_0xc2ec8a,_0x56255d)['then'](function(_0x411fde){logger[_0x7c6a('0xf')]('ChatMessage,\x20%s,\x20%s',_0x275baf,_0x7c6a('0x10'));logger[_0x7c6a('0x11')](_0x7c6a('0x12'),_0x275baf,_0x7c6a('0x10'),JSON[_0x7c6a('0x13')](_0x411fde));if(_0x411fde['error']){if(_0x411fde[_0x7c6a('0x14')][_0x7c6a('0x15')]===0x1f4){logger[_0x7c6a('0x14')](_0x7c6a('0x16'),_0x275baf,_0x411fde[_0x7c6a('0x14')][_0x7c6a('0x17')]);return _0x4c9376(_0x411fde[_0x7c6a('0x14')]['message']);}logger['error'](_0x7c6a('0x16'),_0x275baf,_0x411fde[_0x7c6a('0x14')][_0x7c6a('0x17')]);return _0x50ea36(_0x411fde[_0x7c6a('0x14')][_0x7c6a('0x17')]);}else{logger[_0x7c6a('0xf')](_0x7c6a('0x16'),_0x275baf,_0x7c6a('0x10'));_0x50ea36(_0x411fde['result'][_0x7c6a('0x17')]);}})[_0x7c6a('0x18')](function(_0x3bad64){logger['error'](_0x7c6a('0x16'),_0x275baf,_0x3bad64);_0x4c9376(_0x3bad64);});});}exports[_0x7c6a('0x19')]=function(_0x292502){var _0x340fad=this;return new Promise(function(_0x32ce51,_0x506555){return db[_0x7c6a('0x1a')]['create'](_0x292502[_0x7c6a('0x1b')],{'raw':_0x292502['options']?_0x292502[_0x7c6a('0x1c')][_0x7c6a('0x1d')]===undefined?!![]:![]:!![]})[_0x7c6a('0x1e')](function(_0x43865a){logger[_0x7c6a('0xf')](_0x7c6a('0x19'),_0x292502);logger[_0x7c6a('0x11')]('CreateChatMessage',_0x292502,JSON['stringify'](_0x43865a));_0x32ce51(_0x43865a);})['catch'](function(_0x33f4fb){logger[_0x7c6a('0x14')](_0x7c6a('0x19'),_0x33f4fb[_0x7c6a('0x17')],_0x292502);_0x506555(_0x340fad[_0x7c6a('0x14')](0x1f4,_0x33f4fb[_0x7c6a('0x17')]));});});};
\ No newline at end of file
+var _0x5c79=['client','redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','register','request','then','info','ChatMessage,\x20%s,\x20%s','debug','stringify','error','code','message','result','CreateChatMessage','ChatMessage','create','body','options','raw','catch','util','moment','bluebird','ioredis','rpc','../../config/environment','jayson/promise'];(function(_0x33801e,_0x1dfcaf){var _0x4b8a03=function(_0xe7cfe0){while(--_0xe7cfe0){_0x33801e['push'](_0x33801e['shift']());}};_0x4b8a03(++_0x1dfcaf);}(_0x5c79,0x18c));var _0x95c7=function(_0xdaf736,_0xd8c667){_0xdaf736=_0xdaf736-0x0;var _0x1090b3=_0x5c79[_0xdaf736];return _0x1090b3;};'use strict';var _=require('lodash');var util=require(_0x95c7('0x0'));var moment=require(_0x95c7('0x1'));var BPromise=require(_0x95c7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x95c7('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x95c7('0x4'));var config=require(_0x95c7('0x5'));var jayson=require(_0x95c7('0x6'));var client=jayson[_0x95c7('0x7')]['http']({'port':0x232a});config[_0x95c7('0x8')]=_[_0x95c7('0x9')](config[_0x95c7('0x8')],{'host':_0x95c7('0xa'),'port':0x18eb});var socket=require(_0x95c7('0xb'))(new Redis(config[_0x95c7('0x8')]));require(_0x95c7('0xc'))[_0x95c7('0xd')](socket);function respondWithRpcPromise(_0x5e205c,_0x18a8a1,_0x107c87){return new BPromise(function(_0x4c758d,_0x4670da){return client[_0x95c7('0xe')](_0x5e205c,_0x107c87)[_0x95c7('0xf')](function(_0x5b266f){logger[_0x95c7('0x10')](_0x95c7('0x11'),_0x18a8a1,'request\x20sent');logger[_0x95c7('0x12')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x18a8a1,'request\x20sent',JSON[_0x95c7('0x13')](_0x5b266f));if(_0x5b266f[_0x95c7('0x14')]){if(_0x5b266f[_0x95c7('0x14')][_0x95c7('0x15')]===0x1f4){logger['error'](_0x95c7('0x11'),_0x18a8a1,_0x5b266f[_0x95c7('0x14')][_0x95c7('0x16')]);return _0x4670da(_0x5b266f[_0x95c7('0x14')][_0x95c7('0x16')]);}logger['error'](_0x95c7('0x11'),_0x18a8a1,_0x5b266f['error'][_0x95c7('0x16')]);return _0x4c758d(_0x5b266f[_0x95c7('0x14')]['message']);}else{logger['info']('ChatMessage,\x20%s,\x20%s',_0x18a8a1,'request\x20sent');_0x4c758d(_0x5b266f[_0x95c7('0x17')][_0x95c7('0x16')]);}})['catch'](function(_0x4d65e1){logger[_0x95c7('0x14')](_0x95c7('0x11'),_0x18a8a1,_0x4d65e1);_0x4670da(_0x4d65e1);});});}exports[_0x95c7('0x18')]=function(_0x163818){var _0x57806a=this;return new Promise(function(_0x816b19,_0x15e838){return db[_0x95c7('0x19')][_0x95c7('0x1a')](_0x163818[_0x95c7('0x1b')],{'raw':_0x163818[_0x95c7('0x1c')]?_0x163818[_0x95c7('0x1c')][_0x95c7('0x1d')]===undefined?!![]:![]:!![]})['then'](function(_0x50a9e7){logger[_0x95c7('0x10')]('CreateChatMessage',_0x163818);logger[_0x95c7('0x12')](_0x95c7('0x18'),_0x163818,JSON[_0x95c7('0x13')](_0x50a9e7));_0x816b19(_0x50a9e7);})[_0x95c7('0x1e')](function(_0x3afb25){logger[_0x95c7('0x14')](_0x95c7('0x18'),_0x3afb25[_0x95c7('0x16')],_0x163818);_0x15e838(_0x57806a[_0x95c7('0x14')](0x1f4,_0x3afb25[_0x95c7('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.socket.js b/server/api/chatMessage/chatMessage.socket.js
index 4270184..21e0887 100644
--- a/server/api/chatMessage/chatMessage.socket.js
+++ b/server/api/chatMessage/chatMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a08=['emit','removeListener','register','chatMessage:','./chatMessage.events','save'];(function(_0x256ad1,_0x397d6e){var _0x3348d5=function(_0x4c6f9b){while(--_0x4c6f9b){_0x256ad1['push'](_0x256ad1['shift']());}};_0x3348d5(++_0x397d6e);}(_0x7a08,0x11e));var _0x87a0=function(_0x16765f,_0x3dd736){_0x16765f=_0x16765f-0x0;var _0x1326d4=_0x7a08[_0x16765f];return _0x1326d4;};'use strict';var ChatMessageEvents=require(_0x87a0('0x0'));var events=[_0x87a0('0x1'),'remove','update'];function createListener(_0x305211,_0x5e6791){return function(_0x1b3e4d){_0x5e6791[_0x87a0('0x2')](_0x305211,_0x1b3e4d);};}function removeListener(_0x28c28f,_0x122d33){return function(){ChatMessageEvents[_0x87a0('0x3')](_0x28c28f,_0x122d33);};}exports[_0x87a0('0x4')]=function(_0x1b384a){for(var _0xf9199b=0x0,_0xde806e=events['length'];_0xf9199b<_0xde806e;_0xf9199b++){var _0x27736f=events[_0xf9199b];var _0x1bb04b=createListener(_0x87a0('0x5')+_0x27736f,_0x1b384a);ChatMessageEvents['on'](_0x27736f,_0x1bb04b);}};
\ No newline at end of file
+var _0xcca7=['save','remove','update','removeListener','register','chatMessage:','./chatMessage.events'];(function(_0x503ffd,_0x8ecde){var _0x160437=function(_0x2d45dd){while(--_0x2d45dd){_0x503ffd['push'](_0x503ffd['shift']());}};_0x160437(++_0x8ecde);}(_0xcca7,0x1aa));var _0x7cca=function(_0x5ad7f8,_0x165de6){_0x5ad7f8=_0x5ad7f8-0x0;var _0x1d56d8=_0xcca7[_0x5ad7f8];return _0x1d56d8;};'use strict';var ChatMessageEvents=require(_0x7cca('0x0'));var events=[_0x7cca('0x1'),_0x7cca('0x2'),_0x7cca('0x3')];function createListener(_0x5cfce5,_0x4c311e){return function(_0x30823f){_0x4c311e['emit'](_0x5cfce5,_0x30823f);};}function removeListener(_0x3b86a4,_0x9523f7){return function(){ChatMessageEvents[_0x7cca('0x4')](_0x3b86a4,_0x9523f7);};}exports[_0x7cca('0x5')]=function(_0x1c6c95){for(var _0xe70805=0x0,_0x5aec51=events['length'];_0xe70805<_0x5aec51;_0xe70805++){var _0x937fad=events[_0xe70805];var _0xd7a28d=createListener(_0x7cca('0x6')+_0x937fad,_0x1c6c95);ChatMessageEvents['on'](_0x937fad,_0xd7a28d);}};
\ No newline at end of file
diff --git a/server/api/chatMessage/index.js b/server/api/chatMessage/index.js
index e106ab4..80239c7 100644
--- a/server/api/chatMessage/index.js
+++ b/server/api/chatMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb7b2=['update','/:id/accept','reject','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','./chatMessage.controller','get','isAuthenticated','/describe','describe','/:id','show','post','tracked','put'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xb7b2,0x73));var _0x2b7b=function(_0x49aaf4,_0x294ae3){_0x49aaf4=_0x49aaf4-0x0;var _0x21db9c=_0xb7b2[_0x49aaf4];return _0x21db9c;};'use strict';var multer=require(_0x2b7b('0x0'));var util=require(_0x2b7b('0x1'));var path=require(_0x2b7b('0x2'));var timeout=require(_0x2b7b('0x3'));var express=require(_0x2b7b('0x4'));var router=express[_0x2b7b('0x5')]();var fs_extra=require(_0x2b7b('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x2b7b('0x7'));router[_0x2b7b('0x8')]('/',auth[_0x2b7b('0x9')](),controller['index']);router[_0x2b7b('0x8')](_0x2b7b('0xa'),auth[_0x2b7b('0x9')](),controller[_0x2b7b('0xb')]);router[_0x2b7b('0x8')](_0x2b7b('0xc'),auth[_0x2b7b('0x9')](),controller[_0x2b7b('0xd')]);router[_0x2b7b('0xe')]('/',auth['isAuthenticated'](),interaction[_0x2b7b('0xf')]('chat','chatmessage:create'),controller['create']);router[_0x2b7b('0x10')](_0x2b7b('0xc'),controller[_0x2b7b('0x11')]);router[_0x2b7b('0x10')](_0x2b7b('0x12'),auth[_0x2b7b('0x9')](),controller['accept']);router['put']('/:id/reject',auth[_0x2b7b('0x9')](),controller[_0x2b7b('0x13')]);router[_0x2b7b('0x14')](_0x2b7b('0xc'),auth[_0x2b7b('0x9')](),controller[_0x2b7b('0x15')]);module['exports']=router;
\ No newline at end of file
+var _0xab5b=['isAuthenticated','/describe','/:id','tracked','chatmessage:create','put','/:id/accept','accept','/:id/reject','reject','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatMessage.controller','get'];(function(_0x10165c,_0x5ad2b4){var _0x454073=function(_0x3ca33c){while(--_0x3ca33c){_0x10165c['push'](_0x10165c['shift']());}};_0x454073(++_0x5ad2b4);}(_0xab5b,0x140));var _0xbab5=function(_0x4a04c8,_0x3a1a75){_0x4a04c8=_0x4a04c8-0x0;var _0x2940e5=_0xab5b[_0x4a04c8];return _0x2940e5;};'use strict';var multer=require(_0xbab5('0x0'));var util=require(_0xbab5('0x1'));var path=require(_0xbab5('0x2'));var timeout=require(_0xbab5('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xbab5('0x4'));var auth=require(_0xbab5('0x5'));var interaction=require(_0xbab5('0x6'));var config=require(_0xbab5('0x7'));var controller=require(_0xbab5('0x8'));router[_0xbab5('0x9')]('/',auth[_0xbab5('0xa')](),controller['index']);router['get'](_0xbab5('0xb'),auth[_0xbab5('0xa')](),controller['describe']);router[_0xbab5('0x9')](_0xbab5('0xc'),auth[_0xbab5('0xa')](),controller['show']);router['post']('/',auth[_0xbab5('0xa')](),interaction[_0xbab5('0xd')]('chat',_0xbab5('0xe')),controller['create']);router[_0xbab5('0xf')]('/:id',controller['update']);router[_0xbab5('0xf')](_0xbab5('0x10'),auth[_0xbab5('0xa')](),controller[_0xbab5('0x11')]);router['put'](_0xbab5('0x12'),auth[_0xbab5('0xa')](),controller[_0xbab5('0x13')]);router['delete'](_0xbab5('0xc'),auth[_0xbab5('0xa')](),controller[_0xbab5('0x14')]);module[_0xbab5('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
index 1315c79..8018da8 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xadb5=['medium','TEXT','exports'];(function(_0x792c70,_0x529c8a){var _0x3ed360=function(_0x3aba36){while(--_0x3aba36){_0x792c70['push'](_0x792c70['shift']());}};_0x3ed360(++_0x529c8a);}(_0xadb5,0xad));var _0x5adb=function(_0x3088bb,_0x36b664){_0x3088bb=_0x3088bb-0x0;var _0x4c1933=_0xadb5[_0x3088bb];return _0x4c1933;};'use strict';var Sequelize=require('sequelize');module[_0x5adb('0x0')]={'body':{'type':Sequelize['TEXT'](_0x5adb('0x1')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x5adb('0x2')](_0x5adb('0x1')),'allowNull':![]}};
\ No newline at end of file
+var _0x757a=['exports','TEXT'];(function(_0x55f8b4,_0x43f30d){var _0x2475f9=function(_0xdd6f4a){while(--_0xdd6f4a){_0x55f8b4['push'](_0x55f8b4['shift']());}};_0x2475f9(++_0x43f30d);}(_0x757a,0xde));var _0xa757=function(_0x60e968,_0x456166){_0x60e968=_0x60e968-0x0;var _0x4b74bf=_0x757a[_0x60e968];return _0x4b74bf;};'use strict';var Sequelize=require('sequelize');module[_0xa757('0x0')]={'body':{'type':Sequelize[_0xa757('0x1')]('medium'),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT']('medium'),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
index eefae5b..80926bc 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['filter','VIRTUAL','includeAll','include','findAll','rows','show','params','length','merge','options','find','catch','body','Attachment','join','server','attachments','offline-chat','basename','remove','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','ChatOfflineMessage','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x36dfbd,_0x5bfe2d){var _0x4ecad9=function(_0x5230da){while(--_0x5230da){_0x36dfbd['push'](_0x36dfbd['shift']());}};_0x4ecad9(++_0x5bfe2d);}(_0x7a54,0x106));var _0x47a5=function(_0x3bdd4e,_0xf68595){_0x3bdd4e=_0x3bdd4e-0x0;var _0x4b75ad=_0x7a54[_0x3bdd4e];return _0x4b75ad;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];function respondWithStatusCode(_0xd308b8,_0x1eae59){_0x1eae59=_0x1eae59||0xcc;return function(_0x5beb89){if(_0x5beb89){return _0xd308b8[_0x47a5('0x16')](_0x1eae59);}return _0xd308b8[_0x47a5('0x17')](_0x1eae59)[_0x47a5('0x18')]();};}function respondWithResult(_0x711793,_0x139f25){_0x139f25=_0x139f25||0xc8;return function(_0x620ee9){if(_0x620ee9){return _0x711793[_0x47a5('0x17')](_0x139f25)[_0x47a5('0x19')](_0x620ee9);}};}function respondWithFilteredResult(_0x4e99a8,_0x362359){return function(_0x11faf5){if(_0x11faf5){var _0x3b001e=typeof _0x362359[_0x47a5('0x1a')]===_0x47a5('0x1b')&&typeof _0x362359['limit']==='undefined';var _0x138bc0=_0x11faf5['count'];var _0x5247fd=_0x3b001e?0x0:_0x362359[_0x47a5('0x1a')];var _0xaf70a6=_0x3b001e?_0x11faf5[_0x47a5('0x1c')]:_0x362359[_0x47a5('0x1a')]+_0x362359[_0x47a5('0x1d')];var _0x12b98e;if(_0xaf70a6>=_0x138bc0){_0xaf70a6=_0x138bc0;_0x12b98e=0xc8;}else{_0x12b98e=0xce;}_0x4e99a8[_0x47a5('0x17')](_0x12b98e);return _0x4e99a8[_0x47a5('0x1e')](_0x47a5('0x1f'),_0x5247fd+'-'+_0xaf70a6+'/'+_0x138bc0)['json'](_0x11faf5);}return null;};}function patchUpdates(_0x1570bc){return function(_0xf160ba){try{jsonpatch['apply'](_0xf160ba,_0x1570bc,!![]);}catch(_0x2b0360){return BPromise[_0x47a5('0x20')](_0x2b0360);}return _0xf160ba[_0x47a5('0x21')]();};}function saveUpdates(_0x4c5910,_0xb8ae6c){return function(_0x2f142b){if(_0x2f142b){return _0x2f142b[_0x47a5('0x22')](_0x4c5910)[_0x47a5('0x23')](function(_0x5ef1b1){return _0x5ef1b1;});}return null;};}function removeEntity(_0xe2dea9,_0x385687){return function(_0x513981){if(_0x513981){return _0x513981[_0x47a5('0x24')]()[_0x47a5('0x23')](function(){_0xe2dea9[_0x47a5('0x17')](0xcc)[_0x47a5('0x18')]();});}};}function handleEntityNotFound(_0x3abd6a,_0x50bf17){return function(_0x53078a){if(!_0x53078a){_0x3abd6a[_0x47a5('0x16')](0x194);}return _0x53078a;};}function handleError(_0x5686db,_0x1ea9c8){_0x1ea9c8=_0x1ea9c8||0x1f4;return function(_0x5b6c4e){logger[_0x47a5('0x25')](_0x5b6c4e[_0x47a5('0x26')]);if(_0x5b6c4e[_0x47a5('0x27')]){delete _0x5b6c4e[_0x47a5('0x27')];}_0x5686db[_0x47a5('0x17')](_0x1ea9c8)[_0x47a5('0x28')](_0x5b6c4e);};}exports[_0x47a5('0x29')]=function(_0x136b14,_0x16631f){var _0x361bfa={},_0x1127f8={},_0x11a4fa={'count':0x0,'rows':[]};var _0x3ad507=_['map'](db[_0x47a5('0x2a')]['rawAttributes'],function(_0x2ef875){return{'name':_0x2ef875[_0x47a5('0x2b')],'type':_0x2ef875[_0x47a5('0x2c')]['key']};});_0x1127f8[_0x47a5('0x2d')]=_[_0x47a5('0x2e')](_0x3ad507,_0x47a5('0x27'));_0x1127f8[_0x47a5('0x2f')]=_['keys'](_0x136b14['query']);_0x1127f8[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x1127f8['model'],_0x1127f8['query']);_0x361bfa[_0x47a5('0x32')]=_[_0x47a5('0x31')](_0x1127f8['model'],qs[_0x47a5('0x33')](_0x136b14['query'][_0x47a5('0x33')]));_0x361bfa[_0x47a5('0x32')]=_0x361bfa['attributes']['length']?_0x361bfa[_0x47a5('0x32')]:_0x1127f8['model'];if(!_0x136b14[_0x47a5('0x2f')][_0x47a5('0x34')](_0x47a5('0x35'))){_0x361bfa['limit']=qs[_0x47a5('0x1d')](_0x136b14['query']['limit']);_0x361bfa[_0x47a5('0x1a')]=qs['offset'](_0x136b14[_0x47a5('0x2f')]['offset']);}_0x361bfa[_0x47a5('0x36')]=qs[_0x47a5('0x37')](_0x136b14[_0x47a5('0x2f')][_0x47a5('0x37')]);_0x361bfa[_0x47a5('0x38')]=qs[_0x47a5('0x30')](_[_0x47a5('0x39')](_0x136b14[_0x47a5('0x2f')],_0x1127f8[_0x47a5('0x30')]),_0x3ad507);if(_0x136b14['query'][_0x47a5('0x3a')]){_0x361bfa[_0x47a5('0x38')]=_['merge'](_0x361bfa[_0x47a5('0x38')],{'$or':_[_0x47a5('0x2e')](_0x3ad507,function(_0x1d4348){if(_0x1d4348['type']!==_0x47a5('0x3b')){var _0x10f660={};_0x10f660[_0x1d4348['name']]={'$like':'%'+_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3a')]+'%'};return _0x10f660;}})});}_0x361bfa=_['merge']({},_0x361bfa,_0x136b14['options']);var _0x5ebd8c={'where':_0x361bfa[_0x47a5('0x38')]};return db['ChatOfflineMessage'][_0x47a5('0x1c')](_0x5ebd8c)[_0x47a5('0x23')](function(_0x301a85){_0x11a4fa[_0x47a5('0x1c')]=_0x301a85;if(_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x361bfa[_0x47a5('0x3d')]=[{'all':!![]}];}return db[_0x47a5('0x2a')][_0x47a5('0x3e')](_0x361bfa);})[_0x47a5('0x23')](function(_0x280500){_0x11a4fa[_0x47a5('0x3f')]=_0x280500;return _0x11a4fa;})[_0x47a5('0x23')](respondWithFilteredResult(_0x16631f,_0x361bfa))['catch'](handleError(_0x16631f,null));};exports[_0x47a5('0x40')]=function(_0x1c36fa,_0x331474){var _0x23bd8d={'raw':!![],'where':{'id':_0x1c36fa[_0x47a5('0x41')]['id']}},_0x586f4f={};_0x586f4f['model']=_['keys'](db['ChatOfflineMessage']['rawAttributes']);_0x586f4f[_0x47a5('0x2f')]=_['keys'](_0x1c36fa[_0x47a5('0x2f')]);_0x586f4f[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x586f4f['model'],_0x586f4f[_0x47a5('0x2f')]);_0x23bd8d[_0x47a5('0x32')]=_['intersection'](_0x586f4f['model'],qs[_0x47a5('0x33')](_0x1c36fa['query'][_0x47a5('0x33')]));_0x23bd8d[_0x47a5('0x32')]=_0x23bd8d[_0x47a5('0x32')][_0x47a5('0x42')]?_0x23bd8d[_0x47a5('0x32')]:_0x586f4f[_0x47a5('0x2d')];if(_0x1c36fa[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x23bd8d[_0x47a5('0x3d')]=[{'all':!![]}];}_0x23bd8d=_[_0x47a5('0x43')]({},_0x23bd8d,_0x1c36fa[_0x47a5('0x44')]);return db[_0x47a5('0x2a')][_0x47a5('0x45')](_0x23bd8d)[_0x47a5('0x23')](handleEntityNotFound(_0x331474,null))[_0x47a5('0x23')](respondWithResult(_0x331474,null))[_0x47a5('0x46')](handleError(_0x331474,null));};exports['create']=function(_0x2d38de,_0x23bb04){return db['ChatOfflineMessage']['create'](_0x2d38de[_0x47a5('0x47')],{})['then'](respondWithResult(_0x23bb04,0xc9))[_0x47a5('0x46')](handleError(_0x23bb04,null));};exports[_0x47a5('0x22')]=function(_0x54c35f,_0x4f62d3){if(_0x54c35f[_0x47a5('0x47')]['id']){delete _0x54c35f['body']['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x54c35f[_0x47a5('0x41')]['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x4f62d3,null))[_0x47a5('0x23')](saveUpdates(_0x54c35f[_0x47a5('0x47')],null))[_0x47a5('0x23')](respondWithResult(_0x4f62d3,null))['catch'](handleError(_0x4f62d3,null));};exports['destroy']=function(_0x2dd1db,_0x411230){return db[_0x47a5('0x48')][_0x47a5('0x3e')]({'where':{'ChatOfflineMessageId':_0x2dd1db[_0x47a5('0x41')]['id']},'raw':!![]})[_0x47a5('0x23')](function(_0x249de5){_0x249de5['forEach'](function(_0x45cca5){var _0x1c9a62=path[_0x47a5('0x49')](config['root'],_0x47a5('0x4a'),'files',_0x47a5('0x4b'),_0x47a5('0x4c'),_0x45cca5[_0x47a5('0x4d')]);var _0xf03bd5=fs['existsSync'](_0x1c9a62);if(_0xf03bd5)fs_extra[_0x47a5('0x4e')](_0x1c9a62);});})[_0x47a5('0x23')](function(){return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x2dd1db[_0x47a5('0x41')]['id']},'individualHooks':!![]});})[_0x47a5('0x23')](handleEntityNotFound(_0x411230,null))[_0x47a5('0x23')](removeEntity(_0x411230,null))['catch'](handleError(_0x411230,null));};exports[_0x47a5('0x4f')]=function(_0x43721b,_0x187d7e){return db[_0x47a5('0x2a')][_0x47a5('0x4f')]()[_0x47a5('0x23')](respondWithResult(_0x187d7e,null))['catch'](handleError(_0x187d7e,null));};
\ No newline at end of file
+var _0x7a54=['filter','VIRTUAL','includeAll','include','findAll','rows','show','params','length','merge','options','find','catch','body','Attachment','join','server','attachments','offline-chat','basename','remove','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','ChatOfflineMessage','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x3ce3c,_0x319337){var _0x55a2c9=function(_0x1568d0){while(--_0x1568d0){_0x3ce3c['push'](_0x3ce3c['shift']());}};_0x55a2c9(++_0x319337);}(_0x7a54,0x106));var _0x47a5=function(_0x52bef4,_0xd6d415){_0x52bef4=_0x52bef4-0x0;var _0xc0f3ba=_0x7a54[_0x52bef4];return _0xc0f3ba;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];function respondWithStatusCode(_0xd308b8,_0x1eae59){_0x1eae59=_0x1eae59||0xcc;return function(_0x5beb89){if(_0x5beb89){return _0xd308b8[_0x47a5('0x16')](_0x1eae59);}return _0xd308b8[_0x47a5('0x17')](_0x1eae59)[_0x47a5('0x18')]();};}function respondWithResult(_0x711793,_0x139f25){_0x139f25=_0x139f25||0xc8;return function(_0x620ee9){if(_0x620ee9){return _0x711793[_0x47a5('0x17')](_0x139f25)[_0x47a5('0x19')](_0x620ee9);}};}function respondWithFilteredResult(_0x4e99a8,_0x362359){return function(_0x11faf5){if(_0x11faf5){var _0x3b001e=typeof _0x362359[_0x47a5('0x1a')]===_0x47a5('0x1b')&&typeof _0x362359['limit']==='undefined';var _0x138bc0=_0x11faf5['count'];var _0x5247fd=_0x3b001e?0x0:_0x362359[_0x47a5('0x1a')];var _0xaf70a6=_0x3b001e?_0x11faf5[_0x47a5('0x1c')]:_0x362359[_0x47a5('0x1a')]+_0x362359[_0x47a5('0x1d')];var _0x12b98e;if(_0xaf70a6>=_0x138bc0){_0xaf70a6=_0x138bc0;_0x12b98e=0xc8;}else{_0x12b98e=0xce;}_0x4e99a8[_0x47a5('0x17')](_0x12b98e);return _0x4e99a8[_0x47a5('0x1e')](_0x47a5('0x1f'),_0x5247fd+'-'+_0xaf70a6+'/'+_0x138bc0)['json'](_0x11faf5);}return null;};}function patchUpdates(_0x1570bc){return function(_0xf160ba){try{jsonpatch['apply'](_0xf160ba,_0x1570bc,!![]);}catch(_0x2b0360){return BPromise[_0x47a5('0x20')](_0x2b0360);}return _0xf160ba[_0x47a5('0x21')]();};}function saveUpdates(_0x4c5910,_0xb8ae6c){return function(_0x2f142b){if(_0x2f142b){return _0x2f142b[_0x47a5('0x22')](_0x4c5910)[_0x47a5('0x23')](function(_0x5ef1b1){return _0x5ef1b1;});}return null;};}function removeEntity(_0xe2dea9,_0x385687){return function(_0x513981){if(_0x513981){return _0x513981[_0x47a5('0x24')]()[_0x47a5('0x23')](function(){_0xe2dea9[_0x47a5('0x17')](0xcc)[_0x47a5('0x18')]();});}};}function handleEntityNotFound(_0x3abd6a,_0x50bf17){return function(_0x53078a){if(!_0x53078a){_0x3abd6a[_0x47a5('0x16')](0x194);}return _0x53078a;};}function handleError(_0x5686db,_0x1ea9c8){_0x1ea9c8=_0x1ea9c8||0x1f4;return function(_0x5b6c4e){logger[_0x47a5('0x25')](_0x5b6c4e[_0x47a5('0x26')]);if(_0x5b6c4e[_0x47a5('0x27')]){delete _0x5b6c4e[_0x47a5('0x27')];}_0x5686db[_0x47a5('0x17')](_0x1ea9c8)[_0x47a5('0x28')](_0x5b6c4e);};}exports[_0x47a5('0x29')]=function(_0x136b14,_0x16631f){var _0x361bfa={},_0x1127f8={},_0x11a4fa={'count':0x0,'rows':[]};var _0x3ad507=_['map'](db[_0x47a5('0x2a')]['rawAttributes'],function(_0x2ef875){return{'name':_0x2ef875[_0x47a5('0x2b')],'type':_0x2ef875[_0x47a5('0x2c')]['key']};});_0x1127f8[_0x47a5('0x2d')]=_[_0x47a5('0x2e')](_0x3ad507,_0x47a5('0x27'));_0x1127f8[_0x47a5('0x2f')]=_['keys'](_0x136b14['query']);_0x1127f8[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x1127f8['model'],_0x1127f8['query']);_0x361bfa[_0x47a5('0x32')]=_[_0x47a5('0x31')](_0x1127f8['model'],qs[_0x47a5('0x33')](_0x136b14['query'][_0x47a5('0x33')]));_0x361bfa[_0x47a5('0x32')]=_0x361bfa['attributes']['length']?_0x361bfa[_0x47a5('0x32')]:_0x1127f8['model'];if(!_0x136b14[_0x47a5('0x2f')][_0x47a5('0x34')](_0x47a5('0x35'))){_0x361bfa['limit']=qs[_0x47a5('0x1d')](_0x136b14['query']['limit']);_0x361bfa[_0x47a5('0x1a')]=qs['offset'](_0x136b14[_0x47a5('0x2f')]['offset']);}_0x361bfa[_0x47a5('0x36')]=qs[_0x47a5('0x37')](_0x136b14[_0x47a5('0x2f')][_0x47a5('0x37')]);_0x361bfa[_0x47a5('0x38')]=qs[_0x47a5('0x30')](_[_0x47a5('0x39')](_0x136b14[_0x47a5('0x2f')],_0x1127f8[_0x47a5('0x30')]),_0x3ad507);if(_0x136b14['query'][_0x47a5('0x3a')]){_0x361bfa[_0x47a5('0x38')]=_['merge'](_0x361bfa[_0x47a5('0x38')],{'$or':_[_0x47a5('0x2e')](_0x3ad507,function(_0x1d4348){if(_0x1d4348['type']!==_0x47a5('0x3b')){var _0x10f660={};_0x10f660[_0x1d4348['name']]={'$like':'%'+_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3a')]+'%'};return _0x10f660;}})});}_0x361bfa=_['merge']({},_0x361bfa,_0x136b14['options']);var _0x5ebd8c={'where':_0x361bfa[_0x47a5('0x38')]};return db['ChatOfflineMessage'][_0x47a5('0x1c')](_0x5ebd8c)[_0x47a5('0x23')](function(_0x301a85){_0x11a4fa[_0x47a5('0x1c')]=_0x301a85;if(_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x361bfa[_0x47a5('0x3d')]=[{'all':!![]}];}return db[_0x47a5('0x2a')][_0x47a5('0x3e')](_0x361bfa);})[_0x47a5('0x23')](function(_0x280500){_0x11a4fa[_0x47a5('0x3f')]=_0x280500;return _0x11a4fa;})[_0x47a5('0x23')](respondWithFilteredResult(_0x16631f,_0x361bfa))['catch'](handleError(_0x16631f,null));};exports[_0x47a5('0x40')]=function(_0x1c36fa,_0x331474){var _0x23bd8d={'raw':!![],'where':{'id':_0x1c36fa[_0x47a5('0x41')]['id']}},_0x586f4f={};_0x586f4f['model']=_['keys'](db['ChatOfflineMessage']['rawAttributes']);_0x586f4f[_0x47a5('0x2f')]=_['keys'](_0x1c36fa[_0x47a5('0x2f')]);_0x586f4f[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x586f4f['model'],_0x586f4f[_0x47a5('0x2f')]);_0x23bd8d[_0x47a5('0x32')]=_['intersection'](_0x586f4f['model'],qs[_0x47a5('0x33')](_0x1c36fa['query'][_0x47a5('0x33')]));_0x23bd8d[_0x47a5('0x32')]=_0x23bd8d[_0x47a5('0x32')][_0x47a5('0x42')]?_0x23bd8d[_0x47a5('0x32')]:_0x586f4f[_0x47a5('0x2d')];if(_0x1c36fa[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x23bd8d[_0x47a5('0x3d')]=[{'all':!![]}];}_0x23bd8d=_[_0x47a5('0x43')]({},_0x23bd8d,_0x1c36fa[_0x47a5('0x44')]);return db[_0x47a5('0x2a')][_0x47a5('0x45')](_0x23bd8d)[_0x47a5('0x23')](handleEntityNotFound(_0x331474,null))[_0x47a5('0x23')](respondWithResult(_0x331474,null))[_0x47a5('0x46')](handleError(_0x331474,null));};exports['create']=function(_0x2d38de,_0x23bb04){return db['ChatOfflineMessage']['create'](_0x2d38de[_0x47a5('0x47')],{})['then'](respondWithResult(_0x23bb04,0xc9))[_0x47a5('0x46')](handleError(_0x23bb04,null));};exports[_0x47a5('0x22')]=function(_0x54c35f,_0x4f62d3){if(_0x54c35f[_0x47a5('0x47')]['id']){delete _0x54c35f['body']['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x54c35f[_0x47a5('0x41')]['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x4f62d3,null))[_0x47a5('0x23')](saveUpdates(_0x54c35f[_0x47a5('0x47')],null))[_0x47a5('0x23')](respondWithResult(_0x4f62d3,null))['catch'](handleError(_0x4f62d3,null));};exports['destroy']=function(_0x2dd1db,_0x411230){return db[_0x47a5('0x48')][_0x47a5('0x3e')]({'where':{'ChatOfflineMessageId':_0x2dd1db[_0x47a5('0x41')]['id']},'raw':!![]})[_0x47a5('0x23')](function(_0x249de5){_0x249de5['forEach'](function(_0x45cca5){var _0x1c9a62=path[_0x47a5('0x49')](config['root'],_0x47a5('0x4a'),'files',_0x47a5('0x4b'),_0x47a5('0x4c'),_0x45cca5[_0x47a5('0x4d')]);var _0xf03bd5=fs['existsSync'](_0x1c9a62);if(_0xf03bd5)fs_extra[_0x47a5('0x4e')](_0x1c9a62);});})[_0x47a5('0x23')](function(){return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x2dd1db[_0x47a5('0x41')]['id']},'individualHooks':!![]});})[_0x47a5('0x23')](handleEntityNotFound(_0x411230,null))[_0x47a5('0x23')](removeEntity(_0x411230,null))['catch'](handleError(_0x411230,null));};exports[_0x47a5('0x4f')]=function(_0x43721b,_0x187d7e){return db[_0x47a5('0x2a')][_0x47a5('0x4f')]()[_0x47a5('0x23')](respondWithResult(_0x187d7e,null))['catch'](handleError(_0x187d7e,null));};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.events.js b/server/api/chatOfflineMessage/chatOfflineMessage.events.js
index 3ee4d00..caf4789 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.events.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xde7f=['remove','emit','hasOwnProperty','hook','setMaxListeners','save'];(function(_0x43ff14,_0x15b402){var _0x18925e=function(_0x471299){while(--_0x471299){_0x43ff14['push'](_0x43ff14['shift']());}};_0x18925e(++_0x15b402);}(_0xde7f,0x1f0));var _0xfde7=function(_0x600be6,_0x303ba9){_0x600be6=_0x600be6-0x0;var _0x2e3879=_0xde7f[_0x600be6];return _0x2e3879;};'use strict';var EventEmitter=require('events');var ChatOfflineMessage=require('../../mysqldb')['db']['ChatOfflineMessage'];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0xfde7('0x0')](0x0);var events={'afterCreate':_0xfde7('0x1'),'afterUpdate':'update','afterDestroy':_0xfde7('0x2')};function emitEvent(_0x56cf2f){return function(_0x56bb08,_0x505273,_0x5749bc){ChatOfflineMessageEvents['emit'](_0x56cf2f+':'+_0x56bb08['id'],_0x56bb08);ChatOfflineMessageEvents[_0xfde7('0x3')](_0x56cf2f,_0x56bb08);_0x5749bc(null);};}for(var e in events){if(events[_0xfde7('0x4')](e)){var event=events[e];ChatOfflineMessage[_0xfde7('0x5')](e,emitEvent(event));}}module['exports']=ChatOfflineMessageEvents;
\ No newline at end of file
+var _0xac1b=['events','../../mysqldb','ChatOfflineMessage','setMaxListeners','update','remove','emit','hook','exports'];(function(_0x17b6e3,_0x4522ed){var _0x3906f3=function(_0x430f87){while(--_0x430f87){_0x17b6e3['push'](_0x17b6e3['shift']());}};_0x3906f3(++_0x4522ed);}(_0xac1b,0x10e));var _0xbac1=function(_0x231c21,_0x4d9f60){_0x231c21=_0x231c21-0x0;var _0x5120a5=_0xac1b[_0x231c21];return _0x5120a5;};'use strict';var EventEmitter=require(_0xbac1('0x0'));var ChatOfflineMessage=require(_0xbac1('0x1'))['db'][_0xbac1('0x2')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0xbac1('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xbac1('0x4'),'afterDestroy':_0xbac1('0x5')};function emitEvent(_0x1d9d38){return function(_0x423663,_0x299439,_0x30d2f4){ChatOfflineMessageEvents['emit'](_0x1d9d38+':'+_0x423663['id'],_0x423663);ChatOfflineMessageEvents[_0xbac1('0x6')](_0x1d9d38,_0x423663);_0x30d2f4(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatOfflineMessage[_0xbac1('0x7')](e,emitEvent(event));}}module[_0xbac1('0x8')]=ChatOfflineMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
index 56b757f..d88c046 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.model.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x354e=['chat_offline_messages','utf8mb4','./chatOfflineMessage.attributes','exports','define','ChatOfflineMessage'];(function(_0x31180d,_0x5cfd35){var _0x538978=function(_0x2e2205){while(--_0x2e2205){_0x31180d['push'](_0x31180d['shift']());}};_0x538978(++_0x5cfd35);}(_0x354e,0x116));var _0xe354=function(_0xccd93b,_0x10a53d){_0xccd93b=_0xccd93b-0x0;var _0x54e149=_0x354e[_0xccd93b];return _0x54e149;};'use strict';var attributes=require(_0xe354('0x0'));module[_0xe354('0x1')]=function(_0x50a323){return _0x50a323[_0xe354('0x2')](_0xe354('0x3'),attributes,{'tableName':_0xe354('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe354('0x5'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x8dc9=['ChatOfflineMessage','utf8mb4','utf8mb4_unicode_ci','./chatOfflineMessage.attributes','exports','define'];(function(_0x15ddc9,_0x209223){var _0x2fc9e8=function(_0x2d5e5f){while(--_0x2d5e5f){_0x15ddc9['push'](_0x15ddc9['shift']());}};_0x2fc9e8(++_0x209223);}(_0x8dc9,0x9f));var _0x98dc=function(_0x141322,_0x4a2018){_0x141322=_0x141322-0x0;var _0x434829=_0x8dc9[_0x141322];return _0x434829;};'use strict';var attributes=require(_0x98dc('0x0'));module[_0x98dc('0x1')]=function(_0x540181){return _0x540181[_0x98dc('0x2')](_0x98dc('0x3'),attributes,{'tableName':'chat_offline_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x98dc('0x4'),'collate':_0x98dc('0x5')});};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
index 089347b..a6443c1 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa220=['message','info','result','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x2774a7,_0x370440){var _0x5aadbf=function(_0x275ebc){while(--_0x275ebc){_0x2774a7['push'](_0x2774a7['shift']());}};_0x5aadbf(++_0x370440);}(_0xa220,0x100));var _0x0a22=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xa220[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0x0a22('0x0'));var util=require(_0x0a22('0x1'));var moment=require(_0x0a22('0x2'));var BPromise=require(_0x0a22('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0a22('0x4'))['db'];var utils=require(_0x0a22('0x5'));var logger=require(_0x0a22('0x6'))(_0x0a22('0x7'));var config=require(_0x0a22('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0a22('0x9')][_0x0a22('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1583a9,_0x18249b,_0x4609b6){return new BPromise(function(_0x3822fd,_0x63a927){return client[_0x0a22('0xb')](_0x1583a9,_0x4609b6)[_0x0a22('0xc')](function(_0x409b3c){logger['info'](_0x0a22('0xd'),_0x18249b,_0x0a22('0xe'));logger[_0x0a22('0xf')](_0x0a22('0x10'),_0x18249b,_0x0a22('0xe'),JSON[_0x0a22('0x11')](_0x409b3c));if(_0x409b3c[_0x0a22('0x12')]){if(_0x409b3c[_0x0a22('0x12')][_0x0a22('0x13')]===0x1f4){logger[_0x0a22('0x12')](_0x0a22('0xd'),_0x18249b,_0x409b3c['error']['message']);return _0x63a927(_0x409b3c[_0x0a22('0x12')][_0x0a22('0x14')]);}logger[_0x0a22('0x12')](_0x0a22('0xd'),_0x18249b,_0x409b3c[_0x0a22('0x12')][_0x0a22('0x14')]);return _0x3822fd(_0x409b3c[_0x0a22('0x12')][_0x0a22('0x14')]);}else{logger[_0x0a22('0x15')](_0x0a22('0xd'),_0x18249b,_0x0a22('0xe'));_0x3822fd(_0x409b3c[_0x0a22('0x16')][_0x0a22('0x14')]);}})['catch'](function(_0x1fb5dc){logger[_0x0a22('0x12')](_0x0a22('0xd'),_0x18249b,_0x1fb5dc);_0x63a927(_0x1fb5dc);});});}
\ No newline at end of file
+var _0xc19f=['jayson/promise','client','http','request','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x1c72b8,_0x104b7e){var _0x191114=function(_0x5d76da){while(--_0x5d76da){_0x1c72b8['push'](_0x1c72b8['shift']());}};_0x191114(++_0x104b7e);}(_0xc19f,0xbc));var _0xfc19=function(_0x44d6bb,_0x43f171){_0x44d6bb=_0x44d6bb-0x0;var _0x167b7e=_0xc19f[_0x44d6bb];return _0x167b7e;};'use strict';var _=require(_0xfc19('0x0'));var util=require('util');var moment=require(_0xfc19('0x1'));var BPromise=require(_0xfc19('0x2'));var rs=require(_0xfc19('0x3'));var fs=require('fs');var Redis=require(_0xfc19('0x4'));var db=require(_0xfc19('0x5'))['db'];var utils=require(_0xfc19('0x6'));var logger=require(_0xfc19('0x7'))(_0xfc19('0x8'));var config=require(_0xfc19('0x9'));var jayson=require(_0xfc19('0xa'));var client=jayson[_0xfc19('0xb')][_0xfc19('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x10528d,_0x52cc63,_0x1e74ea){return new BPromise(function(_0x2ee390,_0x4fb397){return client[_0xfc19('0xd')](_0x10528d,_0x1e74ea)['then'](function(_0x3892f8){logger[_0xfc19('0xe')](_0xfc19('0xf'),_0x52cc63,_0xfc19('0x10'));logger['debug'](_0xfc19('0x11'),_0x52cc63,'request\x20sent',JSON[_0xfc19('0x12')](_0x3892f8));if(_0x3892f8['error']){if(_0x3892f8['error']['code']===0x1f4){logger['error']('ChatOfflineMessage,\x20%s,\x20%s',_0x52cc63,_0x3892f8[_0xfc19('0x13')][_0xfc19('0x14')]);return _0x4fb397(_0x3892f8[_0xfc19('0x13')][_0xfc19('0x14')]);}logger[_0xfc19('0x13')]('ChatOfflineMessage,\x20%s,\x20%s',_0x52cc63,_0x3892f8[_0xfc19('0x13')][_0xfc19('0x14')]);return _0x2ee390(_0x3892f8['error'][_0xfc19('0x14')]);}else{logger[_0xfc19('0xe')]('ChatOfflineMessage,\x20%s,\x20%s',_0x52cc63,'request\x20sent');_0x2ee390(_0x3892f8[_0xfc19('0x15')][_0xfc19('0x14')]);}})['catch'](function(_0x458525){logger[_0xfc19('0x13')](_0xfc19('0xf'),_0x52cc63,_0x458525);_0x4fb397(_0x458525);});});}
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js
index e885107..9d6f5bd 100644
--- a/server/api/chatOfflineMessage/index.js
+++ b/server/api/chatOfflineMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7532=['/describe','describe','get','/:id','show','create','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','isAuthenticated','index'];(function(_0xb2dbed,_0x4ab5f3){var _0x50a42e=function(_0x25298d){while(--_0x25298d){_0xb2dbed['push'](_0xb2dbed['shift']());}};_0x50a42e(++_0x4ab5f3);}(_0x7532,0x1c2));var _0x2753=function(_0x2ac5f8,_0x4c3a9f){_0x2ac5f8=_0x2ac5f8-0x0;var _0x3b8229=_0x7532[_0x2ac5f8];return _0x3b8229;};'use strict';var multer=require(_0x2753('0x0'));var util=require(_0x2753('0x1'));var path=require(_0x2753('0x2'));var timeout=require(_0x2753('0x3'));var express=require('express');var router=express[_0x2753('0x4')]();var fs_extra=require(_0x2753('0x5'));var auth=require(_0x2753('0x6'));var interaction=require(_0x2753('0x7'));var config=require(_0x2753('0x8'));var controller=require(_0x2753('0x9'));router['get']('/',auth[_0x2753('0xa')](),controller[_0x2753('0xb')]);router['get'](_0x2753('0xc'),auth[_0x2753('0xa')](),controller[_0x2753('0xd')]);router[_0x2753('0xe')](_0x2753('0xf'),auth[_0x2753('0xa')](),controller[_0x2753('0x10')]);router['post']('/',auth[_0x2753('0xa')](),controller[_0x2753('0x11')]);router['put'](_0x2753('0xf'),auth['isAuthenticated'](),controller[_0x2753('0x12')]);router[_0x2753('0x13')](_0x2753('0xf'),auth['isAuthenticated'](),controller[_0x2753('0x14')]);module[_0x2753('0x15')]=router;
\ No newline at end of file
+var _0x343f=['/describe','describe','/:id','isAuthenticated','show','create','put','exports','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','get'];(function(_0x27fb22,_0xab9f66){var _0x2046fc=function(_0x1a692c){while(--_0x1a692c){_0x27fb22['push'](_0x27fb22['shift']());}};_0x2046fc(++_0xab9f66);}(_0x343f,0x13a));var _0xf343=function(_0x40b2ca,_0x478f0e){_0x40b2ca=_0x40b2ca-0x0;var _0x4fd998=_0x343f[_0x40b2ca];return _0x4fd998;};'use strict';var multer=require('multer');var util=require(_0xf343('0x0'));var path=require(_0xf343('0x1'));var timeout=require(_0xf343('0x2'));var express=require(_0xf343('0x3'));var router=express['Router']();var fs_extra=require(_0xf343('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xf343('0x5'));var config=require(_0xf343('0x6'));var controller=require(_0xf343('0x7'));router[_0xf343('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xf343('0x8')](_0xf343('0x9'),auth['isAuthenticated'](),controller[_0xf343('0xa')]);router[_0xf343('0x8')](_0xf343('0xb'),auth[_0xf343('0xc')](),controller[_0xf343('0xd')]);router['post']('/',auth[_0xf343('0xc')](),controller[_0xf343('0xe')]);router[_0xf343('0xf')]('/:id',auth[_0xf343('0xc')](),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xf343('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
index f0ea763..d37b6c5 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.attributes.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xadb2=['ENUM','mouseOver','INTEGER','sequelize','exports'];(function(_0x13d757,_0xb9e660){var _0x1766f9=function(_0x153028){while(--_0x153028){_0x13d757['push'](_0x13d757['shift']());}};_0x1766f9(++_0xb9e660);}(_0xadb2,0x152));var _0x2adb=function(_0x3ea8c1,_0x330ece){_0x3ea8c1=_0x3ea8c1-0x0;var _0x280b69=_0xadb2[_0x3ea8c1];return _0x280b69;};'use strict';var Sequelize=require(_0x2adb('0x0'));module[_0x2adb('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x2adb('0x2')](_0x2adb('0x3'),'timeout'),'defaultValue':'mouseOver'},'selector':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0x2adb('0x4')]}};
\ No newline at end of file
+var _0x4c62=['sequelize','exports','ENUM','mouseOver','timeout','STRING','INTEGER'];(function(_0x3b9cf7,_0x2d1288){var _0x5ece02=function(_0x25821b){while(--_0x25821b){_0x3b9cf7['push'](_0x3b9cf7['shift']());}};_0x5ece02(++_0x2d1288);}(_0x4c62,0x1b2));var _0x24c6=function(_0x305693,_0x4abb0f){_0x305693=_0x305693-0x0;var _0x46a81a=_0x4c62[_0x305693];return _0x46a81a;};'use strict';var Sequelize=require(_0x24c6('0x0'));module[_0x24c6('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x24c6('0x2')](_0x24c6('0x3'),_0x24c6('0x4')),'defaultValue':_0x24c6('0x3')},'selector':{'type':Sequelize[_0x24c6('0x5')]},'timeout':{'type':Sequelize[_0x24c6('0x6')]}};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js
index 1988d9d..ad15788 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.controller.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdbf5=['fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/license/util','sendStatus','status','json','offset','undefined','count','set','Content-Range','save','update','then','destroy','end','error','stack','name','send','show','params','model','keys','ChatProactiveAction','rawAttributes','query','filters','intersection','attributes','fields','length','includeAll','include','merge','find','catch','create','body','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs'];(function(_0x224e85,_0x11665b){var _0x3ed819=function(_0x297aa1){while(--_0x297aa1){_0x224e85['push'](_0x224e85['shift']());}};_0x3ed819(++_0x11665b);}(_0xdbf5,0x18c));var _0x5dbf=function(_0x5d1c67,_0x240ebe){_0x5d1c67=_0x5d1c67-0x0;var _0x452ef4=_0xdbf5[_0x5d1c67];return _0x452ef4;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5dbf('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x5dbf('0x1'));var moment=require(_0x5dbf('0x2'));var BPromise=require(_0x5dbf('0x3'));var Mustache=require(_0x5dbf('0x4'));var util=require(_0x5dbf('0x5'));var path=require(_0x5dbf('0x6'));var sox=require(_0x5dbf('0x7'));var csv=require(_0x5dbf('0x8'));var ejs=require(_0x5dbf('0x9'));var fs=require('fs');var fs_extra=require(_0x5dbf('0xa'));var _=require(_0x5dbf('0xb'));var squel=require(_0x5dbf('0xc'));var crypto=require(_0x5dbf('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x5dbf('0xe'));var toCsv=require('to-csv');var querystring=require(_0x5dbf('0xf'));var Papa=require(_0x5dbf('0x10'));var Redis=require(_0x5dbf('0x11'));var authService=require(_0x5dbf('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x5dbf('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x5dbf('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x5dbf('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x182cec,_0x2bb7ed){_0x2bb7ed=_0x2bb7ed||0xcc;return function(_0x1453a9){if(_0x1453a9){return _0x182cec[_0x5dbf('0x16')](_0x2bb7ed);}return _0x182cec[_0x5dbf('0x17')](_0x2bb7ed)['end']();};}function respondWithResult(_0x4803ca,_0x2b4e1c){_0x2b4e1c=_0x2b4e1c||0xc8;return function(_0x3480c8){if(_0x3480c8){return _0x4803ca['status'](_0x2b4e1c)[_0x5dbf('0x18')](_0x3480c8);}};}function respondWithFilteredResult(_0x248e3c,_0x23f763){return function(_0x2dfa44){if(_0x2dfa44){var _0x181816=typeof _0x23f763[_0x5dbf('0x19')]===_0x5dbf('0x1a')&&typeof _0x23f763['limit']==='undefined';var _0x16dc82=_0x2dfa44[_0x5dbf('0x1b')];var _0x39c7aa=_0x181816?0x0:_0x23f763[_0x5dbf('0x19')];var _0x20c2b0=_0x181816?_0x2dfa44['count']:_0x23f763[_0x5dbf('0x19')]+_0x23f763['limit'];var _0x565efa;if(_0x20c2b0>=_0x16dc82){_0x20c2b0=_0x16dc82;_0x565efa=0xc8;}else{_0x565efa=0xce;}_0x248e3c['status'](_0x565efa);return _0x248e3c[_0x5dbf('0x1c')](_0x5dbf('0x1d'),_0x39c7aa+'-'+_0x20c2b0+'/'+_0x16dc82)[_0x5dbf('0x18')](_0x2dfa44);}return null;};}function patchUpdates(_0x2ab57c){return function(_0x1e3cce){try{jsonpatch['apply'](_0x1e3cce,_0x2ab57c,!![]);}catch(_0x2764ea){return BPromise['reject'](_0x2764ea);}return _0x1e3cce[_0x5dbf('0x1e')]();};}function saveUpdates(_0x11cc67,_0x14d133){return function(_0x43a612){if(_0x43a612){return _0x43a612[_0x5dbf('0x1f')](_0x11cc67)[_0x5dbf('0x20')](function(_0x58085e){return _0x58085e;});}return null;};}function removeEntity(_0x4027c3,_0x3e3a2d){return function(_0x2d3e1b){if(_0x2d3e1b){return _0x2d3e1b[_0x5dbf('0x21')]()[_0x5dbf('0x20')](function(){_0x4027c3[_0x5dbf('0x17')](0xcc)[_0x5dbf('0x22')]();});}};}function handleEntityNotFound(_0x20ab1b,_0x42f13b){return function(_0x15a790){if(!_0x15a790){_0x20ab1b[_0x5dbf('0x16')](0x194);}return _0x15a790;};}function handleError(_0x232c77,_0x3f9e60){_0x3f9e60=_0x3f9e60||0x1f4;return function(_0x407741){logger[_0x5dbf('0x23')](_0x407741[_0x5dbf('0x24')]);if(_0x407741[_0x5dbf('0x25')]){delete _0x407741[_0x5dbf('0x25')];}_0x232c77[_0x5dbf('0x17')](_0x3f9e60)[_0x5dbf('0x26')](_0x407741);};}exports[_0x5dbf('0x27')]=function(_0x471027,_0x21cd00){var _0x5768b7={'raw':!![],'where':{'id':_0x471027[_0x5dbf('0x28')]['id']}},_0x2f71eb={};_0x2f71eb[_0x5dbf('0x29')]=_[_0x5dbf('0x2a')](db[_0x5dbf('0x2b')][_0x5dbf('0x2c')]);_0x2f71eb[_0x5dbf('0x2d')]=_[_0x5dbf('0x2a')](_0x471027[_0x5dbf('0x2d')]);_0x2f71eb[_0x5dbf('0x2e')]=_[_0x5dbf('0x2f')](_0x2f71eb['model'],_0x2f71eb['query']);_0x5768b7[_0x5dbf('0x30')]=_[_0x5dbf('0x2f')](_0x2f71eb[_0x5dbf('0x29')],qs[_0x5dbf('0x31')](_0x471027[_0x5dbf('0x2d')]['fields']));_0x5768b7['attributes']=_0x5768b7[_0x5dbf('0x30')][_0x5dbf('0x32')]?_0x5768b7['attributes']:_0x2f71eb[_0x5dbf('0x29')];if(_0x471027[_0x5dbf('0x2d')][_0x5dbf('0x33')]){_0x5768b7[_0x5dbf('0x34')]=[{'all':!![]}];}_0x5768b7=_[_0x5dbf('0x35')]({},_0x5768b7,_0x471027['options']);return db[_0x5dbf('0x2b')][_0x5dbf('0x36')](_0x5768b7)[_0x5dbf('0x20')](handleEntityNotFound(_0x21cd00,null))[_0x5dbf('0x20')](respondWithResult(_0x21cd00,null))[_0x5dbf('0x37')](handleError(_0x21cd00,null));};exports['create']=function(_0x252d54,_0x7dc2da){return db[_0x5dbf('0x2b')][_0x5dbf('0x38')](_0x252d54['body'],{})[_0x5dbf('0x20')](respondWithResult(_0x7dc2da,0xc9))[_0x5dbf('0x37')](handleError(_0x7dc2da,null));};exports[_0x5dbf('0x1f')]=function(_0x3439da,_0x3e309a){if(_0x3439da[_0x5dbf('0x39')]['id']){delete _0x3439da[_0x5dbf('0x39')]['id'];}return db[_0x5dbf('0x2b')][_0x5dbf('0x36')]({'where':{'id':_0x3439da[_0x5dbf('0x28')]['id']}})[_0x5dbf('0x20')](handleEntityNotFound(_0x3e309a,null))['then'](saveUpdates(_0x3439da[_0x5dbf('0x39')],null))[_0x5dbf('0x20')](respondWithResult(_0x3e309a,null))[_0x5dbf('0x37')](handleError(_0x3e309a,null));};exports['destroy']=function(_0x31de38,_0x43954b){return db[_0x5dbf('0x2b')]['find']({'where':{'id':_0x31de38[_0x5dbf('0x28')]['id']}})[_0x5dbf('0x20')](handleEntityNotFound(_0x43954b,null))[_0x5dbf('0x20')](removeEntity(_0x43954b,null))['catch'](handleError(_0x43954b,null));};
\ No newline at end of file
+var _0xa631=['query','intersection','fields','attributes','length','merge','ChatProactiveAction','create','body','catch','find','params','rimraf','zip-dir','fast-json-patch','moment','util','path','sox','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','limit','undefined','count','set','apply','reject','save','update','then','destroy','error','name','send','show','model','keys','rawAttributes'];(function(_0xe046bb,_0x8cf545){var _0x1e047a=function(_0x2066c8){while(--_0x2066c8){_0xe046bb['push'](_0xe046bb['shift']());}};_0x1e047a(++_0x8cf545);}(_0xa631,0xe4));var _0x1a63=function(_0x3f7a4b,_0x12c78e){_0x3f7a4b=_0x3f7a4b-0x0;var _0x2f92fb=_0xa631[_0x3f7a4b];return _0x2f92fb;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1a63('0x0'));var zipdir=require(_0x1a63('0x1'));var jsonpatch=require(_0x1a63('0x2'));var rp=require('request-promise');var moment=require(_0x1a63('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x1a63('0x4'));var path=require(_0x1a63('0x5'));var sox=require(_0x1a63('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x1a63('0x7'));var crypto=require(_0x1a63('0x8'));var jsforce=require(_0x1a63('0x9'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x1a63('0xa'));var Papa=require(_0x1a63('0xb'));var Redis=require(_0x1a63('0xc'));var authService=require(_0x1a63('0xd'));var qs=require(_0x1a63('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1a63('0xf'));var logger=require(_0x1a63('0x10'))(_0x1a63('0x11'));var utils=require(_0x1a63('0x12'));var config=require('../../config/environment');var licenseUtil=require(_0x1a63('0x13'));var db=require(_0x1a63('0x14'))['db'];function respondWithStatusCode(_0x32269d,_0x55307f){_0x55307f=_0x55307f||0xcc;return function(_0xd7e70c){if(_0xd7e70c){return _0x32269d['sendStatus'](_0x55307f);}return _0x32269d[_0x1a63('0x15')](_0x55307f)[_0x1a63('0x16')]();};}function respondWithResult(_0x44bf20,_0x5301b6){_0x5301b6=_0x5301b6||0xc8;return function(_0x5b4ab8){if(_0x5b4ab8){return _0x44bf20[_0x1a63('0x15')](_0x5301b6)[_0x1a63('0x17')](_0x5b4ab8);}};}function respondWithFilteredResult(_0x436623,_0x3756e2){return function(_0x1c1e8c){if(_0x1c1e8c){var _0x4d66d4=typeof _0x3756e2[_0x1a63('0x18')]==='undefined'&&typeof _0x3756e2[_0x1a63('0x19')]===_0x1a63('0x1a');var _0x6a72c1=_0x1c1e8c[_0x1a63('0x1b')];var _0x52fdd1=_0x4d66d4?0x0:_0x3756e2[_0x1a63('0x18')];var _0x365ab8=_0x4d66d4?_0x1c1e8c[_0x1a63('0x1b')]:_0x3756e2[_0x1a63('0x18')]+_0x3756e2[_0x1a63('0x19')];var _0x491c8a;if(_0x365ab8>=_0x6a72c1){_0x365ab8=_0x6a72c1;_0x491c8a=0xc8;}else{_0x491c8a=0xce;}_0x436623[_0x1a63('0x15')](_0x491c8a);return _0x436623[_0x1a63('0x1c')]('Content-Range',_0x52fdd1+'-'+_0x365ab8+'/'+_0x6a72c1)[_0x1a63('0x17')](_0x1c1e8c);}return null;};}function patchUpdates(_0x444406){return function(_0x1e15a3){try{jsonpatch[_0x1a63('0x1d')](_0x1e15a3,_0x444406,!![]);}catch(_0x24646d){return BPromise[_0x1a63('0x1e')](_0x24646d);}return _0x1e15a3[_0x1a63('0x1f')]();};}function saveUpdates(_0x547d78,_0x3e4b57){return function(_0x524469){if(_0x524469){return _0x524469[_0x1a63('0x20')](_0x547d78)[_0x1a63('0x21')](function(_0x529be7){return _0x529be7;});}return null;};}function removeEntity(_0x564f9a,_0x58ff2){return function(_0x2c1a1f){if(_0x2c1a1f){return _0x2c1a1f[_0x1a63('0x22')]()[_0x1a63('0x21')](function(){_0x564f9a[_0x1a63('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x233b12,_0x22b4e1){return function(_0x3b551f){if(!_0x3b551f){_0x233b12['sendStatus'](0x194);}return _0x3b551f;};}function handleError(_0x471f63,_0x41e05e){_0x41e05e=_0x41e05e||0x1f4;return function(_0x81548f){logger[_0x1a63('0x23')](_0x81548f['stack']);if(_0x81548f['name']){delete _0x81548f[_0x1a63('0x24')];}_0x471f63[_0x1a63('0x15')](_0x41e05e)[_0x1a63('0x25')](_0x81548f);};}exports[_0x1a63('0x26')]=function(_0xa125b3,_0x399570){var _0x5e6eee={'raw':!![],'where':{'id':_0xa125b3['params']['id']}},_0x177171={};_0x177171[_0x1a63('0x27')]=_[_0x1a63('0x28')](db['ChatProactiveAction'][_0x1a63('0x29')]);_0x177171[_0x1a63('0x2a')]=_[_0x1a63('0x28')](_0xa125b3[_0x1a63('0x2a')]);_0x177171['filters']=_['intersection'](_0x177171[_0x1a63('0x27')],_0x177171[_0x1a63('0x2a')]);_0x5e6eee['attributes']=_[_0x1a63('0x2b')](_0x177171[_0x1a63('0x27')],qs[_0x1a63('0x2c')](_0xa125b3[_0x1a63('0x2a')][_0x1a63('0x2c')]));_0x5e6eee[_0x1a63('0x2d')]=_0x5e6eee['attributes'][_0x1a63('0x2e')]?_0x5e6eee[_0x1a63('0x2d')]:_0x177171[_0x1a63('0x27')];if(_0xa125b3[_0x1a63('0x2a')]['includeAll']){_0x5e6eee['include']=[{'all':!![]}];}_0x5e6eee=_[_0x1a63('0x2f')]({},_0x5e6eee,_0xa125b3['options']);return db[_0x1a63('0x30')]['find'](_0x5e6eee)[_0x1a63('0x21')](handleEntityNotFound(_0x399570,null))[_0x1a63('0x21')](respondWithResult(_0x399570,null))['catch'](handleError(_0x399570,null));};exports[_0x1a63('0x31')]=function(_0x1cb941,_0x20b129){return db[_0x1a63('0x30')]['create'](_0x1cb941[_0x1a63('0x32')],{})[_0x1a63('0x21')](respondWithResult(_0x20b129,0xc9))[_0x1a63('0x33')](handleError(_0x20b129,null));};exports[_0x1a63('0x20')]=function(_0x3954a6,_0xbe34e1){if(_0x3954a6['body']['id']){delete _0x3954a6['body']['id'];}return db[_0x1a63('0x30')][_0x1a63('0x34')]({'where':{'id':_0x3954a6[_0x1a63('0x35')]['id']}})[_0x1a63('0x21')](handleEntityNotFound(_0xbe34e1,null))[_0x1a63('0x21')](saveUpdates(_0x3954a6[_0x1a63('0x32')],null))['then'](respondWithResult(_0xbe34e1,null))[_0x1a63('0x33')](handleError(_0xbe34e1,null));};exports['destroy']=function(_0x59f1bc,_0x4c0f37){return db['ChatProactiveAction'][_0x1a63('0x34')]({'where':{'id':_0x59f1bc['params']['id']}})[_0x1a63('0x21')](handleEntityNotFound(_0x4c0f37,null))['then'](removeEntity(_0x4c0f37,null))[_0x1a63('0x33')](handleError(_0x4c0f37,null));};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js
index 8f10ae7..684bfdc 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.model.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd9df=['path','../../config/environment','./chatProactiveAction.attributes','exports','ChatProactiveAction','lodash','util','api','moment','bluebird','request-promise'];(function(_0x4f6993,_0x372975){var _0x1e5f82=function(_0x81115e){while(--_0x81115e){_0x4f6993['push'](_0x4f6993['shift']());}};_0x1e5f82(++_0x372975);}(_0xd9df,0x15a));var _0xfd9d=function(_0x2b8ade,_0xffc2e){_0x2b8ade=_0x2b8ade-0x0;var _0x5dc3dc=_0xd9df[_0x2b8ade];return _0x5dc3dc;};'use strict';var _=require(_0xfd9d('0x0'));var util=require(_0xfd9d('0x1'));var logger=require('../../config/logger')(_0xfd9d('0x2'));var moment=require(_0xfd9d('0x3'));var BPromise=require(_0xfd9d('0x4'));var rp=require(_0xfd9d('0x5'));var fs=require('fs');var path=require(_0xfd9d('0x6'));var rimraf=require('rimraf');var config=require(_0xfd9d('0x7'));var attributes=require(_0xfd9d('0x8'));module[_0xfd9d('0x9')]=function(_0x54f01a,_0x177738){return _0x54f01a['define'](_0xfd9d('0xa'),attributes,{'tableName':'chat_proactive_actions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5d0a=['api','moment','bluebird','request-promise','rimraf','../../config/environment','./chatProactiveAction.attributes','define','ChatProactiveAction','chat_proactive_actions','lodash','../../config/logger'];(function(_0x108d2a,_0x261e03){var _0xb786b3=function(_0x317c6c){while(--_0x317c6c){_0x108d2a['push'](_0x108d2a['shift']());}};_0xb786b3(++_0x261e03);}(_0x5d0a,0x166));var _0xa5d0=function(_0xa46ce1,_0x555872){_0xa46ce1=_0xa46ce1-0x0;var _0x3d2de9=_0x5d0a[_0xa46ce1];return _0x3d2de9;};'use strict';var _=require(_0xa5d0('0x0'));var util=require('util');var logger=require(_0xa5d0('0x1'))(_0xa5d0('0x2'));var moment=require(_0xa5d0('0x3'));var BPromise=require(_0xa5d0('0x4'));var rp=require(_0xa5d0('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa5d0('0x6'));var config=require(_0xa5d0('0x7'));var attributes=require(_0xa5d0('0x8'));module['exports']=function(_0xaafd51,_0x26aff2){return _0xaafd51[_0xa5d0('0x9')](_0xa5d0('0xa'),attributes,{'tableName':_0xa5d0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
index 6767927..0345f92 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.rpc.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x05b0=['../../config/environment','jayson/promise','client','http','info','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','ChatProactiveAction,\x20%s,\x20%s','message','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x05b0,0x1db));var _0x005b=function(_0x50ab36,_0x4417d8){_0x50ab36=_0x50ab36-0x0;var _0x54988f=_0x05b0[_0x50ab36];return _0x54988f;};'use strict';var _=require(_0x005b('0x0'));var util=require(_0x005b('0x1'));var moment=require('moment');var BPromise=require(_0x005b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x005b('0x3'));var db=require(_0x005b('0x4'))['db'];var utils=require(_0x005b('0x5'));var logger=require(_0x005b('0x6'))(_0x005b('0x7'));var config=require(_0x005b('0x8'));var jayson=require(_0x005b('0x9'));var client=jayson[_0x005b('0xa')][_0x005b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x40f9ff,_0x2d29a8,_0x33dc00){return new BPromise(function(_0x538f2b,_0x33d53e){return client['request'](_0x40f9ff,_0x33dc00)['then'](function(_0x2f5145){logger[_0x005b('0xc')]('ChatProactiveAction,\x20%s,\x20%s',_0x2d29a8,'request\x20sent');logger[_0x005b('0xd')](_0x005b('0xe'),_0x2d29a8,_0x005b('0xf'),JSON[_0x005b('0x10')](_0x2f5145));if(_0x2f5145['error']){if(_0x2f5145['error'][_0x005b('0x11')]===0x1f4){logger[_0x005b('0x12')](_0x005b('0x13'),_0x2d29a8,_0x2f5145['error'][_0x005b('0x14')]);return _0x33d53e(_0x2f5145[_0x005b('0x12')][_0x005b('0x14')]);}logger[_0x005b('0x12')](_0x005b('0x13'),_0x2d29a8,_0x2f5145[_0x005b('0x12')][_0x005b('0x14')]);return _0x538f2b(_0x2f5145[_0x005b('0x12')]['message']);}else{logger[_0x005b('0xc')](_0x005b('0x13'),_0x2d29a8,_0x005b('0xf'));_0x538f2b(_0x2f5145['result'][_0x005b('0x14')]);}})['catch'](function(_0x256812){logger[_0x005b('0x12')](_0x005b('0x13'),_0x2d29a8,_0x256812);_0x33d53e(_0x256812);});});}
\ No newline at end of file
+var _0x0918=['ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x38d504,_0x477414){var _0x3a89d4=function(_0x5e459f){while(--_0x5e459f){_0x38d504['push'](_0x38d504['shift']());}};_0x3a89d4(++_0x477414);}(_0x0918,0x186));var _0x8091=function(_0x20114e,_0x22b501){_0x20114e=_0x20114e-0x0;var _0x3401af=_0x0918[_0x20114e];return _0x3401af;};'use strict';var _=require(_0x8091('0x0'));var util=require(_0x8091('0x1'));var moment=require(_0x8091('0x2'));var BPromise=require(_0x8091('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8091('0x4'));var db=require(_0x8091('0x5'))['db'];var utils=require(_0x8091('0x6'));var logger=require(_0x8091('0x7'))(_0x8091('0x8'));var config=require('../../config/environment');var jayson=require(_0x8091('0x9'));var client=jayson[_0x8091('0xa')][_0x8091('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1de51b,_0x1842ea,_0x4a6714){return new BPromise(function(_0x36b9f3,_0x413020){return client[_0x8091('0xc')](_0x1de51b,_0x4a6714)[_0x8091('0xd')](function(_0x17bda3){logger[_0x8091('0xe')](_0x8091('0xf'),_0x1842ea,_0x8091('0x10'));logger[_0x8091('0x11')](_0x8091('0x12'),_0x1842ea,_0x8091('0x10'),JSON[_0x8091('0x13')](_0x17bda3));if(_0x17bda3['error']){if(_0x17bda3[_0x8091('0x14')][_0x8091('0x15')]===0x1f4){logger[_0x8091('0x14')](_0x8091('0xf'),_0x1842ea,_0x17bda3[_0x8091('0x14')][_0x8091('0x16')]);return _0x413020(_0x17bda3['error']['message']);}logger[_0x8091('0x14')](_0x8091('0xf'),_0x1842ea,_0x17bda3[_0x8091('0x14')][_0x8091('0x16')]);return _0x36b9f3(_0x17bda3[_0x8091('0x14')][_0x8091('0x16')]);}else{logger[_0x8091('0xe')](_0x8091('0xf'),_0x1842ea,_0x8091('0x10'));_0x36b9f3(_0x17bda3['result']['message']);}})[_0x8091('0x17')](function(_0x16a89a){logger[_0x8091('0x14')](_0x8091('0xf'),_0x1842ea,_0x16a89a);_0x413020(_0x16a89a);});});}
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js
index 9af0d6d..b5c6a7c 100644
--- a/server/api/chatProactiveAction/index.js
+++ b/server/api/chatProactiveAction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xee14=['/:id','show','post','isAuthenticated','create','put','update','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatProactiveAction.controller'];(function(_0x5b6158,_0x5945f3){var _0x3b997b=function(_0x3546a5){while(--_0x3546a5){_0x5b6158['push'](_0x5b6158['shift']());}};_0x3b997b(++_0x5945f3);}(_0xee14,0x13a));var _0x4ee1=function(_0x2663d7,_0x52e530){_0x2663d7=_0x2663d7-0x0;var _0x1e196b=_0xee14[_0x2663d7];return _0x1e196b;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x4ee1('0x0'));var timeout=require(_0x4ee1('0x1'));var express=require(_0x4ee1('0x2'));var router=express[_0x4ee1('0x3')]();var fs_extra=require(_0x4ee1('0x4'));var auth=require(_0x4ee1('0x5'));var interaction=require(_0x4ee1('0x6'));var config=require(_0x4ee1('0x7'));var controller=require(_0x4ee1('0x8'));router['get'](_0x4ee1('0x9'),auth['isAuthenticated'](),controller[_0x4ee1('0xa')]);router[_0x4ee1('0xb')]('/',auth[_0x4ee1('0xc')](),controller[_0x4ee1('0xd')]);router[_0x4ee1('0xe')](_0x4ee1('0x9'),auth['isAuthenticated'](),controller[_0x4ee1('0xf')]);router[_0x4ee1('0x10')]('/:id',auth[_0x4ee1('0xc')](),controller[_0x4ee1('0x11')]);module[_0x4ee1('0x12')]=router;
\ No newline at end of file
+var _0xae24=['destroy','exports','multer','path','express','Router','../../components/interaction/service','./chatProactiveAction.controller','get','/:id','isAuthenticated','show','post','put','update','delete'];(function(_0x426cad,_0x45810d){var _0x50c00f=function(_0x470ff6){while(--_0x470ff6){_0x426cad['push'](_0x426cad['shift']());}};_0x50c00f(++_0x45810d);}(_0xae24,0x182));var _0x4ae2=function(_0x61cfa6,_0x304f3b){_0x61cfa6=_0x61cfa6-0x0;var _0x422ba0=_0xae24[_0x61cfa6];return _0x422ba0;};'use strict';var multer=require(_0x4ae2('0x0'));var util=require('util');var path=require(_0x4ae2('0x1'));var timeout=require('connect-timeout');var express=require(_0x4ae2('0x2'));var router=express[_0x4ae2('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x4ae2('0x4'));var config=require('../../config/environment');var controller=require(_0x4ae2('0x5'));router[_0x4ae2('0x6')](_0x4ae2('0x7'),auth[_0x4ae2('0x8')](),controller[_0x4ae2('0x9')]);router[_0x4ae2('0xa')]('/',auth['isAuthenticated'](),controller['create']);router[_0x4ae2('0xb')]('/:id',auth['isAuthenticated'](),controller[_0x4ae2('0xc')]);router[_0x4ae2('0xd')]('/:id',auth[_0x4ae2('0x8')](),controller[_0x4ae2('0xe')]);module[_0x4ae2('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js
index 9fc3172..76c0a07 100644
--- a/server/api/chatQueue/chatQueue.attributes.js
+++ b/server/api/chatQueue/chatQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa767=['roundrobin','sequelize','exports','name','INTEGER','ENUM','beepall'];(function(_0x4e2ed7,_0x30c7e8){var _0x1e96a6=function(_0x22f860){while(--_0x22f860){_0x4e2ed7['push'](_0x4e2ed7['shift']());}};_0x1e96a6(++_0x30c7e8);}(_0xa767,0xef));var _0x7a76=function(_0x186020,_0x1fc7f9){_0x186020=_0x186020-0x0;var _0x30380a=_0xa767[_0x186020];return _0x30380a;};'use strict';var Sequelize=require(_0x7a76('0x0'));module[_0x7a76('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x7a76('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0x7a76('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x7a76('0x4')]('rrmemory',_0x7a76('0x5'),_0x7a76('0x6'))}};
\ No newline at end of file
+var _0x189e=['ENUM','rrmemory','beepall','exports','STRING','name','INTEGER'];(function(_0xa95a73,_0x1a75a4){var _0x386dbf=function(_0x214591){while(--_0x214591){_0xa95a73['push'](_0xa95a73['shift']());}};_0x386dbf(++_0x1a75a4);}(_0x189e,0xf8));var _0xe189=function(_0x47a573,_0x5677f5){_0x47a573=_0x47a573-0x0;var _0x69abbf=_0x189e[_0x47a573];return _0x69abbf;};'use strict';var Sequelize=require('sequelize');module[_0xe189('0x0')]={'name':{'type':Sequelize[_0xe189('0x1')],'unique':_0xe189('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0xe189('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xe189('0x4')](_0xe189('0x5'),_0xe189('0x6'),'roundrobin')}};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js
index 505bd15..b9301d4 100644
--- a/server/api/chatQueue/chatQueue.controller.js
+++ b/server/api/chatQueue/chatQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa7b6=['online','interface','flatMap','sequelize','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','select','field','tq.TeamId','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','includes','value','transaction','isEmpty','removeAgents','addAgents','omit','spread','userChatQueue:remove','findOne','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','./chatQueue.socket','register','client','http','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','destroy','get','ChatQueues','UserProfileResource','end','stack','name','send','ChatQueue','rawAttributes','fieldName','type','key','model','map','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','includeAll','include','rows','show','params','length','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','find','describe','ChatQueueId','findAll','User','UserId','agent','updatedAt','format','SIP','chatPause','createdAt','Team','getTeams','ids','Agents'];(function(_0x46aff0,_0x122890){var _0x9d78cf=function(_0x3f14cb){while(--_0x3f14cb){_0x46aff0['push'](_0x46aff0['shift']());}};_0x9d78cf(++_0x122890);}(_0xa7b6,0x1e2));var _0x6a7b=function(_0x46d87a,_0x5183db){_0x46d87a=_0x46d87a-0x0;var _0x115296=_0xa7b6[_0x46d87a];return _0x115296;};'use strict';var emlformat=require(_0x6a7b('0x0'));var rimraf=require(_0x6a7b('0x1'));var zipdir=require(_0x6a7b('0x2'));var jsonpatch=require(_0x6a7b('0x3'));var rp=require(_0x6a7b('0x4'));var moment=require('moment');var BPromise=require(_0x6a7b('0x5'));var Mustache=require(_0x6a7b('0x6'));var util=require(_0x6a7b('0x7'));var path=require(_0x6a7b('0x8'));var sox=require(_0x6a7b('0x9'));var csv=require(_0x6a7b('0xa'));var ejs=require(_0x6a7b('0xb'));var fs=require('fs');var fs_extra=require(_0x6a7b('0xc'));var _=require('lodash');var squel=require(_0x6a7b('0xd'));var crypto=require(_0x6a7b('0xe'));var jsforce=require(_0x6a7b('0xf'));var deskjs=require(_0x6a7b('0x10'));var toCsv=require(_0x6a7b('0xa'));var querystring=require(_0x6a7b('0x11'));var Papa=require(_0x6a7b('0x12'));var Redis=require('ioredis');var authService=require(_0x6a7b('0x13'));var qs=require(_0x6a7b('0x14'));var as=require(_0x6a7b('0x15'));var hardwareService=require(_0x6a7b('0x16'));var logger=require('../../config/logger')('api');var utils=require(_0x6a7b('0x17'));var config=require(_0x6a7b('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x6a7b('0x19'))['db'];config[_0x6a7b('0x1a')]=_[_0x6a7b('0x1b')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x6a7b('0x1a')]));require(_0x6a7b('0x1c'))[_0x6a7b('0x1d')](socket);var jayson=require('jayson/promise');var client=jayson[_0x6a7b('0x1e')][_0x6a7b('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x10fd3d,_0x364445,_0x81b666,_0x2f382c){return new BPromise(function(_0x1a0df4,_0x384ba5){var _0x2ca0f1=_0x2f382c||client;return _0x2ca0f1['request'](_0x10fd3d,_0x81b666)[_0x6a7b('0x20')](function(_0x2dc884){logger[_0x6a7b('0x21')](_0x6a7b('0x22'),_0x364445,_0x6a7b('0x23'));logger[_0x6a7b('0x24')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x364445,'request\x20sent',JSON['stringify'](_0x2dc884));if(_0x2dc884[_0x6a7b('0x25')]){if(_0x2dc884[_0x6a7b('0x25')][_0x6a7b('0x26')]===0x1f4){logger[_0x6a7b('0x25')](_0x6a7b('0x22'),_0x364445,_0x2dc884['error']['message']);return _0x384ba5(_0x2dc884[_0x6a7b('0x25')][_0x6a7b('0x27')]);}logger[_0x6a7b('0x25')](_0x6a7b('0x22'),_0x364445,_0x2dc884['error'][_0x6a7b('0x27')]);return _0x1a0df4(_0x2dc884[_0x6a7b('0x25')][_0x6a7b('0x27')]);}else{logger['info'](_0x6a7b('0x22'),_0x364445,_0x6a7b('0x23'));_0x1a0df4(_0x2dc884[_0x6a7b('0x28')][_0x6a7b('0x27')]);}})[_0x6a7b('0x29')](function(_0x5e4f96){logger[_0x6a7b('0x25')]('ChatQueue,\x20%s,\x20%s',_0x364445,_0x5e4f96);_0x384ba5(_0x5e4f96);});});}function respondWithStatusCode(_0x358ec7,_0x379b59){_0x379b59=_0x379b59||0xcc;return function(_0x3818a9){if(_0x3818a9){return _0x358ec7[_0x6a7b('0x2a')](_0x379b59);}return _0x358ec7[_0x6a7b('0x2b')](_0x379b59)['end']();};}function respondWithResult(_0x42198c,_0x5076ff){_0x5076ff=_0x5076ff||0xc8;return function(_0x363125){if(_0x363125){return _0x42198c[_0x6a7b('0x2b')](_0x5076ff)[_0x6a7b('0x2c')](_0x363125);}};}function respondWithFilteredResult(_0x2f006c,_0x54e3fa){return function(_0x15c09a){if(_0x15c09a){var _0x11141f=typeof _0x54e3fa[_0x6a7b('0x2d')]==='undefined'&&typeof _0x54e3fa[_0x6a7b('0x2e')]===_0x6a7b('0x2f');var _0x494cd8=_0x15c09a[_0x6a7b('0x30')];var _0x1c6d15=_0x11141f?0x0:_0x54e3fa[_0x6a7b('0x2d')];var _0x3cd9be=_0x11141f?_0x15c09a[_0x6a7b('0x30')]:_0x54e3fa[_0x6a7b('0x2d')]+_0x54e3fa[_0x6a7b('0x2e')];var _0x499b8d;if(_0x3cd9be>=_0x494cd8){_0x3cd9be=_0x494cd8;_0x499b8d=0xc8;}else{_0x499b8d=0xce;}_0x2f006c[_0x6a7b('0x2b')](_0x499b8d);return _0x2f006c[_0x6a7b('0x31')](_0x6a7b('0x32'),_0x1c6d15+'-'+_0x3cd9be+'/'+_0x494cd8)[_0x6a7b('0x2c')](_0x15c09a);}return null;};}function patchUpdates(_0x1624d7){return function(_0x5544d1){try{jsonpatch[_0x6a7b('0x33')](_0x5544d1,_0x1624d7,!![]);}catch(_0x453171){return BPromise[_0x6a7b('0x34')](_0x453171);}return _0x5544d1[_0x6a7b('0x35')]();};}function saveUpdates(_0x4a7cfa,_0x2e9bfd){return function(_0x122a8b){if(_0x122a8b){return _0x122a8b[_0x6a7b('0x36')](_0x4a7cfa)[_0x6a7b('0x20')](function(_0x2513fd){return _0x2513fd;});}return null;};}function removeEntity(_0x2da23c,_0x1ffb70){return function(_0x9c9233){if(_0x9c9233){return _0x9c9233[_0x6a7b('0x37')]()[_0x6a7b('0x20')](function(){var _0x117e8c=_0x9c9233[_0x6a7b('0x38')]({'plain':!![]});var _0x545a22=_0x6a7b('0x39');return db[_0x6a7b('0x3a')][_0x6a7b('0x37')]({'where':{'type':_0x545a22,'resourceId':_0x117e8c['id']}})['then'](function(){return _0x9c9233;});})[_0x6a7b('0x20')](function(){_0x2da23c['status'](0xcc)[_0x6a7b('0x3b')]();});}};}function handleEntityNotFound(_0x4eb242,_0x3eeeea){return function(_0x5366e5){if(!_0x5366e5){_0x4eb242['sendStatus'](0x194);}return _0x5366e5;};}function handleError(_0x36ca41,_0x56610f){_0x56610f=_0x56610f||0x1f4;return function(_0x59c3ca){logger[_0x6a7b('0x25')](_0x59c3ca[_0x6a7b('0x3c')]);if(_0x59c3ca[_0x6a7b('0x3d')]){delete _0x59c3ca[_0x6a7b('0x3d')];}_0x36ca41[_0x6a7b('0x2b')](_0x56610f)[_0x6a7b('0x3e')](_0x59c3ca);};}exports['index']=function(_0x56c3d0,_0x686c40){var _0x480af9={},_0x46edd6={},_0x353dbf={'count':0x0,'rows':[]};var _0x548d97=_['map'](db[_0x6a7b('0x3f')][_0x6a7b('0x40')],function(_0x1b05fc){return{'name':_0x1b05fc[_0x6a7b('0x41')],'type':_0x1b05fc[_0x6a7b('0x42')][_0x6a7b('0x43')]};});_0x46edd6[_0x6a7b('0x44')]=_[_0x6a7b('0x45')](_0x548d97,_0x6a7b('0x3d'));_0x46edd6[_0x6a7b('0x46')]=_[_0x6a7b('0x47')](_0x56c3d0[_0x6a7b('0x46')]);_0x46edd6['filters']=_[_0x6a7b('0x48')](_0x46edd6[_0x6a7b('0x44')],_0x46edd6['query']);_0x480af9[_0x6a7b('0x49')]=_['intersection'](_0x46edd6[_0x6a7b('0x44')],qs[_0x6a7b('0x4a')](_0x56c3d0[_0x6a7b('0x46')][_0x6a7b('0x4a')]));_0x480af9[_0x6a7b('0x49')]=_0x480af9[_0x6a7b('0x49')]['length']?_0x480af9['attributes']:_0x46edd6[_0x6a7b('0x44')];if(!_0x56c3d0[_0x6a7b('0x46')][_0x6a7b('0x4b')](_0x6a7b('0x4c'))){_0x480af9[_0x6a7b('0x2e')]=qs[_0x6a7b('0x2e')](_0x56c3d0[_0x6a7b('0x46')][_0x6a7b('0x2e')]);_0x480af9['offset']=qs[_0x6a7b('0x2d')](_0x56c3d0[_0x6a7b('0x46')][_0x6a7b('0x2d')]);}_0x480af9[_0x6a7b('0x4d')]=qs[_0x6a7b('0x4e')](_0x56c3d0['query'][_0x6a7b('0x4e')]);_0x480af9[_0x6a7b('0x4f')]=qs[_0x6a7b('0x50')](_[_0x6a7b('0x51')](_0x56c3d0[_0x6a7b('0x46')],_0x46edd6[_0x6a7b('0x50')]),_0x548d97);if(_0x56c3d0['query'][_0x6a7b('0x52')]){_0x480af9[_0x6a7b('0x4f')]=_[_0x6a7b('0x53')](_0x480af9[_0x6a7b('0x4f')],{'$or':_[_0x6a7b('0x45')](_0x548d97,function(_0x4af59a){if(_0x4af59a[_0x6a7b('0x42')]!=='VIRTUAL'){var _0x10db57={};_0x10db57[_0x4af59a[_0x6a7b('0x3d')]]={'$like':'%'+_0x56c3d0[_0x6a7b('0x46')][_0x6a7b('0x52')]+'%'};return _0x10db57;}})});}_0x480af9=_[_0x6a7b('0x53')]({},_0x480af9,_0x56c3d0[_0x6a7b('0x54')]);var _0x424b8a={'where':_0x480af9['where']};return db['ChatQueue'][_0x6a7b('0x30')](_0x424b8a)[_0x6a7b('0x20')](function(_0x378d6d){_0x353dbf['count']=_0x378d6d;if(_0x56c3d0['query'][_0x6a7b('0x55')]){_0x480af9[_0x6a7b('0x56')]=[{'all':!![]}];}return db['ChatQueue']['findAll'](_0x480af9);})[_0x6a7b('0x20')](function(_0x559a7a){_0x353dbf[_0x6a7b('0x57')]=_0x559a7a;return _0x353dbf;})['then'](respondWithFilteredResult(_0x686c40,_0x480af9))['catch'](handleError(_0x686c40,null));};exports[_0x6a7b('0x58')]=function(_0x1f57e3,_0x15431d){var _0x43cf79={'raw':!![],'where':{'id':_0x1f57e3[_0x6a7b('0x59')]['id']}},_0xd5e09={};_0xd5e09[_0x6a7b('0x44')]=_['keys'](db[_0x6a7b('0x3f')][_0x6a7b('0x40')]);_0xd5e09[_0x6a7b('0x46')]=_['keys'](_0x1f57e3[_0x6a7b('0x46')]);_0xd5e09[_0x6a7b('0x50')]=_[_0x6a7b('0x48')](_0xd5e09[_0x6a7b('0x44')],_0xd5e09[_0x6a7b('0x46')]);_0x43cf79[_0x6a7b('0x49')]=_[_0x6a7b('0x48')](_0xd5e09[_0x6a7b('0x44')],qs[_0x6a7b('0x4a')](_0x1f57e3[_0x6a7b('0x46')][_0x6a7b('0x4a')]));_0x43cf79[_0x6a7b('0x49')]=_0x43cf79[_0x6a7b('0x49')][_0x6a7b('0x5a')]?_0x43cf79[_0x6a7b('0x49')]:_0xd5e09[_0x6a7b('0x44')];if(_0x1f57e3['query'][_0x6a7b('0x55')]){_0x43cf79[_0x6a7b('0x56')]=[{'all':!![]}];}_0x43cf79=_[_0x6a7b('0x53')]({},_0x43cf79,_0x1f57e3[_0x6a7b('0x54')]);return db[_0x6a7b('0x3f')]['find'](_0x43cf79)[_0x6a7b('0x20')](handleEntityNotFound(_0x15431d,null))['then'](respondWithResult(_0x15431d,null))[_0x6a7b('0x29')](handleError(_0x15431d,null));};exports[_0x6a7b('0x5b')]=function(_0x140f11,_0x3fbbeb){return db[_0x6a7b('0x3f')][_0x6a7b('0x5b')](_0x140f11[_0x6a7b('0x5c')],{})[_0x6a7b('0x20')](function(_0x11ace1){var _0x3a3135=_0x140f11[_0x6a7b('0x5d')]['get']({'plain':!![]});if(!_0x3a3135)throw new Error(_0x6a7b('0x5e'));if(_0x3a3135['role']===_0x6a7b('0x5d')){var _0x59f2f7=_0x11ace1[_0x6a7b('0x38')]({'plain':!![]});var _0x4715ab=_0x6a7b('0x39');return db[_0x6a7b('0x5f')]['find']({'where':{'name':_0x4715ab,'userProfileId':_0x3a3135[_0x6a7b('0x60')]},'raw':!![]})['then'](function(_0x4d8319){if(_0x4d8319&&_0x4d8319[_0x6a7b('0x61')]===0x0){return db[_0x6a7b('0x3a')]['create']({'name':_0x59f2f7[_0x6a7b('0x3d')],'resourceId':_0x59f2f7['id'],'type':_0x4d8319['name'],'sectionId':_0x4d8319['id']},{})[_0x6a7b('0x20')](function(){return _0x11ace1;});}else{return _0x11ace1;}})[_0x6a7b('0x29')](function(_0x4ba35c){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4ba35c);throw _0x4ba35c;});}return _0x11ace1;})[_0x6a7b('0x20')](respondWithResult(_0x3fbbeb,0xc9))['catch'](handleError(_0x3fbbeb,null));};exports[_0x6a7b('0x36')]=function(_0x19549e,_0x429c84){if(_0x19549e['body']['id']){delete _0x19549e[_0x6a7b('0x5c')]['id'];}return db['ChatQueue'][_0x6a7b('0x62')]({'where':{'id':_0x19549e['params']['id']}})['then'](handleEntityNotFound(_0x429c84,null))[_0x6a7b('0x20')](saveUpdates(_0x19549e[_0x6a7b('0x5c')],null))[_0x6a7b('0x20')](respondWithResult(_0x429c84,null))['catch'](handleError(_0x429c84,null));};exports[_0x6a7b('0x37')]=function(_0x1ba501,_0x4f6287){return db[_0x6a7b('0x3f')][_0x6a7b('0x62')]({'where':{'id':_0x1ba501[_0x6a7b('0x59')]['id']}})[_0x6a7b('0x20')](handleEntityNotFound(_0x4f6287,null))[_0x6a7b('0x20')](removeEntity(_0x4f6287,null))['catch'](handleError(_0x4f6287,null));};exports[_0x6a7b('0x63')]=function(_0x549757,_0x11967b){return db[_0x6a7b('0x3f')]['describe']()['then'](respondWithResult(_0x11967b,null))[_0x6a7b('0x29')](handleError(_0x11967b,null));};exports['getMembers']=function(_0x512e1a,_0x4ed941,_0x184479){var _0x124f50={'raw':!![],'where':{}},_0x3a7e11={},_0x46925e;return db[_0x6a7b('0x3f')]['findOne']({'where':{'id':_0x512e1a[_0x6a7b('0x59')]['id']}})[_0x6a7b('0x20')](handleEntityNotFound(_0x4ed941,null))[_0x6a7b('0x20')](function(_0x4b804f){if(_0x4b804f){_0x46925e=_0x4b804f[_0x6a7b('0x38')]({'plain':!![]});_0x3a7e11[_0x6a7b('0x44')]=_[_0x6a7b('0x47')](db['UserChatQueue']['rawAttributes']);_0x3a7e11[_0x6a7b('0x46')]=_[_0x6a7b('0x47')](_0x512e1a[_0x6a7b('0x46')]);_0x3a7e11[_0x6a7b('0x50')]=_['intersection'](_0x3a7e11[_0x6a7b('0x44')],_0x3a7e11['query']);_0x124f50[_0x6a7b('0x49')]=_[_0x6a7b('0x48')](_0x3a7e11[_0x6a7b('0x44')],qs['fields'](_0x512e1a[_0x6a7b('0x46')][_0x6a7b('0x4a')]));_0x124f50['attributes']=_0x124f50[_0x6a7b('0x49')][_0x6a7b('0x5a')]?_0x124f50[_0x6a7b('0x49')]:_0x3a7e11[_0x6a7b('0x44')];if(!_0x512e1a['query'][_0x6a7b('0x4b')](_0x6a7b('0x4c'))){_0x124f50['limit']=qs[_0x6a7b('0x2e')](_0x512e1a[_0x6a7b('0x46')]['limit']);_0x124f50['offset']=qs[_0x6a7b('0x2d')](_0x512e1a[_0x6a7b('0x46')][_0x6a7b('0x2d')]);}_0x124f50[_0x6a7b('0x4d')]=qs['sort'](_0x512e1a[_0x6a7b('0x46')][_0x6a7b('0x4e')]);_0x124f50[_0x6a7b('0x4f')]=qs[_0x6a7b('0x50')](_[_0x6a7b('0x51')](_0x512e1a[_0x6a7b('0x46')],_0x3a7e11[_0x6a7b('0x50')]));_0x124f50[_0x6a7b('0x4f')][_0x6a7b('0x64')]=_0x4b804f['id'];if(_0x512e1a[_0x6a7b('0x46')][_0x6a7b('0x52')]){_0x124f50[_0x6a7b('0x4f')]=_[_0x6a7b('0x53')](_0x124f50[_0x6a7b('0x4f')],{'$or':_[_0x6a7b('0x45')](_0x124f50[_0x6a7b('0x49')],function(_0x18499f){var _0x4e518a={};_0x4e518a[_0x18499f]={'$like':'%'+_0x512e1a[_0x6a7b('0x46')]['filter']+'%'};return _0x4e518a;})});}_0x124f50=_[_0x6a7b('0x53')]({},_0x124f50,_0x512e1a[_0x6a7b('0x54')]);return db['UserChatQueue'][_0x6a7b('0x65')](_0x124f50);}})[_0x6a7b('0x20')](function(_0x26514c){if(_0x26514c){return db[_0x6a7b('0x66')]['findAndCountAll']({'where':{'id':_[_0x6a7b('0x45')](_0x26514c,_0x6a7b('0x67')),'role':_0x6a7b('0x68')},'attributes':['id',_0x6a7b('0x3d'),'chatPause',_0x6a7b('0x69'),'createdAt']});}})[_0x6a7b('0x20')](function(_0x49e0cb){if(_0x49e0cb){return{'count':_0x49e0cb[_0x6a7b('0x30')],'rows':_[_0x6a7b('0x45')](_0x49e0cb['rows'],function(_0x46bddf){return{'membername':_0x46bddf[_0x6a7b('0x3d')],'UserId':_0x46bddf['id'],'queue_name':_0x46925e[_0x6a7b('0x3d')],'ChatQueueId':_0x46925e['id'],'interface':util[_0x6a7b('0x6a')]('%s/%s',_0x6a7b('0x6b'),_0x46bddf[_0x6a7b('0x3d')]),'penalty':0x0,'paused':_0x46bddf[_0x6a7b('0x6c')],'createdAt':_0x46bddf[_0x6a7b('0x6d')],'updatedAt':_0x46bddf[_0x6a7b('0x69')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x6a7b('0x20')](respondWithFilteredResult(_0x4ed941,_0x124f50))[_0x6a7b('0x29')](handleError(_0x4ed941,null));};exports['getTeams']=function(_0x3e628f,_0x2ac6c6,_0x3e3552){var _0x3166ed={};var _0x5147c6={};var _0x189395;var _0x53fd07;return db[_0x6a7b('0x3f')]['findOne']({'where':{'id':_0x3e628f[_0x6a7b('0x59')]['id']}})[_0x6a7b('0x20')](handleEntityNotFound(_0x2ac6c6,null))[_0x6a7b('0x20')](function(_0x188916){if(_0x188916){_0x189395=_0x188916;_0x5147c6[_0x6a7b('0x44')]=_['keys'](db[_0x6a7b('0x6e')][_0x6a7b('0x40')]);_0x5147c6[_0x6a7b('0x46')]=_['keys'](_0x3e628f[_0x6a7b('0x46')]);_0x5147c6[_0x6a7b('0x50')]=_['intersection'](_0x5147c6[_0x6a7b('0x44')],_0x5147c6[_0x6a7b('0x46')]);_0x3166ed['attributes']=_[_0x6a7b('0x48')](_0x5147c6['model'],qs[_0x6a7b('0x4a')](_0x3e628f[_0x6a7b('0x46')][_0x6a7b('0x4a')]));_0x3166ed[_0x6a7b('0x49')]=_0x3166ed['attributes'][_0x6a7b('0x5a')]?_0x3166ed[_0x6a7b('0x49')]:_0x5147c6[_0x6a7b('0x44')];_0x3166ed[_0x6a7b('0x4d')]=qs[_0x6a7b('0x4e')](_0x3e628f['query']['sort']);_0x3166ed[_0x6a7b('0x4f')]=qs[_0x6a7b('0x50')](_[_0x6a7b('0x51')](_0x3e628f[_0x6a7b('0x46')],_0x5147c6['filters']));if(_0x3e628f['query']['filter']){_0x3166ed[_0x6a7b('0x4f')]=_[_0x6a7b('0x53')](_0x3166ed['where'],{'$or':_['map'](_0x3166ed['attributes'],function(_0x14f942){var _0x29055f={};_0x29055f[_0x14f942]={'$like':'%'+_0x3e628f['query'][_0x6a7b('0x52')]+'%'};return _0x29055f;})});}_0x3166ed=_[_0x6a7b('0x53')]({},_0x3166ed,_0x3e628f[_0x6a7b('0x54')]);return _0x189395[_0x6a7b('0x6f')](_0x3166ed);}})[_0x6a7b('0x20')](function(_0x426179){if(_0x426179){_0x53fd07=_0x426179[_0x6a7b('0x5a')];if(!_0x3e628f[_0x6a7b('0x46')]['hasOwnProperty'](_0x6a7b('0x4c'))){_0x3166ed[_0x6a7b('0x2e')]=qs['limit'](_0x3e628f[_0x6a7b('0x46')]['limit']);_0x3166ed[_0x6a7b('0x2d')]=qs[_0x6a7b('0x2d')](_0x3e628f[_0x6a7b('0x46')][_0x6a7b('0x2d')]);}return _0x189395[_0x6a7b('0x6f')](_0x3166ed);}})[_0x6a7b('0x20')](function(_0x4a5712){if(_0x4a5712){return _0x4a5712?{'count':_0x53fd07,'rows':_0x4a5712}:null;}})['then'](respondWithResult(_0x2ac6c6,null))[_0x6a7b('0x29')](handleError(_0x2ac6c6,null));};exports['addTeams']=function(_0x326e4b,_0x1708b6,_0x552dea){var _0x157931=_0x326e4b[_0x6a7b('0x5c')][_0x6a7b('0x70')];return db[_0x6a7b('0x6e')][_0x6a7b('0x65')]({'where':{'id':_0x157931},'attributes':['id'],'include':[{'model':db['User'],'as':_0x6a7b('0x71'),'attributes':['id',_0x6a7b('0x3d'),_0x6a7b('0x72'),'voicePause',_0x6a7b('0x73')],'raw':!![]}]})[_0x6a7b('0x20')](function(_0x23149d){if(_0x23149d){var _0x137031=_[_0x6a7b('0x74')](_0x23149d,function(_0x2def2d){var _0x176f77=_0x2def2d[_0x6a7b('0x38')]({'plain':!![]});return _0x176f77[_0x6a7b('0x71')];});return db['ChatQueue'][_0x6a7b('0x62')]({'where':{'id':_0x326e4b[_0x6a7b('0x59')]['id']}})[_0x6a7b('0x20')](function(_0x266d60){return db[_0x6a7b('0x75')]['transaction'](function(_0x104288){return _0x266d60['addTeams'](_0x157931,{'transaction':_0x104288})[_0x6a7b('0x20')](function(){return BPromise['each'](_0x137031,function(_0x4b69a8){return db['UserChatQueue'][_0x6a7b('0x76')]({'where':{'UserId':_0x4b69a8['id'],'ChatQueueId':_0x326e4b[_0x6a7b('0x59')]['id']},'transaction':_0x104288});});})[_0x6a7b('0x20')](function(){_0x137031[_0x6a7b('0x77')](function(_0x1f661b){socket[_0x6a7b('0x78')](_0x6a7b('0x79'),{'UserId':_0x1f661b['id'],'ChatQueueId':_0x266d60['id']});});});});});}})[_0x6a7b('0x20')](respondWithStatusCode(_0x1708b6,null))[_0x6a7b('0x29')](handleError(_0x1708b6,null));};exports[_0x6a7b('0x7a')]=function(_0xd4a74b,_0x3fd10e,_0x2196da){return db[_0x6a7b('0x6e')]['findAll']({'where':{'id':_0xd4a74b[_0x6a7b('0x46')]['ids']},'attributes':['id'],'include':[{'model':db[_0x6a7b('0x66')],'as':_0x6a7b('0x71'),'attributes':['id'],'raw':!![]}]})[_0x6a7b('0x20')](handleEntityNotFound(_0x3fd10e,null))[_0x6a7b('0x20')](function(_0x17579c){var _0x3cb02d=_[_0x6a7b('0x45')](_0x17579c,'id');var _0x3af817=[];var _0xb64bc5=[];var _0x5e5113=squel[_0x6a7b('0x7b')]();_0x5e5113[_0x6a7b('0x7c')](_0x6a7b('0x7d'))['from'](_0x6a7b('0x7e'),'tq')[_0x6a7b('0x7f')](_0x6a7b('0x80'),'ut',_0x6a7b('0x81'))['where']('ChatQueueId\x20=\x20?',_0xd4a74b['params']['id']);for(var _0x3f22a5=0x0;_0x3f22a5<_0x17579c[_0x6a7b('0x5a')];_0x3f22a5+=0x1){let _0x80b7be=_0x17579c[_0x3f22a5];for(var _0x46f90f=0x0;_0x46f90f<_0x80b7be['Agents'][_0x6a7b('0x5a')];_0x46f90f+=0x1){let _0xd74527=_0x80b7be[_0x6a7b('0x71')][_0x46f90f];var _0xe949cd=_0x5e5113[_0x6a7b('0x82')]();_0xe949cd[_0x6a7b('0x4f')](_0x6a7b('0x83'),_0xd74527['id']);_0xb64bc5[_0x6a7b('0x84')](db[_0x6a7b('0x75')][_0x6a7b('0x46')](_0xe949cd[_0x6a7b('0x85')](),{'type':db[_0x6a7b('0x75')][_0x6a7b('0x86')][_0x6a7b('0x87')]})[_0x6a7b('0x20')](function(_0x5c57ce){if(_0x5c57ce[_0x6a7b('0x5a')]===0x1){return _0xd74527['id'];}else{var _0x1878f9=_[_0x6a7b('0x88')](_[_0x6a7b('0x45')](_0x5c57ce,_0x6a7b('0x89')),function(_0x3964d7){return _[_0x6a7b('0x8a')](_0x3cb02d,_0x3964d7);});if(_0x1878f9){return _0xd74527['id'];}}}));}}return BPromise['all'](_0xb64bc5)['then'](function(_0x1c4927){_0x3af817=_(_0x3af817)['union'](_0x1c4927)['compact']()[_0x6a7b('0x8b')]();return db['ChatQueue'][_0x6a7b('0x62')]({'where':{'id':_0xd4a74b[_0x6a7b('0x59')]['id']}})['then'](function(_0x44656c){return db[_0x6a7b('0x75')][_0x6a7b('0x8c')](function(_0x4e0297){return _0x44656c[_0x6a7b('0x7a')](_0xd4a74b[_0x6a7b('0x46')][_0x6a7b('0x70')],{'transaction':_0x4e0297})[_0x6a7b('0x20')](function(){if(!_[_0x6a7b('0x8d')](_0x3af817)){return _0x44656c[_0x6a7b('0x8e')](_0x3af817,{'transaction':_0x4e0297});}})[_0x6a7b('0x20')](function(){_0x3af817[_0x6a7b('0x77')](function(_0x5cbe0d){socket[_0x6a7b('0x78')]('userChatQueue:remove',{'UserId':_0x5cbe0d,'ChatQueueId':_0x44656c['id']});});});});});});})['then'](respondWithStatusCode(_0x3fd10e,null))[_0x6a7b('0x29')](handleError(_0x3fd10e,null));};exports[_0x6a7b('0x8f')]=function(_0x5cf49d,_0x855f2a,_0x71d4ec){return db[_0x6a7b('0x3f')]['find']({'where':{'id':_0x5cf49d[_0x6a7b('0x59')]['id']}})[_0x6a7b('0x20')](handleEntityNotFound(_0x855f2a,null))[_0x6a7b('0x20')](function(_0x4a202b){if(_0x4a202b){return _0x4a202b[_0x6a7b('0x8f')](_0x5cf49d[_0x6a7b('0x5c')][_0x6a7b('0x70')],_[_0x6a7b('0x90')](_0x5cf49d[_0x6a7b('0x5c')],[_0x6a7b('0x70'),'id'])||{})[_0x6a7b('0x91')](function(_0x5c854f){for(var _0x28737c=0x0;_0x28737c<_0x5cf49d[_0x6a7b('0x5c')][_0x6a7b('0x70')][_0x6a7b('0x5a')];_0x28737c+=0x1){socket[_0x6a7b('0x78')](_0x6a7b('0x79'),{'UserId':Number(_0x5cf49d['body'][_0x6a7b('0x70')][_0x28737c]),'ChatQueueId':Number(_0x5cf49d[_0x6a7b('0x59')]['id'])});}return _0x5c854f;});}})[_0x6a7b('0x20')](respondWithResult(_0x855f2a,null))[_0x6a7b('0x29')](handleError(_0x855f2a,null));};exports[_0x6a7b('0x8e')]=function(_0xfd7fbd,_0x19d2e0,_0x17d78c){return db[_0x6a7b('0x3f')]['find']({'where':{'id':_0xfd7fbd[_0x6a7b('0x59')]['id']}})['then'](handleEntityNotFound(_0x19d2e0,null))[_0x6a7b('0x20')](function(_0x11d215){if(_0x11d215){return _0x11d215[_0x6a7b('0x8e')](_0xfd7fbd[_0x6a7b('0x46')]['ids'])[_0x6a7b('0x20')](function(){if(_['isArray'](_0xfd7fbd[_0x6a7b('0x46')]['ids'])){for(var _0x3ea18f=0x0;_0x3ea18f<_0xfd7fbd[_0x6a7b('0x46')]['ids'][_0x6a7b('0x5a')];_0x3ea18f+=0x1){socket[_0x6a7b('0x78')](_0x6a7b('0x92'),{'UserId':Number(_0xfd7fbd[_0x6a7b('0x46')][_0x6a7b('0x70')][_0x3ea18f]),'ChatQueueId':Number(_0xfd7fbd[_0x6a7b('0x59')]['id'])});}}else{socket[_0x6a7b('0x78')]('userChatQueue:remove',{'UserId':Number(_0xfd7fbd[_0x6a7b('0x46')][_0x6a7b('0x70')]),'ChatQueueId':Number(_0xfd7fbd[_0x6a7b('0x59')]['id'])});}});}})[_0x6a7b('0x20')](respondWithStatusCode(_0x19d2e0,null))[_0x6a7b('0x29')](handleError(_0x19d2e0,null));};exports['getAgents']=function(_0x4ec632,_0x433430,_0x47a119){var _0x2ff3d0={};var _0x2416f7={};var _0x316dd2;var _0x2bd7d9;return db[_0x6a7b('0x3f')][_0x6a7b('0x93')]({'where':{'id':_0x4ec632[_0x6a7b('0x59')]['id']}})['then'](handleEntityNotFound(_0x433430,null))[_0x6a7b('0x20')](function(_0x1d84ec){if(_0x1d84ec){_0x316dd2=_0x1d84ec;_0x2416f7[_0x6a7b('0x44')]=_['keys'](db[_0x6a7b('0x66')][_0x6a7b('0x40')]);_0x2416f7['query']=_[_0x6a7b('0x47')](_0x4ec632[_0x6a7b('0x46')]);_0x2416f7[_0x6a7b('0x50')]=_['intersection'](_0x2416f7[_0x6a7b('0x44')],_0x2416f7[_0x6a7b('0x46')]);_0x2ff3d0[_0x6a7b('0x49')]=_['intersection'](_0x2416f7[_0x6a7b('0x44')],qs[_0x6a7b('0x4a')](_0x4ec632[_0x6a7b('0x46')]['fields']));_0x2ff3d0[_0x6a7b('0x49')]=_0x2ff3d0[_0x6a7b('0x49')][_0x6a7b('0x5a')]?_0x2ff3d0[_0x6a7b('0x49')]:_0x2416f7[_0x6a7b('0x44')];_0x2ff3d0[_0x6a7b('0x4d')]=qs['sort'](_0x4ec632[_0x6a7b('0x46')][_0x6a7b('0x4e')]);_0x2ff3d0[_0x6a7b('0x4f')]=qs[_0x6a7b('0x50')](_[_0x6a7b('0x51')](_0x4ec632['query'],_0x2416f7[_0x6a7b('0x50')]));if(_0x4ec632[_0x6a7b('0x46')][_0x6a7b('0x52')]){_0x2ff3d0[_0x6a7b('0x4f')]=_['merge'](_0x2ff3d0[_0x6a7b('0x4f')],{'$or':_[_0x6a7b('0x45')](_0x2ff3d0[_0x6a7b('0x49')],function(_0x4a92fd){var _0x22b918={};_0x22b918[_0x4a92fd]={'$like':'%'+_0x4ec632[_0x6a7b('0x46')][_0x6a7b('0x52')]+'%'};return _0x22b918;})});}_0x2ff3d0=_['merge']({},_0x2ff3d0,_0x4ec632[_0x6a7b('0x54')]);return _0x316dd2[_0x6a7b('0x94')](_0x2ff3d0);}})[_0x6a7b('0x20')](function(_0x478b60){if(_0x478b60){_0x2bd7d9=_0x478b60[_0x6a7b('0x5a')];if(!_0x4ec632[_0x6a7b('0x46')][_0x6a7b('0x4b')](_0x6a7b('0x4c'))){_0x2ff3d0[_0x6a7b('0x2e')]=qs['limit'](_0x4ec632[_0x6a7b('0x46')][_0x6a7b('0x2e')]);_0x2ff3d0['offset']=qs['offset'](_0x4ec632[_0x6a7b('0x46')][_0x6a7b('0x2d')]);}return _0x316dd2['getAgents'](_0x2ff3d0);}})[_0x6a7b('0x20')](function(_0x1b191c){if(_0x1b191c){return _0x1b191c?{'count':_0x2bd7d9,'rows':_0x1b191c}:null;}})[_0x6a7b('0x20')](respondWithResult(_0x433430,null))[_0x6a7b('0x29')](handleError(_0x433430,null));};
\ No newline at end of file
+var _0xb788=['value','transaction','removeAgents','userChatQueue:remove','addAgents','spread','isArray','getAgents','eml-format','rimraf','zip-dir','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../mysqldb','redis','localhost','socket.io-emitter','register','jayson/promise','http','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','reject','save','destroy','get','UserProfileResource','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','ChatQueue','includeAll','include','findAll','params','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserChatQueue','nolimit','order','findAndCountAll','agent','chatPause','createdAt','rows','%s/%s','SIP','updatedAt','getTeams','Team','ids','User','Agents','online','voicePause','interface','sequelize','each','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','select','tq.TeamId','from','team_has_chat_queues','join','user_has_teams','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','TeamId','includes','all','compact'];(function(_0x2b0e4d,_0x12dc85){var _0x45c7f2=function(_0x49f80c){while(--_0x49f80c){_0x2b0e4d['push'](_0x2b0e4d['shift']());}};_0x45c7f2(++_0x12dc85);}(_0xb788,0x9b));var _0x8b78=function(_0x38d8e2,_0x48603c){_0x38d8e2=_0x38d8e2-0x0;var _0x5afbee=_0xb788[_0x38d8e2];return _0x5afbee;};'use strict';var emlformat=require(_0x8b78('0x0'));var rimraf=require(_0x8b78('0x1'));var zipdir=require(_0x8b78('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x8b78('0x3'));var Mustache=require(_0x8b78('0x4'));var util=require('util');var path=require(_0x8b78('0x5'));var sox=require(_0x8b78('0x6'));var csv=require(_0x8b78('0x7'));var ejs=require(_0x8b78('0x8'));var fs=require('fs');var fs_extra=require(_0x8b78('0x9'));var _=require(_0x8b78('0xa'));var squel=require('squel');var crypto=require(_0x8b78('0xb'));var jsforce=require(_0x8b78('0xc'));var deskjs=require(_0x8b78('0xd'));var toCsv=require(_0x8b78('0x7'));var querystring=require(_0x8b78('0xe'));var Papa=require(_0x8b78('0xf'));var Redis=require(_0x8b78('0x10'));var authService=require(_0x8b78('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x8b78('0x12'));var hardwareService=require(_0x8b78('0x13'));var logger=require('../../config/logger')(_0x8b78('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x8b78('0x15'))['db'];config[_0x8b78('0x16')]=_['defaults'](config[_0x8b78('0x16')],{'host':_0x8b78('0x17'),'port':0x18eb});var socket=require(_0x8b78('0x18'))(new Redis(config[_0x8b78('0x16')]));require('./chatQueue.socket')[_0x8b78('0x19')](socket);var jayson=require(_0x8b78('0x1a'));var client=jayson['client'][_0x8b78('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x5c9053,_0x5d9ad5,_0x490ec6,_0x224376){return new BPromise(function(_0x2262f7,_0x303e95){var _0x544b53=_0x224376||client;return _0x544b53[_0x8b78('0x1c')](_0x5c9053,_0x490ec6)[_0x8b78('0x1d')](function(_0x324888){logger[_0x8b78('0x1e')](_0x8b78('0x1f'),_0x5d9ad5,_0x8b78('0x20'));logger[_0x8b78('0x21')](_0x8b78('0x22'),_0x5d9ad5,_0x8b78('0x20'),JSON[_0x8b78('0x23')](_0x324888));if(_0x324888[_0x8b78('0x24')]){if(_0x324888[_0x8b78('0x24')][_0x8b78('0x25')]===0x1f4){logger['error'](_0x8b78('0x1f'),_0x5d9ad5,_0x324888[_0x8b78('0x24')]['message']);return _0x303e95(_0x324888[_0x8b78('0x24')]['message']);}logger[_0x8b78('0x24')]('ChatQueue,\x20%s,\x20%s',_0x5d9ad5,_0x324888[_0x8b78('0x24')][_0x8b78('0x26')]);return _0x2262f7(_0x324888[_0x8b78('0x24')][_0x8b78('0x26')]);}else{logger['info']('ChatQueue,\x20%s,\x20%s',_0x5d9ad5,_0x8b78('0x20'));_0x2262f7(_0x324888[_0x8b78('0x27')][_0x8b78('0x26')]);}})[_0x8b78('0x28')](function(_0x4057d6){logger[_0x8b78('0x24')]('ChatQueue,\x20%s,\x20%s',_0x5d9ad5,_0x4057d6);_0x303e95(_0x4057d6);});});}function respondWithStatusCode(_0x26e356,_0xb3332f){_0xb3332f=_0xb3332f||0xcc;return function(_0x86f2aa){if(_0x86f2aa){return _0x26e356[_0x8b78('0x29')](_0xb3332f);}return _0x26e356[_0x8b78('0x2a')](_0xb3332f)[_0x8b78('0x2b')]();};}function respondWithResult(_0x5e1cc5,_0x3be426){_0x3be426=_0x3be426||0xc8;return function(_0x5f3b79){if(_0x5f3b79){return _0x5e1cc5[_0x8b78('0x2a')](_0x3be426)[_0x8b78('0x2c')](_0x5f3b79);}};}function respondWithFilteredResult(_0x4bbdc4,_0x30d8b3){return function(_0xe8f54f){if(_0xe8f54f){var _0x10f287=typeof _0x30d8b3[_0x8b78('0x2d')]===_0x8b78('0x2e')&&typeof _0x30d8b3['limit']==='undefined';var _0x1bf3d0=_0xe8f54f[_0x8b78('0x2f')];var _0x46801c=_0x10f287?0x0:_0x30d8b3[_0x8b78('0x2d')];var _0x38dd5e=_0x10f287?_0xe8f54f[_0x8b78('0x2f')]:_0x30d8b3['offset']+_0x30d8b3[_0x8b78('0x30')];var _0x4853f0;if(_0x38dd5e>=_0x1bf3d0){_0x38dd5e=_0x1bf3d0;_0x4853f0=0xc8;}else{_0x4853f0=0xce;}_0x4bbdc4[_0x8b78('0x2a')](_0x4853f0);return _0x4bbdc4['set'](_0x8b78('0x31'),_0x46801c+'-'+_0x38dd5e+'/'+_0x1bf3d0)['json'](_0xe8f54f);}return null;};}function patchUpdates(_0x263ff9){return function(_0x4dd614){try{jsonpatch['apply'](_0x4dd614,_0x263ff9,!![]);}catch(_0x43737b){return BPromise[_0x8b78('0x32')](_0x43737b);}return _0x4dd614[_0x8b78('0x33')]();};}function saveUpdates(_0x561aba,_0x452cb1){return function(_0x20461c){if(_0x20461c){return _0x20461c['update'](_0x561aba)['then'](function(_0x27b759){return _0x27b759;});}return null;};}function removeEntity(_0x113c37,_0x9d5a01){return function(_0x4c3297){if(_0x4c3297){return _0x4c3297[_0x8b78('0x34')]()[_0x8b78('0x1d')](function(){var _0x5d63b0=_0x4c3297[_0x8b78('0x35')]({'plain':!![]});var _0x560634='ChatQueues';return db[_0x8b78('0x36')]['destroy']({'where':{'type':_0x560634,'resourceId':_0x5d63b0['id']}})[_0x8b78('0x1d')](function(){return _0x4c3297;});})[_0x8b78('0x1d')](function(){_0x113c37[_0x8b78('0x2a')](0xcc)[_0x8b78('0x2b')]();});}};}function handleEntityNotFound(_0x3c327b,_0x5ca366){return function(_0x49cfd9){if(!_0x49cfd9){_0x3c327b[_0x8b78('0x29')](0x194);}return _0x49cfd9;};}function handleError(_0x4c7c05,_0x490cca){_0x490cca=_0x490cca||0x1f4;return function(_0x458f85){logger[_0x8b78('0x24')](_0x458f85[_0x8b78('0x37')]);if(_0x458f85[_0x8b78('0x38')]){delete _0x458f85[_0x8b78('0x38')];}_0x4c7c05[_0x8b78('0x2a')](_0x490cca)[_0x8b78('0x39')](_0x458f85);};}exports[_0x8b78('0x3a')]=function(_0x1bf4a4,_0x49691d){var _0xb0a59b={},_0x28679c={},_0x8899cd={'count':0x0,'rows':[]};var _0x4ae016=_[_0x8b78('0x3b')](db['ChatQueue'][_0x8b78('0x3c')],function(_0x2a8694){return{'name':_0x2a8694[_0x8b78('0x3d')],'type':_0x2a8694[_0x8b78('0x3e')][_0x8b78('0x3f')]};});_0x28679c[_0x8b78('0x40')]=_[_0x8b78('0x3b')](_0x4ae016,'name');_0x28679c[_0x8b78('0x41')]=_[_0x8b78('0x42')](_0x1bf4a4['query']);_0x28679c[_0x8b78('0x43')]=_['intersection'](_0x28679c[_0x8b78('0x40')],_0x28679c[_0x8b78('0x41')]);_0xb0a59b['attributes']=_[_0x8b78('0x44')](_0x28679c[_0x8b78('0x40')],qs[_0x8b78('0x45')](_0x1bf4a4[_0x8b78('0x41')][_0x8b78('0x45')]));_0xb0a59b[_0x8b78('0x46')]=_0xb0a59b[_0x8b78('0x46')][_0x8b78('0x47')]?_0xb0a59b[_0x8b78('0x46')]:_0x28679c[_0x8b78('0x40')];if(!_0x1bf4a4[_0x8b78('0x41')][_0x8b78('0x48')]('nolimit')){_0xb0a59b[_0x8b78('0x30')]=qs[_0x8b78('0x30')](_0x1bf4a4[_0x8b78('0x41')][_0x8b78('0x30')]);_0xb0a59b['offset']=qs[_0x8b78('0x2d')](_0x1bf4a4['query'][_0x8b78('0x2d')]);}_0xb0a59b['order']=qs[_0x8b78('0x49')](_0x1bf4a4[_0x8b78('0x41')][_0x8b78('0x49')]);_0xb0a59b[_0x8b78('0x4a')]=qs['filters'](_[_0x8b78('0x4b')](_0x1bf4a4[_0x8b78('0x41')],_0x28679c[_0x8b78('0x43')]),_0x4ae016);if(_0x1bf4a4['query'][_0x8b78('0x4c')]){_0xb0a59b[_0x8b78('0x4a')]=_[_0x8b78('0x4d')](_0xb0a59b[_0x8b78('0x4a')],{'$or':_[_0x8b78('0x3b')](_0x4ae016,function(_0x5e3a66){if(_0x5e3a66['type']!==_0x8b78('0x4e')){var _0x5400fb={};_0x5400fb[_0x5e3a66[_0x8b78('0x38')]]={'$like':'%'+_0x1bf4a4['query']['filter']+'%'};return _0x5400fb;}})});}_0xb0a59b=_[_0x8b78('0x4d')]({},_0xb0a59b,_0x1bf4a4['options']);var _0x29ae2a={'where':_0xb0a59b[_0x8b78('0x4a')]};return db[_0x8b78('0x4f')][_0x8b78('0x2f')](_0x29ae2a)[_0x8b78('0x1d')](function(_0x38e8db){_0x8899cd[_0x8b78('0x2f')]=_0x38e8db;if(_0x1bf4a4[_0x8b78('0x41')][_0x8b78('0x50')]){_0xb0a59b[_0x8b78('0x51')]=[{'all':!![]}];}return db['ChatQueue'][_0x8b78('0x52')](_0xb0a59b);})[_0x8b78('0x1d')](function(_0x5b97c2){_0x8899cd['rows']=_0x5b97c2;return _0x8899cd;})[_0x8b78('0x1d')](respondWithFilteredResult(_0x49691d,_0xb0a59b))[_0x8b78('0x28')](handleError(_0x49691d,null));};exports['show']=function(_0x45cbee,_0x2f94b1){var _0x5b5396={'raw':!![],'where':{'id':_0x45cbee[_0x8b78('0x53')]['id']}},_0x9042d8={};_0x9042d8[_0x8b78('0x40')]=_[_0x8b78('0x42')](db[_0x8b78('0x4f')]['rawAttributes']);_0x9042d8[_0x8b78('0x41')]=_[_0x8b78('0x42')](_0x45cbee[_0x8b78('0x41')]);_0x9042d8[_0x8b78('0x43')]=_[_0x8b78('0x44')](_0x9042d8[_0x8b78('0x40')],_0x9042d8[_0x8b78('0x41')]);_0x5b5396[_0x8b78('0x46')]=_[_0x8b78('0x44')](_0x9042d8[_0x8b78('0x40')],qs[_0x8b78('0x45')](_0x45cbee[_0x8b78('0x41')][_0x8b78('0x45')]));_0x5b5396[_0x8b78('0x46')]=_0x5b5396['attributes']['length']?_0x5b5396[_0x8b78('0x46')]:_0x9042d8[_0x8b78('0x40')];if(_0x45cbee['query']['includeAll']){_0x5b5396[_0x8b78('0x51')]=[{'all':!![]}];}_0x5b5396=_[_0x8b78('0x4d')]({},_0x5b5396,_0x45cbee[_0x8b78('0x54')]);return db[_0x8b78('0x4f')][_0x8b78('0x55')](_0x5b5396)[_0x8b78('0x1d')](handleEntityNotFound(_0x2f94b1,null))[_0x8b78('0x1d')](respondWithResult(_0x2f94b1,null))['catch'](handleError(_0x2f94b1,null));};exports['create']=function(_0x3b3597,_0x5eb7c2){return db[_0x8b78('0x4f')][_0x8b78('0x56')](_0x3b3597[_0x8b78('0x57')],{})['then'](function(_0x5c34c2){var _0x86f566=_0x3b3597[_0x8b78('0x58')][_0x8b78('0x35')]({'plain':!![]});if(!_0x86f566)throw new Error(_0x8b78('0x59'));if(_0x86f566['role']===_0x8b78('0x58')){var _0x3b12de=_0x5c34c2[_0x8b78('0x35')]({'plain':!![]});var _0x394d77='ChatQueues';return db[_0x8b78('0x5a')][_0x8b78('0x55')]({'where':{'name':_0x394d77,'userProfileId':_0x86f566[_0x8b78('0x5b')]},'raw':!![]})[_0x8b78('0x1d')](function(_0xf5b6f2){if(_0xf5b6f2&&_0xf5b6f2['autoAssociation']===0x0){return db['UserProfileResource'][_0x8b78('0x56')]({'name':_0x3b12de['name'],'resourceId':_0x3b12de['id'],'type':_0xf5b6f2[_0x8b78('0x38')],'sectionId':_0xf5b6f2['id']},{})[_0x8b78('0x1d')](function(){return _0x5c34c2;});}else{return _0x5c34c2;}})[_0x8b78('0x28')](function(_0xb64bc7){logger[_0x8b78('0x24')](_0x8b78('0x5c'),_0xb64bc7);throw _0xb64bc7;});}return _0x5c34c2;})[_0x8b78('0x1d')](respondWithResult(_0x5eb7c2,0xc9))[_0x8b78('0x28')](handleError(_0x5eb7c2,null));};exports['update']=function(_0x1a95a8,_0x2e58de){if(_0x1a95a8[_0x8b78('0x57')]['id']){delete _0x1a95a8[_0x8b78('0x57')]['id'];}return db[_0x8b78('0x4f')][_0x8b78('0x55')]({'where':{'id':_0x1a95a8[_0x8b78('0x53')]['id']}})[_0x8b78('0x1d')](handleEntityNotFound(_0x2e58de,null))[_0x8b78('0x1d')](saveUpdates(_0x1a95a8[_0x8b78('0x57')],null))[_0x8b78('0x1d')](respondWithResult(_0x2e58de,null))[_0x8b78('0x28')](handleError(_0x2e58de,null));};exports['destroy']=function(_0xb3b6bb,_0x2616b0){return db['ChatQueue'][_0x8b78('0x55')]({'where':{'id':_0xb3b6bb[_0x8b78('0x53')]['id']}})[_0x8b78('0x1d')](handleEntityNotFound(_0x2616b0,null))[_0x8b78('0x1d')](removeEntity(_0x2616b0,null))['catch'](handleError(_0x2616b0,null));};exports[_0x8b78('0x5d')]=function(_0x2ac370,_0x5c01d2){return db[_0x8b78('0x4f')][_0x8b78('0x5d')]()[_0x8b78('0x1d')](respondWithResult(_0x5c01d2,null))['catch'](handleError(_0x5c01d2,null));};exports[_0x8b78('0x5e')]=function(_0x7bd5c6,_0x1a10b7,_0x40ee9a){var _0x4785f6={'raw':!![],'where':{}},_0x5774c1={},_0x5e95b7;return db[_0x8b78('0x4f')][_0x8b78('0x5f')]({'where':{'id':_0x7bd5c6['params']['id']}})[_0x8b78('0x1d')](handleEntityNotFound(_0x1a10b7,null))['then'](function(_0x224c53){if(_0x224c53){_0x5e95b7=_0x224c53['get']({'plain':!![]});_0x5774c1[_0x8b78('0x40')]=_[_0x8b78('0x42')](db[_0x8b78('0x60')]['rawAttributes']);_0x5774c1[_0x8b78('0x41')]=_[_0x8b78('0x42')](_0x7bd5c6[_0x8b78('0x41')]);_0x5774c1[_0x8b78('0x43')]=_[_0x8b78('0x44')](_0x5774c1[_0x8b78('0x40')],_0x5774c1[_0x8b78('0x41')]);_0x4785f6['attributes']=_[_0x8b78('0x44')](_0x5774c1[_0x8b78('0x40')],qs['fields'](_0x7bd5c6[_0x8b78('0x41')][_0x8b78('0x45')]));_0x4785f6['attributes']=_0x4785f6[_0x8b78('0x46')][_0x8b78('0x47')]?_0x4785f6['attributes']:_0x5774c1[_0x8b78('0x40')];if(!_0x7bd5c6[_0x8b78('0x41')][_0x8b78('0x48')](_0x8b78('0x61'))){_0x4785f6[_0x8b78('0x30')]=qs[_0x8b78('0x30')](_0x7bd5c6[_0x8b78('0x41')]['limit']);_0x4785f6[_0x8b78('0x2d')]=qs[_0x8b78('0x2d')](_0x7bd5c6['query'][_0x8b78('0x2d')]);}_0x4785f6[_0x8b78('0x62')]=qs[_0x8b78('0x49')](_0x7bd5c6[_0x8b78('0x41')][_0x8b78('0x49')]);_0x4785f6[_0x8b78('0x4a')]=qs[_0x8b78('0x43')](_['pick'](_0x7bd5c6['query'],_0x5774c1[_0x8b78('0x43')]));_0x4785f6[_0x8b78('0x4a')]['ChatQueueId']=_0x224c53['id'];if(_0x7bd5c6[_0x8b78('0x41')]['filter']){_0x4785f6[_0x8b78('0x4a')]=_[_0x8b78('0x4d')](_0x4785f6[_0x8b78('0x4a')],{'$or':_['map'](_0x4785f6['attributes'],function(_0x477851){var _0x57c211={};_0x57c211[_0x477851]={'$like':'%'+_0x7bd5c6[_0x8b78('0x41')][_0x8b78('0x4c')]+'%'};return _0x57c211;})});}_0x4785f6=_['merge']({},_0x4785f6,_0x7bd5c6['options']);return db['UserChatQueue'][_0x8b78('0x52')](_0x4785f6);}})[_0x8b78('0x1d')](function(_0x5241bb){if(_0x5241bb){return db['User'][_0x8b78('0x63')]({'where':{'id':_[_0x8b78('0x3b')](_0x5241bb,'UserId'),'role':_0x8b78('0x64')},'attributes':['id',_0x8b78('0x38'),_0x8b78('0x65'),'updatedAt',_0x8b78('0x66')]});}})['then'](function(_0x3ad741){if(_0x3ad741){return{'count':_0x3ad741[_0x8b78('0x2f')],'rows':_['map'](_0x3ad741[_0x8b78('0x67')],function(_0x4e80f5){return{'membername':_0x4e80f5[_0x8b78('0x38')],'UserId':_0x4e80f5['id'],'queue_name':_0x5e95b7['name'],'ChatQueueId':_0x5e95b7['id'],'interface':util['format'](_0x8b78('0x68'),_0x8b78('0x69'),_0x4e80f5[_0x8b78('0x38')]),'penalty':0x0,'paused':_0x4e80f5[_0x8b78('0x65')],'createdAt':_0x4e80f5[_0x8b78('0x66')],'updatedAt':_0x4e80f5[_0x8b78('0x6a')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x8b78('0x1d')](respondWithFilteredResult(_0x1a10b7,_0x4785f6))[_0x8b78('0x28')](handleError(_0x1a10b7,null));};exports[_0x8b78('0x6b')]=function(_0x49fdc2,_0x369773,_0x270895){var _0x1d5e77={};var _0x13b097={};var _0x17f7d9;var _0x4491b2;return db[_0x8b78('0x4f')]['findOne']({'where':{'id':_0x49fdc2[_0x8b78('0x53')]['id']}})['then'](handleEntityNotFound(_0x369773,null))[_0x8b78('0x1d')](function(_0x5d6b92){if(_0x5d6b92){_0x17f7d9=_0x5d6b92;_0x13b097[_0x8b78('0x40')]=_[_0x8b78('0x42')](db[_0x8b78('0x6c')][_0x8b78('0x3c')]);_0x13b097[_0x8b78('0x41')]=_[_0x8b78('0x42')](_0x49fdc2[_0x8b78('0x41')]);_0x13b097[_0x8b78('0x43')]=_['intersection'](_0x13b097[_0x8b78('0x40')],_0x13b097['query']);_0x1d5e77[_0x8b78('0x46')]=_[_0x8b78('0x44')](_0x13b097[_0x8b78('0x40')],qs['fields'](_0x49fdc2[_0x8b78('0x41')][_0x8b78('0x45')]));_0x1d5e77[_0x8b78('0x46')]=_0x1d5e77[_0x8b78('0x46')][_0x8b78('0x47')]?_0x1d5e77['attributes']:_0x13b097[_0x8b78('0x40')];_0x1d5e77[_0x8b78('0x62')]=qs['sort'](_0x49fdc2[_0x8b78('0x41')]['sort']);_0x1d5e77[_0x8b78('0x4a')]=qs['filters'](_[_0x8b78('0x4b')](_0x49fdc2[_0x8b78('0x41')],_0x13b097[_0x8b78('0x43')]));if(_0x49fdc2['query'][_0x8b78('0x4c')]){_0x1d5e77[_0x8b78('0x4a')]=_[_0x8b78('0x4d')](_0x1d5e77[_0x8b78('0x4a')],{'$or':_[_0x8b78('0x3b')](_0x1d5e77[_0x8b78('0x46')],function(_0x264ee8){var _0x41aebc={};_0x41aebc[_0x264ee8]={'$like':'%'+_0x49fdc2['query'][_0x8b78('0x4c')]+'%'};return _0x41aebc;})});}_0x1d5e77=_[_0x8b78('0x4d')]({},_0x1d5e77,_0x49fdc2['options']);return _0x17f7d9[_0x8b78('0x6b')](_0x1d5e77);}})[_0x8b78('0x1d')](function(_0x44dc01){if(_0x44dc01){_0x4491b2=_0x44dc01[_0x8b78('0x47')];if(!_0x49fdc2[_0x8b78('0x41')][_0x8b78('0x48')](_0x8b78('0x61'))){_0x1d5e77[_0x8b78('0x30')]=qs[_0x8b78('0x30')](_0x49fdc2['query'][_0x8b78('0x30')]);_0x1d5e77['offset']=qs[_0x8b78('0x2d')](_0x49fdc2[_0x8b78('0x41')][_0x8b78('0x2d')]);}return _0x17f7d9[_0x8b78('0x6b')](_0x1d5e77);}})['then'](function(_0x229dc2){if(_0x229dc2){return _0x229dc2?{'count':_0x4491b2,'rows':_0x229dc2}:null;}})[_0x8b78('0x1d')](respondWithResult(_0x369773,null))[_0x8b78('0x28')](handleError(_0x369773,null));};exports['addTeams']=function(_0x1ddba1,_0x189203,_0x519d0d){var _0x7035fd=_0x1ddba1[_0x8b78('0x57')][_0x8b78('0x6d')];return db[_0x8b78('0x6c')][_0x8b78('0x52')]({'where':{'id':_0x7035fd},'attributes':['id'],'include':[{'model':db[_0x8b78('0x6e')],'as':_0x8b78('0x6f'),'attributes':['id',_0x8b78('0x38'),_0x8b78('0x70'),_0x8b78('0x71'),_0x8b78('0x72')],'raw':!![]}]})[_0x8b78('0x1d')](function(_0x39a3b8){if(_0x39a3b8){var _0x52f6da=_['flatMap'](_0x39a3b8,function(_0x3d1cba){var _0x3e137d=_0x3d1cba[_0x8b78('0x35')]({'plain':!![]});return _0x3e137d[_0x8b78('0x6f')];});return db[_0x8b78('0x4f')]['find']({'where':{'id':_0x1ddba1[_0x8b78('0x53')]['id']}})['then'](function(_0x3695d4){return db[_0x8b78('0x73')]['transaction'](function(_0x418508){return _0x3695d4['addTeams'](_0x7035fd,{'transaction':_0x418508})['then'](function(){return BPromise[_0x8b78('0x74')](_0x52f6da,function(_0x51d7eb){return db[_0x8b78('0x60')][_0x8b78('0x75')]({'where':{'UserId':_0x51d7eb['id'],'ChatQueueId':_0x1ddba1[_0x8b78('0x53')]['id']},'transaction':_0x418508});});})[_0x8b78('0x1d')](function(){_0x52f6da[_0x8b78('0x76')](function(_0x4603c7){socket[_0x8b78('0x77')](_0x8b78('0x78'),{'UserId':_0x4603c7['id'],'ChatQueueId':_0x3695d4['id']});});});});});}})['then'](respondWithStatusCode(_0x189203,null))[_0x8b78('0x28')](handleError(_0x189203,null));};exports[_0x8b78('0x79')]=function(_0x262540,_0x51adc6,_0x470ffb){return db[_0x8b78('0x6c')][_0x8b78('0x52')]({'where':{'id':_0x262540['query'][_0x8b78('0x6d')]},'attributes':['id'],'include':[{'model':db[_0x8b78('0x6e')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x8b78('0x1d')](handleEntityNotFound(_0x51adc6,null))[_0x8b78('0x1d')](function(_0xf78bb2){var _0x108dab=_[_0x8b78('0x3b')](_0xf78bb2,'id');var _0x1dab86=[];var _0x25156c=[];var _0x4307ee=squel[_0x8b78('0x7a')]();_0x4307ee['field'](_0x8b78('0x7b'))[_0x8b78('0x7c')](_0x8b78('0x7d'),'tq')[_0x8b78('0x7e')](_0x8b78('0x7f'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x8b78('0x4a')](_0x8b78('0x80'),_0x262540['params']['id']);for(var _0x5b0e5f=0x0;_0x5b0e5f<_0xf78bb2[_0x8b78('0x47')];_0x5b0e5f+=0x1){let _0x14cadb=_0xf78bb2[_0x5b0e5f];for(var _0x1e26c=0x0;_0x1e26c<_0x14cadb[_0x8b78('0x6f')][_0x8b78('0x47')];_0x1e26c+=0x1){let _0x4a113e=_0x14cadb[_0x8b78('0x6f')][_0x1e26c];var _0x5b2036=_0x4307ee[_0x8b78('0x81')]();_0x5b2036[_0x8b78('0x4a')](_0x8b78('0x82'),_0x4a113e['id']);_0x25156c[_0x8b78('0x83')](db['sequelize']['query'](_0x5b2036[_0x8b78('0x84')](),{'type':db[_0x8b78('0x73')][_0x8b78('0x85')][_0x8b78('0x86')]})[_0x8b78('0x1d')](function(_0x22dfac){if(_0x22dfac[_0x8b78('0x47')]===0x1){return _0x4a113e['id'];}else{var _0x411131=_['every'](_[_0x8b78('0x3b')](_0x22dfac,_0x8b78('0x87')),function(_0x5a1c43){return _[_0x8b78('0x88')](_0x108dab,_0x5a1c43);});if(_0x411131){return _0x4a113e['id'];}}}));}}return BPromise[_0x8b78('0x89')](_0x25156c)[_0x8b78('0x1d')](function(_0x253c66){_0x1dab86=_(_0x1dab86)['union'](_0x253c66)[_0x8b78('0x8a')]()[_0x8b78('0x8b')]();return db['ChatQueue'][_0x8b78('0x55')]({'where':{'id':_0x262540[_0x8b78('0x53')]['id']}})[_0x8b78('0x1d')](function(_0x4cd633){return db[_0x8b78('0x73')][_0x8b78('0x8c')](function(_0xe7e026){return _0x4cd633['removeTeams'](_0x262540['query']['ids'],{'transaction':_0xe7e026})[_0x8b78('0x1d')](function(){if(!_['isEmpty'](_0x1dab86)){return _0x4cd633[_0x8b78('0x8d')](_0x1dab86,{'transaction':_0xe7e026});}})[_0x8b78('0x1d')](function(){_0x1dab86[_0x8b78('0x76')](function(_0x30f683){socket[_0x8b78('0x77')](_0x8b78('0x8e'),{'UserId':_0x30f683,'ChatQueueId':_0x4cd633['id']});});});});});});})[_0x8b78('0x1d')](respondWithStatusCode(_0x51adc6,null))[_0x8b78('0x28')](handleError(_0x51adc6,null));};exports[_0x8b78('0x8f')]=function(_0x73f62a,_0x4368a9,_0x365d55){return db[_0x8b78('0x4f')][_0x8b78('0x55')]({'where':{'id':_0x73f62a[_0x8b78('0x53')]['id']}})[_0x8b78('0x1d')](handleEntityNotFound(_0x4368a9,null))[_0x8b78('0x1d')](function(_0x419e80){if(_0x419e80){return _0x419e80['addAgents'](_0x73f62a[_0x8b78('0x57')][_0x8b78('0x6d')],_['omit'](_0x73f62a[_0x8b78('0x57')],[_0x8b78('0x6d'),'id'])||{})[_0x8b78('0x90')](function(_0xc11fdc){for(var _0x180163=0x0;_0x180163<_0x73f62a[_0x8b78('0x57')][_0x8b78('0x6d')]['length'];_0x180163+=0x1){socket['emit']('userChatQueue:save',{'UserId':Number(_0x73f62a[_0x8b78('0x57')][_0x8b78('0x6d')][_0x180163]),'ChatQueueId':Number(_0x73f62a[_0x8b78('0x53')]['id'])});}return _0xc11fdc;});}})[_0x8b78('0x1d')](respondWithResult(_0x4368a9,null))['catch'](handleError(_0x4368a9,null));};exports['removeAgents']=function(_0x3a4c4a,_0xc72923,_0x2ec143){return db['ChatQueue']['find']({'where':{'id':_0x3a4c4a[_0x8b78('0x53')]['id']}})[_0x8b78('0x1d')](handleEntityNotFound(_0xc72923,null))[_0x8b78('0x1d')](function(_0x32882b){if(_0x32882b){return _0x32882b[_0x8b78('0x8d')](_0x3a4c4a[_0x8b78('0x41')][_0x8b78('0x6d')])[_0x8b78('0x1d')](function(){if(_[_0x8b78('0x91')](_0x3a4c4a['query']['ids'])){for(var _0x20a589=0x0;_0x20a589<_0x3a4c4a[_0x8b78('0x41')]['ids'][_0x8b78('0x47')];_0x20a589+=0x1){socket['emit']('userChatQueue:remove',{'UserId':Number(_0x3a4c4a['query'][_0x8b78('0x6d')][_0x20a589]),'ChatQueueId':Number(_0x3a4c4a[_0x8b78('0x53')]['id'])});}}else{socket[_0x8b78('0x77')](_0x8b78('0x8e'),{'UserId':Number(_0x3a4c4a['query'][_0x8b78('0x6d')]),'ChatQueueId':Number(_0x3a4c4a[_0x8b78('0x53')]['id'])});}});}})[_0x8b78('0x1d')](respondWithStatusCode(_0xc72923,null))[_0x8b78('0x28')](handleError(_0xc72923,null));};exports[_0x8b78('0x92')]=function(_0x3ac34d,_0x223cc9,_0x48c93d){var _0x29e3c9={};var _0x1be58b={};var _0x445116;var _0x412e84;return db[_0x8b78('0x4f')][_0x8b78('0x5f')]({'where':{'id':_0x3ac34d[_0x8b78('0x53')]['id']}})[_0x8b78('0x1d')](handleEntityNotFound(_0x223cc9,null))[_0x8b78('0x1d')](function(_0x4aab96){if(_0x4aab96){_0x445116=_0x4aab96;_0x1be58b[_0x8b78('0x40')]=_[_0x8b78('0x42')](db['User'][_0x8b78('0x3c')]);_0x1be58b[_0x8b78('0x41')]=_[_0x8b78('0x42')](_0x3ac34d[_0x8b78('0x41')]);_0x1be58b['filters']=_[_0x8b78('0x44')](_0x1be58b[_0x8b78('0x40')],_0x1be58b[_0x8b78('0x41')]);_0x29e3c9[_0x8b78('0x46')]=_[_0x8b78('0x44')](_0x1be58b[_0x8b78('0x40')],qs[_0x8b78('0x45')](_0x3ac34d['query'][_0x8b78('0x45')]));_0x29e3c9[_0x8b78('0x46')]=_0x29e3c9['attributes'][_0x8b78('0x47')]?_0x29e3c9['attributes']:_0x1be58b[_0x8b78('0x40')];_0x29e3c9['order']=qs[_0x8b78('0x49')](_0x3ac34d['query']['sort']);_0x29e3c9[_0x8b78('0x4a')]=qs[_0x8b78('0x43')](_[_0x8b78('0x4b')](_0x3ac34d['query'],_0x1be58b[_0x8b78('0x43')]));if(_0x3ac34d[_0x8b78('0x41')][_0x8b78('0x4c')]){_0x29e3c9['where']=_[_0x8b78('0x4d')](_0x29e3c9[_0x8b78('0x4a')],{'$or':_['map'](_0x29e3c9[_0x8b78('0x46')],function(_0x311f5d){var _0x10aac3={};_0x10aac3[_0x311f5d]={'$like':'%'+_0x3ac34d[_0x8b78('0x41')]['filter']+'%'};return _0x10aac3;})});}_0x29e3c9=_[_0x8b78('0x4d')]({},_0x29e3c9,_0x3ac34d[_0x8b78('0x54')]);return _0x445116[_0x8b78('0x92')](_0x29e3c9);}})[_0x8b78('0x1d')](function(_0x6eb639){if(_0x6eb639){_0x412e84=_0x6eb639['length'];if(!_0x3ac34d['query'][_0x8b78('0x48')]('nolimit')){_0x29e3c9[_0x8b78('0x30')]=qs['limit'](_0x3ac34d[_0x8b78('0x41')][_0x8b78('0x30')]);_0x29e3c9['offset']=qs[_0x8b78('0x2d')](_0x3ac34d['query'][_0x8b78('0x2d')]);}return _0x445116[_0x8b78('0x92')](_0x29e3c9);}})[_0x8b78('0x1d')](function(_0x3b5c37){if(_0x3b5c37){return _0x3b5c37?{'count':_0x412e84,'rows':_0x3b5c37}:null;}})['then'](respondWithResult(_0x223cc9,null))[_0x8b78('0x28')](handleError(_0x223cc9,null));};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js
index c7401b6..f1e8151 100644
--- a/server/api/chatQueue/chatQueue.events.js
+++ b/server/api/chatQueue/chatQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd846=['../../mysqldb','ChatQueue','update','emit','hook','exports','events'];(function(_0x2d1a6d,_0xedb0){var _0x5bd1fc=function(_0x2cf26f){while(--_0x2cf26f){_0x2d1a6d['push'](_0x2d1a6d['shift']());}};_0x5bd1fc(++_0xedb0);}(_0xd846,0x195));var _0x6d84=function(_0x2e85ac,_0x1bf732){_0x2e85ac=_0x2e85ac-0x0;var _0x31e4ad=_0xd846[_0x2e85ac];return _0x31e4ad;};'use strict';var EventEmitter=require(_0x6d84('0x0'));var ChatQueue=require(_0x6d84('0x1'))['db'][_0x6d84('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x6d84('0x3'),'afterDestroy':'remove'};function emitEvent(_0x47e90f){return function(_0x15fb0c,_0xa19796,_0x5c2176){ChatQueueEvents[_0x6d84('0x4')](_0x47e90f+':'+_0x15fb0c['id'],_0x15fb0c);ChatQueueEvents['emit'](_0x47e90f,_0x15fb0c);_0x5c2176(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0x6d84('0x5')](e,emitEvent(event));}}module[_0x6d84('0x6')]=ChatQueueEvents;
\ No newline at end of file
+var _0xeea2=['save','update','remove','emit','hook','exports','events','setMaxListeners'];(function(_0x55097e,_0x2a44f9){var _0x55e811=function(_0x20483b){while(--_0x20483b){_0x55097e['push'](_0x55097e['shift']());}};_0x55e811(++_0x2a44f9);}(_0xeea2,0xce));var _0x2eea=function(_0x31a371,_0x50828e){_0x31a371=_0x31a371-0x0;var _0x2a5bd6=_0xeea2[_0x31a371];return _0x2a5bd6;};'use strict';var EventEmitter=require(_0x2eea('0x0'));var ChatQueue=require('../../mysqldb')['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x2eea('0x1')](0x0);var events={'afterCreate':_0x2eea('0x2'),'afterUpdate':_0x2eea('0x3'),'afterDestroy':_0x2eea('0x4')};function emitEvent(_0x5f5a27){return function(_0x76302e,_0x21746c,_0x2f78c9){ChatQueueEvents[_0x2eea('0x5')](_0x5f5a27+':'+_0x76302e['id'],_0x76302e);ChatQueueEvents[_0x2eea('0x5')](_0x5f5a27,_0x76302e);_0x2f78c9(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0x2eea('0x6')](e,emitEvent(event));}}module[_0x2eea('0x7')]=ChatQueueEvents;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js
index 1fbcfc2..afb1ac3 100644
--- a/server/api/chatQueue/chatQueue.model.js
+++ b/server/api/chatQueue/chatQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc711=['request-promise','path','rimraf','../../config/environment','./chatQueue.attributes','exports','ChatQueue','util','../../config/logger','api','moment','bluebird'];(function(_0x5093a4,_0x2818d3){var _0x11a221=function(_0x2ef5a0){while(--_0x2ef5a0){_0x5093a4['push'](_0x5093a4['shift']());}};_0x11a221(++_0x2818d3);}(_0xc711,0x19f));var _0x1c71=function(_0x211fef,_0x4ab716){_0x211fef=_0x211fef-0x0;var _0x5447bf=_0xc711[_0x211fef];return _0x5447bf;};'use strict';var _=require('lodash');var util=require(_0x1c71('0x0'));var logger=require(_0x1c71('0x1'))(_0x1c71('0x2'));var moment=require(_0x1c71('0x3'));var BPromise=require(_0x1c71('0x4'));var rp=require(_0x1c71('0x5'));var fs=require('fs');var path=require(_0x1c71('0x6'));var rimraf=require(_0x1c71('0x7'));var config=require(_0x1c71('0x8'));var attributes=require(_0x1c71('0x9'));module[_0x1c71('0xa')]=function(_0x459d69,_0x714ca0){return _0x459d69['define'](_0x1c71('0xb'),attributes,{'tableName':'chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7e25=['request-promise','path','../../config/environment','./chatQueue.attributes','exports','ChatQueue','chat_queues','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x1e97ef,_0x5ca35c){var _0x297ed6=function(_0x5596c1){while(--_0x5596c1){_0x1e97ef['push'](_0x1e97ef['shift']());}};_0x297ed6(++_0x5ca35c);}(_0x7e25,0x159));var _0x57e2=function(_0x3b2369,_0x4c68b9){_0x3b2369=_0x3b2369-0x0;var _0x5a1367=_0x7e25[_0x3b2369];return _0x5a1367;};'use strict';var _=require(_0x57e2('0x0'));var util=require(_0x57e2('0x1'));var logger=require(_0x57e2('0x2'))(_0x57e2('0x3'));var moment=require(_0x57e2('0x4'));var BPromise=require(_0x57e2('0x5'));var rp=require(_0x57e2('0x6'));var fs=require('fs');var path=require(_0x57e2('0x7'));var rimraf=require('rimraf');var config=require(_0x57e2('0x8'));var attributes=require(_0x57e2('0x9'));module[_0x57e2('0xa')]=function(_0x38f7f0,_0x366ffa){return _0x38f7f0['define'](_0x57e2('0xb'),attributes,{'tableName':_0x57e2('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.rpc.js b/server/api/chatQueue/chatQueue.rpc.js
index 2b3d19d..7c4680b 100644
--- a/server/api/chatQueue/chatQueue.rpc.js
+++ b/server/api/chatQueue/chatQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2b50=['moment','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','localhost','socket.io-emitter','./chatQueue.socket','register','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetChatQueue','findAll','options','where','limit','map','include','attributes','model','ShowChatQueue','lodash'];(function(_0x2c0546,_0x316d34){var _0x391857=function(_0x3904a6){while(--_0x3904a6){_0x2c0546['push'](_0x2c0546['shift']());}};_0x391857(++_0x316d34);}(_0x2b50,0x68));var _0x02b5=function(_0x4dd284,_0x1d349a){_0x4dd284=_0x4dd284-0x0;var _0x422fec=_0x2b50[_0x4dd284];return _0x422fec;};'use strict';var _=require(_0x02b5('0x0'));var util=require('util');var moment=require(_0x02b5('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x02b5('0x2'))['db'];var utils=require(_0x02b5('0x3'));var logger=require(_0x02b5('0x4'))(_0x02b5('0x5'));var config=require('../../config/environment');var jayson=require(_0x02b5('0x6'));var client=jayson[_0x02b5('0x7')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x02b5('0x8')],{'host':_0x02b5('0x9'),'port':0x18eb});var socket=require(_0x02b5('0xa'))(new Redis(config[_0x02b5('0x8')]));require(_0x02b5('0xb'))[_0x02b5('0xc')](socket);function respondWithRpcPromise(_0x21ec08,_0x92c740,_0x3b6547){return new BPromise(function(_0x25d9d2,_0x3ee4da){return client[_0x02b5('0xd')](_0x21ec08,_0x3b6547)[_0x02b5('0xe')](function(_0x306838){logger[_0x02b5('0xf')](_0x02b5('0x10'),_0x92c740,_0x02b5('0x11'));logger[_0x02b5('0x12')](_0x02b5('0x13'),_0x92c740,_0x02b5('0x11'),JSON[_0x02b5('0x14')](_0x306838));if(_0x306838[_0x02b5('0x15')]){if(_0x306838[_0x02b5('0x15')]['code']===0x1f4){logger['error'](_0x02b5('0x10'),_0x92c740,_0x306838[_0x02b5('0x15')]['message']);return _0x3ee4da(_0x306838[_0x02b5('0x15')][_0x02b5('0x16')]);}logger[_0x02b5('0x15')](_0x02b5('0x10'),_0x92c740,_0x306838[_0x02b5('0x15')][_0x02b5('0x16')]);return _0x25d9d2(_0x306838[_0x02b5('0x15')][_0x02b5('0x16')]);}else{logger[_0x02b5('0xf')]('ChatQueue,\x20%s,\x20%s',_0x92c740,_0x02b5('0x11'));_0x25d9d2(_0x306838[_0x02b5('0x17')]['message']);}})[_0x02b5('0x18')](function(_0x40fcfe){logger['error'](_0x02b5('0x10'),_0x92c740,_0x40fcfe);_0x3ee4da(_0x40fcfe);});});}exports[_0x02b5('0x19')]=function(_0x24703c){var _0x31df71=this;return new Promise(function(_0x98fe5a,_0x5d9b67){return db['ChatQueue'][_0x02b5('0x1a')]({'raw':_0x24703c['options']?_0x24703c['options']['raw']===undefined?!![]:![]:!![],'where':_0x24703c[_0x02b5('0x1b')]?_0x24703c[_0x02b5('0x1b')][_0x02b5('0x1c')]||null:null,'attributes':_0x24703c[_0x02b5('0x1b')]?_0x24703c[_0x02b5('0x1b')]['attributes']||null:null,'limit':_0x24703c[_0x02b5('0x1b')]?_0x24703c[_0x02b5('0x1b')][_0x02b5('0x1d')]||null:null,'include':_0x24703c[_0x02b5('0x1b')]?_0x24703c[_0x02b5('0x1b')]['include']?_[_0x02b5('0x1e')](_0x24703c[_0x02b5('0x1b')][_0x02b5('0x1f')],function(_0x3383ef){return{'model':db[_0x3383ef['model']],'as':_0x3383ef['as'],'attributes':_0x3383ef[_0x02b5('0x20')],'include':_0x3383ef[_0x02b5('0x1f')]?_[_0x02b5('0x1e')](_0x3383ef[_0x02b5('0x1f')],function(_0x2c2522){return{'model':db[_0x2c2522['model']],'as':_0x2c2522['as'],'attributes':_0x2c2522[_0x02b5('0x20')],'include':_0x2c2522['include']?_[_0x02b5('0x1e')](_0x2c2522['include'],function(_0x5dc17e){return{'model':db[_0x5dc17e[_0x02b5('0x21')]],'as':_0x5dc17e['as'],'attributes':_0x5dc17e[_0x02b5('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x535bda){logger[_0x02b5('0xf')](_0x02b5('0x19'),_0x24703c);logger[_0x02b5('0x12')](_0x02b5('0x19'),_0x24703c,JSON[_0x02b5('0x14')](_0x535bda));_0x98fe5a(_0x535bda);})['catch'](function(_0x28c0e3){logger[_0x02b5('0x15')]('GetChatQueue',_0x28c0e3[_0x02b5('0x16')],_0x24703c);_0x5d9b67(_0x31df71['error'](0x1f4,_0x28c0e3['message']));});});};exports[_0x02b5('0x22')]=function(_0x21dee5){var _0x35c5b3=this;return new Promise(function(_0x5e320f,_0x29362a){return db['ChatQueue']['find']({'raw':_0x21dee5['options']?_0x21dee5[_0x02b5('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x21dee5[_0x02b5('0x1b')]?_0x21dee5[_0x02b5('0x1b')][_0x02b5('0x1c')]||null:null,'attributes':_0x21dee5[_0x02b5('0x1b')]?_0x21dee5[_0x02b5('0x1b')][_0x02b5('0x20')]||null:null,'include':_0x21dee5[_0x02b5('0x1b')]?_0x21dee5['options']['include']?_['map'](_0x21dee5[_0x02b5('0x1b')]['include'],function(_0x367caa){return{'model':db[_0x367caa[_0x02b5('0x21')]],'as':_0x367caa['as'],'attributes':_0x367caa['attributes'],'include':_0x367caa[_0x02b5('0x1f')]?_[_0x02b5('0x1e')](_0x367caa['include'],function(_0x330be6){return{'model':db[_0x330be6['model']],'as':_0x330be6['as'],'attributes':_0x330be6['attributes'],'include':_0x330be6[_0x02b5('0x1f')]?_[_0x02b5('0x1e')](_0x330be6['include'],function(_0x1e4536){return{'model':db[_0x1e4536[_0x02b5('0x21')]],'as':_0x1e4536['as'],'attributes':_0x1e4536[_0x02b5('0x20')]};}):[]};}):[]};}):[]:[]})[_0x02b5('0xe')](function(_0x3a6d9b){logger[_0x02b5('0xf')](_0x02b5('0x22'),_0x21dee5);logger['debug'](_0x02b5('0x22'),_0x21dee5,JSON[_0x02b5('0x14')](_0x3a6d9b));_0x5e320f(_0x3a6d9b);})[_0x02b5('0x18')](function(_0x411feb){logger[_0x02b5('0x15')](_0x02b5('0x22'),_0x411feb[_0x02b5('0x16')],_0x21dee5);_0x29362a(_0x35c5b3[_0x02b5('0x15')](0x1f4,_0x411feb['message']));});});};
\ No newline at end of file
+var _0xd914=['ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','error','code','message','catch','GetChatQueue','ChatQueue','findAll','options','attributes','limit','include','model','map','then','stringify','find','raw','where','ShowChatQueue','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','info'];(function(_0x5a9c0c,_0x4ec485){var _0x53c77d=function(_0x1cf384){while(--_0x1cf384){_0x5a9c0c['push'](_0x5a9c0c['shift']());}};_0x53c77d(++_0x4ec485);}(_0xd914,0x17f));var _0x4d91=function(_0x154cb5,_0x1a8d5a){_0x154cb5=_0x154cb5-0x0;var _0x3f574f=_0xd914[_0x154cb5];return _0x3f574f;};'use strict';var _=require(_0x4d91('0x0'));var util=require(_0x4d91('0x1'));var moment=require('moment');var BPromise=require(_0x4d91('0x2'));var rs=require(_0x4d91('0x3'));var fs=require('fs');var Redis=require(_0x4d91('0x4'));var db=require(_0x4d91('0x5'))['db'];var utils=require(_0x4d91('0x6'));var logger=require(_0x4d91('0x7'))('rpc');var config=require(_0x4d91('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x4d91('0x9')][_0x4d91('0xa')]({'port':0x232a});config[_0x4d91('0xb')]=_[_0x4d91('0xc')](config[_0x4d91('0xb')],{'host':_0x4d91('0xd'),'port':0x18eb});var socket=require(_0x4d91('0xe'))(new Redis(config[_0x4d91('0xb')]));require('./chatQueue.socket')[_0x4d91('0xf')](socket);function respondWithRpcPromise(_0xa4bb25,_0xc07c64,_0x278648){return new BPromise(function(_0xb234d2,_0x266b31){return client['request'](_0xa4bb25,_0x278648)['then'](function(_0x2ccd08){logger[_0x4d91('0x10')](_0x4d91('0x11'),_0xc07c64,_0x4d91('0x12'));logger[_0x4d91('0x13')](_0x4d91('0x14'),_0xc07c64,'request\x20sent',JSON['stringify'](_0x2ccd08));if(_0x2ccd08[_0x4d91('0x15')]){if(_0x2ccd08[_0x4d91('0x15')][_0x4d91('0x16')]===0x1f4){logger[_0x4d91('0x15')](_0x4d91('0x11'),_0xc07c64,_0x2ccd08[_0x4d91('0x15')][_0x4d91('0x17')]);return _0x266b31(_0x2ccd08['error'][_0x4d91('0x17')]);}logger[_0x4d91('0x15')](_0x4d91('0x11'),_0xc07c64,_0x2ccd08[_0x4d91('0x15')][_0x4d91('0x17')]);return _0xb234d2(_0x2ccd08['error'][_0x4d91('0x17')]);}else{logger[_0x4d91('0x10')](_0x4d91('0x11'),_0xc07c64,_0x4d91('0x12'));_0xb234d2(_0x2ccd08['result'][_0x4d91('0x17')]);}})[_0x4d91('0x18')](function(_0x13254c){logger['error'](_0x4d91('0x11'),_0xc07c64,_0x13254c);_0x266b31(_0x13254c);});});}exports[_0x4d91('0x19')]=function(_0x351388){var _0xd59fe=this;return new Promise(function(_0x10b767,_0x40cde4){return db[_0x4d91('0x1a')][_0x4d91('0x1b')]({'raw':_0x351388[_0x4d91('0x1c')]?_0x351388[_0x4d91('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x351388[_0x4d91('0x1c')]?_0x351388['options']['where']||null:null,'attributes':_0x351388[_0x4d91('0x1c')]?_0x351388[_0x4d91('0x1c')][_0x4d91('0x1d')]||null:null,'limit':_0x351388[_0x4d91('0x1c')]?_0x351388[_0x4d91('0x1c')][_0x4d91('0x1e')]||null:null,'include':_0x351388[_0x4d91('0x1c')]?_0x351388[_0x4d91('0x1c')]['include']?_['map'](_0x351388[_0x4d91('0x1c')][_0x4d91('0x1f')],function(_0x3bed98){return{'model':db[_0x3bed98[_0x4d91('0x20')]],'as':_0x3bed98['as'],'attributes':_0x3bed98[_0x4d91('0x1d')],'include':_0x3bed98[_0x4d91('0x1f')]?_[_0x4d91('0x21')](_0x3bed98['include'],function(_0x3dc353){return{'model':db[_0x3dc353[_0x4d91('0x20')]],'as':_0x3dc353['as'],'attributes':_0x3dc353[_0x4d91('0x1d')],'include':_0x3dc353['include']?_['map'](_0x3dc353[_0x4d91('0x1f')],function(_0x470079){return{'model':db[_0x470079['model']],'as':_0x470079['as'],'attributes':_0x470079['attributes']};}):[]};}):[]};}):[]:[]})[_0x4d91('0x22')](function(_0x2d6981){logger[_0x4d91('0x10')](_0x4d91('0x19'),_0x351388);logger['debug'](_0x4d91('0x19'),_0x351388,JSON[_0x4d91('0x23')](_0x2d6981));_0x10b767(_0x2d6981);})[_0x4d91('0x18')](function(_0xee7535){logger[_0x4d91('0x15')](_0x4d91('0x19'),_0xee7535[_0x4d91('0x17')],_0x351388);_0x40cde4(_0xd59fe['error'](0x1f4,_0xee7535[_0x4d91('0x17')]));});});};exports['ShowChatQueue']=function(_0x4ad7bf){var _0x292808=this;return new Promise(function(_0x3a2780,_0x4f95f0){return db[_0x4d91('0x1a')][_0x4d91('0x24')]({'raw':_0x4ad7bf[_0x4d91('0x1c')]?_0x4ad7bf[_0x4d91('0x1c')][_0x4d91('0x25')]===undefined?!![]:![]:!![],'where':_0x4ad7bf['options']?_0x4ad7bf[_0x4d91('0x1c')][_0x4d91('0x26')]||null:null,'attributes':_0x4ad7bf[_0x4d91('0x1c')]?_0x4ad7bf[_0x4d91('0x1c')][_0x4d91('0x1d')]||null:null,'include':_0x4ad7bf[_0x4d91('0x1c')]?_0x4ad7bf['options'][_0x4d91('0x1f')]?_[_0x4d91('0x21')](_0x4ad7bf['options'][_0x4d91('0x1f')],function(_0x35869a){return{'model':db[_0x35869a[_0x4d91('0x20')]],'as':_0x35869a['as'],'attributes':_0x35869a['attributes'],'include':_0x35869a[_0x4d91('0x1f')]?_[_0x4d91('0x21')](_0x35869a[_0x4d91('0x1f')],function(_0x1237db){return{'model':db[_0x1237db['model']],'as':_0x1237db['as'],'attributes':_0x1237db[_0x4d91('0x1d')],'include':_0x1237db[_0x4d91('0x1f')]?_[_0x4d91('0x21')](_0x1237db[_0x4d91('0x1f')],function(_0x5f3862){return{'model':db[_0x5f3862['model']],'as':_0x5f3862['as'],'attributes':_0x5f3862[_0x4d91('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x4d91('0x22')](function(_0x524052){logger[_0x4d91('0x10')](_0x4d91('0x27'),_0x4ad7bf);logger[_0x4d91('0x13')](_0x4d91('0x27'),_0x4ad7bf,JSON['stringify'](_0x524052));_0x3a2780(_0x524052);})[_0x4d91('0x18')](function(_0x2a1106){logger['error'](_0x4d91('0x27'),_0x2a1106['message'],_0x4ad7bf);_0x4f95f0(_0x292808[_0x4d91('0x15')](0x1f4,_0x2a1106['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js
index 3192b40..1477b90 100644
--- a/server/api/chatQueue/chatQueue.socket.js
+++ b/server/api/chatQueue/chatQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x04de=['save','remove','update','emit','removeListener','length','chatQueue:','./chatQueue.events'];(function(_0x55e08b,_0x421620){var _0xd1a7ff=function(_0x58c7ff){while(--_0x58c7ff){_0x55e08b['push'](_0x55e08b['shift']());}};_0xd1a7ff(++_0x421620);}(_0x04de,0x107));var _0xe04d=function(_0x337194,_0x17405f){_0x337194=_0x337194-0x0;var _0x1c075e=_0x04de[_0x337194];return _0x1c075e;};'use strict';var ChatQueueEvents=require(_0xe04d('0x0'));var events=[_0xe04d('0x1'),_0xe04d('0x2'),_0xe04d('0x3')];function createListener(_0x1e650d,_0x28f63f){return function(_0x1113af){_0x28f63f[_0xe04d('0x4')](_0x1e650d,_0x1113af);};}function removeListener(_0x2593a4,_0x70ead0){return function(){ChatQueueEvents[_0xe04d('0x5')](_0x2593a4,_0x70ead0);};}exports['register']=function(_0x4bb925){for(var _0x4f7637=0x0,_0x531688=events[_0xe04d('0x6')];_0x4f7637<_0x531688;_0x4f7637++){var _0x210e93=events[_0x4f7637];var _0x72b1ce=createListener(_0xe04d('0x7')+_0x210e93,_0x4bb925);ChatQueueEvents['on'](_0x210e93,_0x72b1ce);}};
\ No newline at end of file
+var _0xa37e=['chatQueue:','remove','update','emit','removeListener','register'];(function(_0x2735d1,_0x13b40f){var _0x2f8fa3=function(_0xcc548b){while(--_0xcc548b){_0x2735d1['push'](_0x2735d1['shift']());}};_0x2f8fa3(++_0x13b40f);}(_0xa37e,0x97));var _0xea37=function(_0x472479,_0x2429d2){_0x472479=_0x472479-0x0;var _0x1c38e9=_0xa37e[_0x472479];return _0x1c38e9;};'use strict';var ChatQueueEvents=require('./chatQueue.events');var events=['save',_0xea37('0x0'),_0xea37('0x1')];function createListener(_0x204a22,_0x475c71){return function(_0x5430aa){_0x475c71[_0xea37('0x2')](_0x204a22,_0x5430aa);};}function removeListener(_0x537c5a,_0x360ed5){return function(){ChatQueueEvents[_0xea37('0x3')](_0x537c5a,_0x360ed5);};}exports[_0xea37('0x4')]=function(_0x4d380b){for(var _0x57135b=0x0,_0x36c489=events['length'];_0x57135b<_0x36c489;_0x57135b++){var _0x4ae081=events[_0x57135b];var _0x2c2890=createListener(_0xea37('0x5')+_0x4ae081,_0x4d380b);ChatQueueEvents['on'](_0x4ae081,_0x2c2890);}};
\ No newline at end of file
diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js
index d195077..a58bb8f 100644
--- a/server/api/chatQueue/index.js
+++ b/server/api/chatQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7217=['../../config/environment','./chatQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','post','addTeams','update','delete','destroy','removeTeams','removeAgents','exports','multer','path','connect-timeout','express','Router','fs-extra'];(function(_0x1e8583,_0x5181c3){var _0xba5bb0=function(_0x5b79bc){while(--_0x5b79bc){_0x1e8583['push'](_0x1e8583['shift']());}};_0xba5bb0(++_0x5181c3);}(_0x7217,0x19e));var _0x7721=function(_0x92c450,_0x41f1e3){_0x92c450=_0x92c450-0x0;var _0x2a9599=_0x7217[_0x92c450];return _0x2a9599;};'use strict';var multer=require(_0x7721('0x0'));var util=require('util');var path=require(_0x7721('0x1'));var timeout=require(_0x7721('0x2'));var express=require(_0x7721('0x3'));var router=express[_0x7721('0x4')]();var fs_extra=require(_0x7721('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7721('0x6'));var controller=require(_0x7721('0x7'));router[_0x7721('0x8')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xa')]);router[_0x7721('0x8')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0xc')]);router[_0x7721('0x8')](_0x7721('0xd'),auth[_0x7721('0x9')](),controller[_0x7721('0xe')]);router[_0x7721('0x8')](_0x7721('0xf'),auth['isAuthenticated'](),controller[_0x7721('0x10')]);router[_0x7721('0x8')](_0x7721('0x11'),auth[_0x7721('0x9')](),controller[_0x7721('0x12')]);router[_0x7721('0x8')](_0x7721('0x13'),auth[_0x7721('0x9')](),controller['getAgents']);router[_0x7721('0x14')]('/',auth[_0x7721('0x9')](),controller['create']);router[_0x7721('0x14')](_0x7721('0x11'),auth[_0x7721('0x9')](),controller[_0x7721('0x15')]);router['post'](_0x7721('0x13'),auth[_0x7721('0x9')](),controller['addAgents']);router['put']('/:id',auth[_0x7721('0x9')](),controller[_0x7721('0x16')]);router[_0x7721('0x17')](_0x7721('0xd'),auth['isAuthenticated'](),controller[_0x7721('0x18')]);router['delete'](_0x7721('0x11'),auth['isAuthenticated'](),controller[_0x7721('0x19')]);router[_0x7721('0x17')](_0x7721('0x13'),auth[_0x7721('0x9')](),controller[_0x7721('0x1a')]);module[_0x7721('0x1b')]=router;
\ No newline at end of file
+var _0x55ca=['post','addAgents','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','Router','fs-extra','../../components/interaction/service','../../config/environment','./chatQueue.controller','get','isAuthenticated','index','describe','/:id','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','addTeams'];(function(_0x21e3af,_0x26127a){var _0x1a6048=function(_0x4ff693){while(--_0x4ff693){_0x21e3af['push'](_0x21e3af['shift']());}};_0x1a6048(++_0x26127a);}(_0x55ca,0x126));var _0xa55c=function(_0x3d5371,_0x24ebd7){_0x3d5371=_0x3d5371-0x0;var _0x4631e3=_0x55ca[_0x3d5371];return _0x4631e3;};'use strict';var multer=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xa55c('0x2')]();var fs_extra=require(_0xa55c('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xa55c('0x4'));var config=require(_0xa55c('0x5'));var controller=require(_0xa55c('0x6'));router[_0xa55c('0x7')]('/',auth[_0xa55c('0x8')](),controller[_0xa55c('0x9')]);router[_0xa55c('0x7')]('/describe',auth[_0xa55c('0x8')](),controller[_0xa55c('0xa')]);router['get'](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller['show']);router['get'](_0xa55c('0xc'),auth[_0xa55c('0x8')](),controller[_0xa55c('0xd')]);router[_0xa55c('0x7')](_0xa55c('0xe'),auth[_0xa55c('0x8')](),controller[_0xa55c('0xf')]);router[_0xa55c('0x7')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller['getAgents']);router['post']('/',auth[_0xa55c('0x8')](),controller['create']);router['post']('/:id/teams',auth[_0xa55c('0x8')](),controller[_0xa55c('0x11')]);router[_0xa55c('0x12')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x13')]);router['put'](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x14')]);router[_0xa55c('0x15')](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x16')]);router[_0xa55c('0x15')](_0xa55c('0xe'),auth['isAuthenticated'](),controller[_0xa55c('0x17')]);router[_0xa55c('0x15')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x18')]);module[_0xa55c('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js
index 5063350..00f8ed5 100644
--- a/server/api/chatQueueReport/chatQueueReport.attributes.js
+++ b/server/api/chatQueueReport/chatQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe157=['DATE','moment','sequelize','exports','STRING'];(function(_0x15dcaf,_0x2ad551){var _0x1d4665=function(_0x5305ae){while(--_0x5305ae){_0x15dcaf['push'](_0x15dcaf['shift']());}};_0x1d4665(++_0x2ad551);}(_0xe157,0x13c));var _0x7e15=function(_0x5118d6,_0x204fca){_0x5118d6=_0x5118d6-0x0;var _0x5ab55b=_0xe157[_0x5118d6];return _0x5ab55b;};'use strict';var moment=require(_0x7e15('0x0'));var Sequelize=require(_0x7e15('0x1'));module[_0x7e15('0x2')]={'uniqueid':{'type':Sequelize[_0x7e15('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x7e15('0x4')]},'exitAt':{'type':Sequelize[_0x7e15('0x4')]},'reason':{'type':Sequelize[_0x7e15('0x3')]}};
\ No newline at end of file
+var _0x268b=['STRING','DATE','moment','sequelize','exports'];(function(_0x494203,_0x2621c5){var _0x15e427=function(_0x554756){while(--_0x554756){_0x494203['push'](_0x494203['shift']());}};_0x15e427(++_0x2621c5);}(_0x268b,0xca));var _0xb268=function(_0x2fbd0e,_0x3460a9){_0x2fbd0e=_0x2fbd0e-0x0;var _0x481c9f=_0x268b[_0x2fbd0e];return _0x481c9f;};'use strict';var moment=require(_0xb268('0x0'));var Sequelize=require(_0xb268('0x1'));module[_0xb268('0x2')]={'uniqueid':{'type':Sequelize[_0xb268('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0xb268('0x3')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0xb268('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0xb268('0x4')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js
index 0be659e..c4e34aa 100644
--- a/server/api/chatQueueReport/chatQueueReport.controller.js
+++ b/server/api/chatQueueReport/chatQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x720b=['nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','ChatQueueReport','includeAll','include','findAll','rows','catch','params','options','find','create','body','update','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','destroy','stack','send','index','rawAttributes','type','model','map','name','query','keys','intersection','fields','attributes','length'];(function(_0x47edea,_0xdfb9f){var _0x54208b=function(_0x3d703e){while(--_0x3d703e){_0x47edea['push'](_0x47edea['shift']());}};_0x54208b(++_0xdfb9f);}(_0x720b,0x1d8));var _0xb720=function(_0x4741a1,_0x35563f){_0x4741a1=_0x4741a1-0x0;var _0xaea39f=_0x720b[_0x4741a1];return _0xaea39f;};'use strict';var emlformat=require(_0xb720('0x0'));var rimraf=require(_0xb720('0x1'));var zipdir=require(_0xb720('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xb720('0x3'));var moment=require(_0xb720('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xb720('0x5'));var util=require(_0xb720('0x6'));var path=require(_0xb720('0x7'));var sox=require('sox');var csv=require(_0xb720('0x8'));var ejs=require(_0xb720('0x9'));var fs=require('fs');var fs_extra=require(_0xb720('0xa'));var _=require(_0xb720('0xb'));var squel=require(_0xb720('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb720('0xd'));var toCsv=require(_0xb720('0x8'));var querystring=require(_0xb720('0xe'));var Papa=require(_0xb720('0xf'));var Redis=require(_0xb720('0x10'));var authService=require(_0xb720('0x11'));var qs=require(_0xb720('0x12'));var as=require(_0xb720('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb720('0x14'))(_0xb720('0x15'));var utils=require('../../config/utils');var config=require(_0xb720('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xb720('0x17'))['db'];function respondWithStatusCode(_0x4ab352,_0x62de2b){_0x62de2b=_0x62de2b||0xcc;return function(_0x12781c){if(_0x12781c){return _0x4ab352[_0xb720('0x18')](_0x62de2b);}return _0x4ab352[_0xb720('0x19')](_0x62de2b)[_0xb720('0x1a')]();};}function respondWithResult(_0x30a5dd,_0x1d29ce){_0x1d29ce=_0x1d29ce||0xc8;return function(_0x414216){if(_0x414216){return _0x30a5dd['status'](_0x1d29ce)[_0xb720('0x1b')](_0x414216);}};}function respondWithFilteredResult(_0x2749fd,_0x3e7e22){return function(_0x5a675d){if(_0x5a675d){var _0x4edde2=typeof _0x3e7e22[_0xb720('0x1c')]===_0xb720('0x1d')&&typeof _0x3e7e22[_0xb720('0x1e')]==='undefined';var _0x1bda26=_0x5a675d[_0xb720('0x1f')];var _0x453c43=_0x4edde2?0x0:_0x3e7e22[_0xb720('0x1c')];var _0x395d6a=_0x4edde2?_0x5a675d[_0xb720('0x1f')]:_0x3e7e22[_0xb720('0x1c')]+_0x3e7e22[_0xb720('0x1e')];var _0x3d8fa4;if(_0x395d6a>=_0x1bda26){_0x395d6a=_0x1bda26;_0x3d8fa4=0xc8;}else{_0x3d8fa4=0xce;}_0x2749fd[_0xb720('0x19')](_0x3d8fa4);return _0x2749fd[_0xb720('0x20')](_0xb720('0x21'),_0x453c43+'-'+_0x395d6a+'/'+_0x1bda26)[_0xb720('0x1b')](_0x5a675d);}return null;};}function patchUpdates(_0x3bcca2){return function(_0x38f815){try{jsonpatch[_0xb720('0x22')](_0x38f815,_0x3bcca2,!![]);}catch(_0x25acb4){return BPromise[_0xb720('0x23')](_0x25acb4);}return _0x38f815[_0xb720('0x24')]();};}function saveUpdates(_0x8b19ea,_0x4e366a){return function(_0x5359b5){if(_0x5359b5){return _0x5359b5['update'](_0x8b19ea)[_0xb720('0x25')](function(_0x5f47d5){return _0x5f47d5;});}return null;};}function removeEntity(_0x27d3cb,_0x20bec1){return function(_0x3b4f61){if(_0x3b4f61){return _0x3b4f61[_0xb720('0x26')]()[_0xb720('0x25')](function(){_0x27d3cb[_0xb720('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x498860,_0x5cb6aa){return function(_0x298cce){if(!_0x298cce){_0x498860[_0xb720('0x18')](0x194);}return _0x298cce;};}function handleError(_0x5f1e03,_0x508eb8){_0x508eb8=_0x508eb8||0x1f4;return function(_0x1c3805){logger['error'](_0x1c3805[_0xb720('0x27')]);if(_0x1c3805['name']){delete _0x1c3805['name'];}_0x5f1e03[_0xb720('0x19')](_0x508eb8)[_0xb720('0x28')](_0x1c3805);};}exports[_0xb720('0x29')]=function(_0x416161,_0x466405){var _0xd25825={},_0x732423={},_0x17faec={'count':0x0,'rows':[]};var _0x575738=_['map'](db['ChatQueueReport'][_0xb720('0x2a')],function(_0x70faef){return{'name':_0x70faef['fieldName'],'type':_0x70faef[_0xb720('0x2b')]['key']};});_0x732423[_0xb720('0x2c')]=_[_0xb720('0x2d')](_0x575738,_0xb720('0x2e'));_0x732423[_0xb720('0x2f')]=_[_0xb720('0x30')](_0x416161[_0xb720('0x2f')]);_0x732423['filters']=_[_0xb720('0x31')](_0x732423[_0xb720('0x2c')],_0x732423[_0xb720('0x2f')]);_0xd25825['attributes']=_[_0xb720('0x31')](_0x732423[_0xb720('0x2c')],qs['fields'](_0x416161['query'][_0xb720('0x32')]));_0xd25825['attributes']=_0xd25825[_0xb720('0x33')][_0xb720('0x34')]?_0xd25825[_0xb720('0x33')]:_0x732423[_0xb720('0x2c')];if(!_0x416161['query']['hasOwnProperty'](_0xb720('0x35'))){_0xd25825[_0xb720('0x1e')]=qs[_0xb720('0x1e')](_0x416161[_0xb720('0x2f')][_0xb720('0x1e')]);_0xd25825['offset']=qs['offset'](_0x416161[_0xb720('0x2f')][_0xb720('0x1c')]);}_0xd25825[_0xb720('0x36')]=qs[_0xb720('0x37')](_0x416161[_0xb720('0x2f')][_0xb720('0x37')]);_0xd25825[_0xb720('0x38')]=qs[_0xb720('0x39')](_[_0xb720('0x3a')](_0x416161['query'],_0x732423['filters']),_0x575738);if(_0x416161[_0xb720('0x2f')][_0xb720('0x3b')]){_0xd25825[_0xb720('0x38')]=_[_0xb720('0x3c')](_0xd25825[_0xb720('0x38')],{'$or':_[_0xb720('0x2d')](_0x575738,function(_0x1e8bc2){if(_0x1e8bc2[_0xb720('0x2b')]!==_0xb720('0x3d')){var _0x4aaa5f={};_0x4aaa5f[_0x1e8bc2[_0xb720('0x2e')]]={'$like':'%'+_0x416161[_0xb720('0x2f')][_0xb720('0x3b')]+'%'};return _0x4aaa5f;}})});}_0xd25825=_[_0xb720('0x3c')]({},_0xd25825,_0x416161['options']);var _0xb50cec={'where':_0xd25825[_0xb720('0x38')]};return db[_0xb720('0x3e')][_0xb720('0x1f')](_0xb50cec)[_0xb720('0x25')](function(_0x2ebd44){_0x17faec[_0xb720('0x1f')]=_0x2ebd44;if(_0x416161[_0xb720('0x2f')][_0xb720('0x3f')]){_0xd25825[_0xb720('0x40')]=[{'all':!![]}];}return db[_0xb720('0x3e')][_0xb720('0x41')](_0xd25825);})[_0xb720('0x25')](function(_0x48ab46){_0x17faec[_0xb720('0x42')]=_0x48ab46;return _0x17faec;})[_0xb720('0x25')](respondWithFilteredResult(_0x466405,_0xd25825))[_0xb720('0x43')](handleError(_0x466405,null));};exports['show']=function(_0xddf177,_0x5f1d85){var _0x4d0201={'raw':!![],'where':{'id':_0xddf177[_0xb720('0x44')]['id']}},_0x466a98={};_0x466a98[_0xb720('0x2c')]=_[_0xb720('0x30')](db['ChatQueueReport'][_0xb720('0x2a')]);_0x466a98[_0xb720('0x2f')]=_['keys'](_0xddf177[_0xb720('0x2f')]);_0x466a98[_0xb720('0x39')]=_[_0xb720('0x31')](_0x466a98[_0xb720('0x2c')],_0x466a98[_0xb720('0x2f')]);_0x4d0201[_0xb720('0x33')]=_[_0xb720('0x31')](_0x466a98[_0xb720('0x2c')],qs['fields'](_0xddf177[_0xb720('0x2f')][_0xb720('0x32')]));_0x4d0201['attributes']=_0x4d0201[_0xb720('0x33')]['length']?_0x4d0201[_0xb720('0x33')]:_0x466a98[_0xb720('0x2c')];if(_0xddf177[_0xb720('0x2f')][_0xb720('0x3f')]){_0x4d0201[_0xb720('0x40')]=[{'all':!![]}];}_0x4d0201=_[_0xb720('0x3c')]({},_0x4d0201,_0xddf177[_0xb720('0x45')]);return db['ChatQueueReport'][_0xb720('0x46')](_0x4d0201)['then'](handleEntityNotFound(_0x5f1d85,null))[_0xb720('0x25')](respondWithResult(_0x5f1d85,null))['catch'](handleError(_0x5f1d85,null));};exports[_0xb720('0x47')]=function(_0x10ff3f,_0x428f40){return db[_0xb720('0x3e')][_0xb720('0x47')](_0x10ff3f[_0xb720('0x48')],{})[_0xb720('0x25')](respondWithResult(_0x428f40,0xc9))[_0xb720('0x43')](handleError(_0x428f40,null));};exports[_0xb720('0x49')]=function(_0x4bd743,_0x5565c9){if(_0x4bd743[_0xb720('0x48')]['id']){delete _0x4bd743[_0xb720('0x48')]['id'];}return db[_0xb720('0x3e')][_0xb720('0x46')]({'where':{'id':_0x4bd743['params']['id']}})[_0xb720('0x25')](handleEntityNotFound(_0x5565c9,null))[_0xb720('0x25')](saveUpdates(_0x4bd743['body'],null))[_0xb720('0x25')](respondWithResult(_0x5565c9,null))[_0xb720('0x43')](handleError(_0x5565c9,null));};exports['destroy']=function(_0x3652ef,_0x4e6bce){return db['ChatQueueReport'][_0xb720('0x46')]({'where':{'id':_0x3652ef[_0xb720('0x44')]['id']}})[_0xb720('0x25')](handleEntityNotFound(_0x4e6bce,null))[_0xb720('0x25')](removeEntity(_0x4e6bce,null))[_0xb720('0x43')](handleError(_0x4e6bce,null));};exports[_0xb720('0x4a')]=function(_0x10938a,_0x3eefc1){return db[_0xb720('0x3e')][_0xb720('0x4a')]()[_0xb720('0x25')](respondWithResult(_0x3eefc1,null))[_0xb720('0x43')](handleError(_0x3eefc1,null));};
\ No newline at end of file
+var _0x4253=['name','send','map','ChatQueueReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','show','include','options','catch','create','body','find','params','describe','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','ioredis','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','count','set','Content-Range','json','reject','update','then','destroy','error','stack'];(function(_0x5923a9,_0x1f6d7c){var _0x205c15=function(_0x37ea91){while(--_0x37ea91){_0x5923a9['push'](_0x5923a9['shift']());}};_0x205c15(++_0x1f6d7c);}(_0x4253,0x14c));var _0x3425=function(_0x3efab6,_0x4c6126){_0x3efab6=_0x3efab6-0x0;var _0x3358d2=_0x4253[_0x3efab6];return _0x3358d2;};'use strict';var emlformat=require(_0x3425('0x0'));var rimraf=require(_0x3425('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3425('0x2'));var rp=require('request-promise');var moment=require(_0x3425('0x3'));var BPromise=require(_0x3425('0x4'));var Mustache=require(_0x3425('0x5'));var util=require(_0x3425('0x6'));var path=require(_0x3425('0x7'));var sox=require(_0x3425('0x8'));var csv=require(_0x3425('0x9'));var ejs=require(_0x3425('0xa'));var fs=require('fs');var fs_extra=require(_0x3425('0xb'));var _=require('lodash');var squel=require(_0x3425('0xc'));var crypto=require(_0x3425('0xd'));var jsforce=require(_0x3425('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x3425('0x9'));var querystring=require(_0x3425('0xf'));var Papa=require('papaparse');var Redis=require(_0x3425('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3425('0x11'));var logger=require(_0x3425('0x12'))(_0x3425('0x13'));var utils=require('../../config/utils');var config=require(_0x3425('0x14'));var licenseUtil=require(_0x3425('0x15'));var db=require(_0x3425('0x16'))['db'];function respondWithStatusCode(_0x5a5cd2,_0xb19960){_0xb19960=_0xb19960||0xcc;return function(_0x31afd8){if(_0x31afd8){return _0x5a5cd2[_0x3425('0x17')](_0xb19960);}return _0x5a5cd2[_0x3425('0x18')](_0xb19960)[_0x3425('0x19')]();};}function respondWithResult(_0x440cc1,_0x42e226){_0x42e226=_0x42e226||0xc8;return function(_0x4ded18){if(_0x4ded18){return _0x440cc1[_0x3425('0x18')](_0x42e226)['json'](_0x4ded18);}};}function respondWithFilteredResult(_0x3c77e6,_0x23aac7){return function(_0x534aed){if(_0x534aed){var _0x169458=typeof _0x23aac7[_0x3425('0x1a')]==='undefined'&&typeof _0x23aac7[_0x3425('0x1b')]==='undefined';var _0xd43449=_0x534aed[_0x3425('0x1c')];var _0x1565c8=_0x169458?0x0:_0x23aac7[_0x3425('0x1a')];var _0x4d5933=_0x169458?_0x534aed[_0x3425('0x1c')]:_0x23aac7['offset']+_0x23aac7[_0x3425('0x1b')];var _0xe4b66e;if(_0x4d5933>=_0xd43449){_0x4d5933=_0xd43449;_0xe4b66e=0xc8;}else{_0xe4b66e=0xce;}_0x3c77e6[_0x3425('0x18')](_0xe4b66e);return _0x3c77e6[_0x3425('0x1d')](_0x3425('0x1e'),_0x1565c8+'-'+_0x4d5933+'/'+_0xd43449)[_0x3425('0x1f')](_0x534aed);}return null;};}function patchUpdates(_0x1e12bb){return function(_0x264d65){try{jsonpatch['apply'](_0x264d65,_0x1e12bb,!![]);}catch(_0x4a6131){return BPromise[_0x3425('0x20')](_0x4a6131);}return _0x264d65['save']();};}function saveUpdates(_0x1ef660,_0x26710c){return function(_0x11705a){if(_0x11705a){return _0x11705a[_0x3425('0x21')](_0x1ef660)[_0x3425('0x22')](function(_0x2f9881){return _0x2f9881;});}return null;};}function removeEntity(_0x520aba,_0x38b577){return function(_0x34617c){if(_0x34617c){return _0x34617c[_0x3425('0x23')]()[_0x3425('0x22')](function(){_0x520aba['status'](0xcc)[_0x3425('0x19')]();});}};}function handleEntityNotFound(_0x31d4d5,_0x2a2162){return function(_0x407a76){if(!_0x407a76){_0x31d4d5[_0x3425('0x17')](0x194);}return _0x407a76;};}function handleError(_0x3322be,_0x3f2e34){_0x3f2e34=_0x3f2e34||0x1f4;return function(_0x2638b5){logger[_0x3425('0x24')](_0x2638b5[_0x3425('0x25')]);if(_0x2638b5[_0x3425('0x26')]){delete _0x2638b5[_0x3425('0x26')];}_0x3322be[_0x3425('0x18')](_0x3f2e34)[_0x3425('0x27')](_0x2638b5);};}exports['index']=function(_0x1ae04f,_0x453914){var _0x3ca2b7={},_0x27f416={},_0x1452b6={'count':0x0,'rows':[]};var _0x1b732a=_[_0x3425('0x28')](db[_0x3425('0x29')][_0x3425('0x2a')],function(_0x15aca6){return{'name':_0x15aca6[_0x3425('0x2b')],'type':_0x15aca6[_0x3425('0x2c')][_0x3425('0x2d')]};});_0x27f416[_0x3425('0x2e')]=_[_0x3425('0x28')](_0x1b732a,_0x3425('0x26'));_0x27f416[_0x3425('0x2f')]=_[_0x3425('0x30')](_0x1ae04f['query']);_0x27f416[_0x3425('0x31')]=_[_0x3425('0x32')](_0x27f416[_0x3425('0x2e')],_0x27f416['query']);_0x3ca2b7[_0x3425('0x33')]=_[_0x3425('0x32')](_0x27f416[_0x3425('0x2e')],qs[_0x3425('0x34')](_0x1ae04f[_0x3425('0x2f')][_0x3425('0x34')]));_0x3ca2b7[_0x3425('0x33')]=_0x3ca2b7[_0x3425('0x33')][_0x3425('0x35')]?_0x3ca2b7[_0x3425('0x33')]:_0x27f416[_0x3425('0x2e')];if(!_0x1ae04f[_0x3425('0x2f')]['hasOwnProperty'](_0x3425('0x36'))){_0x3ca2b7[_0x3425('0x1b')]=qs[_0x3425('0x1b')](_0x1ae04f[_0x3425('0x2f')][_0x3425('0x1b')]);_0x3ca2b7[_0x3425('0x1a')]=qs[_0x3425('0x1a')](_0x1ae04f[_0x3425('0x2f')][_0x3425('0x1a')]);}_0x3ca2b7[_0x3425('0x37')]=qs[_0x3425('0x38')](_0x1ae04f[_0x3425('0x2f')]['sort']);_0x3ca2b7[_0x3425('0x39')]=qs[_0x3425('0x31')](_[_0x3425('0x3a')](_0x1ae04f[_0x3425('0x2f')],_0x27f416[_0x3425('0x31')]),_0x1b732a);if(_0x1ae04f[_0x3425('0x2f')][_0x3425('0x3b')]){_0x3ca2b7[_0x3425('0x39')]=_[_0x3425('0x3c')](_0x3ca2b7[_0x3425('0x39')],{'$or':_[_0x3425('0x28')](_0x1b732a,function(_0x48f5dc){if(_0x48f5dc[_0x3425('0x2c')]!==_0x3425('0x3d')){var _0x526c3b={};_0x526c3b[_0x48f5dc[_0x3425('0x26')]]={'$like':'%'+_0x1ae04f[_0x3425('0x2f')][_0x3425('0x3b')]+'%'};return _0x526c3b;}})});}_0x3ca2b7=_[_0x3425('0x3c')]({},_0x3ca2b7,_0x1ae04f['options']);var _0x23733e={'where':_0x3ca2b7[_0x3425('0x39')]};return db[_0x3425('0x29')]['count'](_0x23733e)['then'](function(_0x40a959){_0x1452b6[_0x3425('0x1c')]=_0x40a959;if(_0x1ae04f[_0x3425('0x2f')][_0x3425('0x3e')]){_0x3ca2b7['include']=[{'all':!![]}];}return db[_0x3425('0x29')][_0x3425('0x3f')](_0x3ca2b7);})[_0x3425('0x22')](function(_0x175084){_0x1452b6[_0x3425('0x40')]=_0x175084;return _0x1452b6;})[_0x3425('0x22')](respondWithFilteredResult(_0x453914,_0x3ca2b7))['catch'](handleError(_0x453914,null));};exports[_0x3425('0x41')]=function(_0xfa49c0,_0x56348d){var _0x4a5fb1={'raw':!![],'where':{'id':_0xfa49c0['params']['id']}},_0x1b8633={};_0x1b8633[_0x3425('0x2e')]=_[_0x3425('0x30')](db[_0x3425('0x29')][_0x3425('0x2a')]);_0x1b8633[_0x3425('0x2f')]=_[_0x3425('0x30')](_0xfa49c0[_0x3425('0x2f')]);_0x1b8633['filters']=_['intersection'](_0x1b8633[_0x3425('0x2e')],_0x1b8633[_0x3425('0x2f')]);_0x4a5fb1[_0x3425('0x33')]=_[_0x3425('0x32')](_0x1b8633[_0x3425('0x2e')],qs[_0x3425('0x34')](_0xfa49c0['query'][_0x3425('0x34')]));_0x4a5fb1[_0x3425('0x33')]=_0x4a5fb1[_0x3425('0x33')][_0x3425('0x35')]?_0x4a5fb1[_0x3425('0x33')]:_0x1b8633[_0x3425('0x2e')];if(_0xfa49c0['query'][_0x3425('0x3e')]){_0x4a5fb1[_0x3425('0x42')]=[{'all':!![]}];}_0x4a5fb1=_['merge']({},_0x4a5fb1,_0xfa49c0[_0x3425('0x43')]);return db['ChatQueueReport']['find'](_0x4a5fb1)[_0x3425('0x22')](handleEntityNotFound(_0x56348d,null))[_0x3425('0x22')](respondWithResult(_0x56348d,null))[_0x3425('0x44')](handleError(_0x56348d,null));};exports['create']=function(_0x11715f,_0x4cb1f5){return db[_0x3425('0x29')][_0x3425('0x45')](_0x11715f['body'],{})[_0x3425('0x22')](respondWithResult(_0x4cb1f5,0xc9))[_0x3425('0x44')](handleError(_0x4cb1f5,null));};exports[_0x3425('0x21')]=function(_0x17626f,_0x357312){if(_0x17626f[_0x3425('0x46')]['id']){delete _0x17626f[_0x3425('0x46')]['id'];}return db[_0x3425('0x29')][_0x3425('0x47')]({'where':{'id':_0x17626f[_0x3425('0x48')]['id']}})[_0x3425('0x22')](handleEntityNotFound(_0x357312,null))['then'](saveUpdates(_0x17626f[_0x3425('0x46')],null))[_0x3425('0x22')](respondWithResult(_0x357312,null))['catch'](handleError(_0x357312,null));};exports[_0x3425('0x23')]=function(_0x397727,_0x4b2a9a){return db['ChatQueueReport'][_0x3425('0x47')]({'where':{'id':_0x397727[_0x3425('0x48')]['id']}})[_0x3425('0x22')](handleEntityNotFound(_0x4b2a9a,null))['then'](removeEntity(_0x4b2a9a,null))[_0x3425('0x44')](handleError(_0x4b2a9a,null));};exports[_0x3425('0x49')]=function(_0x3d4dff,_0x5eab7a){return db['ChatQueueReport'][_0x3425('0x49')]()[_0x3425('0x22')](respondWithResult(_0x5eab7a,null))[_0x3425('0x44')](handleError(_0x5eab7a,null));};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js
index 3ea9348..0bba155 100644
--- a/server/api/chatQueueReport/chatQueueReport.model.js
+++ b/server/api/chatQueueReport/chatQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x757a=['report_chat_queue','uniqueid','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define'];(function(_0x1a4165,_0x116f6c){var _0x54e31f=function(_0x31fe06){while(--_0x31fe06){_0x1a4165['push'](_0x1a4165['shift']());}};_0x54e31f(++_0x116f6c);}(_0x757a,0xde));var _0xa757=function(_0x23dd5b,_0x246bd0){_0x23dd5b=_0x23dd5b-0x0;var _0x35fcb4=_0x757a[_0x23dd5b];return _0x35fcb4;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));module[_0xa757('0x7')]=function(_0x5edca8,_0xae0e7c){return _0x5edca8[_0xa757('0x8')]('ChatQueueReport',attributes,{'tableName':_0xa757('0x9'),'paranoid':![],'indexes':[{'name':_0xa757('0xa'),'fields':[_0xa757('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xb10b=['../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define','report_chat_queue','uniqueid','lodash'];(function(_0x1249f4,_0x27226c){var _0x47c8a9=function(_0x2d9917){while(--_0x2d9917){_0x1249f4['push'](_0x1249f4['shift']());}};_0x47c8a9(++_0x27226c);}(_0xb10b,0x12a));var _0xbb10=function(_0x294cf1,_0x5d6a40){_0x294cf1=_0x294cf1-0x0;var _0x334402=_0xb10b[_0x294cf1];return _0x334402;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var logger=require(_0xbb10('0x1'))(_0xbb10('0x2'));var moment=require(_0xbb10('0x3'));var BPromise=require('bluebird');var rp=require(_0xbb10('0x4'));var fs=require('fs');var path=require(_0xbb10('0x5'));var rimraf=require(_0xbb10('0x6'));var config=require(_0xbb10('0x7'));var attributes=require(_0xbb10('0x8'));module[_0xbb10('0x9')]=function(_0x481979,_0x328583){return _0x481979[_0xbb10('0xa')]('ChatQueueReport',attributes,{'tableName':_0xbb10('0xb'),'paranoid':![],'indexes':[{'name':_0xbb10('0xc'),'fields':[_0xbb10('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.rpc.js b/server/api/chatQueueReport/chatQueueReport.rpc.js
index 2b879e1..efa523d 100644
--- a/server/api/chatQueueReport/chatQueueReport.rpc.js
+++ b/server/api/chatQueueReport/chatQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xad03=['options','raw','debug','UpdateChatQueueReport','body','where','limit','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','then','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateChatQueueReport','ChatQueueReport'];(function(_0x250053,_0x36dad1){var _0x40851a=function(_0x3da7a4){while(--_0x3da7a4){_0x250053['push'](_0x250053['shift']());}};_0x40851a(++_0x36dad1);}(_0xad03,0x1e3));var _0x3ad0=function(_0x2ca718,_0x5239ed){_0x2ca718=_0x2ca718-0x0;var _0x4e2242=_0xad03[_0x2ca718];return _0x4e2242;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3ad0('0x0'));var BPromise=require(_0x3ad0('0x1'));var rs=require(_0x3ad0('0x2'));var fs=require('fs');var Redis=require(_0x3ad0('0x3'));var db=require(_0x3ad0('0x4'))['db'];var utils=require(_0x3ad0('0x5'));var logger=require(_0x3ad0('0x6'))(_0x3ad0('0x7'));var config=require('../../config/environment');var jayson=require(_0x3ad0('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5cc92e,_0x5a7401,_0xfe9877){return new BPromise(function(_0x1da13b,_0x1139ac){return client['request'](_0x5cc92e,_0xfe9877)[_0x3ad0('0x9')](function(_0x353473){logger[_0x3ad0('0xa')](_0x3ad0('0xb'),_0x5a7401,_0x3ad0('0xc'));logger['debug'](_0x3ad0('0xd'),_0x5a7401,_0x3ad0('0xc'),JSON[_0x3ad0('0xe')](_0x353473));if(_0x353473['error']){if(_0x353473[_0x3ad0('0xf')]['code']===0x1f4){logger['error'](_0x3ad0('0xb'),_0x5a7401,_0x353473[_0x3ad0('0xf')]['message']);return _0x1139ac(_0x353473[_0x3ad0('0xf')][_0x3ad0('0x10')]);}logger[_0x3ad0('0xf')](_0x3ad0('0xb'),_0x5a7401,_0x353473[_0x3ad0('0xf')][_0x3ad0('0x10')]);return _0x1da13b(_0x353473[_0x3ad0('0xf')][_0x3ad0('0x10')]);}else{logger['info'](_0x3ad0('0xb'),_0x5a7401,_0x3ad0('0xc'));_0x1da13b(_0x353473[_0x3ad0('0x11')]['message']);}})[_0x3ad0('0x12')](function(_0x461fa6){logger[_0x3ad0('0xf')]('ChatQueueReport,\x20%s,\x20%s',_0x5a7401,_0x461fa6);_0x1139ac(_0x461fa6);});});}exports[_0x3ad0('0x13')]=function(_0x31b56a){var _0x2f1a59=this;return new Promise(function(_0x1e0569,_0x2750a3){return db[_0x3ad0('0x14')]['create'](_0x31b56a['body'],{'raw':_0x31b56a[_0x3ad0('0x15')]?_0x31b56a[_0x3ad0('0x15')][_0x3ad0('0x16')]===undefined?!![]:![]:!![]})['then'](function(_0x1062b7){logger[_0x3ad0('0xa')](_0x3ad0('0x13'),_0x31b56a);logger[_0x3ad0('0x17')](_0x3ad0('0x13'),_0x31b56a,JSON[_0x3ad0('0xe')](_0x1062b7));_0x1e0569(_0x1062b7);})[_0x3ad0('0x12')](function(_0x1abe28){logger[_0x3ad0('0xf')](_0x3ad0('0x13'),_0x1abe28[_0x3ad0('0x10')],_0x31b56a);_0x2750a3(_0x2f1a59[_0x3ad0('0xf')](0x1f4,_0x1abe28[_0x3ad0('0x10')]));});});};exports[_0x3ad0('0x18')]=function(_0x2f5fc1){var _0x5672f1=this;return new Promise(function(_0xe72ec6,_0x9b865a){return db[_0x3ad0('0x14')]['update'](_0x2f5fc1[_0x3ad0('0x19')],{'raw':_0x2f5fc1[_0x3ad0('0x15')]?_0x2f5fc1[_0x3ad0('0x15')][_0x3ad0('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2f5fc1['options']?_0x2f5fc1[_0x3ad0('0x15')][_0x3ad0('0x1a')]||null:null,'attributes':_0x2f5fc1['options']?_0x2f5fc1[_0x3ad0('0x15')]['attributes']||null:null,'limit':_0x2f5fc1['options']?_0x2f5fc1['options'][_0x3ad0('0x1b')]||null:null})['then'](function(_0x55a006){logger['info'](_0x3ad0('0x18'),_0x2f5fc1);logger[_0x3ad0('0x17')](_0x3ad0('0x18'),_0x2f5fc1,JSON['stringify'](_0x55a006));_0xe72ec6(_0x55a006);})['catch'](function(_0x19299b){logger[_0x3ad0('0xf')](_0x3ad0('0x18'),_0x19299b[_0x3ad0('0x10')],_0x2f5fc1);_0x9b865a(_0x5672f1[_0x3ad0('0xf')](0x1f4,_0x19299b[_0x3ad0('0x10')]));});});};
\ No newline at end of file
+var _0xff47=['request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateChatQueueReport','create','options','raw','UpdateChatQueueReport','ChatQueueReport','update','body','attributes','limit','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','request','then','info','ChatQueueReport,\x20%s,\x20%s'];(function(_0x52f498,_0xeec0c3){var _0x2a97cb=function(_0x43ad5d){while(--_0x43ad5d){_0x52f498['push'](_0x52f498['shift']());}};_0x2a97cb(++_0xeec0c3);}(_0xff47,0x15c));var _0x7ff4=function(_0x2335ae,_0x1c53d5){_0x2335ae=_0x2335ae-0x0;var _0x34d016=_0xff47[_0x2335ae];return _0x34d016;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7ff4('0x0'));var BPromise=require(_0x7ff4('0x1'));var rs=require(_0x7ff4('0x2'));var fs=require('fs');var Redis=require(_0x7ff4('0x3'));var db=require(_0x7ff4('0x4'))['db'];var utils=require(_0x7ff4('0x5'));var logger=require(_0x7ff4('0x6'))('rpc');var config=require(_0x7ff4('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x50b498,_0x4c7814,_0x7771a8){return new BPromise(function(_0x87f712,_0xcebb83){return client[_0x7ff4('0x8')](_0x50b498,_0x7771a8)[_0x7ff4('0x9')](function(_0x30ae46){logger[_0x7ff4('0xa')](_0x7ff4('0xb'),_0x4c7814,_0x7ff4('0xc'));logger[_0x7ff4('0xd')](_0x7ff4('0xe'),_0x4c7814,_0x7ff4('0xc'),JSON[_0x7ff4('0xf')](_0x30ae46));if(_0x30ae46[_0x7ff4('0x10')]){if(_0x30ae46[_0x7ff4('0x10')]['code']===0x1f4){logger[_0x7ff4('0x10')](_0x7ff4('0xb'),_0x4c7814,_0x30ae46[_0x7ff4('0x10')][_0x7ff4('0x11')]);return _0xcebb83(_0x30ae46[_0x7ff4('0x10')][_0x7ff4('0x11')]);}logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x4c7814,_0x30ae46[_0x7ff4('0x10')][_0x7ff4('0x11')]);return _0x87f712(_0x30ae46[_0x7ff4('0x10')][_0x7ff4('0x11')]);}else{logger[_0x7ff4('0xa')](_0x7ff4('0xb'),_0x4c7814,_0x7ff4('0xc'));_0x87f712(_0x30ae46[_0x7ff4('0x12')][_0x7ff4('0x11')]);}})[_0x7ff4('0x13')](function(_0x41b58d){logger['error'](_0x7ff4('0xb'),_0x4c7814,_0x41b58d);_0xcebb83(_0x41b58d);});});}exports[_0x7ff4('0x14')]=function(_0x4e025f){var _0x48e33b=this;return new Promise(function(_0x14bb52,_0x3f7588){return db['ChatQueueReport'][_0x7ff4('0x15')](_0x4e025f['body'],{'raw':_0x4e025f[_0x7ff4('0x16')]?_0x4e025f[_0x7ff4('0x16')][_0x7ff4('0x17')]===undefined?!![]:![]:!![]})[_0x7ff4('0x9')](function(_0x4ad58f){logger[_0x7ff4('0xa')](_0x7ff4('0x14'),_0x4e025f);logger[_0x7ff4('0xd')](_0x7ff4('0x14'),_0x4e025f,JSON[_0x7ff4('0xf')](_0x4ad58f));_0x14bb52(_0x4ad58f);})['catch'](function(_0x224ab7){logger[_0x7ff4('0x10')](_0x7ff4('0x14'),_0x224ab7['message'],_0x4e025f);_0x3f7588(_0x48e33b['error'](0x1f4,_0x224ab7[_0x7ff4('0x11')]));});});};exports[_0x7ff4('0x18')]=function(_0x52cc10){var _0x4df6c2=this;return new Promise(function(_0x35ed0c,_0x465829){return db[_0x7ff4('0x19')][_0x7ff4('0x1a')](_0x52cc10[_0x7ff4('0x1b')],{'raw':_0x52cc10[_0x7ff4('0x16')]?_0x52cc10[_0x7ff4('0x16')][_0x7ff4('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x52cc10[_0x7ff4('0x16')]?_0x52cc10[_0x7ff4('0x16')]['where']||null:null,'attributes':_0x52cc10[_0x7ff4('0x16')]?_0x52cc10[_0x7ff4('0x16')][_0x7ff4('0x1c')]||null:null,'limit':_0x52cc10[_0x7ff4('0x16')]?_0x52cc10['options'][_0x7ff4('0x1d')]||null:null})[_0x7ff4('0x9')](function(_0x497d0e){logger[_0x7ff4('0xa')](_0x7ff4('0x18'),_0x52cc10);logger['debug'](_0x7ff4('0x18'),_0x52cc10,JSON['stringify'](_0x497d0e));_0x35ed0c(_0x497d0e);})[_0x7ff4('0x13')](function(_0x3f9839){logger['error']('UpdateChatQueueReport',_0x3f9839[_0x7ff4('0x11')],_0x52cc10);_0x465829(_0x4df6c2[_0x7ff4('0x10')](0x1f4,_0x3f9839[_0x7ff4('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js
index 7bab161..6f3f5aa 100644
--- a/server/api/chatQueueReport/index.js
+++ b/server/api/chatQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x78dd=['fs-extra','../../components/auth/service','../../components/interaction/service','./chatQueueReport.controller','isAuthenticated','index','get','/describe','show','post','update','/:id','destroy','util','path','connect-timeout'];(function(_0x1b52e0,_0x1f0a88){var _0x581d36=function(_0x588aca){while(--_0x588aca){_0x1b52e0['push'](_0x1b52e0['shift']());}};_0x581d36(++_0x1f0a88);}(_0x78dd,0x1dd));var _0xd78d=function(_0x548627,_0x4ec392){_0x548627=_0x548627-0x0;var _0x844a84=_0x78dd[_0x548627];return _0x844a84;};'use strict';var multer=require('multer');var util=require(_0xd78d('0x0'));var path=require(_0xd78d('0x1'));var timeout=require(_0xd78d('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xd78d('0x3'));var auth=require(_0xd78d('0x4'));var interaction=require(_0xd78d('0x5'));var config=require('../../config/environment');var controller=require(_0xd78d('0x6'));router['get']('/',auth[_0xd78d('0x7')](),controller[_0xd78d('0x8')]);router[_0xd78d('0x9')](_0xd78d('0xa'),auth[_0xd78d('0x7')](),controller['describe']);router[_0xd78d('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xd78d('0xb')]);router[_0xd78d('0xc')]('/',auth[_0xd78d('0x7')](),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller[_0xd78d('0xd')]);router['delete'](_0xd78d('0xe'),auth[_0xd78d('0x7')](),controller[_0xd78d('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0xaa50=['/:id','show','post','create','put','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','get','isAuthenticated','index','/describe','describe'];(function(_0x487b0c,_0x14ff74){var _0x1adbdc=function(_0x2e7b9d){while(--_0x2e7b9d){_0x487b0c['push'](_0x487b0c['shift']());}};_0x1adbdc(++_0x14ff74);}(_0xaa50,0x142));var _0x0aa5=function(_0x9b163,_0x5d8c8f){_0x9b163=_0x9b163-0x0;var _0x824910=_0xaa50[_0x9b163];return _0x824910;};'use strict';var multer=require('multer');var util=require(_0x0aa5('0x0'));var path=require('path');var timeout=require(_0x0aa5('0x1'));var express=require(_0x0aa5('0x2'));var router=express[_0x0aa5('0x3')]();var fs_extra=require(_0x0aa5('0x4'));var auth=require(_0x0aa5('0x5'));var interaction=require(_0x0aa5('0x6'));var config=require(_0x0aa5('0x7'));var controller=require(_0x0aa5('0x8'));router[_0x0aa5('0x9')]('/',auth[_0x0aa5('0xa')](),controller[_0x0aa5('0xb')]);router['get'](_0x0aa5('0xc'),auth[_0x0aa5('0xa')](),controller[_0x0aa5('0xd')]);router[_0x0aa5('0x9')](_0x0aa5('0xe'),auth[_0x0aa5('0xa')](),controller[_0x0aa5('0xf')]);router[_0x0aa5('0x10')]('/',auth[_0x0aa5('0xa')](),controller[_0x0aa5('0x11')]);router[_0x0aa5('0x12')](_0x0aa5('0xe'),auth[_0x0aa5('0xa')](),controller['update']);router['delete'](_0x0aa5('0xe'),auth[_0x0aa5('0xa')](),controller[_0x0aa5('0x13')]);module[_0x0aa5('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js
index 6205e0d..cf7ae42 100644
--- a/server/api/chatTransferReport/chatTransferReport.attributes.js
+++ b/server/api/chatTransferReport/chatTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x00bb=['moment','sequelize','exports','ENUM','agent','queue','DATE','NOW'];(function(_0x2bb825,_0x1da979){var _0x52e9f0=function(_0x2d51e2){while(--_0x2d51e2){_0x2bb825['push'](_0x2bb825['shift']());}};_0x52e9f0(++_0x1da979);}(_0x00bb,0x1d8));var _0xb00b=function(_0x3ff085,_0x27c92e){_0x3ff085=_0x3ff085-0x0;var _0x2b68c3=_0x00bb[_0x3ff085];return _0x2b68c3;};'use strict';var moment=require(_0xb00b('0x0'));var Sequelize=require(_0xb00b('0x1'));module[_0xb00b('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xb00b('0x3')]('account',_0xb00b('0x4'),_0xb00b('0x5')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize[_0xb00b('0x6')],'allowNull':![],'defaultValue':Sequelize[_0xb00b('0x7')]}};
\ No newline at end of file
+var _0x34e8=['queue','DATE','NOW','moment','sequelize','exports','STRING','account','agent'];(function(_0x2c3c23,_0x3609b5){var _0x24e0ee=function(_0x510410){while(--_0x510410){_0x2c3c23['push'](_0x2c3c23['shift']());}};_0x24e0ee(++_0x3609b5);}(_0x34e8,0x12c));var _0x834e=function(_0x2be0c6,_0x53dfd6){_0x2be0c6=_0x2be0c6-0x0;var _0x4262a0=_0x34e8[_0x2be0c6];return _0x4262a0;};'use strict';var moment=require(_0x834e('0x0'));var Sequelize=require(_0x834e('0x1'));module[_0x834e('0x2')]={'uniqueid':{'type':Sequelize[_0x834e('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x834e('0x4'),_0x834e('0x5'),_0x834e('0x6')),'allowNull':![],'defaultValue':_0x834e('0x6')},'transferredAt':{'type':Sequelize[_0x834e('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x834e('0x8')]}};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js
index 1cc9776..ac7a0a2 100644
--- a/server/api/chatTransferReport/chatTransferReport.controller.js
+++ b/server/api/chatTransferReport/chatTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x034e=['include','findAll','rows','catch','find','create','body','params','describe','eml-format','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','end','limit','undefined','count','offset','json','apply','reject','update','destroy','then','error','name','send','index','map','ChatTransferReport','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll'];(function(_0x526b9f,_0x5c2efb){var _0xe8dd51=function(_0x2f0e1f){while(--_0x2f0e1f){_0x526b9f['push'](_0x526b9f['shift']());}};_0xe8dd51(++_0x5c2efb);}(_0x034e,0x16c));var _0xe034=function(_0x3277dc,_0x1a8604){_0x3277dc=_0x3277dc-0x0;var _0x68c39=_0x034e[_0x3277dc];return _0x68c39;};'use strict';var emlformat=require(_0xe034('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xe034('0x1'));var BPromise=require('bluebird');var Mustache=require(_0xe034('0x2'));var util=require(_0xe034('0x3'));var path=require(_0xe034('0x4'));var sox=require(_0xe034('0x5'));var csv=require('to-csv');var ejs=require(_0xe034('0x6'));var fs=require('fs');var fs_extra=require(_0xe034('0x7'));var _=require(_0xe034('0x8'));var squel=require(_0xe034('0x9'));var crypto=require(_0xe034('0xa'));var jsforce=require(_0xe034('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xe034('0xc'));var querystring=require(_0xe034('0xd'));var Papa=require('papaparse');var Redis=require(_0xe034('0xe'));var authService=require(_0xe034('0xf'));var qs=require(_0xe034('0x10'));var as=require(_0xe034('0x11'));var hardwareService=require(_0xe034('0x12'));var logger=require(_0xe034('0x13'))(_0xe034('0x14'));var utils=require('../../config/utils');var config=require(_0xe034('0x15'));var licenseUtil=require(_0xe034('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x411bc9,_0x428d27){_0x428d27=_0x428d27||0xcc;return function(_0x347d1f){if(_0x347d1f){return _0x411bc9[_0xe034('0x17')](_0x428d27);}return _0x411bc9[_0xe034('0x18')](_0x428d27)[_0xe034('0x19')]();};}function respondWithResult(_0x5d0f07,_0x3ac78a){_0x3ac78a=_0x3ac78a||0xc8;return function(_0x5a60e){if(_0x5a60e){return _0x5d0f07[_0xe034('0x18')](_0x3ac78a)['json'](_0x5a60e);}};}function respondWithFilteredResult(_0x33c3a1,_0x3a85d5){return function(_0x359132){if(_0x359132){var _0x1b728a=typeof _0x3a85d5['offset']==='undefined'&&typeof _0x3a85d5[_0xe034('0x1a')]===_0xe034('0x1b');var _0x1cb7da=_0x359132[_0xe034('0x1c')];var _0x14f8f5=_0x1b728a?0x0:_0x3a85d5['offset'];var _0x3b0ee7=_0x1b728a?_0x359132[_0xe034('0x1c')]:_0x3a85d5[_0xe034('0x1d')]+_0x3a85d5['limit'];var _0x2481f9;if(_0x3b0ee7>=_0x1cb7da){_0x3b0ee7=_0x1cb7da;_0x2481f9=0xc8;}else{_0x2481f9=0xce;}_0x33c3a1[_0xe034('0x18')](_0x2481f9);return _0x33c3a1['set']('Content-Range',_0x14f8f5+'-'+_0x3b0ee7+'/'+_0x1cb7da)[_0xe034('0x1e')](_0x359132);}return null;};}function patchUpdates(_0x2e53e6){return function(_0x5a3e88){try{jsonpatch[_0xe034('0x1f')](_0x5a3e88,_0x2e53e6,!![]);}catch(_0xf2d3d4){return BPromise[_0xe034('0x20')](_0xf2d3d4);}return _0x5a3e88['save']();};}function saveUpdates(_0x23df40,_0x497580){return function(_0x59baef){if(_0x59baef){return _0x59baef[_0xe034('0x21')](_0x23df40)['then'](function(_0x3cfe4e){return _0x3cfe4e;});}return null;};}function removeEntity(_0x500098,_0x5d16b6){return function(_0x1a1102){if(_0x1a1102){return _0x1a1102[_0xe034('0x22')]()[_0xe034('0x23')](function(){_0x500098[_0xe034('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3356e,_0x14689a){return function(_0x3b86af){if(!_0x3b86af){_0x3356e[_0xe034('0x17')](0x194);}return _0x3b86af;};}function handleError(_0x453627,_0x3cd0cb){_0x3cd0cb=_0x3cd0cb||0x1f4;return function(_0x2814ad){logger[_0xe034('0x24')](_0x2814ad['stack']);if(_0x2814ad[_0xe034('0x25')]){delete _0x2814ad[_0xe034('0x25')];}_0x453627[_0xe034('0x18')](_0x3cd0cb)[_0xe034('0x26')](_0x2814ad);};}exports[_0xe034('0x27')]=function(_0x45288e,_0x41f136){var _0x60c2ed={},_0x6b6026={},_0x503f0f={'count':0x0,'rows':[]};var _0xd0d01f=_[_0xe034('0x28')](db[_0xe034('0x29')][_0xe034('0x2a')],function(_0x4ab0a3){return{'name':_0x4ab0a3[_0xe034('0x2b')],'type':_0x4ab0a3[_0xe034('0x2c')][_0xe034('0x2d')]};});_0x6b6026[_0xe034('0x2e')]=_[_0xe034('0x28')](_0xd0d01f,_0xe034('0x25'));_0x6b6026['query']=_[_0xe034('0x2f')](_0x45288e[_0xe034('0x30')]);_0x6b6026['filters']=_[_0xe034('0x31')](_0x6b6026[_0xe034('0x2e')],_0x6b6026['query']);_0x60c2ed[_0xe034('0x32')]=_[_0xe034('0x31')](_0x6b6026['model'],qs[_0xe034('0x33')](_0x45288e['query'][_0xe034('0x33')]));_0x60c2ed[_0xe034('0x32')]=_0x60c2ed['attributes'][_0xe034('0x34')]?_0x60c2ed[_0xe034('0x32')]:_0x6b6026[_0xe034('0x2e')];if(!_0x45288e[_0xe034('0x30')]['hasOwnProperty']('nolimit')){_0x60c2ed[_0xe034('0x1a')]=qs[_0xe034('0x1a')](_0x45288e[_0xe034('0x30')]['limit']);_0x60c2ed[_0xe034('0x1d')]=qs[_0xe034('0x1d')](_0x45288e[_0xe034('0x30')][_0xe034('0x1d')]);}_0x60c2ed['order']=qs[_0xe034('0x35')](_0x45288e[_0xe034('0x30')][_0xe034('0x35')]);_0x60c2ed['where']=qs[_0xe034('0x36')](_[_0xe034('0x37')](_0x45288e[_0xe034('0x30')],_0x6b6026[_0xe034('0x36')]),_0xd0d01f);if(_0x45288e['query'][_0xe034('0x38')]){_0x60c2ed[_0xe034('0x39')]=_[_0xe034('0x3a')](_0x60c2ed[_0xe034('0x39')],{'$or':_[_0xe034('0x28')](_0xd0d01f,function(_0x7abefb){if(_0x7abefb[_0xe034('0x2c')]!==_0xe034('0x3b')){var _0x1e5d60={};_0x1e5d60[_0x7abefb[_0xe034('0x25')]]={'$like':'%'+_0x45288e[_0xe034('0x30')]['filter']+'%'};return _0x1e5d60;}})});}_0x60c2ed=_['merge']({},_0x60c2ed,_0x45288e[_0xe034('0x3c')]);var _0x507ce6={'where':_0x60c2ed[_0xe034('0x39')]};return db['ChatTransferReport'][_0xe034('0x1c')](_0x507ce6)[_0xe034('0x23')](function(_0x255c5c){_0x503f0f['count']=_0x255c5c;if(_0x45288e[_0xe034('0x30')][_0xe034('0x3d')]){_0x60c2ed[_0xe034('0x3e')]=[{'all':!![]}];}return db[_0xe034('0x29')][_0xe034('0x3f')](_0x60c2ed);})[_0xe034('0x23')](function(_0x2ad97b){_0x503f0f[_0xe034('0x40')]=_0x2ad97b;return _0x503f0f;})[_0xe034('0x23')](respondWithFilteredResult(_0x41f136,_0x60c2ed))[_0xe034('0x41')](handleError(_0x41f136,null));};exports['show']=function(_0xd7f0c0,_0x46ffb7){var _0x378026={'raw':!![],'where':{'id':_0xd7f0c0['params']['id']}},_0x1f3d78={};_0x1f3d78['model']=_[_0xe034('0x2f')](db['ChatTransferReport']['rawAttributes']);_0x1f3d78[_0xe034('0x30')]=_[_0xe034('0x2f')](_0xd7f0c0[_0xe034('0x30')]);_0x1f3d78[_0xe034('0x36')]=_['intersection'](_0x1f3d78[_0xe034('0x2e')],_0x1f3d78[_0xe034('0x30')]);_0x378026[_0xe034('0x32')]=_[_0xe034('0x31')](_0x1f3d78[_0xe034('0x2e')],qs[_0xe034('0x33')](_0xd7f0c0[_0xe034('0x30')][_0xe034('0x33')]));_0x378026['attributes']=_0x378026[_0xe034('0x32')]['length']?_0x378026[_0xe034('0x32')]:_0x1f3d78['model'];if(_0xd7f0c0[_0xe034('0x30')][_0xe034('0x3d')]){_0x378026[_0xe034('0x3e')]=[{'all':!![]}];}_0x378026=_[_0xe034('0x3a')]({},_0x378026,_0xd7f0c0['options']);return db[_0xe034('0x29')][_0xe034('0x42')](_0x378026)[_0xe034('0x23')](handleEntityNotFound(_0x46ffb7,null))[_0xe034('0x23')](respondWithResult(_0x46ffb7,null))[_0xe034('0x41')](handleError(_0x46ffb7,null));};exports[_0xe034('0x43')]=function(_0x33d162,_0x19b6a3){return db[_0xe034('0x29')]['create'](_0x33d162['body'],{})[_0xe034('0x23')](respondWithResult(_0x19b6a3,0xc9))['catch'](handleError(_0x19b6a3,null));};exports[_0xe034('0x21')]=function(_0x318ec0,_0x55c770){if(_0x318ec0[_0xe034('0x44')]['id']){delete _0x318ec0[_0xe034('0x44')]['id'];}return db['ChatTransferReport'][_0xe034('0x42')]({'where':{'id':_0x318ec0[_0xe034('0x45')]['id']}})[_0xe034('0x23')](handleEntityNotFound(_0x55c770,null))['then'](saveUpdates(_0x318ec0[_0xe034('0x44')],null))[_0xe034('0x23')](respondWithResult(_0x55c770,null))[_0xe034('0x41')](handleError(_0x55c770,null));};exports[_0xe034('0x22')]=function(_0x28f4ae,_0xe3105e){return db[_0xe034('0x29')][_0xe034('0x42')]({'where':{'id':_0x28f4ae[_0xe034('0x45')]['id']}})['then'](handleEntityNotFound(_0xe3105e,null))[_0xe034('0x23')](removeEntity(_0xe3105e,null))[_0xe034('0x41')](handleError(_0xe3105e,null));};exports[_0xe034('0x46')]=function(_0x519bb7,_0xea1d54){return db['ChatTransferReport'][_0xe034('0x46')]()['then'](respondWithResult(_0xea1d54,null))[_0xe034('0x41')](handleError(_0xea1d54,null));};
\ No newline at end of file
+var _0xab51=['jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','save','then','destroy','error','stack','name','send','index','map','fieldName','type','key','query','keys','model','fields','attributes','length','nolimit','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','params','ChatTransferReport','intersection','find','catch','create','body','describe','rimraf','zip-dir','request-promise','moment','mustache','to-csv','ejs','fs-extra','lodash','squel','crypto'];(function(_0x476774,_0x30d446){var _0x3d5d6a=function(_0x49f59d){while(--_0x49f59d){_0x476774['push'](_0x476774['shift']());}};_0x3d5d6a(++_0x30d446);}(_0xab51,0x85));var _0x1ab5=function(_0x325375,_0x5d6c12){_0x325375=_0x325375-0x0;var _0x215e5a=_0xab51[_0x325375];return _0x215e5a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1ab5('0x0'));var zipdir=require(_0x1ab5('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1ab5('0x2'));var moment=require(_0x1ab5('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x1ab5('0x4'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x1ab5('0x5'));var ejs=require(_0x1ab5('0x6'));var fs=require('fs');var fs_extra=require(_0x1ab5('0x7'));var _=require(_0x1ab5('0x8'));var squel=require(_0x1ab5('0x9'));var crypto=require(_0x1ab5('0xa'));var jsforce=require(_0x1ab5('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x1ab5('0x5'));var querystring=require('querystring');var Papa=require(_0x1ab5('0xc'));var Redis=require(_0x1ab5('0xd'));var authService=require(_0x1ab5('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x1ab5('0xf'));var hardwareService=require(_0x1ab5('0x10'));var logger=require(_0x1ab5('0x11'))(_0x1ab5('0x12'));var utils=require(_0x1ab5('0x13'));var config=require(_0x1ab5('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x1ab5('0x15'))['db'];function respondWithStatusCode(_0x3ad626,_0x5174a3){_0x5174a3=_0x5174a3||0xcc;return function(_0x533712){if(_0x533712){return _0x3ad626[_0x1ab5('0x16')](_0x5174a3);}return _0x3ad626['status'](_0x5174a3)[_0x1ab5('0x17')]();};}function respondWithResult(_0x119a87,_0x5da070){_0x5da070=_0x5da070||0xc8;return function(_0x4fbedf){if(_0x4fbedf){return _0x119a87[_0x1ab5('0x18')](_0x5da070)['json'](_0x4fbedf);}};}function respondWithFilteredResult(_0x4ffde8,_0x27f119){return function(_0x237969){if(_0x237969){var _0x7be81=typeof _0x27f119[_0x1ab5('0x19')]===_0x1ab5('0x1a')&&typeof _0x27f119[_0x1ab5('0x1b')]===_0x1ab5('0x1a');var _0x2149e3=_0x237969[_0x1ab5('0x1c')];var _0xc0e98a=_0x7be81?0x0:_0x27f119['offset'];var _0x25c864=_0x7be81?_0x237969[_0x1ab5('0x1c')]:_0x27f119[_0x1ab5('0x19')]+_0x27f119[_0x1ab5('0x1b')];var _0x5c4432;if(_0x25c864>=_0x2149e3){_0x25c864=_0x2149e3;_0x5c4432=0xc8;}else{_0x5c4432=0xce;}_0x4ffde8[_0x1ab5('0x18')](_0x5c4432);return _0x4ffde8[_0x1ab5('0x1d')](_0x1ab5('0x1e'),_0xc0e98a+'-'+_0x25c864+'/'+_0x2149e3)[_0x1ab5('0x1f')](_0x237969);}return null;};}function patchUpdates(_0x44855){return function(_0x3d5668){try{jsonpatch[_0x1ab5('0x20')](_0x3d5668,_0x44855,!![]);}catch(_0x18ac7f){return BPromise['reject'](_0x18ac7f);}return _0x3d5668[_0x1ab5('0x21')]();};}function saveUpdates(_0x1c89fc,_0x2f1a7b){return function(_0x6c11c4){if(_0x6c11c4){return _0x6c11c4['update'](_0x1c89fc)[_0x1ab5('0x22')](function(_0x2a1a61){return _0x2a1a61;});}return null;};}function removeEntity(_0x1f2ca1,_0x2e9b17){return function(_0xb3dae6){if(_0xb3dae6){return _0xb3dae6[_0x1ab5('0x23')]()[_0x1ab5('0x22')](function(){_0x1f2ca1[_0x1ab5('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a4422,_0x69b67d){return function(_0x70d1ec){if(!_0x70d1ec){_0x3a4422[_0x1ab5('0x16')](0x194);}return _0x70d1ec;};}function handleError(_0x433c2c,_0x2f66e0){_0x2f66e0=_0x2f66e0||0x1f4;return function(_0x3fc4f6){logger[_0x1ab5('0x24')](_0x3fc4f6[_0x1ab5('0x25')]);if(_0x3fc4f6[_0x1ab5('0x26')]){delete _0x3fc4f6[_0x1ab5('0x26')];}_0x433c2c[_0x1ab5('0x18')](_0x2f66e0)[_0x1ab5('0x27')](_0x3fc4f6);};}exports[_0x1ab5('0x28')]=function(_0x3ec162,_0x31e067){var _0x596fe2={},_0x47af4a={},_0x4758b0={'count':0x0,'rows':[]};var _0x18319e=_[_0x1ab5('0x29')](db['ChatTransferReport']['rawAttributes'],function(_0x42a855){return{'name':_0x42a855[_0x1ab5('0x2a')],'type':_0x42a855[_0x1ab5('0x2b')][_0x1ab5('0x2c')]};});_0x47af4a['model']=_[_0x1ab5('0x29')](_0x18319e,'name');_0x47af4a[_0x1ab5('0x2d')]=_[_0x1ab5('0x2e')](_0x3ec162['query']);_0x47af4a['filters']=_['intersection'](_0x47af4a[_0x1ab5('0x2f')],_0x47af4a[_0x1ab5('0x2d')]);_0x596fe2['attributes']=_['intersection'](_0x47af4a[_0x1ab5('0x2f')],qs[_0x1ab5('0x30')](_0x3ec162[_0x1ab5('0x2d')][_0x1ab5('0x30')]));_0x596fe2[_0x1ab5('0x31')]=_0x596fe2[_0x1ab5('0x31')][_0x1ab5('0x32')]?_0x596fe2[_0x1ab5('0x31')]:_0x47af4a[_0x1ab5('0x2f')];if(!_0x3ec162[_0x1ab5('0x2d')]['hasOwnProperty'](_0x1ab5('0x33'))){_0x596fe2[_0x1ab5('0x1b')]=qs[_0x1ab5('0x1b')](_0x3ec162['query'][_0x1ab5('0x1b')]);_0x596fe2['offset']=qs[_0x1ab5('0x19')](_0x3ec162['query'][_0x1ab5('0x19')]);}_0x596fe2['order']=qs[_0x1ab5('0x34')](_0x3ec162[_0x1ab5('0x2d')][_0x1ab5('0x34')]);_0x596fe2['where']=qs[_0x1ab5('0x35')](_[_0x1ab5('0x36')](_0x3ec162[_0x1ab5('0x2d')],_0x47af4a[_0x1ab5('0x35')]),_0x18319e);if(_0x3ec162[_0x1ab5('0x2d')][_0x1ab5('0x37')]){_0x596fe2[_0x1ab5('0x38')]=_[_0x1ab5('0x39')](_0x596fe2[_0x1ab5('0x38')],{'$or':_[_0x1ab5('0x29')](_0x18319e,function(_0x128f00){if(_0x128f00[_0x1ab5('0x2b')]!==_0x1ab5('0x3a')){var _0x9d907e={};_0x9d907e[_0x128f00['name']]={'$like':'%'+_0x3ec162[_0x1ab5('0x2d')]['filter']+'%'};return _0x9d907e;}})});}_0x596fe2=_[_0x1ab5('0x39')]({},_0x596fe2,_0x3ec162[_0x1ab5('0x3b')]);var _0x20af3c={'where':_0x596fe2[_0x1ab5('0x38')]};return db['ChatTransferReport'][_0x1ab5('0x1c')](_0x20af3c)[_0x1ab5('0x22')](function(_0x152d3b){_0x4758b0[_0x1ab5('0x1c')]=_0x152d3b;if(_0x3ec162[_0x1ab5('0x2d')][_0x1ab5('0x3c')]){_0x596fe2[_0x1ab5('0x3d')]=[{'all':!![]}];}return db['ChatTransferReport'][_0x1ab5('0x3e')](_0x596fe2);})['then'](function(_0x5d5188){_0x4758b0[_0x1ab5('0x3f')]=_0x5d5188;return _0x4758b0;})['then'](respondWithFilteredResult(_0x31e067,_0x596fe2))['catch'](handleError(_0x31e067,null));};exports['show']=function(_0xef7cb5,_0x5f0490){var _0x414ac6={'raw':!![],'where':{'id':_0xef7cb5[_0x1ab5('0x40')]['id']}},_0x35ea34={};_0x35ea34[_0x1ab5('0x2f')]=_[_0x1ab5('0x2e')](db[_0x1ab5('0x41')]['rawAttributes']);_0x35ea34[_0x1ab5('0x2d')]=_['keys'](_0xef7cb5[_0x1ab5('0x2d')]);_0x35ea34[_0x1ab5('0x35')]=_['intersection'](_0x35ea34[_0x1ab5('0x2f')],_0x35ea34[_0x1ab5('0x2d')]);_0x414ac6[_0x1ab5('0x31')]=_[_0x1ab5('0x42')](_0x35ea34['model'],qs['fields'](_0xef7cb5['query'][_0x1ab5('0x30')]));_0x414ac6['attributes']=_0x414ac6['attributes'][_0x1ab5('0x32')]?_0x414ac6[_0x1ab5('0x31')]:_0x35ea34[_0x1ab5('0x2f')];if(_0xef7cb5['query']['includeAll']){_0x414ac6[_0x1ab5('0x3d')]=[{'all':!![]}];}_0x414ac6=_['merge']({},_0x414ac6,_0xef7cb5['options']);return db['ChatTransferReport'][_0x1ab5('0x43')](_0x414ac6)[_0x1ab5('0x22')](handleEntityNotFound(_0x5f0490,null))[_0x1ab5('0x22')](respondWithResult(_0x5f0490,null))[_0x1ab5('0x44')](handleError(_0x5f0490,null));};exports[_0x1ab5('0x45')]=function(_0xf6fcdc,_0x414b24){return db[_0x1ab5('0x41')]['create'](_0xf6fcdc[_0x1ab5('0x46')],{})[_0x1ab5('0x22')](respondWithResult(_0x414b24,0xc9))[_0x1ab5('0x44')](handleError(_0x414b24,null));};exports['update']=function(_0x258e70,_0x25df81){if(_0x258e70[_0x1ab5('0x46')]['id']){delete _0x258e70[_0x1ab5('0x46')]['id'];}return db[_0x1ab5('0x41')][_0x1ab5('0x43')]({'where':{'id':_0x258e70[_0x1ab5('0x40')]['id']}})[_0x1ab5('0x22')](handleEntityNotFound(_0x25df81,null))[_0x1ab5('0x22')](saveUpdates(_0x258e70['body'],null))[_0x1ab5('0x22')](respondWithResult(_0x25df81,null))[_0x1ab5('0x44')](handleError(_0x25df81,null));};exports['destroy']=function(_0x2a7225,_0xe2c2c4){return db[_0x1ab5('0x41')][_0x1ab5('0x43')]({'where':{'id':_0x2a7225[_0x1ab5('0x40')]['id']}})[_0x1ab5('0x22')](handleEntityNotFound(_0xe2c2c4,null))['then'](removeEntity(_0xe2c2c4,null))['catch'](handleError(_0xe2c2c4,null));};exports['describe']=function(_0x520703,_0x2b43a6){return db['ChatTransferReport'][_0x1ab5('0x47')]()[_0x1ab5('0x22')](respondWithResult(_0x2b43a6,null))['catch'](handleError(_0x2b43a6,null));};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js
index 896fc0d..dc60c73 100644
--- a/server/api/chatTransferReport/chatTransferReport.model.js
+++ b/server/api/chatTransferReport/chatTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x12dd=['ChatTransferReport','uniqueid','lodash','api','bluebird','request-promise','path','rimraf','../../config/environment','./chatTransferReport.attributes','define'];(function(_0x5cb97e,_0x132a39){var _0x1714b4=function(_0x384210){while(--_0x384210){_0x5cb97e['push'](_0x5cb97e['shift']());}};_0x1714b4(++_0x132a39);}(_0x12dd,0x65));var _0xd12d=function(_0x2b92d2,_0x4e8ded){_0x2b92d2=_0x2b92d2-0x0;var _0x133446=_0x12dd[_0x2b92d2];return _0x133446;};'use strict';var _=require(_0xd12d('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xd12d('0x1'));var moment=require('moment');var BPromise=require(_0xd12d('0x2'));var rp=require(_0xd12d('0x3'));var fs=require('fs');var path=require(_0xd12d('0x4'));var rimraf=require(_0xd12d('0x5'));var config=require(_0xd12d('0x6'));var attributes=require(_0xd12d('0x7'));module['exports']=function(_0x5d1637,_0x2058d5){return _0x5d1637[_0xd12d('0x8')](_0xd12d('0x9'),attributes,{'tableName':'report_chat_transfer','paranoid':![],'indexes':[{'name':_0xd12d('0xa'),'fields':[_0xd12d('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2fe8=['report_chat_transfer','uniqueid','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./chatTransferReport.attributes','exports','ChatTransferReport'];(function(_0x5bc3c6,_0x2aad62){var _0xc258a1=function(_0x55fc7e){while(--_0x55fc7e){_0x5bc3c6['push'](_0x5bc3c6['shift']());}};_0xc258a1(++_0x2aad62);}(_0x2fe8,0x6a));var _0x82fe=function(_0x4dfd70,_0x35e8d2){_0x4dfd70=_0x4dfd70-0x0;var _0x48d818=_0x2fe8[_0x4dfd70];return _0x48d818;};'use strict';var _=require('lodash');var util=require(_0x82fe('0x0'));var logger=require(_0x82fe('0x1'))(_0x82fe('0x2'));var moment=require(_0x82fe('0x3'));var BPromise=require('bluebird');var rp=require(_0x82fe('0x4'));var fs=require('fs');var path=require(_0x82fe('0x5'));var rimraf=require(_0x82fe('0x6'));var config=require(_0x82fe('0x7'));var attributes=require(_0x82fe('0x8'));module[_0x82fe('0x9')]=function(_0x15b250,_0x22c48e){return _0x15b250['define'](_0x82fe('0xa'),attributes,{'tableName':_0x82fe('0xb'),'paranoid':![],'indexes':[{'name':_0x82fe('0xc'),'fields':[_0x82fe('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js
index bdff5a6..05578c3 100644
--- a/server/api/chatTransferReport/chatTransferReport.rpc.js
+++ b/server/api/chatTransferReport/chatTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9b72=['error','message','request\x20sent','result','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','then','info','ChatTransferReport,\x20%s,\x20%s','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s'];(function(_0x453b90,_0x57cacd){var _0x14f996=function(_0x29f16d){while(--_0x29f16d){_0x453b90['push'](_0x453b90['shift']());}};_0x14f996(++_0x57cacd);}(_0x9b72,0xe8));var _0x29b7=function(_0xfca82a,_0x44cd04){_0xfca82a=_0xfca82a-0x0;var _0x4aa91d=_0x9b72[_0xfca82a];return _0x4aa91d;};'use strict';var _=require(_0x29b7('0x0'));var util=require(_0x29b7('0x1'));var moment=require('moment');var BPromise=require(_0x29b7('0x2'));var rs=require(_0x29b7('0x3'));var fs=require('fs');var Redis=require(_0x29b7('0x4'));var db=require(_0x29b7('0x5'))['db'];var utils=require(_0x29b7('0x6'));var logger=require(_0x29b7('0x7'))('rpc');var config=require(_0x29b7('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x29b7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x282317,_0x48bcc1,_0x3069c0){return new BPromise(function(_0x302d10,_0x2a4c4f){return client['request'](_0x282317,_0x3069c0)[_0x29b7('0xa')](function(_0xa1ca03){logger[_0x29b7('0xb')](_0x29b7('0xc'),_0x48bcc1,'request\x20sent');logger[_0x29b7('0xd')](_0x29b7('0xe'),_0x48bcc1,'request\x20sent',JSON['stringify'](_0xa1ca03));if(_0xa1ca03[_0x29b7('0xf')]){if(_0xa1ca03['error']['code']===0x1f4){logger[_0x29b7('0xf')](_0x29b7('0xc'),_0x48bcc1,_0xa1ca03[_0x29b7('0xf')]['message']);return _0x2a4c4f(_0xa1ca03[_0x29b7('0xf')][_0x29b7('0x10')]);}logger[_0x29b7('0xf')](_0x29b7('0xc'),_0x48bcc1,_0xa1ca03[_0x29b7('0xf')]['message']);return _0x302d10(_0xa1ca03[_0x29b7('0xf')][_0x29b7('0x10')]);}else{logger['info'](_0x29b7('0xc'),_0x48bcc1,_0x29b7('0x11'));_0x302d10(_0xa1ca03[_0x29b7('0x12')][_0x29b7('0x10')]);}})['catch'](function(_0x930a20){logger[_0x29b7('0xf')]('ChatTransferReport,\x20%s,\x20%s',_0x48bcc1,_0x930a20);_0x2a4c4f(_0x930a20);});});}
\ No newline at end of file
+var _0x2ac7=['code','ChatTransferReport,\x20%s,\x20%s','message','lodash','util','moment','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http','then','info','request\x20sent','debug','stringify','error'];(function(_0x2a8929,_0x422bc6){var _0x2e11d5=function(_0x263d16){while(--_0x263d16){_0x2a8929['push'](_0x2a8929['shift']());}};_0x2e11d5(++_0x422bc6);}(_0x2ac7,0x75));var _0x72ac=function(_0x370e80,_0x4239ac){_0x370e80=_0x370e80-0x0;var _0x3cdd57=_0x2ac7[_0x370e80];return _0x3cdd57;};'use strict';var _=require(_0x72ac('0x0'));var util=require(_0x72ac('0x1'));var moment=require(_0x72ac('0x2'));var BPromise=require('bluebird');var rs=require(_0x72ac('0x3'));var fs=require('fs');var Redis=require(_0x72ac('0x4'));var db=require(_0x72ac('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x72ac('0x6'));var config=require(_0x72ac('0x7'));var jayson=require(_0x72ac('0x8'));var client=jayson['client'][_0x72ac('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x11657e,_0x3e7e9a,_0x3be995){return new BPromise(function(_0x47abd0,_0x139a6f){return client['request'](_0x11657e,_0x3be995)[_0x72ac('0xa')](function(_0x353bea){logger[_0x72ac('0xb')]('ChatTransferReport,\x20%s,\x20%s',_0x3e7e9a,_0x72ac('0xc'));logger[_0x72ac('0xd')]('ChatTransferReport,\x20%s,\x20%s,\x20%s',_0x3e7e9a,_0x72ac('0xc'),JSON[_0x72ac('0xe')](_0x353bea));if(_0x353bea['error']){if(_0x353bea[_0x72ac('0xf')][_0x72ac('0x10')]===0x1f4){logger[_0x72ac('0xf')](_0x72ac('0x11'),_0x3e7e9a,_0x353bea['error']['message']);return _0x139a6f(_0x353bea[_0x72ac('0xf')]['message']);}logger[_0x72ac('0xf')](_0x72ac('0x11'),_0x3e7e9a,_0x353bea[_0x72ac('0xf')]['message']);return _0x47abd0(_0x353bea[_0x72ac('0xf')][_0x72ac('0x12')]);}else{logger[_0x72ac('0xb')]('ChatTransferReport,\x20%s,\x20%s',_0x3e7e9a,'request\x20sent');_0x47abd0(_0x353bea['result'][_0x72ac('0x12')]);}})['catch'](function(_0x3aee72){logger[_0x72ac('0xf')](_0x72ac('0x11'),_0x3e7e9a,_0x3aee72);_0x139a6f(_0x3aee72);});});}
\ No newline at end of file
diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js
index b34980c..55bbfbf 100644
--- a/server/api/chatTransferReport/index.js
+++ b/server/api/chatTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbedb=['describe','/:id','show','post','create','put','update','delete','exports','multer','util','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./chatTransferReport.controller','isAuthenticated','index','get','/describe'];(function(_0x26a84c,_0x5724a7){var _0xa7793f=function(_0x34b8e2){while(--_0x34b8e2){_0x26a84c['push'](_0x26a84c['shift']());}};_0xa7793f(++_0x5724a7);}(_0xbedb,0x105));var _0xbbed=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbedb[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xbbed('0x0'));var util=require(_0xbbed('0x1'));var path=require('path');var timeout=require(_0xbbed('0x2'));var express=require('express');var router=express[_0xbbed('0x3')]();var fs_extra=require(_0xbbed('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xbbed('0x5'));var config=require(_0xbbed('0x6'));var controller=require(_0xbbed('0x7'));router['get']('/',auth[_0xbbed('0x8')](),controller[_0xbbed('0x9')]);router[_0xbbed('0xa')](_0xbbed('0xb'),auth[_0xbbed('0x8')](),controller[_0xbbed('0xc')]);router[_0xbbed('0xa')](_0xbbed('0xd'),auth[_0xbbed('0x8')](),controller[_0xbbed('0xe')]);router[_0xbbed('0xf')]('/',auth[_0xbbed('0x8')](),controller[_0xbbed('0x10')]);router[_0xbbed('0x11')](_0xbbed('0xd'),auth[_0xbbed('0x8')](),controller[_0xbbed('0x12')]);router[_0xbbed('0x13')](_0xbbed('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0xbbed('0x14')]=router;
\ No newline at end of file
+var _0xf894=['describe','/:id','show','post','create','delete','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatTransferReport.controller','get','index','/describe','isAuthenticated'];(function(_0x4c6c87,_0x271a11){var _0x1a9c5c=function(_0x4a8f62){while(--_0x4a8f62){_0x4c6c87['push'](_0x4c6c87['shift']());}};_0x1a9c5c(++_0x271a11);}(_0xf894,0x183));var _0x4f89=function(_0x2d9c2f,_0x2c8598){_0x2d9c2f=_0x2d9c2f-0x0;var _0x17cf8c=_0xf894[_0x2d9c2f];return _0x17cf8c;};'use strict';var multer=require(_0x4f89('0x0'));var util=require('util');var path=require(_0x4f89('0x1'));var timeout=require(_0x4f89('0x2'));var express=require(_0x4f89('0x3'));var router=express[_0x4f89('0x4')]();var fs_extra=require(_0x4f89('0x5'));var auth=require(_0x4f89('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x4f89('0x7'));var controller=require(_0x4f89('0x8'));router[_0x4f89('0x9')]('/',auth['isAuthenticated'](),controller[_0x4f89('0xa')]);router['get'](_0x4f89('0xb'),auth[_0x4f89('0xc')](),controller[_0x4f89('0xd')]);router[_0x4f89('0x9')](_0x4f89('0xe'),auth[_0x4f89('0xc')](),controller[_0x4f89('0xf')]);router[_0x4f89('0x10')]('/',auth[_0x4f89('0xc')](),controller[_0x4f89('0x11')]);router['put'](_0x4f89('0xe'),auth[_0x4f89('0xc')](),controller['update']);router[_0x4f89('0x12')](_0x4f89('0xe'),auth[_0x4f89('0xc')](),controller['destroy']);module[_0x4f89('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js
index 2d21397..b5726c6 100644
--- a/server/api/chatWebsite/chatWebsite.attributes.js
+++ b/server/api/chatWebsite/chatWebsite.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x54ef=['CHAT','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','exports','STRING','address','email','Agent','#ffffff','INTEGER','BOOLEAN','rounded','squared','Send','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','Feedback','ENUM','star','thumb','stringify','input','name','text','getDataValue','onlineForm','parse','setDataValue','Comments','Leave\x20your\x20comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','New\x20offline\x20message\x20from\x20websiteName','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','website_alias','bottom_right'];(function(_0x3cef4a,_0x29891c){var _0x348a0d=function(_0x3d64bf){while(--_0x3d64bf){_0x3cef4a['push'](_0x3cef4a['shift']());}};_0x348a0d(++_0x29891c);}(_0x54ef,0x112));var _0xf54e=function(_0x6f6600,_0x2c18d4){_0x6f6600=_0x6f6600-0x0;var _0x325b47=_0x54ef[_0x6f6600];return _0x325b47;};'use strict';var Sequelize=require(_0xf54e('0x0'));var rs=require(_0xf54e('0x1'));module[_0xf54e('0x2')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'address':{'type':Sequelize[_0xf54e('0x3')],'allowNull':![],'unique':_0xf54e('0x4')},'description':{'type':Sequelize[_0xf54e('0x3')]},'mapKey':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x5')},'mapKeyOffline':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x5')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize['STRING'],'defaultValue':_0xf54e('0x6')},'customerAlias':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize[_0xf54e('0x3')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0xf54e('0x3')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xf54e('0x3')],'allowNull':![],'defaultValue':_0xf54e('0x7'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xf54e('0x7'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0xf54e('0x8')],'defaultValue':0xf},'remote':{'type':Sequelize[_0xf54e('0x3')]},'animation':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM'](_0xf54e('0xa'),_0xf54e('0xb')),'defaultValue':_0xf54e('0xa')},'header_online':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':'We\x20are\x20here!'},'start_chat_button':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':'Chat'},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0xf54e('0xc')},'header_offline':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0xd')},'download_transcript':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':!![]},'timeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0xe')},'defaultWhiteLabel':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0xf54e('0xf')]},'closingQuestion':{'type':Sequelize['STRING'],'defaultValue':_0xf54e('0x10')},'formSubmitSuccessMessage':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x11')},'formSubmitFailureMessage':{'type':Sequelize['STRING'],'defaultValue':'Form\x20submission\x20error'},'noteTitle':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x12')},'placeholderMessage':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x13')},'closingMessage':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x14')},'closingMessageButton':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0xc')},'skipMessageButton':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x15')},'conditionAgreement':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'enableRating':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize['STRING'],'defaultValue':_0xf54e('0x16')},'ratingType':{'type':Sequelize[_0xf54e('0x17')](_0xf54e('0x18'),_0xf54e('0x19')),'defaultValue':_0xf54e('0x18')},'ratingStarsNumber':{'type':Sequelize[_0xf54e('0x8')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0xf54e('0xf')],'defaultValue':function(){return JSON[_0xf54e('0x1a')]({'items':[{'type':_0xf54e('0x1b'),'variable':null,'config':{'placeholder':_0xf54e('0x1c'),'type':_0xf54e('0x1d'),'required':!![]},'props':{'title':'name','helpText':''}},{'type':_0xf54e('0x1b'),'props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':_0xf54e('0x5'),'type':_0xf54e('0x5')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0xf54e('0x1e')](_0xf54e('0x1f'))?JSON[_0xf54e('0x20')](this[_0xf54e('0x1e')](_0xf54e('0x1f'))):{};},'set':function(_0x43488d){return this[_0xf54e('0x21')](_0xf54e('0x1f'),JSON[_0xf54e('0x1a')](_0x43488d));}},'offlineForm':{'type':Sequelize[_0xf54e('0xf')],'defaultValue':function(){return JSON[_0xf54e('0x1a')]({'items':[{'type':'input','props':{'title':_0xf54e('0x5'),'helpText':''},'config':{'required':!![],'placeholder':'email','type':_0xf54e('0x5')},'variable':null},{'type':'textarea','config':{'placeholder':_0xf54e('0x22')},'props':{'title':_0xf54e('0x22'),'helpText':_0xf54e('0x23')}}],'fromKey':0x0});},'get':function(){return this[_0xf54e('0x1e')](_0xf54e('0x24'))?JSON[_0xf54e('0x20')](this[_0xf54e('0x1e')]('offlineForm')):{};},'set':function(_0x4b3c73){return this[_0xf54e('0x21')](_0xf54e('0x24'),JSON[_0xf54e('0x1a')](_0x4b3c73));}},'token':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':function(){return rs[_0xf54e('0x25')]();}},'autoclose':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0xf54e('0x3')]},'forwardOffline':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize['STRING']},'waitingTitle':{'type':Sequelize['STRING'],'defaultValue':_0xf54e('0x26')},'waitingMessage':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':'Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.'},'offlineMessageSubject':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x27')},'offlineMessageBody':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x28')},'enableUnmanagedNote':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize['STRING'],'defaultValue':'Your\x20request\x20has\x20not\x20been\x20processed.'},'skipUnmanaged':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x15')},'sendUnmanaged':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0xc')},'enableCustomerAttachment':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'agentAvatar':{'type':Sequelize['TEXT']},'showAgentAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0xf54e('0xf')],'defaultValue':function(){return _0xf54e('0x29');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x2a')},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x2b')},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x2c')},'messagesAlignment':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x2d')},'defaultTitle':{'type':Sequelize[_0xf54e('0x3')]},'customerAvatar':{'type':Sequelize[_0xf54e('0xf')]},'showCustomerAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'messageFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0xf54e('0x3')],'allowNull':![],'defaultValue':_0xf54e('0x2e'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xf54e('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':_0xf54e('0x2f')},'systemAvatar':{'type':Sequelize[_0xf54e('0xf')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xf54e('0x8')],'comment':_0xf54e('0x30')},'mandatoryDisposition':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![],'comment':_0xf54e('0x31'),'set':function(_0x2087b3){if(!_0x2087b3)this[_0xf54e('0x21')](_0xf54e('0x32'),null);this[_0xf54e('0x21')](_0xf54e('0x33'),_0x2087b3);}},'vidaooEscalation':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize['STRING']},'vidaooTopic':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'Generated\x20by\x20XCALLY\x20Motion'},'vidaooNote':{'type':Sequelize[_0xf54e('0x3')],'defaultValue':function(){return _0xf54e('0x34');}},'vidaooMetadata':{'type':Sequelize['TEXT'],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0xf54e('0x9')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0xf54e('0xf')]}};
\ No newline at end of file
+var _0x4483=['email','Agent','#011F6A','#ffffff','INTEGER','BOOLEAN','ENUM','rounded','squared','Chat','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','Type\x20a\x20message','Feedback','star','thumb','input','name','getDataValue','parse','onlineForm','setDataValue','stringify','textarea','Comments','Leave\x20your\x20comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','New\x20offline\x20message\x20from\x20websiteName','Your\x20request\x20has\x20not\x20been\x20processed.','Skip','Send','website_alias','bottom_right','#fafafa','System','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','exports','STRING','address'];(function(_0x546891,_0x483cb7){var _0x5a3e45=function(_0xe2bc26){while(--_0xe2bc26){_0x546891['push'](_0x546891['shift']());}};_0x5a3e45(++_0x483cb7);}(_0x4483,0x1a3));var _0x3448=function(_0x5ff2fd,_0xef7e59){_0x5ff2fd=_0x5ff2fd-0x0;var _0x30e855=_0x4483[_0x5ff2fd];return _0x30e855;};'use strict';var Sequelize=require(_0x3448('0x0'));var rs=require(_0x3448('0x1'));module[_0x3448('0x2')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'address':{'type':Sequelize[_0x3448('0x3')],'allowNull':![],'unique':_0x3448('0x4')},'description':{'type':Sequelize[_0x3448('0x3')]},'mapKey':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x5')},'mapKeyOffline':{'type':Sequelize['STRING'],'defaultValue':_0x3448('0x5')},'key':{'type':Sequelize[_0x3448('0x3')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x6')},'customerAlias':{'type':Sequelize[_0x3448('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x3448('0x3')],'allowNull':![],'defaultValue':_0x3448('0x7'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x3448('0x3')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x3448('0x8'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0x3448('0x3')],'allowNull':![],'defaultValue':_0x3448('0x8'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x3448('0x9')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x3448('0x3')]},'animation':{'type':Sequelize[_0x3448('0xa')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x3448('0xb')](_0x3448('0xc'),_0x3448('0xd')),'defaultValue':_0x3448('0xc')},'header_online':{'type':Sequelize[_0x3448('0x3')],'defaultValue':'We\x20are\x20here!'},'start_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0x3448('0xe')},'offline_chat_button':{'type':Sequelize[_0x3448('0x3')],'defaultValue':'Send'},'header_offline':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0xf')},'download_transcript':{'type':Sequelize[_0x3448('0xa')],'defaultValue':!![]},'timeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x10')},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x3448('0x11')]},'closingQuestion':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x12')},'formSubmitSuccessMessage':{'type':Sequelize['STRING'],'defaultValue':_0x3448('0x13')},'formSubmitFailureMessage':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x14')},'noteTitle':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x15')},'placeholderMessage':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x16')},'closingMessage':{'type':Sequelize[_0x3448('0x3')],'defaultValue':'Thanks\x20you\x20for\x20your\x20time!'},'closingMessageButton':{'type':Sequelize[_0x3448('0x3')],'defaultValue':'Send'},'skipMessageButton':{'type':Sequelize['STRING'],'defaultValue':'Skip'},'conditionAgreement':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'enableSendButton':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x17')},'ratingType':{'type':Sequelize[_0x3448('0xb')](_0x3448('0x18'),_0x3448('0x19')),'defaultValue':_0x3448('0x18')},'ratingStarsNumber':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'onlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0x3448('0x1a'),'variable':null,'config':{'placeholder':_0x3448('0x1b'),'type':'text','required':!![]},'props':{'title':'name','helpText':''}},{'type':_0x3448('0x1a'),'props':{'title':_0x3448('0x5'),'helpText':''},'config':{'required':!![],'placeholder':_0x3448('0x5'),'type':_0x3448('0x5')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x3448('0x1c')]('onlineForm')?JSON[_0x3448('0x1d')](this[_0x3448('0x1c')](_0x3448('0x1e'))):{};},'set':function(_0x2088de){return this[_0x3448('0x1f')]('onlineForm',JSON[_0x3448('0x20')](_0x2088de));}},'offlineForm':{'type':Sequelize[_0x3448('0x11')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0x3448('0x1a'),'props':{'title':_0x3448('0x5'),'helpText':''},'config':{'required':!![],'placeholder':_0x3448('0x5'),'type':_0x3448('0x5')},'variable':null},{'type':_0x3448('0x21'),'config':{'placeholder':_0x3448('0x22')},'props':{'title':_0x3448('0x22'),'helpText':_0x3448('0x23')}}],'fromKey':0x0});},'get':function(){return this['getDataValue'](_0x3448('0x24'))?JSON[_0x3448('0x1d')](this[_0x3448('0x1c')]('offlineForm')):{};},'set':function(_0x1b8dbb){return this['setDataValue']('offlineForm',JSON['stringify'](_0x1b8dbb));}},'token':{'type':Sequelize[_0x3448('0x3')],'defaultValue':function(){return rs[_0x3448('0x25')]();}},'autoclose':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x3448('0x3')]},'forwardOffline':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x3448('0x3')]},'waitingTitle':{'type':Sequelize['STRING'],'defaultValue':_0x3448('0x26')},'waitingMessage':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x27')},'offlineMessageSubject':{'type':Sequelize['STRING'],'defaultValue':_0x3448('0x28')},'offlineMessageBody':{'type':Sequelize[_0x3448('0x3')],'defaultValue':'You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:'},'enableUnmanagedNote':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x29')},'skipUnmanaged':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x2a')},'sendUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0x3448('0x2b')},'enableCustomerAttachment':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x3448('0x11')]},'showAgentAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'timezone':{'type':Sequelize[_0x3448('0x3')]},'notificationTemplate':{'type':Sequelize[_0x3448('0x11')],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x3448('0xa')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x2c')},'waitForTheAssignedAgent':{'type':Sequelize[_0x3448('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x2d')},'verticalAlignment':{'type':Sequelize[_0x3448('0x9')],'defaultValue':0x1e},'labelText':{'type':Sequelize['STRING'],'defaultValue':'CHAT'},'messagesAlignment':{'type':Sequelize[_0x3448('0x3')],'defaultValue':'alternate'},'defaultTitle':{'type':Sequelize[_0x3448('0x3')]},'customerAvatar':{'type':Sequelize[_0x3448('0x11')]},'showCustomerAvatar':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x3448('0x9')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x3448('0x2e'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x3448('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x3448('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x3448('0x3')],'defaultValue':_0x3448('0x2f')},'systemAvatar':{'type':Sequelize[_0x3448('0x11')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x3448('0x9')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![],'comment':_0x3448('0x30'),'set':function(_0x322b46){if(!_0x322b46)this[_0x3448('0x1f')](_0x3448('0x31'),null);this['setDataValue'](_0x3448('0x32'),_0x322b46);}},'vidaooEscalation':{'type':Sequelize[_0x3448('0xa')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x3448('0x3')]},'vidaooTopic':{'type':Sequelize[_0x3448('0x3')],'allowNull':![],'defaultValue':_0x3448('0x33')},'vidaooNote':{'type':Sequelize[_0x3448('0x3')],'defaultValue':function(){return _0x3448('0x34');}},'vidaooMetadata':{'type':Sequelize[_0x3448('0x11')],'defaultValue':null},'openNewInteraction':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x3448('0x11')]}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js
index c878a7d..8c3a4f3 100644
--- a/server/api/chatWebsite/chatWebsite.controller.js
+++ b/server/api/chatWebsite/chatWebsite.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2918=['UserProfileResource','name','Pause','mandatoryDispositionPause','map','ChatWebsite','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','show','params','find','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','Disposition','getDispositions','findOne','rawAttributes','ChatWebsiteId','removeDispositions','ids','addAnswer','CannedAnswer','pick','rows','removeAnswers','addLogo','sitepic','file','addAvatar','agentAvatar','filename','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','root','../../config/license/util','getLicense','custom','isNil','join','download','getAvatar','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','getCustomerAvatar','showCustomerAvatar','existsSync','server/files/images/avatars/system_avatar.png','notify','user-agent-parser','setUA','headers','user-agent','chat','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','createdAt','CompanyId','from','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','Contacts','DESC','Applications','account','applications','orderBy','priority','asc','contact','customerIp','cf-connecting-ip','x-forwarded-for','split','lastName','x-real-port','browser','version','format','%s\x20%s','unknown','device','vendor','threadId','externalUrl','ChatInteraction','interaction','spread','firstName','messageId','created','autoclose','push','close','*,*,*,*','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','offline','files','difference','from\x20is\x20mandatory','send','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','ListId','findOrCreate','server/files/templates/chatOfflineMessage.ejs','render','toPairs','offlineMessageBody','ChatOfflineMessage','fromString','originalname','server','offline-chat','basename','openNewInteraction','sequelize','Attachment','bulkCreate','MailServerOut','Smtp','CloudProvider','forwardOffline','forwardOfflineAddress','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','email','user','MailAccountId','subjectOffline','toPairsIn','offlineMessageSubject','Chat','NotifyMailAccount','notifyMail','attachments','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','getInteractions','Contact','Owner','fullname','internal','Tags','color','Command','getSnippet','timezone','interval','iftime\x20%s','indexOf','true','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','OFFLINE','No\x20timezone','inspect','Interval','getProactiveActions','virtual','License','increment','chatLicenseExceeded','Intervals','utf8','x-real-ip','connection','remoteAddress','replace','alignment','verticalAlignment','labelText','textColor','textButtonColor','hideWhenOffline','transaction','ISOLATION_LEVELS','ChatApplication','stack','getApplications','addProactiveActions','ChatProactiveAction','getFields','online','false','offlineForm','onlineForm','items','getOfflineMessages','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','util','ejs','fs-extra','lodash','querystring','ioredis','../../components/parsers/qs','../../config/logger','../../config/environment','redis','defaults','socket.io-emitter','./chatWebsite.socket','register','html-to-text','jayson/promise','client','http','request','then','info','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','ChatWebsite,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','update','destroy','get','ChatWebsites'];(function(_0x1a54c2,_0xca7365){var _0x72d724=function(_0x423c3e){while(--_0x423c3e){_0x1a54c2['push'](_0x1a54c2['shift']());}};_0x72d724(++_0xca7365);}(_0x2918,0xf7));var _0x8291=function(_0x1a30ce,_0x4f7b65){_0x1a30ce=_0x1a30ce-0x0;var _0x2b42e8=_0x2918[_0x1a30ce];return _0x2b42e8;};'use strict';var BPromise=require('bluebird');var Mustache=require(_0x8291('0x0'));var util=require(_0x8291('0x1'));var path=require('path');var ejs=require(_0x8291('0x2'));var fs=require('fs');var fs_extra=require(_0x8291('0x3'));var _=require(_0x8291('0x4'));var querystring=require(_0x8291('0x5'));var Redis=require(_0x8291('0x6'));var qs=require(_0x8291('0x7'));var logger=require(_0x8291('0x8'))('api');var config=require(_0x8291('0x9'));var db=require('../../mysqldb')['db'];config[_0x8291('0xa')]=_[_0x8291('0xb')](config[_0x8291('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x8291('0xc'))(new Redis(config['redis']));require(_0x8291('0xd'))[_0x8291('0xe')](socket);var htmlToText=require(_0x8291('0xf'));var jayson=require(_0x8291('0x10'));var client=jayson[_0x8291('0x11')][_0x8291('0x12')]({'port':0x232c});var client9002=jayson[_0x8291('0x11')][_0x8291('0x12')]({'port':0x232a});var client9003=jayson[_0x8291('0x11')][_0x8291('0x12')]({'port':0x232b});var client9001=jayson[_0x8291('0x11')][_0x8291('0x12')]({'port':0x2329});function respondWithRpcPromise(_0x3780f0,_0x3e87fa,_0xf6339a,_0x58ecfe){return new BPromise(function(_0x16a8cf,_0x115f85){var _0x17bf54=_0x58ecfe||client;return _0x17bf54[_0x8291('0x13')](_0x3780f0,_0xf6339a)[_0x8291('0x14')](function(_0x317036){logger[_0x8291('0x15')]('ChatWebsite,\x20%s,\x20%s',_0x3e87fa,'request\x20sent');logger[_0x8291('0x16')](_0x8291('0x17'),_0x3e87fa,_0x8291('0x18'),JSON[_0x8291('0x19')](_0x317036));if(_0x317036[_0x8291('0x1a')]){if(_0x317036[_0x8291('0x1a')]['code']===0x1f4){logger['error'](_0x8291('0x1b'),_0x3e87fa,_0x317036[_0x8291('0x1a')][_0x8291('0x1c')]);return _0x115f85(_0x317036[_0x8291('0x1a')][_0x8291('0x1c')]);}logger['error'](_0x8291('0x1b'),_0x3e87fa,_0x317036[_0x8291('0x1a')][_0x8291('0x1c')]);return _0x16a8cf(_0x317036['error'][_0x8291('0x1c')]);}else{logger['info'](_0x8291('0x1b'),_0x3e87fa,_0x8291('0x18'));_0x16a8cf(_0x317036[_0x8291('0x1d')][_0x8291('0x1c')]);}})[_0x8291('0x1e')](function(_0x189b9f){logger['error'](_0x8291('0x1b'),_0x3e87fa,_0x189b9f);_0x115f85(_0x189b9f);});});}function respondWithStatusCode(_0x47146c,_0xd0e730){_0xd0e730=_0xd0e730||0xcc;return function(_0x51938a){if(_0x51938a){return _0x47146c[_0x8291('0x1f')](_0xd0e730);}return _0x47146c[_0x8291('0x20')](_0xd0e730)[_0x8291('0x21')]();};}function respondWithResult(_0x4e1fe8,_0x52ce0a){_0x52ce0a=_0x52ce0a||0xc8;return function(_0x2f3ce4){if(_0x2f3ce4){return _0x4e1fe8[_0x8291('0x20')](_0x52ce0a)[_0x8291('0x22')](_0x2f3ce4);}};}function respondWithFilteredResult(_0x2290dd,_0xd1b269){return function(_0x3dd3e3){if(_0x3dd3e3){var _0xd13709=typeof _0xd1b269[_0x8291('0x23')]===_0x8291('0x24')&&typeof _0xd1b269[_0x8291('0x25')]===_0x8291('0x24');var _0x1f49a4=_0x3dd3e3[_0x8291('0x26')];var _0x4f0293=_0xd13709?0x0:_0xd1b269[_0x8291('0x23')];var _0x10568d=_0xd13709?_0x3dd3e3[_0x8291('0x26')]:_0xd1b269[_0x8291('0x23')]+_0xd1b269[_0x8291('0x25')];var _0x5d0ae8;if(_0x10568d>=_0x1f49a4){_0x10568d=_0x1f49a4;_0x5d0ae8=0xc8;}else{_0x5d0ae8=0xce;}_0x2290dd[_0x8291('0x20')](_0x5d0ae8);return _0x2290dd[_0x8291('0x27')](_0x8291('0x28'),_0x4f0293+'-'+_0x10568d+'/'+_0x1f49a4)[_0x8291('0x22')](_0x3dd3e3);}return null;};}function saveUpdates(_0x3b01a3){return function(_0x5eb002){if(_0x5eb002){return _0x5eb002[_0x8291('0x29')](_0x3b01a3)[_0x8291('0x14')](function(_0x4894a3){return _0x4894a3;});}return null;};}function removeEntity(_0x2b949e){return function(_0x50210b){if(_0x50210b){return _0x50210b[_0x8291('0x2a')]()[_0x8291('0x14')](function(){var _0x39a213=_0x50210b[_0x8291('0x2b')]({'plain':!![]});var _0x22c33f=_0x8291('0x2c');return db[_0x8291('0x2d')][_0x8291('0x2a')]({'where':{'type':_0x22c33f,'resourceId':_0x39a213['id']}})['then'](function(){return _0x50210b;});})[_0x8291('0x14')](function(){_0x2b949e['status'](0xcc)[_0x8291('0x21')]();});}};}function handleEntityNotFound(_0x476ec9){return function(_0x3f6375){if(!_0x3f6375){_0x476ec9[_0x8291('0x1f')](0x194);}return _0x3f6375;};}function handleError(_0x56ad68,_0x4b9b14){_0x4b9b14=_0x4b9b14||0x1f4;return function(_0x4a4377){logger['error'](_0x4a4377['stack']);if(_0x4a4377[_0x8291('0x2e')]){delete _0x4a4377[_0x8291('0x2e')];}_0x56ad68[_0x8291('0x20')](_0x4b9b14)['send'](_0x4a4377);};}exports['index']=function(_0x32caeb,_0x4ae6cd){var _0x364c1e={'include':[{'model':db[_0x8291('0x2f')],'as':_0x8291('0x30')}]},_0x31bf68={},_0x1256f3={'count':0x0,'rows':[]};var _0x40fd8c=_[_0x8291('0x31')](db[_0x8291('0x32')]['rawAttributes'],function(_0x533664){return{'name':_0x533664[_0x8291('0x33')],'type':_0x533664[_0x8291('0x34')][_0x8291('0x35')]};});_0x31bf68[_0x8291('0x36')]=_[_0x8291('0x31')](_0x40fd8c,_0x8291('0x2e'));_0x31bf68[_0x8291('0x37')]=_[_0x8291('0x38')](_0x32caeb[_0x8291('0x37')]);_0x31bf68[_0x8291('0x39')]=_[_0x8291('0x3a')](_0x31bf68['model'],_0x31bf68[_0x8291('0x37')]);_0x364c1e[_0x8291('0x3b')]=_[_0x8291('0x3a')](_0x31bf68['model'],qs[_0x8291('0x3c')](_0x32caeb[_0x8291('0x37')][_0x8291('0x3c')]));_0x364c1e[_0x8291('0x3b')]=_0x364c1e[_0x8291('0x3b')][_0x8291('0x3d')]?_0x364c1e[_0x8291('0x3b')]:_0x31bf68['model'];if(!_0x32caeb[_0x8291('0x37')][_0x8291('0x3e')](_0x8291('0x3f'))){_0x364c1e['limit']=qs['limit'](_0x32caeb[_0x8291('0x37')]['limit']);_0x364c1e[_0x8291('0x23')]=qs[_0x8291('0x23')](_0x32caeb['query'][_0x8291('0x23')]);}_0x364c1e[_0x8291('0x40')]=qs['sort'](_0x32caeb[_0x8291('0x37')][_0x8291('0x41')]);_0x364c1e[_0x8291('0x42')]=qs[_0x8291('0x39')](_['pick'](_0x32caeb[_0x8291('0x37')],_0x31bf68[_0x8291('0x39')]),_0x40fd8c);if(_0x32caeb[_0x8291('0x37')][_0x8291('0x43')]){_0x364c1e['where']=_[_0x8291('0x44')](_0x364c1e[_0x8291('0x42')],{'$or':_[_0x8291('0x31')](_0x40fd8c,function(_0x2d081d){if(_0x2d081d[_0x8291('0x34')]!==_0x8291('0x45')){var _0x256c3f={};_0x256c3f[_0x2d081d[_0x8291('0x2e')]]={'$like':'%'+_0x32caeb[_0x8291('0x37')][_0x8291('0x43')]+'%'};return _0x256c3f;}})});}_0x364c1e=_[_0x8291('0x44')]({},_0x364c1e,_0x32caeb[_0x8291('0x46')]);var _0x154ca8={'where':_0x364c1e['where']};return db['ChatWebsite'][_0x8291('0x26')](_0x154ca8)[_0x8291('0x14')](function(_0x281f8b){_0x1256f3['count']=_0x281f8b;if(_0x32caeb['query'][_0x8291('0x47')]){_0x364c1e[_0x8291('0x48')]=[{'all':!![]}];}return db['ChatWebsite'][_0x8291('0x49')](_0x364c1e);})[_0x8291('0x14')](function(_0x4e3218){_0x1256f3['rows']=_0x4e3218;return _0x1256f3;})[_0x8291('0x14')](respondWithFilteredResult(_0x4ae6cd,_0x364c1e))['catch'](handleError(_0x4ae6cd,null));};exports[_0x8291('0x4a')]=function(_0x1f8f41,_0x39248f){var _0x32822a={'raw':![],'where':{'id':_0x1f8f41[_0x8291('0x4b')]['id']},'include':[{'model':db['Pause'],'as':_0x8291('0x30')}]},_0x44c23e={};_0x44c23e[_0x8291('0x36')]=_[_0x8291('0x38')](db[_0x8291('0x32')]['rawAttributes']);_0x44c23e[_0x8291('0x37')]=_[_0x8291('0x38')](_0x1f8f41[_0x8291('0x37')]);_0x44c23e['filters']=_[_0x8291('0x3a')](_0x44c23e[_0x8291('0x36')],_0x44c23e['query']);_0x32822a[_0x8291('0x3b')]=_[_0x8291('0x3a')](_0x44c23e['model'],qs[_0x8291('0x3c')](_0x1f8f41[_0x8291('0x37')]['fields']));_0x32822a[_0x8291('0x3b')]=_0x32822a[_0x8291('0x3b')][_0x8291('0x3d')]?_0x32822a[_0x8291('0x3b')]:_0x44c23e[_0x8291('0x36')];if(_0x1f8f41[_0x8291('0x37')][_0x8291('0x47')]){_0x32822a[_0x8291('0x48')]=[{'all':!![]}];}_0x32822a=_[_0x8291('0x44')]({},_0x32822a,_0x1f8f41[_0x8291('0x46')]);return db[_0x8291('0x32')][_0x8291('0x4c')](_0x32822a)['then'](handleEntityNotFound(_0x39248f,null))[_0x8291('0x14')](respondWithResult(_0x39248f,null))[_0x8291('0x1e')](handleError(_0x39248f,null));};exports['create']=function(_0x5d7f4e,_0x5e09ac){return db[_0x8291('0x32')]['create'](_0x5d7f4e[_0x8291('0x4d')],{})[_0x8291('0x14')](function(_0x46f3d3){var _0x1ff2f9=_0x5d7f4e['user']['get']({'plain':!![]});if(!_0x1ff2f9)throw new Error(_0x8291('0x4e'));if(_0x1ff2f9[_0x8291('0x4f')]==='user'){var _0x1c7087=_0x46f3d3[_0x8291('0x2b')]({'plain':!![]});var _0x4e260f='ChatWebsites';return db[_0x8291('0x50')][_0x8291('0x4c')]({'where':{'name':_0x4e260f,'userProfileId':_0x1ff2f9[_0x8291('0x51')]},'raw':!![]})[_0x8291('0x14')](function(_0x506a47){if(_0x506a47&&_0x506a47[_0x8291('0x52')]===0x0){return db['UserProfileResource'][_0x8291('0x53')]({'name':_0x1c7087['name'],'resourceId':_0x1c7087['id'],'type':_0x506a47[_0x8291('0x2e')],'sectionId':_0x506a47['id']},{})[_0x8291('0x14')](function(){return _0x46f3d3;});}else{return _0x46f3d3;}})[_0x8291('0x1e')](function(_0x403402){logger[_0x8291('0x1a')](_0x8291('0x54'),_0x403402);throw _0x403402;});}return _0x46f3d3;})[_0x8291('0x14')](respondWithResult(_0x5e09ac,0xc9))['catch'](handleError(_0x5e09ac,null));};exports['update']=function(_0x2c9a70,_0x1cf8f2){if(_0x2c9a70[_0x8291('0x4d')]['id']){delete _0x2c9a70['body']['id'];}return db['ChatWebsite'][_0x8291('0x4c')]({'where':{'id':_0x2c9a70[_0x8291('0x4b')]['id']},'include':[{'model':db[_0x8291('0x2f')],'as':_0x8291('0x30')}]})['then'](handleEntityNotFound(_0x1cf8f2,null))[_0x8291('0x14')](saveUpdates(_0x2c9a70['body'],null))[_0x8291('0x14')](respondWithResult(_0x1cf8f2,null))[_0x8291('0x1e')](handleError(_0x1cf8f2,null));};exports['destroy']=function(_0x111f13,_0x19a6ff){return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0x111f13[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x19a6ff,null))[_0x8291('0x14')](removeEntity(_0x19a6ff,null))[_0x8291('0x1e')](handleError(_0x19a6ff,null));};exports[_0x8291('0x55')]=function(_0x4d7946,_0x574f2f){return db[_0x8291('0x32')][_0x8291('0x55')]()[_0x8291('0x14')](respondWithResult(_0x574f2f,null))[_0x8291('0x1e')](handleError(_0x574f2f,null));};exports[_0x8291('0x56')]=function(_0x14cd72,_0xba95be){if(_0x14cd72[_0x8291('0x4d')]['id']){delete _0x14cd72[_0x8291('0x4d')]['id'];}return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0x14cd72[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0xba95be,null))[_0x8291('0x14')](function(_0x28beb9){if(_0x28beb9){_0x14cd72[_0x8291('0x4d')]['ChatWebsiteId']=_0x28beb9['id'];return db[_0x8291('0x57')]['create'](_0x14cd72[_0x8291('0x4d')]);}})[_0x8291('0x14')](respondWithResult(_0xba95be,null))[_0x8291('0x1e')](handleError(_0xba95be,null));};exports[_0x8291('0x58')]=function(_0x79e921,_0x5b76df){var _0x4a9a12={'raw':![],'where':{}};var _0x986a96={};var _0x4fd2cb={'count':0x0,'rows':[]};return db[_0x8291('0x32')][_0x8291('0x59')]({'where':{'id':_0x79e921[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x5b76df,null))[_0x8291('0x14')](function(_0x25fb32){if(_0x25fb32){_0x986a96[_0x8291('0x36')]=_[_0x8291('0x38')](db['Disposition'][_0x8291('0x5a')]);_0x986a96[_0x8291('0x37')]=_['keys'](_0x79e921[_0x8291('0x37')]);_0x986a96[_0x8291('0x39')]=_['intersection'](_0x986a96[_0x8291('0x36')],_0x986a96[_0x8291('0x37')]);_0x4a9a12[_0x8291('0x3b')]=_[_0x8291('0x3a')](_0x986a96[_0x8291('0x36')],qs[_0x8291('0x3c')](_0x79e921[_0x8291('0x37')][_0x8291('0x3c')]));_0x4a9a12[_0x8291('0x3b')]=_0x4a9a12['attributes']['length']?_0x4a9a12[_0x8291('0x3b')]:_0x986a96[_0x8291('0x36')];if(!_0x79e921[_0x8291('0x37')][_0x8291('0x3e')](_0x8291('0x3f'))){_0x4a9a12[_0x8291('0x25')]=qs[_0x8291('0x25')](_0x79e921['query']['limit']);_0x4a9a12[_0x8291('0x23')]=qs[_0x8291('0x23')](_0x79e921[_0x8291('0x37')][_0x8291('0x23')]);}_0x4a9a12[_0x8291('0x40')]=qs[_0x8291('0x41')](_0x79e921[_0x8291('0x37')][_0x8291('0x41')]);_0x4a9a12[_0x8291('0x42')]=qs[_0x8291('0x39')](_['pick'](_0x79e921[_0x8291('0x37')],_0x986a96[_0x8291('0x39')]));_0x4a9a12[_0x8291('0x42')][_0x8291('0x5b')]=_0x25fb32['id'];if(_0x79e921['query']['filter']){_0x4a9a12[_0x8291('0x42')]=_[_0x8291('0x44')](_0x4a9a12['where'],{'$or':_[_0x8291('0x31')](_0x4a9a12[_0x8291('0x3b')],function(_0x20b14f){var _0x30d3a5={};_0x30d3a5[_0x20b14f]={'$like':'%'+_0x79e921[_0x8291('0x37')]['filter']+'%'};return _0x30d3a5;})});}_0x4a9a12=_[_0x8291('0x44')]({},_0x4a9a12,_0x79e921[_0x8291('0x46')]);return db[_0x8291('0x57')][_0x8291('0x26')]({'where':_0x4a9a12[_0x8291('0x42')]})[_0x8291('0x14')](function(_0x385482){_0x4fd2cb['count']=_0x385482;if(_0x79e921[_0x8291('0x37')][_0x8291('0x47')]){_0x4a9a12[_0x8291('0x48')]=[{'all':!![]}];}return db[_0x8291('0x57')]['findAll'](_0x4a9a12);})[_0x8291('0x14')](function(_0x414da2){_0x4fd2cb['rows']=_0x414da2;return _0x4fd2cb;});}})[_0x8291('0x14')](respondWithFilteredResult(_0x5b76df,_0x4a9a12))['catch'](handleError(_0x5b76df,null));};exports[_0x8291('0x5c')]=function(_0x580686,_0x410cab){return db['ChatWebsite'][_0x8291('0x4c')]({'where':{'id':_0x580686['params']['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x410cab,null))[_0x8291('0x14')](function(_0x282b06){if(_0x282b06){return _0x282b06['removeDispositions'](_0x580686['query'][_0x8291('0x5d')]);}})[_0x8291('0x14')](respondWithStatusCode(_0x410cab,null))[_0x8291('0x1e')](handleError(_0x410cab,null));};exports[_0x8291('0x5e')]=function(_0x52b3d6,_0x33acef){if(_0x52b3d6['body']['id']){delete _0x52b3d6[_0x8291('0x4d')]['id'];}return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0x52b3d6[_0x8291('0x4b')]['id']}})['then'](handleEntityNotFound(_0x33acef,null))[_0x8291('0x14')](function(_0x3faf1a){if(_0x3faf1a){_0x52b3d6[_0x8291('0x4d')][_0x8291('0x5b')]=_0x3faf1a['id'];return db[_0x8291('0x5f')][_0x8291('0x53')](_0x52b3d6[_0x8291('0x4d')]);}})[_0x8291('0x14')](respondWithResult(_0x33acef,null))[_0x8291('0x1e')](handleError(_0x33acef,null));};exports['getAnswers']=function(_0xb0a848,_0x134bd4){var _0xea405={'raw':![],'where':{}};var _0x1abd21={};var _0x3c8d34={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x8291('0x59')]({'where':{'id':_0xb0a848[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x134bd4,null))[_0x8291('0x14')](function(_0x4cff7a){if(_0x4cff7a){_0x1abd21['model']=_[_0x8291('0x38')](db[_0x8291('0x5f')][_0x8291('0x5a')]);_0x1abd21[_0x8291('0x37')]=_[_0x8291('0x38')](_0xb0a848[_0x8291('0x37')]);_0x1abd21[_0x8291('0x39')]=_['intersection'](_0x1abd21[_0x8291('0x36')],_0x1abd21[_0x8291('0x37')]);_0xea405['attributes']=_[_0x8291('0x3a')](_0x1abd21['model'],qs['fields'](_0xb0a848[_0x8291('0x37')][_0x8291('0x3c')]));_0xea405['attributes']=_0xea405['attributes'][_0x8291('0x3d')]?_0xea405[_0x8291('0x3b')]:_0x1abd21[_0x8291('0x36')];if(!_0xb0a848[_0x8291('0x37')]['hasOwnProperty']('nolimit')){_0xea405[_0x8291('0x25')]=qs[_0x8291('0x25')](_0xb0a848[_0x8291('0x37')][_0x8291('0x25')]);_0xea405[_0x8291('0x23')]=qs['offset'](_0xb0a848['query']['offset']);}_0xea405[_0x8291('0x40')]=qs[_0x8291('0x41')](_0xb0a848[_0x8291('0x37')][_0x8291('0x41')]);_0xea405['where']=qs['filters'](_[_0x8291('0x60')](_0xb0a848['query'],_0x1abd21['filters']));_0xea405[_0x8291('0x42')][_0x8291('0x5b')]=_0x4cff7a['id'];if(_0xb0a848[_0x8291('0x37')][_0x8291('0x43')]){_0xea405[_0x8291('0x42')]=_['merge'](_0xea405[_0x8291('0x42')],{'$or':_[_0x8291('0x31')](_0xea405[_0x8291('0x3b')],function(_0x28c091){var _0x1104a4={};_0x1104a4[_0x28c091]={'$like':'%'+_0xb0a848['query'][_0x8291('0x43')]+'%'};return _0x1104a4;})});}_0xea405=_[_0x8291('0x44')]({},_0xea405,_0xb0a848[_0x8291('0x46')]);return db[_0x8291('0x5f')]['count']({'where':_0xea405['where']})[_0x8291('0x14')](function(_0x3d0636){_0x3c8d34[_0x8291('0x26')]=_0x3d0636;if(_0xb0a848['query'][_0x8291('0x47')]){_0xea405['include']=[{'all':!![]}];}return db[_0x8291('0x5f')][_0x8291('0x49')](_0xea405);})['then'](function(_0x77e82){_0x3c8d34[_0x8291('0x61')]=_0x77e82;return _0x3c8d34;});}})[_0x8291('0x14')](respondWithFilteredResult(_0x134bd4,_0xea405))[_0x8291('0x1e')](handleError(_0x134bd4,null));};exports[_0x8291('0x62')]=function(_0x4f7cb4,_0x2ac9b0){return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0x4f7cb4[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x2ac9b0,null))[_0x8291('0x14')](function(_0x5c1b5f){if(_0x5c1b5f){return _0x5c1b5f['removeAnswers'](_0x4f7cb4[_0x8291('0x37')][_0x8291('0x5d')]);}})[_0x8291('0x14')](respondWithStatusCode(_0x2ac9b0,null))[_0x8291('0x1e')](handleError(_0x2ac9b0,null));};exports[_0x8291('0x63')]=function(_0x39953f,_0x596c4a){_0x39953f[_0x8291('0x4d')][_0x8291('0x64')]=_0x39953f[_0x8291('0x65')]['filename'];return db['ChatWebsite'][_0x8291('0x4c')]({'where':{'id':_0x39953f['params']['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x596c4a,null))['then'](saveUpdates(_0x39953f['body'],null))['then'](respondWithResult(_0x596c4a,null))['catch'](handleError(_0x596c4a,null));};exports[_0x8291('0x66')]=function(_0x3265b0,_0x3a1199){_0x3265b0['body'][_0x8291('0x67')]=_0x3265b0['file'][_0x8291('0x68')];return db[_0x8291('0x32')]['find']({'where':{'id':_0x3265b0[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x3a1199,null))[_0x8291('0x14')](saveUpdates(_0x3265b0[_0x8291('0x4d')],null))[_0x8291('0x14')](respondWithResult(_0x3a1199,null))[_0x8291('0x1e')](handleError(_0x3a1199,null));};exports[_0x8291('0x69')]=function(_0xb5739d,_0x325f90){_0xb5739d[_0x8291('0x4d')][_0x8291('0x6a')]=_0xb5739d[_0x8291('0x65')][_0x8291('0x68')];return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0xb5739d[_0x8291('0x4b')]['id']}})['then'](handleEntityNotFound(_0x325f90,null))[_0x8291('0x14')](saveUpdates(_0xb5739d['body'],null))['then'](respondWithResult(_0x325f90,null))[_0x8291('0x1e')](handleError(_0x325f90,null));};exports[_0x8291('0x6b')]=function(_0x331bd5,_0xe83597){_0x331bd5[_0x8291('0x4d')][_0x8291('0x6c')]=_0x331bd5['file']['filename'];return db['ChatWebsite'][_0x8291('0x4c')]({'where':{'id':_0x331bd5[_0x8291('0x4b')]['id']}})['then'](handleEntityNotFound(_0xe83597,null))[_0x8291('0x14')](saveUpdates(_0x331bd5[_0x8291('0x4d')],null))[_0x8291('0x14')](respondWithResult(_0xe83597,null))[_0x8291('0x1e')](handleError(_0xe83597,null));};exports[_0x8291('0x6d')]=function(_0x5782c8,_0x164808){var _0x4293c4=path['join'](config[_0x8291('0x6e')],'server/files/images/logos/default_logo.svg');var _0x45d910={'where':{'id':_0x5782c8[_0x8291('0x4b')]['id']},'attributes':['id',_0x8291('0x64')],'raw':!![]};var _0x39096d=![];return require(_0x8291('0x6f'))[_0x8291('0x70')]()[_0x8291('0x14')](function(_0x306108){if(_0x306108){_0x39096d=_0x306108[_0x8291('0x71')];}})[_0x8291('0x14')](function(){return db[_0x8291('0x32')][_0x8291('0x4c')](_0x45d910);})[_0x8291('0x14')](handleEntityNotFound(_0x164808,null))['then'](function(_0x1c2dd1){if(_0x1c2dd1){if(!_[_0x8291('0x72')](_0x1c2dd1[_0x8291('0x64')])){if(fs['existsSync'](path['join'](config[_0x8291('0x6e')],'server/files/images/logos/',_0x1c2dd1['sitepic']))&&_0x39096d){_0x4293c4=path[_0x8291('0x73')](config['root'],'server/files/images/logos/',_0x1c2dd1[_0x8291('0x64')]);}}return _0x164808[_0x8291('0x74')](_0x4293c4);}})[_0x8291('0x1e')](handleError(_0x164808,null));};exports[_0x8291('0x75')]=function(_0xd67700,_0x1f2431){var _0x3d767c=path['join'](config['root'],_0x8291('0x76'));var _0x26bda4={'where':{'id':_0xd67700[_0x8291('0x4b')]['id']},'attributes':['id',_0x8291('0x67')],'raw':!![]};return db[_0x8291('0x32')][_0x8291('0x4c')](_0x26bda4)['then'](handleEntityNotFound(_0x1f2431,null))[_0x8291('0x14')](function(_0x1273d4){if(_0x1273d4){if(!_[_0x8291('0x72')](_0x1273d4[_0x8291('0x67')])){if(fs['existsSync'](path[_0x8291('0x73')](config['root'],_0x8291('0x77'),_0x1273d4[_0x8291('0x67')]))){_0x3d767c=path[_0x8291('0x73')](config[_0x8291('0x6e')],'server/files/images/avatars/',_0x1273d4[_0x8291('0x67')]);}}return _0x1f2431['download'](_0x3d767c);}})[_0x8291('0x1e')](handleError(_0x1f2431,null));};exports[_0x8291('0x78')]=function(_0x4cab75,_0x4a2ea0){var _0x398374=path[_0x8291('0x73')](config[_0x8291('0x6e')],'server/files/images/avatars/customer_avatar.png');var _0x15809a={'where':{'id':_0x4cab75['params']['id']},'attributes':['id',_0x8291('0x6a'),_0x8291('0x79')],'raw':!![]};return db[_0x8291('0x32')][_0x8291('0x4c')](_0x15809a)['then'](handleEntityNotFound(_0x4a2ea0,null))[_0x8291('0x14')](function(_0x402d75){if(_0x402d75){if(!_[_0x8291('0x72')](_0x402d75['customerAvatar'])){if(fs[_0x8291('0x7a')](path[_0x8291('0x73')](config[_0x8291('0x6e')],_0x8291('0x77'),_0x402d75[_0x8291('0x6a')]))&&_0x402d75[_0x8291('0x79')]){_0x398374=path['join'](config[_0x8291('0x6e')],_0x8291('0x77'),_0x402d75['customerAvatar']);}}return _0x4a2ea0['download'](_0x398374);}})[_0x8291('0x1e')](handleError(_0x4a2ea0,null));};exports['getSystemAvatar']=function(_0x492126,_0x16217e){var _0x5a6515=path[_0x8291('0x73')](config['root'],_0x8291('0x7b'));var _0x46f7c9={'where':{'id':_0x492126[_0x8291('0x4b')]['id']},'attributes':['id',_0x8291('0x6c')],'raw':!![]};return db['ChatWebsite'][_0x8291('0x4c')](_0x46f7c9)['then'](handleEntityNotFound(_0x16217e,null))[_0x8291('0x14')](function(_0x25b571){if(_0x25b571){if(!_[_0x8291('0x72')](_0x25b571['systemAvatar'])){if(fs[_0x8291('0x7a')](path[_0x8291('0x73')](config[_0x8291('0x6e')],'server/files/images/avatars/',_0x25b571['systemAvatar']))){_0x5a6515=path[_0x8291('0x73')](config['root'],_0x8291('0x77'),_0x25b571['systemAvatar']);}}return _0x16217e['download'](_0x5a6515);}})[_0x8291('0x1e')](handleError(_0x16217e,null));};exports[_0x8291('0x7c')]=function(_0x330f42,_0x1edb00){var _0x39d4e6=require(_0x8291('0x7d'));var _0x48877=new _0x39d4e6();var _0x336967=_0x48877[_0x8291('0x7e')](_0x330f42[_0x8291('0x7f')][_0x8291('0x80')])['getResult']();var _0x4d6867={'body':_0x330f42[_0x8291('0x4d')],'channel':_0x8291('0x81')};var _0x40d973=[];var _0x576506=[];var _0x909d0c={};var _0x277b27=![];return db[_0x8291('0x82')][_0x8291('0x55')]()['then'](function(_0x5b681c){if(!_0x5b681c){throw new db[(_0x8291('0x83'))][(_0x8291('0x84'))](_0x8291('0x85'));}_0x40d973=_['difference'](_[_0x8291('0x38')](_0x5b681c),[_0x8291('0x86'),'updatedAt']);_0x576506=_['difference'](_['keys'](_0x5b681c),[_0x8291('0x86'),'updatedAt',_0x8291('0x87'),'ListId']);if(_0x330f42[_0x8291('0x4d')]['id']){delete _0x330f42[_0x8291('0x4d')]['id'];}if(_[_0x8291('0x72')](_0x330f42['body'][_0x8291('0x88')])){throw new db[(_0x8291('0x83'))][(_0x8291('0x84'))]('from\x20is\x20mandatory');}if(_[_0x8291('0x72')](_0x330f42[_0x8291('0x4d')]['body'])||_0x330f42[_0x8291('0x4d')]['body']===''){throw new db[(_0x8291('0x83'))]['ValidationError']('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x8291('0x72')](_0x330f42[_0x8291('0x4d')][_0x8291('0x89')])){throw new db['Sequelize'][(_0x8291('0x84'))](_0x8291('0x8a')+_0x576506);}if(!_[_0x8291('0x8b')](_0x576506,_0x330f42['body']['mapKey'])){throw new db[(_0x8291('0x83'))][(_0x8291('0x84'))](_0x8291('0x8c')+_0x576506);}_0x909d0c[_0x330f42[_0x8291('0x4d')][_0x8291('0x89')]]=_0x330f42['body'][_0x8291('0x88')];})[_0x8291('0x14')](function(){return db['ChatWebsite'][_0x8291('0x4c')]({'where':{'id':_0x330f42[_0x8291('0x4b')]['id']},'include':[{'model':db[_0x8291('0x8d')],'as':_0x8291('0x8e'),'include':[{'model':db[_0x8291('0x82')],'as':_0x8291('0x8f'),'where':_0x909d0c,'limit':0x1,'order':[['updatedAt',_0x8291('0x90')]]}]},{'model':db['ChatApplication'],'as':_0x8291('0x91')}]});})['then'](handleEntityNotFound(_0x1edb00,null))[_0x8291('0x14')](function(_0x70483c){if(_0x70483c&&_0x70483c[_0x8291('0x8e')]){_0x4d6867[_0x8291('0x92')]=_0x70483c;_0x4d6867[_0x8291('0x93')]=_0x70483c[_0x8291('0x91')];_0x4d6867['list']=_0x70483c[_0x8291('0x8e')];_0x4d6867[_0x8291('0x93')]=_[_0x8291('0x94')](_0x4d6867['applications'],[_0x8291('0x95')],[_0x8291('0x96')]);if(_0x4d6867[_0x8291('0x92')]['Applications']){delete _0x4d6867['account'][_0x8291('0x91')];}if(_0x4d6867['account'][_0x8291('0x8e')]&&_0x4d6867[_0x8291('0x92')]['List'][_0x8291('0x8f')][_0x8291('0x3d')]){return _0x4d6867[_0x8291('0x92')][_0x8291('0x8e')]['Contacts'][0x0];}var _0x494bae=_[_0x8291('0xb')](_0x330f42[_0x8291('0x4d')],{'firstName':_0x330f42[_0x8291('0x4d')][_0x8291('0x88')],'ListId':_0x70483c['ListId']});_0x494bae[_0x330f42[_0x8291('0x4d')]['mapKey']]=_0x330f42[_0x8291('0x4d')][_0x8291('0x88')];return db['CmContact']['create'](_0x494bae,{'fields':_0x40d973,'raw':!![]});}})['then'](handleEntityNotFound(_0x1edb00,null))[_0x8291('0x14')](function(_0x19fd96){_0x4d6867[_0x8291('0x97')]=_0x19fd96;var _0x1f985e=_0x330f42[_0x8291('0x4d')][_0x8291('0x98')];if(_0x330f42[_0x8291('0x7f')][_0x8291('0x99')]){_0x1f985e=_0x330f42[_0x8291('0x7f')][_0x8291('0x99')];}else if(_0x330f42['headers'][_0x8291('0x9a')]){_0x1f985e=_['first'](_0x330f42['headers'][_0x8291('0x9a')][_0x8291('0x9b')](','));}if(_0x19fd96){var _0x2765c7={'ContactId':_0x19fd96['id'],'ChatWebsiteId':_0x330f42['params']['id'],'from':(_0x19fd96['firstName']||'')+'\x20'+(_0x19fd96[_0x8291('0x9c')]||''),'customerIp':_0x1f985e,'customerPort':_0x330f42[_0x8291('0x7f')][_0x8291('0x9d')]?_0x330f42[_0x8291('0x7f')][_0x8291('0x9d')]:null,'referer':_0x330f42[_0x8291('0x4d')]['referer'],'browserName':_0x336967[_0x8291('0x9e')][_0x8291('0x2e')]&&_0x336967[_0x8291('0x9e')][_0x8291('0x9f')]?util[_0x8291('0xa0')](_0x8291('0xa1'),_0x336967[_0x8291('0x9e')][_0x8291('0x2e')],_0x336967[_0x8291('0x9e')][_0x8291('0x9f')]):_0x8291('0xa2'),'browserVersion':_0x336967[_0x8291('0x9e')][_0x8291('0x9f')]||_0x8291('0xa2'),'osName':util['format'](_0x8291('0xa1'),_0x336967['os'][_0x8291('0x2e')],_0x336967['os']['version']),'osVersion':_0x336967['os'][_0x8291('0x9f')],'deviceModel':_0x336967[_0x8291('0xa3')][_0x8291('0x36')]&&_0x336967[_0x8291('0xa3')][_0x8291('0xa4')]?util[_0x8291('0xa0')]('%s\x20%s\x20%s',_0x336967[_0x8291('0xa3')][_0x8291('0x36')],_0x336967[_0x8291('0xa3')]['vendor'],_0x336967['device'][_0x8291('0x34')]):null,'deviceVendor':_0x336967[_0x8291('0xa3')][_0x8291('0xa4')],'deviceType':_0x336967['device'][_0x8291('0x34')],'formData':JSON['stringify'](_0x330f42[_0x8291('0x4d')])};var _0x149f1a={'ChatWebsiteId':_0x330f42['params']['id'],'closed':![]};if(_0x330f42[_0x8291('0x4d')][_0x8291('0xa5')]){_0x149f1a[_0x8291('0xa5')]=_0x330f42[_0x8291('0x4d')]['threadId'];return db['ChatInteraction'][_0x8291('0x4c')]({'where':_0x149f1a})[_0x8291('0x14')](function(_0x2c5b8b){if(_0x2c5b8b){return[_0x2c5b8b,![]];}_0x2765c7['threadId']=_0x330f42['body'][_0x8291('0xa5')];_0x2765c7[_0x8291('0xa6')]=_0x330f42[_0x8291('0x4d')]['externalUrl'];return db[_0x8291('0xa7')][_0x8291('0x53')](_0x2765c7)[_0x8291('0x14')](function(_0x5b6adb){return[_0x5b6adb,!![]];});});}_0x149f1a['ContactId']=_0x19fd96['id'];if(_0x330f42[_0x8291('0x4d')][_0x8291('0xa8')]&&_0x330f42[_0x8291('0x4d')][_0x8291('0xa8')]['id']){_0x149f1a['id']=_0x330f42[_0x8291('0x4d')][_0x8291('0xa8')]['id'];return db[_0x8291('0xa7')][_0x8291('0x4c')]({'where':_0x149f1a})['then'](function(_0x2b7aa7){if(_0x2b7aa7){return[_0x2b7aa7,![]];}return db['ChatInteraction']['create'](_0x2765c7)[_0x8291('0x14')](function(_0x1cb4e4){return[_0x1cb4e4,!![]];});});}return db[_0x8291('0xa7')][_0x8291('0x53')](_0x2765c7)[_0x8291('0x14')](function(_0x38bc00){return[_0x38bc00,!![]];});}})[_0x8291('0xa9')](function(_0x1d1b47,_0x5e3b5b){if(_0x1d1b47){_0x277b27=_0x5e3b5b;if(!_0x5e3b5b){var _0x356f27={'from':(_0x4d6867['contact'][_0x8291('0xaa')]||'')+'\x20'+(_0x4d6867['contact'][_0x8291('0x9c')]||'')};if(_0x330f42[_0x8291('0x4d')][_0x8291('0xa5')]&&_0x330f42[_0x8291('0x4d')][_0x8291('0xab')]&&_0x330f42[_0x8291('0x4d')][_0x8291('0xa5')]!=_0x330f42['body']['messageId']){_0x356f27[_0x8291('0xa5')]=_0x330f42[_0x8291('0x4d')][_0x8291('0xab')];}return _0x1d1b47[_0x8291('0x29')](_0x356f27);}else{return _0x1d1b47;}}})[_0x8291('0x14')](function(_0x776cd5){_0x4d6867['interaction']=_0x776cd5[_0x8291('0x2b')]({'plain':!![]});_0x4d6867[_0x8291('0xa8')][_0x8291('0xac')]=_0x277b27;if(_0x4d6867[_0x8291('0xa8')][_0x8291('0xac')]){if(_0x4d6867[_0x8291('0x92')][_0x8291('0xad')]){_0x4d6867[_0x8291('0x93')][_0x8291('0xae')]({'id':0x0,'priority':_0x4d6867[_0x8291('0x93')][_0x8291('0x3d')]+0x1,'app':_0x8291('0xaf'),'appdata':'unmanaged','interval':_0x8291('0xb0')});}}return db['ChatMessage'][_0x8291('0x53')]({'body':_0x330f42['body'][_0x8291('0x4d')],'ChatWebsiteId':_0x330f42[_0x8291('0x4b')]['id'],'ChatInteractionId':_0x776cd5['id'],'direction':'in','ContactId':_0x4d6867[_0x8291('0x97')]['id'],'AttachmentId':_0x330f42['body'][_0x8291('0xb1')]});})[_0x8291('0x14')](function(_0x549f45){_0x4d6867[_0x8291('0x1c')]=_0x549f45;if(_0x4d6867[_0x8291('0xa8')][_0x8291('0xb2')]){return db[_0x8291('0xb3')][_0x8291('0x4c')]({'attributes':['id',_0x8291('0x2e')],'where':{'id':_0x4d6867[_0x8291('0xa8')]['UserId']}})['then'](function(_0x203aea){if(_0x203aea){_0x4d6867[_0x8291('0x93')][_0x8291('0xb4')]({'id':0x0,'priority':0x0,'app':_0x8291('0xb5'),'appdata':_0x203aea['name']+','+(_0x4d6867[_0x8291('0x92')][_0x8291('0xb6')]||0xa),'interval':_0x8291('0xb0')});_0x4d6867[_0x8291('0xb7')]=!![];}return respondWithRpcPromise(_0x8291('0xb8'),_0x8291('0xb9'),_0x4d6867);});}return respondWithRpcPromise('Start',_0x8291('0xb9'),_0x4d6867);})['then'](function(_0x505d70){respondWithRpcPromise(_0x8291('0xba'),_0x8291('0xba'),{'event':_0x8291('0x7c'),'message':_0x505d70},client9002);return _0x505d70;})[_0x8291('0x14')](respondWithResult(_0x1edb00,null))['catch'](handleError(_0x1edb00,null));};exports[_0x8291('0xbb')]=function(_0x1a6651,_0x30a2cf){var _0x592d62,_0x324c23,_0x2c96fd;var _0x48767a=[];var _0x5ebb29={};var _0x1e7e63=_0x1a6651[_0x8291('0xbc')]||[];var _0x1e0995=[];var _0x547a07;return db['CmContact']['describe']()['then'](function(_0x3cc485){if(!_0x3cc485){throw new db[(_0x8291('0x83'))][(_0x8291('0x84'))](_0x8291('0x85'));}_0x48767a=_[_0x8291('0xbd')](_[_0x8291('0x38')](_0x3cc485),[_0x8291('0x86'),'updatedAt',_0x8291('0x87'),'ListId']);if(_0x1a6651[_0x8291('0x4d')]['id']){delete _0x1a6651[_0x8291('0x4d')]['id'];}if(_[_0x8291('0x72')](_0x1a6651[_0x8291('0x4d')]['from'])){throw _0x30a2cf[_0x8291('0x20')](0x1f4)['send'](new db[(_0x8291('0x83'))][(_0x8291('0x84'))](_0x8291('0xbe')));}if(_[_0x8291('0x72')](_0x1a6651[_0x8291('0x4d')][_0x8291('0x4d')])||_0x1a6651[_0x8291('0x4d')][_0x8291('0x4d')]===''){throw _0x30a2cf[_0x8291('0x20')](0x1f4)[_0x8291('0xbf')](new db[(_0x8291('0x83'))]['ValidationError'](_0x8291('0xc0')));}if(_[_0x8291('0x72')](_0x1a6651['body'][_0x8291('0xc1')])){throw _0x30a2cf['status'](0x1f4)[_0x8291('0xbf')](new db['Sequelize'][(_0x8291('0x84'))](_0x8291('0xc2')+_0x48767a));}if(!_[_0x8291('0x8b')](_0x48767a,_0x1a6651['body']['mapKeyOffline'])){throw _0x30a2cf[_0x8291('0x20')](0x1f4)[_0x8291('0xbf')](new db[(_0x8291('0x83'))][(_0x8291('0x84'))]('mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x48767a));}_0x5ebb29[_0x1a6651[_0x8291('0x4d')][_0x8291('0xc1')]]=_0x1a6651['body'][_0x8291('0x88')];})[_0x8291('0x14')](function(){return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0x1a6651[_0x8291('0x4b')]['id']},'include':[{'model':db[_0x8291('0x8d')],'as':'List'},{'model':db['MailAccount'],'as':_0x8291('0xc3')}]});})[_0x8291('0x14')](handleEntityNotFound(_0x30a2cf,null))['then'](function(_0x2d3c11){if(_0x2d3c11&&_0x2d3c11[_0x8291('0x8e')]){_0x324c23=_0x2d3c11;var _0xfc57f8=_[_0x8291('0xb')](_0x1a6651[_0x8291('0x4d')],{'firstName':_0x1a6651[_0x8291('0x4d')][_0x8291('0x88')],'phone':_0x1a6651[_0x8291('0x4d')][_0x8291('0x88')],'ListId':_0x2d3c11[_0x8291('0xc4')]});_0xfc57f8[_0x1a6651['body'][_0x8291('0xc1')]]=_0x1a6651[_0x8291('0x4d')][_0x8291('0x88')];return db[_0x8291('0x82')][_0x8291('0xc5')]({'where':_0x5ebb29,'defaults':_0xfc57f8});}})['spread'](function(_0x5d01fd){if(_0x5d01fd){_0x2c96fd=_0x5d01fd;var _0xdfe5f8=fs['readFileSync'](path[_0x8291('0x73')](config[_0x8291('0x6e')],_0x8291('0xc6')),'utf8');var _0x224acc=ejs[_0x8291('0xc7')](_0xdfe5f8,{'body':_[_0x8291('0xc8')](_0x1a6651['body']['body']),'bodyTitle':_0x324c23[_0x8291('0xc9')]});return db[_0x8291('0xca')][_0x8291('0x53')]({'body':_0x224acc,'plainBody':htmlToText[_0x8291('0xcb')](_0x224acc),'ContactId':_0x5d01fd['id'],'ChatWebsiteId':_0x324c23['id']});}})[_0x8291('0x14')](function(_0x31d071){_0x547a07=_0x31d071;if(_0x1e7e63['length']){var _0x355f4b=_0x1e7e63[_0x8291('0x31')](function(_0xd42789){return{'name':_0xd42789[_0x8291('0xcc')],'basename':_0xd42789[_0x8291('0x68')],'type':_0xd42789['mimetype'],'ChatOfflineMessageId':_0x31d071['id']};});_0x1e0995=_0x355f4b[_0x8291('0x31')](_0x2b7327=>{var _0x21a57a={'filename':_0x2b7327[_0x8291('0x2e')],'path':path[_0x8291('0x73')](config[_0x8291('0x6e')],_0x8291('0xcd'),_0x8291('0xbc'),'attachments',_0x8291('0xce'),_0x2b7327[_0x8291('0xcf')])};return _0x21a57a;});if(!_0x324c23[_0x8291('0xd0')]){return db[_0x8291('0xd1')]['transaction'](function(_0x3208cf){return db[_0x8291('0xd2')][_0x8291('0xd3')](_0x355f4b,{'transaction':_0x3208cf});});}}})[_0x8291('0x14')](function(){if(_0x547a07){_0x592d62=_0x547a07;return db['MailAccount'][_0x8291('0x59')]({'where':{'service':!![]},'include':[{'model':db[_0x8291('0xd4')],'as':_0x8291('0xd5'),'raw':!![],'include':[{'model':db[_0x8291('0xd6')],'as':_0x8291('0xd6'),'raw':!![]}]}]});}})[_0x8291('0x14')](function(_0x5cfb00){if(_0x5cfb00&&_0x5cfb00['Smtp']&&_0x324c23[_0x8291('0xd7')]&&_0x324c23[_0x8291('0xd8')]){var _0xb8685c=_0x5cfb00[_0x8291('0xd9')]();return respondWithRpcPromise(_0x8291('0xda'),_0x8291('0xdb'),{'account':_0xb8685c,'message':{'from':util[_0x8291('0xa0')](_0x8291('0xdc'),_0x5cfb00[_0x8291('0x2e')],_0x5cfb00[_0x8291('0xdd')]||_0x5cfb00['Smtp'][_0x8291('0xde')]),'to':_0x324c23['forwardOfflineAddress'],'subject':_0x324c23['offlineMessageSubject'],'html':_0x592d62['body'],'attachments':_0x1e0995}},client9003)[_0x8291('0x14')](function(){return _0x592d62;})[_0x8291('0x1e')](function(_0x465b7a){logger['error'](_0x465b7a);});}})[_0x8291('0x14')](function(){if(_0x324c23&&_0x324c23[_0x8291('0xd0')]&&_0x324c23[_0x8291('0xdf')]){var _0x536421=[];if(_0x1e7e63[_0x8291('0x3d')]){_0x536421=_0x1e7e63[_0x8291('0x31')](function(_0x7cb79d){return{'name':_0x7cb79d[_0x8291('0xcc')],'basename':_0x7cb79d[_0x8291('0x68')],'type':_0x7cb79d['mimetype'],'ChatOfflineMessageId':_0x547a07['id']};});}var _0x4ba89a;if(!_[_0x8291('0x72')](_0x324c23[_0x8291('0xe0')])){var _0x49c4c1=_['map'](_0x1a6651[_0x8291('0x4d')],function(_0x2cc03d){return _0x2cc03d;});var _0x47820b=_[_0x8291('0xe1')](_0x49c4c1)[0x0];var _0x921bb2=_['mapValues'](_0x47820b,function(_0x2807dd){return _0x2807dd;});_0x4ba89a=_0x921bb2[0x1][_0x324c23[_0x8291('0xe0')]];}var _0x6ad477={'from':_0x2c96fd[_0x8291('0xdd')],'firstName':_0x2c96fd[_0x8291('0xaa')],'lastName':_0x2c96fd[_0x8291('0x9c')],'mapKey':'email','message':{'from':_0x2c96fd[_0x8291('0xdd')],'to':_0x324c23[_0x8291('0xc3')][_0x8291('0xdd')],'cc':'','subject':_[_0x8291('0x72')](_0x4ba89a)?_0x324c23[_0x8291('0xe2')]:_0x4ba89a,'messageId':'','sentAt':new Date(),'attach':_0x536421[_0x8291('0x3d')],'attachments':_0x536421,'originChannel':_0x8291('0xe3'),'ChatWebsiteId':_0x324c23['id'],'ChatOfflineMessageId':_0x592d62['id'],'originTo':_0x324c23[_0x8291('0xc3')][_0x8291('0xdd')]},'body':_0x592d62[_0x8291('0x4d')]};var _0x30f278={'account':{'id':_0x324c23[_0x8291('0xdf')]},'body':_0x6ad477,'log':_0x8291('0xe4')};return respondWithRpcPromise(_0x8291('0xe4'),_0x8291('0xe5'),_0x30f278,client9001)[_0x8291('0x14')](function(){return _0x592d62;})['catch'](function(_0x4aa20b){logger[_0x8291('0x1a')](_0x4aa20b);});}return;})['then'](function(){if(_0x592d62){return _0x592d62;}})['then'](respondWithResult(_0x30a2cf,null))[_0x8291('0x1e')](function(_0x48b521){logger[_0x8291('0x1a')](_0x8291('0x1e'),_0x48b521);for(var _0x249a40 of _0x1e7e63){var _0x3adb84=path[_0x8291('0x73')](config['root'],_0x8291('0xcd'),_0x8291('0xbc'),_0x8291('0xe6'),_0x8291('0xce'),_0x249a40[_0x8291('0x68')]);fs_extra['remove'](_0x3adb84)[_0x8291('0x1e')](function(_0x1b2f2f){logger[_0x8291('0x1a')](_0x8291('0xe7'),_0x3adb84,_0x1b2f2f);});}});};exports[_0x8291('0xe8')]=function(_0x56f387,_0x48e217){return db[_0x8291('0xa7')]['find']({'where':{'id':_0x56f387['params']['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x48e217,null))[_0x8291('0x14')](function(_0x3a4de9){if(_0x3a4de9){return _0x3a4de9[_0x8291('0xe8')](_0x56f387[_0x8291('0x4d')]['ids'],_[_0x8291('0xe9')](_0x56f387['body'],[_0x8291('0x5d'),'id'])||{});}})[_0x8291('0x14')](respondWithResult(_0x48e217,null))['catch'](handleError(_0x48e217,null));};exports[_0x8291('0xea')]=function(_0x4c46d0,_0x2ddd02){var _0x232543={'raw':![],'where':{}};var _0x3d420d={};var _0x1c4b87={'count':0x0,'rows':[]};return db[_0x8291('0x32')][_0x8291('0x59')]({'where':{'id':_0x4c46d0[_0x8291('0x4b')]['id']}})['then'](handleEntityNotFound(_0x2ddd02,null))[_0x8291('0x14')](function(_0x296b93){if(_0x296b93){_0x3d420d['model']=_['keys'](db[_0x8291('0xa7')][_0x8291('0x5a')]);_0x3d420d[_0x8291('0x37')]=_[_0x8291('0x38')](_0x4c46d0[_0x8291('0x37')]);_0x3d420d[_0x8291('0x39')]=_[_0x8291('0x3a')](_0x3d420d[_0x8291('0x36')],_0x3d420d[_0x8291('0x37')]);_0x232543[_0x8291('0x3b')]=_[_0x8291('0x3a')](_0x3d420d[_0x8291('0x36')],qs['fields'](_0x4c46d0[_0x8291('0x37')][_0x8291('0x3c')]));_0x232543[_0x8291('0x3b')]=_0x232543[_0x8291('0x3b')][_0x8291('0x3d')]?_0x232543['attributes']:_0x3d420d[_0x8291('0x36')];if(!_0x4c46d0['query'][_0x8291('0x3e')](_0x8291('0x3f'))){_0x232543['limit']=qs[_0x8291('0x25')](_0x4c46d0[_0x8291('0x37')][_0x8291('0x25')]);_0x232543['offset']=qs[_0x8291('0x23')](_0x4c46d0['query'][_0x8291('0x23')]);}_0x232543['order']=qs[_0x8291('0x41')](_0x4c46d0['query']['sort']);_0x232543[_0x8291('0x42')]=qs[_0x8291('0x39')](_[_0x8291('0x60')](_0x4c46d0[_0x8291('0x37')],_0x3d420d[_0x8291('0x39')]));_0x232543['where'][_0x8291('0x5b')]=_0x296b93['id'];if(_0x4c46d0[_0x8291('0x37')][_0x8291('0x43')]){_0x232543[_0x8291('0x42')]=_[_0x8291('0x44')](_0x232543[_0x8291('0x42')],{'$or':_[_0x8291('0x31')](_0x232543[_0x8291('0x3b')],function(_0x41d8ef){var _0x3b71a8={};_0x3b71a8[_0x41d8ef]={'$like':'%'+_0x4c46d0['query'][_0x8291('0x43')]+'%'};return _0x3b71a8;})});}_0x232543=_[_0x8291('0x44')]({},_0x232543,_0x4c46d0['options']);return db['ChatInteraction'][_0x8291('0x26')]({'where':_0x232543['where']})[_0x8291('0x14')](function(_0x218d42){_0x1c4b87['count']=_0x218d42;if(_0x4c46d0['query'][_0x8291('0x47')]){_0x232543['include']=[{'model':db[_0x8291('0x82')],'as':_0x8291('0xeb'),'required':![]},{'model':db[_0x8291('0xb3')],'as':_0x8291('0xec'),'attributes':[_0x8291('0x2e'),_0x8291('0xed'),_0x8291('0xee')],'required':![]},{'model':db['Tag'],'as':_0x8291('0xef'),'attributes':['id',_0x8291('0x2e'),_0x8291('0xf0')],'where':_0x4c46d0[_0x8291('0x37')]['tag']?{'id':_0x4c46d0[_0x8291('0x37')]['tag']}:undefined,'required':_0x4c46d0[_0x8291('0x37')]['tag']?!![]:![]}];}return db[_0x8291('0xa7')]['findAll'](_0x232543);})['then'](function(_0x1779ec){_0x1c4b87[_0x8291('0x61')]=_0x1779ec;return _0x1c4b87;});}})['then'](respondWithFilteredResult(_0x2ddd02,_0x232543))[_0x8291('0x1e')](handleError(_0x2ddd02,null));};function iftimePromise(_0x34b78e,_0x4a7a74){return respondWithRpcPromise(_0x8291('0xf1'),_0x8291('0xf2'),{'command':_0x4a7a74[_0x8291('0xf3')]?util[_0x8291('0xa0')]('iftime\x20%s,%s',_0x34b78e[_0x8291('0xf4')],_0x4a7a74[_0x8291('0xf3')]):util['format'](_0x8291('0xf5'),_0x34b78e[_0x8291('0xf4')])},client9002)['then'](function(_0x187162){var _0x2767b4=_0x187162&&_0x187162[_0x8291('0xf6')](_0x8291('0xf7'))>=0x0?!![]:![];logger['info'](_0x8291('0xf8'),_0x4a7a74['id'],_0x34b78e['id'],_0x34b78e[_0x8291('0xf4')],_0x2767b4?_0x8291('0xf9'):_0x8291('0xfa'),_0x4a7a74[_0x8291('0xf3')]?_0x4a7a74[_0x8291('0xf3')]:_0x8291('0xfb'));return _0x2767b4;})[_0x8291('0x1e')](function(_0x4ef242){logger[_0x8291('0x1a')](_0x8291('0xf8'),_0x4a7a74['id'],_0x34b78e['id'],_0x34b78e[_0x8291('0xf4')],util[_0x8291('0xfc')](_0x4ef242,{'showHidden':![],'depth':null}),_0x4a7a74['timezone']?_0x4a7a74[_0x8291('0xf3')]:_0x8291('0xfb'));return![];});}exports[_0x8291('0xf2')]=function(_0x378616,_0xe0a5a4){var _0x38500f=0x0;var _0x552dfd=0x0;var _0x3b94d=![];var _0x75d824;var _0x5b394a;return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0x378616['params']['id']},'include':[{'model':db[_0x8291('0xfd')],'as':_0x8291('0xfd'),'include':[{'model':db['Interval'],'as':'Intervals','attributes':['id','interval'],'raw':!![]}]}]})['then'](handleEntityNotFound(_0xe0a5a4,null))['then'](function(_0x5ab6a4){if(_0x5ab6a4){_0x75d824=_0x5ab6a4;return _0x5ab6a4[_0x8291('0xfe')]({'raw':!![]});}})[_0x8291('0x14')](function(_0x391966){if(_0x75d824){if(_0x391966){_0x5b394a=_0x391966;}}return require('../../config/license/util')['getLicense']();})['then'](function(_0x323f8c){if(_0x323f8c){_0x552dfd=_0x323f8c[_0x8291('0xff')];_0x3b94d=_0x323f8c[_0x8291('0x71')];}})['then'](function(){return db[_0x8291('0xa7')][_0x8291('0x26')]({'where':{'closed':![]}});})[_0x8291('0x14')](function(_0x15116f){_0x38500f=_0x15116f;if(_0x552dfd&&_0x15116f>_0x552dfd){return db[_0x8291('0x100')][_0x8291('0x59')]({'where':{'id':0x1}})['then'](function(_0x13c66b){if(_0x13c66b){_0x13c66b[_0x8291('0x101')](_0x8291('0x102'));}});}})['then'](function(){if(_0x75d824[_0x8291('0xfd')]&&_0x75d824[_0x8291('0xfd')]['Intervals']){var _0xcff983=[];for(var _0x2a5840=0x0;_0x2a5840<_0x75d824[_0x8291('0xfd')][_0x8291('0x103')][_0x8291('0x3d')];_0x2a5840++){var _0x3b31f9=_0x75d824[_0x8291('0xfd')]['Intervals'][_0x2a5840][_0x8291('0x2b')]({'plain':!![]});_0xcff983[_0x8291('0xae')](iftimePromise(_0x3b31f9,_0x75d824));}return BPromise['all'](_0xcff983)['then'](function(_0x22b86e){return _['some'](_0x22b86e);});}else{return!![];}})[_0x8291('0x14')](function(_0x59c1fd){var _0x1d3bbe=fs['readFileSync'](path[_0x8291('0x73')](config[_0x8291('0x6e')],'server/files/chat/iframe.ejs'),_0x8291('0x104'));var _0x5d2feb={'remote':_0x75d824['remote'],'query':querystring[_0x8291('0x19')](_['merge'](_0x75d824[_0x8291('0x2b')]({'plain':!![]}),{'customerIp':_0x378616[_0x8291('0x7f')][_0x8291('0x9a')]||_0x378616[_0x8291('0x7f')][_0x8291('0x105')]||_0x378616[_0x8291('0x106')][_0x8291('0x107')]||_0x378616['ip'],'referer':_0x378616['headers']['referer'],'openedInteractions':_0x38500f,'maxInteractions':_0x552dfd,'virtual':_0x3b94d['virtual'],'online':_0x59c1fd,'custom':_0x3b94d}))[_0x8291('0x108')](/'/g,'\x5c\x27')};_0xe0a5a4[_0x8291('0xbf')](ejs[_0x8291('0xc7')](Mustache[_0x8291('0xc7')](_0x1d3bbe,_0x5d2feb),{'proactiveActions':_0x5b394a,'alignment':_0x75d824[_0x8291('0x109')],'verticalAlignment':_0x75d824[_0x8291('0x10a')],'div_color':_0x75d824['color'],'labelText':_0x75d824[_0x8291('0x10b')],'text_color':_0x75d824[_0x8291('0x10c')],'text_button_color':_0x75d824[_0x8291('0x10d')],'button_color':_0x75d824['color_button'],'background_color':_0x75d824['backgroundColor'],'hideWhenOffline':_0x75d824[_0x8291('0x10e')],'interval':_0x75d824['IntervalId']}));})['catch'](handleError(_0xe0a5a4,null));};exports['addApplications']=function(_0x280e20,_0x17f890){var _0x4d6de7=_0x280e20[_0x8291('0x4b')]['id'];var _0x559e3c=_0x280e20[_0x8291('0x4d')];var _0x20f149=0xc8;var _0xb393e3=null;return db['sequelize'][_0x8291('0x10f')]({'isolationLevel':db['sequelize']['Transaction'][_0x8291('0x110')]['READ_COMMITTED']},function(_0x3d319b){return db[_0x8291('0x32')]['findOne']({'where':{'id':_0x4d6de7},'transaction':_0x3d319b})[_0x8291('0x14')](function(_0x308690){if(_0x308690){return db['ChatApplication'][_0x8291('0x2a')]({'where':{'ChatWebsiteId':_0x4d6de7},'transaction':_0x3d319b})['then'](function(){var _0x179318=_['map'](_0x559e3c,function(_0x2d6a63){_0x2d6a63[_0x8291('0x5b')]=_0x4d6de7;return _0x2d6a63;});return db[_0x8291('0x111')][_0x8291('0xd3')](_0x179318,{'transaction':_0x3d319b});});}else{_0x20f149=0x194;_0xb393e3=[];}});})['then'](function(){if(_0x20f149!==0x194){return db[_0x8291('0x111')]['findAndCountAll']({'where':{'ChatWebsiteId':_0x4d6de7},'order':_0x8291('0x95')})[_0x8291('0x14')](function(_0x1b26ca){_0xb393e3=_0x1b26ca;});}})[_0x8291('0x1e')](function(_0x506537){_0x20f149=0x1f4;logger[_0x8291('0x1a')](_0x506537[_0x8291('0x112')]);if(_0x506537[_0x8291('0x2e')]){delete _0x506537[_0x8291('0x2e')];}_0xb393e3=_0x506537;})['finally'](function(){if(_0xb393e3===null){_0x17f890[_0x8291('0x1f')](_0x20f149);}else{if(_0x20f149===0x1f4){_0x17f890['status'](_0x20f149)[_0x8291('0xbf')](_0xb393e3);}else{_0x17f890['status'](_0x20f149)[_0x8291('0x22')](_0xb393e3);}}});};exports[_0x8291('0x113')]=function(_0x5c8e85,_0x904fa5){var _0x2918ef={};var _0x4219c7={};var _0x5ef593;var _0x211051;return db[_0x8291('0x32')][_0x8291('0x59')]({'where':{'id':_0x5c8e85[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x904fa5,null))['then'](function(_0x35607a){if(_0x35607a){_0x5ef593=_0x35607a;_0x4219c7[_0x8291('0x36')]=_[_0x8291('0x38')](db[_0x8291('0x111')]['rawAttributes']);_0x4219c7[_0x8291('0x37')]=_[_0x8291('0x38')](_0x5c8e85[_0x8291('0x37')]);_0x4219c7[_0x8291('0x39')]=_[_0x8291('0x3a')](_0x4219c7[_0x8291('0x36')],_0x4219c7[_0x8291('0x37')]);_0x2918ef[_0x8291('0x3b')]=_[_0x8291('0x3a')](_0x4219c7['model'],qs[_0x8291('0x3c')](_0x5c8e85[_0x8291('0x37')]['fields']));_0x2918ef[_0x8291('0x3b')]=_0x2918ef[_0x8291('0x3b')][_0x8291('0x3d')]?_0x2918ef[_0x8291('0x3b')]:_0x4219c7[_0x8291('0x36')];_0x2918ef['order']=qs[_0x8291('0x41')](_0x5c8e85[_0x8291('0x37')][_0x8291('0x41')]);_0x2918ef[_0x8291('0x42')]=qs[_0x8291('0x39')](_[_0x8291('0x60')](_0x5c8e85[_0x8291('0x37')],_0x4219c7['filters']));if(_0x5c8e85[_0x8291('0x37')][_0x8291('0x43')]){_0x2918ef[_0x8291('0x42')]=_['merge'](_0x2918ef[_0x8291('0x42')],{'$or':_[_0x8291('0x31')](_0x2918ef['attributes'],function(_0x171792){var _0x4df97d={};_0x4df97d[_0x171792]={'$like':'%'+_0x5c8e85['query'][_0x8291('0x43')]+'%'};return _0x4df97d;})});}_0x2918ef=_[_0x8291('0x44')]({},_0x2918ef,_0x5c8e85[_0x8291('0x46')]);return _0x5ef593[_0x8291('0x113')](_0x2918ef);}})[_0x8291('0x14')](function(_0x18276b){if(_0x18276b){_0x211051=_0x18276b[_0x8291('0x3d')];if(!_0x5c8e85[_0x8291('0x37')][_0x8291('0x3e')]('nolimit')){_0x2918ef[_0x8291('0x25')]=qs[_0x8291('0x25')](_0x5c8e85['query'][_0x8291('0x25')]);_0x2918ef[_0x8291('0x23')]=qs[_0x8291('0x23')](_0x5c8e85[_0x8291('0x37')][_0x8291('0x23')]);}return _0x5ef593[_0x8291('0x113')](_0x2918ef);}})[_0x8291('0x14')](function(_0x5bba97){if(_0x5bba97){return _0x5bba97?{'count':_0x211051,'rows':_0x5bba97}:null;}})[_0x8291('0x14')](respondWithResult(_0x904fa5,null))['catch'](handleError(_0x904fa5,null));};exports[_0x8291('0x114')]=function(_0x4b70d6,_0x5f1d1d){return db['chatProactiveAction'][_0x8291('0x4c')]({'where':{'id':_0x4b70d6[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x5f1d1d,null))[_0x8291('0x14')](function(_0x6f1c45){if(_0x6f1c45){return _0x6f1c45[_0x8291('0x114')](_0x4b70d6[_0x8291('0x4d')][_0x8291('0x5d')],_[_0x8291('0xe9')](_0x4b70d6[_0x8291('0x4d')],[_0x8291('0x5d'),'id'])||{});}})[_0x8291('0x14')](respondWithResult(_0x5f1d1d,null))[_0x8291('0x1e')](handleError(_0x5f1d1d,null));};exports[_0x8291('0xfe')]=function(_0x12fa8b,_0x38b9ae){var _0x394953={};var _0x38cc75={};var _0x2e68f5;var _0x1a21bb;return db[_0x8291('0x32')]['findOne']({'where':{'id':_0x12fa8b['params']['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x38b9ae,null))['then'](function(_0x1cb4c6){if(_0x1cb4c6){_0x2e68f5=_0x1cb4c6;_0x38cc75[_0x8291('0x36')]=_[_0x8291('0x38')](db[_0x8291('0x115')]['rawAttributes']);_0x38cc75[_0x8291('0x37')]=_[_0x8291('0x38')](_0x12fa8b['query']);_0x38cc75[_0x8291('0x39')]=_[_0x8291('0x3a')](_0x38cc75[_0x8291('0x36')],_0x38cc75[_0x8291('0x37')]);_0x394953['attributes']=_[_0x8291('0x3a')](_0x38cc75[_0x8291('0x36')],qs[_0x8291('0x3c')](_0x12fa8b[_0x8291('0x37')]['fields']));_0x394953['attributes']=_0x394953[_0x8291('0x3b')][_0x8291('0x3d')]?_0x394953[_0x8291('0x3b')]:_0x38cc75['model'];_0x394953['order']=qs[_0x8291('0x41')](_0x12fa8b[_0x8291('0x37')]['sort']);_0x394953[_0x8291('0x42')]=qs['filters'](_[_0x8291('0x60')](_0x12fa8b[_0x8291('0x37')],_0x38cc75['filters']));if(_0x12fa8b[_0x8291('0x37')]['filter']){_0x394953['where']=_[_0x8291('0x44')](_0x394953['where'],{'$or':_['map'](_0x394953[_0x8291('0x3b')],function(_0x570fa4){var _0x3ae8c9={};_0x3ae8c9[_0x570fa4]={'$like':'%'+_0x12fa8b['query'][_0x8291('0x43')]+'%'};return _0x3ae8c9;})});}_0x394953=_['merge']({},_0x394953,_0x12fa8b[_0x8291('0x46')]);return _0x2e68f5[_0x8291('0xfe')](_0x394953);}})[_0x8291('0x14')](function(_0x12aa67){if(_0x12aa67){_0x1a21bb=_0x12aa67[_0x8291('0x3d')];if(!_0x12fa8b[_0x8291('0x37')][_0x8291('0x3e')](_0x8291('0x3f'))){_0x394953[_0x8291('0x25')]=qs[_0x8291('0x25')](_0x12fa8b[_0x8291('0x37')]['limit']);_0x394953[_0x8291('0x23')]=qs[_0x8291('0x23')](_0x12fa8b[_0x8291('0x37')][_0x8291('0x23')]);}return _0x2e68f5[_0x8291('0xfe')](_0x394953);}})[_0x8291('0x14')](function(_0x23e089){if(_0x23e089){return _0x23e089?{'count':_0x1a21bb,'rows':_0x23e089}:null;}})[_0x8291('0x14')](respondWithResult(_0x38b9ae,null))['catch'](handleError(_0x38b9ae,null));};exports[_0x8291('0x116')]=function(_0x4380a3,_0x7b21ce){var _0x9aae4e=_0x4380a3['query'][_0x8291('0x117')]===_0x8291('0x118')?_0x8291('0x119'):_0x8291('0x11a');return db[_0x8291('0x32')]['find']({'attributes':['id',_0x9aae4e],'where':{'id':_0x4380a3[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x7b21ce,null))[_0x8291('0x14')](function(_0x4c8755){if(_0x4c8755){var _0x5c26f8=_0x4c8755[_0x9aae4e];var _0x24b82f=_0x5c26f8&&_0x5c26f8['items']?_0x5c26f8[_0x8291('0x11b')]:[];_0x7b21ce['send']({'fromKey':_[_0x8291('0x72')](_0x5c26f8['fromKey'])?undefined:_0x5c26f8['fromKey'],'count':_0x24b82f[_0x8291('0x3d')],'rows':_0x24b82f});}})[_0x8291('0x1e')](handleError(_0x7b21ce,null));};exports[_0x8291('0x11c')]=function(_0x108d97,_0x359136){var _0x535543={'raw':![],'where':{}};var _0x8b966c={};var _0x2c8e8a={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x108d97['params']['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x359136,null))['then'](function(_0x440b18){if(_0x440b18){_0x8b966c['model']=_['keys'](db[_0x8291('0xca')]['rawAttributes']);_0x8b966c[_0x8291('0x37')]=_[_0x8291('0x38')](_0x108d97[_0x8291('0x37')]);_0x8b966c['filters']=_[_0x8291('0x3a')](_0x8b966c['model'],_0x8b966c[_0x8291('0x37')]);_0x535543[_0x8291('0x3b')]=_[_0x8291('0x3a')](_0x8b966c[_0x8291('0x36')],qs[_0x8291('0x3c')](_0x108d97[_0x8291('0x37')]['fields']));_0x535543['attributes']=_0x535543[_0x8291('0x3b')][_0x8291('0x3d')]?_0x535543[_0x8291('0x3b')]:_0x8b966c['model'];if(!_0x108d97[_0x8291('0x37')][_0x8291('0x3e')](_0x8291('0x3f'))){_0x535543[_0x8291('0x25')]=qs[_0x8291('0x25')](_0x108d97[_0x8291('0x37')][_0x8291('0x25')]);_0x535543[_0x8291('0x23')]=qs['offset'](_0x108d97[_0x8291('0x37')][_0x8291('0x23')]);}_0x535543['order']=qs[_0x8291('0x41')](_0x108d97[_0x8291('0x37')][_0x8291('0x41')]);_0x535543['where']=qs[_0x8291('0x39')](_[_0x8291('0x60')](_0x108d97[_0x8291('0x37')],_0x8b966c[_0x8291('0x39')]));_0x535543[_0x8291('0x42')][_0x8291('0x5b')]=_0x440b18['id'];if(_0x108d97[_0x8291('0x37')][_0x8291('0x43')]){_0x535543[_0x8291('0x42')]=_[_0x8291('0x44')](_0x535543[_0x8291('0x42')],{'$or':_[_0x8291('0x31')](_0x535543[_0x8291('0x3b')],function(_0x42ce4d){var _0x4fd0e2={};_0x4fd0e2[_0x42ce4d]={'$like':'%'+_0x108d97[_0x8291('0x37')][_0x8291('0x43')]+'%'};return _0x4fd0e2;})});}_0x535543=_[_0x8291('0x44')]({},_0x535543,_0x108d97['options']);return db[_0x8291('0xca')][_0x8291('0x26')]({'where':_0x535543['where']})[_0x8291('0x14')](function(_0x56872f){_0x2c8e8a['count']=_0x56872f;if(_0x108d97[_0x8291('0x37')][_0x8291('0x47')]){_0x535543['include']=[{'all':!![]}];}else{_0x535543[_0x8291('0x48')]=[{'model':db[_0x8291('0x82')],'as':'Contact','required':![]},{'model':db[_0x8291('0xd2')],'as':'Attachments','required':![]}];}return db[_0x8291('0xca')][_0x8291('0x49')](_0x535543);})['then'](function(_0x54d9fd){_0x2c8e8a[_0x8291('0x61')]=_0x54d9fd;return _0x2c8e8a;});}})['then'](respondWithFilteredResult(_0x359136,_0x535543))[_0x8291('0x1e')](handleError(_0x359136,null));};exports[_0x8291('0x11d')]=function(_0x1043fc,_0x1b1e3a){return db[_0x8291('0x32')][_0x8291('0x4c')]({'where':{'id':_0x1043fc[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x1b1e3a,null))[_0x8291('0x14')](function(_0x53c265){if(_0x53c265){return _0x53c265[_0x8291('0x11d')](_0x1043fc['body'][_0x8291('0x5d')],_[_0x8291('0xe9')](_0x1043fc[_0x8291('0x4d')],['ids','id'])||{})['spread'](function(_0x2677fd){for(var _0x4475d9=0x0;_0x4475d9<_0x1043fc[_0x8291('0x4d')][_0x8291('0x5d')][_0x8291('0x3d')];_0x4475d9+=0x1){socket[_0x8291('0x11e')](_0x8291('0x11f'),{'UserId':Number(_0x1043fc[_0x8291('0x4d')][_0x8291('0x5d')][_0x4475d9]),'ChatWebsiteId':Number(_0x1043fc[_0x8291('0x4b')]['id'])});}return _0x2677fd;});}})['then'](respondWithResult(_0x1b1e3a,null))[_0x8291('0x1e')](handleError(_0x1b1e3a,null));};exports['removeAgents']=function(_0x3a34ad,_0x2fdc06){return db['ChatWebsite'][_0x8291('0x4c')]({'where':{'id':_0x3a34ad[_0x8291('0x4b')]['id']}})[_0x8291('0x14')](handleEntityNotFound(_0x2fdc06,null))[_0x8291('0x14')](function(_0x5c1c1c){if(_0x5c1c1c){return _0x5c1c1c[_0x8291('0x120')](_0x3a34ad['query'][_0x8291('0x5d')])[_0x8291('0x14')](function(){if(_[_0x8291('0x121')](_0x3a34ad[_0x8291('0x37')]['ids'])){for(var _0x513199=0x0;_0x513199<_0x3a34ad['query'][_0x8291('0x5d')][_0x8291('0x3d')];_0x513199+=0x1){socket[_0x8291('0x11e')](_0x8291('0x122'),{'UserId':Number(_0x3a34ad['query']['ids'][_0x513199]),'ChatWebsiteId':Number(_0x3a34ad[_0x8291('0x4b')]['id'])});}}else{socket[_0x8291('0x11e')](_0x8291('0x122'),{'UserId':Number(_0x3a34ad['query'][_0x8291('0x5d')]),'ChatWebsiteId':Number(_0x3a34ad[_0x8291('0x4b')]['id'])});}});}})[_0x8291('0x14')](respondWithStatusCode(_0x2fdc06,null))['catch'](handleError(_0x2fdc06,null));};exports[_0x8291('0x123')]=function(_0x597b53,_0x4f7b9c){var _0x3cc806={};var _0x4be0e5={};var _0x4f0acc;var _0x3af515;return db[_0x8291('0x32')][_0x8291('0x59')]({'where':{'id':_0x597b53[_0x8291('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4f7b9c,null))[_0x8291('0x14')](function(_0x318f3f){if(_0x318f3f){_0x4f0acc=_0x318f3f;_0x4be0e5['model']=_[_0x8291('0x38')](db[_0x8291('0xb3')]['rawAttributes']);_0x4be0e5[_0x8291('0x37')]=_['keys'](_0x597b53[_0x8291('0x37')]);_0x4be0e5['filters']=_[_0x8291('0x3a')](_0x4be0e5[_0x8291('0x36')],_0x4be0e5['query']);_0x3cc806['attributes']=_[_0x8291('0x3a')](_0x4be0e5['model'],qs[_0x8291('0x3c')](_0x597b53[_0x8291('0x37')][_0x8291('0x3c')]));_0x3cc806[_0x8291('0x3b')]=_0x3cc806[_0x8291('0x3b')][_0x8291('0x3d')]?_0x3cc806['attributes']:_0x4be0e5[_0x8291('0x36')];_0x3cc806[_0x8291('0x40')]=qs[_0x8291('0x41')](_0x597b53[_0x8291('0x37')][_0x8291('0x41')]);_0x3cc806['where']=qs[_0x8291('0x39')](_['pick'](_0x597b53[_0x8291('0x37')],_0x4be0e5[_0x8291('0x39')]));if(_0x597b53[_0x8291('0x37')][_0x8291('0x43')]){_0x3cc806[_0x8291('0x42')]=_[_0x8291('0x44')](_0x3cc806[_0x8291('0x42')],{'$or':_[_0x8291('0x31')](_0x3cc806[_0x8291('0x3b')],function(_0x2dc164){var _0x1fdb4e={};_0x1fdb4e[_0x2dc164]={'$like':'%'+_0x597b53[_0x8291('0x37')][_0x8291('0x43')]+'%'};return _0x1fdb4e;})});}_0x3cc806=_[_0x8291('0x44')]({},_0x3cc806,_0x597b53['options']);return _0x4f0acc['getAgents'](_0x3cc806);}})[_0x8291('0x14')](function(_0x2caa9e){if(_0x2caa9e){_0x3af515=_0x2caa9e[_0x8291('0x3d')];if(!_0x597b53[_0x8291('0x37')]['hasOwnProperty'](_0x8291('0x3f'))){_0x3cc806[_0x8291('0x25')]=qs[_0x8291('0x25')](_0x597b53[_0x8291('0x37')]['limit']);_0x3cc806['offset']=qs['offset'](_0x597b53[_0x8291('0x37')][_0x8291('0x23')]);}return _0x4f0acc[_0x8291('0x123')](_0x3cc806);}})[_0x8291('0x14')](function(_0x1edd5c){if(_0x1edd5c){return _0x1edd5c?{'count':_0x3af515,'rows':_0x1edd5c}:null;}})['then'](respondWithResult(_0x4f7b9c,null))[_0x8291('0x1e')](handleError(_0x4f7b9c,null));};
\ No newline at end of file
+var _0xee48=['custom','isNil','existsSync','join','server/files/images/logos/','server/files/images/avatars/default_avatar.png','agentAvatar','server/files/images/avatars/','download','getCustomerAvatar','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','getSystemAvatar','user-agent-parser','setUA','headers','user-agent','chat','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','ListId','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','DESC','ChatApplication','Applications','List','account','applications','list','orderBy','customerIp','cf-connecting-ip','first','x-forwarded-for','firstName','x-real-port','browser','version','%s\x20%s','unknown','device','vendor','format','%s\x20%s\x20%s','threadId','externalUrl','ChatInteraction','ContactId','interaction','spread','contact','lastName','messageId','update','autoclose','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','User','unshift','agent','forcedOwnership','Start','startRouting','EventManager','notify','offline','CompanyId','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','defaults','findOrCreate','readFileSync','server/files/templates/chatOfflineMessage.ejs','render','toPairs','offlineMessageBody','ChatOfflineMessage','fromString','mimetype','server','attachments','offline-chat','basename','openNewInteraction','transaction','Attachment','bulkCreate','CloudProvider','Smtp','forwardOffline','forwardOfflineAddress','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','email','offlineMessageSubject','originalname','subjectOffline','Chat','MailAccountId','NotifyMailAccount','files','remove','addInteraction','omit','getInteractions','Contact','Owner','fullname','internal','Tag','color','tag','Command','getSnippet','timezone','iftime\x20%s,%s','iftime\x20%s','interval','indexOf','info','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','No\x20timezone','inspect','Interval','Intervals','getProactiveActions','License','increment','chatLicenseExceeded','all','server/files/chat/iframe.ejs','utf8','remote','x-real-ip','remoteAddress','referer','replace','alignment','labelText','textColor','textButtonColor','color_button','hideWhenOffline','IntervalId','addApplications','sequelize','Transaction','ISOLATION_LEVELS','priority','finally','getApplications','addProactiveActions','chatProactiveAction','ChatProactiveAction','getFields','false','offlineForm','onlineForm','getOfflineMessages','Attachments','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','util','path','lodash','ioredis','../../config/logger','../../config/environment','../../mysqldb','localhost','socket.io-emitter','redis','./chatWebsite.socket','html-to-text','jayson/promise','http','client','request','then','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','error','message','result','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','destroy','get','ChatWebsites','UserProfileResource','stack','name','send','Pause','mandatoryDispositionPause','map','ChatWebsite','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','rows','catch','params','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','ChatWebsiteId','Disposition','findOne','removeDispositions','ids','addAnswer','getAnswers','CannedAnswer','findAll','removeAnswers','addLogo','sitepic','file','filename','addAvatar','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','root','server/files/images/logos/default_logo.svg','../../config/license/util','getLicense'];(function(_0x14363e,_0x4f0e0d){var _0x17c56d=function(_0x1c7bac){while(--_0x1c7bac){_0x14363e['push'](_0x14363e['shift']());}};_0x17c56d(++_0x4f0e0d);}(_0xee48,0x1e5));var _0x8ee4=function(_0x5f09c5,_0x2bfca0){_0x5f09c5=_0x5f09c5-0x0;var _0x426ad9=_0xee48[_0x5f09c5];return _0x426ad9;};'use strict';var BPromise=require('bluebird');var Mustache=require(_0x8ee4('0x0'));var util=require(_0x8ee4('0x1'));var path=require(_0x8ee4('0x2'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8ee4('0x3'));var querystring=require('querystring');var Redis=require(_0x8ee4('0x4'));var qs=require('../../components/parsers/qs');var logger=require(_0x8ee4('0x5'))('api');var config=require(_0x8ee4('0x6'));var db=require(_0x8ee4('0x7'))['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x8ee4('0x8'),'port':0x18eb});var socket=require(_0x8ee4('0x9'))(new Redis(config[_0x8ee4('0xa')]));require(_0x8ee4('0xb'))['register'](socket);var htmlToText=require(_0x8ee4('0xc'));var jayson=require(_0x8ee4('0xd'));var client=jayson['client'][_0x8ee4('0xe')]({'port':0x232c});var client9002=jayson[_0x8ee4('0xf')][_0x8ee4('0xe')]({'port':0x232a});var client9003=jayson[_0x8ee4('0xf')][_0x8ee4('0xe')]({'port':0x232b});var client9001=jayson[_0x8ee4('0xf')][_0x8ee4('0xe')]({'port':0x2329});function respondWithRpcPromise(_0x2e1070,_0x2f0cfb,_0x4d4876,_0x4fcefb){return new BPromise(function(_0x304ede,_0xdf10af){var _0x2f0d9c=_0x4fcefb||client;return _0x2f0d9c[_0x8ee4('0x10')](_0x2e1070,_0x4d4876)[_0x8ee4('0x11')](function(_0x2ba84c){logger['info'](_0x8ee4('0x12'),_0x2f0cfb,_0x8ee4('0x13'));logger[_0x8ee4('0x14')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x2f0cfb,'request\x20sent',JSON['stringify'](_0x2ba84c));if(_0x2ba84c[_0x8ee4('0x15')]){if(_0x2ba84c[_0x8ee4('0x15')]['code']===0x1f4){logger['error'](_0x8ee4('0x12'),_0x2f0cfb,_0x2ba84c[_0x8ee4('0x15')][_0x8ee4('0x16')]);return _0xdf10af(_0x2ba84c[_0x8ee4('0x15')][_0x8ee4('0x16')]);}logger[_0x8ee4('0x15')](_0x8ee4('0x12'),_0x2f0cfb,_0x2ba84c[_0x8ee4('0x15')][_0x8ee4('0x16')]);return _0x304ede(_0x2ba84c[_0x8ee4('0x15')]['message']);}else{logger['info']('ChatWebsite,\x20%s,\x20%s',_0x2f0cfb,_0x8ee4('0x13'));_0x304ede(_0x2ba84c[_0x8ee4('0x17')][_0x8ee4('0x16')]);}})['catch'](function(_0x1dd938){logger[_0x8ee4('0x15')](_0x8ee4('0x12'),_0x2f0cfb,_0x1dd938);_0xdf10af(_0x1dd938);});});}function respondWithStatusCode(_0x4c5964,_0x5b4042){_0x5b4042=_0x5b4042||0xcc;return function(_0xdcaf91){if(_0xdcaf91){return _0x4c5964[_0x8ee4('0x18')](_0x5b4042);}return _0x4c5964[_0x8ee4('0x19')](_0x5b4042)[_0x8ee4('0x1a')]();};}function respondWithResult(_0x5dce9d,_0x3e4598){_0x3e4598=_0x3e4598||0xc8;return function(_0xaeb63b){if(_0xaeb63b){return _0x5dce9d[_0x8ee4('0x19')](_0x3e4598)[_0x8ee4('0x1b')](_0xaeb63b);}};}function respondWithFilteredResult(_0x1952ea,_0x57910c){return function(_0x327781){if(_0x327781){var _0x137368=typeof _0x57910c[_0x8ee4('0x1c')]==='undefined'&&typeof _0x57910c[_0x8ee4('0x1d')]===_0x8ee4('0x1e');var _0x3bf3ad=_0x327781[_0x8ee4('0x1f')];var _0x13304c=_0x137368?0x0:_0x57910c[_0x8ee4('0x1c')];var _0x14aa72=_0x137368?_0x327781['count']:_0x57910c[_0x8ee4('0x1c')]+_0x57910c[_0x8ee4('0x1d')];var _0x567d4e;if(_0x14aa72>=_0x3bf3ad){_0x14aa72=_0x3bf3ad;_0x567d4e=0xc8;}else{_0x567d4e=0xce;}_0x1952ea['status'](_0x567d4e);return _0x1952ea['set'](_0x8ee4('0x20'),_0x13304c+'-'+_0x14aa72+'/'+_0x3bf3ad)[_0x8ee4('0x1b')](_0x327781);}return null;};}function saveUpdates(_0x47a3aa){return function(_0x50c9ad){if(_0x50c9ad){return _0x50c9ad['update'](_0x47a3aa)[_0x8ee4('0x11')](function(_0x39abf5){return _0x39abf5;});}return null;};}function removeEntity(_0x52a162){return function(_0x47acd6){if(_0x47acd6){return _0x47acd6[_0x8ee4('0x21')]()['then'](function(){var _0x2728f4=_0x47acd6[_0x8ee4('0x22')]({'plain':!![]});var _0x259e84=_0x8ee4('0x23');return db[_0x8ee4('0x24')][_0x8ee4('0x21')]({'where':{'type':_0x259e84,'resourceId':_0x2728f4['id']}})['then'](function(){return _0x47acd6;});})[_0x8ee4('0x11')](function(){_0x52a162[_0x8ee4('0x19')](0xcc)[_0x8ee4('0x1a')]();});}};}function handleEntityNotFound(_0x18e2c6){return function(_0x182774){if(!_0x182774){_0x18e2c6['sendStatus'](0x194);}return _0x182774;};}function handleError(_0x23d712,_0x1d5cf2){_0x1d5cf2=_0x1d5cf2||0x1f4;return function(_0x429c7b){logger['error'](_0x429c7b[_0x8ee4('0x25')]);if(_0x429c7b[_0x8ee4('0x26')]){delete _0x429c7b[_0x8ee4('0x26')];}_0x23d712[_0x8ee4('0x19')](_0x1d5cf2)[_0x8ee4('0x27')](_0x429c7b);};}exports['index']=function(_0x2b21ee,_0x1c2f03){var _0x33e869={'include':[{'model':db[_0x8ee4('0x28')],'as':_0x8ee4('0x29')}]},_0x1b4f0d={},_0xc07607={'count':0x0,'rows':[]};var _0x4b1173=_[_0x8ee4('0x2a')](db[_0x8ee4('0x2b')][_0x8ee4('0x2c')],function(_0x227890){return{'name':_0x227890['fieldName'],'type':_0x227890[_0x8ee4('0x2d')][_0x8ee4('0x2e')]};});_0x1b4f0d[_0x8ee4('0x2f')]=_[_0x8ee4('0x2a')](_0x4b1173,_0x8ee4('0x26'));_0x1b4f0d[_0x8ee4('0x30')]=_[_0x8ee4('0x31')](_0x2b21ee[_0x8ee4('0x30')]);_0x1b4f0d[_0x8ee4('0x32')]=_['intersection'](_0x1b4f0d['model'],_0x1b4f0d[_0x8ee4('0x30')]);_0x33e869['attributes']=_[_0x8ee4('0x33')](_0x1b4f0d[_0x8ee4('0x2f')],qs[_0x8ee4('0x34')](_0x2b21ee[_0x8ee4('0x30')]['fields']));_0x33e869[_0x8ee4('0x35')]=_0x33e869[_0x8ee4('0x35')][_0x8ee4('0x36')]?_0x33e869[_0x8ee4('0x35')]:_0x1b4f0d[_0x8ee4('0x2f')];if(!_0x2b21ee[_0x8ee4('0x30')][_0x8ee4('0x37')](_0x8ee4('0x38'))){_0x33e869[_0x8ee4('0x1d')]=qs[_0x8ee4('0x1d')](_0x2b21ee[_0x8ee4('0x30')][_0x8ee4('0x1d')]);_0x33e869[_0x8ee4('0x1c')]=qs[_0x8ee4('0x1c')](_0x2b21ee[_0x8ee4('0x30')][_0x8ee4('0x1c')]);}_0x33e869[_0x8ee4('0x39')]=qs[_0x8ee4('0x3a')](_0x2b21ee[_0x8ee4('0x30')][_0x8ee4('0x3a')]);_0x33e869[_0x8ee4('0x3b')]=qs[_0x8ee4('0x32')](_[_0x8ee4('0x3c')](_0x2b21ee[_0x8ee4('0x30')],_0x1b4f0d[_0x8ee4('0x32')]),_0x4b1173);if(_0x2b21ee[_0x8ee4('0x30')][_0x8ee4('0x3d')]){_0x33e869[_0x8ee4('0x3b')]=_[_0x8ee4('0x3e')](_0x33e869[_0x8ee4('0x3b')],{'$or':_[_0x8ee4('0x2a')](_0x4b1173,function(_0x2837db){if(_0x2837db['type']!=='VIRTUAL'){var _0x188515={};_0x188515[_0x2837db[_0x8ee4('0x26')]]={'$like':'%'+_0x2b21ee[_0x8ee4('0x30')][_0x8ee4('0x3d')]+'%'};return _0x188515;}})});}_0x33e869=_[_0x8ee4('0x3e')]({},_0x33e869,_0x2b21ee[_0x8ee4('0x3f')]);var _0x597923={'where':_0x33e869[_0x8ee4('0x3b')]};return db[_0x8ee4('0x2b')]['count'](_0x597923)[_0x8ee4('0x11')](function(_0x3d24fe){_0xc07607[_0x8ee4('0x1f')]=_0x3d24fe;if(_0x2b21ee['query'][_0x8ee4('0x40')]){_0x33e869[_0x8ee4('0x41')]=[{'all':!![]}];}return db[_0x8ee4('0x2b')]['findAll'](_0x33e869);})[_0x8ee4('0x11')](function(_0x44a4d7){_0xc07607[_0x8ee4('0x42')]=_0x44a4d7;return _0xc07607;})[_0x8ee4('0x11')](respondWithFilteredResult(_0x1c2f03,_0x33e869))[_0x8ee4('0x43')](handleError(_0x1c2f03,null));};exports['show']=function(_0x39ae4d,_0x5dd3a3){var _0x15bbb3={'raw':![],'where':{'id':_0x39ae4d[_0x8ee4('0x44')]['id']},'include':[{'model':db[_0x8ee4('0x28')],'as':_0x8ee4('0x29')}]},_0x1632f4={};_0x1632f4[_0x8ee4('0x2f')]=_[_0x8ee4('0x31')](db[_0x8ee4('0x2b')][_0x8ee4('0x2c')]);_0x1632f4[_0x8ee4('0x30')]=_[_0x8ee4('0x31')](_0x39ae4d[_0x8ee4('0x30')]);_0x1632f4[_0x8ee4('0x32')]=_['intersection'](_0x1632f4[_0x8ee4('0x2f')],_0x1632f4[_0x8ee4('0x30')]);_0x15bbb3[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0x1632f4[_0x8ee4('0x2f')],qs[_0x8ee4('0x34')](_0x39ae4d['query'][_0x8ee4('0x34')]));_0x15bbb3[_0x8ee4('0x35')]=_0x15bbb3[_0x8ee4('0x35')][_0x8ee4('0x36')]?_0x15bbb3[_0x8ee4('0x35')]:_0x1632f4[_0x8ee4('0x2f')];if(_0x39ae4d[_0x8ee4('0x30')][_0x8ee4('0x40')]){_0x15bbb3['include']=[{'all':!![]}];}_0x15bbb3=_[_0x8ee4('0x3e')]({},_0x15bbb3,_0x39ae4d[_0x8ee4('0x3f')]);return db[_0x8ee4('0x2b')][_0x8ee4('0x45')](_0x15bbb3)[_0x8ee4('0x11')](handleEntityNotFound(_0x5dd3a3,null))['then'](respondWithResult(_0x5dd3a3,null))[_0x8ee4('0x43')](handleError(_0x5dd3a3,null));};exports[_0x8ee4('0x46')]=function(_0x1ac8a7,_0x1ce543){return db['ChatWebsite'][_0x8ee4('0x46')](_0x1ac8a7['body'],{})['then'](function(_0x28024c){var _0x49eb69=_0x1ac8a7[_0x8ee4('0x47')]['get']({'plain':!![]});if(!_0x49eb69)throw new Error(_0x8ee4('0x48'));if(_0x49eb69[_0x8ee4('0x49')]===_0x8ee4('0x47')){var _0x4311f9=_0x28024c['get']({'plain':!![]});var _0x12608c=_0x8ee4('0x23');return db[_0x8ee4('0x4a')][_0x8ee4('0x45')]({'where':{'name':_0x12608c,'userProfileId':_0x49eb69[_0x8ee4('0x4b')]},'raw':!![]})[_0x8ee4('0x11')](function(_0x413057){if(_0x413057&&_0x413057[_0x8ee4('0x4c')]===0x0){return db[_0x8ee4('0x24')][_0x8ee4('0x46')]({'name':_0x4311f9[_0x8ee4('0x26')],'resourceId':_0x4311f9['id'],'type':_0x413057[_0x8ee4('0x26')],'sectionId':_0x413057['id']},{})[_0x8ee4('0x11')](function(){return _0x28024c;});}else{return _0x28024c;}})[_0x8ee4('0x43')](function(_0x7d27b1){logger['error'](_0x8ee4('0x4d'),_0x7d27b1);throw _0x7d27b1;});}return _0x28024c;})[_0x8ee4('0x11')](respondWithResult(_0x1ce543,0xc9))[_0x8ee4('0x43')](handleError(_0x1ce543,null));};exports['update']=function(_0x329a15,_0x9b14fe){if(_0x329a15[_0x8ee4('0x4e')]['id']){delete _0x329a15[_0x8ee4('0x4e')]['id'];}return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x329a15[_0x8ee4('0x44')]['id']},'include':[{'model':db[_0x8ee4('0x28')],'as':_0x8ee4('0x29')}]})['then'](handleEntityNotFound(_0x9b14fe,null))[_0x8ee4('0x11')](saveUpdates(_0x329a15[_0x8ee4('0x4e')],null))[_0x8ee4('0x11')](respondWithResult(_0x9b14fe,null))['catch'](handleError(_0x9b14fe,null));};exports[_0x8ee4('0x21')]=function(_0x4ad609,_0x240dfc){return db[_0x8ee4('0x2b')]['find']({'where':{'id':_0x4ad609['params']['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x240dfc,null))['then'](removeEntity(_0x240dfc,null))[_0x8ee4('0x43')](handleError(_0x240dfc,null));};exports[_0x8ee4('0x4f')]=function(_0x152451,_0x2fbc41){return db[_0x8ee4('0x2b')]['describe']()['then'](respondWithResult(_0x2fbc41,null))['catch'](handleError(_0x2fbc41,null));};exports[_0x8ee4('0x50')]=function(_0x17175a,_0x1aa862){if(_0x17175a[_0x8ee4('0x4e')]['id']){delete _0x17175a[_0x8ee4('0x4e')]['id'];}return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x17175a[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x1aa862,null))['then'](function(_0x138444){if(_0x138444){_0x17175a[_0x8ee4('0x4e')][_0x8ee4('0x51')]=_0x138444['id'];return db[_0x8ee4('0x52')][_0x8ee4('0x46')](_0x17175a[_0x8ee4('0x4e')]);}})[_0x8ee4('0x11')](respondWithResult(_0x1aa862,null))[_0x8ee4('0x43')](handleError(_0x1aa862,null));};exports['getDispositions']=function(_0x5e12f2,_0x12361d){var _0x5e73a4={'raw':![],'where':{}};var _0x45200e={};var _0x31932f={'count':0x0,'rows':[]};return db[_0x8ee4('0x2b')][_0x8ee4('0x53')]({'where':{'id':_0x5e12f2[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x12361d,null))[_0x8ee4('0x11')](function(_0x5685e5){if(_0x5685e5){_0x45200e[_0x8ee4('0x2f')]=_['keys'](db['Disposition'][_0x8ee4('0x2c')]);_0x45200e[_0x8ee4('0x30')]=_[_0x8ee4('0x31')](_0x5e12f2['query']);_0x45200e[_0x8ee4('0x32')]=_['intersection'](_0x45200e[_0x8ee4('0x2f')],_0x45200e[_0x8ee4('0x30')]);_0x5e73a4[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0x45200e['model'],qs[_0x8ee4('0x34')](_0x5e12f2['query'][_0x8ee4('0x34')]));_0x5e73a4['attributes']=_0x5e73a4[_0x8ee4('0x35')][_0x8ee4('0x36')]?_0x5e73a4[_0x8ee4('0x35')]:_0x45200e[_0x8ee4('0x2f')];if(!_0x5e12f2[_0x8ee4('0x30')]['hasOwnProperty']('nolimit')){_0x5e73a4[_0x8ee4('0x1d')]=qs[_0x8ee4('0x1d')](_0x5e12f2[_0x8ee4('0x30')][_0x8ee4('0x1d')]);_0x5e73a4[_0x8ee4('0x1c')]=qs[_0x8ee4('0x1c')](_0x5e12f2['query'][_0x8ee4('0x1c')]);}_0x5e73a4[_0x8ee4('0x39')]=qs['sort'](_0x5e12f2['query'][_0x8ee4('0x3a')]);_0x5e73a4[_0x8ee4('0x3b')]=qs['filters'](_['pick'](_0x5e12f2[_0x8ee4('0x30')],_0x45200e['filters']));_0x5e73a4['where'][_0x8ee4('0x51')]=_0x5685e5['id'];if(_0x5e12f2[_0x8ee4('0x30')][_0x8ee4('0x3d')]){_0x5e73a4['where']=_[_0x8ee4('0x3e')](_0x5e73a4[_0x8ee4('0x3b')],{'$or':_[_0x8ee4('0x2a')](_0x5e73a4['attributes'],function(_0x1723e9){var _0x3d8992={};_0x3d8992[_0x1723e9]={'$like':'%'+_0x5e12f2[_0x8ee4('0x30')]['filter']+'%'};return _0x3d8992;})});}_0x5e73a4=_[_0x8ee4('0x3e')]({},_0x5e73a4,_0x5e12f2[_0x8ee4('0x3f')]);return db[_0x8ee4('0x52')][_0x8ee4('0x1f')]({'where':_0x5e73a4[_0x8ee4('0x3b')]})['then'](function(_0x431a65){_0x31932f['count']=_0x431a65;if(_0x5e12f2[_0x8ee4('0x30')][_0x8ee4('0x40')]){_0x5e73a4['include']=[{'all':!![]}];}return db['Disposition']['findAll'](_0x5e73a4);})[_0x8ee4('0x11')](function(_0x2a663c){_0x31932f['rows']=_0x2a663c;return _0x31932f;});}})[_0x8ee4('0x11')](respondWithFilteredResult(_0x12361d,_0x5e73a4))[_0x8ee4('0x43')](handleError(_0x12361d,null));};exports['removeDispositions']=function(_0x3751f8,_0xf98d1d){return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x3751f8[_0x8ee4('0x44')]['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0xf98d1d,null))[_0x8ee4('0x11')](function(_0x3c4e53){if(_0x3c4e53){return _0x3c4e53[_0x8ee4('0x54')](_0x3751f8[_0x8ee4('0x30')][_0x8ee4('0x55')]);}})[_0x8ee4('0x11')](respondWithStatusCode(_0xf98d1d,null))[_0x8ee4('0x43')](handleError(_0xf98d1d,null));};exports[_0x8ee4('0x56')]=function(_0x3e7872,_0x502d1b){if(_0x3e7872[_0x8ee4('0x4e')]['id']){delete _0x3e7872[_0x8ee4('0x4e')]['id'];}return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x3e7872[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x502d1b,null))[_0x8ee4('0x11')](function(_0x2e2c95){if(_0x2e2c95){_0x3e7872['body']['ChatWebsiteId']=_0x2e2c95['id'];return db['CannedAnswer'][_0x8ee4('0x46')](_0x3e7872[_0x8ee4('0x4e')]);}})['then'](respondWithResult(_0x502d1b,null))[_0x8ee4('0x43')](handleError(_0x502d1b,null));};exports[_0x8ee4('0x57')]=function(_0x156957,_0xf21684){var _0x1dba19={'raw':![],'where':{}};var _0xdaae87={};var _0x5c37d9={'count':0x0,'rows':[]};return db[_0x8ee4('0x2b')]['findOne']({'where':{'id':_0x156957['params']['id']}})['then'](handleEntityNotFound(_0xf21684,null))['then'](function(_0x258f15){if(_0x258f15){_0xdaae87[_0x8ee4('0x2f')]=_[_0x8ee4('0x31')](db[_0x8ee4('0x58')][_0x8ee4('0x2c')]);_0xdaae87[_0x8ee4('0x30')]=_[_0x8ee4('0x31')](_0x156957[_0x8ee4('0x30')]);_0xdaae87[_0x8ee4('0x32')]=_['intersection'](_0xdaae87[_0x8ee4('0x2f')],_0xdaae87[_0x8ee4('0x30')]);_0x1dba19[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0xdaae87['model'],qs[_0x8ee4('0x34')](_0x156957[_0x8ee4('0x30')]['fields']));_0x1dba19[_0x8ee4('0x35')]=_0x1dba19['attributes'][_0x8ee4('0x36')]?_0x1dba19[_0x8ee4('0x35')]:_0xdaae87[_0x8ee4('0x2f')];if(!_0x156957[_0x8ee4('0x30')][_0x8ee4('0x37')]('nolimit')){_0x1dba19[_0x8ee4('0x1d')]=qs[_0x8ee4('0x1d')](_0x156957[_0x8ee4('0x30')]['limit']);_0x1dba19[_0x8ee4('0x1c')]=qs['offset'](_0x156957['query'][_0x8ee4('0x1c')]);}_0x1dba19[_0x8ee4('0x39')]=qs[_0x8ee4('0x3a')](_0x156957[_0x8ee4('0x30')][_0x8ee4('0x3a')]);_0x1dba19[_0x8ee4('0x3b')]=qs[_0x8ee4('0x32')](_[_0x8ee4('0x3c')](_0x156957[_0x8ee4('0x30')],_0xdaae87['filters']));_0x1dba19[_0x8ee4('0x3b')][_0x8ee4('0x51')]=_0x258f15['id'];if(_0x156957[_0x8ee4('0x30')][_0x8ee4('0x3d')]){_0x1dba19[_0x8ee4('0x3b')]=_[_0x8ee4('0x3e')](_0x1dba19['where'],{'$or':_[_0x8ee4('0x2a')](_0x1dba19[_0x8ee4('0x35')],function(_0x5efc17){var _0x4f156d={};_0x4f156d[_0x5efc17]={'$like':'%'+_0x156957[_0x8ee4('0x30')][_0x8ee4('0x3d')]+'%'};return _0x4f156d;})});}_0x1dba19=_['merge']({},_0x1dba19,_0x156957[_0x8ee4('0x3f')]);return db[_0x8ee4('0x58')][_0x8ee4('0x1f')]({'where':_0x1dba19[_0x8ee4('0x3b')]})[_0x8ee4('0x11')](function(_0x5c9e09){_0x5c37d9['count']=_0x5c9e09;if(_0x156957[_0x8ee4('0x30')][_0x8ee4('0x40')]){_0x1dba19['include']=[{'all':!![]}];}return db['CannedAnswer'][_0x8ee4('0x59')](_0x1dba19);})['then'](function(_0xda907d){_0x5c37d9[_0x8ee4('0x42')]=_0xda907d;return _0x5c37d9;});}})['then'](respondWithFilteredResult(_0xf21684,_0x1dba19))[_0x8ee4('0x43')](handleError(_0xf21684,null));};exports[_0x8ee4('0x5a')]=function(_0x1d7eb2,_0x5f565e){return db[_0x8ee4('0x2b')]['find']({'where':{'id':_0x1d7eb2['params']['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x5f565e,null))['then'](function(_0x4df52f){if(_0x4df52f){return _0x4df52f[_0x8ee4('0x5a')](_0x1d7eb2[_0x8ee4('0x30')]['ids']);}})[_0x8ee4('0x11')](respondWithStatusCode(_0x5f565e,null))[_0x8ee4('0x43')](handleError(_0x5f565e,null));};exports[_0x8ee4('0x5b')]=function(_0x4355e5,_0x4c1f15){_0x4355e5['body'][_0x8ee4('0x5c')]=_0x4355e5[_0x8ee4('0x5d')][_0x8ee4('0x5e')];return db['ChatWebsite'][_0x8ee4('0x45')]({'where':{'id':_0x4355e5[_0x8ee4('0x44')]['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x4c1f15,null))[_0x8ee4('0x11')](saveUpdates(_0x4355e5['body'],null))[_0x8ee4('0x11')](respondWithResult(_0x4c1f15,null))[_0x8ee4('0x43')](handleError(_0x4c1f15,null));};exports[_0x8ee4('0x5f')]=function(_0x1a4395,_0x5ca2b1){_0x1a4395[_0x8ee4('0x4e')]['agentAvatar']=_0x1a4395['file'][_0x8ee4('0x5e')];return db[_0x8ee4('0x2b')]['find']({'where':{'id':_0x1a4395['params']['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x5ca2b1,null))['then'](saveUpdates(_0x1a4395[_0x8ee4('0x4e')],null))[_0x8ee4('0x11')](respondWithResult(_0x5ca2b1,null))[_0x8ee4('0x43')](handleError(_0x5ca2b1,null));};exports[_0x8ee4('0x60')]=function(_0x5842ec,_0x160302){_0x5842ec['body'][_0x8ee4('0x61')]=_0x5842ec[_0x8ee4('0x5d')][_0x8ee4('0x5e')];return db[_0x8ee4('0x2b')]['find']({'where':{'id':_0x5842ec[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x160302,null))[_0x8ee4('0x11')](saveUpdates(_0x5842ec[_0x8ee4('0x4e')],null))[_0x8ee4('0x11')](respondWithResult(_0x160302,null))[_0x8ee4('0x43')](handleError(_0x160302,null));};exports[_0x8ee4('0x62')]=function(_0x2138f2,_0x2be1db){_0x2138f2[_0x8ee4('0x4e')][_0x8ee4('0x63')]=_0x2138f2[_0x8ee4('0x5d')][_0x8ee4('0x5e')];return db[_0x8ee4('0x2b')]['find']({'where':{'id':_0x2138f2['params']['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x2be1db,null))[_0x8ee4('0x11')](saveUpdates(_0x2138f2['body'],null))['then'](respondWithResult(_0x2be1db,null))[_0x8ee4('0x43')](handleError(_0x2be1db,null));};exports[_0x8ee4('0x64')]=function(_0x4c361b,_0x3c155c){var _0x1c6ec7=path['join'](config[_0x8ee4('0x65')],_0x8ee4('0x66'));var _0xfe036f={'where':{'id':_0x4c361b[_0x8ee4('0x44')]['id']},'attributes':['id',_0x8ee4('0x5c')],'raw':!![]};var _0x161e8e=![];return require(_0x8ee4('0x67'))[_0x8ee4('0x68')]()['then'](function(_0x598cf9){if(_0x598cf9){_0x161e8e=_0x598cf9[_0x8ee4('0x69')];}})[_0x8ee4('0x11')](function(){return db[_0x8ee4('0x2b')][_0x8ee4('0x45')](_0xfe036f);})[_0x8ee4('0x11')](handleEntityNotFound(_0x3c155c,null))[_0x8ee4('0x11')](function(_0x47e59d){if(_0x47e59d){if(!_[_0x8ee4('0x6a')](_0x47e59d['sitepic'])){if(fs[_0x8ee4('0x6b')](path[_0x8ee4('0x6c')](config['root'],_0x8ee4('0x6d'),_0x47e59d[_0x8ee4('0x5c')]))&&_0x161e8e){_0x1c6ec7=path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x6d'),_0x47e59d[_0x8ee4('0x5c')]);}}return _0x3c155c['download'](_0x1c6ec7);}})[_0x8ee4('0x43')](handleError(_0x3c155c,null));};exports['getAvatar']=function(_0x385fbd,_0x4ef750){var _0x48a320=path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x6e'));var _0xc5bf2b={'where':{'id':_0x385fbd[_0x8ee4('0x44')]['id']},'attributes':['id','agentAvatar'],'raw':!![]};return db[_0x8ee4('0x2b')][_0x8ee4('0x45')](_0xc5bf2b)[_0x8ee4('0x11')](handleEntityNotFound(_0x4ef750,null))['then'](function(_0x34bb56){if(_0x34bb56){if(!_[_0x8ee4('0x6a')](_0x34bb56[_0x8ee4('0x6f')])){if(fs['existsSync'](path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x70'),_0x34bb56['agentAvatar']))){_0x48a320=path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x70'),_0x34bb56[_0x8ee4('0x6f')]);}}return _0x4ef750[_0x8ee4('0x71')](_0x48a320);}})[_0x8ee4('0x43')](handleError(_0x4ef750,null));};exports[_0x8ee4('0x72')]=function(_0x25af3f,_0x30c7b8){var _0x365b5d=path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x73'));var _0x43181d={'where':{'id':_0x25af3f[_0x8ee4('0x44')]['id']},'attributes':['id',_0x8ee4('0x61'),_0x8ee4('0x74')],'raw':!![]};return db[_0x8ee4('0x2b')][_0x8ee4('0x45')](_0x43181d)[_0x8ee4('0x11')](handleEntityNotFound(_0x30c7b8,null))[_0x8ee4('0x11')](function(_0x3dcbac){if(_0x3dcbac){if(!_[_0x8ee4('0x6a')](_0x3dcbac[_0x8ee4('0x61')])){if(fs['existsSync'](path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x70'),_0x3dcbac[_0x8ee4('0x61')]))&&_0x3dcbac[_0x8ee4('0x74')]){_0x365b5d=path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],'server/files/images/avatars/',_0x3dcbac[_0x8ee4('0x61')]);}}return _0x30c7b8[_0x8ee4('0x71')](_0x365b5d);}})[_0x8ee4('0x43')](handleError(_0x30c7b8,null));};exports[_0x8ee4('0x75')]=function(_0x10f08a,_0x249295){var _0x4fee8e=path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],'server/files/images/avatars/system_avatar.png');var _0xea23d4={'where':{'id':_0x10f08a[_0x8ee4('0x44')]['id']},'attributes':['id',_0x8ee4('0x63')],'raw':!![]};return db['ChatWebsite'][_0x8ee4('0x45')](_0xea23d4)['then'](handleEntityNotFound(_0x249295,null))[_0x8ee4('0x11')](function(_0x49eee5){if(_0x49eee5){if(!_[_0x8ee4('0x6a')](_0x49eee5['systemAvatar'])){if(fs['existsSync'](path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x70'),_0x49eee5['systemAvatar']))){_0x4fee8e=path[_0x8ee4('0x6c')](config['root'],'server/files/images/avatars/',_0x49eee5['systemAvatar']);}}return _0x249295['download'](_0x4fee8e);}})[_0x8ee4('0x43')](handleError(_0x249295,null));};exports['notify']=function(_0x33ea0a,_0x4176a2){var _0x4772d7=require(_0x8ee4('0x76'));var _0x394d65=new _0x4772d7();var _0x3c979c=_0x394d65[_0x8ee4('0x77')](_0x33ea0a[_0x8ee4('0x78')][_0x8ee4('0x79')])['getResult']();var _0x3de76f={'body':_0x33ea0a[_0x8ee4('0x4e')],'channel':_0x8ee4('0x7a')};var _0x339c9a=[];var _0x3ccb03=[];var _0x6eaa4c={};var _0x64c178=![];return db[_0x8ee4('0x7b')]['describe']()['then'](function(_0x2bc992){if(!_0x2bc992){throw new db[(_0x8ee4('0x7c'))][(_0x8ee4('0x7d'))](_0x8ee4('0x7e'));}_0x339c9a=_[_0x8ee4('0x7f')](_['keys'](_0x2bc992),[_0x8ee4('0x80'),_0x8ee4('0x81')]);_0x3ccb03=_[_0x8ee4('0x7f')](_[_0x8ee4('0x31')](_0x2bc992),[_0x8ee4('0x80'),_0x8ee4('0x81'),'CompanyId',_0x8ee4('0x82')]);if(_0x33ea0a[_0x8ee4('0x4e')]['id']){delete _0x33ea0a[_0x8ee4('0x4e')]['id'];}if(_[_0x8ee4('0x6a')](_0x33ea0a['body'][_0x8ee4('0x83')])){throw new db[(_0x8ee4('0x7c'))][(_0x8ee4('0x7d'))](_0x8ee4('0x84'));}if(_[_0x8ee4('0x6a')](_0x33ea0a['body'][_0x8ee4('0x4e')])||_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x4e')]===''){throw new db[(_0x8ee4('0x7c'))]['ValidationError'](_0x8ee4('0x85'));}if(_['isNil'](_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x86')])){throw new db['Sequelize']['ValidationError'](_0x8ee4('0x87')+_0x3ccb03);}if(!_[_0x8ee4('0x88')](_0x3ccb03,_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x86')])){throw new db[(_0x8ee4('0x7c'))]['ValidationError'](_0x8ee4('0x89')+_0x3ccb03);}_0x6eaa4c[_0x33ea0a['body'][_0x8ee4('0x86')]]=_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x83')];})[_0x8ee4('0x11')](function(){return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x33ea0a['params']['id']},'include':[{'model':db[_0x8ee4('0x8a')],'as':'List','include':[{'model':db[_0x8ee4('0x7b')],'as':_0x8ee4('0x8b'),'where':_0x6eaa4c,'limit':0x1,'order':[[_0x8ee4('0x81'),_0x8ee4('0x8c')]]}]},{'model':db[_0x8ee4('0x8d')],'as':_0x8ee4('0x8e')}]});})['then'](handleEntityNotFound(_0x4176a2,null))[_0x8ee4('0x11')](function(_0x579263){if(_0x579263&&_0x579263[_0x8ee4('0x8f')]){_0x3de76f[_0x8ee4('0x90')]=_0x579263;_0x3de76f[_0x8ee4('0x91')]=_0x579263[_0x8ee4('0x8e')];_0x3de76f[_0x8ee4('0x92')]=_0x579263[_0x8ee4('0x8f')];_0x3de76f['applications']=_[_0x8ee4('0x93')](_0x3de76f['applications'],['priority'],['asc']);if(_0x3de76f['account'][_0x8ee4('0x8e')]){delete _0x3de76f[_0x8ee4('0x90')][_0x8ee4('0x8e')];}if(_0x3de76f[_0x8ee4('0x90')][_0x8ee4('0x8f')]&&_0x3de76f[_0x8ee4('0x90')]['List'][_0x8ee4('0x8b')][_0x8ee4('0x36')]){return _0x3de76f[_0x8ee4('0x90')][_0x8ee4('0x8f')][_0x8ee4('0x8b')][0x0];}var _0x438824=_['defaults'](_0x33ea0a[_0x8ee4('0x4e')],{'firstName':_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x83')],'ListId':_0x579263[_0x8ee4('0x82')]});_0x438824[_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x86')]]=_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x83')];return db['CmContact'][_0x8ee4('0x46')](_0x438824,{'fields':_0x339c9a,'raw':!![]});}})[_0x8ee4('0x11')](handleEntityNotFound(_0x4176a2,null))[_0x8ee4('0x11')](function(_0x1d0cac){_0x3de76f['contact']=_0x1d0cac;var _0x5ba901=_0x33ea0a['body'][_0x8ee4('0x94')];if(_0x33ea0a[_0x8ee4('0x78')][_0x8ee4('0x95')]){_0x5ba901=_0x33ea0a[_0x8ee4('0x78')][_0x8ee4('0x95')];}else if(_0x33ea0a[_0x8ee4('0x78')]['x-forwarded-for']){_0x5ba901=_[_0x8ee4('0x96')](_0x33ea0a[_0x8ee4('0x78')][_0x8ee4('0x97')]['split'](','));}if(_0x1d0cac){var _0x32751a={'ContactId':_0x1d0cac['id'],'ChatWebsiteId':_0x33ea0a['params']['id'],'from':(_0x1d0cac[_0x8ee4('0x98')]||'')+'\x20'+(_0x1d0cac['lastName']||''),'customerIp':_0x5ba901,'customerPort':_0x33ea0a[_0x8ee4('0x78')]['x-real-port']?_0x33ea0a[_0x8ee4('0x78')][_0x8ee4('0x99')]:null,'referer':_0x33ea0a['body']['referer'],'browserName':_0x3c979c['browser'][_0x8ee4('0x26')]&&_0x3c979c[_0x8ee4('0x9a')][_0x8ee4('0x9b')]?util['format'](_0x8ee4('0x9c'),_0x3c979c['browser'][_0x8ee4('0x26')],_0x3c979c[_0x8ee4('0x9a')][_0x8ee4('0x9b')]):_0x8ee4('0x9d'),'browserVersion':_0x3c979c[_0x8ee4('0x9a')][_0x8ee4('0x9b')]||_0x8ee4('0x9d'),'osName':util['format'](_0x8ee4('0x9c'),_0x3c979c['os'][_0x8ee4('0x26')],_0x3c979c['os'][_0x8ee4('0x9b')]),'osVersion':_0x3c979c['os'][_0x8ee4('0x9b')],'deviceModel':_0x3c979c[_0x8ee4('0x9e')][_0x8ee4('0x2f')]&&_0x3c979c['device'][_0x8ee4('0x9f')]?util[_0x8ee4('0xa0')](_0x8ee4('0xa1'),_0x3c979c[_0x8ee4('0x9e')][_0x8ee4('0x2f')],_0x3c979c['device']['vendor'],_0x3c979c[_0x8ee4('0x9e')][_0x8ee4('0x2d')]):null,'deviceVendor':_0x3c979c[_0x8ee4('0x9e')][_0x8ee4('0x9f')],'deviceType':_0x3c979c[_0x8ee4('0x9e')][_0x8ee4('0x2d')],'formData':JSON['stringify'](_0x33ea0a[_0x8ee4('0x4e')])};var _0x1104c5={'ChatWebsiteId':_0x33ea0a[_0x8ee4('0x44')]['id'],'closed':![]};if(_0x33ea0a[_0x8ee4('0x4e')]['threadId']){_0x1104c5[_0x8ee4('0xa2')]=_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0xa2')];return db['ChatInteraction']['find']({'where':_0x1104c5})[_0x8ee4('0x11')](function(_0x3044af){if(_0x3044af){return[_0x3044af,![]];}_0x32751a[_0x8ee4('0xa2')]=_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0xa2')];_0x32751a[_0x8ee4('0xa3')]=_0x33ea0a[_0x8ee4('0x4e')]['externalUrl'];return db[_0x8ee4('0xa4')][_0x8ee4('0x46')](_0x32751a)[_0x8ee4('0x11')](function(_0x518a2c){return[_0x518a2c,!![]];});});}_0x1104c5[_0x8ee4('0xa5')]=_0x1d0cac['id'];if(_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0xa6')]&&_0x33ea0a['body']['interaction']['id']){_0x1104c5['id']=_0x33ea0a['body']['interaction']['id'];return db[_0x8ee4('0xa4')][_0x8ee4('0x45')]({'where':_0x1104c5})[_0x8ee4('0x11')](function(_0x5ea975){if(_0x5ea975){return[_0x5ea975,![]];}return db[_0x8ee4('0xa4')][_0x8ee4('0x46')](_0x32751a)[_0x8ee4('0x11')](function(_0x385fe1){return[_0x385fe1,!![]];});});}return db[_0x8ee4('0xa4')][_0x8ee4('0x46')](_0x32751a)[_0x8ee4('0x11')](function(_0x4ac963){return[_0x4ac963,!![]];});}})[_0x8ee4('0xa7')](function(_0x2180b2,_0x5ae721){if(_0x2180b2){_0x64c178=_0x5ae721;if(!_0x5ae721){var _0x53f8ce={'from':(_0x3de76f[_0x8ee4('0xa8')][_0x8ee4('0x98')]||'')+'\x20'+(_0x3de76f['contact'][_0x8ee4('0xa9')]||'')};if(_0x33ea0a[_0x8ee4('0x4e')]['threadId']&&_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0xaa')]&&_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0xa2')]!=_0x33ea0a[_0x8ee4('0x4e')]['messageId']){_0x53f8ce[_0x8ee4('0xa2')]=_0x33ea0a[_0x8ee4('0x4e')]['messageId'];}return _0x2180b2[_0x8ee4('0xab')](_0x53f8ce);}else{return _0x2180b2;}}})[_0x8ee4('0x11')](function(_0x502a56){_0x3de76f[_0x8ee4('0xa6')]=_0x502a56[_0x8ee4('0x22')]({'plain':!![]});_0x3de76f['interaction']['created']=_0x64c178;if(_0x3de76f[_0x8ee4('0xa6')]['created']){if(_0x3de76f['account'][_0x8ee4('0xac')]){_0x3de76f['applications'][_0x8ee4('0xad')]({'id':0x0,'priority':_0x3de76f[_0x8ee4('0x91')][_0x8ee4('0x36')]+0x1,'app':_0x8ee4('0xae'),'appdata':_0x8ee4('0xaf'),'interval':_0x8ee4('0xb0')});}}return db[_0x8ee4('0xb1')][_0x8ee4('0x46')]({'body':_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0x4e')],'ChatWebsiteId':_0x33ea0a[_0x8ee4('0x44')]['id'],'ChatInteractionId':_0x502a56['id'],'direction':'in','ContactId':_0x3de76f['contact']['id'],'AttachmentId':_0x33ea0a[_0x8ee4('0x4e')][_0x8ee4('0xb2')]});})[_0x8ee4('0x11')](function(_0x3aca1e){_0x3de76f[_0x8ee4('0x16')]=_0x3aca1e;if(_0x3de76f[_0x8ee4('0xa6')][_0x8ee4('0xb3')]){return db[_0x8ee4('0xb4')][_0x8ee4('0x45')]({'attributes':['id',_0x8ee4('0x26')],'where':{'id':_0x3de76f['interaction']['UserId']}})[_0x8ee4('0x11')](function(_0x5008be){if(_0x5008be){_0x3de76f[_0x8ee4('0x91')][_0x8ee4('0xb5')]({'id':0x0,'priority':0x0,'app':_0x8ee4('0xb6'),'appdata':_0x5008be[_0x8ee4('0x26')]+','+(_0x3de76f[_0x8ee4('0x90')]['waitForTheAssignedAgent']||0xa),'interval':_0x8ee4('0xb0')});_0x3de76f[_0x8ee4('0xb7')]=!![];}return respondWithRpcPromise(_0x8ee4('0xb8'),_0x8ee4('0xb9'),_0x3de76f);});}return respondWithRpcPromise('Start','startRouting',_0x3de76f);})[_0x8ee4('0x11')](function(_0x133403){respondWithRpcPromise(_0x8ee4('0xba'),_0x8ee4('0xba'),{'event':_0x8ee4('0xbb'),'message':_0x133403},client9002);return _0x133403;})[_0x8ee4('0x11')](respondWithResult(_0x4176a2,null))[_0x8ee4('0x43')](handleError(_0x4176a2,null));};exports[_0x8ee4('0xbc')]=function(_0x3f1999,_0x586bc6){var _0x4d856b,_0x52a32c,_0x2d0f75;var _0x50c6ed=[];var _0x27537b={};var _0x502f5c=_0x3f1999['files']||[];var _0x4fa2d6=[];var _0x489d77;return db[_0x8ee4('0x7b')]['describe']()[_0x8ee4('0x11')](function(_0x1cabc8){if(!_0x1cabc8){throw new db[(_0x8ee4('0x7c'))][(_0x8ee4('0x7d'))](_0x8ee4('0x7e'));}_0x50c6ed=_[_0x8ee4('0x7f')](_[_0x8ee4('0x31')](_0x1cabc8),['createdAt',_0x8ee4('0x81'),_0x8ee4('0xbd'),_0x8ee4('0x82')]);if(_0x3f1999[_0x8ee4('0x4e')]['id']){delete _0x3f1999[_0x8ee4('0x4e')]['id'];}if(_[_0x8ee4('0x6a')](_0x3f1999['body'][_0x8ee4('0x83')])){throw _0x586bc6[_0x8ee4('0x19')](0x1f4)[_0x8ee4('0x27')](new db[(_0x8ee4('0x7c'))][(_0x8ee4('0x7d'))](_0x8ee4('0x84')));}if(_[_0x8ee4('0x6a')](_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0x4e')])||_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0x4e')]===''){throw _0x586bc6[_0x8ee4('0x19')](0x1f4)[_0x8ee4('0x27')](new db['Sequelize'][(_0x8ee4('0x7d'))](_0x8ee4('0x85')));}if(_['isNil'](_0x3f1999['body'][_0x8ee4('0xbe')])){throw _0x586bc6['status'](0x1f4)[_0x8ee4('0x27')](new db['Sequelize'][(_0x8ee4('0x7d'))](_0x8ee4('0xbf')+_0x50c6ed));}if(!_[_0x8ee4('0x88')](_0x50c6ed,_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0xbe')])){throw _0x586bc6[_0x8ee4('0x19')](0x1f4)[_0x8ee4('0x27')](new db[(_0x8ee4('0x7c'))]['ValidationError'](_0x8ee4('0xc0')+_0x50c6ed));}_0x27537b[_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0xbe')]]=_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0x83')];})['then'](function(){return db[_0x8ee4('0x2b')]['find']({'where':{'id':_0x3f1999[_0x8ee4('0x44')]['id']},'include':[{'model':db[_0x8ee4('0x8a')],'as':_0x8ee4('0x8f')},{'model':db['MailAccount'],'as':_0x8ee4('0xc1')}]});})[_0x8ee4('0x11')](handleEntityNotFound(_0x586bc6,null))['then'](function(_0x3ba835){if(_0x3ba835&&_0x3ba835['List']){_0x52a32c=_0x3ba835;var _0x14ad0a=_[_0x8ee4('0xc2')](_0x3f1999['body'],{'firstName':_0x3f1999['body'][_0x8ee4('0x83')],'phone':_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0x83')],'ListId':_0x3ba835[_0x8ee4('0x82')]});_0x14ad0a[_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0xbe')]]=_0x3f1999[_0x8ee4('0x4e')]['from'];return db[_0x8ee4('0x7b')][_0x8ee4('0xc3')]({'where':_0x27537b,'defaults':_0x14ad0a});}})['spread'](function(_0x2611d4){if(_0x2611d4){_0x2d0f75=_0x2611d4;var _0x14f8e6=fs[_0x8ee4('0xc4')](path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0xc5')),'utf8');var _0x4340f6=ejs[_0x8ee4('0xc6')](_0x14f8e6,{'body':_[_0x8ee4('0xc7')](_0x3f1999[_0x8ee4('0x4e')][_0x8ee4('0x4e')]),'bodyTitle':_0x52a32c[_0x8ee4('0xc8')]});return db[_0x8ee4('0xc9')][_0x8ee4('0x46')]({'body':_0x4340f6,'plainBody':htmlToText[_0x8ee4('0xca')](_0x4340f6),'ContactId':_0x2611d4['id'],'ChatWebsiteId':_0x52a32c['id']});}})[_0x8ee4('0x11')](function(_0x26aa28){_0x489d77=_0x26aa28;if(_0x502f5c['length']){var _0x573502=_0x502f5c['map'](function(_0x54ebe2){return{'name':_0x54ebe2['originalname'],'basename':_0x54ebe2[_0x8ee4('0x5e')],'type':_0x54ebe2[_0x8ee4('0xcb')],'ChatOfflineMessageId':_0x26aa28['id']};});_0x4fa2d6=_0x573502[_0x8ee4('0x2a')](_0x5f4739=>{var _0x58e3d3={'filename':_0x5f4739[_0x8ee4('0x26')],'path':path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0xcc'),'files',_0x8ee4('0xcd'),_0x8ee4('0xce'),_0x5f4739[_0x8ee4('0xcf')])};return _0x58e3d3;});if(!_0x52a32c[_0x8ee4('0xd0')]){return db['sequelize'][_0x8ee4('0xd1')](function(_0x55a343){return db[_0x8ee4('0xd2')][_0x8ee4('0xd3')](_0x573502,{'transaction':_0x55a343});});}}})[_0x8ee4('0x11')](function(){if(_0x489d77){_0x4d856b=_0x489d77;return db[_0x8ee4('0xc1')][_0x8ee4('0x53')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':'Smtp','raw':!![],'include':[{'model':db[_0x8ee4('0xd4')],'as':_0x8ee4('0xd4'),'raw':!![]}]}]});}})[_0x8ee4('0x11')](function(_0x94faa2){if(_0x94faa2&&_0x94faa2[_0x8ee4('0xd5')]&&_0x52a32c[_0x8ee4('0xd6')]&&_0x52a32c[_0x8ee4('0xd7')]){var _0x351991=_0x94faa2[_0x8ee4('0xd8')]();return respondWithRpcPromise(_0x8ee4('0xd9'),_0x8ee4('0xda'),{'account':_0x351991,'message':{'from':util[_0x8ee4('0xa0')](_0x8ee4('0xdb'),_0x94faa2[_0x8ee4('0x26')],_0x94faa2[_0x8ee4('0xdc')]||_0x94faa2['Smtp'][_0x8ee4('0x47')]),'to':_0x52a32c[_0x8ee4('0xd7')],'subject':_0x52a32c[_0x8ee4('0xdd')],'html':_0x4d856b['body'],'attachments':_0x4fa2d6}},client9003)[_0x8ee4('0x11')](function(){return _0x4d856b;})['catch'](function(_0x1ff5f2){logger[_0x8ee4('0x15')](_0x1ff5f2);});}})[_0x8ee4('0x11')](function(){if(_0x52a32c&&_0x52a32c[_0x8ee4('0xd0')]&&_0x52a32c['MailAccountId']){var _0x8fbf73=[];if(_0x502f5c[_0x8ee4('0x36')]){_0x8fbf73=_0x502f5c[_0x8ee4('0x2a')](function(_0x1bc2db){return{'name':_0x1bc2db[_0x8ee4('0xde')],'basename':_0x1bc2db[_0x8ee4('0x5e')],'type':_0x1bc2db[_0x8ee4('0xcb')],'ChatOfflineMessageId':_0x489d77['id']};});}var _0x4e0f80;if(!_[_0x8ee4('0x6a')](_0x52a32c['subjectOffline'])){var _0x4030c8=_['map'](_0x3f1999[_0x8ee4('0x4e')],function(_0x4f70f5){return _0x4f70f5;});var _0x41edff=_['toPairsIn'](_0x4030c8)[0x0];var _0x4c8e3c=_['mapValues'](_0x41edff,function(_0x144537){return _0x144537;});_0x4e0f80=_0x4c8e3c[0x1][_0x52a32c[_0x8ee4('0xdf')]];}var _0x1a1996={'from':_0x2d0f75[_0x8ee4('0xdc')],'firstName':_0x2d0f75[_0x8ee4('0x98')],'lastName':_0x2d0f75[_0x8ee4('0xa9')],'mapKey':'email','message':{'from':_0x2d0f75[_0x8ee4('0xdc')],'to':_0x52a32c[_0x8ee4('0xc1')][_0x8ee4('0xdc')],'cc':'','subject':_[_0x8ee4('0x6a')](_0x4e0f80)?_0x52a32c[_0x8ee4('0xdd')]:_0x4e0f80,'messageId':'','sentAt':new Date(),'attach':_0x8fbf73[_0x8ee4('0x36')],'attachments':_0x8fbf73,'originChannel':_0x8ee4('0xe0'),'ChatWebsiteId':_0x52a32c['id'],'ChatOfflineMessageId':_0x4d856b['id'],'originTo':_0x52a32c[_0x8ee4('0xc1')][_0x8ee4('0xdc')]},'body':_0x4d856b[_0x8ee4('0x4e')]};var _0x556158={'account':{'id':_0x52a32c[_0x8ee4('0xe1')]},'body':_0x1a1996,'log':_0x8ee4('0xe2')};return respondWithRpcPromise('NotifyMailAccount','notifyMail',_0x556158,client9001)[_0x8ee4('0x11')](function(){return _0x4d856b;})[_0x8ee4('0x43')](function(_0x5047e8){logger[_0x8ee4('0x15')](_0x5047e8);});}return;})[_0x8ee4('0x11')](function(){if(_0x4d856b){return _0x4d856b;}})[_0x8ee4('0x11')](respondWithResult(_0x586bc6,null))[_0x8ee4('0x43')](function(_0x2e6f67){logger[_0x8ee4('0x15')](_0x8ee4('0x43'),_0x2e6f67);for(var _0x5b2571 of _0x502f5c){var _0x3b7d39=path[_0x8ee4('0x6c')](config['root'],_0x8ee4('0xcc'),_0x8ee4('0xe3'),_0x8ee4('0xcd'),'offline-chat',_0x5b2571[_0x8ee4('0x5e')]);fs_extra[_0x8ee4('0xe4')](_0x3b7d39)['catch'](function(_0x1bedc1){logger[_0x8ee4('0x15')]('Could\x20not\x20remove\x20attachment\x20file',_0x3b7d39,_0x1bedc1);});}});};exports[_0x8ee4('0xe5')]=function(_0x6e614a,_0x41d1b1){return db[_0x8ee4('0xa4')][_0x8ee4('0x45')]({'where':{'id':_0x6e614a[_0x8ee4('0x44')]['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x41d1b1,null))[_0x8ee4('0x11')](function(_0x5a33cc){if(_0x5a33cc){return _0x5a33cc[_0x8ee4('0xe5')](_0x6e614a['body']['ids'],_[_0x8ee4('0xe6')](_0x6e614a['body'],['ids','id'])||{});}})[_0x8ee4('0x11')](respondWithResult(_0x41d1b1,null))[_0x8ee4('0x43')](handleError(_0x41d1b1,null));};exports[_0x8ee4('0xe7')]=function(_0x480d8c,_0x4b0723){var _0x3f8696={'raw':![],'where':{}};var _0x31db13={};var _0x2e4df4={'count':0x0,'rows':[]};return db[_0x8ee4('0x2b')][_0x8ee4('0x53')]({'where':{'id':_0x480d8c[_0x8ee4('0x44')]['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x4b0723,null))[_0x8ee4('0x11')](function(_0x30e8a8){if(_0x30e8a8){_0x31db13[_0x8ee4('0x2f')]=_['keys'](db[_0x8ee4('0xa4')]['rawAttributes']);_0x31db13[_0x8ee4('0x30')]=_[_0x8ee4('0x31')](_0x480d8c['query']);_0x31db13[_0x8ee4('0x32')]=_[_0x8ee4('0x33')](_0x31db13[_0x8ee4('0x2f')],_0x31db13['query']);_0x3f8696[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0x31db13[_0x8ee4('0x2f')],qs[_0x8ee4('0x34')](_0x480d8c['query']['fields']));_0x3f8696[_0x8ee4('0x35')]=_0x3f8696['attributes'][_0x8ee4('0x36')]?_0x3f8696['attributes']:_0x31db13['model'];if(!_0x480d8c[_0x8ee4('0x30')]['hasOwnProperty'](_0x8ee4('0x38'))){_0x3f8696['limit']=qs['limit'](_0x480d8c[_0x8ee4('0x30')]['limit']);_0x3f8696['offset']=qs[_0x8ee4('0x1c')](_0x480d8c[_0x8ee4('0x30')][_0x8ee4('0x1c')]);}_0x3f8696[_0x8ee4('0x39')]=qs[_0x8ee4('0x3a')](_0x480d8c[_0x8ee4('0x30')]['sort']);_0x3f8696[_0x8ee4('0x3b')]=qs[_0x8ee4('0x32')](_[_0x8ee4('0x3c')](_0x480d8c[_0x8ee4('0x30')],_0x31db13['filters']));_0x3f8696[_0x8ee4('0x3b')][_0x8ee4('0x51')]=_0x30e8a8['id'];if(_0x480d8c[_0x8ee4('0x30')][_0x8ee4('0x3d')]){_0x3f8696[_0x8ee4('0x3b')]=_[_0x8ee4('0x3e')](_0x3f8696[_0x8ee4('0x3b')],{'$or':_[_0x8ee4('0x2a')](_0x3f8696['attributes'],function(_0x2c3397){var _0x59e3ee={};_0x59e3ee[_0x2c3397]={'$like':'%'+_0x480d8c[_0x8ee4('0x30')][_0x8ee4('0x3d')]+'%'};return _0x59e3ee;})});}_0x3f8696=_['merge']({},_0x3f8696,_0x480d8c[_0x8ee4('0x3f')]);return db['ChatInteraction'][_0x8ee4('0x1f')]({'where':_0x3f8696['where']})['then'](function(_0x570315){_0x2e4df4['count']=_0x570315;if(_0x480d8c[_0x8ee4('0x30')]['includeAll']){_0x3f8696['include']=[{'model':db[_0x8ee4('0x7b')],'as':_0x8ee4('0xe8'),'required':![]},{'model':db[_0x8ee4('0xb4')],'as':_0x8ee4('0xe9'),'attributes':['name',_0x8ee4('0xea'),_0x8ee4('0xeb')],'required':![]},{'model':db[_0x8ee4('0xec')],'as':'Tags','attributes':['id','name',_0x8ee4('0xed')],'where':_0x480d8c[_0x8ee4('0x30')][_0x8ee4('0xee')]?{'id':_0x480d8c[_0x8ee4('0x30')][_0x8ee4('0xee')]}:undefined,'required':_0x480d8c[_0x8ee4('0x30')][_0x8ee4('0xee')]?!![]:![]}];}return db[_0x8ee4('0xa4')]['findAll'](_0x3f8696);})[_0x8ee4('0x11')](function(_0x411f06){_0x2e4df4[_0x8ee4('0x42')]=_0x411f06;return _0x2e4df4;});}})[_0x8ee4('0x11')](respondWithFilteredResult(_0x4b0723,_0x3f8696))[_0x8ee4('0x43')](handleError(_0x4b0723,null));};function iftimePromise(_0x507987,_0x819021){return respondWithRpcPromise(_0x8ee4('0xef'),_0x8ee4('0xf0'),{'command':_0x819021[_0x8ee4('0xf1')]?util[_0x8ee4('0xa0')](_0x8ee4('0xf2'),_0x507987['interval'],_0x819021['timezone']):util[_0x8ee4('0xa0')](_0x8ee4('0xf3'),_0x507987[_0x8ee4('0xf4')])},client9002)['then'](function(_0x165da4){var _0x2d8dc3=_0x165da4&&_0x165da4[_0x8ee4('0xf5')]('true')>=0x0?!![]:![];logger[_0x8ee4('0xf6')](_0x8ee4('0xf7'),_0x819021['id'],_0x507987['id'],_0x507987['interval'],_0x2d8dc3?_0x8ee4('0xf8'):'OFFLINE',_0x819021[_0x8ee4('0xf1')]?_0x819021[_0x8ee4('0xf1')]:_0x8ee4('0xf9'));return _0x2d8dc3;})['catch'](function(_0x468e34){logger['error'](_0x8ee4('0xf7'),_0x819021['id'],_0x507987['id'],_0x507987[_0x8ee4('0xf4')],util[_0x8ee4('0xfa')](_0x468e34,{'showHidden':![],'depth':null}),_0x819021[_0x8ee4('0xf1')]?_0x819021[_0x8ee4('0xf1')]:_0x8ee4('0xf9'));return![];});}exports['getSnippet']=function(_0x514723,_0x3f8a2f){var _0x29a246=0x0;var _0x544562=0x0;var _0x569f20=![];var _0x4bcdf3;var _0x2aa386;return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x514723[_0x8ee4('0x44')]['id']},'include':[{'model':db[_0x8ee4('0xfb')],'as':_0x8ee4('0xfb'),'include':[{'model':db[_0x8ee4('0xfb')],'as':_0x8ee4('0xfc'),'attributes':['id',_0x8ee4('0xf4')],'raw':!![]}]}]})['then'](handleEntityNotFound(_0x3f8a2f,null))[_0x8ee4('0x11')](function(_0xec2789){if(_0xec2789){_0x4bcdf3=_0xec2789;return _0xec2789[_0x8ee4('0xfd')]({'raw':!![]});}})[_0x8ee4('0x11')](function(_0x45865d){if(_0x4bcdf3){if(_0x45865d){_0x2aa386=_0x45865d;}}return require(_0x8ee4('0x67'))[_0x8ee4('0x68')]();})[_0x8ee4('0x11')](function(_0x1175cf){if(_0x1175cf){_0x544562=_0x1175cf['virtual'];_0x569f20=_0x1175cf[_0x8ee4('0x69')];}})[_0x8ee4('0x11')](function(){return db[_0x8ee4('0xa4')]['count']({'where':{'closed':![]}});})['then'](function(_0x283144){_0x29a246=_0x283144;if(_0x544562&&_0x283144>_0x544562){return db[_0x8ee4('0xfe')][_0x8ee4('0x53')]({'where':{'id':0x1}})[_0x8ee4('0x11')](function(_0xbf9457){if(_0xbf9457){_0xbf9457[_0x8ee4('0xff')](_0x8ee4('0x100'));}});}})[_0x8ee4('0x11')](function(){if(_0x4bcdf3[_0x8ee4('0xfb')]&&_0x4bcdf3[_0x8ee4('0xfb')]['Intervals']){var _0x132bcc=[];for(var _0x428bac=0x0;_0x428bac<_0x4bcdf3[_0x8ee4('0xfb')][_0x8ee4('0xfc')]['length'];_0x428bac++){var _0x35e1d6=_0x4bcdf3['Interval'][_0x8ee4('0xfc')][_0x428bac][_0x8ee4('0x22')]({'plain':!![]});_0x132bcc[_0x8ee4('0xad')](iftimePromise(_0x35e1d6,_0x4bcdf3));}return BPromise[_0x8ee4('0x101')](_0x132bcc)['then'](function(_0x2abb7b){return _['some'](_0x2abb7b);});}else{return!![];}})[_0x8ee4('0x11')](function(_0x52023d){var _0x3b9258=fs[_0x8ee4('0xc4')](path[_0x8ee4('0x6c')](config[_0x8ee4('0x65')],_0x8ee4('0x102')),_0x8ee4('0x103'));var _0x4a751e={'remote':_0x4bcdf3[_0x8ee4('0x104')],'query':querystring['stringify'](_[_0x8ee4('0x3e')](_0x4bcdf3[_0x8ee4('0x22')]({'plain':!![]}),{'customerIp':_0x514723[_0x8ee4('0x78')]['x-forwarded-for']||_0x514723[_0x8ee4('0x78')][_0x8ee4('0x105')]||_0x514723['connection'][_0x8ee4('0x106')]||_0x514723['ip'],'referer':_0x514723[_0x8ee4('0x78')][_0x8ee4('0x107')],'openedInteractions':_0x29a246,'maxInteractions':_0x544562,'virtual':_0x569f20['virtual'],'online':_0x52023d,'custom':_0x569f20}))[_0x8ee4('0x108')](/'/g,'\x5c\x27')};_0x3f8a2f[_0x8ee4('0x27')](ejs[_0x8ee4('0xc6')](Mustache[_0x8ee4('0xc6')](_0x3b9258,_0x4a751e),{'proactiveActions':_0x2aa386,'alignment':_0x4bcdf3[_0x8ee4('0x109')],'verticalAlignment':_0x4bcdf3['verticalAlignment'],'div_color':_0x4bcdf3[_0x8ee4('0xed')],'labelText':_0x4bcdf3[_0x8ee4('0x10a')],'text_color':_0x4bcdf3[_0x8ee4('0x10b')],'text_button_color':_0x4bcdf3[_0x8ee4('0x10c')],'button_color':_0x4bcdf3[_0x8ee4('0x10d')],'background_color':_0x4bcdf3['backgroundColor'],'hideWhenOffline':_0x4bcdf3[_0x8ee4('0x10e')],'interval':_0x4bcdf3[_0x8ee4('0x10f')]}));})[_0x8ee4('0x43')](handleError(_0x3f8a2f,null));};exports[_0x8ee4('0x110')]=function(_0x573fb7,_0x374c18){var _0x519623=_0x573fb7['params']['id'];var _0x545781=_0x573fb7[_0x8ee4('0x4e')];var _0x4fff70=0xc8;var _0x5b89f1=null;return db[_0x8ee4('0x111')][_0x8ee4('0xd1')]({'isolationLevel':db[_0x8ee4('0x111')][_0x8ee4('0x112')][_0x8ee4('0x113')]['READ_COMMITTED']},function(_0x4ef1e2){return db[_0x8ee4('0x2b')]['findOne']({'where':{'id':_0x519623},'transaction':_0x4ef1e2})['then'](function(_0x55be69){if(_0x55be69){return db[_0x8ee4('0x8d')][_0x8ee4('0x21')]({'where':{'ChatWebsiteId':_0x519623},'transaction':_0x4ef1e2})[_0x8ee4('0x11')](function(){var _0x17891c=_[_0x8ee4('0x2a')](_0x545781,function(_0x13467b){_0x13467b['ChatWebsiteId']=_0x519623;return _0x13467b;});return db[_0x8ee4('0x8d')][_0x8ee4('0xd3')](_0x17891c,{'transaction':_0x4ef1e2});});}else{_0x4fff70=0x194;_0x5b89f1=[];}});})[_0x8ee4('0x11')](function(){if(_0x4fff70!==0x194){return db[_0x8ee4('0x8d')]['findAndCountAll']({'where':{'ChatWebsiteId':_0x519623},'order':_0x8ee4('0x114')})[_0x8ee4('0x11')](function(_0x16310a){_0x5b89f1=_0x16310a;});}})[_0x8ee4('0x43')](function(_0x1706e4){_0x4fff70=0x1f4;logger['error'](_0x1706e4[_0x8ee4('0x25')]);if(_0x1706e4[_0x8ee4('0x26')]){delete _0x1706e4[_0x8ee4('0x26')];}_0x5b89f1=_0x1706e4;})[_0x8ee4('0x115')](function(){if(_0x5b89f1===null){_0x374c18[_0x8ee4('0x18')](_0x4fff70);}else{if(_0x4fff70===0x1f4){_0x374c18[_0x8ee4('0x19')](_0x4fff70)[_0x8ee4('0x27')](_0x5b89f1);}else{_0x374c18[_0x8ee4('0x19')](_0x4fff70)[_0x8ee4('0x1b')](_0x5b89f1);}}});};exports[_0x8ee4('0x116')]=function(_0x2f44ff,_0x47f00e){var _0xa20bb5={};var _0x1728d7={};var _0x32ae31;var _0x2b521f;return db[_0x8ee4('0x2b')]['findOne']({'where':{'id':_0x2f44ff[_0x8ee4('0x44')]['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x47f00e,null))[_0x8ee4('0x11')](function(_0x5165e2){if(_0x5165e2){_0x32ae31=_0x5165e2;_0x1728d7[_0x8ee4('0x2f')]=_[_0x8ee4('0x31')](db[_0x8ee4('0x8d')][_0x8ee4('0x2c')]);_0x1728d7[_0x8ee4('0x30')]=_[_0x8ee4('0x31')](_0x2f44ff['query']);_0x1728d7[_0x8ee4('0x32')]=_[_0x8ee4('0x33')](_0x1728d7[_0x8ee4('0x2f')],_0x1728d7[_0x8ee4('0x30')]);_0xa20bb5[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0x1728d7[_0x8ee4('0x2f')],qs[_0x8ee4('0x34')](_0x2f44ff[_0x8ee4('0x30')][_0x8ee4('0x34')]));_0xa20bb5[_0x8ee4('0x35')]=_0xa20bb5[_0x8ee4('0x35')][_0x8ee4('0x36')]?_0xa20bb5['attributes']:_0x1728d7['model'];_0xa20bb5[_0x8ee4('0x39')]=qs[_0x8ee4('0x3a')](_0x2f44ff[_0x8ee4('0x30')][_0x8ee4('0x3a')]);_0xa20bb5[_0x8ee4('0x3b')]=qs[_0x8ee4('0x32')](_['pick'](_0x2f44ff['query'],_0x1728d7[_0x8ee4('0x32')]));if(_0x2f44ff[_0x8ee4('0x30')][_0x8ee4('0x3d')]){_0xa20bb5[_0x8ee4('0x3b')]=_[_0x8ee4('0x3e')](_0xa20bb5[_0x8ee4('0x3b')],{'$or':_[_0x8ee4('0x2a')](_0xa20bb5['attributes'],function(_0x376da0){var _0x260e94={};_0x260e94[_0x376da0]={'$like':'%'+_0x2f44ff['query']['filter']+'%'};return _0x260e94;})});}_0xa20bb5=_[_0x8ee4('0x3e')]({},_0xa20bb5,_0x2f44ff[_0x8ee4('0x3f')]);return _0x32ae31[_0x8ee4('0x116')](_0xa20bb5);}})[_0x8ee4('0x11')](function(_0x93e10c){if(_0x93e10c){_0x2b521f=_0x93e10c[_0x8ee4('0x36')];if(!_0x2f44ff['query'][_0x8ee4('0x37')](_0x8ee4('0x38'))){_0xa20bb5['limit']=qs[_0x8ee4('0x1d')](_0x2f44ff[_0x8ee4('0x30')][_0x8ee4('0x1d')]);_0xa20bb5[_0x8ee4('0x1c')]=qs[_0x8ee4('0x1c')](_0x2f44ff[_0x8ee4('0x30')][_0x8ee4('0x1c')]);}return _0x32ae31[_0x8ee4('0x116')](_0xa20bb5);}})[_0x8ee4('0x11')](function(_0x2d928b){if(_0x2d928b){return _0x2d928b?{'count':_0x2b521f,'rows':_0x2d928b}:null;}})[_0x8ee4('0x11')](respondWithResult(_0x47f00e,null))[_0x8ee4('0x43')](handleError(_0x47f00e,null));};exports[_0x8ee4('0x117')]=function(_0x1581f4,_0x151cd9){return db[_0x8ee4('0x118')][_0x8ee4('0x45')]({'where':{'id':_0x1581f4[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x151cd9,null))['then'](function(_0x48712d){if(_0x48712d){return _0x48712d['addProactiveActions'](_0x1581f4[_0x8ee4('0x4e')][_0x8ee4('0x55')],_['omit'](_0x1581f4['body'],[_0x8ee4('0x55'),'id'])||{});}})[_0x8ee4('0x11')](respondWithResult(_0x151cd9,null))[_0x8ee4('0x43')](handleError(_0x151cd9,null));};exports[_0x8ee4('0xfd')]=function(_0x16b387,_0x511750){var _0x520069={};var _0x275b26={};var _0x39ec32;var _0xb56829;return db['ChatWebsite'][_0x8ee4('0x53')]({'where':{'id':_0x16b387[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x511750,null))['then'](function(_0x554903){if(_0x554903){_0x39ec32=_0x554903;_0x275b26[_0x8ee4('0x2f')]=_[_0x8ee4('0x31')](db[_0x8ee4('0x119')]['rawAttributes']);_0x275b26['query']=_[_0x8ee4('0x31')](_0x16b387[_0x8ee4('0x30')]);_0x275b26['filters']=_[_0x8ee4('0x33')](_0x275b26[_0x8ee4('0x2f')],_0x275b26[_0x8ee4('0x30')]);_0x520069[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0x275b26[_0x8ee4('0x2f')],qs[_0x8ee4('0x34')](_0x16b387[_0x8ee4('0x30')]['fields']));_0x520069[_0x8ee4('0x35')]=_0x520069[_0x8ee4('0x35')][_0x8ee4('0x36')]?_0x520069[_0x8ee4('0x35')]:_0x275b26[_0x8ee4('0x2f')];_0x520069[_0x8ee4('0x39')]=qs[_0x8ee4('0x3a')](_0x16b387[_0x8ee4('0x30')]['sort']);_0x520069['where']=qs['filters'](_['pick'](_0x16b387[_0x8ee4('0x30')],_0x275b26['filters']));if(_0x16b387['query'][_0x8ee4('0x3d')]){_0x520069['where']=_[_0x8ee4('0x3e')](_0x520069['where'],{'$or':_[_0x8ee4('0x2a')](_0x520069['attributes'],function(_0x130880){var _0x690154={};_0x690154[_0x130880]={'$like':'%'+_0x16b387[_0x8ee4('0x30')][_0x8ee4('0x3d')]+'%'};return _0x690154;})});}_0x520069=_['merge']({},_0x520069,_0x16b387[_0x8ee4('0x3f')]);return _0x39ec32[_0x8ee4('0xfd')](_0x520069);}})['then'](function(_0x1c83a5){if(_0x1c83a5){_0xb56829=_0x1c83a5[_0x8ee4('0x36')];if(!_0x16b387[_0x8ee4('0x30')][_0x8ee4('0x37')](_0x8ee4('0x38'))){_0x520069[_0x8ee4('0x1d')]=qs['limit'](_0x16b387[_0x8ee4('0x30')][_0x8ee4('0x1d')]);_0x520069['offset']=qs['offset'](_0x16b387[_0x8ee4('0x30')]['offset']);}return _0x39ec32[_0x8ee4('0xfd')](_0x520069);}})[_0x8ee4('0x11')](function(_0x3d8ee9){if(_0x3d8ee9){return _0x3d8ee9?{'count':_0xb56829,'rows':_0x3d8ee9}:null;}})['then'](respondWithResult(_0x511750,null))[_0x8ee4('0x43')](handleError(_0x511750,null));};exports[_0x8ee4('0x11a')]=function(_0x254257,_0x872cff){var _0x3b2395=_0x254257[_0x8ee4('0x30')]['online']===_0x8ee4('0x11b')?_0x8ee4('0x11c'):_0x8ee4('0x11d');return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'attributes':['id',_0x3b2395],'where':{'id':_0x254257[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x872cff,null))[_0x8ee4('0x11')](function(_0x51688b){if(_0x51688b){var _0x5460f8=_0x51688b[_0x3b2395];var _0x4095e8=_0x5460f8&&_0x5460f8['items']?_0x5460f8['items']:[];_0x872cff['send']({'fromKey':_['isNil'](_0x5460f8['fromKey'])?undefined:_0x5460f8['fromKey'],'count':_0x4095e8[_0x8ee4('0x36')],'rows':_0x4095e8});}})[_0x8ee4('0x43')](handleError(_0x872cff,null));};exports[_0x8ee4('0x11e')]=function(_0x3dc2bf,_0x30fd70){var _0x257024={'raw':![],'where':{}};var _0x30da63={};var _0xc45370={'count':0x0,'rows':[]};return db[_0x8ee4('0x2b')][_0x8ee4('0x53')]({'where':{'id':_0x3dc2bf[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x30fd70,null))['then'](function(_0x1a2226){if(_0x1a2226){_0x30da63[_0x8ee4('0x2f')]=_[_0x8ee4('0x31')](db[_0x8ee4('0xc9')][_0x8ee4('0x2c')]);_0x30da63[_0x8ee4('0x30')]=_['keys'](_0x3dc2bf[_0x8ee4('0x30')]);_0x30da63['filters']=_[_0x8ee4('0x33')](_0x30da63[_0x8ee4('0x2f')],_0x30da63[_0x8ee4('0x30')]);_0x257024[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0x30da63[_0x8ee4('0x2f')],qs[_0x8ee4('0x34')](_0x3dc2bf[_0x8ee4('0x30')][_0x8ee4('0x34')]));_0x257024['attributes']=_0x257024[_0x8ee4('0x35')][_0x8ee4('0x36')]?_0x257024[_0x8ee4('0x35')]:_0x30da63[_0x8ee4('0x2f')];if(!_0x3dc2bf['query'][_0x8ee4('0x37')]('nolimit')){_0x257024[_0x8ee4('0x1d')]=qs['limit'](_0x3dc2bf['query'][_0x8ee4('0x1d')]);_0x257024['offset']=qs[_0x8ee4('0x1c')](_0x3dc2bf[_0x8ee4('0x30')][_0x8ee4('0x1c')]);}_0x257024['order']=qs[_0x8ee4('0x3a')](_0x3dc2bf[_0x8ee4('0x30')][_0x8ee4('0x3a')]);_0x257024[_0x8ee4('0x3b')]=qs[_0x8ee4('0x32')](_[_0x8ee4('0x3c')](_0x3dc2bf[_0x8ee4('0x30')],_0x30da63[_0x8ee4('0x32')]));_0x257024['where']['ChatWebsiteId']=_0x1a2226['id'];if(_0x3dc2bf[_0x8ee4('0x30')]['filter']){_0x257024[_0x8ee4('0x3b')]=_[_0x8ee4('0x3e')](_0x257024[_0x8ee4('0x3b')],{'$or':_['map'](_0x257024[_0x8ee4('0x35')],function(_0x7da231){var _0x4db18e={};_0x4db18e[_0x7da231]={'$like':'%'+_0x3dc2bf['query'][_0x8ee4('0x3d')]+'%'};return _0x4db18e;})});}_0x257024=_['merge']({},_0x257024,_0x3dc2bf[_0x8ee4('0x3f')]);return db['ChatOfflineMessage'][_0x8ee4('0x1f')]({'where':_0x257024[_0x8ee4('0x3b')]})[_0x8ee4('0x11')](function(_0x5e8827){_0xc45370['count']=_0x5e8827;if(_0x3dc2bf[_0x8ee4('0x30')][_0x8ee4('0x40')]){_0x257024[_0x8ee4('0x41')]=[{'all':!![]}];}else{_0x257024[_0x8ee4('0x41')]=[{'model':db[_0x8ee4('0x7b')],'as':_0x8ee4('0xe8'),'required':![]},{'model':db[_0x8ee4('0xd2')],'as':_0x8ee4('0x11f'),'required':![]}];}return db[_0x8ee4('0xc9')][_0x8ee4('0x59')](_0x257024);})[_0x8ee4('0x11')](function(_0x41c067){_0xc45370[_0x8ee4('0x42')]=_0x41c067;return _0xc45370;});}})['then'](respondWithFilteredResult(_0x30fd70,_0x257024))[_0x8ee4('0x43')](handleError(_0x30fd70,null));};exports['addAgents']=function(_0x144380,_0x5d02d7){return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x144380[_0x8ee4('0x44')]['id']}})['then'](handleEntityNotFound(_0x5d02d7,null))[_0x8ee4('0x11')](function(_0x5c7b8f){if(_0x5c7b8f){return _0x5c7b8f[_0x8ee4('0x120')](_0x144380[_0x8ee4('0x4e')][_0x8ee4('0x55')],_[_0x8ee4('0xe6')](_0x144380[_0x8ee4('0x4e')],[_0x8ee4('0x55'),'id'])||{})[_0x8ee4('0xa7')](function(_0x1dbf2a){for(var _0x44e522=0x0;_0x44e522<_0x144380[_0x8ee4('0x4e')][_0x8ee4('0x55')]['length'];_0x44e522+=0x1){socket[_0x8ee4('0x121')](_0x8ee4('0x122'),{'UserId':Number(_0x144380['body'][_0x8ee4('0x55')][_0x44e522]),'ChatWebsiteId':Number(_0x144380[_0x8ee4('0x44')]['id'])});}return _0x1dbf2a;});}})[_0x8ee4('0x11')](respondWithResult(_0x5d02d7,null))[_0x8ee4('0x43')](handleError(_0x5d02d7,null));};exports[_0x8ee4('0x123')]=function(_0x1203a6,_0x34998b){return db[_0x8ee4('0x2b')][_0x8ee4('0x45')]({'where':{'id':_0x1203a6['params']['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x34998b,null))['then'](function(_0x18fc27){if(_0x18fc27){return _0x18fc27['removeAgents'](_0x1203a6[_0x8ee4('0x30')][_0x8ee4('0x55')])[_0x8ee4('0x11')](function(){if(_[_0x8ee4('0x124')](_0x1203a6['query'][_0x8ee4('0x55')])){for(var _0x33fb2d=0x0;_0x33fb2d<_0x1203a6['query'][_0x8ee4('0x55')]['length'];_0x33fb2d+=0x1){socket[_0x8ee4('0x121')](_0x8ee4('0x125'),{'UserId':Number(_0x1203a6['query'][_0x8ee4('0x55')][_0x33fb2d]),'ChatWebsiteId':Number(_0x1203a6[_0x8ee4('0x44')]['id'])});}}else{socket['emit'](_0x8ee4('0x125'),{'UserId':Number(_0x1203a6[_0x8ee4('0x30')][_0x8ee4('0x55')]),'ChatWebsiteId':Number(_0x1203a6[_0x8ee4('0x44')]['id'])});}});}})[_0x8ee4('0x11')](respondWithStatusCode(_0x34998b,null))[_0x8ee4('0x43')](handleError(_0x34998b,null));};exports[_0x8ee4('0x126')]=function(_0x1e7660,_0x1722d0){var _0x1b7250={};var _0x4d2217={};var _0x34bdb2;var _0x195e86;return db[_0x8ee4('0x2b')][_0x8ee4('0x53')]({'where':{'id':_0x1e7660[_0x8ee4('0x44')]['id']}})[_0x8ee4('0x11')](handleEntityNotFound(_0x1722d0,null))['then'](function(_0x28e2d9){if(_0x28e2d9){_0x34bdb2=_0x28e2d9;_0x4d2217[_0x8ee4('0x2f')]=_[_0x8ee4('0x31')](db[_0x8ee4('0xb4')][_0x8ee4('0x2c')]);_0x4d2217[_0x8ee4('0x30')]=_[_0x8ee4('0x31')](_0x1e7660[_0x8ee4('0x30')]);_0x4d2217[_0x8ee4('0x32')]=_[_0x8ee4('0x33')](_0x4d2217[_0x8ee4('0x2f')],_0x4d2217[_0x8ee4('0x30')]);_0x1b7250[_0x8ee4('0x35')]=_[_0x8ee4('0x33')](_0x4d2217[_0x8ee4('0x2f')],qs[_0x8ee4('0x34')](_0x1e7660[_0x8ee4('0x30')]['fields']));_0x1b7250[_0x8ee4('0x35')]=_0x1b7250['attributes'][_0x8ee4('0x36')]?_0x1b7250[_0x8ee4('0x35')]:_0x4d2217['model'];_0x1b7250['order']=qs[_0x8ee4('0x3a')](_0x1e7660[_0x8ee4('0x30')][_0x8ee4('0x3a')]);_0x1b7250[_0x8ee4('0x3b')]=qs['filters'](_[_0x8ee4('0x3c')](_0x1e7660['query'],_0x4d2217[_0x8ee4('0x32')]));if(_0x1e7660[_0x8ee4('0x30')][_0x8ee4('0x3d')]){_0x1b7250[_0x8ee4('0x3b')]=_[_0x8ee4('0x3e')](_0x1b7250['where'],{'$or':_[_0x8ee4('0x2a')](_0x1b7250[_0x8ee4('0x35')],function(_0x2ef78e){var _0x46e124={};_0x46e124[_0x2ef78e]={'$like':'%'+_0x1e7660['query'][_0x8ee4('0x3d')]+'%'};return _0x46e124;})});}_0x1b7250=_[_0x8ee4('0x3e')]({},_0x1b7250,_0x1e7660[_0x8ee4('0x3f')]);return _0x34bdb2[_0x8ee4('0x126')](_0x1b7250);}})['then'](function(_0x5bb621){if(_0x5bb621){_0x195e86=_0x5bb621['length'];if(!_0x1e7660[_0x8ee4('0x30')][_0x8ee4('0x37')](_0x8ee4('0x38'))){_0x1b7250[_0x8ee4('0x1d')]=qs[_0x8ee4('0x1d')](_0x1e7660[_0x8ee4('0x30')]['limit']);_0x1b7250[_0x8ee4('0x1c')]=qs['offset'](_0x1e7660[_0x8ee4('0x30')][_0x8ee4('0x1c')]);}return _0x34bdb2['getAgents'](_0x1b7250);}})[_0x8ee4('0x11')](function(_0x50cf3c){if(_0x50cf3c){return _0x50cf3c?{'count':_0x195e86,'rows':_0x50cf3c}:null;}})[_0x8ee4('0x11')](respondWithResult(_0x1722d0,null))[_0x8ee4('0x43')](handleError(_0x1722d0,null));};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js
index 7067203..853585d 100644
--- a/server/api/chatWebsite/chatWebsite.events.js
+++ b/server/api/chatWebsite/chatWebsite.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb13b=['ChatWebsite','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x44268d,_0xad8443){var _0x4be92d=function(_0x8a57ff){while(--_0x8a57ff){_0x44268d['push'](_0x44268d['shift']());}};_0x4be92d(++_0xad8443);}(_0xb13b,0x1de));var _0xbb13=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xb13b[_0x502c7d];return _0x30b7ed;};'use strict';var EventEmitter=require(_0xbb13('0x0'));var ChatWebsite=require(_0xbb13('0x1'))['db'][_0xbb13('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xbb13('0x3')](0x0);var events={'afterCreate':_0xbb13('0x4'),'afterUpdate':'update','afterDestroy':_0xbb13('0x5')};function emitEvent(_0x38600f){return function(_0x50898d,_0x9eab1b,_0x23a522){ChatWebsiteEvents[_0xbb13('0x6')](_0x38600f+':'+_0x50898d['id'],_0x50898d);ChatWebsiteEvents[_0xbb13('0x6')](_0x38600f,_0x50898d);_0x23a522(null);};}for(var e in events){if(events[_0xbb13('0x7')](e)){var event=events[e];ChatWebsite[_0xbb13('0x8')](e,emitEvent(event));}}module[_0xbb13('0x9')]=ChatWebsiteEvents;
\ No newline at end of file
+var _0x5fd1=['save','emit','hasOwnProperty','hook','exports','events','ChatWebsite','setMaxListeners'];(function(_0x2044aa,_0xee9022){var _0x1a346e=function(_0x2e4194){while(--_0x2e4194){_0x2044aa['push'](_0x2044aa['shift']());}};_0x1a346e(++_0xee9022);}(_0x5fd1,0x155));var _0x15fd=function(_0xf14230,_0x251fbc){_0xf14230=_0xf14230-0x0;var _0x1acae1=_0x5fd1[_0xf14230];return _0x1acae1;};'use strict';var EventEmitter=require(_0x15fd('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0x15fd('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x15fd('0x2')](0x0);var events={'afterCreate':_0x15fd('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x370d34){return function(_0x3138f3,_0x411b0e,_0x5e1d7e){ChatWebsiteEvents[_0x15fd('0x4')](_0x370d34+':'+_0x3138f3['id'],_0x3138f3);ChatWebsiteEvents[_0x15fd('0x4')](_0x370d34,_0x3138f3);_0x5e1d7e(null);};}for(var e in events){if(events[_0x15fd('0x5')](e)){var event=events[e];ChatWebsite[_0x15fd('0x6')](e,emitEvent(event));}}module[_0x15fd('0x7')]=ChatWebsiteEvents;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.model.js b/server/api/chatWebsite/chatWebsite.model.js
index d6669b9..eb57f33 100644
--- a/server/api/chatWebsite/chatWebsite.model.js
+++ b/server/api/chatWebsite/chatWebsite.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4e72=['rimraf','../../config/environment','./chatWebsite.attributes','exports','define','ChatWebsite','chat_websites','util','../../config/logger','api','moment','path'];(function(_0x470615,_0x1c7aaa){var _0x189c81=function(_0x398e12){while(--_0x398e12){_0x470615['push'](_0x470615['shift']());}};_0x189c81(++_0x1c7aaa);}(_0x4e72,0xc7));var _0x24e7=function(_0x173b7f,_0x12b928){_0x173b7f=_0x173b7f-0x0;var _0x2e0d96=_0x4e72[_0x173b7f];return _0x2e0d96;};'use strict';var _=require('lodash');var util=require(_0x24e7('0x0'));var logger=require(_0x24e7('0x1'))(_0x24e7('0x2'));var moment=require(_0x24e7('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x24e7('0x4'));var rimraf=require(_0x24e7('0x5'));var config=require(_0x24e7('0x6'));var attributes=require(_0x24e7('0x7'));module[_0x24e7('0x8')]=function(_0x2a3894,_0x595418){return _0x2a3894[_0x24e7('0x9')](_0x24e7('0xa'),attributes,{'tableName':_0x24e7('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x283d=['rimraf','../../config/environment','chat_websites','lodash','util','api','bluebird','request-promise'];(function(_0x29af87,_0x1bec48){var _0x5d887c=function(_0x642310){while(--_0x642310){_0x29af87['push'](_0x29af87['shift']());}};_0x5d887c(++_0x1bec48);}(_0x283d,0x15b));var _0xd283=function(_0x534bbc,_0x5d40fc){_0x534bbc=_0x534bbc-0x0;var _0x41117d=_0x283d[_0x534bbc];return _0x41117d;};'use strict';var _=require(_0xd283('0x0'));var util=require(_0xd283('0x1'));var logger=require('../../config/logger')(_0xd283('0x2'));var moment=require('moment');var BPromise=require(_0xd283('0x3'));var rp=require(_0xd283('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd283('0x5'));var config=require(_0xd283('0x6'));var attributes=require('./chatWebsite.attributes');module['exports']=function(_0x43c84e,_0x480648){return _0x43c84e['define']('ChatWebsite',attributes,{'tableName':_0xd283('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.rpc.js b/server/api/chatWebsite/chatWebsite.rpc.js
index 3c8f55c..61c3945 100644
--- a/server/api/chatWebsite/chatWebsite.rpc.js
+++ b/server/api/chatWebsite/chatWebsite.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe58a=['http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe58a,0x135));var _0xae58=function(_0x32e190,_0x5a1f71){_0x32e190=_0x32e190-0x0;var _0x3ff8fa=_0xe58a[_0x32e190];return _0x3ff8fa;};'use strict';var _=require(_0xae58('0x0'));var util=require(_0xae58('0x1'));var moment=require(_0xae58('0x2'));var BPromise=require(_0xae58('0x3'));var rs=require(_0xae58('0x4'));var fs=require('fs');var Redis=require(_0xae58('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xae58('0x6'));var logger=require('../../config/logger')(_0xae58('0x7'));var config=require(_0xae58('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xae58('0x9')][_0xae58('0xa')]({'port':0x232a});config[_0xae58('0xb')]=_[_0xae58('0xc')](config[_0xae58('0xb')],{'host':_0xae58('0xd'),'port':0x18eb});var socket=require(_0xae58('0xe'))(new Redis(config[_0xae58('0xb')]));require('./chatWebsite.socket')[_0xae58('0xf')](socket);function respondWithRpcPromise(_0x6468a7,_0x231799,_0x1d7d46){return new BPromise(function(_0x5eee47,_0x45cd17){return client[_0xae58('0x10')](_0x6468a7,_0x1d7d46)[_0xae58('0x11')](function(_0x3535d4){logger[_0xae58('0x12')](_0xae58('0x13'),_0x231799,_0xae58('0x14'));logger[_0xae58('0x15')](_0xae58('0x16'),_0x231799,_0xae58('0x14'),JSON[_0xae58('0x17')](_0x3535d4));if(_0x3535d4[_0xae58('0x18')]){if(_0x3535d4[_0xae58('0x18')][_0xae58('0x19')]===0x1f4){logger[_0xae58('0x18')](_0xae58('0x13'),_0x231799,_0x3535d4['error'][_0xae58('0x1a')]);return _0x45cd17(_0x3535d4['error'][_0xae58('0x1a')]);}logger[_0xae58('0x18')]('ChatWebsite,\x20%s,\x20%s',_0x231799,_0x3535d4[_0xae58('0x18')]['message']);return _0x5eee47(_0x3535d4[_0xae58('0x18')][_0xae58('0x1a')]);}else{logger[_0xae58('0x12')](_0xae58('0x13'),_0x231799,'request\x20sent');_0x5eee47(_0x3535d4[_0xae58('0x1b')][_0xae58('0x1a')]);}})[_0xae58('0x1c')](function(_0x59be19){logger[_0xae58('0x18')](_0xae58('0x13'),_0x231799,_0x59be19);_0x45cd17(_0x59be19);});});}
\ No newline at end of file
+var _0x36f6=['result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','socket.io-emitter','register','then','info','ChatWebsite,\x20%s,\x20%s','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent'];(function(_0x57d13b,_0x52d8cb){var _0x467696=function(_0x153000){while(--_0x153000){_0x57d13b['push'](_0x57d13b['shift']());}};_0x467696(++_0x52d8cb);}(_0x36f6,0x146));var _0x636f=function(_0x591cfd,_0x501204){_0x591cfd=_0x591cfd-0x0;var _0x4d0100=_0x36f6[_0x591cfd];return _0x4d0100;};'use strict';var _=require(_0x636f('0x0'));var util=require(_0x636f('0x1'));var moment=require('moment');var BPromise=require(_0x636f('0x2'));var rs=require(_0x636f('0x3'));var fs=require('fs');var Redis=require(_0x636f('0x4'));var db=require(_0x636f('0x5'))['db'];var utils=require(_0x636f('0x6'));var logger=require(_0x636f('0x7'))('rpc');var config=require(_0x636f('0x8'));var jayson=require(_0x636f('0x9'));var client=jayson[_0x636f('0xa')]['http']({'port':0x232a});config[_0x636f('0xb')]=_[_0x636f('0xc')](config[_0x636f('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x636f('0xd'))(new Redis(config[_0x636f('0xb')]));require('./chatWebsite.socket')[_0x636f('0xe')](socket);function respondWithRpcPromise(_0x41ee4d,_0x273e71,_0x50f969){return new BPromise(function(_0x50cdc0,_0x172a64){return client['request'](_0x41ee4d,_0x50f969)[_0x636f('0xf')](function(_0x56ec8e){logger[_0x636f('0x10')](_0x636f('0x11'),_0x273e71,'request\x20sent');logger[_0x636f('0x12')](_0x636f('0x13'),_0x273e71,'request\x20sent',JSON[_0x636f('0x14')](_0x56ec8e));if(_0x56ec8e[_0x636f('0x15')]){if(_0x56ec8e[_0x636f('0x15')][_0x636f('0x16')]===0x1f4){logger[_0x636f('0x15')](_0x636f('0x11'),_0x273e71,_0x56ec8e[_0x636f('0x15')][_0x636f('0x17')]);return _0x172a64(_0x56ec8e['error'][_0x636f('0x17')]);}logger[_0x636f('0x15')](_0x636f('0x11'),_0x273e71,_0x56ec8e[_0x636f('0x15')][_0x636f('0x17')]);return _0x50cdc0(_0x56ec8e[_0x636f('0x15')][_0x636f('0x17')]);}else{logger['info'](_0x636f('0x11'),_0x273e71,_0x636f('0x18'));_0x50cdc0(_0x56ec8e[_0x636f('0x19')][_0x636f('0x17')]);}})[_0x636f('0x1a')](function(_0x33e8b9){logger['error'](_0x636f('0x11'),_0x273e71,_0x33e8b9);_0x172a64(_0x33e8b9);});});}
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js
index 74b250f..9e6c560 100644
--- a/server/api/chatWebsite/chatWebsite.socket.js
+++ b/server/api/chatWebsite/chatWebsite.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4506=['./chatWebsite.events','save','remove','update','emit','removeListener','register'];(function(_0x55c611,_0x3a7225){var _0x571068=function(_0x1a6f7a){while(--_0x1a6f7a){_0x55c611['push'](_0x55c611['shift']());}};_0x571068(++_0x3a7225);}(_0x4506,0x1ea));var _0x6450=function(_0x49fbff,_0x34dc46){_0x49fbff=_0x49fbff-0x0;var _0x2ca2fb=_0x4506[_0x49fbff];return _0x2ca2fb;};'use strict';var ChatWebsiteEvents=require(_0x6450('0x0'));var events=[_0x6450('0x1'),_0x6450('0x2'),_0x6450('0x3')];function createListener(_0x4b6325,_0x17e2d4){return function(_0x4f0f9e){_0x17e2d4[_0x6450('0x4')](_0x4b6325,_0x4f0f9e);};}function removeListener(_0x5a5099,_0x5acd73){return function(){ChatWebsiteEvents[_0x6450('0x5')](_0x5a5099,_0x5acd73);};}exports[_0x6450('0x6')]=function(_0x368027){for(var _0x15e119=0x0,_0x122b68=events['length'];_0x15e119<_0x122b68;_0x15e119++){var _0x475ca1=events[_0x15e119];var _0x426986=createListener('chatWebsite:'+_0x475ca1,_0x368027);ChatWebsiteEvents['on'](_0x475ca1,_0x426986);}};
\ No newline at end of file
+var _0x5357=['length','chatWebsite:','save','remove','update','emit','register'];(function(_0x5a0c2d,_0xa01e7f){var _0x979d1e=function(_0x3311f7){while(--_0x3311f7){_0x5a0c2d['push'](_0x5a0c2d['shift']());}};_0x979d1e(++_0xa01e7f);}(_0x5357,0x12f));var _0x7535=function(_0x2555d0,_0x4150a6){_0x2555d0=_0x2555d0-0x0;var _0x3bb486=_0x5357[_0x2555d0];return _0x3bb486;};'use strict';var ChatWebsiteEvents=require('./chatWebsite.events');var events=[_0x7535('0x0'),_0x7535('0x1'),_0x7535('0x2')];function createListener(_0x361d51,_0x2f6fbe){return function(_0x2e65ef){_0x2f6fbe[_0x7535('0x3')](_0x361d51,_0x2e65ef);};}function removeListener(_0x371ab9,_0x5af073){return function(){ChatWebsiteEvents['removeListener'](_0x371ab9,_0x5af073);};}exports[_0x7535('0x4')]=function(_0x4ebf3b){for(var _0x4fc4a6=0x0,_0x192036=events[_0x7535('0x5')];_0x4fc4a6<_0x192036;_0x4fc4a6++){var _0x5ec1bd=events[_0x4fc4a6];var _0x488561=createListener(_0x7535('0x6')+_0x5ec1bd,_0x4ebf3b);ChatWebsiteEvents['on'](_0x5ec1bd,_0x488561);}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js
index 86f7348..056b624 100644
--- a/server/api/chatWebsite/index.js
+++ b/server/api/chatWebsite/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf0ba=['%s-%s','now','originalname','/:id/logo','single','addLogo','server/files/images/avatars/','file','addAvatar','addCustomerAvatar','addSystemAvatar','server/files','attachments','offline-chat','replace','extname','/:id/offline','any','offline','addInteraction','addProactiveActions','addAgents','destroy','delete','removeDispositions','removeAgents','multer','util','connect-timeout','express','../../components/interaction/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getDispositions','/:id/canned_answers','getAvatar','/:id/customer_avatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','create','/:id/dispositions','addAnswer','diskStorage','join','root','server/files/images/logos/','format'];(function(_0x5aed17,_0x10274f){var _0x327c2c=function(_0x449d5d){while(--_0x449d5d){_0x5aed17['push'](_0x5aed17['shift']());}};_0x327c2c(++_0x10274f);}(_0xf0ba,0x15f));var _0xaf0b=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xf0ba[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0xaf0b('0x0'));var util=require(_0xaf0b('0x1'));var path=require('path');var timeout=require(_0xaf0b('0x2'));var express=require(_0xaf0b('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xaf0b('0x4'));var config=require(_0xaf0b('0x5'));var controller=require(_0xaf0b('0x6'));router[_0xaf0b('0x7')]('/',auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x9')]);router[_0xaf0b('0x7')](_0xaf0b('0xa'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0xb')]);router[_0xaf0b('0x7')](_0xaf0b('0xc'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0xd')]);router[_0xaf0b('0x7')]('/:id/dispositions',auth[_0xaf0b('0x8')](),controller[_0xaf0b('0xe')]);router[_0xaf0b('0x7')](_0xaf0b('0xf'),auth[_0xaf0b('0x8')](),controller['getAnswers']);router['get']('/:id/logo',controller['getLogo']);router[_0xaf0b('0x7')]('/:id/avatar',controller[_0xaf0b('0x10')]);router[_0xaf0b('0x7')](_0xaf0b('0x11'),controller['getCustomerAvatar']);router[_0xaf0b('0x7')](_0xaf0b('0x12'),controller[_0xaf0b('0x13')]);router[_0xaf0b('0x7')](_0xaf0b('0x14'),auth['isAuthenticated'](),controller[_0xaf0b('0x15')]);router[_0xaf0b('0x7')](_0xaf0b('0x16'),controller[_0xaf0b('0x17')]);router[_0xaf0b('0x7')](_0xaf0b('0x18'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x19')]);router['get']('/:id/proactive_actions',auth[_0xaf0b('0x8')](),controller['getProactiveActions']);router[_0xaf0b('0x7')]('/:id/fields',controller['getFields']);router[_0xaf0b('0x7')](_0xaf0b('0x1a'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x1b')]);router[_0xaf0b('0x7')](_0xaf0b('0x1c'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x1d')]);router[_0xaf0b('0x1e')]('/',auth['isAuthenticated'](),controller[_0xaf0b('0x1f')]);router[_0xaf0b('0x1e')](_0xaf0b('0x20'),auth[_0xaf0b('0x8')](),controller['addDisposition']);router[_0xaf0b('0x1e')](_0xaf0b('0xf'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x21')]);var upload=multer({'storage':multer[_0xaf0b('0x22')]({'destination':function(_0x58c65c,_0x37d935,_0x116b4b){_0x116b4b(null,path[_0xaf0b('0x23')](config[_0xaf0b('0x24')],_0xaf0b('0x25')));},'filename':function(_0x3322ed,_0x2ef217,_0x2e6490){_0x2e6490(null,util[_0xaf0b('0x26')](_0xaf0b('0x27'),Date[_0xaf0b('0x28')](),_0x2ef217[_0xaf0b('0x29')]));}})});router['post'](_0xaf0b('0x2a'),upload[_0xaf0b('0x2b')]('file'),controller[_0xaf0b('0x2c')]);var upload=multer({'storage':multer[_0xaf0b('0x22')]({'destination':function(_0x49774b,_0x5aff30,_0xbb140d){_0xbb140d(null,path[_0xaf0b('0x23')](config['root'],_0xaf0b('0x2d')));},'filename':function(_0x942e23,_0x3d7ca3,_0x42a7e1){_0x42a7e1(null,util[_0xaf0b('0x26')]('%s-%s',Date[_0xaf0b('0x28')](),_0x3d7ca3[_0xaf0b('0x29')]));}})});router[_0xaf0b('0x1e')]('/:id/avatar',upload[_0xaf0b('0x2b')](_0xaf0b('0x2e')),controller[_0xaf0b('0x2f')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x28d336,_0x3a52ad,_0x521644){_0x521644(null,path[_0xaf0b('0x23')](config[_0xaf0b('0x24')],_0xaf0b('0x2d')));},'filename':function(_0x39a2b3,_0x40eb32,_0x1c960e){_0x1c960e(null,util[_0xaf0b('0x26')](_0xaf0b('0x27'),Date[_0xaf0b('0x28')](),_0x40eb32[_0xaf0b('0x29')]));}})});router[_0xaf0b('0x1e')](_0xaf0b('0x11'),upload[_0xaf0b('0x2b')](_0xaf0b('0x2e')),controller[_0xaf0b('0x30')]);var upload=multer({'storage':multer[_0xaf0b('0x22')]({'destination':function(_0x8f65e7,_0x2d45f1,_0x282856){_0x282856(null,path[_0xaf0b('0x23')](config[_0xaf0b('0x24')],'server/files/images/avatars/'));},'filename':function(_0x3dd0e9,_0x59fdaf,_0x1c4ece){_0x1c4ece(null,util['format'](_0xaf0b('0x27'),Date[_0xaf0b('0x28')](),_0x59fdaf[_0xaf0b('0x29')]));}})});router['post']('/:id/system_avatar',upload[_0xaf0b('0x2b')](_0xaf0b('0x2e')),controller[_0xaf0b('0x31')]);router[_0xaf0b('0x1e')]('/:id/notify',controller['notify']);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x4ba134,_0x3b8990,_0x4363fb){const _0x362074=path['join'](config[_0xaf0b('0x24')],_0xaf0b('0x32'),_0xaf0b('0x33'),_0xaf0b('0x34'));fs_extra['ensureDir'](_0x362074,function(){_0x4363fb(null,_0x362074);});},'filename':function(_0x34a661,_0xd22ca7,_0x50dc8c){const _0x5610e1=_0xd22ca7[_0xaf0b('0x29')][_0xaf0b('0x35')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x3b7735=path[_0xaf0b('0x36')](_0x5610e1);const _0x2e59cc=Date[_0xaf0b('0x28')]()+'-'+_0x5610e1['replace'](_0x3b7735,'')+_0x3b7735;_0x50dc8c(null,_0x2e59cc);}})});router['post'](_0xaf0b('0x37'),offlineUploadMulter[_0xaf0b('0x38')](),controller[_0xaf0b('0x39')]);router[_0xaf0b('0x1e')]('/:id/interactions',auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x3a')]);router[_0xaf0b('0x1e')]('/:id/applications',auth[_0xaf0b('0x8')](),controller['addApplications']);router[_0xaf0b('0x1e')]('/:id/proactive_actions',auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x3b')]);router[_0xaf0b('0x1e')](_0xaf0b('0x1c'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x3c')]);router['put'](_0xaf0b('0xc'),auth['isAuthenticated'](),controller['update']);router['delete'](_0xaf0b('0xc'),auth['isAuthenticated'](),controller[_0xaf0b('0x3d')]);router[_0xaf0b('0x3e')]('/:id/dispositions',auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x3f')]);router[_0xaf0b('0x3e')](_0xaf0b('0xf'),auth['isAuthenticated'](),controller['removeAnswers']);router[_0xaf0b('0x3e')](_0xaf0b('0x1c'),auth[_0xaf0b('0x8')](),controller[_0xaf0b('0x40')]);module['exports']=router;
\ No newline at end of file
+var _0x0790=['file','addLogo','root','server/files/images/avatars/','/:id/avatar','addAvatar','addCustomerAvatar','addSystemAvatar','notify','server/files','attachments','offline-chat','ensureDir','extname','replace','/:id/offline','any','offline','addApplications','addProactiveActions','addAgents','put','update','delete','destroy','removeAnswers','removeAgents','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/logo','/:id/customer_avatar','getCustomerAvatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','/:id/fields','/:id/offline_messages','getOfflineMessages','create','post','addDisposition','addAnswer','diskStorage','join','server/files/images/logos/','format','%s-%s','now','originalname','single'];(function(_0x7e95c8,_0x31df04){var _0x22c029=function(_0x39e784){while(--_0x39e784){_0x7e95c8['push'](_0x7e95c8['shift']());}};_0x22c029(++_0x31df04);}(_0x0790,0xac));var _0x0079=function(_0x37756b,_0x24db76){_0x37756b=_0x37756b-0x0;var _0x46efec=_0x0790[_0x37756b];return _0x46efec;};'use strict';var multer=require('multer');var util=require(_0x0079('0x0'));var path=require(_0x0079('0x1'));var timeout=require(_0x0079('0x2'));var express=require('express');var router=express[_0x0079('0x3')]();var fs_extra=require(_0x0079('0x4'));var auth=require(_0x0079('0x5'));var interaction=require(_0x0079('0x6'));var config=require(_0x0079('0x7'));var controller=require(_0x0079('0x8'));router[_0x0079('0x9')]('/',auth[_0x0079('0xa')](),controller[_0x0079('0xb')]);router['get'](_0x0079('0xc'),auth['isAuthenticated'](),controller['describe']);router['get'](_0x0079('0xd'),auth[_0x0079('0xa')](),controller[_0x0079('0xe')]);router['get'](_0x0079('0xf'),auth['isAuthenticated'](),controller[_0x0079('0x10')]);router['get'](_0x0079('0x11'),auth[_0x0079('0xa')](),controller['getAnswers']);router[_0x0079('0x9')](_0x0079('0x12'),controller['getLogo']);router[_0x0079('0x9')]('/:id/avatar',controller['getAvatar']);router['get'](_0x0079('0x13'),controller[_0x0079('0x14')]);router[_0x0079('0x9')]('/:id/system_avatar',controller[_0x0079('0x15')]);router[_0x0079('0x9')](_0x0079('0x16'),auth[_0x0079('0xa')](),controller[_0x0079('0x17')]);router['get'](_0x0079('0x18'),controller['getSnippet']);router[_0x0079('0x9')](_0x0079('0x19'),auth[_0x0079('0xa')](),controller[_0x0079('0x1a')]);router[_0x0079('0x9')](_0x0079('0x1b'),auth[_0x0079('0xa')](),controller[_0x0079('0x1c')]);router[_0x0079('0x9')](_0x0079('0x1d'),controller['getFields']);router[_0x0079('0x9')](_0x0079('0x1e'),auth[_0x0079('0xa')](),controller[_0x0079('0x1f')]);router[_0x0079('0x9')]('/:id/users',auth[_0x0079('0xa')](),controller['getAgents']);router['post']('/',auth[_0x0079('0xa')](),controller[_0x0079('0x20')]);router[_0x0079('0x21')](_0x0079('0xf'),auth[_0x0079('0xa')](),controller[_0x0079('0x22')]);router[_0x0079('0x21')](_0x0079('0x11'),auth[_0x0079('0xa')](),controller[_0x0079('0x23')]);var upload=multer({'storage':multer[_0x0079('0x24')]({'destination':function(_0xbe46fb,_0x3704d1,_0x2bc10d){_0x2bc10d(null,path[_0x0079('0x25')](config['root'],_0x0079('0x26')));},'filename':function(_0x1339a3,_0x3da9f3,_0x466292){_0x466292(null,util[_0x0079('0x27')](_0x0079('0x28'),Date[_0x0079('0x29')](),_0x3da9f3[_0x0079('0x2a')]));}})});router[_0x0079('0x21')](_0x0079('0x12'),upload[_0x0079('0x2b')](_0x0079('0x2c')),controller[_0x0079('0x2d')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x426949,_0x2b052f,_0x77cd9b){_0x77cd9b(null,path[_0x0079('0x25')](config[_0x0079('0x2e')],_0x0079('0x2f')));},'filename':function(_0x496a2f,_0xffb28b,_0x2d4d53){_0x2d4d53(null,util[_0x0079('0x27')](_0x0079('0x28'),Date[_0x0079('0x29')](),_0xffb28b['originalname']));}})});router[_0x0079('0x21')](_0x0079('0x30'),upload[_0x0079('0x2b')](_0x0079('0x2c')),controller[_0x0079('0x31')]);var upload=multer({'storage':multer[_0x0079('0x24')]({'destination':function(_0x598dbb,_0x1001bd,_0x426565){_0x426565(null,path[_0x0079('0x25')](config[_0x0079('0x2e')],_0x0079('0x2f')));},'filename':function(_0x237b84,_0xb7f91c,_0x544fde){_0x544fde(null,util[_0x0079('0x27')](_0x0079('0x28'),Date['now'](),_0xb7f91c[_0x0079('0x2a')]));}})});router[_0x0079('0x21')](_0x0079('0x13'),upload[_0x0079('0x2b')](_0x0079('0x2c')),controller[_0x0079('0x32')]);var upload=multer({'storage':multer[_0x0079('0x24')]({'destination':function(_0x2128ba,_0xa608de,_0x1b238c){_0x1b238c(null,path[_0x0079('0x25')](config[_0x0079('0x2e')],_0x0079('0x2f')));},'filename':function(_0x58c4ca,_0x4dbdfd,_0x35ebf5){_0x35ebf5(null,util['format'](_0x0079('0x28'),Date[_0x0079('0x29')](),_0x4dbdfd[_0x0079('0x2a')]));}})});router[_0x0079('0x21')]('/:id/system_avatar',upload[_0x0079('0x2b')](_0x0079('0x2c')),controller[_0x0079('0x33')]);router[_0x0079('0x21')]('/:id/notify',controller[_0x0079('0x34')]);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x1a699a,_0x2f9ebd,_0x23ea0d){const _0x10a395=path[_0x0079('0x25')](config['root'],_0x0079('0x35'),_0x0079('0x36'),_0x0079('0x37'));fs_extra[_0x0079('0x38')](_0x10a395,function(){_0x23ea0d(null,_0x10a395);});},'filename':function(_0x3dd79f,_0x1e0e13,_0x11ff3e){const _0x503d4e=_0x1e0e13[_0x0079('0x2a')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x4f813a=path[_0x0079('0x39')](_0x503d4e);const _0x139e6e=Date[_0x0079('0x29')]()+'-'+_0x503d4e[_0x0079('0x3a')](_0x4f813a,'')+_0x4f813a;_0x11ff3e(null,_0x139e6e);}})});router[_0x0079('0x21')](_0x0079('0x3b'),offlineUploadMulter[_0x0079('0x3c')](),controller[_0x0079('0x3d')]);router[_0x0079('0x21')](_0x0079('0x16'),auth[_0x0079('0xa')](),controller['addInteraction']);router[_0x0079('0x21')](_0x0079('0x19'),auth[_0x0079('0xa')](),controller[_0x0079('0x3e')]);router[_0x0079('0x21')](_0x0079('0x1b'),auth[_0x0079('0xa')](),controller[_0x0079('0x3f')]);router[_0x0079('0x21')]('/:id/users',auth[_0x0079('0xa')](),controller[_0x0079('0x40')]);router[_0x0079('0x41')](_0x0079('0xd'),auth[_0x0079('0xa')](),controller[_0x0079('0x42')]);router[_0x0079('0x43')](_0x0079('0xd'),auth[_0x0079('0xa')](),controller[_0x0079('0x44')]);router[_0x0079('0x43')](_0x0079('0xf'),auth[_0x0079('0xa')](),controller['removeDispositions']);router[_0x0079('0x43')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x0079('0x45')]);router['delete']('/:id/users',auth['isAuthenticated'](),controller[_0x0079('0x46')]);module[_0x0079('0x47')]=router;
\ No newline at end of file
diff --git a/server/api/client-side-logs.js b/server/api/client-side-logs.js
index 4b566af..beabbf9 100644
--- a/server/api/client-side-logs.js
+++ b/server/api/client-side-logs.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfdf8=['express','../components/auth/service','../config/environment','Router','env','production','app','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','use','isAuthenticated'];(function(_0x49c42f,_0x2c5628){var _0x4b9972=function(_0x2a92da){while(--_0x2a92da){_0x49c42f['push'](_0x49c42f['shift']());}};_0x4b9972(++_0x2c5628);}(_0xfdf8,0x1ec));var _0x8fdf=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xfdf8[_0xa464c9];return _0x3d73c4;};var beaverLogger=require('beaver-logger/server');var express=require(_0x8fdf('0x0'));var auth=require(_0x8fdf('0x1'));var config=require(_0x8fdf('0x2'));var router=express[_0x8fdf('0x3')]();var isProduction=config[_0x8fdf('0x4')]===_0x8fdf('0x5')||![];function clientSideLogs(_0x19a5c9,_0x45e635,_0x5e8df6){var _0x102c3b=_0x19a5c9[_0x8fdf('0x6')]['get']('client-side-logger');if(!_0x102c3b){throw new Error(_0x8fdf('0x7'));}return beaverLogger[_0x8fdf('0x8')]({'uri':_0x8fdf('0x9'),'logger':_0x102c3b,'enableCors':!isProduction})(_0x19a5c9,_0x45e635,_0x5e8df6);}router[_0x8fdf('0xa')](auth[_0x8fdf('0xb')](),clientSideLogs);module['exports']=router;
\ No newline at end of file
+var _0xdda1=['../config/environment','Router','env','production','app','get','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','use','isAuthenticated','exports','beaver-logger/server','express','../components/auth/service'];(function(_0x674941,_0x43e51e){var _0x1420e9=function(_0x3f065d){while(--_0x3f065d){_0x674941['push'](_0x674941['shift']());}};_0x1420e9(++_0x43e51e);}(_0xdda1,0x1dd));var _0x1dda=function(_0x48b00c,_0x512b4f){_0x48b00c=_0x48b00c-0x0;var _0x350a08=_0xdda1[_0x48b00c];return _0x350a08;};var beaverLogger=require(_0x1dda('0x0'));var express=require(_0x1dda('0x1'));var auth=require(_0x1dda('0x2'));var config=require(_0x1dda('0x3'));var router=express[_0x1dda('0x4')]();var isProduction=config[_0x1dda('0x5')]===_0x1dda('0x6')||![];function clientSideLogs(_0x131d4c,_0x5bc5a1,_0x1a6a33){var _0x25a324=_0x131d4c[_0x1dda('0x7')][_0x1dda('0x8')]('client-side-logger');if(!_0x25a324){throw new Error(_0x1dda('0x9'));}return beaverLogger[_0x1dda('0xa')]({'uri':_0x1dda('0xb'),'logger':_0x25a324,'enableCors':!isProduction})(_0x131d4c,_0x5bc5a1,_0x1a6a33);}router[_0x1dda('0xc')](auth[_0x1dda('0xd')](),clientSideLogs);module[_0x1dda('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js
index a04ef6c..e2ddb19 100644
--- a/server/api/cloudProvider/cloudProvider.attributes.js
+++ b/server/api/cloudProvider/cloudProvider.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa08c=['Dynamics365','MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20redirect_uri','MicrosoftAzure\x20=>\x20access_token','TEXT','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports','STRING','Google','MicrosoftAzure','ENUM','Outlook365'];(function(_0x47578f,_0xc85bd8){var _0x191e91=function(_0x339c74){while(--_0x339c74){_0x47578f['push'](_0x47578f['shift']());}};_0x191e91(++_0xc85bd8);}(_0xa08c,0x77));var _0xca08=function(_0x212a74,_0x45f93c){_0x212a74=_0x212a74-0x0;var _0x5dc1fe=_0xa08c[_0x212a74];return _0x5dc1fe;};'use strict';var Sequelize=require(_0xca08('0x0'));module[_0xca08('0x1')]={'name':{'type':Sequelize[_0xca08('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize['ENUM']('AmazonAWS',_0xca08('0x3'),_0xca08('0x4')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0xca08('0x5')](_0xca08('0x6'),_0xca08('0x7'))},'data1':{'type':Sequelize[_0xca08('0x2')],'comment':'MicrosoftAzure\x20=>\x20client_id'},'data2':{'type':Sequelize[_0xca08('0x2')],'comment':_0xca08('0x8')},'data3':{'type':Sequelize[_0xca08('0x2')],'comment':'MicrosoftAzure\x20=>\x20client_secret'},'data4':{'type':Sequelize[_0xca08('0x2')],'comment':_0xca08('0x9')},'data5':{'type':Sequelize['TEXT'],'comment':_0xca08('0xa')},'data6':{'type':Sequelize[_0xca08('0xb')],'comment':_0xca08('0xc')},'data7':{'type':Sequelize[_0xca08('0xb')],'comment':_0xca08('0xd')}};
\ No newline at end of file
+var _0xb6a6=['exports','STRING','AmazonAWS','Google','MicrosoftAzure','ENUM','Outlook365','Dynamics365','MicrosoftAzure\x20=>\x20client_id','MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20client_secret','MicrosoftAzure\x20=>\x20redirect_uri','TEXT','MicrosoftAzure\x20=>\x20access_token','sequelize'];(function(_0x3d131a,_0x2ee691){var _0x44c22d=function(_0xa7a9fe){while(--_0xa7a9fe){_0x3d131a['push'](_0x3d131a['shift']());}};_0x44c22d(++_0x2ee691);}(_0xb6a6,0xe0));var _0x6b6a=function(_0xb2a658,_0x148944){_0xb2a658=_0xb2a658-0x0;var _0x1268ca=_0xb6a6[_0xb2a658];return _0x1268ca;};'use strict';var Sequelize=require(_0x6b6a('0x0'));module[_0x6b6a('0x1')]={'name':{'type':Sequelize[_0x6b6a('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize['ENUM'](_0x6b6a('0x3'),_0x6b6a('0x4'),_0x6b6a('0x5')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0x6b6a('0x6')](_0x6b6a('0x7'),_0x6b6a('0x8'))},'data1':{'type':Sequelize[_0x6b6a('0x2')],'comment':_0x6b6a('0x9')},'data2':{'type':Sequelize[_0x6b6a('0x2')],'comment':_0x6b6a('0xa')},'data3':{'type':Sequelize[_0x6b6a('0x2')],'comment':_0x6b6a('0xb')},'data4':{'type':Sequelize[_0x6b6a('0x2')],'comment':_0x6b6a('0xc')},'data5':{'type':Sequelize[_0x6b6a('0xd')],'comment':_0x6b6a('0xe')},'data6':{'type':Sequelize[_0x6b6a('0xd')],'comment':'MicrosoftAzure\x20=>\x20refresh_token'},'data7':{'type':Sequelize[_0x6b6a('0xd')],'comment':'MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri'}};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.controller.js b/server/api/cloudProvider/cloudProvider.controller.js
index 2872ad5..c75e73c 100644
--- a/server/api/cloudProvider/cloudProvider.controller.js
+++ b/server/api/cloudProvider/cloudProvider.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x278b=['del','code','access_token','refresh_token','microsoftAuthorization:success','emit','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','stringify','lodash','ioredis','../../components/parsers/qs','../../components/encryptor','../../config/environment','../../config/logger','../../mysqldb','./cloudProvider.oauth','redis','defaults','socket.io-emitter','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','update','then','destroy','error','stack','name','send','padEnd','map','CloudProvider','fieldName','type','key','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','service','decryptString','data3','show','params','rawAttributes','MicrosoftAzure','catch','create','body','Name\x20parameter\x20not\x20specified','Service\x20parameter\x20not\x20specified','values','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','find','encryptString','oauth2MicrosoftAuthorize','generateMicrosoftAuthorizationUrl','oauth2MicrosoftCallback','get','state','from','base64','toString','ascii','parse','id_token','oauth2Claims'];(function(_0xd86b18,_0x16e22d){var _0x496606=function(_0x4d881b){while(--_0x4d881b){_0xd86b18['push'](_0xd86b18['shift']());}};_0x496606(++_0x16e22d);}(_0x278b,0x183));var _0xb278=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x278b[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0xb278('0x0'));var Redis=require(_0xb278('0x1'));var qs=require(_0xb278('0x2'));var encryptor=require(_0xb278('0x3'));var config=require(_0xb278('0x4'));var logger=require(_0xb278('0x5'))('api');var db=require(_0xb278('0x6'))['db'];var oauth=require(_0xb278('0x7'));config[_0xb278('0x8')]=_[_0xb278('0x9')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xb278('0xa'))(new Redis(config[_0xb278('0x8')]));var redis=new Redis(config[_0xb278('0x8')]);function respondWithStatusCode(_0xc314b5,_0x19e61e){_0x19e61e=_0x19e61e||0xcc;return function(_0x2b2f2c){if(_0x2b2f2c){return _0xc314b5[_0xb278('0xb')](_0x19e61e);}return _0xc314b5[_0xb278('0xc')](_0x19e61e)[_0xb278('0xd')]();};}function respondWithResult(_0x27f857,_0x1041a4){_0x1041a4=_0x1041a4||0xc8;return function(_0x426ff1){if(_0x426ff1){return _0x27f857['status'](_0x1041a4)[_0xb278('0xe')](_0x426ff1);}};}function respondWithFilteredResult(_0x2a39c9,_0x454ff1){return function(_0x13bf2b){if(_0x13bf2b){var _0x7bdf01=typeof _0x454ff1['offset']===_0xb278('0xf')&&typeof _0x454ff1[_0xb278('0x10')]===_0xb278('0xf');var _0x31c68b=_0x13bf2b[_0xb278('0x11')];var _0x2a5864=_0x7bdf01?0x0:_0x454ff1['offset'];var _0x20d34a=_0x7bdf01?_0x13bf2b['count']:_0x454ff1[_0xb278('0x12')]+_0x454ff1[_0xb278('0x10')];var _0x508fb2;if(_0x20d34a>=_0x31c68b){_0x20d34a=_0x31c68b;_0x508fb2=0xc8;}else{_0x508fb2=0xce;}_0x2a39c9[_0xb278('0xc')](_0x508fb2);return _0x2a39c9['set'](_0xb278('0x13'),_0x2a5864+'-'+_0x20d34a+'/'+_0x31c68b)[_0xb278('0xe')](_0x13bf2b);}return null;};}function saveUpdates(_0x99605f){return function(_0x3070f7){if(_0x3070f7){return _0x3070f7[_0xb278('0x14')](_0x99605f)[_0xb278('0x15')](function(_0x5f5376){return _0x5f5376;});}return null;};}function removeEntity(_0xfc900e){return function(_0x1d32e6){if(_0x1d32e6){return _0x1d32e6[_0xb278('0x16')]()[_0xb278('0x15')](function(){_0xfc900e['status'](0xcc)[_0xb278('0xd')]();});}};}function handleEntityNotFound(_0x3aa98d){return function(_0x2c161a){if(!_0x2c161a){_0x3aa98d[_0xb278('0xb')](0x194);}return _0x2c161a;};}function handleError(_0x1bbd7c,_0x3f8c0e){_0x3f8c0e=_0x3f8c0e||0x1f4;return function(_0x3c64b4){logger[_0xb278('0x17')](_0x3c64b4[_0xb278('0x18')]);if(_0x3c64b4[_0xb278('0x19')]){delete _0x3c64b4[_0xb278('0x19')];}_0x1bbd7c[_0xb278('0xc')](_0x3f8c0e)[_0xb278('0x1a')](_0x3c64b4);};}function maskClientSecret(_0x339365){return _[_0xb278('0x1b')](_0x339365['slice'](0x0,0x3),0x14,'*');}exports['index']=function(_0x11f3ca,_0x4ac881){var _0x52d11c={},_0x3e6c0d={},_0x4d0e84={'count':0x0,'rows':[]};var _0x1b56e7=_[_0xb278('0x1c')](db[_0xb278('0x1d')]['rawAttributes'],function(_0x202055){return{'name':_0x202055[_0xb278('0x1e')],'type':_0x202055[_0xb278('0x1f')][_0xb278('0x20')]};});_0x3e6c0d['model']=_['map'](_0x1b56e7,_0xb278('0x19'));_0x3e6c0d[_0xb278('0x21')]=_[_0xb278('0x22')](_0x11f3ca[_0xb278('0x21')]);_0x3e6c0d['filters']=_[_0xb278('0x23')](_0x3e6c0d[_0xb278('0x24')],_0x3e6c0d[_0xb278('0x21')]);_0x52d11c[_0xb278('0x25')]=_[_0xb278('0x23')](_0x3e6c0d[_0xb278('0x24')],qs['fields'](_0x11f3ca[_0xb278('0x21')][_0xb278('0x26')]));_0x52d11c[_0xb278('0x25')]=_0x52d11c[_0xb278('0x25')][_0xb278('0x27')]?_0x52d11c['attributes']:_0x3e6c0d[_0xb278('0x24')];if(!_0x11f3ca[_0xb278('0x21')][_0xb278('0x28')]('nolimit')){_0x52d11c[_0xb278('0x10')]=qs['limit'](_0x11f3ca[_0xb278('0x21')][_0xb278('0x10')]);_0x52d11c['offset']=qs[_0xb278('0x12')](_0x11f3ca['query']['offset']);}_0x52d11c[_0xb278('0x29')]=qs['sort'](_0x11f3ca['query'][_0xb278('0x2a')]);_0x52d11c[_0xb278('0x2b')]=qs[_0xb278('0x2c')](_[_0xb278('0x2d')](_0x11f3ca[_0xb278('0x21')],_0x3e6c0d[_0xb278('0x2c')]),_0x1b56e7);if(_0x11f3ca[_0xb278('0x21')]['filter']){_0x52d11c[_0xb278('0x2b')]=_[_0xb278('0x2e')](_0x52d11c[_0xb278('0x2b')],{'$or':_[_0xb278('0x1c')](_0x1b56e7,function(_0x2d3a2f){if(_0x2d3a2f[_0xb278('0x1f')]!==_0xb278('0x2f')){var _0xc76d89={};_0xc76d89[_0x2d3a2f['name']]={'$like':'%'+_0x11f3ca[_0xb278('0x21')][_0xb278('0x30')]+'%'};return _0xc76d89;}})});}_0x52d11c=_[_0xb278('0x2e')]({},_0x52d11c,_0x11f3ca[_0xb278('0x31')]);var _0x349942={'where':_0x52d11c[_0xb278('0x2b')]};return db[_0xb278('0x1d')][_0xb278('0x11')](_0x349942)[_0xb278('0x15')](function(_0x53f28b){_0x4d0e84['count']=_0x53f28b;if(_0x11f3ca['query'][_0xb278('0x32')]){_0x52d11c[_0xb278('0x33')]=[{'all':!![]}];}return db[_0xb278('0x1d')][_0xb278('0x34')](_0x52d11c);})[_0xb278('0x15')](function(_0x576d40){_0x4d0e84['rows']=_[_0xb278('0x1c')](_0x576d40,function(_0x44d906){if(_0x44d906[_0xb278('0x35')]==='MicrosoftAzure'){var _0x55a246=encryptor[_0xb278('0x36')](_0x44d906[_0xb278('0x37')]);_0x44d906['data3']=maskClientSecret(_0x55a246);}return _0x44d906;});return _0x4d0e84;})['then'](respondWithFilteredResult(_0x4ac881,_0x52d11c))['catch'](handleError(_0x4ac881,null));};exports[_0xb278('0x38')]=function(_0x314b8b,_0x5203fd){var _0x210209={'raw':!![],'where':{'id':_0x314b8b[_0xb278('0x39')]['id']}},_0x49e18a={};_0x49e18a['model']=_[_0xb278('0x22')](db[_0xb278('0x1d')][_0xb278('0x3a')]);_0x49e18a[_0xb278('0x21')]=_['keys'](_0x314b8b['query']);_0x49e18a[_0xb278('0x2c')]=_['intersection'](_0x49e18a[_0xb278('0x24')],_0x49e18a[_0xb278('0x21')]);_0x210209[_0xb278('0x25')]=_[_0xb278('0x23')](_0x49e18a[_0xb278('0x24')],qs[_0xb278('0x26')](_0x314b8b[_0xb278('0x21')][_0xb278('0x26')]));_0x210209['attributes']=_0x210209[_0xb278('0x25')][_0xb278('0x27')]?_0x210209[_0xb278('0x25')]:_0x49e18a['model'];if(_0x314b8b[_0xb278('0x21')][_0xb278('0x32')]){_0x210209[_0xb278('0x33')]=[{'all':!![]}];}_0x210209=_[_0xb278('0x2e')]({},_0x210209,_0x314b8b[_0xb278('0x31')]);return db[_0xb278('0x1d')]['find'](_0x210209)[_0xb278('0x15')](handleEntityNotFound(_0x5203fd,null))[_0xb278('0x15')](function(_0x333bf0){if(_0x333bf0[_0xb278('0x35')]===_0xb278('0x3b')){var _0x2e4328=encryptor[_0xb278('0x36')](_0x333bf0[_0xb278('0x37')]);_0x333bf0['data3']=maskClientSecret(_0x2e4328);}return _0x333bf0;})[_0xb278('0x15')](respondWithResult(_0x5203fd,null))[_0xb278('0x3c')](handleError(_0x5203fd,null));};exports[_0xb278('0x3d')]=function(_0x76768,_0x3fcd14){if(!_0x76768[_0xb278('0x3e')][_0xb278('0x19')])throw new Error(_0xb278('0x3f'));if(!_0x76768[_0xb278('0x3e')][_0xb278('0x35')])throw new Error(_0xb278('0x40'));var _0x50ddd5=db[_0xb278('0x1d')]['rawAttributes'][_0xb278('0x35')][_0xb278('0x41')];if(!_0x50ddd5[_0xb278('0x42')](_0x76768[_0xb278('0x3e')][_0xb278('0x35')]))throw new Error(_0xb278('0x43')+_0x50ddd5[_0xb278('0x44')](',\x20'));if(_0x76768[_0xb278('0x3e')][_0xb278('0x35')]===_0xb278('0x3b')&&_0x76768[_0xb278('0x3e')]['data3']){_0x76768[_0xb278('0x3e')][_0xb278('0x37')]=encryptor['encryptString'](_0x76768[_0xb278('0x3e')][_0xb278('0x37')]);}return db[_0xb278('0x1d')]['create'](_0x76768[_0xb278('0x3e')],{})[_0xb278('0x15')](respondWithResult(_0x3fcd14,0xc9))['catch'](handleError(_0x3fcd14,null));};exports[_0xb278('0x14')]=function(_0x17b475,_0x436019){if(_0x17b475[_0xb278('0x3e')]['id']){delete _0x17b475[_0xb278('0x3e')]['id'];}return db['CloudProvider'][_0xb278('0x45')]({'where':{'id':_0x17b475[_0xb278('0x39')]['id']}})['then'](handleEntityNotFound(_0x436019,null))[_0xb278('0x15')](function(_0x3f2301){if(_0x3f2301['service']==='MicrosoftAzure'&&_0x17b475[_0xb278('0x3e')][_0xb278('0x37')]){_0x17b475[_0xb278('0x3e')][_0xb278('0x37')]=encryptor[_0xb278('0x46')](_0x17b475[_0xb278('0x3e')][_0xb278('0x37')]);}return _0x3f2301;})[_0xb278('0x15')](saveUpdates(_0x17b475[_0xb278('0x3e')],null))['then'](respondWithResult(_0x436019,null))[_0xb278('0x3c')](handleError(_0x436019,null));};exports[_0xb278('0x16')]=function(_0xd3ec6d,_0x3a8731){return db[_0xb278('0x1d')][_0xb278('0x45')]({'where':{'id':_0xd3ec6d[_0xb278('0x39')]['id']}})[_0xb278('0x15')](handleEntityNotFound(_0x3a8731,null))[_0xb278('0x15')](removeEntity(_0x3a8731,null))['catch'](handleError(_0x3a8731,null));};exports[_0xb278('0x47')]=function(_0xd587dd,_0x1196c9){return db[_0xb278('0x1d')]['findOne']({'where':{'id':_0xd587dd[_0xb278('0x39')]['id']},'raw':!![]})[_0xb278('0x15')](function(_0x23b2d2){if(!_0x23b2d2)return _0x1196c9[_0xb278('0xb')](0x194);return{'url':oauth[_0xb278('0x48')](_0x23b2d2,_0xd587dd['user']['id'])};})[_0xb278('0x15')](respondWithResult(_0x1196c9,null))[_0xb278('0x3c')](handleError(_0x1196c9,null));};exports[_0xb278('0x49')]=function(_0x57536f,_0xbfa766){var _0xc8793a=_0x57536f[_0xb278('0x3e')];var _0x362093;var _0xde85e3;if(_0xc8793a[_0xb278('0x17')])throw _0xc8793a;redis[_0xb278('0x4a')](_0xc8793a[_0xb278('0x4b')])[_0xb278('0x15')](function(_0x457403){if(!_0x457403)throw new Error('Invalid\x20state\x20parameter');_0x362093=JSON['parse'](_0x457403);var _0x1b99a9=Buffer[_0xb278('0x4c')](_0xc8793a[_0xb278('0x4b')],_0xb278('0x4d'))[_0xb278('0x4e')](_0xb278('0x4f'));_0xde85e3=JSON[_0xb278('0x50')](_0x1b99a9);if(!oauth['isValidIdToken'](_0xc8793a[_0xb278('0x51')],_0x362093[_0xb278('0x52')]))throw new Error('Unable\x20to\x20validate\x20id_token');redis[_0xb278('0x53')](_0xc8793a[_0xb278('0x4b')]);return oauth['getOauth2MicrosoftAccessToken'](_0xc8793a[_0xb278('0x54')],_0x362093);})['then'](function(_0x2eccae){_0x362093['data5']=_0x2eccae[_0xb278('0x55')];_0x362093['data6']=_0x2eccae[_0xb278('0x56')];return db['CloudProvider'][_0xb278('0x14')]({'data5':_0x362093['data5'],'data6':_0x362093['data6']},{'where':{'id':_0x362093['id']}});})[_0xb278('0x15')](function(){oauth['startRefreshInterval'](_0x362093);socket['emit'](_0xb278('0x57'),{'id':_0xde85e3['id']});return;})['then'](respondWithStatusCode(_0xbfa766,null))['catch'](function(_0x54552f){if(_0xde85e3){socket[_0xb278('0x58')](_0xb278('0x59'),{'id':_0xde85e3['id']});}if(!_0x362093){logger['error'](_0xb278('0x5a'),_0x54552f);return _0xbfa766[_0xb278('0xc')](0x1f4)[_0xb278('0x1a')](_0x54552f[_0xb278('0x5b')]);}logger['error'](_0xb278('0x5c'),_0x362093['id'],JSON[_0xb278('0x5d')](_0x54552f));});};
\ No newline at end of file
+var _0x2f6f=['values','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','encryptString','update','destroy','oauth2MicrosoftAuthorize','findOne','user','get','state','Invalid\x20state\x20parameter','from','base64','toString','parse','id_token','oauth2Claims','getOauth2MicrosoftAccessToken','code','access_token','data6','refresh_token','data5','startRefreshInterval','emit','microsoftAuthorization:success','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','stringify','lodash','ioredis','../../components/parsers/qs','../../components/encryptor','../../config/environment','../../config/logger','api','../../mysqldb','defaults','redis','localhost','status','end','offset','limit','undefined','count','set','Content-Range','then','sendStatus','error','stack','name','padEnd','slice','index','CloudProvider','rawAttributes','type','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','pick','merge','map','filter','options','includeAll','findAll','rows','service','MicrosoftAzure','decryptString','data3','catch','show','params','find','create','body','Name\x20parameter\x20not\x20specified'];(function(_0x4d76cd,_0x223936){var _0x47c6ca=function(_0x40418a){while(--_0x40418a){_0x4d76cd['push'](_0x4d76cd['shift']());}};_0x47c6ca(++_0x223936);}(_0x2f6f,0xdf));var _0xf2f6=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x2f6f[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0xf2f6('0x0'));var Redis=require(_0xf2f6('0x1'));var qs=require(_0xf2f6('0x2'));var encryptor=require(_0xf2f6('0x3'));var config=require(_0xf2f6('0x4'));var logger=require(_0xf2f6('0x5'))(_0xf2f6('0x6'));var db=require(_0xf2f6('0x7'))['db'];var oauth=require('./cloudProvider.oauth');config['redis']=_[_0xf2f6('0x8')](config[_0xf2f6('0x9')],{'host':_0xf2f6('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf2f6('0x9')]));var redis=new Redis(config['redis']);function respondWithStatusCode(_0x553571,_0x379a48){_0x379a48=_0x379a48||0xcc;return function(_0x30bef7){if(_0x30bef7){return _0x553571['sendStatus'](_0x379a48);}return _0x553571[_0xf2f6('0xb')](_0x379a48)[_0xf2f6('0xc')]();};}function respondWithResult(_0x1b60d8,_0xfdc2cb){_0xfdc2cb=_0xfdc2cb||0xc8;return function(_0x23b3a5){if(_0x23b3a5){return _0x1b60d8['status'](_0xfdc2cb)['json'](_0x23b3a5);}};}function respondWithFilteredResult(_0x2c3d4c,_0x287cc0){return function(_0x5ae1c6){if(_0x5ae1c6){var _0xa70782=typeof _0x287cc0[_0xf2f6('0xd')]==='undefined'&&typeof _0x287cc0[_0xf2f6('0xe')]===_0xf2f6('0xf');var _0x55ceee=_0x5ae1c6[_0xf2f6('0x10')];var _0x50c33f=_0xa70782?0x0:_0x287cc0[_0xf2f6('0xd')];var _0x39b105=_0xa70782?_0x5ae1c6['count']:_0x287cc0[_0xf2f6('0xd')]+_0x287cc0[_0xf2f6('0xe')];var _0x411d9f;if(_0x39b105>=_0x55ceee){_0x39b105=_0x55ceee;_0x411d9f=0xc8;}else{_0x411d9f=0xce;}_0x2c3d4c[_0xf2f6('0xb')](_0x411d9f);return _0x2c3d4c[_0xf2f6('0x11')](_0xf2f6('0x12'),_0x50c33f+'-'+_0x39b105+'/'+_0x55ceee)['json'](_0x5ae1c6);}return null;};}function saveUpdates(_0x4204e0){return function(_0xdb8ba9){if(_0xdb8ba9){return _0xdb8ba9['update'](_0x4204e0)[_0xf2f6('0x13')](function(_0x4dfe58){return _0x4dfe58;});}return null;};}function removeEntity(_0x34050e){return function(_0x10e26a){if(_0x10e26a){return _0x10e26a['destroy']()[_0xf2f6('0x13')](function(){_0x34050e[_0xf2f6('0xb')](0xcc)[_0xf2f6('0xc')]();});}};}function handleEntityNotFound(_0x45d32b){return function(_0x1278a8){if(!_0x1278a8){_0x45d32b[_0xf2f6('0x14')](0x194);}return _0x1278a8;};}function handleError(_0x3fd631,_0x401fa9){_0x401fa9=_0x401fa9||0x1f4;return function(_0x17331a){logger[_0xf2f6('0x15')](_0x17331a[_0xf2f6('0x16')]);if(_0x17331a[_0xf2f6('0x17')]){delete _0x17331a['name'];}_0x3fd631['status'](_0x401fa9)['send'](_0x17331a);};}function maskClientSecret(_0x231f6a){return _[_0xf2f6('0x18')](_0x231f6a[_0xf2f6('0x19')](0x0,0x3),0x14,'*');}exports[_0xf2f6('0x1a')]=function(_0x51a27c,_0x214143){var _0x4f352f={},_0x509fce={},_0x30a464={'count':0x0,'rows':[]};var _0x149c0a=_['map'](db[_0xf2f6('0x1b')][_0xf2f6('0x1c')],function(_0x38f014){return{'name':_0x38f014['fieldName'],'type':_0x38f014[_0xf2f6('0x1d')][_0xf2f6('0x1e')]};});_0x509fce[_0xf2f6('0x1f')]=_['map'](_0x149c0a,_0xf2f6('0x17'));_0x509fce[_0xf2f6('0x20')]=_[_0xf2f6('0x21')](_0x51a27c[_0xf2f6('0x20')]);_0x509fce[_0xf2f6('0x22')]=_['intersection'](_0x509fce['model'],_0x509fce[_0xf2f6('0x20')]);_0x4f352f[_0xf2f6('0x23')]=_[_0xf2f6('0x24')](_0x509fce['model'],qs[_0xf2f6('0x25')](_0x51a27c[_0xf2f6('0x20')][_0xf2f6('0x25')]));_0x4f352f[_0xf2f6('0x23')]=_0x4f352f[_0xf2f6('0x23')][_0xf2f6('0x26')]?_0x4f352f[_0xf2f6('0x23')]:_0x509fce[_0xf2f6('0x1f')];if(!_0x51a27c[_0xf2f6('0x20')]['hasOwnProperty'](_0xf2f6('0x27'))){_0x4f352f[_0xf2f6('0xe')]=qs['limit'](_0x51a27c[_0xf2f6('0x20')][_0xf2f6('0xe')]);_0x4f352f[_0xf2f6('0xd')]=qs[_0xf2f6('0xd')](_0x51a27c[_0xf2f6('0x20')][_0xf2f6('0xd')]);}_0x4f352f[_0xf2f6('0x28')]=qs['sort'](_0x51a27c['query'][_0xf2f6('0x29')]);_0x4f352f[_0xf2f6('0x2a')]=qs[_0xf2f6('0x22')](_[_0xf2f6('0x2b')](_0x51a27c[_0xf2f6('0x20')],_0x509fce[_0xf2f6('0x22')]),_0x149c0a);if(_0x51a27c[_0xf2f6('0x20')]['filter']){_0x4f352f[_0xf2f6('0x2a')]=_[_0xf2f6('0x2c')](_0x4f352f[_0xf2f6('0x2a')],{'$or':_[_0xf2f6('0x2d')](_0x149c0a,function(_0x5a8953){if(_0x5a8953[_0xf2f6('0x1d')]!=='VIRTUAL'){var _0x8d57be={};_0x8d57be[_0x5a8953[_0xf2f6('0x17')]]={'$like':'%'+_0x51a27c[_0xf2f6('0x20')][_0xf2f6('0x2e')]+'%'};return _0x8d57be;}})});}_0x4f352f=_[_0xf2f6('0x2c')]({},_0x4f352f,_0x51a27c[_0xf2f6('0x2f')]);var _0x22e652={'where':_0x4f352f[_0xf2f6('0x2a')]};return db[_0xf2f6('0x1b')]['count'](_0x22e652)[_0xf2f6('0x13')](function(_0x4ae262){_0x30a464[_0xf2f6('0x10')]=_0x4ae262;if(_0x51a27c[_0xf2f6('0x20')][_0xf2f6('0x30')]){_0x4f352f['include']=[{'all':!![]}];}return db[_0xf2f6('0x1b')][_0xf2f6('0x31')](_0x4f352f);})[_0xf2f6('0x13')](function(_0x597fdd){_0x30a464[_0xf2f6('0x32')]=_[_0xf2f6('0x2d')](_0x597fdd,function(_0x439789){if(_0x439789[_0xf2f6('0x33')]===_0xf2f6('0x34')){var _0x1b8ab7=encryptor[_0xf2f6('0x35')](_0x439789[_0xf2f6('0x36')]);_0x439789['data3']=maskClientSecret(_0x1b8ab7);}return _0x439789;});return _0x30a464;})[_0xf2f6('0x13')](respondWithFilteredResult(_0x214143,_0x4f352f))[_0xf2f6('0x37')](handleError(_0x214143,null));};exports[_0xf2f6('0x38')]=function(_0x3b5bd4,_0x55e6df){var _0x4c8767={'raw':!![],'where':{'id':_0x3b5bd4[_0xf2f6('0x39')]['id']}},_0x2cf545={};_0x2cf545['model']=_['keys'](db[_0xf2f6('0x1b')]['rawAttributes']);_0x2cf545[_0xf2f6('0x20')]=_[_0xf2f6('0x21')](_0x3b5bd4[_0xf2f6('0x20')]);_0x2cf545[_0xf2f6('0x22')]=_[_0xf2f6('0x24')](_0x2cf545[_0xf2f6('0x1f')],_0x2cf545[_0xf2f6('0x20')]);_0x4c8767[_0xf2f6('0x23')]=_[_0xf2f6('0x24')](_0x2cf545[_0xf2f6('0x1f')],qs[_0xf2f6('0x25')](_0x3b5bd4[_0xf2f6('0x20')][_0xf2f6('0x25')]));_0x4c8767[_0xf2f6('0x23')]=_0x4c8767['attributes'][_0xf2f6('0x26')]?_0x4c8767[_0xf2f6('0x23')]:_0x2cf545[_0xf2f6('0x1f')];if(_0x3b5bd4[_0xf2f6('0x20')][_0xf2f6('0x30')]){_0x4c8767['include']=[{'all':!![]}];}_0x4c8767=_['merge']({},_0x4c8767,_0x3b5bd4[_0xf2f6('0x2f')]);return db[_0xf2f6('0x1b')][_0xf2f6('0x3a')](_0x4c8767)[_0xf2f6('0x13')](handleEntityNotFound(_0x55e6df,null))[_0xf2f6('0x13')](function(_0x4fb59a){if(_0x4fb59a[_0xf2f6('0x33')]===_0xf2f6('0x34')){var _0x2da56e=encryptor[_0xf2f6('0x35')](_0x4fb59a[_0xf2f6('0x36')]);_0x4fb59a[_0xf2f6('0x36')]=maskClientSecret(_0x2da56e);}return _0x4fb59a;})[_0xf2f6('0x13')](respondWithResult(_0x55e6df,null))[_0xf2f6('0x37')](handleError(_0x55e6df,null));};exports[_0xf2f6('0x3b')]=function(_0xf12fbe,_0x2270f7){if(!_0xf12fbe[_0xf2f6('0x3c')]['name'])throw new Error(_0xf2f6('0x3d'));if(!_0xf12fbe[_0xf2f6('0x3c')]['service'])throw new Error('Service\x20parameter\x20not\x20specified');var _0x5242f6=db[_0xf2f6('0x1b')]['rawAttributes'][_0xf2f6('0x33')][_0xf2f6('0x3e')];if(!_0x5242f6[_0xf2f6('0x3f')](_0xf12fbe[_0xf2f6('0x3c')][_0xf2f6('0x33')]))throw new Error(_0xf2f6('0x40')+_0x5242f6[_0xf2f6('0x41')](',\x20'));if(_0xf12fbe[_0xf2f6('0x3c')][_0xf2f6('0x33')]==='MicrosoftAzure'&&_0xf12fbe[_0xf2f6('0x3c')][_0xf2f6('0x36')]){_0xf12fbe['body'][_0xf2f6('0x36')]=encryptor[_0xf2f6('0x42')](_0xf12fbe[_0xf2f6('0x3c')][_0xf2f6('0x36')]);}return db[_0xf2f6('0x1b')][_0xf2f6('0x3b')](_0xf12fbe[_0xf2f6('0x3c')],{})[_0xf2f6('0x13')](respondWithResult(_0x2270f7,0xc9))[_0xf2f6('0x37')](handleError(_0x2270f7,null));};exports[_0xf2f6('0x43')]=function(_0x571cf5,_0x171ad0){if(_0x571cf5['body']['id']){delete _0x571cf5[_0xf2f6('0x3c')]['id'];}return db['CloudProvider'][_0xf2f6('0x3a')]({'where':{'id':_0x571cf5[_0xf2f6('0x39')]['id']}})['then'](handleEntityNotFound(_0x171ad0,null))[_0xf2f6('0x13')](function(_0x160b7){if(_0x160b7[_0xf2f6('0x33')]===_0xf2f6('0x34')&&_0x571cf5[_0xf2f6('0x3c')][_0xf2f6('0x36')]){_0x571cf5[_0xf2f6('0x3c')][_0xf2f6('0x36')]=encryptor['encryptString'](_0x571cf5[_0xf2f6('0x3c')][_0xf2f6('0x36')]);}return _0x160b7;})[_0xf2f6('0x13')](saveUpdates(_0x571cf5[_0xf2f6('0x3c')],null))['then'](respondWithResult(_0x171ad0,null))[_0xf2f6('0x37')](handleError(_0x171ad0,null));};exports[_0xf2f6('0x44')]=function(_0x3e7939,_0x28eec6){return db[_0xf2f6('0x1b')][_0xf2f6('0x3a')]({'where':{'id':_0x3e7939[_0xf2f6('0x39')]['id']}})['then'](handleEntityNotFound(_0x28eec6,null))['then'](removeEntity(_0x28eec6,null))[_0xf2f6('0x37')](handleError(_0x28eec6,null));};exports[_0xf2f6('0x45')]=function(_0x4e032c,_0x221815){return db[_0xf2f6('0x1b')][_0xf2f6('0x46')]({'where':{'id':_0x4e032c[_0xf2f6('0x39')]['id']},'raw':!![]})[_0xf2f6('0x13')](function(_0xd7e810){if(!_0xd7e810)return _0x221815['sendStatus'](0x194);return{'url':oauth['generateMicrosoftAuthorizationUrl'](_0xd7e810,_0x4e032c[_0xf2f6('0x47')]['id'])};})[_0xf2f6('0x13')](respondWithResult(_0x221815,null))[_0xf2f6('0x37')](handleError(_0x221815,null));};exports['oauth2MicrosoftCallback']=function(_0xa2010f,_0xa8c6e6){var _0xbcee62=_0xa2010f[_0xf2f6('0x3c')];var _0x4081a2;var _0x53f308;if(_0xbcee62['error'])throw _0xbcee62;redis[_0xf2f6('0x48')](_0xbcee62[_0xf2f6('0x49')])[_0xf2f6('0x13')](function(_0x556fbc){if(!_0x556fbc)throw new Error(_0xf2f6('0x4a'));_0x4081a2=JSON['parse'](_0x556fbc);var _0xccda81=Buffer[_0xf2f6('0x4b')](_0xbcee62[_0xf2f6('0x49')],_0xf2f6('0x4c'))[_0xf2f6('0x4d')]('ascii');_0x53f308=JSON[_0xf2f6('0x4e')](_0xccda81);if(!oauth['isValidIdToken'](_0xbcee62[_0xf2f6('0x4f')],_0x4081a2[_0xf2f6('0x50')]))throw new Error('Unable\x20to\x20validate\x20id_token');redis['del'](_0xbcee62[_0xf2f6('0x49')]);return oauth[_0xf2f6('0x51')](_0xbcee62[_0xf2f6('0x52')],_0x4081a2);})[_0xf2f6('0x13')](function(_0x2edae2){_0x4081a2['data5']=_0x2edae2[_0xf2f6('0x53')];_0x4081a2[_0xf2f6('0x54')]=_0x2edae2[_0xf2f6('0x55')];return db[_0xf2f6('0x1b')][_0xf2f6('0x43')]({'data5':_0x4081a2[_0xf2f6('0x56')],'data6':_0x4081a2[_0xf2f6('0x54')]},{'where':{'id':_0x4081a2['id']}});})[_0xf2f6('0x13')](function(){oauth[_0xf2f6('0x57')](_0x4081a2);socket[_0xf2f6('0x58')](_0xf2f6('0x59'),{'id':_0x53f308['id']});return;})[_0xf2f6('0x13')](respondWithStatusCode(_0xa8c6e6,null))[_0xf2f6('0x37')](function(_0x1dfbec){if(_0x53f308){socket[_0xf2f6('0x58')](_0xf2f6('0x5a'),{'id':_0x53f308['id']});}if(!_0x4081a2){logger['error'](_0xf2f6('0x5b'),_0x1dfbec);return _0xa8c6e6[_0xf2f6('0xb')](0x1f4)['send'](_0x1dfbec[_0xf2f6('0x5c')]);}logger['error'](_0xf2f6('0x5d'),_0x4081a2['id'],JSON[_0xf2f6('0x5e')](_0x1dfbec));});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js
index f8b19fd..7b96d7e 100644
--- a/server/api/cloudProvider/cloudProvider.model.js
+++ b/server/api/cloudProvider/cloudProvider.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe4e8=['bluebird','request-promise','path','../../config/environment','define','cloud_providers','lodash','util','../../config/logger','moment'];(function(_0x24559c,_0x4f52f7){var _0xdb1e01=function(_0x14d647){while(--_0x14d647){_0x24559c['push'](_0x24559c['shift']());}};_0xdb1e01(++_0x4f52f7);}(_0xe4e8,0x10a));var _0x8e4e=function(_0xab21d1,_0x4ea754){_0xab21d1=_0xab21d1-0x0;var _0x29c22e=_0xe4e8[_0xab21d1];return _0x29c22e;};'use strict';var _=require(_0x8e4e('0x0'));var util=require(_0x8e4e('0x1'));var logger=require(_0x8e4e('0x2'))('api');var moment=require(_0x8e4e('0x3'));var BPromise=require(_0x8e4e('0x4'));var rp=require(_0x8e4e('0x5'));var fs=require('fs');var path=require(_0x8e4e('0x6'));var rimraf=require('rimraf');var config=require(_0x8e4e('0x7'));var attributes=require('./cloudProvider.attributes');module['exports']=function(_0x155570,_0x318291){return _0x155570[_0x8e4e('0x8')]('CloudProvider',attributes,{'tableName':_0x8e4e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdec6=['../../config/environment','./cloudProvider.attributes','exports','define','CloudProvider','cloud_providers','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xdec6,0xa2));var _0x6dec=function(_0x166d93,_0x301f09){_0x166d93=_0x166d93-0x0;var _0xba708=_0xdec6[_0x166d93];return _0xba708;};'use strict';var _=require(_0x6dec('0x0'));var util=require(_0x6dec('0x1'));var logger=require(_0x6dec('0x2'))(_0x6dec('0x3'));var moment=require(_0x6dec('0x4'));var BPromise=require('bluebird');var rp=require(_0x6dec('0x5'));var fs=require('fs');var path=require(_0x6dec('0x6'));var rimraf=require('rimraf');var config=require(_0x6dec('0x7'));var attributes=require(_0x6dec('0x8'));module[_0x6dec('0x9')]=function(_0x7b62b8,_0x30316b){return _0x7b62b8[_0x6dec('0xa')](_0x6dec('0xb'),attributes,{'tableName':_0x6dec('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.oauth.js b/server/api/cloudProvider/cloudProvider.oauth.js
index cf1f0c1..321c515 100644
--- a/server/api/cloudProvider/cloudProvider.oauth.js
+++ b/server/api/cloudProvider/cloudProvider.oauth.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcb0b=['decryptString','POST','data5','access_token','update','error','intervals','bind','map','all','catch','inspect','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','crypto','jsonwebtoken','ioredis','request-promise','util','../../components/encryptor','../../config/environment','../../config/logger','../../config/schedule/cloud-provider','../../mysqldb','redis','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','openid','profile','email','offline_access','https://outlook.office365.com/IMAP.AccessAsUser.All','https://outlook.office.com/POP.AccessAsUser.All','/authorize','type','push','data7','/.default','join','Outlook365','Dynamics365','replace','{TENANT_ID}','data2','code','id_token','from','stringify','toString','base64','randomBytes','hex','client_id','data1','response_type','redirect_uri','data4','response_mode','scope','nonce','prompt','login','key','value','oauth2/','decode','payload','iss','issuer','aud','audience','isAfter','unix','exp','resolve','then','data3','CloudProvider','refresh_token','data6'];(function(_0x181cba,_0x434762){var _0x1ffade=function(_0x2a994d){while(--_0x2a994d){_0x181cba['push'](_0x181cba['shift']());}};_0x1ffade(++_0x434762);}(_0xcb0b,0x199));var _0xbcb0=function(_0x1582b6,_0x3ecb05){_0x1582b6=_0x1582b6-0x0;var _0x1dbbe4=_0xcb0b[_0x1582b6];return _0x1dbbe4;};'use strict';var _=require('lodash');var crypto=require(_0xbcb0('0x0'));var jwt=require(_0xbcb0('0x1'));var moment=require('moment');var Redis=require(_0xbcb0('0x2'));var rp=require(_0xbcb0('0x3'));var util=require(_0xbcb0('0x4'));var encryptor=require(_0xbcb0('0x5'));var config=require(_0xbcb0('0x6'));var logger=require(_0xbcb0('0x7'))('api');var schedule=require(_0xbcb0('0x8'));var db=require(_0xbcb0('0x9'))['db'];config[_0xbcb0('0xa')]=_['defaults'](config[_0xbcb0('0xa')],{'host':'localhost','port':0x18eb});var redis=new Redis(config[_0xbcb0('0xa')]);var MICROSOFT_AUTH_URL=_0xbcb0('0xb');var AZURE_AUTH_SCOPES={'Outlook365':[_0xbcb0('0xc'),_0xbcb0('0xd'),_0xbcb0('0xe'),_0xbcb0('0xf'),_0xbcb0('0x10'),_0xbcb0('0x11'),'https://outlook.office.com/SMTP.Send'],'Dynamics365':['openid','offline_access']};var MICROSOFT_AUTH_ENDPOINT=_0xbcb0('0x12');var MICROSOFT_TOKEN_ENDPOINT='/token';var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x4ed5f3){var _0x26447c=_['map'](AZURE_AUTH_SCOPES[_0x4ed5f3[_0xbcb0('0x13')]]);if(_0x4ed5f3[_0xbcb0('0x13')]==='Dynamics365')_0x26447c[_0xbcb0('0x14')](_0x4ed5f3[_0xbcb0('0x15')]+_0xbcb0('0x16'));return _0x26447c[_0xbcb0('0x17')]('\x20');}function getAccessTokenScope(_0x4027ca){if(_0x4027ca[_0xbcb0('0x13')]===_0xbcb0('0x18'))return _0xbcb0('0x10');if(_0x4027ca[_0xbcb0('0x13')]===_0xbcb0('0x19'))return _0x4027ca[_0xbcb0('0x15')]+_0xbcb0('0x16');}function generateMicrosoftAuthorizationUrl(_0x19119a,_0x1ad0bb){var _0x3fd1b7=MICROSOFT_AUTH_URL[_0xbcb0('0x1a')](_0xbcb0('0x1b'),_0x19119a[_0xbcb0('0x1c')]);var _0x1624bb=[_0xbcb0('0x1d'),_0xbcb0('0x1e')];var _0xbf1ba7=Buffer[_0xbcb0('0x1f')](JSON[_0xbcb0('0x20')]({'id':_0x1ad0bb}))[_0xbcb0('0x21')](_0xbcb0('0x22'));var _0x19eb8e=crypto[_0xbcb0('0x23')](0x10)[_0xbcb0('0x21')](_0xbcb0('0x24'));var _0x22af41=getAuthorizationScopes(_0x19119a);var _0xea234=[{'key':_0xbcb0('0x25'),'value':_0x19119a[_0xbcb0('0x26')]},{'key':_0xbcb0('0x27'),'value':encodeURIComponent(_0x1624bb['join']('\x20'))},{'key':_0xbcb0('0x28'),'value':_0x19119a[_0xbcb0('0x29')]},{'key':_0xbcb0('0x2a'),'value':'form_post'},{'key':_0xbcb0('0x2b'),'value':encodeURIComponent(_0x22af41)},{'key':'state','value':_0xbf1ba7},{'key':_0xbcb0('0x2c'),'value':_0x19eb8e},{'key':_0xbcb0('0x2d'),'value':_0xbcb0('0x2e')}];var _0x51f054=_0x3fd1b7+MICROSOFT_AUTH_ENDPOINT+'?'+_['map'](_0xea234,function(_0x423788){return _0x423788[_0xbcb0('0x2f')]+'='+_0x423788[_0xbcb0('0x30')];})[_0xbcb0('0x17')]('&');_0x19119a['oauth2Claims']={'issuer':_0x3fd1b7['replace'](_0xbcb0('0x31'),''),'audience':_0x19119a[_0xbcb0('0x26')],'state':_0xbf1ba7,'nonce':_0x19eb8e};redis['set'](_0xbf1ba7,JSON[_0xbcb0('0x20')](_0x19119a));return _0x51f054;}function isValidIdToken(_0x2ad6d5,_0xeb9651){try{var _0x127fe6=jwt[_0xbcb0('0x32')](_0x2ad6d5,{'complete':!![]});var _0x5ef996=_0x127fe6[_0xbcb0('0x33')];if(_0x5ef996[_0xbcb0('0x34')]!==_0xeb9651[_0xbcb0('0x35')])return![];if(_0x5ef996[_0xbcb0('0x36')]!==_0xeb9651[_0xbcb0('0x37')])return![];if(_0x5ef996[_0xbcb0('0x2c')]!==_0xeb9651[_0xbcb0('0x2c')])return![];if(moment()[_0xbcb0('0x38')](moment[_0xbcb0('0x39')](_0x5ef996[_0xbcb0('0x3a')])))return![];return!![];}catch(_0x210e41){throw _0x210e41;}}function refreshOauth2MicrosoftAccessToken(_0x30a470){return Promise[_0xbcb0('0x3b')]()[_0xbcb0('0x3c')](function(){if(_0x30a470[_0xbcb0('0x3d')])return _0x30a470;return db[_0xbcb0('0x3e')]['findOne']({'where':{'id':_0x30a470['id']},'raw':!![]});})['then'](function(_0x27cf49){var _0x4d2fff={'grant_type':_0xbcb0('0x3f'),'refresh_token':_0x27cf49[_0xbcb0('0x40')],'scope':getAccessTokenScope(_0x27cf49),'redirect_uri':_0x27cf49[_0xbcb0('0x29')],'client_id':_0x27cf49[_0xbcb0('0x26')],'client_secret':encryptor[_0xbcb0('0x41')](_0x27cf49['data3'])};var _0x1424a0={'method':_0xbcb0('0x42'),'uri':MICROSOFT_AUTH_URL['replace'](_0xbcb0('0x1b'),_0x27cf49[_0xbcb0('0x1c')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x4d2fff,'json':!![]};return rp(_0x1424a0);})[_0xbcb0('0x3c')](function(_0x39cd5a){_0x30a470[_0xbcb0('0x43')]=_0x39cd5a[_0xbcb0('0x44')];_0x30a470['data6']=_0x39cd5a[_0xbcb0('0x3f')];return db[_0xbcb0('0x3e')][_0xbcb0('0x45')]({'data5':_0x30a470[_0xbcb0('0x43')],'data6':_0x30a470[_0xbcb0('0x40')]},{'where':{'id':_0x30a470['id']}});})[_0xbcb0('0x3c')](function(){return _0x30a470;})['catch'](function(_0x5edcdc){logger[_0xbcb0('0x46')]('Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s',_0x30a470['id'],_0x5edcdc);});}function getOauth2MicrosoftAccessToken(_0x5d7794,_0x4f18f2){var _0x124ed3={'grant_type':'authorization_code','code':_0x5d7794,'scope':getAccessTokenScope(_0x4f18f2),'redirect_uri':_0x4f18f2[_0xbcb0('0x29')],'client_id':_0x4f18f2[_0xbcb0('0x26')],'client_secret':encryptor['decryptString'](_0x4f18f2[_0xbcb0('0x3d')])};var _0x1f9e7e={'method':'POST','uri':MICROSOFT_AUTH_URL[_0xbcb0('0x1a')]('{TENANT_ID}',_0x4f18f2['data2'])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x124ed3,'json':!![]};return rp(_0x1f9e7e);}function startRefreshInterval(_0x31d0c3){var _0x564f41=schedule[_0xbcb0('0x47')];if(_0x564f41[_0x31d0c3['id']])clearInterval(_0x564f41[_0x31d0c3['id']]);_0x564f41[_0x31d0c3['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0xbcb0('0x48')](this,{'id':_0x31d0c3['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0xbcb0('0x47')]=_0x564f41;}function startAllRefreshIntervals(){return db[_0xbcb0('0x3e')]['findAll']({'where':{'data6':{'$ne':null}},'raw':!![]})[_0xbcb0('0x3c')](function(_0x505418){var _0x21d891=_0x505418[_0xbcb0('0x49')](function(_0x5a476a){return refreshOauth2MicrosoftAccessToken(_0x5a476a)[_0xbcb0('0x3c')](function(_0x1401a0){startRefreshInterval(_0x1401a0);});});return Promise[_0xbcb0('0x4a')](_0x21d891);})[_0xbcb0('0x4b')](function(_0x22a2f6){var _0x2f38a9=_0x22a2f6?util[_0xbcb0('0x4c')](_0x22a2f6,{'showHidden':![],'depth':null}):'';logger[_0xbcb0('0x46')](_0xbcb0('0x4d'),_0x2f38a9);});}module[_0xbcb0('0x4e')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
+var _0x1253=['Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','authorization_code','POST','intervals','bind','CloudProvider','findAll','all','inspect','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','lodash','jsonwebtoken','moment','../../components/encryptor','../../config/logger','api','../../mysqldb','redis','defaults','localhost','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','email','offline_access','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','openid','/authorize','/token','map','type','Dynamics365','push','data7','join','/.default','{TENANT_ID}','data2','code','id_token','from','base64','toString','client_id','response_type','redirect_uri','data4','response_mode','state','nonce','prompt','login','replace','oauth2/','data1','set','stringify','decode','payload','issuer','aud','unix','exp','resolve','then','data3','findOne','data6','decryptString','data5','access_token','refresh_token','update','catch','error'];(function(_0x351532,_0x5d199a){var _0x34837a=function(_0x386672){while(--_0x386672){_0x351532['push'](_0x351532['shift']());}};_0x34837a(++_0x5d199a);}(_0x1253,0xa1));var _0x3125=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x1253[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0x3125('0x0'));var crypto=require('crypto');var jwt=require(_0x3125('0x1'));var moment=require(_0x3125('0x2'));var Redis=require('ioredis');var rp=require('request-promise');var util=require('util');var encryptor=require(_0x3125('0x3'));var config=require('../../config/environment');var logger=require(_0x3125('0x4'))(_0x3125('0x5'));var schedule=require('../../config/schedule/cloud-provider');var db=require(_0x3125('0x6'))['db'];config[_0x3125('0x7')]=_[_0x3125('0x8')](config[_0x3125('0x7')],{'host':_0x3125('0x9'),'port':0x18eb});var redis=new Redis(config[_0x3125('0x7')]);var MICROSOFT_AUTH_URL=_0x3125('0xa');var AZURE_AUTH_SCOPES={'Outlook365':['openid','profile',_0x3125('0xb'),_0x3125('0xc'),'https://outlook.office365.com/IMAP.AccessAsUser.All',_0x3125('0xd'),_0x3125('0xe')],'Dynamics365':[_0x3125('0xf'),_0x3125('0xc')]};var MICROSOFT_AUTH_ENDPOINT=_0x3125('0x10');var MICROSOFT_TOKEN_ENDPOINT=_0x3125('0x11');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x4339d4){var _0x155f7f=_[_0x3125('0x12')](AZURE_AUTH_SCOPES[_0x4339d4[_0x3125('0x13')]]);if(_0x4339d4[_0x3125('0x13')]===_0x3125('0x14'))_0x155f7f[_0x3125('0x15')](_0x4339d4[_0x3125('0x16')]+'/.default');return _0x155f7f[_0x3125('0x17')]('\x20');}function getAccessTokenScope(_0x10549c){if(_0x10549c['type']==='Outlook365')return'https://outlook.office365.com/IMAP.AccessAsUser.All';if(_0x10549c[_0x3125('0x13')]==='Dynamics365')return _0x10549c['data7']+_0x3125('0x18');}function generateMicrosoftAuthorizationUrl(_0x3edd29,_0x17be6a){var _0x250e9a=MICROSOFT_AUTH_URL['replace'](_0x3125('0x19'),_0x3edd29[_0x3125('0x1a')]);var _0x52367a=[_0x3125('0x1b'),_0x3125('0x1c')];var _0x524358=Buffer[_0x3125('0x1d')](JSON['stringify']({'id':_0x17be6a}))['toString'](_0x3125('0x1e'));var _0x16b235=crypto['randomBytes'](0x10)[_0x3125('0x1f')]('hex');var _0xb736ce=getAuthorizationScopes(_0x3edd29);var _0x2e45a3=[{'key':_0x3125('0x20'),'value':_0x3edd29['data1']},{'key':_0x3125('0x21'),'value':encodeURIComponent(_0x52367a[_0x3125('0x17')]('\x20'))},{'key':_0x3125('0x22'),'value':_0x3edd29[_0x3125('0x23')]},{'key':_0x3125('0x24'),'value':'form_post'},{'key':'scope','value':encodeURIComponent(_0xb736ce)},{'key':_0x3125('0x25'),'value':_0x524358},{'key':_0x3125('0x26'),'value':_0x16b235},{'key':_0x3125('0x27'),'value':_0x3125('0x28')}];var _0x4b9b20=_0x250e9a+MICROSOFT_AUTH_ENDPOINT+'?'+_[_0x3125('0x12')](_0x2e45a3,function(_0x5e0c6f){return _0x5e0c6f['key']+'='+_0x5e0c6f['value'];})[_0x3125('0x17')]('&');_0x3edd29['oauth2Claims']={'issuer':_0x250e9a[_0x3125('0x29')](_0x3125('0x2a'),''),'audience':_0x3edd29[_0x3125('0x2b')],'state':_0x524358,'nonce':_0x16b235};redis[_0x3125('0x2c')](_0x524358,JSON[_0x3125('0x2d')](_0x3edd29));return _0x4b9b20;}function isValidIdToken(_0x136b7d,_0x336b19){try{var _0x4ffd41=jwt[_0x3125('0x2e')](_0x136b7d,{'complete':!![]});var _0x1edd2e=_0x4ffd41[_0x3125('0x2f')];if(_0x1edd2e['iss']!==_0x336b19[_0x3125('0x30')])return![];if(_0x1edd2e[_0x3125('0x31')]!==_0x336b19['audience'])return![];if(_0x1edd2e[_0x3125('0x26')]!==_0x336b19[_0x3125('0x26')])return![];if(moment()['isAfter'](moment[_0x3125('0x32')](_0x1edd2e[_0x3125('0x33')])))return![];return!![];}catch(_0x1db356){throw _0x1db356;}}function refreshOauth2MicrosoftAccessToken(_0x135d81){return Promise[_0x3125('0x34')]()[_0x3125('0x35')](function(){if(_0x135d81[_0x3125('0x36')])return _0x135d81;return db['CloudProvider'][_0x3125('0x37')]({'where':{'id':_0x135d81['id']},'raw':!![]});})[_0x3125('0x35')](function(_0xf04fd8){var _0x5bccd1={'grant_type':'refresh_token','refresh_token':_0xf04fd8[_0x3125('0x38')],'scope':getAccessTokenScope(_0xf04fd8),'redirect_uri':_0xf04fd8[_0x3125('0x23')],'client_id':_0xf04fd8[_0x3125('0x2b')],'client_secret':encryptor[_0x3125('0x39')](_0xf04fd8[_0x3125('0x36')])};var _0x2c2293={'method':'POST','uri':MICROSOFT_AUTH_URL[_0x3125('0x29')](_0x3125('0x19'),_0xf04fd8['data2'])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x5bccd1,'json':!![]};return rp(_0x2c2293);})[_0x3125('0x35')](function(_0x1fe5f5){_0x135d81[_0x3125('0x3a')]=_0x1fe5f5[_0x3125('0x3b')];_0x135d81[_0x3125('0x38')]=_0x1fe5f5[_0x3125('0x3c')];return db['CloudProvider'][_0x3125('0x3d')]({'data5':_0x135d81[_0x3125('0x3a')],'data6':_0x135d81['data6']},{'where':{'id':_0x135d81['id']}});})[_0x3125('0x35')](function(){return _0x135d81;})[_0x3125('0x3e')](function(_0x33a0f4){logger[_0x3125('0x3f')](_0x3125('0x40'),_0x135d81['id'],_0x33a0f4);});}function getOauth2MicrosoftAccessToken(_0x317e20,_0x809a83){var _0x165757={'grant_type':_0x3125('0x41'),'code':_0x317e20,'scope':getAccessTokenScope(_0x809a83),'redirect_uri':_0x809a83[_0x3125('0x23')],'client_id':_0x809a83['data1'],'client_secret':encryptor[_0x3125('0x39')](_0x809a83[_0x3125('0x36')])};var _0x252abc={'method':_0x3125('0x42'),'uri':MICROSOFT_AUTH_URL[_0x3125('0x29')](_0x3125('0x19'),_0x809a83['data2'])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x165757,'json':!![]};return rp(_0x252abc);}function startRefreshInterval(_0x20590e){var _0x191e0a=schedule[_0x3125('0x43')];if(_0x191e0a[_0x20590e['id']])clearInterval(_0x191e0a[_0x20590e['id']]);_0x191e0a[_0x20590e['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0x3125('0x44')](this,{'id':_0x20590e['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0x3125('0x43')]=_0x191e0a;}function startAllRefreshIntervals(){return db[_0x3125('0x45')][_0x3125('0x46')]({'where':{'data6':{'$ne':null}},'raw':!![]})[_0x3125('0x35')](function(_0x401e15){var _0x57db14=_0x401e15[_0x3125('0x12')](function(_0x55daf7){return refreshOauth2MicrosoftAccessToken(_0x55daf7)[_0x3125('0x35')](function(_0x2cd55b){startRefreshInterval(_0x2cd55b);});});return Promise[_0x3125('0x47')](_0x57db14);})[_0x3125('0x3e')](function(_0x4212b6){var _0x43c2b2=_0x4212b6?util[_0x3125('0x48')](_0x4212b6,{'showHidden':![],'depth':null}):'';logger[_0x3125('0x3f')](_0x3125('0x49'),_0x43c2b2);});}module[_0x3125('0x4a')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.rpc.js b/server/api/cloudProvider/cloudProvider.rpc.js
index ac8119c..e0ac618 100644
--- a/server/api/cloudProvider/cloudProvider.rpc.js
+++ b/server/api/cloudProvider/cloudProvider.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6a0b=['info','request\x20sent','result','catch','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','CloudProvider,\x20%s,\x20%s','message'];(function(_0x342041,_0x1819d1){var _0x1c696b=function(_0x3fea1c){while(--_0x3fea1c){_0x342041['push'](_0x342041['shift']());}};_0x1c696b(++_0x1819d1);}(_0x6a0b,0xf6));var _0xb6a0=function(_0x5f9f89,_0x18c1ac){_0x5f9f89=_0x5f9f89-0x0;var _0x241ea9=_0x6a0b[_0x5f9f89];return _0x241ea9;};'use strict';var _=require(_0xb6a0('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xb6a0('0x1'));var rs=require(_0xb6a0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb6a0('0x3'))['db'];var utils=require(_0xb6a0('0x4'));var logger=require(_0xb6a0('0x5'))(_0xb6a0('0x6'));var config=require(_0xb6a0('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xb6a0('0x8')][_0xb6a0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x41bec1,_0xef4451,_0xb107bd){return new BPromise(function(_0x434911,_0x4357a5){return client[_0xb6a0('0xa')](_0x41bec1,_0xb107bd)[_0xb6a0('0xb')](function(_0x4e3aaf){logger['info']('CloudProvider,\x20%s,\x20%s',_0xef4451,'request\x20sent');logger['debug'](_0xb6a0('0xc'),_0xef4451,'request\x20sent',JSON[_0xb6a0('0xd')](_0x4e3aaf));if(_0x4e3aaf[_0xb6a0('0xe')]){if(_0x4e3aaf['error'][_0xb6a0('0xf')]===0x1f4){logger[_0xb6a0('0xe')](_0xb6a0('0x10'),_0xef4451,_0x4e3aaf[_0xb6a0('0xe')][_0xb6a0('0x11')]);return _0x4357a5(_0x4e3aaf[_0xb6a0('0xe')][_0xb6a0('0x11')]);}logger[_0xb6a0('0xe')](_0xb6a0('0x10'),_0xef4451,_0x4e3aaf[_0xb6a0('0xe')]['message']);return _0x434911(_0x4e3aaf[_0xb6a0('0xe')][_0xb6a0('0x11')]);}else{logger[_0xb6a0('0x12')](_0xb6a0('0x10'),_0xef4451,_0xb6a0('0x13'));_0x434911(_0x4e3aaf[_0xb6a0('0x14')][_0xb6a0('0x11')]);}})[_0xb6a0('0x15')](function(_0x1cb284){logger['error'](_0xb6a0('0x10'),_0xef4451,_0x1cb284);_0x4357a5(_0x1cb284);});});}
\ No newline at end of file
+var _0xe5fc=['http','request','then','info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x3b2ac8,_0x3819fe){var _0x3574f2=function(_0x4d5752){while(--_0x4d5752){_0x3b2ac8['push'](_0x3b2ac8['shift']());}};_0x3574f2(++_0x3819fe);}(_0xe5fc,0x109));var _0xce5f=function(_0x510b0f,_0x286731){_0x510b0f=_0x510b0f-0x0;var _0x34cb08=_0xe5fc[_0x510b0f];return _0x34cb08;};'use strict';var _=require(_0xce5f('0x0'));var util=require('util');var moment=require(_0xce5f('0x1'));var BPromise=require(_0xce5f('0x2'));var rs=require(_0xce5f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xce5f('0x4'))('rpc');var config=require(_0xce5f('0x5'));var jayson=require(_0xce5f('0x6'));var client=jayson[_0xce5f('0x7')][_0xce5f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3b77ef,_0x30a150,_0x2b64dc){return new BPromise(function(_0x3451af,_0x4fa651){return client[_0xce5f('0x9')](_0x3b77ef,_0x2b64dc)[_0xce5f('0xa')](function(_0x29a7bf){logger[_0xce5f('0xb')](_0xce5f('0xc'),_0x30a150,_0xce5f('0xd'));logger[_0xce5f('0xe')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x30a150,_0xce5f('0xd'),JSON[_0xce5f('0xf')](_0x29a7bf));if(_0x29a7bf[_0xce5f('0x10')]){if(_0x29a7bf[_0xce5f('0x10')][_0xce5f('0x11')]===0x1f4){logger[_0xce5f('0x10')](_0xce5f('0xc'),_0x30a150,_0x29a7bf[_0xce5f('0x10')][_0xce5f('0x12')]);return _0x4fa651(_0x29a7bf['error']['message']);}logger['error'](_0xce5f('0xc'),_0x30a150,_0x29a7bf[_0xce5f('0x10')][_0xce5f('0x12')]);return _0x3451af(_0x29a7bf[_0xce5f('0x10')]['message']);}else{logger[_0xce5f('0xb')](_0xce5f('0xc'),_0x30a150,_0xce5f('0xd'));_0x3451af(_0x29a7bf[_0xce5f('0x13')][_0xce5f('0x12')]);}})[_0xce5f('0x14')](function(_0x1544ba){logger[_0xce5f('0x10')](_0xce5f('0xc'),_0x30a150,_0x1544ba);_0x4fa651(_0x1544ba);});});}
\ No newline at end of file
diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js
index 72ce6ad..4a01c65 100644
--- a/server/api/cloudProvider/index.js
+++ b/server/api/cloudProvider/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1261=['/:id','show','create','put','update','delete','/:id/oauth2/microsoft/authorize/','post','exports','Router','../../components/auth/service','./cloudProvider.controller','get','isAuthenticated','index'];(function(_0x55d829,_0x43f06c){var _0x52163b=function(_0x493cd8){while(--_0x493cd8){_0x55d829['push'](_0x55d829['shift']());}};_0x52163b(++_0x43f06c);}(_0x1261,0x144));var _0x1126=function(_0x2e6ab8,_0x4ea85c){_0x2e6ab8=_0x2e6ab8-0x0;var _0x16cba0=_0x1261[_0x2e6ab8];return _0x16cba0;};'use strict';var express=require('express');var router=express[_0x1126('0x0')]();var auth=require(_0x1126('0x1'));var controller=require(_0x1126('0x2'));router[_0x1126('0x3')]('/',auth[_0x1126('0x4')](),controller[_0x1126('0x5')]);router[_0x1126('0x3')](_0x1126('0x6'),auth[_0x1126('0x4')](),controller[_0x1126('0x7')]);router['post']('/',auth['isAuthenticated'](),controller[_0x1126('0x8')]);router[_0x1126('0x9')]('/:id',auth[_0x1126('0x4')](),controller[_0x1126('0xa')]);router[_0x1126('0xb')](_0x1126('0x6'),auth[_0x1126('0x4')](),controller['destroy']);router[_0x1126('0x3')](_0x1126('0xc'),auth[_0x1126('0x4')](),controller['oauth2MicrosoftAuthorize']);router[_0x1126('0xd')]('/oauth2/microsoft/callback',controller['oauth2MicrosoftCallback']);module[_0x1126('0xe')]=router;
\ No newline at end of file
+var _0x5f66=['index','post','/:id','update','delete','/:id/oauth2/microsoft/authorize/','oauth2MicrosoftAuthorize','oauth2MicrosoftCallback','Router','./cloudProvider.controller','get','isAuthenticated'];(function(_0xbf6b28,_0x31ee18){var _0x5b9530=function(_0x48bb70){while(--_0x48bb70){_0xbf6b28['push'](_0xbf6b28['shift']());}};_0x5b9530(++_0x31ee18);}(_0x5f66,0x1a0));var _0x65f6=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0x5f66[_0x5f0089];return _0x193892;};'use strict';var express=require('express');var router=express[_0x65f6('0x0')]();var auth=require('../../components/auth/service');var controller=require(_0x65f6('0x1'));router[_0x65f6('0x2')]('/',auth[_0x65f6('0x3')](),controller[_0x65f6('0x4')]);router[_0x65f6('0x2')]('/:id',auth[_0x65f6('0x3')](),controller['show']);router[_0x65f6('0x5')]('/',auth[_0x65f6('0x3')](),controller['create']);router['put'](_0x65f6('0x6'),auth[_0x65f6('0x3')](),controller[_0x65f6('0x7')]);router[_0x65f6('0x8')](_0x65f6('0x6'),auth[_0x65f6('0x3')](),controller['destroy']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x3')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x5')]('/oauth2/microsoft/callback',controller[_0x65f6('0xb')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js
index 257293c..e725772 100644
--- a/server/api/cmCompany/cmCompany.attributes.js
+++ b/server/api/cmCompany/cmCompany.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x03fc=['name','sequelize','exports','STRING'];(function(_0x318840,_0x561b1e){var _0x223da4=function(_0x510071){while(--_0x510071){_0x318840['push'](_0x318840['shift']());}};_0x223da4(++_0x561b1e);}(_0x03fc,0xb9));var _0xc03f=function(_0x33210d,_0xb42117){_0x33210d=_0x33210d-0x0;var _0x3d30f1=_0x03fc[_0x33210d];return _0x3d30f1;};'use strict';var Sequelize=require(_0xc03f('0x0'));module[_0xc03f('0x1')]={'name':{'type':Sequelize[_0xc03f('0x2')],'unique':_0xc03f('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize['STRING']},'companyId':{'type':Sequelize[_0xc03f('0x2')]},'website':{'type':Sequelize[_0xc03f('0x2')]},'phone':{'type':Sequelize['STRING']},'fax':{'type':Sequelize[_0xc03f('0x2')]},'type':{'type':Sequelize[_0xc03f('0x2')]},'street':{'type':Sequelize[_0xc03f('0x2')]},'postalCode':{'type':Sequelize[_0xc03f('0x2')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize[_0xc03f('0x2')]},'email':{'type':Sequelize[_0xc03f('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0xc03f('0x2')]},'sStreet':{'type':Sequelize['STRING']},'sPostalCode':{'type':Sequelize[_0xc03f('0x2')]},'sCity':{'type':Sequelize['STRING']},'sCountry':{'type':Sequelize[_0xc03f('0x2')]},'description':{'type':Sequelize[_0xc03f('0x2')]}};
\ No newline at end of file
+var _0xcf4c=['sequelize','STRING'];(function(_0x52edd0,_0x7319dc){var _0x42b12a=function(_0x11235e){while(--_0x11235e){_0x52edd0['push'](_0x52edd0['shift']());}};_0x42b12a(++_0x7319dc);}(_0xcf4c,0xbc));var _0xccf4=function(_0x597bc4,_0xaf9638){_0x597bc4=_0x597bc4-0x0;var _0xdf2137=_0xcf4c[_0x597bc4];return _0xdf2137;};'use strict';var Sequelize=require(_0xccf4('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xccf4('0x1')]},'companyId':{'type':Sequelize['STRING']},'website':{'type':Sequelize[_0xccf4('0x1')]},'phone':{'type':Sequelize[_0xccf4('0x1')]},'fax':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xccf4('0x1')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0xccf4('0x1')]},'city':{'type':Sequelize[_0xccf4('0x1')]},'country':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0xccf4('0x1')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize['STRING']},'sStreet':{'type':Sequelize[_0xccf4('0x1')]},'sPostalCode':{'type':Sequelize[_0xccf4('0x1')]},'sCity':{'type':Sequelize[_0xccf4('0x1')]},'sCountry':{'type':Sequelize[_0xccf4('0x1')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js
index 02d57a3..a4a1151 100644
--- a/server/api/cmCompany/cmCompany.controller.js
+++ b/server/api/cmCompany/cmCompany.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf526=['filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','merge','where','filter','options','includeAll','include','findAll','rows','catch','show','params','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Companies','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','CmContact','addContacts','omit','ids','getContacts','findOne','rawAttributes','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','set','save','then','destroy','get','stack','name','send','index','CmCompany','describe','model','keys','query'];(function(_0x499eaf,_0x560a5a){var _0x2fa121=function(_0x286a7b){while(--_0x286a7b){_0x499eaf['push'](_0x499eaf['shift']());}};_0x2fa121(++_0x560a5a);}(_0xf526,0x17e));var _0x6f52=function(_0x2d0db8,_0x57d377){_0x2d0db8=_0x2d0db8-0x0;var _0xfd14dc=_0xf526[_0x2d0db8];return _0xfd14dc;};'use strict';var emlformat=require(_0x6f52('0x0'));var rimraf=require(_0x6f52('0x1'));var zipdir=require(_0x6f52('0x2'));var jsonpatch=require(_0x6f52('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x6f52('0x4'));var Mustache=require(_0x6f52('0x5'));var util=require(_0x6f52('0x6'));var path=require(_0x6f52('0x7'));var sox=require(_0x6f52('0x8'));var csv=require(_0x6f52('0x9'));var ejs=require(_0x6f52('0xa'));var fs=require('fs');var fs_extra=require(_0x6f52('0xb'));var _=require(_0x6f52('0xc'));var squel=require(_0x6f52('0xd'));var crypto=require('crypto');var jsforce=require(_0x6f52('0xe'));var deskjs=require(_0x6f52('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x6f52('0x10'));var Redis=require(_0x6f52('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x6f52('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x6f52('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x6f52('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x330eb9,_0x8e589e){_0x8e589e=_0x8e589e||0xcc;return function(_0x2ee423){if(_0x2ee423){return _0x330eb9[_0x6f52('0x15')](_0x8e589e);}return _0x330eb9[_0x6f52('0x16')](_0x8e589e)[_0x6f52('0x17')]();};}function respondWithResult(_0x1af977,_0x4ded51){_0x4ded51=_0x4ded51||0xc8;return function(_0x49857c){if(_0x49857c){return _0x1af977[_0x6f52('0x16')](_0x4ded51)[_0x6f52('0x18')](_0x49857c);}};}function respondWithFilteredResult(_0x47ac57,_0x182786){return function(_0x456852){if(_0x456852){var _0x490bbf=typeof _0x182786[_0x6f52('0x19')]===_0x6f52('0x1a')&&typeof _0x182786['limit']==='undefined';var _0x56b0ca=_0x456852[_0x6f52('0x1b')];var _0x2e4aa5=_0x490bbf?0x0:_0x182786['offset'];var _0x2dbf2e=_0x490bbf?_0x456852['count']:_0x182786[_0x6f52('0x19')]+_0x182786[_0x6f52('0x1c')];var _0x2d4b3b;if(_0x2dbf2e>=_0x56b0ca){_0x2dbf2e=_0x56b0ca;_0x2d4b3b=0xc8;}else{_0x2d4b3b=0xce;}_0x47ac57[_0x6f52('0x16')](_0x2d4b3b);return _0x47ac57[_0x6f52('0x1d')]('Content-Range',_0x2e4aa5+'-'+_0x2dbf2e+'/'+_0x56b0ca)['json'](_0x456852);}return null;};}function patchUpdates(_0x579571){return function(_0x181758){try{jsonpatch['apply'](_0x181758,_0x579571,!![]);}catch(_0x124376){return BPromise['reject'](_0x124376);}return _0x181758[_0x6f52('0x1e')]();};}function saveUpdates(_0x3ae22c,_0x2701c9){return function(_0x2ea381){if(_0x2ea381){return _0x2ea381['update'](_0x3ae22c)[_0x6f52('0x1f')](function(_0xff84f7){return _0xff84f7;});}return null;};}function removeEntity(_0x43b93a,_0x39ee89){return function(_0xc146d2){if(_0xc146d2){return _0xc146d2[_0x6f52('0x20')]()['then'](function(){var _0x47f7d3=_0xc146d2[_0x6f52('0x21')]({'plain':!![]});var _0x36b72f='Companies';return db['UserProfileResource']['destroy']({'where':{'type':_0x36b72f,'resourceId':_0x47f7d3['id']}})[_0x6f52('0x1f')](function(){return _0xc146d2;});})[_0x6f52('0x1f')](function(){_0x43b93a[_0x6f52('0x16')](0xcc)[_0x6f52('0x17')]();});}};}function handleEntityNotFound(_0x3a6e08,_0x5bd20a){return function(_0x1909db){if(!_0x1909db){_0x3a6e08['sendStatus'](0x194);}return _0x1909db;};}function handleError(_0x2731af,_0x2521dc){_0x2521dc=_0x2521dc||0x1f4;return function(_0x40807a){logger['error'](_0x40807a[_0x6f52('0x22')]);if(_0x40807a[_0x6f52('0x23')]){delete _0x40807a[_0x6f52('0x23')];}_0x2731af['status'](_0x2521dc)[_0x6f52('0x24')](_0x40807a);};}exports[_0x6f52('0x25')]=function(_0x6bddc,_0x13d8c4){var _0x458860={},_0x17cfca={},_0x232a77={'count':0x0,'rows':[]};return db[_0x6f52('0x26')][_0x6f52('0x27')]()['then'](function(_0x56dac1){_0x17cfca[_0x6f52('0x28')]=_[_0x6f52('0x29')](_0x56dac1);_0x17cfca[_0x6f52('0x2a')]=_[_0x6f52('0x29')](_0x6bddc[_0x6f52('0x2a')]);_0x17cfca[_0x6f52('0x2b')]=_[_0x6f52('0x2c')](_0x17cfca[_0x6f52('0x28')],_0x17cfca[_0x6f52('0x2a')]);_0x458860[_0x6f52('0x2d')]=_[_0x6f52('0x2c')](_0x17cfca[_0x6f52('0x28')],qs['fields'](_0x6bddc[_0x6f52('0x2a')][_0x6f52('0x2e')]));_0x458860[_0x6f52('0x2d')]=_0x458860['attributes'][_0x6f52('0x2f')]?_0x458860[_0x6f52('0x2d')]:_0x17cfca['model'];if(!_0x6bddc[_0x6f52('0x2a')][_0x6f52('0x30')](_0x6f52('0x31'))){_0x458860[_0x6f52('0x1c')]=qs[_0x6f52('0x1c')](_0x6bddc['query'][_0x6f52('0x1c')]);_0x458860[_0x6f52('0x19')]=qs[_0x6f52('0x19')](_0x6bddc[_0x6f52('0x2a')]['offset']);}_0x458860[_0x6f52('0x32')]=qs[_0x6f52('0x33')](_0x6bddc[_0x6f52('0x2a')][_0x6f52('0x33')]);_0x458860['where']=qs[_0x6f52('0x2b')](_[_0x6f52('0x34')](_0x6bddc[_0x6f52('0x2a')],_0x17cfca[_0x6f52('0x2b')]),_0x56dac1);if(_0x6bddc[_0x6f52('0x2a')]['filter']){_0x458860['where']=_[_0x6f52('0x35')](_0x458860[_0x6f52('0x36')],{'$or':_['map'](_0x458860['attributes'],function(_0x17750e){var _0x5ef582={};_0x5ef582[_0x17750e]={'$like':'%'+_0x6bddc[_0x6f52('0x2a')][_0x6f52('0x37')]+'%'};return _0x5ef582;})});}_0x458860=_[_0x6f52('0x35')]({},_0x458860,_0x6bddc[_0x6f52('0x38')]);var _0x185a9b={'where':_0x458860['where']};return db['CmCompany'][_0x6f52('0x1b')](_0x185a9b)[_0x6f52('0x1f')](function(_0x470824){_0x232a77[_0x6f52('0x1b')]=_0x470824;if(_0x6bddc[_0x6f52('0x2a')][_0x6f52('0x39')]){_0x458860[_0x6f52('0x3a')]=[{'all':!![]}];}return db['CmCompany'][_0x6f52('0x3b')](_0x458860);})[_0x6f52('0x1f')](function(_0x7cf4f){_0x232a77[_0x6f52('0x3c')]=_0x7cf4f;return _0x232a77;})[_0x6f52('0x1f')](respondWithFilteredResult(_0x13d8c4,_0x458860))[_0x6f52('0x3d')](handleError(_0x13d8c4,null));})[_0x6f52('0x3d')](handleError(_0x13d8c4,null));};exports[_0x6f52('0x3e')]=function(_0x1190ea,_0x5efdca){var _0x1b638c={'raw':![],'where':{'id':_0x1190ea[_0x6f52('0x3f')]['id']}},_0x39697c={};_0x39697c[_0x6f52('0x28')]=_[_0x6f52('0x29')](db[_0x6f52('0x26')]['rawAttributes']);_0x39697c['query']=_[_0x6f52('0x29')](_0x1190ea[_0x6f52('0x2a')]);_0x39697c['filters']=_['intersection'](_0x39697c[_0x6f52('0x28')],_0x39697c['query']);_0x1b638c[_0x6f52('0x2d')]=_['intersection'](_0x39697c[_0x6f52('0x28')],qs[_0x6f52('0x2e')](_0x1190ea[_0x6f52('0x2a')]['fields']));_0x1b638c[_0x6f52('0x2d')]=_0x1b638c['attributes'][_0x6f52('0x2f')]?_0x1b638c[_0x6f52('0x2d')]:_0x39697c[_0x6f52('0x28')];if(_0x1190ea['query']['includeAll']){_0x1b638c[_0x6f52('0x3a')]=[{'all':!![]}];}_0x1b638c=_[_0x6f52('0x35')]({},_0x1b638c,_0x1190ea['options']);return db[_0x6f52('0x26')]['find'](_0x1b638c)[_0x6f52('0x1f')](handleEntityNotFound(_0x5efdca,null))[_0x6f52('0x1f')](respondWithResult(_0x5efdca,null))['catch'](handleError(_0x5efdca,null));};exports[_0x6f52('0x40')]=function(_0x15969c,_0x337687){return db[_0x6f52('0x26')][_0x6f52('0x40')](_0x15969c[_0x6f52('0x41')],{})['then'](function(_0x1430b4){var _0xe7b5ce=_0x15969c['user'][_0x6f52('0x21')]({'plain':!![]});if(!_0xe7b5ce)throw new Error(_0x6f52('0x42'));if(_0xe7b5ce[_0x6f52('0x43')]===_0x6f52('0x44')){var _0x27cbf3=_0x1430b4[_0x6f52('0x21')]({'plain':!![]});var _0xd03ca4=_0x6f52('0x45');return db[_0x6f52('0x46')][_0x6f52('0x47')]({'where':{'name':_0xd03ca4,'userProfileId':_0xe7b5ce[_0x6f52('0x48')]},'raw':!![]})[_0x6f52('0x1f')](function(_0x1df7dd){if(_0x1df7dd&&_0x1df7dd[_0x6f52('0x49')]===0x0){return db[_0x6f52('0x4a')]['create']({'name':_0x27cbf3['name'],'resourceId':_0x27cbf3['id'],'type':_0x1df7dd[_0x6f52('0x23')],'sectionId':_0x1df7dd['id']},{})[_0x6f52('0x1f')](function(){return _0x1430b4;});}else{return _0x1430b4;}})[_0x6f52('0x3d')](function(_0x469b1d){logger[_0x6f52('0x4b')](_0x6f52('0x4c'),_0x469b1d);throw _0x469b1d;});}return _0x1430b4;})[_0x6f52('0x1f')](respondWithResult(_0x337687,0xc9))[_0x6f52('0x3d')](handleError(_0x337687,null));};exports[_0x6f52('0x4d')]=function(_0x4e001b,_0x5bf2df){if(_0x4e001b[_0x6f52('0x41')]['id']){delete _0x4e001b['body']['id'];}return db[_0x6f52('0x26')]['find']({'where':{'id':_0x4e001b['params']['id']}})[_0x6f52('0x1f')](handleEntityNotFound(_0x5bf2df,null))[_0x6f52('0x1f')](saveUpdates(_0x4e001b[_0x6f52('0x41')],null))['then'](respondWithResult(_0x5bf2df,null))[_0x6f52('0x3d')](handleError(_0x5bf2df,null));};exports[_0x6f52('0x20')]=function(_0x419525,_0x4298bd){return db[_0x6f52('0x26')][_0x6f52('0x47')]({'where':{'id':_0x419525[_0x6f52('0x3f')]['id']}})[_0x6f52('0x1f')](handleEntityNotFound(_0x4298bd,null))['then'](removeEntity(_0x4298bd,null))[_0x6f52('0x3d')](handleError(_0x4298bd,null));};exports[_0x6f52('0x27')]=function(_0x59c701,_0x301ca8){return db[_0x6f52('0x26')]['describe']()[_0x6f52('0x1f')](respondWithResult(_0x301ca8,null))[_0x6f52('0x3d')](handleError(_0x301ca8,null));};exports['addContacts']=function(_0x49a6d6,_0x1d02ae,_0x525ce3){return db[_0x6f52('0x4e')][_0x6f52('0x47')]({'where':{'id':_0x49a6d6[_0x6f52('0x3f')]['id']}})[_0x6f52('0x1f')](handleEntityNotFound(_0x1d02ae,null))[_0x6f52('0x1f')](function(_0x345d8f){if(_0x345d8f){return _0x345d8f[_0x6f52('0x4f')](_0x49a6d6[_0x6f52('0x41')]['ids'],_[_0x6f52('0x50')](_0x49a6d6[_0x6f52('0x41')],[_0x6f52('0x51'),'id'])||{});}})['then'](respondWithResult(_0x1d02ae,null))[_0x6f52('0x3d')](handleError(_0x1d02ae,null));};exports[_0x6f52('0x52')]=function(_0x31614c,_0x456674,_0x2a9712){var _0x5178d6={};var _0x44a3cd={};var _0x59eb9d;var _0x5ae47d;return db['CmCompany'][_0x6f52('0x53')]({'where':{'id':_0x31614c[_0x6f52('0x3f')]['id']}})[_0x6f52('0x1f')](handleEntityNotFound(_0x456674,null))[_0x6f52('0x1f')](function(_0x2fd1c9){if(_0x2fd1c9){_0x59eb9d=_0x2fd1c9;_0x44a3cd['model']=_[_0x6f52('0x29')](db[_0x6f52('0x4e')][_0x6f52('0x54')]);_0x44a3cd['query']=_[_0x6f52('0x29')](_0x31614c['query']);_0x44a3cd[_0x6f52('0x2b')]=_[_0x6f52('0x2c')](_0x44a3cd['model'],_0x44a3cd[_0x6f52('0x2a')]);_0x5178d6[_0x6f52('0x2d')]=_[_0x6f52('0x2c')](_0x44a3cd[_0x6f52('0x28')],qs[_0x6f52('0x2e')](_0x31614c[_0x6f52('0x2a')][_0x6f52('0x2e')]));_0x5178d6[_0x6f52('0x2d')]=_0x5178d6[_0x6f52('0x2d')][_0x6f52('0x2f')]?_0x5178d6[_0x6f52('0x2d')]:_0x44a3cd[_0x6f52('0x28')];_0x5178d6['order']=qs[_0x6f52('0x33')](_0x31614c[_0x6f52('0x2a')]['sort']);_0x5178d6[_0x6f52('0x36')]=qs[_0x6f52('0x2b')](_[_0x6f52('0x34')](_0x31614c[_0x6f52('0x2a')],_0x44a3cd['filters']));if(_0x31614c[_0x6f52('0x2a')][_0x6f52('0x37')]){_0x5178d6[_0x6f52('0x36')]=_['merge'](_0x5178d6['where'],{'$or':_['map'](_0x5178d6['attributes'],function(_0x3c1d59){var _0x2b9402={};_0x2b9402[_0x3c1d59]={'$like':'%'+_0x31614c[_0x6f52('0x2a')][_0x6f52('0x37')]+'%'};return _0x2b9402;})});}_0x5178d6=_['merge']({},_0x5178d6,_0x31614c[_0x6f52('0x38')]);return _0x59eb9d['getContacts'](_0x5178d6);}})[_0x6f52('0x1f')](function(_0xeea434){if(_0xeea434){_0x5ae47d=_0xeea434[_0x6f52('0x2f')];if(!_0x31614c[_0x6f52('0x2a')][_0x6f52('0x30')](_0x6f52('0x31'))){_0x5178d6['limit']=qs[_0x6f52('0x1c')](_0x31614c[_0x6f52('0x2a')][_0x6f52('0x1c')]);_0x5178d6[_0x6f52('0x19')]=qs[_0x6f52('0x19')](_0x31614c[_0x6f52('0x2a')]['offset']);}return _0x59eb9d[_0x6f52('0x52')](_0x5178d6);}})[_0x6f52('0x1f')](function(_0x2094aa){if(_0x2094aa){return _0x2094aa?{'count':_0x5ae47d,'rows':_0x2094aa}:null;}})[_0x6f52('0x1f')](respondWithResult(_0x456674,null))[_0x6f52('0x3d')](handleError(_0x456674,null));};
\ No newline at end of file
+var _0x8ee7=['attributes','intersection','fields','hasOwnProperty','nolimit','sort','where','pick','filter','merge','includeAll','include','catch','show','params','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addContacts','CmContact','omit','ids','rawAttributes','length','order','getContacts','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','json','undefined','count','offset','limit','status','set','Content-Range','apply','reject','update','then','get','Companies','UserProfileResource','destroy','end','error','stack','name','index','CmCompany','describe','keys','query','filters','model'];(function(_0x539ed8,_0x140b31){var _0x2dd25d=function(_0x24fa8a){while(--_0x24fa8a){_0x539ed8['push'](_0x539ed8['shift']());}};_0x2dd25d(++_0x140b31);}(_0x8ee7,0x17d));var _0x78ee=function(_0xcb7400,_0x5ee236){_0xcb7400=_0xcb7400-0x0;var _0x123a40=_0x8ee7[_0xcb7400];return _0x123a40;};'use strict';var emlformat=require(_0x78ee('0x0'));var rimraf=require(_0x78ee('0x1'));var zipdir=require(_0x78ee('0x2'));var jsonpatch=require(_0x78ee('0x3'));var rp=require('request-promise');var moment=require(_0x78ee('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x78ee('0x5'));var util=require(_0x78ee('0x6'));var path=require(_0x78ee('0x7'));var sox=require(_0x78ee('0x8'));var csv=require('to-csv');var ejs=require(_0x78ee('0x9'));var fs=require('fs');var fs_extra=require(_0x78ee('0xa'));var _=require(_0x78ee('0xb'));var squel=require(_0x78ee('0xc'));var crypto=require(_0x78ee('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x78ee('0xe'));var toCsv=require('to-csv');var querystring=require(_0x78ee('0xf'));var Papa=require(_0x78ee('0x10'));var Redis=require(_0x78ee('0x11'));var authService=require(_0x78ee('0x12'));var qs=require(_0x78ee('0x13'));var as=require(_0x78ee('0x14'));var hardwareService=require(_0x78ee('0x15'));var logger=require(_0x78ee('0x16'))(_0x78ee('0x17'));var utils=require(_0x78ee('0x18'));var config=require(_0x78ee('0x19'));var licenseUtil=require(_0x78ee('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5a3a7a,_0x3cfa51){_0x3cfa51=_0x3cfa51||0xcc;return function(_0x5de0c9){if(_0x5de0c9){return _0x5a3a7a['sendStatus'](_0x3cfa51);}return _0x5a3a7a['status'](_0x3cfa51)['end']();};}function respondWithResult(_0x2e3e15,_0x6c920e){_0x6c920e=_0x6c920e||0xc8;return function(_0xd4d8f5){if(_0xd4d8f5){return _0x2e3e15['status'](_0x6c920e)[_0x78ee('0x1b')](_0xd4d8f5);}};}function respondWithFilteredResult(_0x1bba98,_0x4989d5){return function(_0x3e06a2){if(_0x3e06a2){var _0x46ab1d=typeof _0x4989d5['offset']===_0x78ee('0x1c')&&typeof _0x4989d5['limit']===_0x78ee('0x1c');var _0x105d25=_0x3e06a2[_0x78ee('0x1d')];var _0x53a717=_0x46ab1d?0x0:_0x4989d5[_0x78ee('0x1e')];var _0x4c27e9=_0x46ab1d?_0x3e06a2[_0x78ee('0x1d')]:_0x4989d5[_0x78ee('0x1e')]+_0x4989d5[_0x78ee('0x1f')];var _0x3f2c9d;if(_0x4c27e9>=_0x105d25){_0x4c27e9=_0x105d25;_0x3f2c9d=0xc8;}else{_0x3f2c9d=0xce;}_0x1bba98[_0x78ee('0x20')](_0x3f2c9d);return _0x1bba98[_0x78ee('0x21')](_0x78ee('0x22'),_0x53a717+'-'+_0x4c27e9+'/'+_0x105d25)[_0x78ee('0x1b')](_0x3e06a2);}return null;};}function patchUpdates(_0x65cf42){return function(_0x105e85){try{jsonpatch[_0x78ee('0x23')](_0x105e85,_0x65cf42,!![]);}catch(_0x4b549d){return BPromise[_0x78ee('0x24')](_0x4b549d);}return _0x105e85['save']();};}function saveUpdates(_0x278075,_0xda482e){return function(_0x20bf04){if(_0x20bf04){return _0x20bf04[_0x78ee('0x25')](_0x278075)[_0x78ee('0x26')](function(_0x4ba13c){return _0x4ba13c;});}return null;};}function removeEntity(_0x40d190,_0x5cb53f){return function(_0x41cf9a){if(_0x41cf9a){return _0x41cf9a['destroy']()[_0x78ee('0x26')](function(){var _0xb5f7cd=_0x41cf9a[_0x78ee('0x27')]({'plain':!![]});var _0xc3dc24=_0x78ee('0x28');return db[_0x78ee('0x29')][_0x78ee('0x2a')]({'where':{'type':_0xc3dc24,'resourceId':_0xb5f7cd['id']}})[_0x78ee('0x26')](function(){return _0x41cf9a;});})[_0x78ee('0x26')](function(){_0x40d190[_0x78ee('0x20')](0xcc)[_0x78ee('0x2b')]();});}};}function handleEntityNotFound(_0x1090c2,_0x297533){return function(_0x53c7ce){if(!_0x53c7ce){_0x1090c2['sendStatus'](0x194);}return _0x53c7ce;};}function handleError(_0x1e59a2,_0x259477){_0x259477=_0x259477||0x1f4;return function(_0x136409){logger[_0x78ee('0x2c')](_0x136409[_0x78ee('0x2d')]);if(_0x136409[_0x78ee('0x2e')]){delete _0x136409[_0x78ee('0x2e')];}_0x1e59a2[_0x78ee('0x20')](_0x259477)['send'](_0x136409);};}exports[_0x78ee('0x2f')]=function(_0xcc69bb,_0x51fec4){var _0x1fa040={},_0x1744c0={},_0x4d57b9={'count':0x0,'rows':[]};return db[_0x78ee('0x30')][_0x78ee('0x31')]()[_0x78ee('0x26')](function(_0x3996a4){_0x1744c0['model']=_['keys'](_0x3996a4);_0x1744c0['query']=_[_0x78ee('0x32')](_0xcc69bb[_0x78ee('0x33')]);_0x1744c0[_0x78ee('0x34')]=_['intersection'](_0x1744c0[_0x78ee('0x35')],_0x1744c0[_0x78ee('0x33')]);_0x1fa040[_0x78ee('0x36')]=_[_0x78ee('0x37')](_0x1744c0['model'],qs[_0x78ee('0x38')](_0xcc69bb[_0x78ee('0x33')][_0x78ee('0x38')]));_0x1fa040['attributes']=_0x1fa040[_0x78ee('0x36')]['length']?_0x1fa040[_0x78ee('0x36')]:_0x1744c0[_0x78ee('0x35')];if(!_0xcc69bb[_0x78ee('0x33')][_0x78ee('0x39')](_0x78ee('0x3a'))){_0x1fa040[_0x78ee('0x1f')]=qs[_0x78ee('0x1f')](_0xcc69bb[_0x78ee('0x33')]['limit']);_0x1fa040[_0x78ee('0x1e')]=qs['offset'](_0xcc69bb[_0x78ee('0x33')][_0x78ee('0x1e')]);}_0x1fa040['order']=qs['sort'](_0xcc69bb[_0x78ee('0x33')][_0x78ee('0x3b')]);_0x1fa040[_0x78ee('0x3c')]=qs['filters'](_[_0x78ee('0x3d')](_0xcc69bb['query'],_0x1744c0[_0x78ee('0x34')]),_0x3996a4);if(_0xcc69bb['query'][_0x78ee('0x3e')]){_0x1fa040[_0x78ee('0x3c')]=_[_0x78ee('0x3f')](_0x1fa040[_0x78ee('0x3c')],{'$or':_['map'](_0x1fa040[_0x78ee('0x36')],function(_0x2a74a0){var _0x5c5c90={};_0x5c5c90[_0x2a74a0]={'$like':'%'+_0xcc69bb[_0x78ee('0x33')][_0x78ee('0x3e')]+'%'};return _0x5c5c90;})});}_0x1fa040=_['merge']({},_0x1fa040,_0xcc69bb['options']);var _0x40a823={'where':_0x1fa040[_0x78ee('0x3c')]};return db[_0x78ee('0x30')][_0x78ee('0x1d')](_0x40a823)[_0x78ee('0x26')](function(_0xe6756c){_0x4d57b9[_0x78ee('0x1d')]=_0xe6756c;if(_0xcc69bb[_0x78ee('0x33')][_0x78ee('0x40')]){_0x1fa040[_0x78ee('0x41')]=[{'all':!![]}];}return db[_0x78ee('0x30')]['findAll'](_0x1fa040);})[_0x78ee('0x26')](function(_0x2fcee7){_0x4d57b9['rows']=_0x2fcee7;return _0x4d57b9;})[_0x78ee('0x26')](respondWithFilteredResult(_0x51fec4,_0x1fa040))['catch'](handleError(_0x51fec4,null));})[_0x78ee('0x42')](handleError(_0x51fec4,null));};exports[_0x78ee('0x43')]=function(_0x5477f7,_0x406fbc){var _0x344a1a={'raw':![],'where':{'id':_0x5477f7[_0x78ee('0x44')]['id']}},_0xc84ff5={};_0xc84ff5[_0x78ee('0x35')]=_['keys'](db[_0x78ee('0x30')]['rawAttributes']);_0xc84ff5['query']=_[_0x78ee('0x32')](_0x5477f7[_0x78ee('0x33')]);_0xc84ff5[_0x78ee('0x34')]=_[_0x78ee('0x37')](_0xc84ff5[_0x78ee('0x35')],_0xc84ff5[_0x78ee('0x33')]);_0x344a1a[_0x78ee('0x36')]=_[_0x78ee('0x37')](_0xc84ff5[_0x78ee('0x35')],qs[_0x78ee('0x38')](_0x5477f7['query'][_0x78ee('0x38')]));_0x344a1a[_0x78ee('0x36')]=_0x344a1a[_0x78ee('0x36')]['length']?_0x344a1a[_0x78ee('0x36')]:_0xc84ff5[_0x78ee('0x35')];if(_0x5477f7[_0x78ee('0x33')]['includeAll']){_0x344a1a[_0x78ee('0x41')]=[{'all':!![]}];}_0x344a1a=_['merge']({},_0x344a1a,_0x5477f7[_0x78ee('0x45')]);return db[_0x78ee('0x30')]['find'](_0x344a1a)[_0x78ee('0x26')](handleEntityNotFound(_0x406fbc,null))[_0x78ee('0x26')](respondWithResult(_0x406fbc,null))[_0x78ee('0x42')](handleError(_0x406fbc,null));};exports['create']=function(_0x234073,_0x56a406){return db[_0x78ee('0x30')][_0x78ee('0x46')](_0x234073[_0x78ee('0x47')],{})['then'](function(_0x5efa9c){var _0x2dd875=_0x234073[_0x78ee('0x48')][_0x78ee('0x27')]({'plain':!![]});if(!_0x2dd875)throw new Error(_0x78ee('0x49'));if(_0x2dd875[_0x78ee('0x4a')]===_0x78ee('0x48')){var _0x4fb429=_0x5efa9c[_0x78ee('0x27')]({'plain':!![]});var _0x59809d='Companies';return db[_0x78ee('0x4b')][_0x78ee('0x4c')]({'where':{'name':_0x59809d,'userProfileId':_0x2dd875['userProfileId']},'raw':!![]})[_0x78ee('0x26')](function(_0x71c362){if(_0x71c362&&_0x71c362[_0x78ee('0x4d')]===0x0){return db[_0x78ee('0x29')][_0x78ee('0x46')]({'name':_0x4fb429[_0x78ee('0x2e')],'resourceId':_0x4fb429['id'],'type':_0x71c362[_0x78ee('0x2e')],'sectionId':_0x71c362['id']},{})['then'](function(){return _0x5efa9c;});}else{return _0x5efa9c;}})[_0x78ee('0x42')](function(_0x28aa71){logger[_0x78ee('0x2c')](_0x78ee('0x4e'),_0x28aa71);throw _0x28aa71;});}return _0x5efa9c;})['then'](respondWithResult(_0x56a406,0xc9))[_0x78ee('0x42')](handleError(_0x56a406,null));};exports[_0x78ee('0x25')]=function(_0x52ba8c,_0x1ffd9e){if(_0x52ba8c[_0x78ee('0x47')]['id']){delete _0x52ba8c[_0x78ee('0x47')]['id'];}return db[_0x78ee('0x30')]['find']({'where':{'id':_0x52ba8c[_0x78ee('0x44')]['id']}})['then'](handleEntityNotFound(_0x1ffd9e,null))[_0x78ee('0x26')](saveUpdates(_0x52ba8c[_0x78ee('0x47')],null))[_0x78ee('0x26')](respondWithResult(_0x1ffd9e,null))['catch'](handleError(_0x1ffd9e,null));};exports['destroy']=function(_0x33b9de,_0x3ef4cc){return db['CmCompany'][_0x78ee('0x4c')]({'where':{'id':_0x33b9de[_0x78ee('0x44')]['id']}})['then'](handleEntityNotFound(_0x3ef4cc,null))[_0x78ee('0x26')](removeEntity(_0x3ef4cc,null))[_0x78ee('0x42')](handleError(_0x3ef4cc,null));};exports[_0x78ee('0x31')]=function(_0xa4a79f,_0x5e7d42){return db[_0x78ee('0x30')][_0x78ee('0x31')]()[_0x78ee('0x26')](respondWithResult(_0x5e7d42,null))['catch'](handleError(_0x5e7d42,null));};exports[_0x78ee('0x4f')]=function(_0x1c2aee,_0x35f810,_0x3200b9){return db[_0x78ee('0x50')]['find']({'where':{'id':_0x1c2aee[_0x78ee('0x44')]['id']}})[_0x78ee('0x26')](handleEntityNotFound(_0x35f810,null))[_0x78ee('0x26')](function(_0x2fd0d5){if(_0x2fd0d5){return _0x2fd0d5['addContacts'](_0x1c2aee[_0x78ee('0x47')]['ids'],_[_0x78ee('0x51')](_0x1c2aee[_0x78ee('0x47')],[_0x78ee('0x52'),'id'])||{});}})['then'](respondWithResult(_0x35f810,null))[_0x78ee('0x42')](handleError(_0x35f810,null));};exports['getContacts']=function(_0x282d40,_0x2b9c18,_0x450723){var _0x50bbbc={};var _0x52b966={};var _0x26d556;var _0xec5f05;return db[_0x78ee('0x30')]['findOne']({'where':{'id':_0x282d40[_0x78ee('0x44')]['id']}})[_0x78ee('0x26')](handleEntityNotFound(_0x2b9c18,null))[_0x78ee('0x26')](function(_0x45c3db){if(_0x45c3db){_0x26d556=_0x45c3db;_0x52b966[_0x78ee('0x35')]=_[_0x78ee('0x32')](db[_0x78ee('0x50')][_0x78ee('0x53')]);_0x52b966[_0x78ee('0x33')]=_['keys'](_0x282d40[_0x78ee('0x33')]);_0x52b966[_0x78ee('0x34')]=_[_0x78ee('0x37')](_0x52b966[_0x78ee('0x35')],_0x52b966['query']);_0x50bbbc['attributes']=_[_0x78ee('0x37')](_0x52b966[_0x78ee('0x35')],qs[_0x78ee('0x38')](_0x282d40[_0x78ee('0x33')][_0x78ee('0x38')]));_0x50bbbc[_0x78ee('0x36')]=_0x50bbbc['attributes'][_0x78ee('0x54')]?_0x50bbbc[_0x78ee('0x36')]:_0x52b966['model'];_0x50bbbc[_0x78ee('0x55')]=qs[_0x78ee('0x3b')](_0x282d40[_0x78ee('0x33')]['sort']);_0x50bbbc[_0x78ee('0x3c')]=qs[_0x78ee('0x34')](_[_0x78ee('0x3d')](_0x282d40[_0x78ee('0x33')],_0x52b966['filters']));if(_0x282d40[_0x78ee('0x33')][_0x78ee('0x3e')]){_0x50bbbc[_0x78ee('0x3c')]=_[_0x78ee('0x3f')](_0x50bbbc['where'],{'$or':_['map'](_0x50bbbc[_0x78ee('0x36')],function(_0x1bafce){var _0x23a315={};_0x23a315[_0x1bafce]={'$like':'%'+_0x282d40[_0x78ee('0x33')]['filter']+'%'};return _0x23a315;})});}_0x50bbbc=_['merge']({},_0x50bbbc,_0x282d40['options']);return _0x26d556[_0x78ee('0x56')](_0x50bbbc);}})[_0x78ee('0x26')](function(_0x18498d){if(_0x18498d){_0xec5f05=_0x18498d[_0x78ee('0x54')];if(!_0x282d40['query']['hasOwnProperty']('nolimit')){_0x50bbbc[_0x78ee('0x1f')]=qs[_0x78ee('0x1f')](_0x282d40['query'][_0x78ee('0x1f')]);_0x50bbbc['offset']=qs[_0x78ee('0x1e')](_0x282d40['query'][_0x78ee('0x1e')]);}return _0x26d556[_0x78ee('0x56')](_0x50bbbc);}})[_0x78ee('0x26')](function(_0x14ea72){if(_0x14ea72){return _0x14ea72?{'count':_0xec5f05,'rows':_0x14ea72}:null;}})[_0x78ee('0x26')](respondWithResult(_0x2b9c18,null))[_0x78ee('0x42')](handleError(_0x2b9c18,null));};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js
index 5737cec..c0a541e 100644
--- a/server/api/cmCompany/cmCompany.model.js
+++ b/server/api/cmCompany/cmCompany.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa3dc=['../../config/environment','exports','define','CmCompany','cm_companies','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xa3dc,0x1d9));var _0xca3d=function(_0x1dbc22,_0x5dd20f){_0x1dbc22=_0x1dbc22-0x0;var _0x16f498=_0xa3dc[_0x1dbc22];return _0x16f498;};'use strict';var _=require(_0xca3d('0x0'));var util=require(_0xca3d('0x1'));var logger=require(_0xca3d('0x2'))(_0xca3d('0x3'));var moment=require('moment');var BPromise=require(_0xca3d('0x4'));var rp=require(_0xca3d('0x5'));var fs=require('fs');var path=require(_0xca3d('0x6'));var rimraf=require(_0xca3d('0x7'));var config=require(_0xca3d('0x8'));var attributes=require('./cmCompany.attributes');module[_0xca3d('0x9')]=function(_0x56da60,_0x1266c){return _0x56da60[_0xca3d('0xa')](_0xca3d('0xb'),attributes,{'tableName':_0xca3d('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2a9b=['define','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./cmCompany.attributes','exports'];(function(_0xd3940f,_0x51f17){var _0x4e3275=function(_0x4271d9){while(--_0x4271d9){_0xd3940f['push'](_0xd3940f['shift']());}};_0x4e3275(++_0x51f17);}(_0x2a9b,0xf3));var _0xb2a9=function(_0x5857d5,_0x37753c){_0x5857d5=_0x5857d5-0x0;var _0x19919e=_0x2a9b[_0x5857d5];return _0x19919e;};'use strict';var _=require(_0xb2a9('0x0'));var util=require(_0xb2a9('0x1'));var logger=require(_0xb2a9('0x2'))(_0xb2a9('0x3'));var moment=require(_0xb2a9('0x4'));var BPromise=require(_0xb2a9('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xb2a9('0x6'));var config=require(_0xb2a9('0x7'));var attributes=require(_0xb2a9('0x8'));module[_0xb2a9('0x9')]=function(_0x31ecc5,_0x3641eb){return _0x31ecc5[_0xb2a9('0xa')]('CmCompany',attributes,{'tableName':'cm_companies','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.rpc.js b/server/api/cmCompany/cmCompany.rpc.js
index bebb35b..830a89c 100644
--- a/server/api/cmCompany/cmCompany.rpc.js
+++ b/server/api/cmCompany/cmCompany.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc37d=['client','request','then','info','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','CmCompany,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise'];(function(_0x17eb80,_0x5ad17e){var _0x4af452=function(_0x59d82f){while(--_0x59d82f){_0x17eb80['push'](_0x17eb80['shift']());}};_0x4af452(++_0x5ad17e);}(_0xc37d,0x8a));var _0xdc37=function(_0x198984,_0x3c2baa){_0x198984=_0x198984-0x0;var _0x2861b9=_0xc37d[_0x198984];return _0x2861b9;};'use strict';var _=require(_0xdc37('0x0'));var util=require(_0xdc37('0x1'));var moment=require(_0xdc37('0x2'));var BPromise=require(_0xdc37('0x3'));var rs=require(_0xdc37('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdc37('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xdc37('0x6'))(_0xdc37('0x7'));var config=require('../../config/environment');var jayson=require(_0xdc37('0x8'));var client=jayson[_0xdc37('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4bb4c0,_0x42845c,_0x71a089){return new BPromise(function(_0x2c8bde,_0x3e1aae){return client[_0xdc37('0xa')](_0x4bb4c0,_0x71a089)[_0xdc37('0xb')](function(_0x3d66e5){logger[_0xdc37('0xc')]('CmCompany,\x20%s,\x20%s',_0x42845c,_0xdc37('0xd'));logger[_0xdc37('0xe')](_0xdc37('0xf'),_0x42845c,_0xdc37('0xd'),JSON[_0xdc37('0x10')](_0x3d66e5));if(_0x3d66e5['error']){if(_0x3d66e5['error']['code']===0x1f4){logger[_0xdc37('0x11')](_0xdc37('0x12'),_0x42845c,_0x3d66e5[_0xdc37('0x11')][_0xdc37('0x13')]);return _0x3e1aae(_0x3d66e5[_0xdc37('0x11')]['message']);}logger[_0xdc37('0x11')](_0xdc37('0x12'),_0x42845c,_0x3d66e5['error']['message']);return _0x2c8bde(_0x3d66e5[_0xdc37('0x11')][_0xdc37('0x13')]);}else{logger['info'](_0xdc37('0x12'),_0x42845c,'request\x20sent');_0x2c8bde(_0x3d66e5['result'][_0xdc37('0x13')]);}})[_0xdc37('0x14')](function(_0x162fd6){logger[_0xdc37('0x11')]('CmCompany,\x20%s,\x20%s',_0x42845c,_0x162fd6);_0x3e1aae(_0x162fd6);});});}
\ No newline at end of file
+var _0x821b=['result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x5ceb6f,_0x28522e){var _0x5aa54f=function(_0x92f843){while(--_0x92f843){_0x5ceb6f['push'](_0x5ceb6f['shift']());}};_0x5aa54f(++_0x28522e);}(_0x821b,0x10a));var _0xb821=function(_0x1928c9,_0x13a6d1){_0x1928c9=_0x1928c9-0x0;var _0x51b5fb=_0x821b[_0x1928c9];return _0x51b5fb;};'use strict';var _=require(_0xb821('0x0'));var util=require('util');var moment=require(_0xb821('0x1'));var BPromise=require(_0xb821('0x2'));var rs=require(_0xb821('0x3'));var fs=require('fs');var Redis=require(_0xb821('0x4'));var db=require(_0xb821('0x5'))['db'];var utils=require(_0xb821('0x6'));var logger=require('../../config/logger')(_0xb821('0x7'));var config=require(_0xb821('0x8'));var jayson=require(_0xb821('0x9'));var client=jayson[_0xb821('0xa')][_0xb821('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x599867,_0x584943,_0x20cd86){return new BPromise(function(_0x7e30a2,_0x3af142){return client[_0xb821('0xc')](_0x599867,_0x20cd86)[_0xb821('0xd')](function(_0x2861b4){logger[_0xb821('0xe')](_0xb821('0xf'),_0x584943,_0xb821('0x10'));logger['debug'](_0xb821('0x11'),_0x584943,_0xb821('0x10'),JSON[_0xb821('0x12')](_0x2861b4));if(_0x2861b4[_0xb821('0x13')]){if(_0x2861b4[_0xb821('0x13')][_0xb821('0x14')]===0x1f4){logger[_0xb821('0x13')](_0xb821('0xf'),_0x584943,_0x2861b4[_0xb821('0x13')]['message']);return _0x3af142(_0x2861b4['error']['message']);}logger[_0xb821('0x13')](_0xb821('0xf'),_0x584943,_0x2861b4[_0xb821('0x13')][_0xb821('0x15')]);return _0x7e30a2(_0x2861b4[_0xb821('0x13')]['message']);}else{logger[_0xb821('0xe')]('CmCompany,\x20%s,\x20%s',_0x584943,'request\x20sent');_0x7e30a2(_0x2861b4[_0xb821('0x16')][_0xb821('0x15')]);}})[_0xb821('0x17')](function(_0x51b80c){logger[_0xb821('0x13')](_0xb821('0xf'),_0x584943,_0x51b80c);_0x3af142(_0x51b80c);});});}
\ No newline at end of file
diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js
index 135b9b2..fa5a5fa 100644
--- a/server/api/cmCompany/index.js
+++ b/server/api/cmCompany/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfcf4=['exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./cmCompany.controller','get','isAuthenticated','index','/describe','show','/:id/contacts','getContacts','post','addContacts','put','/:id','delete','destroy'];(function(_0x2fc012,_0x503e5b){var _0x2891f9=function(_0x295f5e){while(--_0x295f5e){_0x2fc012['push'](_0x2fc012['shift']());}};_0x2891f9(++_0x503e5b);}(_0xfcf4,0x1cd));var _0x4fcf=function(_0x4fbf5a,_0x68559f){_0x4fbf5a=_0x4fbf5a-0x0;var _0x2bf64e=_0xfcf4[_0x4fbf5a];return _0x2bf64e;};'use strict';var multer=require(_0x4fcf('0x0'));var util=require('util');var path=require(_0x4fcf('0x1'));var timeout=require(_0x4fcf('0x2'));var express=require(_0x4fcf('0x3'));var router=express[_0x4fcf('0x4')]();var fs_extra=require(_0x4fcf('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x4fcf('0x6'));var config=require(_0x4fcf('0x7'));var controller=require(_0x4fcf('0x8'));router[_0x4fcf('0x9')]('/',auth[_0x4fcf('0xa')](),controller[_0x4fcf('0xb')]);router[_0x4fcf('0x9')](_0x4fcf('0xc'),auth[_0x4fcf('0xa')](),controller['describe']);router['get']('/:id',auth[_0x4fcf('0xa')](),controller[_0x4fcf('0xd')]);router[_0x4fcf('0x9')](_0x4fcf('0xe'),auth['isAuthenticated'](),controller[_0x4fcf('0xf')]);router[_0x4fcf('0x10')]('/',auth['isAuthenticated'](),controller['create']);router[_0x4fcf('0x10')]('/:id/contacts',auth['isAuthenticated'](),controller[_0x4fcf('0x11')]);router[_0x4fcf('0x12')](_0x4fcf('0x13'),auth[_0x4fcf('0xa')](),controller['update']);router[_0x4fcf('0x14')](_0x4fcf('0x13'),auth[_0x4fcf('0xa')](),controller[_0x4fcf('0x15')]);module[_0x4fcf('0x16')]=router;
\ No newline at end of file
+var _0x016e=['express','Router','fs-extra','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','show','/:id/contacts','getContacts','post','create','addContacts','put','/:id','update','exports','multer','util','connect-timeout'];(function(_0x48826f,_0x5ddf95){var _0x54940d=function(_0x1531d9){while(--_0x1531d9){_0x48826f['push'](_0x48826f['shift']());}};_0x54940d(++_0x5ddf95);}(_0x016e,0x1b5));var _0xe016=function(_0x33aeec,_0x4f358b){_0x33aeec=_0x33aeec-0x0;var _0xba3855=_0x016e[_0x33aeec];return _0xba3855;};'use strict';var multer=require(_0xe016('0x0'));var util=require(_0xe016('0x1'));var path=require('path');var timeout=require(_0xe016('0x2'));var express=require(_0xe016('0x3'));var router=express[_0xe016('0x4')]();var fs_extra=require(_0xe016('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xe016('0x6'));var config=require('../../config/environment');var controller=require('./cmCompany.controller');router[_0xe016('0x7')]('/',auth[_0xe016('0x8')](),controller[_0xe016('0x9')]);router[_0xe016('0x7')](_0xe016('0xa'),auth[_0xe016('0x8')](),controller[_0xe016('0xb')]);router['get']('/:id',auth[_0xe016('0x8')](),controller[_0xe016('0xc')]);router[_0xe016('0x7')](_0xe016('0xd'),auth[_0xe016('0x8')](),controller[_0xe016('0xe')]);router[_0xe016('0xf')]('/',auth[_0xe016('0x8')](),controller[_0xe016('0x10')]);router[_0xe016('0xf')](_0xe016('0xd'),auth['isAuthenticated'](),controller[_0xe016('0x11')]);router[_0xe016('0x12')](_0xe016('0x13'),auth[_0xe016('0x8')](),controller[_0xe016('0x14')]);router['delete'](_0xe016('0x13'),auth[_0xe016('0x8')](),controller['destroy']);module[_0xe016('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js
index d64d5c4..9837adc 100644
--- a/server/api/cmContact/cmContact.attributes.js
+++ b/server/api/cmContact/cmContact.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa7a8=['NOW','lodash','sequelize','exports','STRING','INTEGER','DATE'];(function(_0x2f3794,_0x3c3bec){var _0x1c9fbe=function(_0x2d2eac){while(--_0x2d2eac){_0x2f3794['push'](_0x2f3794['shift']());}};_0x1c9fbe(++_0x3c3bec);}(_0xa7a8,0x1f2));var _0x8a7a=function(_0x5f79aa,_0x561ce0){_0x5f79aa=_0x5f79aa-0x0;var _0x27e4a6=_0xa7a8[_0x5f79aa];return _0x27e4a6;};'use strict';var _=require(_0x8a7a('0x0'));var Sequelize=require(_0x8a7a('0x1'));module[_0x8a7a('0x2')]={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize[_0x8a7a('0x3')]},'street':{'type':Sequelize[_0x8a7a('0x3')]},'postalCode':{'type':Sequelize[_0x8a7a('0x3')]},'city':{'type':Sequelize[_0x8a7a('0x3')]},'country':{'type':Sequelize[_0x8a7a('0x3')]},'dateOfBirth':{'type':Sequelize[_0x8a7a('0x3')]},'description':{'type':Sequelize['TEXT']},'phone':{'type':Sequelize[_0x8a7a('0x3')]},'mobile':{'type':Sequelize['STRING']},'fax':{'type':Sequelize[_0x8a7a('0x3')]},'email':{'type':Sequelize[_0x8a7a('0x3')]},'url':{'type':Sequelize[_0x8a7a('0x3')]},'facebook':{'type':Sequelize[_0x8a7a('0x3')]},'fb_data':{'type':Sequelize[_0x8a7a('0x3')]},'twitter':{'type':Sequelize[_0x8a7a('0x3')]},'skype':{'type':Sequelize[_0x8a7a('0x3')]},'teams':{'type':Sequelize['STRING']},'viber':{'type':Sequelize['STRING']},'line':{'type':Sequelize[_0x8a7a('0x3')]},'wechat':{'type':Sequelize[_0x8a7a('0x3')]},'telegram':{'type':Sequelize[_0x8a7a('0x3')]},'UserId':{'type':Sequelize[_0x8a7a('0x4')]},'AdditionalPhones':{'type':Sequelize[_0x8a7a('0x3')]},'priority':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x8a7a('0x5')],'defaultValue':Sequelize[_0x8a7a('0x6')]},'dialTimezone':{'type':Sequelize[_0x8a7a('0x3')]},'utcOffset':{'type':Sequelize[_0x8a7a('0x4')]}};
\ No newline at end of file
+var _0xa54c=['STRING','TEXT','INTEGER','DATE','NOW','lodash'];(function(_0x5379c4,_0x5686ff){var _0x535152=function(_0x27644d){while(--_0x27644d){_0x5379c4['push'](_0x5379c4['shift']());}};_0x535152(++_0x5686ff);}(_0xa54c,0x125));var _0xca54=function(_0x13b8f3,_0x442821){_0x13b8f3=_0x13b8f3-0x0;var _0x1a6d06=_0xa54c[_0x13b8f3];return _0x1a6d06;};'use strict';var _=require(_0xca54('0x0'));var Sequelize=require('sequelize');module['exports']={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize[_0xca54('0x1')]},'street':{'type':Sequelize[_0xca54('0x1')]},'postalCode':{'type':Sequelize[_0xca54('0x1')]},'city':{'type':Sequelize[_0xca54('0x1')]},'country':{'type':Sequelize[_0xca54('0x1')]},'dateOfBirth':{'type':Sequelize[_0xca54('0x1')]},'description':{'type':Sequelize[_0xca54('0x2')]},'phone':{'type':Sequelize[_0xca54('0x1')]},'mobile':{'type':Sequelize[_0xca54('0x1')]},'fax':{'type':Sequelize[_0xca54('0x1')]},'email':{'type':Sequelize[_0xca54('0x1')]},'url':{'type':Sequelize[_0xca54('0x1')]},'facebook':{'type':Sequelize[_0xca54('0x1')]},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize['STRING']},'skype':{'type':Sequelize[_0xca54('0x1')]},'teams':{'type':Sequelize[_0xca54('0x1')]},'viber':{'type':Sequelize[_0xca54('0x1')]},'line':{'type':Sequelize[_0xca54('0x1')]},'wechat':{'type':Sequelize[_0xca54('0x1')]},'telegram':{'type':Sequelize[_0xca54('0x1')]},'UserId':{'type':Sequelize[_0xca54('0x3')]},'AdditionalPhones':{'type':Sequelize[_0xca54('0x1')]},'priority':{'type':Sequelize[_0xca54('0x3')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0xca54('0x4')],'defaultValue':Sequelize[_0xca54('0x5')]},'dialTimezone':{'type':Sequelize['STRING']},'utcOffset':{'type':Sequelize[_0xca54('0x3')]}};
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js
index 4e0def4..a162bb5 100644
--- a/server/api/cmContact/cmContact.controller.js
+++ b/server/api/cmContact/cmContact.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['source','destination','endtime','duration','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','fullname','alias','DESC','findAndCountAll','startCase','Website','Account','closedAt','disposition','secondDisposition','thirdDisposition','Owner','browserName','customerIp','osName','ratingType','subject','substatus','externalUrl','threadId','Interaction','flatten','reverse','value','slice','moment','bluebird','util','squel','ioredis','../../components/contacts','../../components/parsers/qs','../../config/logger','api','../../config/environment/shared','../../mysqldb','redis','localhost','./cmContact.socket','register','status','offset','undefined','limit','count','Content-Range','then','destroy','end','sendStatus','stack','name','describe','getOptions','findAll','query','user','catch','CmContact','find','params','tags','keys','startsWith','cf_','displayName','analytics','CmCustomField','length','columnName','custom','type','values','forEach','hasOwnProperty','body','from','get','isArray','join','info','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatInteraction','update','ChatMessage','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','SmsMessage','FaxInteraction','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmContactHasItem','CmHopperFinal','ReportAgentPreview','VoiceCallReport','ChatQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','WhatsappInteraction','WhatsappMessage','WhatsappQueueReport','dialTimezone','isNil','timezones','utcOffset','additionalPhones','bulkCreate','duplicates','where','$or','push','ListId','findOrCreate','spread','all','show','Tag','color','tag','Phones','ContactItemType','ItemType','literal','Phones.OrderBy','$and','map','format','omit','cf_%d','isEmpty','cm_contacts','id\x20=\x20?','toParam','text','phone','getTags','model','rawAttributes','filters','intersection','attributes','fields','order','sort','pick','filter','merge','nolimit','setTags','findOne','ids','setAdditionalPhones','OrderBy','items','item_types','ItemTypeId','description','contact\x20phone\x20exists','CmHopperAdditionalPhone','item','sequelize','`ItemType`.OrderBy','CmHopperId','ItemType.OrderBy','getAdditionalPhones','PHONE','duplicateAdditionalPhones','CmContactId','toContactId','rescheduleAdditionalPhones','ContactId','options','includeAll','include','getHopperHistories','CmHopperHistory','rows','getJscriptySessions','JscriptySessionReport','uploadCsv','No\x20ListId\x20specified','binding_keys','No\x20association\x20keys\x20specified!','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','split','Incorrect\x20binding\x20parameters\x20passed!','zipObject','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','root','file','chmodSync','0777','child_process','fork','../../components/import/cm/csv','CompanyId','json','File\x20uploaded\x20correctly!','pid','send','path','meta','import','agent','binding','stringify','message','start\x20child\x20process\x20correctly!','error\x20child\x20process','importUpdates','User','../../components/import/cm/csvUpdates','exit','getJourney','mail','chat','sms','openchannel','fax','whatsapp','voice','-createdAt','resolve','channel','includes','toLowerCase','Invalid\x20channel','range','parse','isValid','Invalid\x20date\x20for\x20range\x20to\x20filter','Invalid\x20createdAt\x20filter'];(function(_0x8ba19a,_0x1d2b2b){var _0x2bd8b4=function(_0xee823f){while(--_0xee823f){_0x8ba19a['push'](_0x8ba19a['shift']());}};_0x2bd8b4(++_0x1d2b2b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xa9e0[_0x2dafbe];return _0x58a45a;};'use strict';var moment=require(_0x0a9e('0x0'));var BPromise=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var path=require('path');var fs=require('fs');var _=require('lodash');var squel=require(_0x0a9e('0x3'));var Papa=require('papaparse');var Redis=require(_0x0a9e('0x4'));var contacts=require(_0x0a9e('0x5'));var qs=require(_0x0a9e('0x6'));var logger=require(_0x0a9e('0x7'))(_0x0a9e('0x8'));var config=require('../../config/environment');var shared=require(_0x0a9e('0x9'));var db=require(_0x0a9e('0xa'))['db'];config[_0x0a9e('0xb')]=_['defaults'](config['redis'],{'host':_0x0a9e('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x0a9e('0xd'))[_0x0a9e('0xe')](socket);function respondWithResult(_0x307b3e,_0x3ab53f){_0x3ab53f=_0x3ab53f||0xc8;return function(_0xfeb75b){if(_0xfeb75b){return _0x307b3e[_0x0a9e('0xf')](_0x3ab53f)['json'](_0xfeb75b);}};}function respondWithFilteredResult(_0x50dfb2,_0x527cdd){return function(_0x4cfe67){if(_0x4cfe67){var _0x273d4d=typeof _0x527cdd[_0x0a9e('0x10')]===_0x0a9e('0x11')&&typeof _0x527cdd[_0x0a9e('0x12')]===_0x0a9e('0x11');var _0x69aeb7=_0x4cfe67['count'];var _0x4283ce=_0x273d4d?0x0:_0x527cdd[_0x0a9e('0x10')];var _0x2b4227=_0x273d4d?_0x4cfe67[_0x0a9e('0x13')]:_0x527cdd[_0x0a9e('0x10')]+_0x527cdd[_0x0a9e('0x12')];var _0x52a03d;if(_0x2b4227>=_0x69aeb7){_0x2b4227=_0x69aeb7;_0x52a03d=0xc8;}else{_0x52a03d=0xce;}_0x50dfb2[_0x0a9e('0xf')](_0x52a03d);return _0x50dfb2['set'](_0x0a9e('0x14'),_0x4283ce+'-'+_0x2b4227+'/'+_0x69aeb7)['json'](_0x4cfe67);}return null;};}function saveUpdates(_0x16033c){return function(_0x12066b){if(_0x12066b){return _0x12066b['update'](_0x16033c)[_0x0a9e('0x15')](function(_0x5a0a06){return _0x5a0a06;});}return null;};}function removeEntity(_0x459eb1){return function(_0x478723){if(_0x478723){return _0x478723[_0x0a9e('0x16')]()[_0x0a9e('0x15')](function(){_0x459eb1[_0x0a9e('0xf')](0xcc)[_0x0a9e('0x17')]();});}};}function handleEntityNotFound(_0x530eb7){return function(_0x20559e){if(!_0x20559e){_0x530eb7[_0x0a9e('0x18')](0x194);}return _0x20559e;};}function handleError(_0x112016,_0x1c696a){_0x1c696a=_0x1c696a||0x1f4;return function(_0x105080){logger['error'](_0x105080[_0x0a9e('0x19')]);if(_0x105080[_0x0a9e('0x1a')]){delete _0x105080['name'];}_0x112016[_0x0a9e('0xf')](_0x1c696a)['send'](_0x105080);};}exports['index']=function(_0x3a02e1,_0x432e56){var _0x38e7c4={};return contacts[_0x0a9e('0x1b')]()['then'](function(_0xfb6e48){_0x38e7c4=qs[_0x0a9e('0x1c')](_0xfb6e48,_0x3a02e1);return contacts[_0x0a9e('0x1d')](_0x3a02e1[_0x0a9e('0x1e')],_0x3a02e1[_0x0a9e('0x1f')],_0x38e7c4,_0xfb6e48);})[_0x0a9e('0x15')](respondWithFilteredResult(_0x432e56,_0x38e7c4))[_0x0a9e('0x20')](handleError(_0x432e56,null));};exports['destroy']=function(_0x59181e,_0x197ec0){return db[_0x0a9e('0x21')][_0x0a9e('0x22')]({'where':{'id':_0x59181e[_0x0a9e('0x23')]['id']}})['then'](handleEntityNotFound(_0x197ec0,null))[_0x0a9e('0x15')](removeEntity(_0x197ec0,null))['catch'](handleError(_0x197ec0,null));};exports[_0x0a9e('0x1b')]=function(_0x5bfb33,_0x1dc186){return db[_0x0a9e('0x21')][_0x0a9e('0x1b')]()[_0x0a9e('0x15')](function(_0x140511){delete _0x140511[_0x0a9e('0x24')];for(var _0x11c3b6=0x0;_0x11c3b6
','generateXOAuth2Token','user=','utf-8','toString','base64','lodash','node-tnef','email','../../../config/environment','head','address','anonymous','generate','@xcally.com','name','split','length','join','Anonymous','value','pop','isEmpty','html','test'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1c37,0x197));var _0x71c3=function(_0x3b7095,_0x49dcfd){_0x3b7095=_0x3b7095-0x0;var _0x4aec9c=_0x1c37[_0x3b7095];return _0x4aec9c;};'use strict';var _=require(_0x71c3('0x0'));var moment=require('moment');var random=require('randomstring');var fs=require('fs');var path=require('path');var util=require('util');var tnef=require(_0x71c3('0x1'));var logger=require('../../../config/logger')(_0x71c3('0x2'));var config=require(_0x71c3('0x3'));function getAddress(_0xb6b29d){var _0x301463=_[_0x71c3('0x4')](_0xb6b29d['value']);return _0x301463&&_0x301463[_0x71c3('0x5')]?_0x301463[_0x71c3('0x5')]:_0x71c3('0x6')+random[_0x71c3('0x7')](0x6)+_0x71c3('0x8');}function getFirstName(_0x1ac00f){var _0x1d4abb=_['head'](_0x1ac00f['value']);if(_0x1d4abb&&_0x1d4abb[_0x71c3('0x9')]){if(_0x1d4abb[_0x71c3('0x9')]==_0x1d4abb['address']){return _0x1d4abb[_0x71c3('0x9')]['substring'](0x0,_0x1d4abb[_0x71c3('0x9')]['indexOf']('@'));}var _0x283012=_0x1d4abb[_0x71c3('0x9')][_0x71c3('0xa')](/\s+/);return _0x283012[_0x71c3('0xb')]>0x1?_0x283012['slice'](0x0,-0x1)[_0x71c3('0xc')]('\x20'):_0x1d4abb['name'];}return _0x71c3('0xd');}function getLastName(_0x75c357){var _0x15a0e2=_[_0x71c3('0x4')](_0x75c357[_0x71c3('0xe')]);if(_0x15a0e2&&_0x15a0e2['name']){var _0x2a722d=_0x15a0e2[_0x71c3('0x9')]['split'](/\s+/);return _0x2a722d['length']>0x1?_0x2a722d[_0x71c3('0xf')]():'';}return'';}function getMails(_0x14ebc6,_0x122a0c){var _0x2a4b4c='';for(var _0x33601c=0x0;_0x33601c<_0x122a0c[_0x71c3('0xe')][_0x71c3('0xb')];_0x33601c+=0x1){if(_0x122a0c['value'][_0x33601c][_0x71c3('0x5')]!==_0x14ebc6){if(!_[_0x71c3('0x10')](_0x2a4b4c)){_0x2a4b4c+=',';}_0x2a4b4c+=_0x122a0c[_0x71c3('0xe')][_0x33601c][_0x71c3('0x9')]||_0x122a0c['value'][_0x33601c][_0x71c3('0x5')]||'';_0x2a4b4c+='\x20<';_0x2a4b4c+=_0x122a0c['value'][_0x33601c][_0x71c3('0x5')]?_0x122a0c[_0x71c3('0xe')][_0x33601c][_0x71c3('0x5')]:_0x71c3('0x6')+random['generate'](0x6)+'@xcally.com';_0x2a4b4c+='>';}}return _0x2a4b4c;}function parseEmail(_0x5b8ded,_0x24a0de,_0x5b10e7){if(_0x24a0de[_0x71c3('0x11')]){var _0x30152b=/